Tue, 23 Aug 2022 00:24:39 -0500
Port gtkutils to GTK4
Also, delete some old types from previous cleanup.
This doesn't fix the icon functions. `GtkIconTheme` has changed quite a bit, and needs to know more about the widget that the icon is being placed on. This will require a larger refactor through everything to pass a widget or something. We could comment that out if you want.
Testing Done:
Compile only.
Reviewed at https://reviews.imfreedom.org/r/1625/
|
20330
650a7af9c238
remove gpl boilerplate from doxygen docs
Sean Egan <seanegan@pidgin.im>
parents:
19859
diff
changeset
|
1 | /* pidgin |
| 9791 | 2 | * |
| 15572 | 3 | * Pidgin is the legal property of its developers, whose names are too numerous |
| 9791 | 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:
19656
diff
changeset
|
19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
| 9791 | 20 | */ |
|
35487
494f09f7f331
Move section blocks inside inclusion guards -- otherwise g-ir-scanner yells
Ankit Vani <a@nevitus.org>
parents:
35451
diff
changeset
|
21 | |
|
40502
875489636847
pidgin.h phase3: create pidgin.h and force its usage
Gary Kramlich <grim@reaperworld.com>
parents:
40496
diff
changeset
|
22 | #if !defined(PIDGIN_GLOBAL_HEADER_INSIDE) && !defined(PIDGIN_COMPILATION) |
|
875489636847
pidgin.h phase3: create pidgin.h and force its usage
Gary Kramlich <grim@reaperworld.com>
parents:
40496
diff
changeset
|
23 | # error "only <pidgin.h> may be included directly" |
|
875489636847
pidgin.h phase3: create pidgin.h and force its usage
Gary Kramlich <grim@reaperworld.com>
parents:
40496
diff
changeset
|
24 | #endif |
|
875489636847
pidgin.h phase3: create pidgin.h and force its usage
Gary Kramlich <grim@reaperworld.com>
parents:
40496
diff
changeset
|
25 | |
|
40496
6941fece679b
phase2 of pidgin.h: move existing file to pidgincore.h
Gary Kramlich <grim@reaperworld.com>
parents:
40490
diff
changeset
|
26 | #ifndef PIDGIN_CORE_H |
|
6941fece679b
phase2 of pidgin.h: move existing file to pidgincore.h
Gary Kramlich <grim@reaperworld.com>
parents:
40490
diff
changeset
|
27 | #define PIDGIN_CORE_H |
|
35451
206524351826
Add sections for finch and re-arrange its doc index
Ankit Vani <a@nevitus.org>
parents:
35405
diff
changeset
|
28 | |
|
40496
6941fece679b
phase2 of pidgin.h: move existing file to pidgincore.h
Gary Kramlich <grim@reaperworld.com>
parents:
40490
diff
changeset
|
29 | #include <glib.h> |
|
20360
4cfcbb5dbf5e
Fix include ordering so GDK_WINDOWING_X11 is defined with older Gtk
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
20330
diff
changeset
|
30 | |
|
40553
892459990bb7
Create a proper GtkApplication subclass for Pidgin and use it.
Gary Kramlich <grim@reaperworld.com>
parents:
40502
diff
changeset
|
31 | #include <purple.h> |
|
892459990bb7
Create a proper GtkApplication subclass for Pidgin and use it.
Gary Kramlich <grim@reaperworld.com>
parents:
40502
diff
changeset
|
32 | |
|
14636
5306c329992c
[gaim-migrate @ 17298]
Daniel Atallah <datallah@pidgin.im>
parents:
14411
diff
changeset
|
33 | #ifdef _WIN32 |
|
35856
1777950ff49f
cross-win32: fix pidgin code warnings and errors
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35487
diff
changeset
|
34 | # include "win32/gtkwin32dep.h" |
|
14636
5306c329992c
[gaim-migrate @ 17298]
Daniel Atallah <datallah@pidgin.im>
parents:
14411
diff
changeset
|
35 | #endif |
|
5306c329992c
[gaim-migrate @ 17298]
Daniel Atallah <datallah@pidgin.im>
parents:
14411
diff
changeset
|
36 | |
| 10400 | 37 | /** |
|
35405
d3f9e6dad44b
Convert docs from doxygen to gtk-doc format for UI headers that change in .plugins
Ankit Vani <a@nevitus.org>
parents:
35387
diff
changeset
|
38 | * PIDGIN_UI: |
|
d3f9e6dad44b
Convert docs from doxygen to gtk-doc format for UI headers that change in .plugins
Ankit Vani <a@nevitus.org>
parents:
35387
diff
changeset
|
39 | * |
| 10400 | 40 | * Our UI's identifier. |
| 41 | */ | |
|
16117
dbded756c05d
Revert to internal UI name of gtk-gaim to preserve UI prefs on upgrade
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
15931
diff
changeset
|
42 | /* leave this as gtk-gaim until we have a decent way to migrate UI-prefs */ |
|
dbded756c05d
Revert to internal UI name of gtk-gaim to preserve UI prefs on upgrade
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
15931
diff
changeset
|
43 | #define PIDGIN_UI "gtk-gaim" |
| 10400 | 44 | |
|
16123
8b98683319e7
Rename /purple/gtk preferences back to /gaim/gtk to allow for smooth upgrades
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
16117
diff
changeset
|
45 | /* change this only when we have a sane upgrade path for old prefs */ |
|
16478
19107605c565
Works for me! Renames prefs: /core to /purple, /gaim/gtk to /pidgin, /gaim/gnt to /finch
Sean Egan <seanegan@pidgin.im>
parents:
16254
diff
changeset
|
46 | #define PIDGIN_PREFS_ROOT "/pidgin" |
|
16123
8b98683319e7
Rename /purple/gtk preferences back to /gaim/gtk to allow for smooth upgrades
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
16117
diff
changeset
|
47 | |
|
17001
09ceabd6b129
Clarify the comments on the names for translators.
Richard Laager <rlaager@pidgin.im>
parents:
16977
diff
changeset
|
48 | /* Translators may want to transliterate the name. |
|
09ceabd6b129
Clarify the comments on the names for translators.
Richard Laager <rlaager@pidgin.im>
parents:
16977
diff
changeset
|
49 | It is not to be translated. */ |
|
16977
c9cb49bea66d
Change the PIDGIN_NAME stuff to allow translators to transliterate the
Richard Laager <rlaager@pidgin.im>
parents:
16478
diff
changeset
|
50 | #define PIDGIN_NAME _("Pidgin") |
|
c9cb49bea66d
Change the PIDGIN_NAME stuff to allow translators to transliterate the
Richard Laager <rlaager@pidgin.im>
parents:
16478
diff
changeset
|
51 | |
|
40711
3ec3eae31fe4
Fix a number of issues with the pidgin api reference
Gary Kramlich <grim@reaperworld.com>
parents:
40553
diff
changeset
|
52 | /** |
|
3ec3eae31fe4
Fix a number of issues with the pidgin api reference
Gary Kramlich <grim@reaperworld.com>
parents:
40553
diff
changeset
|
53 | * PIDGIN_ALERT_TITLE: |
|
3ec3eae31fe4
Fix a number of issues with the pidgin api reference
Gary Kramlich <grim@reaperworld.com>
parents:
40553
diff
changeset
|
54 | * |
|
3ec3eae31fe4
Fix a number of issues with the pidgin api reference
Gary Kramlich <grim@reaperworld.com>
parents:
40553
diff
changeset
|
55 | * The title that should be used for alert dialogs. |
|
3ec3eae31fe4
Fix a number of issues with the pidgin api reference
Gary Kramlich <grim@reaperworld.com>
parents:
40553
diff
changeset
|
56 | */ |
| 9791 | 57 | #ifndef _WIN32 |
| 15882 | 58 | # define PIDGIN_ALERT_TITLE "" |
| 9791 | 59 | #else |
| 15882 | 60 | # define PIDGIN_ALERT_TITLE PIDGIN_NAME |
| 9791 | 61 | #endif |
| 62 | ||
|
35387
c516874b0d14
Prepare files for gtk-doc conversion.
Ankit Vani <a@nevitus.org>
parents:
33683
diff
changeset
|
63 | /** |
|
35405
d3f9e6dad44b
Convert docs from doxygen to gtk-doc format for UI headers that change in .plugins
Ankit Vani <a@nevitus.org>
parents:
35387
diff
changeset
|
64 | * pidgin_start: |
|
40711
3ec3eae31fe4
Fix a number of issues with the pidgin api reference
Gary Kramlich <grim@reaperworld.com>
parents:
40553
diff
changeset
|
65 | * @argc: The argc from main() (or 0 if argv is %NULL). |
|
3ec3eae31fe4
Fix a number of issues with the pidgin api reference
Gary Kramlich <grim@reaperworld.com>
parents:
40553
diff
changeset
|
66 | * @argv: The argv from main(), or %NULL. |
|
35405
d3f9e6dad44b
Convert docs from doxygen to gtk-doc format for UI headers that change in .plugins
Ankit Vani <a@nevitus.org>
parents:
35387
diff
changeset
|
67 | * |
|
35387
c516874b0d14
Prepare files for gtk-doc conversion.
Ankit Vani <a@nevitus.org>
parents:
33683
diff
changeset
|
68 | * Start pidgin with the given command line arguments. |
|
c516874b0d14
Prepare files for gtk-doc conversion.
Ankit Vani <a@nevitus.org>
parents:
33683
diff
changeset
|
69 | */ |
|
c516874b0d14
Prepare files for gtk-doc conversion.
Ankit Vani <a@nevitus.org>
parents:
33683
diff
changeset
|
70 | int pidgin_start(int argc, char *argv[]); |
|
c516874b0d14
Prepare files for gtk-doc conversion.
Ankit Vani <a@nevitus.org>
parents:
33683
diff
changeset
|
71 | |
|
40553
892459990bb7
Create a proper GtkApplication subclass for Pidgin and use it.
Gary Kramlich <grim@reaperworld.com>
parents:
40502
diff
changeset
|
72 | /** |
|
892459990bb7
Create a proper GtkApplication subclass for Pidgin and use it.
Gary Kramlich <grim@reaperworld.com>
parents:
40502
diff
changeset
|
73 | * pidgin_core_get_ui_ops: |
|
892459990bb7
Create a proper GtkApplication subclass for Pidgin and use it.
Gary Kramlich <grim@reaperworld.com>
parents:
40502
diff
changeset
|
74 | * |
|
892459990bb7
Create a proper GtkApplication subclass for Pidgin and use it.
Gary Kramlich <grim@reaperworld.com>
parents:
40502
diff
changeset
|
75 | * Gets the #PurpleCoreUiOps that Pidgin sets up. You probably don't want to |
|
892459990bb7
Create a proper GtkApplication subclass for Pidgin and use it.
Gary Kramlich <grim@reaperworld.com>
parents:
40502
diff
changeset
|
76 | * call this. |
|
892459990bb7
Create a proper GtkApplication subclass for Pidgin and use it.
Gary Kramlich <grim@reaperworld.com>
parents:
40502
diff
changeset
|
77 | * |
|
892459990bb7
Create a proper GtkApplication subclass for Pidgin and use it.
Gary Kramlich <grim@reaperworld.com>
parents:
40502
diff
changeset
|
78 | * Returns: The #PurpleCoreUiOps for Pidgin. |
|
892459990bb7
Create a proper GtkApplication subclass for Pidgin and use it.
Gary Kramlich <grim@reaperworld.com>
parents:
40502
diff
changeset
|
79 | * |
|
892459990bb7
Create a proper GtkApplication subclass for Pidgin and use it.
Gary Kramlich <grim@reaperworld.com>
parents:
40502
diff
changeset
|
80 | * Since: 3.0.0 |
|
892459990bb7
Create a proper GtkApplication subclass for Pidgin and use it.
Gary Kramlich <grim@reaperworld.com>
parents:
40502
diff
changeset
|
81 | */ |
|
892459990bb7
Create a proper GtkApplication subclass for Pidgin and use it.
Gary Kramlich <grim@reaperworld.com>
parents:
40502
diff
changeset
|
82 | PurpleCoreUiOps *pidgin_core_get_ui_ops(void); |
|
892459990bb7
Create a proper GtkApplication subclass for Pidgin and use it.
Gary Kramlich <grim@reaperworld.com>
parents:
40502
diff
changeset
|
83 | |
|
40496
6941fece679b
phase2 of pidgin.h: move existing file to pidgincore.h
Gary Kramlich <grim@reaperworld.com>
parents:
40490
diff
changeset
|
84 | #endif /* PIDGIN_CORE_H */ |
| 9791 | 85 |