[easytag/wip/application-window: 44/62] Use named icons instead of GtkStock in some places



commit 57e1be3463557ec44651e8bbbb6ab69538558fd5
Author: David King <amigadave amigadave com>
Date:   Mon Jul 14 07:12:49 2014 +0100

    Use named icons instead of GtkStock in some places

 src/application_window.c |   10 +++---
 src/load_files_dialog.c  |   58 +++++++++++++++++++++++----------------
 src/log.c                |   66 +++++++++++++++++++++------------------------
 src/scan_dialog.c        |   25 +++++++++++------
 4 files changed, 86 insertions(+), 73 deletions(-)
---
diff --git a/src/application_window.c b/src/application_window.c
index f911d92..7b7d9e9 100644
--- a/src/application_window.c
+++ b/src/application_window.c
@@ -252,7 +252,7 @@ Attach_Popup_Menu_To_Tag_Entries (GtkEntry *entry)
 
     /* Menu items */
     menu_item = gtk_image_menu_item_new_with_label (_("Tag selected files with this field"));
-    image = gtk_image_new_from_stock (GTK_STOCK_JUMP_TO, GTK_ICON_SIZE_MENU);
+    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",
@@ -324,7 +324,7 @@ Attach_Popup_Menu_To_Tag_Entries (GtkEntry *entry)
     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_stock (GTK_STOCK_REMOVE, GTK_ICON_SIZE_MENU);
+    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);
     gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
     g_signal_connect_swapped (menu_item, "activate",
@@ -332,7 +332,7 @@ Attach_Popup_Menu_To_Tag_Entries (GtkEntry *entry)
                               G_OBJECT (entry));
 
     menu_item = gtk_image_menu_item_new_with_label (_("Insert space before uppercase letter"));
-    image = gtk_image_new_from_stock (GTK_STOCK_ADD, GTK_ICON_SIZE_MENU);
+    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);
     gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
     g_signal_connect_swapped (menu_item, "activate",
@@ -340,7 +340,7 @@ Attach_Popup_Menu_To_Tag_Entries (GtkEntry *entry)
                               G_OBJECT (entry));
 
     menu_item = gtk_image_menu_item_new_with_label (_("Remove duplicate spaces or underscores"));
-    image = gtk_image_new_from_stock (GTK_STOCK_REMOVE, GTK_ICON_SIZE_MENU);
+    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);
     gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
     g_signal_connect_swapped (menu_item, "activate",
@@ -348,7 +348,7 @@ Attach_Popup_Menu_To_Tag_Entries (GtkEntry *entry)
                               G_OBJECT (entry));
 
     menu_item = gtk_image_menu_item_new_with_label (_("Remove all text"));
-    image = gtk_image_new_from_stock (GTK_STOCK_REMOVE, GTK_ICON_SIZE_MENU);
+    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);
     gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
     g_signal_connect_swapped (menu_item, "activate",
diff --git a/src/load_files_dialog.c b/src/load_files_dialog.c
index d01b992..5a47522 100644
--- a/src/load_files_dialog.c
+++ b/src/load_files_dialog.c
@@ -648,19 +648,19 @@ create_load_file_content_view_popup (EtLoadFilesDialog *self, GtkWidget *list)
                       BrowserPopupMenu);
     
     MenuItem = gtk_image_menu_item_new_with_label(_("Insert a blank line"));
-    Image = gtk_image_new_from_stock(GTK_STOCK_ADD,GTK_ICON_SIZE_MENU);
+    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);
     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_stock(GTK_STOCK_REMOVE,GTK_ICON_SIZE_MENU);
+    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);
     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_stock(GTK_STOCK_REMOVE,GTK_ICON_SIZE_MENU);
+    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);
     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));
@@ -669,13 +669,13 @@ create_load_file_content_view_popup (EtLoadFilesDialog *self, GtkWidget *list)
     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_stock(GTK_STOCK_GO_UP,GTK_ICON_SIZE_MENU);
