Tue, 15 Oct 2024 00:47:42 -0500
Port prefs to AdwSwitchRow
Now that we depend on Adwaita 1.4, we can flip the switch on using these (pun intended).
This also simplifies some extra tracking we needed to do for activations and focus, since the Adwaita widgets do that for us.
Testing Done:
Opened prefs, confirmed all the switches were there, and toggled them all without any warnings.
Also used the mnemonics to toggle the switches from the keyboard.
Reviewed at https://reviews.imfreedom.org/r/3582/
|
40727
9389ba16cf40
Rename options.[ch] to purpleoptions.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40474
diff
changeset
|
1 | /* |
|
9389ba16cf40
Rename options.[ch] to purpleoptions.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40474
diff
changeset
|
2 | * Purple - Internet Messaging Library |
|
9389ba16cf40
Rename options.[ch] to purpleoptions.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40474
diff
changeset
|
3 | * Copyright (C) Pidgin Developers <devel@pidgin.im> |
|
38802
afb1c8302e49
The start of the libpurple option group
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
4 | * |
|
afb1c8302e49
The start of the libpurple option group
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
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:
42391
diff
changeset
|
6 | * to list here. Please refer to the COPYRIGHT file distributed with this |
|
38802
afb1c8302e49
The start of the libpurple option group
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
7 | * source distribution. |
|
afb1c8302e49
The start of the libpurple option group
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
8 | * |
|
42594
eddde70cedd8
Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents:
42391
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:
42391
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:
42391
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:
42391
diff
changeset
|
12 | * any later version. |
|
38802
afb1c8302e49
The start of the libpurple option group
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
13 | * |
|
42594
eddde70cedd8
Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents:
42391
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:
42391
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:
42391
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:
42391
diff
changeset
|
17 | * more details. |
|
38802
afb1c8302e49
The start of the libpurple option group
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
18 | * |
|
42594
eddde70cedd8
Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents:
42391
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:
42391
diff
changeset
|
20 | * this library; if not, see <https://www.gnu.org/licenses/>. |
|
38802
afb1c8302e49
The start of the libpurple option group
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
21 | */ |
|
afb1c8302e49
The start of the libpurple option group
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
22 | |
|
40474
1341be8e3402
Make it so only libpurple can directly include libpurple header files.
Gary Kramlich <grim@reaperworld.com>
parents:
38805
diff
changeset
|
23 | #if !defined(PURPLE_GLOBAL_HEADER_INSIDE) && !defined(PURPLE_COMPILATION) |
|
1341be8e3402
Make it so only libpurple can directly include libpurple header files.
Gary Kramlich <grim@reaperworld.com>
parents:
38805
diff
changeset
|
24 | # error "only <purple.h> may be included directly" |
|
1341be8e3402
Make it so only libpurple can directly include libpurple header files.
Gary Kramlich <grim@reaperworld.com>
parents:
38805
diff
changeset
|
25 | #endif |
|
1341be8e3402
Make it so only libpurple can directly include libpurple header files.
Gary Kramlich <grim@reaperworld.com>
parents:
38805
diff
changeset
|
26 | |
|
38802
afb1c8302e49
The start of the libpurple option group
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
27 | #ifndef PURPLE_OPTIONS_H |
|
afb1c8302e49
The start of the libpurple option group
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
28 | #define PURPLE_OPTIONS_H |
|
afb1c8302e49
The start of the libpurple option group
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
29 | |
|
afb1c8302e49
The start of the libpurple option group
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
30 | #include <glib.h> |
|
afb1c8302e49
The start of the libpurple option group
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
31 | |
|
42391
090b03385984
Add Since and symbol visibility to new-in-3.0 things
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41205
diff
changeset
|
32 | #include "purpleversion.h" |
|
090b03385984
Add Since and symbol visibility to new-in-3.0 things
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41205
diff
changeset
|
33 | |
|
38802
afb1c8302e49
The start of the libpurple option group
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
34 | G_BEGIN_DECLS |
|
afb1c8302e49
The start of the libpurple option group
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
35 | |
|
40727
9389ba16cf40
Rename options.[ch] to purpleoptions.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40474
diff
changeset
|
36 | /** |
|
9389ba16cf40
Rename options.[ch] to purpleoptions.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40474
diff
changeset
|
37 | * purple_get_option_group: |
|
9389ba16cf40
Rename options.[ch] to purpleoptions.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40474
diff
changeset
|
38 | * |
|
9389ba16cf40
Rename options.[ch] to purpleoptions.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40474
diff
changeset
|
39 | * Returns a #GOptionGroup for the commandline arguments recognized by |
|
9389ba16cf40
Rename options.[ch] to purpleoptions.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40474
diff
changeset
|
40 | * LibPurple. You should add this option group to your #GOptionContext with |
|
9389ba16cf40
Rename options.[ch] to purpleoptions.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40474
diff
changeset
|
41 | * g_option_context_add_group(), if you are using g_option_context_parse() to |
|
9389ba16cf40
Rename options.[ch] to purpleoptions.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40474
diff
changeset
|
42 | * parse your commandline arguments. |
|
9389ba16cf40
Rename options.[ch] to purpleoptions.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40474
diff
changeset
|
43 | * |
|
9389ba16cf40
Rename options.[ch] to purpleoptions.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40474
diff
changeset
|
44 | * Returns: (transfer full): a #GOptionGroup for the commandline arguments |
|
9389ba16cf40
Rename options.[ch] to purpleoptions.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40474
diff
changeset
|
45 | * recognized by LibPurple. |
|
42391
090b03385984
Add Since and symbol visibility to new-in-3.0 things
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41205
diff
changeset
|
46 | * |
|
42614
b75a5bbf6c35
Remove the micro version from since tags for libpurple part 3
Gary Kramlich <grim@reaperworld.com>
parents:
42594
diff
changeset
|
47 | * Since: 3.0 |
|
40727
9389ba16cf40
Rename options.[ch] to purpleoptions.[ch]
Gary Kramlich <grim@reaperworld.com>
parents:
40474
diff
changeset
|
48 | */ |
|
42391
090b03385984
Add Since and symbol visibility to new-in-3.0 things
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41205
diff
changeset
|
49 | PURPLE_AVAILABLE_IN_3_0 |
|
38802
afb1c8302e49
The start of the libpurple option group
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
50 | GOptionGroup *purple_get_option_group(void); |
|
afb1c8302e49
The start of the libpurple option group
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
51 | |
|
afb1c8302e49
The start of the libpurple option group
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
52 | G_END_DECLS |
|
afb1c8302e49
The start of the libpurple option group
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
53 | |
|
afb1c8302e49
The start of the libpurple option group
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
54 | #endif /* PURPLE_OPTIONS_H */ |