[Xfce4-commits] [apps/ristretto] 01/01: Show info on focal length and ISO in statusbar

noreply at xfce.org noreply at xfce.org
Wed Apr 17 16:08:10 CEST 2019


This is an automated email from the git hooks/post-receive script.

f   2   4   0   4       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository apps/ristretto.

commit 2a506d045f5945d574feff1209f2a712a51dabf4
Author: Igor <f2404 at yandex.ru>
Date:   Wed Apr 17 10:07:23 2019 -0400

    Show info on focal length and ISO in statusbar
    
    Fixes bug #13993
---
 src/main_window.c | 39 +++++++++++++++++++++++----------------
 1 file changed, 23 insertions(+), 16 deletions(-)

diff --git a/src/main_window.c b/src/main_window.c
index 6b6a9a9..b2796e6 100644
--- a/src/main_window.c
+++ b/src/main_window.c
@@ -1545,39 +1545,46 @@ rstto_main_window_update_statusbar (RsttoMainWindow *window)
                 {
                     /* Extend the status-message with exif-info */
                     /********************************************/
-                    exif_entry = rstto_file_get_exif (
-                            cur_file,
-                            EXIF_TAG_FNUMBER);
+                    exif_entry = rstto_file_get_exif (cur_file, EXIF_TAG_FNUMBER);
                     if (exif_entry)
                     {
-                        exif_entry_get_value (exif_entry, exif_data, 20);
-
+                        exif_entry_get_value (exif_entry, exif_data, sizeof (exif_data));
                         tmp_status = g_strdup_printf ("%s\t%s", status, exif_data);
-
                         g_free (status);
                         status = tmp_status;
-
-                        /*exif_entry_free (exif_entry);*/
                     }
-                    exif_entry = rstto_file_get_exif (
-                            cur_file,
-                            EXIF_TAG_EXPOSURE_TIME);
+
+                    exif_entry = rstto_file_get_exif (cur_file, EXIF_TAG_EXPOSURE_TIME);
                     if (exif_entry)
                     {
-                        exif_entry_get_value (exif_entry, exif_data, 20);
-
+                        exif_entry_get_value (exif_entry, exif_data, sizeof (exif_data));
                         tmp_status = g_strdup_printf ("%s\t%s", status, exif_data);
+                        g_free (status);
+                        status = tmp_status;
+                    }
 
+                    exif_entry = rstto_file_get_exif (cur_file, EXIF_TAG_FOCAL_LENGTH);
+                    if (exif_entry)
+                    {
+                        exif_entry_get_value (exif_entry, exif_data, sizeof (exif_data));
+                        tmp_status = g_strdup_printf ("%s\t%s", status, exif_data);
                         g_free (status);
                         status = tmp_status;
+                    }
 
-                        /*exif_entry_free (exif_entry);*/
+                    exif_entry = rstto_file_get_exif (cur_file, EXIF_TAG_ISO_SPEED_RATINGS);
+                    if (exif_entry)
+                    {
+                        exif_entry_get_value (exif_entry, exif_data, sizeof (exif_data));
+                        tmp_status = g_strdup_printf ("%s\tISO %s", status, exif_data);
+                        g_free (status);
+                        status = tmp_status;
                     }
                 }
 
-                if(rstto_image_viewer_get_width(viewer) != 0 && rstto_image_viewer_get_height(viewer) != 0)
+                if (rstto_image_viewer_get_width (viewer) != 0 && rstto_image_viewer_get_height (viewer) != 0)
                 {
-                    gchar *size_string = g_format_size(rstto_file_get_size(cur_file));
+                    gchar *size_string = g_format_size (rstto_file_get_size (cur_file));
                     tmp_status = g_strdup_printf ("%s\t%d x %d\t%s\t%.1f%%", status,
                                                 rstto_image_viewer_get_width(viewer),
                                                 rstto_image_viewer_get_height(viewer),

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list