[gnome-packagekit] When the user clicks hide, do so until the session is restarted. Fixes rh#507062
- From: Richard Hughes <rhughes src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnome-packagekit] When the user clicks hide, do so until the session is restarted. Fixes rh#507062
- Date: Mon, 22 Jun 2009 05:56:53 -0400 (EDT)
commit 9d325f19f37fc7115f07e508cc8c074a0b4903fb
Author: Richard Hughes <richard hughsie com>
Date: Mon Jun 22 10:55:42 2009 +0100
When the user clicks hide, do so until the session is restarted. Fixes rh#507062
src/gpk-watch.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/gpk-watch.c b/src/gpk-watch.c
index 1657043..1ad3a5c 100644
--- a/src/gpk-watch.c
+++ b/src/gpk-watch.c
@@ -77,6 +77,7 @@ struct GpkWatchPrivate
PolKitGnomeAction *restart_action;
guint set_proxy_timeout;
gchar *error_details;
+ gboolean hide_warning;
};
typedef struct {
@@ -325,7 +326,8 @@ gpk_watch_refresh_icon (GpkWatch *watch)
}
/* any restart required? */
- if (watch->priv->restart != PK_RESTART_ENUM_NONE) {
+ if (watch->priv->restart != PK_RESTART_ENUM_NONE &&
+ watch->priv->hide_warning == FALSE) {
icon_name = gpk_restart_enum_to_dialog_icon_name (watch->priv->restart);
goto out;
}
@@ -1199,7 +1201,8 @@ gpk_watch_menu_hide_restart_cb (GtkMenuItem *item, gpointer data)
g_return_if_fail (GPK_IS_WATCH (watch));
/* hide */
- gtk_status_icon_set_visible (watch->priv->status_icon, FALSE);
+ watch->priv->hide_warning = TRUE;
+ gpk_watch_refresh_icon (watch);
}
/**
@@ -1566,6 +1569,7 @@ gpk_watch_init (GpkWatch *watch)
watch->priv->error_details = NULL;
watch->priv->notification_cached_messages = NULL;
watch->priv->restart = PK_RESTART_ENUM_NONE;
+ watch->priv->hide_warning = FALSE;
watch->priv->gconf_client = gconf_client_get_default ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]