# HG changeset patch
# Node ID 6fa9dcd490df6cdca6b02cfb41629fff5d2abd9a
# Parent  5b5a883528e0bc7c56c602f1d497325f97c31893
diff --git a/libpurple/accounts.c b/libpurple/accounts.c
--- a/libpurple/accounts.c
+++ b/libpurple/accounts.c
@@ -96,19 +96,19 @@ sync_accounts(void)
 	purple_xmlnode_free(node);
 }
 
-static gboolean
+static void
 save_cb(G_GNUC_UNUSED gpointer data)
 {
 	sync_accounts();
 	save_timer = 0;
-	return FALSE;
 }
 
 void
 purple_accounts_schedule_save(void)
 {
-	if (save_timer == 0)
-		save_timer = g_timeout_add_seconds(5, save_cb, NULL);
+	if(save_timer == 0) {
+		save_timer = g_timeout_add_seconds_once(5, save_cb, NULL);
+	}
 }
 
 static void
diff --git a/libpurple/plugins/joinpart/joinpart.c b/libpurple/plugins/joinpart/joinpart.c
--- a/libpurple/plugins/joinpart/joinpart.c
+++ b/libpurple/plugins/joinpart/joinpart.c
@@ -174,7 +174,8 @@ static gboolean check_expire_time(struct
 	return (*last_said < *limit);
 }
 
-static gboolean clean_users_hash(GHashTable *users)
+static gboolean
+clean_users_hash(GHashTable *users)
 {
 	GSettings *settings = NULL;
 	gint delay = 0;
@@ -189,7 +190,7 @@ static gboolean clean_users_hash(GHashTa
 
 	g_hash_table_foreach_remove(users, (GHRFunc)check_expire_time, &limit);
 
-	return TRUE;
+	return G_SOURCE_CONTINUE;
 }
 
 static GPluginPluginInfo *
diff --git a/libpurple/prefs.c b/libpurple/prefs.c
--- a/libpurple/prefs.c
+++ b/libpurple/prefs.c
@@ -226,19 +226,19 @@ sync_prefs(void)
 	purple_xmlnode_free(node);
 }
 
-static gboolean
+static void
 save_cb(G_GNUC_UNUSED gpointer data)
 {
 	sync_prefs();
 	save_timer = 0;
-	return FALSE;
 }
 
 static void
 schedule_prefs_save(void)
 {
-	if (save_timer == 0)
-		save_timer = g_timeout_add_seconds(5, save_cb, NULL);
+	if(save_timer == 0) {
+		save_timer = g_timeout_add_seconds_once(5, save_cb, NULL);
+	}
 }
 
 
diff --git a/libpurple/purpleaccount.c b/libpurple/purpleaccount.c
--- a/libpurple/purpleaccount.c
+++ b/libpurple/purpleaccount.c
@@ -348,13 +348,11 @@ purple_account_connect_got_password_cb(G
 	g_free(password);
 }
 
-static gboolean
+static void
 no_password_cb(gpointer data) {
 	PurpleAccount *account = data;
 
 	purple_account_real_connect(account, NULL);
-
-	return G_SOURCE_REMOVE;
 }
 
 static void
@@ -441,7 +439,7 @@ purple_account_can_connect_cb(GObject *s
 		                                              purple_account_connect_got_password_cb,
 		                                              account);
 	} else {
-		g_timeout_add_seconds(0, no_password_cb, account);
+		g_timeout_add_once(0, no_password_cb, account);
 	}
 }
 
diff --git a/libpurple/purpleconversationmember.c b/libpurple/purpleconversationmember.c
--- a/libpurple/purpleconversationmember.c
+++ b/libpurple/purpleconversationmember.c
@@ -92,15 +92,13 @@ purple_conversation_member_set_contact_i
 /******************************************************************************
  * Callbacks
  *****************************************************************************/
-static gboolean
+static void
 purple_conversation_member_reset_typing_state(gpointer data) {
 	PurpleConversationMember *member = data;
 
 	purple_conversation_member_set_typing_state(member,
 	                                            PURPLE_TYPING_STATE_NONE,
 	                                            0);
-
-	return G_SOURCE_REMOVE;
 }
 
 static void
@@ -361,9 +359,9 @@ purple_conversation_member_set_typing_st
 	if(seconds > 0) {
 		guint source = 0;
 
-		source = g_timeout_add_seconds(seconds,
-		                               purple_conversation_member_reset_typing_state,
-		                               member);
+		source = g_timeout_add_seconds_once(seconds,
+		                                    purple_conversation_member_reset_typing_state,
+		                                    member);
 
 		member->typing_timeout = source;
 	}
