[Xfce4-commits] <xfce4-settings:xrandr-display-settings> Add a combobox entry to disable the mode.

Jérôme Guelfucci noreply at xfce.org
Tue Jun 1 21:24:01 CEST 2010


Updating branch refs/heads/xrandr-display-settings
         to 3dd8bf73f70b1a8997378b78e7659c5f49804ef6 (commit)
       from ce35c9d4f4757f928263e297114c7358eb75d078 (commit)

commit 3dd8bf73f70b1a8997378b78e7659c5f49804ef6
Author: Lionel Le Folgoc <mrpouit at gmail.com>
Date:   Fri May 28 01:17:25 2010 +0200

    Add a combobox entry to disable the mode.

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

diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c
index dac6737..dfb8cb4 100644
--- a/dialogs/display-settings/main.c
+++ b/dialogs/display-settings/main.c
@@ -374,10 +374,18 @@ display_setting_resolutions_populate (GtkBuilder *builder)
     combobox = gtk_builder_get_object (builder, "randr-resolution");
     model = gtk_combo_box_get_model (GTK_COMBO_BOX (combobox));
     gtk_list_store_clear (GTK_LIST_STORE (model));
+    /* entry for a disabled output */
+    gtk_list_store_append (GTK_LIST_STORE (model), &iter);
+    gtk_list_store_set (GTK_LIST_STORE (model), &iter,
+                        COLUMN_COMBO_NAME, _("None (disabled)"),
+                        COLUMN_COMBO_VALUE, None, -1);
 
 #ifdef HAS_RANDR_ONE_POINT_TWO
     if (xfce_randr)
     {
+        if (XFCE_RANDR_MODE (xfce_randr) == None)
+            gtk_combo_box_set_active_iter (GTK_COMBO_BOX (combobox), &iter);
+
         /* walk all supported modes */
         for (m = 0; m < XFCE_RANDR_OUTPUT_INFO (xfce_randr)->nmode; ++m)
         {



More information about the Xfce4-commits mailing list