aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@src.gnome.org>2008-01-17 23:03:40 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2008-01-17 23:03:40 +0800
commit24cf25ebdc9dd603906f9dd4e0b7e81f047126c6 (patch)
treec3ac84cc4bfe2e8474213cda7b1b54edd8159690
parent908f519a2f59c8de087a4c654ef2792fa4b1d4b4 (diff)
downloadgsoc2013-empathy-24cf25ebdc9dd603906f9dd4e0b7e81f047126c6.tar
gsoc2013-empathy-24cf25ebdc9dd603906f9dd4e0b7e81f047126c6.tar.gz
gsoc2013-empathy-24cf25ebdc9dd603906f9dd4e0b7e81f047126c6.tar.bz2
gsoc2013-empathy-24cf25ebdc9dd603906f9dd4e0b7e81f047126c6.tar.lz
gsoc2013-empathy-24cf25ebdc9dd603906f9dd4e0b7e81f047126c6.tar.xz
gsoc2013-empathy-24cf25ebdc9dd603906f9dd4e0b7e81f047126c6.tar.zst
gsoc2013-empathy-24cf25ebdc9dd603906f9dd4e0b7e81f047126c6.zip
Do not set MAIN_WINDOW_HIDDEN gconf key if not needed
svn path=/trunk/; revision=572
-rw-r--r--libempathy-gtk/empathy-status-icon.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/libempathy-gtk/empathy-status-icon.c b/libempathy-gtk/empathy-status-icon.c
index 0fd6c0d67..e760305b1 100644
--- a/libempathy-gtk/empathy-status-icon.c
+++ b/libempathy-gtk/empathy-status-icon.c
@@ -101,7 +101,8 @@ static void status_icon_idle_notify_cb (EmpathyStatusIcon *icon)
static void status_icon_update_tooltip (EmpathyStatusIcon *icon);
static void status_icon_set_from_state (EmpathyStatusIcon *icon);
static void status_icon_set_visibility (EmpathyStatusIcon *icon,
- gboolean visible);
+ gboolean visible,
+ gboolean store);
static void status_icon_toggle_visibility (EmpathyStatusIcon *icon);
static void status_icon_activate_cb (GtkStatusIcon *status_icon,
EmpathyStatusIcon *icon);
@@ -273,7 +274,7 @@ empathy_status_icon_new (GtkWindow *window)
&should_hide);
if (gtk_window_is_active (priv->window) == should_hide) {
- status_icon_set_visibility (icon, !should_hide);
+ status_icon_set_visibility (icon, !should_hide, FALSE);
}
return icon;
@@ -416,14 +417,17 @@ status_icon_set_from_state (EmpathyStatusIcon *icon)
static void
status_icon_set_visibility (EmpathyStatusIcon *icon,
- gboolean visible)
+ gboolean visible,
+ gboolean store)
{
EmpathyStatusIconPriv *priv;
priv = GET_PRIV (icon);
- empathy_conf_set_bool (empathy_conf_get (),
- EMPATHY_PREFS_UI_MAIN_WINDOW_HIDDEN, !visible);
+ if (store) {
+ empathy_conf_set_bool (empathy_conf_get (),
+ EMPATHY_PREFS_UI_MAIN_WINDOW_HIDDEN, !visible);
+ }
if (!visible) {
empathy_window_iconify (priv->window, priv->icon);
@@ -451,7 +455,7 @@ status_icon_toggle_visibility (EmpathyStatusIcon *icon)
gboolean visible;
visible = gtk_window_is_active (priv->window);
- status_icon_set_visibility (icon, !visible);
+ status_icon_set_visibility (icon, !visible, TRUE);
}
static void
@@ -477,7 +481,7 @@ status_icon_delete_event_cb (GtkWidget *widget,
GdkEvent *event,
EmpathyStatusIcon *icon)
{
- status_icon_set_visibility (icon, FALSE);
+ status_icon_set_visibility (icon, FALSE, TRUE);
return TRUE;
}
@@ -569,7 +573,7 @@ status_icon_show_hide_window_cb (GtkWidget *widget,
gboolean visible;
visible = gtk_check_menu_item_get_active (GTK_CHECK_MENU_ITEM (widget));
- status_icon_set_visibility (icon, visible);
+ status_icon_set_visibility (icon, visible, TRUE);
}
static void