[gnome-panel] panel-action-button: remove search button
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-panel] panel-action-button: remove search button
- Date: Thu, 9 Apr 2020 16:44:49 +0000 (UTC)
commit 1d81295ffd13f64d2a50c3f4fdd5649c6c4c940f
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Thu Apr 9 19:11:28 2020 +0300
panel-action-button: remove search button
gnome-search-tool is unmaintained project that has been already
archived and is removed from Debian, Ubuntu and most likely from
other distributions.
https://gitlab.gnome.org/Infrastructure/Infrastructure/-/issues/41
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=885975
gnome-panel/libpanel-util/panel-launch.c | 54 --------------------------------
gnome-panel/libpanel-util/panel-launch.h | 5 ---
gnome-panel/panel-action-button.c | 22 -------------
gnome-panel/panel-enums.h | 1 -
gnome-panel/panel-icon-names.h | 1 -
5 files changed, 83 deletions(-)
---
diff --git a/gnome-panel/libpanel-util/panel-launch.c b/gnome-panel/libpanel-util/panel-launch.c
index 9b72a9e05..44ebfdef1 100644
--- a/gnome-panel/libpanel-util/panel-launch.c
+++ b/gnome-panel/libpanel-util/panel-launch.c
@@ -197,57 +197,3 @@ panel_launch_desktop_file (const char *desktop_file,
return retval;
}
-
-/*
- * Set the DISPLAY variable, to be use by g_spawn_async.
- */
-static void
-set_environment (gpointer user_data)
-{
- GdkDisplay *display;
-
- display = gdk_display_get_default ();
-
- g_setenv ("DISPLAY", gdk_display_get_name (display), TRUE);
-}
-
-gboolean
-panel_launch_desktop_file_with_fallback (const char *desktop_file,
- const char *fallback_exec,
- GdkScreen *screen,
- GError **error)
-{
- char *argv[2] = { (char *) fallback_exec, NULL };
- GError *local_error;
- GPid pid;
-
- g_return_val_if_fail (desktop_file != NULL, FALSE);
- g_return_val_if_fail (fallback_exec != NULL, FALSE);
- g_return_val_if_fail (GDK_IS_SCREEN (screen), FALSE);
- g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
-
- /* need to pass a non-NULL error to avoid getting a dialog */
- local_error = NULL;
- if (panel_launch_desktop_file (desktop_file, screen, &local_error))
- return TRUE;
-
- if (local_error) {
- g_error_free (local_error);
- local_error = NULL;
- }
-
- g_spawn_async (NULL, /* working directory */
- argv,
- NULL, /* envp */
- G_SPAWN_SEARCH_PATH | G_SPAWN_DO_NOT_REAP_CHILD,
- set_environment,
- NULL,
- &pid,
- &local_error);
- if (local_error == NULL) {
- g_child_watch_add (pid, dummy_child_watch, NULL);
- }
-
- return _panel_launch_handle_error (fallback_exec,
- screen, local_error, error);
-}
diff --git a/gnome-panel/libpanel-util/panel-launch.h b/gnome-panel/libpanel-util/panel-launch.h
index 946605d3e..b2c5a4bd3 100644
--- a/gnome-panel/libpanel-util/panel-launch.h
+++ b/gnome-panel/libpanel-util/panel-launch.h
@@ -43,11 +43,6 @@ gboolean panel_launch_desktop_file (const char *desktop_file,
GdkScreen *screen,
GError **error);
-gboolean panel_launch_desktop_file_with_fallback (const char *desktop_file,
- const char *fallback_exec,
- GdkScreen *screen,
- GError **error);
-
G_END_DECLS
#endif /* PANEL_LAUNCH_H */
diff --git a/gnome-panel/panel-action-button.c b/gnome-panel/panel-action-button.c
index 40bf2a571..f52aadb1c 100644
--- a/gnome-panel/panel-action-button.c
+++ b/gnome-panel/panel-action-button.c
@@ -73,7 +73,6 @@ static PanelEnumStringPair panel_action_type_map [] = {
{ PANEL_ACTION_LOCK, "lock" },
{ PANEL_ACTION_LOGOUT, "logout" },
{ PANEL_ACTION_RUN, "run" },
- { PANEL_ACTION_SEARCH, "search" },
{ PANEL_ACTION_FORCE_QUIT, "force-quit" },
{ PANEL_ACTION_HIBERNATE, "hibernate" },
{ PANEL_ACTION_SUSPEND, "suspend" },
@@ -305,19 +304,6 @@ panel_action_run_program (GtkWidget *widget)
gtk_get_current_event_time ());
}
-/* Search For Files
- */
-static void
-panel_action_search (GtkWidget *widget)
-{
- GdkScreen *screen;
-
- screen = gtk_widget_get_screen (widget);
- panel_launch_desktop_file_with_fallback ("gnome-search-tool.desktop",
- "gnome-search-tool",
- screen, NULL);
-}
-
/* Force Quit
*/
static void
@@ -380,14 +366,6 @@ static PanelAction actions [] = {
panel_action_run_program, NULL, NULL,
panel_lockdown_get_disable_command_line_s
},
- {
- PANEL_ACTION_SEARCH,
- PANEL_ICON_SEARCHTOOL,
- N_("Search for Files..."),
- N_("Locate documents and folders on this computer by name or content"),
- "ACTION:search:NEW",
- panel_action_search, NULL, NULL, NULL
- },
{
PANEL_ACTION_FORCE_QUIT,
PANEL_ICON_FORCE_QUIT,
diff --git a/gnome-panel/panel-enums.h b/gnome-panel/panel-enums.h
index dece5ff87..d1e920313 100644
--- a/gnome-panel/panel-enums.h
+++ b/gnome-panel/panel-enums.h
@@ -42,7 +42,6 @@ typedef enum {
PANEL_ACTION_LOCK,
PANEL_ACTION_LOGOUT,
PANEL_ACTION_RUN,
- PANEL_ACTION_SEARCH,
PANEL_ACTION_FORCE_QUIT,
PANEL_ACTION_HIBERNATE,
PANEL_ACTION_SUSPEND,
diff --git a/gnome-panel/panel-icon-names.h b/gnome-panel/panel-icon-names.h
index 492d441de..8080ce89d 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_SEARCHTOOL "system-search"
#define PANEL_ICON_SHUTDOWN "system-shutdown"
#define PANEL_ICON_SUSPEND "gnome-panel-suspend"
#define PANEL_ICON_THEME "preferences-desktop-theme"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]