diff --git a/libpurple/tests/test_conversation_member.c b/libpurple/tests/test_conversation_member.c
--- a/libpurple/tests/test_conversation_member.c
+++ b/libpurple/tests/test_conversation_member.c
@@ -186,15 +186,13 @@ test_purple_conversation_manager_timeout
 	}
 }
 
-static gboolean
+static void
 test_purple_conversation_member_typing_state_fail_safe(gpointer data) {
 	gboolean *done = data;
 
 	g_assert_not_reached();
 
 	*done = TRUE;
-
-	return G_SOURCE_REMOVE;
 }
 
 static void
@@ -218,9 +216,9 @@ test_purple_conversation_member_typing_s
 	                                            PURPLE_TYPING_STATE_TYPING, 1);
 
 	/* We add a fail safe to set done after 2 seconds. */
-	g_timeout_add_seconds(2,
-	                      test_purple_conversation_member_typing_state_fail_safe,
-	                      &done);
+	g_timeout_add_seconds_once(2,
+	                           test_purple_conversation_member_typing_state_fail_safe,
+	                           &done);
 
 	while(!done) {
 		g_main_context_iteration(NULL, FALSE);
diff --git a/pidgin/pidginautoadjustment.c b/pidgin/pidginautoadjustment.c
--- a/pidgin/pidginautoadjustment.c
+++ b/pidgin/pidginautoadjustment.c
@@ -36,7 +36,7 @@ G_DEFINE_FINAL_TYPE(PidginAutoAdjustment
 /******************************************************************************
  * Callbacks
  *****************************************************************************/
-static gboolean
+static void
 pidgin_auto_adjustment_scroll(gpointer data) {
 	GtkAdjustment *adjustment = data;
 	gdouble upper = 0.0;
@@ -46,8 +46,6 @@ pidgin_auto_adjustment_scroll(gpointer d
 	pagesize = gtk_adjustment_get_page_size(adjustment);
 
 	gtk_adjustment_set_value(adjustment, upper - pagesize);
-
-	return G_SOURCE_REMOVE;
 }
 
 static void
@@ -68,7 +66,7 @@ pidgin_auto_adjustment_changed(GtkAdjust
 		 * By using a timeout to set the value during the next main loop
 		 * iteration we avoid this problem.
 		 */
-		g_timeout_add(0, pidgin_auto_adjustment_scroll, adjustment);
+		g_timeout_add_once(0, pidgin_auto_adjustment_scroll, adjustment);
 	}
 }
 
diff --git a/pidgin/pidgindebug.c b/pidgin/pidgindebug.c
--- a/pidgin/pidgindebug.c
+++ b/pidgin/pidgindebug.c
@@ -565,7 +565,7 @@ debug_visible_cb(GSettings *settings, ch
 	g_signal_handler_unblock(settings, pref_callback_id);
 }
 
-static gboolean
+static void
 pidgin_debug_g_log_handler_cb(gpointer data)
 {
 	PidginDebugMessage *message = data;
@@ -581,7 +581,7 @@ pidgin_debug_g_log_handler_cb(gpointer d
 		g_free(message->domain);
 		g_free(message->message);
 		g_free(message);
-		return FALSE;
+		return;
 	}
 
 	scroll = view_near_bottom(debug_win);
@@ -661,8 +661,6 @@ pidgin_debug_g_log_handler_cb(gpointer d
 	g_free(message->domain);
 	g_free(message->message);
 	g_free(message);
-
-	return FALSE;
 }
 
 static GLogWriterOutput
@@ -707,7 +705,7 @@ pidgin_debug_g_log_handler(GLogLevelFlag
 		message->level = PURPLE_DEBUG_MISC;
 	}
 
-	g_timeout_add(0, pidgin_debug_g_log_handler_cb, message);
+	g_timeout_add_once(0, pidgin_debug_g_log_handler_cb, message);
 
 	if (debug_print_enabled) {
 		return g_log_writer_default(log_level, fields, n_fields, user_data);
diff --git a/pidgin/plugins/gestures/stroke-draw.c b/pidgin/plugins/gestures/stroke-draw.c
--- a/pidgin/plugins/gestures/stroke-draw.c
+++ b/pidgin/plugins/gestures/stroke-draw.c
@@ -75,7 +75,7 @@ record_stroke_segment(GtkWidget *widget)
 	}
 }
 
-static gint
+static gboolean
 gstroke_timeout (gpointer data)
 {
 	GtkWidget *widget;
@@ -85,7 +85,7 @@ gstroke_timeout (gpointer data)
 	widget = GTK_WIDGET (data);
 	record_stroke_segment (widget);
 
-	return TRUE;
+	return G_SOURCE_CONTINUE;
 }
 
 static void
