summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGary Kramlich <grim@reaperworld.com>2019-05-09 22:38:16 -0500
committerGary Kramlich <grim@reaperworld.com>2019-05-09 22:38:16 -0500
commita5d811ff8c3fbd3ffaaf649eab4a26c3e965dcc6 (patch)
tree637dfd1ef65c0a6265cbaaafb0ef64e5adb1ba82
parent584b932bc42ab8c1a9cf2c0c84cda9b052f1d9f5 (diff)
downloadpidgin-a5d811ff8c3fbd3ffaaf649eab4a26c3e965dcc6.tar.gz
Remove the doc comments as they're in the header file and use g_set_object as we're on glib 2.44 now
-rw-r--r--pidgin/pidgincontactcompletion.c29
1 files changed, 3 insertions, 26 deletions
diff --git a/pidgin/pidgincontactcompletion.c b/pidgin/pidgincontactcompletion.c
index ee07189db7..bdf3569716 100644
--- a/pidgin/pidgincontactcompletion.c
+++ b/pidgin/pidgincontactcompletion.c
@@ -251,15 +251,6 @@ pidgin_contact_completion_new(void) {
return GTK_ENTRY_COMPLETION(g_object_new(PIDGIN_TYPE_CONTACT_COMPLETION, NULL));
}
-/**
- * pidgin_contact_completion_get_account:
- * @completion: The #PidginContactCompletion instance.
- *
- * Gets the #PurpleAccount who's contacts we're filtering for, or %NULL if
- * there is no filtering.
- *
- * Returns: (transfer full): The #PurpleAccount.
- */
PurpleAccount *
pidgin_contact_completion_get_account(PidginContactCompletion *completion) {
g_return_val_if_fail(PIDGIN_IS_CONTACT_COMPLETION(completion), NULL);
@@ -267,28 +258,14 @@ pidgin_contact_completion_get_account(PidginContactCompletion *completion) {
return g_object_ref(completion->account);
}
-/**
- * pidgin_contact_completion_set_account:
- * @completion: The #PidginContactCompletion instance.
- * @account: The #PurpleAccount to filter for.
- *
- * Sets the #PurpleAccount who's contacts should be shown or %NULL
- * to show contacts from all accounts.
- */
void
pidgin_contact_completion_set_account(PidginContactCompletion *completion,
PurpleAccount *account)
{
g_return_if_fail(PIDGIN_IS_CONTACT_COMPLETION(completion));
- if(completion->account != NULL) {
- g_clear_pointer(&completion->account, g_object_unref);
- }
-
- if(PURPLE_IS_ACCOUNT(account)) {
- completion->account = g_object_ref(account);
+ if(g_set_object(&completion->account, account)) {
+ g_object_notify_by_pspec(G_OBJECT(completion),
+ properties[PROP_ACCOUNT]);
}
-
- g_object_notify_by_pspec(G_OBJECT(completion),
- properties[PROP_ACCOUNT]);
}