From: Dana Jansens Date: Sat, 12 Jan 2008 16:56:05 +0000 (-0500) Subject: add the new option from ob 3.4.6 X-Git-Tag: release-2.0.3~26 X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=7291c8146385d6bb97d1927b4902cac00cf8a3d6;p=dana%2Fobconf.git add the new option from ob 3.4.6 --- diff --git a/src/obconf.glade b/src/obconf.glade index 685ab5f..69f5b8a 100644 --- a/src/obconf.glade +++ b/src/obconf.glade @@ -1286,6 +1286,81 @@ C - The close button False + + + + True + False + 12 + + + + True + Place new windows _on: + True + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + place_active_popup + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + True + True + 0 + + + + + + + True + All monitors + True + + + + + + + True + The active monitor + True + + + + + + + + 0 + False + False + + + + + 0 + True + True + + 0 diff --git a/src/strings.c b/src/strings.c index dbb63d7..ecd2d99 100644 --- a/src/strings.c +++ b/src/strings.c @@ -39,6 +39,9 @@ gchar *s = N_("Placing Windows"); gchar *s = N_(" "); gchar *s = N_("_Place new windows under the mouse pointer"); gchar *s = N_("_Center new windows when they are placed"); +gchar *s = N_("Place new windows _on:"); +gchar *s = N_("All monitors"); +gchar *s = N_("The active monitor"); gchar *s = N_("Moving and Resizing Windows"); gchar *s = N_(" "); gchar *s = N_("Update the window contents while _resizing"); diff --git a/src/windows.c b/src/windows.c index 8f9421a..f8d4008 100644 --- a/src/windows.c +++ b/src/windows.c @@ -29,6 +29,9 @@ static gboolean mapping = FALSE; #define POSITION_CENTER 0 #define POSITION_TOP 1 +#define PLACE_ON_ALL 0 +#define PLACE_ON_ACTIVE 1 + static void enable_stuff(); void windows_setup_tab() @@ -83,6 +86,12 @@ void windows_setup_tab() gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(w), tree_get_bool("placement/center", TRUE)); + w = get_widget("place_active_popup"); + if (tree_get_bool("placement/active", FALSE)) + gtk_option_menu_set_history(GTK_OPTION_MENU(w), PLACE_ON_ACTIVE); + else + gtk_option_menu_set_history(GTK_OPTION_MENU(w), PLACE_ON_ALL); + w = get_widget("resize_popup"); s = tree_get_string("resize/popupShow", "NonPixel"); if (!strcasecmp(s, "Always")) pos = POPUP_ALWAYS; @@ -160,6 +169,20 @@ void on_place_center_toggled(GtkToggleButton *w, gpointer data) tree_set_bool("placement/center", gtk_toggle_button_get_active(w)); } +void on_place_active_popup_all_activate(GtkMenuItem *w, gpointer data) +{ + if (mapping) return; + + tree_set_bool("placement/active", FALSE); +} + +void on_place_active_popup_active_activate(GtkMenuItem *w, gpointer data) +{ + if (mapping) return; + + tree_set_bool("placement/active", TRUE); +} + void on_resist_window_value_changed(GtkSpinButton *w, gpointer data) { if (mapping) return;