summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--src/Makefile.am11
-rw-r--r--src/nautilus-server-connect.c32
-rw-r--r--src/nautilus-server-connect.desktop.in2
-rw-r--r--src/network-scheme.desktop.in10
5 files changed, 41 insertions, 22 deletions
diff --git a/ChangeLog b/ChangeLog
index 5ae2791ba..99a88b14c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2002-10-31 Bastien Nocera <hadess@hadess.net>
+
+ * src/Makefile.am: upd
+ * src/nautilus-server-connect.c: (create_desktop), (update_icon),
+ (main): update for the icon
+ * src/nautilus-server-connect.desktop.in: update icon
+ * src/network-scheme.desktop.in: added
+
2002-10-31 Dave Camp <dave@ximian.com>
* src/Makefile.am (bin_PROGRAMS): Removed the extra 'nautilus'.
diff --git a/src/Makefile.am b/src/Makefile.am
index 3e0433175..789a3fa19 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -40,8 +40,13 @@ LDADD =\
nautilus_server_connect_SOURCES = nautilus-server-connect.c
-DESKTOP_IN_FILES=nautilus-server-connect.desktop.in
-DESKTOP_FILES=$(DESKTOP_IN_FILES:.desktop.in=.desktop)
+desktop_in_files=nautilus-server-connect.desktop.in network-scheme.desktop.in
+desktop_files=$(desktop_in_files:.desktop.in=.desktop)
+desktopdir = $(datadir)/gnome/network/
+desktop_DATA = nautilus-server-connect.desktop
+
+schemedir = $(datadir)/applications
+scheme_DATA = network-scheme.desktop
nautilus_shell_interface_idl_sources = \
nautilus-shell-interface-stubs.c \
@@ -169,7 +174,7 @@ EXTRA_DIST = \
$(ui_DATA) \
check-nautilus \
nautilus-shell-interface.idl \
- $(DESKTOP_IN_FILES) $(DESKTOP_FILES) \
+ $(desktop_in_files) $(desktop_files) \
$(NULL)
BUILT_SOURCES = \
diff --git a/src/nautilus-server-connect.c b/src/nautilus-server-connect.c
index 9e996195f..58196e9dc 100644
--- a/src/nautilus-server-connect.c
+++ b/src/nautilus-server-connect.c
@@ -25,7 +25,7 @@
#include <libgnomevfs/gnome-vfs.h>
#include <libgnome/gnome-desktop-item.h>
-#undef DEBUG
+#define DEBUG
#ifdef DEBUG
#define D(x...) g_message (x)
#else
@@ -228,9 +228,7 @@ create_desktop (char *uri)
/* i == 0 on the first time it's called */
i++;
- path = g_strdup_printf ("%s%s%s.%d.desktop",
- g_get_home_dir (), NETWORK_USER_DIR,
- prefix, i);
+ path = g_strdup_printf ("network:///%s.%d.desktop", prefix, i);
D ("create_desktop: trying %s", path);
if (g_file_test (path, G_FILE_TEST_EXISTS) == TRUE)
{
@@ -257,8 +255,6 @@ create_desktop (char *uri)
gnome_desktop_item_set_string (di, GNOME_DESKTOP_ITEM_TYPE,
"Link");
gnome_desktop_item_set_string (di, GNOME_DESKTOP_ITEM_ICON,
- icon_name);
- gnome_desktop_item_set_string (di, "X-Nautilus-Icon",
naut_icon);
created = gnome_desktop_item_save (di, path, TRUE, NULL);
@@ -316,23 +312,23 @@ update_icon (GtkEntry *entry, gpointer user_data)
if (uri == NULL || strcmp (uri, "") == 0)
{
gtk_widget_set_sensitive (button, FALSE);
- icon_name = "document-icons/i-network.png";
- naut_icon = "i-network";
+ icon_name = "gnome-fs-network.png";
+ naut_icon = "gnome-fs-network";
} else {
gtk_widget_set_sensitive (button, TRUE);
if ((strncmp (uri, "smb:", strlen("smb:")) == 0)
|| (g_strrstr (uri, ":") == NULL)) {
- icon_name = "document-icons/i-smb.png";
- naut_icon = "i-smb";
+ icon_name = "gnome-fs-smb.png";
+ naut_icon = "gnome-fs-smb";
} else if (strncmp (uri, "ftp:", strlen("ftp:")) == 0) {
- icon_name = "document-icons/i-ftp.png";
- naut_icon = "i-ftp";
+ icon_name = "gnome-fs-ftp.png";
+ naut_icon = "gnome-fs-ftp";
} else if (strncmp (uri, "http:", strlen("http:")) == 0) {
- icon_name = "document-icons/i-web.png";
- naut_icon = "i-web";
+ icon_name = "gnome-fs-web.png";
+ naut_icon = "gnome-fs-web";
} else {
- icon_name = "document-icons/i-network.png";
- naut_icon = "i-network";
+ icon_name = "gnome-fs-network.png";
+ naut_icon = "gnome-fs-network";
}
}
@@ -470,8 +466,8 @@ main (int argc, char *argv[])
window_icon = gnome_program_locate_file (NULL,
GNOME_FILE_DOMAIN_PIXMAP,
- "nautilus-server-connect.png", FALSE, NULL);
- g_message ("window_icon: %s", window_icon);
+ "nautilus/nautilus-server-connect.png", FALSE, NULL);
+
if (window_icon) {
gnome_window_icon_set_from_file (GTK_WINDOW (toplevel),
window_icon);
diff --git a/src/nautilus-server-connect.desktop.in b/src/nautilus-server-connect.desktop.in
index 598ce49f4..6a9153e31 100644
--- a/src/nautilus-server-connect.desktop.in
+++ b/src/nautilus-server-connect.desktop.in
@@ -4,6 +4,6 @@ _Name=New Server
_Comment=Add a new server to your Network Servers and connect to it
TryExec=nautilus-server-connect
Exec=nautilus-server-connect
-Icon=nautilus-server-connect.png
+Icon=nautilus/nautilus-server-connect.png
Terminal=0
Type=Application
diff --git a/src/network-scheme.desktop.in b/src/network-scheme.desktop.in
new file mode 100644
index 000000000..481dffa90
--- /dev/null
+++ b/src/network-scheme.desktop.in
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Encoding=UTF-8
+_Name=Network Servers
+_Comment=View your network servers in the Nautilus file manager
+TryExec=nautilus
+Exec=nautilus network:
+Terminal=0
+Type=Application
+Icon=document-icons/i-network.png
+Categories=Application;Core;