From 26e35d5504187e6bc92e9841568ab4a925d1d036 Mon Sep 17 00:00:00 2001 From: mattn Date: Tue, 12 Feb 2013 12:47:23 +0900 Subject: [PATCH] fix gui. --- example/example-gui.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/example/example-gui.go b/example/example-gui.go index 90fffaa..f29bdf0 100644 --- a/example/example-gui.go +++ b/example/example-gui.go @@ -54,8 +54,8 @@ func main() { password.SetVisibility(false) hbox.Add(password) - dialog.AddButton(gtk.STOCK_OK, int(gtk.RESPONSE_OK)) - dialog.AddButton(gtk.STOCK_CANCEL, int(gtk.RESPONSE_CANCEL)) + dialog.AddButton(gtk.STOCK_OK, gtk.RESPONSE_OK) + dialog.AddButton(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL) dialog.SetDefaultResponse(int(gtk.RESPONSE_OK)) dialog.SetTransientFor(window) dialog.ShowAll() @@ -95,7 +95,9 @@ func main() { var iter gtk.TextIter buffer.GetStartIter(&iter) - buffer.Insert(&iter, chat.Remote+": "+chat.Text+"\n") + if msg, ok := chat.(xmpp.Chat); ok { + buffer.Insert(&iter, msg.Remote+": "+msg.Text+"\n") + } }() } }()