[gnome-flashback/wip/segeiger/inputmethods: 3/4] input-sources: initial version, unimplemented



commit 295ecb707481d9144aac5c00c15420c3a49e4e24
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Sun Sep 13 01:49:04 2015 +0300

    input-sources: initial version, unimplemented

 configure.ac                                       |    5 ++
 data/org.gnome.gnome-flashback.gschema.xml         |   17 ++++++++
 gnome-flashback/Makefile.am                        |    2 +
 gnome-flashback/flashback-application.c            |    4 ++
 gnome-flashback/libinput-sources/Makefile.am       |   29 +++++++++++++
 .../libinput-sources/gf-input-sources.c            |   43 ++++++++++++++++++++
 .../libinput-sources/gf-input-sources.h            |   32 +++++++++++++++
 7 files changed, 132 insertions(+), 0 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index ecd6872..917977b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -70,6 +70,10 @@ PKG_CHECK_MODULES(IDLE_MONITOR, gtk+-3.0 >= $GTK_REQUIRED x11 xext)
 AC_SUBST(IDLE_MONITOR_CFLAGS)
 AC_SUBST(IDLE_MONITOR_LIBS)
 
+PKG_CHECK_MODULES(INPUT_SOURCES, gtk+-3.0 >= $GTK_REQUIRED)
+AC_SUBST(INPUT_SOURCES_CFLAGS)
+AC_SUBST(INPUT_SOURCES_LIBS)
+
 PKG_CHECK_MODULES(POLKIT, gtk+-3.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED polkit-agent-1 >= 
$POLKIT_AGENT_REQUIRED polkit-gobject-1 >= $POLKIT_GOBJECT_REQUIRED)
 AC_SUBST(POLKIT_CFLAGS)
 AC_SUBST(POLKIT_LIBS)
@@ -113,6 +117,7 @@ gnome-flashback/libdesktop-background/Makefile
 gnome-flashback/libdisplay-config/Makefile
 gnome-flashback/libend-session-dialog/Makefile
 gnome-flashback/libidle-monitor/Makefile
+gnome-flashback/libinput-sources/Makefile
 gnome-flashback/libpolkit/Makefile
 gnome-flashback/libpower-applet/Makefile
 gnome-flashback/libscreencast/Makefile
diff --git a/data/org.gnome.gnome-flashback.gschema.xml b/data/org.gnome.gnome-flashback.gschema.xml
index 783db3c..fdaad39 100644
--- a/data/org.gnome.gnome-flashback.gschema.xml
+++ b/data/org.gnome.gnome-flashback.gschema.xml
@@ -37,6 +37,12 @@
       <description>If set to true, then GNOME Flashback application will be used for user activity 
monitoring.</description>
     </key>
 
+    <key name="input-sources" type="b">
+      <default>true</default>
+      <summary></summary>
+      <description></description>
+    </key>
+
     <key name="polkit" type="b">
       <default>true</default>
       <summary>Authentication agent for polkit</summary>
@@ -80,6 +86,7 @@
     </key>
 
     <child name="desktop-background" schema="org.gnome.gnome-flashback.desktop-background"/>
+    <child name="input-sources" schema="org.gnome.gnome-flashback.input-sources"/>
     <child name="workarounds" schema="org.gnome.gnome-flashback.workarounds"/>
   </schema>
 
@@ -93,6 +100,16 @@
 
   </schema>
 
+  <schema id="org.gnome.gnome-flashback.input-sources" path="/org/gnome/gnome-flashback/input-sources/">
+
+    <key name="show-status-icon" type="b">
+      <default>true</default>
+      <summary></summary>
+      <description></description>
+    </key>
+
+  </schema>
+
   <schema id="org.gnome.gnome-flashback.workarounds" path="/org/gnome/gnome-flashback/workarounds/">
 
     <key name="fix-app-menu" type="b">
diff --git a/gnome-flashback/Makefile.am b/gnome-flashback/Makefile.am
index 9229434..8aee1f6 100644
--- a/gnome-flashback/Makefile.am
+++ b/gnome-flashback/Makefile.am
@@ -7,6 +7,7 @@ SUBDIRS = \
        libdisplay-config \
        libend-session-dialog \
        libidle-monitor \
+       libinput-sources \
        libpolkit \
        libpower-applet \
        libscreencast \
@@ -50,6 +51,7 @@ gnome_flashback_LDADD = \
        $(top_builddir)/gnome-flashback/libdisplay-config/libdisplay-config.la \
        $(top_builddir)/gnome-flashback/libend-session-dialog/libend-session-dialog.la \
        $(top_builddir)/gnome-flashback/libidle-monitor/libidle-monitor.la \
+       $(top_builddir)/gnome-flashback/libinput-sources/libinput-sources.la \
        $(top_builddir)/gnome-flashback/libpolkit/libpolkit.la \
        $(top_builddir)/gnome-flashback/libpower-applet/libpower-applet.la \
        $(top_builddir)/gnome-flashback/libscreencast/libscreencast.la \
