summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuca Ferretti <elle.uca@libero.it>2008-01-24 12:43:10 +0000
committerLuca Ferretti <lferrett@src.gnome.org>2008-01-24 12:43:10 +0000
commit8676045ded571aa423d348ebd7267acbe7fc6143 (patch)
tree523131dccfe03d641589040843777080b6274333
parent6b68a3258f4859a0266e5559fc9a05d9d6d9bcb2 (diff)
downloadnautilus-8676045ded571aa423d348ebd7267acbe7fc6143.tar.gz
reviewed by: Alexander Larsson
2008-01-24 Luca Ferretti <elle.uca@libero.it> reviewed by: Alexander Larsson * libnautilus-private/Makefile.am: * libnautilus-private/nautilus-icon-names.h Add a new file to define icon names, like #define NAUTILUS_ICON_HOME "user-home" using named icons from fd.o icon naming spec. * libnautilus-private/nautilus-desktop-link.c: (nautilus_desktop_link_new): * libnautilus-private/nautilus-link.c: (nautilus_link_get_link_icon_from_desktop): * libnautilus-private/nautilus-trash-monitor.c: (update_info_cb), (nautilus_trash_monitor_init): * src/file-manager/fm-directory-view.c: * src/file-manager/fm-tree-view.c: (create_popup_menu), (create_tree): * src/nautilus-bookmark-list.c: (new_bookmark_from_uri): * src/nautilus-connect-server-dialog-main.c: (main): * src/nautilus-desktop-window.c: (real_get_icon): * src/nautilus-main.c: (main): * src/nautilus-pathbar.c: (get_icon_for_file_path), (get_button_image), (is_file_path_mounted_mount), (make_directory_button): * src/nautilus-places-sidebar.c: (update_places), (bookmarks_drop_uris): * src/nautilus-window-menus.c: Include nautilus-icon-name.h and use its icons defines. This means that now Nautilus is using "user-home", "user-desktop", "folder", "user-trash*", "computer", "drive-harddisk", "folder-remote", "network-workgroup", and "text-x-generic-template". * src/network-scheme.desktop.in: * nautilus-computer.desktop.in.in: * nautilus-file-management-properties.desktop.in.in: * nautilus-folder-handler.desktop.in.in: * nautilus-home.desktop.in.in: * nautilus.desktop.in.in: Use icons from fd.o spec here too. In details, we have Launcher | New Icon ----------------+---------------------- Computer | computer File Browser | system-file-manager Open Folder | folder-open Home Folder | user-home File Management | system-file-manager Network | network-workgroup For other details see bug #407130. svn path=/trunk/; revision=13646
-rw-r--r--ChangeLog56
-rw-r--r--libnautilus-private/Makefile.am1
-rw-r--r--libnautilus-private/nautilus-desktop-link.c7
-rw-r--r--libnautilus-private/nautilus-icon-names.h29
-rw-r--r--libnautilus-private/nautilus-link.c3
-rw-r--r--libnautilus-private/nautilus-trash-monitor.c5
-rw-r--r--nautilus-computer.desktop.in.in2
-rw-r--r--nautilus-file-management-properties.desktop.in.in2
-rw-r--r--nautilus-folder-handler.desktop.in.in1
-rw-r--r--nautilus-home.desktop.in.in2
-rw-r--r--nautilus.desktop.in.in2
-rw-r--r--src/file-manager/fm-directory-view.c5
-rw-r--r--src/file-manager/fm-tree-view.c11
-rw-r--r--src/nautilus-bookmark-list.c3
-rw-r--r--src/nautilus-connect-server-dialog-main.c4
-rw-r--r--src/nautilus-desktop-window.c3
-rw-r--r--src/nautilus-main.c3
-rw-r--r--src/nautilus-pathbar.c20
-rw-r--r--src/nautilus-places-sidebar.c9
-rw-r--r--src/nautilus-window-menus.c13
-rw-r--r--src/network-scheme.desktop.in2
21 files changed, 139 insertions, 44 deletions
diff --git a/ChangeLog b/ChangeLog
index b929d6de5..35054a757 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,59 @@
+2008-01-24 Luca Ferretti <elle.uca@libero.it>
+
+ reviewed by: Alexander Larsson
+
+ * libnautilus-private/Makefile.am:
+ * libnautilus-private/nautilus-icon-names.h
+
+ Add a new file to define icon names, like
+ #define NAUTILUS_ICON_HOME "user-home"
+ using named icons from fd.o icon naming spec.
+
+ * libnautilus-private/nautilus-desktop-link.c:
+ (nautilus_desktop_link_new):
+ * libnautilus-private/nautilus-link.c:
+ (nautilus_link_get_link_icon_from_desktop):
+ * libnautilus-private/nautilus-trash-monitor.c: (update_info_cb),
+ (nautilus_trash_monitor_init):
+ * src/file-manager/fm-directory-view.c:
+ * src/file-manager/fm-tree-view.c: (create_popup_menu),
+ (create_tree):
+ * src/nautilus-bookmark-list.c: (new_bookmark_from_uri):
+ * src/nautilus-connect-server-dialog-main.c: (main):
+ * src/nautilus-desktop-window.c: (real_get_icon):
+ * src/nautilus-main.c: (main):
+ * src/nautilus-pathbar.c: (get_icon_for_file_path),
+ (get_button_image), (is_file_path_mounted_mount),
+ (make_directory_button):
+ * src/nautilus-places-sidebar.c: (update_places),
+ (bookmarks_drop_uris):
+ * src/nautilus-window-menus.c:
+
+ Include nautilus-icon-name.h and use its icons defines.
+ This means that now Nautilus is using "user-home",
+ "user-desktop", "folder", "user-trash*", "computer",
+ "drive-harddisk", "folder-remote", "network-workgroup",
+ and "text-x-generic-template".
+
+ * src/network-scheme.desktop.in:
+ * nautilus-computer.desktop.in.in:
+ * nautilus-file-management-properties.desktop.in.in:
+ * nautilus-folder-handler.desktop.in.in:
+ * nautilus-home.desktop.in.in:
+ * nautilus.desktop.in.in:
+
+ Use icons from fd.o spec here too. In details, we have
+ Launcher | New Icon
+ ----------------+----------------------
+ Computer | computer
+ File Browser | system-file-manager
+ Open Folder | folder-open
+ Home Folder | user-home
+ File Management | system-file-manager
+ Network | network-workgroup
+
+ For other details see bug #407130.
+
2008-01-23 Alexander Larsson <alexl@redhat.com>
* libnautilus-private/nautilus-file-operations.c:
diff --git a/libnautilus-private/Makefile.am b/libnautilus-private/Makefile.am
index a59fc3ae1..dba7cbf51 100644
--- a/libnautilus-private/Makefile.am
+++ b/libnautilus-private/Makefile.am
@@ -118,6 +118,7 @@ libnautilus_private_la_SOURCES = \
nautilus-icon-private.h \
nautilus-icon-info.c \
nautilus-icon-info.h \
+ nautilus-icon-names.h \
nautilus-idle-queue.c \
nautilus-idle-queue.h \
nautilus-iso9660.h \
diff --git a/libnautilus-private/nautilus-desktop-link.c b/libnautilus-private/nautilus-desktop-link.c
index 053ac7b0f..d8d06c595 100644
--- a/libnautilus-private/nautilus-desktop-link.c
+++ b/libnautilus-private/nautilus-desktop-link.c
@@ -28,6 +28,7 @@
#include "nautilus-desktop-icon-file.h"
#include "nautilus-directory-private.h"
#include "nautilus-desktop-directory.h"
+#include "nautilus-icon-names.h"
#include <glib/gi18n.h>
#include <gio/gio.h>
#include <libnautilus-private/nautilus-file-utilities.h>
@@ -152,7 +153,7 @@ nautilus_desktop_link_new (NautilusDesktopLinkType type)
link->details->filename = g_strdup ("home");
link->details->display_name = eel_preferences_get (NAUTILUS_PREFERENCES_DESKTOP_HOME_NAME);
link->details->activation_location = g_file_new_for_path (g_get_home_dir ());
- link->details->icon = g_themed_icon_new ("user-home");
+ link->details->icon = g_themed_icon_new (NAUTILUS_ICON_HOME);
eel_preferences_add_callback (NAUTILUS_PREFERENCES_DESKTOP_HOME_NAME,
home_name_changed,
@@ -165,7 +166,7 @@ nautilus_desktop_link_new (NautilusDesktopLinkType type)
link->details->display_name = eel_preferences_get (NAUTILUS_PREFERENCES_DESKTOP_COMPUTER_NAME);
link->details->activation_location = g_file_new_for_uri ("computer:///");
/* TODO: This might need a different icon: */
- link->details->icon = g_themed_icon_new ("gnome-fs-client");
+ link->details->icon = g_themed_icon_new (NAUTILUS_ICON_COMPUTER);
eel_preferences_add_callback (NAUTILUS_PREFERENCES_DESKTOP_COMPUTER_NAME,
computer_name_changed,
@@ -191,7 +192,7 @@ nautilus_desktop_link_new (NautilusDesktopLinkType type)
link->details->filename = g_strdup ("network");
link->details->display_name = eel_preferences_get (NAUTILUS_PREFERENCES_DESKTOP_NETWORK_NAME);
link->details->activation_location = g_file_new_for_uri ("network:///");
- link->details->icon = g_themed_icon_new ("gnome-fs-network");
+ link->details->icon = g_themed_icon_new (NAUTILUS_ICON_NETWORK);
eel_preferences_add_callback (NAUTILUS_PREFERENCES_DESKTOP_NETWORK_NAME,
network_name_changed,
diff --git a/libnautilus-private/nautilus-icon-names.h b/libnautilus-private/nautilus-icon-names.h
new file mode 100644
index 000000000..cadf1ba5d
--- /dev/null
+++ b/libnautilus-private/nautilus-icon-names.h
@@ -0,0 +1,29 @@
+#ifndef NAUTILUS_ICON_NAMES_H
+#define NAUTILUS_ICON_NAMES_H
+
+/* Icons for places */
+#define NAUTILUS_ICON_COMPUTER "computer"
+#define NAUTILUS_ICON_DESKTOP "user-desktop"
+#define NAUTILUS_ICON_FILESYSTEM "drive-harddisk"
+#define NAUTILUS_ICON_FOLDER "folder"
+#define NAUTILUS_ICON_FOLDER_REMOTE "folder-remote"
+#define NAUTILUS_ICON_HOME "user-home"
+#define NAUTILUS_ICON_NETWORK "network-workgroup"
+#define NAUTILUS_ICON_NETWORK_SERVER "network-server"
+#define NAUTILUS_ICON_SEARCH "system-search"
+#define NAUTILUS_ICON_TRASH "user-trash"
+#define NAUTILUS_ICON_TRASH_FULL "user-trash-full"
+
+/* Icons for emblems */
+#define NAUTILUS_ICON_EMBLEM_READONLY "emblem-readonly"
+#define NAUTILUS_ICON_EMBLEM_UNREADABLE "emblem-unreadable"
+#define NAUTILUS_ICON_EMBLEM_SYMLINK "emblem-symbolic-link"
+
+/* Other icons */
+#define NAUTILUS_ICON_TEMPLATE "text-x-generic-template"
+
+/* Icons not provided by fd.o naming spec or nautilus itself */
+#define NAUTILUS_ICON_BURN "nautilus-cd-burner"
+
+#endif /* NAUTILUS_ICON_NAMES_H */
+
diff --git a/libnautilus-private/nautilus-link.c b/libnautilus-private/nautilus-link.c
index d775d01c1..698dcba37 100644
--- a/libnautilus-private/nautilus-link.c
+++ b/libnautilus-private/nautilus-link.c
@@ -31,6 +31,7 @@
#include "nautilus-file-utilities.h"
#include "nautilus-file.h"
#include "nautilus-program-choosing.h"
+#include "nautilus-icon-names.h"
#include <eel/eel-vfs-extensions.h>
#include <glib/gi18n.h>
#include <gio/gio.h>
@@ -364,7 +365,7 @@ nautilus_link_get_link_icon_from_desktop (GnomeDesktopItem *desktop_file)
return g_strdup ("gnome-dev-harddisk");
case GNOME_DESKTOP_ITEM_TYPE_DIRECTORY:
- return g_strdup ("gnome-fs-directory");
+ return g_strdup (NAUTILUS_ICON_FOLDER);
case GNOME_DESKTOP_ITEM_TYPE_SERVICE:
case GNOME_DESKTOP_ITEM_TYPE_SERVICE_TYPE:
diff --git a/libnautilus-private/nautilus-trash-monitor.c b/libnautilus-private/nautilus-trash-monitor.c
index 514867749..23c1a8462 100644
--- a/libnautilus-private/nautilus-trash-monitor.c
+++ b/libnautilus-private/nautilus-trash-monitor.c
@@ -29,6 +29,7 @@
#include "nautilus-directory-notify.h"
#include "nautilus-directory.h"
#include "nautilus-file-attributes.h"
+#include "nautilus-icon-names.h"
#include <eel/eel-debug.h>
#include <gio/gio.h>
#include <string.h>
@@ -115,7 +116,7 @@ update_info_cb (GObject *source_object,
if (G_IS_THEMED_ICON (icon)) {
names = g_themed_icon_get_names (G_THEMED_ICON (icon));
for (i = 0; names[i] != NULL; i++) {
- if (strcmp (names[i], "user-trash-full") == 0) {
+ if (strcmp (names[i], NAUTILUS_ICON_TRASH_FULL) == 0) {
empty = FALSE;
break;
}
@@ -173,7 +174,7 @@ nautilus_trash_monitor_init (NautilusTrashMonitor *trash_monitor)
NautilusTrashMonitorDetails);
trash_monitor->details->empty = TRUE;
- trash_monitor->details->icon = g_themed_icon_new ("user-trash");
+ trash_monitor->details->icon = g_themed_icon_new (NAUTILUS_ICON_TRASH);
location = g_file_new_for_uri ("trash:///");
diff --git a/nautilus-computer.desktop.in.in b/nautilus-computer.desktop.in.in
index 5bbf3c194..b2987018b 100644
--- a/nautilus-computer.desktop.in.in
+++ b/nautilus-computer.desktop.in.in
@@ -4,7 +4,7 @@ _Name=Computer
_Comment=Browse all local and remote disks and folders accessible from this computer
TryExec=nautilus
Exec=nautilus --no-desktop computer:
-Icon=gnome-fs-client
+Icon=computer
Terminal=false
StartupNotify=true
Type=Application
diff --git a/nautilus-file-management-properties.desktop.in.in b/nautilus-file-management-properties.desktop.in.in
index 95fb0aa90..a696c8181 100644
--- a/nautilus-file-management-properties.desktop.in.in
+++ b/nautilus-file-management-properties.desktop.in.in
@@ -3,7 +3,7 @@ Encoding=UTF-8
_Name=File Management
_Comment=Change the behaviour and appearance of file manager windows
Exec=nautilus-file-management-properties
-Icon=file-manager
+Icon=system-file-manager
Terminal=false
Type=Application
StartupNotify=true
diff --git a/nautilus-folder-handler.desktop.in.in b/nautilus-folder-handler.desktop.in.in
index bda6b2ceb..17336da1d 100644
--- a/nautilus-folder-handler.desktop.in.in
+++ b/nautilus-folder-handler.desktop.in.in
@@ -5,6 +5,7 @@ TryExec=nautilus
Exec=nautilus --no-desktop %U
NoDisplay=true
Terminal=false
+Icon=folder-open
StartupNotify=true
Type=Application
MimeType=x-directory/gnome-default-handler;x-directory/normal;inode/directory;application/x-gnome-saved-search;
diff --git a/nautilus-home.desktop.in.in b/nautilus-home.desktop.in.in
index 4da25e1ea..4087fff5f 100644
--- a/nautilus-home.desktop.in.in
+++ b/nautilus-home.desktop.in.in
@@ -4,7 +4,7 @@ _Name=Home Folder
_Comment=Open your personal folder
TryExec=nautilus
Exec=nautilus --no-desktop
-Icon=gnome-fs-home
+Icon=user-home
Terminal=false
StartupNotify=true
Type=Application
diff --git a/nautilus.desktop.in.in b/nautilus.desktop.in.in
index 3d704fc9d..ef7d18da1 100644
--- a/nautilus.desktop.in.in
+++ b/nautilus.desktop.in.in
@@ -4,7 +4,7 @@ _Name=File Browser
_Comment=Browse the file system with the file manager
TryExec=nautilus
Exec=nautilus --no-desktop --browser %U
-Icon=file-manager
+Icon=system-file-manager
Terminal=false
StartupNotify=true
Type=Application
diff --git a/src/file-manager/fm-directory-view.c b/src/file-manager/fm-directory-view.c
index 18329e848..74011d97a 100644
--- a/src/file-manager/fm-directory-view.c
+++ b/src/file-manager/fm-directory-view.c
@@ -96,6 +96,7 @@
#include <libnautilus-private/nautilus-ui-utilities.h>
#include <libnautilus-private/nautilus-signaller.h>
#include <libnautilus-private/nautilus-autorun.h>
+#include <libnautilus-private/nautilus-icon-names.h>
#include <unistd.h>
/* Minimum starting update inverval */
@@ -6298,7 +6299,7 @@ static const GtkActionEntry directory_view_entries[] = {
"RenameSelectAll", "<shift>F2", /* label, accelerator */
NULL, /* tooltip */
G_CALLBACK (action_rename_select_all_callback) },
- { "Trash", "user-trash", /* name, stock id */
+ { "Trash", NAUTILUS_ICON_TRASH, /* name, stock id */
N_("Mo_ve to Trash"), "<control>T", /* label, accelerator */
N_("Move each selected item to the Trash"), /* tooltip */
G_CALLBACK (action_trash_callback) },
@@ -6379,7 +6380,7 @@ static const GtkActionEntry directory_view_entries[] = {
N_("Prepare this folder to be copied with a Paste command"), /* tooltip */
G_CALLBACK (action_location_copy_callback) },
- { FM_ACTION_LOCATION_TRASH, "user-trash", /* name, stock id */
+ { FM_ACTION_LOCATION_TRASH, NAUTILUS_ICON_TRASH, /* name, stock id */
N_("Mo_ve to Trash"), "", /* label, accelerator */
N_("Move this folder to the Trash"), /* tooltip */
G_CALLBACK (action_location_trash_callback) },
diff --git a/src/file-manager/fm-tree-view.c b/src/file-manager/fm-tree-view.c
index 6c928a667..6433edd45 100644
--- a/src/file-manager/fm-tree-view.c
+++ b/src/file-manager/fm-tree-view.c
@@ -66,6 +66,7 @@
#include <libnautilus-private/nautilus-file-operations.h>
#include <libnautilus-private/nautilus-file-utilities.h>
#include <libnautilus-private/nautilus-global-preferences.h>
+#include <libnautilus-private/nautilus-icon-names.h>
#include <libnautilus-private/nautilus-program-choosing.h>
#include <libnautilus-private/nautilus-tree-view-drag-dest.h>
#include <libnautilus-private/nautilus-cell-renderer-pixbuf-emblem.h>
@@ -1180,7 +1181,7 @@ create_popup_menu (FMTreeView *view)
eel_gtk_menu_append_separator (GTK_MENU (popup));
/* add the "move to trash" menu item */
- menu_image = gtk_image_new_from_icon_name ("user-trash",
+ menu_image = gtk_image_new_from_icon_name (NAUTILUS_ICON_TRASH,
GTK_ICON_SIZE_MENU);
gtk_widget_show (menu_image);
menu_item = gtk_image_menu_item_new_with_label (_("Move to Trash"));
@@ -1255,16 +1256,16 @@ create_tree (FMTreeView *view)
G_CALLBACK (row_loaded_callback),
view, G_CONNECT_AFTER);
home_uri = nautilus_get_home_directory_uri ();
- icon = g_themed_icon_new ("user-home");
+ icon = g_themed_icon_new (NAUTILUS_ICON_HOME);
fm_tree_model_add_root_uri (view->details->child_model, home_uri, _("Home Folder"), icon, NULL);
g_object_unref (icon);
g_free (home_uri);
- icon = g_themed_icon_new ("folder");
+ icon = g_themed_icon_new (NAUTILUS_ICON_FILESYSTEM);
fm_tree_model_add_root_uri (view->details->child_model, "file:///", _("File System"), icon, NULL);
g_object_unref (icon);
#ifdef NOT_YET_USABLE
- icon = g_themed_icon_new ("gnome-fs-network");
- fm_tree_model_add_root_uri (view->details->child_model, "network:///", _("Network Neighbourhood"), "gnome-fs-network", NULL);
+ icon = g_themed_icon_new (NAUTILUS_ICON_NETWORK);
+ fm_tree_model_add_root_uri (view->details->child_model, "network:///", _("Network Neighbourhood"), NAUTILUS_ICON_NETWORK, NULL);
g_object_unref (icon);
#endif
diff --git a/src/nautilus-bookmark-list.c b/src/nautilus-bookmark-list.c
index cf7dc78d3..832e0a5bf 100644
--- a/src/nautilus-bookmark-list.c
+++ b/src/nautilus-bookmark-list.c
@@ -30,6 +30,7 @@
#include <libnautilus-private/nautilus-file-utilities.h>
#include <libnautilus-private/nautilus-file.h>
+#include <libnautilus-private/nautilus-icon-names.h>
#include <eel/eel-glib-extensions.h>
#include <eel/eel-string.h>
#include <gio/gio.h>
@@ -88,7 +89,7 @@ new_bookmark_from_uri (const char *uri, const char *label)
nautilus_file_unref (file);
if (icon == NULL) {
- icon = g_themed_icon_new ("gnome-fs-directory");
+ icon = g_themed_icon_new (NAUTILUS_ICON_FOLDER);
}
new_bookmark = nautilus_bookmark_new_with_icon (location, name, has_label, icon);
diff --git a/src/nautilus-connect-server-dialog-main.c b/src/nautilus-connect-server-dialog-main.c
index 6f5cf8911..d86cd694d 100644
--- a/src/nautilus-connect-server-dialog-main.c
+++ b/src/nautilus-connect-server-dialog-main.c
@@ -39,6 +39,8 @@
#include <eel/eel-preferences.h>
#include <eel/eel-stock-dialogs.h>
+#include <libnautilus-private/nautilus-icon-names.h>
+
#include "nautilus-window.h"
#include "nautilus-connect-server-dialog.h"
@@ -124,7 +126,7 @@ main (int argc, char *argv[])
eel_preferences_init ("/apps/nautilus");
- gtk_window_set_default_icon_name ("gnome-fs-directory");
+ gtk_window_set_default_icon_name (NAUTILUS_ICON_FOLDER);
/* command line arguments, null terminated array */
diff --git a/src/nautilus-desktop-window.c b/src/nautilus-desktop-window.c
index 0470c593a..1f23a8c82 100644
--- a/src/nautilus-desktop-window.c
+++ b/src/nautilus-desktop-window.c
@@ -34,6 +34,7 @@
#include <eel/eel-vfs-extensions.h>
#include <libgnome/gnome-macros.h>
#include <libnautilus-private/nautilus-file-utilities.h>
+#include <libnautilus-private/nautilus-icon-names.h>
#include <gio/gio.h>
struct NautilusDesktopWindowDetails {
@@ -253,7 +254,7 @@ real_get_title (NautilusWindow *window)
static NautilusIconInfo *
real_get_icon (NautilusWindow *window)
{
- return nautilus_icon_info_lookup_from_name ("user-desktop", 48);
+ return nautilus_icon_info_lookup_from_name (NAUTILUS_ICON_DESKTOP, 48);
}
static void
diff --git a/src/nautilus-main.c b/src/nautilus-main.c
index 39a2cc0a6..298675a4c 100644
--- a/src/nautilus-main.c
+++ b/src/nautilus-main.c
@@ -55,6 +55,7 @@
#include <libnautilus-private/nautilus-directory-metafile.h>
#include <libnautilus-private/nautilus-global-preferences.h>
#include <libnautilus-private/nautilus-lib-self-check-functions.h>
+#include <libnautilus-private/nautilus-icon-names.h>
#include <libxml/parser.h>
#ifdef HAVE_LOCALE_H
#include <locale.h>
@@ -482,7 +483,7 @@ main (int argc, char *argv[])
}
/* Set default icon for all nautilus windows */
- gtk_window_set_default_icon_name ("gnome-fs-directory");
+ gtk_window_set_default_icon_name (NAUTILUS_ICON_FOLDER);
/* Need to set this to the canonical DISPLAY value, since
thats where we're registering per-display components */
diff --git a/src/nautilus-pathbar.c b/src/nautilus-pathbar.c
index e4532e414..be82865b5 100644
--- a/src/nautilus-pathbar.c
+++ b/src/nautilus-pathbar.c
@@ -37,6 +37,7 @@
#include <libnautilus-private/nautilus-file.h>
#include <libnautilus-private/nautilus-file-utilities.h>
#include <libnautilus-private/nautilus-global-preferences.h>
+#include <libnautilus-private/nautilus-icon-names.h>
#include "nautilus-pathbar.h"
enum {
@@ -63,11 +64,6 @@ static gboolean desktop_is_home;
#define NAUTILUS_PATH_BAR_ICON_SIZE 16
-#define DEFAULT_ICON "folder"
-#define DEFAULT_DESKTOP_ICON "user-desktop"
-#define DEFAULT_HOME_ICON "user-home"
-#define DEFAULT_FILESYSTEM_ICON "gnome-dev-harddisk"
-
typedef struct _ButtonData ButtonData;
struct _ButtonData
@@ -1016,7 +1012,7 @@ button_clicked_cb (GtkWidget *button,
}
static GdkPixbuf *
-get_icon_for_file_path (GFile *location, const char *default_icon_name)
+get_icon_for_file_path (GFile *location, const char *NAUTILUS_ICON_FOLDER_name)
{
NautilusFile *file;
NautilusIconInfo *info;
@@ -1035,7 +1031,7 @@ get_icon_for_file_path (GFile *location, const char *default_icon_name)
nautilus_file_unref (file);
- info = nautilus_icon_info_lookup_from_name (default_icon_name, NAUTILUS_PATH_BAR_ICON_SIZE);
+ info = nautilus_icon_info_lookup_from_name (NAUTILUS_ICON_FOLDER_name, NAUTILUS_PATH_BAR_ICON_SIZE);
pixbuf = nautilus_icon_info_get_pixbuf_at_size (info, NAUTILUS_PATH_BAR_ICON_SIZE);
g_object_unref (info);
@@ -1053,7 +1049,7 @@ get_button_image (NautilusPathBar *path_bar,
return path_bar->root_icon;
}
- path_bar->root_icon = get_icon_for_file_path (path_bar->root_path, DEFAULT_FILESYSTEM_ICON);
+ path_bar->root_icon = get_icon_for_file_path (path_bar->root_path, NAUTILUS_ICON_FILESYSTEM);
return path_bar->root_icon;
case HOME_BUTTON:
@@ -1061,14 +1057,14 @@ get_button_image (NautilusPathBar *path_bar,
return path_bar->home_icon;
}
- path_bar->home_icon = get_icon_for_file_path (path_bar->root_path, DEFAULT_HOME_ICON);
+ path_bar->home_icon = get_icon_for_file_path (path_bar->root_path, NAUTILUS_ICON_HOME);
return path_bar->home_icon;
case DESKTOP_BUTTON:
if (path_bar->desktop_icon != NULL) {
return path_bar->desktop_icon;
}
- path_bar->desktop_icon = get_icon_for_file_path (path_bar->root_path, DEFAULT_DESKTOP_ICON);
+ path_bar->desktop_icon = get_icon_for_file_path (path_bar->root_path, NAUTILUS_ICON_DESKTOP);
return path_bar->desktop_icon;
default:
@@ -1194,7 +1190,7 @@ is_file_path_mounted_mount (GFile *location, ButtonData *button_data)
if (button_data) {
icon = g_mount_get_icon (mount);
if (icon == NULL) {
- icon = g_themed_icon_new (DEFAULT_ICON);
+ icon = g_themed_icon_new (NAUTILUS_ICON_FOLDER);
}
info = nautilus_icon_info_lookup (icon, NAUTILUS_PATH_BAR_ICON_SIZE);
g_object_unref (icon);
@@ -1320,7 +1316,7 @@ make_directory_button (NautilusPathBar *path_bar,
gtk_box_pack_start (GTK_BOX (child), button_data->image, FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (child), label_alignment, FALSE, FALSE, 0);
button_data->is_base_dir = TRUE;
- button_data->custom_icon = get_icon_for_file_path (path, DEFAULT_ICON);
+ button_data->custom_icon = get_icon_for_file_path (path, NAUTILUS_ICON_FOLDER);
} else {
button_data->is_base_dir = FALSE;
button_data->label = gtk_label_new (NULL);
diff --git a/src/nautilus-places-sidebar.c b/src/nautilus-places-sidebar.c
index c657321b1..deeacc289 100644
--- a/src/nautilus-places-sidebar.c
+++ b/src/nautilus-places-sidebar.c
@@ -55,6 +55,7 @@
#include <libnautilus-private/nautilus-file-utilities.h>
#include <libnautilus-private/nautilus-file-operations.h>
#include <libnautilus-private/nautilus-trash-monitor.h>
+#include <libnautilus-private/nautilus-icon-names.h>
#include <gio/gio.h>
#include "nautilus-bookmark-list.h"
@@ -259,7 +260,7 @@ update_places (NautilusPlacesSidebar *sidebar)
mount_uri = nautilus_get_home_directory_uri ();
display_name = g_filename_display_basename (g_get_home_dir ());
- icon = g_themed_icon_new ("gnome-fs-home");
+ icon = g_themed_icon_new (NAUTILUS_ICON_HOME);
last_iter = add_place (sidebar, PLACES_BUILT_IN,
display_name, icon,
mount_uri, NULL, NULL, NULL, 0);
@@ -272,7 +273,7 @@ update_places (NautilusPlacesSidebar *sidebar)
}
mount_uri = g_filename_to_uri (desktop_path, NULL, NULL);
- icon = g_themed_icon_new ("gnome-fs-desktop");
+ icon = g_themed_icon_new (NAUTILUS_ICON_DESKTOP);
last_iter = add_place (sidebar, PLACES_BUILT_IN,
_("Desktop"), icon,
mount_uri, NULL, NULL, NULL, 0);
@@ -284,7 +285,7 @@ update_places (NautilusPlacesSidebar *sidebar)
g_free (desktop_path);
mount_uri = "file:///"; /* No need to strdup */
- icon = g_themed_icon_new ("gnome-dev-harddisk");
+ icon = g_themed_icon_new (NAUTILUS_ICON_FILESYSTEM);
last_iter = add_place (sidebar, PLACES_BUILT_IN,
_("File System"), icon,
mount_uri, NULL, NULL, NULL, 0);
@@ -889,7 +890,7 @@ bookmarks_drop_uris (NautilusPlacesSidebar *sidebar,
name = nautilus_compute_title_for_location (location);
- icon = g_themed_icon_new ("gnome-fs-directory");
+ icon = g_themed_icon_new (NAUTILUS_ICON_FOLDER);
bookmark = nautilus_bookmark_new_with_icon (location, name,
FALSE, icon);
g_object_unref (icon);
diff --git a/src/nautilus-window-menus.c b/src/nautilus-window-menus.c
index 0de17a564..e13a7bf23 100644
--- a/src/nautilus-window-menus.c
+++ b/src/nautilus-window-menus.c
@@ -50,6 +50,7 @@
#include <libgnomeui/gnome-help.h>
#include <libnautilus-extension/nautilus-menu-provider.h>
#include <libnautilus-private/nautilus-file-utilities.h>
+#include <libnautilus-private/nautilus-icon-names.h>
#include <libnautilus-private/nautilus-ui-utilities.h>
#include <libnautilus-private/nautilus-module.h>
#include <libnautilus-private/nautilus-undo-manager.h>
@@ -665,27 +666,27 @@ static const GtkActionEntry main_entries[] = {
N_("Connect to a remote computer or shared disk"), /* tooltip */
G_CALLBACK (action_connect_to_server_callback) },
#endif
- { "Home", "gnome-fs-home", /* name, stock id */
+ { "Home", NAUTILUS_ICON_HOME, /* name, stock id */
N_("_Home Folder"), "<alt>Home", /* label, accelerator */
N_("Open your personal folder"), /* tooltip */
G_CALLBACK (action_home_callback) },
- { "Go to Computer", "gnome-fs-client", /* name, stock id */
+ { "Go to Computer", NAUTILUS_ICON_COMPUTER, /* name, stock id */
N_("_Computer"), NULL, /* label, accelerator */
N_("Browse all local and remote disks and folders accessible from this computer"), /* tooltip */
G_CALLBACK (action_go_to_computer_callback) },
- { "Go to Network", "gnome-fs-network", /* name, stock id */
+ { "Go to Network", NAUTILUS_ICON_NETWORK, /* name, stock id */
N_("_Network"), NULL, /* label, accelerator */
N_("Browse bookmarked and local network locations"), /* tooltip */
G_CALLBACK (action_go_to_network_callback) },
- { "Go to Templates", "stock_new-template", /* name, stock id */
+ { "Go to Templates", NAUTILUS_ICON_TEMPLATE, /* name, stock id */
N_("T_emplates"), NULL, /* label, accelerator */
N_("Open your personal templates folder"), /* tooltip */
G_CALLBACK (action_go_to_templates_callback) },
- { "Go to Trash", "user-trash", /* name, stock id */
+ { "Go to Trash", NAUTILUS_ICON_TRASH, /* name, stock id */
N_("_Trash"), NULL, /* label, accelerator */
N_("Open your personal trash folder"), /* tooltip */
G_CALLBACK (action_go_to_trash_callback) },
- { "Go to Burn CD", "nautilus-cd-burner", /* name, stock id */
+ { "Go to Burn CD", NAUTILUS_ICON_BURN, /* name, stock id */
N_("CD/_DVD Creator"), NULL, /* label, accelerator */
N_("Open a folder into which you can drag files to burn to a CD or DVD"), /* tooltip */
G_CALLBACK (action_go_to_burn_cd_callback) },
diff --git a/src/network-scheme.desktop.in b/src/network-scheme.desktop.in
index d5b18a4a2..2c49688e5 100644
--- a/src/network-scheme.desktop.in
+++ b/src/network-scheme.desktop.in
@@ -7,6 +7,6 @@ Exec=nautilus --no-desktop network:
Terminal=false
StartupNotify=true
Type=Application
-Icon=gnome-fs-network
+Icon=network-workgroup
Categories=Core;
OnlyShowIn=GNOME;