[gthumb] removed unused menus
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb] removed unused menus
- Date: Sat, 9 Nov 2013 20:04:54 +0000 (UTC)
commit aa7de7d674232b26155003c8aea440586e5e72ee
Author: Paolo Bacchilega <paobac src gnome org>
Date: Sat Oct 19 18:05:06 2013 +0200
removed unused menus
gthumb/gth-browser.c | 164 --------------------------------------------------
gthumb/gth-browser.h | 17 -----
2 files changed, 0 insertions(+), 181 deletions(-)
---
diff --git a/gthumb/gth-browser.c b/gthumb/gth-browser.c
index 9009809..ca6e655 100644
--- a/gthumb/gth-browser.c
+++ b/gthumb/gth-browser.c
@@ -353,170 +353,6 @@ _gth_browser_get_action_active (GthBrowser *browser,
}
-static void
-activate_go_back_menu_item (GtkMenuItem *menuitem,
- gpointer data)
-{
- GthBrowser *browser = data;
-
- gth_browser_go_back (browser, GPOINTER_TO_INT (g_object_get_data (G_OBJECT (menuitem), "steps")));
-}
-
-
-static void
-activate_go_forward_menu_item (GtkMenuItem *menuitem,
- gpointer data)
-{
- GthBrowser *browser = data;
-
- gth_browser_go_forward (browser, GPOINTER_TO_INT (g_object_get_data (G_OBJECT (menuitem), "steps")));
-}
-
-
-static void
-activate_go_up_menu_item (GtkMenuItem *menuitem,
- gpointer data)
-{
- GthBrowser *browser = data;
-
- gth_browser_go_up (browser, GPOINTER_TO_INT (g_object_get_data (G_OBJECT (menuitem), "steps")));
-}
-
-
-static void
-activate_go_to_menu_item (GtkMenuItem *menuitem,
- gpointer data)
-{
- GthBrowser *browser = data;
- GFile *location;
-
- location = g_file_new_for_uri (g_object_get_data (G_OBJECT (menuitem), "uri"));
- gth_browser_go_to (browser, location, NULL);
-
- g_object_unref (location);
-}
-
-
-void
-_gth_browser_add_file_menu_item_full (GthBrowser *browser,
- GtkWidget *menu,
- GFile *file,
- GIcon *icon,
- const char *display_name,
- GthAction action,
- int steps,
- int position)
-{
- GdkPixbuf *pixbuf;
- GtkWidget *menu_item;
-
- pixbuf = gth_icon_cache_get_pixbuf (browser->priv->menu_icon_cache, icon);
-
- menu_item = gtk_image_menu_item_new_with_label (display_name);
- gtk_image_menu_item_set_always_show_image (GTK_IMAGE_MENU_ITEM (menu_item), TRUE);
- if (pixbuf != NULL)
- gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_item), gtk_image_new_from_pixbuf
(pixbuf));
- else
- gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_item), gtk_image_new_from_stock
(GTK_STOCK_OPEN, GTK_ICON_SIZE_MENU));
- gtk_widget_show (menu_item);
- if (position == -1)
- gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
- else
- gtk_menu_shell_insert (GTK_MENU_SHELL (menu), menu_item, position);
-
- if (action == GTH_ACTION_GO_TO) {
- char *parse_name;
- char *tooltip;
-
- parse_name = g_file_get_parse_name (file);
- tooltip = g_strdup_printf (_("Open %s"), parse_name);
- gtk_widget_set_tooltip_text (GTK_WIDGET (menu_item), tooltip);
-
- g_object_set_data_full (G_OBJECT (menu_item),
- "uri",
- g_file_get_uri (file),
- (GDestroyNotify) g_free);
- g_signal_connect (menu_item,
- "activate",
- G_CALLBACK (activate_go_to_menu_item),
- browser);
-
- g_free (tooltip);
- g_free (parse_name);
- }
- else {
- g_object_set_data (G_OBJECT (menu_item),
- "steps",
- GINT_TO_POINTER (steps));
- if (action == GTH_ACTION_GO_BACK)
- g_signal_connect (menu_item,
- "activate",
- G_CALLBACK (activate_go_back_menu_item),
- browser);
- else if (action == GTH_ACTION_GO_FORWARD)
- g_signal_connect (menu_item,
- "activate",
- G_CALLBACK (activate_go_forward_menu_item),
- browser);
- else if (action == GTH_ACTION_GO_UP)
- g_signal_connect (menu_item,
- "activate",
- G_CALLBACK (activate_go_up_menu_item),
- browser);
- }
-
- if (pixbuf != NULL)
- g_object_unref (pixbuf);
-}
-
-
-void
-_gth_browser_add_file_menu_item (GthBrowser *browser,
- GtkWidget *menu,
- GFile *file,
- const char *display_name,
- GthAction action,
- int steps)
-{
- GthFileSource *file_source;
- GFileInfo *info;
-
- file_source = gth_main_get_file_source (file);
- info = gth_file_source_get_file_info (file_source, file, GFILE_DISPLAY_ATTRIBUTES);
- if (info != NULL) {
- _gth_browser_add_file_menu_item_full (browser,
- menu,
- file,
- g_file_info_get_icon (info),
- (display_name != NULL) ? display_name :
g_file_info_get_display_name (info),
- action,
- steps,
- -1);
- g_object_unref (info);
- }
- else {
- GIcon *icon;
- char *name;
-
- icon = _g_file_get_icon (file);
- name = _g_file_get_display_name (file);
- _gth_browser_add_file_menu_item_full (browser,
- menu,
- file,
- icon,
- (display_name != NULL) ? display_name : name,
- action,
- steps,
- -1);
-
- g_free (name);
- g_object_unref (icon);
- }
-
- g_object_unref (file_source);
-}
-
-
void
gth_browser_update_title (GthBrowser *browser)
{
diff --git a/gthumb/gth-browser.h b/gthumb/gth-browser.h
index 5578cbc..0d07e8f 100644
--- a/gthumb/gth-browser.h
+++ b/gthumb/gth-browser.h
@@ -229,23 +229,6 @@ void gth_browser_ask_whether_to_save (GthBrowser *browser,
void gth_browser_save_state (GthBrowser *browser);
gboolean gth_browser_restore_state (GthBrowser *browser);
-/* protected methods */
-
-void _gth_browser_add_file_menu_item (GthBrowser *browser,
- GtkWidget *menu,
- GFile *file,
- const char *display_name,
- GthAction action,
- int steps);
-void _gth_browser_add_file_menu_item_full (GthBrowser *browser,
- GtkWidget *menu,
- GFile *file,
- GIcon *icon,
- const char *display_name,
- GthAction action,
- int steps,
- int position);
-
/* utilities */
GMenuItem * _g_menu_item_new_for_file (GFile *file,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]