diff options
author | Ian McKellar <yakk@src.gnome.org> | 2001-02-19 05:28:00 +0000 |
---|---|---|
committer | Ian McKellar <yakk@src.gnome.org> | 2001-02-19 05:28:00 +0000 |
commit | bca5f1d8653babcb5f680162b6b51c39008046ef (patch) | |
tree | 9fb9674d2692093a50246baa96435f65c32f7080 | |
parent | 3b2bd8ec84ea05e296d21752dc8090847a37af31 (diff) | |
download | nautilus-bca5f1d8653babcb5f680162b6b51c39008046ef.tar.gz |
Removed all the code related to Gnome-VFS sub-methods in Nautilus. (Bug
* libnautilus-extensions/nautilus-mime-actions.c:
* libnautilus-extensions/nautilus-mime-actions.h:
* src/nautilus-window.c: (load_view_as_menu_callback):
Removed all the code related to Gnome-VFS sub-methods in Nautilus.
(Bug 5086)
-rw-r--r-- | ChangeLog | 11 | ||||
-rw-r--r-- | libnautilus-extensions/nautilus-mime-actions.c | 18 | ||||
-rw-r--r-- | libnautilus-extensions/nautilus-mime-actions.h | 1 | ||||
-rw-r--r-- | libnautilus-private/nautilus-mime-actions.c | 18 | ||||
-rw-r--r-- | libnautilus-private/nautilus-mime-actions.h | 1 | ||||
-rw-r--r-- | src/nautilus-navigation-window.c | 56 | ||||
-rw-r--r-- | src/nautilus-object-window.c | 56 | ||||
-rw-r--r-- | src/nautilus-spatial-window.c | 56 | ||||
-rw-r--r-- | src/nautilus-window.c | 56 |
9 files changed, 14 insertions, 259 deletions
@@ -1,3 +1,13 @@ +2001-02-18 Ian McKellar <ian@eazel.com> + + reviewed by: Robey Pointer <robey@eazel.com> + + * libnautilus-extensions/nautilus-mime-actions.c: + * libnautilus-extensions/nautilus-mime-actions.h: + * src/nautilus-window.c: (load_view_as_menu_callback): + Removed all the code related to Gnome-VFS sub-methods in Nautilus. + (Bug 5086) + 2001-02-18 Eskil Heyn Olsen <eskil@eazel.com> reviewed by: Ian McKellar <ian@eazel.com> @@ -310,7 +320,6 @@ * po/POTFILES.in: added the selection-based services ->>>>>>> 1.3813 2001-02-16 Robey Pointer <robey@eazel.com> * components/mozilla/nautilus-mozilla-embed-extensions.cpp: diff --git a/libnautilus-extensions/nautilus-mime-actions.c b/libnautilus-extensions/nautilus-mime-actions.c index ccd23ab47..6690a93ec 100644 --- a/libnautilus-extensions/nautilus-mime-actions.c +++ b/libnautilus-extensions/nautilus-mime-actions.c @@ -634,24 +634,6 @@ nautilus_mime_get_short_list_components_for_file (NautilusFile *file) return result; } -/* FIXME bugzilla.eazel.com 5086: we should disable this for 1.0 I think */ - -char * -nautilus_mime_get_short_list_methods_for_file (NautilusFile *file) -{ - char *mime_type; - const char *method; - - if (!nautilus_mime_actions_check_if_minimum_attributes_ready (file)) { - return NULL; - } - - mime_type = nautilus_file_get_mime_type (file); - method = gnome_vfs_mime_get_value (mime_type, "vfs_method"); - g_free (mime_type); - return g_strdup (method); -} - GList * nautilus_mime_get_all_applications_for_file (NautilusFile *file) { diff --git a/libnautilus-extensions/nautilus-mime-actions.h b/libnautilus-extensions/nautilus-mime-actions.h index a80560f56..69f627d79 100644 --- a/libnautilus-extensions/nautilus-mime-actions.h +++ b/libnautilus-extensions/nautilus-mime-actions.h @@ -43,7 +43,6 @@ OAF_ServerInfo * nautilus_mime_get_default_component_for_file gboolean nautilus_mime_is_default_component_for_file_user_chosen (NautilusFile *file); GList * nautilus_mime_get_short_list_applications_for_file (NautilusFile *file); GList * nautilus_mime_get_short_list_components_for_file (NautilusFile *file); -gchar * nautilus_mime_get_short_list_methods_for_file (NautilusFile *file); GList * nautilus_mime_get_all_applications_for_file (NautilusFile *file); GList * nautilus_mime_get_all_components_for_file (NautilusFile *file); gboolean nautilus_mime_has_any_components_for_file (NautilusFile *file); diff --git a/libnautilus-private/nautilus-mime-actions.c b/libnautilus-private/nautilus-mime-actions.c index ccd23ab47..6690a93ec 100644 --- a/libnautilus-private/nautilus-mime-actions.c +++ b/libnautilus-private/nautilus-mime-actions.c @@ -634,24 +634,6 @@ nautilus_mime_get_short_list_components_for_file (NautilusFile *file) return result; } -/* FIXME bugzilla.eazel.com 5086: we should disable this for 1.0 I think */ - -char * -nautilus_mime_get_short_list_methods_for_file (NautilusFile *file) -{ - char *mime_type; - const char *method; - - if (!nautilus_mime_actions_check_if_minimum_attributes_ready (file)) { - return NULL; - } - - mime_type = nautilus_file_get_mime_type (file); - method = gnome_vfs_mime_get_value (mime_type, "vfs_method"); - g_free (mime_type); - return g_strdup (method); -} - GList * nautilus_mime_get_all_applications_for_file (NautilusFile *file) { diff --git a/libnautilus-private/nautilus-mime-actions.h b/libnautilus-private/nautilus-mime-actions.h index a80560f56..69f627d79 100644 --- a/libnautilus-private/nautilus-mime-actions.h +++ b/libnautilus-private/nautilus-mime-actions.h @@ -43,7 +43,6 @@ OAF_ServerInfo * nautilus_mime_get_default_component_for_file gboolean nautilus_mime_is_default_component_for_file_user_chosen (NautilusFile *file); GList * nautilus_mime_get_short_list_applications_for_file (NautilusFile *file); GList * nautilus_mime_get_short_list_components_for_file (NautilusFile *file); -gchar * nautilus_mime_get_short_list_methods_for_file (NautilusFile *file); GList * nautilus_mime_get_all_applications_for_file (NautilusFile *file); GList * nautilus_mime_get_all_components_for_file (NautilusFile *file); gboolean nautilus_mime_has_any_components_for_file (NautilusFile *file); diff --git a/src/nautilus-navigation-window.c b/src/nautilus-navigation-window.c index f39dcc3aa..44a6a7b5c 100644 --- a/src/nautilus-navigation-window.c +++ b/src/nautilus-navigation-window.c @@ -1080,37 +1080,13 @@ view_as_menu_choose_view_callback (GtkWidget *widget, gpointer data) } static void -view_as_menu_vfs_method_callback (GtkWidget *widget, gpointer callback_data) -{ - gpointer object_data; - NautilusWindow *window; - char *new_location; - const char *method; - - g_return_if_fail (GTK_IS_MENU_ITEM (widget)); - - object_data = gtk_object_get_data (GTK_OBJECT (widget), "window"); - g_return_if_fail (NAUTILUS_IS_WINDOW (object_data)); - window = NAUTILUS_WINDOW (object_data); - - method = (const char *) gtk_object_get_data (GTK_OBJECT (widget), "method"); - g_return_if_fail (method != NULL); - - new_location = g_strdup_printf ("%s#%s:/", window->details->location, method); - nautilus_window_go_to (window, new_location); - g_free (new_location); -} - -static void load_view_as_menu_callback (NautilusFile *file, gpointer callback_data) { GList *components; - char *method; GList *p; GtkWidget *new_menu; GtkWidget *menu_item; - char *label; NautilusWindow *window; window = NAUTILUS_WINDOW (callback_data); @@ -1128,38 +1104,8 @@ load_view_as_menu_callback (NautilusFile *file, } gnome_vfs_mime_component_list_free (components); - /* FIXME bugzilla.eazel.com 5086: This feature has not been - * thoroughly tested and we need to finish it or delete it. - */ - /* Add a menu item for each special GNOME-VFS method for this - * URI. This is a questionable user interface, since it's a - * one way trip if you choose one of these view menu items, but - * it's better than nothing. - */ - /* FIXME bugzilla.eazel.com 2466: The name of the following - * function is plural, but it returns only one item. That must - * be fixed. - */ - method = nautilus_mime_get_short_list_methods_for_file (window->details->viewed_file); - if (method != NULL) { - label = g_strdup_printf (_("View as %s"), method); - menu_item = gtk_menu_item_new_with_label (label); - g_free (label); - - gtk_object_set_data (GTK_OBJECT (menu_item), "window", window); - gtk_object_set_data_full (GTK_OBJECT (menu_item), "method", - g_strdup (method), g_free); - gtk_signal_connect (GTK_OBJECT (menu_item), - "activate", - view_as_menu_vfs_method_callback, - NULL); - gtk_widget_show (menu_item); - gtk_menu_append (GTK_MENU (new_menu), menu_item); - g_free (method); - } - /* Add separator before "Other" if there are any other viewers in menu. */ - if (components != NULL || method != NULL) { + if (components != NULL) { gtk_menu_append (GTK_MENU (new_menu), new_gtk_separator ()); } diff --git a/src/nautilus-object-window.c b/src/nautilus-object-window.c index f39dcc3aa..44a6a7b5c 100644 --- a/src/nautilus-object-window.c +++ b/src/nautilus-object-window.c @@ -1080,37 +1080,13 @@ view_as_menu_choose_view_callback (GtkWidget *widget, gpointer data) } static void -view_as_menu_vfs_method_callback (GtkWidget *widget, gpointer callback_data) -{ - gpointer object_data; - NautilusWindow *window; - char *new_location; - const char *method; - - g_return_if_fail (GTK_IS_MENU_ITEM (widget)); - - object_data = gtk_object_get_data (GTK_OBJECT (widget), "window"); - g_return_if_fail (NAUTILUS_IS_WINDOW (object_data)); - window = NAUTILUS_WINDOW (object_data); - - method = (const char *) gtk_object_get_data (GTK_OBJECT (widget), "method"); - g_return_if_fail (method != NULL); - - new_location = g_strdup_printf ("%s#%s:/", window->details->location, method); - nautilus_window_go_to (window, new_location); - g_free (new_location); -} - -static void load_view_as_menu_callback (NautilusFile *file, gpointer callback_data) { GList *components; - char *method; GList *p; GtkWidget *new_menu; GtkWidget *menu_item; - char *label; NautilusWindow *window; window = NAUTILUS_WINDOW (callback_data); @@ -1128,38 +1104,8 @@ load_view_as_menu_callback (NautilusFile *file, } gnome_vfs_mime_component_list_free (components); - /* FIXME bugzilla.eazel.com 5086: This feature has not been - * thoroughly tested and we need to finish it or delete it. - */ - /* Add a menu item for each special GNOME-VFS method for this - * URI. This is a questionable user interface, since it's a - * one way trip if you choose one of these view menu items, but - * it's better than nothing. - */ - /* FIXME bugzilla.eazel.com 2466: The name of the following - * function is plural, but it returns only one item. That must - * be fixed. - */ - method = nautilus_mime_get_short_list_methods_for_file (window->details->viewed_file); - if (method != NULL) { - label = g_strdup_printf (_("View as %s"), method); - menu_item = gtk_menu_item_new_with_label (label); - g_free (label); - - gtk_object_set_data (GTK_OBJECT (menu_item), "window", window); - gtk_object_set_data_full (GTK_OBJECT (menu_item), "method", - g_strdup (method), g_free); - gtk_signal_connect (GTK_OBJECT (menu_item), - "activate", - view_as_menu_vfs_method_callback, - NULL); - gtk_widget_show (menu_item); - gtk_menu_append (GTK_MENU (new_menu), menu_item); - g_free (method); - } - /* Add separator before "Other" if there are any other viewers in menu. */ - if (components != NULL || method != NULL) { + if (components != NULL) { gtk_menu_append (GTK_MENU (new_menu), new_gtk_separator ()); } diff --git a/src/nautilus-spatial-window.c b/src/nautilus-spatial-window.c index f39dcc3aa..44a6a7b5c 100644 --- a/src/nautilus-spatial-window.c +++ b/src/nautilus-spatial-window.c @@ -1080,37 +1080,13 @@ view_as_menu_choose_view_callback (GtkWidget *widget, gpointer data) } static void -view_as_menu_vfs_method_callback (GtkWidget *widget, gpointer callback_data) -{ - gpointer object_data; - NautilusWindow *window; - char *new_location; - const char *method; - - g_return_if_fail (GTK_IS_MENU_ITEM (widget)); - - object_data = gtk_object_get_data (GTK_OBJECT (widget), "window"); - g_return_if_fail (NAUTILUS_IS_WINDOW (object_data)); - window = NAUTILUS_WINDOW (object_data); - - method = (const char *) gtk_object_get_data (GTK_OBJECT (widget), "method"); - g_return_if_fail (method != NULL); - - new_location = g_strdup_printf ("%s#%s:/", window->details->location, method); - nautilus_window_go_to (window, new_location); - g_free (new_location); -} - -static void load_view_as_menu_callback (NautilusFile *file, gpointer callback_data) { GList *components; - char *method; GList *p; GtkWidget *new_menu; GtkWidget *menu_item; - char *label; NautilusWindow *window; window = NAUTILUS_WINDOW (callback_data); @@ -1128,38 +1104,8 @@ load_view_as_menu_callback (NautilusFile *file, } gnome_vfs_mime_component_list_free (components); - /* FIXME bugzilla.eazel.com 5086: This feature has not been - * thoroughly tested and we need to finish it or delete it. - */ - /* Add a menu item for each special GNOME-VFS method for this - * URI. This is a questionable user interface, since it's a - * one way trip if you choose one of these view menu items, but - * it's better than nothing. - */ - /* FIXME bugzilla.eazel.com 2466: The name of the following - * function is plural, but it returns only one item. That must - * be fixed. - */ - method = nautilus_mime_get_short_list_methods_for_file (window->details->viewed_file); - if (method != NULL) { - label = g_strdup_printf (_("View as %s"), method); - menu_item = gtk_menu_item_new_with_label (label); - g_free (label); - - gtk_object_set_data (GTK_OBJECT (menu_item), "window", window); - gtk_object_set_data_full (GTK_OBJECT (menu_item), "method", - g_strdup (method), g_free); - gtk_signal_connect (GTK_OBJECT (menu_item), - "activate", - view_as_menu_vfs_method_callback, - NULL); - gtk_widget_show (menu_item); - gtk_menu_append (GTK_MENU (new_menu), menu_item); - g_free (method); - } - /* Add separator before "Other" if there are any other viewers in menu. */ - if (components != NULL || method != NULL) { + if (components != NULL) { gtk_menu_append (GTK_MENU (new_menu), new_gtk_separator ()); } diff --git a/src/nautilus-window.c b/src/nautilus-window.c index f39dcc3aa..44a6a7b5c 100644 --- a/src/nautilus-window.c +++ b/src/nautilus-window.c @@ -1080,37 +1080,13 @@ view_as_menu_choose_view_callback (GtkWidget *widget, gpointer data) } static void -view_as_menu_vfs_method_callback (GtkWidget *widget, gpointer callback_data) -{ - gpointer object_data; - NautilusWindow *window; - char *new_location; - const char *method; - - g_return_if_fail (GTK_IS_MENU_ITEM (widget)); - - object_data = gtk_object_get_data (GTK_OBJECT (widget), "window"); - g_return_if_fail (NAUTILUS_IS_WINDOW (object_data)); - window = NAUTILUS_WINDOW (object_data); - - method = (const char *) gtk_object_get_data (GTK_OBJECT (widget), "method"); - g_return_if_fail (method != NULL); - - new_location = g_strdup_printf ("%s#%s:/", window->details->location, method); - nautilus_window_go_to (window, new_location); - g_free (new_location); -} - -static void load_view_as_menu_callback (NautilusFile *file, gpointer callback_data) { GList *components; - char *method; GList *p; GtkWidget *new_menu; GtkWidget *menu_item; - char *label; NautilusWindow *window; window = NAUTILUS_WINDOW (callback_data); @@ -1128,38 +1104,8 @@ load_view_as_menu_callback (NautilusFile *file, } gnome_vfs_mime_component_list_free (components); - /* FIXME bugzilla.eazel.com 5086: This feature has not been - * thoroughly tested and we need to finish it or delete it. - */ - /* Add a menu item for each special GNOME-VFS method for this - * URI. This is a questionable user interface, since it's a - * one way trip if you choose one of these view menu items, but - * it's better than nothing. - */ - /* FIXME bugzilla.eazel.com 2466: The name of the following - * function is plural, but it returns only one item. That must - * be fixed. - */ - method = nautilus_mime_get_short_list_methods_for_file (window->details->viewed_file); - if (method != NULL) { - label = g_strdup_printf (_("View as %s"), method); - menu_item = gtk_menu_item_new_with_label (label); - g_free (label); - - gtk_object_set_data (GTK_OBJECT (menu_item), "window", window); - gtk_object_set_data_full (GTK_OBJECT (menu_item), "method", - g_strdup (method), g_free); - gtk_signal_connect (GTK_OBJECT (menu_item), - "activate", - view_as_menu_vfs_method_callback, - NULL); - gtk_widget_show (menu_item); - gtk_menu_append (GTK_MENU (new_menu), menu_item); - g_free (method); - } - /* Add separator before "Other" if there are any other viewers in menu. */ - if (components != NULL || method != NULL) { + if (components != NULL) { gtk_menu_append (GTK_MENU (new_menu), new_gtk_separator ()); } |