diff --git a/eek/eek-keyboard.c b/eek/eek-keyboard.c index cbfca496..d67a13da 100644 --- a/eek/eek-keyboard.c +++ b/eek/eek-keyboard.c @@ -55,8 +55,6 @@ enum { static guint signals[LAST_SIGNAL] = { 0, }; -G_DEFINE_TYPE (EekKeyboard, eek_keyboard, EEK_TYPE_CONTAINER); - #define EEK_KEYBOARD_GET_PRIVATE(obj) \ (G_TYPE_INSTANCE_GET_PRIVATE ((obj), EEK_TYPE_KEYBOARD, EekKeyboardPrivate)) @@ -75,6 +73,8 @@ struct _EekKeyboardPrivate EekModifierType alt_gr_mask; }; +G_DEFINE_TYPE_WITH_PRIVATE (EekKeyboard, eek_keyboard, EEK_TYPE_CONTAINER); + G_DEFINE_BOXED_TYPE(EekModifierKey, eek_modifier_key, eek_modifier_key_copy, eek_modifier_key_free); @@ -390,9 +390,6 @@ eek_keyboard_class_init (EekKeyboardClass *klass) GObjectClass *gobject_class = G_OBJECT_CLASS (klass); GParamSpec *pspec; - g_type_class_add_private (gobject_class, - sizeof (EekKeyboardPrivate)); - klass->create_section = eek_keyboard_real_create_section; /* signals */ diff --git a/eekboard/eekboard-context-service.c b/eekboard/eekboard-context-service.c index dce47228..9688012f 100644 --- a/eekboard/eekboard-context-service.c +++ b/eekboard/eekboard-context-service.c @@ -82,9 +82,9 @@ struct _EekboardContextServicePrivate { GSettings *settings; }; -G_DEFINE_TYPE (EekboardContextService, eekboard_context_service, G_TYPE_OBJECT); +G_DEFINE_TYPE_WITH_PRIVATE (EekboardContextService, eekboard_context_service, G_TYPE_OBJECT); -static Display *display = NULL; +/*static Display *display = NULL; */ static EekKeyboard * eekboard_context_service_real_create_keyboard (EekboardContextService *self, @@ -356,9 +356,6 @@ eekboard_context_service_class_init (EekboardContextServiceClass *klass) GObjectClass *gobject_class = G_OBJECT_CLASS (klass); GParamSpec *pspec; - g_type_class_add_private (gobject_class, - sizeof (EekboardContextServicePrivate)); - klass->create_keyboard = eekboard_context_service_real_create_keyboard; klass->show_keyboard = eekboard_context_service_real_show_keyboard; klass->hide_keyboard = eekboard_context_service_real_hide_keyboard; @@ -483,7 +480,8 @@ eekboard_context_service_init (EekboardContextService *self) } } -static gboolean on_repeat_timeout (EekboardContextService *context); +/* FIXME These functions should either be implemented or removed. */ +/*static gboolean on_repeat_timeout (EekboardContextService *context); static gboolean on_repeat_timeout (EekboardContextService *context) @@ -505,15 +503,15 @@ on_repeat_timeout (EekboardContextService *context) static gboolean on_repeat_timeout_init (EekboardContextService *context) { - /* FIXME: clear modifiers for further key repeat; better not - depend on modifier behavior is LATCH */ + // FIXME: clear modifiers for further key repeat; better not + // depend on modifier behavior is LATCH eek_keyboard_set_modifiers (context->priv->keyboard, 0); - /* reschedule repeat timeout only when "repeat" option is set */ - /* TODO: org.gnome.desktop.input-sources doesn't have repeat info. - * In addition, repeat is only useful when the keyboard is not in text - * input mode */ - /* + // reschedule repeat timeout only when "repeat" option is set + // TODO: org.gnome.desktop.input-sources doesn't have repeat info. + // In addition, repeat is only useful when the keyboard is not in text + // input mode + if (g_settings_get_boolean (context->priv->settings, "repeat")) { guint delay; @@ -522,11 +520,11 @@ on_repeat_timeout_init (EekboardContextService *context) g_timeout_add (delay, (GSourceFunc)on_repeat_timeout, context); - } else */ + //} else context->priv->repeat_timeout_id = 0; return FALSE; -} +}*/ /** * eekboard_context_service_enable: diff --git a/eekboard/key-emitter.c b/eekboard/key-emitter.c index 344c2ed7..539c2331 100644 --- a/eekboard/key-emitter.c +++ b/eekboard/key-emitter.c @@ -78,11 +78,12 @@ replace_keycode (SeatEmitter *emitter, guint keycode, guint *keysym) { - GdkDisplay *display = gdk_display_get_default (); - //Display *xdisplay = GDK_DISPLAY_XDISPLAY (display); +/* GdkDisplay *display = gdk_display_get_default (); + Display *xdisplay = GDK_DISPLAY_XDISPLAY (display); guint old_keysym; int keysyms_per_keycode; KeySym *syms; +*/ return TRUE; // FIXME: no xkb allocated at the moment, pretending all is fine g_return_val_if_fail (emitter->xkb->min_key_code <= keycode && keycode <= emitter->xkb->max_key_code,