From a9fb7be42f1efa3825a0c19fe2083b751ea331fe Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Sun, 3 Jun 2007 19:34:29 +0000 Subject: [PATCH] add the underMouse option, and change the focusLast option, reverse it --- po/sv.po | 43 +++++++++++++++++++--------------- src/mouse.c | 23 +++++++++++++++---- src/obconf.glade | 60 ++++++++++++++++++++++++++++++++---------------- src/strings.c | 3 ++- 4 files changed, 85 insertions(+), 44 deletions(-) diff --git a/po/sv.po b/po/sv.po index 34256e8..9196425 100644 --- a/po/sv.po +++ b/po/sv.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: obconf 2.0.0\n" "Report-Msgid-Bugs-To: http://bugzilla.icculus.org/\n" -"POT-Creation-Date: 2007-06-01 13:39+0200\n" +"POT-Creation-Date: 2007-06-03 15:36-0400\n" "PO-Revision-Date: 2007-06-01 13:41+0200\n" "Last-Translator: \n" "Language-Team: Swedish\n" @@ -26,10 +26,9 @@ msgstr "Tema" #: src/strings.c:9 src/strings.c:14 src/strings.c:18 src/strings.c:28 #: src/strings.c:36 src/strings.c:39 src/strings.c:42 src/strings.c:48 -#: src/strings.c:58 src/strings.c:61 src/strings.c:63 src/strings.c:69 -#: src/strings.c:75 src/strings.c:78 src/strings.c:83 src/strings.c:94 -#: src/strings.c:97 src/strings.c:103 src/strings.c:108 src/strings.c:110 -#: src/strings.c:113 +#: src/strings.c:60 src/strings.c:62 src/strings.c:69 src/strings.c:75 +#: src/strings.c:78 src/strings.c:83 src/strings.c:94 src/strings.c:97 +#: src/strings.c:103 src/strings.c:108 src/strings.c:110 src/strings.c:113 msgid " " msgstr " " @@ -111,7 +110,7 @@ msgstr "_Popupfönster" msgid "Appearance" msgstr "Utseende" -#: src/strings.c:35 src/strings.c:60 +#: src/strings.c:35 src/strings.c:59 msgid "Focusing Windows" msgstr "Fönsterfokus" @@ -129,7 +128,8 @@ msgstr "_Placera nya fönster under muspekaren" #: src/strings.c:41 msgid "Moving and Resizing Windows" -msgstr "Förflyttning och Storleksändring av Fönster" +msgstr "" +"Förflyttning och Storleksändring av Fönster" #: src/strings.c:43 msgid "Update the window contents while _resizing" @@ -179,30 +179,35 @@ msgstr "Motstånd mot andra _fönster:" msgid "Amount of resistance against screen _edges:" msgstr "Motstånd mot _skärmkanten" -#: src/strings.c:59 +#: src/strings.c:58 msgid "Windows" msgstr "Fönster" -#: src/strings.c:62 +#: src/strings.c:61 msgid "_Focus windows when the mouse pointer moves over them" msgstr "_Fokusera fönster när muspekaren flyttas in över dem" +#: src/strings.c:63 +#, fuzzy +msgid "Move focus under the mouse when _switching desktops" +msgstr "_Ge fokus till det senast använda fönstret vid skrivbordsändring" + #: src/strings.c:64 +msgid "Move focus _under the mouse when the mouse is not moving" +msgstr "" + +#: src/strings.c:65 msgid "_Raise windows when the mouse pointer moves over them" msgstr "Lägg fönste_r överst när muspekaren flyttas in över dem" -#: src/strings.c:65 +#: src/strings.c:66 msgid "_Delay before focusing and raising windows:" msgstr "För_dröjning innan fönster fokuseras och läggs överst" -#: src/strings.c:66 src/strings.c:74 src/strings.c:112 src/strings.c:115 +#: src/strings.c:67 src/strings.c:74 src/strings.c:112 src/strings.c:115 msgid "ms" msgstr "ms" -#: src/strings.c:67 -msgid "_Give focus to the last used window when switching desktops" -msgstr "_Ge fokus till det senast använda fönstret vid skrivbordsändring" - #: src/strings.c:68 msgid "Titlebar" msgstr "Titelrad" @@ -405,7 +410,8 @@ msgstr " --version Visa version och avsluta\n" #: src/main.c:83 msgid " --install ARCHIVE.obt Install the given theme archive and select it\n" -msgstr " --install ARKIV.obt Installera det givna temaarkivet och välj det\n" +msgstr "" +" --install ARKIV.obt Installera det givna temaarkivet och välj det\n" #: src/main.c:84 msgid "" @@ -504,10 +510,11 @@ msgid "" "%s" msgstr "" "Kunde inte extrahera filen \"%s\".\n" -"Verifiera att \"%s\" är skrivbar och att filen är ett giltigt Openboxtema-arkiv.\n" +"Verifiera att \"%s\" är skrivbar och att filen är ett giltigt Openboxtema-" +"arkiv.\n" "Följande fel rapporterades:\n" "%s" -#: src/mouse.c:68 +#: src/mouse.c:72 msgid "Custom actions" msgstr "Användardefinierad handling" diff --git a/src/mouse.c b/src/mouse.c index 592d0d8..68d9c55 100644 --- a/src/mouse.c +++ b/src/mouse.c @@ -53,9 +53,13 @@ void mouse_setup_tab() gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(w), tree_get_bool("focus/raiseOnFocus", FALSE)); - w = get_widget("focus_last"); + w = get_widget("focus_notlast"); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(w), - tree_get_bool("focus/focusLast", FALSE)); + !tree_get_bool("focus/focusLast", TRUE)); + + w = get_widget("focus_under_mouse"); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(w), + tree_get_bool("focus/underMouse", FALSE)); w = get_widget("doubleclick_time"); gtk_spin_button_set_value(GTK_SPIN_BUTTON(w), @@ -97,7 +101,9 @@ static void enable_stuff() gtk_widget_set_sensitive(w, b); w = get_widget("focus_raise"); gtk_widget_set_sensitive(w, b); - w = get_widget("focus_last"); + w = get_widget("focus_notlast"); + gtk_widget_set_sensitive(w, b); + w = get_widget("focus_under_mouse"); gtk_widget_set_sensitive(w, b); } @@ -127,11 +133,18 @@ void on_focus_raise_toggled(GtkToggleButton *w, gpointer data) tree_set_bool("focus/raiseOnFocus", gtk_toggle_button_get_active(w)); } -void on_focus_last_toggled(GtkToggleButton *w, gpointer data) +void on_focus_notlast_toggled(GtkToggleButton *w, gpointer data) +{ + if (mapping) return; + + tree_set_bool("focus/focusLast", !gtk_toggle_button_get_active(w)); +} + +void on_focus_under_mouse_toggled(GtkToggleButton *w, gpointer data) { if (mapping) return; - tree_set_bool("focus/focusLast", gtk_toggle_button_get_active(w)); + tree_set_bool("focus/underMouse", gtk_toggle_button_get_active(w)); } void on_titlebar_doubleclick_maximize_activate(GtkMenuItem *w, gpointer data) diff --git a/src/obconf.glade b/src/obconf.glade index 7adf8d4..c176997 100644 --- a/src/obconf.glade +++ b/src/obconf.glade @@ -2007,6 +2007,46 @@ C - The close button False 6 + + + True + True + Move focus under the mouse when _switching desktops + True + GTK_RELIEF_NORMAL + True + False + False + True + + + + 0 + False + False + + + + + + True + True + Move focus _under the mouse when the mouse is not moving + True + GTK_RELIEF_NORMAL + True + False + False + True + + + + 0 + False + False + + + True @@ -2110,26 +2150,6 @@ C - The close button True - - - - True - True - _Give focus to the last used window when switching desktops - True - GTK_RELIEF_NORMAL - True - False - False - True - - - - 0 - False - False - - 0 diff --git a/src/strings.c b/src/strings.c index b09fe4e..8faceb4 100644 --- a/src/strings.c +++ b/src/strings.c @@ -60,10 +60,11 @@ gchar *s = N_("Focusing Windows"); gchar *s = N_(" "); gchar *s = N_("_Focus windows when the mouse pointer moves over them"); gchar *s = N_(" "); +gchar *s = N_("Move focus under the mouse when _switching desktops"); +gchar *s = N_("Move focus _under the mouse when the mouse is not moving"); 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_("Titlebar"); gchar *s = N_(" "); gchar *s = N_("Double click on the _titlebar:"); -- 2.34.1