From ae3dac12ca8372c9b636c9bc0b7c6d6191e7ad76 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Sun, 22 Jul 2007 15:45:49 -0400 Subject: [PATCH] applying patch for editing key bindings in obconf this patch crashes from unexpected input though, and it needs to be updated a little for 3.4.3 --- Makefile.am | 6 +- src/main.c | 2 + src/obconf.glade | 411 +++++++++++++++++++++++++++++++++++++++-------- src/strings.c | 15 +- 4 files changed, 361 insertions(+), 73 deletions(-) diff --git a/Makefile.am b/Makefile.am index 369ec3d..c31f2da 100644 --- a/Makefile.am +++ b/Makefile.am @@ -64,7 +64,11 @@ src_obconf_SOURCES = \ src/theme.c \ src/theme.h \ src/tree.c \ - src/tree.h + src/tree.h \ + src/actions.c \ + src/actions.h \ + src/keyboard.c \ + src/keyboard.h dist_glade_DATA = \ src/obconf.glade \ diff --git a/src/main.c b/src/main.c index 5769384..0df0be2 100644 --- a/src/main.c +++ b/src/main.c @@ -27,6 +27,7 @@ #include "desktops.h" #include "dock.h" #include "preview_update.h" +#include "keyboard.h" #include "gettext.h" #include @@ -169,6 +170,7 @@ int main(int argc, char **argv) desktops_setup_tab(); margins_setup_tab(); dock_setup_tab(); + keyboard_setup_tab(); mainwin = get_widget("main_window"); diff --git a/src/obconf.glade b/src/obconf.glade index 230bbbe..eba96a0 100644 --- a/src/obconf.glade +++ b/src/obconf.glade @@ -5909,6 +5909,347 @@ Omnipresent (On all desktops) tab + + + + True + False + 0 + + + + 12 + True + False + 6 + + + + True + <span weight="bold">Key Bindings</span> + False + True + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + True + False + 0 + + + + True + + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + True + False + 0 + + + + True + False + 6 + + + + True + Chain Quit Key: + True + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + title_layout + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + True + Press <Return> followed by the keybinding you wish to set + True + GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK + False + True + 0 + + True + * + False + + + + 0 + True + True + + + + + 0 + False + True + + + + + + True + Bindings: + True + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + desktop_names + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + True + GTK_ORIENTATION_HORIZONTAL + GTK_TOOLBAR_BOTH + True + True + + + + True + New Keybinding + gtk-new + True + True + False + + + + False + True + + + + + + True + Edit Keybinding + gtk-edit + True + True + False + + + + False + True + + + + + + True + Add Keychain + Add Chain + True + gtk-add + True + True + False + + + + False + True + + + + + + True + Add Action + Add Action + True + gtk-add + True + True + False + + + + False + True + + + + + + True + Delete Selected Keybinding/Chain/Action + gtk-delete + True + True + False + + + + False + True + + + + + 0 + False + False + + + + + + True + True + GTK_POLICY_NEVER + GTK_POLICY_AUTOMATIC + GTK_SHADOW_IN + GTK_CORNER_TOP_LEFT + + + + True + True + True + True + False + True + False + False + False + + + + + 0 + True + True + + + + + 0 + True + True + + + + + 0 + True + True + + + + + 0 + True + True + + + + + False + True + + + + + + True + Key Bindings + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + tab + + 0 @@ -6133,74 +6474,4 @@ Javeed Shaikh <syscrash2k@gmail.com> - - window1 - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - False - True - False - True - False - False - GDK_WINDOW_TYPE_HINT_NORMAL - GDK_GRAVITY_NORTH_WEST - True - False - - - - 12 - True - False - 18 - - - - True - <span weight="bold">Press the key you wish to bind...</span> - False - True - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - True - True - True - True - True - 0 - - True - ● - False - - - 0 - False - False - - - - - - diff --git a/src/strings.c b/src/strings.c index bbc8d6e..acb387c 100644 --- a/src/strings.c +++ b/src/strings.c @@ -167,6 +167,19 @@ gchar *s = N_(" "); gchar *s = N_("Delay before _showing:"); gchar *s = N_("ms"); gchar *s = N_("Dock"); +gchar *s = N_("Key Bindings"); +gchar *s = N_(" "); +gchar *s = N_("Chain Quit Key:"); +gchar *s = N_("Press followed by the keybinding you wish to set"); +gchar *s = N_("Bindings:"); +gchar *s = N_("New Keybinding"); +gchar *s = N_("Edit Keybinding"); +gchar *s = N_("Add Keychain"); +gchar *s = N_("Add Chain"); +gchar *s = N_("Add Action"); +gchar *s = N_("Add Action"); +gchar *s = N_("Delete Selected Keybinding/Chain/Action"); +gchar *s = N_("Key Bindings"); gchar *s = N_("Abo_ut"); gchar *s = N_("About ObConf"); gchar *s = N_("ObConf VERSION"); @@ -175,5 +188,3 @@ gchar *s = N_("Copyright (c) 2003-2008\n" "Dana Jansens \n" "Tim Riley \n" "Javeed Shaikh "); -gchar *s = N_("window1"); -gchar *s = N_("Press the key you wish to bind..."); -- 2.34.1