! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
statusbar pixel info
Status:
RESOLVED: FIXED
Product:
Ristretto
Component:
Application

Comments

Description Simon Steinbeiss editbugs 2011-07-18 12:12:16 CEST
imo the statusbar pixel info is wrong (a pixel already is a square, as El_Angelo rightfully pointed out on irc).

it should either just read e.g.  "1024 x 768" or "1024 x 768 px" (or "pixels").
personally i'd drop the "px" alltogether, pretty much everyone knows that pixels are meant (and those that don't know that pixels are meant most likely don't know what pixels are anyway).

i guess all you have to do is s/px// here (but you'll know that better than me anyway ;) ):
http://git.xfce.org/apps/ristretto/tree/src/main_window.c#n2469
Comment 1 Stephan Arts editbugs 2011-10-22 18:38:57 CEST
Currently, ristretto does not show any information regarding image-details.
- A regression that is present since 0.1.0
Comment 2 Eric Koegel editbugs 2011-12-01 12:03:28 CET
Created attachment 3992 
Patch to update the statusbar with image dimensions and scaling info

This patch moves the code for displaying the statusbar info (filename and exif info) into its own function. Additionally the image dimensions (width x height) and the percentage scaled (such as 17.8%) is added. 
A couple other misc functions were added to get the dimensions of the image. 
The only known limitation of this patch is that the first image loaded won't show any of the dimensions or scaling info. Additionally, 2 calls to exif_entry_free (exif_entry); were commented out, if they are applied then the exif info doesn't get displayed when the user moves to another image and then back to the original one. The properties dialog file doesn't free the exif entires either.
Comment 3 Stephan Arts editbugs 2011-12-01 12:26:13 CET
Thank you for the effort, I have a few comments on this patch:

 1) Update_statusbar does not need to be called from 
    rstto_main_window_first_image and friends, if you want it to respond to a
    changed iterator, it only needs to be called from the iter_changed callback.
    The iter-changed signal is emitted on every move of the iterator (so, when 
    the image changes)

 2) The functions image_viewer_get_width and image_viewer_get_height should 
    return RsttoImageViewerPriv.image_width and 
    RsttoImageViewerPriv.image_height respectively, these variables contain the 
    actual dimensions of the image. Not the dimensions ristretto decides to 
    load it in memory. (which might be less)

 3) The limitation you describe might be solved if the image-viewer emits a
    'size-ready' signal when the image-size is known. (size-prepared) and the 
    main-window listens to that to update the statusbar.
Comment 4 Eric Koegel editbugs 2011-12-01 16:16:07 CET
Created attachment 3993 
Adds more info to the statusbar

Changes in this version of the patch:
1) Only updates the statusbar when signaled to or when a zoom event happens.
2) Fixed get_width & get_height, wish I noticed those variables the first time around.
3) A 'size-ready' signal is now emitted when Ristretto is finished loading an image.
Comment 5 Eric Koegel editbugs 2011-12-01 19:47:39 CET
Created attachment 3994 
This patch displays some text on the statusbar

This version cleans up the code a little and swaps the statusbar display for width & height when the image is rotated at 90 or 270 degrees.

 Eric Koegel
Comment 6 Stephan Arts editbugs 2011-12-01 21:44:08 CET
Thanks, committed in master.

Bug #7818

Reported by:
Simon Steinbeiss
Reported on: 2011-07-18
Last modified on: 2011-12-01

People

Assignee:
Stephan Arts
CC List:
0 users

Version

Attachments

Additional information