Mon, 30 Jun 2025 14:22:13 -0500
Update the flatpak to gnome 48 and to the matching birb version
The birb version was missed here when it was updated.
Testing Done:
Built the flatpak with the instructions in the readme.
Reviewed at https://reviews.imfreedom.org/r/4038/
|
42594
eddde70cedd8
Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents:
42475
diff
changeset
|
1 | /* |
|
eddde70cedd8
Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents:
42475
diff
changeset
|
2 | * Purple - Internet Messaging Library |
|
eddde70cedd8
Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents:
42475
diff
changeset
|
3 | * Copyright (C) Pidgin Developers <devel@pidgin.im> |
| 2416 | 4 | * |
| 15884 | 5 | * Purple is the legal property of its developers, whose names are too numerous |
|
42594
eddde70cedd8
Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents:
42475
diff
changeset
|
6 | * to list here. Please refer to the COPYRIGHT file distributed with this |
| 8046 | 7 | * source distribution. |
| 2416 | 8 | * |
|
42594
eddde70cedd8
Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents:
42475
diff
changeset
|
9 | * This library is free software; you can redistribute it and/or modify it |
|
eddde70cedd8
Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents:
42475
diff
changeset
|
10 | * under the terms of the GNU General Public License as published by the Free |
|
eddde70cedd8
Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents:
42475
diff
changeset
|
11 | * Software Foundation; either version 2 of the License, or (at your option) |
|
eddde70cedd8
Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents:
42475
diff
changeset
|
12 | * any later version. |
| 2416 | 13 | * |
|
42594
eddde70cedd8
Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents:
42475
diff
changeset
|
14 | * This library is distributed in the hope that it will be useful, but WITHOUT |
|
eddde70cedd8
Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents:
42475
diff
changeset
|
15 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
eddde70cedd8
Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents:
42475
diff
changeset
|
16 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
|
eddde70cedd8
Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents:
42475
diff
changeset
|
17 | * more details. |
| 2416 | 18 | * |
|
42594
eddde70cedd8
Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents:
42475
diff
changeset
|
19 | * You should have received a copy of the GNU General Public License along with |
|
eddde70cedd8
Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents:
42475
diff
changeset
|
20 | * this library; if not, see <https://www.gnu.org/licenses/>. |
| 2416 | 21 | */ |
|
40441
f23c7e772667
Make sure we're not including the gettext macros in header files and deal with the repercussions of that.
Gary Kramlich <grim@reaperworld.com>
parents:
40439
diff
changeset
|
22 | |
|
42410
563e7a17c220
Fix possible clash of config headers
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42383
diff
changeset
|
23 | #include <purpleconfig.h> |
|
563e7a17c220
Fix possible clash of config headers
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42383
diff
changeset
|
24 | |
|
40441
f23c7e772667
Make sure we're not including the gettext macros in header files and deal with the repercussions of that.
Gary Kramlich <grim@reaperworld.com>
parents:
40439
diff
changeset
|
25 | #include <glib/gi18n-lib.h> |
|
41660
6a4db60af05b
Prepare GSettings schemas and a default settings backend
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41433
diff
changeset
|
26 | #define G_SETTINGS_ENABLE_BACKEND |
|
6a4db60af05b
Prepare GSettings schemas and a default settings backend
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41433
diff
changeset
|
27 | #include <gio/gsettingsbackend.h> |
|
40441
f23c7e772667
Make sure we're not including the gettext macros in header files and deal with the repercussions of that.
Gary Kramlich <grim@reaperworld.com>
parents:
40439
diff
changeset
|
28 | |
|
42997
368deff13c21
Split purpleprivate.h up into individual files
Gary Kramlich <grim@reaperworld.com>
parents:
42995
diff
changeset
|
29 | #include "accounts.h" |
|
6179
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
30 | #include "core.h" |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
31 | #include "debug.h" |
| 8231 | 32 | #include "network.h" |
|
36367
891eea799578
Renamed plugin.[ch] to plugins.[ch], since we (will) no longer have a PurplePlugin structure.
Ankit Vani <a@nevitus.org>
parents:
34855
diff
changeset
|
33 | #include "plugins.h" |
|
6179
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
34 | #include "prefs.h" |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
35 | #include "proxy.h" |
|
42993
bd76f53bd582
Update purple_core_quit to use Purple.AccountManager:online to disconnect accounts
Gary Kramlich <grim@reaperworld.com>
parents:
42874
diff
changeset
|
36 | #include "purpleaccountmanager.h" |
|
42997
368deff13c21
Split purpleprivate.h up into individual files
Gary Kramlich <grim@reaperworld.com>
parents:
42995
diff
changeset
|
37 | #include "purpleaccountmanagerprivate.h" |
|
43053
f2f944ac775c
Implement Purple.CommandManager
Gary Kramlich <grim@reaperworld.com>
parents:
43016
diff
changeset
|
38 | #include "purplecommandmanagerprivate.h" |
|
43016
158d07e5cd54
Rename connection.[ch] to purpleconnection.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
42999
diff
changeset
|
39 | #include "purpleconnection.h" |
|
42997
368deff13c21
Split purpleprivate.h up into individual files
Gary Kramlich <grim@reaperworld.com>
parents:
42995
diff
changeset
|
40 | #include "purplecontactmanagerprivate.h" |
|
368deff13c21
Split purpleprivate.h up into individual files
Gary Kramlich <grim@reaperworld.com>
parents:
42995
diff
changeset
|
41 | #include "purpleconversationmanagerprivate.h" |
|
40853
d3518ff99fa7
rename conversation.[ch] to purpleconversation.[ch] and split PurpleConversationUiOps out to its own file to avoid circular include issues.
Gary Kramlich <grim@reaperworld.com>
parents:
40743
diff
changeset
|
42 | #include "purpleconversation.h" |
|
40743
7aa6153abf4d
Create a no operation credential provider and fix a number of other issues
Gary Kramlich <grim@reaperworld.com>
parents:
40735
diff
changeset
|
43 | #include "purplecredentialmanager.h" |
|
42997
368deff13c21
Split purpleprivate.h up into individual files
Gary Kramlich <grim@reaperworld.com>
parents:
42995
diff
changeset
|
44 | #include "purplecredentialmanagerprivate.h" |
|
41166
20d88cadf7fc
Clean up some issues during shutdown that were outputting warnings
Gary Kramlich <grim@reaperworld.com>
parents:
41137
diff
changeset
|
45 | #include "purplehistorymanager.h" |
|
42383
e8302a55fddb
Create PurpleIdleManager for managing idle states
Gary Kramlich <grim@reaperworld.com>
parents:
42374
diff
changeset
|
46 | #include "purpleidlemanagerprivate.h" |
|
40696
cf58ec89b1e4
Rename message.[ch] to purplemessage.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40683
diff
changeset
|
47 | #include "purplemessage.h" |
|
42997
368deff13c21
Split purpleprivate.h up into individual files
Gary Kramlich <grim@reaperworld.com>
parents:
42995
diff
changeset
|
48 | #include "purplenotificationmanagerprivate.h" |
|
41237
5098e0dd3a09
Move the path based functions from util.c to their own file.
Gary Kramlich <grim@reaperworld.com>
parents:
41236
diff
changeset
|
49 | #include "purplepath.h" |
|
42475
ce06ca18db9b
Integrate PurplePresenceManager with the core and uis
Gary Kramlich <grim@reaperworld.com>
parents:
42473
diff
changeset
|
50 | #include "purplepresencemanagerprivate.h" |
|
42997
368deff13c21
Split purpleprivate.h up into individual files
Gary Kramlich <grim@reaperworld.com>
parents:
42995
diff
changeset
|
51 | #include "purpleprotocolmanagerprivate.h" |
|
368deff13c21
Split purpleprivate.h up into individual files
Gary Kramlich <grim@reaperworld.com>
parents:
42995
diff
changeset
|
52 | #include "purplewhiteboardmanagerprivate.h" |
|
16409
8c153c6febdd
The core portion of the migration code. This is implemented as I described
Richard Laager <rlaager@pidgin.im>
parents:
16124
diff
changeset
|
53 | #include "util.h" |
|
41877
11e7400101d2
Fix libpurple compile on Windows
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41873
diff
changeset
|
54 | #ifdef _WIN32 |
|
11e7400101d2
Fix libpurple compile on Windows
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41873
diff
changeset
|
55 | #include "win32/win32dep.h" |
|
11e7400101d2
Fix libpurple compile on Windows
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41873
diff
changeset
|
56 | #endif |
| 2416 | 57 | |
| 15884 | 58 | struct PurpleCore |
|
6179
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
59 | { |
|
41867
5375c1d58c50
Create PurpleUi that merges PurpleCoreUiOps and PurpleUiInfo
Gary Kramlich <grim@reaperworld.com>
parents:
41847
diff
changeset
|
60 | PurpleUi *ui; |
|
6179
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
61 | |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
62 | void *reserved; |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
63 | }; |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
64 | |
| 15884 | 65 | static PurpleCore *_core = NULL; |
|
41660
6a4db60af05b
Prepare GSettings schemas and a default settings backend
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41433
diff
changeset
|
66 | static GSettingsBackend *settings_backend = NULL; |
|
6179
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
67 | |
|
34297
0f1f0b8c84f8
Fix some debug log warnings, adjust verbosity level
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34165
diff
changeset
|
68 | static void |
|
0f1f0b8c84f8
Fix some debug log warnings, adjust verbosity level
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34165
diff
changeset
|
69 | purple_core_print_version(void) |
|
0f1f0b8c84f8
Fix some debug log warnings, adjust verbosity level
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34165
diff
changeset
|
70 | { |
|
41867
5375c1d58c50
Create PurpleUi that merges PurpleCoreUiOps and PurpleUiInfo
Gary Kramlich <grim@reaperworld.com>
parents:
41847
diff
changeset
|
71 | PurpleUi *ui = purple_core_get_ui(); |
|
40336
4e766d681de5
purple_core_get_ui_info now transfers the PurpleUiInfo to the caller, so we need to make sure to not cache it.
Gary Kramlich <grim@reaperworld.com>
parents:
40313
diff
changeset
|
72 | const gchar *ui_name = NULL; |
|
4e766d681de5
purple_core_get_ui_info now transfers the PurpleUiInfo to the caller, so we need to make sure to not cache it.
Gary Kramlich <grim@reaperworld.com>
parents:
40313
diff
changeset
|
73 | const gchar *ui_version = NULL; |
|
34297
0f1f0b8c84f8
Fix some debug log warnings, adjust verbosity level
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34165
diff
changeset
|
74 | gchar *ui_full_name = NULL; |
|
0f1f0b8c84f8
Fix some debug log warnings, adjust verbosity level
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34165
diff
changeset
|
75 | |
|
41867
5375c1d58c50
Create PurpleUi that merges PurpleCoreUiOps and PurpleUiInfo
Gary Kramlich <grim@reaperworld.com>
parents:
41847
diff
changeset
|
76 | if(PURPLE_IS_UI(ui)) { |
|
5375c1d58c50
Create PurpleUi that merges PurpleCoreUiOps and PurpleUiInfo
Gary Kramlich <grim@reaperworld.com>
parents:
41847
diff
changeset
|
77 | ui_name = purple_ui_get_name(ui); |
|
5375c1d58c50
Create PurpleUi that merges PurpleCoreUiOps and PurpleUiInfo
Gary Kramlich <grim@reaperworld.com>
parents:
41847
diff
changeset
|
78 | ui_version = purple_ui_get_version(ui); |
|
40313
d0f01217e491
the ui can return a null PurpleUiInfo so we need to handle that
Gary Kramlich <grim@reaperworld.com>
parents:
40312
diff
changeset
|
79 | } |
|
34297
0f1f0b8c84f8
Fix some debug log warnings, adjust verbosity level
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34165
diff
changeset
|
80 | |
|
0f1f0b8c84f8
Fix some debug log warnings, adjust verbosity level
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34165
diff
changeset
|
81 | if (ui_name) { |
|
39918
1c8e11f9274f
Fix several memory leaks.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39441
diff
changeset
|
82 | if (ui_version) { |
|
1c8e11f9274f
Fix several memory leaks.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39441
diff
changeset
|
83 | ui_full_name = g_strdup_printf("%s %s", ui_name, ui_version); |
|
1c8e11f9274f
Fix several memory leaks.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39441
diff
changeset
|
84 | } else { |
|
1c8e11f9274f
Fix several memory leaks.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39441
diff
changeset
|
85 | ui_full_name = g_strdup(ui_name); |
|
1c8e11f9274f
Fix several memory leaks.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39441
diff
changeset
|
86 | } |
|
34297
0f1f0b8c84f8
Fix some debug log warnings, adjust verbosity level
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34165
diff
changeset
|
87 | } |
|
0f1f0b8c84f8
Fix some debug log warnings, adjust verbosity level
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34165
diff
changeset
|
88 | |
|
0f1f0b8c84f8
Fix some debug log warnings, adjust verbosity level
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34165
diff
changeset
|
89 | purple_debug_info("main", "Launching %s%slibpurple %s", |
|
0f1f0b8c84f8
Fix some debug log warnings, adjust verbosity level
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34165
diff
changeset
|
90 | ui_full_name ? ui_full_name : "", |
|
0f1f0b8c84f8
Fix some debug log warnings, adjust verbosity level
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34165
diff
changeset
|
91 | ui_full_name ? " with " : "", |
|
0f1f0b8c84f8
Fix some debug log warnings, adjust verbosity level
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34165
diff
changeset
|
92 | purple_core_get_version()); |
|
0f1f0b8c84f8
Fix some debug log warnings, adjust verbosity level
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34165
diff
changeset
|
93 | |
|
39918
1c8e11f9274f
Fix several memory leaks.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39441
diff
changeset
|
94 | g_free(ui_full_name); |
|
34297
0f1f0b8c84f8
Fix some debug log warnings, adjust verbosity level
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34165
diff
changeset
|
95 | } |
|
0f1f0b8c84f8
Fix some debug log warnings, adjust verbosity level
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34165
diff
changeset
|
96 | |
|
6179
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
97 | gboolean |
|
42435
ecf0fdfc8363
Add a get_history_adapter method to PurpleUi and implement in Pidgin and Finch
Gary Kramlich <grim@reaperworld.com>
parents:
42410
diff
changeset
|
98 | purple_core_init(PurpleUi *ui, GError **error) { |
|
ecf0fdfc8363
Add a get_history_adapter method to PurpleUi and implement in Pidgin and Finch
Gary Kramlich <grim@reaperworld.com>
parents:
42410
diff
changeset
|
99 | PurpleCore *core = NULL; |
|
ecf0fdfc8363
Add a get_history_adapter method to PurpleUi and implement in Pidgin and Finch
Gary Kramlich <grim@reaperworld.com>
parents:
42410
diff
changeset
|
100 | PurpleHistoryAdapter *adapter = NULL; |
|
41872
b405b4eb38fa
Display a dialog in Pidgin if purple_core_init returned FALSE
Gary Kramlich <grim@reaperworld.com>
parents:
41868
diff
changeset
|
101 | const char *force_error_message = NULL; |
|
6179
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
102 | |
|
41867
5375c1d58c50
Create PurpleUi that merges PurpleCoreUiOps and PurpleUiInfo
Gary Kramlich <grim@reaperworld.com>
parents:
41847
diff
changeset
|
103 | g_return_val_if_fail(PURPLE_IS_UI(ui), FALSE); |
| 15884 | 104 | g_return_val_if_fail(purple_get_core() == NULL, FALSE); |
|
6179
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
105 | |
|
42473
c2cb3f628555
Update a bunch of gettext stuff
Gary Kramlich <grim@reaperworld.com>
parents:
42435
diff
changeset
|
106 | bindtextdomain(GETTEXT_PACKAGE, purple_get_locale_dir()); |
|
39374
d6261d7d0c91
Remove ENABLE_NLS guards, making 'nls' only affect po/ directory
Mike Ruprecht <cmaiku@gmail.com>
parents:
39353
diff
changeset
|
107 | |
|
14286
9ff15ceacd34
[gaim-migrate @ 16905]
Daniel Atallah <datallah@pidgin.im>
parents:
14254
diff
changeset
|
108 | #ifdef _WIN32 |
| 15884 | 109 | wpurple_init(); |
|
14286
9ff15ceacd34
[gaim-migrate @ 16905]
Daniel Atallah <datallah@pidgin.im>
parents:
14254
diff
changeset
|
110 | #endif |
|
9ff15ceacd34
[gaim-migrate @ 16905]
Daniel Atallah <datallah@pidgin.im>
parents:
14254
diff
changeset
|
111 | |
| 15884 | 112 | _core = core = g_new0(PurpleCore, 1); |
|
41867
5375c1d58c50
Create PurpleUi that merges PurpleCoreUiOps and PurpleUiInfo
Gary Kramlich <grim@reaperworld.com>
parents:
41847
diff
changeset
|
113 | core->ui = ui; |
|
6179
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
114 | core->reserved = NULL; |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
115 | |
|
21238
cd326828c870
Add and call a purple_util_uninit() to free user_dir and customer_home_dir
Richard Laager <rlaager@pidgin.im>
parents:
20147
diff
changeset
|
116 | purple_util_init(); |
|
cd326828c870
Add and call a purple_util_uninit() to free user_dir and customer_home_dir
Richard Laager <rlaager@pidgin.im>
parents:
20147
diff
changeset
|
117 | |
|
34297
0f1f0b8c84f8
Fix some debug log warnings, adjust verbosity level
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34165
diff
changeset
|
118 | purple_core_print_version(); |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
119 | |
|
10087
e5b80a38939d
[gaim-migrate @ 11098]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9944
diff
changeset
|
120 | /* The prefs subsystem needs to be initialized before static protocols |
|
e5b80a38939d
[gaim-migrate @ 11098]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9944
diff
changeset
|
121 | * for protocol prefs to work. */ |
| 15884 | 122 | purple_prefs_init(); |
|
41867
5375c1d58c50
Create PurpleUi that merges PurpleCoreUiOps and PurpleUiInfo
Gary Kramlich <grim@reaperworld.com>
parents:
41847
diff
changeset
|
123 | |
|
5375c1d58c50
Create PurpleUi that merges PurpleCoreUiOps and PurpleUiInfo
Gary Kramlich <grim@reaperworld.com>
parents:
41847
diff
changeset
|
124 | settings_backend = purple_ui_get_settings_backend(core->ui); |
|
10087
e5b80a38939d
[gaim-migrate @ 11098]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9944
diff
changeset
|
125 | |
| 15884 | 126 | purple_debug_init(); |
|
10448
4415ffba12e9
[gaim-migrate @ 11713]
Mark Doliner <markdoliner@pidgin.im>
parents:
10418
diff
changeset
|
127 | |
|
41867
5375c1d58c50
Create PurpleUi that merges PurpleCoreUiOps and PurpleUiInfo
Gary Kramlich <grim@reaperworld.com>
parents:
41847
diff
changeset
|
128 | purple_ui_prefs_init(core->ui); |
|
6179
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
129 | |
|
41433
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
41396
diff
changeset
|
130 | purple_notification_manager_startup(); |
|
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
41396
diff
changeset
|
131 | |
|
40735
cc0679f47fd9
Create a new PurpleProtocolManager
Gary Kramlich <grim@reaperworld.com>
parents:
40734
diff
changeset
|
132 | purple_protocol_manager_startup(); |
|
16660
05ee74f25b2a
Part of the patch in ticket #383:
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16608
diff
changeset
|
133 | |
|
42861
563d56738460
Change the way the CredentialManager interacts with the core
Gary Kramlich <grim@reaperworld.com>
parents:
42834
diff
changeset
|
134 | purple_credential_manager_startup(core); /* before accounts */ |
|
40734
c792b39da167
Port the secretservice keyring to PurpleCredentialProvider
Gary Kramlich <grim@reaperworld.com>
parents:
40696
diff
changeset
|
135 | |
|
43066
850400fb36c0
Add an edited command to the demo protocol
Gary Kramlich <grim@reaperworld.com>
parents:
43054
diff
changeset
|
136 | /* Before plugins as they will add commands. */ |
|
850400fb36c0
Add an edited command to the demo protocol
Gary Kramlich <grim@reaperworld.com>
parents:
43054
diff
changeset
|
137 | purple_command_manager_startup(); |
|
850400fb36c0
Add an edited command to the demo protocol
Gary Kramlich <grim@reaperworld.com>
parents:
43054
diff
changeset
|
138 | |
| 11033 | 139 | /* Since plugins get probed so early we should probably initialize their |
| 140 | * subsystem right away too. | |
| 141 | */ | |
| 15884 | 142 | purple_plugins_init(); |
|
25339
1ccd84242080
disapproval of revision '72679a30e1cb464d1dc7c74b14b848c3a51538ca'
Daniel Atallah <datallah@pidgin.im>
parents:
25338
diff
changeset
|
143 | |
|
41181
e859c41d8996
Create the PurpleAccountManager API
Gary Kramlich <grim@reaperworld.com>
parents:
41174
diff
changeset
|
144 | purple_account_manager_startup(); |
| 15884 | 145 | purple_accounts_init(); |
|
41754
abf413211063
Create the new PurpleContactManager
Gary Kramlich <grim@reaperworld.com>
parents:
41685
diff
changeset
|
146 | purple_contact_manager_startup(); |
|
42475
ce06ca18db9b
Integrate PurplePresenceManager with the core and uis
Gary Kramlich <grim@reaperworld.com>
parents:
42473
diff
changeset
|
147 | purple_presence_manager_startup(); |
|
40948
2c312f084d84
Create a manager for conversations.
Gary Kramlich <grim@reaperworld.com>
parents:
40863
diff
changeset
|
148 | purple_conversation_manager_startup(); |
|
41040
4be2eda9548a
Create PurpleWhiteboardManager for managing whiteboards
Gary Kramlich <grim@reaperworld.com>
parents:
41034
diff
changeset
|
149 | purple_whiteboard_manager_startup(); |
|
42435
ecf0fdfc8363
Add a get_history_adapter method to PurpleUi and implement in Pidgin and Finch
Gary Kramlich <grim@reaperworld.com>
parents:
42410
diff
changeset
|
150 | |
|
ecf0fdfc8363
Add a get_history_adapter method to PurpleUi and implement in Pidgin and Finch
Gary Kramlich <grim@reaperworld.com>
parents:
42410
diff
changeset
|
151 | /* Setup the history adapter. */ |
|
ecf0fdfc8363
Add a get_history_adapter method to PurpleUi and implement in Pidgin and Finch
Gary Kramlich <grim@reaperworld.com>
parents:
42410
diff
changeset
|
152 | adapter = purple_ui_get_history_adapter(ui); |
|
ecf0fdfc8363
Add a get_history_adapter method to PurpleUi and implement in Pidgin and Finch
Gary Kramlich <grim@reaperworld.com>
parents:
42410
diff
changeset
|
153 | if(!purple_history_manager_startup(adapter, error)) { |
|
ecf0fdfc8363
Add a get_history_adapter method to PurpleUi and implement in Pidgin and Finch
Gary Kramlich <grim@reaperworld.com>
parents:
42410
diff
changeset
|
154 | return FALSE; |
|
ecf0fdfc8363
Add a get_history_adapter method to PurpleUi and implement in Pidgin and Finch
Gary Kramlich <grim@reaperworld.com>
parents:
42410
diff
changeset
|
155 | } |
|
ecf0fdfc8363
Add a get_history_adapter method to PurpleUi and implement in Pidgin and Finch
Gary Kramlich <grim@reaperworld.com>
parents:
42410
diff
changeset
|
156 | |
| 15884 | 157 | purple_network_init(); |
| 158 | purple_proxy_init(); | |
|
42383
e8302a55fddb
Create PurpleIdleManager for managing idle states
Gary Kramlich <grim@reaperworld.com>
parents:
42374
diff
changeset
|
159 | purple_idle_manager_startup(); |
|
35715
2aa79f05247e
Custom smileys storage
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35703
diff
changeset
|
160 | |
|
15116
037b787407ba
[gaim-migrate @ 17838]
Mark Doliner <markdoliner@pidgin.im>
parents:
14300
diff
changeset
|
161 | /* |
|
037b787407ba
[gaim-migrate @ 17838]
Mark Doliner <markdoliner@pidgin.im>
parents:
14300
diff
changeset
|
162 | * Call this early on to try to auto-detect our IP address and |
|
037b787407ba
[gaim-migrate @ 17838]
Mark Doliner <markdoliner@pidgin.im>
parents:
14300
diff
changeset
|
163 | * hopefully save some time later. |
|
037b787407ba
[gaim-migrate @ 17838]
Mark Doliner <markdoliner@pidgin.im>
parents:
14300
diff
changeset
|
164 | */ |
|
40663
2453bef0abe7
Cleanup local IP getters
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40655
diff
changeset
|
165 | purple_network_discover_my_ip(); |
|
13181
2a22fe4717ed
[gaim-migrate @ 15543]
Daniel Atallah <datallah@pidgin.im>
parents:
13130
diff
changeset
|
166 | |
|
41872
b405b4eb38fa
Display a dialog in Pidgin if purple_core_init returned FALSE
Gary Kramlich <grim@reaperworld.com>
parents:
41868
diff
changeset
|
167 | /* Set this environment variable to anything to test the error reporting in |
|
b405b4eb38fa
Display a dialog in Pidgin if purple_core_init returned FALSE
Gary Kramlich <grim@reaperworld.com>
parents:
41868
diff
changeset
|
168 | * the user interface. |
|
b405b4eb38fa
Display a dialog in Pidgin if purple_core_init returned FALSE
Gary Kramlich <grim@reaperworld.com>
parents:
41868
diff
changeset
|
169 | */ |
|
b405b4eb38fa
Display a dialog in Pidgin if purple_core_init returned FALSE
Gary Kramlich <grim@reaperworld.com>
parents:
41868
diff
changeset
|
170 | force_error_message = g_getenv("PURPLE3_CORE_ERROR_MESSAGE"); |
|
b405b4eb38fa
Display a dialog in Pidgin if purple_core_init returned FALSE
Gary Kramlich <grim@reaperworld.com>
parents:
41868
diff
changeset
|
171 | if(force_error_message != NULL) { |
|
b405b4eb38fa
Display a dialog in Pidgin if purple_core_init returned FALSE
Gary Kramlich <grim@reaperworld.com>
parents:
41868
diff
changeset
|
172 | if(force_error_message[0] == '\0') { |
|
b405b4eb38fa
Display a dialog in Pidgin if purple_core_init returned FALSE
Gary Kramlich <grim@reaperworld.com>
parents:
41868
diff
changeset
|
173 | force_error_message = "This is a forced error for testing user " |
|
b405b4eb38fa
Display a dialog in Pidgin if purple_core_init returned FALSE
Gary Kramlich <grim@reaperworld.com>
parents:
41868
diff
changeset
|
174 | "interfaces."; |
|
b405b4eb38fa
Display a dialog in Pidgin if purple_core_init returned FALSE
Gary Kramlich <grim@reaperworld.com>
parents:
41868
diff
changeset
|
175 | } |
|
b405b4eb38fa
Display a dialog in Pidgin if purple_core_init returned FALSE
Gary Kramlich <grim@reaperworld.com>
parents:
41868
diff
changeset
|
176 | |
|
b405b4eb38fa
Display a dialog in Pidgin if purple_core_init returned FALSE
Gary Kramlich <grim@reaperworld.com>
parents:
41868
diff
changeset
|
177 | g_set_error_literal(error, g_quark_from_static_string("purple"), 0, |
|
b405b4eb38fa
Display a dialog in Pidgin if purple_core_init returned FALSE
Gary Kramlich <grim@reaperworld.com>
parents:
41868
diff
changeset
|
178 | force_error_message); |
|
b405b4eb38fa
Display a dialog in Pidgin if purple_core_init returned FALSE
Gary Kramlich <grim@reaperworld.com>
parents:
41868
diff
changeset
|
179 | |
|
b405b4eb38fa
Display a dialog in Pidgin if purple_core_init returned FALSE
Gary Kramlich <grim@reaperworld.com>
parents:
41868
diff
changeset
|
180 | return FALSE; |
|
b405b4eb38fa
Display a dialog in Pidgin if purple_core_init returned FALSE
Gary Kramlich <grim@reaperworld.com>
parents:
41868
diff
changeset
|
181 | } |
|
b405b4eb38fa
Display a dialog in Pidgin if purple_core_init returned FALSE
Gary Kramlich <grim@reaperworld.com>
parents:
41868
diff
changeset
|
182 | |
|
41873
98c20aec9aba
Make PurpleUi.start return a gboolean and GError
Gary Kramlich <grim@reaperworld.com>
parents:
41872
diff
changeset
|
183 | if(!purple_ui_start(core->ui, error)) { |
|
98c20aec9aba
Make PurpleUi.start return a gboolean and GError
Gary Kramlich <grim@reaperworld.com>
parents:
41872
diff
changeset
|
184 | return FALSE; |
|
98c20aec9aba
Make PurpleUi.start return a gboolean and GError
Gary Kramlich <grim@reaperworld.com>
parents:
41872
diff
changeset
|
185 | } |
|
6179
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
186 | |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
187 | return TRUE; |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
188 | } |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
189 | |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
190 | void |
| 15884 | 191 | purple_core_quit(void) |
|
6179
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
192 | { |
|
42993
bd76f53bd582
Update purple_core_quit to use Purple.AccountManager:online to disconnect accounts
Gary Kramlich <grim@reaperworld.com>
parents:
42874
diff
changeset
|
193 | PurpleAccountManager *account_manager = NULL; |
| 15884 | 194 | PurpleCore *core = purple_get_core(); |
|
41166
20d88cadf7fc
Clean up some issues during shutdown that were outputting warnings
Gary Kramlich <grim@reaperworld.com>
parents:
41137
diff
changeset
|
195 | PurpleCredentialManager *credential_manager = NULL; |
|
20d88cadf7fc
Clean up some issues during shutdown that were outputting warnings
Gary Kramlich <grim@reaperworld.com>
parents:
41137
diff
changeset
|
196 | PurpleHistoryManager *history_manager = NULL; |
|
6179
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
197 | |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
198 | g_return_if_fail(core != NULL); |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
199 | |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
200 | /* Transmission ends */ |
|
42993
bd76f53bd582
Update purple_core_quit to use Purple.AccountManager:online to disconnect accounts
Gary Kramlich <grim@reaperworld.com>
parents:
42874
diff
changeset
|
201 | account_manager = purple_account_manager_get_default(); |
|
bd76f53bd582
Update purple_core_quit to use Purple.AccountManager:online to disconnect accounts
Gary Kramlich <grim@reaperworld.com>
parents:
42874
diff
changeset
|
202 | purple_account_manager_set_online(account_manager, FALSE); |
|
6179
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
203 | |
|
41166
20d88cadf7fc
Clean up some issues during shutdown that were outputting warnings
Gary Kramlich <grim@reaperworld.com>
parents:
41137
diff
changeset
|
204 | /* Remove the active provider in the credential manager. */ |
|
20d88cadf7fc
Clean up some issues during shutdown that were outputting warnings
Gary Kramlich <grim@reaperworld.com>
parents:
41137
diff
changeset
|
205 | credential_manager = purple_credential_manager_get_default(); |
|
20d88cadf7fc
Clean up some issues during shutdown that were outputting warnings
Gary Kramlich <grim@reaperworld.com>
parents:
41137
diff
changeset
|
206 | purple_credential_manager_set_active(credential_manager, NULL, NULL); |
|
20d88cadf7fc
Clean up some issues during shutdown that were outputting warnings
Gary Kramlich <grim@reaperworld.com>
parents:
41137
diff
changeset
|
207 | |
|
20d88cadf7fc
Clean up some issues during shutdown that were outputting warnings
Gary Kramlich <grim@reaperworld.com>
parents:
41137
diff
changeset
|
208 | /* Remove the active history adapter */ |
|
20d88cadf7fc
Clean up some issues during shutdown that were outputting warnings
Gary Kramlich <grim@reaperworld.com>
parents:
41137
diff
changeset
|
209 | history_manager = purple_history_manager_get_default(); |
|
20d88cadf7fc
Clean up some issues during shutdown that were outputting warnings
Gary Kramlich <grim@reaperworld.com>
parents:
41137
diff
changeset
|
210 | purple_history_manager_set_active(history_manager, NULL, NULL); |
|
20d88cadf7fc
Clean up some issues during shutdown that were outputting warnings
Gary Kramlich <grim@reaperworld.com>
parents:
41137
diff
changeset
|
211 | |
| 8235 | 212 | /* Save .xml files, remove signals, etc. */ |
|
42383
e8302a55fddb
Create PurpleIdleManager for managing idle states
Gary Kramlich <grim@reaperworld.com>
parents:
42374
diff
changeset
|
213 | purple_idle_manager_shutdown(); |
|
41040
4be2eda9548a
Create PurpleWhiteboardManager for managing whiteboards
Gary Kramlich <grim@reaperworld.com>
parents:
41034
diff
changeset
|
214 | purple_whiteboard_manager_shutdown(); |
|
40948
2c312f084d84
Create a manager for conversations.
Gary Kramlich <grim@reaperworld.com>
parents:
40863
diff
changeset
|
215 | purple_conversation_manager_shutdown(); |
|
42475
ce06ca18db9b
Integrate PurplePresenceManager with the core and uis
Gary Kramlich <grim@reaperworld.com>
parents:
42473
diff
changeset
|
216 | purple_presence_manager_shutdown(); |
|
26896
fd3f89b3af4e
don't uninit accounts until savedstatus and status are uninited, this was
Ka-Hing Cheung <khc@pidgin.im>
parents:
26751
diff
changeset
|
217 | purple_accounts_uninit(); |
| 15884 | 218 | purple_proxy_uninit(); |
|
25326
c4f4b222dbac
Adjust the NLA code to prevent hang on exit for Windows XP and Windows Vista.
Paul Aurich <darkrain42@pidgin.im>
parents:
24389
diff
changeset
|
219 | purple_network_uninit(); |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
220 | |
|
41867
5375c1d58c50
Create PurpleUi that merges PurpleCoreUiOps and PurpleUiInfo
Gary Kramlich <grim@reaperworld.com>
parents:
41847
diff
changeset
|
221 | purple_ui_stop(core->ui); |
|
25713
9dc831db9cce
Alternate, API-safe fix for #8774 (crash on exit)
Ethan Blanton <elb@pidgin.im>
parents:
25712
diff
changeset
|
222 | |
|
26751
4b0dffa16ffe
Apply patch from darkrain42 to fix the crash-on-exit. Hopefully, the order
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
26743
diff
changeset
|
223 | /* Everything after prefs_uninit must not try to read any prefs */ |
|
41660
6a4db60af05b
Prepare GSettings schemas and a default settings backend
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41433
diff
changeset
|
224 | g_clear_object(&settings_backend); |
|
25446
4d2288e37f38
Reorder (and document) purple_core_quit() so that the prefs_uninit() fixes can
Paul Aurich <darkrain42@pidgin.im>
parents:
25338
diff
changeset
|
225 | purple_prefs_uninit(); |
| 15884 | 226 | purple_plugins_uninit(); |
|
36458
a9cccad073e9
Static prpls now work. Added macro PURPLE_PLUGIN_INIT(plugin-name, query-func, load-func, unload-func).
Ankit Vani <a@nevitus.org>
parents:
36375
diff
changeset
|
227 | |
|
40743
7aa6153abf4d
Create a no operation credential provider and fix a number of other issues
Gary Kramlich <grim@reaperworld.com>
parents:
40735
diff
changeset
|
228 | /* after plugins */ |
|
41754
abf413211063
Create the new PurpleContactManager
Gary Kramlich <grim@reaperworld.com>
parents:
41685
diff
changeset
|
229 | purple_contact_manager_shutdown(); |
|
41185
60a9e999f4b6
Fix an order of operation with shutting down the account manager
Gary Kramlich <grim@reaperworld.com>
parents:
41181
diff
changeset
|
230 | purple_account_manager_shutdown(); |
|
42861
563d56738460
Change the way the CredentialManager interacts with the core
Gary Kramlich <grim@reaperworld.com>
parents:
42834
diff
changeset
|
231 | purple_credential_manager_shutdown(core); |
|
40735
cc0679f47fd9
Create a new PurpleProtocolManager
Gary Kramlich <grim@reaperworld.com>
parents:
40734
diff
changeset
|
232 | purple_protocol_manager_shutdown(); |
|
43066
850400fb36c0
Add an edited command to the demo protocol
Gary Kramlich <grim@reaperworld.com>
parents:
43054
diff
changeset
|
233 | purple_command_manager_shutdown(); |
|
36375
8ed701a7333e
Added a protocols subsystem API and a protocols API to add/remove protocols.
Ankit Vani <a@nevitus.org>
parents:
36367
diff
changeset
|
234 | |
|
41433
d563b345a096
Phase 1 of the Notifications API
Gary Kramlich <grim@reaperworld.com>
parents:
41396
diff
changeset
|
235 | purple_notification_manager_shutdown(); |
|
41090
741992355ead
GSoC History API including sqlite history adapter
James Culver <rewtguy@gmail.com>
parents:
41040
diff
changeset
|
236 | purple_history_manager_shutdown(); |
|
741992355ead
GSoC History API including sqlite history adapter
James Culver <rewtguy@gmail.com>
parents:
41040
diff
changeset
|
237 | |
|
33538
cbeb76707f12
Better implementation of purple_escape_js
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33439
diff
changeset
|
238 | /* Everything after util_uninit cannot try to write things to the |
|
40123
15c3354736c3
Remove some unused utility functions.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
40058
diff
changeset
|
239 | * confdir. |
|
33538
cbeb76707f12
Better implementation of purple_escape_js
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33439
diff
changeset
|
240 | */ |
|
21238
cd326828c870
Add and call a purple_util_uninit() to free user_dir and customer_home_dir
Richard Laager <rlaager@pidgin.im>
parents:
20147
diff
changeset
|
241 | purple_util_uninit(); |
|
cd326828c870
Add and call a purple_util_uninit() to free user_dir and customer_home_dir
Richard Laager <rlaager@pidgin.im>
parents:
20147
diff
changeset
|
242 | |
|
41867
5375c1d58c50
Create PurpleUi that merges PurpleCoreUiOps and PurpleUiInfo
Gary Kramlich <grim@reaperworld.com>
parents:
41847
diff
changeset
|
243 | g_clear_object(&core->ui); |
|
6179
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
244 | g_free(core); |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
245 | |
|
14286
9ff15ceacd34
[gaim-migrate @ 16905]
Daniel Atallah <datallah@pidgin.im>
parents:
14254
diff
changeset
|
246 | #ifdef _WIN32 |
| 15884 | 247 | wpurple_cleanup(); |
|
14286
9ff15ceacd34
[gaim-migrate @ 16905]
Daniel Atallah <datallah@pidgin.im>
parents:
14254
diff
changeset
|
248 | #endif |
|
9ff15ceacd34
[gaim-migrate @ 16905]
Daniel Atallah <datallah@pidgin.im>
parents:
14254
diff
changeset
|
249 | |
|
6179
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
250 | _core = NULL; |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
251 | } |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
252 | |
|
6612
aac6af649208
[gaim-migrate @ 7136]
Christian Hammond <chipx86@chipx86.com>
parents:
6564
diff
changeset
|
253 | const char * |
| 15884 | 254 | purple_core_get_version(void) |
|
6612
aac6af649208
[gaim-migrate @ 7136]
Christian Hammond <chipx86@chipx86.com>
parents:
6564
diff
changeset
|
255 | { |
|
aac6af649208
[gaim-migrate @ 7136]
Christian Hammond <chipx86@chipx86.com>
parents:
6564
diff
changeset
|
256 | return VERSION; |
|
aac6af649208
[gaim-migrate @ 7136]
Christian Hammond <chipx86@chipx86.com>
parents:
6564
diff
changeset
|
257 | } |
|
aac6af649208
[gaim-migrate @ 7136]
Christian Hammond <chipx86@chipx86.com>
parents:
6564
diff
changeset
|
258 | |
| 15884 | 259 | PurpleCore * |
| 260 | purple_get_core(void) | |
|
6179
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
261 | { |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
262 | return _core; |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
263 | } |
|
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
264 | |
|
43054
ccd071e7cd83
Add a boolean setting for toggling developer mode
Gary Kramlich <grim@reaperworld.com>
parents:
43053
diff
changeset
|
265 | gboolean |
|
ccd071e7cd83
Add a boolean setting for toggling developer mode
Gary Kramlich <grim@reaperworld.com>
parents:
43053
diff
changeset
|
266 | purple_core_get_developer_mode(void) { |
|
ccd071e7cd83
Add a boolean setting for toggling developer mode
Gary Kramlich <grim@reaperworld.com>
parents:
43053
diff
changeset
|
267 | GSettings *settings = NULL; |
|
ccd071e7cd83
Add a boolean setting for toggling developer mode
Gary Kramlich <grim@reaperworld.com>
parents:
43053
diff
changeset
|
268 | gboolean developer_mode = FALSE; |
|
ccd071e7cd83
Add a boolean setting for toggling developer mode
Gary Kramlich <grim@reaperworld.com>
parents:
43053
diff
changeset
|
269 | |
|
43253
0cc00d7d6215
Create purple_core_new_settings
Gary Kramlich <grim@reaperworld.com>
parents:
43066
diff
changeset
|
270 | settings = purple_core_new_settings("im.pidgin.Purple.Core"); |
|
43054
ccd071e7cd83
Add a boolean setting for toggling developer mode
Gary Kramlich <grim@reaperworld.com>
parents:
43053
diff
changeset
|
271 | developer_mode = g_settings_get_boolean(settings, "developer-mode"); |
|
43253
0cc00d7d6215
Create purple_core_new_settings
Gary Kramlich <grim@reaperworld.com>
parents:
43066
diff
changeset
|
272 | g_clear_object(&settings); |
|
43054
ccd071e7cd83
Add a boolean setting for toggling developer mode
Gary Kramlich <grim@reaperworld.com>
parents:
43053
diff
changeset
|
273 | |
|
ccd071e7cd83
Add a boolean setting for toggling developer mode
Gary Kramlich <grim@reaperworld.com>
parents:
43053
diff
changeset
|
274 | return developer_mode; |
|
ccd071e7cd83
Add a boolean setting for toggling developer mode
Gary Kramlich <grim@reaperworld.com>
parents:
43053
diff
changeset
|
275 | } |
|
ccd071e7cd83
Add a boolean setting for toggling developer mode
Gary Kramlich <grim@reaperworld.com>
parents:
43053
diff
changeset
|
276 | |
|
41660
6a4db60af05b
Prepare GSettings schemas and a default settings backend
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41433
diff
changeset
|
277 | gpointer |
|
6a4db60af05b
Prepare GSettings schemas and a default settings backend
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41433
diff
changeset
|
278 | purple_core_get_settings_backend(void) { |
|
6a4db60af05b
Prepare GSettings schemas and a default settings backend
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41433
diff
changeset
|
279 | return settings_backend; |
|
6a4db60af05b
Prepare GSettings schemas and a default settings backend
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41433
diff
changeset
|
280 | } |
|
6a4db60af05b
Prepare GSettings schemas and a default settings backend
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41433
diff
changeset
|
281 | |
|
43253
0cc00d7d6215
Create purple_core_new_settings
Gary Kramlich <grim@reaperworld.com>
parents:
43066
diff
changeset
|
282 | GSettings * |
|
0cc00d7d6215
Create purple_core_new_settings
Gary Kramlich <grim@reaperworld.com>
parents:
43066
diff
changeset
|
283 | purple_core_new_settings(const char *schema_id) { |
|
0cc00d7d6215
Create purple_core_new_settings
Gary Kramlich <grim@reaperworld.com>
parents:
43066
diff
changeset
|
284 | g_return_val_if_fail(schema_id != NULL, NULL); |
|
0cc00d7d6215
Create purple_core_new_settings
Gary Kramlich <grim@reaperworld.com>
parents:
43066
diff
changeset
|
285 | |
|
0cc00d7d6215
Create purple_core_new_settings
Gary Kramlich <grim@reaperworld.com>
parents:
43066
diff
changeset
|
286 | return g_settings_new_with_backend(schema_id, settings_backend); |
|
0cc00d7d6215
Create purple_core_new_settings
Gary Kramlich <grim@reaperworld.com>
parents:
43066
diff
changeset
|
287 | } |
|
0cc00d7d6215
Create purple_core_new_settings
Gary Kramlich <grim@reaperworld.com>
parents:
43066
diff
changeset
|
288 | |
|
41867
5375c1d58c50
Create PurpleUi that merges PurpleCoreUiOps and PurpleUiInfo
Gary Kramlich <grim@reaperworld.com>
parents:
41847
diff
changeset
|
289 | PurpleUi * |
|
5375c1d58c50
Create PurpleUi that merges PurpleCoreUiOps and PurpleUiInfo
Gary Kramlich <grim@reaperworld.com>
parents:
41847
diff
changeset
|
290 | purple_core_get_ui(void) { |
|
5375c1d58c50
Create PurpleUi that merges PurpleCoreUiOps and PurpleUiInfo
Gary Kramlich <grim@reaperworld.com>
parents:
41847
diff
changeset
|
291 | return _core->ui; |
|
6179
4df73df94250
[gaim-migrate @ 6664]
Christian Hammond <chipx86@chipx86.com>
parents:
6168
diff
changeset
|
292 | } |
|
42473
c2cb3f628555
Update a bunch of gettext stuff
Gary Kramlich <grim@reaperworld.com>
parents:
42435
diff
changeset
|
293 | |
|
c2cb3f628555
Update a bunch of gettext stuff
Gary Kramlich <grim@reaperworld.com>
parents:
42435
diff
changeset
|
294 | const char * |
|
c2cb3f628555
Update a bunch of gettext stuff
Gary Kramlich <grim@reaperworld.com>
parents:
42435
diff
changeset
|
295 | purple_get_locale_dir(void) { |
|
c2cb3f628555
Update a bunch of gettext stuff
Gary Kramlich <grim@reaperworld.com>
parents:
42435
diff
changeset
|
296 | const char *locale_dir = NULL; |
|
c2cb3f628555
Update a bunch of gettext stuff
Gary Kramlich <grim@reaperworld.com>
parents:
42435
diff
changeset
|
297 | |
|
c2cb3f628555
Update a bunch of gettext stuff
Gary Kramlich <grim@reaperworld.com>
parents:
42435
diff
changeset
|
298 | locale_dir = g_getenv("PURPLE_LOCALE_DIR"); |
|
c2cb3f628555
Update a bunch of gettext stuff
Gary Kramlich <grim@reaperworld.com>
parents:
42435
diff
changeset
|
299 | if(!purple_strempty(locale_dir)) { |
|
c2cb3f628555
Update a bunch of gettext stuff
Gary Kramlich <grim@reaperworld.com>
parents:
42435
diff
changeset
|
300 | return locale_dir; |
|
c2cb3f628555
Update a bunch of gettext stuff
Gary Kramlich <grim@reaperworld.com>
parents:
42435
diff
changeset
|
301 | } |
|
c2cb3f628555
Update a bunch of gettext stuff
Gary Kramlich <grim@reaperworld.com>
parents:
42435
diff
changeset
|
302 | |
|
c2cb3f628555
Update a bunch of gettext stuff
Gary Kramlich <grim@reaperworld.com>
parents:
42435
diff
changeset
|
303 | #ifdef _WIN32 |
|
c2cb3f628555
Update a bunch of gettext stuff
Gary Kramlich <grim@reaperworld.com>
parents:
42435
diff
changeset
|
304 | return wpurple_locale_dir(); |
|
c2cb3f628555
Update a bunch of gettext stuff
Gary Kramlich <grim@reaperworld.com>
parents:
42435
diff
changeset
|
305 | #else |
|
c2cb3f628555
Update a bunch of gettext stuff
Gary Kramlich <grim@reaperworld.com>
parents:
42435
diff
changeset
|
306 | return PURPLE_LOCALEDIR; |
|
c2cb3f628555
Update a bunch of gettext stuff
Gary Kramlich <grim@reaperworld.com>
parents:
42435
diff
changeset
|
307 | #endif |
|
c2cb3f628555
Update a bunch of gettext stuff
Gary Kramlich <grim@reaperworld.com>
parents:
42435
diff
changeset
|
308 | } |