diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-06-03 17:00:44 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-06-03 20:52:25 +0800 |
commit | b9c8f8942d4d01118e73f6abddfd53d284b865c6 (patch) | |
tree | 6ae138449c2e87144ce774a2fb9609de68ccb299 /src/empathy-main-window.c | |
parent | 8229e3eeedecaebce510ff1197dc3412e00bc5f7 (diff) | |
download | gsoc2013-empathy-b9c8f8942d4d01118e73f6abddfd53d284b865c6.tar gsoc2013-empathy-b9c8f8942d4d01118e73f6abddfd53d284b865c6.tar.gz gsoc2013-empathy-b9c8f8942d4d01118e73f6abddfd53d284b865c6.tar.bz2 gsoc2013-empathy-b9c8f8942d4d01118e73f6abddfd53d284b865c6.tar.lz gsoc2013-empathy-b9c8f8942d4d01118e73f6abddfd53d284b865c6.tar.xz gsoc2013-empathy-b9c8f8942d4d01118e73f6abddfd53d284b865c6.tar.zst gsoc2013-empathy-b9c8f8942d4d01118e73f6abddfd53d284b865c6.zip |
factor out join_chatroom
Diffstat (limited to 'src/empathy-main-window.c')
-rw-r--r-- | src/empathy-main-window.c | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/src/empathy-main-window.c b/src/empathy-main-window.c index ae1667622..22c6838a2 100644 --- a/src/empathy-main-window.c +++ b/src/empathy-main-window.c @@ -853,23 +853,33 @@ main_window_view_show_map_cb (GtkCheckMenuItem *item, } static void -main_window_favorite_chatroom_join (EmpathyChatroom *chatroom) +join_chatroom (EmpathyChatroom *chatroom, + gint64 timestamp) { TpAccount *account; TpConnection *connection; const gchar *room; account = empathy_chatroom_get_account (chatroom); - if (tp_account_get_connection_status (account, NULL) != - TP_CONNECTION_STATUS_CONNECTED) - return; connection = tp_account_get_connection (account); g_assert (connection != NULL); room = empathy_chatroom_get_room (chatroom); DEBUG ("Requesting channel for '%s'", room); - empathy_dispatcher_join_muc (connection, room, - gtk_get_current_event_time (), NULL, NULL); + empathy_dispatcher_join_muc (connection, room, timestamp, NULL, NULL); +} + +static void +main_window_favorite_chatroom_join (EmpathyChatroom *chatroom) +{ + TpAccount *account; + + account = empathy_chatroom_get_account (chatroom); + if (tp_account_get_connection_status (account, NULL) != + TP_CONNECTION_STATUS_CONNECTED) + return; + + join_chatroom (chatroom, gtk_get_current_event_time ()); } static void |