From 73060c73fa785a2fa968cc99c8cde5b293f89a2c Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 5 Sep 2005 18:45:33 +0000 Subject: [PATCH] Set the label of a button if it has no child. (#315253, John Finlay) 2005-09-05 Matthias Clasen * gtk/gtkaction.c (connect_proxy): Set the label of a button if it has no child. (#315253, John Finlay) --- ChangeLog | 5 +++++ ChangeLog.pre-2-10 | 5 +++++ gtk/gtkaction.c | 3 ++- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 2ee66a4dc2..9bc9a876f6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-09-05 Matthias Clasen + + * gtk/gtkaction.c (connect_proxy): Set the label of a button + if it has no child. (#315253, John Finlay) + 2005-09-02 Matthias Clasen * gtk/gtkentry.c (gtk_entry_destroy): Disconnect idle handlers diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 2ee66a4dc2..9bc9a876f6 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,8 @@ +2005-09-05 Matthias Clasen + + * gtk/gtkaction.c (connect_proxy): Set the label of a button + if it has no child. (#315253, John Finlay) + 2005-09-02 Matthias Clasen * gtk/gtkentry.c (gtk_entry_destroy): Disconnect idle handlers diff --git a/gtk/gtkaction.c b/gtk/gtkaction.c index 2996bb3717..604c896122 100644 --- a/gtk/gtkaction.c +++ b/gtk/gtkaction.c @@ -955,7 +955,8 @@ connect_proxy (GtkAction *action, G_CALLBACK (gtk_action_sync_button_stock_id), proxy, 0); } - else if (GTK_IS_LABEL(GTK_BIN(proxy)->child)) + else if (GTK_BIN (proxy)->child == NULL || + GTK_IS_LABEL (GTK_BIN (proxy)->child)) { /* synchronise the label */ g_object_set (proxy,