[totem] all: Stop using GtkImageMenuItem
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem] all: Stop using GtkImageMenuItem
- Date: Mon, 22 Jul 2013 09:21:45 +0000 (UTC)
commit 0fefd1ae7a6d638bdb4c4d416044949389b331b9
Author: Bastien Nocera <hadess hadess net>
Date: Mon Jul 22 11:21:09 2013 +0200
all: Stop using GtkImageMenuItem
browser-plugin/totem-plugin-viewer.c | 6 ++----
src/totem-dnd-menu.c | 22 +++++++---------------
2 files changed, 9 insertions(+), 19 deletions(-)
---
diff --git a/browser-plugin/totem-plugin-viewer.c b/browser-plugin/totem-plugin-viewer.c
index 3075350..916c823 100644
--- a/browser-plugin/totem-plugin-viewer.c
+++ b/browser-plugin/totem-plugin-viewer.c
@@ -1055,7 +1055,7 @@ totem_embedded_get_app_for_uri (const char *uri)
static void
totem_embedded_update_menu (TotemEmbedded *emb)
{
- GtkWidget *item, *image;
+ GtkWidget *item;
GtkMenuShell *menu;
char *label;
@@ -1094,10 +1094,8 @@ totem_embedded_update_menu (TotemEmbedded *emb)
* Open With ApplicationName
* as in nautilus' right-click menu */
label = g_strdup_printf (_("_Open with \"%s\""), g_app_info_get_name (emb->app));
- item = gtk_image_menu_item_new_with_mnemonic (label);
+ item = gtk_menu_item_new_with_mnemonic (label);
g_free (label);
- image = gtk_image_new_from_stock (GTK_STOCK_OPEN, GTK_ICON_SIZE_MENU);
- gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image);
g_signal_connect (G_OBJECT (item), "activate",
G_CALLBACK (on_open1_activate), emb);
gtk_widget_show (item);
diff --git a/src/totem-dnd-menu.c b/src/totem-dnd-menu.c
index ffa6878..12c4694 100644
--- a/src/totem-dnd-menu.c
+++ b/src/totem-dnd-menu.c
@@ -53,25 +53,17 @@ drag_drop_action_activated_callback (GtkWidget *menu_item,
}
static void
-drag_append_drop_action_menu_item (GtkWidget *menu,
+drag_append_drop_action_menu_item (GtkWidget *menu,
const char *text,
- const char *icon,
- GdkDragAction action,
- DragData *dt)
+ GdkDragAction action,
+ DragData *dt)
{
GtkWidget *menu_item;
- menu_item = gtk_image_menu_item_new_with_mnemonic (text);
+ menu_item = gtk_menu_item_new_with_mnemonic (text);
gtk_widget_set_sensitive (menu_item, TRUE);
gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
- if (icon != NULL) {
- GtkWidget *image;
-
- image = gtk_image_new_from_stock (icon, GTK_ICON_SIZE_MENU);
- gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_item), image);
- }
-
g_object_set_data (G_OBJECT (menu_item), "action", GINT_TO_POINTER (action));
g_signal_connect (menu_item, "activate",
@@ -91,16 +83,16 @@ totem_drag_ask (gboolean show_add_to)
menu = gtk_menu_new ();
- drag_append_drop_action_menu_item (menu, _("_Play Now"), "media-playback-start-symbolic",
GDK_ACTION_MOVE, &dt);
+ drag_append_drop_action_menu_item (menu, _("_Play Now"), GDK_ACTION_MOVE, &dt);
if (show_add_to != FALSE)
- drag_append_drop_action_menu_item (menu, _("_Add to Playlist"), "gtk-add", GDK_ACTION_COPY,
&dt);
+ drag_append_drop_action_menu_item (menu, _("_Add to Playlist"), GDK_ACTION_COPY, &dt);
menu_item = gtk_separator_menu_item_new ();
gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
gtk_widget_show (menu_item);
- drag_append_drop_action_menu_item (menu, _("Cancel"), NULL, GDK_ACTION_DEFAULT, &dt);
+ drag_append_drop_action_menu_item (menu, _("Cancel"), GDK_ACTION_DEFAULT, &dt);
g_signal_connect (menu, "deactivate",
G_CALLBACK (drag_menu_deactivate_callback), &dt);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]