aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@src.gnome.org>2007-05-10 02:11:17 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2007-05-10 02:11:17 +0800
commit2d37182c552903037bbba5cf6df6a57fcdeca80b (patch)
treea4b085bebee93f17b280415a10d4020b17de6686
parent747a707e7dda44eb3b84a1afb9ebdb150a629a9a (diff)
downloadgsoc2013-empathy-2d37182c552903037bbba5cf6df6a57fcdeca80b.tar
gsoc2013-empathy-2d37182c552903037bbba5cf6df6a57fcdeca80b.tar.gz
gsoc2013-empathy-2d37182c552903037bbba5cf6df6a57fcdeca80b.tar.bz2
gsoc2013-empathy-2d37182c552903037bbba5cf6df6a57fcdeca80b.tar.lz
gsoc2013-empathy-2d37182c552903037bbba5cf6df6a57fcdeca80b.tar.xz
gsoc2013-empathy-2d37182c552903037bbba5cf6df6a57fcdeca80b.tar.zst
gsoc2013-empathy-2d37182c552903037bbba5cf6df6a57fcdeca80b.zip
[darcs-to-svn @ Automatically set presence to available when starting and to offline when exiting]
svn path=/trunk/; revision=40
-rw-r--r--src/empathy-main.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/empathy-main.c b/src/empathy-main.c
index 077e1a6b6..47f2c566f 100644
--- a/src/empathy-main.c
+++ b/src/empathy-main.c
@@ -36,7 +36,6 @@
#include <libempathy/gossip-debug.h>
#include <libempathy-gtk/empathy-main-window.h>
#include <libempathy-gtk/empathy-images.h>
-#include <libempathy-gtk/gossip-status-presets.h>
#include <libempathy-gtk/gossip-accounts-dialog.h>
#include "empathy-filter.h"
@@ -50,7 +49,7 @@ static void service_ended_cb (MissionControl *mc,
gpointer user_data);
static void start_mission_control (MissionControl *mc);
static void destroy_cb (GtkWidget *window,
- gpointer user_data);
+ MissionControl *mc);
static void icon_activate_cb (GtkStatusIcon *status_icon,
GtkWidget *window);
@@ -94,18 +93,21 @@ start_mission_control (MissionControl *mc)
gossip_debug (DEBUG_DOMAIN, "Starting Mission Control...");
- gossip_status_presets_get_all ();
mission_control_set_presence (mc,
- gossip_status_presets_get_default_state (),
- gossip_status_presets_get_default_status (),
+ MC_PRESENCE_AVAILABLE,
+ NULL,
(McCallback) error_cb,
NULL);
}
static void
-destroy_cb (GtkWidget *window,
- gpointer user_data)
+destroy_cb (GtkWidget *window,
+ MissionControl *mc)
{
+ mission_control_set_presence (mc,
+ MC_PRESENCE_OFFLINE,
+ NULL, NULL, NULL);
+
gtk_main_quit ();
}
@@ -165,7 +167,7 @@ main (int argc, char *argv[])
window = empathy_main_window_show ();
g_signal_connect (window, "destroy",
G_CALLBACK (destroy_cb),
- NULL);
+ mc);
g_signal_connect (window, "delete-event",
G_CALLBACK (gtk_widget_hide_on_delete),
NULL);