[four-in-a-row/KaKnife/four-in-a-row-vala: 26/65] fixed issue in GamesControlsList



commit f95fab8d8d15b127d4f61f8a4568b8a250ab5e52
Author: Jacob Humphrey <jacob ryan humphrey gmail com>
Date:   Sun Nov 25 14:01:13 2018 -0600

    fixed issue in GamesControlsList

 src/games-controls-list.vala | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)
---
diff --git a/src/games-controls-list.vala b/src/games-controls-list.vala
index 578c7a8..c7228ef 100644
--- a/src/games-controls-list.vala
+++ b/src/games-controls-list.vala
@@ -200,4 +200,34 @@ public class GamesControlsList : Gtk.ScrolledWindow {
             key = args.arg();
         }
     }
+
+    void settings_changed_cb (string key) {
+        Gtk.TreeIter iter;
+        bool valid;
+
+        /* find our gconf key in the list store and update it */
+        valid = model.get_iter_first(out iter);
+        while (valid) {
+            string conf_key;
+
+            model.get(iter, Columns.CONFKEY_COLUMN, out conf_key);
+
+            if (key == conf_key) {
+                uint keyval, default_keyval;
+
+                model.get(iter, Columns.DEFAULT_KEYCODE_COLUMN, out default_keyval);
+
+                keyval = settings.get_int(key);
+
+                store.set(iter,
+                          Columns.KEYCODE_COLUMN, keyval,
+                          Columns.KEYMODS_COLUMN, 0 /* FIXME? */);
+
+                break;
+            }
+
+            valid = store.iter_next(ref iter);
+        }
+    }
+
 }


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