diff options
author | Xavier Claessens <xclaesse@src.gnome.org> | 2007-05-10 17:02:17 +0800 |
---|---|---|
committer | Xavier Claessens <xclaesse@src.gnome.org> | 2007-05-10 17:02:17 +0800 |
commit | cba1e6d2a95193cab71914016840c8f317cb5e2d (patch) | |
tree | 8dc958a79333d3913c7d1a0e8591490bc11626be /src | |
parent | c8af87e2c62a9fcd9e3ddc0836b4975fa7011622 (diff) | |
download | gsoc2013-empathy-cba1e6d2a95193cab71914016840c8f317cb5e2d.tar gsoc2013-empathy-cba1e6d2a95193cab71914016840c8f317cb5e2d.tar.gz gsoc2013-empathy-cba1e6d2a95193cab71914016840c8f317cb5e2d.tar.bz2 gsoc2013-empathy-cba1e6d2a95193cab71914016840c8f317cb5e2d.tar.lz gsoc2013-empathy-cba1e6d2a95193cab71914016840c8f317cb5e2d.tar.xz gsoc2013-empathy-cba1e6d2a95193cab71914016840c8f317cb5e2d.tar.zst gsoc2013-empathy-cba1e6d2a95193cab71914016840c8f317cb5e2d.zip |
[darcs-to-svn @ Improved EmpathyStatusIcon and GossipPresenceChooser]
svn path=/trunk/; revision=43
Diffstat (limited to 'src')
-rw-r--r-- | src/empathy-main.c | 45 |
1 files changed, 6 insertions, 39 deletions
diff --git a/src/empathy-main.c b/src/empathy-main.c index c2cb2ec51..6780ff680 100644 --- a/src/empathy-main.c +++ b/src/empathy-main.c @@ -53,10 +53,6 @@ static void operation_error_cb (MissionControl *mc, guint error_code, gpointer user_data); static void start_mission_control (MissionControl *mc); -static void destroy_cb (GtkWidget *window, - MissionControl *mc); -static void icon_activate_cb (EmpathyStatusIcon *icon, - GtkWidget *window); static void error_cb (MissionControl *mc, @@ -117,28 +113,6 @@ start_mission_control (MissionControl *mc) } static void -destroy_cb (GtkWidget *window, - MissionControl *mc) -{ - mission_control_set_presence (mc, - MC_PRESENCE_OFFLINE, - NULL, NULL, NULL); - - gtk_main_quit (); -} - -static void -icon_activate_cb (EmpathyStatusIcon *icon, - GtkWidget *window) -{ - if (GTK_WIDGET_VISIBLE (window)) { - gtk_widget_hide (window); - } else { - gtk_widget_show (window); - } -} - -static void new_channel_cb (EmpathyFilter *filter, TpConn *tp_conn, TpChan *tp_chan, @@ -182,20 +156,9 @@ main (int argc, char *argv[]) NULL); start_mission_control (mc); - /* Setting up the main window */ + /* Setting up UI */ window = empathy_main_window_show (); - g_signal_connect (window, "destroy", - G_CALLBACK (destroy_cb), - mc); - g_signal_connect (window, "delete-event", - G_CALLBACK (gtk_widget_hide_on_delete), - NULL); - - /* Setting up the status icon */ - icon = empathy_status_icon_new (); - g_signal_connect (icon, "activate", - G_CALLBACK (icon_activate_cb), - window); + 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); @@ -207,6 +170,10 @@ main (int argc, char *argv[]) gtk_main (); + mission_control_set_presence (mc, + MC_PRESENCE_OFFLINE, + NULL, NULL, NULL); + g_object_unref (monitor); g_object_unref (mc); g_object_unref (icon); |