diff options
author | Viktor Semykin <thesame.ml@gmail.com> | 2013-03-10 22:03:54 +0200 |
---|---|---|
committer | Olivier Fourdan <fourdan@xfce.org> | 2015-01-11 18:07:45 +0100 |
commit | 2c77f62868dc235657e305987932cc5caa04cd0a (patch) | |
tree | 1ce83d05b5c860916c4ca5e61e4f71ee233cb009 /settings-dialogs | |
parent | 8bff52645f04233f565431cb94bc1bc05ab03143 (diff) | |
download | xfwm4-2c77f62868dc235657e305987932cc5caa04cd0a.tar.gz |
Added titleless maximization feature
Bug: 9905
Diffstat (limited to 'settings-dialogs')
-rw-r--r-- | settings-dialogs/tweaks-settings.c | 23 | ||||
-rw-r--r-- | settings-dialogs/xfwm4-tweaks-dialog.glade | 23 |
2 files changed, 36 insertions, 10 deletions
diff --git a/settings-dialogs/tweaks-settings.c b/settings-dialogs/tweaks-settings.c index 385ebff0b..6086c5def 100644 --- a/settings-dialogs/tweaks-settings.c +++ b/settings-dialogs/tweaks-settings.c @@ -143,6 +143,13 @@ cb_urgent_blink_button_toggled (GtkToggleButton *toggle, GtkWidget *repeat_urgen } static void +cb_borderless_maximize_button_toggled (GtkToggleButton *toggle, GtkWidget *titleless_maximize_check) +{ + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (titleless_maximize_check), FALSE); + gtk_widget_set_sensitive (titleless_maximize_check, gtk_toggle_button_get_active (toggle)); +} + +static void wm_tweaks_dialog_configure_widgets (GtkBuilder *builder) { GtkWidget *vbox; @@ -175,6 +182,7 @@ wm_tweaks_dialog_configure_widgets (GtkBuilder *builder) GtkWidget *easy_click_combo_box = GTK_WIDGET (gtk_builder_get_object (builder, "easy_click_combo_box")); GtkWidget *raise_with_any_button_check = GTK_WIDGET (gtk_builder_get_object (builder, "raise_with_any_button_check")); GtkWidget *borderless_maximize_check = GTK_WIDGET (gtk_builder_get_object (builder, "borderless_maximize_check")); + GtkWidget *titleless_maximize_check = GTK_WIDGET (gtk_builder_get_object (builder, "titleless_maximize_check")); GtkWidget *tile_on_move_check = GTK_WIDGET (gtk_builder_get_object (builder, "tile_on_move_check")); GtkWidget *snap_resist_check = GTK_WIDGET (gtk_builder_get_object (builder, "snap_resist_check")); GtkWidget *urgent_blink = GTK_WIDGET (gtk_builder_get_object (builder, "urgent_blink")); @@ -261,13 +269,10 @@ wm_tweaks_dialog_configure_widgets (GtkBuilder *builder) "toggled", G_CALLBACK (cb_activate_action_none_radio_toggled), xfwm4_channel); -#if 0 - /* OF: Actually, this is not related, so this callback is not needed */ - g_signal_connect (G_OBJECT (prevent_focus_stealing_check), + g_signal_connect (G_OBJECT (borderless_maximize_check), "toggled", - G_CALLBACK (cb_prevent_focus_stealing_check_button_toggled), - prevent_focus_stealing_box); -#endif + G_CALLBACK (cb_borderless_maximize_button_toggled), + titleless_maximize_check); g_signal_connect (G_OBJECT (placement_center_option), "toggled", G_CALLBACK (cb_activate_placement_center_radio_toggled), @@ -332,6 +337,10 @@ wm_tweaks_dialog_configure_widgets (GtkBuilder *builder) G_TYPE_BOOLEAN, (GObject *)borderless_maximize_check, "active"); xfconf_g_property_bind (xfwm4_channel, + "/general/titleless_maximize", + G_TYPE_BOOLEAN, + (GObject *)titleless_maximize_check, "active"); + xfconf_g_property_bind (xfwm4_channel, "/general/tile_on_move", G_TYPE_BOOLEAN, (GObject *)tile_on_move_check, "active"); @@ -353,6 +362,8 @@ wm_tweaks_dialog_configure_widgets (GtkBuilder *builder) (GObject *)mousewheel_rollup, "active"); gtk_widget_set_sensitive (repeat_urgent_blink, gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (urgent_blink))); + gtk_widget_set_sensitive (titleless_maximize_check, + gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (borderless_maximize_check))); /* Workspaces tab */ xfconf_g_property_bind (xfwm4_channel, diff --git a/settings-dialogs/xfwm4-tweaks-dialog.glade b/settings-dialogs/xfwm4-tweaks-dialog.glade index b6931423c..7919ae077 100644 --- a/settings-dialogs/xfwm4-tweaks-dialog.glade +++ b/settings-dialogs/xfwm4-tweaks-dialog.glade @@ -431,6 +431,21 @@ or "skip taskbar" properties set</property> </packing> </child> <child> + <object class="GtkCheckButton" id="titleless_maximize_check"> + <property name="label" translatable="yes">Hide title of windows when maximized</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="use_underline">True</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">3</property> + </packing> + </child> + <child> <object class="GtkCheckButton" id="tile_on_move_check"> <property name="label" translatable="yes">Automatically _tile windows when moving toward the screen edge</property> <property name="use_action_appearance">False</property> @@ -443,7 +458,7 @@ or "skip taskbar" properties set</property> <packing> <property name="expand">False</property> <property name="fill">False</property> - <property name="position">3</property> + <property name="position">4</property> </packing> </child> <child> @@ -459,7 +474,7 @@ or "skip taskbar" properties set</property> <packing> <property name="expand">False</property> <property name="fill">False</property> - <property name="position">4</property> + <property name="position">5</property> </packing> </child> <child> @@ -475,7 +490,7 @@ or "skip taskbar" properties set</property> <packing> <property name="expand">False</property> <property name="fill">False</property> - <property name="position">5</property> + <property name="position">6</property> </packing> </child> <child> @@ -491,7 +506,7 @@ or "skip taskbar" properties set</property> <packing> <property name="expand">False</property> <property name="fill">False</property> - <property name="position">6</property> + <property name="position">7</property> </packing> </child> <child> |