[gnome-software: 1/2] shell: Bind the details page's title with its header
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software: 1/2] shell: Bind the details page's title with its header
- Date: Tue, 20 Jul 2021 14:49:31 +0000 (UTC)
commit 6c41ebf3397d285de1fd9a5a7d83b143f87715e6
Author: Adrien Plazas <kekun plazas laposte net>
Date: Tue Jul 20 15:53:58 2021 +0200
shell: Bind the details page's title with its header
Fixes https://gitlab.gnome.org/GNOME/gnome-software/-/issues/1286.
src/gs-shell.c | 9 ---------
src/gs-shell.ui | 11 +----------
2 files changed, 1 insertion(+), 19 deletions(-)
---
diff --git a/src/gs-shell.c b/src/gs-shell.c
index cf228c137..0a4205e2f 100644
--- a/src/gs-shell.c
+++ b/src/gs-shell.c
@@ -79,7 +79,6 @@ struct _GsShell
GtkStack *stack_sub;
GsPage *page;
- GBinding *application_details_header_binding;
GBinding *sub_page_header_title_binding;
#ifdef HAVE_MOGWAI
@@ -104,7 +103,6 @@ struct _GsShell
GtkWidget *button_events_dismiss;
GtkWidget *label_events;
GtkWidget *primary_menu;
- GtkWidget *application_details_header;
GtkWidget *sub_page_header_title;
gboolean is_narrow;
@@ -529,11 +527,6 @@ stack_notify_visible_child_cb (GObject *object,
break;
}
- 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",
- G_BINDING_SYNC_CREATE);
-
g_clear_object (&shell->sub_page_header_title_binding);
shell->sub_page_header_title_binding = g_object_bind_property (gtk_stack_get_visible_child
(shell->stack_sub), "title",
shell->sub_page_header_title, "label",
@@ -2392,7 +2385,6 @@ gs_shell_dispose (GObject *object)
{
GsShell *shell = GS_SHELL (object);
- g_clear_object (&shell->application_details_header_binding);
g_clear_object (&shell->sub_page_header_title_binding);
if (shell->back_entry_stack != NULL) {
@@ -2520,7 +2512,6 @@ gs_shell_class_init (GsShellClass *klass)
gtk_widget_class_bind_template_child (widget_class, GsShell, button_events_dismiss);
gtk_widget_class_bind_template_child (widget_class, GsShell, label_events);
gtk_widget_class_bind_template_child (widget_class, GsShell, primary_menu);
- gtk_widget_class_bind_template_child (widget_class, GsShell, application_details_header);
gtk_widget_class_bind_template_child (widget_class, GsShell, sub_page_header_title);
gtk_widget_class_bind_template_child_full (widget_class, "overview_page", FALSE, G_STRUCT_OFFSET
(GsShell, pages[GS_SHELL_MODE_OVERVIEW]));
diff --git a/src/gs-shell.ui b/src/gs-shell.ui
index c1199fcfc..1dd8d03a2 100644
--- a/src/gs-shell.ui
+++ b/src/gs-shell.ui
@@ -450,6 +450,7 @@
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="show-close-button">True</property>
+ <property name="title" bind-source="details_page" bind-property="title"
bind-flags="sync-create"/>
<child>
<object class="GtkButton">
<property name="visible">True</property>
@@ -472,16 +473,6 @@
</child>
</object>
</child>
- <child type="title">
- <object class="GtkLabel" id="application_details_header">
- <property name="visible">True</property>
- <property name="selectable">False</property>
- <property name="ellipsize">end</property>
- <style>
- <class name="title"/>
- </style>
- </object>
- </child>
</object>
</child>
<child>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]