[Xfce4-commits] <xfce4-settings:bluesabre/display-settings> Added mirror option to placement settings.
Sean Davis
noreply at xfce.org
Thu Sep 27 15:14:01 CEST 2012
Updating branch refs/heads/bluesabre/display-settings
to e4b524ca64eb37f4688e922fc725118314368e8d (commit)
from e994fbb59a4b200c4c62cbc27400d54630e3cb42 (commit)
commit e4b524ca64eb37f4688e922fc725118314368e8d
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Thu Sep 27 09:12:01 2012 -0400
Added mirror option to placement settings.
dialogs/display-settings/main.c | 23 +++++++++++++++++++----
dialogs/display-settings/xfce-randr.h | 1 +
2 files changed, 20 insertions(+), 4 deletions(-)
diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c
index 098e55a..d7b9c59 100644
--- a/dialogs/display-settings/main.c
+++ b/dialogs/display-settings/main.c
@@ -344,6 +344,15 @@ display_setting_positions_changed (GtkComboBox *combobox,
XFCE_RANDR_POS_Y (xfce_randr) = current_mode->height;
break;
+ case XFCE_RANDR_PLACEMENT_MIRROR: // Mirror Display
+ selected_x = XFCE_RANDR_POS_X (xfce_randr);
+ selected_y = XFCE_RANDR_POS_Y (xfce_randr);
+
+ xfce_randr->active_output = selected_display;
+ XFCE_RANDR_POS_X (xfce_randr) = selected_x;
+ XFCE_RANDR_POS_Y (xfce_randr) = selected_y;
+ break;
+
default:
break;
}
@@ -388,28 +397,34 @@ display_setting_positions_populate (GtkBuilder *builder)
display_setting_positions_changed,
builder, NULL);
+ /* Insert mirror */
+ gtk_list_store_append (GTK_LIST_STORE (model), &iter);
+ gtk_list_store_set (GTK_LIST_STORE (model), &iter,
+ COLUMN_COMBO_NAME, _("Mirror"),
+ COLUMN_COMBO_VALUE, XFCE_RANDR_PLACEMENT_MIRROR, -1);
+
/* Insert left-of */
gtk_list_store_append (GTK_LIST_STORE (model), &iter);
gtk_list_store_set (GTK_LIST_STORE (model), &iter,
- COLUMN_COMBO_NAME, _("left of"),
+ COLUMN_COMBO_NAME, _("Left of"),
COLUMN_COMBO_VALUE, XFCE_RANDR_PLACEMENT_LEFT, -1);
/* Insert right-of */
gtk_list_store_append (GTK_LIST_STORE (model), &iter);
gtk_list_store_set (GTK_LIST_STORE (model), &iter,
- COLUMN_COMBO_NAME, _("right of"),
+ COLUMN_COMBO_NAME, _("Right of"),
COLUMN_COMBO_VALUE, XFCE_RANDR_PLACEMENT_RIGHT, -1);
/* Insert above */
gtk_list_store_append (GTK_LIST_STORE (model), &iter);
gtk_list_store_set (GTK_LIST_STORE (model), &iter,
- COLUMN_COMBO_NAME, _("above"),
+ COLUMN_COMBO_NAME, _("Above"),
COLUMN_COMBO_VALUE, XFCE_RANDR_PLACEMENT_UP, -1);
/* Insert below */
gtk_list_store_append (GTK_LIST_STORE (model), &iter);
gtk_list_store_set (GTK_LIST_STORE (model), &iter,
- COLUMN_COMBO_NAME, _("below"),
+ COLUMN_COMBO_NAME, _("Below"),
COLUMN_COMBO_VALUE, XFCE_RANDR_PLACEMENT_DOWN, -1);
diff --git a/dialogs/display-settings/xfce-randr.h b/dialogs/display-settings/xfce-randr.h
index 9aed8de..4f40305 100644
--- a/dialogs/display-settings/xfce-randr.h
+++ b/dialogs/display-settings/xfce-randr.h
@@ -34,6 +34,7 @@
#define XFCE_RANDR_POS_Y(randr) (randr->position[randr->active_output].y)
#define XFCE_RANDR_ROTATIONS_MASK (RR_Rotate_0|RR_Rotate_90|RR_Rotate_180|RR_Rotate_270)
#define XFCE_RANDR_REFLECTIONS_MASK (RR_Reflect_X|RR_Reflect_Y)
+#define XFCE_RANDR_PLACEMENT_MIRROR -1
#define XFCE_RANDR_PLACEMENT_UP 0
#define XFCE_RANDR_PLACEMENT_RIGHT 1
#define XFCE_RANDR_PLACEMENT_DOWN 2
More information about the Xfce4-commits
mailing list