first attempt at keybindings tab
authorDana Jansens <danakj@orodu.net>
Thu, 31 May 2007 22:33:11 +0000 (22:33 +0000)
committerDana Jansens <danakj@orodu.net>
Thu, 31 May 2007 22:33:11 +0000 (22:33 +0000)
let you set the chain quit key. it even makes sure the key is valid!

Makefile.am
src/behavior.c
src/main.c
src/obconf.glade
src/strings.c

index f66313d..b87eb38 100644 (file)
@@ -51,6 +51,8 @@ src_obconf_SOURCES = \
        src/main.h \
        src/appearance.c \
        src/appearance.h \
+       src/keybindings.c \
+       src/keybindings.h \
        src/preview.c \
        src/preview.h \
        src/preview_update.c \
index e715c33..0fa8e74 100644 (file)
@@ -1,6 +1,6 @@
 /* -*- indent-tabs-mode: nil; tab-width: 4; c-basic-offset: 4; -*-
 
-   behavior.h for ObConf, the configuration tool for Openbox
+   behavior.c for ObConf, the configuration tool for Openbox
    Copyright (c) 2003-2007   Dana Jansens
    Copyright (c) 2003        Tim Riley
 
index c8008a2..db30665 100644 (file)
@@ -159,6 +159,7 @@ int main(int argc, char **argv)
     behavior_setup_tab();
     desktops_setup_tab();
     dock_setup_tab();
+    keybindings_setup_tab();
 
     mainwin = get_widget("main_window");
 
index 40a9fc9..f00235b 100644 (file)
@@ -3254,6 +3254,316 @@ C - The close button</property>
              <property name="type">tab</property>
            </packing>
          </child>
+
+         <child>
+           <widget class="GtkVBox" id="vbox45">
+             <property name="border_width">12</property>
+             <property name="visible">True</property>
+             <property name="homogeneous">False</property>
+             <property name="spacing">18</property>
+
+             <child>
+               <widget class="GtkVBox" id="vbox46">
+                 <property name="visible">True</property>
+                 <property name="homogeneous">False</property>
+                 <property name="spacing">6</property>
+
+                 <child>
+                   <widget class="GtkLabel" id="label112">
+                     <property name="visible">True</property>
+                     <property name="label" translatable="yes">&lt;span weight=&quot;bold&quot;&gt;Key Bindings&lt;/span&gt;</property>
+                     <property name="use_underline">False</property>
+                     <property name="use_markup">True</property>
+                     <property name="justify">GTK_JUSTIFY_LEFT</property>
+                     <property name="wrap">False</property>
+                     <property name="selectable">False</property>
+                     <property name="xalign">0</property>
+                     <property name="yalign">0.5</property>
+                     <property name="xpad">0</property>
+                     <property name="ypad">0</property>
+                     <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                     <property name="width_chars">-1</property>
+                     <property name="single_line_mode">False</property>
+                     <property name="angle">0</property>
+                   </widget>
+                   <packing>
+                     <property name="padding">0</property>
+                     <property name="expand">False</property>
+                     <property name="fill">False</property>
+                   </packing>
+                 </child>
+
+                 <child>
+                   <widget class="GtkHBox" id="hbox62">
+                     <property name="visible">True</property>
+                     <property name="homogeneous">False</property>
+                     <property name="spacing">0</property>
+
+                     <child>
+                       <widget class="GtkLabel" id="label113">
+                         <property name="visible">True</property>
+                         <property name="label" translatable="yes">    </property>
+                         <property name="use_underline">False</property>
+                         <property name="use_markup">False</property>
+                         <property name="justify">GTK_JUSTIFY_LEFT</property>
+                         <property name="wrap">False</property>
+                         <property name="selectable">False</property>
+                         <property name="xalign">0.5</property>
+                         <property name="yalign">0.5</property>
+                         <property name="xpad">0</property>
+                         <property name="ypad">0</property>
+                         <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                         <property name="width_chars">-1</property>
+                         <property name="single_line_mode">False</property>
+                         <property name="angle">0</property>
+                       </widget>
+                       <packing>
+                         <property name="padding">0</property>
+                         <property name="expand">False</property>
+                         <property name="fill">False</property>
+                       </packing>
+                     </child>
+
+                     <child>
+                       <widget class="GtkScrolledWindow" id="scrolledwindow4">
+                         <property name="visible">True</property>
+                         <property name="can_focus">True</property>
+                         <property name="hscrollbar_policy">GTK_POLICY_ALWAYS</property>
+                         <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
+                         <property name="shadow_type">GTK_SHADOW_IN</property>
+                         <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+                         <child>
+                           <widget class="GtkViewport" id="viewport1">
+                             <property name="visible">True</property>
+                             <property name="shadow_type">GTK_SHADOW_IN</property>
+
+                             <child>
+                               <widget class="GtkVBox" id="vbox47">
+                                 <property name="visible">True</property>
+                                 <property name="homogeneous">False</property>
+                                 <property name="spacing">0</property>
+
+                                 <child>
+                                   <widget class="GtkHBox" id="hbox63">
+                                     <property name="visible">True</property>
+                                     <property name="homogeneous">False</property>
+                                     <property name="spacing">0</property>
+
+                                     <child>
+                                       <widget class="GtkTreeView" id="key_bindings">
+                                         <property name="visible">True</property>
+                                         <property name="can_focus">True</property>
+                                         <property name="headers_visible">True</property>
+                                         <property name="rules_hint">False</property>
+                                         <property name="reorderable">False</property>
+                                         <property name="enable_search">True</property>
+                                         <property name="fixed_height_mode">False</property>
+                                         <property name="hover_selection">False</property>
+                                         <property name="hover_expand">False</property>
+                                       </widget>
+                                       <packing>
+                                         <property name="padding">0</property>
+                                         <property name="expand">True</property>
+                                         <property name="fill">True</property>
+                                       </packing>
+                                     </child>
+                                   </widget>
+                                   <packing>
+                                     <property name="padding">0</property>
+                                     <property name="expand">True</property>
+                                     <property name="fill">True</property>
+                                   </packing>
+                                 </child>
+                               </widget>
+                             </child>
+                           </widget>
+                         </child>
+                       </widget>
+                       <packing>
+                         <property name="padding">0</property>
+                         <property name="expand">True</property>
+                         <property name="fill">True</property>
+                       </packing>
+                     </child>
+                   </widget>
+                   <packing>
+                     <property name="padding">0</property>
+                     <property name="expand">True</property>
+                     <property name="fill">True</property>
+                   </packing>
+                 </child>
+               </widget>
+               <packing>
+                 <property name="padding">0</property>
+                 <property name="expand">True</property>
+                 <property name="fill">True</property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkVBox" id="vbox48">
+                 <property name="visible">True</property>
+                 <property name="homogeneous">False</property>
+                 <property name="spacing">6</property>
+
+                 <child>
+                   <widget class="GtkLabel" id="label114">
+                     <property name="visible">True</property>
+                     <property name="label" translatable="yes">&lt;span weight=&quot;bold&quot;&gt;Focusing Windows&lt;/span&gt;</property>
+                     <property name="use_underline">False</property>
+                     <property name="use_markup">True</property>
+                     <property name="justify">GTK_JUSTIFY_LEFT</property>
+                     <property name="wrap">False</property>
+                     <property name="selectable">False</property>
+                     <property name="xalign">0</property>
+                     <property name="yalign">0.5</property>
+                     <property name="xpad">0</property>
+                     <property name="ypad">0</property>
+                     <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                     <property name="width_chars">-1</property>
+                     <property name="single_line_mode">False</property>
+                     <property name="angle">0</property>
+                   </widget>
+                   <packing>
+                     <property name="padding">0</property>
+                     <property name="expand">False</property>
+                     <property name="fill">False</property>
+                   </packing>
+                 </child>
+
+                 <child>
+                   <widget class="GtkHBox" id="hbox64">
+                     <property name="visible">True</property>
+                     <property name="homogeneous">False</property>
+                     <property name="spacing">0</property>
+
+                     <child>
+                       <widget class="GtkLabel" id="label115">
+                         <property name="visible">True</property>
+                         <property name="label" translatable="yes">    </property>
+                         <property name="use_underline">False</property>
+                         <property name="use_markup">False</property>
+                         <property name="justify">GTK_JUSTIFY_LEFT</property>
+                         <property name="wrap">False</property>
+                         <property name="selectable">False</property>
+                         <property name="xalign">0.5</property>
+                         <property name="yalign">0.5</property>
+                         <property name="xpad">0</property>
+                         <property name="ypad">0</property>
+                         <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                         <property name="width_chars">-1</property>
+                         <property name="single_line_mode">False</property>
+                         <property name="angle">0</property>
+                       </widget>
+                       <packing>
+                         <property name="padding">0</property>
+                         <property name="expand">False</property>
+                         <property name="fill">False</property>
+                       </packing>
+                     </child>
+
+                     <child>
+                       <widget class="GtkHBox" id="hbox65">
+                         <property name="visible">True</property>
+                         <property name="homogeneous">False</property>
+                         <property name="spacing">3</property>
+
+                         <child>
+                           <widget class="GtkLabel" id="label116">
+                             <property name="visible">True</property>
+                             <property name="label" translatable="yes">Escape key chains:</property>
+                             <property name="use_underline">False</property>
+                             <property name="use_markup">False</property>
+                             <property name="justify">GTK_JUSTIFY_LEFT</property>
+                             <property name="wrap">False</property>
+                             <property name="selectable">False</property>
+                             <property name="xalign">0.5</property>
+                             <property name="yalign">0.5</property>
+                             <property name="xpad">0</property>
+                             <property name="ypad">0</property>
+                             <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                             <property name="width_chars">-1</property>
+                             <property name="single_line_mode">False</property>
+                             <property name="angle">0</property>
+                           </widget>
+                           <packing>
+                             <property name="padding">0</property>
+                             <property name="expand">False</property>
+                             <property name="fill">False</property>
+                           </packing>
+                         </child>
+
+                         <child>
+                           <widget class="GtkEntry" id="chain_quit_key">
+                             <property name="visible">True</property>
+                             <property name="can_focus">True</property>
+                             <property name="editable">True</property>
+                             <property name="visibility">True</property>
+                             <property name="max_length">0</property>
+                             <property name="text" translatable="yes"></property>
+                             <property name="has_frame">True</property>
+                             <property name="invisible_char">●</property>
+                             <property name="activates_default">False</property>
+                             <signal name="focus_out_event" handler="on_chain_quit_key_focus_out" after="yes" last_modification_time="Thu, 31 May 2007 22:14:24 GMT"/>
+                             <signal name="focus_in_event" handler="on_chain_quit_key_focus_in" after="yes" last_modification_time="Thu, 31 May 2007 22:15:25 GMT"/>
+                           </widget>
+                           <packing>
+                             <property name="padding">0</property>
+                             <property name="expand">True</property>
+                             <property name="fill">True</property>
+                           </packing>
+                         </child>
+                       </widget>
+                       <packing>
+                         <property name="padding">0</property>
+                         <property name="expand">True</property>
+                         <property name="fill">True</property>
+                       </packing>
+                     </child>
+                   </widget>
+                   <packing>
+                     <property name="padding">0</property>
+                     <property name="expand">True</property>
+                     <property name="fill">True</property>
+                   </packing>
+                 </child>
+               </widget>
+               <packing>
+                 <property name="padding">0</property>
+                 <property name="expand">False</property>
+                 <property name="fill">True</property>
+               </packing>
+             </child>
+           </widget>
+           <packing>
+             <property name="tab_expand">False</property>
+             <property name="tab_fill">True</property>
+           </packing>
+         </child>
+
+         <child>
+           <widget class="GtkLabel" id="label111">
+             <property name="visible">True</property>
+             <property name="label" translatable="yes">Key Bindings</property>
+             <property name="use_underline">False</property>
+             <property name="use_markup">False</property>
+             <property name="justify">GTK_JUSTIFY_LEFT</property>
+             <property name="wrap">False</property>
+             <property name="selectable">False</property>
+             <property name="xalign">0.5</property>
+             <property name="yalign">0.5</property>
+             <property name="xpad">0</property>
+             <property name="ypad">0</property>
+             <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+             <property name="width_chars">-1</property>
+             <property name="single_line_mode">False</property>
+             <property name="angle">0</property>
+           </widget>
+           <packing>
+             <property name="type">tab</property>
+           </packing>
+         </child>
        </widget>
        <packing>
          <property name="padding">0</property>
@@ -3477,4 +3787,74 @@ Tim Riley &lt;tr@slackzone.org&gt;</property>
   </child>
 </widget>
 
+<widget class="GtkWindow" id="key_prompt">
+  <property name="title" translatable="yes">window1</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
+  <property name="urgency_hint">False</property>
+
+  <child>
+    <widget class="GtkVBox" id="vbox49">
+      <property name="border_width">12</property>
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">18</property>
+
+      <child>
+       <widget class="GtkLabel" id="label117">
+         <property name="visible">True</property>
+         <property name="label" translatable="yes">&lt;span weight=&quot;bold&quot;&gt;Press the key you wish to bind...&lt;/span&gt;</property>
+         <property name="use_underline">False</property>
+         <property name="use_markup">True</property>
+         <property name="justify">GTK_JUSTIFY_LEFT</property>
+         <property name="wrap">False</property>
+         <property name="selectable">False</property>
+         <property name="xalign">0</property>
+         <property name="yalign">0.5</property>
+         <property name="xpad">0</property>
+         <property name="ypad">0</property>
+         <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+         <property name="width_chars">-1</property>
+         <property name="single_line_mode">False</property>
+         <property name="angle">0</property>
+       </widget>
+       <packing>
+         <property name="padding">0</property>
+         <property name="expand">False</property>
+         <property name="fill">False</property>
+       </packing>
+      </child>
+
+      <child>
+       <widget class="GtkEntry" id="entry2">
+         <property name="visible">True</property>
+         <property name="can_focus">True</property>
+         <property name="has_focus">True</property>
+         <property name="editable">True</property>
+         <property name="visibility">True</property>
+         <property name="max_length">0</property>
+         <property name="text" translatable="yes"></property>
+         <property name="has_frame">True</property>
+         <property name="invisible_char">●</property>
+         <property name="activates_default">False</property>
+       </widget>
+       <packing>
+         <property name="padding">0</property>
+         <property name="expand">False</property>
+         <property name="fill">False</property>
+       </packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
 </glade-interface>
index 05ebde4..405e1b4 100644 (file)
@@ -97,6 +97,12 @@ gchar *s = N_("    ");
 gchar *s = N_("Delay before _showing:");
 gchar *s = N_("ms");
 gchar *s = N_("Dock");
+gchar *s = N_("<span weight=\"bold\">Key Bindings</span>");
+gchar *s = N_("    ");
+gchar *s = N_("<span weight=\"bold\">Focusing Windows</span>");
+gchar *s = N_("    ");
+gchar *s = N_("Escape key chains:");
+gchar *s = N_("Key Bindings");
 gchar *s = N_("Abo_ut");
 gchar *s = N_("About ObConf");
 gchar *s = N_("<span weight=\"bold\" size=\"xx-large\">ObConf VERSION</span>");
@@ -104,3 +110,5 @@ gchar *s = N_("A preferences manager for Openbox");
 gchar *s = N_("Copyright (c) 2003-2007\n"
               "Dana Jansens <danakj@orodu.net>\n"
               "Tim Riley <tr@slackzone.org>");
+gchar *s = N_("window1");
+gchar *s = N_("<span weight=\"bold\">Press the key you wish to bind...</span>");