summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElliott Sales de Andrade <quantum.analyst@gmail.com>2023-04-30 17:42:35 -0500
committerElliott Sales de Andrade <quantum.analyst@gmail.com>2023-04-30 17:42:35 -0500
commitff0c453f01c96f89d249e6717b243667d6940604 (patch)
treea2a2e89c4cad1a9cec6de3d4d07d26e913c7ec94
parente2af3524445d4c375d4d09ea89f7460fbea4ad5e (diff)
downloadpidgin-master.tar.gz
Use G_SOURCE_FUNC macro moreHEADmaster
It was added in GLib 2.58 Testing Done: Compiled only. Reviewed at https://reviews.imfreedom.org/r/2446/
-rw-r--r--finch/gntblist.c14
-rw-r--r--finch/plugins/gntgf/gntgf.c3
-rw-r--r--libpurple/plugins/joinpart/joinpart.c2
-rw-r--r--libpurple/protocols/gg/edisc.c2
-rw-r--r--libpurple/protocols/jabber/jabber.c2
-rw-r--r--pidgin/gtkmedia.c2
6 files changed, 16 insertions, 9 deletions
diff --git a/finch/gntblist.c b/finch/gntblist.c
index bb35924609..48004b3793 100644
--- a/finch/gntblist.c
+++ b/finch/gntblist.c
@@ -1719,7 +1719,7 @@ draw_tooltip(FinchBuddyList *ggblist)
* top of that, if the selected buddy belongs to the disconnected
* account, then retrieving the tooltip for that causes crash. So
* let's make sure we wait for all the buddies to be removed first.*/
- int id = g_timeout_add(0, (GSourceFunc)draw_tooltip_real, ggblist);
+ int id = g_timeout_add(0, G_SOURCE_FUNC(draw_tooltip_real), ggblist);
g_object_set_data_full(G_OBJECT(ggblist->window), "draw_tooltip_calback",
GINT_TO_POINTER(id), (GDestroyNotify)g_source_remove);
}
@@ -2086,7 +2086,9 @@ status_selection_changed(G_GNUC_UNUSED GntComboBox *box,
/* 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 = g_timeout_add_seconds(TYPING_TIMEOUT_S, (GSourceFunc)remove_typing_cb, NULL);
+ ggblist->typing = g_timeout_add_seconds(TYPING_TIMEOUT_S,
+ G_SOURCE_FUNC(remove_typing_cb),
+ NULL);
}
else if (now->type == STATUS_SAVED_ALL)
{
@@ -2121,7 +2123,9 @@ status_text_changed(G_GNUC_UNUSED GntEntry *entry, const char *text,
return TRUE;
}
- ggblist->typing = g_timeout_add_seconds(TYPING_TIMEOUT_S, (GSourceFunc)remove_typing_cb, NULL);
+ ggblist->typing = g_timeout_add_seconds(TYPING_TIMEOUT_S,
+ G_SOURCE_FUNC(remove_typing_cb),
+ NULL);
return FALSE;
}
@@ -2357,7 +2361,9 @@ buddy_signed_on_off_cb(gpointer data)
g_clear_handle_id(&fnode->signed_timer, g_source_remove);
g_object_ref(node);
- fnode->signed_timer = g_timeout_add_seconds(6, (GSourceFunc)buddy_recent_signed_on_off, data);
+ fnode->signed_timer = g_timeout_add_seconds(6,
+ G_SOURCE_FUNC(buddy_recent_signed_on_off),
+ data);
update_node_display(node, ggblist);
if (purple_blist_node_get_parent(node) && PURPLE_IS_META_CONTACT(purple_blist_node_get_parent(node)))
update_node_display(purple_blist_node_get_parent(node), ggblist);
diff --git a/finch/plugins/gntgf/gntgf.c b/finch/plugins/gntgf/gntgf.c
index a4d0b3e87c..d70c659b5e 100644
--- a/finch/plugins/gntgf/gntgf.c
+++ b/finch/plugins/gntgf/gntgf.c
@@ -215,7 +215,8 @@ notify(PurpleConversation *conv, const char *fmt, ...)
}
gnt_widget_draw(window);
- toast->timer = g_timeout_add_seconds(4, (GSourceFunc)remove_toaster, toast);
+ toast->timer = g_timeout_add_seconds(4, G_SOURCE_FUNC(remove_toaster),
+ toast);
toasters = g_list_prepend(toasters, toast);
}
diff --git a/libpurple/plugins/joinpart/joinpart.c b/libpurple/plugins/joinpart/joinpart.c
index 0a5edc8fb0..22ece5c30b 100644
--- a/libpurple/plugins/joinpart/joinpart.c
+++ b/libpurple/plugins/joinpart/joinpart.c
@@ -238,7 +238,7 @@ join_part_load(GPluginPlugin *plugin, G_GNUC_UNUSED GError **error)
G_CALLBACK(received_chat_msg_cb), users);
/* Cleanup every 5 minutes */
- id = g_timeout_add_seconds(60 * 5, (GSourceFunc)clean_users_hash, users);
+ id = g_timeout_add_seconds(60 * 5, G_SOURCE_FUNC(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));
diff --git a/libpurple/protocols/gg/edisc.c b/libpurple/protocols/gg/edisc.c
index 640ab3f9e1..0ada1f98a8 100644
--- a/libpurple/protocols/gg/edisc.c
+++ b/libpurple/protocols/gg/edisc.c
@@ -981,7 +981,7 @@ ggp_edisc_xfer_recv_done_cb(GObject *source, GAsyncResult *result,
poll = g_pollable_input_stream_create_source(G_POLLABLE_INPUT_STREAM(input),
edisc_xfer->cancellable);
g_source_set_callback(poll,
- (GSourceFunc)(gpointer)ggp_edisc_xfer_recv_pollable_source_cb,
+ G_SOURCE_FUNC(ggp_edisc_xfer_recv_pollable_source_cb),
xfer, NULL);
edisc_xfer->handler = g_source_attach(poll, NULL);
g_source_unref(poll);
diff --git a/libpurple/protocols/jabber/jabber.c b/libpurple/protocols/jabber/jabber.c
index dd317f1bfe..5d9a719530 100644
--- a/libpurple/protocols/jabber/jabber.c
+++ b/libpurple/protocols/jabber/jabber.c
@@ -537,7 +537,7 @@ jabber_keepalive(G_GNUC_UNUSED PurpleProtocolServer *protocol_server,
if (js->keepalive_timeout == 0) {
jabber_keepalive_ping(js);
js->keepalive_timeout = g_timeout_add_seconds(120,
- (GSourceFunc)(jabber_keepalive_timeout), gc);
+ G_SOURCE_FUNC(jabber_keepalive_timeout), gc);
}
}
diff --git a/pidgin/gtkmedia.c b/pidgin/gtkmedia.c
index 9630f93564..e088286480 100644
--- a/pidgin/gtkmedia.c
+++ b/pidgin/gtkmedia.c
@@ -769,7 +769,7 @@ pidgin_media_ready_cb(PurpleMedia *media, PidginMedia *gtkmedia, const gchar *si
g_clear_handle_id(&gtkmedia->priv->timeout_id, g_source_remove);
gtkmedia->priv->request_type |= type;
gtkmedia->priv->timeout_id = g_timeout_add(500,
- (GSourceFunc)pidgin_request_timeout_cb,
+ G_SOURCE_FUNC(pidgin_request_timeout_cb),
gtkmedia);
}