From 52469cec7ca7af0d50a74bda09c9f41f31415e25 Mon Sep 17 00:00:00 2001 From: Georges Basile Stavracas Neto Date: Mon, 28 May 2018 22:07:49 -0300 Subject: [PATCH] window: Remove remaining overview mentions There is no overview anymore -- Settings is always visualizing a panel at any given time. I just noticed that the Alt+Left shortcut was always broken too. This will be fixed in a following commit. --- shell/cc-application.c | 5 --- shell/cc-window.c | 37 +++-------------------- shell/cc-window.h | 2 -- shell/completions/gnome-control-center.in | 7 ++--- shell/help-overlay.ui | 2 +- shell/window.ui | 1 - 6 files changed, 7 insertions(+), 47 deletions(-) diff --git a/shell/cc-application.c b/shell/cc-application.c index 3f828f3a6..862baab9e 100644 --- a/shell/cc-application.c +++ b/shell/cc-application.c @@ -59,7 +59,6 @@ G_DEFINE_TYPE (CcApplication, cc_application, GTK_TYPE_APPLICATION) const GOptionEntry all_options[] = { { "version", 0, 0, G_OPTION_ARG_NONE, NULL, N_("Display version number"), NULL }, { "verbose", 'v', 0, G_OPTION_ARG_NONE, NULL, N_("Enable verbose mode"), NULL }, - { "overview", 'o', 0, G_OPTION_ARG_NONE, NULL, N_("Show the overview"), NULL }, { "search", 's', 0, G_OPTION_ARG_STRING, NULL, N_("Search for the string"), "SEARCH" }, { "list", 'l', 0, G_OPTION_ARG_NONE, NULL, N_("List possible panel names and exit"), NULL }, { G_OPTION_REMAINING, '\0', 0, G_OPTION_ARG_FILENAME_ARRAY, NULL, N_("Panel to display"), N_("[PANEL] [ARGUMENT…]") }, @@ -168,10 +167,6 @@ cc_application_command_line (GApplication *application, { cc_window_set_search_item (self->window, search_str); } - else if (g_variant_dict_contains (options, "overview")) - { - cc_window_set_overview_page (self->window); - } else if (g_variant_dict_lookup (options, G_OPTION_REMAINING, "^a&ay", &start_panels)) { const char *start_id; diff --git a/shell/cc-window.c b/shell/cc-window.c index 50d3995d7..1199f8fa0 100644 --- a/shell/cc-window.c +++ b/shell/cc-window.c @@ -248,14 +248,6 @@ add_current_panel_to_history (CcShell *shell, g_debug ("Added '%s' to the previous panels", self->current_panel_id); } -static void -shell_show_overview_page (CcWindow *self) -{ - /* TODO: need design input on a possibly new overview page. For now, - * just go back to the main section of the panel list. */ - cc_panel_list_set_view (CC_PANEL_LIST (self->panel_list), CC_PANEL_LIST_MAIN); -} - static void update_list_title (CcWindow *self) { @@ -428,8 +420,6 @@ set_active_panel (CcWindow *shell, /* set the new panel */ if (panel) shell->active_panel = g_object_ref (panel); - else - shell_show_overview_page (shell); g_object_notify (G_OBJECT (shell), "active-panel"); } @@ -441,10 +431,10 @@ show_panel_cb (CcPanelList *panel_list, const gchar *panel_id, CcWindow *self) { - if (panel_id) - set_active_panel_from_id (CC_SHELL (self), panel_id, NULL, NULL); - else - shell_show_overview_page (self); + if (!panel_id) + return; + + set_active_panel_from_id (CC_SHELL (self), panel_id, NULL, NULL); } static void @@ -519,17 +509,6 @@ window_map_event_cb (GtkWidget *widget, return GDK_EVENT_PROPAGATE; } -static gboolean -window_button_release_event_cb (GtkWidget *win, - GdkEventButton *event, - CcWindow *self) -{ - /* back button */ - if (event->button == MOUSE_BACK_BUTTON) - shell_show_overview_page (self); - return FALSE; -} - static gboolean window_key_press_event_cb (GtkWidget *win, GdkEventKey *event, @@ -789,7 +768,6 @@ cc_window_class_init (CcWindowClass *klass) gtk_widget_class_bind_template_callback (widget_class, search_entry_activate_cb); gtk_widget_class_bind_template_callback (widget_class, show_panel_cb); gtk_widget_class_bind_template_callback (widget_class, update_list_title); - gtk_widget_class_bind_template_callback (widget_class, window_button_release_event_cb); gtk_widget_class_bind_template_callback (widget_class, window_key_press_event_cb); gtk_widget_class_bind_template_callback (widget_class, window_map_event_cb); @@ -851,17 +829,10 @@ cc_window_new (GtkApplication *application) NULL); } -void -cc_window_set_overview_page (CcWindow *center) -{ - shell_show_overview_page (center); -} - void cc_window_set_search_item (CcWindow *center, const char *search) { - shell_show_overview_page (center); gtk_search_bar_set_search_mode (GTK_SEARCH_BAR (center->search_bar), TRUE); gtk_entry_set_text (GTK_ENTRY (center->search_entry), search); gtk_editable_set_position (GTK_EDITABLE (center->search_entry), -1); diff --git a/shell/cc-window.h b/shell/cc-window.h index cac270944..a6ec98e46 100644 --- a/shell/cc-window.h +++ b/shell/cc-window.h @@ -32,8 +32,6 @@ G_DECLARE_FINAL_TYPE (CcWindow, cc_window, CC, WINDOW, GtkApplicationWindow) CcWindow *cc_window_new (GtkApplication *application); -void cc_window_set_overview_page (CcWindow *center); - void cc_window_set_search_item (CcWindow *center, const char *search); diff --git a/shell/completions/gnome-control-center.in b/shell/completions/gnome-control-center.in index cc1e2a42d..51ce4fda7 100644 --- a/shell/completions/gnome-control-center.in +++ b/shell/completions/gnome-control-center.in @@ -8,18 +8,15 @@ _gnome_control_center() prev=${COMP_WORDS[COMP_CWORD-1]} case "$prev" in - -o|--overview) - command_list="" - ;; *) if [ $prev = "gnome-control-center" ] ; then - command_list="--overview --verbose --version" + command_list="--verbose --version" command_list="$command_list @PANELS@" elif [ $prev = "--verbose" ]; then command_list="@PANELS@" fi - for i in --overview --version @PANELS@; do + for i in --version @PANELS@; do if [ $i = $prev ]; then case $i in keyboard) diff --git a/shell/help-overlay.ui b/shell/help-overlay.ui index 1e4ad5427..02cb67932 100644 --- a/shell/help-overlay.ui +++ b/shell/help-overlay.ui @@ -37,7 +37,7 @@ 1 <Alt>Left - Go back to the overview + Go back to previous panel diff --git a/shell/window.ui b/shell/window.ui index c34ce60bc..eca04a977 100644 --- a/shell/window.ui +++ b/shell/window.ui @@ -9,7 +9,6 @@ - True