[gnome-control-center] color: Fix a critical warning when devices are removed



commit 203046ccfbd30ffc2da34aea2dd87ae60ed4045d
Author: Richard Hughes <richard hughsie com>
Date:   Mon May 30 23:08:00 2011 +0100

    color: Fix a critical warning when devices are removed
    
    It's a treeview, not a listview...

 panels/color/cc-color-panel.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/panels/color/cc-color-panel.c b/panels/color/cc-color-panel.c
index e7bcd43..6413693 100644
--- a/panels/color/cc-color-panel.c
+++ b/panels/color/cc-color-panel.c
@@ -870,7 +870,7 @@ gcm_prefs_devices_treeview_clicked_cb (GtkTreeSelection *selection,
 
   /* get selection */
   if (!gtk_tree_selection_get_selected (selection, &model, &iter))
-    g_assert_not_reached ();
+    return;
 
   gtk_tree_model_get (model, &iter,
                       GCM_PREFS_COLUMN_DEVICE, &device,
@@ -1622,7 +1622,7 @@ gcm_prefs_remove_device (CcColorPanel *prefs, CdDevice *cd_device)
                           -1);
       if (g_strcmp0 (id_tmp, id) == 0)
         {
-          gtk_list_store_remove (GTK_LIST_STORE(model), &iter);
+          gtk_tree_store_remove (GTK_TREE_STORE (model), &iter);
           g_free (id_tmp);
           break;
         }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]