diff options
author | John Sullivan <sullivan@src.gnome.org> | 2000-06-27 16:42:51 +0000 |
---|---|---|
committer | John Sullivan <sullivan@src.gnome.org> | 2000-06-27 16:42:51 +0000 |
commit | 2bc0425bbbe76d0644580cf8576a1706b13cf0ba (patch) | |
tree | 3348d42aa1c8f06c67c81352431af4d4e82ba8da /src/nautilus-navigation-window-menus.c | |
parent | 39dfe8823ac0ff25c4051c447b3acf14696da1b8 (diff) | |
download | nautilus-2bc0425bbbe76d0644580cf8576a1706b13cf0ba.tar.gz |
Finished task 461 (bookmarks to "Bad URI" should have
an icon). I picked arbitrary existing icons (gnome foot
for "generic bookmark", gnome-foot-question-mark for
"bookmark with known-bad URI"); Arlo and/or Susan will
have to come up with real ones. I'll write a separate
bug report about that.
* icons/i-bookmark.png:
* icons/i-bookmark-20.png:
* icons/i-bookmark-missing.png:
* icons/i-bookmark-missing-20.png: New icons to use
for bookmarks. I supplied the base size and the 20
pixel size because that's the one used in menus, where
bookmarks usually appear. These need to be replaced with
better images.
* icons/Makefile.am: Add new icons to installed set.
* libnautilus-extensions/nautilus-bookmark.h,
* libnautilus-extensions/nautilus-bookmark.c:
(nautilus_bookmark_uri_known_not_to_exist): New public
function, moved some code from elsewhere to encapsulate this.
(nautilus_bookmark_set_icon_to_default): Choose between the
generic and bad-URI icon if there's no better icon.
* src/nautilus-window-menus.c: (activate_bookmark_in_menu_item):
Now calls nautilus_bookmark_uri_known_not_to_exist instead
of doing the work here.
Diffstat (limited to 'src/nautilus-navigation-window-menus.c')
-rw-r--r-- | src/nautilus-navigation-window-menus.c | 26 |
1 files changed, 3 insertions, 23 deletions
diff --git a/src/nautilus-navigation-window-menus.c b/src/nautilus-navigation-window-menus.c index 830289a22..30f212704 100644 --- a/src/nautilus-navigation-window-menus.c +++ b/src/nautilus-navigation-window-menus.c @@ -43,7 +43,6 @@ #include <libnautilus-extensions/nautilus-string.h> #include <libnautilus-extensions/nautilus-global-preferences.h> #include <libnautilus-extensions/nautilus-user-level-manager.h> -#include <libnautilus-extensions/nautilus-file-utilities.h> static GtkWindow *bookmarks_window = NULL; @@ -407,24 +406,6 @@ show_bogus_bookmark_window (BookmarkHolder *holder) g_free (prompt); } -static gboolean -uri_known_not_to_exist (const char *uri) -{ - char *path_name; - gboolean exists; - - /* Convert to a path, returning FALSE if not local. */ - path_name = nautilus_get_local_path_from_uri (uri); - if (path_name == NULL) { - return FALSE; - } - - /* Now check if the file exists (sync. call OK because it is local). */ - exists = g_file_exists (path_name); - g_free (path_name); - return !exists; -} - static void activate_bookmark_in_menu_item (BonoboUIHandler *uih, gpointer user_data, const char *path) { @@ -432,15 +413,14 @@ activate_bookmark_in_menu_item (BonoboUIHandler *uih, gpointer user_data, const char *uri; holder = (BookmarkHolder *)user_data; - uri = nautilus_bookmark_get_uri (holder->bookmark); - if (uri_known_not_to_exist (uri)) { + if (nautilus_bookmark_uri_known_not_to_exist (holder->bookmark)) { show_bogus_bookmark_window (holder); } else { + uri = nautilus_bookmark_get_uri (holder->bookmark); nautilus_window_goto_uri (holder->window, uri); + g_free (uri); } - - g_free (uri); } static void |