changeset 27035:9c36a340fcaf

Setting `dialog->open_button = button` when `button` is not yet assigned anything seems a bit silly. Anyway, this should fix some GTK+ errors from showing up because of widget==NULL.
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Fri, 05 Jun 2009 05:15:09 +0000
parents b58672890b3f
children f3b0232ef1ea
files pidgin/gtknotify.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin/gtknotify.c	Fri Jun 05 04:27:53 2009 +0000
+++ b/pidgin/gtknotify.c	Fri Jun 05 05:15:09 2009 +0000
@@ -120,7 +120,7 @@
 {
 	PIDGIN_NOTIFY_MAIL,
 	PIDGIN_NOTIFY_POUNCE,
-        PIDGIN_NOTIFY_TYPES
+	PIDGIN_NOTIFY_TYPES
 } PidginNotifyType;
 
 static PidginNotifyDialog *mail_dialog = NULL;
@@ -1379,7 +1379,6 @@
 
 	spec_dialog = g_new0(PidginNotifyDialog, 1);
 	spec_dialog->dialog = dialog;
-	spec_dialog->open_button = button;
 
 	spec_dialog->treemodel = treemodel;
 	spec_dialog->treeview = gtk_tree_view_new_with_model(GTK_TREE_MODEL(spec_dialog->treemodel));
@@ -1399,6 +1398,7 @@
 
 		button = gtk_dialog_add_button(GTK_DIALOG(dialog),
 						 PIDGIN_STOCK_OPEN_MAIL, GTK_RESPONSE_YES);
+		spec_dialog->open_button = button;
 
 		gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(spec_dialog->treeview), FALSE);
 
@@ -1496,7 +1496,7 @@
 		mail_dialog = spec_dialog;
 	else if (type == PIDGIN_NOTIFY_POUNCE) {
 		pounce_dialog = spec_dialog;
-        }
+	}
 
 	return spec_dialog->dialog;