[gnome-flashback] input-sources: add functions to get and set mru sources



commit f500e3e966722459ad9e5f349afba55b3ccb4d6a
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Sat Jun 11 19:52:59 2016 +0300

    input-sources: add functions to get and set mru sources

 .../libinput-sources/gf-input-source-settings.c    |   14 ++++++++++++++
 .../libinput-sources/gf-input-source-settings.h    |    7 +++++++
 2 files changed, 21 insertions(+), 0 deletions(-)
---
diff --git a/gnome-flashback/libinput-sources/gf-input-source-settings.c 
b/gnome-flashback/libinput-sources/gf-input-source-settings.c
index 871ee6d..a4fbe1a 100644
--- a/gnome-flashback/libinput-sources/gf-input-source-settings.c
+++ b/gnome-flashback/libinput-sources/gf-input-source-settings.c
@@ -24,6 +24,7 @@
 #define DESKTOP_INPUT_SOURCES_SCHEMA "org.gnome.desktop.input-sources"
 
 #define KEY_SOURCES "sources"
+#define KEY_MRU_SOURCES "mru-sources"
 #define KEY_XKB_OPTIONS "xkb-options"
 #define KEY_PER_WINDOW "per-window"
 
@@ -162,6 +163,19 @@ gf_input_source_settings_get_sources (GfInputSourceSettings *settings)
   return g_settings_get_value (settings->settings, KEY_SOURCES);
 }
 
+GVariant *
+gf_input_source_settings_get_mru_sources (GfInputSourceSettings *settings)
+{
+  return g_settings_get_value (settings->settings, KEY_MRU_SOURCES);
+}
+
+void
+gf_input_source_settings_set_mru_sources (GfInputSourceSettings *settings,
+                                          GVariant              *mru_sources)
+{
+  g_settings_set_value (settings->settings, KEY_MRU_SOURCES, mru_sources);
+}
+
 /**
  * gf_input_source_settings_get_xkb_options:
  * @settings: a #GfInputSourceSettings
diff --git a/gnome-flashback/libinput-sources/gf-input-source-settings.h 
b/gnome-flashback/libinput-sources/gf-input-source-settings.h
index eac0196..86bc618 100644
--- a/gnome-flashback/libinput-sources/gf-input-source-settings.h
+++ b/gnome-flashback/libinput-sources/gf-input-source-settings.h
@@ -29,7 +29,14 @@ G_DECLARE_FINAL_TYPE (GfInputSourceSettings, gf_input_source_settings,
 GfInputSourceSettings  *gf_input_source_settings_new             (void);
 
 GVariant               *gf_input_source_settings_get_sources     (GfInputSourceSettings *settings);
+
+void                    gf_input_source_settings_set_mru_sources (GfInputSourceSettings *settings,
+                                                                  GVariant              *mru_sources);
+
+GVariant               *gf_input_source_settings_get_mru_sources (GfInputSourceSettings *settings);
+
 gchar                 **gf_input_source_settings_get_xkb_options (GfInputSourceSettings *settings);
+
 gboolean                gf_input_source_settings_get_per_window  (GfInputSourceSettings *settings);
 
 G_END_DECLS


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