+    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);
     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_stock(GTK_STOCK_GO_DOWN,GTK_ICON_SIZE_MENU);
+    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);
     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));
@@ -684,7 +684,7 @@ create_load_file_content_view_popup (EtLoadFilesDialog *self, GtkWidget *list)
     gtk_menu_shell_append(GTK_MENU_SHELL(BrowserPopupMenu),MenuItem);
 
     MenuItem = gtk_image_menu_item_new_with_label(_("Reload"));
-    Image = gtk_image_new_from_stock(GTK_STOCK_REFRESH,GTK_ICON_SIZE_MENU);
+    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);
     gtk_menu_shell_append(GTK_MENU_SHELL(BrowserPopupMenu),MenuItem);
     g_signal_connect (MenuItem, "activate",
@@ -708,19 +708,19 @@ create_load_file_name_view_popup (EtLoadFilesDialog *self, GtkWidget *list)
                       BrowserPopupMenu);
     
     MenuItem = gtk_image_menu_item_new_with_label(_("Insert a blank line"));
-    Image = gtk_image_new_from_stock(GTK_STOCK_ADD,GTK_ICON_SIZE_MENU);
+    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);
     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_stock(GTK_STOCK_REMOVE,GTK_ICON_SIZE_MENU);
+    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);
     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_stock(GTK_STOCK_REMOVE,GTK_ICON_SIZE_MENU);
+    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);
     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));
@@ -729,13 +729,13 @@ create_load_file_name_view_popup (EtLoadFilesDialog *self, GtkWidget *list)
     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_stock(GTK_STOCK_GO_UP,GTK_ICON_SIZE_MENU);
+    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);
     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_stock(GTK_STOCK_GO_DOWN,GTK_ICON_SIZE_MENU);
+    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);
     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));
@@ -744,7 +744,7 @@ create_load_file_name_view_popup (EtLoadFilesDialog *self, GtkWidget *list)
     gtk_menu_shell_append(GTK_MENU_SHELL(BrowserPopupMenu),MenuItem);
 
     MenuItem = gtk_image_menu_item_new_with_label(_("Reload"));
-    Image = gtk_image_new_from_stock(GTK_STOCK_REFRESH,GTK_ICON_SIZE_MENU);
+    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);
     gtk_menu_shell_append(GTK_MENU_SHELL(BrowserPopupMenu),MenuItem);
     g_signal_connect (MenuItem, "activate",
@@ -914,7 +914,8 @@ create_load_files_dialog (EtLoadFilesDialog *self)
     gtk_box_pack_start(GTK_BOX(loadedvbox),hbox,FALSE,FALSE,0);
 
     Button = gtk_button_new();
-    Icon = gtk_image_new_from_stock(GTK_STOCK_ADD,GTK_ICON_SIZE_SMALL_TOOLBAR);
+    Icon = gtk_image_new_from_icon_name ("list-add",
+                                         GTK_ICON_SIZE_SMALL_TOOLBAR);
     gtk_container_add(GTK_CONTAINER(Button),Icon);
     gtk_box_pack_start(GTK_BOX(hbox),Button,FALSE,FALSE,0);
     //gtk_button_set_relief(GTK_BUTTON(Button),GTK_RELIEF_NONE);
@@ -923,7 +924,8 @@ create_load_files_dialog (EtLoadFilesDialog *self)
                              G_CALLBACK(Load_Filename_List_Insert_Blank_Line), 
G_OBJECT(priv->load_file_content_view));
 
     Button = gtk_button_new();
-    Icon = gtk_image_new_from_stock(GTK_STOCK_REMOVE,GTK_ICON_SIZE_SMALL_TOOLBAR);
+    Icon = gtk_image_new_from_icon_name ("list-remove",
+                                         GTK_ICON_SIZE_SMALL_TOOLBAR);
     gtk_container_add(GTK_CONTAINER(Button),Icon);
     gtk_box_pack_start(GTK_BOX(hbox),Button,FALSE,FALSE,0);
     //gtk_button_set_relief(GTK_BUTTON(Button),GTK_RELIEF_NONE);
