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/
|
41371
fe57d9ddc7ce
Split conversation/interface prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
1 | /* |
|
fe57d9ddc7ce
Split conversation/interface prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
2 | * Pidgin - Internet Messenger |
|
fe57d9ddc7ce
Split conversation/interface prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
3 | * Copyright (C) Pidgin Developers <devel@pidgin.im> |
|
fe57d9ddc7ce
Split conversation/interface prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
4 | * |
|
fe57d9ddc7ce
Split conversation/interface prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
5 | * Pidgin is the legal property of its developers, whose names are too numerous |
|
fe57d9ddc7ce
Split conversation/interface prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
6 | * to list here. Please refer to the COPYRIGHT file distributed with this |
|
fe57d9ddc7ce
Split conversation/interface prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
7 | * source distribution. |
|
fe57d9ddc7ce
Split conversation/interface prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
8 | * |
|
fe57d9ddc7ce
Split conversation/interface prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
9 | * This program is free software; you can redistribute it and/or modify |
|
fe57d9ddc7ce
Split conversation/interface prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
10 | * it under the terms of the GNU General Public License as published by |
|
fe57d9ddc7ce
Split conversation/interface prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
11 | * the Free Software Foundation; either version 2 of the License, or |
|
fe57d9ddc7ce
Split conversation/interface prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
12 | * (at your option) any later version. |
|
fe57d9ddc7ce
Split conversation/interface prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
13 | * |
|
fe57d9ddc7ce
Split conversation/interface prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
14 | * This program is distributed in the hope that it will be useful, |
|
fe57d9ddc7ce
Split conversation/interface prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
fe57d9ddc7ce
Split conversation/interface prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
fe57d9ddc7ce
Split conversation/interface prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
17 | * GNU General Public License for more details. |
|
fe57d9ddc7ce
Split conversation/interface prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
18 | * |
|
fe57d9ddc7ce
Split conversation/interface prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
19 | * You should have received a copy of the GNU General Public License |
|
fe57d9ddc7ce
Split conversation/interface prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
20 | * along with this program; if not, see <https://www.gnu.org/licenses/>. |
|
fe57d9ddc7ce
Split conversation/interface prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
21 | */ |
|
fe57d9ddc7ce
Split conversation/interface prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
22 | |
|
fe57d9ddc7ce
Split conversation/interface prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
23 | #if !defined(PIDGIN_GLOBAL_HEADER_INSIDE) && !defined(PIDGIN_COMPILATION) |
|
fe57d9ddc7ce
Split conversation/interface prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
24 | # error "only <pidgin.h> may be included directly" |
|
fe57d9ddc7ce
Split conversation/interface prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
25 | #endif |
|
fe57d9ddc7ce
Split conversation/interface prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
26 | |
|
fe57d9ddc7ce
Split conversation/interface prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
27 | #ifndef PIDGIN_CONVERSATION_PREFS_H |
|
fe57d9ddc7ce
Split conversation/interface prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
28 | #define PIDGIN_CONVERSATION_PREFS_H |
|
fe57d9ddc7ce
Split conversation/interface prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
29 | |
|
fe57d9ddc7ce
Split conversation/interface prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
30 | #include <glib.h> |
|
fe57d9ddc7ce
Split conversation/interface prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
31 | |
|
fe57d9ddc7ce
Split conversation/interface prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
32 | #include <gtk/gtk.h> |
|
41551
865be7af93d6
Convert conversation prefs to GTK4
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41371
diff
changeset
|
33 | #include <adwaita.h> |
|
41371
fe57d9ddc7ce
Split conversation/interface prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
34 | |
|
fe57d9ddc7ce
Split conversation/interface prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
35 | G_BEGIN_DECLS |
|
fe57d9ddc7ce
Split conversation/interface prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
36 | |
|
fe57d9ddc7ce
Split conversation/interface prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
37 | /** |
|
fe57d9ddc7ce
Split conversation/interface prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
38 | * PidginConversationPrefs: |
|
fe57d9ddc7ce
Split conversation/interface prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
39 | * |
|
fe57d9ddc7ce
Split conversation/interface prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
40 | * #PidginConversationPrefs is a widget for the preferences window to let users |
|
fe57d9ddc7ce
Split conversation/interface prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
41 | * choose and configure their conversation settings. |
|
fe57d9ddc7ce
Split conversation/interface prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
42 | * |
|
fe57d9ddc7ce
Split conversation/interface prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
43 | * Since: 3.0.0 |
|
fe57d9ddc7ce
Split conversation/interface prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
44 | */ |
|
fe57d9ddc7ce
Split conversation/interface prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
45 | #define PIDGIN_TYPE_CONVERSATION_PREFS (pidgin_conversation_prefs_get_type()) |
|
fe57d9ddc7ce
Split conversation/interface prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
46 | G_DECLARE_FINAL_TYPE(PidginConversationPrefs, pidgin_conversation_prefs, |
|
41551
865be7af93d6
Convert conversation prefs to GTK4
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41371
diff
changeset
|
47 | PIDGIN, CONVERSATION_PREFS, AdwPreferencesPage) |
|
41371
fe57d9ddc7ce
Split conversation/interface prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
48 | |
|
fe57d9ddc7ce
Split conversation/interface prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
49 | /** |
|
fe57d9ddc7ce
Split conversation/interface prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
50 | * pidgin_conversation_prefs_new: |
|
fe57d9ddc7ce
Split conversation/interface prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
51 | * |
|
fe57d9ddc7ce
Split conversation/interface prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
52 | * Creates a new #PidginConversationPrefs instance. |
|
fe57d9ddc7ce
Split conversation/interface prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
53 | * |
|
fe57d9ddc7ce
Split conversation/interface prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
54 | * Returns: (transfer full): The new #PidginConversationPrefs instance. |
|
fe57d9ddc7ce
Split conversation/interface prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
55 | * |
|
fe57d9ddc7ce
Split conversation/interface prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
56 | * Since: 3.0.0 |
|
fe57d9ddc7ce
Split conversation/interface prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
57 | */ |
|
fe57d9ddc7ce
Split conversation/interface prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
58 | GtkWidget *pidgin_conversation_prefs_new(void); |
|
fe57d9ddc7ce
Split conversation/interface prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
59 | |
|
fe57d9ddc7ce
Split conversation/interface prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
60 | G_END_DECLS |
|
fe57d9ddc7ce
Split conversation/interface prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
61 | |
|
fe57d9ddc7ce
Split conversation/interface prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
diff
changeset
|
62 | #endif /* PIDGIN_CONVERSATION_PREFS_H */ |