Fri, 07 Jul 2017 01:40:48 +0000
Merged in CMaiku/pidgin (pull request #231)
Remove purple_timeout_* functions
Approved-by: Gary Kramlich <grim@reaperworld.com>
Approved-by: Eion Robb <eionrobb@gmail.com>
--- a/ChangeLog.API Thu Jun 29 11:30:53 2017 -0500 +++ b/ChangeLog.API Fri Jul 07 01:40:48 2017 +0000 @@ -484,6 +484,7 @@ * 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.
--- a/finch/gntblist.c Thu Jun 29 11:30:53 2017 -0500 +++ b/finch/gntblist.c Fri Jul 07 01:40:48 2017 +0000 @@ -338,7 +338,7 @@ 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 @@ * 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 @@ } 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 @@ 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 @@ /* 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 @@ 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 @@ 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 @@ 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 @@ 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);
--- a/finch/gntsound.c Thu Jun 29 11:30:53 2017 -0500 +++ b/finch/gntsound.c Fri Jul 07 01:40:48 2017 +0000 @@ -281,7 +281,7 @@ 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 *
--- a/finch/plugins/gntgf.c Thu Jun 29 11:30:53 2017 -0500 +++ b/finch/plugins/gntgf.c Fri Jul 07 01:40:48 2017 +0000 @@ -76,7 +76,7 @@ { 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 @@ } 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); }
--- a/libpurple/account.c Thu Jun 29 11:30:53 2017 -0500 +++ b/libpurple/account.c Fri Jul 07 01:40:48 2017 +0000 @@ -217,7 +217,7 @@ 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 @@ 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 @@ 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); } }
--- a/libpurple/accounts.c Thu Jun 29 11:30:53 2017 -0500 +++ b/libpurple/accounts.c Fri Jul 07 01:40:48 2017 +0000 @@ -86,7 +86,7 @@ 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 @@ 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(); }
--- a/libpurple/buddylist.c Thu Jun 29 11:30:53 2017 -0500 +++ b/libpurple/buddylist.c Fri Jul 07 01:40:48 2017 +0000 @@ -433,7 +433,7 @@ _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 @@ return; if (save_timer != 0) { - purple_timeout_remove(save_timer); + g_source_remove(save_timer); save_timer = 0; purple_blist_sync(); }
--- a/libpurple/connection.c Thu Jun 29 11:30:53 2017 -0500 +++ b/libpurple/connection.c Fri Jul 07 01:40:48 2017 +0000 @@ -146,12 +146,12 @@ 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_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_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);
--- a/libpurple/conversationtypes.c Thu Jun 29 11:30:53 2017 -0500 +++ b/libpurple/conversationtypes.c Fri Jul 07 01:40:48 2017 +0000 @@ -258,7 +258,7 @@ 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 @@ 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 @@ 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 @@ 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; }
--- a/libpurple/core.h Thu Jun 29 11:30:53 2017 -0500 +++ b/libpurple/core.h Fri Jul 07 01:40:48 2017 +0000 @@ -109,13 +109,13 @@ * 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
--- a/libpurple/eventloop.c Thu Jun 29 11:30:53 2017 -0500 +++ b/libpurple/eventloop.c Fri Jul 07 01:40:48 2017 +0000 @@ -30,24 +30,6 @@ 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) {
--- a/libpurple/eventloop.h Thu Jun 29 11:30:53 2017 -0500 +++ b/libpurple/eventloop.h Fri Jul 07 01:40:48 2017 +0000 @@ -62,54 +62,6 @@ /**************************************************************************/ /** - * 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.
--- a/libpurple/http.c Thu Jun 29 11:30:53 2017 -0500 +++ b/libpurple/http.c Fri Jul 07 01:40:48 2017 +0000 @@ -1782,7 +1782,7 @@ _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 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 @@ { 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 @@ (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 @@ 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); }
--- a/libpurple/idle.c Thu Jun 29 11:30:53 2017 -0500 +++ b/libpurple/idle.c Fri Jul 07 01:40:48 2017 +0000 @@ -224,7 +224,7 @@ { /* +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 @@ 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 @@ 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 @@ 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 @@ /* 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 @@ /* Remove the idle timer */ if (idle_timer > 0) - purple_timeout_remove(idle_timer); + g_source_remove(idle_timer); idle_timer = 0; }
--- a/libpurple/image-store.c Thu Jun 29 11:30:53 2017 -0500 +++ b/libpurple/image-store.c Fri Jul 07 01:40:48 2017 +0000 @@ -124,7 +124,7 @@ 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 @@ 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));
--- a/libpurple/media/backend-fs2.c Thu Jun 29 11:30:53 2017 -0500 +++ b/libpurple/media/backend-fs2.c Fri Jul 07 01:40:48 2017 +0000 @@ -1888,7 +1888,7 @@ 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 @@ { /* 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 @@ 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); }
--- a/libpurple/mediamanager.c Thu Jun 29 11:30:53 2017 -0500 +++ b/libpurple/mediamanager.c Fri Jul 07 01:40:48 2017 +0000 @@ -581,12 +581,12 @@ 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 @@ /* 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 @@ 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 @@ 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; }
--- a/libpurple/network.c Thu Jun 29 11:30:53 2017 -0500 +++ b/libpurple/network.c Fri Jul 07 01:40:48 2017 +0000 @@ -468,7 +468,7 @@ { 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_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 @@ 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); }
--- a/libpurple/plugins/filectl.c Thu Jun 29 11:30:53 2017 -0500 +++ b/libpurple/plugins/filectl.c Fri Jul 07 01:40:48 2017 +0000 @@ -242,7 +242,7 @@ 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 @@ static gboolean plugin_unload(PurplePlugin *plugin, GError **error) { - purple_timeout_remove(check); + g_source_remove(check); return TRUE; }
--- a/libpurple/plugins/joinpart.c Thu Jun 29 11:30:53 2017 -0500 +++ b/libpurple/plugins/joinpart.c Fri Jul 07 01:40:48 2017 +0000 @@ -255,7 +255,7 @@ 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 @@ * 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; }
--- a/libpurple/pounce.c Thu Jun 29 11:30:53 2017 -0500 +++ b/libpurple/pounce.c Fri Jul 07 01:40:48 2017 +0000 @@ -295,7 +295,7 @@ 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 @@ { if (save_timer != 0) { - purple_timeout_remove(save_timer); + g_source_remove(save_timer); save_timer = 0; sync_pounces(); }
--- a/libpurple/prefs.c Thu Jun 29 11:30:53 2017 -0500 +++ b/libpurple/prefs.c Fri Jul 07 01:40:48 2017 +0000 @@ -261,7 +261,7 @@ 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 @@ { if (save_timer != 0) { - purple_timeout_remove(save_timer); + g_source_remove(save_timer); save_cb(NULL); }
--- a/libpurple/protocols/bonjour/bonjour.c Thu Jun 29 11:30:53 2017 -0500 +++ b/libpurple/protocols/bonjour/bonjour.c Fri Jul 07 01:40:48 2017 +0000 @@ -564,7 +564,7 @@ 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; }
--- a/libpurple/protocols/bonjour/jabber.c Thu Jun 29 11:30:53 2017 -0500 +++ b/libpurple/protocols/bonjour/jabber.c Fri Jul 07 01:40:48 2017 +0000 @@ -1139,7 +1139,7 @@ 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_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);
--- a/libpurple/protocols/facebook/data.c Thu Jun 29 11:30:53 2017 -0500 +++ b/libpurple/protocols/facebook/data.c Fri Jul 07 01:40:48 2017 +0000 @@ -73,7 +73,7 @@ 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_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 @@ id = GPOINTER_TO_UINT(ptr); if ((id > 0) && remove) { - purple_timeout_remove(id); + g_source_remove(id); } g_hash_table_remove(priv->evs, name);
--- a/libpurple/protocols/facebook/mqtt.c Thu Jun 29 11:30:53 2017 -0500 +++ b/libpurple/protocols/facebook/mqtt.c Fri Jul 07 01:40:48 2017 +0000 @@ -225,7 +225,7 @@ priv = mqtt->priv; if (priv->tev > 0) { - purple_timeout_remove(priv->tev); + g_source_remove(priv->tev); priv->tev = 0; } @@ -300,7 +300,7 @@ 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 @@ 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 @@ 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); }
--- a/libpurple/protocols/gg/avatar.c Thu Jun 29 11:30:53 2017 -0500 +++ b/libpurple/protocols/gg/avatar.c Fri Jul 07 01:40:48 2017 +0000 @@ -90,14 +90,14 @@ 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 =
--- a/libpurple/protocols/gg/chat.c Thu Jun 29 11:30:53 2017 -0500 +++ b/libpurple/protocols/gg/chat.c Fri Jul 07 01:40:48 2017 +0000 @@ -610,6 +610,6 @@ * 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; }
--- a/libpurple/protocols/gg/roster.c Thu Jun 29 11:30:53 2017 -0500 +++ b/libpurple/protocols/gg/roster.c Fri Jul 07 01:40:48 2017 +0000 @@ -237,7 +237,7 @@ 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 @@ 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);
--- a/libpurple/protocols/irc/irc.c Thu Jun 29 11:30:53 2017 -0500 +++ b/libpurple/protocols/irc/irc.c Fri Jul 07 01:40:48 2017 +0000 @@ -463,7 +463,7 @@ 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);
--- a/libpurple/protocols/irc/msgs.c Thu Jun 29 11:30:53 2017 -0500 +++ b/libpurple/protocols/irc/msgs.c Fri Jul 07 01:40:48 2017 +0000 @@ -123,7 +123,7 @@ 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. */
--- a/libpurple/protocols/jabber/bosh.c Thu Jun 29 11:30:53 2017 -0500 +++ b/libpurple/protocols/jabber/bosh.c Fri Jul 07 01:40:48 2017 +0000 @@ -150,7 +150,7 @@ 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 @@ 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 @@ 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); }
--- a/libpurple/protocols/jabber/buddy.c Thu Jun 29 11:30:53 2017 -0500 +++ b/libpurple/protocols/jabber/buddy.c Fri Jul 07 01:40:48 2017 +0000 @@ -485,7 +485,7 @@ } if (js->vcard_timer) { - purple_timeout_remove(js->vcard_timer); + g_source_remove(js->vcard_timer); js->vcard_timer = 0; } @@ -709,7 +709,7 @@ { /* 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 @@ * <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 @@ } 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)
--- a/libpurple/protocols/jabber/caps.c Thu Jun 29 11:30:53 2017 -0500 +++ b/libpurple/protocols/jabber/caps.c Fri Jul 07 01:40:48 2017 +0000 @@ -220,7 +220,7 @@ 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_uninit(void) { if (save_timer != 0) { - purple_timeout_remove(save_timer); + g_source_remove(save_timer); save_timer = 0; do_jabber_caps_store(NULL); }
--- a/libpurple/protocols/jabber/jabber.c Thu Jun 29 11:30:53 2017 -0500 +++ b/libpurple/protocols/jabber/jabber.c Fri Jul 07 01:40:48 2017 +0000 @@ -640,7 +640,7 @@ 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 @@ 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 @@ 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 @@ 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); }
--- a/libpurple/protocols/jabber/ping.c Thu Jun 29 11:30:53 2017 -0500 +++ b/libpurple/protocols/jabber/ping.c Fri Jul 07 01:40:48 2017 +0000 @@ -35,7 +35,7 @@ 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; } }
--- a/libpurple/protocols/jabber/si.c Thu Jun 29 11:30:53 2017 -0500 +++ b/libpurple/protocols/jabber/si.c Fri Jul 07 01:40:48 2017 +0000 @@ -128,7 +128,7 @@ 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 @@ 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 @@ 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 @@ 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 @@ /* 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 @@ && !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 @@ 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 @@ /* 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 @@ 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);
--- a/libpurple/protocols/null/nullprpl.c Thu Jun 29 11:30:53 2017 -0500 +++ b/libpurple/protocols/null/nullprpl.c Fri Jul 07 01:40:48 2017 +0000 @@ -957,7 +957,7 @@ } 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; }
--- a/libpurple/protocols/oscar/flap_connection.c Thu Jun 29 11:30:53 2017 -0500 +++ b/libpurple/protocols/oscar/flap_connection.c Fri Jul 07 01:40:48 2017 +0000 @@ -271,7 +271,7 @@ } 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 @@ } if (conn->queued_timeout > 0) - purple_timeout_remove(conn->queued_timeout); + g_source_remove(conn->queued_timeout); g_free(conn); @@ -546,7 +546,7 @@ 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 @@ 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); } /**
--- a/libpurple/protocols/oscar/oft.c Thu Jun 29 11:30:53 2017 -0500 +++ b/libpurple/protocols/oscar/oft.c Fri Jul 07 01:40:48 2017 +0000 @@ -79,7 +79,7 @@ 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 @@ } 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 @@ 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 @@ /* 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 @@ /* 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_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); }
--- a/libpurple/protocols/oscar/oscar.c Thu Jun 29 11:30:53 2017 -0500 +++ b/libpurple/protocols/oscar/oscar.c Fri Jul 07 01:40:48 2017 +0000 @@ -449,8 +449,8 @@ 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 @@ 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 @@ "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 @@ /* 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; }
--- a/libpurple/protocols/oscar/oscar_data.c Thu Jun 29 11:30:53 2017 -0500 +++ b/libpurple/protocols/oscar/oscar_data.c Fri Jul 07 01:40:48 2017 +0000 @@ -117,7 +117,7 @@ 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);
--- a/libpurple/protocols/oscar/peer.c Thu Jun 29 11:30:53 2017 -0500 +++ b/libpurple/protocols/oscar/peer.c Fri Jul 07 01:40:48 2017 +0000 @@ -155,7 +155,7 @@ 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 @@ 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 @@ 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 @@ 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 @@ (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; }
--- a/libpurple/protocols/sametime/sametime.c Thu Jun 29 11:30:53 2017 -0500 +++ b/libpurple/protocols/sametime/sametime.c Fri Jul 07 01:40:48 2017 +0000 @@ -814,7 +814,7 @@ 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 @@ /* 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); }
--- a/libpurple/protocols/silc/silc.c Thu Jun 29 11:30:53 2017 -0500 +++ b/libpurple/protocols/silc/silc.c Fri Jul 07 01:40:48 2017 +0000 @@ -221,7 +221,7 @@ /* 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 @@ #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 @@ #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); }
--- a/libpurple/protocols/simple/simple.c Thu Jun 29 11:30:53 2017 -0500 +++ b/libpurple/protocols/simple/simple.c Fri Jul 07 01:40:48 2017 +0000 @@ -1766,7 +1766,7 @@ 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 @@ 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 @@ 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));
--- a/libpurple/protocols/zephyr/zephyr.c Thu Jun 29 11:30:53 2017 -0500 +++ b/libpurple/protocols/zephyr/zephyr.c Fri Jul 07 01:40:48 2017 +0000 @@ -1876,11 +1876,11 @@ 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 @@ 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)) {
--- a/libpurple/savedstatuses.c Thu Jun 29 11:30:53 2017 -0500 +++ b/libpurple/savedstatuses.c Fri Jul 07 01:40:48 2017 +0000 @@ -359,7 +359,7 @@ 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 @@ if (save_timer != 0) { - purple_timeout_remove(save_timer); + g_source_remove(save_timer); save_timer = 0; sync_statuses(); }
--- a/libpurple/server.c Thu Jun 29 11:30:53 2017 -0500 +++ b/libpurple/server.c Fri Jul 07 01:40:48 2017 +0000 @@ -90,7 +90,7 @@ /* 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;
--- a/libpurple/sslconn.c Thu Jun 29 11:30:53 2017 -0500 +++ b/libpurple/sslconn.c Fri Jul 07 01:40:48 2017 +0000 @@ -271,7 +271,7 @@ { 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 @@ 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),
--- a/libpurple/stringref.c Thu Jun 29 11:30:53 2017 -0500 +++ b/libpurple/stringref.c Fri Jul 07 01:40:48 2017 +0000 @@ -88,7 +88,7 @@ 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;
--- a/libpurple/stun.c Thu Jun 29 11:30:53 2017 -0500 +++ b/libpurple/stun.c Fri Jul 07 01:40:48 2017 +0000 @@ -100,7 +100,7 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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; }
--- a/libpurple/upnp.c Thu Jun 29 11:30:53 2017 -0500 +++ b/libpurple/upnp.c Fri Jul 07 01:40:48 2017 +0000 @@ -118,7 +118,7 @@ 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 @@ 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 @@ 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 @@ /* 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 @@ 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 @@ 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 @@ /* 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(): 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(): 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 @@ 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 @@ 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 @@ } 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 @@ } if (ar->tima > 0) - purple_timeout_remove(ar->tima); + g_source_remove(ar->tima); purple_http_conn_cancel(ar->hc); @@ -944,7 +944,7 @@ } 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 @@ } 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);
--- a/pidgin/gtkblist.c Thu Jun 29 11:30:53 2017 -0500 +++ b/pidgin/gtkblist.c Fri Jul 07 01:40:48 2017 +0000 @@ -4981,7 +4981,7 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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); }
--- a/pidgin/gtkconv.c Thu Jun 29 11:30:53 2017 -0500 +++ b/pidgin/gtkconv.c Fri Jul 07 01:40:48 2017 +0000 @@ -1383,8 +1383,8 @@ 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 @@ 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 @@ 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 @@ 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); } }
--- a/pidgin/gtkdebug.c Thu Jun 29 11:30:53 2017 -0500 +++ b/pidgin/gtkdebug.c Fri Jul 07 01:40:48 2017 +0000 @@ -69,7 +69,7 @@ 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 @@ } 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));
--- a/pidgin/gtkdocklet.c Thu Jun 29 11:30:53 2017 -0500 +++ b/pidgin/gtkdocklet.c Fri Jul 07 01:40:48 2017 +0000 @@ -358,7 +358,7 @@ 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 @@ 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 @@ 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 @@ pidgin_docklet_remove(); if (embed_timeout) { - purple_timeout_remove(embed_timeout); + g_source_remove(embed_timeout); embed_timeout = 0; } @@ -933,9 +933,9 @@ 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 }
--- a/pidgin/gtkroomlist.c Thu Jun 29 11:30:53 2017 -0500 +++ b/pidgin/gtkroomlist.c Fri Jul 07 01:40:48 2017 +0000 @@ -84,7 +84,7 @@ 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);
--- a/pidgin/gtksound.c Thu Jun 29 11:30:53 2017 -0500 +++ b/pidgin/gtksound.c Fri Jul 07 01:40:48 2017 +0000 @@ -232,9 +232,9 @@ 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 @@ 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);
--- a/pidgin/gtkstatusbox.c Thu Jun 29 11:30:53 2017 -0500 +++ b/pidgin/gtkstatusbox.c Fri Jul 07 01:40:48 2017 +0000 @@ -1094,7 +1094,7 @@ /* 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 @@ } 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 @@ 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 @@ 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 @@ 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 @@ { 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); }
--- a/pidgin/gtkutils.c Thu Jun 29 11:30:53 2017 -0500 +++ b/pidgin/gtkutils.c Fri Jul 07 01:40:48 2017 +0000 @@ -884,7 +884,7 @@ "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); }
--- a/pidgin/plugins/cap/cap.c Thu Jun 29 11:30:53 2017 -0500 +++ b/pidgin/plugins/cap/cap.c Fri Jul 07 01:40:48 2017 +0000 @@ -130,7 +130,7 @@ /* 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 @@ 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 @@ * 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 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; } }
--- a/pidgin/plugins/mailchk.c Thu Jun 29 11:30:53 2017 -0500 +++ b/pidgin/plugins/mailchk.c Fri Jul 07 01:40:48 2017 +0000 @@ -94,7 +94,7 @@ 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 @@ { 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 @@ } 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 @@ plugin_unload(PurplePlugin *plugin, GError **error) { if (timer) - purple_timeout_remove(timer); + g_source_remove(timer); timer = 0; if (mail) gtk_widget_destroy(mail);
--- a/pidgin/plugins/screencap.c Thu Jun 29 11:30:53 2017 -0500 +++ b/pidgin/plugins/screencap.c Fri Jul 07 01:40:48 2017 +0000 @@ -666,7 +666,7 @@ 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 @@ 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));
--- a/pidgin/win32/gtkwin32dep.c Thu Jun 29 11:30:53 2017 -0500 +++ b/pidgin/win32/gtkwin32dep.c Fri Jul 07 01:40:48 2017 +0000 @@ -247,7 +247,7 @@ } 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; } }