[gthumb/ext] added some icons, changed some toolbar items



commit 0b974fab3e466019a00c07e908bf99788ca71ff4
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Fri Nov 27 17:22:54 2009 +0100

    added some icons, changed some toolbar items

 configure.ac                                    |    3 +++
 data/icons/16x16/Makefile.am                    |    2 +-
 data/icons/16x16/actions/Makefile.am            |   12 ++++++++++++
 data/icons/16x16/actions/browser-mode.png       |  Bin 0 -> 585 bytes
 data/icons/22x22/Makefile.am                    |    2 +-
 data/icons/22x22/actions/Makefile.am            |   14 ++++++++++++++
 data/icons/22x22/actions/browser-mode.png       |  Bin 0 -> 871 bytes
 data/icons/22x22/actions/palette.png            |  Bin 0 -> 1390 bytes
 data/icons/22x22/actions/zoom-fit-width.png     |  Bin 0 -> 1405 bytes
 data/icons/48x48/Makefile.am                    |    2 +-
 data/icons/48x48/actions/Makefile.am            |   13 +++++++++++++
 data/icons/48x48/actions/browser-mode.png       |  Bin 0 -> 2897 bytes
 data/icons/48x48/actions/palette.png            |  Bin 0 -> 4057 bytes
 extensions/image_viewer/gth-image-viewer-page.c |    1 -
 extensions/list_tools/callbacks.c               |    2 ++
 extensions/search/callbacks.c                   |   18 +++++++-----------
 gthumb/gth-browser-actions-entries.h            |    6 +++---
 gthumb/gth-browser-ui.h                         |    7 +++----
 gthumb/gth-browser.c                            |    8 ++++++++
 19 files changed, 68 insertions(+), 22 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 48c1b87..3382299 100644
--- a/configure.ac
+++ b/configure.ac
@@ -278,12 +278,15 @@ data/gthumb.desktop.in
 data/gthumb-import.desktop.in
 data/icons/Makefile
 data/icons/16x16/Makefile
+data/icons/16x16/actions/Makefile
 data/icons/16x16/apps/Makefile
 data/icons/22x22/Makefile
+data/icons/22x22/actions/Makefile
 data/icons/22x22/apps/Makefile
 data/icons/32x32/Makefile
 data/icons/32x32/apps/Makefile
 data/icons/48x48/Makefile
+data/icons/48x48/actions/Makefile
 data/icons/48x48/apps/Makefile
 data/icons/scalable/Makefile
 data/icons/scalable/apps/Makefile
diff --git a/data/icons/16x16/Makefile.am b/data/icons/16x16/Makefile.am
index 906a50e..4497479 100644
--- a/data/icons/16x16/Makefile.am
+++ b/data/icons/16x16/Makefile.am
@@ -1,3 +1,3 @@
-SUBDIRS = apps
+SUBDIRS = actions apps
 
 -include $(top_srcdir)/git.mk
diff --git a/data/icons/16x16/actions/Makefile.am b/data/icons/16x16/actions/Makefile.am
new file mode 100644
index 0000000..6c3a6bf
--- /dev/null
+++ b/data/icons/16x16/actions/Makefile.am
@@ -0,0 +1,12 @@
+themedir = $(pkgdatadir)/icons/hicolor
+size = 16x16
+context = actions
+
+iconsdir = $(themedir)/$(size)/$(context)
+
+icons_DATA = 			\
+	browser-mode.png
+
+EXTRA_DIST = $(icons_DATA)	
+
+-include $(top_srcdir)/git.mk
diff --git a/data/icons/16x16/actions/browser-mode.png b/data/icons/16x16/actions/browser-mode.png
new file mode 100644
index 0000000..2861d84
Binary files /dev/null and b/data/icons/16x16/actions/browser-mode.png differ
diff --git a/data/icons/22x22/Makefile.am b/data/icons/22x22/Makefile.am
index 906a50e..4497479 100644
--- a/data/icons/22x22/Makefile.am
+++ b/data/icons/22x22/Makefile.am
@@ -1,3 +1,3 @@
-SUBDIRS = apps
+SUBDIRS = actions apps
 
 -include $(top_srcdir)/git.mk
