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 693506 - background: use GtkFlowBox for background picker
background: use GtkFlowBox for background picker
Status: RESOLVED OBSOLETE
Product: gnome-control-center
Classification: Core
Component: Background
unspecified
Other All
: Normal normal
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
3.10
Depends on:
Blocks:
 
 
Reported: 2013-02-10 00:59 UTC by William Jon McCann
Modified: 2021-06-09 16:10 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
background: use EggFlowBox for background picker (12.69 KB, patch)
2013-02-10 01:01 UTC, William Jon McCann
needs-work Details | Review
background: set the adjustment on the flow box (1.59 KB, patch)
2013-02-10 15:18 UTC, William Jon McCann
needs-work Details | Review
background: Use GtkFlowBox for background picker (13.52 KB, patch)
2014-08-17 08:30 UTC, Debarshi Ray
needs-work Details | Review

Description William Jon McCann 2013-02-10 00:59:41 UTC
This switches the background selector from icon view to the flow box.
Comment 1 William Jon McCann 2013-02-10 01:01:35 UTC
Created attachment 235608 [details] [review]
background: use EggFlowBox for background picker
Comment 2 William Jon McCann 2013-02-10 15:18:09 UTC
Created attachment 235622 [details] [review]
background: set the adjustment on the flow box
Comment 3 Bastien Nocera 2013-02-11 13:15:04 UTC
Review of attachment 235608 [details] [review]:

I have 13 items in my ~/Pictures folder, and 12 in the Wallpapers section. When I scroll at the bottom of the Wallpapers section, and then switch to the Pictures section, the scrollbar isn't reset to the top, and the last item in the list (the 13th) isn't accessible.

::: configure.ac
@@ +128,3 @@
 # egg-list-box is a static library, so it must be shared among all panels
 # or it breaks GType registration
+PKG_CHECK_MODULES(SHELL, $COMMON_MODULES x11 egg-list-box egg-flow-box polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION)

egg-flow-box isn't a common module, only the background panel uses it, so it should only be linked from the background module (the line below).

::: shell/control-center.c
@@ +277,3 @@
   cc_shell_log_init ();
 
+

Why the extra line feed?

@@ +280,2 @@
   g_type_ensure (egg_list_box_get_type ());
+  g_type_ensure (egg_flow_box_get_type ());

All this needs to move to background panel.
Comment 4 Bastien Nocera 2013-02-11 13:15:49 UTC
Review of attachment 235622 [details] [review]:

You can merge this directly in the previous patch, the bug fix doesn't make sense on its own.
Comment 5 Debarshi Ray 2014-02-13 16:51:49 UTC
Nowadays it would be GtkFlowBox.
Comment 6 Debarshi Ray 2014-08-17 08:15:11 UTC
Review of attachment 235608 [details] [review]:

::: panels/background/cc-background-chooser-dialog.c
@@ +445,3 @@
     return NULL;
 
+  item = g_object_get_data (G_OBJECT (list->data), "item");

We should take a reference on 'item' to maintain parity with the earlier code because gtk_tree_model_get was doing that.
Comment 7 Debarshi Ray 2014-08-17 08:30:11 UTC
Created attachment 283636 [details] [review]
background: Use GtkFlowBox for background picker

Rebased on against master using GtkFlowbox.

There are some alignment issues that need fixing. eg., only one item in 'Pictures', or items with different aspect ratios.

Selected items are not marked with a blue. Probably something that needs to be addressed in the theme.
Comment 8 Bastien Nocera 2014-08-18 13:07:44 UTC
Review of attachment 283636 [details] [review]:

Now that we don't have the white background from the icon view, we'll probably want to remove the shadow-type from the scrolled window, so the border goes away.

There's also a resize that happens *after* the window is shown.

Finally, a blue border to show the selected item better would be nice.

::: panels/background/cc-background-chooser-dialog.c
@@ +469,3 @@
   rgba.alpha = dropped[3] / 65535.;
 
+  if (bg_colors_source_add (chooser->priv->colors_source, &rgba, NULL) == FALSE)

Here, we're losing the focus after drop, which is a pretty important part of the interaction.
Comment 9 André Klapper 2021-06-09 16:10:46 UTC
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org.
As part of that, we are mass-closing older open tickets in bugzilla.gnome.org
which have not seen updates for a longer time (resources are unfortunately
quite limited so not every ticket can get handled).

If you can still reproduce the situation described in this ticket in a recent
and supported software version, then please follow
  https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines
and create a new bug report at
  https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/

Thank you for your understanding and your help.