Merge branch 'prevent-warnings' into 'master'

Prevent compiler warnings by commenting out unused code

See merge request Librem5/squeekboard!37
This commit is contained in:
David Boddie
2019-07-09 13:44:54 +00:00
3 changed files with 18 additions and 22 deletions

View File

@ -55,8 +55,6 @@ enum {
static guint signals[LAST_SIGNAL] = { 0, }; static guint signals[LAST_SIGNAL] = { 0, };
G_DEFINE_TYPE (EekKeyboard, eek_keyboard, EEK_TYPE_CONTAINER);
#define EEK_KEYBOARD_GET_PRIVATE(obj) \ #define EEK_KEYBOARD_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE ((obj), EEK_TYPE_KEYBOARD, EekKeyboardPrivate)) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), EEK_TYPE_KEYBOARD, EekKeyboardPrivate))
@ -75,6 +73,8 @@ struct _EekKeyboardPrivate
EekModifierType alt_gr_mask; EekModifierType alt_gr_mask;
}; };
G_DEFINE_TYPE_WITH_PRIVATE (EekKeyboard, eek_keyboard, EEK_TYPE_CONTAINER);
G_DEFINE_BOXED_TYPE(EekModifierKey, eek_modifier_key, G_DEFINE_BOXED_TYPE(EekModifierKey, eek_modifier_key,
eek_modifier_key_copy, eek_modifier_key_free); 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); GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GParamSpec *pspec; GParamSpec *pspec;
g_type_class_add_private (gobject_class,
sizeof (EekKeyboardPrivate));
klass->create_section = eek_keyboard_real_create_section; klass->create_section = eek_keyboard_real_create_section;
/* signals */ /* signals */

View File

@ -82,9 +82,9 @@ struct _EekboardContextServicePrivate {
GSettings *settings; 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 * static EekKeyboard *
eekboard_context_service_real_create_keyboard (EekboardContextService *self, 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); GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GParamSpec *pspec; GParamSpec *pspec;
g_type_class_add_private (gobject_class,
sizeof (EekboardContextServicePrivate));
klass->create_keyboard = eekboard_context_service_real_create_keyboard; klass->create_keyboard = eekboard_context_service_real_create_keyboard;
klass->show_keyboard = eekboard_context_service_real_show_keyboard; klass->show_keyboard = eekboard_context_service_real_show_keyboard;
klass->hide_keyboard = eekboard_context_service_real_hide_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 static gboolean
on_repeat_timeout (EekboardContextService *context) on_repeat_timeout (EekboardContextService *context)
@ -505,15 +503,15 @@ on_repeat_timeout (EekboardContextService *context)
static gboolean static gboolean
on_repeat_timeout_init (EekboardContextService *context) on_repeat_timeout_init (EekboardContextService *context)
{ {
/* FIXME: clear modifiers for further key repeat; better not // FIXME: clear modifiers for further key repeat; better not
depend on modifier behavior is LATCH */ // depend on modifier behavior is LATCH
eek_keyboard_set_modifiers (context->priv->keyboard, 0); eek_keyboard_set_modifiers (context->priv->keyboard, 0);
/* reschedule repeat timeout only when "repeat" option is set */ // reschedule repeat timeout only when "repeat" option is set
/* TODO: org.gnome.desktop.input-sources doesn't have repeat info. // TODO: org.gnome.desktop.input-sources doesn't have repeat info.
* In addition, repeat is only useful when the keyboard is not in text // In addition, repeat is only useful when the keyboard is not in text
* input mode */ // input mode
/*
if (g_settings_get_boolean (context->priv->settings, "repeat")) { if (g_settings_get_boolean (context->priv->settings, "repeat")) {
guint delay; guint delay;
@ -522,11 +520,11 @@ on_repeat_timeout_init (EekboardContextService *context)
g_timeout_add (delay, g_timeout_add (delay,
(GSourceFunc)on_repeat_timeout, (GSourceFunc)on_repeat_timeout,
context); context);
} else */ //} else
context->priv->repeat_timeout_id = 0; context->priv->repeat_timeout_id = 0;
return FALSE; return FALSE;
} }*/
/** /**
* eekboard_context_service_enable: * eekboard_context_service_enable:

View File

@ -78,11 +78,12 @@ replace_keycode (SeatEmitter *emitter,
guint keycode, guint keycode,
guint *keysym) guint *keysym)
{ {
GdkDisplay *display = gdk_display_get_default (); /* GdkDisplay *display = gdk_display_get_default ();
//Display *xdisplay = GDK_DISPLAY_XDISPLAY (display); Display *xdisplay = GDK_DISPLAY_XDISPLAY (display);
guint old_keysym; guint old_keysym;
int keysyms_per_keycode; int keysyms_per_keycode;
KeySym *syms; KeySym *syms;
*/
return TRUE; // FIXME: no xkb allocated at the moment, pretending all is fine return TRUE; // FIXME: no xkb allocated at the moment, pretending all is fine
g_return_val_if_fail (emitter->xkb->min_key_code <= keycode && g_return_val_if_fail (emitter->xkb->min_key_code <= keycode &&
keycode <= emitter->xkb->max_key_code, keycode <= emitter->xkb->max_key_code,