empathy r572 - trunk/libempathy-gtk
- From: xclaesse svn gnome org
- To: svn-commits-list gnome org
- Subject: empathy r572 - trunk/libempathy-gtk
- Date: Thu, 17 Jan 2008 15:03:40 +0000 (GMT)
Author: xclaesse
Date: Thu Jan 17 15:03:40 2008
New Revision: 572
URL: http://svn.gnome.org/viewvc/empathy?rev=572&view=rev
Log:
Do not set MAIN_WINDOW_HIDDEN gconf key if not needed
Modified:
trunk/libempathy-gtk/empathy-status-icon.c
Modified: trunk/libempathy-gtk/empathy-status-icon.c
==============================================================================
--- trunk/libempathy-gtk/empathy-status-icon.c (original)
+++ trunk/libempathy-gtk/empathy-status-icon.c Thu Jan 17 15:03:40 2008
@@ -101,7 +101,8 @@
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 @@
&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 @@
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 @@
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 @@
GdkEvent *event,
EmpathyStatusIcon *icon)
{
- status_icon_set_visibility (icon, FALSE);
+ status_icon_set_visibility (icon, FALSE, TRUE);
return TRUE;
}
@@ -569,7 +573,7 @@
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]