diff --git a/data/icons/22x22/actions/Makefile.am b/data/icons/22x22/actions/Makefile.am
new file mode 100644
index 0000000..9ca4857
--- /dev/null
+++ b/data/icons/22x22/actions/Makefile.am
@@ -0,0 +1,14 @@
+themedir = $(pkgdatadir)/icons/hicolor
+size = 22x22
+context = actions
+
+iconsdir = $(themedir)/$(size)/$(context)
+
+icons_DATA = 			\
+	browser-mode.png	\
+	palette.png		\
+	zoom-fit-width.png
+
+EXTRA_DIST = $(icons_DATA)	
+
+-include $(top_srcdir)/git.mk
diff --git a/data/icons/22x22/actions/browser-mode.png b/data/icons/22x22/actions/browser-mode.png
new file mode 100644
index 0000000..3c3e9e5
Binary files /dev/null and b/data/icons/22x22/actions/browser-mode.png differ
diff --git a/data/icons/22x22/actions/palette.png b/data/icons/22x22/actions/palette.png
new file mode 100644
index 0000000..c2a15cb
Binary files /dev/null and b/data/icons/22x22/actions/palette.png differ
diff --git a/data/icons/22x22/actions/zoom-fit-width.png b/data/icons/22x22/actions/zoom-fit-width.png
new file mode 100644
index 0000000..f9fe77f
Binary files /dev/null and b/data/icons/22x22/actions/zoom-fit-width.png differ
diff --git a/data/icons/48x48/Makefile.am b/data/icons/48x48/Makefile.am
index 906a50e..4497479 100644
--- a/data/icons/48x48/Makefile.am
+++ b/data/icons/48x48/Makefile.am
@@ -1,3 +1,3 @@
-SUBDIRS = apps
+SUBDIRS = actions apps
 
 -include $(top_srcdir)/git.mk
diff --git a/data/icons/48x48/actions/Makefile.am b/data/icons/48x48/actions/Makefile.am
new file mode 100644
index 0000000..3569215
--- /dev/null
+++ b/data/icons/48x48/actions/Makefile.am
@@ -0,0 +1,13 @@
+themedir = $(pkgdatadir)/icons/hicolor
+size = 48x48
+context = actions
+
+iconsdir = $(themedir)/$(size)/$(context)
+
+icons_DATA = 			\
+	browser-mode.png	\
+	palette.png
+
+EXTRA_DIST = $(icons_DATA)	
+
+-include $(top_srcdir)/git.mk
diff --git a/data/icons/48x48/actions/browser-mode.png b/data/icons/48x48/actions/browser-mode.png
new file mode 100644
index 0000000..c6b6723
Binary files /dev/null and b/data/icons/48x48/actions/browser-mode.png differ
diff --git a/data/icons/48x48/actions/palette.png b/data/icons/48x48/actions/palette.png
new file mode 100644
index 0000000..78ea61a
Binary files /dev/null and b/data/icons/48x48/actions/palette.png differ
diff --git a/extensions/image_viewer/gth-image-viewer-page.c b/extensions/image_viewer/gth-image-viewer-page.c
index ff3b84e..9de5307 100644
--- a/extensions/image_viewer/gth-image-viewer-page.c
+++ b/extensions/image_viewer/gth-image-viewer-page.c
@@ -45,7 +45,6 @@ struct _GthImageViewerPagePrivate {
 	guint              hide_mouse_timeout;
 	guint              motion_signal;
 	gboolean           pixbuf_changed;
-
 };
 
 static gpointer gth_image_viewer_page_parent_class = NULL;
diff --git a/extensions/list_tools/callbacks.c b/extensions/list_tools/callbacks.c
index 870580e..4fce6c6 100644
--- a/extensions/list_tools/callbacks.c
+++ b/extensions/list_tools/callbacks.c
@@ -231,6 +231,7 @@ list_tools__gth_browser_construct_cb (GthBrowser *browser)
 	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"));
+	gtk_tool_item_set_is_important (GTK_TOOL_ITEM (tool_item), TRUE);
 	gtk_widget_show (GTK_WIDGET (tool_item));
 	gtk_toolbar_insert (GTK_TOOLBAR (gth_browser_get_browser_toolbar (browser)), tool_item, -1);
 
@@ -239,6 +240,7 @@ list_tools__gth_browser_construct_cb (GthBrowser *browser)
 	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"));
+	gtk_tool_item_set_is_important (GTK_TOOL_ITEM (tool_item), TRUE);
 	gtk_widget_show (GTK_WIDGET (tool_item));
 	gtk_toolbar_insert (GTK_TOOLBAR (gth_browser_get_viewer_toolbar (browser)), tool_item, 9);
 
diff --git a/extensions/search/callbacks.c b/extensions/search/callbacks.c
index 313bf2b..a1d340d 100644
--- a/extensions/search/callbacks.c
+++ b/extensions/search/callbacks.c
@@ -53,7 +53,7 @@ static const char *find_ui_info =
 static GtkActionEntry find_action_entries[] = {
 	{ "Edit_Find", GTK_STOCK_FIND,
 	  NULL, NULL,
-	  NULL,
+	  N_("Find files"),
 	  G_CALLBACK (gth_browser_activate_action_edit_find) }
 };
 static guint find_action_entries_size = G_N_ELEMENTS (find_action_entries);
@@ -71,8 +71,8 @@ static const char *search_ui_info =
 "  </menubar>"
 "  <toolbar name='ToolBar'>"
 "    <placeholder name='SourceCommands'>"
-"      <toolitem action='Edit_Search_Update'/>"
 "      <toolitem action='Edit_Search_Edit'/>"
+"      <toolitem action='Edit_Search_Update'/>"
 "    </placeholder>"
 "  </toolbar>"
 "</ui>";
@@ -81,11 +81,11 @@ static const char *search_ui_info =
 static GtkActionEntry search_actions_entries[] = {
 	{ "Edit_Search_Edit", GTK_STOCK_FIND_AND_REPLACE,
 	  N_("Edit Search"), "<ctrl>F",
-	  NULL,
+	  N_("Edit search criteria"),
 	  G_CALLBACK (gth_browser_activate_action_edit_search_edit) },
 	{ "Edit_Search_Update", GTK_STOCK_REFRESH,
 	  N_("Redo Search"), "<shift><ctrl>R",
-	  NULL,
+	  N_("Update search results"),
 	  G_CALLBACK (gth_browser_activate_action_edit_search_update) }
 };
 static guint search_actions_entries_size = G_N_ELEMENTS (search_actions_entries);
@@ -110,7 +110,6 @@ void
 search__gth_browser_construct_cb (GthBrowser *browser)
 {
 	BrowserData *data;
-	GError      *error = NULL;
 
 	g_return_if_fail (GTH_IS_BROWSER (browser));
 
@@ -132,12 +131,6 @@ search__gth_browser_construct_cb (GthBrowser *browser)
 				      browser);
 	gtk_ui_manager_insert_action_group (gth_browser_get_ui_manager (browser), data->search_actions, 0);
 
-	data->find_merge_id = gtk_ui_manager_add_ui_from_string (gth_browser_get_ui_manager (browser), find_ui_info, -1, &error);
-	if (data->find_merge_id == 0) {
-		g_warning ("building menus failed: %s", error->message);
-		g_error_free (error);
-	}
-
 	g_object_set_data_full (G_OBJECT (browser), BROWSER_DATA_KEY, data, (GDestroyNotify) browser_data_free);
 }
 
@@ -169,6 +162,8 @@ search__gth_browser_load_location_after_cb (GthBrowser   *browser,
 				g_warning ("building menus failed: %s", local_error->message);
 				g_error_free (local_error);
 			}
+			/*gtk_tool_item_set_is_important (GTK_TOOL_ITEM (gtk_ui_manager_get_widget (gth_browser_get_ui_manager (browser), "/ToolBar/SourceCommands/Edit_Search_Update")), TRUE);*/
+			gtk_tool_item_set_is_important (GTK_TOOL_ITEM (gtk_ui_manager_get_widget (gth_browser_get_ui_manager (browser), "/ToolBar/SourceCommands/Edit_Search_Edit")), TRUE);
 		}
 	}
 	else {
@@ -184,6 +179,7 @@ search__gth_browser_load_location_after_cb (GthBrowser   *browser,
 				g_warning ("building menus failed: %s", local_error->message);
 				g_error_free (local_error);
 			}
+			gtk_tool_item_set_is_important (GTK_TOOL_ITEM (gtk_ui_manager_get_widget (gth_browser_get_ui_manager (browser), "/ToolBar/SourceCommands/Edit_Find")), TRUE);
 		}
 	}
 
diff --git a/gthumb/gth-browser-actions-entries.h b/gthumb/gth-browser-actions-entries.h
index 01c1b06..620c6ba 100644
--- a/gthumb/gth-browser-actions-entries.h
+++ b/gthumb/gth-browser-actions-entries.h
@@ -215,9 +215,9 @@ static GtkToggleActionEntry gth_browser_action_toggle_entries[] = {
 	  N_("View file properties"),
 	  G_CALLBACK (gth_browser_activate_action_viewer_properties),
 	  FALSE },
