Fix missing libkeybinder initialization (keybinding did not work).
authorAndriy Grytsenko <andrej@rep.kiev.ua>
Sat, 22 Oct 2016 20:57:34 +0000 (23:57 +0300)
committerAndriy Grytsenko <andrej@rep.kiev.ua>
Sat, 22 Oct 2016 20:57:34 +0000 (23:57 +0300)
ChangeLog
src/Makefile.am
src/input-button.c
src/main.c

index c9f9901..bf7e815 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -43,6 +43,7 @@
     via 'CardNumber' setting.
 * Added hotkey support into 'volume' plugin to be able to use multimedia
     keys for volume changing directly by plugin.
+* Fixed missing libkeybinder initialization (keybinding did not work).
 
 0.8.2
 -------------------------------------------------------------------------
index 4d65ed2..2e9a266 100644 (file)
@@ -10,6 +10,7 @@ lxpanel_CPPFLAGS = \
        -DPACKAGE_BIN_DIR=\""$(bindir)"\" \
        -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
        $(PACKAGE_CFLAGS) \
+       $(KEYBINDER_CFLAGS) \
        $(G_CAST_CHECKS)
 
 BUILTIN_PLUGINS = $(top_builddir)/plugins/libbuiltin_plugins.a
@@ -20,7 +21,7 @@ endif
 
 pkglib_LTLIBRARIES = liblxpanel.la
 
-liblxpanel_la_CPPFLAGS = $(lxpanel_CPPFLAGS) $(KEYBINDER_CFLAGS)
+liblxpanel_la_CPPFLAGS = $(lxpanel_CPPFLAGS)
 liblxpanel_la_SOURCES = \
        misc.c \
        configurator.c \
@@ -67,6 +68,7 @@ lxpanel_LDADD = \
                liblxpanel.la \
                $(BUILTIN_PLUGINS) \
                $(PACKAGE_LIBS) \
+               $(KEYBINDER_LIBS) \
                $(X11_LIBS)
 
 lxpanelctl_SOURCES = lxpanelctl.c lxpanelctl.h
index 44f2020..27e52ca 100644 (file)
@@ -131,6 +131,12 @@ static void _button_set_click_label(GtkButton *btn, guint keyval, GdkModifierTyp
 
     mod_text = gtk_accelerator_get_label(0, state);
     btn_text = gdk_keyval_name(keyval);
+    if (btn_text == NULL)
+    {
+        gtk_button_set_label(btn, "");
+        g_free(mod_text);
+        return;
+    }
     switch (btn_text[0])
     {
     case '1':
index 778bb8b..320ac6a 100644 (file)
@@ -47,6 +47,7 @@
 #include <string.h>
 #include <gdk/gdkx.h>
 #include <libfm/fm-gtk.h>
+#include <keybinder.h>
 
 #define __LXPANEL_INTERNALS__
 
@@ -477,6 +478,7 @@ int main(int argc, char *argv[], char *env[])
     gdk_threads_enter(); */
 
     gtk_init(&argc, &argv);
+    keybinder_init();
 
 #ifdef ENABLE_NLS
     bindtextdomain ( GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR );