After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 785593 - page: fix logic to propagate small-screen property from driver
page: fix logic to propagate small-screen property from driver
Status: RESOLVED FIXED
Product: gnome-initial-setup
Classification: Applications
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: GNOME Initial Setup maintainer(s)
GNOME Initial Setup maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2017-07-30 16:07 UTC by Cosimo Cecchi
Modified: 2017-11-10 19:41 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
page: fix logic to propagate small-screen property from driver (1.56 KB, patch)
2017-07-30 16:07 UTC, Cosimo Cecchi
committed Details | Review

Description Cosimo Cecchi 2017-07-30 16:07:07 UTC
See attached patch.
Comment 1 Cosimo Cecchi 2017-07-30 16:07:10 UTC
Created attachment 356600 [details] [review]
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.

https://phabricator.endlessm.com/T17889
Comment 2 Cosimo Cecchi 2017-11-09 00:06:25 UTC
Any comments on this patch?
Comment 3 Rui Matos 2017-11-09 17:44:17 UTC
Review of attachment 356600 [details] [review]:

::: gnome-initial-setup/gis-page.c
@@ +119,3 @@
+      g_signal_connect_swapped (page->driver, "notify::small-screen",
+                                G_CALLBACK (small_screen_changed), page);
+      small_screen_changed (page);

this should cause no harm at least, but I fail to see where this may cause any issues since by the time a page instance is constructed the driver property will be set and the "real" small-screen value should be available.
Comment 4 Cosimo Cecchi 2017-11-09 17:50:45 UTC
Review of attachment 356600 [details] [review]:

::: gnome-initial-setup/gis-page.c
@@ +119,3 @@
+      g_signal_connect_swapped (page->driver, "notify::small-screen",
+                                G_CALLBACK (small_screen_changed), page);
+      small_screen_changed (page);

It will be set later, but things that depend on the small screen property (such as icons that get that value updated through a GBinding) won't get the property updated, hardcoding it to FALSE.
Comment 5 Rui Matos 2017-11-09 17:55:47 UTC
Review of attachment 356600 [details] [review]:

::: gnome-initial-setup/gis-page.c
@@ +119,3 @@
+      g_signal_connect_swapped (page->driver, "notify::small-screen",
+                                G_CALLBACK (small_screen_changed), page);
+      small_screen_changed (page);

oh I see, because they connect through a GBinding that's created at _init() time via gtk_widget_init_template() and properties are only available afterwards. ok, can you add this bit to the commit message? thanks
Comment 6 Cosimo Cecchi 2017-11-10 19:41:15 UTC
Attachment 356600 [details] pushed as b3223e6 - page: fix logic to propagate small-screen property from driver

Thanks, pushed to master.