From 4e30cc37538c7d0c68a8183f352fa4c96476cc17 Mon Sep 17 00:00:00 2001 From: Tavmjong Bah Date: Thu, 13 May 2010 14:16:04 +0200 Subject: Get rid of unneeded labels when the icons are self-explanatory. (bzr r9410) --- src/ege-select-one-action.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/ege-select-one-action.cpp') diff --git a/src/ege-select-one-action.cpp b/src/ege-select-one-action.cpp index 32c1ef9b4..199b0cf68 100644 --- a/src/ege-select-one-action.cpp +++ b/src/ege-select-one-action.cpp @@ -665,7 +665,10 @@ GtkWidget* create_tool_item( GtkAction* action ) gchar* sss = 0; g_object_get( G_OBJECT(action), "short_label", &sss, NULL ); - if (sss) { + // If short_label not defined, g_object_get will return label. + // This hack allows a label to be used with a drop-down menu when + // no label is used with a set of icons that are self-explanatory. + if (sss && strcmp( sss, "NotUsed" ) != 0 ) { GtkWidget* lbl; lbl = gtk_label_new(sss); gtk_box_pack_start( GTK_BOX(holder), lbl, FALSE, FALSE, 4 ); -- cgit v1.2.3