Skip to content
Browse files

prepared reply button. ugly, and not working....

  • Loading branch information...
1 parent b40ff26 commit f1874b04a93ce24b3d0132146dbdda7ee9c9d117 @rene-dev rene-dev committed Jun 28, 2011
Showing with 12 additions and 2 deletions.
  1. +6 −0 controller.go
  2. +6 −2 gui.go
View
6 controller.go
@@ -66,3 +66,9 @@ func url2pixbuf(url string) *gdkpixbuf.GdkPixbuf {
func SendTweet(text string) {
gotter.PostTweet(accounts.Credentials, "https://api.twitter.com/1/statuses/update.json", map[string]string{"status": text})
}
+
+func addReply(id string,name string){
+ println(name)
+ println(id)
+ //newTweetTextField.SetText("")
+}
View
8 gui.go
@@ -80,7 +80,7 @@ func Gui() {
vbox.Add(notebook)
//--------------------------------------------------------
- // Fild for Tweets
+ // Field for Tweets
//--------------------------------------------------------
hbox := gtk.HBox(false, 1)
@@ -155,13 +155,17 @@ func TweetWidget(tweet gotter.Tweet) *gtk.GtkFrame {
}
whenfromtext := gtk.Label(hour + ":" + minute)
//wherefromtext := gtk.Label(tweet.Source)
+ replyButton := gtk.ButtonWithLabel("Reply")
+ replyButton.Clicked(func() {
+ addReply(tweet.Identifier,tweet.User.ScreenName)
+ })
hbox.PackStart(image, false, false, 0)
hbox.PackEndDefaults(vbox)
vbox.PackStart(tweettext, false, false, 0)
vbox.PackEnd(whenfromtext, false, false, 0)
//vbox.PackEnd(wherefromtext, false, false, 0)
-
+ vbox.PackEnd(replyButton, false, false, 0)
frame.Add(hbox)
return frame

0 comments on commit f1874b0

Please sign in to comment.
Something went wrong with that request. Please try again.