[gnome-software: 4/10] shell: Use the app name as the main header title
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software: 4/10] shell: Use the app name as the main header title
- Date: Tue, 20 Jul 2021 13:17:13 +0000 (UTC)
commit d6d1a5f8de2b15f9c1735ddd679b65dcb60ffab3
Author: Adrien Plazas <kekun plazas laposte net>
Date: Mon Jun 21 11:35:52 2021 +0200
shell: Use the app name as the main header title
There is no point in having the current main view's name here anymore,
and it makes the code simpler.
src/gs-shell.c | 10 ----------
src/gs-shell.ui | 2 +-
2 files changed, 1 insertion(+), 11 deletions(-)
---
diff --git a/src/gs-shell.c b/src/gs-shell.c
index 264313932..a660d972c 100644
--- a/src/gs-shell.c
+++ b/src/gs-shell.c
@@ -79,7 +79,6 @@ struct _GsShell
GtkStack *stack_sub;
GsPage *page;
- GBinding *main_header_title_binding;
GBinding *application_details_header_binding;
GBinding *sub_page_header_title_binding;
@@ -489,9 +488,6 @@ stack_notify_visible_child_cb (GObject *object,
update_header_widgets (shell);
- /* set the window title back to default */
- gtk_window_set_title (GTK_WINDOW (shell), g_get_application_name ());
-
/* do action for mode */
page = shell->pages[mode];
@@ -533,11 +529,6 @@ stack_notify_visible_child_cb (GObject *object,
break;
}
- g_clear_object (&shell->main_header_title_binding);
- shell->main_header_title_binding = g_object_bind_property (gtk_stack_get_visible_child
(shell->stack_main), "title",
- shell->main_header, "title",
- G_BINDING_SYNC_CREATE);
-
g_clear_object (&shell->application_details_header_binding);
shell->application_details_header_binding = g_object_bind_property (gtk_stack_get_visible_child
(shell->stack_sub), "title",
shell->application_details_header, "label",
@@ -2401,7 +2392,6 @@ gs_shell_dispose (GObject *object)
{
GsShell *shell = GS_SHELL (object);
- g_clear_object (&shell->main_header_title_binding);
g_clear_object (&shell->application_details_header_binding);
g_clear_object (&shell->sub_page_header_title_binding);
diff --git a/src/gs-shell.ui b/src/gs-shell.ui
index 55a42028d..ae6fbc030 100644
--- a/src/gs-shell.ui
+++ b/src/gs-shell.ui
@@ -117,7 +117,7 @@
<object class="HdyViewSwitcherTitle" id="title_switcher">
<property name="visible">True</property>
<property name="stack">stack_main</property>
- <property name="title" bind-source="main_header" bind-property="title"
bind-flags="sync-create"/>
+ <property name="title" bind-source="GsShell" bind-property="title"
bind-flags="sync-create"/>
</object>
</child>
</object>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]