Index: settings-dialogs/xfwm4-workspace-dialog.glade =================================================================== --- settings-dialogs/xfwm4-workspace-dialog.glade (révision 27996) +++ settings-dialogs/xfwm4-workspace-dialog.glade (copie de travail) @@ -1,10 +1,10 @@ - + GTK_WIN_POS_CENTER_ON_PARENT 400 400 @@ -17,60 +17,245 @@ True 2 - + True - 6 - 6 + True - + True - 12 + 0 + GTK_SHADOW_NONE - + True - _Number of workspaces: - True - workspace_count_spinbutton + 12 + + + True + 6 + 6 + + + True + 12 + + + True + _Number of workspaces: + True + workspace_count_spinbutton + + + False + False + + + + + True + True + False + 0 0 100 1 10 0 + + + False + False + 1 + + + + + False + False + + + + + True + True + GTK_POLICY_NEVER + GTK_POLICY_AUTOMATIC + GTK_SHADOW_ETCHED_IN + + + True + True + True + True + + + + + 1 + + + + - - False - False - - + True - True - False - 0 0 100 1 10 0 + <b>Workspaces</b> + True - False - False - 1 + label_item - - False - False - - + True - True - GTK_POLICY_NEVER - GTK_POLICY_AUTOMATIC - GTK_SHADOW_ETCHED_IN + 0 + GTK_SHADOW_NONE - + True - True - True - True + 12 + + + True + 6 + 6 + + + True + Margins are areas on the edges of the screen where no window will be placed + True + + + False + False + + + + + True + 0 + 0 + + + True + 6 + 6 + 6 + 6 + + + True + 3 + 3 + + + + + + + + + + + + + + + True + gtk-missing-image + + + 1 + 2 + 1 + 2 + + + + + True + True + 0 0 100 1 10 10 + + + 1 + 2 + + + + + + + True + True + 0 0 100 1 10 10 + + + 2 + 3 + 1 + 2 + + + + + + + True + True + 0 0 100 1 10 10 + + + 1 + 2 + 2 + 3 + + + + + + + True + True + 0 0 100 1 10 10 + + + 1 + 2 + + + + + + + + + + + + label_item + + + + + 1 + + + + + + + True + <b>Margins</b> + True + + + label_item + + 1 @@ -78,6 +263,7 @@ + 6 1 Index: settings-dialogs/workspace-settings.c =================================================================== --- settings-dialogs/workspace-settings.c (révision 27996) +++ settings-dialogs/workspace-settings.c (copie de travail) @@ -2,6 +2,7 @@ * Copyright (c) 2008 Brian Tarricone * Copyright (c) 2008 Stephan Arts * Copyright (c) 2008 Jannis Pohlmann + * Copyright (c) 2008 Mike Massonnet * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -237,6 +238,14 @@ } static void +xfconf_margin_changed(XfconfChannel *channel, + const gchar *property, + const GValue *value, + gpointer user_data) +{ +} + +static void workspace_dialog_setup_names_treeview(GladeXML *gxml, XfconfChannel *channel) { @@ -307,12 +316,43 @@ GtkWidget *workspace_count_spinbutton = glade_xml_get_widget (gxml, "workspace_count_spinbutton"); + GtkWidget *margin_top_spinbutton = glade_xml_get_widget (gxml, "margin_top_spinbutton"); + GtkWidget *margin_right_spinbutton = glade_xml_get_widget (gxml, "margin_right_spinbutton"); + GtkWidget *margin_bottom_spinbutton = glade_xml_get_widget (gxml, "margin_bottom_spinbutton"); + GtkWidget *margin_left_spinbutton = glade_xml_get_widget (gxml, "margin_left_spinbutton"); + + gint wmax = gdk_screen_width () / 4; + gint hmax = gdk_screen_height () / 4; + + /* Set max margins range */ + gtk_spin_button_set_range (GTK_SPIN_BUTTON (margin_top_spinbutton), 0, wmax); + gtk_spin_button_set_range (GTK_SPIN_BUTTON (margin_right_spinbutton), 0, hmax); + gtk_spin_button_set_range (GTK_SPIN_BUTTON (margin_bottom_spinbutton), 0, wmax); + gtk_spin_button_set_range (GTK_SPIN_BUTTON (margin_left_spinbutton), 0, hmax); + /* Bind easy properties */ xfconf_g_property_bind (channel, "/general/workspace_count", G_TYPE_INT, (GObject *)workspace_count_spinbutton, "value"); + xfconf_g_property_bind (channel, + "/general/margin_top", + G_TYPE_INT, + (GObject *)margin_top_spinbutton, "value"); + xfconf_g_property_bind (channel, + "/general/margin_right", + G_TYPE_INT, + (GObject *)margin_right_spinbutton, "value"); + xfconf_g_property_bind (channel, + "/general/margin_bottom", + G_TYPE_INT, + (GObject *)margin_bottom_spinbutton, "value"); + xfconf_g_property_bind (channel, + "/general/margin_left", + G_TYPE_INT, + (GObject *)margin_left_spinbutton, "value"); + workspace_dialog_setup_names_treeview(gxml, channel); vbox = glade_xml_get_widget (gxml, "main-vbox");