@@ -932,7 +934,8 @@ create_load_files_dialog (EtLoadFilesDialog *self)
                              G_CALLBACK(Load_Filename_List_Delete_Line), 
G_OBJECT(priv->load_file_content_view));
     
     Button = gtk_button_new();
-    Icon = gtk_image_new_from_stock(GTK_STOCK_REMOVE,GTK_ICON_SIZE_SMALL_TOOLBAR);
+    Icon = gtk_image_new_from_icon_name ("list-remove",
+                                         GTK_ICON_SIZE_SMALL_TOOLBAR);
     gtk_container_add(GTK_CONTAINER(Button),Icon);
     gtk_box_pack_start(GTK_BOX(hbox),Button,FALSE,FALSE,0);
     //gtk_button_set_relief(GTK_BUTTON(Button),GTK_RELIEF_NONE);
@@ -944,7 +947,7 @@ create_load_files_dialog (EtLoadFilesDialog *self)
     gtk_box_pack_start(GTK_BOX(hbox),Label,FALSE,FALSE,0);
 
     Button = gtk_button_new();
-    Icon = gtk_image_new_from_stock(GTK_STOCK_GO_UP, GTK_ICON_SIZE_SMALL_TOOLBAR);
+    Icon = gtk_image_new_from_icon_name ("go-up", GTK_ICON_SIZE_SMALL_TOOLBAR);
     gtk_container_add(GTK_CONTAINER(Button),Icon);
     gtk_box_pack_start(GTK_BOX(hbox),Button,FALSE,FALSE,0);
     //gtk_button_set_relief(GTK_BUTTON(Button),GTK_RELIEF_NONE);
@@ -953,7 +956,8 @@ create_load_files_dialog (EtLoadFilesDialog *self)
                              G_CALLBACK(Load_Filename_List_Move_Up), G_OBJECT(priv->load_file_content_view));
 
     Button = gtk_button_new();
-    Icon = gtk_image_new_from_stock(GTK_STOCK_GO_DOWN, GTK_ICON_SIZE_SMALL_TOOLBAR);
+    Icon = gtk_image_new_from_icon_name ("go-down",
+                                         GTK_ICON_SIZE_SMALL_TOOLBAR);
     gtk_container_add(GTK_CONTAINER(Button),Icon);
     gtk_box_pack_start(GTK_BOX(hbox),Button,FALSE,FALSE,0);
     //gtk_button_set_relief(GTK_BUTTON(Button),GTK_RELIEF_NONE);
@@ -965,7 +969,8 @@ create_load_files_dialog (EtLoadFilesDialog *self)
     gtk_box_pack_start(GTK_BOX(hbox),Label,FALSE,FALSE,0);
 
     Button = gtk_button_new();
-    Icon = gtk_image_new_from_stock(GTK_STOCK_REFRESH,GTK_ICON_SIZE_SMALL_TOOLBAR);
+    Icon = gtk_image_new_from_icon_name ("view-refresh",
+                                         GTK_ICON_SIZE_SMALL_TOOLBAR);
     gtk_container_add(GTK_CONTAINER(Button),Icon);
     gtk_box_pack_start(GTK_BOX(hbox),Button,FALSE,FALSE,0);
     //gtk_button_set_relief(GTK_BUTTON(Button),GTK_RELIEF_NONE);
@@ -1010,7 +1015,8 @@ create_load_files_dialog (EtLoadFilesDialog *self)
     gtk_box_pack_start(GTK_BOX(filelistvbox),hbox,FALSE,FALSE,0);
 
     Button = gtk_button_new();
