Index: settings-dialogs/monitor-icon.png =================================================================== Impossible d'afficher : fichier considéré comme binaire. svn:mime-type = application/octet-stream Modification de propriétés sur settings-dialogs/monitor-icon.png ___________________________________________________________________ Ajouté : svn:mime-type + application/octet-stream Index: settings-dialogs/Makefile.am =================================================================== --- settings-dialogs/Makefile.am (révision 27996) +++ settings-dialogs/Makefile.am (copie de travail) @@ -3,6 +3,10 @@ xfwm4-tweaks-settings \ xfwm4-workspace-settings +noinst_DATA = \ +monitor-icon.h \ +monitor-icon.png + xfwm4_workspace_settings_SOURCES = \ workspace-settings.c \ xfwm4-workspace-dialog_glade.h @@ -100,6 +104,10 @@ xfwm4-tweaks-dialog_glade.h: xfwm4-tweaks-dialog.glade exo-csource --static --name=tweaks_dialog_glade $< >$@ +monitor-icon.h: $(srcdir)/monitor-icon.png + gdk-pixbuf-csource --raw --build-list \ + monitor_icon_data $(srcdir)/monitor-icon.png > monitor-icon.h + endif desktopdir = $(datadir)/applications @@ -112,10 +120,11 @@ @INTLTOOL_DESKTOP_RULE@ EXTRA_DIST = \ - $(desktop_in_files) \ - xfwm4-workspace-dialog.glade \ - xfwm4-tweaks-dialog.glade \ + $(desktop_in_files) \ + xfwm4-workspace-dialog.glade \ + xfwm4-tweaks-dialog.glade \ xfwm4-dialog.glade DISTCLEANFILES = \ - $(desktop_DATA) + $(desktop_DATA) \ + monitor-icon.h 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,6 +1,6 @@ - + @@ -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 + True + 0 0 100 1 10 10 + + + 1 + 2 + + + + + + + True + True + 0 0 100 1 10 10 + + + 1 + 2 + 2 + 3 + + + + + + + True + True + 0 0 100 1 10 10 + + + 2 + 3 + 1 + 2 + + + + + + + True + True + 0 0 100 1 10 10 + + + 1 + 2 + + + + + + + True + gtk-missing-image + + + 1 + 2 + 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 @@ -32,6 +33,7 @@ #include #include #include "xfwm4-workspace-dialog_glade.h" +#include "monitor-icon.h" #define WORKSPACES_CHANNEL "xfwm4" @@ -305,14 +307,56 @@ { GtkWidget *vbox; + GdkPixbuf *monitor; + GtkWidget *image; + + gint wmax, hmax; + 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"); + + /* Set monitor icon */ + monitor = xfce_inline_icon_at_size (monitor_icon_data, -1, -1); + image = glade_xml_get_widget (gxml, "monitor_icon"); + gtk_image_set_from_pixbuf (GTK_IMAGE (image), monitor); + g_object_unref (monitor); + + /* Set max margins range */ + wmax = gdk_screen_width () / 4; + hmax = gdk_screen_height () / 4; + + 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");