Mercurial > pidgin
changeset 21415:5203f3836da5
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!
author | Will Thompson <will.thompson@collabora.co.uk> |
---|---|
date | Mon, 05 Nov 2007 10:29:13 +0000 |
parents | c972c9311221 |
children | 0f469b9a4302 |
files | pidgin/gtkblist.c pidgin/minidialog.c |
diffstat | 2 files changed, 6 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/pidgin/gtkblist.c Mon Nov 05 01:39:39 2007 +0000 +++ b/pidgin/gtkblist.c Mon Nov 05 10:29:13 2007 +0000 @@ -4445,7 +4445,6 @@ account); add_error_dialog(gtkblist, mini_dialog); - gtk_widget_show_all(mini_dialog); } static void @@ -4524,10 +4523,6 @@ 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",
--- a/pidgin/minidialog.c Mon Nov 05 01:39:39 2007 +0000 +++ b/pidgin/minidialog.c Mon Nov 05 10:29:13 2007 +0000 @@ -226,11 +226,13 @@ 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 @@ 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 @@ 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)); }