[gnome-flashback] input-sources: initial version, unimplemented



commit 6d6ceb1f1f9567242b7519a76b06e0e95cc35508
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Mon Sep 14 22:52:35 2015 +0300

    input-sources: initial version, unimplemented

 configure.ac                                       |    5 ++
 data/schemas/org.gnome.gnome-flashback.gschema.xml |    6 +++
 gnome-flashback/Makefile.am                        |    2 +
 gnome-flashback/gf-application.c                   |    4 ++
 gnome-flashback/libinput-sources/Makefile.am       |   28 +++++++++++++
 .../libinput-sources/gf-input-sources.c            |   43 ++++++++++++++++++++
 .../libinput-sources/gf-input-sources.h            |   33 +++++++++++++++
 7 files changed, 121 insertions(+), 0 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 19c8b37..10b96ec 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)
@@ -120,6 +124,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/schemas/org.gnome.gnome-flashback.gschema.xml 
b/data/schemas/org.gnome.gnome-flashback.gschema.xml
index 783db3c..4ebce8b 100644
--- a/data/schemas/org.gnome.gnome-flashback.gschema.xml
+++ b/data/schemas/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>Keyboard layouts and input methods</summary>
+      <description>If set to true, then GNOME Flashback application will be used to manage keyboard layouts 
and input methods.</description>
+    </key>
+
     <key name="polkit" type="b">
       <default>true</default>
       <summary>Authentication agent for polkit</summary>
diff --git a/gnome-flashback/Makefile.am b/gnome-flashback/Makefile.am
index 0e463a7..0f99d9e 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/gf-application.c b/gnome-flashback/gf-application.c
index 3816bdb..0fe846b 100644
--- a/gnome-flashback/gf-application.c
+++ b/gnome-flashback/gf-application.c
@@ -27,6 +27,7 @@
 #include "libdisplay-config/flashback-display-config.h"
 #include "libend-session-dialog/gf-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/gf-screencast.h"
@@ -53,6 +54,7 @@ struct _GfApplication
   GfBluetoothApplet      *bluetooth;
   GfDesktopBackground    *background;
   GfEndSessionDialog     *dialog;
+  GfInputSources         *input_sources;
   GfPowerApplet          *power;
   GfScreencast           *screencast;
   GfScreenshot           *screenshot;
@@ -144,6 +146,7 @@ settings_changed (GSettings   *settings,
   SETTING_CHANGED (bluetooth, "bluetooth-applet", gf_bluetooth_applet_new)
   SETTING_CHANGED (background, "desktop-background", gf_desktop_background_new)
   SETTING_CHANGED (dialog, "end-session-dialog", gf_end_session_dialog_new)
+  SETTING_CHANGED (input_sources, "input-sources", gf_input_sources_new)
   SETTING_CHANGED (power, "power-applet", gf_power_applet_new)
   SETTING_CHANGED (screencast, "screencast", gf_screencast_new)
   SETTING_CHANGED (screenshot, "screenshot", gf_screenshot_new)
@@ -183,6 +186,7 @@ gf_application_dispose (GObject *object)
   g_clear_object (&application->bluetooth);
   g_clear_object (&application->background);
   g_clear_object (&application->dialog);
+  g_clear_object (&application->input_sources);
   g_clear_object (&application->power);
   g_clear_object (&application->screencast);
   g_clear_object (&application->screenshot);
diff --git a/gnome-flashback/libinput-sources/Makefile.am b/gnome-flashback/libinput-sources/Makefile.am
new file mode 100644
index 0000000..3622bb9
--- /dev/null
+++ b/gnome-flashback/libinput-sources/Makefile.am
@@ -0,0 +1,28 @@
+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 \
+       $(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..bd02248
--- /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 *input_sources_class)
+{
+}
+
+static void
+gf_input_sources_init (GfInputSources *input_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..f760476
--- /dev/null
+++ b/gnome-flashback/libinput-sources/gf-input-sources.h
@@ -0,0 +1,33 @@
+/*
+ * 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]