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 678456 - Zoom in/out to the right icon in the collection
Zoom in/out to the right icon in the collection
Status: RESOLVED FIXED
Product: gnome-boxes
Classification: Applications
Component: general
unspecified
Other Linux
: Normal normal
: --
Assigned To: GNOME Boxes maintainer(s)
GNOME Boxes maintainer(s)
Depends on: 678418
Blocks:
 
 
Reported: 2012-06-20 09:06 UTC by Alexander Larsson
Modified: 2016-03-31 14:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Require Gtk+ 3.5.5 for gtk_icon_view_get_cell_area (751 bytes, patch)
2012-06-20 09:07 UTC, Alexander Larsson
accepted-commit_now Details | Review
Add IconView.get_cell_area to vapi file (1018 bytes, patch)
2012-06-20 09:07 UTC, Alexander Larsson
accepted-commit_now Details | Review
Zoom to/from the right item in the collection view (4.03 KB, patch)
2012-06-20 09:07 UTC, Alexander Larsson
accepted-commit_now Details | Review
Minor cleanup (2.08 KB, patch)
2012-06-20 09:07 UTC, Alexander Larsson
committed Details | Review
Fix item zooming after properties shown (1.05 KB, patch)
2012-06-20 09:07 UTC, Alexander Larsson
committed Details | Review
Add CollectionView.get_path_for_item helper (923 bytes, patch)
2012-06-21 08:19 UTC, Alexander Larsson
none Details | Review
Zoom to/from the right place on the icon view (2.92 KB, patch)
2012-06-21 08:19 UTC, Alexander Larsson
none Details | Review
Require Gtk+ 3.5.5 for gtk_icon_view_get_cell_area (751 bytes, patch)
2012-06-25 15:06 UTC, Alexander Larsson
committed Details | Review
Update to latest Gtk vapi file (38.37 KB, patch)
2012-06-25 15:06 UTC, Alexander Larsson
committed Details | Review
Add CollectionView.get_path_for_item helper (923 bytes, patch)
2012-06-25 15:06 UTC, Alexander Larsson
committed Details | Review
Zoom to/from the right place on the icon view (2.90 KB, patch)
2012-06-25 15:06 UTC, Alexander Larsson
committed Details | Review

Description Alexander Larsson 2012-06-20 09:06:43 UTC
When you click on or go back from a box we zoom into the wrong place, because currently there is no api to get the right place. Bug 678418 has patches to add this to gtk+ which we could then use.
Comment 1 Alexander Larsson 2012-06-20 09:07:18 UTC
Created attachment 216803 [details] [review]
Require Gtk+ 3.5.5 for gtk_icon_view_get_cell_area
Comment 2 Alexander Larsson 2012-06-20 09:07:20 UTC
Created attachment 216804 [details] [review]
Add IconView.get_cell_area to vapi file
Comment 3 Alexander Larsson 2012-06-20 09:07:23 UTC
Created attachment 216805 [details] [review]
Zoom to/from the right item in the collection view

We use the new get_cell_area to figure out where to zoom.
Comment 4 Alexander Larsson 2012-06-20 09:07:25 UTC
Created attachment 216806 [details] [review]
Minor cleanup

Define a current_image local to avoid multiple uses of App.app.current_item
Comment 5 Alexander Larsson 2012-06-20 09:07:28 UTC
Created attachment 216807 [details] [review]
Fix item zooming after properties shown

We hide the current item when showing the properties view, we need
to show it when zooming it back to the collection view.
Comment 6 Zeeshan Ali 2012-06-20 17:36:13 UTC
Review of attachment 216806 [details] [review]:

ACK
Comment 7 Zeeshan Ali 2012-06-20 17:37:01 UTC
Review of attachment 216803 [details] [review]:

ACK
Comment 8 Zeeshan Ali 2012-06-20 17:38:01 UTC
Review of attachment 216804 [details] [review]:

Please do remember to update the vapi in vala package as well.
Comment 9 Marc-Andre Lureau 2012-06-20 17:54:40 UTC
We should first wait for bug 678418
Comment 10 Zeeshan Ali 2012-06-20 18:03:52 UTC
Review of attachment 216805 [details] [review]:

Looks good otherwise, does it work? :)

::: src/collection-view.vala
@@ -45,3 +45,3 @@
             icon_view.unselect_all ();
             if (App.app.current_item != null) {
-                var actor = App.app.current_item.actor;
+                var current_item = App.app.current_item;

isn't this already part of another patch on this bug?

@@ -49,3 +50,3 @@
                                                    Clutter.BinAlignment.FIXED,
                                                    Clutter.BinAlignment.FIXED);
-                // TODO: How do I get the icon coords from the iconview?
+                Gdk.Rectangle rect;

these 4 lines are repeated just below so perhaps we but this into another small util function?
Comment 11 Zeeshan Ali 2012-06-20 18:06:21 UTC
Review of attachment 216807 [details] [review]:

ACK
Comment 12 Zeeshan Ali 2012-06-20 18:07:36 UTC
(In reply to comment #9)
> We should first wait for bug 678418

Oh, I thought its already in. Wish there was a patch status for this case. :(
Comment 13 Alexander Larsson 2012-06-21 08:18:13 UTC
Attachment 216806 [details] pushed as 48fbcfb - Minor cleanup
Attachment 216807 [details] pushed as e84a9e9 - Fix item zooming after properties shown
Comment 14 Alexander Larsson 2012-06-21 08:19:32 UTC
Created attachment 216901 [details] [review]
Add CollectionView.get_path_for_item helper
Comment 15 Alexander Larsson 2012-06-21 08:19:34 UTC
Created attachment 216902 [details] [review]
Zoom to/from the right place on the icon view

We use the new IconView.get_cell_area to find the right place to zoom
Comment 16 Alexander Larsson 2012-06-21 08:20:59 UTC
I pushed the cleanup and the zoom after properties fix, and attached a new zoom-position fix based on that.
Comment 17 Alexander Larsson 2012-06-25 15:06:32 UTC
Created attachment 217215 [details] [review]
Require Gtk+ 3.5.5 for gtk_icon_view_get_cell_area
Comment 18 Alexander Larsson 2012-06-25 15:06:35 UTC
Created attachment 217216 [details] [review]
Update to latest Gtk vapi file

This is from vala master and is needed for gtk_icon_view_get_cell_rect
Comment 19 Alexander Larsson 2012-06-25 15:06:38 UTC
Created attachment 217217 [details] [review]
Add CollectionView.get_path_for_item helper
Comment 20 Alexander Larsson 2012-06-25 15:06:41 UTC
Created attachment 217218 [details] [review]
Zoom to/from the right place on the icon view

We use the new IconView.get_cell_rect to find the right place to zoom
Comment 21 Zeeshan Ali 2012-06-25 15:15:13 UTC
Review of attachment 217215 [details] [review]:

ACK
Comment 22 Zeeshan Ali 2012-06-25 15:16:05 UTC
Review of attachment 217216 [details] [review]:

Assuming you tested this doesn't break anything, ACK
Comment 23 Zeeshan Ali 2012-06-25 15:17:47 UTC
Review of attachment 217217 [details] [review]:

ACK
Comment 24 Zeeshan Ali 2012-06-25 15:19:46 UTC
Review of attachment 217218 [details] [review]:

Looks good.
Comment 25 Alexander Larsson 2012-06-25 18:06:14 UTC
Attachment 217215 [details] pushed as 2a1743e - Require Gtk+ 3.5.5 for gtk_icon_view_get_cell_area
Attachment 217216 [details] pushed as 8268810 - Update to latest Gtk vapi file
Attachment 217217 [details] pushed as b70b737 - Add CollectionView.get_path_for_item helper
Attachment 217218 [details] pushed as 6fdaca1 - Zoom to/from the right place on the icon view