svn path=/trunk/; revision=48
window);
main_window_update_status (window);
window);
main_window_update_status (window);
- gtk_widget_show (window->window);
#include "gossip-presence-chooser.h"
#include "gossip-preferences.h"
#include "gossip-ui-utils.h"
#include "gossip-presence-chooser.h"
#include "gossip-preferences.h"
#include "gossip-ui-utils.h"
+#include "gossip-accounts-dialog.h"
#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), \
EMPATHY_TYPE_STATUS_ICON, EmpathyStatusIconPriv))
#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), \
EMPATHY_TYPE_STATUS_ICON, EmpathyStatusIconPriv))
{
EmpathyStatusIconPriv *priv;
EmpathyStatusIcon *icon;
{
EmpathyStatusIconPriv *priv;
EmpathyStatusIcon *icon;
+ gboolean should_hide;
+ gboolean visible;
g_return_val_if_fail (GTK_IS_WINDOW (window), NULL);
g_return_val_if_fail (GTK_IS_WINDOW (window), NULL);
G_CALLBACK (status_icon_delete_event_cb),
icon);
G_CALLBACK (status_icon_delete_event_cb),
icon);
+ gossip_conf_get_bool (gossip_conf_get (),
+ GOSSIP_PREFS_UI_MAIN_WINDOW_HIDDEN,
+ &should_hide);
+ visible = gossip_window_get_is_visible (window);
+
+ if ((!should_hide && !visible) || (should_hide && visible)) {
+ status_icon_toggle_visibility (icon);
+ }
+
gossip_conf_set_bool (gossip_conf_get (),
GOSSIP_PREFS_UI_MAIN_WINDOW_HIDDEN, TRUE);
} else {
gossip_conf_set_bool (gossip_conf_get (),
GOSSIP_PREFS_UI_MAIN_WINDOW_HIDDEN, TRUE);
} else {
gossip_window_present (GTK_WINDOW (priv->window), TRUE);
gossip_conf_set_bool (gossip_conf_get (),
GOSSIP_PREFS_UI_MAIN_WINDOW_HIDDEN, FALSE);
gossip_window_present (GTK_WINDOW (priv->window), TRUE);
gossip_conf_set_bool (gossip_conf_get (),
GOSSIP_PREFS_UI_MAIN_WINDOW_HIDDEN, FALSE);
+
+ /* Show the accounts dialog if there is no enabled accounts */
+ accounts = mc_accounts_list_by_enabled (TRUE);
+ if (accounts) {
+ mc_accounts_list_free (accounts);
+ } else {
+ gossip_debug (DEBUG_DOMAIN,
+ "No enabled account, Showing account dialog");
+ gossip_accounts_dialog_show ();
+ }
#include <libempathy/gossip-presence.h>
#include <libempathy-gtk/empathy-main-window.h>
#include <libempathy-gtk/empathy-status-icon.h>
#include <libempathy/gossip-presence.h>
#include <libempathy-gtk/empathy-main-window.h>
#include <libempathy-gtk/empathy-status-icon.h>
-#include <libempathy-gtk/gossip-accounts-dialog.h>
#include "empathy-filter.h"
#include "empathy-filter.h"
int
main (int argc, char *argv[])
{
int
main (int argc, char *argv[])
{
EmpathyStatusIcon *icon;
GtkWidget *window;
MissionControl *mc;
EmpathyStatusIcon *icon;
GtkWidget *window;
MissionControl *mc;
window = empathy_main_window_show ();
icon = empathy_status_icon_new (GTK_WINDOW (window));
window = empathy_main_window_show ();
icon = empathy_status_icon_new (GTK_WINDOW (window));
- /* Show the accounts dialog if there is no enabled accounts */
- accounts = mc_accounts_list_by_enabled (TRUE);
- if (accounts) {
- mc_accounts_list_free (accounts);
- } else {
- gossip_accounts_dialog_show ();
- }
-
gtk_main ();
mission_control_set_presence (mc,
gtk_main ();
mission_control_set_presence (mc,