-    Icon = gtk_image_new_from_stock(GTK_STOCK_ADD,GTK_ICON_SIZE_SMALL_TOOLBAR);
+    Icon = gtk_image_new_from_icon_name ("list-add",
+                                         GTK_ICON_SIZE_SMALL_TOOLBAR);
     gtk_container_add(GTK_CONTAINER(Button),Icon);
     gtk_box_pack_start(GTK_BOX(hbox),Button,FALSE,FALSE,0);
     //gtk_button_set_relief(GTK_BUTTON(Button),GTK_RELIEF_NONE);
@@ -1019,7 +1025,8 @@ create_load_files_dialog (EtLoadFilesDialog *self)
                              G_CALLBACK(Load_Filename_List_Insert_Blank_Line), 
G_OBJECT(priv->load_file_name_view));
 
     Button = gtk_button_new();
-    Icon = gtk_image_new_from_stock(GTK_STOCK_REMOVE,GTK_ICON_SIZE_SMALL_TOOLBAR);
+    Icon = gtk_image_new_from_icon_name ("list-remove",
+                                         GTK_ICON_SIZE_SMALL_TOOLBAR);
     gtk_container_add(GTK_CONTAINER(Button),Icon);
     gtk_box_pack_start(GTK_BOX(hbox),Button,FALSE,FALSE,0);
     //gtk_button_set_relief(GTK_BUTTON(Button),GTK_RELIEF_NONE);
@@ -1028,7 +1035,8 @@ create_load_files_dialog (EtLoadFilesDialog *self)
                              G_CALLBACK(Load_Filename_List_Delete_Line), 
G_OBJECT(priv->load_file_name_view));
 
     Button = gtk_button_new();
-    Icon = gtk_image_new_from_stock(GTK_STOCK_REMOVE,GTK_ICON_SIZE_SMALL_TOOLBAR);
+    Icon = gtk_image_new_from_icon_name ("list-remove",
+                                         GTK_ICON_SIZE_SMALL_TOOLBAR);
     gtk_container_add(GTK_CONTAINER(Button),Icon);
     gtk_box_pack_start(GTK_BOX(hbox),Button,FALSE,FALSE,0);
     //gtk_button_set_relief(GTK_BUTTON(Button),GTK_RELIEF_NONE);
@@ -1040,7 +1048,7 @@ create_load_files_dialog (EtLoadFilesDialog *self)
     gtk_box_pack_start(GTK_BOX(hbox),Label,FALSE,FALSE,0);
 
     Button = gtk_button_new();
-    Icon = gtk_image_new_from_stock(GTK_STOCK_GO_UP, GTK_ICON_SIZE_SMALL_TOOLBAR);
+    Icon = gtk_image_new_from_icon_name ("go-up", GTK_ICON_SIZE_SMALL_TOOLBAR);
     gtk_container_add(GTK_CONTAINER(Button),Icon);
     gtk_box_pack_start(GTK_BOX(hbox),Button,FALSE,FALSE,0);
     //gtk_button_set_relief(GTK_BUTTON(Button),GTK_RELIEF_NONE);
@@ -1049,7 +1057,8 @@ create_load_files_dialog (EtLoadFilesDialog *self)
                              G_CALLBACK(Load_Filename_List_Move_Up), G_OBJECT(priv->load_file_name_view));
 
     Button = gtk_button_new();
-    Icon = gtk_image_new_from_stock(GTK_STOCK_GO_DOWN, GTK_ICON_SIZE_SMALL_TOOLBAR);
+    Icon = gtk_image_new_from_icon_name ("go-down",
+                                         GTK_ICON_SIZE_SMALL_TOOLBAR);
     gtk_container_add(GTK_CONTAINER(Button),Icon);
     gtk_box_pack_start(GTK_BOX(hbox),Button,FALSE,FALSE,0);
     //gtk_button_set_relief(GTK_BUTTON(Button),GTK_RELIEF_NONE);
@@ -1061,7 +1070,8 @@ create_load_files_dialog (EtLoadFilesDialog *self)
     gtk_box_pack_start(GTK_BOX(hbox),Label,FALSE,FALSE,0);
 
     Button = gtk_button_new();
