--- a/pidgin/meson.build Mon Apr 04 23:15:13 2022 -0500
+++ b/pidgin/meson.build Mon Apr 04 23:56:44 2022 -0500
@@ -34,7 +34,6 @@
- 'pidgincontactcompletion.c',
'pidginconversationwindow.c',
@@ -97,7 +96,6 @@
'pidgincellrendererexpander.h',
- 'pidgincontactcompletion.h',
'pidginconversationwindow.h',
--- a/pidgin/pidgincontactcompletion.c Mon Apr 04 23:15:13 2022 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,271 +0,0 @@
- * Pidgin is the legal property of its developers, whose names are too numerous
- * to list here. Please refer to the COPYRIGHT file distributed with this
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
-#include "pidgincontactcompletion.h"
-struct _PidginContactCompletion {
- GtkEntryCompletion parent;
- PurpleAccount *account;
- PIDGIN_CONTACT_COMPLETION_COLUMN_CONTACT,
- PIDGIN_CONTACT_COMPLETION_COLUMN_ACCOUNT,
- PIDGIN_CONTACT_COMPLETION_N_COLUMNS,
-static GParamSpec *properties[N_PROPERTIES] = {0, };
-G_DEFINE_TYPE(PidginContactCompletion, pidgin_contact_completion, GTK_TYPE_ENTRY_COMPLETION);
-/******************************************************************************
- *****************************************************************************/
-pidgin_contact_completion_walk_contact_func(PurpleBlistNode *node, gpointer data) {
- PurpleBuddy *buddy = PURPLE_BUDDY(node);
- PurpleAccount *account = purple_buddy_get_account(buddy);
- GtkListStore *store = GTK_LIST_STORE(data);
- name = purple_buddy_get_name(buddy);
- gtk_list_store_append(store, &iter);
- PIDGIN_CONTACT_COMPLETION_COLUMN_CONTACT, name,
- PIDGIN_CONTACT_COMPLETION_COLUMN_ACCOUNT, account,
-pidgin_contact_completion_create_model(void) {
- GtkListStore *store = NULL;
- store = gtk_list_store_new(
- PIDGIN_CONTACT_COMPLETION_N_COLUMNS,
- purple_blist_walk(NULL,
- pidgin_contact_completion_walk_contact_func,
- return GTK_TREE_MODEL(store);
-pidgin_contact_completion_match_func(GtkEntryCompletion *completion,
- GtkTreeModel *model = NULL;
- PidginContactCompletion *comp = PIDGIN_CONTACT_COMPLETION(completion);
- model = gtk_entry_completion_get_model(completion);
- PIDGIN_CONTACT_COMPLETION_COLUMN_CONTACT, &name,
- if (!g_str_has_prefix(name, key)) {
- if(PURPLE_IS_ACCOUNT(comp->account)) {
- PurpleAccount *account = NULL;
- PIDGIN_CONTACT_COMPLETION_COLUMN_ACCOUNT, &account,
- if(account != comp->account) {
- g_object_unref(account);
- g_object_unref(account);
-/******************************************************************************
- * GObject Implementation
- *****************************************************************************/
-pidgin_contact_completion_init(PidginContactCompletion *comp) {
-pidgin_contact_completion_constructed(GObject *obj) {
- GtkTreeModel *model = NULL;
- G_OBJECT_CLASS(pidgin_contact_completion_parent_class)->constructed(obj);
- model = pidgin_contact_completion_create_model();
- gtk_entry_completion_set_model(
- GTK_ENTRY_COMPLETION(obj),
- gtk_entry_completion_set_match_func(
- GTK_ENTRY_COMPLETION(obj),
- pidgin_contact_completion_match_func,
- gtk_entry_completion_set_text_column(
- GTK_ENTRY_COMPLETION(obj),
- PIDGIN_CONTACT_COMPLETION_COLUMN_CONTACT
-pidgin_contact_completion_get_property(GObject *obj,
- PidginContactCompletion *comp = PIDGIN_CONTACT_COMPLETION(obj);
- g_value_set_object(value, pidgin_contact_completion_get_account(comp));
- G_OBJECT_WARN_INVALID_PROPERTY_ID(obj, param_id, pspec);
-pidgin_contact_completion_set_property(GObject *obj,
- PidginContactCompletion *comp = PIDGIN_CONTACT_COMPLETION(obj);
- pidgin_contact_completion_set_account(comp,
- g_value_get_object(value));
- G_OBJECT_WARN_INVALID_PROPERTY_ID(obj, param_id, pspec);
-pidgin_contact_completion_finalize(GObject *obj) {
- PidginContactCompletion *comp = PIDGIN_CONTACT_COMPLETION(obj);
- g_object_unref(comp->account);
- G_OBJECT_CLASS(pidgin_contact_completion_parent_class)->finalize(obj);
-pidgin_contact_completion_class_init(PidginContactCompletionClass *klass) {
- GObjectClass *obj_class = G_OBJECT_CLASS(klass);
- /* The only solution I could find to make this work was to implement the
- * constructed handler and chain up to the parent. If you find another,
- * better way, please implement it :)
- obj_class->constructed = pidgin_contact_completion_constructed;
- obj_class->get_property = pidgin_contact_completion_get_property;
- obj_class->set_property = pidgin_contact_completion_set_property;
- obj_class->finalize = pidgin_contact_completion_finalize;
- properties[PROP_ACCOUNT] = g_param_spec_object(
- "The account to filter by or NULL for no filtering",
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT
- g_object_class_install_properties(obj_class, N_PROPERTIES, properties);
-/******************************************************************************
- *****************************************************************************/
-pidgin_contact_completion_new(void) {
- return GTK_ENTRY_COMPLETION(g_object_new(PIDGIN_TYPE_CONTACT_COMPLETION, NULL));
-pidgin_contact_completion_get_account(PidginContactCompletion *completion) {
- g_return_val_if_fail(PIDGIN_IS_CONTACT_COMPLETION(completion), NULL);
- return g_object_ref(completion->account);
-pidgin_contact_completion_set_account(PidginContactCompletion *completion,
- PurpleAccount *account)
- g_return_if_fail(PIDGIN_IS_CONTACT_COMPLETION(completion));
- if(g_set_object(&completion->account, account)) {
- g_object_notify_by_pspec(G_OBJECT(completion),
- properties[PROP_ACCOUNT]);
--- a/pidgin/pidgincontactcompletion.h Mon Apr 04 23:15:13 2022 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,96 +0,0 @@
- * Pidgin is the legal property of its developers, whose names are too numerous
- * to list here. Please refer to the COPYRIGHT file distributed with this
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
-#if !defined(PIDGIN_GLOBAL_HEADER_INSIDE) && !defined(PIDGIN_COMPILATION)
-# error "only <pidgin.h> may be included directly"
-#ifndef PIDGIN_CONTACT_COMPLETION_H
-#define PIDGIN_CONTACT_COMPLETION_H
- * PidginContactCompletion:
- * #PidginContactCompletion should be treated like a normal
- * #GtkEntryCompletion, except it already does all of the setup for the
- * completion. You can also filter by a #PurpleAccount to limit what's shown.
- * |[<!-- language="C" -->
- * GtkWidget *entry = gtk_entry_new();
- * GtkEntryCompletion *completion = pidgin_contact_completion_new();
- * gtk_entry_set_completion(GTK_ENTRY(entry), completion);
- * pidgin_contact_completion_set_account(PIDGIN_CONTACT_COMPLETION(completion), account);
- * g_object_unref(completion);
-#define PIDGIN_TYPE_CONTACT_COMPLETION pidgin_contact_completion_get_type()
-G_DECLARE_FINAL_TYPE(PidginContactCompletion, pidgin_contact_completion, PIDGIN,
- CONTACT_COMPLETION, GtkEntryCompletion)
- * pidgin_contact_completion_new:
- * Creates a new #GtkEntryCompletion for looking up contacts.
- * Returns: (transfer full): The new #GtkEntryCompletion instance.
-GtkEntryCompletion *pidgin_contact_completion_new(void);
- * pidgin_contact_completion_get_account:
- * @completion: The #PidginContactCompletion instance.
- * Gets the account that @completion is filtering for. If no filtering is set
- * %NULL will be returned.
- * Returns: (transfer full) (nullable): The #PurpleAccount that's being
-PurpleAccount *pidgin_contact_completion_get_account(PidginContactCompletion *completion);
- * pidgin_contact_completion_set_account:
- * @completion: The #PidginContactCompletion instance.
- * @account: (nullable): The #PurpleAccount to filter for or %NULL.
- * Set the #PurpleAccount that @completion should filter for. If @account is
- * %NULL, all filtering will be disabled.
-void pidgin_contact_completion_set_account(PidginContactCompletion *completion, PurpleAccount *account);
-#endif /* PIDGIN_CONTACT_COMPLETION_H */
--- a/pidgin/pidgininvitedialog.c Mon Apr 04 23:15:13 2022 -0500
+++ b/pidgin/pidgininvitedialog.c Mon Apr 04 23:56:44 2022 -0500
@@ -18,7 +18,6 @@
#include "pidgininvitedialog.h"
-#include "pidgincontactcompletion.h"
struct _PidginInviteDialog {
@@ -137,34 +136,6 @@
-pidgin_invite_dialog_constructed(GObject *obj) {
- PidginInviteDialog *dialog = PIDGIN_INVITE_DIALOG(obj);
- PidginInviteDialogPrivate *priv = NULL;
- GtkEntryCompletion *completion = NULL;
- priv = pidgin_invite_dialog_get_instance_private(dialog);
- completion = pidgin_contact_completion_new();
- /* constructed is called after all properties are set, so we set the
- * account for the completion from the conversation we were created with.
- if(priv->conversation) {
- PurpleAccount *account = purple_conversation_get_account(PURPLE_CONVERSATION(priv->conversation));
- pidgin_contact_completion_set_account(
- PIDGIN_CONTACT_COMPLETION(completion),
- gtk_entry_set_completion(GTK_ENTRY(priv->contact), completion);
- g_object_unref(completion);
pidgin_invite_dialog_class_init(PidginInviteDialogClass *klass) {
GObjectClass *obj_class = G_OBJECT_CLASS(klass);
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS(klass);
@@ -172,7 +143,6 @@
obj_class->get_property = pidgin_invite_dialog_get_property;
obj_class->set_property = pidgin_invite_dialog_set_property;
obj_class->finalize = pidgin_invite_dialog_finalize;
- obj_class->constructed = pidgin_invite_dialog_constructed;
gtk_widget_class_set_template_from_resource(
--- a/po/POTFILES.in Mon Apr 04 23:15:13 2022 -0500
+++ b/po/POTFILES.in Mon Apr 04 23:56:44 2022 -0500
@@ -348,7 +348,6 @@
pidgin/pidginclosebutton.c
-pidgin/pidgincontactcompletion.c
pidgin/pidgincontactlist.c
pidgin/pidginconversationwindow.c