[gnome-packagekit] Don't autoclose when no updates but distro upgrades are available
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-packagekit] Don't autoclose when no updates but distro upgrades are available
- Date: Tue, 18 Oct 2011 09:34:35 +0000 (UTC)
commit 09dfa47d4f4ad3f024c167c4f632a383beccd190
Author: Richard Hughes <richard hughsie com>
Date: Tue Oct 18 10:31:10 2011 +0100
Don't autoclose when no updates but distro upgrades are available
Resolves https://bugzilla.gnome.org/show_bug.cgi?id=662055
src/gpk-update-viewer.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/src/gpk-update-viewer.c b/src/gpk-update-viewer.c
index 84d6523..74c5d1d 100644
--- a/src/gpk-update-viewer.c
+++ b/src/gpk-update-viewer.c
@@ -73,6 +73,7 @@ static GtkWidget *info_mobile = NULL;
static GtkWidget *info_mobile_label = NULL;
static GtkApplication *application = NULL;
static PkBitfield roles = 0;
+static gboolean have_available_distro_upgrades = FALSE;
enum {
GPK_UPDATES_COLUMN_TEXT,
@@ -1407,7 +1408,8 @@ gpk_update_viewer_modal_error_with_timeout (const gchar *title, const gchar *mes
}
/* exit the program */
- gpk_update_viewer_quit ();
+ if (!have_available_distro_upgrades)
+ gpk_update_viewer_quit ();
}
/**
@@ -3070,6 +3072,9 @@ gpk_update_viewer_get_distro_upgrades_cb (PkClient *client, GAsyncResult *res, g
widget = GTK_WIDGET(gtk_builder_get_object (builder, "viewport_upgrade"));
gtk_widget_show (widget);
+ /* don't autoclose when upgrades */
+ have_available_distro_upgrades = TRUE;
+
/* get model */
gpk_update_viewer_reconsider_info ();
out:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]