diff options
author | Andy Hertzfeld <andy@src.gnome.org> | 2001-02-07 06:13:48 +0000 |
---|---|---|
committer | Andy Hertzfeld <andy@src.gnome.org> | 2001-02-07 06:13:48 +0000 |
commit | a37f637893263dcbf4b08827e2b34d5ba433efba (patch) | |
tree | f4f703f988cf9a7fdcd1e4136c52bd28eaea23e7 | |
parent | 6c3b990fb11310e521e593210ad0bf75124d27c0 (diff) | |
download | nautilus-a37f637893263dcbf4b08827e2b34d5ba433efba.tar.gz |
fixed bug 5479, two "View as Text" items in "View as Other" dialog list,
* libnautilus-extensions/nautilus-mime-actions.c:
(nautilus_do_component_query):
fixed bug 5479, two "View as Text" items in "View as Other"
dialog list, by special casing the sample text component so
it doesn't get added to the list.
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | libnautilus-extensions/nautilus-mime-actions.c | 11 | ||||
-rw-r--r-- | libnautilus-private/nautilus-mime-actions.c | 11 |
3 files changed, 24 insertions, 6 deletions
@@ -1,3 +1,11 @@ +2001-02-06 Andy Hertzfeld <andy@eazel.com> + + * libnautilus-extensions/nautilus-mime-actions.c: + (nautilus_do_component_query): + fixed bug 5479, two "View as Text" items in "View as Other" + dialog list, by special casing the sample text component so + it doesn't get added to the list. + 2001-02-06 Arik Devens <arik@eazel.com> reviewed by: Eskil Heyn Olsen <eskil@eazel.com> diff --git a/libnautilus-extensions/nautilus-mime-actions.c b/libnautilus-extensions/nautilus-mime-actions.c index 79a97deea..ccd23ab47 100644 --- a/libnautilus-extensions/nautilus-mime-actions.c +++ b/libnautilus-extensions/nautilus-mime-actions.c @@ -1562,9 +1562,14 @@ nautilus_do_component_query (const char *mime_type, if (ignore_content_mime_types || server_matches_content_requirements (server, content_types, explicit_iids)) { - retval = g_list_append - (retval, - OAF_ServerInfo_duplicate (server)); + /* Hack to suppress the Bonobo_Sample_Text component, since the Nautilus text + * view is a superset and it's confusing for the user to be presented with both + */ + if (server->iid != NULL && strcmp (server->iid, "OAFIID:Bonobo_Sample_Text") != 0) { + retval = g_list_append + (retval, + OAF_ServerInfo_duplicate (server)); + } } } diff --git a/libnautilus-private/nautilus-mime-actions.c b/libnautilus-private/nautilus-mime-actions.c index 79a97deea..ccd23ab47 100644 --- a/libnautilus-private/nautilus-mime-actions.c +++ b/libnautilus-private/nautilus-mime-actions.c @@ -1562,9 +1562,14 @@ nautilus_do_component_query (const char *mime_type, if (ignore_content_mime_types || server_matches_content_requirements (server, content_types, explicit_iids)) { - retval = g_list_append - (retval, - OAF_ServerInfo_duplicate (server)); + /* Hack to suppress the Bonobo_Sample_Text component, since the Nautilus text + * view is a superset and it's confusing for the user to be presented with both + */ + if (server->iid != NULL && strcmp (server->iid, "OAFIID:Bonobo_Sample_Text") != 0) { + retval = g_list_append + (retval, + OAF_ServerInfo_duplicate (server)); + } } } |