[gthumb/ext: 39/79] removed the "Open With " prefix to the "Open With" menu items
- From: Paolo Bacchilega <paobac src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gthumb/ext: 39/79] removed the "Open With " prefix to the "Open With" menu items
- Date: Sun, 2 Aug 2009 20:28:22 +0000 (UTC)
commit c55cd3a86f14cd97ffad096fd8364e8a90542b92
Author: Paolo Bacchilega <paobac src gnome org>
Date: Sat Jul 11 21:16:17 2009 +0200
removed the "Open With " prefix to the "Open With" menu items
extensions/file_manager/callbacks.c | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
---
diff --git a/extensions/file_manager/callbacks.c b/extensions/file_manager/callbacks.c
index 1de48d0..88c85dc 100644
--- a/extensions/file_manager/callbacks.c
+++ b/extensions/file_manager/callbacks.c
@@ -503,7 +503,6 @@ _gth_browser_update_open_menu (GthBrowser *browser)
char *label;
GtkWidget *menu_item;
GIcon *icon;
- GdkPixbuf *pixbuf;
if (strcmp (g_app_info_get_executable (appinfo), "gthumb") == 0)
continue;
@@ -511,12 +510,18 @@ _gth_browser_update_open_menu (GthBrowser *browser)
continue;
g_hash_table_insert (used_apps, (gpointer) g_app_info_get_id (appinfo), GINT_TO_POINTER (1));
- label = g_strdup_printf (_("Open with \"%s\""), g_app_info_get_name (appinfo));
+ label = g_strdup_printf ("%s", g_app_info_get_name (appinfo));
menu_item = gtk_image_menu_item_new_with_label (label);
icon = g_app_info_get_icon (appinfo);
- pixbuf = gth_icon_cache_get_pixbuf (icon_cache, icon);
- gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_item), gtk_image_new_from_pixbuf (pixbuf));
+ if (icon != NULL) {
+ GdkPixbuf *pixbuf;
+
+ pixbuf = gth_icon_cache_get_pixbuf (icon_cache, icon);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_item), gtk_image_new_from_pixbuf (pixbuf));
+
+ g_object_unref (pixbuf);
+ }
gtk_widget_show (menu_item);
gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
@@ -527,7 +532,6 @@ _gth_browser_update_open_menu (GthBrowser *browser)
G_CALLBACK (activate_open_with_application_item),
browser);
- g_object_unref (pixbuf);
g_free (label);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]