Sat, 29 Oct 2022 01:14:13 -0500
Convert PidginProxyPrefs to Adwaita 1.2
Testing Done:
Set all the values via the ui and the config file and tested bad values in the port in both as well. Bad values in the ui will store whatever atoi returned, but bad values in the config file will fallback to the default.
Reviewed at https://reviews.imfreedom.org/r/1996/
|
40730
12b38cca63d7
Create a new PidginCredentialsPage and associated widgets for the preferences window
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
1 | /* |
|
12b38cca63d7
Create a new PidginCredentialsPage and associated widgets for the preferences window
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
2 | * Pidgin - Internet Messenger |
|
12b38cca63d7
Create a new PidginCredentialsPage and associated widgets for the preferences window
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
3 | * Copyright (C) Pidgin Developers <devel@pidgin.im> |
|
12b38cca63d7
Create a new PidginCredentialsPage and associated widgets for the preferences window
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
4 | * |
|
12b38cca63d7
Create a new PidginCredentialsPage and associated widgets for the preferences window
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
5 | * Pidgin is the legal property of its developers, whose names are too numerous |
|
12b38cca63d7
Create a new PidginCredentialsPage and associated widgets for the preferences window
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
6 | * to list here. Please refer to the COPYRIGHT file distributed with this |
|
12b38cca63d7
Create a new PidginCredentialsPage and associated widgets for the preferences window
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
7 | * source distribution. |
|
12b38cca63d7
Create a new PidginCredentialsPage and associated widgets for the preferences window
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
8 | * |
|
12b38cca63d7
Create a new PidginCredentialsPage and associated widgets for the preferences window
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
9 | * This program is free software; you can redistribute it and/or modify |
|
12b38cca63d7
Create a new PidginCredentialsPage and associated widgets for the preferences window
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
10 | * it under the terms of the GNU General Public License as published by |
|
12b38cca63d7
Create a new PidginCredentialsPage and associated widgets for the preferences window
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
11 | * the Free Software Foundation; either version 2 of the License, or |
|
12b38cca63d7
Create a new PidginCredentialsPage and associated widgets for the preferences window
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
12 | * (at your option) any later version. |
|
12b38cca63d7
Create a new PidginCredentialsPage and associated widgets for the preferences window
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
13 | * |
|
12b38cca63d7
Create a new PidginCredentialsPage and associated widgets for the preferences window
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
14 | * This program is distributed in the hope that it will be useful, |
|
12b38cca63d7
Create a new PidginCredentialsPage and associated widgets for the preferences window
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12b38cca63d7
Create a new PidginCredentialsPage and associated widgets for the preferences window
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12b38cca63d7
Create a new PidginCredentialsPage and associated widgets for the preferences window
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
17 | * GNU General Public License for more details. |
|
12b38cca63d7
Create a new PidginCredentialsPage and associated widgets for the preferences window
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
18 | * |
|
12b38cca63d7
Create a new PidginCredentialsPage and associated widgets for the preferences window
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
19 | * You should have received a copy of the GNU General Public License |
|
12b38cca63d7
Create a new PidginCredentialsPage and associated widgets for the preferences window
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
20 | * along with this program; if not, see <https://www.gnu.org/licenses/>. |
|
12b38cca63d7
Create a new PidginCredentialsPage and associated widgets for the preferences window
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
21 | */ |
|
12b38cca63d7
Create a new PidginCredentialsPage and associated widgets for the preferences window
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
22 | |
|
12b38cca63d7
Create a new PidginCredentialsPage and associated widgets for the preferences window
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
23 | #if !defined(PIDGIN_GLOBAL_HEADER_INSIDE) && !defined(PIDGIN_COMPILATION) |
|
12b38cca63d7
Create a new PidginCredentialsPage and associated widgets for the preferences window
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
24 | # error "only <pidgin.h> may be included directly" |
|
12b38cca63d7
Create a new PidginCredentialsPage and associated widgets for the preferences window
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
25 | #endif |
|
12b38cca63d7
Create a new PidginCredentialsPage and associated widgets for the preferences window
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
26 | |
|
41375
e7f3a586b63f
Rename PidginCredentialsPage to PidginCredentialPrefs
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41197
diff
changeset
|
27 | #ifndef PIDGIN_CREDENTIAL_PREFS_H |
|
e7f3a586b63f
Rename PidginCredentialsPage to PidginCredentialPrefs
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41197
diff
changeset
|
28 | #define PIDGIN_CREDENTIAL_PREFS_H |
|
40730
12b38cca63d7
Create a new PidginCredentialsPage and associated widgets for the preferences window
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
29 | |
|
12b38cca63d7
Create a new PidginCredentialsPage and associated widgets for the preferences window
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
30 | #include <glib.h> |
|
12b38cca63d7
Create a new PidginCredentialsPage and associated widgets for the preferences window
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
31 | |
|
12b38cca63d7
Create a new PidginCredentialsPage and associated widgets for the preferences window
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
32 | #include <gtk/gtk.h> |
|
41520
a5dd595361b4
Replace libhandy with libadwaita
Gary Kramlich <grim@reaperworld.com>
parents:
41375
diff
changeset
|
33 | #include <adwaita.h> |
|
40730
12b38cca63d7
Create a new PidginCredentialsPage and associated widgets for the preferences window
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
34 | |
|
12b38cca63d7
Create a new PidginCredentialsPage and associated widgets for the preferences window
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
35 | G_BEGIN_DECLS |
|
12b38cca63d7
Create a new PidginCredentialsPage and associated widgets for the preferences window
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
36 | |
|
40878
7e8c50c967bc
Add some missed docs for PidginCredential*
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40873
diff
changeset
|
37 | /** |
|
41375
e7f3a586b63f
Rename PidginCredentialsPage to PidginCredentialPrefs
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41197
diff
changeset
|
38 | * PIDGIN_TYPE_CREDENTIAL_PREFS: |
|
40878
7e8c50c967bc
Add some missed docs for PidginCredential*
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40873
diff
changeset
|
39 | * |
|
41375
e7f3a586b63f
Rename PidginCredentialsPage to PidginCredentialPrefs
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41197
diff
changeset
|
40 | * The standard _get_type macro for #PidginCredentialPrefs. |
|
40878
7e8c50c967bc
Add some missed docs for PidginCredential*
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40873
diff
changeset
|
41 | * |
|
7e8c50c967bc
Add some missed docs for PidginCredential*
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40873
diff
changeset
|
42 | * Since: 3.0.0 |
|
7e8c50c967bc
Add some missed docs for PidginCredential*
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40873
diff
changeset
|
43 | */ |
|
41375
e7f3a586b63f
Rename PidginCredentialsPage to PidginCredentialPrefs
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41197
diff
changeset
|
44 | #define PIDGIN_TYPE_CREDENTIAL_PREFS (pidgin_credential_prefs_get_type()) |
|
e7f3a586b63f
Rename PidginCredentialsPage to PidginCredentialPrefs
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41197
diff
changeset
|
45 | G_DECLARE_FINAL_TYPE(PidginCredentialPrefs, pidgin_credential_prefs, |
|
41520
a5dd595361b4
Replace libhandy with libadwaita
Gary Kramlich <grim@reaperworld.com>
parents:
41375
diff
changeset
|
46 | PIDGIN, CREDENTIAL_PREFS, AdwPreferencesPage) |
|
40730
12b38cca63d7
Create a new PidginCredentialsPage and associated widgets for the preferences window
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
47 | |
|
12b38cca63d7
Create a new PidginCredentialsPage and associated widgets for the preferences window
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
48 | /** |
|
41375
e7f3a586b63f
Rename PidginCredentialsPage to PidginCredentialPrefs
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41197
diff
changeset
|
49 | * PidginCredentialPrefs: |
|
40878
7e8c50c967bc
Add some missed docs for PidginCredential*
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40873
diff
changeset
|
50 | * |
|
41375
e7f3a586b63f
Rename PidginCredentialsPage to PidginCredentialPrefs
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41197
diff
changeset
|
51 | * #PidginCredentialPrefs is a widget for the preferences window to let users |
|
41197
1fbba07f21cf
Remove unnecessary gtk-doc comments from pidgin
Gary Kramlich <grim@reaperworld.com>
parents:
40886
diff
changeset
|
52 | * choose and configure their credential provider. |
|
40878
7e8c50c967bc
Add some missed docs for PidginCredential*
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40873
diff
changeset
|
53 | * |
|
7e8c50c967bc
Add some missed docs for PidginCredential*
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40873
diff
changeset
|
54 | * Since: 3.0.0 |
|
7e8c50c967bc
Add some missed docs for PidginCredential*
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40873
diff
changeset
|
55 | */ |
|
7e8c50c967bc
Add some missed docs for PidginCredential*
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40873
diff
changeset
|
56 | |
|
7e8c50c967bc
Add some missed docs for PidginCredential*
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40873
diff
changeset
|
57 | /** |
|
41375
e7f3a586b63f
Rename PidginCredentialsPage to PidginCredentialPrefs
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41197
diff
changeset
|
58 | * pidgin_credential_prefs_new: |
|
40730
12b38cca63d7
Create a new PidginCredentialsPage and associated widgets for the preferences window
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
59 | * |
|
41375
e7f3a586b63f
Rename PidginCredentialsPage to PidginCredentialPrefs
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41197
diff
changeset
|
60 | * Creates a new #PidginCredentialPrefs instance. |
|
40730
12b38cca63d7
Create a new PidginCredentialsPage and associated widgets for the preferences window
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
61 | * |
|
41375
e7f3a586b63f
Rename PidginCredentialsPage to PidginCredentialPrefs
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41197
diff
changeset
|
62 | * Returns: (transfer full): The new #PidginCredentialPrefs instance. |
|
40878
7e8c50c967bc
Add some missed docs for PidginCredential*
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40873
diff
changeset
|
63 | * |
|
7e8c50c967bc
Add some missed docs for PidginCredential*
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40873
diff
changeset
|
64 | * Since: 3.0.0 |
|
40730
12b38cca63d7
Create a new PidginCredentialsPage and associated widgets for the preferences window
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
65 | */ |
|
41375
e7f3a586b63f
Rename PidginCredentialsPage to PidginCredentialPrefs
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41197
diff
changeset
|
66 | GtkWidget *pidgin_credential_prefs_new(void); |
|
40730
12b38cca63d7
Create a new PidginCredentialsPage and associated widgets for the preferences window
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
67 | |
|
12b38cca63d7
Create a new PidginCredentialsPage and associated widgets for the preferences window
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
68 | G_END_DECLS |
|
12b38cca63d7
Create a new PidginCredentialsPage and associated widgets for the preferences window
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
69 | |
|
41375
e7f3a586b63f
Rename PidginCredentialsPage to PidginCredentialPrefs
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41197
diff
changeset
|
70 | #endif /* PIDGIN_CREDENTIAL_PREFS_H */ |