[Xfce4-commits] <xfce4-settings:master> Fix Bug #7797, patch by Eric Koegel (slightly adjusted)

Nick Schermer noreply at xfce.org
Sun Oct 28 10:44:59 CET 2012


Updating branch refs/heads/master
         to 947d77198e8dd63b467023f5a13cbabf322fa943 (commit)
       from a7f44eec2f3e41306189b635eeab9e691b3d2ebe (commit)

commit 947d77198e8dd63b467023f5a13cbabf322fa943
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
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));
 


More information about the Xfce4-commits mailing list