[nautilus/2131-action-to-open-items-preference-does-not-have-any-effect: 3/3] preferences-window: Fix combo settings binding




commit ec02fc5c268d89becbefa46b3b7c87ba350ef8db
Author: António Fernandes <antoniojpfernandes gmail com>
Date:   Sat Mar 19 21:13:21 2022 +0000

    preferences-window: Fix combo settings binding
    
    AdwComboRow:selected has value type 'uint', but I forgot to update
    it from HdyComboRow, which broke the settings.
    
    Fixes https://gitlab.gnome.org/GNOME/nautilus/-/issues/2131

 src/nautilus-preferences-window.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/nautilus-preferences-window.c b/src/nautilus-preferences-window.c
index b3a701927..e8d66639c 100644
--- a/src/nautilus-preferences-window.c
+++ b/src/nautilus-preferences-window.c
@@ -268,7 +268,7 @@ static GVariant *combo_row_mapping_set(const GValue       *gvalue,
 {
     const gchar **values = user_data;
 
-    return g_variant_new_string (values[g_value_get_int (gvalue)]);
+    return g_variant_new_string (values[g_value_get_uint (gvalue)]);
 }
 
 static gboolean combo_row_mapping_get(GValue   *gvalue,
@@ -284,7 +284,7 @@ static gboolean combo_row_mapping_get(GValue   *gvalue,
     {
         if (g_strcmp0 (value, values[i]) == 0)
         {
-            g_value_set_int (gvalue, i);
+            g_value_set_uint (gvalue, i);
 
             return TRUE;
         }


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