-    Icon = gtk_image_new_from_stock(GTK_STOCK_REFRESH,GTK_ICON_SIZE_SMALL_TOOLBAR);
+    Icon = gtk_image_new_from_icon_name ("view-refresh",
+                                         GTK_ICON_SIZE_SMALL_TOOLBAR);
     gtk_container_add(GTK_CONTAINER(Button),Icon);
     gtk_box_pack_start(GTK_BOX(hbox),Button,FALSE,FALSE,0);
     //gtk_button_set_relief(GTK_BUTTON(Button),GTK_RELIEF_NONE);
diff --git a/src/log.c b/src/log.c
index 0d0ad31..1293704 100644
--- a/src/log.c
+++ b/src/log.c
@@ -54,7 +54,7 @@ struct _EtLogAreaPrivate
 
 enum
 {
-    LOG_PIXBUF,
+    LOG_ICON_NAME,
     LOG_TIME_TEXT,
     LOG_TEXT,
     LOG_COLUMN_COUNT
@@ -80,7 +80,6 @@ static gboolean Log_Popup_Menu_Handler (GtkWidget *treeview,
 static void Log_List_Set_Row_Visible (EtLogArea *self, GtkTreeIter *rowIter);
 static void Log_Print_Tmp_List (EtLogArea *self);
 static gchar *Log_Format_Date (void);
-static gchar *Log_Get_Stock_Id_From_Error_Type (EtLogAreaKind error_type);
 
 
 
@@ -139,9 +138,9 @@ et_log_area_init (EtLogArea *self)
 
     renderer = gtk_cell_renderer_pixbuf_new();
     gtk_tree_view_column_pack_start(column, renderer, FALSE);
-    gtk_tree_view_column_set_attributes(column, renderer,
-                                       "stock-id", LOG_PIXBUF,
-                                        NULL);
+    gtk_tree_view_column_set_attributes (column, renderer,
+                                         "icon-name", LOG_ICON_NAME,
+                                         NULL);
 
     renderer = gtk_cell_renderer_text_new();
     gtk_tree_view_column_pack_start(column, renderer, FALSE);
@@ -269,6 +268,29 @@ Log_Format_Date (void)
     return time;
 }
 
+static const gchar *
+get_icon_name_from_error_kind (EtLogAreaKind error_kind)
+{
+    switch (error_kind)
+    {
+        /* Same icon for information and OK messages. */
+        case LOG_OK:
+        case LOG_INFO:
+            return "dialog-information";
+            break;
+        case LOG_WARNING:
+            return "dialog-warning";
+            break;
+        case LOG_ERROR:
+            return "dialog-error";
+            break;
+        case LOG_UNKNOWN:
+            return NULL;
+            break;
+        default:
+            g_assert_not_reached ();
+    }
+}
 
 /*
  * Function to use anywhere in the application to send a message to the LogList
@@ -313,8 +335,8 @@ Log_Print (EtLogAreaKind error_type, const gchar * const format, ...)
         }
 
         gtk_list_store_insert_with_values (priv->log_model, &iter, G_MAXINT,
-                                           LOG_PIXBUF,
-                                           Log_Get_Stock_Id_From_Error_Type (error_type),
+                                           LOG_ICON_NAME,
+                                           get_icon_name_from_error_kind (error_type),
                                            LOG_TIME_TEXT, time, LOG_TEXT,
                                            string, -1);
         Log_List_Set_Row_Visible (self, &iter);
@@ -440,8 +462,8 @@ Log_Print_Tmp_List (EtLogArea *self)
         {
             EtLogAreaData *log_data = (EtLogAreaData *)l->data;
             gtk_list_store_insert_with_values (priv->log_model, &iter,
-                                               G_MAXINT, LOG_PIXBUF,
-                                               Log_Get_Stock_Id_From_Error_Type (log_data->error_type),
+                                               G_MAXINT, LOG_ICON_NAME,
+                                               get_icon_name_from_error_kind (log_data->error_type),
                                                LOG_TIME_TEXT, log_data->time,
                                                LOG_TEXT, log_data->string, -1);
             Log_List_Set_Row_Visible (self, &iter);
@@ -466,29 +488,3 @@ Log_Print_Tmp_List (EtLogArea *self)
         priv->log_tmp_list = NULL;
     }
 }
-
-
-static gchar *
-Log_Get_Stock_Id_From_Error_Type (EtLogAreaKind error_type)
-{
-    switch (error_type)
-    {
-        case LOG_OK:
-            return GTK_STOCK_OK;
-            break;
-        case LOG_INFO:
-            return GTK_STOCK_DIALOG_INFO;
-            break;
-        case LOG_WARNING:
-            return GTK_STOCK_DIALOG_WARNING;
-            break;
-        case LOG_ERROR:
-            return GTK_STOCK_DIALOG_ERROR;
-            break;
-        case LOG_UNKNOWN:
-            return NULL;
-            break;
-        default:
-            g_assert_not_reached ();
-    }
-}
diff --git a/src/scan_dialog.c b/src/scan_dialog.c
index 308d144..01a5192 100644
--- a/src/scan_dialog.c
+++ b/src/scan_dialog.c
@@ -2556,7 +2556,8 @@ create_scan_dialog (EtScanDialog *self)
 
     /* Options button */
     Button = gtk_button_new();
-    Icon = gtk_image_new_from_stock(GTK_STOCK_PREFERENCES, GTK_ICON_SIZE_BUTTON);
+    Icon = gtk_image_new_from_icon_name ("preferences-other",
+                                         GTK_ICON_SIZE_BUTTON);
     gtk_container_add(GTK_CONTAINER(Button),Icon);
     gtk_box_pack_start(GTK_BOX(HBox1),Button,FALSE,FALSE,0);
     gtk_button_set_relief(GTK_BUTTON(Button),GTK_RELIEF_NONE);
@@ -2579,7 +2580,7 @@ create_scan_dialog (EtScanDialog *self)
 
     /* Legend button */
     priv->legend_toggle = gtk_toggle_button_new();
-    Icon = gtk_image_new_from_stock(GTK_STOCK_HELP, GTK_ICON_SIZE_BUTTON);
+    Icon = gtk_image_new_from_icon_name ("help-faq", GTK_ICON_SIZE_BUTTON);
     gtk_container_add(GTK_CONTAINER(priv->legend_toggle),Icon);
     gtk_box_pack_start(GTK_BOX(HBox1),priv->legend_toggle,FALSE,FALSE,0);
     gtk_button_set_relief(GTK_BUTTON(priv->legend_toggle),GTK_RELIEF_NONE);
@@ -3118,7 +3119,8 @@ create_scan_dialog (EtScanDialog *self)
 
     /* New mask button */
     Button = gtk_button_new();
-    Icon = gtk_image_new_from_stock(GTK_STOCK_NEW, GTK_ICON_SIZE_SMALL_TOOLBAR);
+    Icon = gtk_image_new_from_icon_name ("document-new",
+                                         GTK_ICON_SIZE_SMALL_TOOLBAR);
     gtk_container_add(GTK_CONTAINER(Button),Icon);
     gtk_box_pack_start(GTK_BOX(vbox),Button,FALSE,FALSE,0);
     gtk_button_set_relief(GTK_BUTTON(Button),GTK_RELIEF_NONE);
@@ -3128,7 +3130,7 @@ create_scan_dialog (EtScanDialog *self)
 
     /* Move up mask button */
     Button = gtk_button_new();
-    Icon = gtk_image_new_from_stock(GTK_STOCK_GO_UP, GTK_ICON_SIZE_SMALL_TOOLBAR);
+    Icon = gtk_image_new_from_icon_name ("go-up", GTK_ICON_SIZE_SMALL_TOOLBAR);
     gtk_container_add(GTK_CONTAINER(Button),Icon);
     gtk_box_pack_start(GTK_BOX(vbox),Button,FALSE,FALSE,0);
     gtk_button_set_relief(GTK_BUTTON(Button),GTK_RELIEF_NONE);
@@ -3138,7 +3140,8 @@ create_scan_dialog (EtScanDialog *self)
 
     /* Move down mask button */
     Button = gtk_button_new();
-    Icon = gtk_image_new_from_stock(GTK_STOCK_GO_DOWN, GTK_ICON_SIZE_SMALL_TOOLBAR);
+    Icon = gtk_image_new_from_icon_name ("go-down",
+                                         GTK_ICON_SIZE_SMALL_TOOLBAR);
     gtk_container_add(GTK_CONTAINER(Button),Icon);
     gtk_box_pack_start(GTK_BOX(vbox),Button,FALSE,FALSE,0);
     gtk_button_set_relief(GTK_BUTTON(Button),GTK_RELIEF_NONE);
@@ -3148,7 +3151,8 @@ create_scan_dialog (EtScanDialog *self)
 
     /* Copy mask button */
     Button = gtk_button_new();
-    Icon = gtk_image_new_from_stock(GTK_STOCK_COPY, GTK_ICON_SIZE_SMALL_TOOLBAR);
+    Icon = gtk_image_new_from_icon_name ("edit-copy",
+                                         GTK_ICON_SIZE_SMALL_TOOLBAR);
     gtk_container_add(GTK_CONTAINER(Button),Icon);
     gtk_box_pack_start(GTK_BOX(vbox),Button,FALSE,FALSE,0);
     gtk_button_set_relief(GTK_BUTTON(Button),GTK_RELIEF_NONE);
@@ -3158,7 +3162,8 @@ create_scan_dialog (EtScanDialog *self)
 
     /* Add mask button */
     Button = gtk_button_new();
-    Icon = gtk_image_new_from_stock(GTK_STOCK_ADD, GTK_ICON_SIZE_SMALL_TOOLBAR);
+    Icon = gtk_image_new_from_icon_name ("list-add",
+                                         GTK_ICON_SIZE_SMALL_TOOLBAR);
     gtk_container_add(GTK_CONTAINER(Button),Icon);
     gtk_box_pack_start(GTK_BOX(vbox),Button,FALSE,FALSE,0);
     gtk_button_set_relief(GTK_BUTTON(Button),GTK_RELIEF_NONE);
@@ -3168,7 +3173,8 @@ create_scan_dialog (EtScanDialog *self)
 
     /* Remove mask button */
     Button = gtk_button_new();
-    Icon = gtk_image_new_from_stock(GTK_STOCK_REMOVE, GTK_ICON_SIZE_SMALL_TOOLBAR);
+    Icon = gtk_image_new_from_icon_name ("list-remove",
+                                         GTK_ICON_SIZE_SMALL_TOOLBAR);
     gtk_container_add(GTK_CONTAINER(Button),Icon);
     gtk_box_pack_start(GTK_BOX(vbox),Button,FALSE,FALSE,0);
     gtk_button_set_relief(GTK_BUTTON(Button),GTK_RELIEF_NONE);
@@ -3178,7 +3184,8 @@ create_scan_dialog (EtScanDialog *self)
 
     /* Save mask button */
     Button = gtk_button_new();
-    Icon = gtk_image_new_from_stock(GTK_STOCK_SAVE, GTK_ICON_SIZE_SMALL_TOOLBAR);
+    Icon = gtk_image_new_from_icon_name ("document-save",
+                                         GTK_ICON_SIZE_SMALL_TOOLBAR);
     gtk_container_add(GTK_CONTAINER(Button),Icon);
     gtk_box_pack_end(GTK_BOX(vbox),Button,FALSE,FALSE,0);
     gtk_button_set_relief(GTK_BUTTON(Button),GTK_RELIEF_NONE);


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