aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorxclaesse <xclaesse@4ee84921-47dd-4033-b63a-18d7a039a3e4>2007-05-10 02:11:17 +0800
committerxclaesse <xclaesse@4ee84921-47dd-4033-b63a-18d7a039a3e4>2007-05-10 02:11:17 +0800
commit0226314c98afdc6dedb97003316e4195503202d3 (patch)
treea4b085bebee93f17b280415a10d4020b17de6686 /src
parent53875e71dcc04b1197d97e654f43293c74557d92 (diff)
downloadgsoc2013-empathy-0226314c98afdc6dedb97003316e4195503202d3.tar
gsoc2013-empathy-0226314c98afdc6dedb97003316e4195503202d3.tar.gz
gsoc2013-empathy-0226314c98afdc6dedb97003316e4195503202d3.tar.bz2
gsoc2013-empathy-0226314c98afdc6dedb97003316e4195503202d3.tar.lz
gsoc2013-empathy-0226314c98afdc6dedb97003316e4195503202d3.tar.xz
gsoc2013-empathy-0226314c98afdc6dedb97003316e4195503202d3.tar.zst
gsoc2013-empathy-0226314c98afdc6dedb97003316e4195503202d3.zip
[darcs-to-svn @ Automatically set presence to available when starting and to offline when exiting]
git-svn-id: svn+ssh://svn.gnome.org/svn/empathy/trunk@40 4ee84921-47dd-4033-b63a-18d7a039a3e4
Diffstat (limited to 'src')
-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);