[easytag/wip/application-window: 79/82] Remove use of deprecated GtkImageMenuItem



commit 0d7998b3621e854da445ddc06569e5c97f372ae6
Author: David King <amigadave amigadave com>
Date:   Fri Aug 8 20:45:52 2014 +0100

    Remove use of deprecated GtkImageMenuItem

 src/load_files_dialog.c |   50 +++++++++++-----------------------------------
 src/tag_area.c          |   37 ++++++++--------------------------
 2 files changed, 21 insertions(+), 66 deletions(-)
---
diff --git a/src/load_files_dialog.c b/src/load_files_dialog.c
index 6e222f1..15f0760 100644
--- a/src/load_files_dialog.c
+++ b/src/load_files_dialog.c
@@ -627,7 +627,6 @@ create_load_file_content_view_popup (EtLoadFilesDialog *self)
     EtLoadFilesDialogPrivate *priv;
     GtkWidget *list;
     GtkWidget *BrowserPopupMenu;
-    GtkWidget *Image;
     GtkWidget *MenuItem;
 
     priv = et_load_files_dialog_get_instance_private (self);
@@ -636,45 +635,33 @@ create_load_file_content_view_popup (EtLoadFilesDialog *self)
     BrowserPopupMenu = gtk_menu_new();
     gtk_menu_attach_to_widget (GTK_MENU (BrowserPopupMenu), list, NULL);
     
-    MenuItem = gtk_image_menu_item_new_with_label(_("Insert a blank line"));
-    Image = gtk_image_new_from_icon_name ("list-add", GTK_ICON_SIZE_MENU);
-    gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(MenuItem),Image);
+    MenuItem = gtk_menu_item_new_with_label(_("Insert a blank line"));
     gtk_menu_shell_append(GTK_MENU_SHELL(BrowserPopupMenu), MenuItem);
     g_signal_connect_swapped(G_OBJECT(MenuItem),"activate", 
G_CALLBACK(Load_Filename_List_Insert_Blank_Line), G_OBJECT(list));
 
-    MenuItem = gtk_image_menu_item_new_with_label(_("Delete this line"));
-    Image = gtk_image_new_from_icon_name ("list-remove", GTK_ICON_SIZE_MENU);
-    gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(MenuItem),Image);
+    MenuItem = gtk_menu_item_new_with_label(_("Delete this line"));
     gtk_menu_shell_append(GTK_MENU_SHELL(BrowserPopupMenu),MenuItem);
     g_signal_connect_swapped(G_OBJECT(MenuItem),"activate", G_CALLBACK(Load_Filename_List_Delete_Line), 
G_OBJECT(list));
 
-    MenuItem = gtk_image_menu_item_new_with_label(_("Delete all blank lines"));
-    Image = gtk_image_new_from_icon_name ("list-remove", GTK_ICON_SIZE_MENU);
-    gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(MenuItem),Image);
+    MenuItem = gtk_menu_item_new_with_label(_("Delete all blank lines"));
     gtk_menu_shell_append(GTK_MENU_SHELL(BrowserPopupMenu),MenuItem);
     g_signal_connect_swapped(G_OBJECT(MenuItem),"activate", 
G_CALLBACK(Load_Filename_List_Delete_All_Blank_Lines),G_OBJECT(list));
 
     MenuItem = gtk_menu_item_new();
     gtk_menu_shell_append(GTK_MENU_SHELL(BrowserPopupMenu),MenuItem);
 
-    MenuItem = gtk_image_menu_item_new_with_label(_("Move up this line"));
-    Image = gtk_image_new_from_icon_name ("go-up", GTK_ICON_SIZE_MENU);
-    gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(MenuItem),Image);
+    MenuItem = gtk_menu_item_new_with_label(_("Move up this line"));
     gtk_menu_shell_append(GTK_MENU_SHELL(BrowserPopupMenu),MenuItem);
     g_signal_connect_swapped(G_OBJECT(MenuItem),"activate", 
G_CALLBACK(Load_Filename_List_Move_Up),G_OBJECT(list));
 
-    MenuItem = gtk_image_menu_item_new_with_label(_("Move down this line"));
-    Image = gtk_image_new_from_icon_name ("go-down", GTK_ICON_SIZE_MENU);
-    gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(MenuItem),Image);
+    MenuItem = gtk_menu_item_new_with_label(_("Move down this line"));
     gtk_menu_shell_append(GTK_MENU_SHELL(BrowserPopupMenu),MenuItem);
     g_signal_connect_swapped(G_OBJECT(MenuItem),"activate", 
G_CALLBACK(Load_Filename_List_Move_Down),G_OBJECT(list));
 
     MenuItem = gtk_menu_item_new();
     gtk_menu_shell_append(GTK_MENU_SHELL(BrowserPopupMenu),MenuItem);
 
