[Xfce4-commits] [xfce/thunar] 05/07: Drop thunar-stock

noreply at xfce.org noreply at xfce.org
Sat Jun 2 18:35:50 CEST 2018


This is an automated email from the git hooks/post-receive script.

a   n   d   r   e       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository xfce/thunar.

commit 728339f536ca03cde003d5c9320a8c3a4b627cae
Author: Andre Miranda <andreldm at xfce.org>
Date:   Sat Jun 2 13:27:55 2018 -0300

    Drop thunar-stock
---
 po/POTFILES.in                 |  1 -
 thunar/Makefile.am             |  2 -
 thunar/main.c                  |  4 --
 thunar/thunar-launcher.c       |  3 +-
 thunar/thunar-shortcuts-pane.c |  3 +-
 thunar/thunar-shortcuts-view.c |  3 +-
 thunar/thunar-standard-view.c  |  3 +-
 thunar/thunar-stock.c          | 98 ------------------------------------------
 thunar/thunar-stock.h          | 35 ---------------
 thunar/thunar-trash-action.c   |  8 ++--
 thunar/thunar-tree-view.c      |  1 -
 thunar/thunar-window.c         |  5 +--
 12 files changed, 9 insertions(+), 157 deletions(-)

diff --git a/po/POTFILES.in b/po/POTFILES.in
index 01b151c..1317d32 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -72,7 +72,6 @@ thunar/thunar-simple-job.c
 thunar/thunar-size-label.c
 thunar/thunar-standard-view.c
 thunar/thunar-statusbar.c
-thunar/thunar-stock.c
 thunar/thunar-templates-action.c
 thunar/thunar-thumbnail-cache.c
 thunar/thunar-thumbnailer.c
diff --git a/thunar/Makefile.am b/thunar/Makefile.am
index 1ae0d3e..e27c95e 100644
--- a/thunar/Makefile.am
+++ b/thunar/Makefile.am
@@ -194,8 +194,6 @@ thunar_SOURCES =							\
 	thunar-standard-view.h						\
 	thunar-statusbar.c						\
 	thunar-statusbar.h						\
-	thunar-stock.c							\
-	thunar-stock.h							\
 	thunar-templates-action.c					\
 	thunar-templates-action.h					\
 	thunar-thumbnail-cache.c					\
diff --git a/thunar/main.c b/thunar/main.c
index 7e1d941..7483750 100644
--- a/thunar/main.c
+++ b/thunar/main.c
@@ -40,7 +40,6 @@
 #include <thunar/thunar-private.h>
 #include <thunar/thunar-notify.h>
 #include <thunar/thunar-session-client.h>
-#include <thunar/thunar-stock.h>
 #include <thunar/thunar-preferences.h>
 
 
@@ -152,9 +151,6 @@ main (int argc, char **argv)
   /* register additional transformation functions */
   thunar_g_initialize_transformations ();
 
-  /* initialize the thunar stock items/icons */
-  thunar_stock_init ();
-
   /* acquire a reference on the global application */
   application = thunar_application_get ();
 
diff --git a/thunar/thunar-launcher.c b/thunar/thunar-launcher.c
index 8fed3ed..c896335 100644
--- a/thunar/thunar-launcher.c
+++ b/thunar/thunar-launcher.c
@@ -40,7 +40,6 @@
 #include <thunar/thunar-launcher-ui.h>
 #include <thunar/thunar-private.h>
 #include <thunar/thunar-sendto-model.h>
-#include <thunar/thunar-stock.h>
 #include <thunar/thunar-device-monitor.h>
 #include <thunar/thunar-util.h>
 #include <thunar/thunar-window.h>
@@ -181,7 +180,7 @@ static const GtkActionEntry action_entries[] =
   { "open-with-other", NULL, N_ ("Open With Other _Application..."), NULL, N_ ("Choose another application with which to open the selected file"), G_CALLBACK (thunar_launcher_action_open_with_other), },
   { "open-with-menu", NULL, N_ ("Open With"), NULL, NULL, NULL, },
   { "open-with-other-in-menu", NULL, N_ ("Open With Other _Application..."), NULL, N_ ("Choose another application with which to open the selected file"), G_CALLBACK (thunar_launcher_action_open_with_other), },
-  { "sendto-desktop", THUNAR_STOCK_DESKTOP, "", NULL, NULL, G_CALLBACK (thunar_launcher_action_sendto_desktop), },
+  { "sendto-desktop", "user-desktop", "", NULL, NULL, G_CALLBACK (thunar_launcher_action_sendto_desktop), },
 };
 
 static GQuark thunar_launcher_handler_quark;