diff --git a/gnome-flashback/flashback-application.c b/gnome-flashback/flashback-application.c
index 6d2967e..f18c489 100644
--- a/gnome-flashback/flashback-application.c
+++ b/gnome-flashback/flashback-application.c
@@ -27,6 +27,7 @@
 #include "libdisplay-config/flashback-display-config.h"
 #include "libend-session-dialog/flashback-end-session-dialog.h"
 #include "libidle-monitor/flashback-idle-monitor.h"
+#include "libinput-sources/gf-input-sources.h"
 #include "libpolkit/flashback-polkit.h"
 #include "libpower-applet/gf-power-applet.h"
 #include "libscreencast/flashback-screencast.h"
@@ -54,6 +55,7 @@ struct _FlashbackApplication
   FlashbackScreencast       *screencast;
   FlashbackShell            *shell;
   GfBluetoothApplet         *bluetooth;
+  GfInputSources            *input_sources;
   GfPowerApplet             *power;
   GfScreenshot              *screenshot;
   GfSoundApplet             *sound;
@@ -145,6 +147,7 @@ settings_changed (GSettings   *settings,
   SETTING_CHANGED (screencast, "screencast", flashback_screencast_new)
   SETTING_CHANGED (shell, "shell", flashback_shell_new)
   SETTING_CHANGED (bluetooth, "bluetooth-applet", gf_bluetooth_applet_new)
+  SETTING_CHANGED (input_sources, "input-sources", gf_input_sources_new)
   SETTING_CHANGED (power, "power-applet", gf_power_applet_new)
   SETTING_CHANGED (screenshot, "screenshot", gf_screenshot_new)
   SETTING_CHANGED (sound, "sound-applet", gf_sound_applet_new)
@@ -182,6 +185,7 @@ flashback_application_finalize (GObject *object)
   g_clear_object (&application->screencast);
   g_clear_object (&application->shell);
   g_clear_object (&application->bluetooth);
+  g_clear_object (&application->input_sources);
   g_clear_object (&application->power);
   g_clear_object (&application->screenshot);
   g_clear_object (&application->sound);
diff --git a/gnome-flashback/libinput-sources/Makefile.am b/gnome-flashback/libinput-sources/Makefile.am
new file mode 100644
index 0000000..bfe63d9
--- /dev/null
+++ b/gnome-flashback/libinput-sources/Makefile.am
@@ -0,0 +1,29 @@
+NULL =
+
+noinst_LTLIBRARIES = \
+       libinput-sources.la \
+       $(NULL)
+
+libinput_sources_la_CFLAGS = \
+       $(INPUT_SOURCES_CFLAGS) \
+       $(WARN_CFLAGS) \
+       $(AM_CFLAGS) \
+       -I$(top_builddir)/gnome-flashback/libinput-sources \
+       -DGNOMELOCALEDIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
+       $(NULL)
+
+libinput_sources_la_SOURCES = \
+  gf-input-sources.c \
+       gf-input-sources.h \
+       $(NULL)
+
+libinput_sources_la_LDFLAGS = \
+       $(WARN_LDFLAGS) \
+       $(AM_LDFLAGS) \
+       $(NULL)
+
+libinput_sources_la_LIBADD = \
+       $(INPUT_SOURCES_LIBS) \
+       $(NULL)
+
+-include $(top_srcdir)/git.mk
diff --git a/gnome-flashback/libinput-sources/gf-input-sources.c 
b/gnome-flashback/libinput-sources/gf-input-sources.c
new file mode 100644
index 0000000..568f495
--- /dev/null
+++ b/gnome-flashback/libinput-sources/gf-input-sources.c
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2015 Alberts Muktupāvels
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "config.h"
+
+#include "gf-input-sources.h"
+
+struct _GfInputSources
+{
+  GObject parent;
+};
+
+G_DEFINE_TYPE (GfInputSources, gf_input_sources, G_TYPE_OBJECT)
+
+static void
+gf_input_sources_class_init (GfInputSourcesClass *sources_class)
+{
+}
+
+static void
+gf_input_sources_init (GfInputSources *sources)
+{
+}
+
+GfInputSources *
+gf_input_sources_new (void)
+{
+  return g_object_new (GF_TYPE_INPUT_SOURCES, NULL);
+}
diff --git a/gnome-flashback/libinput-sources/gf-input-sources.h 
b/gnome-flashback/libinput-sources/gf-input-sources.h
new file mode 100644
index 0000000..560fad1
--- /dev/null
+++ b/gnome-flashback/libinput-sources/gf-input-sources.h
@@ -0,0 +1,32 @@
+/*
+ * Copyright (C) 2015 Alberts Muktupāvels
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GF_INPUT_SOURCES_H
+#define GF_INPUT_SOURCES_H
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+#define GF_TYPE_INPUT_SOURCES gf_input_sources_get_type ()
+G_DECLARE_FINAL_TYPE (GfInputSources, gf_input_sources, GF, INPUT_SOURCES, GObject)
+
+GfInputSources *gf_input_sources_new (void);
+
+G_END_DECLS
+
+#endif


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