[gnome-control-center] network: Fix gtk_tree_model_get_iter_first() retval
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] network: Fix gtk_tree_model_get_iter_first() retval
- Date: Wed, 27 May 2015 09:06:49 +0000 (UTC)
commit 3569b2d289b2ae443db995ce559b57431fd8e195
Author: Bastien Nocera <hadess hadess net>
Date: Tue May 26 13:22:29 2015 +0200
network: Fix gtk_tree_model_get_iter_first() retval
And don't select the first item when removing the item fails.
https://bugzilla.gnome.org/show_bug.cgi?id=749892
panels/network/cc-network-panel.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/panels/network/cc-network-panel.c b/panels/network/cc-network-panel.c
index e5b6a01..d423d2e 100644
--- a/panels/network/cc-network-panel.c
+++ b/panels/network/cc-network-panel.c
@@ -471,10 +471,10 @@ object_removed_cb (NetObject *object, CcNetworkPanel *panel)
if (g_strcmp0 (net_object_get_id (object),
net_object_get_id (object_tmp)) == 0) {
g_object_unref (object_tmp);
- if (!gtk_list_store_remove (GTK_LIST_STORE (model), &iter))
- gtk_tree_model_get_iter_first (model, &iter);
- gtk_tree_selection_select_iter (selection, &iter);
-
+ if (gtk_list_store_remove (GTK_LIST_STORE (model), &iter)) {
+ if (gtk_tree_model_get_iter_first (model, &iter))
+ gtk_tree_selection_select_iter (selection, &iter);
+ }
break;
}
g_object_unref (object_tmp);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]