diff -Nur xfce4-settings-4.8.3.orig/dialogs/display-settings/display-dialog.glade xfce4-settings-4.8.3/dialogs/display-settings/display-dialog.glade
--- xfce4-settings-4.8.3.orig/dialogs/display-settings/display-dialog.glade 2011-09-22 13:30:15.000000000 -0600
+++ xfce4-settings-4.8.3/dialogs/display-settings/display-dialog.glade 2012-01-21 12:23:13.056574990 -0700
@@ -10,7 +10,6 @@
<property name="default_height">350</property>
<property name="icon_name">video-display</property>
<property name="type_hint">dialog</property>
- <property name="has_separator">False</property>
<property name="subtitle" translatable="yes">Configure screen settings and layout</property>
<child internal-child="vbox">
<object class="GtkVBox" id="dialog-vbox1">
@@ -40,6 +39,9 @@
</object>
</child>
</object>
+ <packing>
+ <property name="position">0</property>
+ </packing>
</child>
<child>
<object class="GtkVBox" id="vbox1">
@@ -49,7 +51,10 @@
<child>
<object class="GtkCheckButton" id="output-on">
<property name="label" translatable="yes">_Use this output</property>
+ <property name="can_focus">False</property>
+ <property name="receives_default">False</property>
<property name="use_underline">True</property>
+ <property name="draw_indicator">True</property>
</object>
<packing>
<property name="position">0</property>
@@ -58,7 +63,7 @@
<child>
<object class="GtkTable" id="table1">
<property name="visible">True</property>
- <property name="n_rows">4</property>
+ <property name="n_rows">5</property>
<property name="n_columns">2</property>
<property name="column_spacing">12</property>
<property name="row_spacing">6</property>
@@ -163,7 +168,77 @@
<property name="y_options">GTK_FILL</property>
</packing>
</child>
+ <child>
+ <object class="GtkTable" id="table2">
+ <property name="visible">True</property>
+ <property name="n_columns">4</property>
+ <child>
+ <object class="GtkLabel" id="label2">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">X:</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label6">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Y:</property>
+ </object>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="randr-xpos">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="max_length">5</property>
+ <property name="invisible_char">•</property>
+ <property name="snap_to_ticks">True</property>
+ <property name="numeric">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="randr-ypos">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="max_length">5</property>
+ <property name="invisible_char">•</property>
+ <property name="snap_to_ticks">True</property>
+ <property name="numeric">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">3</property>
+ <property name="right_attach">4</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">4</property>
+ <property name="bottom_attach">5</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label1">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Position:</property>
+ </object>
+ <packing>
+ <property name="top_attach">4</property>
+ <property name="bottom_attach">5</property>
+ </packing>
+ </child>
</object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
</child>
</object>
<packing>
diff -Nur xfce4-settings-4.8.3.orig/dialogs/display-settings/main.c xfce4-settings-4.8.3/dialogs/display-settings/main.c
--- xfce4-settings-4.8.3.orig/dialogs/display-settings/main.c 2011-09-22 13:30:15.000000000 -0600
+++ xfce4-settings-4.8.3/dialogs/display-settings/main.c 2012-01-21 12:23:13.057574995 -0700
@@ -699,6 +699,98 @@
static void
+display_setting_xpos_changed (GtkSpinButton *spinbutton,
+ GtkBuilder *builder)
+{
+ gint value;
+
+ value = gtk_spin_button_get_value_as_int (spinbutton);
+
+ XFCE_RANDR_POS_X (xfce_randr) = value;
+
+ display_setting_refresh_rates_populate (builder);
+
+ /* Apply the changes */
+ xfce_randr_save_output (xfce_randr, "Default", display_channel,
+ xfce_randr->active_output);
+ xfce_randr_apply (xfce_randr, "Default", display_channel);
+}
+
+
+
+static void
+display_setting_xpos_status_populate (GtkBuilder *builder)
+{
+ GObject *xpos;
+ gchar property[512];
+
+ if (!xfce_randr)
+ return;
+
+ if (xfce_randr->noutput <= 1)
+ return;
+
+ xpos = gtk_builder_get_object (builder, "randr-xpos");
+
+ /* Disconnect the "toggled" signal to avoid writing the config again */
+ g_object_disconnect (xpos, "any_signal::value-changed",
+ display_setting_xpos_changed,
+ builder, NULL);
+ gtk_spin_button_set_value (GTK_SPIN_BUTTON (xpos),
+ XFCE_RANDR_POS_X (xfce_randr));
+ /* Reconnect the signal */
+ g_signal_connect (G_OBJECT (xpos), "value-changed", G_CALLBACK (display_setting_xpos_changed),
+ builder);
+}
+
+
+
+static void
+display_setting_ypos_changed (GtkSpinButton *spinbutton,
+ GtkBuilder *builder)
+{
+ gint value;
+
+ value = gtk_spin_button_get_value_as_int (spinbutton);
+
+ XFCE_RANDR_POS_Y (xfce_randr) = value;
+
+ display_setting_refresh_rates_populate (builder);
+
+ /* Apply the changes */
+ xfce_randr_save_output (xfce_randr, "Default", display_channel,
+ xfce_randr->active_output);
+ xfce_randr_apply (xfce_randr, "Default", display_channel);
+}
+
+
+
+static void
+display_setting_ypos_status_populate (GtkBuilder *builder)
+{
+ GObject *ypos;
+
+ if (!xfce_randr)
+ return;
+
+ if (xfce_randr->noutput <= 1)
+ return;
+
+ ypos = gtk_builder_get_object (builder, "randr-ypos");
+ /* Disconnect the "value-changed" signal to avoid writing the config again */
+ g_object_disconnect (ypos, "any_signal::value-changed",
+ display_setting_ypos_changed,
+ builder, NULL);
+ gtk_spin_button_set_value (GTK_SPIN_BUTTON (ypos),
+ XFCE_RANDR_POS_Y (xfce_randr));
+ /* Reconnect the signal */
+ g_signal_connect (G_OBJECT (ypos), "value-changed", G_CALLBACK (display_setting_ypos_changed),
+ builder);
+}
+
+
+
+static void
display_settings_treeview_selection_changed (GtkTreeSelection *selection,
GtkBuilder *builder)
{
@@ -723,6 +815,8 @@
display_setting_refresh_rates_populate (builder);
display_setting_rotations_populate (builder);
display_setting_reflections_populate (builder);
+ display_setting_xpos_status_populate (builder);
+ display_setting_ypos_status_populate (builder);
}
}
@@ -827,6 +921,15 @@
static void
+display_settings_spin_button_create (GtkSpinButton *spinbutton)
+{
+ gtk_spin_button_set_increments(spinbutton, 1,0);
+ gtk_spin_button_set_range(spinbutton,0,4096);
+}
+
+
+
+static void
display_settings_dialog_response (GtkDialog *dialog,
gint response_id,
GtkBuilder *builder)
@@ -843,7 +946,7 @@
GtkCellRenderer *renderer;
GtkTreeSelection *selection;
GObject *combobox;
- GObject *label, *check;
+ GObject *label, *check, *spin;
/* Get the treeview */
treeview = gtk_builder_get_object (builder, "randr-outputs");
@@ -874,6 +977,26 @@
else
gtk_widget_hide (GTK_WIDGET (check));
+ spin = gtk_builder_get_object (builder, "randr-xpos");
+ display_settings_spin_button_create(GTK_SPIN_BUTTON (spin));
+ if (xfce_randr->noutput > 1)
+ {
+ gtk_widget_show (GTK_WIDGET (spin));
+ g_signal_connect (G_OBJECT (spin), "value-changed", G_CALLBACK (display_setting_xpos_changed), builder);
+ }
+ else
+ gtk_widget_hide (GTK_WIDGET (spin));
+
+ spin = gtk_builder_get_object (builder, "randr-ypos");
+ display_settings_spin_button_create(GTK_SPIN_BUTTON (spin));
+ if (xfce_randr->noutput > 1)
+ {
+ gtk_widget_show (GTK_WIDGET (spin));
+ g_signal_connect (G_OBJECT (spin), "value-changed", G_CALLBACK (display_setting_ypos_changed), builder);
+ }
+ else
+ gtk_widget_hide (GTK_WIDGET (spin));
+
label = gtk_builder_get_object (builder, "label-reflection");
gtk_widget_show (GTK_WIDGET (label));