[gnome-panel] remove x-nautilus-search uri handling
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-panel] remove x-nautilus-search uri handling
- Date: Sun, 4 Feb 2018 18:34:26 +0000 (UTC)
commit 243d8098378fb7968d7a38b6929e6ce0e5cba3b5
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Sun Feb 4 20:03:50 2018 +0200
remove x-nautilus-search uri handling
Nautilus does not support saved searches anymore:
https://gitlab.gnome.org/GNOME/nautilus/issues/234
gnome-panel/libpanel-util/panel-show.c | 34 --------------------------------
gnome-panel/panel-icon-names.h | 1 -
gnome-panel/panel-menu-items.c | 4 ---
gnome-panel/panel-util.c | 8 -------
4 files changed, 0 insertions(+), 47 deletions(-)
---
diff --git a/gnome-panel/libpanel-util/panel-show.c b/gnome-panel/libpanel-util/panel-show.c
index 80b7c2a..02c28b7 100644
--- a/gnome-panel/libpanel-util/panel-show.c
+++ b/gnome-panel/libpanel-util/panel-show.c
@@ -143,35 +143,6 @@ _panel_show_handle_error (const gchar *uri,
return FALSE;
}
-static gboolean
-panel_show_nautilus_search_uri (GdkScreen *screen,
- const gchar *uri,
- guint32 timestamp,
- GError **error)
-{
- char *desktopfile;
- GDesktopAppInfo *appinfo = NULL;
- gboolean ret;
-
- desktopfile = panel_g_lookup_in_applications_dirs ("nautilus-folder-handler.desktop");
- if (desktopfile) {
- appinfo = g_desktop_app_info_new_from_filename (desktopfile);
- g_free (desktopfile);
- }
-
- if (!appinfo) {
- _panel_show_error_dialog (uri, screen,
- _("No application to handle search folders is installed."));
- return FALSE;
- }
-
- ret = panel_app_info_launch_uri ((GAppInfo *) appinfo,
- uri, screen, timestamp, error);
- g_object_unref (appinfo);
-
- return ret;
-}
-
gboolean
panel_show_uri (GdkScreen *screen,
const gchar *uri,
@@ -184,11 +155,6 @@ panel_show_uri (GdkScreen *screen,
g_return_val_if_fail (uri != NULL, FALSE);
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
- if (g_str_has_prefix (uri, "x-nautilus-search:")) {
- return panel_show_nautilus_search_uri (screen, uri,
- timestamp, error);
- }
-
gtk_show_uri (screen, uri, timestamp, &local_error);
return _panel_show_handle_error (uri, screen, local_error, error);
diff --git a/gnome-panel/panel-icon-names.h b/gnome-panel/panel-icon-names.h
index a07a180..492d441 100644
--- a/gnome-panel/panel-icon-names.h
+++ b/gnome-panel/panel-icon-names.h
@@ -30,7 +30,6 @@
#define PANEL_ICON_REMOTE "applications-internet"
#define PANEL_ICON_REMOVABLE_MEDIA "drive-removable-media"
#define PANEL_ICON_RUN "system-run"
-#define PANEL_ICON_SAVED_SEARCH "folder-saved-search"
#define PANEL_ICON_SEARCHTOOL "system-search"
#define PANEL_ICON_SHUTDOWN "system-shutdown"
#define PANEL_ICON_SUSPEND "gnome-panel-suspend"
diff --git a/gnome-panel/panel-menu-items.c b/gnome-panel/panel-menu-items.c
index 1a6b502..3901736 100644
--- a/gnome-panel/panel-menu-items.c
+++ b/gnome-panel/panel-menu-items.c
@@ -453,9 +453,6 @@ panel_place_menu_item_append_gtk_bookmarks (GtkWidget *menu)
keep = FALSE;
- if (g_str_has_prefix (line, "x-nautilus-search:"))
- keep = TRUE;
-
if (!keep) {
file = g_file_new_for_uri (line);
keep = !g_file_is_native (file) ||
@@ -547,7 +544,6 @@ panel_place_menu_item_append_gtk_bookmarks (GtkWidget *menu)
gicon = g_themed_icon_new_with_default_fallbacks (icon);
- //FIXME: drag and drop will be broken for x-nautilus-search uris
menu_item = panel_menu_item_uri_new (bookmark->full_uri,
icon, gicon,
label,
diff --git a/gnome-panel/panel-util.c b/gnome-panel/panel-util.c
index c8076c4..3642777 100644
--- a/gnome-panel/panel-util.c
+++ b/gnome-panel/panel-util.c
@@ -896,7 +896,6 @@ panel_util_get_label_for_uri (const char *text_uri)
char *root_display;
/* Here's what we do:
- * + x-nautilus-search: URI
* + check if the URI is a mount
* + if file: URI:
* - check for known file: URI
@@ -910,10 +909,6 @@ panel_util_get_label_for_uri (const char *text_uri)
label = NULL;
- //FIXME: see nautilus_query_to_readable_string() to have a nice name
- if (g_str_has_prefix (text_uri, "x-nautilus-search:"))
- return g_strdup (_("Search"));
-
file = g_file_new_for_uri (text_uri);
label = panel_util_get_file_display_name_if_mount (file);
@@ -984,7 +979,6 @@ panel_util_get_icon_for_uri (const char *text_uri)
/* Here's what we do:
* + check for known file: URI
- * + x-nautilus-search: URI
* + override burn: URI icon
* + check if the URI is a mount
* + override trash: URI icon for subfolders
@@ -998,8 +992,6 @@ panel_util_get_icon_for_uri (const char *text_uri)
if (icon)
return g_strdup (icon);
- if (g_str_has_prefix (text_uri, "x-nautilus-search:"))
- return g_strdup (PANEL_ICON_SAVED_SEARCH);
/* gvfs doesn't give us a nice icon, so overriding */
if (g_str_has_prefix (text_uri, "burn:"))
return g_strdup (PANEL_ICON_BURNER);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]