diff --git a/thunar/thunar-shortcuts-pane.c b/thunar/thunar-shortcuts-pane.c
index 873a0fc..98b5d6e 100644
--- a/thunar/thunar-shortcuts-pane.c
+++ b/thunar/thunar-shortcuts-pane.c
@@ -28,7 +28,6 @@
 #include <thunar/thunar-shortcuts-pane-ui.h>
 #include <thunar/thunar-shortcuts-view.h>
 #include <thunar/thunar-side-pane.h>
-#include <thunar/thunar-stock.h>
 
 
 
@@ -95,7 +94,7 @@ struct _ThunarShortcutsPane
 
 static const GtkActionEntry action_entries[] =
 {
-  { "sendto-shortcuts", THUNAR_STOCK_SHORTCUTS, "", NULL, NULL, G_CALLBACK (thunar_shortcuts_pane_action_shortcuts_add), },
+  { "sendto-shortcuts", "stock_thunar-shortcuts", "", NULL, NULL, G_CALLBACK (thunar_shortcuts_pane_action_shortcuts_add), },
 };
 
 
diff --git a/thunar/thunar-shortcuts-view.c b/thunar/thunar-shortcuts-view.c
index e7ef494..c570a41 100644
--- a/thunar/thunar-shortcuts-view.c
+++ b/thunar/thunar-shortcuts-view.c
@@ -46,7 +46,6 @@
 #include <thunar/thunar-shortcuts-icon-renderer.h>
 #include <thunar/thunar-shortcuts-model.h>
 #include <thunar/thunar-shortcuts-view.h>
-#include <thunar/thunar-stock.h>
 
 
 
@@ -1184,7 +1183,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS
         gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
         gtk_widget_show (item);
 
-        image = gtk_image_new_from_stock (THUNAR_STOCK_SHORTCUTS, GTK_ICON_SIZE_MENU);
+        image = gtk_image_new_from_icon_name ("stock_thunar-shortcuts", GTK_ICON_SIZE_MENU);
 G_GNUC_BEGIN_IGNORE_DEPRECATIONS
         gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image);
 G_GNUC_END_IGNORE_DEPRECATIONS
diff --git a/thunar/thunar-standard-view.c b/thunar/thunar-standard-view.c
index 3a9c5fa..46d8715 100644
--- a/thunar/thunar-standard-view.c
+++ b/thunar/thunar-standard-view.c
@@ -50,7 +50,6 @@
 #include <thunar/thunar-simple-job.h>
 #include <thunar/thunar-standard-view.h>
 #include <thunar/thunar-standard-view-ui.h>
-#include <thunar/thunar-stock.h>
 #include <thunar/thunar-templates-action.h>
 #include <thunar/thunar-thumbnailer.h>
 #include <thunar/thunar-util.h>
@@ -408,7 +407,7 @@ static const GtkActionEntry action_entries[] =
   { "cut", "edit-cut", N_ ("Cu_t"), "<control>X", NULL, G_CALLBACK (thunar_standard_view_action_cut), },
   { "copy", "edit-copy", N_ ("_Copy"), "<control>C", NULL, G_CALLBACK (thunar_standard_view_action_copy), },
   { "paste", "edit-paste", N_ ("_Paste"), "<control>V", N_ ("Move or copy files previously selected by a Cut or Copy command"), G_CALLBACK (thunar_standard_view_action_paste), },
-  { "move-to-trash", THUNAR_STOCK_TRASH_FULL, N_ ("Mo_ve to Trash"), NULL, NULL, G_CALLBACK (thunar_standard_view_action_move_to_trash), },
+  { "move-to-trash", "user-trash", N_ ("Mo_ve to Trash"), NULL, NULL, G_CALLBACK (thunar_standard_view_action_move_to_trash), },
   { "delete", "edit-delete", N_ ("_Delete"), NULL, NULL, G_CALLBACK (thunar_standard_view_action_delete), },
   { "paste-into-folder", "edit-paste", N_ ("Paste Into Folder"), NULL, N_ ("Move or copy files previously selected by a Cut or Copy command into the selected folder"), G_CALLBACK (thunar_standard_view_action_paste_into_folder), },
   { "select-all-files", NULL, N_ ("Select _all Files"), NULL, N_ ("Select all files in this window"), G_CALLBACK (thunar_standard_view_action_select_all_files), },
