[gthumb] added an arrow to the tools toolbar button



commit 5d238d26c4a7a593e9f81a041be92805b2400704
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Sun Mar 21 18:20:47 2010 +0100

    added an arrow to the tools toolbar button
    
    the arrow suggets that if the button is clicked a menu will be shown

 extensions/list_tools/callbacks.c |   21 +++++++++++++++++++--
 1 files changed, 19 insertions(+), 2 deletions(-)
---
diff --git a/extensions/list_tools/callbacks.c b/extensions/list_tools/callbacks.c
index 5f11013..3349c97 100644
--- a/extensions/list_tools/callbacks.c
+++ b/extensions/list_tools/callbacks.c
@@ -200,6 +200,23 @@ scripts_changed_cb (GthScriptFile *script_file,
 }
 
 
+static GtkWidget *
+create_tool_label_widget (void)
+{
+	GtkWidget *box;
+	GtkWidget *child;
+
+	box = gtk_hbox_new (FALSE, 6);
+	child = gtk_label_new (_("Tools"));
+	gtk_box_pack_start (GTK_BOX (box), child, FALSE, FALSE, 0);
+	child = gtk_arrow_new (GTK_ARROW_DOWN, GTK_SHADOW_NONE);
+	gtk_box_pack_start (GTK_BOX (box), child, FALSE, FALSE, 0);
+	gtk_widget_show_all (box);
+
+	return box;
+}
+
+
 void
 list_tools__gth_browser_construct_cb (GthBrowser *browser)
 {
@@ -227,7 +244,7 @@ list_tools__gth_browser_construct_cb (GthBrowser *browser)
 	/* tools menu button */
 
 	tool_item = gth_toggle_menu_tool_button_new ();
-	gtk_tool_button_set_label (GTK_TOOL_BUTTON (tool_item), _("Tools"));
+	gtk_tool_button_set_label_widget (GTK_TOOL_BUTTON (tool_item), create_tool_label_widget ());
 	gtk_widget_set_tooltip_text (GTK_WIDGET (tool_item), _("Batch tools for multiple files"));
 	gtk_tool_button_set_icon_name (GTK_TOOL_BUTTON (tool_item), GTK_STOCK_EXECUTE);
 	gth_toggle_menu_tool_button_set_menu (GTH_TOGGLE_MENU_TOOL_BUTTON (tool_item), gtk_ui_manager_get_widget (gth_browser_get_ui_manager (browser), "/ListToolsPopup"));
@@ -236,7 +253,7 @@ list_tools__gth_browser_construct_cb (GthBrowser *browser)
 	gtk_toolbar_insert (GTK_TOOLBAR (gth_browser_get_browser_toolbar (browser)), tool_item, -1);
 
 	tool_item = gth_toggle_menu_tool_button_new ();
-	gtk_tool_button_set_label (GTK_TOOL_BUTTON (tool_item), _("Tools"));
+	gtk_tool_button_set_label_widget (GTK_TOOL_BUTTON (tool_item), create_tool_label_widget ());
 	gtk_widget_set_tooltip_text (GTK_WIDGET (tool_item), _("Batch tools for multiple files"));
 	gtk_tool_button_set_icon_name (GTK_TOOL_BUTTON (tool_item), GTK_STOCK_EXECUTE);
 	gth_toggle_menu_tool_button_set_menu (GTH_TOGGLE_MENU_TOOL_BUTTON (tool_item), gtk_ui_manager_get_widget (gth_browser_get_ui_manager (browser), "/ListToolsPopup"));



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]