summaryrefslogtreecommitdiff
path: root/capplets/windows/mate-window-properties.c
diff options
context:
space:
mode:
Diffstat (limited to 'capplets/windows/mate-window-properties.c')
-rw-r--r--capplets/windows/mate-window-properties.c57
1 files changed, 38 insertions, 19 deletions
diff --git a/capplets/windows/mate-window-properties.c b/capplets/windows/mate-window-properties.c
index 8cb185e0..4d0849b5 100644
--- a/capplets/windows/mate-window-properties.c
+++ b/capplets/windows/mate-window-properties.c
@@ -43,6 +43,7 @@
#define MARCO_CENTER_NEW_WINDOWS_KEY "center-new-windows"
#define MARCO_ALLOW_TILING_KEY "allow-tiling"
+#define MARCO_ALLOW_TOP_TILING_KEY "allow-top-tiling"
#define MARCO_SHOW_TAB_BORDER_KEY "show-tab-border"
#define MARCO_BUTTON_LAYOUT_KEY "button-layout"
#define MARCO_DOUBLE_CLICK_TITLEBAR_KEY "action-double-click-titlebar"
@@ -88,19 +89,23 @@ typedef struct
static GtkWidget *dialog_win;
-/* General */
-static GtkWidget *center_new_windows_checkbutton;
-static GtkWidget *allow_tiling_checkbutton;
+/* Behaviour */
static GtkWidget *show_tab_border_checkbutton;
-static GtkWidget *titlebar_layout_optionmenu;
static GtkWidget *double_click_titlebar_optionmenu;
static GtkWidget *focus_mode_checkbutton;
static GtkWidget *focus_mode_mouse_checkbutton;
static GtkWidget *autoraise_checkbutton;
static GtkWidget *autoraise_delay_spinbutton;
+static GtkWidget *autoraise_delay_hbox;
static GtkWidget *reduced_resources_checkbutton;
static GtkWidget *alt_click_vbox;
+/* Placement */
+static GtkWidget *center_new_windows_checkbutton;
+static GtkWidget *enable_tiling_checkbutton;
+static GtkWidget *allow_top_tiling_checkbutton;
+static GtkWidget *titlebar_layout_optionmenu;
+
/* Compositing Manager */
static GtkWidget *compositing_checkbutton;
static GtkWidget *compositing_fast_alt_tab_checkbutton;
@@ -119,11 +124,14 @@ update_sensitivity (void)
gtk_widget_set_sensitive (compositing_fast_alt_tab_checkbutton,
g_settings_get_boolean (marco_settings, MARCO_COMPOSITING_MANAGER_KEY));
- gtk_widget_set_sensitive (allow_tiling_checkbutton,
+ gtk_widget_set_sensitive (enable_tiling_checkbutton,
!g_settings_get_boolean (marco_settings, MARCO_REDUCED_RESOURCES_KEY));
+ gtk_widget_set_sensitive (allow_top_tiling_checkbutton,
+ g_settings_get_boolean (marco_settings, MARCO_ALLOW_TILING_KEY) &&
+ !g_settings_get_boolean (marco_settings, MARCO_REDUCED_RESOURCES_KEY));
gtk_widget_set_sensitive (focus_mode_mouse_checkbutton,
g_settings_get_enum (marco_settings, MARCO_FOCUS_KEY) != FOCUS_MODE_CLICK);
- gtk_widget_set_sensitive (autoraise_checkbutton,
+ gtk_widget_set_sensitive (autoraise_delay_hbox,
g_settings_get_enum (marco_settings, MARCO_FOCUS_KEY) != FOCUS_MODE_CLICK);
gtk_widget_set_sensitive (autoraise_delay_spinbutton,
g_settings_get_enum (marco_settings, MARCO_FOCUS_KEY) != FOCUS_MODE_CLICK &&
@@ -352,19 +360,23 @@ main (int argc, char **argv)
G_CALLBACK (capplet_notebook_scroll_event_cb),
NULL);
- /* General */
- center_new_windows_checkbutton = GET_WIDGET ("center_new_windows_checkbutton");
- allow_tiling_checkbutton = GET_WIDGET ("allow_tiling_checkbutton");
+ /* Behaviour */
show_tab_border_checkbutton = GET_WIDGET ("show_tab_border_checkbutton");
- titlebar_layout_optionmenu = GET_WIDGET ("titlebar_layout_optionmenu");
double_click_titlebar_optionmenu = GET_WIDGET ("double_click_titlebar_optionmenu");
focus_mode_checkbutton = GET_WIDGET ("focus_mode_checkbutton");
focus_mode_mouse_checkbutton = GET_WIDGET ("focus_mode_mouse_checkbutton");
+ autoraise_delay_hbox = GET_WIDGET ("autoraise_delay_hbox");
autoraise_checkbutton = GET_WIDGET ("autoraise_checkbutton");
autoraise_delay_spinbutton = GET_WIDGET ("autoraise_delay_spinbutton");
reduced_resources_checkbutton = GET_WIDGET ("reduced_resources_checkbutton");
alt_click_vbox = GET_WIDGET ("alt_click_vbox");
+ /* Placement */
+ center_new_windows_checkbutton = GET_WIDGET ("center_new_windows_checkbutton");
+ enable_tiling_checkbutton = GET_WIDGET ("enable_tiling_checkbutton");
+ allow_top_tiling_checkbutton = GET_WIDGET ("allow_top_tiling_checkbutton");
+ titlebar_layout_optionmenu = GET_WIDGET ("titlebar_layout_optionmenu");
+
/* Composition Manager */
compositing_checkbutton = GET_WIDGET ("compositing_checkbutton");
compositing_fast_alt_tab_checkbutton = GET_WIDGET ("compositing_fast_alt_tab_checkbutton");
@@ -391,28 +403,35 @@ main (int argc, char **argv)
gtk_combo_box_set_active (GTK_COMBO_BOX (double_click_titlebar_optionmenu),
g_settings_get_enum (marco_settings, MARCO_DOUBLE_CLICK_TITLEBAR_KEY));
- /* General */
+ /* Behaviour */
g_settings_bind (marco_settings,
- MARCO_CENTER_NEW_WINDOWS_KEY,
- center_new_windows_checkbutton,
+ MARCO_SHOW_TAB_BORDER_KEY,
+ show_tab_border_checkbutton,
"active",
G_SETTINGS_BIND_DEFAULT);
g_settings_bind (marco_settings,
- MARCO_ALLOW_TILING_KEY,
- allow_tiling_checkbutton,
+ MARCO_REDUCED_RESOURCES_KEY,
+ reduced_resources_checkbutton,
"active",
G_SETTINGS_BIND_DEFAULT);
+ /* Placement */
g_settings_bind (marco_settings,
- MARCO_SHOW_TAB_BORDER_KEY,
- show_tab_border_checkbutton,
+ MARCO_CENTER_NEW_WINDOWS_KEY,
+ center_new_windows_checkbutton,
"active",
G_SETTINGS_BIND_DEFAULT);
g_settings_bind (marco_settings,
- MARCO_REDUCED_RESOURCES_KEY,
- reduced_resources_checkbutton,
+ MARCO_ALLOW_TILING_KEY,
+ enable_tiling_checkbutton,
+ "active",
+ G_SETTINGS_BIND_DEFAULT);
+
+ g_settings_bind (marco_settings,
+ MARCO_ALLOW_TOP_TILING_KEY,
+ allow_top_tiling_checkbutton,
"active",
G_SETTINGS_BIND_DEFAULT);