-    MenuItem = gtk_image_menu_item_new_with_label(_("Reload"));
-    Image = gtk_image_new_from_icon_name ("view-refresh", GTK_ICON_SIZE_MENU);
-    gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(MenuItem),Image);
+    MenuItem = gtk_menu_item_new_with_label(_("Reload"));
     gtk_menu_shell_append(GTK_MENU_SHELL(BrowserPopupMenu),MenuItem);
     g_signal_connect (MenuItem, "activate",
                       G_CALLBACK (on_load_file_name_view_reload_clicked),
@@ -743,7 +730,6 @@ create_load_file_name_view_popup (EtLoadFilesDialog *self)
     EtLoadFilesDialogPrivate *priv;
     GtkWidget *list;
     GtkWidget *BrowserPopupMenu;
-    GtkWidget *Image;
     GtkWidget *MenuItem;
 
     priv = et_load_files_dialog_get_instance_private (self);
@@ -752,45 +738,33 @@ create_load_file_name_view_popup (EtLoadFilesDialog *self)
     BrowserPopupMenu = gtk_menu_new();
     gtk_menu_attach_to_widget (GTK_MENU (BrowserPopupMenu), list, NULL);
     
-    MenuItem = gtk_image_menu_item_new_with_label(_("Insert a blank line"));
-    Image = gtk_image_new_from_icon_name ("list-add", GTK_ICON_SIZE_MENU);
-    gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(MenuItem),Image);
+    MenuItem = gtk_menu_item_new_with_label (_("Insert a blank line"));
     gtk_menu_shell_append(GTK_MENU_SHELL(BrowserPopupMenu), MenuItem);
     g_signal_connect_swapped(G_OBJECT(MenuItem),"activate", 
G_CALLBACK(Load_Filename_List_Insert_Blank_Line), G_OBJECT(list));
 
-    MenuItem = gtk_image_menu_item_new_with_label(_("Delete this line"));
-    Image = gtk_image_new_from_icon_name ("list-remove", GTK_ICON_SIZE_MENU);
-    gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(MenuItem),Image);
+    MenuItem = gtk_menu_item_new_with_label (_("Delete this line"));
     gtk_menu_shell_append(GTK_MENU_SHELL(BrowserPopupMenu),MenuItem);
     g_signal_connect_swapped(G_OBJECT(MenuItem),"activate", G_CALLBACK(Load_Filename_List_Delete_Line), 
G_OBJECT(list));
 
-    MenuItem = gtk_image_menu_item_new_with_label(_("Delete all blank lines"));
-    Image = gtk_image_new_from_icon_name ("list-remove", GTK_ICON_SIZE_MENU);
-    gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(MenuItem),Image);
+    MenuItem = gtk_menu_item_new_with_label (_("Delete all blank lines"));
     gtk_menu_shell_append(GTK_MENU_SHELL(BrowserPopupMenu),MenuItem);
     g_signal_connect_swapped(G_OBJECT(MenuItem),"activate", 
G_CALLBACK(Load_Filename_List_Delete_All_Blank_Lines),G_OBJECT(list));
 
     MenuItem = gtk_menu_item_new();
     gtk_menu_shell_append(GTK_MENU_SHELL(BrowserPopupMenu),MenuItem);
 
-    MenuItem = gtk_image_menu_item_new_with_label(_("Move up this line"));
-    Image = gtk_image_new_from_icon_name ("go-up", GTK_ICON_SIZE_MENU);
-    gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(MenuItem),Image);
+    MenuItem = gtk_menu_item_new_with_label (_("Move up this line"));
     gtk_menu_shell_append(GTK_MENU_SHELL(BrowserPopupMenu),MenuItem);
     g_signal_connect_swapped(G_OBJECT(MenuItem),"activate", 
G_CALLBACK(Load_Filename_List_Move_Up),G_OBJECT(list));
 
-    MenuItem = gtk_image_menu_item_new_with_label(_("Move down this line"));
-    Image = gtk_image_new_from_icon_name ("go-down", GTK_ICON_SIZE_MENU);
-    gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(MenuItem),Image);
+    MenuItem = gtk_menu_item_new_with_label (_("Move down this line"));
     gtk_menu_shell_append(GTK_MENU_SHELL(BrowserPopupMenu),MenuItem);
     g_signal_connect_swapped(G_OBJECT(MenuItem),"activate", 
G_CALLBACK(Load_Filename_List_Move_Down),G_OBJECT(list));
 
     MenuItem = gtk_menu_item_new();
     gtk_menu_shell_append(GTK_MENU_SHELL(BrowserPopupMenu),MenuItem);
 
