[Xfce4-commits] Update minimal-display-dialog icons

2012-10-28 Thread Nick Schermer
Updating branch refs/heads/master
 to 16dd3b15075d98ba9b539b9243684a01a366cc0c (commit)
   from 9d926f57009155586ecaf7ca62af838e38015052 (commit)

commit 16dd3b15075d98ba9b539b9243684a01a366cc0c
Author: Simon Steinbeiss 
Date:   Thu Sep 13 23:11:53 2012 +0200

Update minimal-display-dialog icons

 dialogs/display-settings/extend-left.png  |  Bin 5205 -> 5867 bytes
 dialogs/display-settings/extend-right.png |  Bin 5358 -> 6059 bytes
 dialogs/display-settings/mirror.png   |  Bin 8382 -> 6179 bytes
 3 files changed, 0 insertions(+), 0 deletions(-)

diff --git a/dialogs/display-settings/extend-left.png 
b/dialogs/display-settings/extend-left.png
index 46966ac..5e0dbd5 100644
Binary files a/dialogs/display-settings/extend-left.png and 
b/dialogs/display-settings/extend-left.png differ
diff --git a/dialogs/display-settings/extend-right.png 
b/dialogs/display-settings/extend-right.png
index 9577e7b..fc520dc 100644
Binary files a/dialogs/display-settings/extend-right.png and 
b/dialogs/display-settings/extend-right.png differ
diff --git a/dialogs/display-settings/mirror.png 
b/dialogs/display-settings/mirror.png
index bbe903f..adc3ae7 100644
Binary files a/dialogs/display-settings/mirror.png and 
b/dialogs/display-settings/mirror.png differ
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Set up the position comboboxes for extended desktop mode The signals and combos are there, but some of it is just proof-of-concept

2012-10-28 Thread Nick Schermer
Updating branch refs/heads/master
 to 5d5b8f596b8a29b72f2d3dac2c26b216fe0872e1 (commit)
   from 16dd3b15075d98ba9b539b9243684a01a366cc0c (commit)

commit 5d5b8f596b8a29b72f2d3dac2c26b216fe0872e1
Author: Simon Steinbeiss 
Date:   Mon Sep 24 23:29:22 2012 +0200

Set up the position comboboxes for extended desktop mode
The signals and combos are there, but some of it is just proof-of-concept

 dialogs/display-settings/display-dialog.glade |   47 --
 dialogs/display-settings/main.c   |  217 -
 2 files changed, 250 insertions(+), 14 deletions(-)

diff --git a/dialogs/display-settings/display-dialog.glade 
b/dialogs/display-settings/display-dialog.glade
index f3d5da0..b6632a8 100644
--- a/dialogs/display-settings/display-dialog.glade
+++ b/dialogs/display-settings/display-dialog.glade
@@ -151,19 +151,6 @@
   
 
 
-  
-True
-False
-  
-  
-1
-2
-2
-3
-GTK_FILL
-  
-
-
   
 False
 0
@@ -268,6 +255,40 @@
 GTK_FILL
   
 
+
+  
+True
+False
+
+  
+True
+False
+  
+  
+True
+True
+0
+  
+
+
+  
+True
+False
+  
+  
+True
+True
+1
+  
+
+  
+  
+1
+2
+2
+3
+  
+
   
   
 True
diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c
index 836daea..96daaf6 100644
--- a/dialogs/display-settings/main.c
+++ b/dialogs/display-settings/main.c
@@ -233,7 +233,123 @@ display_setting_timed_confirmation (GtkBuilder 
*main_builder)
 return ((response_id == 2) ? TRUE : FALSE);
 }
 
+static void
+display_setting_positions_changed (GtkComboBox *combobox,
+ GtkBuilder  *builder)
+{
+gint value;
+
+if (!display_setting_combo_box_get_value (combobox, &value))
+return;
+}
+
+static void
+display_setting_positions_populate (GtkBuilder *builder)
+{
+GtkTreeModel *model;
+GObject  *combobox;
+GtkTreeIter   iter;
+
+/* Get the positions combo box store and clear it */
+combobox = gtk_builder_get_object (builder, "randr-position");
+model = gtk_combo_box_get_model (GTK_COMBO_BOX (combobox));
+gtk_list_store_clear (GTK_LIST_STORE (model));
+
+/* Only make the combobox interactive if there is more than one output */
+if (display_settings_get_n_active_outputs () > 1)
+{
+gtk_widget_set_sensitive (GTK_WIDGET (combobox), TRUE);
+return;
+}
+else
+gtk_widget_set_sensitive (GTK_WIDGET (combobox), FALSE);
+
+/* Disconnect the "changed" signal to avoid triggering the confirmation
+ * dialog */
+g_object_disconnect (combobox, "any_signal::changed",
+ display_setting_positions_changed,
+ builder, NULL);
+
+/* 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_VALUE, "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_VALUE, "right", -1);
+
+
+/* Reconnect the signal */
+g_signal_connect (G_OBJECT (combobox), "changed", G_CALLBACK 
(display_setting_positions_changed), builder);
+}
+
+static void
+display_setting_active_displays_changed (GtkComboBox *combobox,
+ GtkBuilder  *builder)
+{
+gint value;
+
+if (!display_setting_combo_box_get_value (combobox, &value))
+return;
+}
+
+static void
+display_setting_active_displays_populate (GtkBuilder *builder)
+{
+GtkTreeModel *model;
+GObject  *combobox;
+gchar *name;
+guint n;
+GtkTreeIter   iter;
+
+/* Get the active-displays combo box s

[Xfce4-commits] Updated glade files.

2012-10-28 Thread Nick Schermer
Updating branch refs/heads/master
 to 9d926f57009155586ecaf7ca62af838e38015052 (commit)
   from 68324bb287d1c9536df813609db53963005afdf4 (commit)

commit 9d926f57009155586ecaf7ca62af838e38015052
Author: Sean Davis 
Date:   Thu Sep 13 16:14:25 2012 -0400

Updated glade files.

 dialogs/display-settings/confirmation-dialog.glade |  100 +++---
 dialogs/display-settings/display-dialog.glade  |  382 
 dialogs/display-settings/extend-left.png   |  Bin 0 -> 5205 bytes
 dialogs/display-settings/extend-right.png  |  Bin 0 -> 5358 bytes
 .../display-settings/minimal-display-dialog.glade  |  229 +++-
 dialogs/display-settings/mirror.png|  Bin 0 -> 8382 bytes
 6 files changed, 417 insertions(+), 294 deletions(-)

diff --git a/dialogs/display-settings/confirmation-dialog.glade 
b/dialogs/display-settings/confirmation-dialog.glade
index dbf7c76..7b91c7a 100644
--- a/dialogs/display-settings/confirmation-dialog.glade
+++ b/dialogs/display-settings/confirmation-dialog.glade
@@ -1,26 +1,71 @@
-
+
 
-  
+  
   
   
+False
 5
 Confirmation
 False
 center
 dialog-question
 normal
-False
 
   
 True
-vertical
+False
 2
+
+  
+True
+False
+end
+
+  
+Keep this 
configuration
+True
+True
+True
+True
+True
+False
+  
+  
+False
+False
+0
+  
+
+
+  
+Restore the previous 
configuration
+True
+True
+True
+False
+  
+  
+False
+False
+1
+  
+
+  
+  
+False
+True
+end
+0
+  
+
 
   
 True
+False
 
   
 True
+False
 0.2000298023224
 10
 gtk-dialog-question
@@ -35,10 +80,11 @@
 
   
 True
-vertical
+False
 
   
 True
+False
 0
 0
 10
@@ -54,6 +100,7 @@
 
   
 True
+False
 0
 0
 10
@@ -68,53 +115,18 @@
 
   
   
+True
+True
 1
   
 
   
   
+True
+True
 1
   
 
-
-  
-True
-end
-
-  
-Keep this 
configuration
-True
-True
-True
-True
-True
-  
-  
-False
-False
-0
-  
-
-
-  
-Restore the previous 
configuration
-True
-True
-True
-  
-  
-False
-False
-1
-  
-
-  
-  
-False
-end
-0
-  
-
   
 
 
diff --git a/dialogs/display-settings/display-dialog.glade 
b/dialogs/display-settings/display-dialog.glade
index 4960be6..f3d5da0 100644
--- a/dialogs/display-settings/display-dialog.glade
+++ b/dialogs/display-settings/display-dialog.glade
@@ -1,25 +1,70 @@
-
+
 
-  
+  
   
   
   
+False
 Display
 center-on-parent
 400
 350
 video-display
 dialog
-False
 Configure screen settings and 
layout
 
   
 True
-vertical
+False
 2
+
+  
+True
+False
+end
+
+  
+gtk-help
+True
+True
+True
+False
+True
+  
+  
+False
+False
+0
+True
+  
+
+
+  
+gtk-close
+True
+True
+True
+False
+True
+  
+  
+False
+False
+1
+  
+
+

[Xfce4-commits] Fix gloss in pixmap for extend-to-right

2012-10-28 Thread Nick Schermer
Updating branch refs/heads/master
 to 544a97d69a6872dd43d545428bd33e10aedbbe6a (commit)
   from 5d5b8f596b8a29b72f2d3dac2c26b216fe0872e1 (commit)

commit 544a97d69a6872dd43d545428bd33e10aedbbe6a
Author: Simon Steinbeiss 
Date:   Mon Sep 24 23:32:27 2012 +0200

Fix gloss in pixmap for extend-to-right

 dialogs/display-settings/extend-right.png |  Bin 6059 -> 5958 bytes
 1 files changed, 0 insertions(+), 0 deletions(-)

diff --git a/dialogs/display-settings/extend-right.png 
b/dialogs/display-settings/extend-right.png
index fc520dc..3fe963e 100644
Binary files a/dialogs/display-settings/extend-right.png and 
b/dialogs/display-settings/extend-right.png differ
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Fixed fill options for Position.

2012-10-28 Thread Nick Schermer
Updating branch refs/heads/master
 to 55f46009289f8a7ccd336a9ea5e2ab3d06a1a81d (commit)
   from 544a97d69a6872dd43d545428bd33e10aedbbe6a (commit)

commit 55f46009289f8a7ccd336a9ea5e2ab3d06a1a81d
Author: Sean Davis 
Date:   Tue Sep 25 10:02:22 2012 -0400

Fixed fill options for Position.

 dialogs/display-settings/display-dialog.glade |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/dialogs/display-settings/display-dialog.glade 
b/dialogs/display-settings/display-dialog.glade
index b6632a8..8bce601 100644
--- a/dialogs/display-settings/display-dialog.glade
+++ b/dialogs/display-settings/display-dialog.glade
@@ -287,6 +287,7 @@
 2
 2
 3
+GTK_FILL
   
 
   
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Fixed loading of comboboxes and enabling/disabling comboboxes.

2012-10-28 Thread Nick Schermer
Updating branch refs/heads/master
 to 94c2d0fcec0fc2e3e6fbf66944172ca251f39067 (commit)
   from 55f46009289f8a7ccd336a9ea5e2ab3d06a1a81d (commit)

commit 94c2d0fcec0fc2e3e6fbf66944172ca251f39067
Author: Sean Davis 
Date:   Wed Sep 26 05:17:39 2012 -0400

Fixed loading of comboboxes and enabling/disabling comboboxes.

 dialogs/display-settings/main.c |   12 
 1 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c
index 96daaf6..b6192b1 100644
--- a/dialogs/display-settings/main.c
+++ b/dialogs/display-settings/main.c
@@ -259,7 +259,6 @@ display_setting_positions_populate (GtkBuilder *builder)
 if (display_settings_get_n_active_outputs () > 1)
 {
 gtk_widget_set_sensitive (GTK_WIDGET (combobox), TRUE);
-return;
 }
 else
 gtk_widget_set_sensitive (GTK_WIDGET (combobox), FALSE);
@@ -315,7 +314,6 @@ display_setting_active_displays_populate (GtkBuilder 
*builder)
 if (display_settings_get_n_active_outputs () > 1)
 {
 gtk_widget_set_sensitive (GTK_WIDGET (combobox), TRUE);
-return;
 }
 else
 gtk_widget_set_sensitive (GTK_WIDGET (combobox), FALSE);
@@ -345,8 +343,6 @@ display_setting_active_displays_populate (GtkBuilder 
*builder)
 }
 }
 
-
-
 /* Reconnect the signal */
 g_signal_connect (G_OBJECT (combobox), "changed", G_CALLBACK 
(display_setting_active_displays_changed), builder);
 }
@@ -745,14 +741,14 @@ display_setting_mirror_displays_toggled (GtkToggleButton 
*togglebutton,
 if (xfce_randr->noutput <= 1)
 return;
 
-positions = gtk_builder_get_object (builder, "randr-positions");
-active_displays = gtk_builder_get_object (builder, "active-displays");
+positions = gtk_builder_get_object (builder, "randr-position");
+active_displays = gtk_builder_get_object (builder, 
"randr-active-displays");
 
 if (gtk_toggle_button_get_active (togglebutton))
 {
 /* Activate mirror-mode */
 
-/* Disable the position comboboxes FIXME */
+/* Disable the position comboboxes */
 gtk_widget_set_sensitive (GTK_WIDGET (positions), FALSE);
 gtk_widget_set_sensitive (GTK_WIDGET (active_displays), FALSE);
 }
@@ -760,7 +756,7 @@ display_setting_mirror_displays_toggled (GtkToggleButton 
*togglebutton,
 {
 /* Deactivate mirror-mode */
 
-/* Re-enable the position comboboxes FIXME */
+/* Re-enable the position comboboxes */
 gtk_widget_set_sensitive (GTK_WIDGET (positions), TRUE);
 gtk_widget_set_sensitive (GTK_WIDGET (active_displays), TRUE);
 }
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Enhancements to minimal dialog, tweaked code to support new minimal dialog.

2012-10-28 Thread Nick Schermer
Updating branch refs/heads/master
 to 8d1ed825c1e739b63d87083401b4efdee357b09f (commit)
   from 94c2d0fcec0fc2e3e6fbf66944172ca251f39067 (commit)

commit 8d1ed825c1e739b63d87083401b4efdee357b09f
Author: Sean Davis 
Date:   Wed Sep 26 05:39:00 2012 -0400

Enhancements to minimal dialog, tweaked code to support new minimal dialog.

 dialogs/display-settings/main.c|  119 +---
 .../display-settings/minimal-display-dialog.glade  |   14 +-
 2 files changed, 9 insertions(+), 124 deletions(-)

diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c
index b6192b1..86dd15e 100644
--- a/dialogs/display-settings/main.c
+++ b/dialogs/display-settings/main.c
@@ -1140,90 +1140,6 @@ screen_on_event (GdkXEvent *xevent,
 }
 
 
-
-static void
-display_settings_minimal_dialog_response (GtkDialog  *dialog,
-  gintresponse_id,
-  GtkBuilder *builder)
-{
-GObject*first_screen_radio;
-GObject*second_screen_radio;
-XfceRRMode *mode1, *mode2;
-gbooleanuse_first_screen;
-gbooleanuse_second_screen;
-guint   first, second;
-gintm, n, found;
-
-if (response_id == 1)
-{
-/* TODO: handle correctly more than 2 outputs? */
-first = 0;
-second = 1;
-
-first_screen_radio = gtk_builder_get_object (builder, "radiobutton1");
-second_screen_radio = gtk_builder_get_object (builder, "radiobutton2");
-
-use_first_screen =
-gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON 
(first_screen_radio));
-use_second_screen =
-gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON 
(second_screen_radio));
-
-if (use_first_screen)
-{
-xfce_randr->mode[first] = xfce_randr_preferred_mode (xfce_randr, 
first);
-xfce_randr->mode[second] = None;
-}
-else if (use_second_screen)
-{
-xfce_randr->mode[second] = xfce_randr_preferred_mode (xfce_randr, 
second);
-xfce_randr->mode[first] = None;
-}
-else
-{
-if (xfce_randr->clone_modes[0] != None)
-{
-xfce_randr->mode[first] = xfce_randr->clone_modes[0];
-xfce_randr->mode[second] = xfce_randr->clone_modes[0];
-}
-else
-{
-found = FALSE;
-/* No clone mode available, try to find a "similar" mode */
-for (n = 0; n < xfce_randr->output_info[first]->nmode; ++n)
-{
-mode1 = &xfce_randr->modes[first][n];
-for (m = 0; m < xfce_randr->output_info[second]->nmode; 
++m)
-{
-mode2 = &xfce_randr->modes[second][m];
-/* "similar" means same resolution */
-if (mode1->width == mode2->width
-&& mode1->height == mode2->height)
-{
-xfce_randr->mode[first] = mode1->id;
-xfce_randr->mode[second] = mode2->id;
-found = TRUE;
-break;
-}
-}
-
-if (found)
-break;
-}
-}
-}
-/* Save the two outputs and apply */
-xfce_randr_save_output (xfce_randr, "MinimalAutoConfig", 
display_channel,
-first);
-xfce_randr_save_output (xfce_randr, "MinimalAutoConfig", 
display_channel,
-second);
-xfce_randr_apply (xfce_randr, "MinimalAutoConfig", display_channel);
-}
-
-gtk_main_quit ();
-}
-
-
-
 gint
 main (gint argc, gchar **argv)
 {
@@ -1235,7 +1151,6 @@ main (gint argc, gchar **argv)
 GError  *error = NULL;
 gboolean succeeded = TRUE;
 gint event_base, error_base;
-guintfirst, second;
 gchar   *command;
 const gchar *alternative = NULL;
 const gchar *alternative_icon = NULL;
@@ -1407,45 +1322,15 @@ main (gint argc, gchar **argv)
 if (xfce_randr->noutput < 2)
 goto cleanup;
 
-/* TODO: handle correctly more than 2 outputs? */
-first = 0;
-second = 1;
-
 builder = gtk_builder_new ();
 
 if (gtk_builder_add_from_string (builder, 
minimal_display_dialog_ui,
  minimal_display_dialog_ui_length, 
&error) != 0)
 {
-GObject*first_screen_radio;
-GObject*second_screen_radio;
-gchar  *screen_name;
 
 /* Build the minimal dialog */
-dialog = (GtkWidget *) gtk_builder_get_object (builder, 
"dialog1");
-g_

[Xfce4-commits] Beginning randr stuff for left/right.

2012-10-28 Thread Nick Schermer
Updating branch refs/heads/master
 to 821122ba6d68e2a0d9c8f5f850b609bbbc3b661f (commit)
   from 7ec05479b669a0bf9300101d692b79bf11ed1448 (commit)

commit 821122ba6d68e2a0d9c8f5f850b609bbbc3b661f
Author: Sean Davis 
Date:   Wed Sep 26 09:25:08 2012 -0400

Beginning randr stuff for left/right.

 dialogs/display-settings/main.c |   57 ---
 1 files changed, 53 insertions(+), 4 deletions(-)

diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c
index fccc3e0..2d77156 100644
--- a/dialogs/display-settings/main.c
+++ b/dialogs/display-settings/main.c
@@ -141,7 +141,23 @@ display_settings_get_n_active_outputs (void)
 return count;
 }
 
+static gboolean
+display_setting_combo_box_get_str (GtkComboBox *combobox,
+   gchar   **str)
+{
+GtkTreeModel *model;
+GtkTreeIter   iter;
+
+if (gtk_combo_box_get_active_iter (combobox, &iter))
+{
+model = gtk_combo_box_get_model (combobox);
+gtk_tree_model_get (model, &iter, COLUMN_COMBO_VALUE, str, -1);
+
+return TRUE;
+}
 
+return FALSE;
+}
 
 static gboolean
 display_setting_combo_box_get_value (GtkComboBox *combobox,
@@ -249,10 +265,45 @@ static void
 display_setting_positions_changed (GtkComboBox *combobox,
  GtkBuilder  *builder)
 {
-gint value;
+/* This part is incomplete.  We should check if the display combobox is 
+   also already selected, then move on with working with the specific 
+   displays. */
+RRMode old_mode;
+gchar *value;
 
-if (!display_setting_combo_box_get_value (combobox, &value))
+if (!display_setting_combo_box_get_str (combobox, &value))
 return;
+
+/* Extend Left */
+if (g_strcmp0(value, "left") == 0)
+{
+
+}
+
+/* Extend Right */
+if (g_strcmp0(value, "right") == 0)
+{
+
+}
+
+/* Set new resolution */
+old_mode = XFCE_RANDR_MODE (xfce_randr);
+//XFCE_RANDR_MODE (xfce_randr) = value;
+
+/* Apply the changes */
+xfce_randr_save_output (xfce_randr, "Default", display_channel,
+xfce_randr->active_output);
+xfce_randr_apply (xfce_randr, "Default", display_channel);
+
+/* Ask user confirmation */
+if (!display_setting_timed_confirmation (builder))
+{
+XFCE_RANDR_MODE (xfce_randr) = old_mode;
+xfce_randr_save_output (xfce_randr, "Default", display_channel,
+xfce_randr->active_output);
+xfce_randr_apply (xfce_randr, "Default", display_channel);
+}
+
 }
 
 static void
@@ -646,8 +697,6 @@ display_setting_refresh_rates_populate (GtkBuilder *builder)
 g_signal_connect (G_OBJECT (combobox), "changed", G_CALLBACK 
(display_setting_refresh_rates_changed), builder);
 }
 
-
-
 static void
 display_setting_resolutions_changed (GtkComboBox *combobox,
  GtkBuilder  *builder)
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Added radio states to minimal dialog.

2012-10-28 Thread Nick Schermer
Updating branch refs/heads/master
 to 7ec05479b669a0bf9300101d692b79bf11ed1448 (commit)
   from 8d1ed825c1e739b63d87083401b4efdee357b09f (commit)

commit 7ec05479b669a0bf9300101d692b79bf11ed1448
Author: Sean Davis 
Date:   Wed Sep 26 06:39:19 2012 -0400

Added radio states to minimal dialog.

 dialogs/display-settings/main.c |  119 +++
 1 files changed, 119 insertions(+), 0 deletions(-)

diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c
index 86dd15e..fccc3e0 100644
--- a/dialogs/display-settings/main.c
+++ b/dialogs/display-settings/main.c
@@ -112,6 +112,18 @@ static gboolean   bound_to_channel = FALSE;
 /* Pointer to the used randr structure */
 XfceRandr *xfce_randr = NULL;
 
+static void
+display_settings_minimal_extend_left_toggled (GtkToggleButton *button,
+  GtkBuilder *builder);
+  
+static void
+display_settings_minimal_mirror_displays_toggled (GtkToggleButton *button,
+  GtkBuilder *builder);
+  
+static void
+display_settings_minimal_extend_right_toggled (GtkToggleButton *button,
+  GtkBuilder *builder);
+
 
 
 static guint
@@ -1113,6 +1125,99 @@ display_settings_dialog_new (GtkBuilder *builder)
 return GTK_WIDGET (gtk_builder_get_object (builder, "display-dialog"));
 }
 
+static void
+display_settings_minimal_extend_left_toggled (GtkToggleButton *button,
+  GtkBuilder *builder)
+{
+GObject *mirror_displays;
+GObject *extend_right;
+
+mirror_displays = gtk_builder_get_object(builder, "mirror");
+extend_right = gtk_builder_get_object(builder, "extend_right");
+
+g_object_disconnect (mirror_displays, "any_signal::toggled",
+ display_settings_minimal_mirror_displays_toggled,
+ builder, NULL);
+ 
+g_object_disconnect (extend_right, "any_signal::toggled",
+ display_settings_minimal_extend_right_toggled,
+ builder, NULL);
+
+/* Since this signal will only be called when a toggle button is 
activated. */
+gtk_toggle_button_set_active (button, TRUE);
+gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(mirror_displays), FALSE);
+gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(extend_right), FALSE);
+
+/* Reconnect the signals */
+g_signal_connect (mirror_displays, "toggled", G_CALLBACK 
(display_settings_minimal_mirror_displays_toggled),
+  builder);
+  
+g_signal_connect (extend_right, "toggled", G_CALLBACK 
(display_settings_minimal_extend_right_toggled),
+  builder);
+}
+
+static void
+display_settings_minimal_mirror_displays_toggled (GtkToggleButton *button,
+  GtkBuilder *builder)
+{
+GObject *extend_left;
+GObject *extend_right;
+
+extend_left = gtk_builder_get_object(builder, "extend_left");
+extend_right = gtk_builder_get_object(builder, "extend_right");
+
+g_object_disconnect (extend_left, "any_signal::toggled",
+ display_settings_minimal_extend_left_toggled,
+ builder, NULL);
+ 
+g_object_disconnect (extend_right, "any_signal::toggled",
+ display_settings_minimal_extend_right_toggled,
+ builder, NULL);
+
+/* Since this signal will only be called when a toggle button is 
activated. */
+gtk_toggle_button_set_active (button, TRUE);
+gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(extend_left), FALSE);
+gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(extend_right), FALSE);
+
+/* Reconnect the signals */
+g_signal_connect (extend_left, "toggled", G_CALLBACK 
(display_settings_minimal_extend_left_toggled),
+  builder);
+  
+g_signal_connect (extend_right, "toggled", G_CALLBACK 
(display_settings_minimal_extend_right_toggled),
+  builder);
+}
+
+static void
+display_settings_minimal_extend_right_toggled (GtkToggleButton *button,
+  GtkBuilder *builder)
+{
+GObject *mirror_displays;
+GObject *extend_left;
+
+mirror_displays = gtk_builder_get_object(builder, "mirror");
+extend_left = gtk_builder_get_object(builder, "extend_left");
+
+g_object_disconnect (mirror_displays, "any_signal::toggled",
+ display_settings_minimal_mirror_displays_toggled,
+ builder, NULL);
+ 
+g_object_disconnect (extend_left, "any_signal::toggled",
+ display_settings_minimal_extend_left_toggled,

[Xfce4-commits] Added Right-Of positioning.

2012-10-28 Thread Nick Schermer
Updating branch refs/heads/master
 to 59943ca568e9191fc5f9e91d25f3cfb3eb624473 (commit)
   from 821122ba6d68e2a0d9c8f5f850b609bbbc3b661f (commit)

commit 59943ca568e9191fc5f9e91d25f3cfb3eb624473
Author: Sean Davis 
Date:   Wed Sep 26 14:57:57 2012 -0400

Added Right-Of positioning.

 dialogs/display-settings/main.c |  102 +++
 1 files changed, 60 insertions(+), 42 deletions(-)

diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c
index 2d77156..350f3bb 100644
--- a/dialogs/display-settings/main.c
+++ b/dialogs/display-settings/main.c
@@ -142,24 +142,6 @@ display_settings_get_n_active_outputs (void)
 }
 
 static gboolean
-display_setting_combo_box_get_str (GtkComboBox *combobox,
-   gchar   **str)
-{
-GtkTreeModel *model;
-GtkTreeIter   iter;
-
-if (gtk_combo_box_get_active_iter (combobox, &iter))
-{
-model = gtk_combo_box_get_model (combobox);
-gtk_tree_model_get (model, &iter, COLUMN_COMBO_VALUE, str, -1);
-
-return TRUE;
-}
-
-return FALSE;
-}
-
-static gboolean
 display_setting_combo_box_get_value (GtkComboBox *combobox,
  gint*value)
 {
@@ -268,41 +250,70 @@ display_setting_positions_changed (GtkComboBox *combobox,
 /* This part is incomplete.  We should check if the display combobox is 
also already selected, then move on with working with the specific 
displays. */
-RRMode old_mode;
-gchar *value;
+gint value, current_display, selected_display, n;
+GObject *display_combobox;
+XfceRRMode   *modes;
+
+display_combobox = gtk_builder_get_object(builder, 
"randr-active-displays");
 
-if (!display_setting_combo_box_get_str (combobox, &value))
+if (!display_setting_combo_box_get_value (combobox, &value))
 return;
 
-/* Extend Left */
-if (g_strcmp0(value, "left") == 0)
-{
+if (!display_setting_combo_box_get_value (GTK_COMBO_BOX(display_combobox), 
&selected_display))
+return;
+
+if (selected_display == -1) return;
+
+/* Store the Current Display */
+current_display = xfce_randr->active_output;
 
+/* FIXME: Extend Left (Move primary screen right/make secondary primary) */
+if (value == 0)
+{
+/* Walk all supported modes of current display */
+modes = XFCE_RANDR_SUPPORTED_MODES (xfce_randr);
+for (n = 0; n < XFCE_RANDR_OUTPUT_INFO (xfce_randr)->nmode; ++n)
+{
+/* Find the current mode. */
+if (modes[n].id == XFCE_RANDR_MODE (xfce_randr))
+{
+/* Change active output to secondary display. */
+xfce_randr->active_output = selected_display;
+/* Move the secondary display to the right of the primary 
display. */
+XFCE_RANDR_POS_X (xfce_randr) = modes[n].width;
+break;
+}
+}
 }
 
 /* Extend Right */
-if (g_strcmp0(value, "right") == 0)
+if (value == 1)
 {
-
+/* Change active output to secondary display. */
+xfce_randr->active_output = selected_display;
+
+/* Find the current mode. */
+modes = XFCE_RANDR_SUPPORTED_MODES (xfce_randr);
+for (n = 0; n < XFCE_RANDR_OUTPUT_INFO (xfce_randr)->nmode; ++n)
+{
+if (modes[n].id == XFCE_RANDR_MODE (xfce_randr))
+{
+/* Change active output to primary display. */
+xfce_randr->active_output = current_display;
+/* Move the primary display to the right of the secondary 
display. */
+XFCE_RANDR_POS_X (xfce_randr) = modes[n].width;
+break;
+}
+}
 }
-
-/* Set new resolution */
-old_mode = XFCE_RANDR_MODE (xfce_randr);
-//XFCE_RANDR_MODE (xfce_randr) = value;
-
+
+/* Restore the current display to the primary display. */
+xfce_randr->active_output = current_display;
+
 /* Apply the changes */
 xfce_randr_save_output (xfce_randr, "Default", display_channel,
 xfce_randr->active_output);
 xfce_randr_apply (xfce_randr, "Default", display_channel);
-
-/* Ask user confirmation */
-if (!display_setting_timed_confirmation (builder))
-{
-XFCE_RANDR_MODE (xfce_randr) = old_mode;
-xfce_randr_save_output (xfce_randr, "Default", display_channel,
-xfce_randr->active_output);
-xfce_randr_apply (xfce_randr, "Default", display_channel);
-}
 
 }
 
@@ -336,13 +347,13 @@ display_setting_positions_populate (GtkBuilder *builder)
 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_VALUE, "left", -1);
+ 

[Xfce4-commits] Changed to switch statement and static variables.

2012-10-28 Thread Nick Schermer
Updating branch refs/heads/master
 to f97545f2fd40630aff3adb67195315ff81321a14 (commit)
   from 59943ca568e9191fc5f9e91d25f3cfb3eb624473 (commit)

commit f97545f2fd40630aff3adb67195315ff81321a14
Author: Sean Davis 
Date:   Wed Sep 26 15:43:56 2012 -0400

Changed to switch statement and static variables.

 dialogs/display-settings/main.c   |   76 -
 dialogs/display-settings/xfce-randr.h |4 ++
 2 files changed, 41 insertions(+), 39 deletions(-)

diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c
index 350f3bb..2147c68 100644
--- a/dialogs/display-settings/main.c
+++ b/dialogs/display-settings/main.c
@@ -247,9 +247,6 @@ static void
 display_setting_positions_changed (GtkComboBox *combobox,
  GtkBuilder  *builder)
 {
-/* This part is incomplete.  We should check if the display combobox is 
-   also already selected, then move on with working with the specific 
-   displays. */
 gint value, current_display, selected_display, n;
 GObject *display_combobox;
 XfceRRMode   *modes;
@@ -267,44 +264,45 @@ display_setting_positions_changed (GtkComboBox *combobox,
 /* Store the Current Display */
 current_display = xfce_randr->active_output;
 
-/* FIXME: Extend Left (Move primary screen right/make secondary primary) */
-if (value == 0)
-{
-/* Walk all supported modes of current display */
-modes = XFCE_RANDR_SUPPORTED_MODES (xfce_randr);
-for (n = 0; n < XFCE_RANDR_OUTPUT_INFO (xfce_randr)->nmode; ++n)
-{
-/* Find the current mode. */
-if (modes[n].id == XFCE_RANDR_MODE (xfce_randr))
+switch (value) {
+case XFCE_RANDR_PLACEMENT_LEFT: // Extend Left FIXME
+/* Walk all supported modes of current display */
+modes = XFCE_RANDR_SUPPORTED_MODES (xfce_randr);
+for (n = 0; n < XFCE_RANDR_OUTPUT_INFO (xfce_randr)->nmode; ++n)
 {
-/* Change active output to secondary display. */
-xfce_randr->active_output = selected_display;
-/* Move the secondary display to the right of the primary 
display. */
-XFCE_RANDR_POS_X (xfce_randr) = modes[n].width;
-break;
+/* Find the current mode. */
+if (modes[n].id == XFCE_RANDR_MODE (xfce_randr))
+{
+/* Change active output to secondary display. */
+xfce_randr->active_output = selected_display;
+/* Move the secondary display to the right of the primary 
display. */
+XFCE_RANDR_POS_X (xfce_randr) = modes[n].width;
+break;
+}
 }
-}
-}
-
-/* Extend Right */
-if (value == 1)
-{
-/* Change active output to secondary display. */
-xfce_randr->active_output = selected_display;
-
-/* Find the current mode. */
-modes = XFCE_RANDR_SUPPORTED_MODES (xfce_randr);
-for (n = 0; n < XFCE_RANDR_OUTPUT_INFO (xfce_randr)->nmode; ++n)
-{
-if (modes[n].id == XFCE_RANDR_MODE (xfce_randr))
+break;
+case XFCE_RANDR_PLACEMENT_RIGHT: // Extend Right
+/* Change active output to secondary display. */
+xfce_randr->active_output = selected_display;
+
+/* Find the current mode. */
+modes = XFCE_RANDR_SUPPORTED_MODES (xfce_randr);
+for (n = 0; n < XFCE_RANDR_OUTPUT_INFO (xfce_randr)->nmode; ++n)
 {
-/* Change active output to primary display. */
-xfce_randr->active_output = current_display;
-/* Move the primary display to the right of the secondary 
display. */
-XFCE_RANDR_POS_X (xfce_randr) = modes[n].width;
-break;
+if (modes[n].id == XFCE_RANDR_MODE (xfce_randr))
+{
+/* Change active output to primary display. */
+xfce_randr->active_output = current_display;
+/* Move the primary display to the right of the secondary 
display. */
+XFCE_RANDR_POS_X (xfce_randr) = modes[n].width;
+break;
+}
 }
-}
+break;
+case XFCE_RANDR_PLACEMENT_UP:
+case XFCE_RANDR_PLACEMENT_DOWN:
+default:
+break;
 }
 
 /* Restore the current display to the primary display. */
@@ -347,13 +345,13 @@ display_setting_positions_populate (GtkBuilder *builder)
 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_VALUE, 0, -1);
+COLUMN_COMBO_VALUE, XFCE_RAN

[Xfce4-commits] Added above (broken) and below code.

2012-10-28 Thread Nick Schermer
Updating branch refs/heads/master
 to 37d456cf9f52bcddcf8d009af909ff4b69331bc2 (commit)
   from f97545f2fd40630aff3adb67195315ff81321a14 (commit)

commit 37d456cf9f52bcddcf8d009af909ff4b69331bc2
Author: Sean Davis 
Date:   Wed Sep 26 16:01:29 2012 -0400

Added above (broken) and below code.

 dialogs/display-settings/main.c |   50 +++---
 1 files changed, 46 insertions(+), 4 deletions(-)

diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c
index 2147c68..2c17dfe 100644
--- a/dialogs/display-settings/main.c
+++ b/dialogs/display-settings/main.c
@@ -299,8 +299,40 @@ display_setting_positions_changed (GtkComboBox *combobox,
 }
 }
 break;
-case XFCE_RANDR_PLACEMENT_UP:
-case XFCE_RANDR_PLACEMENT_DOWN:
+case XFCE_RANDR_PLACEMENT_UP: // Extend Above
+/* Walk all supported modes of current display */
+modes = XFCE_RANDR_SUPPORTED_MODES (xfce_randr);
+for (n = 0; n < XFCE_RANDR_OUTPUT_INFO (xfce_randr)->nmode; ++n)
+{
+/* Find the current mode. */
+if (modes[n].id == XFCE_RANDR_MODE (xfce_randr))
+{
+/* Change active output to secondary display. */
+xfce_randr->active_output = selected_display;
+/* Move the secondary display to the above the primary 
display. */
+XFCE_RANDR_POS_Y (xfce_randr) = modes[n].height;
+break;
+}
+}
+break;
+case XFCE_RANDR_PLACEMENT_DOWN: // Extend Below
+/* Change active output to secondary display. */
+xfce_randr->active_output = selected_display;
+
+/* Find the current mode. */
+modes = XFCE_RANDR_SUPPORTED_MODES (xfce_randr);
+for (n = 0; n < XFCE_RANDR_OUTPUT_INFO (xfce_randr)->nmode; ++n)
+{
+if (modes[n].id == XFCE_RANDR_MODE (xfce_randr))
+{
+/* Change active output to primary display. */
+xfce_randr->active_output = current_display;
+/* Move the primary display to the below the secondary 
display. */
+XFCE_RANDR_POS_Y (xfce_randr) = modes[n].height;
+break;
+}
+}
+break;
 default:
 break;
 }
@@ -352,6 +384,18 @@ display_setting_positions_populate (GtkBuilder *builder)
 gtk_list_store_set (GTK_LIST_STORE (model), &iter,
 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_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_VALUE, XFCE_RANDR_PLACEMENT_DOWN, -1);
 
 
 /* Reconnect the signal */
@@ -755,8 +799,6 @@ display_setting_resolutions_populate (GtkBuilder *builder)
 GtkTreeIteriter;
 XfceRRMode   *modes;
 
-g_print("get resolutions");
-
 /* Get the combo box store and clear it */
 combobox = gtk_builder_get_object (builder, "randr-resolution");
 model = gtk_combo_box_get_model (GTK_COMBO_BOX (combobox));
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Fixed above and left positioning.

2012-10-28 Thread Nick Schermer
Updating branch refs/heads/master
 to 7c45c31da0a14f22dc1aec02e94361674fac68e3 (commit)
   from 37d456cf9f52bcddcf8d009af909ff4b69331bc2 (commit)

commit 7c45c31da0a14f22dc1aec02e94361674fac68e3
Author: Sean Davis 
Date:   Wed Sep 26 18:29:56 2012 -0400

Fixed above and left positioning.

 dialogs/display-settings/main.c |   10 +-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c
index 2c17dfe..f7eacd9 100644
--- a/dialogs/display-settings/main.c
+++ b/dialogs/display-settings/main.c
@@ -265,7 +265,7 @@ display_setting_positions_changed (GtkComboBox *combobox,
 current_display = xfce_randr->active_output;
 
 switch (value) {
-case XFCE_RANDR_PLACEMENT_LEFT: // Extend Left FIXME
+case XFCE_RANDR_PLACEMENT_LEFT: // Extend Left
 /* Walk all supported modes of current display */
 modes = XFCE_RANDR_SUPPORTED_MODES (xfce_randr);
 for (n = 0; n < XFCE_RANDR_OUTPUT_INFO (xfce_randr)->nmode; ++n)
@@ -337,6 +337,12 @@ display_setting_positions_changed (GtkComboBox *combobox,
 break;
 }
 
+/* Apply and save changes to secondary display */
+xfce_randr->active_output = selected_display;
+xfce_randr_save_output (xfce_randr, "Default", display_channel,
+xfce_randr->active_output);
+xfce_randr_apply (xfce_randr, "Default", display_channel);
+
 /* Restore the current display to the primary display. */
 xfce_randr->active_output = current_display;
 
@@ -345,6 +351,8 @@ display_setting_positions_changed (GtkComboBox *combobox,
 xfce_randr->active_output);
 xfce_randr_apply (xfce_randr, "Default", display_channel);
 
+
+
 }
 
 static void
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Fixed placement of displays when changing often.

2012-10-28 Thread Nick Schermer
Updating branch refs/heads/master
 to d2a415b5314eef158e8a457c69e3b5622b15aae9 (commit)
   from 7c45c31da0a14f22dc1aec02e94361674fac68e3 (commit)

commit d2a415b5314eef158e8a457c69e3b5622b15aae9
Author: Sean Davis 
Date:   Wed Sep 26 19:23:33 2012 -0400

Fixed placement of displays when changing often.

 dialogs/display-settings/main.c |   38 +-
 1 files changed, 37 insertions(+), 1 deletions(-)

diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c
index f7eacd9..f95671f 100644
--- a/dialogs/display-settings/main.c
+++ b/dialogs/display-settings/main.c
@@ -247,7 +247,7 @@ static void
 display_setting_positions_changed (GtkComboBox *combobox,
  GtkBuilder  *builder)
 {
-gint value, current_display, selected_display, n;
+gint value, current_display, selected_display, selected_x, selected_y, n;
 GObject *display_combobox;
 XfceRRMode   *modes;
 
@@ -275,6 +275,15 @@ display_setting_positions_changed (GtkComboBox *combobox,
 {
 /* Change active output to secondary display. */
 xfce_randr->active_output = selected_display;
+
+/* Move the primary to where the secondary is... */
+selected_x = XFCE_RANDR_POS_X (xfce_randr);
+selected_y = XFCE_RANDR_POS_Y (xfce_randr);
+xfce_randr->active_output = current_display;
+XFCE_RANDR_POS_X (xfce_randr) = selected_x;
+XFCE_RANDR_POS_Y (xfce_randr) = selected_y;
+
+xfce_randr->active_output = selected_display;
 /* Move the secondary display to the right of the primary 
display. */
 XFCE_RANDR_POS_X (xfce_randr) = modes[n].width;
 break;
@@ -293,6 +302,15 @@ display_setting_positions_changed (GtkComboBox *combobox,
 {
 /* Change active output to primary display. */
 xfce_randr->active_output = current_display;
+
+/* Move the secondary to where the primary is... */
+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;
+
+xfce_randr->active_output = current_display;
 /* Move the primary display to the right of the secondary 
display. */
 XFCE_RANDR_POS_X (xfce_randr) = modes[n].width;
 break;
@@ -309,6 +327,15 @@ display_setting_positions_changed (GtkComboBox *combobox,
 {
 /* Change active output to secondary display. */
 xfce_randr->active_output = selected_display;
+
+/* Move the primary to where the secondary is... */
+selected_x = XFCE_RANDR_POS_X (xfce_randr);
+selected_y = XFCE_RANDR_POS_Y (xfce_randr);
+xfce_randr->active_output = current_display;
+XFCE_RANDR_POS_X (xfce_randr) = selected_x;
+XFCE_RANDR_POS_Y (xfce_randr) = selected_y;
+
+xfce_randr->active_output = selected_display;
 /* Move the secondary display to the above the primary 
display. */
 XFCE_RANDR_POS_Y (xfce_randr) = modes[n].height;
 break;
@@ -327,6 +354,15 @@ display_setting_positions_changed (GtkComboBox *combobox,
 {
 /* Change active output to primary display. */
 xfce_randr->active_output = current_display;
+
+/* Move the secondary to where the primary is... */
+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;
+
+xfce_randr->active_output = current_display;
 /* Move the primary display to the below the secondary 
display. */
 XFCE_RANDR_POS_Y (xfce_randr) = modes[n].height;
 break;
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Changed mode detection to xfce_randr_find_mode_by_id and apply only once.

2012-10-28 Thread Nick Schermer
Updating branch refs/heads/master
 to ddbfcdac263ac4d85a21eabfb0a859c2bb596071 (commit)
   from d2a415b5314eef158e8a457c69e3b5622b15aae9 (commit)

commit ddbfcdac263ac4d85a21eabfb0a859c2bb596071
Author: Sean Davis 
Date:   Thu Sep 27 06:10:16 2012 -0400

Changed mode detection to xfce_randr_find_mode_by_id and apply only once.

 dialogs/display-settings/main.c |  173 ---
 1 files changed, 72 insertions(+), 101 deletions(-)

diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c
index f95671f..098e55a 100644
--- a/dialogs/display-settings/main.c
+++ b/dialogs/display-settings/main.c
@@ -247,9 +247,9 @@ static void
 display_setting_positions_changed (GtkComboBox *combobox,
  GtkBuilder  *builder)
 {
-gint value, current_display, selected_display, selected_x, selected_y, n;
+gint value, current_display, selected_display, selected_x, selected_y;
 GObject *display_combobox;
-XfceRRMode   *modes;
+XfceRRMode   *current_mode;
 
 display_combobox = gtk_builder_get_object(builder, 
"randr-active-displays");
 
@@ -259,6 +259,7 @@ display_setting_positions_changed (GtkComboBox *combobox,
 if (!display_setting_combo_box_get_value (GTK_COMBO_BOX(display_combobox), 
&selected_display))
 return;
 
+/* Skip if the display combobox hasn't made a selection yet */
 if (selected_display == -1) return;
 
 /* Store the Current Display */
@@ -266,129 +267,99 @@ display_setting_positions_changed (GtkComboBox *combobox,
 
 switch (value) {
 case XFCE_RANDR_PLACEMENT_LEFT: // Extend Left
-/* Walk all supported modes of current display */
-modes = XFCE_RANDR_SUPPORTED_MODES (xfce_randr);
-for (n = 0; n < XFCE_RANDR_OUTPUT_INFO (xfce_randr)->nmode; ++n)
-{
-/* Find the current mode. */
-if (modes[n].id == XFCE_RANDR_MODE (xfce_randr))
-{
-/* Change active output to secondary display. */
-xfce_randr->active_output = selected_display;
-
-/* Move the primary to where the secondary is... */
-selected_x = XFCE_RANDR_POS_X (xfce_randr);
-selected_y = XFCE_RANDR_POS_Y (xfce_randr);
-xfce_randr->active_output = current_display;
-XFCE_RANDR_POS_X (xfce_randr) = selected_x;
-XFCE_RANDR_POS_Y (xfce_randr) = selected_y;
-
-xfce_randr->active_output = selected_display;
-/* Move the secondary display to the right of the primary 
display. */
-XFCE_RANDR_POS_X (xfce_randr) = modes[n].width;
-break;
-}
-}
+current_mode = xfce_randr_find_mode_by_id (xfce_randr, 
xfce_randr->active_output, XFCE_RANDR_MODE (xfce_randr));
+
+/* Change active output to secondary display. */
+xfce_randr->active_output = selected_display;
+
+/* Move the primary to where the secondary is... */
+selected_x = XFCE_RANDR_POS_X (xfce_randr);
+selected_y = XFCE_RANDR_POS_Y (xfce_randr);
+xfce_randr->active_output = current_display;
+XFCE_RANDR_POS_X (xfce_randr) = selected_x;
+XFCE_RANDR_POS_Y (xfce_randr) = selected_y;
+
+/* Move the secondary display to the right of the primary display. 
*/
+xfce_randr->active_output = selected_display;
+XFCE_RANDR_POS_X (xfce_randr) = current_mode->width;
 break;
+
 case XFCE_RANDR_PLACEMENT_RIGHT: // Extend Right
 /* Change active output to secondary display. */
 xfce_randr->active_output = selected_display;
 
-/* Find the current mode. */
-modes = XFCE_RANDR_SUPPORTED_MODES (xfce_randr);
-for (n = 0; n < XFCE_RANDR_OUTPUT_INFO (xfce_randr)->nmode; ++n)
-{
-if (modes[n].id == XFCE_RANDR_MODE (xfce_randr))
-{
-/* Change active output to primary display. */
-xfce_randr->active_output = current_display;
-
-/* Move the secondary to where the primary is... */
-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;
-
-xfce_randr->active_output = current_display;
-/* Move the primary display to the right of the secondary 
display. */
- 

[Xfce4-commits] Added mirror option to placement settings.

2012-10-28 Thread Nick Schermer
Updating branch refs/heads/master
 to 83b7bfd1009a1a31044761eb2b9a365156f37cea (commit)
   from ddbfcdac263ac4d85a21eabfb0a859c2bb596071 (commit)

commit 83b7bfd1009a1a31044761eb2b9a365156f37cea
Author: Sean Davis 
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_RIGHT1
 #define XFCE_RANDR_PLACEMENT_DOWN 2
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Fix for -1 is list terminator on mirror variable.

2012-10-28 Thread Nick Schermer
Updating branch refs/heads/master
 to 04d492c4cc626a50cfefcc04751d43ce856dec1d (commit)
   from 83b7bfd1009a1a31044761eb2b9a365156f37cea (commit)

commit 04d492c4cc626a50cfefcc04751d43ce856dec1d
Author: Sean Davis 
Date:   Thu Sep 27 09:18:33 2012 -0400

Fix for -1 is list terminator on mirror variable.

 dialogs/display-settings/main.c   |1 -
 dialogs/display-settings/xfce-randr.h |2 +-
 2 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c
index d7b9c59..79a948a 100644
--- a/dialogs/display-settings/main.c
+++ b/dialogs/display-settings/main.c
@@ -426,7 +426,6 @@ display_setting_positions_populate (GtkBuilder *builder)
 gtk_list_store_set (GTK_LIST_STORE (model), &iter,
 COLUMN_COMBO_NAME, _("Below"),
 COLUMN_COMBO_VALUE, XFCE_RANDR_PLACEMENT_DOWN, -1);
-
 
 /* Reconnect the signal */
 g_signal_connect (G_OBJECT (combobox), "changed", G_CALLBACK 
(display_setting_positions_changed), builder);
diff --git a/dialogs/display-settings/xfce-randr.h 
b/dialogs/display-settings/xfce-randr.h
index 4f40305..78a0e7e 100644
--- a/dialogs/display-settings/xfce-randr.h
+++ b/dialogs/display-settings/xfce-randr.h
@@ -34,11 +34,11 @@
 #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_RIGHT1
 #define XFCE_RANDR_PLACEMENT_DOWN 2
 #define XFCE_RANDR_PLACEMENT_LEFT 3
+#define XFCE_RANDR_PLACEMENT_MIRROR   4
 
 /* check for randr 1.3 or better */
 #if RANDR_MAJOR > 1 || (RANDR_MAJOR == 1 && RANDR_MINOR >= 3)
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Added detection of relative display position.

2012-10-28 Thread Nick Schermer
Updating branch refs/heads/master
 to 402a724d0734f2c54ffef8574cb9f6e84708fe5e (commit)
   from 04d492c4cc626a50cfefcc04751d43ce856dec1d (commit)

commit 402a724d0734f2c54ffef8574cb9f6e84708fe5e
Author: Sean Davis 
Date:   Thu Sep 27 10:23:48 2012 -0400

Added detection of relative display position.

 dialogs/display-settings/main.c |   81 +++
 1 files changed, 81 insertions(+), 0 deletions(-)

diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c
index 79a948a..af39b61 100644
--- a/dialogs/display-settings/main.c
+++ b/dialogs/display-settings/main.c
@@ -498,6 +498,86 @@ display_setting_active_displays_populate (GtkBuilder 
*builder)
 }
 
 static void
+display_setting_guess_positioning (GtkBuilder *builder)
+{
+GObject *position_combo, *display_combo;
+gint current_x, current_y, index;
+guint n, current_display;
+
+current_display = xfce_randr->active_output;
+current_x = XFCE_RANDR_POS_X (xfce_randr);
+current_y = XFCE_RANDR_POS_Y (xfce_randr);
+
+position_combo = gtk_builder_get_object(builder, "randr-position");
+display_combo = gtk_builder_get_object(builder, "randr-active-displays");
+
+g_object_disconnect (position_combo, "any_signal::changed",
+ display_setting_positions_changed,
+ builder, NULL);
+ 
+g_object_disconnect (display_combo, "any_signal::changed",
+ display_setting_active_displays_changed,
+ builder, NULL);
+ 
+index = 0;
+
+for (n = 0; n < display_settings_get_n_active_outputs (); n++)
+{
+if (n != current_display)
+{
+xfce_randr->active_output = n;
+
+/* Check for mirror */
+if ( (XFCE_RANDR_POS_X (xfce_randr) == current_x) && 
+ (XFCE_RANDR_POS_Y (xfce_randr) == current_y) ) {
+gtk_combo_box_set_active( GTK_COMBO_BOX(position_combo), 0 );
+gtk_combo_box_set_active( GTK_COMBO_BOX(display_combo), index 
);
+break;   
+}
+
+/* Check for Left Of */
+if ( (XFCE_RANDR_POS_Y (xfce_randr) == current_y) &&
+ (XFCE_RANDR_POS_X (xfce_randr) > current_x) ) {
+gtk_combo_box_set_active( GTK_COMBO_BOX(position_combo), 1 );
+gtk_combo_box_set_active( GTK_COMBO_BOX(display_combo), index 
);
+break;
+}
+
+/* Check for Right Of */
+if ( (XFCE_RANDR_POS_Y (xfce_randr) == current_y) &&
+ (XFCE_RANDR_POS_X (xfce_randr) < current_x) ) {
+gtk_combo_box_set_active( GTK_COMBO_BOX(position_combo), 2 );
+gtk_combo_box_set_active( GTK_COMBO_BOX(display_combo), index 
);
+break;
+}
+
+/* Check for Above */
+if ( (XFCE_RANDR_POS_X (xfce_randr) == current_x) &&
+ (XFCE_RANDR_POS_Y (xfce_randr) > current_y) ) {
+gtk_combo_box_set_active( GTK_COMBO_BOX(position_combo), 3 );
+gtk_combo_box_set_active( GTK_COMBO_BOX(display_combo), index 
);
+break;
+}
+
+/* Check for Below */
+if ( (XFCE_RANDR_POS_X (xfce_randr) == current_x) &&
+ (XFCE_RANDR_POS_Y (xfce_randr) < current_y) ) {
+gtk_combo_box_set_active( GTK_COMBO_BOX(position_combo), 4 );
+gtk_combo_box_set_active( GTK_COMBO_BOX(display_combo), index 
);
+break;
+}
+
+index++;
+}
+}
+
+xfce_randr->active_output = current_display;
+
+g_signal_connect (G_OBJECT (position_combo), "changed", G_CALLBACK 
(display_setting_positions_changed), builder);
+g_signal_connect (G_OBJECT (display_combo), "changed", G_CALLBACK 
(display_setting_active_displays_changed), builder);
+}
+
+static void
 display_setting_reflections_changed (GtkComboBox *combobox,
  GtkBuilder  *builder)
 {
@@ -1061,6 +1141,7 @@ display_settings_treeview_selection_changed 
(GtkTreeSelection *selection,
 /* Update the combo boxes */
 display_setting_positions_populate (builder);
 display_setting_active_displays_populate (builder);
+display_setting_guess_positioning (builder);
 display_setting_output_status_populate (builder);
 display_setting_mirror_displays_populate (builder);
 display_setting_resolutions_populate (builder);
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Plugged in mirror displays checkbox.

2012-10-28 Thread Nick Schermer
Updating branch refs/heads/master
 to 13cc6a31ba8a89976149034bcd8a9354b3681adf (commit)
   from 402a724d0734f2c54ffef8574cb9f6e84708fe5e (commit)

commit 13cc6a31ba8a89976149034bcd8a9354b3681adf
Author: Sean Davis 
Date:   Thu Sep 27 10:58:53 2012 -0400

Plugged in mirror displays checkbox.

 dialogs/display-settings/main.c |   30 ++
 1 files changed, 30 insertions(+), 0 deletions(-)

diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c
index af39b61..5c61662 100644
--- a/dialogs/display-settings/main.c
+++ b/dialogs/display-settings/main.c
@@ -962,12 +962,15 @@ display_setting_mirror_displays_toggled (GtkToggleButton 
*togglebutton,
 GtkBuilder  *builder)
 {
 GObject *positions, *active_displays;
+guint n, current_display;
 
 if (!xfce_randr)
 return;
 
 if (xfce_randr->noutput <= 1)
 return;
+
+current_display = xfce_randr->active_output;
 
 positions = gtk_builder_get_object (builder, "randr-position");
 active_displays = gtk_builder_get_object (builder, 
"randr-active-displays");
@@ -976,6 +979,23 @@ display_setting_mirror_displays_toggled (GtkToggleButton 
*togglebutton,
 {
 /* Activate mirror-mode */
 
+/* Apply mirror settings to each monitor */
+for (n = 0; n < display_settings_get_n_active_outputs (); n++)
+{
+xfce_randr->active_output = n;
+
+XFCE_RANDR_POS_X (xfce_randr) = 0;
+XFCE_RANDR_POS_Y (xfce_randr) = 0;
+
+xfce_randr_save_output (xfce_randr, "Default", display_channel,
+xfce_randr->active_output);
+
+}
+
+xfce_randr->active_output = current_display;
+
+xfce_randr_apply (xfce_randr, "Default", display_channel);
+
 /* Disable the position comboboxes */
 gtk_widget_set_sensitive (GTK_WIDGET (positions), FALSE);
 gtk_widget_set_sensitive (GTK_WIDGET (active_displays), FALSE);
@@ -1127,6 +1147,7 @@ display_settings_treeview_selection_changed 
(GtkTreeSelection *selection,
 GtkTreeIter   iter;
 gboolean  has_selection;
 gint  active_id;
+GObject *mirror_displays, *position_combo, *display_combo;
 
 /* Get the selection */
 has_selection = gtk_tree_selection_get_selected (selection, &model, &iter);
@@ -1148,6 +1169,15 @@ display_settings_treeview_selection_changed 
(GtkTreeSelection *selection,
 display_setting_refresh_rates_populate (builder);
 display_setting_rotations_populate (builder);
 display_setting_reflections_populate (builder);
+
+mirror_displays = gtk_builder_get_object(builder, "mirror-displays");
+if (gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON(mirror_displays) 
)) {
+position_combo = gtk_builder_get_object(builder, "randr-position");
+display_combo = gtk_builder_get_object(builder, 
"randr-active-displays");
+
+gtk_widget_set_sensitive( GTK_WIDGET(position_combo), FALSE );
+gtk_widget_set_sensitive( GTK_WIDGET(display_combo), FALSE );
+}
 }
 }
 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Fix for variable index.

2012-10-28 Thread Nick Schermer
Updating branch refs/heads/master
 to 85ea3069a1c06fc5c4e29f0f8ee80cc7d1f852c2 (commit)
   from d1ccb38ff9bbd3b9ed7887fffaa86843d9c0b69f (commit)

commit 85ea3069a1c06fc5c4e29f0f8ee80cc7d1f852c2
Author: Sean Davis 
Date:   Thu Sep 27 13:10:12 2012 -0400

Fix for variable index.

 dialogs/display-settings/main.c |   16 
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c
index eeca298..21d1f74 100644
--- a/dialogs/display-settings/main.c
+++ b/dialogs/display-settings/main.c
@@ -501,7 +501,7 @@ static void
 display_setting_guess_positioning (GtkBuilder *builder)
 {
 GObject *position_combo, *display_combo;
-gint current_x, current_y, index;
+gint current_x, current_y, cb_index;
 guint n, current_display;
 
 current_display = xfce_randr->active_output;
@@ -519,7 +519,7 @@ display_setting_guess_positioning (GtkBuilder *builder)
  display_setting_active_displays_changed,
  builder, NULL);
  
-index = 0;
+cb_index = 0;
 
 for (n = 0; n < display_settings_get_n_active_outputs (); n++)
 {
@@ -531,7 +531,7 @@ display_setting_guess_positioning (GtkBuilder *builder)
 if ( (XFCE_RANDR_POS_X (xfce_randr) == current_x) && 
  (XFCE_RANDR_POS_Y (xfce_randr) == current_y) ) {
 gtk_combo_box_set_active( GTK_COMBO_BOX(position_combo), 0 );
-gtk_combo_box_set_active( GTK_COMBO_BOX(display_combo), index 
);
+gtk_combo_box_set_active( GTK_COMBO_BOX(display_combo), 
cb_index );
 break;   
 }
 
@@ -539,7 +539,7 @@ display_setting_guess_positioning (GtkBuilder *builder)
 if ( (XFCE_RANDR_POS_Y (xfce_randr) == current_y) &&
  (XFCE_RANDR_POS_X (xfce_randr) > current_x) ) {
 gtk_combo_box_set_active( GTK_COMBO_BOX(position_combo), 1 );
-gtk_combo_box_set_active( GTK_COMBO_BOX(display_combo), index 
);
+gtk_combo_box_set_active( GTK_COMBO_BOX(display_combo), 
cb_index );
 break;
 }
 
@@ -547,7 +547,7 @@ display_setting_guess_positioning (GtkBuilder *builder)
 if ( (XFCE_RANDR_POS_Y (xfce_randr) == current_y) &&
  (XFCE_RANDR_POS_X (xfce_randr) < current_x) ) {
 gtk_combo_box_set_active( GTK_COMBO_BOX(position_combo), 2 );
-gtk_combo_box_set_active( GTK_COMBO_BOX(display_combo), index 
);
+gtk_combo_box_set_active( GTK_COMBO_BOX(display_combo), 
cb_index );
 break;
 }
 
@@ -555,7 +555,7 @@ display_setting_guess_positioning (GtkBuilder *builder)
 if ( (XFCE_RANDR_POS_X (xfce_randr) == current_x) &&
  (XFCE_RANDR_POS_Y (xfce_randr) > current_y) ) {
 gtk_combo_box_set_active( GTK_COMBO_BOX(position_combo), 3 );
-gtk_combo_box_set_active( GTK_COMBO_BOX(display_combo), index 
);
+gtk_combo_box_set_active( GTK_COMBO_BOX(display_combo), 
cb_index );
 break;
 }
 
@@ -563,11 +563,11 @@ display_setting_guess_positioning (GtkBuilder *builder)
 if ( (XFCE_RANDR_POS_X (xfce_randr) == current_x) &&
  (XFCE_RANDR_POS_Y (xfce_randr) < current_y) ) {
 gtk_combo_box_set_active( GTK_COMBO_BOX(position_combo), 4 );
-gtk_combo_box_set_active( GTK_COMBO_BOX(display_combo), index 
);
+gtk_combo_box_set_active( GTK_COMBO_BOX(display_combo), 
cb_index );
 break;
 }
 
-index++;
+cb_index++;
 }
 }
 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Connected main buttons on minimal dialog. Added to display advanced dialog when minimal called and only one display.

2012-10-28 Thread Nick Schermer
Updating branch refs/heads/master
 to d1ccb38ff9bbd3b9ed7887fffaa86843d9c0b69f (commit)
   from 13cc6a31ba8a89976149034bcd8a9354b3681adf (commit)

commit d1ccb38ff9bbd3b9ed7887fffaa86843d9c0b69f
Author: Sean Davis 
Date:   Thu Sep 27 11:58:01 2012 -0400

Connected main buttons on minimal dialog.  Added to display advanced dialog 
when minimal called and only one display.

 dialogs/display-settings/main.c|  118 +++-
 .../display-settings/minimal-display-dialog.glade  |2 +-
 2 files changed, 117 insertions(+), 3 deletions(-)

diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c
index 5c61662..eeca298 100644
--- a/dialogs/display-settings/main.c
+++ b/dialogs/display-settings/main.c
@@ -1379,6 +1379,9 @@ display_settings_minimal_extend_left_toggled 
(GtkToggleButton *button,
 GObject *mirror_displays;
 GObject *extend_right;
 
+gint selected_x, selected_y;
+XfceRRMode   *current_mode;
+
 mirror_displays = gtk_builder_get_object(builder, "mirror");
 extend_right = gtk_builder_get_object(builder, "extend_right");
 
@@ -1389,11 +1392,49 @@ display_settings_minimal_extend_left_toggled 
(GtkToggleButton *button,
 g_object_disconnect (extend_right, "any_signal::toggled",
  display_settings_minimal_extend_right_toggled,
  builder, NULL);
+ 
+gtk_widget_set_sensitive( GTK_WIDGET(mirror_displays), FALSE );
+gtk_widget_set_sensitive( GTK_WIDGET(extend_right), FALSE );
 
 /* Since this signal will only be called when a toggle button is 
activated. */
 gtk_toggle_button_set_active (button, TRUE);
 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(mirror_displays), FALSE);
 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(extend_right), FALSE);
+
+/* Change active output to secondary display. */
+xfce_randr->active_output = 1;
+
+current_mode = xfce_randr_find_mode_by_id (xfce_randr, 
xfce_randr->active_output, XFCE_RANDR_MODE (xfce_randr));
+
+/* Change active output to primary display. */
+xfce_randr->active_output = 0;
+
+/* Move the secondary to where the primary is... */
+selected_x = XFCE_RANDR_POS_X (xfce_randr);
+selected_y = XFCE_RANDR_POS_Y (xfce_randr);
+xfce_randr->active_output = 1;
+XFCE_RANDR_POS_X (xfce_randr) = selected_x;
+XFCE_RANDR_POS_Y (xfce_randr) = selected_y;
+
+/* Move the primary display to the right of the secondary display. */
+xfce_randr->active_output = 0;
+XFCE_RANDR_POS_X (xfce_randr) = current_mode->width;
+
+/* Save changes to secondary display */
+xfce_randr->active_output = 1;
+xfce_randr_save_output (xfce_randr, "Default", display_channel,
+xfce_randr->active_output);
+
+/* Save changes to primary display */
+xfce_randr->active_output = 0;
+xfce_randr_save_output (xfce_randr, "Default", display_channel,
+xfce_randr->active_output);
+
+/* Apply all changes */
+xfce_randr_apply (xfce_randr, "Default", display_channel);
+
+gtk_widget_set_sensitive( GTK_WIDGET(mirror_displays), TRUE );
+gtk_widget_set_sensitive( GTK_WIDGET(extend_right), TRUE );
 
 /* Reconnect the signals */
 g_signal_connect (mirror_displays, "toggled", G_CALLBACK 
(display_settings_minimal_mirror_displays_toggled),
@@ -1410,6 +1451,8 @@ display_settings_minimal_mirror_displays_toggled 
(GtkToggleButton *button,
 GObject *extend_left;
 GObject *extend_right;
 
+gint selected_x, selected_y;
+
 extend_left = gtk_builder_get_object(builder, "extend_left");
 extend_right = gtk_builder_get_object(builder, "extend_right");
 
@@ -1420,11 +1463,39 @@ display_settings_minimal_mirror_displays_toggled 
(GtkToggleButton *button,
 g_object_disconnect (extend_right, "any_signal::toggled",
  display_settings_minimal_extend_right_toggled,
  builder, NULL);
+ 
+gtk_widget_set_sensitive( GTK_WIDGET(extend_left), FALSE );
+gtk_widget_set_sensitive( GTK_WIDGET(extend_right), FALSE );
 
 /* Since this signal will only be called when a toggle button is 
activated. */
 gtk_toggle_button_set_active (button, TRUE);
 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(extend_left), FALSE);
 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(extend_right), FALSE);
+
+xfce_randr->active_output = 0;
+
+selected_x = XFCE_RANDR_POS_X (xfce_randr);
+selected_y = XFCE_RANDR_POS_Y (xfce_randr);
+
+xfce_randr->active_output = 1;
+XFCE_RANDR_POS_X (xfce_randr) = selected_x;
+XFCE_RANDR_POS_Y (xfce_randr) = selected_y;
+
+/* Save changes to secondary display */
+xfce_randr->active_output = 1;
+xfce_randr_save_output (xfce_randr, "Default", display_chan

[Xfce4-commits] Ask for user-confirmation upon changing positions (and offer to restore)

2012-10-28 Thread Nick Schermer
Updating branch refs/heads/master
 to 3d960a6ef9334fb88492d21cba9a6bb89c634119 (commit)
   from 85ea3069a1c06fc5c4e29f0f8ee80cc7d1f852c2 (commit)

commit 3d960a6ef9334fb88492d21cba9a6bb89c634119
Author: Simon Steinbeiss 
Date:   Mon Oct 1 17:18:28 2012 +0200

Ask for user-confirmation upon changing positions
(and offer to restore)

 dialogs/display-settings/main.c |   49 ++-
 1 files changed, 48 insertions(+), 1 deletions(-)

diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c
index 21d1f74..57c8ae8 100644
--- a/dialogs/display-settings/main.c
+++ b/dialogs/display-settings/main.c
@@ -247,7 +247,7 @@ static void
 display_setting_positions_changed (GtkComboBox *combobox,
  GtkBuilder  *builder)
 {
-gint value, current_display, selected_display, selected_x, selected_y;
+gint value, current_display, selected_display, selected_x, selected_y, 
old_x1, old_y1, old_x2, old_y2;
 GObject *display_combobox;
 XfceRRMode   *current_mode;
 
@@ -275,10 +275,19 @@ display_setting_positions_changed (GtkComboBox *combobox,
 /* Move the primary to where the secondary is... */
 selected_x = XFCE_RANDR_POS_X (xfce_randr);
 selected_y = XFCE_RANDR_POS_Y (xfce_randr);
+
 xfce_randr->active_output = current_display;
+
+/* Save positions to be able to restore */
+old_x2 = selected_x; old_y2 = selected_y;
+old_x1 = XFCE_RANDR_POS_X (xfce_randr);
+old_y1 = XFCE_RANDR_POS_Y (xfce_randr);
+
 XFCE_RANDR_POS_X (xfce_randr) = selected_x;
 XFCE_RANDR_POS_Y (xfce_randr) = selected_y;
 
+
+
 /* Move the secondary display to the right of the primary display. 
*/
 xfce_randr->active_output = selected_display;
 XFCE_RANDR_POS_X (xfce_randr) = current_mode->width;
@@ -297,6 +306,12 @@ display_setting_positions_changed (GtkComboBox *combobox,
 selected_x = XFCE_RANDR_POS_X (xfce_randr);
 selected_y = XFCE_RANDR_POS_Y (xfce_randr);
 xfce_randr->active_output = selected_display;
+
+/* Save positions to be able to restore */
+old_x1 = selected_x; old_y1 = selected_y;
+old_x2 = XFCE_RANDR_POS_X (xfce_randr);
+old_y2 = XFCE_RANDR_POS_Y (xfce_randr);
+
 XFCE_RANDR_POS_X (xfce_randr) = selected_x;
 XFCE_RANDR_POS_Y (xfce_randr) = selected_y;
 
@@ -315,6 +330,12 @@ display_setting_positions_changed (GtkComboBox *combobox,
 selected_x = XFCE_RANDR_POS_X (xfce_randr);
 selected_y = XFCE_RANDR_POS_Y (xfce_randr);
 xfce_randr->active_output = current_display;
+
+/* Save positions to be able to restore */
+old_x2 = selected_x; old_y2 = selected_y;
+old_x1 = XFCE_RANDR_POS_X (xfce_randr);
+old_y1 = XFCE_RANDR_POS_Y (xfce_randr);
+
 XFCE_RANDR_POS_X (xfce_randr) = selected_x;
 XFCE_RANDR_POS_Y (xfce_randr) = selected_y;
 
@@ -336,6 +357,12 @@ display_setting_positions_changed (GtkComboBox *combobox,
 selected_x = XFCE_RANDR_POS_X (xfce_randr);
 selected_y = XFCE_RANDR_POS_Y (xfce_randr);
 xfce_randr->active_output = selected_display;
+
+/* Save positions to be able to restore */
+old_x1 = selected_x; old_y1 = selected_y;
+old_x2 = XFCE_RANDR_POS_X (xfce_randr);
+old_y2 = XFCE_RANDR_POS_Y (xfce_randr);
+
 XFCE_RANDR_POS_X (xfce_randr) = selected_x;
 XFCE_RANDR_POS_Y (xfce_randr) = selected_y;
 
@@ -369,6 +396,26 @@ display_setting_positions_changed (GtkComboBox *combobox,
 
 /* Apply all changes */
 xfce_randr_apply (xfce_randr, "Default", display_channel);
+
+/* Ask user confirmation */
+if (!display_setting_timed_confirmation (builder))
+{
+/* Restore the primary display */
+xfce_randr->active_output = current_display;
+XFCE_RANDR_POS_X (xfce_randr) = old_x1;
+XFCE_RANDR_POS_Y (xfce_randr) = old_y1;
+xfce_randr_save_output (xfce_randr, "Default", display_channel,
+xfce_randr->active_output);
+
+/* Restore the secondary display */
+xfce_randr->active_output = selected_display;
+XFCE_RANDR_POS_X (xfce_randr) = old_x2;
+XFCE_RANDR_POS_Y (xfce_randr) = old_y2;
+xfce_randr_save_output (xfce_randr, "Default", display_channel,
+xfce_randr->active_output);
+
+xfce_randr_apply (xfce_randr, "Default", display_channel);
+}
 }
 
 static void
___
X

[Xfce4-commits] Swap "Advanced" and "Close" buttons

2012-10-28 Thread Nick Schermer
Updating branch refs/heads/master
 to bad30c37b680fd443c92c3f9d63202516a7dc238 (commit)
   from 3d960a6ef9334fb88492d21cba9a6bb89c634119 (commit)

commit bad30c37b680fd443c92c3f9d63202516a7dc238
Author: Simon Steinbeiss 
Date:   Tue Oct 2 12:05:47 2012 +0200

Swap "Advanced" and "Close" buttons

 .../display-settings/minimal-display-dialog.glade  |   10 +-
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/dialogs/display-settings/minimal-display-dialog.glade 
b/dialogs/display-settings/minimal-display-dialog.glade
index 0a79bf7..b5cb4b1 100644
--- a/dialogs/display-settings/minimal-display-dialog.glade
+++ b/dialogs/display-settings/minimal-display-dialog.glade
@@ -160,13 +160,12 @@
   
 
 
-  
-gtk-close
+  
+Advanced
 True
 True
 True
 False
-True
   
   
 False
@@ -175,12 +174,13 @@
   
 
 
-  
-Advanced
+  
+gtk-close
 True
 True
 True
 False
+True
   
   
 False
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Fix mirror-mode in combobox

2012-10-28 Thread Nick Schermer
Updating branch refs/heads/master
 to 2f7699c7ee4db05fa35daf65ac41f5a01336ebc7 (commit)
   from 12143544084112a30e989f12e949b8e515a2b93c (commit)

commit 2f7699c7ee4db05fa35daf65ac41f5a01336ebc7
Author: Simon Steinbeiss 
Date:   Wed Oct 3 15:24:17 2012 +0200

Fix mirror-mode in combobox

 dialogs/display-settings/main.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c
index d99df8d..0640404 100644
--- a/dialogs/display-settings/main.c
+++ b/dialogs/display-settings/main.c
@@ -321,8 +321,8 @@ display_setting_positions_changed (GtkComboBox *combobox,
 
 case XFCE_RANDR_PLACEMENT_MIRROR: // Mirror Display
 
-XFCE_RANDR_POS_X (xfce_randr) = selected_x;
-XFCE_RANDR_POS_Y (xfce_randr) = selected_y;
+XFCE_RANDR_POS_X (xfce_randr) = current_x;
+XFCE_RANDR_POS_Y (xfce_randr) = current_y;
 break;
 
 default:
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Rename Rotation from "Normal" to "None" (consistency with Reflection)

2012-10-28 Thread Nick Schermer
Updating branch refs/heads/master
 to 07b666ad15773ed01ecc742a4305c2c8368927b9 (commit)
   from 7f506412224f57f93020b15a9e69ffbb64f82889 (commit)

commit 07b666ad15773ed01ecc742a4305c2c8368927b9
Author: Simon Steinbeiss 
Date:   Thu Oct 4 12:27:03 2012 +0200

Rename Rotation from "Normal" to "None" (consistency with Reflection)

 dialogs/display-settings/main.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c
index c22ffea..e57ba21 100644
--- a/dialogs/display-settings/main.c
+++ b/dialogs/display-settings/main.c
@@ -65,7 +65,7 @@ enum
 /* Xrandr rotation name conversion */
 static const XfceRotation rotation_names[] =
 {
-{ RR_Rotate_0,   N_("Normal") },
+{ RR_Rotate_0,   N_("None") },
 { RR_Rotate_90,  N_("Left") },
 { RR_Rotate_180, N_("Inverted") },
 { RR_Rotate_270, N_("Right") }
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Reduce the RandR calls for setting new display positions

2012-10-28 Thread Nick Schermer
Updating branch refs/heads/master
 to 12143544084112a30e989f12e949b8e515a2b93c (commit)
   from bad30c37b680fd443c92c3f9d63202516a7dc238 (commit)

commit 12143544084112a30e989f12e949b8e515a2b93c
Author: Simon Steinbeiss 
Date:   Tue Oct 2 17:08:55 2012 +0200

Reduce the RandR calls for setting new display positions

 dialogs/display-settings/main.c |  143 ---
 1 files changed, 43 insertions(+), 100 deletions(-)

diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c
index 57c8ae8..d99df8d 100644
--- a/dialogs/display-settings/main.c
+++ b/dialogs/display-settings/main.c
@@ -247,9 +247,9 @@ static void
 display_setting_positions_changed (GtkComboBox *combobox,
  GtkBuilder  *builder)
 {
-gint value, current_display, selected_display, selected_x, selected_y, 
old_x1, old_y1, old_x2, old_y2;
+gint value, current_display, current_x, current_y, selected_display, 
selected_x, selected_y;
 GObject *display_combobox;
-XfceRRMode   *current_mode;
+XfceRRMode   *current_mode, *selected_mode;
 
 display_combobox = gtk_builder_get_object(builder, 
"randr-active-displays");
 
@@ -262,120 +262,65 @@ display_setting_positions_changed (GtkComboBox *combobox,
 /* Skip if the display combobox hasn't made a selection yet */
 if (selected_display == -1) return;
 
-/* Store the Current Display */
+/* Store the currently active display's position and mode */
 current_display = xfce_randr->active_output;
+current_mode = xfce_randr_find_mode_by_id (xfce_randr, current_display, 
XFCE_RANDR_MODE (xfce_randr));
+current_x = XFCE_RANDR_POS_X (xfce_randr);
+current_y = XFCE_RANDR_POS_Y (xfce_randr);
+
+/* Store the selected display's position and mode */
+xfce_randr->active_output = selected_display;
+selected_mode = xfce_randr_find_mode_by_id (xfce_randr, selected_display, 
XFCE_RANDR_MODE (xfce_randr));
+selected_x = XFCE_RANDR_POS_X (xfce_randr);
+selected_y = XFCE_RANDR_POS_Y (xfce_randr);
 
 switch (value) {
 case XFCE_RANDR_PLACEMENT_LEFT: // Extend Left
-current_mode = xfce_randr_find_mode_by_id (xfce_randr, 
xfce_randr->active_output, XFCE_RANDR_MODE (xfce_randr));
-
-/* Change active output to secondary display. */
-xfce_randr->active_output = selected_display;
-
-/* Move the primary to where the secondary is... */
-selected_x = XFCE_RANDR_POS_X (xfce_randr);
-selected_y = XFCE_RANDR_POS_Y (xfce_randr);
+/* Move the selected display to the right of the currently active 
display. */
+XFCE_RANDR_POS_X (xfce_randr) = current_mode->width;
 
+/* Move the currently active display to where the selected was */
 xfce_randr->active_output = current_display;
-
-/* Save positions to be able to restore */
-old_x2 = selected_x; old_y2 = selected_y;
-old_x1 = XFCE_RANDR_POS_X (xfce_randr);
-old_y1 = XFCE_RANDR_POS_Y (xfce_randr);
-
 XFCE_RANDR_POS_X (xfce_randr) = selected_x;
 XFCE_RANDR_POS_Y (xfce_randr) = selected_y;
-
 
-
-/* Move the secondary display to the right of the primary display. 
*/
-xfce_randr->active_output = selected_display;
-XFCE_RANDR_POS_X (xfce_randr) = current_mode->width;
 break;
 
 case XFCE_RANDR_PLACEMENT_RIGHT: // Extend Right
-/* Change active output to secondary display. */
-xfce_randr->active_output = selected_display;
-
-current_mode = xfce_randr_find_mode_by_id (xfce_randr, 
xfce_randr->active_output, XFCE_RANDR_MODE (xfce_randr));
+   /* Move the selected display to where the currently 
active one is */
+XFCE_RANDR_POS_X (xfce_randr) = current_x;
+XFCE_RANDR_POS_Y (xfce_randr) = current_y;
 
-/* Change active output to primary display. */
+/* Move the currently active display to the right of the selected 
display. */
 xfce_randr->active_output = current_display;
+XFCE_RANDR_POS_X (xfce_randr) = selected_mode->width;
 
-/* Move the secondary to where the primary is... */
-selected_x = XFCE_RANDR_POS_X (xfce_randr);
-selected_y = XFCE_RANDR_POS_Y (xfce_randr);
-xfce_randr->active_output = selected_display;
-
-/* Save positions to be able to restore */
-old_x1 = selected_x; old_y1 = selected_y;
-old_x2 = XFCE_RANDR_POS_X (xfce_randr);
-old_y2 = XFCE_RANDR_POS_Y (xfce_randr);
-
-XFCE_RANDR_POS_X (xfce_randr) = selected_x;
-XFCE_RANDR_POS_Y (xfce_randr) = selec

[Xfce4-commits] Update glade-file and icons for minimal dialog

2012-10-28 Thread Nick Schermer
Updating branch refs/heads/master
 to 6575a0c1c9726c30d0cb39f307d597a323762423 (commit)
   from 2f7699c7ee4db05fa35daf65ac41f5a01336ebc7 (commit)

commit 6575a0c1c9726c30d0cb39f307d597a323762423
Author: Simon Steinbeiss 
Date:   Thu Oct 4 11:16:41 2012 +0200

Update glade-file and icons for minimal dialog

 dialogs/display-settings/display1.png  |  Bin 0 -> 7527 bytes
 dialogs/display-settings/display2.png  |  Bin 0 -> 7654 bytes
 dialogs/display-settings/extend-left.png   |  Bin 5867 -> 0 bytes
 .../display-settings/minimal-display-dialog.glade  |   71 +---
 4 files changed, 47 insertions(+), 24 deletions(-)

diff --git a/dialogs/display-settings/display1.png 
b/dialogs/display-settings/display1.png
new file mode 100644
index 000..793022f
Binary files /dev/null and b/dialogs/display-settings/display1.png differ
diff --git a/dialogs/display-settings/display2.png 
b/dialogs/display-settings/display2.png
new file mode 100644
index 000..64bbd39
Binary files /dev/null and b/dialogs/display-settings/display2.png differ
diff --git a/dialogs/display-settings/extend-left.png 
b/dialogs/display-settings/extend-left.png
deleted file mode 100644
index 5e0dbd5..000
Binary files a/dialogs/display-settings/extend-left.png and /dev/null differ
diff --git a/dialogs/display-settings/minimal-display-dialog.glade 
b/dialogs/display-settings/minimal-display-dialog.glade
index b5cb4b1..6e6b1d9 100644
--- a/dialogs/display-settings/minimal-display-dialog.glade
+++ b/dialogs/display-settings/minimal-display-dialog.glade
@@ -13,18 +13,18 @@
   
 True
 False
-12
-12
+6
+6
 
   
 True
 False
 2
-3
-48
+4
+24
 3
 
-  
+  
 128
 128
 True
@@ -35,7 +35,7 @@
   
 True
 False
-extend-left.png
+display1.png
   
 
   
@@ -94,7 +94,7 @@
   
 True
 False
-Extend to the 
left
+Only Display 
1
   
   
 1
@@ -133,6 +133,44 @@
 GTK_FILL
   
 
+
+  
+128
+128
+True
+True
+True
+False
+
+  
+True
+False
+display2.png
+  
+
+  
+  
+3
+4
+GTK_FILL
+GTK_FILL
+  
+
+
+  
+True
+False
+Only Display 
2
+  
+  
+3
+4
+1
+2
+GTK_FILL
+GTK_FILL
+  
+
   
   
 True
@@ -145,21 +183,6 @@
 True
 False
 
-  
-Presentation 
Mode
-True
-True
-False
-False
-True
-  
-  
-False
-False
-0
-  
-
-
   
 Advanced
 True
@@ -170,7 +193,7 @@
   
 False
 False
-1
+0
   
 
 
@@ -185,7 +208,7 @@
   
 False
 False
-2
+1
   
 
   
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Connected Advanced button in minimal dialog.

2012-10-28 Thread Nick Schermer
Updating branch refs/heads/master
 to 2e57f485c4e66edaf405583f880945b9e7ace5a7 (commit)
   from 1499a6c1cc8cf74dd4b5b453830cd9b25302d8fe (commit)

commit 2e57f485c4e66edaf405583f880945b9e7ace5a7
Author: Sean Davis 
Date:   Thu Oct 4 15:55:34 2012 -0400

Connected Advanced button in minimal dialog.

 dialogs/display-settings/main.c |  257 ---
 1 files changed, 156 insertions(+), 101 deletions(-)

diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c
index 03ebbc5..3b4edb1 100644
--- a/dialogs/display-settings/main.c
+++ b/dialogs/display-settings/main.c
@@ -60,6 +60,13 @@ enum
 N_COMBO_COLUMNS
 };
 
+typedef struct {
+GtkBuilder *builder;
+GdkDisplay  *display;
+gint event_base;
+GError *error;
+} minimal_advanced_context;
+
 
 
 /* Xrandr rotation name conversion */
@@ -1556,15 +1563,158 @@ screen_on_event (GdkXEvent *xevent,
 return GDK_FILTER_CONTINUE;
 }
 
+static void
+display_settings_show_main_dialog (GdkDisplay  *display,
+   gint event_base,
+   GError *error)
+{
+GtkBuilder  *builder;
+GtkWidget   *dialog;
+
+GtkWidget   *plug;
+GObject *plug_child;
+
+/* Load the Gtk user-interface file */
+builder = gtk_builder_new ();
+if (gtk_builder_add_from_string (builder, display_dialog_ui,
+ display_dialog_ui_length, &error) != 0)
+{
+/* Build the dialog */
+dialog = display_settings_dialog_new (builder);
+XFCE_RANDR_EVENT_BASE (xfce_randr) = event_base;
+/* Set up notifications */
+XRRSelectInput (gdk_x11_display_get_xdisplay (display),
+GDK_WINDOW_XID (gdk_get_default_root_window ()),
+RRScreenChangeNotifyMask);
+gdk_x11_register_standard_event_type (display,
+  event_base,
+  RRNotify + 1);
+gdk_window_add_filter (gdk_get_default_root_window (), 
screen_on_event, builder);
+
+if (G_UNLIKELY (opt_socket_id == 0))
+{
+g_signal_connect (G_OBJECT (dialog), "response",
+G_CALLBACK (display_settings_dialog_response), builder);
+
+/* Show the dialog */
+gtk_window_present (GTK_WINDOW (dialog));
+}
+else
+{
+/* Create plug widget */
+plug = gtk_plug_new (opt_socket_id);
+g_signal_connect (plug, "delete-event", G_CALLBACK 
(gtk_main_quit), NULL);
+gtk_widget_show (plug);
+
+/* Get plug child widget */
+plug_child = gtk_builder_get_object (builder, "plug-child");
+gtk_widget_reparent (GTK_WIDGET (plug_child), plug);
+gtk_widget_show (GTK_WIDGET (plug_child));
+}
+
+/* To prevent the settings dialog to be saved in the session */
+gdk_set_sm_client_id ("FAKE ID");
+
+/* Enter the main loop */
+gtk_main ();
+
+gtk_widget_destroy (dialog);
+}
+else
+{
+g_error ("Failed to load the UI file: %s.", error->message);
+g_error_free (error);
+}
+
+gdk_window_remove_filter (gdk_get_default_root_window (), screen_on_event, 
builder);
+
+/* Release the builder */
+g_object_unref (G_OBJECT (builder));
+}
+
+static void
+display_settings_minimal_advanced_clicked(GtkButton *button,
+  minimal_advanced_context *context)
+{
+GtkWidget *dialog;
+
+dialog = (GtkWidget *) gtk_builder_get_object (context->builder, "dialog");
+gtk_widget_hide( dialog );
+
+display_settings_show_main_dialog( context->display, context->event_base, 
context->error );
+
+gtk_main_quit();
+}
+
+static void
+display_settings_show_minimal_dialog (GdkDisplay  *display,
+  gint event_base,
+  GError *error)
+{
+GtkBuilder  *builder;
+GtkWidget   *dialog, *cancel;
+
+builder = gtk_builder_new ();
+
+if (gtk_builder_add_from_string (builder, minimal_display_dialog_ui,
+ minimal_display_dialog_ui_length, &error) 
!= 0)
+{
+GObject *only_display1;
+GObject *only_display2;
+GObject *mirror_displays;
+GObject *extend_right;
+GObject *advanced;
+minimal_advanced_context context;
+
+context.builder = builder;
+context.display = display;
+context.event_base = event_base;
+context.error = error;
+
+/* Build the minimal dialog */
+dialog = (GtkWidget *) gtk_builder_get_object (builder, "dialog");
+cancel = (GtkWidget *) gtk_builder_get_object (builder, 
"cancel_button");
+
+g_signal_connect (dialog, "delete-event", G_CALLBACK (gtk_main_quit), 
NULL);

[Xfce4-commits] Hook up the reworked minimal dialog

2012-10-28 Thread Nick Schermer
Updating branch refs/heads/master
 to 7f506412224f57f93020b15a9e69ffbb64f82889 (commit)
   from 6575a0c1c9726c30d0cb39f307d597a323762423 (commit)

commit 7f506412224f57f93020b15a9e69ffbb64f82889
Author: Simon Steinbeiss 
Date:   Thu Oct 4 12:24:11 2012 +0200

Hook up the reworked minimal dialog

 dialogs/display-settings/main.c |  288 ---
 1 files changed, 179 insertions(+), 109 deletions(-)

diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c
index 0640404..c22ffea 100644
--- a/dialogs/display-settings/main.c
+++ b/dialogs/display-settings/main.c
@@ -113,7 +113,7 @@ static gboolean   bound_to_channel = FALSE;
 XfceRandr *xfce_randr = NULL;
 
 static void
-display_settings_minimal_extend_left_toggled (GtkToggleButton *button,
+display_settings_minimal_only_display1_toggled (GtkToggleButton *button,
   GtkBuilder *builder);
   
 static void
@@ -123,7 +123,10 @@ display_settings_minimal_mirror_displays_toggled 
(GtkToggleButton *button,
 static void
 display_settings_minimal_extend_right_toggled (GtkToggleButton *button,
   GtkBuilder *builder);
-
+  
+static void
+display_settings_minimal_only_display2_toggled (GtkToggleButton *button,
+  GtkBuilder *builder);
 
 
 static guint
@@ -1363,134 +1366,193 @@ display_settings_dialog_new (GtkBuilder *builder)
 }
 
 static void
-display_settings_minimal_extend_left_toggled (GtkToggleButton *button,
+display_settings_minimal_only_display1_toggled (GtkToggleButton *button,
   GtkBuilder *builder)
 {
-GObject *mirror_displays;
-GObject *extend_right;
-
-gint selected_x, selected_y;
-XfceRRMode   *current_mode;
+GObject *mirror_displays, *extend_right, *only_display2;
 
 mirror_displays = gtk_builder_get_object(builder, "mirror");
 extend_right = gtk_builder_get_object(builder, "extend_right");
-
+only_display2 = gtk_builder_get_object(builder, "display2");
+
+/* Lock everything in the dialog to prevent bad things from happening */
 g_object_disconnect (mirror_displays, "any_signal::toggled",
  display_settings_minimal_mirror_displays_toggled,
  builder, NULL);
- 
 g_object_disconnect (extend_right, "any_signal::toggled",
  display_settings_minimal_extend_right_toggled,
  builder, NULL);
+g_object_disconnect (only_display2, "any_signal::toggled",
+ display_settings_minimal_only_display2_toggled,
+ builder, NULL);
  
 gtk_widget_set_sensitive( GTK_WIDGET(mirror_displays), FALSE );
 gtk_widget_set_sensitive( GTK_WIDGET(extend_right), FALSE );
-
-/* Since this signal will only be called when a toggle button is 
activated. */
+gtk_widget_set_sensitive( GTK_WIDGET(only_display2), FALSE );
+
 gtk_toggle_button_set_active (button, TRUE);
 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(mirror_displays), FALSE);
 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(extend_right), FALSE);
+gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(only_display2), FALSE);
 
-/* Change active output to secondary display. */
-xfce_randr->active_output = 1;
-
-current_mode = xfce_randr_find_mode_by_id (xfce_randr, 
xfce_randr->active_output, XFCE_RANDR_MODE (xfce_randr));
-
-/* Change active output to primary display. */
-xfce_randr->active_output = 0;
+if (!xfce_randr)
+return;
+
+if (xfce_randr->noutput <= 1)
+return;
+
+if (gtk_toggle_button_get_active (button))
+{
+   /* Put Display1 in its preferred mode and deactivate Display2 */
+XFCE_RANDR_MODE (xfce_randr) = xfce_randr_preferred_mode (xfce_randr, 
0);
+xfce_randr->active_output = 1;
+XFCE_RANDR_MODE (xfce_randr) = None;
+/* Apply the changes */
+xfce_randr_save_output (xfce_randr, "Default", display_channel,0);
+xfce_randr_save_output (xfce_randr, "Default", display_channel,1);
+xfce_randr_apply (xfce_randr, "Default", display_channel);
+}
 
-/* Move the secondary to where the primary is... */
-selected_x = XFCE_RANDR_POS_X (xfce_randr);
-selected_y = XFCE_RANDR_POS_Y (xfce_randr);
-xfce_randr->active_output = 1;
-XFCE_RANDR_POS_X (xfce_randr) = selected_x;
-XFCE_RANDR_POS_Y (xfce_randr) = selected_y;
+gtk_widget_set_sensitive( GTK_WIDGET(mirror_displays), TRUE );
+gtk_widget_set_sensitive( GTK_WIDGET(extend_right), TRUE );
+gtk_widget_set_sensitive( GTK_WIDGET(only_display2), TRUE );
+
+/* Reconnect the signals */
+g_signal_connect (m

[Xfce4-commits] Fix for when to display minimal/main dialogs.

2012-10-28 Thread Nick Schermer
Updating branch refs/heads/master
 to 47c0e40e14e9ffbceccecdf090027f9050e1edfd (commit)
   from dd037637961e26994a33adc38f6fe6d7ce74d14c (commit)

commit 47c0e40e14e9ffbceccecdf090027f9050e1edfd
Author: Sean Davis 
Date:   Fri Oct 5 07:58:42 2012 -0400

Fix for when to display minimal/main dialogs.

 dialogs/display-settings/main.c |5 +
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c
index 736cb01..cd9fa11 100644
--- a/dialogs/display-settings/main.c
+++ b/dialogs/display-settings/main.c
@@ -1969,15 +1969,12 @@ main (gint argc, gchar **argv)
 if (xfce_titled_dialog_get_type () == 0)
 return EXIT_FAILURE;
 
-if (!minimal)
+if (xfce_randr->noutput <= 1 || !minimal)
 {
 display_settings_show_main_dialog( display, event_base, error );
 }
 else
 {
-if (xfce_randr->noutput < 2)
-goto cleanup;
-
 display_settings_show_minimal_dialog ( display, event_base, error 
);
 }
 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Super simplification of minimal dialog and code.

2012-10-28 Thread Nick Schermer
Updating branch refs/heads/master
 to 1499a6c1cc8cf74dd4b5b453830cd9b25302d8fe (commit)
   from 07b666ad15773ed01ecc742a4305c2c8368927b9 (commit)

commit 1499a6c1cc8cf74dd4b5b453830cd9b25302d8fe
Author: Sean Davis 
Date:   Thu Oct 4 14:03:25 2012 -0400

Super simplification of minimal dialog and code.

 dialogs/display-settings/main.c|  225 ++--
 .../display-settings/minimal-display-dialog.glade  |  161 ---
 2 files changed, 147 insertions(+), 239 deletions(-)

diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c
index e57ba21..03ebbc5 100644
--- a/dialogs/display-settings/main.c
+++ b/dialogs/display-settings/main.c
@@ -1367,158 +1367,86 @@ display_settings_dialog_new (GtkBuilder *builder)
 
 static void
 display_settings_minimal_only_display1_toggled (GtkToggleButton *button,
-  GtkBuilder *builder)
+GtkBuilder  *builder)
 {
-GObject *mirror_displays, *extend_right, *only_display2;
+GObject *buttons;
 
-mirror_displays = gtk_builder_get_object(builder, "mirror");
-extend_right = gtk_builder_get_object(builder, "extend_right");
-only_display2 = gtk_builder_get_object(builder, "display2");
-
-/* Lock everything in the dialog to prevent bad things from happening */
-g_object_disconnect (mirror_displays, "any_signal::toggled",
- display_settings_minimal_mirror_displays_toggled,
- builder, NULL);
-g_object_disconnect (extend_right, "any_signal::toggled",
- display_settings_minimal_extend_right_toggled,
- builder, NULL);
-g_object_disconnect (only_display2, "any_signal::toggled",
- display_settings_minimal_only_display2_toggled,
- builder, NULL);
- 
-gtk_widget_set_sensitive( GTK_WIDGET(mirror_displays), FALSE );
-gtk_widget_set_sensitive( GTK_WIDGET(extend_right), FALSE );
-gtk_widget_set_sensitive( GTK_WIDGET(only_display2), FALSE );
-
-gtk_toggle_button_set_active (button, TRUE);
-gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(mirror_displays), FALSE);
-gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(extend_right), FALSE);
-gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(only_display2), FALSE);
+if ( !gtk_toggle_button_get_active(button) ) 
+return;
 
 if (!xfce_randr)
 return;
 
 if (xfce_randr->noutput <= 1)
 return;
+
+buttons = gtk_builder_get_object(builder, "buttons");
+gtk_widget_set_sensitive( GTK_WIDGET(buttons), FALSE );
 
-if (gtk_toggle_button_get_active (button))
-{
-   /* Put Display1 in its preferred mode and deactivate Display2 */
-XFCE_RANDR_MODE (xfce_randr) = xfce_randr_preferred_mode (xfce_randr, 
0);
-xfce_randr->active_output = 1;
-XFCE_RANDR_MODE (xfce_randr) = None;
-/* Apply the changes */
-xfce_randr_save_output (xfce_randr, "Default", display_channel,0);
-xfce_randr_save_output (xfce_randr, "Default", display_channel,1);
-xfce_randr_apply (xfce_randr, "Default", display_channel);
-}
+   /* Put Display1 in its preferred mode and deactivate Display2 */
+XFCE_RANDR_MODE (xfce_randr) = xfce_randr_preferred_mode (xfce_randr, 0);
+xfce_randr->active_output = 1;
+XFCE_RANDR_MODE (xfce_randr) = None;
 
-gtk_widget_set_sensitive( GTK_WIDGET(mirror_displays), TRUE );
-gtk_widget_set_sensitive( GTK_WIDGET(extend_right), TRUE );
-gtk_widget_set_sensitive( GTK_WIDGET(only_display2), TRUE );
-
-/* Reconnect the signals */
-g_signal_connect (mirror_displays, "toggled", G_CALLBACK 
(display_settings_minimal_mirror_displays_toggled),
-  builder);
-g_signal_connect (extend_right, "toggled", G_CALLBACK 
(display_settings_minimal_extend_right_toggled),
-  builder);
-g_signal_connect (only_display2, "toggled", G_CALLBACK 
(display_settings_minimal_only_display2_toggled),
-  builder);
+/* Apply the changes */
+xfce_randr_save_output (xfce_randr, "Default", display_channel,0);
+xfce_randr_save_output (xfce_randr, "Default", display_channel,1);
+xfce_randr_apply (xfce_randr, "Default", display_channel);
+
+gtk_widget_set_sensitive( GTK_WIDGET(buttons), TRUE );
 }
 
 static void
 display_settings_minimal_only_display2_toggled (GtkToggleButton *button,
-  GtkBuilder *builder)
+GtkBuilder  *builder)
 {
-GObject *mirror_displays, *extend_right, *only_display1;
+GObject *buttons;
 
-mirror_displays = gtk_builder_get_object(builder, "mirror");
-extend_right = gtk_builder_get_object(builder, "extend_right");
-only_d

[Xfce4-commits] Added bottomside identity popups for displays.

2012-10-28 Thread Nick Schermer
Updating branch refs/heads/master
 to dd037637961e26994a33adc38f6fe6d7ce74d14c (commit)
   from 2e57f485c4e66edaf405583f880945b9e7ace5a7 (commit)

commit dd037637961e26994a33adc38f6fe6d7ce74d14c
Author: Sean Davis 
Date:   Fri Oct 5 07:21:49 2012 -0400

Added bottomside identity popups for displays.

 dialogs/display-settings/Makefile.am  |   10 ++-
 dialogs/display-settings/identity-popup.glade |   72 
 dialogs/display-settings/main.c   |  146 -
 3 files changed, 225 insertions(+), 3 deletions(-)

diff --git a/dialogs/display-settings/Makefile.am 
b/dialogs/display-settings/Makefile.am
index c768893..86137d9 100644
--- a/dialogs/display-settings/Makefile.am
+++ b/dialogs/display-settings/Makefile.am
@@ -19,6 +19,7 @@ xfce4_display_settings_SOURCES = \
confirmation-dialog_ui.h \
display-dialog_ui.h \
minimal-display-dialog_ui.h \
+   identity-popup_ui.h \
display-name.c \
edid-parse.c \
edid.h
@@ -49,7 +50,8 @@ if MAINTAINER_MODE
 BUILT_SOURCES = \
confirmation-dialog_ui.h \
display-dialog_ui.h \
-   minimal-display-dialog_ui.h
+   minimal-display-dialog_ui.h \
+   identity-popup_ui.h
 
 confirmation-dialog_ui.h: confirmation-dialog.glade
exo-csource --static --strip-comments --strip-content 
--name=confirmation_dialog_ui $< >$@
@@ -59,6 +61,9 @@ display-dialog_ui.h: display-dialog.glade
 
 minimal-display-dialog_ui.h: minimal-display-dialog.glade
exo-csource --static --strip-comments --strip-content 
--name=minimal_display_dialog_ui $< >$@
+   
+identity-popup_ui.h: identity-popup.glade
+   exo-csource --static --strip-comments --strip-content 
--name=identity_popup_ui $< >$@
 
 endif
 
@@ -72,7 +77,8 @@ EXTRA_DIST = \
$(desktop_in_files) \
confirmation-dialog.glade \
display-dialog.glade \
-   minimal-display-dialog.glade
+   minimal-display-dialog.glade \
+   identity-popup.glade
 
 DISTCLEANFILES = \
$(desktop_DATA)
diff --git a/dialogs/display-settings/identity-popup.glade 
b/dialogs/display-settings/identity-popup.glade
new file mode 100644
index 000..896ff80
--- /dev/null
+++ b/dialogs/display-settings/identity-popup.glade
@@ -0,0 +1,72 @@
+
+
+  
+  
+  
+False
+popup
+64
+notification
+south
+
+  
+True
+False
+6
+12
+
+  
+True
+False
+48
+computer
+6
+  
+  
+True
+True
+0
+  
+
+
+  
+True
+False
+
+  
+True
+False
+0
+Display: 
Name
+True
+  
+  
+True
+True
+0
+  
+
+
+  
+True
+False
+0
+Resolution: 1280 x 
800, Refresh Rate: 60.0 Hz
+  
+  
+True
+True
+1
+  
+
+  
+  
+True
+True
+1
+  
+
+  
+
+  
+
diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c
index 3b4edb1..736cb01 100644
--- a/dialogs/display-settings/main.c
+++ b/dialogs/display-settings/main.c
@@ -44,6 +44,7 @@
 #include "display-dialog_ui.h"
 #include "confirmation-dialog_ui.h"
 #include "minimal-display-dialog_ui.h"
+#include "identity-popup_ui.h"
 
 enum
 {
@@ -67,6 +68,13 @@ typedef struct {
 GError *error;
 } minimal_advanced_context;
 
+typedef struct {
+GtkWidget *display1;
+GtkWidget *display2;
+GtkWidget *display3;
+GtkWidget *display4;
+} identity_popup_store;
+
 
 
 /* Xrandr rotation name conversion */
@@ -119,6 +127,8 @@ static gboolean   bound_to_channel = FALSE;
 /* Pointer to the used randr structure */
 XfceRandr *xfce_randr = NULL;
 
+identity_popup_store display_popups;
+
 static void
 display_settings_minimal_only_display1_toggled (GtkToggleButton *button,
   GtkBuilder *builder);
@@ -169,6 +179,24 @@ display_setting_combo_box_get_value (GtkComboBox *combobox,
 return FALSE;
 }
 
+static void
+display_setting_hide_identity_popups(void)
+{
+if (GTK_IS_WIDGET(display_popups.display1)) 
gtk_widget_hide(display_popups.display1);
+if (GTK_IS_WIDGET(display_popups.display2)) 
gtk_widget_hide(display_popups.display2);
+if (GTK_IS_WIDGET(display_popups.display3)) 
gtk_widget_hide(display_popups.display3);
+if (GTK_IS_WIDGET(display_popups.display4)) 
gtk_widget_hide(display_popups.display4);
+}
+
+static void
+display_setting_show_identity_popups(void)
+{
+if (GTK_IS_WIDG

[Xfce4-commits] Give the popup-widget a name so that themers can play with it

2012-10-28 Thread Nick Schermer
Updating branch refs/heads/master
 to e28c32cf6d6712ebc9a7d2fe2425ee9180bbc25e (commit)
   from e9b4cc39bd9f2f8a7711c3e5efdb2ad37c183093 (commit)

commit e28c32cf6d6712ebc9a7d2fe2425ee9180bbc25e
Author: Simon Steinbeiss 
Date:   Fri Oct 5 23:48:28 2012 +0200

Give the popup-widget a name so that themers can play with it

 dialogs/display-settings/main.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c
index 6a50c2d..de5a9f8 100644
--- a/dialogs/display-settings/main.c
+++ b/dialogs/display-settings/main.c
@@ -1074,6 +1074,7 @@ display_setting_identify_display (gint display_id,
  identity_popup_ui_length, &error) != 0)
 {
 popup = (GtkWidget *) gtk_builder_get_object(builder, "popup");
+gtk_widget_set_name(GTK_WIDGET(popup),"XfceDisplayDialogPopup");
 
 gtk_widget_set_app_paintable(popup, TRUE);
 g_signal_connect( G_OBJECT(popup), "expose-event", 
G_CALLBACK(display_setting_identity_popup_expose), NULL );
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Improved cairo-drawing of the identification-popups The popups have borders now, which should make them more visible. I also added an offset of +/- 0.5px, which

2012-10-28 Thread Nick Schermer
Updating branch refs/heads/master
 to e9b4cc39bd9f2f8a7711c3e5efdb2ad37c183093 (commit)
   from c396f9298a902094a5b5ffa69bc60e1461cf6015 (commit)

commit e9b4cc39bd9f2f8a7711c3e5efdb2ad37c183093
Author: Simon Steinbeiss 
Date:   Fri Oct 5 23:43:34 2012 +0200

Improved cairo-drawing of the identification-popups
The popups have borders now, which should make them more visible.
I also added an offset of +/- 0.5px, which improves the rendering of the 
arc with cairo (otherwise the corners look thicker than the straight lines)

 dialogs/display-settings/main.c |   37 -
 1 files changed, 12 insertions(+), 25 deletions(-)

diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c
index 423228f..6a50c2d 100644
--- a/dialogs/display-settings/main.c
+++ b/dialogs/display-settings/main.c
@@ -1017,46 +1017,33 @@ display_setting_identity_popup_expose(GtkWidget *popup, 
GdkEventExpose *event, g
 gint radius;
 
 radius = 15;
+cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
 
 /* Compositing is not available, so just set the background color. */
 if (!supports_alpha)
 {
 cairo_set_source_rgb(cr, 0.2, 0.2, 0.2);
-cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
 cairo_paint (cr);
 }
 
-/* The radius is tiny, don't bother drawing rounded corners. */
-else if (radius < 0.1) {
-cairo_set_source_rgba(cr, 0.2, 0.2, 0.2, 0.9);
-cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
-cairo_paint (cr);
-cairo_rectangle(cr, 0, 0, popup->allocation.width, 
popup->allocation.height);
-}
-
 /* Draw rounded corners. FIXME Does not work with xfce compositor off. */
 else
 {
 cairo_set_source_rgba(cr, 0, 0, 0, 0);
-cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
 cairo_paint (cr);
 
+/* Draw a filled rounded rectangle with outline */
+cairo_set_line_width(cr, 1.0);
+cairo_move_to(cr, 0.5, popup->allocation.height+0.5);
+cairo_line_to(cr, 0.5, radius+0.5);
+cairo_arc(cr, radius+0.5, radius+0.5, radius, 3.14, 3.0*3.14/2.0);
+cairo_line_to(cr, popup->allocation.width-0.5 - radius, 0.5);
+cairo_arc(cr, popup->allocation.width-0.5 - radius, radius+0.5, 
radius, 3.0*3.14/2.0, 0.0);
+cairo_line_to(cr, popup->allocation.width-0.5, 
popup->allocation.height+0.5);
 cairo_set_source_rgba(cr, 0.2, 0.2, 0.2, 0.9);
-
-cairo_move_to(cr, 0, radius);
-cairo_arc(cr, radius, radius, radius, 3.14, 3.0*3.14/2.0);
-cairo_line_to(cr, popup->allocation.width - radius, 0);
-cairo_arc(cr, popup->allocation.width - radius, radius, radius, 
3.0*3.14/2.0, 0.0);
-//cairo_line_to(cr, popup->allocation.width, popup->allocation.height 
- radius);
-cairo_line_to(cr, popup->allocation.width, popup->allocation.height);
-//cairo_arc(cr, popup->allocation.width - radius, 
popup->allocation.height - radius, radius, 0.0, 3.14/2.0);
-//cairo_line_to(cr, radius, popup->allocation.height);
-cairo_line_to(cr, 0, popup->allocation.height);
-//cairo_arc(cr, radius, popup->allocation.height - radius, radius, 
3.14/2.0, 3.14);
-cairo_stroke_preserve(cr);
-cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
-cairo_fill(cr);
-cairo_set_operator (cr, CAIRO_OPERATOR_OVER);
+cairo_fill_preserve(cr);
+cairo_set_source_rgba(cr, 1.0, 1.0, 1.0,0.7);
+cairo_stroke(cr);
 cairo_close_path(cr);
 }
 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Initial dark background and rounded corners for popups.

2012-10-28 Thread Nick Schermer
Updating branch refs/heads/master
 to c396f9298a902094a5b5ffa69bc60e1461cf6015 (commit)
   from 47c0e40e14e9ffbceccecdf090027f9050e1edfd (commit)

commit c396f9298a902094a5b5ffa69bc60e1461cf6015
Author: Sean Davis 
Date:   Fri Oct 5 12:11:06 2012 -0400

Initial dark background and rounded corners for popups.

 dialogs/display-settings/main.c |   86 ++-
 1 files changed, 84 insertions(+), 2 deletions(-)

diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c
index cd9fa11..423228f 100644
--- a/dialogs/display-settings/main.c
+++ b/dialogs/display-settings/main.c
@@ -128,6 +128,7 @@ static gboolean   bound_to_channel = FALSE;
 XfceRandr *xfce_randr = NULL;
 
 identity_popup_store display_popups;
+gboolean supports_alpha = FALSE;
 
 static void
 display_settings_minimal_only_display1_toggled (GtkToggleButton *button,
@@ -990,6 +991,80 @@ display_setting_resolutions_populate (GtkBuilder *builder)
 g_signal_connect (G_OBJECT (combobox), "changed", G_CALLBACK 
(display_setting_resolutions_changed), builder);
 }
 
+static void
+display_setting_screen_changed(GtkWidget *widget, GdkScreen *old_screen, 
gpointer userdata)
+{
+GdkScreen *screen = gtk_widget_get_screen(widget);
+GdkColormap *colormap = gdk_screen_get_rgba_colormap(screen);
+
+if (!colormap)
+{
+colormap = gdk_screen_get_rgb_colormap(screen);
+supports_alpha = FALSE;
+}
+else
+{
+supports_alpha = TRUE;
+}
+
+gtk_widget_set_colormap(widget, colormap);
+}
+
+static gboolean
+display_setting_identity_popup_expose(GtkWidget *popup, GdkEventExpose *event, 
gpointer userdata)
+{
+cairo_t *cr = gdk_cairo_create(popup->window);
+gint radius;
+
+radius = 15;
+
+/* Compositing is not available, so just set the background color. */
+if (!supports_alpha)
+{
+cairo_set_source_rgb(cr, 0.2, 0.2, 0.2);
+cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
+cairo_paint (cr);
+}
+
+/* The radius is tiny, don't bother drawing rounded corners. */
+else if (radius < 0.1) {
+cairo_set_source_rgba(cr, 0.2, 0.2, 0.2, 0.9);
+cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
+cairo_paint (cr);
+cairo_rectangle(cr, 0, 0, popup->allocation.width, 
popup->allocation.height);
+}
+
+/* Draw rounded corners. FIXME Does not work with xfce compositor off. */
+else
+{
+cairo_set_source_rgba(cr, 0, 0, 0, 0);
+cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
+cairo_paint (cr);
+
+cairo_set_source_rgba(cr, 0.2, 0.2, 0.2, 0.9);
+
+cairo_move_to(cr, 0, radius);
+cairo_arc(cr, radius, radius, radius, 3.14, 3.0*3.14/2.0);
+cairo_line_to(cr, popup->allocation.width - radius, 0);
+cairo_arc(cr, popup->allocation.width - radius, radius, radius, 
3.0*3.14/2.0, 0.0);
+//cairo_line_to(cr, popup->allocation.width, popup->allocation.height 
- radius);
+cairo_line_to(cr, popup->allocation.width, popup->allocation.height);
+//cairo_arc(cr, popup->allocation.width - radius, 
popup->allocation.height - radius, radius, 0.0, 3.14/2.0);
+//cairo_line_to(cr, radius, popup->allocation.height);
+cairo_line_to(cr, 0, popup->allocation.height);
+//cairo_arc(cr, radius, popup->allocation.height - radius, radius, 
3.14/2.0, 3.14);
+cairo_stroke_preserve(cr);
+cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
+cairo_fill(cr);
+cairo_set_operator (cr, CAIRO_OPERATOR_OVER);
+cairo_close_path(cr);
+}
+
+cairo_destroy (cr);
+
+return FALSE;
+}
+
 static GtkWidget*
 display_setting_identify_display (gint display_id,
GError *error)
@@ -1012,6 +1087,11 @@ display_setting_identify_display (gint display_id,
  identity_popup_ui_length, &error) != 0)
 {
 popup = (GtkWidget *) gtk_builder_get_object(builder, "popup");
+
+gtk_widget_set_app_paintable(popup, TRUE);
+g_signal_connect( G_OBJECT(popup), "expose-event", 
G_CALLBACK(display_setting_identity_popup_expose), NULL );
+g_signal_connect( G_OBJECT(popup), "screen-changed", 
G_CALLBACK(display_setting_screen_changed), NULL );
+
 display_name = gtk_builder_get_object(builder, "display_name");
 display_details = gtk_builder_get_object(builder, "display_details");
 
@@ -1040,10 +1120,10 @@ display_setting_identify_display (gint display_id,
  
xfce_randr->output_info[display_id]->name);
  
 gtk_label_set_markup (GTK_LABEL(display_name),
-  g_strdup_printf("%s: %s", 
_("Display"), name) );
+  g_strdup_printf("%s: %s", _("Display"), name) );

[Xfce4-commits] Escape the text in the identification-popup labels

2012-10-28 Thread Nick Schermer
Updating branch refs/heads/master
 to bac44358340e4d960a4147111dd8fabfe1b469ed (commit)
   from 4076c8a4ff786c0a87685a5f848c71dcdb7a4312 (commit)

commit bac44358340e4d960a4147111dd8fabfe1b469ed
Author: Simon Steinbeiss 
Date:   Mon Oct 8 15:28:22 2012 +0200

Escape the text in the identification-popup labels

 dialogs/display-settings/main.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c
index 57a611f..e8c0e52 100644
--- a/dialogs/display-settings/main.c
+++ b/dialogs/display-settings/main.c
@@ -1110,10 +1110,10 @@ display_setting_identity_display (gint display_id,
 if ((has_selection)) color_hex = "#D2";
   
 gtk_label_set_markup (GTK_LABEL(display_name),
-  g_strdup_printf("%s: %s", color_hex, _("Display"), 
name) );
+  g_markup_printf_escaped("%s %s", color_hex, _("Display:"), 
name) );
 
 gtk_label_set_markup (GTK_LABEL(display_details),
-  g_strdup_printf("%s: %i x 
%i", color_hex, _("Resolution"), screen_width, screen_height) );
+  g_markup_printf_escaped("%s %i x %i", color_hex, _("Resolution:"), screen_width, 
screen_height) );
   
 
 gtk_window_get_size(GTK_WINDOW(popup), &window_width, &window_height);
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Fix small memleak and don't recolor identity-popup when there's only one display

2012-10-28 Thread Nick Schermer
Updating branch refs/heads/master
 to 6d490988e1f3546a5db3f32ce21b519776783778 (commit)
   from bac44358340e4d960a4147111dd8fabfe1b469ed (commit)

commit 6d490988e1f3546a5db3f32ce21b519776783778
Author: Simon Steinbeiss 
Date:   Mon Oct 8 16:24:48 2012 +0200

Fix small memleak and don't recolor identity-popup when there's only one 
display

 dialogs/display-settings/main.c |   25 ++---
 1 files changed, 14 insertions(+), 11 deletions(-)

diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c
index e8c0e52..b7f3e3e 100644
--- a/dialogs/display-settings/main.c
+++ b/dialogs/display-settings/main.c
@@ -1061,7 +1061,7 @@ display_setting_identity_display (gint display_id,
 
 GObject *display_name, *display_details;
 
-gchar *name, *color_hex;
+gchar *name, *color_hex, *name_label, *details_label;
 
 gint active_output;
 XfceRRMode   *current_mode;
@@ -1108,13 +1108,14 @@ display_setting_identity_display (gint display_id,
  
xfce_randr->output_info[display_id]->name);
 color_hex = "#FF";
 if ((has_selection)) color_hex = "#D2";
-  
-gtk_label_set_markup (GTK_LABEL(display_name),
-  g_markup_printf_escaped("%s %s", color_hex, _("Display:"), 
name) );
 
-gtk_label_set_markup (GTK_LABEL(display_details),
-  g_markup_printf_escaped("%s %i x %i", color_hex, _("Resolution:"), screen_width, 
screen_height) );
-  
+name_label = g_markup_printf_escaped("%s 
%s", color_hex, _("Display:"), name);
+gtk_label_set_markup (GTK_LABEL(display_name), name_label);
+g_free (name_label);
+
+details_label = g_markup_printf_escaped("%s %i x 
%i", color_hex, _("Resolution:"), screen_width, screen_height);
+gtk_label_set_markup (GTK_LABEL(display_details), details_label);
+g_free (details_label);
 
 gtk_window_get_size(GTK_WINDOW(popup), &window_width, &window_height);
 
@@ -1390,26 +1391,28 @@ display_settings_treeview_selection_changed 
(GtkTreeSelection *selection,
 gtk_widget_set_sensitive( GTK_WIDGET(display_combo), FALSE );
 }
 
+if (display_settings_get_n_active_outputs() > 1) {
 switch (active_id) {
 case 0:
-   gtk_widget_destroy(display_popups.display1);
+if (GTK_IS_WIDGET(display_popups.display1)) 
gtk_widget_destroy(display_popups.display1);
 display_popups.display1 = 
display_setting_identity_display(active_id, error, has_selection);
 break;
 case 1:
-   gtk_widget_destroy(display_popups.display2);
+if (GTK_IS_WIDGET(display_popups.display2)) 
gtk_widget_destroy(display_popups.display2);
 display_popups.display2 = 
display_setting_identity_display(active_id, error, has_selection);
 break;
 case 2:
-   gtk_widget_destroy(display_popups.display3);
+if (GTK_IS_WIDGET(display_popups.display3)) 
gtk_widget_destroy(display_popups.display3);
 display_popups.display3 = 
display_setting_identity_display(active_id, error, has_selection);
 break;
 case 3:
-   gtk_widget_destroy(display_popups.display4);
+if (GTK_IS_WIDGET(display_popups.display4)) 
gtk_widget_destroy(display_popups.display4);
 display_popups.display4 = 
display_setting_identity_display(active_id, error, has_selection);
 break;
 default:
 break;
 }
+   }
 }
 }
 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Crude fix to recolor the popups based on what display is selected (still flickers) Also, renamed two functions for more consistency

2012-10-28 Thread Nick Schermer
Updating branch refs/heads/master
 to 4076c8a4ff786c0a87685a5f848c71dcdb7a4312 (commit)
   from e28c32cf6d6712ebc9a7d2fe2425ee9180bbc25e (commit)

commit 4076c8a4ff786c0a87685a5f848c71dcdb7a4312
Author: Simon Steinbeiss 
Date:   Mon Oct 8 14:15:16 2012 +0200

Crude fix to recolor the popups based on what display is selected (still 
flickers)
Also, renamed two functions for more consistency

 dialogs/display-settings/main.c |   54 ---
 1 files changed, 39 insertions(+), 15 deletions(-)

diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c
index de5a9f8..57a611f 100644
--- a/dialogs/display-settings/main.c
+++ b/dialogs/display-settings/main.c
@@ -1022,7 +1022,7 @@ display_setting_identity_popup_expose(GtkWidget *popup, 
GdkEventExpose *event, g
 /* Compositing is not available, so just set the background color. */
 if (!supports_alpha)
 {
-cairo_set_source_rgb(cr, 0.2, 0.2, 0.2);
+cairo_set_source_rgb(cr, 0.1, 0.1, 0.1);
 cairo_paint (cr);
 }
 
@@ -1040,7 +1040,7 @@ display_setting_identity_popup_expose(GtkWidget *popup, 
GdkEventExpose *event, g
 cairo_line_to(cr, popup->allocation.width-0.5 - radius, 0.5);
 cairo_arc(cr, popup->allocation.width-0.5 - radius, radius+0.5, 
radius, 3.0*3.14/2.0, 0.0);
 cairo_line_to(cr, popup->allocation.width-0.5, 
popup->allocation.height+0.5);
-cairo_set_source_rgba(cr, 0.2, 0.2, 0.2, 0.9);
+cairo_set_source_rgba(cr, 0.1, 0.1, 0.1, 0.9);
 cairo_fill_preserve(cr);
 cairo_set_source_rgba(cr, 1.0, 1.0, 1.0,0.7);
 cairo_stroke(cr);
@@ -1053,15 +1053,15 @@ display_setting_identity_popup_expose(GtkWidget *popup, 
GdkEventExpose *event, g
 }
 
 static GtkWidget*
-display_setting_identify_display (gint display_id,
-   GError *error)
+display_setting_identity_display (gint display_id,
+   GError *error, gboolean has_selection)
 {
 GtkBuilder *builder;
 GtkWidget *popup;
 
 GObject *display_name, *display_details;
 
-gchar *name;
+gchar *name, *color_hex;
 
 gint active_output;
 XfceRRMode   *current_mode;
@@ -1106,12 +1106,14 @@ display_setting_identify_display (gint display_id,
 name = xfce_randr_friendly_name (xfce_randr,
  
xfce_randr->resources->outputs[display_id],
  
xfce_randr->output_info[display_id]->name);
- 
+color_hex = "#FF";
+if ((has_selection)) color_hex = "#D2";
+  
 gtk_label_set_markup (GTK_LABEL(display_name),
-  g_strdup_printf("%s: %s", _("Display"), name) );
-  
+  g_strdup_printf("%s: %s", color_hex, _("Display"), 
name) );
+
 gtk_label_set_markup (GTK_LABEL(display_details),
-  g_strdup_printf("%s: 
%i x %i", _("Resolution"), screen_width, screen_height) );
+  g_strdup_printf("%s: %i x 
%i", color_hex, _("Resolution"), screen_width, screen_height) );
   
 
 gtk_window_get_size(GTK_WINDOW(popup), &window_width, &window_height);
@@ -1132,7 +1134,7 @@ display_setting_identify_display (gint display_id,
 }
 
 static void
-display_setting_populate_identity_popups(GtkBuilder *builder)
+display_setting_identity_popups_populate(GtkBuilder *builder)
 {
 guint n;
 
@@ -1147,16 +1149,16 @@ display_setting_populate_identity_popups(GtkBuilder 
*builder)
 {
 switch (n) {
 case 0:
-display_popups.display1 = display_setting_identify_display(n, 
error);
+display_popups.display1 = display_setting_identity_display(n, 
error, FALSE);
 break;
 case 1:
-display_popups.display2 = display_setting_identify_display(n, 
error);
+display_popups.display2 = display_setting_identity_display(n, 
error, FALSE);
 break;
 case 2:
-display_popups.display3 = display_setting_identify_display(n, 
error);
+display_popups.display3 = display_setting_identity_display(n, 
error, FALSE);
 break;
 case 3:
-display_popups.display4 = display_setting_identify_display(n, 
error);
+display_popups.display4 = display_setting_identity_display(n, 
error, FALSE);
 break;
 default:
 break;
@@ -1355,6 +1357,7 @@ display_settings_treeview_selection_changed 
(GtkTreeSelection *selection,
 gboolean  has_selection;
 gint  active_id;
 GObject *mirror_displays, *position_combo, *display_combo;
+GError *error=NULL;
 
 /* Get the selection */
 has_selection = gtk

[Xfce4-commits] Fix check for compositing

2012-10-28 Thread Nick Schermer
Updating branch refs/heads/master
 to de05a685e10a8eedd60081830481cb4690f29223 (commit)
   from 6d490988e1f3546a5db3f32ce21b519776783778 (commit)

commit de05a685e10a8eedd60081830481cb4690f29223
Author: Simon Steinbeiss 
Date:   Tue Oct 9 17:44:10 2012 +0200

Fix check for compositing

 dialogs/display-settings/main.c |   10 +-
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c
index b7f3e3e..4b2cf8c 100644
--- a/dialogs/display-settings/main.c
+++ b/dialogs/display-settings/main.c
@@ -997,14 +997,14 @@ display_setting_screen_changed(GtkWidget *widget, 
GdkScreen *old_screen, gpointe
 GdkScreen *screen = gtk_widget_get_screen(widget);
 GdkColormap *colormap = gdk_screen_get_rgba_colormap(screen);
 
-if (!colormap)
+if (gdk_screen_is_composited(screen))
 {
-colormap = gdk_screen_get_rgb_colormap(screen);
-supports_alpha = FALSE;
+supports_alpha = TRUE;
 }
 else
 {
-supports_alpha = TRUE;
+colormap = gdk_screen_get_rgb_colormap(screen);
+supports_alpha = FALSE;
 }
 
 gtk_widget_set_colormap(widget, colormap);
@@ -1026,7 +1026,7 @@ display_setting_identity_popup_expose(GtkWidget *popup, 
GdkEventExpose *event, g
 cairo_paint (cr);
 }
 
-/* Draw rounded corners. FIXME Does not work with xfce compositor off. */
+/* Draw rounded corners. */
 else
 {
 cairo_set_source_rgba(cr, 0, 0, 0, 0);
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Correct icon-name in identity-popups

2012-10-28 Thread Nick Schermer
Updating branch refs/heads/master
 to a130d88717b96708c307b0613bd562a892a19782 (commit)
   from de05a685e10a8eedd60081830481cb4690f29223 (commit)

commit a130d88717b96708c307b0613bd562a892a19782
Author: Simon Steinbeiss 
Date:   Wed Oct 10 10:50:48 2012 +0200

Correct icon-name in identity-popups

 dialogs/display-settings/identity-popup.glade |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dialogs/display-settings/identity-popup.glade 
b/dialogs/display-settings/identity-popup.glade
index 896ff80..da5d733 100644
--- a/dialogs/display-settings/identity-popup.glade
+++ b/dialogs/display-settings/identity-popup.glade
@@ -19,7 +19,7 @@
 True
 False
 48
-computer
+video-display
 6
   
   
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Also draw a white border without compositing

2012-10-28 Thread Nick Schermer
Updating branch refs/heads/master
 to 0b641006b099507b8017bc46777d2606cf7cf4e2 (commit)
   from a130d88717b96708c307b0613bd562a892a19782 (commit)

commit 0b641006b099507b8017bc46777d2606cf7cf4e2
Author: Simon Steinbeiss 
Date:   Wed Oct 10 10:51:23 2012 +0200

Also draw a white border without compositing

 dialogs/display-settings/main.c |3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c
index 4b2cf8c..9b5aa69 100644
--- a/dialogs/display-settings/main.c
+++ b/dialogs/display-settings/main.c
@@ -1024,6 +1024,9 @@ display_setting_identity_popup_expose(GtkWidget *popup, 
GdkEventExpose *event, g
 {
 cairo_set_source_rgb(cr, 0.1, 0.1, 0.1);
 cairo_paint (cr);
+cairo_set_source_rgb(cr, 1.0, 1.0, 1.0);
+cairo_rectangle(cr, 0, 0, popup->allocation.width, 
popup->allocation.height);
+cairo_stroke(cr);
 }
 
 /* Draw rounded corners. */
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Tweak the label-colors in identity-popups

2012-10-28 Thread Nick Schermer
Updating branch refs/heads/master
 to 487c1b0e364b37a4310827e8192c26b4c47da61a (commit)
   from fac8d97f4d7173c9ebaeb4bdf5f51a5ee7eb03f5 (commit)

commit 487c1b0e364b37a4310827e8192c26b4c47da61a
Author: Simon Steinbeiss 
Date:   Fri Oct 12 14:25:28 2012 +0200

Tweak the label-colors in identity-popups

 dialogs/display-settings/main.c |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c
index e32bd32..0fcc825 100644
--- a/dialogs/display-settings/main.c
+++ b/dialogs/display-settings/main.c
@@ -1172,14 +1172,14 @@ display_setting_identity_display (gint display_id,
 name = xfce_randr_friendly_name (xfce_randr,
  
xfce_randr->resources->outputs[display_id],
  
xfce_randr->output_info[display_id]->name);
-color_hex = "#D0D0D0";
-if ((has_selection)) color_hex = "#FF";
+color_hex = "#FF";
+if ((has_selection)) color_hex = "#EDEDFF";
 
 name_label = g_markup_printf_escaped("%s 
%s", color_hex, _("Display:"), name);
 gtk_label_set_markup (GTK_LABEL(display_name), name_label);
 g_free (name_label);
 
-details_label = g_markup_printf_escaped("%s 
%i x %i", _("Resolution:"), screen_width, screen_height);
+details_label = g_markup_printf_escaped("%s %i x 
%i", color_hex, _("Resolution:"), screen_width, screen_height);
 gtk_label_set_markup (GTK_LABEL(display_details), details_label);
 g_free (details_label);
 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Adjust the blue hue of the selection-highlight (thanks Pasi!)

2012-10-28 Thread Nick Schermer
Updating branch refs/heads/master
 to fac8d97f4d7173c9ebaeb4bdf5f51a5ee7eb03f5 (commit)
   from af52d5f5c0782bb7a86dba96d63bff3086a0fe3d (commit)

commit fac8d97f4d7173c9ebaeb4bdf5f51a5ee7eb03f5
Author: Simon Steinbeiss 
Date:   Thu Oct 11 01:13:18 2012 +0200

Adjust the blue hue of the selection-highlight (thanks Pasi!)

 dialogs/display-settings/main.c |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c
index 0775ae8..e32bd32 100644
--- a/dialogs/display-settings/main.c
+++ b/dialogs/display-settings/main.c
@@ -1034,10 +1034,10 @@ display_setting_identity_popup_expose(GtkWidget *popup, 
GdkEventExpose *event, g
cairo_pattern_add_color_stop_rgb(innerstroke_gradient, 0.85, 0.0, 0.0, 
0.0);

selected_gradient = cairo_pattern_create_linear(0, 0, 0, 
popup->allocation.height);
-   cairo_pattern_add_color_stop_rgb(selected_gradient, 0, 0.05, 0.25, 
0.45);
-   cairo_pattern_add_color_stop_rgb(selected_gradient, 0.4, 0.05, 0.15, 
0.25);
+   cairo_pattern_add_color_stop_rgb(selected_gradient, 0, 0.05, 0.20, 
0.46);
+   cairo_pattern_add_color_stop_rgb(selected_gradient, 0.4, 0.05, 0.12, 
0.25);
cairo_pattern_add_color_stop_rgb(selected_gradient, 0.6, 0.05, 0.10, 
0.20);
-   cairo_pattern_add_color_stop_rgb(selected_gradient, 0.8, 0.0, 0.05, 
0.05);
+   cairo_pattern_add_color_stop_rgb(selected_gradient, 0.8, 0.0, 0.02, 
0.05);

selected_innerstroke_gradient = cairo_pattern_create_linear(0, 0, 0, 
popup->allocation.height);
cairo_pattern_add_color_stop_rgb(selected_innerstroke_gradient, 0, 
0.15, 0.45, 0.75);
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Visual improvements to the identity-popup

2012-10-28 Thread Nick Schermer
Updating branch refs/heads/master
 to af52d5f5c0782bb7a86dba96d63bff3086a0fe3d (commit)
   from 0b641006b099507b8017bc46777d2606cf7cf4e2 (commit)

commit af52d5f5c0782bb7a86dba96d63bff3086a0fe3d
Author: Simon Steinbeiss 
Date:   Wed Oct 10 18:27:21 2012 +0200

Visual improvements to the identity-popup

 dialogs/display-settings/main.c |   87 +-
 1 files changed, 75 insertions(+), 12 deletions(-)

diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c
index 9b5aa69..0775ae8 100644
--- a/dialogs/display-settings/main.c
+++ b/dialogs/display-settings/main.c
@@ -1011,21 +1011,63 @@ display_setting_screen_changed(GtkWidget *widget, 
GdkScreen *old_screen, gpointe
 }
 
 static gboolean
-display_setting_identity_popup_expose(GtkWidget *popup, GdkEventExpose *event, 
gpointer userdata)
+display_setting_identity_popup_expose(GtkWidget *popup, GdkEventExpose *event, 
gpointer has_selection)
 {
 cairo_t *cr = gdk_cairo_create(popup->window);
 gint radius;
+gboolean selected = GPOINTER_TO_INT(has_selection);
+cairo_pattern_t *vertical_gradient, *innerstroke_gradient, 
*selected_gradient, *selected_innerstroke_gradient;
 
-radius = 15;
+radius = 10;
 cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
-
+
+/* Create the various gradients */
+   vertical_gradient = cairo_pattern_create_linear(0, 0, 0, 
popup->allocation.height);
+   cairo_pattern_add_color_stop_rgb(vertical_gradient, 0, 0.25, 0.25, 
0.25);
+   cairo_pattern_add_color_stop_rgb(vertical_gradient, 0.24, 0.15, 0.15, 
0.15);
+   cairo_pattern_add_color_stop_rgb(vertical_gradient, 0.6, 0.0, 0.0, 0.0);
+   
+   innerstroke_gradient = cairo_pattern_create_linear(0, 0, 0, 
popup->allocation.height);
+   cairo_pattern_add_color_stop_rgb(innerstroke_gradient, 0, 0.35, 0.35, 
0.35);
+   cairo_pattern_add_color_stop_rgb(innerstroke_gradient, 0.4, 0.25, 0.25, 
0.25);
+   cairo_pattern_add_color_stop_rgb(innerstroke_gradient, 0.7, 0.15, 0.15, 
0.15);
+   cairo_pattern_add_color_stop_rgb(innerstroke_gradient, 0.85, 0.0, 0.0, 
0.0);
+   
+   selected_gradient = cairo_pattern_create_linear(0, 0, 0, 
popup->allocation.height);
+   cairo_pattern_add_color_stop_rgb(selected_gradient, 0, 0.05, 0.25, 
0.45);
+   cairo_pattern_add_color_stop_rgb(selected_gradient, 0.4, 0.05, 0.15, 
0.25);
+   cairo_pattern_add_color_stop_rgb(selected_gradient, 0.6, 0.05, 0.10, 
0.20);
+   cairo_pattern_add_color_stop_rgb(selected_gradient, 0.8, 0.0, 0.05, 
0.05);
+   
+   selected_innerstroke_gradient = cairo_pattern_create_linear(0, 0, 0, 
popup->allocation.height);
+   cairo_pattern_add_color_stop_rgb(selected_innerstroke_gradient, 0, 
0.15, 0.45, 0.75);
+   cairo_pattern_add_color_stop_rgb(selected_innerstroke_gradient, 0.7, 
0.0, 0.15, 0.25);
+   cairo_pattern_add_color_stop_rgb(selected_innerstroke_gradient, 0.85, 
0.0, 0.0, 0.0);
+   
 /* Compositing is not available, so just set the background color. */
 if (!supports_alpha)
 {
-cairo_set_source_rgb(cr, 0.1, 0.1, 0.1);
+   /* Draw a filled rectangle with outline */
+   cairo_set_line_width(cr, 1.0);
+cairo_set_source(cr, vertical_gradient);
+if (selected) cairo_set_source(cr, selected_gradient);
 cairo_paint (cr);
-cairo_set_source_rgb(cr, 1.0, 1.0, 1.0);
-cairo_rectangle(cr, 0, 0, popup->allocation.width, 
popup->allocation.height);
+cairo_set_source_rgb(cr, 0.0, 0.0, 0.0);
+cairo_rectangle(cr, 0.5, 0.5, popup->allocation.width-0.5, 
popup->allocation.height-0.5);
+cairo_stroke(cr);
+
+/* Draw the inner stroke */
+cairo_set_source_rgb(cr, 0.35, 0.35, 0.35);
+if (selected) cairo_set_source_rgb(cr, 0.15, 0.45, 0.75);
+cairo_move_to(cr, 1.5, 1.5);
+cairo_line_to(cr, popup->allocation.width-1, 1.5);
+cairo_stroke(cr);
+cairo_set_source(cr, innerstroke_gradient);
+if (selected) cairo_set_source(cr, selected_innerstroke_gradient);
+cairo_move_to(cr, 1.5, 1.5);
+cairo_line_to(cr, 1.5, popup->allocation.height-1.0);
+cairo_move_to(cr, popup->allocation.width-1.5, 1.5);
+cairo_line_to(cr, popup->allocation.width-1.5, 
popup->allocation.height-1.0);
 cairo_stroke(cr);
 }
 
@@ -1043,14 +1085,35 @@ display_setting_identity_popup_expose(GtkWidget *popup, 
GdkEventExpose *event, g
 cairo_line_to(cr, popup->allocation.width-0.5 - radius, 0.5);
 cairo_arc(cr, popup->allocation.width-0.5 - radius, radius+0.5, 
radius, 3.0*3.14/2.0, 0.0);
 cairo_line_to(cr, popup->allocation.width-0.5, 
popup->allocation.height+0.5);
-cairo_set_source_rgba(cr, 0.1, 0.1, 0.1, 0.9);
+cairo_set_source(cr, vertical_gradient);
+if (selected) cairo_set_source(cr, selected_gradient);
 cairo_fill_preser

[Xfce4-commits] Change the display size before applying settings

2012-10-28 Thread Nick Schermer
Updating branch refs/heads/master
 to bbc6e64c1b48c45659227dcffb1475f0650d9e8b (commit)
   from 487c1b0e364b37a4310827e8192c26b4c47da61a (commit)

commit bbc6e64c1b48c45659227dcffb1475f0650d9e8b
Author: Lionel Le Folgoc 
Date:   Mon Oct 15 16:32:50 2012 +0200

Change the display size before applying settings

Apply changes per CRTC instead of per output and simplify the code a bit.

Signed-off-by: Simon Steinbeiss 

 xfsettingsd/debug.c|1 +
 xfsettingsd/debug.h|1 +
 xfsettingsd/displays.c |  435 ++--
 3 files changed, 201 insertions(+), 236 deletions(-)

diff --git a/xfsettingsd/debug.c b/xfsettingsd/debug.c
index 67d53d9..e9653e8 100644
--- a/xfsettingsd/debug.c
+++ b/xfsettingsd/debug.c
@@ -40,6 +40,7 @@ static const GDebugKey dbg_keys[] =
 { "workspaces", XFSD_DEBUG_WORKSPACES },
 { "accessibility", XFSD_DEBUG_ACCESSIBILITY },
 { "pointers", XFSD_DEBUG_POINTERS },
+{ "displays", XFSD_DEBUG_DISPLAYS },
 };
 
 
diff --git a/xfsettingsd/debug.h b/xfsettingsd/debug.h
index 228913e..20adbf3 100644
--- a/xfsettingsd/debug.h
+++ b/xfsettingsd/debug.h
@@ -32,6 +32,7 @@ typedef enum
XFSD_DEBUG_WORKSPACES = 1 << 6,
XFSD_DEBUG_ACCESSIBILITY  = 1 << 7,
XFSD_DEBUG_POINTERS   = 1 << 8,
+   XFSD_DEBUG_DISPLAYS   = 1 << 9,
 }
 XfsdDebugDomain;
 
diff --git a/xfsettingsd/displays.c b/xfsettingsd/displays.c
index ee0a4d9..be03da3 100644
--- a/xfsettingsd/displays.c
+++ b/xfsettingsd/displays.c
@@ -32,10 +32,10 @@
 #include 
 #include 
 #include 
-#include 
 
 #include 
 
+#include "debug.h"
 #include "displays.h"
 
 /* check for randr 1.3 or better */
@@ -89,14 +89,13 @@ struct _XfceRRCrtc
 RROutput *outputs;
 gint  npossible;
 RROutput *possible;
-gint  processed;
+gint  changed;
 };
 
 struct _XfceRROutput
 {
 RROutput   id;
 XRROutputInfo *info;
-XfceRRCrtc*pending;
 };
 
 
@@ -226,7 +225,7 @@ xfce_displays_helper_list_crtcs (Display
*xdisplay,
 crtcs[n].possible = g_memdup (crtc_info->possible,
   crtc_info->npossible * sizeof 
(RROutput));
 
-crtcs[n].processed = FALSE;
+crtcs[n].changed = FALSE;
 XRRFreeCrtcInfo (crtc_info);
 }
 
@@ -256,8 +255,6 @@ xfce_displays_helper_free_output (XfceRROutput *output)
 return;
 
 XRRFreeOutputInfo (output->info);
-xfce_displays_helper_cleanup_crtc (output->pending);
-g_free (output->pending);
 g_free (output);
 }
 
@@ -265,20 +262,18 @@ xfce_displays_helper_free_output (XfceRROutput *output)
 
 static GPtrArray *
 xfce_displays_helper_list_outputs (Display*xdisplay,
-   XRRScreenResources *resources,
-   gint   *nactive)
+   XRRScreenResources *resources)
 {
 GPtrArray *outputs;
 XRROutputInfo *info;
 XfceRROutput  *output;
 gint   n;
 
-g_assert (xdisplay && resources && nactive);
+g_assert (xdisplay && resources);
 
 outputs = g_ptr_array_new ();
 
 /* get all connected outputs */
-*nactive = 0;
 for (n = 0; n < resources->noutput; ++n)
 {
 info = XRRGetOutputInfo (xdisplay, resources, resources->outputs[n]);
@@ -292,15 +287,9 @@ xfce_displays_helper_list_outputs (Display
*xdisplay,
 output = g_new0 (XfceRROutput, 1);
 output->id = resources->outputs[n];
 output->info = info;
-/* this will contain the settings to apply (filled in later) */
-output->pending = NULL;
 
 /* cache it */
 g_ptr_array_add (outputs, output);
-
-/* return the number of active outputs */
-if (info->crtc != None)
-++(*nactive);
 }
 
 return outputs;
@@ -329,46 +318,6 @@ xfce_displays_helper_find_crtc_by_id (XRRScreenResources 
*resources,
 
 
 static XfceRRCrtc *
-xfce_displays_helper_find_clonable_crtc (XRRScreenResources *resources,
- XfceRRCrtc *crtcs,
- XfceRROutput   *output)
-{
-gint m, n, candidate;
-
-g_assert (resources && crtcs && output);
-
-for (n = 0; n < resources->ncrtc; ++n)
-{
-if (crtcs[n].processed && crtcs[n].x == output->pending->x
-&& crtcs[n].y == output->pending->y
-&& crtcs[n].mode == output->pending->mode
-&& crtcs[n].rotation == output->pending->rotation)
-{
-/* we found a CRTC already enabled with the exact values
-   => might be suitable for a clone, check that it can be
-   connected to the new output */
-candidate = FALSE;
-for (m = 0; m < crtcs[n].npossible; ++m)
-{
-if (crtcs[n].possible[m] == output->id)
-{
-   

[Xfce4-commits] Fix bug preventing to disable outputs

2012-10-28 Thread Nick Schermer
Updating branch refs/heads/master
 to bcc727f6a7e067b18268642029bf8f4ac0092f26 (commit)
   from bbc6e64c1b48c45659227dcffb1475f0650d9e8b (commit)

commit bcc727f6a7e067b18268642029bf8f4ac0092f26
Author: Lionel Le Folgoc 
Date:   Mon Oct 15 16:37:07 2012 +0200

Fix bug preventing to disable outputs

Signed-off-by: Simon Steinbeiss 

 xfsettingsd/displays.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/xfsettingsd/displays.c b/xfsettingsd/displays.c
index be03da3..9a7d441 100644
--- a/xfsettingsd/displays.c
+++ b/xfsettingsd/displays.c
@@ -537,6 +537,7 @@ xfce_displays_helper_channel_apply (XfceDisplaysHelper 
*helper,
 
 crtc->mode = None;
 crtc->noutput = 0;
+crtc->changed = TRUE;
 }
 
 continue;
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Restore failsafe to prevent disabling all outputs

2012-10-28 Thread Nick Schermer
Updating branch refs/heads/master
 to 8e422bf4ed9440f70e0fca56f6a3dfd0da794eb9 (commit)
   from bcc727f6a7e067b18268642029bf8f4ac0092f26 (commit)

commit 8e422bf4ed9440f70e0fca56f6a3dfd0da794eb9
Author: Lionel Le Folgoc 
Date:   Mon Oct 15 17:12:07 2012 +0200

Restore failsafe to prevent disabling all outputs

Also improve a bit debugging messages.

Signed-off-by: Simon Steinbeiss 

 xfsettingsd/displays.c |   89 +++-
 1 files changed, 58 insertions(+), 31 deletions(-)

diff --git a/xfsettingsd/displays.c b/xfsettingsd/displays.c
index 9a7d441..4101135 100644
--- a/xfsettingsd/displays.c
+++ b/xfsettingsd/displays.c
@@ -234,6 +234,26 @@ xfce_displays_helper_list_crtcs (Display
*xdisplay,
 
 
 
+static XfceRRCrtc *
+xfce_displays_helper_find_crtc_by_id (XRRScreenResources *resources,
+  XfceRRCrtc *crtcs,
+  RRCrtc  id)
+{
+gint n;
+
+g_assert (resources && crtcs);
+
+for (n = 0; n < resources->ncrtc; ++n)
+{
+if (crtcs[n].id == id)
+return &crtcs[n];
+}
+
+return NULL;
+}
+
+
+
 static void
 xfce_displays_helper_cleanup_crtc (XfceRRCrtc *crtc)
 {
@@ -262,18 +282,22 @@ xfce_displays_helper_free_output (XfceRROutput *output)
 
 static GPtrArray *
 xfce_displays_helper_list_outputs (Display*xdisplay,
-   XRRScreenResources *resources)
+   XRRScreenResources *resources,
+   XfceRRCrtc *crtcs,
+   gint   *nactive)
 {
 GPtrArray *outputs;
 XRROutputInfo *info;
 XfceRROutput  *output;
+XfceRRCrtc*crtc;
 gint   n;
 
-g_assert (xdisplay && resources);
+g_assert (xdisplay && resources && nactive);
 
 outputs = g_ptr_array_new ();
 
 /* get all connected outputs */
+*nactive = 0;
 for (n = 0; n < resources->noutput; ++n)
 {
 info = XRRGetOutputInfo (xdisplay, resources, resources->outputs[n]);
@@ -288,6 +312,18 @@ xfce_displays_helper_list_outputs (Display
*xdisplay,
 output->id = resources->outputs[n];
 output->info = info;
 
+xfsettings_dbg (XFSD_DEBUG_DISPLAYS, "Detected output %lu %s.", 
output->id,
+output->info->name);
+
+/* track active outputs */
+crtc = xfce_displays_helper_find_crtc_by_id (resources, crtcs,
+ output->info->crtc);
+if (crtc && crtc->mode != None)
+{
+xfsettings_dbg (XFSD_DEBUG_DISPLAYS, "%s is active.", 
output->info->name);
+++(*nactive);
+}
+
 /* cache it */
 g_ptr_array_add (outputs, output);
 }
@@ -298,26 +334,6 @@ xfce_displays_helper_list_outputs (Display
*xdisplay,
 
 
 static XfceRRCrtc *
-xfce_displays_helper_find_crtc_by_id (XRRScreenResources *resources,
-  XfceRRCrtc *crtcs,
-  RRCrtc  id)
-{
-gint n;
-
-g_assert (resources && crtcs);
-
-for (n = 0; n < resources->ncrtc; ++n)
-{
-if (crtcs[n].id == id)
-return &crtcs[n];
-}
-
-return NULL;
-}
-
-
-
-static XfceRRCrtc *
 xfce_displays_helper_find_usable_crtc (XRRScreenResources *resources,
XfceRRCrtc *crtcs,
XfceRROutput   *output)
@@ -437,7 +453,7 @@ xfce_displays_helper_channel_apply (XfceDisplaysHelper 
*helper,
 gintmin_width, min_height, max_width, max_height;
 gintmm_width, mm_height, width, height;
 gintx, y, min_x, min_y;
-gintl, m, int_value;
+gintl, m, int_value, nactive;
 guint   n;
 GValue *value;
 const gchar*str_value;
@@ -474,7 +490,8 @@ xfce_displays_helper_channel_apply (XfceDisplaysHelper 
*helper,
 crtcs = xfce_displays_helper_list_crtcs (xdisplay, resources);
 
 /* then all connected outputs */
-connected_outputs = xfce_displays_helper_list_outputs (xdisplay, 
resources);
+connected_outputs = xfce_displays_helper_list_outputs (xdisplay, resources,
+   crtcs, &nactive);
 
 /* finally the list of saved outputs from xfconf */
 g_snprintf (property, sizeof (property), "/%s", scheme);
@@ -521,18 +538,19 @@ xfce_displays_helper_channel_apply (XfceDisplaysHelper 
*helper,
 crtc = xfce_displays_helper_find_usable_crtc (resources, crtcs, 
output);
 if (!crtc)
 {
-g_warning ("No available CRTC for output %s, aborting.", 
output->info->name);
+g_warning ("No available CRTC for %s,

[Xfce4-commits] Simplify dimensions' calculation

2012-10-28 Thread Nick Schermer
Updating branch refs/heads/master
 to cc38417d940d0d5ff79a6d056bc190d6c9f654f5 (commit)
   from 8e422bf4ed9440f70e0fca56f6a3dfd0da794eb9 (commit)

commit cc38417d940d0d5ff79a6d056bc190d6c9f654f5
Author: Lionel Le Folgoc 
Date:   Mon Oct 15 17:33:19 2012 +0200

Simplify dimensions' calculation

Signed-off-by: Simon Steinbeiss 

 xfsettingsd/displays.c |  153 +++-
 1 files changed, 74 insertions(+), 79 deletions(-)

diff --git a/xfsettingsd/displays.c b/xfsettingsd/displays.c
index 4101135..d5a7799 100644
--- a/xfsettingsd/displays.c
+++ b/xfsettingsd/displays.c
@@ -83,6 +83,8 @@ struct _XfceRRCrtc
 RRModemode;
 Rotation  rotation;
 Rotation  rotations;
+gint  width;
+gint  height;
 gint  x;
 gint  y;
 gint  noutput;
@@ -210,6 +212,8 @@ xfce_displays_helper_list_crtcs (Display
*xdisplay,
 crtcs[n].mode = crtc_info->mode;
 crtcs[n].rotation = crtc_info->rotation;
 crtcs[n].rotations = crtc_info->rotations;
+crtcs[n].width = crtc_info->width;
+crtcs[n].height = crtc_info->height;
 crtcs[n].x = crtc_info->x;
 crtcs[n].y = crtc_info->y;
 
@@ -561,6 +565,56 @@ xfce_displays_helper_channel_apply (XfceDisplaysHelper 
*helper,
 continue;
 }
 
+/* rotation */
+g_snprintf (property, sizeof (property), "/%s/%s/Rotation", scheme,
+output->info->name);
+value = g_hash_table_lookup (saved_outputs, property);
+if (G_VALUE_HOLDS_INT (value))
+int_value = g_value_get_int (value);
+else
+int_value = 0;
+
+/* convert to a Rotation */
+switch (int_value)
+{
+case 90:  rot = RR_Rotate_90;  break;
+case 180: rot = RR_Rotate_180; break;
+case 270: rot = RR_Rotate_270; break;
+default:  rot = RR_Rotate_0;   break;
+}
+
+/* reflection */
+g_snprintf (property, sizeof (property), "/%s/%s/Reflection", scheme,
+output->info->name);
+value = g_hash_table_lookup (saved_outputs, property);
+if (G_VALUE_HOLDS_STRING (value))
+str_value = g_value_get_string (value);
+else
+str_value = "0";
+
+/* convert to a Rotation */
+if (g_strcmp0 (str_value, "X") == 0)
+rot |= RR_Reflect_X;
+else if (g_strcmp0 (str_value, "Y") == 0)
+rot |= RR_Reflect_Y;
+else if (g_strcmp0 (str_value, "XY") == 0)
+rot |= (RR_Reflect_X|RR_Reflect_Y);
+
+/* check rotation support */
+if ((crtc->rotations & rot) == 0)
+{
+g_warning ("Unsupported rotation for %s. Fallback to RR_Rotate_0.",
+   output->info->name);
+rot = RR_Rotate_0;
+}
+
+/* update CRTC rotation */
+if (crtc->rotation != rot)
+{
+crtc->rotation = rot;
+crtc->changed = TRUE;
+}
+
 /* resolution */
 g_snprintf (property, sizeof (property), "/%s/%s/Resolution",
 scheme, output->info->name);
@@ -586,21 +640,19 @@ xfce_displays_helper_channel_apply (XfceDisplaysHelper 
*helper,
 /* walk all modes */
 for (l = 0; l < resources->nmode; ++l)
 {
-/* get the mode info */
-XRRModeInfo *mode_info = &resources->modes[l];
-
 /* does the mode info match the mode we seek? */
-if (mode_info->id != output->info->modes[m])
+if (resources->modes[l].id != output->info->modes[m])
 continue;
 
 /* calculate the refresh rate */
-rate = (gdouble) mode_info->dotClock / ((gdouble) 
mode_info->hTotal * (gdouble) mode_info->vTotal);
+rate = (gdouble) resources->modes[l].dotClock /
+((gdouble) resources->modes[l].hTotal * (gdouble) 
resources->modes[l].vTotal);
 
 /* find the mode corresponding to the saved values */
 if (rint (rate) == rint (output_rate)
-&& (g_strcmp0 (mode_info->name, str_value) == 0))
+&& (g_strcmp0 (resources->modes[l].name, str_value) == 0))
 {
-valid_mode = mode_info->id;
+valid_mode = resources->modes[l].id;
 break;
 }
 }
@@ -624,56 +676,18 @@ xfce_displays_helper_channel_apply (XfceDisplaysHelper 
*helper,
 /* update CRTC mode */
 crtc->mode = valid_mode;
 crtc->changed = TRUE;
-}
 
-/* rotation */
-g_snprintf (property, sizeof (property), "/%s/%s/Rotation", scheme,
-output->info->name);
-value = g_hash_table_lookup (saved_outputs, property);
-if (G_VALUE

[Xfce4-commits] Try to reduce flickering

2012-10-28 Thread Nick Schermer
Updating branch refs/heads/master
 to b6139161381874dff079765a2e1f2abae5061ac5 (commit)
   from cc38417d940d0d5ff79a6d056bc190d6c9f654f5 (commit)

commit b6139161381874dff079765a2e1f2abae5061ac5
Author: Lionel Le Folgoc 
Date:   Mon Oct 15 17:38:41 2012 +0200

Try to reduce flickering

Signed-off-by: Simon Steinbeiss 

 xfsettingsd/displays.c |   34 +-
 1 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/xfsettingsd/displays.c b/xfsettingsd/displays.c
index d5a7799..8948637 100644
--- a/xfsettingsd/displays.c
+++ b/xfsettingsd/displays.c
@@ -739,28 +739,28 @@ xfce_displays_helper_channel_apply (XfceDisplaysHelper 
*helper,
 for (m = 0; m < resources->ncrtc; ++m)
 {
 /* ignore disabled outputs for size computations */
-if (crtcs[m].mode == None)
-continue;
-
-/* normalize positions to ensure the upper left corner is at (0,0) */
-if (min_x || min_y)
+if (crtcs[m].mode != None)
 {
-crtcs[m].x -= min_x;
-crtcs[m].y -= min_y;
-crtcs[m].changed = TRUE;
-}
+/* normalize positions to ensure the upper left corner is at (0,0) 
*/
+if (min_x || min_y)
+{
+crtcs[m].x -= min_x;
+crtcs[m].y -= min_y;
+crtcs[m].changed = TRUE;
+}
 
-xfsettings_dbg (XFSD_DEBUG_DISPLAYS, "Normalized CRTC %lu: size=%dx%d, 
pos=%dx%d.",
-crtcs[m].id, crtcs[m].width, crtcs[m].height, 
crtcs[m].x, crtcs[m].y);
+xfsettings_dbg (XFSD_DEBUG_DISPLAYS, "Normalized CRTC %lu: 
size=%dx%d, pos=%dx%d.",
+crtcs[m].id, crtcs[m].width, crtcs[m].height, 
crtcs[m].x, crtcs[m].y);
 
-/* calculate the total screen size */
-xfce_displays_helper_process_screen_size (crtcs[m].width, 
crtcs[m].height,
-  crtcs[m].x, crtcs[m].y, 
&width,
-  &height, &mm_width, 
&mm_height);
+/* calculate the total screen size */
+xfce_displays_helper_process_screen_size (crtcs[m].width, 
crtcs[m].height,
+  crtcs[m].x, crtcs[m].y, 
&width,
+  &height, &mm_width, 
&mm_height);
+}
 
-/* disable the CRTC, it will be reenabled after size calculation */
+/* disable the CRTC, it will be reenabled after size calculation, 
unless the user disabled it */
 if (xfce_displays_helper_disable_crtc (xdisplay, resources, 
crtcs[m].id) == RRSetConfigSuccess)
-crtcs[m].changed = TRUE;
+crtcs[m].changed = (crtcs[m].mode != None);
 else
 g_warning ("Failed to disable CRTC %lu.", crtc->id);
 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Simplify position handling with enums and structs

2012-10-28 Thread Nick Schermer
Updating branch refs/heads/master
 to 9e5481cb8a2d00f2c77e12b7e15f1f0a586a3927 (commit)
   from b6139161381874dff079765a2e1f2abae5061ac5 (commit)

commit 9e5481cb8a2d00f2c77e12b7e15f1f0a586a3927
Author: Lionel Le Folgoc 
Date:   Mon Oct 15 18:15:02 2012 +0200

Simplify position handling with enums and structs

This matches what's done for Rotations and Reflections.

Signed-off-by: Simon Steinbeiss 

 dialogs/display-settings/main.c   |   50 ++---
 dialogs/display-settings/xfce-randr.h |   22 +++---
 2 files changed, 38 insertions(+), 34 deletions(-)

diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c
index 0fcc825..560a37c 100644
--- a/dialogs/display-settings/main.c
+++ b/dialogs/display-settings/main.c
@@ -77,6 +77,18 @@ typedef struct {
 
 
 
+/* Xrandr relation name conversion */
+static const XfceRelation relation_names[] =
+{
+{ XFCE_RANDR_PLACEMENT_MIRROR,   N_("Same as") },
+{ XFCE_RANDR_PLACEMENT_UP, N_("Above") },
+{ XFCE_RANDR_PLACEMENT_DOWN, N_("Below") },
+{ XFCE_RANDR_PLACEMENT_RIGHT, N_("Right of") },
+{ XFCE_RANDR_PLACEMENT_LEFT,  N_("Left of") }
+};
+
+
+
 /* Xrandr rotation name conversion */
 static const XfceRotation rotation_names[] =
 {
@@ -413,6 +425,7 @@ display_setting_positions_populate (GtkBuilder *builder)
 GtkTreeModel *model;
 GObject  *combobox;
 GtkTreeIter   iter;
+guint n;
 
 /* Get the positions combo box store and clear it */
 combobox = gtk_builder_get_object (builder, "randr-position");
@@ -433,35 +446,14 @@ 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_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_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_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_VALUE, XFCE_RANDR_PLACEMENT_DOWN, -1);
+/* Try to insert the relations */
+for (n = 0; n < G_N_ELEMENTS (relation_names); n++)
+{
+gtk_list_store_append (GTK_LIST_STORE (model), &iter);
+gtk_list_store_set (GTK_LIST_STORE (model), &iter,
+COLUMN_COMBO_NAME, _(relation_names[n].name),
+COLUMN_COMBO_VALUE, relation_names[n].relation, 
-1);
+}
 
 /* Reconnect the signal */
 g_signal_connect (G_OBJECT (combobox), "changed", G_CALLBACK 
(display_setting_positions_changed), builder);
diff --git a/dialogs/display-settings/xfce-randr.h 
b/dialogs/display-settings/xfce-randr.h
index 78a0e7e..f6997ad 100644
--- a/dialogs/display-settings/xfce-randr.h
+++ b/dialogs/display-settings/xfce-randr.h
@@ -34,11 +34,6 @@
 #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_UP   0
-#define XFCE_RANDR_PLACEMENT_RIGHT1
-#define XFCE_RANDR_PLACEMENT_DOWN 2
-#define XFCE_RANDR_PLACEMENT_LEFT 3
-#define XFCE_RANDR_PLACEMENT_MIRROR   4
 
 /* check for randr 1.3 or better */
 #if RANDR_MAJOR > 1 || (RANDR_MAJOR == 1 && RANDR_MINOR >= 3)
@@ -50,8 +45,10 @@
 typedef struct _XfceRandr  XfceRandr;
 typedef struct _XfceOutputPosition XfceOutputPosition;
 typedef struct _XfceRRMode XfceRRMode;
+typedef struct _XfceRelation   XfceRelation;
 typedef struct _XfceRotation   XfceRotation;
 typedef enum   _XfceOutputStatus   XfceOutputStatus;
+typedef enum   _XfceOutputRelation XfceOutputRelation;
 
 enum _XfceOutputStatus
 {
@@ -

[Xfce4-commits] Fix whitespace error

2012-10-28 Thread Nick Schermer
Updating branch refs/heads/master
 to c3036362dbffe9a9cafff721960a89bdd828e957 (commit)
   from 72d36dce758f1d9168d3f11c78af9da02a1ed93f (commit)

commit c3036362dbffe9a9cafff721960a89bdd828e957
Author: Simon Steinbeiss 
Date:   Tue Oct 16 01:10:30 2012 +0200

Fix whitespace error

 dialogs/display-settings/main.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c
index d4a60aa..ce246ee 100644
--- a/dialogs/display-settings/main.c
+++ b/dialogs/display-settings/main.c
@@ -550,7 +550,7 @@ display_setting_guess_positioning (GtkBuilder *builder)
 if (n != active_output)
 {
 /* Check for mirror */
-if ( (xfce_randr->position[n].x == current_x) && 
+if ( (xfce_randr->position[n].x == current_x) &&
  (xfce_randr->position[n].y == current_y) ) {
 gtk_combo_box_set_active( GTK_COMBO_BOX(position_combo), 0 );
 gtk_combo_box_set_active( GTK_COMBO_BOX(display_combo), 
cb_index );
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Revert previous commit to be able to cleanly apply another patch

2012-10-28 Thread Nick Schermer
Updating branch refs/heads/master
 to 720535bd5332b33735a05a66b70ef1186080fd17 (commit)
   from c3036362dbffe9a9cafff721960a89bdd828e957 (commit)

commit 720535bd5332b33735a05a66b70ef1186080fd17
Author: Simon Steinbeiss 
Date:   Tue Oct 16 01:20:43 2012 +0200

Revert previous commit to be able to cleanly apply another patch

 dialogs/display-settings/main.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c
index ce246ee..d4a60aa 100644
--- a/dialogs/display-settings/main.c
+++ b/dialogs/display-settings/main.c
@@ -550,7 +550,7 @@ display_setting_guess_positioning (GtkBuilder *builder)
 if (n != active_output)
 {
 /* Check for mirror */
-if ( (xfce_randr->position[n].x == current_x) &&
+if ( (xfce_randr->position[n].x == current_x) && 
  (xfce_randr->position[n].y == current_y) ) {
 gtk_combo_box_set_active( GTK_COMBO_BOX(position_combo), 0 );
 gtk_combo_box_set_active( GTK_COMBO_BOX(display_combo), 
cb_index );
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Do not harcode iter indexes for positions

2012-10-28 Thread Nick Schermer
Updating branch refs/heads/master
 to 4fa8b017408126006b653e758b8ca38b47f98b1a (commit)
   from 720535bd5332b33735a05a66b70ef1186080fd17 (commit)

commit 4fa8b017408126006b653e758b8ca38b47f98b1a
Author: Lionel Le Folgoc 
Date:   Mon Oct 15 23:35:21 2012 +0200

Do not harcode iter indexes for positions

Signed-off-by: Simon Steinbeiss 

 dialogs/display-settings/main.c |   23 +--
 1 files changed, 17 insertions(+), 6 deletions(-)

diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c
index d4a60aa..51c5091 100644
--- a/dialogs/display-settings/main.c
+++ b/dialogs/display-settings/main.c
@@ -527,6 +527,7 @@ display_setting_guess_positioning (GtkBuilder *builder)
 {
 GObject *position_combo, *display_combo;
 gint current_x, current_y, cb_index;
+XfceOutputRelation rel;
 guint n;
 
 current_x = xfce_randr->position[active_output].x;
@@ -552,7 +553,7 @@ display_setting_guess_positioning (GtkBuilder *builder)
 /* Check for mirror */
 if ( (xfce_randr->position[n].x == current_x) && 
  (xfce_randr->position[n].y == current_y) ) {
-gtk_combo_box_set_active( GTK_COMBO_BOX(position_combo), 0 );
+rel = XFCE_RANDR_PLACEMENT_MIRROR;
 gtk_combo_box_set_active( GTK_COMBO_BOX(display_combo), 
cb_index );
 break;   
 }
@@ -560,7 +561,7 @@ display_setting_guess_positioning (GtkBuilder *builder)
 /* Check for Left Of */
 if ( (xfce_randr->position[n].y == current_y) &&
  (xfce_randr->position[n].x > current_x) ) {
-gtk_combo_box_set_active( GTK_COMBO_BOX(position_combo), 1 );
+rel = XFCE_RANDR_PLACEMENT_LEFT;
 gtk_combo_box_set_active( GTK_COMBO_BOX(display_combo), 
cb_index );
 break;
 }
@@ -568,7 +569,7 @@ display_setting_guess_positioning (GtkBuilder *builder)
 /* Check for Right Of */
 if ( (xfce_randr->position[n].y == current_y) &&
  (xfce_randr->position[n].x < current_x) ) {
-gtk_combo_box_set_active( GTK_COMBO_BOX(position_combo), 2 );
+rel = XFCE_RANDR_PLACEMENT_RIGHT;
 gtk_combo_box_set_active( GTK_COMBO_BOX(display_combo), 
cb_index );
 break;
 }
@@ -576,7 +577,7 @@ display_setting_guess_positioning (GtkBuilder *builder)
 /* Check for Above */
 if ( (xfce_randr->position[n].x == current_x) &&
  (xfce_randr->position[n].y > current_y) ) {
-gtk_combo_box_set_active( GTK_COMBO_BOX(position_combo), 3 );
+rel = XFCE_RANDR_PLACEMENT_UP;
 gtk_combo_box_set_active( GTK_COMBO_BOX(display_combo), 
cb_index );
 break;
 }
@@ -584,7 +585,7 @@ display_setting_guess_positioning (GtkBuilder *builder)
 /* Check for Below */
 if ( (xfce_randr->position[n].x == current_x) &&
  (xfce_randr->position[n].y < current_y) ) {
-gtk_combo_box_set_active( GTK_COMBO_BOX(position_combo), 4 );
+rel = XFCE_RANDR_PLACEMENT_DOWN;
 gtk_combo_box_set_active( GTK_COMBO_BOX(display_combo), 
cb_index );
 break;
 }
@@ -592,7 +593,17 @@ display_setting_guess_positioning (GtkBuilder *builder)
 cb_index++;
 }
 }
-
+
+/* set the correct index for the position combobox */
+for (n = 0; n < G_N_ELEMENTS (relation_names); n++)
+{
+if (rel == relation_names[n].relation)
+{
+gtk_combo_box_set_active (GTK_COMBO_BOX (position_combo), n);
+break;
+}
+}
+
 g_signal_connect (G_OBJECT (position_combo), "changed", G_CALLBACK 
(display_setting_positions_changed), builder);
 g_signal_connect (G_OBJECT (display_combo), "changed", G_CALLBACK 
(display_setting_active_displays_changed), builder);
 }
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Drop XFCE_RANDR_* macros

2012-10-28 Thread Nick Schermer
Updating branch refs/heads/master
 to 72d36dce758f1d9168d3f11c78af9da02a1ed93f (commit)
   from 9e5481cb8a2d00f2c77e12b7e15f1f0a586a3927 (commit)

commit 72d36dce758f1d9168d3f11c78af9da02a1ed93f
Author: Lionel Le Folgoc 
Date:   Mon Oct 15 22:52:47 2012 +0200

Drop XFCE_RANDR_* macros

It lead to do insane stuff with xfce_randr->active_output.

Signed-off-by: Simon Steinbeiss 

 dialogs/display-settings/main.c   |  272 +++--
 dialogs/display-settings/xfce-randr.h |   15 +--
 2 files changed, 127 insertions(+), 160 deletions(-)

diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c
index 560a37c..d4a60aa 100644
--- a/dialogs/display-settings/main.c
+++ b/dialogs/display-settings/main.c
@@ -80,11 +80,11 @@ typedef struct {
 /* Xrandr relation name conversion */
 static const XfceRelation relation_names[] =
 {
-{ XFCE_RANDR_PLACEMENT_MIRROR,   N_("Same as") },
-{ XFCE_RANDR_PLACEMENT_UP, N_("Above") },
-{ XFCE_RANDR_PLACEMENT_DOWN, N_("Below") },
-{ XFCE_RANDR_PLACEMENT_RIGHT, N_("Right of") },
-{ XFCE_RANDR_PLACEMENT_LEFT,  N_("Left of") }
+{ XFCE_RANDR_PLACEMENT_MIRROR, N_("Same as") },
+{ XFCE_RANDR_PLACEMENT_UP, N_("Above") },
+{ XFCE_RANDR_PLACEMENT_DOWN,   N_("Below") },
+{ XFCE_RANDR_PLACEMENT_RIGHT,  N_("Right of") },
+{ XFCE_RANDR_PLACEMENT_LEFT,   N_("Left of") }
 };
 
 
@@ -136,6 +136,9 @@ static GOptionEntry option_entries[] =
 static XfconfChannel *display_channel;
 static gboolean   bound_to_channel = FALSE;
 
+/* output currently selected in the treeview */
+static guint active_output;
+
 /* Pointer to the used randr structure */
 XfceRandr *xfce_randr = NULL;
 
@@ -305,7 +308,7 @@ static void
 display_setting_positions_changed (GtkComboBox *combobox,
  GtkBuilder  *builder)
 {
-gint value, current_display, current_x, current_y, selected_display, 
selected_x, selected_y;
+gint value, current_x, current_y, selected_display, selected_x, selected_y;
 GObject *display_combobox;
 XfceRRMode   *current_mode, *selected_mode;
 
@@ -321,66 +324,62 @@ display_setting_positions_changed (GtkComboBox *combobox,
 if (selected_display == -1) return;
 
 /* Store the currently active display's position and mode */
-current_display = xfce_randr->active_output;
-current_mode = xfce_randr_find_mode_by_id (xfce_randr, current_display, 
XFCE_RANDR_MODE (xfce_randr));
-current_x = XFCE_RANDR_POS_X (xfce_randr);
-current_y = XFCE_RANDR_POS_Y (xfce_randr);
+current_mode = xfce_randr_find_mode_by_id (xfce_randr, active_output,
+   
xfce_randr->mode[active_output]);
+current_x = xfce_randr->position[active_output].x;
+current_y = xfce_randr->position[active_output].y;
 
 /* Store the selected display's position and mode */
-xfce_randr->active_output = selected_display;
-selected_mode = xfce_randr_find_mode_by_id (xfce_randr, selected_display, 
XFCE_RANDR_MODE (xfce_randr));
-selected_x = XFCE_RANDR_POS_X (xfce_randr);
-selected_y = XFCE_RANDR_POS_Y (xfce_randr);
+selected_mode = xfce_randr_find_mode_by_id (xfce_randr, selected_display,
+
xfce_randr->mode[selected_display]);
+selected_x = xfce_randr->position[selected_display].x;
+selected_y = xfce_randr->position[selected_display].y;
 
 switch (value) {
 case XFCE_RANDR_PLACEMENT_LEFT: // Extend Left
 /* Move the selected display to the right of the currently active 
display. */
-XFCE_RANDR_POS_X (xfce_randr) = current_mode->width;
+xfce_randr->position[selected_display].x = current_mode->width;
 
 /* Move the currently active display to where the selected was */
-xfce_randr->active_output = current_display;
-XFCE_RANDR_POS_X (xfce_randr) = selected_x;
-XFCE_RANDR_POS_Y (xfce_randr) = selected_y;
+xfce_randr->position[active_output].x = selected_x;
+xfce_randr->position[active_output].y = selected_y;
 
 break;
 
 case XFCE_RANDR_PLACEMENT_RIGHT: // Extend Right
/* Move the selected display to where the currently 
active one is */
-XFCE_RANDR_POS_X (xfce_randr) = current_x;
-XFCE_RANDR_POS_Y (xfce_randr) = current_y;
+xfce_randr->position[selected_display].x = current_x;
+xfce_randr->position[selected_display].y = current_y;
 
 /* Move the currently active display to the right of the selected 
display. */
-xfce_randr->active_output = current_display;
-XFCE_RANDR_POS_X (xfce_randr) = selected_mode->width;
+xfce_randr->position[active_output].x = selected_mode->width;
 
 break;
 
 c

[Xfce4-commits] Added current setup detection to minimal dialog.

2012-10-28 Thread Nick Schermer
Updating branch refs/heads/master
 to 1d174393625714b25975ec9e9675f40500f60b24 (commit)
   from 4fa8b017408126006b653e758b8ca38b47f98b1a (commit)

commit 1d174393625714b25975ec9e9675f40500f60b24
Author: Sean Davis 
Date:   Tue Oct 16 05:56:49 2012 -0400

Added current setup detection to minimal dialog.

 dialogs/display-settings/confirmation-dialog.glade |1 +
 dialogs/display-settings/main.c|   31 +
 .../display-settings/minimal-display-dialog.glade  |   35 ++--
 3 files changed, 57 insertions(+), 10 deletions(-)

diff --git a/dialogs/display-settings/confirmation-dialog.glade 
b/dialogs/display-settings/confirmation-dialog.glade
index 7b91c7a..fe2bdca 100644
--- a/dialogs/display-settings/confirmation-dialog.glade
+++ b/dialogs/display-settings/confirmation-dialog.glade
@@ -7,6 +7,7 @@
 5
 Confirmation
 False
+True
 center
 dialog-question
 normal
diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c
index 51c5091..ac79f14 100644
--- a/dialogs/display-settings/main.c
+++ b/dialogs/display-settings/main.c
@@ -1952,6 +1952,7 @@ display_settings_show_minimal_dialog (GdkDisplay  
*display,
 GObject *mirror_displays;
 GObject *extend_right;
 GObject *advanced;
+GObject *fake_button;
 minimal_advanced_context context;
 
 context.builder = builder;
@@ -1971,6 +1972,36 @@ display_settings_show_minimal_dialog (GdkDisplay  
*display,
 extend_right = gtk_builder_get_object (builder, "extend_right");
 only_display2 = gtk_builder_get_object (builder, "display2");
 advanced = gtk_builder_get_object (builder, "advanced_button");
+fake_button = gtk_builder_get_object (builder, "fake_button");
+
+gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(fake_button), TRUE);
+
+//
+if ( display_settings_get_n_active_outputs() == 1 )
+{
+gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(only_display1),
+ xfce_randr->mode[0] != None);
+gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(only_display2),
+ xfce_randr->mode[1] != None);
+}
+else
+{
+/* Check for mirror */
+if ( (xfce_randr->position[0].x == xfce_randr->position[1].x ) && 
+ (xfce_randr->position[0].y == xfce_randr->position[1].y) ) {
+
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(mirror_displays),
+ TRUE);
+}
+
+/* Check for Extend Right */
+if ( (xfce_randr->position[0].y == xfce_randr->position[1].y) &&
+ (xfce_randr->position[0].x < xfce_randr->position[1].x) ) {
+gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(extend_right),
+ TRUE);
+}
+}
+
+//
 
 g_signal_connect (only_display1, "toggled", G_CALLBACK 
(display_settings_minimal_only_display1_toggled),
   builder);
diff --git a/dialogs/display-settings/minimal-display-dialog.glade 
b/dialogs/display-settings/minimal-display-dialog.glade
index abaf02a..888d855 100644
--- a/dialogs/display-settings/minimal-display-dialog.glade
+++ b/dialogs/display-settings/minimal-display-dialog.glade
@@ -89,7 +89,6 @@
 True
 False
 False
-True
 False
 
   
@@ -100,8 +99,8 @@
 
   
   
-
-
+
+
   
 
 
@@ -126,8 +125,8 @@
   
 1
 2
-
-
+
+
   
 
 
@@ -152,8 +151,8 @@
   
 2
 3
-
-
+
+
   
 
 
@@ -178,8 +177,8 @@
   
 3
 4
-
-
+
+
   
 
   
@@ -208,6 +207,22 @@
   
 
 
+  
+radiobutton
+True
+False
+False
+True
+True
+display1
+  
+  
+False
+False
+1
+  
+
+
   
 gtk-close
 True
@@ -219,7 +234,7 @@
   
 False
 False
-1
+2
   
  

[Xfce4-commits] Fix Bug #7797, patch by Eric Koegel (slightly adjusted)

2012-10-28 Thread Nick Schermer
Updating branch refs/heads/master
 to 947d77198e8dd63b467023f5a13cbabf322fa943 (commit)
   from a7f44eec2f3e41306189b635eeab9e691b3d2ebe (commit)

commit 947d77198e8dd63b467023f5a13cbabf322fa943
Author: Simon Steinbeiss 
Date:   Tue Oct 16 15:43:55 2012 +0200

Fix Bug #7797, patch by Eric Koegel (slightly adjusted)

 dialogs/display-settings/main.c |6 ++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c
index 625d2c0..b403e95 100644
--- a/dialogs/display-settings/main.c
+++ b/dialogs/display-settings/main.c
@@ -1452,6 +1452,7 @@ display_settings_treeview_populate (GtkBuilder *builder)
 gchar*name;
 GdkPixbuf*display_icon, *lucent_display_icon;
 GtkTreeSelection *selection;
+gboolean  selected = FALSE;
 
 /* Create a new list store */
 store = gtk_list_store_new (N_OUTPUT_COLUMNS,
@@ -1509,6 +1510,11 @@ display_settings_treeview_populate (GtkBuilder *builder)
 gtk_tree_selection_select_iter (selection, &iter);
 }
 
+/* If nothing was selected the active output is no longer valid,
+ * select the last display in the list. */
+if (!selected)
+gtk_tree_selection_select_iter (selection, &iter);
+
 /* Release the store */
 g_object_unref (G_OBJECT (store));
 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Fix previous commit

2012-10-28 Thread Nick Schermer
Updating branch refs/heads/master
 to b14b00b0d6997b16a89ca0a4ac64860bc71862b3 (commit)
   from 947d77198e8dd63b467023f5a13cbabf322fa943 (commit)

commit b14b00b0d6997b16a89ca0a4ac64860bc71862b3
Author: Simon Steinbeiss 
Date:   Tue Oct 16 16:18:14 2012 +0200

Fix previous commit

 dialogs/display-settings/main.c |3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c
index b403e95..57e27c8 100644
--- a/dialogs/display-settings/main.c
+++ b/dialogs/display-settings/main.c
@@ -1507,7 +1507,10 @@ display_settings_treeview_populate (GtkBuilder *builder)
 
 /* Select active output */
 if (m == active_output)
+{
 gtk_tree_selection_select_iter (selection, &iter);
+selected = TRUE;
+}
 }
 
 /* If nothing was selected the active output is no longer valid,
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Do not harcode 4 identify popups

2012-10-28 Thread Nick Schermer
Updating branch refs/heads/master
 to a7f44eec2f3e41306189b635eeab9e691b3d2ebe (commit)
   from 1d174393625714b25975ec9e9675f40500f60b24 (commit)

commit a7f44eec2f3e41306189b635eeab9e691b3d2ebe
Author: Lionel Le Folgoc 
Date:   Tue Oct 16 12:00:14 2012 +0200

Do not harcode 4 identify popups

Signed-off-by: Simon Steinbeiss 

 dialogs/display-settings/main.c |  155 +--
 1 files changed, 67 insertions(+), 88 deletions(-)

diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c
index ac79f14..625d2c0 100644
--- a/dialogs/display-settings/main.c
+++ b/dialogs/display-settings/main.c
@@ -68,13 +68,6 @@ typedef struct {
 GError *error;
 } minimal_advanced_context;
 
-typedef struct {
-GtkWidget *display1;
-GtkWidget *display2;
-GtkWidget *display3;
-GtkWidget *display4;
-} identity_popup_store;
-
 
 
 /* Xrandr relation name conversion */
@@ -142,7 +135,9 @@ static guint active_output;
 /* Pointer to the used randr structure */
 XfceRandr *xfce_randr = NULL;
 
-identity_popup_store display_popups;
+/* Used to identify the display */
+static GHashTable *display_popups;
+
 gboolean supports_alpha = FALSE;
 
 static void
@@ -196,21 +191,25 @@ display_setting_combo_box_get_value (GtkComboBox 
*combobox,
 }
 
 static void
-display_setting_hide_identity_popups(void)
+display_setting_toggle_identity_popup (gpointer   key,
+   GtkWidget *value,
+   gpointer   show)
 {
-if (GTK_IS_WIDGET(display_popups.display1)) 
gtk_widget_hide(display_popups.display1);
-if (GTK_IS_WIDGET(display_popups.display2)) 
gtk_widget_hide(display_popups.display2);
-if (GTK_IS_WIDGET(display_popups.display3)) 
gtk_widget_hide(display_popups.display3);
-if (GTK_IS_WIDGET(display_popups.display4)) 
gtk_widget_hide(display_popups.display4);
+if (!GPOINTER_TO_INT (show))
+gtk_widget_hide (value);
+else
+gtk_widget_show (value);
 }
 
-static void
-display_setting_show_identity_popups(void)
+static gboolean
+display_setting_toggle_identity_popups (GtkWidget *widget,
+GdkEvent  *event,
+gpointer   show)
 {
-if (GTK_IS_WIDGET(display_popups.display1)) 
gtk_widget_show(display_popups.display1);
-if (GTK_IS_WIDGET(display_popups.display2)) 
gtk_widget_show(display_popups.display2);
-if (GTK_IS_WIDGET(display_popups.display3)) 
gtk_widget_show(display_popups.display3);
-if (GTK_IS_WIDGET(display_popups.display4)) 
gtk_widget_show(display_popups.display4);
+g_hash_table_foreach (display_popups,
+  (GHFunc) display_setting_toggle_identity_popup,
+  show);
+return FALSE;
 }
 
 static gboolean
@@ -275,11 +274,11 @@ display_setting_timed_confirmation (GtkBuilder 
*main_builder)
 
 dialog = gtk_builder_get_object (builder, "dialog1");
 
-g_signal_connect (G_OBJECT (dialog), "focus-out-event", G_CALLBACK 
(display_setting_hide_identity_popups),
-  NULL);
+g_signal_connect (G_OBJECT (dialog), "focus-out-event", G_CALLBACK 
(display_setting_toggle_identity_popups),
+  GINT_TO_POINTER (FALSE));
   
-g_signal_connect (G_OBJECT (dialog), "focus-in-event", G_CALLBACK 
(display_setting_show_identity_popups),
-  NULL);
+g_signal_connect (G_OBJECT (dialog), "focus-in-event", G_CALLBACK 
(display_setting_toggle_identity_popups),
+  GINT_TO_POINTER (TRUE));
 
 gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW 
(main_dialog));
 source_id = g_timeout_add_seconds (1, (GSourceFunc) 
display_settings_update_time_label,
@@ -1006,11 +1005,13 @@ display_setting_screen_changed(GtkWidget *widget, 
GdkScreen *old_screen, gpointe
 }
 
 static gboolean
-display_setting_identity_popup_expose(GtkWidget *popup, GdkEventExpose *event, 
gpointer has_selection)
+display_setting_identity_popup_expose (GtkWidget  *popup,
+   GdkEventExpose *event,
+   GtkBuilder *builder)
 {
 cairo_t *cr = gdk_cairo_create(popup->window);
 gint radius;
-gboolean selected = GPOINTER_TO_INT(has_selection);
+gboolean selected = (g_hash_table_lookup (display_popups, GINT_TO_POINTER 
(active_output)) == popup);
 cairo_pattern_t *vertical_gradient, *innerstroke_gradient, 
*selected_gradient, *selected_innerstroke_gradient;
 
 radius = 10;
@@ -1113,16 +1114,16 @@ display_setting_identity_popup_expose(GtkWidget *popup, 
GdkEventExpose *event, g
 return FALSE;
 }
 
-static GtkWidget*
-display_setting_identity_display (gint display_id,
-   GError *error, gboolean has_selection)
+
+static GtkWidget *
+display_setting_identity_display (gi

[Xfce4-commits] Do not save to Xfconf each time the treeview is refreshed

2012-10-28 Thread Nick Schermer
Updating branch refs/heads/master
 to 46cfd99b570344910f36f96c1d331f78522d5b8b (commit)
   from b14b00b0d6997b16a89ca0a4ac64860bc71862b3 (commit)

commit 46cfd99b570344910f36f96c1d331f78522d5b8b
Author: Lionel Le Folgoc 
Date:   Wed Oct 17 15:42:42 2012 +0200

Do not save to Xfconf each time the treeview is refreshed

Signed-off-by: Simon Steinbeiss 

 dialogs/display-settings/main.c |4 
 1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c
index 57e27c8..107b4d9 100644
--- a/dialogs/display-settings/main.c
+++ b/dialogs/display-settings/main.c
@@ -1474,10 +1474,6 @@ display_settings_treeview_populate (GtkBuilder *builder)
 
 lucent_display_icon = NULL;
 
-/* Save the current status of all outputs, if the user doesn't change
- * anything after, it means she's happy with that. */
-xfce_randr_save_all (xfce_randr, "Default", display_channel);
-
 /* Walk all the connected outputs */
 for (m = 0; m < xfce_randr->noutput; ++m)
 {
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Fix popup positionint with Left/Right rotations

2012-10-28 Thread Nick Schermer
Updating branch refs/heads/master
 to 9c3e74c50a0c83672abb0cfd99cc957ff25fe886 (commit)
   from 9516474faf7d1f69cbc82236bf47bfdb84a5af72 (commit)

commit 9c3e74c50a0c83672abb0cfd99cc957ff25fe886
Author: Lionel Le Folgoc 
Date:   Wed Oct 17 20:38:53 2012 +0200

Fix popup positionint with Left/Right rotations

Signed-off-by: Simon Steinbeiss 

 dialogs/display-settings/main.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c
index 89559dd..6c1656e 100644
--- a/dialogs/display-settings/main.c
+++ b/dialogs/display-settings/main.c
@@ -1039,8 +1039,8 @@ display_setting_identity_display (gint display_id)
 screen_pos_x = 0;
 screen_pos_y = 0;
 }
-screen_width = current_mode->width;
-screen_height = current_mode->height;
+screen_width = xfce_randr_mode_width (current_mode, 
xfce_randr->rotation[display_id]);
+screen_height = xfce_randr_mode_height (current_mode, 
xfce_randr->rotation[display_id]);
 }
 else
 {
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Don't recalculate positions each time an id popup is created

2012-10-28 Thread Nick Schermer
Updating branch refs/heads/master
 to 8190158f9f841d1caf515aa9169b87dd4438df92 (commit)
   from 9c3e74c50a0c83672abb0cfd99cc957ff25fe886 (commit)

commit 8190158f9f841d1caf515aa9169b87dd4438df92
Author: Lionel Le Folgoc 
Date:   Wed Oct 17 20:57:44 2012 +0200

Don't recalculate positions each time an id popup is created

Signed-off-by: Simon Steinbeiss 

 dialogs/display-settings/xfce-randr.c |2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/dialogs/display-settings/xfce-randr.c 
b/dialogs/display-settings/xfce-randr.c
index d2cd710..b9baaff 100644
--- a/dialogs/display-settings/xfce-randr.c
+++ b/dialogs/display-settings/xfce-randr.c
@@ -790,8 +790,6 @@ xfce_randr_get_positions (XfceRandr *randr,
 g_return_val_if_fail (randr != NULL && x != NULL && y != NULL, FALSE);
 g_return_val_if_fail (output < randr->noutput, FALSE);
 
-xfce_randr_update_positions (randr, output);
-
 *x = randr->priv->position[output].x;
 *y = randr->priv->position[output].y;
 return TRUE;
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Try to harmonize codestyle

2012-10-28 Thread Nick Schermer
Updating branch refs/heads/master
 to 9e91c98ba03a5ab129855aa2e8c1375b72217494 (commit)
   from 8190158f9f841d1caf515aa9169b87dd4438df92 (commit)

commit 9e91c98ba03a5ab129855aa2e8c1375b72217494
Author: Lionel Le Folgoc 
Date:   Wed Oct 17 22:06:42 2012 +0200

Try to harmonize codestyle

Signed-off-by: Simon Steinbeiss 

 dialogs/display-settings/main.c |  591 +++
 1 files changed, 284 insertions(+), 307 deletions(-)

diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c
index 6c1656e..94a7f9e 100644
--- a/dialogs/display-settings/main.c
+++ b/dialogs/display-settings/main.c
@@ -163,21 +163,19 @@ static GHashTable *display_popups;
 
 gboolean supports_alpha = FALSE;
 
-static void
-display_settings_minimal_only_display1_toggled (GtkToggleButton *button,
-  GtkBuilder *builder);
-  
-static void
-display_settings_minimal_mirror_displays_toggled (GtkToggleButton *button,
-  GtkBuilder *builder);
-  
-static void
-display_settings_minimal_extend_right_toggled (GtkToggleButton *button,
-  GtkBuilder *builder);
-  
-static void
-display_settings_minimal_only_display2_toggled (GtkToggleButton *button,
-  GtkBuilder *builder);
+
+
+static void display_settings_minimal_only_display1_toggled   (GtkToggleButton 
*button,
+  GtkBuilder  
*builder);
+
+static void display_settings_minimal_mirror_displays_toggled (GtkToggleButton 
*button,
+  GtkBuilder  
*builder);
+
+static void display_settings_minimal_extend_right_toggled(GtkToggleButton 
*button,
+  GtkBuilder  
*builder);
+
+static void display_settings_minimal_only_display2_toggled   (GtkToggleButton 
*button,
+  GtkBuilder  
*builder);
 
 
 static guint
@@ -296,13 +294,13 @@ display_setting_timed_confirmation (GtkBuilder 
*main_builder)
 confirmation_dialog->count = 10;
 
 dialog = gtk_builder_get_object (builder, "dialog1");
-
+
 g_signal_connect (G_OBJECT (dialog), "focus-out-event", G_CALLBACK 
(display_setting_toggle_identity_popups),
-  GINT_TO_POINTER (FALSE));
-  
+  GINT_TO_POINTER (FALSE));
+
 g_signal_connect (G_OBJECT (dialog), "focus-in-event", G_CALLBACK 
(display_setting_toggle_identity_popups),
-  GINT_TO_POINTER (TRUE));
-
+  GINT_TO_POINTER (TRUE));
+
 gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW 
(main_dialog));
 source_id = g_timeout_add_seconds (1, (GSourceFunc) 
display_settings_update_time_label,
confirmation_dialog);
@@ -395,21 +393,17 @@ display_setting_positions_populate (GtkBuilder *builder)
 combobox = gtk_builder_get_object (builder, "randr-position");
 model = gtk_combo_box_get_model (GTK_COMBO_BOX (combobox));
 gtk_list_store_clear (GTK_LIST_STORE (model));
-
+
 /* Only make the combobox interactive if there is more than one output */
-if (display_settings_get_n_active_outputs () > 1)
-{
-gtk_widget_set_sensitive (GTK_WIDGET (combobox), TRUE);
-}
-else
-gtk_widget_set_sensitive (GTK_WIDGET (combobox), FALSE);
-
+gtk_widget_set_sensitive (GTK_WIDGET (combobox),
+  display_settings_get_n_active_outputs () > 1);
+
 /* Disconnect the "changed" signal to avoid triggering the confirmation
  * dialog */
 g_object_disconnect (combobox, "any_signal::changed",
  display_setting_positions_changed,
  builder, NULL);
-
+
 /* Try to insert the relations */
 for (n = 0; n < G_N_ELEMENTS (relation_names); n++)
 {
@@ -422,24 +416,24 @@ display_setting_positions_populate (GtkBuilder *builder)
 if (relation_names[n].relation == xfce_randr->relation[active_output])
 gtk_combo_box_set_active_iter (GTK_COMBO_BOX (combobox), &iter);
 }
-
+
 /* Reconnect the signal */
 g_signal_connect (G_OBJECT (combobox), "changed", G_CALLBACK 
(display_setting_positions_changed), builder);
 }
 
 static void
 display_setting_active_displays_changed (GtkComboBox *combobox,
- GtkBuilder  *builder)
+ GtkBuilder  *builder)
 {
-gint value;
 GObject *position_combobox;
+gint value;
 
 if (!display_setting_combo_box_g

[Xfce4-commits] Fix inaccurate detection of active outputs

2012-10-28 Thread Nick Schermer
Updating branch refs/heads/master
 to 400d9bfb60f30e4856d4ffcc75b5f49bece8189f (commit)
   from 9e91c98ba03a5ab129855aa2e8c1375b72217494 (commit)

commit 400d9bfb60f30e4856d4ffcc75b5f49bece8189f
Author: Lionel Le Folgoc 
Date:   Wed Oct 17 22:12:45 2012 +0200

Fix inaccurate detection of active outputs

Signed-off-by: Simon Steinbeiss 

 dialogs/display-settings/main.c |9 ++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c
index 94a7f9e..bbfe3dd 100644
--- a/dialogs/display-settings/main.c
+++ b/dialogs/display-settings/main.c
@@ -1020,7 +1020,7 @@ display_setting_identity_display (gint display_id)
 display_name = gtk_builder_get_object (builder, "display_name");
 display_details = gtk_builder_get_object (builder, "display_details");
 
-if (display_settings_get_n_active_outputs() != 1)
+if (display_settings_get_n_active_outputs() > 1)
 {
 current_mode = xfce_randr_find_mode_by_id (xfce_randr, display_id,

xfce_randr->mode[display_id]);
@@ -1110,8 +1110,11 @@ display_setting_mirror_displays_toggled (GtkToggleButton 
*togglebutton,
 /* Activate mirror-mode */
 
 /* Apply mirror settings to each monitor */
-for (n = 0; n < display_settings_get_n_active_outputs (); n++)
+for (n = 0; n < xfce_randr->noutput; n++)
 {
+if (xfce_randr->mode[n] == None)
+continue;
+
 xfce_randr->relation[n] = XFCE_RANDR_PLACEMENT_MIRROR;
 xfce_randr->related_to[n] = active_output;
 
@@ -1792,7 +1795,7 @@ display_settings_show_minimal_dialog (GdkDisplay  
*display,
 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (fake_button), TRUE);
 
 //
-if ( display_settings_get_n_active_outputs () == 1 )
+if (xfce_randr->noutput > 1)
 {
 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (only_display1),
  xfce_randr->mode[0] != None);
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Fix detection of mirror mode and checkbox sensitivity

2012-10-28 Thread Nick Schermer
Updating branch refs/heads/master
 to 69899f4e2af6b3f7f6d7e84530b81dac1eb154f6 (commit)
   from 25abd5f2a6e4105082ffc4aee21ada2d1637a696 (commit)

commit 69899f4e2af6b3f7f6d7e84530b81dac1eb154f6
Author: Lionel Le Folgoc 
Date:   Wed Oct 17 23:02:14 2012 +0200

Fix detection of mirror mode and checkbox sensitivity

Signed-off-by: Simon Steinbeiss 

 dialogs/display-settings/main.c |   37 -
 1 files changed, 24 insertions(+), 13 deletions(-)

diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c
index 033c0a4..0ee24b9 100644
--- a/dialogs/display-settings/main.c
+++ b/dialogs/display-settings/main.c
@@ -1154,38 +1154,49 @@ static void
 display_setting_mirror_displays_populate (GtkBuilder *builder)
 {
 GObject *check;
+RRMode   mode = None;
+guintn;
+gint cloned = TRUE;
 
 if (!xfce_randr)
 return;
 
-if (xfce_randr->noutput <= 1)
-return;
-
 check = gtk_builder_get_object (builder, "mirror-displays");
 
-/* Only make the check interactive if there is more than one output */
-if (display_settings_get_n_active_outputs () > 1)
+/* Can outputs be cloned? */
+if (xfce_randr->noutput > 1)
+mode = xfce_randr_clonable_mode (xfce_randr);
+
+gtk_widget_set_sensitive (GTK_WIDGET (check), mode != None);
+if (mode == None)
 {
-gtk_widget_set_sensitive (GTK_WIDGET (check), TRUE);
+gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check), FALSE);
 return;
 }
-else
-gtk_widget_set_sensitive (GTK_WIDGET (check), FALSE);
 
 /* Disconnect the "toggled" signal to avoid writing the config again */
 g_object_disconnect (check, "any_signal::toggled",
  display_setting_mirror_displays_toggled,
  builder, NULL);
-gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check),
-  xfce_randr->mode[active_output] != None);
 
+/* Check if mirror settings are on */
+for (n = 0; n < xfce_randr->noutput; n++)
+{
+if (xfce_randr->mode[n] == None)
+continue;
+
+cloned &= (xfce_randr->mode[n] == mode &&
+   xfce_randr->relation[n] == XFCE_RANDR_PLACEMENT_MIRROR);
+
+if (!cloned)
+break;
+}
+
+gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check), cloned);
 
 /* Reconnect the signal */
 g_signal_connect (G_OBJECT (check), "toggled", G_CALLBACK 
(display_setting_mirror_displays_toggled),
   builder);
-
-/* Write the correct RandR value to xfconf */
-
 }
 
 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Improve "Mirror displays" mode

2012-10-28 Thread Nick Schermer
Updating branch refs/heads/master
 to 25abd5f2a6e4105082ffc4aee21ada2d1637a696 (commit)
   from 400d9bfb60f30e4856d4ffcc75b5f49bece8189f (commit)

commit 25abd5f2a6e4105082ffc4aee21ada2d1637a696
Author: Lionel Le Folgoc 
Date:   Wed Oct 17 22:39:12 2012 +0200

Improve "Mirror displays" mode

When the checkbox is enabled, all active outputs use the same mode and
position. They revert back to their preferred mode when unchecked.

Signed-off-by: Simon Steinbeiss 

 dialogs/display-settings/main.c   |   19 ++--
 dialogs/display-settings/xfce-randr.c |   86 +++-
 dialogs/display-settings/xfce-randr.h |5 +-
 3 files changed, 57 insertions(+), 53 deletions(-)

diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c
index bbfe3dd..033c0a4 100644
--- a/dialogs/display-settings/main.c
+++ b/dialogs/display-settings/main.c
@@ -1095,6 +1095,7 @@ display_setting_mirror_displays_toggled (GtkToggleButton 
*togglebutton,
 {
 GObject *positions, *active_displays;
 guintn;
+RRMode   mode;
 
 if (!xfce_randr)
 return;
@@ -1107,14 +1108,16 @@ display_setting_mirror_displays_toggled 
(GtkToggleButton *togglebutton,
 
 if (gtk_toggle_button_get_active (togglebutton))
 {
-/* Activate mirror-mode */
-
-/* Apply mirror settings to each monitor */
+/* Activate mirror-mode with a single mode for all of them */
+mode = xfce_randr_clonable_mode (xfce_randr);
+/* Apply mirror settings to each output */
 for (n = 0; n < xfce_randr->noutput; n++)
 {
 if (xfce_randr->mode[n] == None)
 continue;
 
+if (mode != None)
+xfce_randr->mode[n] = mode;
 xfce_randr->relation[n] = XFCE_RANDR_PLACEMENT_MIRROR;
 xfce_randr->related_to[n] = active_output;
 
@@ -1130,7 +1133,15 @@ display_setting_mirror_displays_toggled (GtkToggleButton 
*togglebutton,
 }
 else
 {
-/* Deactivate mirror-mode */
+/* Deactivate mirror-mode, use the preferred mode of each output */
+for (n = 0; n < xfce_randr->noutput; n++)
+{
+xfce_randr->mode[n] = xfce_randr_preferred_mode (xfce_randr, n);
+xfce_randr_save_output (xfce_randr, "Default", display_channel,
+n, TRUE);
+}
+
+xfce_randr_apply (xfce_randr, "Default", display_channel);
 
 /* Re-enable the position comboboxes */
 gtk_widget_set_sensitive (GTK_WIDGET (positions), TRUE);
diff --git a/dialogs/display-settings/xfce-randr.c 
b/dialogs/display-settings/xfce-randr.c
index b9baaff..c114824 100644
--- a/dialogs/display-settings/xfce-randr.c
+++ b/dialogs/display-settings/xfce-randr.c
@@ -69,48 +69,6 @@ static gchar *xfce_randr_friendly_name (XfceRandr *randr,
 
 
 
-static void
-xfce_randr_list_clone_modes (XfceRandr *randr)
-{
-GArray *clone_modes;
-gintl, n, candidate, found;
-guint   m;
-
-clone_modes = g_array_new (TRUE, FALSE, sizeof (RRMode));
-
-/* walk all available modes */
-for (n = 0; n < randr->priv->resources->nmode; ++n)
-{
-candidate = TRUE;
-/* walk all connected outputs */
-for (m = 0; m < randr->noutput; ++m)
-{
-found = FALSE;
-/* walk supported modes from this output */
-for (l = 0; l < randr->priv->output_info[m]->nmode; ++l)
-{
-if (randr->priv->resources->modes[n].id == 
randr->priv->output_info[m]->modes[l])
-{
-found = TRUE;
-break;
-}
-}
-
-/* if it is not present in one output, forget it */
-candidate &= found;
-}
-
-/* common to all outputs, can be used for clone mode */
-if (candidate)
-clone_modes = g_array_append_val (clone_modes, 
randr->priv->resources->modes[n].id);
-}
-
-/* return a "normal" array (last value -> None) */
-randr->clone_modes = (RRMode *) g_array_free (clone_modes, FALSE);
-}
-
-
-
 static Rotation
 xfce_randr_get_safe_rotations (XfceRandr *randr,
Display   *xdisplay,
@@ -365,9 +323,6 @@ xfce_randr_populate (XfceRandr *randr,
 randr->friendly_name[m] = xfce_randr_friendly_name (randr, m);
 }
 
-/* clone modes: same RRModes present for all outputs */
-xfce_randr_list_clone_modes (randr);
-
 /* calculate relations from positions */
 xfce_randr_guess_relations (randr);
 }
@@ -448,7 +403,6 @@ xfce_randr_cleanup (XfceRandr *randr)
 
 /* free the settings */
 g_free (randr->friendly_name);
-g_free (randr->clone_modes);
 g_free (randr->mode);
 g_free (randr->priv->modes);
 g_free (randr->rotation);
@@ -767,6 +721,46 @@ xfce_randr_preferred_mode (XfceRandr *randr,
 
 
 
+RRMode
+xfce_randr_clonable_mode (XfceRandr *randr)

[Xfce4-commits] Really fix items' sensitivity, for real this time

2012-10-28 Thread Nick Schermer
Updating branch refs/heads/master
 to 28cf05504c8f800ff56b208fc9b8cead7a423726 (commit)
   from 69899f4e2af6b3f7f6d7e84530b81dac1eb154f6 (commit)

commit 28cf05504c8f800ff56b208fc9b8cead7a423726
Author: Lionel Le Folgoc 
Date:   Wed Oct 17 23:27:43 2012 +0200

Really fix items' sensitivity, for real this time

Signed-off-by: Simon Steinbeiss 

 dialogs/display-settings/main.c |   53 +-
 1 files changed, 29 insertions(+), 24 deletions(-)

diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c
index 0ee24b9..eb66c75 100644
--- a/dialogs/display-settings/main.c
+++ b/dialogs/display-settings/main.c
@@ -385,7 +385,7 @@ static void
 display_setting_positions_populate (GtkBuilder *builder)
 {
 GtkTreeModel *model;
-GObject  *combobox;
+GObject  *combobox, *mirror_displays;
 GtkTreeIter   iter;
 guint n;
 
@@ -394,9 +394,15 @@ display_setting_positions_populate (GtkBuilder *builder)
 model = gtk_combo_box_get_model (GTK_COMBO_BOX (combobox));
 gtk_list_store_clear (GTK_LIST_STORE (model));
 
-/* Only make the combobox interactive if there is more than one output */
-gtk_widget_set_sensitive (GTK_WIDGET (combobox),
-  display_settings_get_n_active_outputs () > 1);
+/* Only make the combobox interactive if there is more than one output,
+   and if they are not in mirror mode */
+mirror_displays = gtk_builder_get_object (builder, "mirror-displays");
+if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (mirror_displays)) ||
+display_settings_get_n_active_outputs () <= 1)
+{
+gtk_widget_set_sensitive (GTK_WIDGET (combobox), FALSE);
+return;
+}
 
 /* Disconnect the "changed" signal to avoid triggering the confirmation
  * dialog */
@@ -440,18 +446,24 @@ static void
 display_setting_active_displays_populate (GtkBuilder *builder)
 {
 GtkTreeModel *model;
-GObject  *combobox;
+GObject  *combobox, *mirror_displays;
 guint n;
 GtkTreeIter   iter;
 
 /* Get the active-displays combo box store and clear it */
 combobox = gtk_builder_get_object (builder, "randr-active-displays");
 model = gtk_combo_box_get_model (GTK_COMBO_BOX (combobox));
-gtk_list_store_clear (GTK_LIST_STORE (model));
+ gtk_list_store_clear (GTK_LIST_STORE (model));
 
-/* Only make the combobox interactive if there is more than one output */
-gtk_widget_set_sensitive (GTK_WIDGET (combobox),
-  display_settings_get_n_active_outputs () > 1);
+/* Only make the combobox interactive if there is more than one output,
+   and if they are not in mirror mode */
+mirror_displays = gtk_builder_get_object (builder, "mirror-displays");
+if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (mirror_displays)) ||
+display_settings_get_n_active_outputs () <= 1)
+{
+gtk_widget_set_sensitive (GTK_WIDGET (combobox), FALSE);
+return;
+}
 
 /* Disconnect the "changed" signal to avoid triggering the confirmation
  * dialog */
@@ -1100,12 +1112,16 @@ display_setting_mirror_displays_toggled 
(GtkToggleButton *togglebutton,
 if (!xfce_randr)
 return;
 
-if (xfce_randr->noutput <= 1)
-return;
-
 positions = gtk_builder_get_object (builder, "randr-position");
 active_displays = gtk_builder_get_object (builder, 
"randr-active-displays");
 
+if (display_settings_get_n_active_outputs () <= 1)
+{
+gtk_widget_set_sensitive (GTK_WIDGET (positions), FALSE);
+gtk_widget_set_sensitive (GTK_WIDGET (active_displays), FALSE);
+return;
+}
+
 if (gtk_toggle_button_get_active (togglebutton))
 {
 /* Activate mirror-mode with a single mode for all of them */
@@ -1164,7 +1180,7 @@ display_setting_mirror_displays_populate (GtkBuilder 
*builder)
 check = gtk_builder_get_object (builder, "mirror-displays");
 
 /* Can outputs be cloned? */
-if (xfce_randr->noutput > 1)
+if (display_settings_get_n_active_outputs () > 1)
 mode = xfce_randr_clonable_mode (xfce_randr);
 
 gtk_widget_set_sensitive (GTK_WIDGET (check), mode != None);
@@ -1276,7 +1292,6 @@ display_settings_treeview_selection_changed 
(GtkTreeSelection *selection,
 {
 GtkTreeModel *model;
 GtkTreeIter   iter;
-GObject  *mirror_displays, *position_combo, *display_combo;
 GtkWidget*popup;
 gboolean  has_selection;
 gint  active_id, previous_id;
@@ -1302,16 +1317,6 @@ display_settings_treeview_selection_changed 
(GtkTreeSelection *selection,
 display_setting_rotations_populate (builder);
 display_setting_reflections_populate (builder);
 
-mirror_displays = gtk_builder_get_object (builder, "mirror-displays");
-if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (mirror_displays)))
-{
-pos

[Xfce4-commits] Fix visibility of elements depending on the number of outputs

2012-10-28 Thread Nick Schermer
Updating branch refs/heads/master
 to e8be92f29a55eb71168a1c26d94e4a32614a (commit)
   from 28cf05504c8f800ff56b208fc9b8cead7a423726 (commit)

commit e8be92f29a55eb71168a1c26d94e4a32614a
Author: Lionel Le Folgoc 
Date:   Wed Oct 17 23:50:42 2012 +0200

Fix visibility of elements depending on the number of outputs

And connect signals even when only 1 output is present, since hot-plug is
supported (Bug #8327).

Signed-off-by: Simon Steinbeiss 

 dialogs/display-settings/display-dialog.glade |2 +-
 dialogs/display-settings/main.c   |   46 +---
 2 files changed, 41 insertions(+), 7 deletions(-)

diff --git a/dialogs/display-settings/display-dialog.glade 
b/dialogs/display-settings/display-dialog.glade
index 8bce601..c7357a3 100644
--- a/dialogs/display-settings/display-dialog.glade
+++ b/dialogs/display-settings/display-dialog.glade
@@ -210,7 +210,7 @@
   
 
 
-  
+  
 True
 False
 0
diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c
index eb66c75..c7e5332 100644
--- a/dialogs/display-settings/main.c
+++ b/dialogs/display-settings/main.c
@@ -385,7 +385,7 @@ static void
 display_setting_positions_populate (GtkBuilder *builder)
 {
 GtkTreeModel *model;
-GObject  *combobox, *mirror_displays;
+GObject  *combobox, *label, *mirror_displays;
 GtkTreeIter   iter;
 guint n;
 
@@ -394,6 +394,19 @@ display_setting_positions_populate (GtkBuilder *builder)
 model = gtk_combo_box_get_model (GTK_COMBO_BOX (combobox));
 gtk_list_store_clear (GTK_LIST_STORE (model));
 
+label = gtk_builder_get_object (builder, "label-position");
+if (xfce_randr->noutput > 1)
+{
+gtk_widget_show (GTK_WIDGET (label));
+gtk_widget_show (GTK_WIDGET (combobox));
+}
+else
+{
+gtk_widget_hide (GTK_WIDGET (label));
+gtk_widget_hide (GTK_WIDGET (combobox));
+return;
+}
+
 /* Only make the combobox interactive if there is more than one output,
and if they are not in mirror mode */
 mirror_displays = gtk_builder_get_object (builder, "mirror-displays");
@@ -455,6 +468,14 @@ display_setting_active_displays_populate (GtkBuilder 
*builder)
 model = gtk_combo_box_get_model (GTK_COMBO_BOX (combobox));
  gtk_list_store_clear (GTK_LIST_STORE (model));
 
+if (xfce_randr->noutput > 1)
+gtk_widget_show (GTK_WIDGET (combobox));
+else
+{
+gtk_widget_hide (GTK_WIDGET (combobox));
+return;
+}
+
 /* Only make the combobox interactive if there is more than one output,
and if they are not in mirror mode */
 mirror_displays = gtk_builder_get_object (builder, "mirror-displays");
@@ -1179,6 +1200,14 @@ display_setting_mirror_displays_populate (GtkBuilder 
*builder)
 
 check = gtk_builder_get_object (builder, "mirror-displays");
 
+if (xfce_randr->noutput > 1)
+gtk_widget_show (GTK_WIDGET (check));
+else
+{
+gtk_widget_hide (GTK_WIDGET (check));
+return;
+}
+
 /* Can outputs be cloned? */
 if (display_settings_get_n_active_outputs () > 1)
 mode = xfce_randr_clonable_mode (xfce_randr);
@@ -1268,11 +1297,16 @@ display_setting_output_status_populate (GtkBuilder 
*builder)
 if (!xfce_randr)
 return;
 
-if (xfce_randr->noutput <= 1)
-return;
-
 check = gtk_builder_get_object (builder, "output-on");
 
+if (xfce_randr->noutput > 1)
+gtk_widget_show (GTK_WIDGET (check));
+else
+{
+gtk_widget_hide (GTK_WIDGET (check));
+return;
+}
+
 /* Disconnect the "toggled" signal to avoid writing the config again */
 g_object_disconnect (check, "any_signal::toggled",
  display_setting_output_toggled,
@@ -1471,12 +1505,12 @@ display_settings_dialog_new (GtkBuilder *builder)
 /* Setup the combo boxes */
 check = gtk_builder_get_object (builder, "output-on");
 mirror = gtk_builder_get_object (builder, "mirror-displays");
+g_signal_connect (G_OBJECT (check), "toggled", G_CALLBACK 
(display_setting_output_toggled), builder);
+g_signal_connect (G_OBJECT (mirror), "toggled", G_CALLBACK 
(display_setting_mirror_displays_toggled), builder);
 if (xfce_randr->noutput > 1)
 {
 gtk_widget_show (GTK_WIDGET (check));
-g_signal_connect (G_OBJECT (check), "toggled", G_CALLBACK 
(display_setting_output_toggled), builder);
 gtk_widget_show (GTK_WIDGET (mirror));
-g_signal_connect (G_OBJECT (mirror), "toggled", G_CALLBACK 
(display_setting_mirror_displays_toggled), builder);
 }
 else
 {
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Recompute dimensions even if the mode hasn't changed

2012-10-28 Thread Nick Schermer
Updating branch refs/heads/master
 to 0de6f94cf852014bfde94eac903bf9f43995 (commit)
   from e8be92f29a55eb71168a1c26d94e4a32614a (commit)

commit 0de6f94cf852014bfde94eac903bf9f43995
Author: Lionel Le Folgoc 
Date:   Thu Oct 18 13:06:39 2012 +0200

Recompute dimensions even if the mode hasn't changed

(because the rotation may have changed)

Signed-off-by: Simon Steinbeiss 

 xfsettingsd/displays.c |   22 +++---
 1 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/xfsettingsd/displays.c b/xfsettingsd/displays.c
index 8948637..b21b2bc 100644
--- a/xfsettingsd/displays.c
+++ b/xfsettingsd/displays.c
@@ -676,18 +676,18 @@ xfce_displays_helper_channel_apply (XfceDisplaysHelper 
*helper,
 /* update CRTC mode */
 crtc->mode = valid_mode;
 crtc->changed = TRUE;
+}
 
-/* recompute dimensions according to the selected rotation */
-if ((crtc->rotation & (RR_Rotate_90|RR_Rotate_270)) != 0)
-{
-crtc->width = resources->modes[l].height;
-crtc->height = resources->modes[l].width;
-}
-else
-{
-crtc->width = resources->modes[l].width;
-crtc->height = resources->modes[l].height;
-}
+/* recompute dimensions according to the selected rotation */
+if ((crtc->rotation & (RR_Rotate_90|RR_Rotate_270)) != 0)
+{
+crtc->width = resources->modes[l].height;
+crtc->height = resources->modes[l].width;
+}
+else
+{
+crtc->width = resources->modes[l].width;
+crtc->height = resources->modes[l].height;
 }
 
 /* position, x */
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Fix buggy computation of the screen size

2012-10-28 Thread Nick Schermer
Updating branch refs/heads/master
 to 6b51b394691ddcde8bdad2c49dcc5cfe53d844b2 (commit)
   from 0de6f94cf852014bfde94eac903bf9f43995 (commit)

commit 6b51b394691ddcde8bdad2c49dcc5cfe53d844b2
Author: Lionel Le Folgoc 
Date:   Thu Oct 18 14:25:14 2012 +0200

Fix buggy computation of the screen size

It's meaningless with multiple outputs, so change the code to match what's 
done
in other apps (GnomeRR, chromeos).

Signed-off-by: Simon Steinbeiss 

 xfsettingsd/displays.c |   23 ---
 1 files changed, 8 insertions(+), 15 deletions(-)

diff --git a/xfsettingsd/displays.c b/xfsettingsd/displays.c
index b21b2bc..2517057 100644
--- a/xfsettingsd/displays.c
+++ b/xfsettingsd/displays.c
@@ -169,26 +169,19 @@ xfce_displays_helper_process_screen_size (gint  
mode_width,
   gint *mm_width,
   gint *mm_height)
 {
-gdouble dpi = 0;
-
 g_assert (width && height && mm_width && mm_height);
 
 *width = MAX (*width, crtc_pos_x + mode_width);
 *height = MAX (*height, crtc_pos_y + mode_height);
 
-dpi = 25.4 * gdk_screen_height ();
-dpi /= gdk_screen_height_mm ();
-
-if (dpi <= 0)
-{
-*mm_width = gdk_screen_width_mm ();
-*mm_height = gdk_screen_height_mm ();
-}
-else
-{
-*mm_width = 25.4 * (*width) / dpi;
-*mm_height = 25.4 * (*height) / dpi;
-}
+/* The 'physical size' of an X screen is meaningless if that screen
+ * can consist of many monitors. So just pick a size that make the
+ * dpi 96.
+ *
+ * Firefox and Evince apparently believe what X tells them.
+ */
+*mm_width = (*width / 96.0) * 25.4 + 0.5;
+*mm_height = (*height / 96.0) * 25.4 + 0.5;
 }
 
 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Improve debug statements

2012-10-28 Thread Nick Schermer
Updating branch refs/heads/master
 to 22b558bf644ecfd0fdf81ea91e8fe71c36980131 (commit)
   from 46eb5cbcb513aac30fa009fd50fca36de1a922fc (commit)

commit 22b558bf644ecfd0fdf81ea91e8fe71c36980131
Author: Lionel Le Folgoc 
Date:   Thu Oct 18 15:23:59 2012 +0200

Improve debug statements

Signed-off-by: Simon Steinbeiss 

 xfsettingsd/displays.c |   16 ++--
 1 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/xfsettingsd/displays.c b/xfsettingsd/displays.c
index 5af8614..2212092 100644
--- a/xfsettingsd/displays.c
+++ b/xfsettingsd/displays.c
@@ -412,6 +412,10 @@ xfce_displays_helper_set_outputs (XfceRRCrtc *crtc,
 
 g_assert (crtc);
 
+for (n = 0; n < crtc->noutput; ++n)
+xfsettings_dbg (XFSD_DEBUG_DISPLAYS, "CRTC %lu, output list[%d] -> 
%lu.", crtc->id, n,
+crtc->outputs[n]);
+
 /* check if the output is already present */
 for (n = 0; n < crtc->noutput; ++n)
 {
@@ -430,9 +434,8 @@ xfce_displays_helper_set_outputs (XfceRRCrtc *crtc,
 crtc->outputs [crtc->noutput++] = output;
 crtc->changed = TRUE;
 
-for (n = 0; n < crtc->noutput; ++n)
-xfsettings_dbg (XFSD_DEBUG_DISPLAYS, "CRTC %lu, output list: %d -> 
%lu.", crtc->id, n,
-crtc->outputs[n]);
+xfsettings_dbg (XFSD_DEBUG_DISPLAYS, "CRTC %lu, output list[%d] -> %lu.", 
crtc->id,
+crtc->noutput - 1, crtc->outputs[crtc->noutput - 1]);
 }
 
 
@@ -759,9 +762,6 @@ xfce_displays_helper_channel_apply (XfceDisplaysHelper 
*helper,
 
 }
 
-xfsettings_dbg (XFSD_DEBUG_DISPLAYS, "Desktop dimensions: %dx%d (px), 
%dx%d (mm).",
-width, height, mm_width, mm_height);
-
 /* set the screen size only if it's really needed and valid */
 if (width >= min_width && width <= max_width
 && height >= min_height && height <= max_height
@@ -769,8 +769,12 @@ xfce_displays_helper_channel_apply (XfceDisplaysHelper 
*helper,
 || height != gdk_screen_height ()
 || mm_width != gdk_screen_width_mm ()
 || mm_height != gdk_screen_height_mm ()))
+{
+xfsettings_dbg (XFSD_DEBUG_DISPLAYS, "Applying desktop dimensions: 
%dx%d (px), %dx%d (mm).",
+width, height, mm_width, mm_height);
 XRRSetScreenSize (xdisplay, GDK_WINDOW_XID (root_window),
   width, height, mm_width, mm_height);
+}
 
 /* final loop, apply crtc changes */
 for (m = 0; m < resources->ncrtc; ++m)
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Switch to gdk function to grab/ungrab the server

2012-10-28 Thread Nick Schermer
Updating branch refs/heads/master
 to 46eb5cbcb513aac30fa009fd50fca36de1a922fc (commit)
   from 6b51b394691ddcde8bdad2c49dcc5cfe53d844b2 (commit)

commit 46eb5cbcb513aac30fa009fd50fca36de1a922fc
Author: Lionel Le Folgoc 
Date:   Thu Oct 18 14:29:44 2012 +0200

Switch to gdk function to grab/ungrab the server

Signed-off-by: Simon Steinbeiss 

 xfsettingsd/displays.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/xfsettingsd/displays.c b/xfsettingsd/displays.c
index 2517057..5af8614 100644
--- a/xfsettingsd/displays.c
+++ b/xfsettingsd/displays.c
@@ -726,7 +726,7 @@ xfce_displays_helper_channel_apply (XfceDisplaysHelper 
*helper,
 }
 
 /* grab server to prevent clients from thinking no output is enabled */
-XGrabServer (xdisplay);
+gdk_x11_display_grab (display);
 
 /* second loop, normalization and global settings */
 for (m = 0; m < resources->ncrtc; ++m)
@@ -786,7 +786,7 @@ xfce_displays_helper_channel_apply (XfceDisplaysHelper 
*helper,
 }
 
 /* release the grab, changes are done */
-XUngrabServer (xdisplay);
+gdk_x11_display_ungrab (display);
 
 err_cleanup:
 /* Free the xfconf properties */
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Set the primary output after the changes have been applied

2012-10-28 Thread Nick Schermer
Updating branch refs/heads/master
 to e6962fa722eeec3ebe97ef96f7bc2b06331f64a5 (commit)
   from 22b558bf644ecfd0fdf81ea91e8fe71c36980131 (commit)

commit e6962fa722eeec3ebe97ef96f7bc2b06331f64a5
Author: Lionel Le Folgoc 
Date:   Thu Oct 18 16:58:45 2012 +0200

Set the primary output after the changes have been applied

And set it to None if no primary output was present in xfconf.

Signed-off-by: Simon Steinbeiss 

 xfsettingsd/displays.c |   12 +++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/xfsettingsd/displays.c b/xfsettingsd/displays.c
index 2212092..7a14088 100644
--- a/xfsettingsd/displays.c
+++ b/xfsettingsd/displays.c
@@ -200,6 +200,8 @@ xfce_displays_helper_list_crtcs (Display
*xdisplay,
 crtcs = g_new0 (XfceRRCrtc, resources->ncrtc);
 for (n = 0; n < resources->ncrtc; ++n)
 {
+xfsettings_dbg (XFSD_DEBUG_DISPLAYS, "Detected CRTC %lu.", 
resources->crtcs[n]);
+
 crtcs[n].id = resources->crtcs[n];
 crtc_info = XRRGetCrtcInfo (xdisplay, resources, resources->crtcs[n]);
 crtcs[n].mode = crtc_info->mode;
@@ -463,6 +465,9 @@ xfce_displays_helper_channel_apply (XfceDisplaysHelper 
*helper,
 GPtrArray  *connected_outputs;
 GHashTable *saved_outputs;
 XfceRROutput   *output;
+#ifdef HAS_RANDR_ONE_POINT_THREE
+RROutputprimary = None;
+#endif
 
 gdk_error_trap_push ();
 
@@ -522,7 +527,7 @@ xfce_displays_helper_channel_apply (XfceDisplaysHelper 
*helper,
 output->info->name);
 value = g_hash_table_lookup (saved_outputs, property);
 if (G_VALUE_HOLDS_BOOLEAN (value) && g_value_get_boolean (value))
-XRRSetOutputPrimary (xdisplay, GDK_WINDOW_XID (root_window), 
output->id);
+primary = output->id;
 }
 #endif
 
@@ -789,6 +794,11 @@ xfce_displays_helper_channel_apply (XfceDisplaysHelper 
*helper,
 }
 }
 
+#ifdef HAS_RANDR_ONE_POINT_THREE
+if (helper->has_1_3)
+XRRSetOutputPrimary (xdisplay, GDK_WINDOW_XID (root_window), 
primary);
+#endif
+
 /* release the grab, changes are done */
 gdk_x11_display_ungrab (display);
 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Flush the X buffer on exit

2012-10-28 Thread Nick Schermer
Updating branch refs/heads/master
 to ecb721ee1d5babd31d543c7ee23eb348797b2300 (commit)
   from e6962fa722eeec3ebe97ef96f7bc2b06331f64a5 (commit)

commit ecb721ee1d5babd31d543c7ee23eb348797b2300
Author: Lionel Le Folgoc 
Date:   Thu Oct 18 17:29:12 2012 +0200

Flush the X buffer on exit

Signed-off-by: Simon Steinbeiss 

 xfsettingsd/displays.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/xfsettingsd/displays.c b/xfsettingsd/displays.c
index 7a14088..9f01694 100644
--- a/xfsettingsd/displays.c
+++ b/xfsettingsd/displays.c
@@ -821,6 +821,7 @@ err_cleanup:
 /* free the screen resources */
 XRRFreeScreenResources (resources);
 
+gdk_flush ();
 gdk_error_trap_pop ();
 }
 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Fix sensitivity-state of widgets (Lionel)

2012-10-28 Thread Nick Schermer
Updating branch refs/heads/master
 to b790a697d1e0e1c7cac2047817cb2473edec264a (commit)
   from ecb721ee1d5babd31d543c7ee23eb348797b2300 (commit)

commit b790a697d1e0e1c7cac2047817cb2473edec264a
Author: Simon Steinbeiss 
Date:   Thu Oct 18 23:33:23 2012 +0200

Fix sensitivity-state of widgets (Lionel)

 dialogs/display-settings/main.c |5 -
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c
index c7e5332..1b12110 100644
--- a/dialogs/display-settings/main.c
+++ b/dialogs/display-settings/main.c
@@ -416,6 +416,7 @@ display_setting_positions_populate (GtkBuilder *builder)
 gtk_widget_set_sensitive (GTK_WIDGET (combobox), FALSE);
 return;
 }
+gtk_widget_set_sensitive (GTK_WIDGET (combobox), TRUE);
 
 /* Disconnect the "changed" signal to avoid triggering the confirmation
  * dialog */
@@ -466,7 +467,7 @@ display_setting_active_displays_populate (GtkBuilder 
*builder)
 /* Get the active-displays combo box store and clear it */
 combobox = gtk_builder_get_object (builder, "randr-active-displays");
 model = gtk_combo_box_get_model (GTK_COMBO_BOX (combobox));
- gtk_list_store_clear (GTK_LIST_STORE (model));
+gtk_list_store_clear (GTK_LIST_STORE (model));
 
 if (xfce_randr->noutput > 1)
 gtk_widget_show (GTK_WIDGET (combobox));
@@ -485,6 +486,7 @@ display_setting_active_displays_populate (GtkBuilder 
*builder)
 gtk_widget_set_sensitive (GTK_WIDGET (combobox), FALSE);
 return;
 }
+gtk_widget_set_sensitive (GTK_WIDGET (combobox), TRUE);
 
 /* Disconnect the "changed" signal to avoid triggering the confirmation
  * dialog */
@@ -1218,6 +1220,7 @@ display_setting_mirror_displays_populate (GtkBuilder 
*builder)
 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check), FALSE);
 return;
 }
+gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check), TRUE);
 
 /* Disconnect the "toggled" signal to avoid writing the config again */
 g_object_disconnect (check, "any_signal::toggled",
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Fix sensitive state of mirror-toggle (oops)

2012-10-28 Thread Nick Schermer
Updating branch refs/heads/master
 to a2a700d8b8a34a9f2d88ba8d5266bf2590373f11 (commit)
   from 684d64eb8593b2ef01e001d8201743c0a61b6313 (commit)

commit a2a700d8b8a34a9f2d88ba8d5266bf2590373f11
Author: Simon Steinbeiss 
Date:   Fri Oct 19 00:20:40 2012 +0200

Fix sensitive state of mirror-toggle (oops)

 dialogs/display-settings/main.c |1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c
index 1b12110..3db4f88 100644
--- a/dialogs/display-settings/main.c
+++ b/dialogs/display-settings/main.c
@@ -1220,7 +1220,6 @@ display_setting_mirror_displays_populate (GtkBuilder 
*builder)
 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check), FALSE);
 return;
 }
-gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check), TRUE);
 
 /* Disconnect the "toggled" signal to avoid writing the config again */
 g_object_disconnect (check, "any_signal::toggled",
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Fix crash when using dualhead with separate xscreens (Bug #9389)

2012-10-28 Thread Nick Schermer
Updating branch refs/heads/master
 to 430b46f6c5ed382fb1a2560efb6bdd291011b169 (commit)
   from a2a700d8b8a34a9f2d88ba8d5266bf2590373f11 (commit)

commit 430b46f6c5ed382fb1a2560efb6bdd291011b169
Author: Simon Steinbeiss 
Date:   Mon Oct 22 10:34:06 2012 +0200

Fix crash when using dualhead with separate xscreens (Bug #9389)

 xfsettingsd/displays.c |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/xfsettingsd/displays.c b/xfsettingsd/displays.c
index 9f01694..3d5e0f0 100644
--- a/xfsettingsd/displays.c
+++ b/xfsettingsd/displays.c
@@ -488,7 +488,7 @@ xfce_displays_helper_channel_apply (XfceDisplaysHelper 
*helper,
 &min_width, &min_height, &max_width, 
&max_height))
 {
 g_critical ("Unable to get the range of screen sizes, aborting.");
-goto err_cleanup;
+goto err_abort;
 }
 
 /* get all existing CRTCs */
@@ -818,6 +818,7 @@ err_cleanup:
 }
 g_free (crtcs);
 
+err_abort:
 /* free the screen resources */
 XRRFreeScreenResources (resources);
 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Set labels in identity-popups to non-translatable

2012-10-28 Thread Nick Schermer
Updating branch refs/heads/master
 to 684d64eb8593b2ef01e001d8201743c0a61b6313 (commit)
   from b790a697d1e0e1c7cac2047817cb2473edec264a (commit)

commit 684d64eb8593b2ef01e001d8201743c0a61b6313
Author: Simon Steinbeiss 
Date:   Thu Oct 18 23:50:45 2012 +0200

Set labels in identity-popups to non-translatable

 dialogs/display-settings/identity-popup.glade |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dialogs/display-settings/identity-popup.glade 
b/dialogs/display-settings/identity-popup.glade
index da5d733..f6386d5 100644
--- a/dialogs/display-settings/identity-popup.glade
+++ b/dialogs/display-settings/identity-popup.glade
@@ -37,7 +37,7 @@
 True
 False
 0
-Display: 
Name
+Display: 
Name
 True
   
   
@@ -51,7 +51,7 @@
 True
 False
 0
-Resolution: 1280 x 
800, Refresh Rate: 60.0 Hz
+Resolution: 1280 x 
800
   
   
 True
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Changed TreeView to IconView

2012-10-28 Thread Nick Schermer
Updating branch refs/heads/master
 to a9e176755018ad894290714893e01717de7dc5d5 (commit)
   from 430b46f6c5ed382fb1a2560efb6bdd291011b169 (commit)

commit a9e176755018ad894290714893e01717de7dc5d5
Author: Sean Davis 
Date:   Wed Oct 24 19:53:29 2012 -0400

Changed TreeView to IconView

 dialogs/display-settings/display-dialog.glade |   10 ++--
 dialogs/display-settings/main.c   |   81 -
 2 files changed, 56 insertions(+), 35 deletions(-)

diff --git a/dialogs/display-settings/display-dialog.glade 
b/dialogs/display-settings/display-dialog.glade
index c7357a3..10276ce 100644
--- a/dialogs/display-settings/display-dialog.glade
+++ b/dialogs/display-settings/display-dialog.glade
@@ -72,16 +72,16 @@
 200
 True
 True
-automatic
+never
 automatic
 etched-in
 
-  
+  
 True
 True
-False
-False
-False
+horizontal
+1
+6
   
 
   
diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c
index 3db4f88..bcc9666 100644
--- a/dialogs/display-settings/main.c
+++ b/dialogs/display-settings/main.c
@@ -149,7 +149,7 @@ static GOptionEntry option_entries[] =
 /* Global xfconf channel */
 static XfconfChannel *display_channel;
 
-/* output currently selected in the treeview */
+/* output currently selected in the iconview */
 static guint active_output;
 
 /* Pointer to the used randr structure */
@@ -1323,19 +1323,27 @@ display_setting_output_status_populate (GtkBuilder 
*builder)
 
 
 static void
-display_settings_treeview_selection_changed (GtkTreeSelection *selection,
+display_settings_iconview_selection_changed (GtkIconView *iconview,
  GtkBuilder   *builder)
 {
 GtkTreeModel *model;
+GtkTreePath  *path = NULL;
 GtkTreeIter   iter;
 GtkWidget*popup;
-gboolean  has_selection;
 gint  active_id, previous_id;
-
-/* Get the selection */
-has_selection = gtk_tree_selection_get_selected (selection, &model, &iter);
-if (G_LIKELY (has_selection))
+GList*selected_items;
+guintn;
+
+model = gtk_icon_view_get_model(iconview);
+
+selected_items = gtk_icon_view_get_selected_items (GTK_ICON_VIEW 
(iconview));
+
+if (g_list_length(selected_items) != 0)
 {
+path = selected_items->data;
+
+gtk_tree_model_get_iter(model, &iter, path);
+
 /* Get the output info */
 gtk_tree_model_get (model, &iter, COLUMN_OUTPUT_ID, &active_id, -1);
 
@@ -1361,19 +1369,30 @@ display_settings_treeview_selection_changed 
(GtkTreeSelection *selection,
 if (popup)
 gtk_widget_queue_draw (popup);
 }
+else
+{
+gtk_tree_model_get_iter_first(model, &iter);
+for (n=0; nhttps://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Fix activation/sensivity of toggle buttons (minimal dialog)

2012-10-28 Thread Nick Schermer
Updating branch refs/heads/master
 to 6191fb51e35cd9a869f6af1dbd94f3f29309bd4e (commit)
   from a9e176755018ad894290714893e01717de7dc5d5 (commit)

commit 6191fb51e35cd9a869f6af1dbd94f3f29309bd4e
Author: Lionel Le Folgoc 
Date:   Wed Oct 24 11:15:43 2012 +0200

Fix activation/sensivity of toggle buttons (minimal dialog)

And show the display name instead of "display1" "display2"

Signed-off-by: Simon Steinbeiss 

 dialogs/display-settings/main.c |   48 +-
 1 files changed, 31 insertions(+), 17 deletions(-)

diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c
index bcc9666..fbe27af 100644
--- a/dialogs/display-settings/main.c
+++ b/dialogs/display-settings/main.c
@@ -1849,7 +1849,7 @@ display_settings_show_minimal_dialog (GdkDisplay  
*display,
 GtkBuilder   *builder;
 GtkWidget*dialog, *cancel;
 GObject  *only_display1, *only_display2, *mirror_displays;
-GObject  *extend_right, *advanced, *fake_button;
+GObject  *extend_right, *advanced, *fake_button, *label;
 minimal_advanced_context  context;
 
 builder = gtk_builder_new ();
@@ -1878,30 +1878,44 @@ display_settings_show_minimal_dialog (GdkDisplay  
*display,
 
 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (fake_button), TRUE);
 
-//
+label = gtk_builder_get_object (builder, "label1");
+gtk_label_set_text (GTK_LABEL (label), xfce_randr->friendly_name[0]);
+
+gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (only_display1),
+  xfce_randr->mode[0] != None);
+
 if (xfce_randr->noutput > 1)
 {
-gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (only_display1),
- xfce_randr->mode[0] != None);
+label = gtk_builder_get_object (builder, "label4");
+gtk_label_set_text (GTK_LABEL (label), 
xfce_randr->friendly_name[1]);
 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (only_display2),
- xfce_randr->mode[1] != None);
+  xfce_randr->mode[1] != None);
+
+if (xfce_randr->mode[0] != None && xfce_randr->mode[1] != None)
+{
+/* Check for mirror */
+if ((xfce_randr->relation[1] == XFCE_RANDR_PLACEMENT_MIRROR &&
+xfce_randr->related_to[1] == 0) || 
(xfce_randr->related_to[0] == 1 &&
+xfce_randr->relation[0] == XFCE_RANDR_PLACEMENT_MIRROR))
+gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON 
(mirror_displays),
+  TRUE);
+
+/* Check for Extend Right */
+if ((xfce_randr->relation[1] == XFCE_RANDR_PLACEMENT_RIGHT &&
+xfce_randr->related_to[1] == 0) || 
(xfce_randr->related_to[0] == 1 &&
+xfce_randr->relation[1] == XFCE_RANDR_PLACEMENT_LEFT))
+gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON 
(extend_right),
+  TRUE);
+}
 }
 else
 {
-/* Check for mirror */
-if (xfce_randr->relation[1] == XFCE_RANDR_PLACEMENT_MIRROR &&
-xfce_randr->related_to[1] == 0)
-gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON 
(mirror_displays),
-  TRUE);
-
-/* Check for Extend Right */
-if (xfce_randr->relation[1] == XFCE_RANDR_PLACEMENT_RIGHT &&
-xfce_randr->related_to[1] == 0)
-gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (extend_right),
-  TRUE);
+/* Only one output, disable other buttons */
+gtk_widget_set_sensitive (GTK_WIDGET (mirror_displays), FALSE);
+gtk_widget_set_sensitive (GTK_WIDGET (extend_right), FALSE);
+gtk_widget_set_sensitive (GTK_WIDGET (only_display2), FALSE);
 }
 
-//
 g_signal_connect (only_display1, "toggled", G_CALLBACK 
(display_settings_minimal_only_display1_toggled),
   builder);
 g_signal_connect (mirror_displays, "toggled", G_CALLBACK 
(display_settings_minimal_mirror_displays_toggled),
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Clean up unneeded and duplicate variables

2012-10-28 Thread Nick Schermer
Updating branch refs/heads/master
 to b453760a7b8b174a71a6a30343d3c33e88a6e53c (commit)
   from 6191fb51e35cd9a869f6af1dbd94f3f29309bd4e (commit)

commit b453760a7b8b174a71a6a30343d3c33e88a6e53c
Author: Lionel Le Folgoc 
Date:   Wed Oct 24 11:34:01 2012 +0200

Clean up unneeded and duplicate variables

Signed-off-by: Simon Steinbeiss 

 dialogs/display-settings/main.c |   59 --
 1 files changed, 19 insertions(+), 40 deletions(-)

diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c
index fbe27af..5f7fe63 100644
--- a/dialogs/display-settings/main.c
+++ b/dialogs/display-settings/main.c
@@ -61,13 +61,6 @@ enum
 N_COMBO_COLUMNS
 };
 
-typedef struct {
-GtkBuilder *builder;
-GdkDisplay  *display;
-gint event_base;
-GError *error;
-} minimal_advanced_context;
-
 
 
 typedef struct _XfceRelation XfceRelation;
@@ -1755,13 +1748,12 @@ screen_on_event (GdkXEvent *xevent,
 }
 
 static void
-display_settings_show_main_dialog (GdkDisplay  *display,
-   gint event_base,
-   GError  *error)
+display_settings_show_main_dialog (GdkDisplay *display)
 {
 GtkBuilder  *builder;
 GtkWidget   *dialog, *plug;
 GObject *plug_child;
+GError  *error = NULL;
 
 /* Load the Gtk user-interface file */
 builder = gtk_builder_new ();
@@ -1770,13 +1762,12 @@ display_settings_show_main_dialog (GdkDisplay  *display,
 {
 /* Build the dialog */
 dialog = display_settings_dialog_new (builder);
-randr_event_base = event_base;
 /* Set up notifications */
 XRRSelectInput (gdk_x11_display_get_xdisplay (display),
 GDK_WINDOW_XID (gdk_get_default_root_window ()),
 RRScreenChangeNotifyMask);
 gdk_x11_register_standard_event_type (display,
-  event_base,
+  randr_event_base,
   RRNotify + 1);
 gdk_window_add_filter (gdk_get_default_root_window (), 
screen_on_event, builder);
 
@@ -1828,40 +1819,33 @@ display_settings_show_main_dialog (GdkDisplay  *display,
 }
 
 static void
-display_settings_minimal_advanced_clicked(GtkButton*button,
-  minimal_advanced_context *context)
+display_settings_minimal_advanced_clicked (GtkButton  *button,
+   GtkBuilder *builder)
 {
 GtkWidget *dialog;
 
-dialog = GTK_WIDGET (gtk_builder_get_object (context->builder, "dialog"));
+dialog = GTK_WIDGET (gtk_builder_get_object (builder, "dialog"));
 gtk_widget_hide (dialog);
 
-display_settings_show_main_dialog (context->display, context->event_base, 
context->error);
+display_settings_show_main_dialog (gdk_display_get_default ());
 
 gtk_main_quit ();
 }
 
 static void
-display_settings_show_minimal_dialog (GdkDisplay  *display,
-  gint event_base,
-  GError  *error)
+display_settings_show_minimal_dialog (GdkDisplay *display)
 {
-GtkBuilder   *builder;
-GtkWidget*dialog, *cancel;
-GObject  *only_display1, *only_display2, *mirror_displays;
-GObject  *extend_right, *advanced, *fake_button, *label;
-minimal_advanced_context  context;
+GtkBuilder *builder;
+GtkWidget  *dialog, *cancel;
+GObject*only_display1, *only_display2, *mirror_displays;
+GObject*extend_right, *advanced, *fake_button, *label;
+GError *error = NULL;
 
 builder = gtk_builder_new ();
 
 if (gtk_builder_add_from_string (builder, minimal_display_dialog_ui,
  minimal_display_dialog_ui_length, &error) 
!= 0)
 {
-context.builder = builder;
-context.display = display;
-context.event_base = event_base;
-context.error = error;
-
 /* Build the minimal dialog */
 dialog = GTK_WIDGET (gtk_builder_get_object (builder, "dialog"));
 cancel = GTK_WIDGET (gtk_builder_get_object (builder, 
"cancel_button"));
@@ -1925,7 +1909,7 @@ display_settings_show_minimal_dialog (GdkDisplay  
*display,
 g_signal_connect (only_display2, "toggled", G_CALLBACK 
(display_settings_minimal_only_display2_toggled),
   builder);
 g_signal_connect (advanced, "clicked", G_CALLBACK 
(display_settings_minimal_advanced_clicked),
-  (gpointer*)&context);
+  builder);
 
 /* Show the minimal dialog and start the main loop */
 gtk_window_present (GTK_WINDOW (dialog));
@@ -1947,7 +1931,7 @@ main (gint argc, gchar **argv)
 GdkDisplay  *display;
 GError  *error = NULL;
 gboolean  

[Xfce4-commits] Only disable CRTCs that won't fit in the new screen

2012-10-28 Thread Nick Schermer
Updating branch refs/heads/master
 to e746c3379c7955772f58445beb2796f9095f5063 (commit)
   from b453760a7b8b174a71a6a30343d3c33e88a6e53c (commit)

commit e746c3379c7955772f58445beb2796f9095f5063
Author: Lionel Le Folgoc 
Date:   Wed Oct 24 15:14:58 2012 +0200

Only disable CRTCs that won't fit in the new screen

Signed-off-by: Simon Steinbeiss 

 xfsettingsd/displays.c |   57 +--
 1 files changed, 35 insertions(+), 22 deletions(-)

diff --git a/xfsettingsd/displays.c b/xfsettingsd/displays.c
index 3d5e0f0..af6e6cd 100644
--- a/xfsettingsd/displays.c
+++ b/xfsettingsd/displays.c
@@ -450,6 +450,7 @@ xfce_displays_helper_channel_apply (XfceDisplaysHelper 
*helper,
 Display*xdisplay;
 GdkWindow  *root_window;
 XRRScreenResources *resources;
+XRRCrtcInfo*crtc_info;
 XfceRRCrtc *crtcs, *crtc;
 gchar   property[512];
 gintmin_width, min_height, max_width, max_height;
@@ -736,35 +737,47 @@ xfce_displays_helper_channel_apply (XfceDisplaysHelper 
*helper,
 /* grab server to prevent clients from thinking no output is enabled */
 gdk_x11_display_grab (display);
 
-/* second loop, normalization and global settings */
+/* second loop, normalization and screen size calculation */
 for (m = 0; m < resources->ncrtc; ++m)
 {
 /* ignore disabled outputs for size computations */
-if (crtcs[m].mode != None)
-{
-/* normalize positions to ensure the upper left corner is at (0,0) 
*/
-if (min_x || min_y)
-{
-crtcs[m].x -= min_x;
-crtcs[m].y -= min_y;
-crtcs[m].changed = TRUE;
-}
-
-xfsettings_dbg (XFSD_DEBUG_DISPLAYS, "Normalized CRTC %lu: 
size=%dx%d, pos=%dx%d.",
-crtcs[m].id, crtcs[m].width, crtcs[m].height, 
crtcs[m].x, crtcs[m].y);
+if (crtcs[m].mode == None)
+continue;
 
-/* calculate the total screen size */
-xfce_displays_helper_process_screen_size (crtcs[m].width, 
crtcs[m].height,
-  crtcs[m].x, crtcs[m].y, 
&width,
-  &height, &mm_width, 
&mm_height);
+/* normalize positions to ensure the upper left corner is at (0,0) */
+if (min_x || min_y)
+{
+crtcs[m].x -= min_x;
+crtcs[m].y -= min_y;
+crtcs[m].changed = TRUE;
 }
 
-/* disable the CRTC, it will be reenabled after size calculation, 
unless the user disabled it */
-if (xfce_displays_helper_disable_crtc (xdisplay, resources, 
crtcs[m].id) == RRSetConfigSuccess)
-crtcs[m].changed = (crtcs[m].mode != None);
-else
-g_warning ("Failed to disable CRTC %lu.", crtc->id);
+xfsettings_dbg (XFSD_DEBUG_DISPLAYS, "Normalized CRTC %lu: size=%dx%d, 
pos=%dx%d.",
+crtcs[m].id, crtcs[m].width, crtcs[m].height, 
crtcs[m].x, crtcs[m].y);
 
+/* calculate the total screen size */
+xfce_displays_helper_process_screen_size (crtcs[m].width, 
crtcs[m].height,
+  crtcs[m].x, crtcs[m].y, 
&width,
+  &height, &mm_width, 
&mm_height);
+}
+
+/* disable CRTCs that won't fit in the new screen */
+for (m = 0; m < resources->ncrtc; ++m)
+{
+/* The CRTC needs to be disabled if its previous mode won't fit in the 
new screen.
+   It will be reenabled with its new mode (known to fit) after the 
screen size is
+   changed, unless the user disabled it (no need to reenable it then). 
*/
+crtc_info = XRRGetCrtcInfo (xdisplay, resources, crtcs[m].id);
+if ((crtc_info->x + crtc_info->width > (guint) width) ||
+(crtc_info->y + crtc_info->height > (guint) height))
+{
+xfsettings_dbg (XFSD_DEBUG_DISPLAYS, "CRTC %lu must be temporarily 
disabled.", crtcs[m].id);
+if (xfce_displays_helper_disable_crtc (xdisplay, resources, 
crtcs[m].id) == RRSetConfigSuccess)
+crtcs[m].changed = (crtcs[m].mode != None);
+else
+g_warning ("Failed to temporarily disable CRTC %lu.", 
crtc->id);
+}
+XRRFreeCrtcInfo (crtc_info);
 }
 
 /* set the screen size only if it's really needed and valid */
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Fix memleak in the confirmation dialog

2012-10-28 Thread Nick Schermer
Updating branch refs/heads/master
 to 2810861ee25677d8612931b48f6f6dc749bade1c (commit)
   from e746c3379c7955772f58445beb2796f9095f5063 (commit)

commit 2810861ee25677d8612931b48f6f6dc749bade1c
Author: Lionel Le Folgoc 
Date:   Wed Oct 24 18:39:18 2012 +0200

Fix memleak in the confirmation dialog

(and don't use a cpp reserved keyword)

Signed-off-by: Simon Steinbeiss 

 dialogs/display-settings/main.c |   11 ++-
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c
index 5f7fe63..ac2d09e 100644
--- a/dialogs/display-settings/main.c
+++ b/dialogs/display-settings/main.c
@@ -243,14 +243,15 @@ display_settings_update_time_label (ConfirmationDialog 
*confirmation_dialog)
 else
 {
 GObject *label;
-gchar   *string;
+gchar   *label_string;
 
-string = g_strdup_printf (_("The previous configuration will be 
restored in %i"
-" seconds if you do not reply to this 
question."),
-  confirmation_dialog->count);
+label_string = g_strdup_printf (_("The previous configuration will be 
restored in %i"
+  " seconds if you do not reply to 
this question."),
+confirmation_dialog->count);
 
 label = gtk_builder_get_object (confirmation_dialog->builder, 
"label2");
-gtk_label_set_text (GTK_LABEL (label), string);
+gtk_label_set_text (GTK_LABEL (label), label_string);
+g_free (label_string);
 
 return TRUE;
 }
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Show the confirmation dialog when {en, dis}abling outputs

2012-10-28 Thread Nick Schermer
Updating branch refs/heads/master
 to 536274e8a8517c99e7be8e897f1f3b7392bf7606 (commit)
   from 2810861ee25677d8612931b48f6f6dc749bade1c (commit)

commit 536274e8a8517c99e7be8e897f1f3b7392bf7606
Author: Lionel Le Folgoc 
Date:   Wed Oct 24 19:01:31 2012 +0200

Show the confirmation dialog when {en,dis}abling outputs

Signed-off-by: Simon Steinbeiss 

 dialogs/display-settings/main.c |   43 --
 1 files changed, 27 insertions(+), 16 deletions(-)

diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c
index ac2d09e..069715a 100644
--- a/dialogs/display-settings/main.c
+++ b/dialogs/display-settings/main.c
@@ -1246,41 +1246,52 @@ static void
 display_setting_output_toggled (GtkToggleButton *togglebutton,
 GtkBuilder  *builder)
 {
+RRMode old_mode;
+
 if (!xfce_randr)
 return;
 
 if (xfce_randr->noutput <= 1)
 return;
 
+old_mode = xfce_randr->mode[active_output];
+
 if (gtk_toggle_button_get_active (togglebutton))
-{
 xfce_randr->mode[active_output] =
 xfce_randr_preferred_mode (xfce_randr, active_output);
-/* Apply the changes */
-xfce_randr_save_output (xfce_randr, "Default", display_channel,
-active_output, FALSE);
-xfce_randr_apply (xfce_randr, "Default", display_channel);
-}
 else
 {
-/* Prevents the user from disabling everything… */
-if (display_settings_get_n_active_outputs () > 1)
-{
-xfce_randr->mode[active_output] = None;
-/* Apply the changes */
-xfce_randr_save_output (xfce_randr, "Default", display_channel,
-active_output, FALSE);
-xfce_randr_apply (xfce_randr, "Default", display_channel);
-}
-else
+if (display_settings_get_n_active_outputs () == 1)
 {
 xfce_dialog_show_warning (NULL,
   _("The last active output must not be 
disabled, the system would"
 " be unusable."),
   _("Selected output not disabled"));
 /* Set it back to active */
+g_object_disconnect (togglebutton, "any_signal::toggled",
+ display_setting_output_toggled,
+ builder, NULL);
 gtk_toggle_button_set_active (togglebutton, TRUE);
+g_signal_connect (G_OBJECT (togglebutton), "toggled",
+  G_CALLBACK (display_setting_output_toggled),
+  builder);
+return;
 }
+xfce_randr->mode[active_output] = None;
+}
+
+/* Apply the changes */
+xfce_randr_save_output (xfce_randr, "Default", display_channel,
+active_output, FALSE);
+xfce_randr_apply (xfce_randr, "Default", display_channel);
+
+/* Ask user confirmation */
+if (!display_setting_timed_confirmation (builder))
+{
+xfce_randr->mode[active_output] = old_mode;
+xfce_randr_save_output (xfce_randr, "Default", display_channel,
+active_output, FALSE);
+xfce_randr_apply (xfce_randr, "Default", display_channel);
 }
 }
 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Use g_signal_handlers_block_by_func()/unblock_by_func() instead of disconnecting and reconnecting

2012-10-28 Thread Nick Schermer
Updating branch refs/heads/master
 to a89421cc58668a114c71f923e7cd64f7215950c1 (commit)
   from 536274e8a8517c99e7be8e897f1f3b7392bf7606 (commit)

commit a89421cc58668a114c71f923e7cd64f7215950c1
Author: Lionel Le Folgoc 
Date:   Wed Oct 24 19:25:26 2012 +0200

Use g_signal_handlers_block_by_func()/unblock_by_func() instead of 
disconnecting and reconnecting

Signed-off-by: Simon Steinbeiss 

 dialogs/display-settings/main.c |  115 ++-
 1 files changed, 53 insertions(+), 62 deletions(-)

diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c
index 069715a..bfd1cc9 100644
--- a/dialogs/display-settings/main.c
+++ b/dialogs/display-settings/main.c
@@ -412,11 +412,9 @@ display_setting_positions_populate (GtkBuilder *builder)
 }
 gtk_widget_set_sensitive (GTK_WIDGET (combobox), TRUE);
 
-/* Disconnect the "changed" signal to avoid triggering the confirmation
- * dialog */
-g_object_disconnect (combobox, "any_signal::changed",
- display_setting_positions_changed,
- builder, NULL);
+/* Block the "changed" signal to avoid triggering the confirmation dialog 
*/
+g_signal_handlers_block_by_func (combobox, 
display_setting_positions_changed,
+ builder);
 
 /* Try to insert the relations */
 for (n = 0; n < G_N_ELEMENTS (relation_names); n++)
@@ -431,8 +429,9 @@ display_setting_positions_populate (GtkBuilder *builder)
 gtk_combo_box_set_active_iter (GTK_COMBO_BOX (combobox), &iter);
 }
 
-/* Reconnect the signal */
-g_signal_connect (G_OBJECT (combobox), "changed", G_CALLBACK 
(display_setting_positions_changed), builder);
+/* Unblock the signal */
+g_signal_handlers_unblock_by_func (combobox, 
display_setting_positions_changed,
+   builder);
 }
 
 static void
@@ -482,11 +481,9 @@ display_setting_active_displays_populate (GtkBuilder 
*builder)
 }
 gtk_widget_set_sensitive (GTK_WIDGET (combobox), TRUE);
 
-/* Disconnect the "changed" signal to avoid triggering the confirmation
- * dialog */
-g_object_disconnect (combobox, "any_signal::changed",
- display_setting_active_displays_changed,
- builder, NULL);
+/* Block the "changed" signal to avoid triggering the confirmation dialog 
*/
+g_signal_handlers_block_by_func (combobox, 
display_setting_active_displays_changed,
+ builder);
 
 /* Insert all active displays */
 for (n = 0; n < xfce_randr->noutput; ++n)
@@ -505,8 +502,9 @@ display_setting_active_displays_populate (GtkBuilder 
*builder)
 gtk_combo_box_set_active_iter (GTK_COMBO_BOX (combobox), &iter);
 }
 
-/* Reconnect the signal */
-g_signal_connect (G_OBJECT (combobox), "changed", G_CALLBACK 
(display_setting_active_displays_changed), builder);
+/* Unblock the signal */
+g_signal_handlers_unblock_by_func (combobox, 
display_setting_active_displays_changed,
+   builder);
 }
 
 
@@ -571,11 +569,9 @@ display_setting_reflections_populate (GtkBuilder *builder)
 }
 gtk_widget_set_sensitive (GTK_WIDGET (combobox), TRUE);
 
-/* Disconnect the "changed" signal to avoid triggering the confirmation
- * dialog */
-g_object_disconnect (combobox, "any_signal::changed",
- display_setting_reflections_changed,
- builder, NULL);
+/* Block the "changed" signal to avoid triggering the confirmation dialog 
*/
+g_signal_handlers_block_by_func (combobox, 
display_setting_reflections_changed,
+ builder);
 
 /* Load only supported reflections */
 reflections = xfce_randr->rotations[active_output] & 
XFCE_RANDR_REFLECTIONS_MASK;
@@ -601,8 +597,9 @@ display_setting_reflections_populate (GtkBuilder *builder)
 }
 }
 
-/* Reconnect the signal */
-g_signal_connect (G_OBJECT (combobox), "changed", G_CALLBACK 
(display_setting_reflections_changed), builder);
+/* Unblock the signal */
+g_signal_handlers_unblock_by_func (combobox, 
display_setting_reflections_changed,
+   builder);
 }
 
 
@@ -662,11 +659,9 @@ display_setting_rotations_populate (GtkBuilder *builder)
 }
 gtk_widget_set_sensitive (GTK_WIDGET (combobox), TRUE);
 
-/* Disconnect the "changed" signal to avoid triggering the confirmation
- * dialog */
-g_object_disconnect (combobox, "any_signal::changed",
- display_setting_rotations_changed,
- builder, NULL);
+/* Block the "changed" signal to avoid triggering the confirmation dialog 
*/
+g_signal_handlers_block_by_func (combobox, 
display_setting_rotations_changed,
+ builder);
 
 /* Load only s

[Xfce4-commits] Improve visual appearance of the iconview

2012-10-28 Thread Nick Schermer
Updating branch refs/heads/master
 to a0e2c72df9399924b8acc7d39a8540aba73508c0 (commit)
   from a89421cc58668a114c71f923e7cd64f7215950c1 (commit)

commit a0e2c72df9399924b8acc7d39a8540aba73508c0
Author: Simon Steinbeiss 
Date:   Thu Oct 25 12:24:02 2012 +0200

Improve visual appearance of the iconview

 dialogs/display-settings/display-dialog.glade |8 +++-
 dialogs/display-settings/main.c   |3 ++-
 2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/dialogs/display-settings/display-dialog.glade 
b/dialogs/display-settings/display-dialog.glade
index 10276ce..de95707 100644
--- a/dialogs/display-settings/display-dialog.glade
+++ b/dialogs/display-settings/display-dialog.glade
@@ -69,7 +69,6 @@
 12
 
   
-200
 True
 True
 never
@@ -79,15 +78,14 @@
   
 True
 True
-horizontal
 1
-6
+0
   
 
   
   
-True
-True
+False
+False
 0
   
 
diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c
index bfd1cc9..738c04a 100644
--- a/dialogs/display-settings/main.c
+++ b/dialogs/display-settings/main.c
@@ -1400,11 +1400,12 @@ display_settings_iconview_populate (GtkBuilder *builder)
 /* Set the iconview model */
 iconview = gtk_builder_get_object (builder, "randr-outputs");
 gtk_icon_view_set_model (GTK_ICON_VIEW (iconview), GTK_TREE_MODEL (store));
+gtk_icon_view_set_item_width (GTK_ICON_VIEW (iconview), 48*2);
 
 /* Get the display icon */
 display_icon =
 gtk_icon_theme_load_icon (gtk_icon_theme_get_default (), 
"display-icon",
-  32,
+  48,
   GTK_ICON_LOOKUP_GENERIC_FALLBACK,
   NULL);
 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Revert "Improve visual appearance of the iconview"

2012-10-28 Thread Nick Schermer
Updating branch refs/heads/master
 to 6d509f1bd335adf60d81dffbafa6a3a83cdf4448 (commit)
   from a0e2c72df9399924b8acc7d39a8540aba73508c0 (commit)

commit 6d509f1bd335adf60d81dffbafa6a3a83cdf4448
Author: Simon Steinbeiss 
Date:   Fri Oct 26 01:26:24 2012 +0200

Revert "Improve visual appearance of the iconview"

This reverts commit 5b4c5106eeaf520e8e796dbdfcf8b6e1a4b93c2a.

 dialogs/display-settings/display-dialog.glade |8 +---
 dialogs/display-settings/main.c   |3 +--
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/dialogs/display-settings/display-dialog.glade 
b/dialogs/display-settings/display-dialog.glade
index de95707..10276ce 100644
--- a/dialogs/display-settings/display-dialog.glade
+++ b/dialogs/display-settings/display-dialog.glade
@@ -69,6 +69,7 @@
 12
 
   
+200
 True
 True
 never
@@ -78,14 +79,15 @@
   
 True
 True
+horizontal
 1
-0
+6
   
 
   
   
-False
-False
+True
+True
 0
   
 
diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c
index 738c04a..bfd1cc9 100644
--- a/dialogs/display-settings/main.c
+++ b/dialogs/display-settings/main.c
@@ -1400,12 +1400,11 @@ display_settings_iconview_populate (GtkBuilder *builder)
 /* Set the iconview model */
 iconview = gtk_builder_get_object (builder, "randr-outputs");
 gtk_icon_view_set_model (GTK_ICON_VIEW (iconview), GTK_TREE_MODEL (store));
-gtk_icon_view_set_item_width (GTK_ICON_VIEW (iconview), 48*2);
 
 /* Get the display icon */
 display_icon =
 gtk_icon_theme_load_icon (gtk_icon_theme_get_default (), 
"display-icon",
-  48,
+  32,
   GTK_ICON_LOOKUP_GENERIC_FALLBACK,
   NULL);
 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Always show identity popups (Drop focus-out event to reduce redraws)

2012-10-28 Thread Nick Schermer
Updating branch refs/heads/master
 to 6f819104eef28083a6edf7a952b82797d8f6ed2d (commit)
   from da345c7d32e09978ad12c4478a49b6a111997fd4 (commit)

commit 6f819104eef28083a6edf7a952b82797d8f6ed2d
Author: Simon Steinbeiss 
Date:   Fri Oct 26 14:08:44 2012 +0200

Always show identity popups
(Drop focus-out event to reduce redraws)

 dialogs/display-settings/main.c |   29 +
 1 files changed, 9 insertions(+), 20 deletions(-)

diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c
index ba80d05..8f56e0a 100644
--- a/dialogs/display-settings/main.c
+++ b/dialogs/display-settings/main.c
@@ -205,24 +205,21 @@ display_setting_combo_box_get_value (GtkComboBox 
*combobox,
 }
 
 static void
-display_setting_toggle_identity_popup (gpointer   key,
+display_setting_show_identity_popup (gpointer   key,
GtkWidget *value,
-   gpointer   show)
+   gpointer   userdata)
 {
-if (!GPOINTER_TO_INT (show))
-gtk_widget_hide (value);
-else
-gtk_widget_show (value);
+gtk_widget_show (value);
 }
 
 static gboolean
-display_setting_toggle_identity_popups (GtkWidget *widget,
+display_setting_show_identity_popups (GtkWidget *widget,
 GdkEvent  *event,
-gpointer   show)
+gpointer   userdata)
 {
 g_hash_table_foreach (display_popups,
-  (GHFunc) display_setting_toggle_identity_popup,
-  show);
+  (GHFunc) display_setting_show_identity_popup,
+  NULL);
 return FALSE;
 }
 
@@ -289,11 +286,7 @@ display_setting_timed_confirmation (GtkBuilder 
*main_builder)
 
 dialog = gtk_builder_get_object (builder, "dialog1");
 
-g_signal_connect (G_OBJECT (dialog), "focus-out-event", G_CALLBACK 
(display_setting_toggle_identity_popups),
-  GINT_TO_POINTER (FALSE));
-
-g_signal_connect (G_OBJECT (dialog), "focus-in-event", G_CALLBACK 
(display_setting_toggle_identity_popups),
-  GINT_TO_POINTER (TRUE));
+g_signal_connect (G_OBJECT (dialog), "focus-in-event", G_CALLBACK 
(display_setting_show_identity_popups), NULL);
 
 gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW 
(main_dialog));
 source_id = g_timeout_add_seconds (1, (GSourceFunc) 
display_settings_update_time_label,
@@ -1774,11 +1767,7 @@ display_settings_show_main_dialog (GdkDisplay *display)
 gtk_widget_show (GTK_WIDGET (plug_child));
 }
 
-g_signal_connect (G_OBJECT (dialog), "focus-out-event", G_CALLBACK 
(display_setting_toggle_identity_popups),
-  GINT_TO_POINTER (FALSE));
-
-g_signal_connect (G_OBJECT (dialog), "focus-in-event", G_CALLBACK 
(display_setting_toggle_identity_popups),
-  GINT_TO_POINTER (TRUE));
+g_signal_connect (G_OBJECT (dialog), "focus-in-event", G_CALLBACK 
(display_setting_show_identity_popups), NULL);
 
 /* To prevent the settings dialog to be saved in the session */
 gdk_set_sm_client_id ("FAKE ID");
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Improve icons for minimal dialog

2012-10-28 Thread Nick Schermer
Updating branch refs/heads/master
 to 7dac54e082b2520560fd1473c3a707f8517d486f (commit)
   from 6f819104eef28083a6edf7a952b82797d8f6ed2d (commit)

commit 7dac54e082b2520560fd1473c3a707f8517d486f
Author: Simon Steinbeiss 
Date:   Sat Oct 27 11:50:24 2012 +0200

Improve icons for minimal dialog

 dialogs/display-settings/display1.png |  Bin 7527 -> 8155 bytes
 dialogs/display-settings/display2.png |  Bin 7654 -> 7916 bytes
 dialogs/display-settings/mirror.png   |  Bin 6179 -> 8093 bytes
 3 files changed, 0 insertions(+), 0 deletions(-)

diff --git a/dialogs/display-settings/display1.png 
b/dialogs/display-settings/display1.png
index 793022f..721d207 100644
Binary files a/dialogs/display-settings/display1.png and 
b/dialogs/display-settings/display1.png differ
diff --git a/dialogs/display-settings/display2.png 
b/dialogs/display-settings/display2.png
index 64bbd39..3e9078d 100644
Binary files a/dialogs/display-settings/display2.png and 
b/dialogs/display-settings/display2.png differ
diff --git a/dialogs/display-settings/mirror.png 
b/dialogs/display-settings/mirror.png
index adc3ae7..4f55cce 100644
Binary files a/dialogs/display-settings/mirror.png and 
b/dialogs/display-settings/mirror.png differ
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Revert "Changed TreeView to IconView"

2012-10-28 Thread Nick Schermer
Updating branch refs/heads/master
 to da345c7d32e09978ad12c4478a49b6a111997fd4 (commit)
   from 6d509f1bd335adf60d81dffbafa6a3a83cdf4448 (commit)

commit da345c7d32e09978ad12c4478a49b6a111997fd4
Author: Simon Steinbeiss 
Date:   Fri Oct 26 01:26:48 2012 +0200

Revert "Changed TreeView to IconView"

This reverts commit 00d70e4258e69a5c47f7fd4623d806bc16332d18.

 dialogs/display-settings/display-dialog.glade |   10 ++--
 dialogs/display-settings/main.c   |   81 +
 2 files changed, 35 insertions(+), 56 deletions(-)

diff --git a/dialogs/display-settings/display-dialog.glade 
b/dialogs/display-settings/display-dialog.glade
index 10276ce..c7357a3 100644
--- a/dialogs/display-settings/display-dialog.glade
+++ b/dialogs/display-settings/display-dialog.glade
@@ -72,16 +72,16 @@
 200
 True
 True
-never
+automatic
 automatic
 etched-in
 
-  
+  
 True
 True
-horizontal
-1
-6
+False
+False
+False
   
 
   
diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c
index bfd1cc9..ba80d05 100644
--- a/dialogs/display-settings/main.c
+++ b/dialogs/display-settings/main.c
@@ -142,7 +142,7 @@ static GOptionEntry option_entries[] =
 /* Global xfconf channel */
 static XfconfChannel *display_channel;
 
-/* output currently selected in the iconview */
+/* output currently selected in the treeview */
 static guint active_output;
 
 /* Pointer to the used randr structure */
@@ -1319,27 +1319,19 @@ display_setting_output_status_populate (GtkBuilder 
*builder)
 
 
 static void
-display_settings_iconview_selection_changed (GtkIconView *iconview,
+display_settings_treeview_selection_changed (GtkTreeSelection *selection,
  GtkBuilder   *builder)
 {
 GtkTreeModel *model;
-GtkTreePath  *path = NULL;
 GtkTreeIter   iter;
 GtkWidget*popup;
+gboolean  has_selection;
 gint  active_id, previous_id;
-GList*selected_items;
-guintn;
-
-model = gtk_icon_view_get_model(iconview);
-
-selected_items = gtk_icon_view_get_selected_items (GTK_ICON_VIEW 
(iconview));
-
-if (g_list_length(selected_items) != 0)
+
+/* Get the selection */
+has_selection = gtk_tree_selection_get_selected (selection, &model, &iter);
+if (G_LIKELY (has_selection))
 {
-path = selected_items->data;
-
-gtk_tree_model_get_iter(model, &iter, path);
-
 /* Get the output info */
 gtk_tree_model_get (model, &iter, COLUMN_OUTPUT_ID, &active_id, -1);
 
@@ -1365,30 +1357,19 @@ display_settings_iconview_selection_changed 
(GtkIconView *iconview,
 if (popup)
 gtk_widget_queue_draw (popup);
 }
-else
-{
-gtk_tree_model_get_iter_first(model, &iter);
-for (n=0; nhttps://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Fix problem in display1 pixmap

2012-10-28 Thread Nick Schermer
Updating branch refs/heads/master
 to 197cac6f79c5a8d330aeeabc053158aa5a791728 (commit)
   from 7dac54e082b2520560fd1473c3a707f8517d486f (commit)

commit 197cac6f79c5a8d330aeeabc053158aa5a791728
Author: Simon Steinbeiss 
Date:   Sat Oct 27 11:54:14 2012 +0200

Fix problem in display1 pixmap

 dialogs/display-settings/display1.png |  Bin 8155 -> 8271 bytes
 1 files changed, 0 insertions(+), 0 deletions(-)

diff --git a/dialogs/display-settings/display1.png 
b/dialogs/display-settings/display1.png
index 721d207..37e0d57 100644
Binary files a/dialogs/display-settings/display1.png and 
b/dialogs/display-settings/display1.png differ
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Give icons more generic names Redo -extend icon

2012-10-28 Thread Nick Schermer
Updating branch refs/heads/master
 to 3f3f77420400a15a3bffabd12807e28d106ac307 (commit)
   from 197cac6f79c5a8d330aeeabc053158aa5a791728 (commit)

commit 3f3f77420400a15a3bffabd12807e28d106ac307
Author: Simon Steinbeiss 
Date:   Sat Oct 27 14:49:17 2012 +0200

Give icons more generic names
Redo -extend icon

 dialogs/display-settings/extend-right.png  |  Bin 5958 -> 0 bytes
 dialogs/display-settings/mirror.png|  Bin 8093 -> 0 bytes
 dialogs/display-settings/xfce-display-extend.png   |  Bin 0 -> 5714 bytes
 .../{display2.png => xfce-display-external.png}|  Bin 7916 -> 7916 bytes
 .../{display1.png => xfce-display-internal.png}|  Bin 8271 -> 8271 bytes
 dialogs/display-settings/xfce-display-mirror.png   |  Bin 0 -> 7636 bytes
 6 files changed, 0 insertions(+), 0 deletions(-)

diff --git a/dialogs/display-settings/extend-right.png 
b/dialogs/display-settings/extend-right.png
deleted file mode 100644
index 3fe963e..000
Binary files a/dialogs/display-settings/extend-right.png and /dev/null differ
diff --git a/dialogs/display-settings/mirror.png 
b/dialogs/display-settings/mirror.png
deleted file mode 100644
index 4f55cce..000
Binary files a/dialogs/display-settings/mirror.png and /dev/null differ
diff --git a/dialogs/display-settings/xfce-display-extend.png 
b/dialogs/display-settings/xfce-display-extend.png
new file mode 100644
index 000..8d65742
Binary files /dev/null and b/dialogs/display-settings/xfce-display-extend.png 
differ
diff --git a/dialogs/display-settings/display2.png 
b/dialogs/display-settings/xfce-display-external.png
similarity index 100%
rename from dialogs/display-settings/display2.png
rename to dialogs/display-settings/xfce-display-external.png
diff --git a/dialogs/display-settings/display1.png 
b/dialogs/display-settings/xfce-display-internal.png
similarity index 100%
rename from dialogs/display-settings/display1.png
rename to dialogs/display-settings/xfce-display-internal.png
diff --git a/dialogs/display-settings/xfce-display-mirror.png 
b/dialogs/display-settings/xfce-display-mirror.png
new file mode 100644
index 000..11dab0d
Binary files /dev/null and b/dialogs/display-settings/xfce-display-mirror.png 
differ
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Drop focus-in signal for identity popups as they show up anyway

2012-10-28 Thread Nick Schermer
Updating branch refs/heads/master
 to 817b4710fd5afe85abc214ddaba8b4ec4e840e86 (commit)
   from 3f3f77420400a15a3bffabd12807e28d106ac307 (commit)

commit 817b4710fd5afe85abc214ddaba8b4ec4e840e86
Author: Simon Steinbeiss 
Date:   Sat Oct 27 14:56:30 2012 +0200

Drop focus-in signal for identity popups as they show up anyway

 dialogs/display-settings/main.c |   23 ---
 1 files changed, 0 insertions(+), 23 deletions(-)

diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c
index 8f56e0a..92b0e34 100644
--- a/dialogs/display-settings/main.c
+++ b/dialogs/display-settings/main.c
@@ -204,25 +204,6 @@ display_setting_combo_box_get_value (GtkComboBox *combobox,
 return FALSE;
 }
 
-static void
-display_setting_show_identity_popup (gpointer   key,
-   GtkWidget *value,
-   gpointer   userdata)
-{
-gtk_widget_show (value);
-}
-
-static gboolean
-display_setting_show_identity_popups (GtkWidget *widget,
-GdkEvent  *event,
-gpointer   userdata)
-{
-g_hash_table_foreach (display_popups,
-  (GHFunc) display_setting_show_identity_popup,
-  NULL);
-return FALSE;
-}
-
 static gboolean
 display_settings_update_time_label (ConfirmationDialog *confirmation_dialog)
 {
@@ -286,8 +267,6 @@ display_setting_timed_confirmation (GtkBuilder 
*main_builder)
 
 dialog = gtk_builder_get_object (builder, "dialog1");
 
-g_signal_connect (G_OBJECT (dialog), "focus-in-event", G_CALLBACK 
(display_setting_show_identity_popups), NULL);
-
 gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW 
(main_dialog));
 source_id = g_timeout_add_seconds (1, (GSourceFunc) 
display_settings_update_time_label,
confirmation_dialog);
@@ -1767,8 +1746,6 @@ display_settings_show_main_dialog (GdkDisplay *display)
 gtk_widget_show (GTK_WIDGET (plug_child));
 }
 
-g_signal_connect (G_OBJECT (dialog), "focus-in-event", G_CALLBACK 
(display_setting_show_identity_popups), NULL);
-
 /* To prevent the settings dialog to be saved in the session */
 gdk_set_sm_client_id ("FAKE ID");
 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] Correctly install and load icons for minimal dialog (thanks Lionel!)

2012-10-28 Thread Nick Schermer
Updating branch refs/heads/master
 to 949875ef6f42c09e15f19f9aa778e92e028fb219 (commit)
   from 817b4710fd5afe85abc214ddaba8b4ec4e840e86 (commit)

commit 949875ef6f42c09e15f19f9aa778e92e028fb219
Author: Simon Steinbeiss 
Date:   Sat Oct 27 17:00:51 2012 +0200

Correctly install and load icons for minimal dialog (thanks Lionel!)

 dialogs/display-settings/Makefile.am   |8 ++
 dialogs/display-settings/main.c|   24 
 .../display-settings/minimal-display-dialog.glade  |4 ---
 3 files changed, 32 insertions(+), 4 deletions(-)

diff --git a/dialogs/display-settings/Makefile.am 
b/dialogs/display-settings/Makefile.am
index 86137d9..2a5abc2 100644
--- a/dialogs/display-settings/Makefile.am
+++ b/dialogs/display-settings/Makefile.am
@@ -73,7 +73,15 @@ desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
 
 @INTLTOOL_DESKTOP_RULE@
 
+iconsdir = $(datadir)/icons/hicolor/128x128/devices
+icons_DATA = \
+   xfce-display-extend.png \
+   xfce-display-external.png \
+   xfce-display-internal.png \
+   xfce-display-mirror.png
+
 EXTRA_DIST = \
+   $(icons_DATA) \
$(desktop_in_files) \
confirmation-dialog.glade \
display-dialog.glade \
diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c
index 92b0e34..3bc1d67 100644
--- a/dialogs/display-settings/main.c
+++ b/dialogs/display-settings/main.c
@@ -1781,6 +1781,25 @@ display_settings_minimal_advanced_clicked (GtkButton  
*button,
 }
 
 static void
+display_settings_minimal_load_icon (GtkBuilder  *builder,
+const gchar *img_name,
+const gchar *icon_name)
+{
+GObject  *dialog;
+GtkImage *img;
+GtkIconTheme *icon_theme;
+GdkPixbuf*icon;
+
+dialog = gtk_builder_get_object (builder, "dialog");
+img = GTK_IMAGE (gtk_builder_get_object (builder, img_name));
+g_return_if_fail (dialog && img);
+
+icon_theme = gtk_icon_theme_get_for_screen (gtk_window_get_screen 
(GTK_WINDOW (dialog)));
+icon = gtk_icon_theme_load_icon (icon_theme, icon_name, 128, 0, NULL);
+gtk_image_set_from_pixbuf (GTK_IMAGE (img), icon);
+}
+
+static void
 display_settings_show_minimal_dialog (GdkDisplay *display)
 {
 GtkBuilder *builder;
@@ -1801,6 +1820,11 @@ display_settings_show_minimal_dialog (GdkDisplay 
*display)
 g_signal_connect (dialog, "delete-event", G_CALLBACK (gtk_main_quit), 
NULL);
 g_signal_connect (cancel, "clicked", G_CALLBACK (gtk_main_quit), NULL);
 
+display_settings_minimal_load_icon (builder, "image1", 
"xfce-display-internal");
+display_settings_minimal_load_icon (builder, "image2", 
"xfce-display-mirror");
+display_settings_minimal_load_icon (builder, "image3", 
"xfce-display-extend");
+display_settings_minimal_load_icon (builder, "image4", 
"xfce-display-external");
+
 only_display1 = gtk_builder_get_object (builder, "display1");
 mirror_displays = gtk_builder_get_object (builder, "mirror");
 extend_right = gtk_builder_get_object (builder, "extend_right");
diff --git a/dialogs/display-settings/minimal-display-dialog.glade 
b/dialogs/display-settings/minimal-display-dialog.glade
index 888d855..3b04070 100644
--- a/dialogs/display-settings/minimal-display-dialog.glade
+++ b/dialogs/display-settings/minimal-display-dialog.glade
@@ -94,7 +94,6 @@
   
 True
 False
-display1.png
   
 
   
@@ -118,7 +117,6 @@
   
 True
 False
-mirror.png
   
 
   
@@ -144,7 +142,6 @@
   
 True
 False
-extend-right.png
   
 
   
@@ -170,7 +167,6 @@
   
 True
 False
-display2.png
   
 
   
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] l10n: Updated Polish (pl) translation to 100%

2012-10-28 Thread Transifex
Updating branch refs/heads/master
 to 17d42ae447f8491b42d389eac459fb6364af373b (commit)
   from 250263e427070cd1b93a63e5642bd3a52b90ce39 (commit)

commit 17d42ae447f8491b42d389eac459fb6364af373b
Author: Piotr Sokół 
Date:   Sun Oct 28 11:31:29 2012 +0100

l10n: Updated Polish (pl) translation to 100%

New status: 19 messages complete with 0 fuzzies and 0 untranslated.

Transmitted-via: Transifex (translations.xfce.org).

 po/pl.po |   46 --
 1 files changed, 24 insertions(+), 22 deletions(-)

diff --git a/po/pl.po b/po/pl.po
index 42ff04a..cf77c29 100644
--- a/po/pl.po
+++ b/po/pl.po
@@ -1,25 +1,28 @@
 # Polish translations for xfce4-genmon-plugin package.
 # Copyright (C) 2006 THE xfce4-genmon-plugin'S COPYRIGHT HOLDER
 # This file is distributed under the same license as the xfce4-genmon-plugin 
package.
-# 
+# Piotr Sokół , 2012.
+#
 msgid ""
 msgstr ""
 "Project-Id-Version: xfce4-genmon-plugin 2.0\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2012-09-24 16:48+\n"
-"PO-Revision-Date: 2006-08-26 22:36+0100\n"
-"Last-Translator: Piotr Maliński \n"
-"Language-Team: Polish \n"
+"POT-Creation-Date: 2012-10-28 03:18+\n"
+"PO-Revision-Date: 2012-10-28 11:21+0100\n"
+"Last-Translator: Piotr Sokół \n"
+"Language-Team: polski <>\n"
+"Language: pl\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Language: pl\n"
-"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
+"Content-Transfer-Encoding: 8bits\n"
+"Plural-Forms: nplurals=3; plural=((n==1) ? 0 : ((n%10>=2 && n%10<=4 && (n"
+"%100<10 || n%100>=20)) ? 1 : 2));\n"
+"X-Generator: Gtranslator 2.91.5\n"
 
 #: ../panel-plugin/cmdspawn.c:166
 #, c-format
 msgid "Error in command \"%s\""
-msgstr "Błąd w poleceniu \"%s\""
+msgstr "Błąd w poleceniu „%s”"
 
 #: ../panel-plugin/cmdspawn.c:168 ../panel-plugin/main.c:94
 msgid "Xfce Panel"
@@ -31,15 +34,15 @@ msgstr "Polecenie"
 
 #: ../panel-plugin/config_gui.c:95
 msgid "Input the shell command to spawn, then press "
-msgstr "Podaj polecenie do wykonania i wciśnij "
+msgstr "Wprowadza polecenie, którego wyniki będą śledzone"
 
 #: ../panel-plugin/config_gui.c:114
 msgid "Interval between 2 consecutive spawns"
-msgstr "Odstęp między wywołaniami"
+msgstr "Określa tempo wywoływania polecenia"
 
 #: ../panel-plugin/config_gui.c:118
 msgid "Period (s) "
-msgstr "Okres (s)"
+msgstr "Tempo wywoływania (s)"
 
 #: ../panel-plugin/config_gui.c:126
 msgid "Label"
@@ -47,11 +50,11 @@ msgstr "Etykieta"
 
 #: ../panel-plugin/config_gui.c:131
 msgid "Tick to display label"
-msgstr "Zaznacz by wyświetlać etykietę"
+msgstr "Przełącza wyświetlanie etykiety na panelu"
 
 #: ../panel-plugin/config_gui.c:140
 msgid "Input the plugin label, then press "
-msgstr "Podaj etykietę wtyczki i wciśnij "
+msgstr "Wprowadza etykietę apletu"
 
 #: ../panel-plugin/config_gui.c:143
 msgid "(genmon)"
@@ -59,7 +62,7 @@ msgstr "(genmon)"
 
 #: ../panel-plugin/config_gui.c:152
 msgid "Press to change font"
-msgstr "Wciśnij by zmienić czcionkę"
+msgstr "Zmienia czcionkę wyświetlania"
 
 #: ../panel-plugin/config_gui.c:167
 msgid "(Default font)"
@@ -68,7 +71,7 @@ msgstr "(Domyślna czcionka)"
 #: ../panel-plugin/main.c:93
 #, c-format
 msgid "Could not run \"%s\""
-msgstr "Nie można uruchomić \"%s\""
+msgstr "Nie można uruchomić „%s”"
 
 #: ../panel-plugin/main.c:574
 msgid ""
@@ -78,8 +81,7 @@ msgid ""
 "(c) 2004 Roger Seguin \n"
 "(c) 2006 Julien Devemy "
 msgstr ""
-"%s %s - Generyczny Monitor\n"
-"Cyklicznie wykonuje skrypt a wynik wyświetla w panelu\n"
+"Wykonuje polecenie w sposób cykliczny i jego wynik wyświetla na panelu\n"
 "\n"
 "(c) 2004 Roger Seguin \n"
 "(c) 2006 Julien Devemy "
@@ -87,11 +89,11 @@ msgstr ""
 #: ../panel-plugin/main.c:578
 #, c-format
 msgid "%s %s - Generic Monitor"
-msgstr "%s %s - Monitor ogólny"
+msgstr "%s %s - Monitor poleceń"
 
 #: ../panel-plugin/main.c:592
 msgid "Font Selection"
-msgstr "Ustawieni Czcionek"
+msgstr "Wybór czcionki"
 
 #: ../panel-plugin/main.c:637
 msgid "Configuration"
@@ -99,11 +101,11 @@ msgstr "Konfiguracja"
 
 #: ../panel-plugin/main.c:647 ../panel-plugin/genmon.desktop.in.h:1
 msgid "Generic Monitor"
-msgstr "Generyczny Monitor"
+msgstr "Monitor poleceń"
 
 #: ../panel-plugin/genmon.desktop.in.h:2
 msgid "Show output of a command."
-msgstr "Pokazuj rezultat wyjściowy polecenia"
+msgstr "Śledzi i wyświetla wyniki wprowadzonego polecenia"
 
 #~ msgid "About..."
 #~ msgstr "O programie..."
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] l10n: Updated Polish (pl) translation to 100%

2012-10-28 Thread Transifex
Updating branch refs/heads/master
 to d1f550f95b8eb542f5d35507029ec0b7b1c988aa (commit)
   from b9df76c572da8ca3cd08f0d972018e48964090f8 (commit)

commit d1f550f95b8eb542f5d35507029ec0b7b1c988aa
Author: Piotr Sokół 
Date:   Sun Oct 28 12:09:50 2012 +0100

l10n: Updated Polish (pl) translation to 100%

New status: 43 messages complete with 0 fuzzies and 0 untranslated.

Transmitted-via: Transifex (translations.xfce.org).

 po/pl.po |   87 -
 1 files changed, 46 insertions(+), 41 deletions(-)

diff --git a/po/pl.po b/po/pl.po
index fe800ff..7f1c27f 100644
--- a/po/pl.po
+++ b/po/pl.po
@@ -2,23 +2,27 @@
 # Copyright (C) 2006-2007 The Xfce development team.
 # This file is distributed under the same license as the xfce4-battery-plugin 
package.
 # Piotr Maliński , 2006.
-# 
+# Piotr Sokół , 2012.
+#
 msgid ""
 msgstr ""
 "Project-Id-Version: xfce4-battery-plugin 0.5.0\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2012-09-24 16:12+\n"
-"PO-Revision-Date: 2009-02-03 12:47+0100\n"
-"Last-Translator: Piotr Sokół \n"
-"Language-Team: Polish \n"
+"POT-Creation-Date: 2012-10-28 08:03+\n"
+"PO-Revision-Date: 2012-10-28 12:07+0100\n"
+"Last-Translator: Piotr Sokół \n"
+"Language-Team: polski <>\n"
+"Language: pl\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Language: pl\n"
+"Content-Transfer-Encoding: 8bits\n"
+"Plural-Forms: nplurals=3; plural=((n==1) ? 0 : ((n%10>=2 && n%10<=4 && (n"
+"%100<10 || n%100>=20)) ? 1 : 2));\n"
+"X-Generator: Gtranslator 2.91.5\n"
 
 #: ../panel-plugin/battery.c:536
 msgid "(No battery, AC on-line)"
-msgstr "(Brak baterii, podłączony do prądu)"
+msgstr "(Brak akumulatora, podłączone zasilanie sieciowe)"
 
 #: ../panel-plugin/battery.c:538
 msgid "(Charging from AC)"
@@ -26,35 +30,35 @@ msgstr "(Ładowanie z sieci)"
 
 #: ../panel-plugin/battery.c:538
 msgid "(AC on-line)"
-msgstr "(Podłączony do sieci)"
+msgstr "(Podłączne zasilanie sieciowe)"
 
 #: ../panel-plugin/battery.c:548
 #, c-format
 msgid "%d%% (%02d:%02d) remaining"
-msgstr "%d%% (%02d:%02d) pozostało"
+msgstr "Pozostało %d%% (%02d:%02d)"
 
 #: ../panel-plugin/battery.c:550
 #, c-format
 msgid "%02d:%02d remaining"
-msgstr "%02d:%02d pozostało"
+msgstr "Pozostało %02d:%02d"
 
 #: ../panel-plugin/battery.c:552
 #, c-format
 msgid "%d%% remaining"
-msgstr "%d%% pozostało"
+msgstr "Pozostało %d%%"
 
 #: ../panel-plugin/battery.c:554
 #, c-format
 msgid "AC off-line"
-msgstr "Brak zasilania"
+msgstr "Odłączone zasilanie sieciowe"
 
 #: ../panel-plugin/battery.c:624
 msgid ""
 "WARNING: Your battery has reached critical status. You should plug in or "
 "shutdown your computer now to avoid possible data loss."
 msgstr ""
-"UWAGA: Bateria została prawie całkowicie rozładowana. Zaleca się wyłączyć "
-"komputer lub podłączyć zasilanie sieciowe aby uniknąć potencjalnej utraty "
+"UWAGA: akumulator został prawie całkowicie rozładowany. Zaleca się wyłączyć "
+"komputer lub podłączyć zasilanie sieciowe, aby uniknąć potencjalnej utraty "
 "danych."
 
 #: ../panel-plugin/battery.c:642
@@ -62,24 +66,25 @@ msgid ""
 "WARNING: Your battery is running low. You should consider plugging in or "
 "shutting down your computer soon to avoid possible data loss."
 msgstr ""
-"UWAGA: Pojemność baterii spada. Zaleca się wyłączyć komputer lub podłączyć "
-"zasilanie sieciowe aby uniknąć potencjalnej utraty danych."
+"UWAGA: akumulator został rozładowany w znacznym stopniu. Zaleca się wyłączyć "
+"komputer lub podłączyć zasilanie sieciowe, aby uniknąć potencjalnej utraty "
+"danych."
 
 #: ../panel-plugin/battery.c:678
 msgid "Battery"
-msgstr "Bateria"
+msgstr "Akumulator"
 
 #: ../panel-plugin/battery.c:1207
 msgid "Select file"
-msgstr "Wybierz plik"
+msgstr "Wybór pliku"
 
 #: ../panel-plugin/battery.c:1248
 msgid "Select command"
-msgstr "Wybierz polecenie"
+msgstr "Wybór polecenia"
 
 #: ../panel-plugin/battery.c:1263
 msgid "Select color"
-msgstr "Wybierz kolor"
+msgstr "Wybór koloru"
 
 #: ../panel-plugin/battery.c:1305
 #, c-format
@@ -88,27 +93,27 @@ msgstr "Nie można otworzyć adresu URL: %s"
 
 #: ../panel-plugin/battery.c:1330 ../panel-plugin/battery.desktop.in.h:1
 msgid "Battery Monitor"
-msgstr "Monitor baterii"
+msgstr "Monitor akumulatora"
 
 #: ../panel-plugin/battery.c:1337
 msgid "Properties"
-msgstr "Właściwości"
+msgstr "Konfiguruje ustawienia apletu"
 
 #: ../panel-plugin/battery.c:1363
 msgid "On AC:"
-msgstr "Podłączony do prądu"
+msgstr "Zasilanie sieciowe:"
 
 #: ../panel-plugin/battery.c:1380
 msgid "Battery high:"
-msgstr "Wysoki poziom baterii:"
+msgstr "Wysoki poziom akumulatora:"
 
 #: ../panel-plugin/battery.c:1397
 msgid "Battery low:"
-msgstr "Niski poziom baterii:"
+msgstr "Niski poziom akumulatora:"
 
 #: ../panel-plugin/battery.c:1414
 msgid "Battery critical:"
-msgstr "Krytyczny poziom baterii:"
+msgstr "Krytyczny poziom akumulatora:"
 
 #: ../panel-plug

[Xfce4-commits] l10n: Updated Polish (pl) translation to 100%

2012-10-28 Thread Transifex
Updating branch refs/heads/master
 to 823a352372a04e32c5a2b1f9851ba36b23b32427 (commit)
   from 6a86b83c61542892c08d4160b30aa50f57ac64d9 (commit)

commit 823a352372a04e32c5a2b1f9851ba36b23b32427
Author: Piotr Sokół 
Date:   Sun Oct 28 12:25:41 2012 +0100

l10n: Updated Polish (pl) translation to 100%

New status: 12 messages complete with 0 fuzzies and 0 untranslated.

Transmitted-via: Transifex (translations.xfce.org).

 po/pl.po |   39 ---
 1 files changed, 20 insertions(+), 19 deletions(-)

diff --git a/po/pl.po b/po/pl.po
index 71a68b7..331e138 100644
--- a/po/pl.po
+++ b/po/pl.po
@@ -1,21 +1,24 @@
 # Polish translations for xfce4-wavelan-plugin package.
 # Copyright (C) 2003-2005 Benedikt Meurer.
-# This file is distributed under the same license as
-#   the xfce4-wavelan-plugin package.
+# This file is distributed under the same license as  the xfce4-wavelan-plugin 
package.
 # Piotr Maliński , 2006.
-# 
+# Piotr Sokół , 2012.
+#
 msgid ""
 msgstr ""
 "Project-Id-Version: xfce4-wavelan-plugin 0.4.3svn\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2012-09-24 13:18+\n"
-"PO-Revision-Date: 2006-04-08 13:22+0900\n"
-"Last-Translator: Piotr Maliński \n"
-"Language-Team: Polish \n"
+"POT-Creation-Date: 2012-10-28 10:30+\n"
+"PO-Revision-Date: 2012-10-28 12:24+0100\n"
+"Last-Translator: Piotr Sokół \n"
+"Language-Team: polski <>\n"
+"Language: pl\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Language: pl\n"
+"Content-Transfer-Encoding: 8bits\n"
+"Plural-Forms: nplurals=3; plural=((n==1) ? 0 : ((n%10>=2 && n%10<=4 && (n"
+"%100<10 || n%100>=20)) ? 1 : 2));\n"
+"X-Generator: Gtranslator 2.91.5\n"
 
 #: ../panel-plugin/wavelan.c:156
 msgid "No carrier signal"
@@ -27,11 +30,11 @@ msgstr "Brak skonfigurowanego urządzenia"
 
 #: ../panel-plugin/wavelan.c:508
 msgid "Wavelan Plugin Options"
-msgstr "Opcje wtyczki Wavelan"
+msgstr "Wavelan"
 
 #: ../panel-plugin/wavelan.c:523
 msgid "Properties"
-msgstr "Właściwości"
+msgstr "Konfiguruje ustawienia apletu"
 
 #: ../panel-plugin/wavelan.c:534
 msgid "Interface"
@@ -39,31 +42,29 @@ msgstr "Interfejs"
 
 #: ../panel-plugin/wavelan.c:555
 msgid "_Autohide when offline"
-msgstr "_Ukrywaj gdy offline"
+msgstr "_Ukrywanie po rozłączeniu"
 
 #: ../panel-plugin/wavelan.c:565
 msgid "Autohide when no hardware present"
-msgstr "Ukryj gdy brak odpowiedniego urządzenia"
+msgstr "Ukrywanie podczas braku urządzenia"
 
 #: ../panel-plugin/wavelan.c:576
 msgid ""
 "Note: This will make it difficult to remove or configure the plugin if there "
 "is no device detected."
-msgstr ""
-"Notka: To spowoduje trudności w usunięciu lub konfiguracji wtyczki jeżeli  "
-"nie ma wykrytego urządzenia."
+msgstr "Uwaga: może utrudniać usunięcie lub skonfigurowanie apletu."
 
 #: ../panel-plugin/wavelan.c:584
 msgid "Enable signal quality colors"
-msgstr "Włącz kolory jakości sygnału"
+msgstr "Wyświetlanie kolorów jakości sygnału"
 
 #: ../panel-plugin/wavelan.c:595
 msgid "Show icon"
-msgstr "Pokaż ikonę"
+msgstr "Wyświetlanie ikony"
 
 #: ../panel-plugin/wavelan.c:623 ../panel-plugin/wavelan.desktop.in.h:1
 msgid "View the status of a wireless network"
-msgstr "Podgląd stanu sieci bezprzewodowej"
+msgstr "Dostarcza informacje o stanie sieci bezprzewodowej"
 
 #: ../panel-plugin/wavelan.desktop.in.h:2
 msgid "Wavelan"
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] l10n: Updated Polish (pl) translation to 100%

2012-10-28 Thread Transifex
Updating branch refs/heads/master
 to 7dadc69589b324eecd6c29db91fdc9c2766933f9 (commit)
   from 657d83c171949d449739a0790d2083a673aa4465 (commit)

commit 7dadc69589b324eecd6c29db91fdc9c2766933f9
Author: Marcin Romańczuk 
Date:   Sun Oct 28 12:57:07 2012 +0100

l10n: Updated Polish (pl) translation to 100%

New status: 719 messages complete with 0 fuzzies and 0 untranslated.

Transmitted-via: Transifex (translations.xfce.org).

 po/pl.po |  116 +++--
 1 files changed, 59 insertions(+), 57 deletions(-)

diff --git a/po/pl.po b/po/pl.po
index 9f6f94d..6071dab 100644
--- a/po/pl.po
+++ b/po/pl.po
@@ -5,12 +5,12 @@
 # Tomasz Michał Łukaszewski , 2006.
 # Szymon Kałasz , 2007.
 # Piotr Sokół , 2009, 2011, 2012.
-#
+# 
 msgid ""
 msgstr ""
 "Project-Id-Version: Thunar 1.2.1\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2012-10-24 12:24+\n"
+"POT-Creation-Date: 2012-10-28 07:21+\n"
 "PO-Revision-Date: 2012-10-24 19:43+0200\n"
 "Last-Translator: Piotr Sokół \n"
 "Language-Team: polski <>\n"
@@ -18,8 +18,7 @@ msgstr ""
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bits\n"
 "Language: \n"
-"Plural-Forms: nplurals=3; plural=((n==1) ? 0 : ((n%10>=2 && n%10<=4 && (n"
-"%100<10 || n%100>=20)) ? 1 : 2));\n"
+"Plural-Forms: nplurals=3; plural=((n==1) ? 0 : ((n%10>=2 && n%10<=4 && 
(n%100<10 || n%100>=20)) ? 1 : 2));\n"
 "X-Generator: Gtranslator 2.91.5\n"
 
 #: ../thunar/main.c:61
@@ -141,8 +140,8 @@ msgstr "Nie udało się wykonać operacji"
 #: ../thunar/thunar-application.c:1112 ../thunar/thunar-application.c:1238
 #: ../thunar/thunar-launcher.c:1056 ../thunar/thunar-location-entry.c:402
 #: ../thunar/thunar-location-entry.c:430
-#: ../thunar/thunar-shortcuts-view.c:1576
-#: ../thunar/thunar-shortcuts-view.c:1604 ../thunar/thunar-window.c:1644
+#: ../thunar/thunar-shortcuts-view.c:1577
+#: ../thunar/thunar-shortcuts-view.c:1605 ../thunar/thunar-window.c:1639
 #, c-format
 msgid "Failed to open \"%s\""
 msgstr "Nie udało się otworzyć „%s”"
@@ -251,7 +250,7 @@ msgstr "Opróżnić kosz ze wszystkich elementów?"
 #. append the "Empty Trash" menu action
 #. prepare the menu item
 #: ../thunar/thunar-application.c:1952 ../thunar/thunar-location-buttons.c:171
-#: ../thunar/thunar-shortcuts-view.c:1141 ../thunar/thunar-tree-view.c:1158
+#: ../thunar/thunar-shortcuts-view.c:1142 ../thunar/thunar-tree-view.c:1158
 #: ../thunar/thunar-window.c:312 ../plugins/thunar-tpa/thunar-tpa.c:189
 msgid "_Empty Trash"
 msgstr "Opróżnij _kosz"
@@ -694,7 +693,7 @@ msgid "ReplaceDialogPart1|Do you want to replace the 
existing file"
 msgstr "Zastąpić istniejący plik"
 
 #. Fourth box (size, volume, free space)
-#.
+#. 
 #: ../thunar/thunar-dialogs.c:618 ../thunar/thunar-dialogs.c:649
 #: ../thunar/thunar-properties-dialog.c:464
 msgid "Size:"
@@ -794,7 +793,7 @@ msgid "Owner"
 msgstr "Właściciel"
 
 #. Permissions chooser
-#.
+#. 
 #: ../thunar/thunar-enum-types.c:98 ../thunar/thunar-properties-dialog.c:536
 msgid "Permissions"
 msgstr "Uprawnienia"
@@ -860,6 +859,11 @@ msgstr "Nieprawidłowy plik aktywatora"
 msgid "%s on %s"
 msgstr "%s z %s"
 
+#. extend history tooltip with function of the button
+#: ../thunar/thunar-history-action.c:368
+msgid "Right-click or pull down to show history"
+msgstr "Kliknięcie prawym przyciskiem myszy lub przytrzymanie pokazuje 
historię"
+
 #. create the "back" action
 #: ../thunar/thunar-history.c:163
 msgid "Back"
@@ -1021,13 +1025,13 @@ msgstr ""
 #. append the "Open" menu action
 #: ../thunar/thunar-launcher.c:169 ../thunar/thunar-launcher.c:811
 #: ../thunar/thunar-location-buttons.c:168
-#: ../thunar/thunar-shortcuts-view.c:1050 ../thunar/thunar-tree-view.c:1095
+#: ../thunar/thunar-shortcuts-view.c:1051 ../thunar/thunar-tree-view.c:1095
 msgid "_Open"
 msgstr "_Otwórz"
 
 #. append the "Open in New Window" menu action
 #: ../thunar/thunar-launcher.c:170 ../thunar/thunar-location-buttons.c:169
-#: ../thunar/thunar-shortcuts-view.c:1060 ../thunar/thunar-tree-view.c:1106
+#: ../thunar/thunar-shortcuts-view.c:1061 ../thunar/thunar-tree-view.c:1106
 msgid "Open in New Window"
 msgstr "Otwórz w nowym oknie"
 
@@ -1151,8 +1155,8 @@ msgstr[2] "Otwiera zaznaczone pliki za pomocą domyślnych 
programów"
 msgid "Open With \"%s\""
 msgstr "Otwórz za pomocą „%s”"
 
-#: ../thunar/thunar-launcher.c:1367 ../thunar/thunar-shortcuts-view.c:1636
-#: ../thunar/thunar-shortcuts-view.c:1866 ../thunar/thunar-tree-view.c:1888
+#: ../thunar/thunar-launcher.c:1367 ../thunar/thunar-shortcuts-view.c:1637
+#: ../thunar/thunar-shortcuts-view.c:1867 ../thunar/thunar-tree-view.c:1888
 #, c-format
 msgid "Failed to mount \"%s\""
 msgstr "Nie udało się zamontować „%s”"
@@ -1239,7 +1243,7 @@ msgstr "%2$s „%1$s”"
 #. * where the trashed file/folder was located before it was moved to the
 #. trash), otherwise the
 #. * properties dialog width will be messed up.
-#.
+#. 
 #: ../thunar/thunar-list-model.c:2353 ../thunar/

[Xfce4-commits] l10n: Updated Polish (pl) translation to 100%

2012-10-28 Thread Transifex
Updating branch refs/heads/master
 to 713d9ce2c429908d1a792011ac47f44e5ff369c7 (commit)
   from c06982e30bbda0081b1f790d175d93bde3f7ada8 (commit)

commit 713d9ce2c429908d1a792011ac47f44e5ff369c7
Author: Marcin Romańczuk 
Date:   Sun Oct 28 13:08:23 2012 +0100

l10n: Updated Polish (pl) translation to 100%

New status: 213 messages complete with 0 fuzzies and 0 untranslated.

Transmitted-via: Transifex (translations.xfce.org).

 po/pl.po |5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/po/pl.po b/po/pl.po
index 1225acc..7a3471e 100644
--- a/po/pl.po
+++ b/po/pl.po
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: xfce-power-manager 1.0.10\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2012-10-08 02:30+\n"
+"POT-Creation-Date: 2012-10-28 09:21+\n"
 "PO-Revision-Date: 2012-04-29 18:56+0200\n"
 "Last-Translator: Piotr Sokół \n"
 "Language-Team: polski <>\n"
@@ -792,9 +792,8 @@ msgid "Has battery"
 msgstr "Posiada akumulator"
 
 #: ../src/xfpm-main.c:157
-#, fuzzy
 msgid "Has brightness panel"
-msgstr "Zawiera konfigurację jasności"
+msgstr "Posiada panel jasności"
 
 #: ../src/xfpm-main.c:159
 msgid "Has power button"
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] l10n: Updated Polish (pl) translation to 94%

2012-10-28 Thread Transifex
Updating branch refs/heads/master
 to cd3fb1b47bb8fe2e21012a40879dfb99337d857f (commit)
   from 949875ef6f42c09e15f19f9aa778e92e028fb219 (commit)

commit cd3fb1b47bb8fe2e21012a40879dfb99337d857f
Author: Marcin Romańczuk 
Date:   Sun Oct 28 13:16:20 2012 +0100

l10n: Updated Polish (pl) translation to 94%

New status: 327 messages complete with 14 fuzzies and 6 untranslated.

Transmitted-via: Transifex (translations.xfce.org).

 po/pl.po |  165 --
 1 files changed, 118 insertions(+), 47 deletions(-)

diff --git a/po/pl.po b/po/pl.po
index 56bb58a..e2181c7 100644
--- a/po/pl.po
+++ b/po/pl.po
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: xfce4-settings 4.7.7\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2012-10-22 04:03+\n"
+"POT-Creation-Date: 2012-10-28 09:51+\n"
 "PO-Revision-Date: 2012-04-12 11:16+0200\n"
 "Last-Translator: Piotr Sokół \n"
 "Language-Team: polski <>\n"
@@ -228,21 +228,21 @@ msgstr "pikseli/s"
 
 #: ../dialogs/accessibility-settings/main.c:43
 #: ../dialogs/appearance-settings/main.c:94
-#: ../dialogs/display-settings/main.c:102
+#: ../dialogs/display-settings/main.c:136
 #: ../dialogs/keyboard-settings/main.c:39 ../dialogs/mouse-settings/main.c:79
 msgid "Settings manager socket"
 msgstr "Określa gniazdo menedżera ustawień"
 
 #: ../dialogs/accessibility-settings/main.c:43
 #: ../dialogs/appearance-settings/main.c:94
-#: ../dialogs/display-settings/main.c:102
+#: ../dialogs/display-settings/main.c:136
 #: ../dialogs/keyboard-settings/main.c:39 ../dialogs/mouse-settings/main.c:79
 msgid "SOCKET ID"
 msgstr "ID_GNIAZDA"
 
 #: ../dialogs/accessibility-settings/main.c:44
 #: ../dialogs/appearance-settings/main.c:95
-#: ../dialogs/display-settings/main.c:103
+#: ../dialogs/display-settings/main.c:137
 #: ../dialogs/keyboard-settings/main.c:40 ../dialogs/mime-settings/main.c:40
 #: ../dialogs/mouse-settings/main.c:80 ../xfce4-settings-editor/main.c:43
 #: ../xfsettingsd/main.c:77 ../xfce4-settings-manager/main.c:39
@@ -251,7 +251,7 @@ msgstr "Wypisuje informacje o wersji i kończy"
 
 #: ../dialogs/accessibility-settings/main.c:192
 #: ../dialogs/appearance-settings/main.c:966
-#: ../dialogs/display-settings/main.c:1043
+#: ../dialogs/display-settings/main.c:1922
 #: ../dialogs/keyboard-settings/main.c:76 ../dialogs/mime-settings/main.c:62
 #: ../dialogs/mouse-settings/main.c:1597 ../xfce4-settings-editor/main.c:63
 #: ../xfsettingsd/main.c:187 ../xfce4-settings-manager/main.c:60
@@ -261,7 +261,7 @@ msgstr "Proszę wprowadzić „%s --help”, aby wypisać 
komunikat pomocy."
 
 #: ../dialogs/accessibility-settings/main.c:211
 #: ../dialogs/appearance-settings/main.c:985
-#: ../dialogs/display-settings/main.c:1062
+#: ../dialogs/display-settings/main.c:1941
 #: ../dialogs/keyboard-settings/main.c:92 ../dialogs/mime-settings/main.c:81
 #: ../dialogs/mouse-settings/main.c:1616 ../xfce4-settings-editor/main.c:82
 #: ../xfsettingsd/main.c:203 ../xfce4-settings-manager/main.c:76
@@ -270,7 +270,7 @@ msgstr "Zespół twórców środowiska Xfce. Wszystkie prawa 
zastrzeżone."
 
 #: ../dialogs/accessibility-settings/main.c:212
 #: ../dialogs/appearance-settings/main.c:986
-#: ../dialogs/display-settings/main.c:1063
+#: ../dialogs/display-settings/main.c:1942
 #: ../dialogs/keyboard-settings/main.c:93 ../dialogs/mime-settings/main.c:82
 #: ../dialogs/mouse-settings/main.c:1617 ../xfce4-settings-editor/main.c:83
 #: ../xfsettingsd/main.c:204 ../xfce4-settings-manager/main.c:77
@@ -293,7 +293,7 @@ msgid "Appearance"
 msgstr "Wygląd"
 
 #: ../dialogs/appearance-settings/appearance-dialog.glade.h:3
-#: ../dialogs/display-settings/main.c:82
+#: ../dialogs/display-settings/main.c:116
 msgid "Both"
 msgstr "Etykiety poniżej ikon"
 
@@ -383,7 +383,8 @@ msgstr "Menu i przyciski"
 
 #: ../dialogs/appearance-settings/appearance-dialog.glade.h:22
 #: ../dialogs/appearance-settings/main.c:852
-#: ../dialogs/display-settings/main.c:79
+#: ../dialogs/display-settings/main.c:102
+#: ../dialogs/display-settings/main.c:113
 msgid "None"
 msgstr "Brak"
 
@@ -549,70 +550,115 @@ msgid "Display"
 msgstr "Ekran"
 
 #: ../dialogs/display-settings/display-dialog.glade.h:3
+#, fuzzy
+msgid "Mirror displays"
+msgstr "Wyświetlacz cyfrowy"
+
+#: ../dialogs/display-settings/display-dialog.glade.h:4
+#, fuzzy
+msgid "Position:"
+msgstr "_Orientacja:"
+
+#: ../dialogs/display-settings/display-dialog.glade.h:5
 msgid "R_esolution:"
 msgstr "_Rozdzielczość:"
 
-#: ../dialogs/display-settings/display-dialog.glade.h:4
+#: ../dialogs/display-settings/display-dialog.glade.h:6
 msgid "Ref_lection:"
 msgstr "_Odbicie:"
 
-#: ../dialogs/display-settings/display-dialog.glade.h:5
+#: ../dialogs/display-settings/display-dialog.glade.h:7
 msgid "Refresh _rate:"
 msgstr "Częstotliwość _odświeżania:"
 
-#: ../dialogs/display-settings/display-dialog.glade.h:6
+#: ../dialogs/display-settings/display-dialog.glade.h:8
 msgid "Ro_tation:"
 msgstr "_Or

[Xfce4-commits] l10n: Updated Polish (pl) translation to 99%

2012-10-28 Thread Transifex
Updating branch refs/heads/master
 to e5cec121eb707d5043db6e1e0570daa4c2bd5b7e (commit)
   from cd3fb1b47bb8fe2e21012a40879dfb99337d857f (commit)

commit e5cec121eb707d5043db6e1e0570daa4c2bd5b7e
Author: Marcin Romańczuk 
Date:   Sun Oct 28 13:25:49 2012 +0100

l10n: Updated Polish (pl) translation to 99%

New status: 346 messages complete with 0 fuzzies and 1 untranslated.

Transmitted-via: Transifex (translations.xfce.org).

 po/pl.po |   52 +++-
 1 files changed, 19 insertions(+), 33 deletions(-)

diff --git a/po/pl.po b/po/pl.po
index e2181c7..a2adc6b 100644
--- a/po/pl.po
+++ b/po/pl.po
@@ -550,14 +550,12 @@ msgid "Display"
 msgstr "Ekran"
 
 #: ../dialogs/display-settings/display-dialog.glade.h:3
-#, fuzzy
 msgid "Mirror displays"
-msgstr "Wyświetlacz cyfrowy"
+msgstr "Wyświetlanie lustrzane"
 
 #: ../dialogs/display-settings/display-dialog.glade.h:4
-#, fuzzy
 msgid "Position:"
-msgstr "_Orientacja:"
+msgstr "Położenie:"
 
 #: ../dialogs/display-settings/display-dialog.glade.h:5
 msgid "R_esolution:"
@@ -576,37 +574,32 @@ msgid "Ro_tation:"
 msgstr "_Orientacja:"
 
 #: ../dialogs/display-settings/display-dialog.glade.h:9
-#, fuzzy
 msgid "Use this output"
-msgstr "_Użyj tego wyjścia"
+msgstr "Użycie tego wyjścia"
 
 #: ../dialogs/display-settings/minimal-display-dialog.glade.h:1
 msgid "Advanced"
-msgstr ""
+msgstr "Zaawansowane"
 
 #: ../dialogs/display-settings/minimal-display-dialog.glade.h:2
-#, fuzzy
 msgid "Displays"
-msgstr "Ekran"
+msgstr "Wyświetlanie"
 
 #: ../dialogs/display-settings/minimal-display-dialog.glade.h:3
 msgid "Extend to the right"
-msgstr ""
+msgstr "Rozszerz do prawej"
 
 #: ../dialogs/display-settings/minimal-display-dialog.glade.h:4
-#, fuzzy
 msgid "Mirror Displays"
-msgstr "Ekran"
+msgstr "Wyświetlanie lustrzane"
 
 #: ../dialogs/display-settings/minimal-display-dialog.glade.h:5
-#, fuzzy
 msgid "Only Display 1"
-msgstr "Ekran"
+msgstr "Tylko Wyświetlacz 1"
 
 #: ../dialogs/display-settings/minimal-display-dialog.glade.h:6
-#, fuzzy
 msgid "Only Display 2"
-msgstr "Ekran"
+msgstr "Tylko Wyświetlacz 2"
 
 #: ../dialogs/display-settings/minimal-display-dialog.glade.h:7
 msgid "radiobutton"
@@ -614,25 +607,23 @@ msgstr ""
 
 #: ../dialogs/display-settings/main.c:90
 msgid "Same as"
-msgstr ""
+msgstr "Tak samo jak"
 
 #: ../dialogs/display-settings/main.c:91
 msgid "Above"
-msgstr ""
+msgstr "Powyżej"
 
 #: ../dialogs/display-settings/main.c:92
 msgid "Below"
-msgstr ""
+msgstr "Poniżej"
 
 #: ../dialogs/display-settings/main.c:93
-#, fuzzy
 msgid "Right of"
-msgstr "Prawo"
+msgstr "Na prawo od"
 
 #: ../dialogs/display-settings/main.c:94
-#, fuzzy
 msgid "Left of"
-msgstr "Lewo"
+msgstr "Na lewo od"
 
 #: ../dialogs/display-settings/main.c:103
 msgid "Left"
@@ -672,14 +663,12 @@ msgid "%.1f Hz"
 msgstr "%.1f Hz"
 
 #: ../dialogs/display-settings/main.c:1040
-#, fuzzy
 msgid "Display:"
-msgstr "Ekran"
+msgstr "Wyświetlacz"
 
 #: ../dialogs/display-settings/main.c:1045
-#, fuzzy
 msgid "Resolution:"
-msgstr "_Rozdzielczość:"
+msgstr "Rozdzielczość:"
 
 #: ../dialogs/display-settings/main.c:1232
 msgid ""
@@ -814,15 +803,13 @@ msgstr "Opóź_nienie:"
 
 # Automatically copied. Please review and remove fuzzy flag.
 #: ../dialogs/keyboard-settings/keyboard-dialog.glade.h:4
-#, fuzzy
 msgid "Change layout option"
-msgstr "Klawisz zmiany układu"
+msgstr "Zmiana układu klawiatury"
 
 # Automatically copied. Please review and remove fuzzy flag.
 #: ../dialogs/keyboard-settings/keyboard-dialog.glade.h:5
-#, fuzzy
 msgid "Compose key"
-msgstr "Klawisz szybkiego uruchamiania"
+msgstr "Tworzy skrót"
 
 #: ../dialogs/keyboard-settings/keyboard-dialog.glade.h:6
 msgid "Cursor"
@@ -1156,9 +1143,8 @@ msgid "Buttons"
 msgstr "Przyciski"
 
 #: ../dialogs/mouse-settings/mouse-dialog.glade.h:3
-#, fuzzy
 msgid "Circular scrolling"
-msgstr "Przewijanie kołowe"
+msgstr "Przewijanie"
 
 #: ../dialogs/mouse-settings/mouse-dialog.glade.h:4
 msgid "Clockwise"
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


  1   2   >