diff options
author | Elliott Sales de Andrade <qulogic@pidgin.im> | 2017-07-06 22:24:46 -0400 |
---|---|---|
committer | Elliott Sales de Andrade <qulogic@pidgin.im> | 2017-07-06 22:24:46 -0400 |
commit | 78e7451f6d919181b3555869d3547d3291f04e0e (patch) | |
tree | 9a1a315d8cf7a9216e336b49d8b0272bd8088318 | |
parent | a68518ba35e740e4807d8b0e9bc68608d85d5067 (diff) | |
parent | a3a3c060fc968a4a2017f83c3b507df0187b5870 (diff) | |
download | pidgin-78e7451f6d919181b3555869d3547d3291f04e0e.tar.gz |
Merge with default.
Drop startup-notification option from Meson build also.
69 files changed, 225 insertions, 303 deletions
diff --git a/ChangeLog.API b/ChangeLog.API index 4578364748..3a2e8df382 100644 --- a/ChangeLog.API +++ b/ChangeLog.API @@ -484,6 +484,7 @@ version 3.0.0 (??/??/????): * purple_status_type_set_primary_attr * purple_strlcat * purple_strlcpy + * purple_timeout_*. Use g_timeout_* or g_idle_* instead. * purple_txt_cancel * purple_txt_resolve_account * PurpleType, use GType instead. diff --git a/configure.ac b/configure.ac index c9062c96c3..ba77842dd6 100644 --- a/configure.ac +++ b/configure.ac @@ -520,10 +520,6 @@ AC_ARG_ENABLE(screensaver, [AS_HELP_STRING([--disable-screensaver], [compile without X screensaver extension (used to detect idleness)])], enable_screensaver="$enableval", enable_screensaver="yes") -AC_ARG_ENABLE(startup-notification, - [AS_HELP_STRING([--disable-startup-notification], - [compile without startup notification support])], - enable_startup_notification="$enableval", enable_startup_notification="yes") AC_ARG_ENABLE(enchant, [AS_HELP_STRING([--disable-enchant], [compile without Enchant spell checking support])], @@ -750,7 +746,6 @@ else # GTK enable_cap=no enable_gevolution=no enable_screensaver=no - enable_startup_notification=no fi # GTK AM_CONDITIONAL(ENABLE_GTK, test "x$enable_gtkui" = "xyes") @@ -2132,7 +2127,6 @@ echo Install translations.......... : $enable_i18n echo Has you....................... : yes echo echo Use XScreenSaver Extension.... : $enable_screensaver -echo Use startup notification...... : $enable_startup_notification echo Build with Enchant support.... : $use_enchant echo Build with GCR widgets........ : $enable_gcr echo Build Unity integration plugin.: $enable_unity diff --git a/doc/reference/pidgin/pidgin-docs.xml b/doc/reference/pidgin/pidgin-docs.xml index fab6c76b04..c181fa63b0 100644 --- a/doc/reference/pidgin/pidgin-docs.xml +++ b/doc/reference/pidgin/pidgin-docs.xml @@ -64,7 +64,6 @@ <xi:include href="xml/gtkwebview.xml" /> <xi:include href="xml/gtkwebviewtoolbar.xml" /> <xi:include href="xml/gtkwhiteboard.xml" /> - <xi:include href="xml/gtksession.xml" /> <xi:include href="xml/pidgin.xml" /> </part> diff --git a/finch/gntblist.c b/finch/gntblist.c index d1fbada814..c111240531 100644 --- a/finch/gntblist.c +++ b/finch/gntblist.c @@ -338,7 +338,7 @@ reset_blist_node_ui_data(PurpleBlistNode *node) if (fnode == NULL) return; if (fnode->signed_timer) - purple_timeout_remove(fnode->signed_timer); + g_source_remove(fnode->signed_timer); g_free(fnode); purple_blist_node_set_ui_data(node, NULL); } @@ -816,8 +816,8 @@ add_group_cb(gpointer null, const char *group) * to turn on 'show empty groups' setting */ ggblist->new_group = g_list_prepend(ggblist->new_group, grp); if (ggblist->new_group_timeout) - purple_timeout_remove(ggblist->new_group_timeout); - ggblist->new_group_timeout = purple_timeout_add_seconds(SHOW_EMPTY_GROUP_TIMEOUT, + g_source_remove(ggblist->new_group_timeout); + ggblist->new_group_timeout = g_timeout_add_seconds(SHOW_EMPTY_GROUP_TIMEOUT, remove_new_empty_group, NULL); /* Select the group */ @@ -1970,13 +1970,13 @@ reset_blist_window(GntWidget *window, gpointer null) } if (ggblist->typing) - purple_timeout_remove(ggblist->typing); + g_source_remove(ggblist->typing); remove_peripherals(ggblist); if (ggblist->tagged) g_list_free(ggblist->tagged); if (ggblist->new_group_timeout) - purple_timeout_remove(ggblist->new_group_timeout); + g_source_remove(ggblist->new_group_timeout); if (ggblist->new_group) g_list_free(ggblist->new_group); @@ -2209,7 +2209,7 @@ remove_typing_cb(gpointer null) end: g_free(escnewmessage); if (ggblist->typing) - purple_timeout_remove(ggblist->typing); + g_source_remove(ggblist->typing); ggblist->typing = 0; return FALSE; } @@ -2228,7 +2228,7 @@ status_selection_changed(GntComboBox *box, StatusBoxItem *old, StatusBoxItem *no /* Move the focus to the entry box */ /* XXX: Make sure the selected status can have a message */ gnt_box_move_focus(GNT_BOX(ggblist->window), 1); - ggblist->typing = purple_timeout_add_seconds(TYPING_TIMEOUT_S, (GSourceFunc)remove_typing_cb, NULL); + ggblist->typing = g_timeout_add_seconds(TYPING_TIMEOUT_S, (GSourceFunc)remove_typing_cb, NULL); } else if (now->type == STATUS_SAVED_ALL) { @@ -2254,7 +2254,7 @@ status_text_changed(GntEntry *entry, const char *text, gpointer null) return FALSE; if (ggblist->typing) - purple_timeout_remove(ggblist->typing); + g_source_remove(ggblist->typing); ggblist->typing = 0; if (text[0] == '\r' && text[1] == 0) @@ -2264,7 +2264,7 @@ status_text_changed(GntEntry *entry, const char *text, gpointer null) return TRUE; } - ggblist->typing = purple_timeout_add_seconds(TYPING_TIMEOUT_S, (GSourceFunc)remove_typing_cb, NULL); + ggblist->typing = g_timeout_add_seconds(TYPING_TIMEOUT_S, (GSourceFunc)remove_typing_cb, NULL); return FALSE; } @@ -2506,7 +2506,7 @@ buddy_recent_signed_on_off(gpointer data) PurpleBlistNode *node = data; FinchBlistNode *fnode = purple_blist_node_get_ui_data(node); - purple_timeout_remove(fnode->signed_timer); + g_source_remove(fnode->signed_timer); fnode->signed_timer = 0; if (!ggblist->manager->can_add_node(node)) { @@ -2530,10 +2530,10 @@ buddy_signed_on_off_cb(gpointer data) return FALSE; if (fnode->signed_timer) - purple_timeout_remove(fnode->signed_timer); + g_source_remove(fnode->signed_timer); g_object_ref(node); - fnode->signed_timer = purple_timeout_add_seconds(6, (GSourceFunc)buddy_recent_signed_on_off, data); + fnode->signed_timer = g_timeout_add_seconds(6, (GSourceFunc)buddy_recent_signed_on_off, data); update_node_display(node, ggblist); if (purple_blist_node_get_parent(node) && PURPLE_IS_CONTACT(purple_blist_node_get_parent(node))) update_node_display(purple_blist_node_get_parent(node), ggblist); diff --git a/finch/gntsound.c b/finch/gntsound.c index b8c288697c..6c35677cb0 100644 --- a/finch/gntsound.c +++ b/finch/gntsound.c @@ -281,7 +281,7 @@ account_signon_cb(PurpleConnection *gc, gpointer data) if (mute_login_sounds_timeout != 0) g_source_remove(mute_login_sounds_timeout); mute_login_sounds = TRUE; - mute_login_sounds_timeout = purple_timeout_add_seconds(10, unmute_login_sounds_cb, NULL); + mute_login_sounds_timeout = g_timeout_add_seconds(10, unmute_login_sounds_cb, NULL); } static void * diff --git a/finch/plugins/gntgf.c b/finch/plugins/gntgf.c index acbccb2115..aaee0f32af 100644 --- a/finch/plugins/gntgf.c +++ b/finch/plugins/gntgf.c @@ -76,7 +76,7 @@ destroy_toaster(GntToast *toast) { toasters = g_list_remove(toasters, toast); gnt_widget_destroy(toast->window); - purple_timeout_remove(toast->timer); + g_source_remove(toast->timer); g_free(toast); } @@ -221,7 +221,7 @@ notify(PurpleConversation *conv, const char *fmt, ...) } gnt_widget_draw(window); - toast->timer = purple_timeout_add_seconds(4, (GSourceFunc)remove_toaster, toast); + toast->timer = g_timeout_add_seconds(4, (GSourceFunc)remove_toaster, toast); toasters = g_list_prepend(toasters, toast); } diff --git a/libpurple/account.c b/libpurple/account.c index 4f9c78fc10..ee985f2211 100644 --- a/libpurple/account.c +++ b/libpurple/account.c @@ -217,7 +217,7 @@ purple_account_register_completed(PurpleAccount *account, gboolean succeeded) closure->account = g_object_ref(account); closure->succeeded = succeeded; - purple_timeout_add(0, purple_account_register_completed_cb, closure); + g_timeout_add(0, purple_account_register_completed_cb, closure); } void @@ -1066,7 +1066,7 @@ purple_account_set_public_alias(PurpleAccount *account, g_new0(struct public_alias_closure, 1); closure->account = g_object_ref(account); closure->failure_cb = failure_cb; - purple_timeout_add(0, set_public_alias_unsupported, closure); + g_timeout_add(0, set_public_alias_unsupported, closure); } } @@ -1106,7 +1106,7 @@ purple_account_get_public_alias(PurpleAccount *account, g_new0(struct public_alias_closure, 1); closure->account = g_object_ref(account); closure->failure_cb = failure_cb; - purple_timeout_add(0, get_public_alias_unsupported, closure); + g_timeout_add(0, get_public_alias_unsupported, closure); } } diff --git a/libpurple/accounts.c b/libpurple/accounts.c index 0347a8cac7..5c2a9ed7d5 100644 --- a/libpurple/accounts.c +++ b/libpurple/accounts.c @@ -86,7 +86,7 @@ void purple_accounts_schedule_save(void) { if (save_timer == 0) - save_timer = purple_timeout_add_seconds(5, save_cb, NULL); + save_timer = g_timeout_add_seconds(5, save_cb, NULL); } static void @@ -998,7 +998,7 @@ purple_accounts_uninit(void) gpointer handle = purple_accounts_get_handle(); if (save_timer != 0) { - purple_timeout_remove(save_timer); + g_source_remove(save_timer); save_timer = 0; sync_accounts(); } diff --git a/libpurple/buddylist.c b/libpurple/buddylist.c index c3634a0ec2..c8c269ba79 100644 --- a/libpurple/buddylist.c +++ b/libpurple/buddylist.c @@ -433,7 +433,7 @@ static void _purple_blist_schedule_save() { if (save_timer == 0) - save_timer = purple_timeout_add_seconds(5, save_cb, NULL); + save_timer = g_timeout_add_seconds(5, save_cb, NULL); } static void @@ -2045,7 +2045,7 @@ purple_blist_uninit(void) return; if (save_timer != 0) { - purple_timeout_remove(save_timer); + g_source_remove(save_timer); save_timer = 0; purple_blist_sync(); } diff --git a/libpurple/connection.c b/libpurple/connection.c index 5170103b0a..12ac457daf 100644 --- a/libpurple/connection.c +++ b/libpurple/connection.c @@ -146,12 +146,12 @@ update_keepalive(PurpleConnection *gc, gboolean on) if (on && !priv->keepalive) { purple_debug_info("connection", "Activating keepalive.\n"); - priv->keepalive = purple_timeout_add_seconds(KEEPALIVE_INTERVAL, send_keepalive, gc); + priv->keepalive = g_timeout_add_seconds(KEEPALIVE_INTERVAL, send_keepalive, gc); } else if (!on && priv->keepalive > 0) { purple_debug_info("connection", "Deactivating keepalive.\n"); - purple_timeout_remove(priv->keepalive); + g_source_remove(priv->keepalive); priv->keepalive = 0; } } @@ -504,7 +504,7 @@ purple_connection_error (PurpleConnection *gc, purple_signal_emit(purple_connections_get_handle(), "connection-error", gc, reason, description); - priv->disconnect_timeout = purple_timeout_add(0, purple_connection_disconnect_cb, + priv->disconnect_timeout = g_timeout_add(0, purple_connection_disconnect_cb, purple_connection_get_account(gc)); } @@ -868,7 +868,7 @@ purple_connection_finalize(GObject *object) purple_connection_error_info_free(priv->error_info); if (priv->disconnect_timeout > 0) - purple_timeout_remove(priv->disconnect_timeout); + g_source_remove(priv->disconnect_timeout); purple_str_wipe(priv->password); g_free(priv->display_name); diff --git a/libpurple/conversationtypes.c b/libpurple/conversationtypes.c index 67e078c551..74b97dd8e6 100644 --- a/libpurple/conversationtypes.c +++ b/libpurple/conversationtypes.c @@ -258,7 +258,7 @@ purple_im_conversation_start_typing_timeout(PurpleIMConversation *im, int timeou if (priv->typing_timeout > 0) purple_im_conversation_stop_typing_timeout(im); - priv->typing_timeout = purple_timeout_add_seconds(timeout, reset_typing_cb, im); + priv->typing_timeout = g_timeout_add_seconds(timeout, reset_typing_cb, im); } void @@ -271,7 +271,7 @@ purple_im_conversation_stop_typing_timeout(PurpleIMConversation *im) if (priv->typing_timeout == 0) return; - purple_timeout_remove(priv->typing_timeout); + g_source_remove(priv->typing_timeout); priv->typing_timeout = 0; } @@ -315,7 +315,7 @@ purple_im_conversation_start_send_typed_timeout(PurpleIMConversation *im) g_return_if_fail(priv != NULL); - priv->send_typed_timeout = purple_timeout_add_seconds(SEND_TYPED_TIMEOUT_SECONDS, + priv->send_typed_timeout = g_timeout_add_seconds(SEND_TYPED_TIMEOUT_SECONDS, send_typed_cb, im); } @@ -329,7 +329,7 @@ purple_im_conversation_stop_send_typed_timeout(PurpleIMConversation *im) if (priv->send_typed_timeout == 0) return; - purple_timeout_remove(priv->send_typed_timeout); + g_source_remove(priv->send_typed_timeout); priv->send_typed_timeout = 0; } diff --git a/libpurple/core.h b/libpurple/core.h index 679dec0f0a..07ab82d7ce 100644 --- a/libpurple/core.h +++ b/libpurple/core.h @@ -109,13 +109,13 @@ void purple_core_quit(void); * purple_core_quit_cb: * * Calls purple_core_quit(). This can be used as the function - * passed to purple_timeout_add() when you want to shutdown Purple + * passed to g_timeout_add() when you want to shutdown Purple * in a specified amount of time. When shutting down Purple * from a plugin, you must use this instead of purple_core_quit(); * for an immediate exit, use a timeout value of 0: * * <programlisting> - * purple_timeout_add(0, purple_core_quitcb, NULL) + * g_timeout_add(0, purple_core_quitcb, NULL) * </programlisting> * * This is ensures that code from your plugin is not being diff --git a/libpurple/eventloop.c b/libpurple/eventloop.c index 799cabba88..f9e141ed47 100644 --- a/libpurple/eventloop.c +++ b/libpurple/eventloop.c @@ -30,24 +30,6 @@ typedef struct _PurpleIOClosure { gpointer data; } PurpleIOClosure; -guint -purple_timeout_add(guint interval, GSourceFunc function, gpointer data) -{ - return g_timeout_add(interval, function, data); -} - -guint -purple_timeout_add_seconds(guint interval, GSourceFunc function, gpointer data) -{ - return g_timeout_add_seconds(interval, function, data); -} - -gboolean -purple_timeout_remove(guint tag) -{ - return g_source_remove(tag); -} - static gboolean purple_io_invoke(GIOChannel *source, GIOCondition condition, gpointer data) { diff --git a/libpurple/eventloop.h b/libpurple/eventloop.h index f2c48e0896..b952e0bb3a 100644 --- a/libpurple/eventloop.h +++ b/libpurple/eventloop.h @@ -62,54 +62,6 @@ G_BEGIN_DECLS /**************************************************************************/ /** - * purple_timeout_add: - * @interval: The time between calls of the function, in milliseconds. - * @function: (scope call): The function to call. - * @data: data to pass to @function. - * - * Creates a callback timer. - * - * The timer will repeat until the function returns %FALSE. The - * first call will be at the end of the first interval. - * - * If the timer is in a multiple of seconds, use purple_timeout_add_seconds() - * instead as it allows UIs to group timers for power efficiency. - * - * Returns: A handle to the timer which can be passed to - * purple_timeout_remove() to remove the timer. - */ -guint purple_timeout_add(guint interval, GSourceFunc function, gpointer data); - -/** - * purple_timeout_add_seconds: - * @interval: The time between calls of the function, in seconds. - * @function: (scope call): The function to call. - * @data: data to pass to @function. - * - * Creates a callback timer. - * - * The timer will repeat until the function returns %FALSE. The - * first call will be at the end of the first interval. - * - * This function allows UIs to group timers for better power efficiency. For - * this reason, @interval may be rounded by up to a second. - * - * Returns: A handle to the timer which can be passed to - * purple_timeout_remove() to remove the timer. - */ -guint purple_timeout_add_seconds(guint interval, GSourceFunc function, gpointer data); - -/** - * purple_timeout_remove: - * @handle: The handle, as returned by purple_timeout_add(). - * - * Removes a timeout handler. - * - * Returns: %TRUE if the handler was successfully removed. - */ -gboolean purple_timeout_remove(guint handle); - -/** * purple_input_add: * @fd: The input file descriptor. * @cond: The condition type. diff --git a/libpurple/http.c b/libpurple/http.c index cd51980e4e..7e1866106a 100644 --- a/libpurple/http.c +++ b/libpurple/http.c @@ -1782,7 +1782,7 @@ PurpleHttpConnection * purple_http_request(PurpleConnection *gc, _purple_http_reconnect(hc); - hc->timeout_handle = purple_timeout_add_seconds(request->timeout, + hc->timeout_handle = g_timeout_add_seconds(request->timeout, purple_http_request_timeout, hc); return hc; @@ -1822,9 +1822,9 @@ static PurpleHttpConnection * purple_http_connection_new( static void purple_http_connection_free(PurpleHttpConnection *hc) { if (hc->timeout_handle) - purple_timeout_remove(hc->timeout_handle); + g_source_remove(hc->timeout_handle); if (hc->watcher_delayed_handle) - purple_timeout_remove(hc->watcher_delayed_handle); + g_source_remove(hc->watcher_delayed_handle); if (hc->connection_set != NULL) purple_http_connection_set_remove(hc->connection_set, hc); @@ -2011,14 +2011,14 @@ static void purple_http_conn_notify_progress_watcher( { if (hc->watcher_delayed_handle) return; - hc->watcher_delayed_handle = purple_timeout_add_seconds( + hc->watcher_delayed_handle = g_timeout_add_seconds( 1 + hc->watcher_interval_threshold / 1000000, purple_http_conn_notify_progress_watcher_timeout, hc); return; } if (hc->watcher_delayed_handle) - purple_timeout_remove(hc->watcher_delayed_handle); + g_source_remove(hc->watcher_delayed_handle); hc->watcher_delayed_handle = 0; hc->watcher_last_call = now; @@ -2275,7 +2275,7 @@ purple_http_keepalive_host_free(gpointer _host) (GDestroyNotify)purple_http_socket_close_free); if (host->process_queue_timeout > 0) { - purple_timeout_remove(host->process_queue_timeout); + g_source_remove(host->process_queue_timeout); host->process_queue_timeout = 0; } @@ -2475,7 +2475,7 @@ purple_http_keepalive_host_process_queue(PurpleHttpKeepaliveHost *host) if (host->process_queue_timeout > 0) return; - host->process_queue_timeout = purple_timeout_add(0, + host->process_queue_timeout = g_timeout_add(0, _purple_http_keepalive_host_process_queue_cb, host); } diff --git a/libpurple/idle.c b/libpurple/idle.c index 712516c1db..95816c947f 100644 --- a/libpurple/idle.c +++ b/libpurple/idle.c @@ -224,7 +224,7 @@ check_idleness_timer(void) { /* +1 for the boundary, * +1 more for g_timeout_add_seconds rounding. */ - idle_timer = purple_timeout_add_seconds(time_until_next_idle_event + 2, (GSourceFunc)check_idleness_timer, NULL); + idle_timer = g_timeout_add_seconds(time_until_next_idle_event + 2, (GSourceFunc)check_idleness_timer, NULL); } return FALSE; } @@ -256,7 +256,7 @@ static void idle_reporting_cb(const char *name, PurplePrefType type, gconstpointer val, gpointer data) { if (idle_timer) - purple_timeout_remove(idle_timer); + g_source_remove(idle_timer); idle_timer = 0; check_idleness_timer(); } @@ -268,7 +268,7 @@ purple_idle_touch() if (!no_away) { if (idle_timer) - purple_timeout_remove(idle_timer); + g_source_remove(idle_timer); idle_timer = 0; check_idleness_timer(); } @@ -332,7 +332,7 @@ static gboolean _do_purple_idle_touch_cb(gpointer data) int idle_poll_minutes = purple_prefs_get_int("/purple/away/mins_before_away"); /* +1 more for g_timeout_add_seconds rounding. */ - idle_timer = purple_timeout_add_seconds((idle_poll_minutes * 60) + 2, (GSourceFunc)check_idleness_timer, NULL); + idle_timer = g_timeout_add_seconds((idle_poll_minutes * 60) + 2, (GSourceFunc)check_idleness_timer, NULL); purple_idle_touch(); @@ -358,7 +358,7 @@ purple_idle_init() /* Initialize the idleness asynchronously so it doesn't check idleness, * and potentially try to change the status before the UI is initialized */ - purple_timeout_add(0, _do_purple_idle_touch_cb, NULL); + g_timeout_add(0, _do_purple_idle_touch_cb, NULL); } @@ -370,6 +370,6 @@ purple_idle_uninit() /* Remove the idle timer */ if (idle_timer > 0) - purple_timeout_remove(idle_timer); + g_source_remove(idle_timer); idle_timer = 0; } diff --git a/libpurple/image-store.c b/libpurple/image-store.c index 4a8ac73522..4c6868fc81 100644 --- a/libpurple/image-store.c +++ b/libpurple/image-store.c @@ -124,7 +124,7 @@ remove_temporary(gpointer _image) static void cancel_temporary(gpointer key, gpointer value, gpointer _unused) { - purple_timeout_remove(GPOINTER_TO_INT(key)); + g_source_remove(GPOINTER_TO_INT(key)); } guint @@ -143,7 +143,7 @@ purple_image_store_add_temporary(PurpleImage *image) id = image_set_id(image); g_object_ref(image); - handle = purple_timeout_add_seconds(TEMP_IMAGE_TIMEOUT, + handle = g_timeout_add_seconds(TEMP_IMAGE_TIMEOUT, remove_temporary, image); g_object_set_data(G_OBJECT(image), "purple-image-store-handle", GINT_TO_POINTER(handle)); diff --git a/libpurple/media/backend-fs2.c b/libpurple/media/backend-fs2.c index 1e537a1b9f..90608df84b 100644 --- a/libpurple/media/backend-fs2.c +++ b/libpurple/media/backend-fs2.c @@ -1888,7 +1888,7 @@ src_pad_added_cb(FsStream *fsstream, GstPad *srcpad, gst_pad_link(srcpad, sinkpad); gst_object_unref(sinkpad); - stream->connected_cb_id = purple_timeout_add(0, + stream->connected_cb_id = g_timeout_add(0, (GSourceFunc)src_pad_added_cb_cb, stream); } @@ -2071,7 +2071,7 @@ free_stream(PurpleMediaBackendFs2Stream *stream) { /* Remove the connected_cb timeout */ if (stream->connected_cb_id != 0) - purple_timeout_remove(stream->connected_cb_id); + g_source_remove(stream->connected_cb_id); g_free(stream->participant); @@ -2558,7 +2558,7 @@ purple_media_backend_fs2_send_dtmf(PurpleMediaBackend *self, if (duration <= 50) { fs_session_stop_telephony_event(session->session); } else { - purple_timeout_add(duration, send_dtmf_callback, + g_timeout_add(duration, send_dtmf_callback, session->session); } diff --git a/libpurple/mediamanager.c b/libpurple/mediamanager.c index 90620981ec..09a9e08d04 100644 --- a/libpurple/mediamanager.c +++ b/libpurple/mediamanager.c @@ -581,12 +581,12 @@ free_appdata_info_locked (PurpleMediaAppDataInfo *info) info->writable_cb_token = 0; if (info->readable_timer_id) { - purple_timeout_remove (info->readable_timer_id); + g_source_remove (info->readable_timer_id); info->readable_timer_id = 0; } if (info->writable_timer_id) { - purple_timeout_remove (info->writable_timer_id); + g_source_remove (info->writable_timer_id); info->writable_timer_id = 0; } @@ -811,10 +811,10 @@ call_appsrc_writable_locked (PurpleMediaAppDataInfo *info) /* We can't use writable_timer_id as a token, because the timeout is added * into libpurple's main event loop, which runs in a different thread than * from where call_appsrc_writable_locked() was called. Consequently, the - * callback may run even before purple_timeout_add() returns the timer ID + * callback may run even before g_timeout_add() returns the timer ID * to us. */ info->writable_cb_token = ++manager->priv->appdata_cb_token; - info->writable_timer_id = purple_timeout_add (0, appsrc_writable, info); + info->writable_timer_id = g_timeout_add (0, appsrc_writable, info); } static void @@ -1001,7 +1001,7 @@ call_appsink_readable_locked (PurpleMediaAppDataInfo *info) return; info->readable_cb_token = ++manager->priv->appdata_cb_token; - info->readable_timer_id = purple_timeout_add (0, appsink_readable, info); + info->readable_timer_id = g_timeout_add (0, appsink_readable, info); } static GstFlowReturn @@ -1718,12 +1718,12 @@ purple_media_manager_set_application_data_callbacks(PurpleMediaManager *manager, info->notify (info->user_data); if (info->readable_cb_token) { - purple_timeout_remove (info->readable_timer_id); + g_source_remove (info->readable_timer_id); info->readable_cb_token = 0; } if (info->writable_cb_token) { - purple_timeout_remove (info->writable_timer_id); + g_source_remove (info->writable_timer_id); info->writable_cb_token = 0; } diff --git a/libpurple/network.c b/libpurple/network.c index 00bde9b71e..a5c77d038b 100644 --- a/libpurple/network.c +++ b/libpurple/network.c @@ -468,7 +468,7 @@ purple_network_do_listen(unsigned short port, int socket_family, int socket_type { purple_debug_info("network", "Skipping external port mapping.\n"); /* The pmp_map_cb does what we want to do */ - listen_data->timer = purple_timeout_add(0, purple_network_finish_pmp_map_cb, listen_data); + listen_data->timer = g_timeout_add(0, purple_network_finish_pmp_map_cb, listen_data); } /* Attempt a NAT-PMP Mapping, which will return immediately */ else if (purple_pmp_create_map(((socket_type == SOCK_STREAM) ? PURPLE_PMP_TYPE_TCP : PURPLE_PMP_TYPE_UDP), @@ -476,7 +476,7 @@ purple_network_do_listen(unsigned short port, int socket_family, int socket_type { purple_debug_info("network", "Created NAT-PMP mapping on port %i\n", actual_port); /* We want to return listen_data now, and on the next run loop trigger the cb and destroy listen_data */ - listen_data->timer = purple_timeout_add(0, purple_network_finish_pmp_map_cb, listen_data); + listen_data->timer = g_timeout_add(0, purple_network_finish_pmp_map_cb, listen_data); } else { @@ -532,7 +532,7 @@ void purple_network_listen_cancel(PurpleNetworkListenData *listen_data) purple_upnp_cancel_port_mapping(listen_data->mapping_data); if (listen_data->timer > 0) - purple_timeout_remove(listen_data->timer); + g_source_remove(listen_data->timer); g_free(listen_data); } diff --git a/libpurple/plugins/filectl.c b/libpurple/plugins/filectl.c index c2f2d1093c..ce23a822af 100644 --- a/libpurple/plugins/filectl.c +++ b/libpurple/plugins/filectl.c @@ -242,7 +242,7 @@ static gboolean plugin_load(PurplePlugin *plugin, GError **error) { init_file(); - check = purple_timeout_add_seconds(5, (GSourceFunc)check_file, NULL); + check = g_timeout_add_seconds(5, (GSourceFunc)check_file, NULL); return TRUE; } @@ -250,7 +250,7 @@ plugin_load(PurplePlugin *plugin, GError **error) static gboolean plugin_unload(PurplePlugin *plugin, GError **error) { - purple_timeout_remove(check); + g_source_remove(check); return TRUE; } diff --git a/libpurple/plugins/joinpart.c b/libpurple/plugins/joinpart.c index aed726cbe3..2316c6fc73 100644 --- a/libpurple/plugins/joinpart.c +++ b/libpurple/plugins/joinpart.c @@ -255,7 +255,7 @@ static gboolean plugin_load(PurplePlugin *plugin, GError **error) PURPLE_CALLBACK(received_chat_msg_cb), users); /* Cleanup every 5 minutes */ - id = purple_timeout_add_seconds(60 * 5, (GSourceFunc)clean_users_hash, users); + id = g_timeout_add_seconds(60 * 5, (GSourceFunc)clean_users_hash, users); g_object_set_data(G_OBJECT(plugin), "users", users); g_object_set_data(G_OBJECT(plugin), "id", GUINT_TO_POINTER(id)); @@ -270,7 +270,7 @@ static gboolean plugin_unload(PurplePlugin *plugin, GError **error) * we don't have to worry one will be called after this. */ g_hash_table_destroy((GHashTable *)g_object_get_data(G_OBJECT(plugin), "users")); - purple_timeout_remove(GPOINTER_TO_UINT(g_object_get_data(G_OBJECT(plugin), "id"))); + g_source_remove(GPOINTER_TO_UINT(g_object_get_data(G_OBJECT(plugin), "id"))); return TRUE; } diff --git a/libpurple/pounce.c b/libpurple/pounce.c index a722bb67ec..4bc627831e 100644 --- a/libpurple/pounce.c +++ b/libpurple/pounce.c @@ -295,7 +295,7 @@ static void schedule_pounces_save(void) { if (save_timer == 0) - save_timer = purple_timeout_add_seconds(5, save_cb, NULL); + save_timer = g_timeout_add_seconds(5, save_cb, NULL); } @@ -1194,7 +1194,7 @@ purple_pounces_uninit() { if (save_timer != 0) { - purple_timeout_remove(save_timer); + g_source_remove(save_timer); save_timer = 0; sync_pounces(); } diff --git a/libpurple/prefs.c b/libpurple/prefs.c index 7b368560d9..07fd5db04e 100644 --- a/libpurple/prefs.c +++ b/libpurple/prefs.c @@ -261,7 +261,7 @@ schedule_prefs_save(void) PURPLE_PREFS_UI_OP_CALL(schedule_save); if (save_timer == 0) - save_timer = purple_timeout_add_seconds(5, save_cb, NULL); + save_timer = g_timeout_add_seconds(5, save_cb, NULL); } @@ -1743,7 +1743,7 @@ purple_prefs_uninit() { if (save_timer != 0) { - purple_timeout_remove(save_timer); + g_source_remove(save_timer); save_cb(NULL); } diff --git a/libpurple/protocols/bonjour/bonjour.c b/libpurple/protocols/bonjour/bonjour.c index 41c9d31230..8b75345a93 100644 --- a/libpurple/protocols/bonjour/bonjour.c +++ b/libpurple/protocols/bonjour/bonjour.c @@ -564,7 +564,7 @@ _win32_name_lookup_thread(gpointer data) { fullname = g_utf16_to_utf8(username, -1, NULL, NULL, NULL); } - purple_timeout_add(0, _set_default_name_cb, fullname); + g_timeout_add(0, _set_default_name_cb, fullname); return NULL; } diff --git a/libpurple/protocols/bonjour/jabber.c b/libpurple/protocols/bonjour/jabber.c index 8c8f6a88bb..19311454cd 100644 --- a/libpurple/protocols/bonjour/jabber.c +++ b/libpurple/protocols/bonjour/jabber.c @@ -1139,7 +1139,7 @@ async_bonjour_jabber_close_conversation(BonjourJabberConversation *bconv) { bb->conversation = NULL; } - bconv->close_timeout = purple_timeout_add(0, _async_bonjour_jabber_close_conversation_cb, bconv); + bconv->close_timeout = g_timeout_add(0, _async_bonjour_jabber_close_conversation_cb, bconv); } void @@ -1210,7 +1210,7 @@ bonjour_jabber_close_conversation(BonjourJabberConversation *bconv) bonjour_parser_setup(bconv); if (bconv->close_timeout != 0) - purple_timeout_remove(bconv->close_timeout); + g_source_remove(bconv->close_timeout); g_free(bconv->buddy_name); g_free(bconv->ip); diff --git a/libpurple/protocols/facebook/data.c b/libpurple/protocols/facebook/data.c index bf722a8982..fe32404fa3 100644 --- a/libpurple/protocols/facebook/data.c +++ b/libpurple/protocols/facebook/data.c @@ -73,7 +73,7 @@ fb_data_dispose(GObject *obj) g_hash_table_iter_init(&iter, priv->evs); while (g_hash_table_iter_next(&iter, NULL, &ptr)) { - purple_timeout_remove(GPOINTER_TO_UINT(ptr)); + g_source_remove(GPOINTER_TO_UINT(ptr)); } if (G_LIKELY(priv->api != NULL)) { @@ -284,7 +284,7 @@ fb_data_add_timeout(FbData *fata, const gchar *name, guint interval, fb_data_clear_timeout(fata, name, TRUE); key = g_strdup(name); - id = purple_timeout_add(interval, func, data); + id = g_timeout_add(interval, func, data); g_hash_table_replace(priv->evs, key, GUINT_TO_POINTER(id)); } @@ -302,7 +302,7 @@ fb_data_clear_timeout(FbData *fata, const gchar *name, gboolean remove) id = GPOINTER_TO_UINT(ptr); if ((id > 0) && remove) { - purple_timeout_remove(id); + g_source_remove(id); } g_hash_table_remove(priv->evs, name); diff --git a/libpurple/protocols/facebook/mqtt.c b/libpurple/protocols/facebook/mqtt.c index caa007f0d3..da279cbe23 100644 --- a/libpurple/protocols/facebook/mqtt.c +++ b/libpurple/protocols/facebook/mqtt.c @@ -225,7 +225,7 @@ fb_mqtt_close(FbMqtt *mqtt) priv = mqtt->priv; if (priv->tev > 0) { - purple_timeout_remove(priv->tev); + g_source_remove(priv->tev); priv->tev = 0; } @@ -300,7 +300,7 @@ fb_mqtt_timeout_clear(FbMqtt *mqtt) FbMqttPrivate *priv = mqtt->priv; if (priv->tev > 0) { - purple_timeout_remove(priv->tev); + g_source_remove(priv->tev); priv->tev = 0; } } @@ -311,7 +311,7 @@ fb_mqtt_timeout(FbMqtt *mqtt) FbMqttPrivate *priv = mqtt->priv; fb_mqtt_timeout_clear(mqtt); - priv->tev = purple_timeout_add(FB_MQTT_TIMEOUT_CONN, + priv->tev = g_timeout_add(FB_MQTT_TIMEOUT_CONN, fb_mqtt_cb_timeout, mqtt); } @@ -337,7 +337,7 @@ fb_mqtt_ping(FbMqtt *mqtt) FbMqttPrivate *priv = mqtt->priv; fb_mqtt_timeout_clear(mqtt); - priv->tev = purple_timeout_add(FB_MQTT_TIMEOUT_PING, + priv->tev = g_timeout_add(FB_MQTT_TIMEOUT_PING, fb_mqtt_cb_ping, mqtt); } diff --git a/libpurple/protocols/gg/avatar.c b/libpurple/protocols/gg/avatar.c index c8610b50cd..5ee4e7c1b7 100644 --- a/libpurple/protocols/gg/avatar.c +++ b/libpurple/protocols/gg/avatar.c @@ -90,14 +90,14 @@ void ggp_avatar_setup(PurpleConnection *gc) avdata->current_update = NULL; avdata->own_data = g_new0(ggp_avatar_own_data, 1); - avdata->timer = purple_timeout_add_seconds(1, ggp_avatar_timer_cb, gc); + avdata->timer = g_timeout_add_seconds(1, ggp_avatar_timer_cb, gc); } void ggp_avatar_cleanup(PurpleConnection *gc) { ggp_avatar_session_data *avdata = ggp_avatar_get_avdata(gc); - purple_timeout_remove(avdata->timer); + g_source_remove(avdata->timer); if (avdata->current_update != NULL) { ggp_avatar_buddy_update_req *current_update = diff --git a/libpurple/protocols/gg/chat.c b/libpurple/protocols/gg/chat.c index dc9f76796e..add07c0f12 100644 --- a/libpurple/protocols/gg/chat.c +++ b/libpurple/protocols/gg/chat.c @@ -610,6 +610,6 @@ PurpleRoomlist * ggp_chat_roomlist_get_list(PurpleConnection *gc) * purple_roomlist_set_in_progress(roomlist, FALSE); */ g_object_ref(roomlist); - purple_timeout_add(1, ggp_chat_roomlist_get_list_finish, roomlist); + g_timeout_add(1, ggp_chat_roomlist_get_list_finish, roomlist); return roomlist; } diff --git a/libpurple/protocols/gg/roster.c b/libpurple/protocols/gg/roster.c index a84f3181ed..a57630ea0d 100644 --- a/libpurple/protocols/gg/roster.c +++ b/libpurple/protocols/gg/roster.c @@ -237,7 +237,7 @@ void ggp_roster_setup(PurpleConnection *gc) rdata->is_updating = FALSE; if (ggp_roster_enabled()) - rdata->timer = purple_timeout_add_seconds(2, + rdata->timer = g_timeout_add_seconds(2, ggp_roster_timer_cb, gc); } @@ -246,7 +246,7 @@ void ggp_roster_cleanup(PurpleConnection *gc) ggp_roster_session_data *rdata = ggp_roster_get_rdata(gc); if (rdata->timer) - purple_timeout_remove(rdata->timer); + g_source_remove(rdata->timer); ggp_roster_content_free(rdata->content); g_list_free_full(rdata->sent_updates, ggp_roster_change_free); g_list_free_full(rdata->pending_updates, ggp_roster_change_free); diff --git a/libpurple/protocols/irc/irc.c b/libpurple/protocols/irc/irc.c index f08683bef3..261874bca7 100644 --- a/libpurple/protocols/irc/irc.c +++ b/libpurple/protocols/irc/irc.c @@ -463,7 +463,7 @@ static void irc_close(PurpleConnection *gc) g_clear_object(&irc->conn); if (irc->timer) - purple_timeout_remove(irc->timer); + g_source_remove(irc->timer); g_hash_table_destroy(irc->cmds); g_hash_table_destroy(irc->msgs); g_hash_table_destroy(irc->buddies); diff --git a/libpurple/protocols/irc/msgs.c b/libpurple/protocols/irc/msgs.c index 4aac74a726..aa671b42d5 100644 --- a/libpurple/protocols/irc/msgs.c +++ b/libpurple/protocols/irc/msgs.c @@ -123,7 +123,7 @@ static void irc_connected(struct irc_conn *irc, const char *nick) irc_blist_timeout(irc); if (!irc->timer) - irc->timer = purple_timeout_add_seconds(45, (GSourceFunc)irc_blist_timeout, (gpointer)irc); + irc->timer = g_timeout_add_seconds(45, (GSourceFunc)irc_blist_timeout, (gpointer)irc); } /* This function is ugly, but it's really an error handler. */ diff --git a/libpurple/protocols/jabber/bosh.c b/libpurple/protocols/jabber/bosh.c index c7eeb61f94..6157ce2d36 100644 --- a/libpurple/protocols/jabber/bosh.c +++ b/libpurple/protocols/jabber/bosh.c @@ -150,7 +150,7 @@ jabber_bosh_connection_destroy(PurpleJabberBOSHConnection *conn) conn->payload_reqs = NULL; if (conn->send_timer) - purple_timeout_remove(conn->send_timer); + g_source_remove(conn->send_timer); purple_http_conn_cancel(conn->sc_req); conn->sc_req = NULL; @@ -270,7 +270,7 @@ jabber_bosh_connection_send_now(PurpleJabberBOSHConnection *conn) g_return_if_fail(conn != NULL); if (conn->send_timer != 0) { - purple_timeout_remove(conn->send_timer); + g_source_remove(conn->send_timer); conn->send_timer = 0; } @@ -340,7 +340,7 @@ jabber_bosh_connection_send(PurpleJabberBOSHConnection *conn, g_string_append(conn->send_buff, data); if (conn->send_timer == 0) { - conn->send_timer = purple_timeout_add( + conn->send_timer = g_timeout_add( JABBER_BOSH_SEND_DELAY, jabber_bosh_connection_send_delayed, conn); } diff --git a/libpurple/protocols/jabber/buddy.c b/libpurple/protocols/jabber/buddy.c index 771bd57eaf..e8cb417258 100644 --- a/libpurple/protocols/jabber/buddy.c +++ b/libpurple/protocols/jabber/buddy.c @@ -485,7 +485,7 @@ void jabber_set_info(PurpleConnection *gc, const char *info) } if (js->vcard_timer) { - purple_timeout_remove(js->vcard_timer); + g_source_remove(js->vcard_timer); js->vcard_timer = 0; } @@ -709,7 +709,7 @@ static void jabber_buddy_info_destroy(JabberBuddyInfo *jbi) { /* Remove the timeout, which would otherwise trigger jabber_buddy_get_info_timeout() */ if (jbi->timeout_handle > 0) - purple_timeout_remove(jbi->timeout_handle); + g_source_remove(jbi->timeout_handle); g_free(jbi->jid); g_hash_table_destroy(jbi->resources); @@ -977,7 +977,7 @@ static void jabber_vcard_save_mine(JabberStream *js, const char *from, * <error code="500" type="wait"><internal-server-error/></error>. */ if (js->googletalk) - js->vcard_timer = purple_timeout_add_seconds(10, set_own_vcard_cb, + js->vcard_timer = g_timeout_add_seconds(10, set_own_vcard_cb, js); else jabber_set_info(js->gc, purple_account_get_user_info(account)); @@ -1644,7 +1644,7 @@ static void jabber_buddy_get_info_for_jid(JabberStream *js, const char *jid) } js->pending_buddy_info_requests = g_slist_prepend(js->pending_buddy_info_requests, jbi); - jbi->timeout_handle = purple_timeout_add_seconds(30, jabber_buddy_get_info_timeout, jbi); + jbi->timeout_handle = g_timeout_add_seconds(30, jabber_buddy_get_info_timeout, jbi); } void jabber_buddy_get_info(PurpleConnection *gc, const char *who) diff --git a/libpurple/protocols/jabber/caps.c b/libpurple/protocols/jabber/caps.c index 43ba948002..684c301b33 100644 --- a/libpurple/protocols/jabber/caps.c +++ b/libpurple/protocols/jabber/caps.c @@ -220,7 +220,7 @@ static void schedule_caps_save(void) { if (save_timer == 0) - save_timer = purple_timeout_add_seconds(5, do_jabber_caps_store, NULL); + save_timer = g_timeout_add_seconds(5, do_jabber_caps_store, NULL); } static void @@ -335,7 +335,7 @@ void jabber_caps_init(void) void jabber_caps_uninit(void) { if (save_timer != 0) { - purple_timeout_remove(save_timer); + g_source_remove(save_timer); save_timer = 0; do_jabber_caps_store(NULL); } diff --git a/libpurple/protocols/jabber/jabber.c b/libpurple/protocols/jabber/jabber.c index 27c758e74f..d042378f39 100644 --- a/libpurple/protocols/jabber/jabber.c +++ b/libpurple/protocols/jabber/jabber.c @@ -640,7 +640,7 @@ void jabber_keepalive(PurpleConnection *gc) js->last_ping = now; jabber_keepalive_ping(js); - js->keepalive_timeout = purple_timeout_add_seconds(120, + js->keepalive_timeout = g_timeout_add_seconds(120, (GSourceFunc)(jabber_keepalive_timeout), gc); } } @@ -1165,7 +1165,7 @@ conn_close_cb(gpointer data) static void jabber_connection_schedule_close(JabberStream *js) { - js->conn_close_timeout = purple_timeout_add(0, conn_close_cb, js); + js->conn_close_timeout = g_timeout_add(0, conn_close_cb, js); } static void @@ -1725,14 +1725,14 @@ void jabber_close(PurpleConnection *gc) g_free(js->old_track); if (js->vcard_timer != 0) - purple_timeout_remove(js->vcard_timer); + g_source_remove(js->vcard_timer); if (js->keepalive_timeout != 0) - purple_timeout_remove(js->keepalive_timeout); + g_source_remove(js->keepalive_timeout); if (js->inactivity_timer != 0) - purple_timeout_remove(js->inactivity_timer); + g_source_remove(js->inactivity_timer); if (js->conn_close_timeout != 0) - purple_timeout_remove(js->conn_close_timeout); + g_source_remove(js->conn_close_timeout); g_cancellable_cancel(js->cancellable); g_object_unref(G_OBJECT(js->cancellable)); @@ -2123,14 +2123,14 @@ inactivity_cb(gpointer data) void jabber_stream_restart_inactivity_timer(JabberStream *js) { if (js->inactivity_timer != 0) { - purple_timeout_remove(js->inactivity_timer); + g_source_remove(js->inactivity_timer); js->inactivity_timer = 0; } g_return_if_fail(js->max_inactivity > 0); js->inactivity_timer = - purple_timeout_add_seconds(js->max_inactivity, + g_timeout_add_seconds(js->max_inactivity, inactivity_cb, js); } diff --git a/libpurple/protocols/jabber/ping.c b/libpurple/protocols/jabber/ping.c index 8f1251cf45..7cb2b97024 100644 --- a/libpurple/protocols/jabber/ping.c +++ b/libpurple/protocols/jabber/ping.c @@ -35,7 +35,7 @@ static void jabber_keepalive_pong_cb(JabberStream *js, const char *from, PurpleXmlNode *packet, gpointer data) { if (js->keepalive_timeout != 0) { - purple_timeout_remove(js->keepalive_timeout); + g_source_remove(js->keepalive_timeout); js->keepalive_timeout = 0; } } diff --git a/libpurple/protocols/jabber/si.c b/libpurple/protocols/jabber/si.c index 471c50d625..e27f8b1089 100644 --- a/libpurple/protocols/jabber/si.c +++ b/libpurple/protocols/jabber/si.c @@ -128,7 +128,7 @@ jabber_si_bytestreams_connect_cb(gpointer data, gint source, const gchar *error_ jsx->connect_data = NULL; if (jsx->connect_timeout > 0) - purple_timeout_remove(jsx->connect_timeout); + g_source_remove(jsx->connect_timeout); jsx->connect_timeout = 0; if(source < 0) { @@ -194,7 +194,7 @@ static void jabber_si_bytestreams_ibb_timeout_remove(JabberSIXfer *jsx) { if (jsx->ibb_timeout_handle) { - purple_timeout_remove(jsx->ibb_timeout_handle); + g_source_remove(jsx->ibb_timeout_handle); jsx->ibb_timeout_handle = 0; } } @@ -252,7 +252,7 @@ static void jabber_si_bytestreams_attempt_connect(PurpleXfer *xfer) jabber_si_xfer_ibb_send_init(jsx->js, xfer); } else { /* setup a timeout to cancel waiting for IBB open */ - jsx->ibb_timeout_handle = purple_timeout_add_seconds(30, + jsx->ibb_timeout_handle = g_timeout_add_seconds(30, jabber_si_bytestreams_ibb_timeout_cb, xfer); } /* if we are the receiver, just wait for IBB open, callback is @@ -273,7 +273,7 @@ static void jabber_si_bytestreams_attempt_connect(PurpleXfer *xfer) purple_proxy_connect_cancel(jsx->connect_data); jsx->connect_data = NULL; if (jsx->connect_timeout > 0) - purple_timeout_remove(jsx->connect_timeout); + g_source_remove(jsx->connect_timeout); jsx->connect_timeout = 0; } if (jsx->gpi != NULL) @@ -313,7 +313,7 @@ static void jabber_si_bytestreams_attempt_connect(PurpleXfer *xfer) /* When selecting a streamhost, timeout after STREAMHOST_CONNECT_TIMEOUT seconds, otherwise it takes forever */ if (purple_xfer_get_xfer_type(xfer) != PURPLE_XFER_TYPE_SEND && jsx->connect_data != NULL) - jsx->connect_timeout = purple_timeout_add_seconds( + jsx->connect_timeout = g_timeout_add_seconds( STREAMHOST_CONNECT_TIMEOUT, connect_timeout_cb, xfer); jabber_id_free(dstjid); @@ -734,7 +734,7 @@ jabber_si_connect_proxy_cb(JabberStream *js, const char *from, && !jsx->ibb_session) { jabber_si_xfer_ibb_send_init(js, xfer); } else { - jsx->ibb_timeout_handle = purple_timeout_add_seconds(30, + jsx->ibb_timeout_handle = g_timeout_add_seconds(30, jabber_si_bytestreams_ibb_timeout_cb, xfer); } /* if we are receiver, just wait for IBB open stanza, callback @@ -775,7 +775,7 @@ jabber_si_connect_proxy_cb(JabberStream *js, const char *from, if (purple_xfer_get_xfer_type(xfer) == PURPLE_XFER_TYPE_SEND) { jabber_si_xfer_ibb_send_init(jsx->js, xfer); } else { - jsx->ibb_timeout_handle = purple_timeout_add_seconds(30, + jsx->ibb_timeout_handle = g_timeout_add_seconds(30, jabber_si_bytestreams_ibb_timeout_cb, xfer); } /* if we are the receiver, we are already set up...*/ @@ -926,7 +926,7 @@ jabber_si_xfer_bytestreams_listen_cb(int sock, gpointer data) /* if we are the sender, init the IBB session... */ jabber_si_xfer_ibb_send_init(jsx->js, xfer); } else { - jsx->ibb_timeout_handle = purple_timeout_add_seconds(30, + jsx->ibb_timeout_handle = g_timeout_add_seconds(30, jabber_si_bytestreams_ibb_timeout_cb, xfer); } /* if we are the receiver, we should just wait... the IBB open @@ -1314,9 +1314,9 @@ static void jabber_si_xfer_free(PurpleXfer *xfer) purple_network_remove_port_mapping(purple_xfer_get_fd(xfer)); } if (jsx->connect_timeout > 0) - purple_timeout_remove(jsx->connect_timeout); + g_source_remove(jsx->connect_timeout); if (jsx->ibb_timeout_handle > 0) - purple_timeout_remove(jsx->ibb_timeout_handle); + g_source_remove(jsx->ibb_timeout_handle); if (jsx->streamhosts) { g_list_foreach(jsx->streamhosts, jabber_si_free_streamhost, NULL); diff --git a/libpurple/protocols/null/nullprpl.c b/libpurple/protocols/null/nullprpl.c index 5ed4ee1c10..9a3c94b8a2 100644 --- a/libpurple/protocols/null/nullprpl.c +++ b/libpurple/protocols/null/nullprpl.c @@ -957,7 +957,7 @@ static PurpleRoomlist *null_roomlist_get_list(PurpleConnection *gc) { } g_list_free(seen_ids); - purple_timeout_add(1 /* ms */, null_finish_get_roomlist, g_object_ref(roomlist)); + g_timeout_add(1 /* ms */, null_finish_get_roomlist, g_object_ref(roomlist)); return roomlist; } diff --git a/libpurple/protocols/oscar/flap_connection.c b/libpurple/protocols/oscar/flap_connection.c index b84faa6d0d..b57d71ad10 100644 --- a/libpurple/protocols/oscar/flap_connection.c +++ b/libpurple/protocols/oscar/flap_connection.c @@ -271,7 +271,7 @@ flap_connection_send_snac_with_priority(OscarData *od, FlapConnection *conn, gui } if (conn->queued_timeout == 0) - conn->queued_timeout = purple_timeout_add(500, flap_connection_send_queued, conn); + conn->queued_timeout = g_timeout_add(500, flap_connection_send_queued, conn); return; } @@ -531,7 +531,7 @@ flap_connection_destroy_cb(gpointer data) } if (conn->queued_timeout > 0) - purple_timeout_remove(conn->queued_timeout); + g_source_remove(conn->queued_timeout); g_free(conn); @@ -546,7 +546,7 @@ void flap_connection_destroy(FlapConnection *conn, OscarDisconnectReason reason, const gchar *error_message) { if (conn->destroy_timeout != 0) - purple_timeout_remove(conn->destroy_timeout); + g_source_remove(conn->destroy_timeout); conn->disconnect_reason = reason; g_free(conn->error_message); conn->error_message = g_strdup(error_message); @@ -580,7 +580,7 @@ flap_connection_schedule_destroy(FlapConnection *conn, OscarDisconnectReason rea conn->disconnect_reason = reason; g_free(conn->error_message); conn->error_message = g_strdup(error_message); - conn->destroy_timeout = purple_timeout_add(0, flap_connection_destroy_cb, conn); + conn->destroy_timeout = g_timeout_add(0, flap_connection_destroy_cb, conn); } /** diff --git a/libpurple/protocols/oscar/oft.c b/libpurple/protocols/oscar/oft.c index 1152fa8cd8..3bec0cc040 100644 --- a/libpurple/protocols/oscar/oft.c +++ b/libpurple/protocols/oscar/oft.c @@ -79,7 +79,7 @@ peer_oft_checksum_destroy(ChecksumData *checksum_data) checksum_data->conn->checksum_data = NULL; fclose(checksum_data->file); if (checksum_data->timer > 0) - purple_timeout_remove(checksum_data->timer); + g_source_remove(checksum_data->timer); g_free(checksum_data); } @@ -218,7 +218,7 @@ peer_oft_checksum_file(PeerConnection *conn, PurpleXfer *xfer, GSourceFunc callb } else { - checksum_data->timer = purple_timeout_add(10, + checksum_data->timer = g_timeout_add(10, peer_oft_checksum_file_piece, checksum_data); conn->checksum_data = checksum_data; } @@ -251,7 +251,7 @@ peer_oft_close(PeerConnection *conn) if (conn->sending_data_timer != 0) { - purple_timeout_remove(conn->sending_data_timer); + g_source_remove(conn->sending_data_timer); conn->sending_data_timer = 0; } } @@ -411,7 +411,7 @@ peer_oft_recv_frame_prompt(PeerConnection *conn, OftFrame *frame) /* Remove our watchers and use the file transfer watchers in the core */ purple_input_remove(conn->watcher_incoming); conn->watcher_incoming = 0; - conn->sending_data_timer = purple_timeout_add(100, + conn->sending_data_timer = g_timeout_add(100, start_transfer_when_done_sending_data, conn); } @@ -433,7 +433,7 @@ peer_oft_recv_frame_ack(PeerConnection *conn, OftFrame *frame) /* Remove our watchers and use the file transfer watchers in the core */ purple_input_remove(conn->watcher_incoming); conn->watcher_incoming = 0; - conn->sending_data_timer = purple_timeout_add(100, + conn->sending_data_timer = g_timeout_add(100, start_transfer_when_done_sending_data, conn); } @@ -607,7 +607,7 @@ peer_oft_recvcb_end(PurpleXfer *xfer) peer_oft_send_done(conn); conn->disconnect_reason = OSCAR_DISCONNECT_DONE; - conn->sending_data_timer = purple_timeout_add(100, + conn->sending_data_timer = g_timeout_add(100, destroy_connection_when_done_sending_data, conn); } diff --git a/libpurple/protocols/oscar/oscar.c b/libpurple/protocols/oscar/oscar.c index 84e093cccb..1abe2bb3ee 100644 --- a/libpurple/protocols/oscar/oscar.c +++ b/libpurple/protocols/oscar/oscar.c @@ -449,8 +449,8 @@ flap_connection_established_bos(OscarData *od, FlapConnection *conn) aim_ssi_reqrights(od); aim_ssi_reqdata(od); if (od->getblisttimer > 0) - purple_timeout_remove(od->getblisttimer); - od->getblisttimer = purple_timeout_add_seconds(30, purple_ssi_rerequestdata, od); + g_source_remove(od->getblisttimer); + od->getblisttimer = g_timeout_add_seconds(30, purple_ssi_rerequestdata, od); aim_locate_reqrights(od); aim_buddylist_reqrights(od, conn); @@ -3683,7 +3683,7 @@ static int purple_ssi_parseerr(OscarData *od, FlapConnection *conn, FlapFrame *f if (reason == 0x0005) { if (od->getblisttimer > 0) - purple_timeout_remove(od->getblisttimer); + g_source_remove(od->getblisttimer); else /* We only show this error the first time it happens */ purple_notify_error(gc, NULL, @@ -3692,7 +3692,7 @@ static int purple_ssi_parseerr(OscarData *od, FlapConnection *conn, FlapFrame *f "your buddy list. Your buddy list is not lost, and " "will probably become available in a few minutes."), purple_request_cpar_from_connection(gc)); - od->getblisttimer = purple_timeout_add_seconds(30, purple_ssi_rerequestdata, od); + od->getblisttimer = g_timeout_add_seconds(30, purple_ssi_rerequestdata, od); return 1; } @@ -3755,7 +3755,7 @@ static int purple_ssi_parselist(OscarData *od, FlapConnection *conn, FlapFrame * /* Don't attempt to re-request our buddy list later */ if (od->getblisttimer != 0) { - purple_timeout_remove(od->getblisttimer); + g_source_remove(od->getblisttimer); od->getblisttimer = 0; } diff --git a/libpurple/protocols/oscar/oscar_data.c b/libpurple/protocols/oscar/oscar_data.c index ef54956eb2..b24fa26898 100644 --- a/libpurple/protocols/oscar/oscar_data.c +++ b/libpurple/protocols/oscar/oscar_data.c @@ -117,7 +117,7 @@ oscar_data_destroy(OscarData *od) g_free(od->newp); g_free(od->oldp); if (od->getblisttimer > 0) - purple_timeout_remove(od->getblisttimer); + g_source_remove(od->getblisttimer); while (od->oscar_connections != NULL) flap_connection_destroy(od->oscar_connections->data, OSCAR_DISCONNECT_DONE, NULL); diff --git a/libpurple/protocols/oscar/peer.c b/libpurple/protocols/oscar/peer.c index 419631adad..3198a0f881 100644 --- a/libpurple/protocols/oscar/peer.c +++ b/libpurple/protocols/oscar/peer.c @@ -155,7 +155,7 @@ peer_connection_close(PeerConnection *conn) if (conn->connect_timeout_timer != 0) { - purple_timeout_remove(conn->connect_timeout_timer); + g_source_remove(conn->connect_timeout_timer); conn->connect_timeout_timer = 0; } @@ -243,7 +243,7 @@ void peer_connection_destroy(PeerConnection *conn, OscarDisconnectReason reason, const gchar *error_message) { if (conn->destroy_timeout != 0) - purple_timeout_remove(conn->destroy_timeout); + g_source_remove(conn->destroy_timeout); conn->disconnect_reason = reason; g_free(conn->error_message); conn->error_message = g_strdup(error_message); @@ -261,7 +261,7 @@ peer_connection_schedule_destroy(PeerConnection *conn, OscarDisconnectReason rea conn->disconnect_reason = reason; g_free(conn->error_message); conn->error_message = g_strdup(error_message); - conn->destroy_timeout = purple_timeout_add(0, peer_connection_destroy_cb, conn); + conn->destroy_timeout = g_timeout_add(0, peer_connection_destroy_cb, conn); } /*******************************************************************/ @@ -554,7 +554,7 @@ peer_connection_common_established_cb(gpointer data, gint source, const gchar *e return; } - purple_timeout_remove(conn->connect_timeout_timer); + g_source_remove(conn->connect_timeout_timer); conn->connect_timeout_timer = 0; if (conn->client_connect_data != NULL) @@ -854,7 +854,7 @@ peer_connection_trynext(PeerConnection *conn) (conn->client_connect_data != NULL)) { /* Connecting... */ - conn->connect_timeout_timer = purple_timeout_add_seconds(5, + conn->connect_timeout_timer = g_timeout_add_seconds(5, peer_connection_tooktoolong, conn); return; } diff --git a/libpurple/protocols/sametime/sametime.c b/libpurple/protocols/sametime/sametime.c index 0254783d00..6dddb06dd5 100644 --- a/libpurple/protocols/sametime/sametime.c +++ b/libpurple/protocols/sametime/sametime.c @@ -814,7 +814,7 @@ static gboolean blist_save_cb(gpointer data) { static void blist_schedule(struct mwPurpleProtocolData *pd) { if(pd->save_event) return; - pd->save_event = purple_timeout_add_seconds(BLIST_SAVE_SECONDS, + pd->save_event = g_timeout_add_seconds(BLIST_SAVE_SECONDS, blist_save_cb, pd); } @@ -3747,7 +3747,7 @@ static void mw_protocol_close(PurpleConnection *gc) { /* get rid of the blist save timeout */ if(pd->save_event) { - purple_timeout_remove(pd->save_event); + g_source_remove(pd->save_event); pd->save_event = 0; blist_store(pd); } diff --git a/libpurple/protocols/silc/silc.c b/libpurple/protocols/silc/silc.c index 5178bc4ae4..1fa09fc363 100644 --- a/libpurple/protocols/silc/silc.c +++ b/libpurple/protocols/silc/silc.c @@ -221,7 +221,7 @@ silcpurple_scheduler(SilcSchedule schedule, /* Add timeout */ ptask = silc_calloc(1, sizeof(*ptask)); ptask->sg = sg; - ptask->tag = purple_timeout_add((seconds * 1000) + + ptask->tag = g_timeout_add((seconds * 1000) + (useconds / 1000), silcpurple_scheduler_timeout, ptask); @@ -646,7 +646,7 @@ silcpurple_login(PurpleAccount *account) #if __SILC_TOOLKIT_VERSION < SILC_VERSION(1,1,1) /* Schedule SILC using Glib's event loop */ - sg->scheduler = purple_timeout_add(300, (GSourceFunc)silcpurple_scheduler, client); + sg->scheduler = g_timeout_add(300, (GSourceFunc)silcpurple_scheduler, client); #else /* Run SILC scheduler */ sg->tasks = silc_dlist_init(); @@ -723,10 +723,10 @@ silcpurple_close(PurpleConnection *gc) #endif /* __SILC_TOOLKIT_VERSION */ if (sg->scheduler) - purple_timeout_remove(sg->scheduler); + g_source_remove(sg->scheduler); purple_debug_info("silc", "Scheduling destruction of SilcPurple %p\n", sg); - purple_timeout_add(1, (GSourceFunc)silcpurple_close_final, sg); + g_timeout_add(1, (GSourceFunc)silcpurple_close_final, sg); } diff --git a/libpurple/protocols/simple/simple.c b/libpurple/protocols/simple/simple.c index 275d34975d..71f46f4eeb 100644 --- a/libpurple/protocols/simple/simple.c +++ b/libpurple/protocols/simple/simple.c @@ -1766,7 +1766,7 @@ static void login_cb(gpointer data, gint source, const gchar *error_message) { conn = connection_create(sip, source); - sip->registertimeout = purple_timeout_add(g_random_int_range(10000, 100000), (GSourceFunc)subscribe_timeout, sip); + sip->registertimeout = g_timeout_add(g_random_int_range(10000, 100000), (GSourceFunc)subscribe_timeout, sip); do_register(sip); @@ -1808,8 +1808,8 @@ static void simple_udp_host_resolved_listen_cb(int listenfd, gpointer data) { sip->listenpa = purple_input_add(sip->fd, PURPLE_INPUT_READ, simple_udp_process, sip->gc); - sip->resendtimeout = purple_timeout_add(2500, (GSourceFunc) resend_timeout, sip); - sip->registertimeout = purple_timeout_add(g_random_int_range(10000, 100000), (GSourceFunc)subscribe_timeout, sip); + sip->resendtimeout = g_timeout_add(2500, (GSourceFunc) resend_timeout, sip); + sip->registertimeout = g_timeout_add(g_random_int_range(10000, 100000), (GSourceFunc)subscribe_timeout, sip); do_register(sip); } @@ -2051,9 +2051,9 @@ static void simple_close(PurpleConnection *gc) if (sip->tx_handler) purple_input_remove(sip->tx_handler); if (sip->resendtimeout) - purple_timeout_remove(sip->resendtimeout); + g_source_remove(sip->resendtimeout); if (sip->registertimeout) - purple_timeout_remove(sip->registertimeout); + g_source_remove(sip->registertimeout); g_cancellable_cancel(sip->cancellable); g_object_unref(G_OBJECT(sip->cancellable)); diff --git a/libpurple/protocols/zephyr/zephyr.c b/libpurple/protocols/zephyr/zephyr.c index 016d4c12eb..96c6f5dbdb 100644 --- a/libpurple/protocols/zephyr/zephyr.c +++ b/libpurple/protocols/zephyr/zephyr.c @@ -1876,11 +1876,11 @@ static void zephyr_login(PurpleAccount * account) process_zsubs(zephyr); if (use_zeph02(zephyr)) { - zephyr->nottimer = purple_timeout_add(100, check_notify_zeph02, gc); + zephyr->nottimer = g_timeout_add(100, check_notify_zeph02, gc); } else if (use_tzc(zephyr)) { - zephyr->nottimer = purple_timeout_add(100, check_notify_tzc, gc); + zephyr->nottimer = g_timeout_add(100, check_notify_tzc, gc); } - zephyr->loctimer = purple_timeout_add_seconds(20, check_loc, gc); + zephyr->loctimer = g_timeout_add_seconds(20, check_loc, gc); } @@ -2007,10 +2007,10 @@ static void zephyr_close(PurpleConnection * gc) g_slist_free(zephyr->subscrips); if (zephyr->nottimer) - purple_timeout_remove(zephyr->nottimer); + g_source_remove(zephyr->nottimer); zephyr->nottimer = 0; if (zephyr->loctimer) - purple_timeout_remove(zephyr->loctimer); + g_source_remove(zephyr->loctimer); zephyr->loctimer = 0; gc = NULL; if (use_zeph02(zephyr)) { diff --git a/libpurple/savedstatuses.c b/libpurple/savedstatuses.c index 888ab34f9d..f703c1cad4 100644 --- a/libpurple/savedstatuses.c +++ b/libpurple/savedstatuses.c @@ -359,7 +359,7 @@ static void schedule_save(void) { if (save_timer == 0) - save_timer = purple_timeout_add_seconds(5, save_cb, NULL); + save_timer = g_timeout_add_seconds(5, save_cb, NULL); } @@ -1260,7 +1260,7 @@ purple_savedstatuses_uninit(void) if (save_timer != 0) { - purple_timeout_remove(save_timer); + g_source_remove(save_timer); save_timer = 0; sync_statuses(); } diff --git a/libpurple/server.c b/libpurple/server.c index e997447f43..13be8259fa 100644 --- a/libpurple/server.c +++ b/libpurple/server.c @@ -90,7 +90,7 @@ get_last_auto_response(PurpleConnection *gc, const char *name) /* because we're modifying or creating a lar, schedule the * function to expire them as the pref dictates */ - purple_timeout_add_seconds((SECS_BEFORE_RESENDING_AUTORESPONSE + 1), expire_last_auto_responses, NULL); + g_timeout_add_seconds((SECS_BEFORE_RESENDING_AUTORESPONSE + 1), expire_last_auto_responses, NULL); tmp = last_auto_responses; diff --git a/libpurple/sslconn.c b/libpurple/sslconn.c index ee9ad37993..fedacf5fc6 100644 --- a/libpurple/sslconn.c +++ b/libpurple/sslconn.c @@ -271,7 +271,7 @@ connection_closed_cb(GObject *stream, GAsyncResult *result, { GError *error = NULL; - purple_timeout_remove(GPOINTER_TO_UINT(timeout_id)); + g_source_remove(GPOINTER_TO_UINT(timeout_id)); g_io_stream_close_finish(G_IO_STREAM(stream), result, &error); @@ -318,7 +318,7 @@ purple_ssl_close(PurpleSslConnection *gsc) g_object_weak_ref(G_OBJECT(gsc->conn), cleanup_cancellable_cb, cancellable); - timer_id = purple_timeout_add_seconds(CONNECTION_CLOSE_TIMEOUT, + timer_id = g_timeout_add_seconds(CONNECTION_CLOSE_TIMEOUT, (GSourceFunc)g_cancellable_cancel, cancellable); g_io_stream_close_async(G_IO_STREAM(gsc->conn), diff --git a/libpurple/stringref.c b/libpurple/stringref.c index 8ec1637b9f..4f0cad02f3 100644 --- a/libpurple/stringref.c +++ b/libpurple/stringref.c @@ -88,7 +88,7 @@ PurpleStringref *purple_stringref_new_noref(const char *value) newref->ref = 0x80000000; if (gclist == NULL) - purple_timeout_add(0, gs_idle_cb, NULL); + g_timeout_add(0, gs_idle_cb, NULL); gclist = g_list_prepend(gclist, newref); return newref; diff --git a/libpurple/stun.c b/libpurple/stun.c index b3df92040c..46a91e731e 100644 --- a/libpurple/stun.c +++ b/libpurple/stun.c @@ -100,7 +100,7 @@ static void close_stun_conn(struct stun_conn *sc) { purple_input_remove(sc->incb); if (sc->timeout) - purple_timeout_remove(sc->timeout); + g_source_remove(sc->timeout); if (sc->fd) close(sc->fd); @@ -167,7 +167,7 @@ static void do_test2(struct stun_conn *sc) { sc->retry = 0; sc->test = 2; sendto(sc->fd, sc->packet, sc->packetsize, 0, (struct sockaddr *)&(sc->addr), sizeof(struct sockaddr_in)); - sc->timeout = purple_timeout_add(500, (GSourceFunc) timeoutfunc, sc); + sc->timeout = g_timeout_add(500, (GSourceFunc) timeoutfunc, sc); } #endif /* 0 */ @@ -275,7 +275,7 @@ static void reply_cb(gpointer data, gint source, PurpleInputCondition cond) { close_stun_conn(sc); do_callbacks(); #else - purple_timeout_remove(sc->timeout); + g_source_remove(sc->timeout); sc->timeout = 0; do_test2(sc); @@ -341,7 +341,7 @@ hbn_listen_cb(int fd, gpointer data) { sc->test = 1; sc->packet = &hdr_data; sc->packetsize = sizeof(struct stun_header); - sc->timeout = purple_timeout_add(500, (GSourceFunc) timeoutfunc, sc); + sc->timeout = g_timeout_add(500, (GSourceFunc) timeoutfunc, sc); } static void @@ -442,7 +442,7 @@ PurpleStunNatDiscovery *purple_stun_discover(PurpleStunCallback cb) { if (use_cached_result) { if(cb) - purple_timeout_add(10, call_callback, cb); + g_timeout_add(10, call_callback, cb); return &nattype; } } @@ -451,7 +451,7 @@ PurpleStunNatDiscovery *purple_stun_discover(PurpleStunCallback cb) { nattype.status = PURPLE_STUN_STATUS_UNKNOWN; nattype.lookup_time = time(NULL); if(cb) - purple_timeout_add(10, call_callback, cb); + g_timeout_add(10, call_callback, cb); return &nattype; } diff --git a/libpurple/upnp.c b/libpurple/upnp.c index b78cadc269..b9f08fa4f5 100644 --- a/libpurple/upnp.c +++ b/libpurple/upnp.c @@ -118,7 +118,7 @@ typedef struct { typedef struct { guint inpa; /* purple_input_add handle */ - guint tima; /* purple_timeout_add handle */ + guint tima; /* g_timeout_add handle */ int fd; struct sockaddr_in server; gchar service_type[20]; @@ -134,7 +134,7 @@ struct _PurpleUPnPMappingAddRemove PurpleUPnPCallback cb; gpointer cb_data; gboolean success; - guint tima; /* purple_timeout_add handle */ + guint tima; /* g_timeout_add handle */ PurpleHttpConnection *hc; }; @@ -404,7 +404,7 @@ upnp_parse_description_cb(PurpleHttpConnection *http_conn, if (dd->inpa > 0) purple_input_remove(dd->inpa); if (dd->tima > 0) - purple_timeout_remove(dd->tima); + g_source_remove(dd->tima); g_free(dd); } @@ -417,7 +417,7 @@ purple_upnp_parse_description(const gchar* descriptionURL, UPnPDiscoveryData *dd /* Remove the timeout because everything it is waiting for has * successfully completed */ - purple_timeout_remove(dd->tima); + g_source_remove(dd->tima); dd->tima = 0; /* Extract base url out of the descriptionURL. @@ -494,7 +494,7 @@ purple_upnp_discover_timeout(gpointer data) if (dd->inpa) purple_input_remove(dd->inpa); if (dd->tima > 0) - purple_timeout_remove(dd->tima); + g_source_remove(dd->tima); dd->inpa = 0; dd->tima = 0; @@ -588,7 +588,7 @@ purple_upnp_discover_send_broadcast(UPnPDiscoveryData *dd) g_free(sendMessage); if(sentSuccess) { - dd->tima = purple_timeout_add(DISCOVERY_TIMEOUT, + dd->tima = g_timeout_add(DISCOVERY_TIMEOUT, purple_upnp_discover_timeout, dd); dd->inpa = purple_input_add(dd->fd, PURPLE_INPUT_READ, purple_upnp_discover_udp_read, dd); @@ -599,7 +599,7 @@ purple_upnp_discover_send_broadcast(UPnPDiscoveryData *dd) /* We have already done all our retries. Make sure that the callback * doesn't get called before the original function returns */ - dd->tima = purple_timeout_add(10, purple_upnp_discover_timeout, dd); + dd->tima = g_timeout_add(10, purple_upnp_discover_timeout, dd); } void @@ -636,7 +636,7 @@ purple_upnp_discover(PurpleUPnPCallback cb, gpointer cb_data) "purple_upnp_discover(): Failed In sock creation\n"); /* Short circuit the retry attempts */ dd->retry_count = NUM_UDP_ATTEMPTS; - dd->tima = purple_timeout_add(10, purple_upnp_discover_timeout, dd); + dd->tima = g_timeout_add(10, purple_upnp_discover_timeout, dd); return; } @@ -646,7 +646,7 @@ purple_upnp_discover(PurpleUPnPCallback cb, gpointer cb_data) "purple_upnp_discover(): Failed In gethostbyname\n"); /* Short circuit the retry attempts */ dd->retry_count = NUM_UDP_ATTEMPTS; - dd->tima = purple_timeout_add(10, purple_upnp_discover_timeout, dd); + dd->tima = g_timeout_add(10, purple_upnp_discover_timeout, dd); return; } @@ -826,7 +826,7 @@ done_port_mapping_cb(PurpleHttpConnection *http_conn, purple_debug_info("upnp", "Successfully completed port mapping operation\n"); ar->success = success; - ar->tima = purple_timeout_add(0, fire_ar_cb_async_and_free, ar); + ar->tima = g_timeout_add(0, fire_ar_cb_async_and_free, ar); } static void @@ -844,7 +844,7 @@ do_port_mapping_cb(gboolean has_control_mapping, gpointer data) purple_debug_error("upnp", "purple_upnp_set_port_mapping(): couldn't get local ip\n"); ar->success = FALSE; - ar->tima = purple_timeout_add(0, fire_ar_cb_async_and_free, ar); + ar->tima = g_timeout_add(0, fire_ar_cb_async_and_free, ar); return; } strncpy(action_name, "AddPortMapping", @@ -868,7 +868,7 @@ do_port_mapping_cb(gboolean has_control_mapping, gpointer data) } ar->success = FALSE; - ar->tima = purple_timeout_add(0, fire_ar_cb_async_and_free, ar); + ar->tima = g_timeout_add(0, fire_ar_cb_async_and_free, ar); } static gboolean @@ -903,7 +903,7 @@ void purple_upnp_cancel_port_mapping(PurpleUPnPMappingAddRemove *ar) } if (ar->tima > 0) - purple_timeout_remove(ar->tima); + g_source_remove(ar->tima); purple_http_conn_cancel(ar->hc); @@ -944,7 +944,7 @@ purple_upnp_set_port_mapping(unsigned short portmap, const gchar* protocol, } else if(control_info.status == PURPLE_UPNP_STATUS_UNABLE_TO_DISCOVER) { if (cb) { /* Asynchronously trigger a failed response */ - ar->tima = purple_timeout_add(10, fire_port_mapping_failure_cb, ar); + ar->tima = g_timeout_add(10, fire_port_mapping_failure_cb, ar); } else { /* No need to do anything if nobody expects a response*/ g_free(ar); @@ -989,7 +989,7 @@ purple_upnp_remove_port_mapping(unsigned short portmap, const char* protocol, } else if(control_info.status == PURPLE_UPNP_STATUS_UNABLE_TO_DISCOVER) { if (cb) { /* Asynchronously trigger a failed response */ - ar->tima = purple_timeout_add(10, fire_port_mapping_failure_cb, ar); + ar->tima = g_timeout_add(10, fire_port_mapping_failure_cb, ar); } else { /* No need to do anything if nobody expects a response*/ g_free(ar); diff --git a/meson.build b/meson.build index ea28cb3ae4..b16562529b 100644 --- a/meson.build +++ b/meson.build @@ -413,7 +413,6 @@ with_x = get_option('x') and not IS_WIN32 # # Check for GTK+ 2.18 and other things used by the GTK UI # ####################################################################### enable_screensaver = get_option('screensaver') -enable_startup_notification = get_option('startup-notification') enable_enchant = get_option('enchant') enable_gevolution = get_option('gevolution') enable_cap = get_option('cap') @@ -564,7 +563,6 @@ else # GTK enable_gcr = false enable_gevolution = false enable_screensaver = false - enable_startup_notification = false use_enchant = false endif # GTK @@ -1432,7 +1430,6 @@ message('Install translations.......... : ' + INSTALL_I18N.to_string()) message('Has you....................... : yes') message('') message('Use XScreenSaver Extension.... : ' + enable_screensaver.to_string()) -message('Use startup notification...... : ' + enable_startup_notification.to_string()) message('Build with Enchant support.... : ' + use_enchant.to_string()) message('Build with GCR widgets........ : ' + enable_gcr.to_string()) message('Build Unity integration plugin.: ' + enable_unity.to_string()) diff --git a/meson_options.txt b/meson_options.txt index 442c00ada4..78e22364c6 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -23,9 +23,6 @@ option('doc', type : 'boolean', value : false, option('screensaver', type : 'boolean', value : true, description : 'compile with X screensaver extension (used to detect idleness)') -option('startup-notification', type : 'boolean', value : true, - description : 'compile with startup notification support') - option('enchant', type : 'boolean', value : true, description : 'compile with Enchange spell checking support') diff --git a/pidgin/gtkblist.c b/pidgin/gtkblist.c index 41fef354ee..63f509a39d 100644 --- a/pidgin/gtkblist.c +++ b/pidgin/gtkblist.c @@ -4981,7 +4981,7 @@ static gboolean pidgin_blist_select_notebook_page_cb(gpointer user_data) static void pidgin_blist_select_notebook_page(PidginBuddyList *gtkblist) { PidginBuddyListPrivate *priv = PIDGIN_BUDDY_LIST_GET_PRIVATE(gtkblist); - priv->select_notebook_page_timeout = purple_timeout_add(0, + priv->select_notebook_page_timeout = g_timeout_add(0, pidgin_blist_select_notebook_page_cb, gtkblist); } @@ -6042,7 +6042,7 @@ static void pidgin_blist_show(PurpleBuddyList *list) purple_blist_set_visible(purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/blist/list_visible")); /* start the refresh timer */ - gtkblist->refresh_timer = purple_timeout_add_seconds(30, (GSourceFunc)pidgin_blist_refresh_timer, list); + gtkblist->refresh_timer = g_timeout_add_seconds(30, (GSourceFunc)pidgin_blist_refresh_timer, list); handle = pidgin_blist_get_handle(); @@ -6165,7 +6165,7 @@ pidgin_blist_update_refresh_timeout() blist = purple_blist_get_buddy_list(); gtkblist = PIDGIN_BLIST(purple_blist_get_buddy_list()); - gtkblist->refresh_timer = purple_timeout_add_seconds(30,(GSourceFunc)pidgin_blist_refresh_timer, blist); + gtkblist->refresh_timer = g_timeout_add_seconds(30,(GSourceFunc)pidgin_blist_refresh_timer, blist); } static gboolean get_iter_from_node(PurpleBlistNode *node, GtkTreeIter *iter) { @@ -6218,7 +6218,7 @@ static void pidgin_blist_remove(PurpleBuddyList *list, PurpleBlistNode *node) if(gtknode) { if(gtknode->recent_signonoff_timer > 0) - purple_timeout_remove(gtknode->recent_signonoff_timer); + g_source_remove(gtknode->recent_signonoff_timer); purple_signals_disconnect_by_handle(gtknode); g_free(gtknode); @@ -6882,7 +6882,7 @@ static void pidgin_blist_destroy(PurpleBuddyList *list) pidgin_blist_tooltip_destroy(); if (gtkblist->refresh_timer) - purple_timeout_remove(gtkblist->refresh_timer); + g_source_remove(gtkblist->refresh_timer); if (gtkblist->timeout) g_source_remove(gtkblist->timeout); if (gtkblist->drag_timeout) @@ -6902,7 +6902,7 @@ static void pidgin_blist_destroy(PurpleBuddyList *list) if (priv->current_theme) g_object_unref(priv->current_theme); if (priv->select_notebook_page_timeout) - purple_timeout_remove(priv->select_notebook_page_timeout); + g_source_remove(priv->select_notebook_page_timeout); g_free(priv); g_free(gtkblist); @@ -7494,10 +7494,10 @@ static void buddy_signonoff_cb(PurpleBuddy *buddy) gtknode->recent_signonoff = TRUE; if(gtknode->recent_signonoff_timer > 0) - purple_timeout_remove(gtknode->recent_signonoff_timer); + g_source_remove(gtknode->recent_signonoff_timer); g_object_ref(buddy); - gtknode->recent_signonoff_timer = purple_timeout_add_seconds(10, + gtknode->recent_signonoff_timer = g_timeout_add_seconds(10, (GSourceFunc)buddy_signonoff_timeout_cb, buddy); } diff --git a/pidgin/gtkconv.c b/pidgin/gtkconv.c index 1304134edc..4e3512517e 100644 --- a/pidgin/gtkconv.c +++ b/pidgin/gtkconv.c @@ -1383,8 +1383,8 @@ hide_conv(PidginConversation *gtkconv, gboolean closetimer) if (closetimer) { guint timer = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(conv), "close-timer")); if (timer) - purple_timeout_remove(timer); - timer = purple_timeout_add_seconds(CLOSE_CONV_TIMEOUT_SECS, close_already, conv); + g_source_remove(timer); + timer = g_timeout_add_seconds(CLOSE_CONV_TIMEOUT_SECS, close_already, conv); g_object_set_data(G_OBJECT(conv), "close-timer", GINT_TO_POINTER(timer)); } #if 0 @@ -2003,7 +2003,7 @@ update_typing_deleting(PidginConversation *gtkconv) is_empty = pidgin_webview_is_empty(PIDGIN_WEBVIEW(gtkconv->entry)); if (!is_empty) - purple_timeout_add(0, (GSourceFunc)update_typing_deleting_cb, gtkconv); + g_timeout_add(0, (GSourceFunc)update_typing_deleting_cb, gtkconv); } static gboolean @@ -6132,7 +6132,7 @@ received_im_msg_cb(PurpleAccount *account, char *sender, char *message, if (conv) { timer = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(conv), "close-timer")); if (timer) { - purple_timeout_remove(timer); + g_source_remove(timer); g_object_set_data(G_OBJECT(conv), "close-timer", GINT_TO_POINTER(0)); } } @@ -8576,7 +8576,7 @@ pidgin_conv_attach(PurpleConversation *conv) private_gtkconv_new(conv, FALSE); timer = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(conv), "close-timer")); if (timer) { - purple_timeout_remove(timer); + g_source_remove(timer); g_object_set_data(G_OBJECT(conv), "close-timer", NULL); } } diff --git a/pidgin/gtkdebug.c b/pidgin/gtkdebug.c index 32e4b9ba23..77301105f4 100644 --- a/pidgin/gtkdebug.c +++ b/pidgin/gtkdebug.c @@ -69,7 +69,7 @@ debug_window_destroy(GtkWidget *w, GdkEvent *event, void *unused) if(debug_win->timer != 0) { const gchar *text; - purple_timeout_remove(debug_win->timer); + g_source_remove(debug_win->timer); text = gtk_entry_get_text(GTK_ENTRY(debug_win->expression)); purple_prefs_set_string(PIDGIN_PREFS_ROOT "/debug/regex", text); @@ -261,7 +261,7 @@ regex_changed_cb(GtkWidget *w, DebugWindow *win) { } if (win->timer == 0) - win->timer = purple_timeout_add_seconds(5, (GSourceFunc)regex_timer_cb, win); + win->timer = g_timeout_add_seconds(5, (GSourceFunc)regex_timer_cb, win); text = gtk_entry_get_text(GTK_ENTRY(win->expression)); diff --git a/pidgin/gtkdocklet.c b/pidgin/gtkdocklet.c index 542e79f6bf..91b959a15d 100644 --- a/pidgin/gtkdocklet.c +++ b/pidgin/gtkdocklet.c @@ -358,7 +358,7 @@ docklet_menu_leave_enter(GtkWidget *menu, GdkEventCrossing *event, void *data) purple_debug(PURPLE_DEBUG_INFO, "docklet", "menu leave-notify-event\n"); /* Add some slop so that the menu doesn't annoyingly disappear when mousing around */ if (hide_docklet_timer == 0) { - hide_docklet_timer = purple_timeout_add(500, + hide_docklet_timer = g_timeout_add(500, hide_docklet_menu, menu); } } else if (event->type == GDK_ENTER_NOTIFY && event->detail == GDK_NOTIFY_ANCESTOR) { @@ -366,7 +366,7 @@ docklet_menu_leave_enter(GtkWidget *menu, GdkEventCrossing *event, void *data) if (hide_docklet_timer != 0) { /* Cancel the hiding if we reenter */ - purple_timeout_remove(hide_docklet_timer); + g_source_remove(hide_docklet_timer); hide_docklet_timer = 0; } } @@ -840,7 +840,7 @@ static gboolean docklet_gtk_embedded_cb(GtkWidget *widget, gpointer data) { if (embed_timeout) { - purple_timeout_remove(embed_timeout); + g_source_remove(embed_timeout); embed_timeout = 0; } @@ -885,7 +885,7 @@ docklet_gtk_status_destroy(void) pidgin_docklet_remove(); if (embed_timeout) { - purple_timeout_remove(embed_timeout); + g_source_remove(embed_timeout); embed_timeout = 0; } @@ -933,9 +933,9 @@ docklet_gtk_status_create(gboolean recreate) pidgin_docklet_embedded(); #ifndef _WIN32 if (purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/docklet/gtk/embedded")) { - embed_timeout = purple_timeout_add_seconds(LONG_EMBED_TIMEOUT, docklet_gtk_embed_timeout_cb, NULL); + embed_timeout = g_timeout_add_seconds(LONG_EMBED_TIMEOUT, docklet_gtk_embed_timeout_cb, NULL); } else { - embed_timeout = purple_timeout_add_seconds(SHORT_EMBED_TIMEOUT, docklet_gtk_embed_timeout_cb, NULL); + embed_timeout = g_timeout_add_seconds(SHORT_EMBED_TIMEOUT, docklet_gtk_embed_timeout_cb, NULL); } #endif } diff --git a/pidgin/gtkroomlist.c b/pidgin/gtkroomlist.c index 40507eef33..6c785ae953 100644 --- a/pidgin/gtkroomlist.c +++ b/pidgin/gtkroomlist.c @@ -84,7 +84,7 @@ static gint delete_win_cb(GtkWidget *w, GdkEventAny *e, gpointer d) purple_roomlist_cancel_get_list(dialog->roomlist); if (dialog->pg_update_to > 0) - purple_timeout_remove(dialog->pg_update_to); + g_source_remove(dialog->pg_update_to); if (dialog->roomlist) { PidginRoomlist *rl = purple_roomlist_get_ui_data(dialog->roomlist); diff --git a/pidgin/gtksound.c b/pidgin/gtksound.c index 981f6989ee..450b07a5ac 100644 --- a/pidgin/gtksound.c +++ b/pidgin/gtksound.c @@ -232,9 +232,9 @@ static void account_signon_cb(PurpleConnection *gc, gpointer data) { if (mute_login_sounds_timeout != 0) - purple_timeout_remove(mute_login_sounds_timeout); + g_source_remove(mute_login_sounds_timeout); mute_login_sounds = TRUE; - mute_login_sounds_timeout = purple_timeout_add_seconds(10, unmute_login_sounds_cb, NULL); + mute_login_sounds_timeout = g_timeout_add_seconds(10, unmute_login_sounds_cb, NULL); } const char * @@ -507,7 +507,7 @@ pidgin_sound_play_file(const char *filename) error->message); g_error_free(error); } else { - purple_timeout_add_seconds(15, expire_old_child, GINT_TO_POINTER(pid)); + g_timeout_add_seconds(15, expire_old_child, GINT_TO_POINTER(pid)); } g_strfreev(argv); diff --git a/pidgin/gtkstatusbox.c b/pidgin/gtkstatusbox.c index 0086492dbe..60139fc4c0 100644 --- a/pidgin/gtkstatusbox.c +++ b/pidgin/gtkstatusbox.c @@ -1094,7 +1094,7 @@ webview_remove_focus(GtkWidget *w, GdkEventKey *event, PidginStatusBox *status_b /* Reset the status if Escape was pressed */ if (event->keyval == GDK_KEY_Escape) { - purple_timeout_remove(status_box->typing); + g_source_remove(status_box->typing); status_box->typing = 0; #if 0 /* TODO WebKit: Doesn't do this? */ @@ -1112,8 +1112,8 @@ webview_remove_focus(GtkWidget *w, GdkEventKey *event, PidginStatusBox *status_b } pidgin_status_box_pulse_typing(status_box); - purple_timeout_remove(status_box->typing); - status_box->typing = purple_timeout_add_seconds(TYPING_TIMEOUT, (GSourceFunc)remove_typing_cb, status_box); + g_source_remove(status_box->typing); + status_box->typing = g_timeout_add_seconds(TYPING_TIMEOUT, (GSourceFunc)remove_typing_cb, status_box); return FALSE; } @@ -2562,7 +2562,7 @@ static void remove_typing_cb(PidginStatusBox *status_box) PIDGIN_WEBVIEW(status_box->webview), TRUE); #endif - purple_timeout_remove(status_box->typing); + g_source_remove(status_box->typing); status_box->typing = 0; activate_currently_selected_status(status_box); @@ -2591,7 +2591,7 @@ static void pidgin_status_box_changed(PidginStatusBox *status_box) DATA_COLUMN, &data, -1); if ((wastyping = (status_box->typing != 0))) - purple_timeout_remove(status_box->typing); + g_source_remove(status_box->typing); status_box->typing = 0; if (gtk_widget_get_sensitive(GTK_WIDGET(status_box))) @@ -2661,7 +2661,7 @@ static void pidgin_status_box_changed(PidginStatusBox *status_box) if (status_box->webview_visible) { gtk_widget_show_all(status_box->vbox); - status_box->typing = purple_timeout_add_seconds(TYPING_TIMEOUT, (GSourceFunc)remove_typing_cb, status_box); + status_box->typing = g_timeout_add_seconds(TYPING_TIMEOUT, (GSourceFunc)remove_typing_cb, status_box); gtk_widget_grab_focus(status_box->webview); #if 0 /* TODO WebKit: Doesn't do this? */ @@ -2718,9 +2718,9 @@ webview_changed_cb(PidginWebView *webview, void *data) { if (status_box->typing != 0) { pidgin_status_box_pulse_typing(status_box); - purple_timeout_remove(status_box->typing); + g_source_remove(status_box->typing); } - status_box->typing = purple_timeout_add_seconds(TYPING_TIMEOUT, (GSourceFunc)remove_typing_cb, status_box); + status_box->typing = g_timeout_add_seconds(TYPING_TIMEOUT, (GSourceFunc)remove_typing_cb, status_box); } pidgin_status_box_refresh(status_box); } diff --git a/pidgin/gtkutils.c b/pidgin/gtkutils.c index 9afe3b7582..d998ff9a5c 100644 --- a/pidgin/gtkutils.c +++ b/pidgin/gtkutils.c @@ -884,7 +884,7 @@ pidgin_save_accels_cb(GtkAccelGroup *accel_group, guint arg1, "accel changed, scheduling save.\n"); if (!accels_save_timer) - accels_save_timer = purple_timeout_add_seconds(5, pidgin_save_accels, + accels_save_timer = g_timeout_add_seconds(5, pidgin_save_accels, NULL); } diff --git a/pidgin/plugins/cap/cap.c b/pidgin/plugins/cap/cap.c index d353631137..b28401a86d 100644 --- a/pidgin/plugins/cap/cap.c +++ b/pidgin/plugins/cap/cap.c @@ -130,7 +130,7 @@ static void destroy_stats(gpointer data) { /* g_free(stats->hourly_usage); */ /* g_free(stats->daily_usage); */ if (stats->timeout_source_id != 0) - purple_timeout_remove(stats->timeout_source_id); + g_source_remove(stats->timeout_source_id); g_free(stats); } @@ -359,9 +359,9 @@ static void sent_im_msg(PurpleAccount *account, PurpleMessage *msg, gpointer _un stats->last_message = time(NULL); stats->last_message_status_id = purple_status_get_id(get_status_for(buddy)); if(stats->timeout_source_id != 0) - purple_timeout_remove(stats->timeout_source_id); + g_source_remove(stats->timeout_source_id); - stats->timeout_source_id = purple_timeout_add_seconds(interval, max_message_difference_cb, stats); + stats->timeout_source_id = g_timeout_add_seconds(interval, max_message_difference_cb, stats); } /* received-im-msg */ @@ -387,7 +387,7 @@ received_im_msg(PurpleAccount *account, char *sender, char *message, PurpleConve * then cancel the timeout callback. */ if(stats->timeout_source_id != 0) { purple_debug_info("cap", "Cancelling timeout callback\n"); - purple_timeout_remove(stats->timeout_source_id); + g_source_remove(stats->timeout_source_id); stats->timeout_source_id = 0; } @@ -678,7 +678,7 @@ static void add_plugin_functionality(PurplePlugin *plugin) { static void cancel_conversation_timeouts(gpointer key, gpointer value, gpointer user_data) { CapStatistics *stats = value; if(stats->timeout_source_id != 0) { - purple_timeout_remove(stats->timeout_source_id); + g_source_remove(stats->timeout_source_id); stats->timeout_source_id = 0; } } diff --git a/pidgin/plugins/mailchk.c b/pidgin/plugins/mailchk.c index 1436ea0984..4838e63e58 100644 --- a/pidgin/plugins/mailchk.c +++ b/pidgin/plugins/mailchk.c @@ -94,7 +94,7 @@ signon_cb(PurpleConnection *gc) PurpleBuddyList *list = purple_blist_get_buddy_list(); if (list && !timer) { check_timeout(NULL); /* we want the box to be drawn immediately */ - timer = purple_timeout_add_seconds(2, check_timeout, NULL); + timer = g_timeout_add_seconds(2, check_timeout, NULL); } } @@ -103,7 +103,7 @@ signoff_cb(PurpleConnection *gc) { PurpleBuddyList *list = purple_blist_get_buddy_list(); if ((!list || !PIDGIN_BLIST(list)->vbox) && timer) { - purple_timeout_remove(timer); + g_source_remove(timer); timer = 0; } } @@ -148,7 +148,7 @@ plugin_load(PurplePlugin *plugin, GError **error) } if (list && PIDGIN_BLIST(list)->vbox) - timer = purple_timeout_add_seconds(2, check_timeout, NULL); + timer = g_timeout_add_seconds(2, check_timeout, NULL); purple_signal_connect(conn_handle, "signed-on", plugin, PURPLE_CALLBACK(signon_cb), NULL); @@ -162,7 +162,7 @@ static gboolean plugin_unload(PurplePlugin *plugin, GError **error) { if (timer) - purple_timeout_remove(timer); + g_source_remove(timer); timer = 0; if (mail) gtk_widget_destroy(mail); diff --git a/pidgin/plugins/screencap.c b/pidgin/plugins/screencap.c index b17aab6acd..74f99c4703 100644 --- a/pidgin/plugins/screencap.c +++ b/pidgin/plugins/screencap.c @@ -666,7 +666,7 @@ scrncap_do_screenshot(GtkAction *action, PidginWebView *webview) return; is_shooting = TRUE; - shooting_timeout = purple_timeout_add(SCRNCAP_SHOOTING_TIMEOUT, + shooting_timeout = g_timeout_add(SCRNCAP_SHOOTING_TIMEOUT, scrncap_do_screenshot_cb, webview); } @@ -979,7 +979,7 @@ plugin_unload(PurplePlugin *plugin, GError **error) GList *it; if (shooting_timeout > 0) - purple_timeout_remove(shooting_timeout); + g_source_remove(shooting_timeout); if (current_window != NULL) gtk_widget_destroy(GTK_WIDGET(current_window)); diff --git a/pidgin/win32/gtkwin32dep.c b/pidgin/win32/gtkwin32dep.c index 6ad0e07e8d..5ea45eef2b 100644 --- a/pidgin/win32/gtkwin32dep.c +++ b/pidgin/win32/gtkwin32dep.c @@ -247,7 +247,7 @@ static LRESULT CALLBACK message_window_handler(HWND hwnd, UINT msg, WPARAM wpara } else if (wparam == PBT_APMRESUMESUSPEND) { purple_debug_info("winpidgin", "Resuming from system standby.\n"); /* TODO: It seems like it'd be wise to use the NLA message, if possible, instead of this. */ - purple_timeout_add_seconds(1, winpidgin_pwm_reconnect, NULL); + g_timeout_add_seconds(1, winpidgin_pwm_reconnect, NULL); return TRUE; } } |