im.pidgin.cpw.resiak.disconnectreason: 5db9a4fc4ce0375558d343ab39f2b6f39453031b

resiak at soc.pidgin.im resiak at soc.pidgin.im
Mon Nov 5 06:05:36 EST 2007


-----------------------------------------------------------------
Revision: 5db9a4fc4ce0375558d343ab39f2b6f39453031b
Ancestor: 6aa1321a3bc75ae00914b5d94f966471f077e17a
Author: resiak at soc.pidgin.im
Date: 2007-11-05T10:29:13
Branch: im.pidgin.cpw.resiak.disconnectreason

Modified files:
        pidgin/gtkblist.c pidgin/minidialog.c

ChangeLog: 

Really actually hide the description label inside a minidialog, even when
someone calls show_all on the minidialog.  The "no-show-all" gtkwidget property
is useful!

-------------- next part --------------
============================================================
--- pidgin/gtkblist.c	e8e1ce76cb26c4912fac30cd9127c35a4882dc1c
+++ pidgin/gtkblist.c	b717d0c448a2f9066065bd46a6b81a3a445c1d74
@@ -4445,7 +4445,6 @@ add_generic_error_dialog(PurpleAccount *
 		account);
 
 	add_error_dialog(gtkblist, mini_dialog);
-	gtk_widget_show_all(mini_dialog);
 }
 
 static void
@@ -4524,11 +4523,7 @@ ensure_signed_on_elsewhere_minidialog(Pi
 		ignore_elsewhere_accounts, NULL);
 
 	add_error_dialog(gtkblist, GTK_WIDGET(mini_dialog));
-	gtk_widget_show_all(GTK_WIDGET(mini_dialog));
 
-	/* Hide the description field now that the dialog has been shown. */
-	g_object_set(G_OBJECT(mini_dialog), "description", NULL, NULL);
-
 	/* Set priv->signed_on_elsewhere to NULL when the dialog is destroyed */
 	g_signal_connect(G_OBJECT(mini_dialog), "destroy",
 		(GCallback) gtk_widget_destroyed, &(priv->signed_on_elsewhere));
============================================================
--- pidgin/minidialog.c	d2db74b74925b4cd15e973602b60fec5a591b888
+++ pidgin/minidialog.c	667e68a68e9179b52b34a3870999af59b2e2ebca
@@ -226,11 +226,13 @@ mini_dialog_set_description(PidginMiniDi
 		g_free(desc_markup);
 
 		gtk_widget_show(GTK_WIDGET(priv->desc));
+		g_object_set(G_OBJECT(priv->desc), "no-show-all", FALSE, NULL);
 	}
 	else
 	{
 		gtk_label_set_text(priv->desc, NULL);
 		gtk_widget_hide(GTK_WIDGET(priv->desc));
+		g_object_set(G_OBJECT(priv->desc), "no-show-all", TRUE, NULL);
 	}
 }
 
@@ -342,6 +344,10 @@ pidgin_mini_dialog_init(PidginMiniDialog
 	gtk_widget_set_size_request(GTK_WIDGET(priv->desc), label_width, -1);
 	gtk_label_set_line_wrap(priv->desc, TRUE);
 	gtk_misc_set_alignment(GTK_MISC(priv->desc), 0, 0);
+	/* make calling show_all() on the minidialog not affect desc even though
+	 * it's packed inside it.
+	 */
+	g_object_set(G_OBJECT(priv->desc), "no-show-all", TRUE, NULL);
 
 	self->contents = GTK_BOX(gtk_vbox_new(FALSE, 0));
 
@@ -353,5 +359,4 @@ pidgin_mini_dialog_init(PidginMiniDialog
 	gtk_box_pack_start(self_box, GTK_WIDGET(priv->buttons), FALSE, FALSE, 0);
 
 	gtk_widget_show_all(GTK_WIDGET(self));
-	gtk_widget_hide(GTK_WIDGET(priv->desc));
 }


More information about the Commits mailing list