move mouse focus options to mouse tab
authorDana Jansens <danakj@orodu.net>
Fri, 1 Jun 2007 02:13:49 +0000 (02:13 +0000)
committerDana Jansens <danakj@orodu.net>
Fri, 1 Jun 2007 02:13:49 +0000 (02:13 +0000)
src/mouse.c
src/obconf.glade
src/strings.c
src/windows.c

index 95d7f85..940f989 100644 (file)
@@ -32,6 +32,7 @@ static gint read_doubleclick_action();
 static void write_doubleclick_action(gint a);
 static void on_titlebar_doubleclick_custom_activate(GtkMenuItem *w,
                                                     gpointer data);
+static void enable_stuff();
 
 void mouse_setup_tab()
 {
@@ -53,6 +54,22 @@ void mouse_setup_tab()
     gtk_size_group_add_widget(group, w1);
     gtk_size_group_add_widget(group, w2);
 
+    w = get_widget("focus_mouse");
+    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(w),
+                                 tree_get_bool("focus/followMouse", FALSE));
+
+    w = get_widget("focus_delay");
+    gtk_spin_button_set_value(GTK_SPIN_BUTTON(w),
+                              tree_get_int("focus/focusDelay", 0));
+
+    w = get_widget("focus_raise");
+    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(w),
+                                 tree_get_bool("focus/raiseOnFocus", FALSE));
+
+    w = get_widget("focus_last");
+    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(w),
+                                 tree_get_bool("focus/focusLast", FALSE));
+
     w = get_widget("doubleclick_time");
     gtk_spin_button_set_value(GTK_SPIN_BUTTON(w),
                               tree_get_int("mouse/doubleClickTime", 200));
@@ -75,9 +92,64 @@ void mouse_setup_tab()
     }
     gtk_option_menu_set_history(GTK_OPTION_MENU(w), a);
 
+    enable_stuff();
+
     mapping = FALSE;
 }
 
