aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--composer/e-msg-composer.c15
-rw-r--r--mail/mail-account-gui.c15
2 files changed, 10 insertions, 20 deletions
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
index f00cab01d7..b3516396c3 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -2040,18 +2040,13 @@ signature_removed (ESignatureList *signatures, ESignature *sig, EMsgComposer *co
}
static void
-menu_item_set_label (GtkWidget *widget, const char *label)
+menu_item_set_label (GtkMenuItem *item, const char *label)
{
- GList *child;
+ GtkWidget *widget;
- child = gtk_container_get_children ((GtkContainer *) widget);
- while (child != NULL) {
- if (GTK_IS_LABEL (child->data)) {
- gtk_label_set_text (child->data, label);
- break;
- }
- child = child->next;
- }
+ widget = gtk_bin_get_child ((GtkBin *) item);
+ if (GTK_IS_LABEL (widget))
+ gtk_label_set_text ((GtkLabel *) widget, label);
}
static void
diff --git a/mail/mail-account-gui.c b/mail/mail-account-gui.c
index 97cffb7fb3..6234b2007e 100644
--- a/mail/mail-account-gui.c
+++ b/mail/mail-account-gui.c
@@ -1318,18 +1318,13 @@ signature_removed (ESignatureList *signatures, ESignature *sig, MailAccountGui *
}
static void
-menu_item_set_label (GtkWidget *widget, const char *label)
+menu_item_set_label (GtkMenuItem *item, const char *label)
{
- GList *child;
+ GtkWidget *widget;
- child = gtk_container_get_children ((GtkContainer *) widget);
- while (child != NULL) {
- if (GTK_IS_LABEL (child->data)) {
- gtk_label_set_text (child->data, label);
- break;
- }
- child = child->next;
- }
+ widget = gtk_bin_get_child ((GtkBin *) item);
+ if (GTK_IS_LABEL (widget))
+ gtk_label_set_text ((GtkLabel *) widget, label);
}
static void