[gnome-packagekit] Ignore the selection-changed after gtk_list_store_clear()
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-packagekit] Ignore the selection-changed after gtk_list_store_clear()
- Date: Mon, 4 Mar 2013 11:01:33 +0000 (UTC)
commit b8828b21326a609a5a70d22700301d25d955dcd7
Author: Richard Hughes <richard hughsie com>
Date: Mon Mar 4 11:00:40 2013 +0000
Ignore the selection-changed after gtk_list_store_clear()
GTK now seems to fire off an even for each package, which causes a GetDetails()
call for each package in the treeview.
src/gpk-application.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/gpk-application.c b/src/gpk-application.c
index 7878182..ee4c546 100644
--- a/src/gpk-application.c
+++ b/src/gpk-application.c
@@ -1153,8 +1153,8 @@ static void
gpk_application_clear_packages (GpkApplicationPrivate *priv)
{
/* clear existing array */
- gtk_list_store_clear (priv->packages_store);
priv->has_package = FALSE;
+ gtk_list_store_clear (priv->packages_store);
}
/**
@@ -2292,6 +2292,10 @@ gpk_application_packages_treeview_clicked_cb (GtkTreeSelection *selection, GpkAp
gchar *package_id = NULL;
gchar *summary = NULL;
+ /* ignore selection changed if we've just cleared the package list */
+ if (!priv->has_package)
+ return;
+
/* This will only work in single or browse selection mode! */
if (!gtk_tree_selection_get_selected (selection, &model, &iter)) {
g_debug ("no row selected");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]