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 681911 - Use GdMainIconView instead of GtkIconView
Use GdMainIconView instead of GtkIconView
Status: RESOLVED FIXED
Product: gnome-boxes
Classification: Applications
Component: general
unspecified
Other All
: Normal normal
: --
Assigned To: GNOME Boxes maintainer(s)
GNOME Boxes maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2012-08-15 13:40 UTC by Zeeshan Ali
Modified: 2016-03-31 14:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
libgd: Import GdMainIconView (68.01 KB, patch)
2012-08-15 13:40 UTC, Zeeshan Ali
committed Details | Review
collection-view: Use GdMainIconView instead of GtkIconView (11.08 KB, patch)
2012-08-15 13:40 UTC, Zeeshan Ali
reviewed Details | Review
Add Cosimo Cecchi to AUTHORS (728 bytes, patch)
2012-08-15 13:40 UTC, Zeeshan Ali
committed Details | Review
collection-view: Use GdMainIconView instead of GtkIconView (10.68 KB, patch)
2012-08-15 14:10 UTC, Zeeshan Ali
none Details | Review
collection-view: Use GdMainIconView instead of GtkIconView (9.87 KB, patch)
2012-08-15 14:18 UTC, Zeeshan Ali
committed Details | Review
screenshot in selection mode (132.33 KB, image/png)
2012-08-16 09:48 UTC, Christophe Fergeau
  Details

Description Zeeshan Ali 2012-08-15 13:40:36 UTC
SSIA
Comment 1 Zeeshan Ali 2012-08-15 13:40:40 UTC
Created attachment 221251 [details] [review]
libgd: Import GdMainIconView

Also import the required classes (GdMainViewGeneric,
GdTogglePixbufRenderer and GdTwoLinesRenderer) and theme icons it requires
for selection mode.
Comment 2 Zeeshan Ali 2012-08-15 13:40:45 UTC
Created attachment 221252 [details] [review]
collection-view: Use GdMainIconView instead of GtkIconView

While rest of the UI looks exactly it did before this change, the
selection view now looks a lot prettier (i-e like in gnome-documents).
Apart from the aesthetic benefits, we now also retain the selection when
switching away from selection view.

Most of this code is taken (and ported to Vala) from GdMainView that we
(at least currently) can not use.
Comment 3 Zeeshan Ali 2012-08-15 13:40:49 UTC
Created attachment 221253 [details] [review]
Add Cosimo Cecchi to AUTHORS

We have imported enough of his code from gnome-documents to be obligated
to credit him.
Comment 4 Marc-Andre Lureau 2012-08-15 13:41:47 UTC
Review of attachment 221253 [details] [review]:

ack
Comment 5 Marc-Andre Lureau 2012-08-15 13:55:00 UTC
Review of attachment 221252 [details] [review]:

patch looks good, minor comments

::: src/collection-view.vala
@@ +4,2 @@
 private class Boxes.CollectionView: Boxes.UI {
+    private const int ITEM_COLUMN = Gd.MainColumns.SELECTED + 1;

It would be more future-proof to have Gd.MainColumns.LAST instead. I guess this change is acceptable too for upstream.

Also, if there is no vala limitation, it would make more sense to keep it as an enum such as ModelColumn.ITEM.
Comment 6 Marc-Andre Lureau 2012-08-15 13:55:25 UTC
Review of attachment 221251 [details] [review]:

ack
Comment 7 Zeeshan Ali 2012-08-15 14:10:40 UTC
Created attachment 221265 [details] [review]
collection-view: Use GdMainIconView instead of GtkIconView

V2: Enum changes as pointed out in last review.
Comment 8 Zeeshan Ali 2012-08-15 14:18:36 UTC
Created attachment 221266 [details] [review]
collection-view: Use GdMainIconView instead of GtkIconView

V3
Comment 9 Marc-Andre Lureau 2012-08-15 14:20:52 UTC
Review of attachment 221266 [details] [review]:

ack
Comment 10 Zeeshan Ali 2012-08-15 14:23:25 UTC
Attachment 221251 [details] pushed as e77e15a - libgd: Import GdMainIconView
Attachment 221253 [details] pushed as d29519d - Add Cosimo Cecchi to AUTHORS
Attachment 221266 [details] pushed as 0e8af0a - collection-view: Use GdMainIconView instead of GtkIconView
Comment 11 Christophe Fergeau 2012-08-16 09:48:29 UTC
Created attachment 221355 [details]
screenshot in selection mode

(In reply to comment #2)
> Created an attachment (id=221252) [details] [review]
> collection-view: Use GdMainIconView instead of GtkIconView

For what it's worth, the checkboxes in selection mode don't look that nice with our dark theme. On https://github.com/gnome-design-team/gnome-mockups/raw/master/boxes/boxes-selection.png they are positioned more to the left/top than what is done in git master