diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-11-23 16:51:18 +0100 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-11-23 16:51:18 +0100 |
commit | d31b11f9a972b509f00fdd565cccdff8e38ec873 (patch) | |
tree | 0594a355bcdbfd8dfeb24d3812550b712a037ede /telepathy-logger/log-manager.c | |
parent | 13669d2508f1a8caacc838ea1bcd45f42ee1fbc1 (diff) | |
download | telepathy-logger-d31b11f9a972b509f00fdd565cccdff8e38ec873.tar.gz |
factor out copy_date()
Diffstat (limited to 'telepathy-logger/log-manager.c')
-rw-r--r-- | telepathy-logger/log-manager.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/telepathy-logger/log-manager.c b/telepathy-logger/log-manager.c index 5cb94cf..97fd025 100644 --- a/telepathy-logger/log-manager.c +++ b/telepathy-logger/log-manager.c @@ -929,6 +929,13 @@ _tpl_log_manager_add_message_async (TplLogManager *manager, g_object_unref (simple); } +/* There is no g_date_copy() */ +static GDate * +copy_date (const GDate *date) +{ + return g_date_new_julian (g_date_get_julian (date)); +} + /** * tpl_log_manager_get_dates_finish: * @self: a #TplLogManager @@ -1147,8 +1154,7 @@ tpl_log_manager_get_messages_for_date_async (TplLogManager *manager, chat_info->account = g_object_ref (account); chat_info->chat_id = g_strdup (chat_id); chat_info->is_chatroom = is_chatroom; - /* There is no g_date_copy() */ - chat_info->date = g_date_new_julian (g_date_get_julian (date)); + chat_info->date = copy_date (date); async_data->manager = g_object_ref (manager); async_data->request = chat_info; |