[gnome-flashback] input-sources: add gf_input_source_xkb_new
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-flashback] input-sources: add gf_input_source_xkb_new
- Date: Thu, 2 Jan 2020 10:58:05 +0000 (UTC)
commit 4a0dac89c2f480c721b824be791397ee5955f66f
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Thu Jan 2 05:18:53 2020 +0200
input-sources: add gf_input_source_xkb_new
.../libinput-sources/gf-input-source-manager.c | 7 +------
gnome-flashback/libinput-sources/gf-input-source-xkb.c | 15 +++++++++++++--
gnome-flashback/libinput-sources/gf-input-source-xkb.h | 6 ++++++
3 files changed, 20 insertions(+), 8 deletions(-)
---
diff --git a/gnome-flashback/libinput-sources/gf-input-source-manager.c
b/gnome-flashback/libinput-sources/gf-input-source-manager.c
index 506fa5c..17315ff 100644
--- a/gnome-flashback/libinput-sources/gf-input-source-manager.c
+++ b/gnome-flashback/libinput-sources/gf-input-source-manager.c
@@ -1129,12 +1129,7 @@ sources_changed_cb (GfInputSourceSettings *settings,
xkb_info = gf_keyboard_manager_get_xkb_info (manager->keyboard_manager);
- source = g_object_new (GF_TYPE_INPUT_SOURCE_XKB,
- "xkb-info", xkb_info,
- "type", info->type,
- "id", info->id,
- "index", position,
- NULL);
+ source = gf_input_source_xkb_new (xkb_info, info->id, position);
}
g_signal_connect (source, "activate",
diff --git a/gnome-flashback/libinput-sources/gf-input-source-xkb.c
b/gnome-flashback/libinput-sources/gf-input-source-xkb.c
index ec6994a..9276542 100644
--- a/gnome-flashback/libinput-sources/gf-input-source-xkb.c
+++ b/gnome-flashback/libinput-sources/gf-input-source-xkb.c
@@ -18,8 +18,6 @@
#include "config.h"
#include "gf-input-source-xkb.h"
-#include <libgnome-desktop/gnome-xkb-info.h>
-
struct _GfInputSourceXkb
{
GfInputSource parent;
@@ -217,3 +215,16 @@ static void
gf_input_source_xkb_init (GfInputSourceXkb *self)
{
}
+
+GfInputSource *
+gf_input_source_xkb_new (GnomeXkbInfo *xkb_info,
+ const char *id,
+ int index)
+{
+ return g_object_new (GF_TYPE_INPUT_SOURCE_XKB,
+ "xkb-info", xkb_info,
+ "type", INPUT_SOURCE_TYPE_XKB,
+ "id", id,
+ "index", index,
+ NULL);
+}
diff --git a/gnome-flashback/libinput-sources/gf-input-source-xkb.h
b/gnome-flashback/libinput-sources/gf-input-source-xkb.h
index d428def..194f63d 100644
--- a/gnome-flashback/libinput-sources/gf-input-source-xkb.h
+++ b/gnome-flashback/libinput-sources/gf-input-source-xkb.h
@@ -18,6 +18,8 @@
#ifndef GF_INPUT_SOURCE_XKB_H
#define GF_INPUT_SOURCE_XKB_H
+#include <libgnome-desktop/gnome-xkb-info.h>
+
#include "gf-input-source.h"
G_BEGIN_DECLS
@@ -26,6 +28,10 @@ G_BEGIN_DECLS
G_DECLARE_FINAL_TYPE (GfInputSourceXkb, gf_input_source_xkb,
GF, INPUT_SOURCE_XKB, GfInputSource)
+GfInputSource *gf_input_source_xkb_new (GnomeXkbInfo *xkb_info,
+ const char *id,
+ int index);
+
G_END_DECLS
#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]