[gnome-photos] properties-dialog: Print a warning for unknown nmm:flash values



commit 376ec93784434d4cb265df6cb48b02915d8e3d05
Author: Debarshi Ray <debarshir gnome org>
Date:   Tue Dec 16 13:46:18 2014 +0100

    properties-dialog: Print a warning for unknown nmm:flash values
    
    This would tell us what to expect out there in the wild.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=734766

 src/photos-properties-dialog.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/src/photos-properties-dialog.c b/src/photos-properties-dialog.c
index 3b3854c..e9e6523 100644
--- a/src/photos-properties-dialog.c
+++ b/src/photos-properties-dialog.c
@@ -485,7 +485,13 @@ photos_properties_dialog_constructed (GObject *object)
       else if (flash == PHOTOS_FLASH_ON)
         flash_str = g_strdup (_("On, fired"));
       else
-        g_assert_not_reached ();
+        {
+          const gchar *str;
+
+          str = g_quark_to_string (flash);
+          g_warning ("Unknown value for nmm:flash: %s", str);
+          g_assert_not_reached ();
+        }
 
       flash_data = gtk_label_new (flash_str);
       gtk_widget_set_halign (flash_data, GTK_ALIGN_START);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]