diff --git a/thunar/thunar-stock.c b/thunar/thunar-stock.c
deleted file mode 100644
index a4a12ac..0000000
--- a/thunar/thunar-stock.c
+++ /dev/null
@@ -1,98 +0,0 @@
-/* vi:set et ai sw=2 sts=2 ts=2: */
-/*-
- * Copyright (c) 2006 Benedikt Meurer <benny at xfce.org>.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place, Suite 330, Boston, MA  02111-1307  USA
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#ifdef HAVE_MEMORY_H
-#include <memory.h>
-#endif
-#ifdef HAVE_STRING_H
-#include <string.h>
-#endif
-
-#include <exo/exo.h>
-
-#include <thunar/thunar-stock.h>
-
-
-
-typedef struct
-{
-  const gchar *name;
-  const gchar *icon;
-} ThunarStockIcon;
-
-
-
-/* keep in sync with thunar-stock.h */
-static const ThunarStockIcon thunar_stock_icons[] =
-{
-  { THUNAR_STOCK_DESKTOP,     "user-desktop" },
-  { THUNAR_STOCK_SHORTCUTS,   "stock_thunar-shortcuts" },
-  { THUNAR_STOCK_TEMPLATES,   "text-x-generic-template" },
-  { THUNAR_STOCK_TRASH_EMPTY, "user-trash",   },
-  { THUNAR_STOCK_TRASH_FULL,  "user-trash-full" },
-};
-
-
-
-/**
- * thunar_stock_init:
- *
- * Initializes the stock icons used by the Thunar
- * file manager.
- **/
-void
-thunar_stock_init (void)
-{
-  GtkIconFactory *icon_factory;
-  GtkIconSource  *icon_source;
-  GtkIconSet     *icon_set;
-  guint           n;
-
-  /* allocate a new icon factory for the thunar stock icons */
-  icon_factory = gtk_icon_factory_new ();
-
-  /* allocate an icon source */
-  icon_source = gtk_icon_source_new ();
-
-  /* register our stock icons */
-  for (n = 0; n < G_N_ELEMENTS (thunar_stock_icons); ++n)
-    {
-      /* setup the icon set */
-      icon_set = gtk_icon_set_new ();
-      gtk_icon_source_set_icon_name (icon_source, thunar_stock_icons[n].icon);
-      gtk_icon_set_add_source (icon_set, icon_source);
-      gtk_icon_factory_add (icon_factory, thunar_stock_icons[n].name, icon_set);
-      gtk_icon_set_unref (icon_set);
-    }
-
-  /* register our icon factory as default */
-  gtk_icon_factory_add_default (icon_factory);
-
-  /* cleanup */
-  g_object_unref (G_OBJECT (icon_factory));
-  gtk_icon_source_free (icon_source);
-}
-
-
-
-
diff --git a/thunar/thunar-stock.h b/thunar/thunar-stock.h
deleted file mode 100644
index ce578a4..0000000
--- a/thunar/thunar-stock.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/* vi:set et ai sw=2 sts=2 ts=2: */
-/*-
- * Copyright (c) 2006 Benedikt Meurer <benny at xfce.org>.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place, Suite 330, Boston, MA  02111-1307  USA
- */
-
-#ifndef __THUNAR_STOCK_H__
-#define __THUNAR_STOCK_H__
-
-G_BEGIN_DECLS;
-
-#define THUNAR_STOCK_DESKTOP      "thunar-desktop"      /* see ThunarLauncher */
-#define THUNAR_STOCK_SHORTCUTS    "thunar-shortcuts"    /* see ThunarShortcutsPane */
-#define THUNAR_STOCK_TEMPLATES    "thunar-templates"    /* see ThunarWindow */
-#define THUNAR_STOCK_TRASH_EMPTY  "thunar-trash"        /* see ThunarTrashAction */
-#define THUNAR_STOCK_TRASH_FULL   "thunar-trash-full"   /* see ThunarTrashAction */
-
-void thunar_stock_init (void);
-
-G_END_DECLS;
-
-#endif /* !__THUNAR_STOCK_H__ */
diff --git a/thunar/thunar-trash-action.c b/thunar/thunar-trash-action.c
index 791e479..2e79f8f 100644
--- a/thunar/thunar-trash-action.c
+++ b/thunar/thunar-trash-action.c
@@ -23,7 +23,6 @@
 #endif
 
 #include <thunar/thunar-file.h>
