diff options
author | John Sullivan <sullivan@src.gnome.org> | 2000-06-06 20:49:07 +0000 |
---|---|---|
committer | John Sullivan <sullivan@src.gnome.org> | 2000-06-06 20:49:07 +0000 |
commit | 0b49bb86ebd459160995bbac9f922d54248f9f82 (patch) | |
tree | 94bd967799b2f8bbbeb2437aeab50d544fc3f344 /src/nautilus-object-window.c | |
parent | 78132c914670207d46eefa53abe2b46592c04ebe (diff) | |
download | nautilus-0b49bb86ebd459160995bbac9f922d54248f9f82.tar.gz |
Fixed bug 1219 (saved viewer not used if not in preferred list)
* libnautilus-extensions/nautilus-metadata.h:
Removed NAUTILUS_METADATA_KEY_INITIAL_VIEW 'cuz it's not needed
anymore.
* libnautilus-extensions/nautilus-mime-actions.h:
* libnautilus-extensions/nautilus-mime-actions.c:
(nautilus_mime_get_default_component_for_uri_internal):
New private function, returns both the default component
and whether it was user-chosen (as opposed to just inherited
from the value for this MIME type).
(nautilus_mime_get_default_component_for_uri): Now calls
this new function. Also fixed a bug where it was using a
different metadata string than _set_default_, and thus
never retrieving the stored value.
(nautilus_mime_is_default_component_for_uri_user_chosen):
New public function, reports whether the default component
was chosen by the user or just inherited.
* src/nautilus-window.c: (nautilus_window_switch_views):
Call nautilus_mime_set_default_component_for_uri when the
user explicitly chooses a view, rather than setting the
now-obsolete "INITIAL_VIEW" metadata.
* src/nautilus-applicable-views.c:
(got_file_info_callback): Rename "fallback_id" to "default_id"
and eliminate code that adds default component to menu here.
The current view is always added to the menu in a special way
if required later.
(set_initial_content_id): Don't get remembered value, instead
use nautilus_mime_is_default_component_for_uri_user_chosen to
choose priority between default component and referring component.
And don't require that the initial component is in the preferred
list.
Diffstat (limited to 'src/nautilus-object-window.c')
-rw-r--r-- | src/nautilus-object-window.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/nautilus-object-window.c b/src/nautilus-object-window.c index 1b54db3b2..d30006598 100644 --- a/src/nautilus-object-window.c +++ b/src/nautilus-object-window.c @@ -48,6 +48,7 @@ #include <libnautilus-extensions/nautilus-gtk-extensions.h> #include <libnautilus-extensions/nautilus-icon-factory.h> #include <libnautilus-extensions/nautilus-metadata.h> +#include <libnautilus-extensions/nautilus-mime-actions.h> #include <libnautilus-extensions/nautilus-program-choosing.h> #include <libnautilus-extensions/nautilus-string.h> #include <libnautilus-extensions/nautilus-mini-icon.h> @@ -676,10 +677,8 @@ nautilus_window_switch_views (NautilusWindow *window, NautilusViewIdentifier *id directory = nautilus_directory_get (window->ni->requested_uri); g_assert (directory != NULL); - nautilus_directory_set_metadata (directory, - NAUTILUS_METADATA_KEY_INITIAL_VIEW, - NULL, - id->iid); + nautilus_mime_set_default_component_for_uri (window->ni->requested_uri, + id->iid); nautilus_directory_unref (directory); nautilus_window_allow_stop (window, TRUE); |