pidgin/pidgin

Parents d122647268be
Children 85222db14907
Remove pidgin_dialogs_info and gtkdialogs.[ch] as it is now empty.

We have a new API for this and the old dialog just wasn't to fit in there.

Testing Done:
Ran with the turtles and ran the app.

Reviewed at https://reviews.imfreedom.org/r/3109/
--- a/ChangeLog.API Sat Apr 13 20:25:38 2024 -0500
+++ b/ChangeLog.API Sat Apr 13 20:37:17 2024 -0500
@@ -1128,6 +1128,7 @@
* pidgin_dialogs_destroy_all
* pidgin_dialogs_im
* pidgin_dialogs_im_with_user
+ * pidgin_dialogs_info
* pidgin_dialogs_log
* pidgin_dialogs_merge_groups
* pidgin_dialogs_remove_buddy
--- a/pidgin/gtkdialogs.c Sat Apr 13 20:25:38 2024 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,84 +0,0 @@
-/* pidgin
- *
- * 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
- * source distribution.
- *
- * 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 <purpleconfig.h>
-
-#include <glib/gi18n-lib.h>
-
-#include <gst/gst.h>
-
-#include <purple.h>
-
-#include "gtkdialogs.h"
-#include "gtkutils.h"
-#include "pidgincore.h"
-
-static void
-pidgin_dialogs_info_cb(G_GNUC_UNUSED gpointer data, PurpleRequestPage *page) {
- char *username;
- PurpleAccount *account;
- const gchar *screenname = NULL;
-
- account = purple_request_page_get_account(page, "account");
-
- screenname = purple_request_page_get_string(page, "screenname");
- username = g_strdup(purple_normalize(account, screenname));
-
- if(username != NULL && *username != '\0' && account != NULL) {
- pidgin_retrieve_user_info(purple_account_get_connection(account),
- username);
- }
-
- g_free(username);
-}
-
-void
-pidgin_dialogs_info(void)
-{
- PurpleRequestPage *page;
- PurpleRequestGroup *group;
- PurpleRequestField *field;
-
- page = purple_request_page_new();
-
- group = purple_request_group_new(NULL);
- purple_request_page_add_group(page, group);
-
- field = purple_request_field_account_new("account", _("_Account"), NULL);
- purple_request_field_set_type_hint(field, "account");
- purple_request_field_set_visible(field,
- (purple_connections_get_all() != NULL &&
- purple_connections_get_all()->next != NULL));
- purple_request_field_set_required(field, TRUE);
- purple_request_group_add_field(group, field);
-
- field = purple_request_field_string_new("screenname", _("_Name"), NULL, FALSE);
- purple_request_field_set_type_hint(field, "screenname");
- purple_request_field_set_required(field, TRUE);
- purple_request_group_add_field(group, field);
-
- purple_request_fields(
- purple_blist_get_default(), _("Get User Info"), NULL,
- _("Please enter the username or alias of the person "
- "whose info you would like to view."),
- page, _("OK"), G_CALLBACK(pidgin_dialogs_info_cb),
- _("Cancel"), NULL, NULL, NULL);
-}
--- a/pidgin/gtkdialogs.h Sat Apr 13 20:25:38 2024 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-/* pidgin
- *
- * 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
- * source distribution.
- *
- * 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"
-#endif
-
-#ifndef _PIDGINDIALOGS_H_
-#define _PIDGINDIALOGS_H_
-
-#include <purple.h>
-
-#include "pidginversion.h"
-
-G_BEGIN_DECLS
-
-/**
- * pidgin_dialogs_info:
- *
- * Creates a dialog to get another user's profile.
- *
- * Since: 2.0
- */
-PIDGIN_AVAILABLE_IN_ALL
-void pidgin_dialogs_info(void);
-
-G_END_DECLS
-
-#endif /* _PIDGINDIALOGS_H_ */
--- a/pidgin/meson.build Sat Apr 13 20:25:38 2024 -0500
+++ b/pidgin/meson.build Sat Apr 13 20:37:17 2024 -0500
@@ -3,7 +3,6 @@
endif
libpidgin_SOURCES = [
- 'gtkdialogs.c',
'gtkmedia.c',
'gtknotify.c',
'gtkrequest.c',
@@ -59,7 +58,6 @@
]
libpidgin_headers = [
- 'gtkdialogs.h',
'gtkmedia.h',
'gtknotify.h',
'gtkrequest.h',
--- a/pidgin/pidginapplication.c Sat Apr 13 20:25:38 2024 -0500
+++ b/pidgin/pidginapplication.c Sat Apr 13 20:37:17 2024 -0500
@@ -33,7 +33,6 @@
#include "pidginapplication.h"
-#include "gtkdialogs.h"
#include "gtkroomlist.h"
#include "pidginabout.h"
#include "pidginaccounteditor.h"
@@ -211,7 +210,6 @@
* This list keeps track of which actions should only be enabled while online.
*/
static const gchar *pidgin_application_online_actions[] = {
- "get-user-info",
"new-message",
};
@@ -422,14 +420,6 @@
}
static void
-pidgin_application_get_user_info(G_GNUC_UNUSED GSimpleAction *simple,
- G_GNUC_UNUSED GVariant *parameter,
- G_GNUC_UNUSED gpointer data)
-{
- pidgin_dialogs_info();
-}
-
-static void
pidgin_application_join_channel(G_GNUC_UNUSED GSimpleAction *simple,
G_GNUC_UNUSED GVariant *parameter,
gpointer data)
@@ -561,9 +551,6 @@
.name = "file-transfers",
.activate = pidgin_application_file_transfers,
}, {
- .name = "get-user-info",
- .activate = pidgin_application_get_user_info,
- }, {
.name = "join-channel",
.activate = pidgin_application_join_channel,
}, {
--- a/pidgin/pidgindebug.c Sat Apr 13 20:25:38 2024 -0500
+++ b/pidgin/pidgindebug.c Sat Apr 13 20:37:17 2024 -0500
@@ -28,7 +28,6 @@
#include <purple.h>
-#include "gtkdialogs.h"
#include "gtkutils.h"
#include "pidginapplication.h"
#include "pidgincore.h"
--- a/pidgin/pidgindisplaywindow.c Sat Apr 13 20:25:38 2024 -0500
+++ b/pidgin/pidgindisplaywindow.c Sat Apr 13 20:37:17 2024 -0500
@@ -29,7 +29,6 @@
#include "pidgindisplaywindow.h"
-#include "gtkdialogs.h"
#include "gtkutils.h"
#include "pidginconversation.h"
#include "pidgindisplayitem.h"
--- a/pidgin/pidginnotificationaddcontact.c Sat Apr 13 20:25:38 2024 -0500
+++ b/pidgin/pidginnotificationaddcontact.c Sat Apr 13 20:37:17 2024 -0500
@@ -26,8 +26,6 @@
#include "pidgin/pidginnotificationaddcontact.h"
-#include "pidgin/gtkdialogs.h"
-
struct _PidginNotificationAddContact {
AdwActionRow parent;
--- a/pidgin/pidginnotificationauthorizationrequest.c Sat Apr 13 20:25:38 2024 -0500
+++ b/pidgin/pidginnotificationauthorizationrequest.c Sat Apr 13 20:37:17 2024 -0500
@@ -26,8 +26,6 @@
#include "pidgin/pidginnotificationauthorizationrequest.h"
-#include "pidgin/gtkdialogs.h"
-
struct _PidginNotificationAuthorizationRequest {
AdwActionRow parent;
--- a/pidgin/resources/gtk/menus.ui Sat Apr 13 20:25:38 2024 -0500
+++ b/pidgin/resources/gtk/menus.ui Sat Apr 13 20:37:17 2024 -0500
@@ -39,12 +39,6 @@
</section>
<section>
<item>
- <attribute name="label" translatable="yes">Get User _Info...</attribute>
- <attribute name="action">app.get-user-info</attribute>
- </item>
- </section>
- <section>
- <item>
<attribute name="label" translatable="yes">_Quit</attribute>
<attribute name="action">app.quit</attribute>
</item>
--- a/po/POTFILES.in Sat Apr 13 20:25:38 2024 -0500
+++ b/po/POTFILES.in Sat Apr 13 20:37:17 2024 -0500
@@ -118,7 +118,6 @@
libpurple/win32/win32dep.c
libpurple/xmlnode.c
pidgin/data/im.pidgin.Pidgin3.metainfo.xml
-pidgin/gtkdialogs.c
pidgin/gtkmedia.c
pidgin/gtknotify.c
pidgin/gtkrequest.c