-    MenuItem = gtk_image_menu_item_new_with_label(_("Reload"));
-    Image = gtk_image_new_from_icon_name ("view-refresh", GTK_ICON_SIZE_MENU);
-    gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(MenuItem),Image);
+    MenuItem = gtk_menu_item_new_with_label (_("Reload"));
     gtk_menu_shell_append(GTK_MENU_SHELL(BrowserPopupMenu),MenuItem);
     g_signal_connect (MenuItem, "activate",
                       G_CALLBACK (on_load_file_content_view_reload_clicked),
diff --git a/src/tag_area.c b/src/tag_area.c
index 5ed5400..82c4824 100644
--- a/src/tag_area.c
+++ b/src/tag_area.c
@@ -730,14 +730,11 @@ on_entry_populate_popup (GtkEntry *entry,
                          GtkWidget *menu,
                          EtTagArea *self)
 {
-    GtkWidget *image;
     GtkWidget *menu_item;
 
     /* Menu items */
-    menu_item = gtk_image_menu_item_new_with_label (_("Tag selected files with this field"));
+    menu_item = gtk_menu_item_new_with_label (_("Tag selected files with this field"));
     g_object_set_data (G_OBJECT (menu_item), "tag-area", self);
-    image = gtk_image_new_from_icon_name ("go-jump", GTK_ICON_SIZE_MENU);
-    gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_item), image);
     gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
     g_signal_connect_swapped (menu_item, "activate",
                               G_CALLBACK (on_apply_to_selection_menu_item),
@@ -763,33 +760,25 @@ on_entry_populate_popup (GtkEntry *entry,
     menu_item = gtk_menu_item_new ();
     gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
 
-    menu_item = gtk_image_menu_item_new_with_label (_("All uppercase"));
-    image = gtk_image_new_from_resource ("/org/gnome/EasyTAG/images/all-uppercase.png");
-    gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_item), image);
+    menu_item = gtk_menu_item_new_with_label (_("All uppercase"));
     gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
     g_signal_connect_swapped (menu_item, "activate",
                               G_CALLBACK (Convert_All_Uppercase),
                               G_OBJECT (entry));
 
-    menu_item = gtk_image_menu_item_new_with_label (_("All lowercase"));
-    image = gtk_image_new_from_resource ("/org/gnome/EasyTAG/images/all-lowercase.png");
-    gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_item), image);
+    menu_item = gtk_menu_item_new_with_label (_("All lowercase"));
     gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
     g_signal_connect_swapped (menu_item, "activate",
                               G_CALLBACK (Convert_All_Lowercase),
                               G_OBJECT (entry));
 
-    menu_item = gtk_image_menu_item_new_with_label (_("First letter uppercase"));
-    image = gtk_image_new_from_resource ("/org/gnome/EasyTAG/images/first-letter-uppercase.png");
-    gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_item), image);
+    menu_item = gtk_menu_item_new_with_label (_("First letter uppercase"));
     gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
     g_signal_connect_swapped (menu_item, "activate",
                               G_CALLBACK (Convert_Letter_Uppercase),
                               G_OBJECT (entry));
 
-    menu_item = gtk_image_menu_item_new_with_label (_("First letter uppercase of each word"));
-    image = gtk_image_new_from_resource ("/org/gnome/EasyTAG/images/first-letter-uppercase-word.png");
-    gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_item), image);
+    menu_item = gtk_menu_item_new_with_label (_("First letter uppercase of each word"));
     gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
     g_signal_connect_swapped (menu_item, "activate",
                               G_CALLBACK (Convert_First_Letters_Uppercase),
@@ -799,33 +788,25 @@ on_entry_populate_popup (GtkEntry *entry,
     menu_item = gtk_menu_item_new ();
     gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
 
-    menu_item = gtk_image_menu_item_new_with_label (_("Remove spaces"));
-    image = gtk_image_new_from_icon_name ("list-remove", GTK_ICON_SIZE_MENU);
-    gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_item), image);
+    menu_item = gtk_menu_item_new_with_label (_("Remove spaces"));
     gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
     g_signal_connect_swapped (menu_item, "activate",
                               G_CALLBACK (Convert_Remove_Space),
                               G_OBJECT (entry));
 
-    menu_item = gtk_image_menu_item_new_with_label (_("Insert space before uppercase letter"));
-    image = gtk_image_new_from_icon_name ("list-add", GTK_ICON_SIZE_MENU);
-    gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_item), image);
+    menu_item = gtk_menu_item_new_with_label (_("Insert space before uppercase letter"));
     gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
     g_signal_connect_swapped (menu_item, "activate",
                               G_CALLBACK (Convert_Insert_Space),
                               G_OBJECT (entry));
 
-    menu_item = gtk_image_menu_item_new_with_label (_("Remove duplicate spaces or underscores"));
-    image = gtk_image_new_from_icon_name ("list-remove", GTK_ICON_SIZE_MENU);
-    gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_item), image);
+    menu_item = gtk_menu_item_new_with_label (_("Remove duplicate spaces or underscores"));
     gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
     g_signal_connect_swapped (menu_item, "activate",
                               G_CALLBACK (Convert_Only_One_Space),
                               G_OBJECT (entry));
 
-    menu_item = gtk_image_menu_item_new_with_label (_("Remove all text"));
-    image = gtk_image_new_from_icon_name ("list-remove", GTK_ICON_SIZE_MENU);
-    gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_item), image);
+    menu_item = gtk_menu_item_new_with_label (_("Remove all text"));
     gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
     g_signal_connect_swapped (menu_item, "activate",
                               G_CALLBACK (Convert_Remove_All_Text),


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