+static void enable_stuff()
+{
+    GtkWidget *w;
+    gboolean b;
+
+    w = get_widget("focus_mouse");
+    b = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w));
+
+    w = get_widget("focus_delay");
+    gtk_widget_set_sensitive(w, b);
+    w = get_widget("focus_delay_label");
+    gtk_widget_set_sensitive(w, b);
+    w = get_widget("focus_delay_label_units");
+    gtk_widget_set_sensitive(w, b);
+    w = get_widget("focus_raise");
+    gtk_widget_set_sensitive(w, b);
+    w = get_widget("focus_last");
+    gtk_widget_set_sensitive(w, b);
+}
+
+void on_focus_mouse_toggled(GtkToggleButton *w, gpointer data)
+{
+    gboolean b;
+
+    if (mapping) return;
+
+    b = gtk_toggle_button_get_active(w);
+    tree_set_bool("focus/followMouse", b);
+
+    enable_stuff();
+}
+
+void on_focus_delay_value_changed(GtkSpinButton *w, gpointer data)
+{
+    if (mapping) return;
+
+    tree_set_int("focus/focusDelay", gtk_spin_button_get_value_as_int(w));
+}
+
+void on_focus_raise_toggled(GtkToggleButton *w, gpointer data)
+{
+    if (mapping) return;
+
+    tree_set_bool("focus/raiseOnFocus", gtk_toggle_button_get_active(w));
+}
+
+void on_focus_last_toggled(GtkToggleButton *w, gpointer data)
+{
+    if (mapping) return;
+
+    tree_set_bool("focus/focusLast", gtk_toggle_button_get_active(w));
+}
+
 void on_titlebar_doubleclick_maximize_activate(GtkMenuItem *w, gpointer data)
 {
     if (mapping) return;
index 44183d1..3ac3ce5 100644 (file)
@@ -1011,13 +1011,13 @@ C - The close button</property>
              <property name="spacing">18</property>
 
              <child>
-               <widget class="GtkVBox" id="vbox13">
+               <widget class="GtkVBox" id="vbox65">
                  <property name="visible">True</property>
                  <property name="homogeneous">False</property>
                  <property name="spacing">6</property>
 
                  <child>
-                   <widget class="GtkLabel" id="label32">
+                   <widget class="GtkLabel" id="label164">
                      <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>
@@ -1042,13 +1042,13 @@ C - The close button</property>
                  </child>
 
                  <child>
-                   <widget class="GtkHBox" id="hbox13">
+                   <widget class="GtkHBox" id="hbox89">
                      <property name="visible">True</property>
                      <property name="homogeneous">False</property>
                      <property name="spacing">0</property>
 
                      <child>
-                       <widget class="GtkLabel" id="label33">
+                       <widget class="GtkLabel" id="label165">
                          <property name="visible">True</property>
                          <property name="label" translatable="yes">    </property>
                          <property name="use_underline">False</property>
@@ -1073,206 +1073,11 @@ C - The close button</property>
                      </child>
 
                      <child>
-                       <widget class="GtkVBox" id="vbox15">
+                       <widget class="GtkVBox" id="vbox66">
                          <property name="visible">True</property>
                          <property name="homogeneous">False</property>
                          <property name="spacing">6</property>
 
-                         <child>
-                           <widget class="GtkCheckButton" id="focus_mouse">
-                             <property name="visible">True</property>
-                             <property name="can_focus">True</property>
-                             <property name="label" translatable="yes">_Focus windows when the mouse pointer moves over them</property>
-                             <property name="use_underline">True</property>
-                             <property name="relief">GTK_RELIEF_NORMAL</property>
-                             <property name="focus_on_click">True</property>
-                             <property name="active">False</property>
-                             <property name="inconsistent">False</property>
-                             <property name="draw_indicator">True</property>
-                             <signal name="toggled" handler="on_focus_mouse_toggled" after="yes" last_modification_time="Sun, 14 Sep 2003 11:24:01 GMT"/>
-                           </widget>
-                           <packing>
-                             <property name="padding">0</property>
-                             <property name="expand">False</property>
-                             <property name="fill">False</property>
-                           </packing>
-                         </child>
-
-                         <child>
-                           <widget class="GtkHBox" id="hbox32">
-                             <property name="visible">True</property>
-                             <property name="homogeneous">False</property>
-                             <property name="spacing">0</property>
-
-                             <child>
-                               <widget class="GtkLabel" id="label65">
-                                 <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="GtkVBox" id="vbox25">
-                                 <property name="visible">True</property>
-                                 <property name="homogeneous">False</property>
-                                 <property name="spacing">6</property>
-
-                                 <child>
-                                   <widget class="GtkCheckButton" id="focus_raise">
-                                     <property name="visible">True</property>
-                                     <property name="can_focus">True</property>
-                                     <property name="label" translatable="yes">_Raise windows when the mouse pointer moves over them</property>
-                                     <property name="use_underline">True</property>
-                                     <property name="relief">GTK_RELIEF_NORMAL</property>
-                                     <property name="focus_on_click">True</property>
-                                     <property name="active">False</property>
-                                     <property name="inconsistent">False</property>
-                                     <property name="draw_indicator">True</property>
-                                     <signal name="toggled" handler="on_focus_raise_toggled" after="yes" last_modification_time="Mon, 22 Sep 2003 06:37:32 GMT"/>
-                                   </widget>
-                                   <packing>
-                                     <property name="padding">0</property>
-                                     <property name="expand">False</property>
-                                     <property name="fill">False</property>
-                                   </packing>
-                                 </child>
-
-                                 <child>
-                                   <widget class="GtkHBox" id="hbox16">
-                                     <property name="visible">True</property>
-                                     <property name="homogeneous">False</property>
-                                     <property name="spacing">6</property>
-
-                                     <child>
-                                       <widget class="GtkLabel" id="focus_delay_label">
-                                         <property name="visible">True</property>
-                                         <property name="label" translatable="yes">_Delay before focusing and raising windows:</property>
-                                         <property name="use_underline">True</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="mnemonic_widget">focus_delay</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="GtkSpinButton" id="focus_delay">
-                                         <property name="visible">True</property>
-                                         <property name="can_focus">True</property>
-                                         <property name="climb_rate">1</property>
-                                         <property name="digits">0</property>
-                                         <property name="numeric">True</property>
-                                         <property name="update_policy">GTK_UPDATE_ALWAYS</property>
-                                         <property name="snap_to_ticks">False</property>
-                                         <property name="wrap">False</property>
-                                         <property name="adjustment">0 0 10000 10 10 10</property>
-                                         <signal name="value_changed" handler="on_focus_delay_value_changed" after="yes" last_modification_time="Sun, 14 Sep 2003 11:24:28 GMT"/>
-                                       </widget>
-                                       <packing>
-                                         <property name="padding">0</property>
-                                         <property name="expand">False</property>
-                                         <property name="fill">True</property>
-                                       </packing>
-                                     </child>
-
-                                     <child>
-                                       <widget class="GtkLabel" id="focus_delay_label_units">
-                                         <property name="visible">True</property>
-                                         <property name="label" translatable="yes">ms</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>
-                                   </widget>
-                                   <packing>
-                                     <property name="padding">0</property>
-                                     <property name="expand">True</property>
-                                     <property name="fill">True</property>
-                                   </packing>
-                                 </child>
-
-                                 <child>
-                                   <widget class="GtkCheckButton" id="focus_last">
-                                     <property name="visible">True</property>
-                                     <property name="can_focus">True</property>
-                                     <property name="label" translatable="yes">_Give focus to the last used window when switching desktops</property>
-                                     <property name="use_underline">True</property>
-                                     <property name="relief">GTK_RELIEF_NORMAL</property>
-                                     <property name="focus_on_click">True</property>
-                                     <property name="active">False</property>
-                                     <property name="inconsistent">False</property>
-                                     <property name="draw_indicator">True</property>
-                                     <signal name="toggled" handler="on_focus_last_toggled" last_modification_time="Fri, 25 May 2007 18:54:28 GMT"/>
-                                   </widget>
-                                   <packing>
-                                     <property name="padding">0</property>
-                                     <property name="expand">False</property>
-                                     <property name="fill">False</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">False</property>
-                           </packing>
-                         </child>
-
                          <child>
                            <widget class="GtkCheckButton" id="focus_new">
                              <property name="visible">True</property>
@@ -1302,7 +1107,7 @@ C - The close button</property>
                    </widget>
                    <packing>
                      <property name="padding">0</property>
-                     <property name="expand">False</property>
+                     <property name="expand">True</property>
                      <property name="fill">True</property>
                    </packing>
                  </child>
@@ -1736,6 +1541,290 @@ C - The close button</property>
              <property name="homogeneous">False</property>
              <property name="spacing">18</property>
 
+             <child>
+               <widget class="GtkVBox" id="vbox13">
+                 <property name="visible">True</property>
+                 <property name="homogeneous">False</property>
+                 <property name="spacing">6</property>
+
+                 <child>
+                   <widget class="GtkLabel" id="label32">
+                     <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="hbox13">
+                     <property name="visible">True</property>
+                     <property name="homogeneous">False</property>
+                     <property name="spacing">0</property>
+
+                     <child>
+                       <widget class="GtkLabel" id="label33">
+                         <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="GtkVBox" id="vbox15">
+                         <property name="visible">True</property>
+                         <property name="homogeneous">False</property>
+                         <property name="spacing">6</property>
+
+                         <child>
+                           <widget class="GtkCheckButton" id="focus_mouse">
+                             <property name="visible">True</property>
+                             <property name="can_focus">True</property>
+                             <property name="label" translatable="yes">_Focus windows when the mouse pointer moves over them</property>
+                             <property name="use_underline">True</property>
+                             <property name="relief">GTK_RELIEF_NORMAL</property>
+                             <property name="focus_on_click">True</property>
+                             <property name="active">False</property>
+                             <property name="inconsistent">False</property>
+                             <property name="draw_indicator">True</property>
+                             <signal name="toggled" handler="on_focus_mouse_toggled" after="yes" last_modification_time="Sun, 14 Sep 2003 11:24:01 GMT"/>
+                           </widget>
+                           <packing>
+                             <property name="padding">0</property>
+                             <property name="expand">False</property>
+                             <property name="fill">False</property>
+                           </packing>
+                         </child>
+
+                         <child>
+                           <widget class="GtkHBox" id="hbox32">
+                             <property name="visible">True</property>
+                             <property name="homogeneous">False</property>
+                             <property name="spacing">0</property>
+
+                             <child>
+                               <widget class="GtkLabel" id="label65">
+                                 <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="GtkVBox" id="vbox25">
+                                 <property name="visible">True</property>
+                                 <property name="homogeneous">False</property>
+                                 <property name="spacing">6</property>
+
+                                 <child>
+                                   <widget class="GtkCheckButton" id="focus_raise">
+                                     <property name="visible">True</property>
+                                     <property name="can_focus">True</property>
+                                     <property name="label" translatable="yes">_Raise windows when the mouse pointer moves over them</property>
+                                     <property name="use_underline">True</property>
+                                     <property name="relief">GTK_RELIEF_NORMAL</property>
+                                     <property name="focus_on_click">True</property>
+                                     <property name="active">False</property>
+                                     <property name="inconsistent">False</property>
+                                     <property name="draw_indicator">True</property>
+                                     <signal name="toggled" handler="on_focus_raise_toggled" after="yes" last_modification_time="Mon, 22 Sep 2003 06:37:32 GMT"/>
+                                   </widget>
+                                   <packing>
+                                     <property name="padding">0</property>
+                                     <property name="expand">False</property>
+                                     <property name="fill">False</property>
+                                   </packing>
+                                 </child>
+
+                                 <child>
+                                   <widget class="GtkHBox" id="hbox16">
+                                     <property name="visible">True</property>
+                                     <property name="homogeneous">False</property>
+                                     <property name="spacing">6</property>
+
+                                     <child>
+                                       <widget class="GtkLabel" id="focus_delay_label">
+                                         <property name="visible">True</property>
+                                         <property name="label" translatable="yes">_Delay before focusing and raising windows:</property>
+                                         <property name="use_underline">True</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="mnemonic_widget">focus_delay</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="GtkSpinButton" id="focus_delay">
+                                         <property name="visible">True</property>
+                                         <property name="can_focus">True</property>
+                                         <property name="climb_rate">1</property>
+                                         <property name="digits">0</property>
+                                         <property name="numeric">True</property>
+                                         <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+                                         <property name="snap_to_ticks">False</property>
+                                         <property name="wrap">False</property>
+                                         <property name="adjustment">0 0 10000 10 10 10</property>
+                                         <signal name="value_changed" handler="on_focus_delay_value_changed" after="yes" last_modification_time="Sun, 14 Sep 2003 11:24:28 GMT"/>
+                                       </widget>
+                                       <packing>
+                                         <property name="padding">0</property>
+                                         <property name="expand">False</property>
+                                         <property name="fill">True</property>
+                                       </packing>
+                                     </child>
+
+                                     <child>
+                                       <widget class="GtkLabel" id="focus_delay_label_units">
+                                         <property name="visible">True</property>
+                                         <property name="label" translatable="yes">ms</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>
+                                   </widget>
+                                   <packing>
+                                     <property name="padding">0</property>
+                                     <property name="expand">True</property>
+                                     <property name="fill">True</property>
+                                   </packing>
+                                 </child>
+
+                                 <child>
+                                   <widget class="GtkCheckButton" id="focus_last">
+                                     <property name="visible">True</property>
+                                     <property name="can_focus">True</property>
+                                     <property name="label" translatable="yes">_Give focus to the last used window when switching desktops</property>
+                                     <property name="use_underline">True</property>
+                                     <property name="relief">GTK_RELIEF_NORMAL</property>
+                                     <property name="focus_on_click">True</property>
+                                     <property name="active">False</property>
+                                     <property name="inconsistent">False</property>
+                                     <property name="draw_indicator">True</property>
+                                     <signal name="toggled" handler="on_focus_last_toggled" last_modification_time="Fri, 25 May 2007 18:54:28 GMT"/>
+                                   </widget>
+                                   <packing>
+                                     <property name="padding">0</property>
+                                     <property name="expand">False</property>
+                                     <property name="fill">False</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">False</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="padding">0</property>
+                 <property name="expand">False</property>
+                 <property name="fill">True</property>
+               </packing>
+             </child>
+
              <child>
                <widget class="GtkVBox" id="vbox61">
                  <property name="visible">True</property>
index 9047994..67255f0 100644 (file)
@@ -33,12 +33,6 @@ gchar *s = N_("_On-screen display: ");
 gchar *s = N_("Appearance");
 gchar *s = N_("<span weight=\"bold\">Focusing Windows</span>");
 gchar *s = N_("    ");
-gchar *s = N_("_Focus windows when the mouse pointer moves over them");
-gchar *s = N_("    ");
-gchar *s = N_("_Raise windows when the mouse pointer moves over them");
-gchar *s = N_("_Delay before focusing and raising windows:");
-gchar *s = N_("ms");
-gchar *s = N_("_Give focus to the last used window when switching desktops");
 gchar *s = N_("Focus _new windows when they appear");
 gchar *s = N_("<span weight=\"bold\">Placing Windows</span>");
 gchar *s = N_("    ");
@@ -51,6 +45,14 @@ gchar *s = N_("px");
 gchar *s = N_("Amount of resistance against screen _edges:");
 gchar *s = N_("px");
 gchar *s = N_("Windows");
+gchar *s = N_("<span weight=\"bold\">Focusing Windows</span>");
+gchar *s = N_("    ");
+gchar *s = N_("_Focus windows when the mouse pointer moves over them");
+gchar *s = N_("    ");
+gchar *s = N_("_Raise windows when the mouse pointer moves over them");
+gchar *s = N_("_Delay before focusing and raising windows:");
+gchar *s = N_("ms");
+gchar *s = N_("_Give focus to the last used window when switching desktops");
 gchar *s = N_("<span weight=\"bold\">Titlebar</span>");
 gchar *s = N_("    ");
 gchar *s = N_("_Double click on the titlebar:");
index 898523a..dc690a1 100644 (file)
@@ -22,8 +22,6 @@
 
 static gboolean mapping = FALSE;
 
-static void windows_enable_stuff();
-
 void windows_setup_tab()
 {
     GtkWidget *w, *w1, *w2;
@@ -44,22 +42,6 @@ void windows_setup_tab()
     gtk_size_group_add_widget(group, w1);
     gtk_size_group_add_widget(group, w2);
 
-    w = get_widget("focus_mouse");
-    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(w),
-                                 tree_get_bool("focus/followMouse", FALSE));
-
-    w = get_widget("focus_delay");
-    gtk_spin_button_set_value(GTK_SPIN_BUTTON(w),
-                              tree_get_int("focus/focusDelay", 0));
-
-    w = get_widget("focus_raise");
-    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(w),
-                                 tree_get_bool("focus/raiseOnFocus", FALSE));
-
-    w = get_widget("focus_last");
-    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(w),
-                                 tree_get_bool("focus/focusLast", FALSE));
-
     w = get_widget("focus_new");
     gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(w),
                                  tree_get_bool("focus/focusNew", TRUE));
