Sun, 14 Jan 2024 20:08:13 -0600
Make sure all of the license headers for IRCv3 are GPLv2
Testing Done:
Ran `licensecheck` from debian in the following way.
```
$ licensecheck *.[ch] | cut -d: -f 2 | sort | uniq -c
27 GNU General Public License v2.0 or later
```
Reviewed at https://reviews.imfreedom.org/r/2913/
|
20147
66f05a854eee
applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents:
20137
diff
changeset
|
1 | /* pidgin |
| 9709 | 2 | * |
|
15931
716b5fac1895
Re-sed the copyright notices so they don't all talk about Purple.
Richard Laager <rlaager@pidgin.im>
parents:
15906
diff
changeset
|
3 | * Pidgin is the legal property of its developers, whose names are too numerous |
| 9709 | 4 | * to list here. Please refer to the COPYRIGHT file distributed with this |
| 5 | * source distribution. | |
| 6 | * | |
| 7 | * This program is free software; you can redistribute it and/or modify | |
| 8 | * it under the terms of the GNU General Public License as published by | |
| 9 | * the Free Software Foundation; either version 2 of the License, or | |
| 10 | * (at your option) any later version. | |
| 11 | * | |
| 12 | * This program is distributed in the hope that it will be useful, | |
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 15 | * GNU General Public License for more details. | |
| 16 | * | |
| 17 | * You should have received a copy of the GNU General Public License | |
| 18 | * along with this program; if not, write to the Free Software | |
|
19859
71d37b57eff2
The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
19693
diff
changeset
|
19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
| 9709 | 20 | */ |
|
24569
5dbd0617a27d
Build everything with the *_DISABLE_DEPRECATED flags set. This allows us
Richard Laager <rlaager@pidgin.im>
parents:
24541
diff
changeset
|
21 | |
|
42410
563e7a17c220
Fix possible clash of config headers
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42365
diff
changeset
|
22 | #include <purpleconfig.h> |
|
40439
e9838d634d5e
Make sure that internal.h can only be included by libpurple and split out some pieces to purpleprivate.h
Gary Kramlich <grim@reaperworld.com>
parents:
40360
diff
changeset
|
23 | |
|
e9838d634d5e
Make sure that internal.h can only be included by libpurple and split out some pieces to purpleprivate.h
Gary Kramlich <grim@reaperworld.com>
parents:
40360
diff
changeset
|
24 | #include <glib/gi18n-lib.h> |
|
e9838d634d5e
Make sure that internal.h can only be included by libpurple and split out some pieces to purpleprivate.h
Gary Kramlich <grim@reaperworld.com>
parents:
40360
diff
changeset
|
25 | |
|
40523
9bcf96663cb9
Make gstreamer-1.0 a required dependency
Gary Kramlich <grim@reaperworld.com>
parents:
40496
diff
changeset
|
26 | #include <gst/gst.h> |
|
9bcf96663cb9
Make gstreamer-1.0 a required dependency
Gary Kramlich <grim@reaperworld.com>
parents:
40496
diff
changeset
|
27 | |
|
40360
e21f3bbcc2a5
Update all of the pidgin code to include purple.h
Gary Kramlich <grim@reaperworld.com>
parents:
40240
diff
changeset
|
28 | #include <purple.h> |
| 9709 | 29 | |
| 30 | #include "gtkdialogs.h" | |
| 31 | #include "gtkutils.h" | |
|
40496
6941fece679b
phase2 of pidgin.h: move existing file to pidgincore.h
Gary Kramlich <grim@reaperworld.com>
parents:
40490
diff
changeset
|
32 | #include "pidgincore.h" |
| 9709 | 33 | |
|
9730
e59812364b8b
[gaim-migrate @ 10591]
Mark Doliner <markdoliner@pidgin.im>
parents:
9728
diff
changeset
|
34 | void |
|
16263
27e0ef0f38e6
Word on the street is that we don't want things named pidginfoo_bar(), but
Richard Laager <rlaager@pidgin.im>
parents:
16254
diff
changeset
|
35 | pidgin_dialogs_im_with_user(PurpleAccount *account, const char *username) |
| 9709 | 36 | { |
|
40885
87f6241da196
Update purple_conversations_find_* to return PurpleConversations instead of subclasses
Gary Kramlich <grim@reaperworld.com>
parents:
40803
diff
changeset
|
37 | PurpleConversation *im; |
|
40952
53fa03701534
Port Pidgin to the new PurpleConversationManager API
Gary Kramlich <grim@reaperworld.com>
parents:
40885
diff
changeset
|
38 | PurpleConversationManager *manager; |
| 9709 | 39 | |
|
9753
5951fd24250e
[gaim-migrate @ 10620]
Mark Doliner <markdoliner@pidgin.im>
parents:
9730
diff
changeset
|
40 | g_return_if_fail(account != NULL); |
|
5951fd24250e
[gaim-migrate @ 10620]
Mark Doliner <markdoliner@pidgin.im>
parents:
9730
diff
changeset
|
41 | g_return_if_fail(username != NULL); |
|
5951fd24250e
[gaim-migrate @ 10620]
Mark Doliner <markdoliner@pidgin.im>
parents:
9730
diff
changeset
|
42 | |
|
40952
53fa03701534
Port Pidgin to the new PurpleConversationManager API
Gary Kramlich <grim@reaperworld.com>
parents:
40885
diff
changeset
|
43 | manager = purple_conversation_manager_get_default(); |
|
53fa03701534
Port Pidgin to the new PurpleConversationManager API
Gary Kramlich <grim@reaperworld.com>
parents:
40885
diff
changeset
|
44 | im = purple_conversation_manager_find_im(manager, account, username); |
| 9709 | 45 | |
|
40952
53fa03701534
Port Pidgin to the new PurpleConversationManager API
Gary Kramlich <grim@reaperworld.com>
parents:
40885
diff
changeset
|
46 | if(!PURPLE_IS_IM_CONVERSATION(im)) { |
|
42449
bde60654600e
Remove a whole bunch of dead code from gtkconv.c
Gary Kramlich <grim@reaperworld.com>
parents:
42410
diff
changeset
|
47 | /* This constructor automagically registers the conversation with the |
|
bde60654600e
Remove a whole bunch of dead code from gtkconv.c
Gary Kramlich <grim@reaperworld.com>
parents:
42410
diff
changeset
|
48 | * manager. |
|
bde60654600e
Remove a whole bunch of dead code from gtkconv.c
Gary Kramlich <grim@reaperworld.com>
parents:
42410
diff
changeset
|
49 | */ |
|
bde60654600e
Remove a whole bunch of dead code from gtkconv.c
Gary Kramlich <grim@reaperworld.com>
parents:
42410
diff
changeset
|
50 | purple_im_conversation_new(account, username); |
|
40952
53fa03701534
Port Pidgin to the new PurpleConversationManager API
Gary Kramlich <grim@reaperworld.com>
parents:
40885
diff
changeset
|
51 | } |
| 9709 | 52 | } |
| 53 | ||
| 54 | static void | |
|
42128
118067ca0367
Convert PurpleRequestPage into a GObject
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42127
diff
changeset
|
55 | pidgin_dialogs_info_cb(G_GNUC_UNUSED gpointer data, PurpleRequestPage *page) { |
| 9709 | 56 | char *username; |
| 15884 | 57 | PurpleAccount *account; |
|
41529
0e835d051f5c
Update gtkdialogs.c for GTK4
Gary Kramlich <grim@reaperworld.com>
parents:
41106
diff
changeset
|
58 | const gchar *screenname = NULL; |
| 9709 | 59 | |
|
42128
118067ca0367
Convert PurpleRequestPage into a GObject
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42127
diff
changeset
|
60 | account = purple_request_page_get_account(page, "account"); |
| 9709 | 61 | |
|
42128
118067ca0367
Convert PurpleRequestPage into a GObject
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42127
diff
changeset
|
62 | screenname = purple_request_page_get_string(page, "screenname"); |
|
41529
0e835d051f5c
Update gtkdialogs.c for GTK4
Gary Kramlich <grim@reaperworld.com>
parents:
41106
diff
changeset
|
63 | username = g_strdup(purple_normalize(account, screenname)); |
| 9709 | 64 | |
|
41529
0e835d051f5c
Update gtkdialogs.c for GTK4
Gary Kramlich <grim@reaperworld.com>
parents:
41106
diff
changeset
|
65 | if(username != NULL && *username != '\0' && account != NULL) { |
|
0e835d051f5c
Update gtkdialogs.c for GTK4
Gary Kramlich <grim@reaperworld.com>
parents:
41106
diff
changeset
|
66 | pidgin_retrieve_user_info(purple_account_get_connection(account), |
|
0e835d051f5c
Update gtkdialogs.c for GTK4
Gary Kramlich <grim@reaperworld.com>
parents:
41106
diff
changeset
|
67 | username); |
|
40125
a7acc7b00d79
Replace purple_str_has_{prefix,suffix} by g_str_has_{prefix,suffix}.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
40064
diff
changeset
|
68 | } |
| 9709 | 69 | |
| 70 | g_free(username); | |
| 71 | } | |
| 72 | ||
| 73 | void | |
|
16263
27e0ef0f38e6
Word on the street is that we don't want things named pidginfoo_bar(), but
Richard Laager <rlaager@pidgin.im>
parents:
16254
diff
changeset
|
74 | pidgin_dialogs_info(void) |
| 9709 | 75 | { |
|
42128
118067ca0367
Convert PurpleRequestPage into a GObject
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42127
diff
changeset
|
76 | PurpleRequestPage *page; |
|
42127
18acb99a0fa6
Convert PurpleRequestGroup into a GObject
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41947
diff
changeset
|
77 | PurpleRequestGroup *group; |
| 15884 | 78 | PurpleRequestField *field; |
| 9709 | 79 | |
|
42128
118067ca0367
Convert PurpleRequestPage into a GObject
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42127
diff
changeset
|
80 | page = purple_request_page_new(); |
| 9709 | 81 | |
|
42127
18acb99a0fa6
Convert PurpleRequestGroup into a GObject
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41947
diff
changeset
|
82 | group = purple_request_group_new(NULL); |
|
42128
118067ca0367
Convert PurpleRequestPage into a GObject
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42127
diff
changeset
|
83 | purple_request_page_add_group(page, group); |
| 9709 | 84 | |
| 15884 | 85 | field = purple_request_field_account_new("account", _("_Account"), NULL); |
| 86 | purple_request_field_set_type_hint(field, "account"); | |
| 87 | purple_request_field_set_visible(field, | |
| 88 | (purple_connections_get_all() != NULL && | |
| 89 | purple_connections_get_all()->next != NULL)); | |
| 90 | purple_request_field_set_required(field, TRUE); | |
|
42127
18acb99a0fa6
Convert PurpleRequestGroup into a GObject
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41947
diff
changeset
|
91 | purple_request_group_add_field(group, field); |
| 9709 | 92 | |
|
42365
45ce6d3f6386
Create PidginAccountRow which subclasses AdwRow
Gary Kramlich <grim@reaperworld.com>
parents:
42357
diff
changeset
|
93 | field = purple_request_field_string_new("screenname", _("_Name"), NULL, FALSE); |
|
45ce6d3f6386
Create PidginAccountRow which subclasses AdwRow
Gary Kramlich <grim@reaperworld.com>
parents:
42357
diff
changeset
|
94 | purple_request_field_set_type_hint(field, "screenname"); |
|
45ce6d3f6386
Create PidginAccountRow which subclasses AdwRow
Gary Kramlich <grim@reaperworld.com>
parents:
42357
diff
changeset
|
95 | purple_request_field_set_required(field, TRUE); |
|
45ce6d3f6386
Create PidginAccountRow which subclasses AdwRow
Gary Kramlich <grim@reaperworld.com>
parents:
42357
diff
changeset
|
96 | purple_request_group_add_field(group, field); |
|
45ce6d3f6386
Create PidginAccountRow which subclasses AdwRow
Gary Kramlich <grim@reaperworld.com>
parents:
42357
diff
changeset
|
97 | |
|
39665
2172e3b8eeef
Rename some buddy list accessor functions.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39603
diff
changeset
|
98 | purple_request_fields( |
|
2172e3b8eeef
Rename some buddy list accessor functions.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39603
diff
changeset
|
99 | purple_blist_get_default(), _("Get User Info"), NULL, |
|
2172e3b8eeef
Rename some buddy list accessor functions.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39603
diff
changeset
|
100 | _("Please enter the username or alias of the person " |
|
2172e3b8eeef
Rename some buddy list accessor functions.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39603
diff
changeset
|
101 | "whose info you would like to view."), |
|
42128
118067ca0367
Convert PurpleRequestPage into a GObject
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42127
diff
changeset
|
102 | page, _("OK"), G_CALLBACK(pidgin_dialogs_info_cb), |
|
39665
2172e3b8eeef
Rename some buddy list accessor functions.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39603
diff
changeset
|
103 | _("Cancel"), NULL, NULL, NULL); |
| 9709 | 104 | } |