-#include <thunar/thunar-stock.h>
 #include <thunar/thunar-private.h>
 #include <thunar/thunar-trash-action.h>
 #include <thunar/thunar-icon-factory.h>
@@ -148,9 +147,9 @@ thunar_trash_action_changed (ThunarTrashAction *trash_action,
 
   /* adjust the stock icon appropriately */
   if (thunar_file_get_item_count (trash_bin) > 0)
-    g_object_set (G_OBJECT (trash_action), "stock-id", THUNAR_STOCK_TRASH_FULL, NULL);
+    g_object_set (G_OBJECT (trash_action), "icon-name", "user-trash-full", NULL);
   else
-    g_object_set (G_OBJECT (trash_action), "stock-id", THUNAR_STOCK_TRASH_EMPTY, NULL);
+    g_object_set (G_OBJECT (trash_action), "icon-name", "user-trash", NULL);
 }
 
 
@@ -169,7 +168,6 @@ thunar_trash_action_new (void)
   return g_object_new (THUNAR_TYPE_TRASH_ACTION,
                        "name", "open-trash",
                        "tooltip", _("Display the contents of the trash can"),
-                       "stock-id", THUNAR_STOCK_TRASH_FULL,
+                       "icon-name", "user-trash-full",
                        NULL);
 }
-
diff --git a/thunar/thunar-tree-view.c b/thunar/thunar-tree-view.c
index 81ebdf9..4c238ca 100644
--- a/thunar/thunar-tree-view.c
+++ b/thunar/thunar-tree-view.c
@@ -38,7 +38,6 @@
 #include <thunar/thunar-menu-util.h>
 #include <thunar/thunar-preferences.h>
 #include <thunar/thunar-private.h>
-#include <thunar/thunar-stock.h>
 #include <thunar/thunar-properties-dialog.h>
 #include <thunar/thunar-shortcuts-icon-renderer.h>
 #include <thunar/thunar-simple-job.h>
diff --git a/thunar/thunar-window.c b/thunar/thunar-window.c
index 9ec3bcd..3ad80de 100644
--- a/thunar/thunar-window.c
+++ b/thunar/thunar-window.c
@@ -56,7 +56,6 @@
 #include <thunar/thunar-private.h>
 #include <thunar/thunar-util.h>
 #include <thunar/thunar-statusbar.h>
-#include <thunar/thunar-stock.h>
 #include <thunar/thunar-trash-action.h>
 #include <thunar/thunar-tree-pane.h>
 #include <thunar/thunar-window.h>
@@ -368,10 +367,10 @@ static GtkActionEntry action_entries[] =
   { "go-menu", NULL, N_ ("_Go"), NULL, },
   { "open-parent", "go-up-symbolic", N_ ("Open _Parent"), "<alt>Up", N_ ("Open the parent folder"), G_CALLBACK (thunar_window_action_go_up), },
   { "open-home", "go-home-symbolic", N_ ("_Home"), "<alt>Home", N_ ("Go to the home folder"), G_CALLBACK (thunar_window_action_open_home), },
-  { "open-desktop", THUNAR_STOCK_DESKTOP, N_ ("Desktop"), NULL, N_ ("Go to the desktop folder"), G_CALLBACK (thunar_window_action_open_desktop), },
+  { "open-desktop", "user-desktop", N_ ("Desktop"), NULL, N_ ("Go to the desktop folder"), G_CALLBACK (thunar_window_action_open_desktop), },
   { "open-file-system", "drive-harddisk", N_ ("File System"), NULL, N_ ("Browse the file system"), G_CALLBACK (thunar_window_action_open_file_system), },
   { "open-network", "network-workgroup", N_("B_rowse Network"), NULL, N_ ("Browse local network connections"), G_CALLBACK (thunar_window_action_open_network), },
-  { "open-templates", THUNAR_STOCK_TEMPLATES, N_("T_emplates"), NULL, N_ ("Go to the templates folder"), G_CALLBACK (thunar_window_action_open_templates), },
+  { "open-templates", "text-x-generic-template", N_("T_emplates"), NULL, N_ ("Go to the templates folder"), G_CALLBACK (thunar_window_action_open_templates), },
   { "open-location", NULL, N_ ("_Open Location..."), "<control>L", N_ ("Specify a location to open"), G_CALLBACK (thunar_window_action_open_location), },
   { "help-menu", NULL, N_ ("_Help"), NULL, },
   { "contents", "help-browser", N_ ("_Contents"), "F1", N_ ("Display Thunar user manual"), G_CALLBACK (thunar_window_action_contents), },

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list