@@ -83,65 +65,9 @@ void windows_setup_tab()
                                  !g_ascii_strcasecmp(s, "UnderMouse"));
     g_free(s);
 
-    windows_enable_stuff();
-
     mapping = FALSE;
 }
 
-static void windows_enable_stuff()
-{
-    GtkWidget *w;
-    gboolean b;
-
-    w = get_widget("focus_mouse");
-    b = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w));
-
-    w = get_widget("focus_delay");
-    gtk_widget_set_sensitive(w, b);
-    w = get_widget("focus_delay_label");
-    gtk_widget_set_sensitive(w, b);
-    w = get_widget("focus_delay_label_units");
-    gtk_widget_set_sensitive(w, b);
-    w = get_widget("focus_raise");
-    gtk_widget_set_sensitive(w, b);
-    w = get_widget("focus_last");
-    gtk_widget_set_sensitive(w, b);
-}
-
-void on_focus_mouse_toggled(GtkToggleButton *w, gpointer data)
-{
-    gboolean b;
-
-    if (mapping) return;
-
-    b = gtk_toggle_button_get_active(w);
-    tree_set_bool("focus/followMouse", b);
-
-    windows_enable_stuff();
-}
-
-void on_focus_delay_value_changed(GtkSpinButton *w, gpointer data)
-{
-    if (mapping) return;
-
-    tree_set_int("focus/focusDelay",
-                 gtk_spin_button_get_value_as_int(w));
-}
-
-void on_focus_raise_toggled(GtkToggleButton *w, gpointer data)
-{
-    if (mapping) return;
-
-    tree_set_bool("focus/raiseOnFocus", gtk_toggle_button_get_active(w));
-}
-
-void on_focus_last_toggled(GtkToggleButton *w, gpointer data)
-{
-    if (mapping) return;
-
-    tree_set_bool("focus/focusLast", gtk_toggle_button_get_active(w));
-}
-
 void on_focus_new_toggled(GtkToggleButton *w, gpointer data)
 {
     if (mapping) return;