[gnome-initial-setup] page: fix logic to propagate small-screen property from driver
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-initial-setup] page: fix logic to propagate small-screen property from driver
- Date: Fri, 10 Nov 2017 19:40:00 +0000 (UTC)
commit b3223e614eb2542716948cd1657d4e3e272d30c2
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Fri Jun 30 08:45:26 2017 +0700
page: fix logic to propagate small-screen property from driver
Since the driver is only set later to the page, and the initial value is
FALSE, the actual value was never propagated down when the driver was
set.
This is relevant when the property is connected through a GBinding
coming from the UI file, since the property binding is evaluated at
init() time when property values are not yet available.
https://bugzilla.gnome.org/show_bug.cgi?id=785593
gnome-initial-setup/gis-page.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/gnome-initial-setup/gis-page.c b/gnome-initial-setup/gis-page.c
index 9427f71..e28f573 100644
--- a/gnome-initial-setup/gis-page.c
+++ b/gnome-initial-setup/gis-page.c
@@ -99,7 +99,7 @@ gis_page_get_property (GObject *object,
}
static void
-small_screen_changed (GObject *driver, GParamSpec *pspec, GisPage *page)
+small_screen_changed (GisPage *page)
{
g_object_notify_by_pspec (G_OBJECT (page), obj_props[PROP_SMALL_SCREEN]);
}
@@ -116,8 +116,9 @@ gis_page_set_property (GObject *object,
{
case PROP_DRIVER:
page->driver = g_value_dup_object (value);
- g_signal_connect (page->driver, "notify::small-screen",
- G_CALLBACK (small_screen_changed), page);
+ g_signal_connect_swapped (page->driver, "notify::small-screen",
+ G_CALLBACK (small_screen_changed), page);
+ small_screen_changed (page);
break;
case PROP_TITLE:
gis_page_set_title (page, (char *) g_value_get_string (value));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]