-	{ "Viewer_Tools", GTK_STOCK_EDIT,
-	  NULL, NULL,
-	  N_("View file tools"),
+	{ "Viewer_Tools", "palette",
+	  N_("Edit"), NULL,
+	  N_("Edit file"),
 	  G_CALLBACK (gth_browser_activate_action_viewer_tools),
 	  FALSE },
 };
diff --git a/gthumb/gth-browser-ui.h b/gthumb/gth-browser-ui.h
index 9a62477..51c8971 100644
--- a/gthumb/gth-browser-ui.h
+++ b/gthumb/gth-browser-ui.h
@@ -116,9 +116,8 @@ static const char *fixed_ui_info =
 "    <toolitem action='View_Next'/>"
 "    <separator/>"
 "    <placeholder name='ViewerCommands'/>"
-/*"    <placeholder name='ViewerCommands_2'/>"*/
 "    <separator/>"
-/*"    <toolitem action='Edit_Metadata'/>"*/
+"    <toolitem action='Edit_Metadata'/>"
 "    <placeholder name='Edit_Actions'/>"
 "    <separator expand='true'/>"
 "    <placeholder name='ViewerCommandsSecondary'/>"
@@ -131,9 +130,9 @@ static const char *fixed_ui_info =
 "    <toolitem action='View_Prev'/>"
 "    <toolitem action='View_Next'/>"
 "    <separator/>"
-"    <toolitem action='Edit_Metadata'/>"
-"    <separator/>"
 "    <placeholder name='ViewerCommands'/>"
+"    <separator/>"
+"    <toolitem action='Edit_Metadata'/>"
 "    <separator expand='true'/>"
 "    <placeholder name='ViewerCommandsSecondary'/>"
 "    <toolitem action='Viewer_Properties'/>"
diff --git a/gthumb/gth-browser.c b/gthumb/gth-browser.c
index 9524c27..257f04e 100644
--- a/gthumb/gth-browser.c
+++ b/gthumb/gth-browser.c
@@ -1902,6 +1902,7 @@ _gth_browser_update_browser_ui (GthBrowser *browser,
 			g_warning ("ui building failed: %s", error->message);
 			g_clear_error (&error);
 		}
+		gtk_tool_item_set_is_important (GTK_TOOL_ITEM (gtk_ui_manager_get_widget (browser->priv->ui, "/ToolBar/BrowserCommands/Edit_Metadata")), TRUE);
 	}
 	else if (browser->priv->browser_ui_merge_id != 0) {
 		gtk_ui_manager_remove_ui (browser->priv->ui, browser->priv->browser_ui_merge_id);
@@ -3160,6 +3161,13 @@ _gth_browser_construct (GthBrowser *browser)
 	gtk_widget_show (browser->priv->viewer_toolbar);
 	gth_window_attach_toolbar (GTH_WINDOW (browser), GTH_BROWSER_PAGE_VIEWER, browser->priv->viewer_toolbar);
 
+	gtk_tool_item_set_is_important (GTK_TOOL_ITEM (gtk_ui_manager_get_widget (browser->priv->ui, "/ViewerToolBar/View_Prev")), TRUE);
+	gtk_tool_item_set_is_important (GTK_TOOL_ITEM (gtk_ui_manager_get_widget (browser->priv->ui, "/ViewerToolBar/View_Next")), TRUE);
+	gtk_tool_item_set_is_important (GTK_TOOL_ITEM (gtk_ui_manager_get_widget (browser->priv->ui, "/ViewerToolBar/Edit_Metadata")), TRUE);
+	gtk_tool_item_set_is_important (GTK_TOOL_ITEM (gtk_ui_manager_get_widget (browser->priv->ui, "/Fullscreen_ToolBar/View_Prev")), TRUE);
+	gtk_tool_item_set_is_important (GTK_TOOL_ITEM (gtk_ui_manager_get_widget (browser->priv->ui, "/Fullscreen_ToolBar/View_Next")), TRUE);
+	gtk_tool_item_set_is_important (GTK_TOOL_ITEM (gtk_ui_manager_get_widget (browser->priv->ui, "/Fullscreen_ToolBar/Edit_Metadata")), TRUE);
+
 	/* content */
 
 	browser->priv->viewer_pane = gtk_hpaned_new ();



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