[gnome-software: 1/5] shell: Show the search button only in the right modes
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software: 1/5] shell: Show the search button only in the right modes
- Date: Fri, 6 Aug 2021 16:54:56 +0000 (UTC)
commit d00bee7be0ce90e09a5ce0be7e082b77dbf5e45d
Author: Adrien Plazas <kekun plazas laposte net>
Date: Thu Aug 5 13:07:51 2021 +0200
shell: Show the search button only in the right modes
src/gs-shell.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
---
diff --git a/src/gs-shell.c b/src/gs-shell.c
index 00e8ecefa..cf6d7097b 100644
--- a/src/gs-shell.c
+++ b/src/gs-shell.c
@@ -500,6 +500,21 @@ stack_notify_visible_child_cb (GObject *object,
gs_page_switch_to (page);
/* update header bar widgets */
+ switch (mode) {
+ case GS_SHELL_MODE_OVERVIEW:
+ case GS_SHELL_MODE_INSTALLED:
+ case GS_SHELL_MODE_SEARCH:
+ gtk_widget_show (shell->search_button);
+ break;
+ case GS_SHELL_MODE_UPDATES:
+ gtk_widget_hide (shell->search_button);
+ break;
+ default:
+ /* We don't care about changing the visibility of the search
+ * button in modes appearing in sub-pages. */
+ break;
+ }
+
widget = gs_page_get_header_start_widget (page);
switch (mode) {
case GS_SHELL_MODE_OVERVIEW:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]