Updating branch refs/heads/master to 9cf3b10cf57a6e5f9a07536ef6056ce321abbc90 (commit) from 0af2c17f9ff3f3a64da7bc3f07ce06cf6bb107fc (commit)
commit 9cf3b10cf57a6e5f9a07536ef6056ce321abbc90 Author: Eric Koegel <eric.koe...@gmail.com> Date: Thu Feb 9 16:48:12 2012 +0300 Stretch background across all monitors setting Added a 'Stretch background across all monitors.' checkbox to the xfdesktop-settings app. It will only be visible on the first monitor tab and only when multiple monitors are present. Bug 5690 settings/main.c | 19 +++++++++++++++++++ .../xfdesktop-settings-appearance-frame-ui.glade | 16 ++++++++++++++++ 2 files changed, 35 insertions(+), 0 deletions(-) diff --git a/settings/main.c b/settings/main.c index 9442f30..62bcbff 100644 --- a/settings/main.c +++ b/settings/main.c @@ -107,6 +107,8 @@ typedef struct GtkWidget *backdrop_cycle_spinbox; GtkWidget *backdrop_cycle_chkbox; + + GtkWidget *chk_xinerama_stretch; } AppearancePanel; typedef struct @@ -1460,6 +1462,23 @@ xfdesktop_settings_dialog_add_screens(GtkBuilder *main_gxml, g_signal_connect(G_OBJECT(panel->btn_newlist), "clicked", G_CALLBACK(newlist_button_clicked), panel); + panel->chk_xinerama_stretch = GTK_WIDGET(gtk_builder_get_object(appearance_gxml, + "chk_xinerama_stretch")); + + /* The first monitor has the option of doing the xinerama-stretch, + * but only if there's multiple monitors attached. Make it invisible + * in all other cases. + */ + if(j == 0 && nmonitors > 1) { + g_snprintf(buf, sizeof(buf), "/backdrop/screen%d/xinerama-stretch", + i); + xfconf_g_property_bind(channel, buf, G_TYPE_BOOLEAN, + G_OBJECT(panel->chk_xinerama_stretch), "active"); + gtk_widget_set_sensitive(panel->chk_xinerama_stretch, TRUE); + } else { + gtk_widget_hide(panel->chk_xinerama_stretch); + } + panel->backdrop_cycle_chkbox = GTK_WIDGET(gtk_builder_get_object(appearance_gxml, "chk_cycle_backdrop")); panel->backdrop_cycle_spinbox = GTK_WIDGET(gtk_builder_get_object(appearance_gxml, diff --git a/settings/xfdesktop-settings-appearance-frame-ui.glade b/settings/xfdesktop-settings-appearance-frame-ui.glade index caf55fc..a397d94 100644 --- a/settings/xfdesktop-settings-appearance-frame-ui.glade +++ b/settings/xfdesktop-settings-appearance-frame-ui.glade @@ -576,6 +576,22 @@ <property name="position">2</property> </packing> </child> + <child> + <object class="GtkCheckButton" id="chk_xinerama_stretch"> + <property name="visible">True</property> + <property name="sensitive">False</property> + <property name="can_focus">True</property> + <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> + <property name="label" translatable="yes">St_retch this background across all monitors.</property> + <property name="tooltip-text" translatable="yes">When multiple monitors are present, select this option to stretch the current background over all of them.</property> + <property name="use_underline">True</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="position">3</property> + </packing> + </child> </object> </child> </object> _______________________________________________ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits