Mon, 16 Oct 2023 22:26:58 -0500
Update to the latest hasl to fix our FreeBSD builds
Testing Done:
Compiled
Reviewed at https://reviews.imfreedom.org/r/2661/
|
41397
91e5ee47f5a1
Cleanup pidgin prefs
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41394
diff
changeset
|
1 | /* |
|
91e5ee47f5a1
Cleanup pidgin prefs
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41394
diff
changeset
|
2 | * Pidgin - Internet Messenger |
|
91e5ee47f5a1
Cleanup pidgin prefs
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41394
diff
changeset
|
3 | * Copyright (C) Pidgin Developers <devel@pidgin.im> |
|
22419
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
4 | * |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
5 | * Pidgin is the legal property of its developers, whose names are too numerous |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
6 | * to list here. Please refer to the COPYRIGHT file distributed with this |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
7 | * source distribution. |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
8 | * |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
9 | * This program is free software; you can redistribute it and/or modify |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
10 | * it under the terms of the GNU General Public License as published by |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
11 | * the Free Software Foundation; either version 2 of the License, or |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
12 | * (at your option) any later version. |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
13 | * |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
14 | * This program is distributed in the hope that it will be useful, |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
17 | * GNU General Public License for more details. |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
18 | * |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
19 | * You should have received a copy of the GNU General Public License |
|
41397
91e5ee47f5a1
Cleanup pidgin prefs
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41394
diff
changeset
|
20 | * along with this program; if not, see <https://www.gnu.org/licenses/>. |
|
22419
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
21 | */ |
|
40439
e9838d634d5e
Make sure that internal.h can only be included by libpurple and split out some pieces to purpleprivate.h
Gary Kramlich <grim@reaperworld.com>
parents:
40350
diff
changeset
|
22 | |
|
e9838d634d5e
Make sure that internal.h can only be included by libpurple and split out some pieces to purpleprivate.h
Gary Kramlich <grim@reaperworld.com>
parents:
40350
diff
changeset
|
23 | #ifdef HAVE_CONFIG_H |
|
e9838d634d5e
Make sure that internal.h can only be included by libpurple and split out some pieces to purpleprivate.h
Gary Kramlich <grim@reaperworld.com>
parents:
40350
diff
changeset
|
24 | # include <config.h> |
|
e9838d634d5e
Make sure that internal.h can only be included by libpurple and split out some pieces to purpleprivate.h
Gary Kramlich <grim@reaperworld.com>
parents:
40350
diff
changeset
|
25 | #endif |
|
e9838d634d5e
Make sure that internal.h can only be included by libpurple and split out some pieces to purpleprivate.h
Gary Kramlich <grim@reaperworld.com>
parents:
40350
diff
changeset
|
26 | |
|
40462
24ed25d87550
Fix some issues on macos that resulted from the internal.h cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
40439
diff
changeset
|
27 | #include <errno.h> |
|
24ed25d87550
Fix some issues on macos that resulted from the internal.h cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
40439
diff
changeset
|
28 | #include <math.h> |
|
24ed25d87550
Fix some issues on macos that resulted from the internal.h cleanup
Gary Kramlich <grim@reaperworld.com>
parents:
40439
diff
changeset
|
29 | |
|
40439
e9838d634d5e
Make sure that internal.h can only be included by libpurple and split out some pieces to purpleprivate.h
Gary Kramlich <grim@reaperworld.com>
parents:
40350
diff
changeset
|
30 | #include <glib/gi18n-lib.h> |
|
e9838d634d5e
Make sure that internal.h can only be included by libpurple and split out some pieces to purpleprivate.h
Gary Kramlich <grim@reaperworld.com>
parents:
40350
diff
changeset
|
31 | #include <glib/gstdio.h> |
|
39264
8a7a775de597
Initial work moving gtkprefs to talkatu
Gary Kramlich <grim@reaperworld.com>
parents:
39189
diff
changeset
|
32 | |
|
40350
72271baf92bc
Split PurpleKeyValuePair out to it's own file and try to do some cleanup in the files that need to include it.
Gary Kramlich <grim@reaperworld.com>
parents:
40333
diff
changeset
|
33 | #include <purple.h> |
|
22419
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
34 | |
|
41397
91e5ee47f5a1
Cleanup pidgin prefs
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41394
diff
changeset
|
35 | #include "pidginprefs.h" |
|
91e5ee47f5a1
Cleanup pidgin prefs
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41394
diff
changeset
|
36 | #include "pidginprefsinternal.h" |
|
22419
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
37 | #include "gtkutils.h" |
|
40496
6941fece679b
phase2 of pidgin.h: move existing file to pidgincore.h
Gary Kramlich <grim@reaperworld.com>
parents:
40490
diff
changeset
|
38 | #include "pidgincore.h" |
|
41394
1327e58acce3
Split VV prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41390
diff
changeset
|
39 | #include "pidginvvprefs.h" |
|
34225
3bba206f27f6
HTTP: migrate purple_util_fetch_url to new API for Pidgin UI
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
34208
diff
changeset
|
40 | |
|
39178
53a96425ffc0
Start switching Preferences dialog to Glade.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39177
diff
changeset
|
41 | struct _PidginPrefsWindow { |
|
53a96425ffc0
Start switching Preferences dialog to Glade.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39177
diff
changeset
|
42 | GtkDialog parent; |
|
53a96425ffc0
Start switching Preferences dialog to Glade.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39177
diff
changeset
|
43 | }; |
|
53a96425ffc0
Start switching Preferences dialog to Glade.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39177
diff
changeset
|
44 | |
|
53a96425ffc0
Start switching Preferences dialog to Glade.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39177
diff
changeset
|
45 | G_DEFINE_TYPE(PidginPrefsWindow, pidgin_prefs_window, GTK_TYPE_DIALOG); |
|
22419
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
46 | |
|
41397
91e5ee47f5a1
Cleanup pidgin prefs
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41394
diff
changeset
|
47 | /****************************************************************************** |
|
91e5ee47f5a1
Cleanup pidgin prefs
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41394
diff
changeset
|
48 | * Helpers |
|
91e5ee47f5a1
Cleanup pidgin prefs
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41394
diff
changeset
|
49 | *****************************************************************************/ |
|
22419
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
50 | static void |
|
41947
7b3312d0760c
Bump C standard to C99 for Pidgin files and fix warnings
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41653
diff
changeset
|
51 | update_spin_value(G_GNUC_UNUSED GtkWidget *w, GtkWidget *spin) |
|
22419
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
52 | { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
53 | const char *key = g_object_get_data(G_OBJECT(spin), "val"); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
54 | int value; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
55 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
56 | value = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(spin)); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
57 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
58 | purple_prefs_set_int(key, value); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
59 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
60 | |
|
41366
789f96848a43
Expose prefs binding functions internally
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41319
diff
changeset
|
61 | void |
|
39181
f0cd633d86d4
prefs: Add binding versions of pref widget functions.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39180
diff
changeset
|
62 | pidgin_prefs_bind_spin_button(const char *key, GtkWidget *spin) |
|
f0cd633d86d4
prefs: Add binding versions of pref widget functions.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39180
diff
changeset
|
63 | { |
|
f0cd633d86d4
prefs: Add binding versions of pref widget functions.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39180
diff
changeset
|
64 | GtkAdjustment *adjust; |
|
f0cd633d86d4
prefs: Add binding versions of pref widget functions.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39180
diff
changeset
|
65 | int val; |
|
f0cd633d86d4
prefs: Add binding versions of pref widget functions.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39180
diff
changeset
|
66 | |
|
f0cd633d86d4
prefs: Add binding versions of pref widget functions.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39180
diff
changeset
|
67 | val = purple_prefs_get_int(key); |
|
f0cd633d86d4
prefs: Add binding versions of pref widget functions.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39180
diff
changeset
|
68 | |
|
f0cd633d86d4
prefs: Add binding versions of pref widget functions.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39180
diff
changeset
|
69 | adjust = gtk_spin_button_get_adjustment(GTK_SPIN_BUTTON(spin)); |
|
f0cd633d86d4
prefs: Add binding versions of pref widget functions.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39180
diff
changeset
|
70 | gtk_adjustment_set_value(adjust, val); |
|
f0cd633d86d4
prefs: Add binding versions of pref widget functions.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39180
diff
changeset
|
71 | g_object_set_data(G_OBJECT(spin), "val", (char *)key); |
|
f0cd633d86d4
prefs: Add binding versions of pref widget functions.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39180
diff
changeset
|
72 | g_signal_connect(G_OBJECT(adjust), "value-changed", |
|
f0cd633d86d4
prefs: Add binding versions of pref widget functions.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39180
diff
changeset
|
73 | G_CALLBACK(update_spin_value), GTK_WIDGET(spin)); |
|
f0cd633d86d4
prefs: Add binding versions of pref widget functions.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39180
diff
changeset
|
74 | } |
|
f0cd633d86d4
prefs: Add binding versions of pref widget functions.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39180
diff
changeset
|
75 | |
|
f0cd633d86d4
prefs: Add binding versions of pref widget functions.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39180
diff
changeset
|
76 | static void |
|
27493
96dc1b8abdf9
You should check the indenting before a copy & paste...
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
27451
diff
changeset
|
77 | entry_set(GtkEntry *entry, gpointer data) |
|
96dc1b8abdf9
You should check the indenting before a copy & paste...
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
27451
diff
changeset
|
78 | { |
|
22419
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
79 | const char *key = (const char*)data; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
80 | |
|
41531
2b86501d13fe
Replace gtk_entry_[gs]et_text with gtk_editable_[gs]et_text
Gary Kramlich <grim@reaperworld.com>
parents:
41490
diff
changeset
|
81 | purple_prefs_set_string(key, gtk_editable_get_text(GTK_EDITABLE(entry))); |
|
22419
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
82 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
83 | |
|
41366
789f96848a43
Expose prefs binding functions internally
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41319
diff
changeset
|
84 | void |
|
39181
f0cd633d86d4
prefs: Add binding versions of pref widget functions.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39180
diff
changeset
|
85 | pidgin_prefs_bind_entry(const char *key, GtkWidget *entry) |
|
f0cd633d86d4
prefs: Add binding versions of pref widget functions.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39180
diff
changeset
|
86 | { |
|
f0cd633d86d4
prefs: Add binding versions of pref widget functions.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39180
diff
changeset
|
87 | const gchar *value; |
|
f0cd633d86d4
prefs: Add binding versions of pref widget functions.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39180
diff
changeset
|
88 | |
|
f0cd633d86d4
prefs: Add binding versions of pref widget functions.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39180
diff
changeset
|
89 | value = purple_prefs_get_string(key); |
|
f0cd633d86d4
prefs: Add binding versions of pref widget functions.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39180
diff
changeset
|
90 | |
|
41531
2b86501d13fe
Replace gtk_entry_[gs]et_text with gtk_editable_[gs]et_text
Gary Kramlich <grim@reaperworld.com>
parents:
41490
diff
changeset
|
91 | gtk_editable_set_text(GTK_EDITABLE(entry), value); |
|
39181
f0cd633d86d4
prefs: Add binding versions of pref widget functions.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39180
diff
changeset
|
92 | g_signal_connect(G_OBJECT(entry), "changed", G_CALLBACK(entry_set), |
|
f0cd633d86d4
prefs: Add binding versions of pref widget functions.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39180
diff
changeset
|
93 | (char*)key); |
|
f0cd633d86d4
prefs: Add binding versions of pref widget functions.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39180
diff
changeset
|
94 | } |
|
f0cd633d86d4
prefs: Add binding versions of pref widget functions.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39180
diff
changeset
|
95 | |
|
22419
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
96 | static void |
|
41653
0a37c380d760
Port proxy type chooser to an AdwComboRow
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41620
diff
changeset
|
97 | bind_combo_row_set(GObject *obj, G_GNUC_UNUSED GParamSpec *pspec, |
|
0a37c380d760
Port proxy type chooser to an AdwComboRow
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41620
diff
changeset
|
98 | gpointer data) |
|
0a37c380d760
Port proxy type chooser to an AdwComboRow
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41620
diff
changeset
|
99 | { |
|
0a37c380d760
Port proxy type chooser to an AdwComboRow
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41620
diff
changeset
|
100 | const gchar *key = data; |
|
0a37c380d760
Port proxy type chooser to an AdwComboRow
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41620
diff
changeset
|
101 | GtkStringObject *item = NULL; |
|
0a37c380d760
Port proxy type chooser to an AdwComboRow
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41620
diff
changeset
|
102 | const gchar *value = NULL; |
|
0a37c380d760
Port proxy type chooser to an AdwComboRow
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41620
diff
changeset
|
103 | |
|
0a37c380d760
Port proxy type chooser to an AdwComboRow
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41620
diff
changeset
|
104 | item = adw_combo_row_get_selected_item(ADW_COMBO_ROW(obj)); |
|
0a37c380d760
Port proxy type chooser to an AdwComboRow
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41620
diff
changeset
|
105 | value = gtk_string_object_get_string(item); |
|
0a37c380d760
Port proxy type chooser to an AdwComboRow
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41620
diff
changeset
|
106 | purple_prefs_set_string(key, value); |
|
0a37c380d760
Port proxy type chooser to an AdwComboRow
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41620
diff
changeset
|
107 | } |
|
0a37c380d760
Port proxy type chooser to an AdwComboRow
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41620
diff
changeset
|
108 | |
|
0a37c380d760
Port proxy type chooser to an AdwComboRow
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41620
diff
changeset
|
109 | void |
|
0a37c380d760
Port proxy type chooser to an AdwComboRow
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41620
diff
changeset
|
110 | pidgin_prefs_bind_combo_row(const gchar *key, GtkWidget *widget) { |
|
42179
b8bb444799a4
Fix leaks from g_list_model_get_item
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42072
diff
changeset
|
111 | GtkStringList *model = NULL; |
|
41653
0a37c380d760
Port proxy type chooser to an AdwComboRow
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41620
diff
changeset
|
112 | const char *pref_value = NULL; |
|
0a37c380d760
Port proxy type chooser to an AdwComboRow
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41620
diff
changeset
|
113 | guint selected = GTK_INVALID_LIST_POSITION; |
|
0a37c380d760
Port proxy type chooser to an AdwComboRow
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41620
diff
changeset
|
114 | |
|
0a37c380d760
Port proxy type chooser to an AdwComboRow
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41620
diff
changeset
|
115 | pref_value = purple_prefs_get_string(key); |
|
42179
b8bb444799a4
Fix leaks from g_list_model_get_item
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42072
diff
changeset
|
116 | model = GTK_STRING_LIST(adw_combo_row_get_model(ADW_COMBO_ROW(widget))); |
|
41653
0a37c380d760
Port proxy type chooser to an AdwComboRow
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41620
diff
changeset
|
117 | |
|
42179
b8bb444799a4
Fix leaks from g_list_model_get_item
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42072
diff
changeset
|
118 | for(guint i = 0; i < g_list_model_get_n_items(G_LIST_MODEL(model)); i++) { |
|
b8bb444799a4
Fix leaks from g_list_model_get_item
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42072
diff
changeset
|
119 | const char *value = gtk_string_list_get_string(model, i); |
|
41653
0a37c380d760
Port proxy type chooser to an AdwComboRow
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41620
diff
changeset
|
120 | |
|
0a37c380d760
Port proxy type chooser to an AdwComboRow
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41620
diff
changeset
|
121 | if (purple_strequal(pref_value, value)) { |
|
0a37c380d760
Port proxy type chooser to an AdwComboRow
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41620
diff
changeset
|
122 | selected = i; |
|
0a37c380d760
Port proxy type chooser to an AdwComboRow
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41620
diff
changeset
|
123 | break; |
|
0a37c380d760
Port proxy type chooser to an AdwComboRow
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41620
diff
changeset
|
124 | } |
|
0a37c380d760
Port proxy type chooser to an AdwComboRow
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41620
diff
changeset
|
125 | } |
|
0a37c380d760
Port proxy type chooser to an AdwComboRow
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41620
diff
changeset
|
126 | |
|
0a37c380d760
Port proxy type chooser to an AdwComboRow
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41620
diff
changeset
|
127 | adw_combo_row_set_selected(ADW_COMBO_ROW(widget), selected); |
|
0a37c380d760
Port proxy type chooser to an AdwComboRow
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41620
diff
changeset
|
128 | |
|
0a37c380d760
Port proxy type chooser to an AdwComboRow
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41620
diff
changeset
|
129 | g_signal_connect(widget, "notify::selected", |
|
0a37c380d760
Port proxy type chooser to an AdwComboRow
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41620
diff
changeset
|
130 | G_CALLBACK(bind_combo_row_set), (gpointer)key); |
|
0a37c380d760
Port proxy type chooser to an AdwComboRow
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41620
diff
changeset
|
131 | } |
|
0a37c380d760
Port proxy type chooser to an AdwComboRow
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41620
diff
changeset
|
132 | |
|
0a37c380d760
Port proxy type chooser to an AdwComboRow
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41620
diff
changeset
|
133 | static void |
|
39180
17bacc12c28f
prefs: Move pidgin_prefs_checkbox earlier.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39179
diff
changeset
|
134 | set_bool_pref(GtkWidget *w, const char *key) |
|
17bacc12c28f
prefs: Move pidgin_prefs_checkbox earlier.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39179
diff
changeset
|
135 | { |
|
17bacc12c28f
prefs: Move pidgin_prefs_checkbox earlier.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39179
diff
changeset
|
136 | purple_prefs_set_bool(key, |
|
41581
732b1fcb8e31
Fix prefs on GTK4
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41553
diff
changeset
|
137 | gtk_check_button_get_active(GTK_CHECK_BUTTON(w))); |
|
39180
17bacc12c28f
prefs: Move pidgin_prefs_checkbox earlier.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39179
diff
changeset
|
138 | } |
|
17bacc12c28f
prefs: Move pidgin_prefs_checkbox earlier.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39179
diff
changeset
|
139 | |
|
41366
789f96848a43
Expose prefs binding functions internally
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41319
diff
changeset
|
140 | void |
|
39181
f0cd633d86d4
prefs: Add binding versions of pref widget functions.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39180
diff
changeset
|
141 | pidgin_prefs_bind_checkbox(const char *key, GtkWidget *button) |
|
f0cd633d86d4
prefs: Add binding versions of pref widget functions.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39180
diff
changeset
|
142 | { |
|
41581
732b1fcb8e31
Fix prefs on GTK4
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41553
diff
changeset
|
143 | gtk_check_button_set_active(GTK_CHECK_BUTTON(button), |
|
39181
f0cd633d86d4
prefs: Add binding versions of pref widget functions.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39180
diff
changeset
|
144 | purple_prefs_get_bool(key)); |
|
f0cd633d86d4
prefs: Add binding versions of pref widget functions.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39180
diff
changeset
|
145 | g_signal_connect(G_OBJECT(button), "toggled", |
|
f0cd633d86d4
prefs: Add binding versions of pref widget functions.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39180
diff
changeset
|
146 | G_CALLBACK(set_bool_pref), (char *)key); |
|
f0cd633d86d4
prefs: Add binding versions of pref widget functions.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39180
diff
changeset
|
147 | } |
|
f0cd633d86d4
prefs: Add binding versions of pref widget functions.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39180
diff
changeset
|
148 | |
|
22419
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
149 | static void |
|
41620
c6f7795ae294
Add some new helpers for pref widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41581
diff
changeset
|
150 | set_bool_switch_pref(GObject *obj, G_GNUC_UNUSED GParamSpec *pspec, |
|
c6f7795ae294
Add some new helpers for pref widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41581
diff
changeset
|
151 | gpointer data) |
|
c6f7795ae294
Add some new helpers for pref widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41581
diff
changeset
|
152 | { |
|
c6f7795ae294
Add some new helpers for pref widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41581
diff
changeset
|
153 | const gchar *key = data; |
|
c6f7795ae294
Add some new helpers for pref widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41581
diff
changeset
|
154 | |
|
c6f7795ae294
Add some new helpers for pref widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41581
diff
changeset
|
155 | purple_prefs_set_bool(key, gtk_switch_get_active(GTK_SWITCH(obj))); |
|
c6f7795ae294
Add some new helpers for pref widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41581
diff
changeset
|
156 | } |
|
c6f7795ae294
Add some new helpers for pref widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41581
diff
changeset
|
157 | |
|
c6f7795ae294
Add some new helpers for pref widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41581
diff
changeset
|
158 | void |
|
c6f7795ae294
Add some new helpers for pref widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41581
diff
changeset
|
159 | pidgin_prefs_bind_switch(const gchar *key, GtkWidget *widget) |
|
c6f7795ae294
Add some new helpers for pref widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41581
diff
changeset
|
160 | { |
|
c6f7795ae294
Add some new helpers for pref widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41581
diff
changeset
|
161 | gtk_switch_set_active(GTK_SWITCH(widget), purple_prefs_get_bool(key)); |
|
c6f7795ae294
Add some new helpers for pref widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41581
diff
changeset
|
162 | g_signal_connect(widget, "notify::active", |
|
c6f7795ae294
Add some new helpers for pref widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41581
diff
changeset
|
163 | G_CALLBACK(set_bool_switch_pref), (gchar *)key); |
|
c6f7795ae294
Add some new helpers for pref widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41581
diff
changeset
|
164 | } |
|
c6f7795ae294
Add some new helpers for pref widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41581
diff
changeset
|
165 | |
|
c6f7795ae294
Add some new helpers for pref widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41581
diff
changeset
|
166 | static void |
|
c6f7795ae294
Add some new helpers for pref widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41581
diff
changeset
|
167 | set_expander_row_pref(GObject *obj, G_GNUC_UNUSED GParamSpec *pspec, |
|
c6f7795ae294
Add some new helpers for pref widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41581
diff
changeset
|
168 | gpointer data) |
|
c6f7795ae294
Add some new helpers for pref widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41581
diff
changeset
|
169 | { |
|
c6f7795ae294
Add some new helpers for pref widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41581
diff
changeset
|
170 | const gchar *key = data; |
|
c6f7795ae294
Add some new helpers for pref widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41581
diff
changeset
|
171 | gboolean enabled; |
|
c6f7795ae294
Add some new helpers for pref widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41581
diff
changeset
|
172 | |
|
c6f7795ae294
Add some new helpers for pref widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41581
diff
changeset
|
173 | enabled = adw_expander_row_get_enable_expansion(ADW_EXPANDER_ROW(obj)); |
|
c6f7795ae294
Add some new helpers for pref widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41581
diff
changeset
|
174 | purple_prefs_set_bool(key, enabled); |
|
c6f7795ae294
Add some new helpers for pref widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41581
diff
changeset
|
175 | } |
|
c6f7795ae294
Add some new helpers for pref widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41581
diff
changeset
|
176 | |
|
c6f7795ae294
Add some new helpers for pref widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41581
diff
changeset
|
177 | void |
|
c6f7795ae294
Add some new helpers for pref widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41581
diff
changeset
|
178 | pidgin_prefs_bind_expander_row(const gchar *key, GtkWidget *widget) |
|
c6f7795ae294
Add some new helpers for pref widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41581
diff
changeset
|
179 | { |
|
c6f7795ae294
Add some new helpers for pref widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41581
diff
changeset
|
180 | adw_expander_row_set_enable_expansion(ADW_EXPANDER_ROW(widget), |
|
c6f7795ae294
Add some new helpers for pref widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41581
diff
changeset
|
181 | purple_prefs_get_bool(key)); |
|
c6f7795ae294
Add some new helpers for pref widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41581
diff
changeset
|
182 | g_signal_connect(widget, "notify::enable-expansion", |
|
c6f7795ae294
Add some new helpers for pref widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41581
diff
changeset
|
183 | G_CALLBACK(set_expander_row_pref), (gchar *)key); |
|
c6f7795ae294
Add some new helpers for pref widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41581
diff
changeset
|
184 | } |
|
c6f7795ae294
Add some new helpers for pref widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41581
diff
changeset
|
185 | |
|
c6f7795ae294
Add some new helpers for pref widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41581
diff
changeset
|
186 | static void |
|
39780
90027b926a3e
Simplify signals for disabling VV pref tests.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39779
diff
changeset
|
187 | vv_test_switch_page_cb(GtkStack *stack, G_GNUC_UNUSED GParamSpec *pspec, |
|
90027b926a3e
Simplify signals for disabling VV pref tests.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39779
diff
changeset
|
188 | gpointer data) |
|
33505
76208141a643
Disable VV tests when changing notebook tabs.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33504
diff
changeset
|
189 | { |
|
41394
1327e58acce3
Split VV prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41390
diff
changeset
|
190 | PidginVVPrefs *vv_prefs = data; |
|
39780
90027b926a3e
Simplify signals for disabling VV pref tests.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39779
diff
changeset
|
191 | |
|
90027b926a3e
Simplify signals for disabling VV pref tests.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39779
diff
changeset
|
192 | if (!g_str_equal(gtk_stack_get_visible_child_name(stack), "vv")) { |
|
90027b926a3e
Simplify signals for disabling VV pref tests.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39779
diff
changeset
|
193 | /* Disable any running test pipelines. */ |
|
41394
1327e58acce3
Split VV prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41390
diff
changeset
|
194 | pidgin_vv_prefs_disable_test_pipelines(vv_prefs); |
|
33503
8959f9825768
Copy audio test from vvconfig into Preferences window.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33502
diff
changeset
|
195 | } |
|
8959f9825768
Copy audio test from vvconfig into Preferences window.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33502
diff
changeset
|
196 | } |
|
33502
f59489bd552b
Copy VV device settings into a Preferences pane.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33357
diff
changeset
|
197 | |
|
41397
91e5ee47f5a1
Cleanup pidgin prefs
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41394
diff
changeset
|
198 | /****************************************************************************** |
|
91e5ee47f5a1
Cleanup pidgin prefs
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41394
diff
changeset
|
199 | * GObject Implementation |
|
91e5ee47f5a1
Cleanup pidgin prefs
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41394
diff
changeset
|
200 | *****************************************************************************/ |
|
27493
96dc1b8abdf9
You should check the indenting before a copy & paste...
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
27451
diff
changeset
|
201 | static void |
|
42072
606edc665dc2
Display the preferences window as a singleton from the application
Gary Kramlich <grim@reaperworld.com>
parents:
41947
diff
changeset
|
202 | pidgin_prefs_window_finalize(GObject *obj) { |
|
606edc665dc2
Display the preferences window as a singleton from the application
Gary Kramlich <grim@reaperworld.com>
parents:
41947
diff
changeset
|
203 | purple_prefs_disconnect_by_handle(obj); |
|
606edc665dc2
Display the preferences window as a singleton from the application
Gary Kramlich <grim@reaperworld.com>
parents:
41947
diff
changeset
|
204 | |
|
606edc665dc2
Display the preferences window as a singleton from the application
Gary Kramlich <grim@reaperworld.com>
parents:
41947
diff
changeset
|
205 | G_OBJECT_CLASS(pidgin_prefs_window_parent_class)->finalize(obj); |
|
606edc665dc2
Display the preferences window as a singleton from the application
Gary Kramlich <grim@reaperworld.com>
parents:
41947
diff
changeset
|
206 | } |
|
606edc665dc2
Display the preferences window as a singleton from the application
Gary Kramlich <grim@reaperworld.com>
parents:
41947
diff
changeset
|
207 | |
|
606edc665dc2
Display the preferences window as a singleton from the application
Gary Kramlich <grim@reaperworld.com>
parents:
41947
diff
changeset
|
208 | static void |
|
39178
53a96425ffc0
Start switching Preferences dialog to Glade.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39177
diff
changeset
|
209 | pidgin_prefs_window_class_init(PidginPrefsWindowClass *klass) |
|
22419
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
210 | { |
|
42072
606edc665dc2
Display the preferences window as a singleton from the application
Gary Kramlich <grim@reaperworld.com>
parents:
41947
diff
changeset
|
211 | GObjectClass *obj_class = G_OBJECT_CLASS(klass); |
|
39178
53a96425ffc0
Start switching Preferences dialog to Glade.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39177
diff
changeset
|
212 | GtkWidgetClass *widget_class = GTK_WIDGET_CLASS(klass); |
|
53a96425ffc0
Start switching Preferences dialog to Glade.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39177
diff
changeset
|
213 | |
|
42072
606edc665dc2
Display the preferences window as a singleton from the application
Gary Kramlich <grim@reaperworld.com>
parents:
41947
diff
changeset
|
214 | obj_class->finalize = pidgin_prefs_window_finalize; |
|
606edc665dc2
Display the preferences window as a singleton from the application
Gary Kramlich <grim@reaperworld.com>
parents:
41947
diff
changeset
|
215 | |
|
39178
53a96425ffc0
Start switching Preferences dialog to Glade.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39177
diff
changeset
|
216 | gtk_widget_class_set_template_from_resource( |
|
53a96425ffc0
Start switching Preferences dialog to Glade.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39177
diff
changeset
|
217 | widget_class, |
|
41030
ec8b76f3bf0a
Fix the resource path so we can use the automatic stuff that GtkApplication supports
Gary Kramlich <grim@reaperworld.com>
parents:
40886
diff
changeset
|
218 | "/im/pidgin/Pidgin3/Prefs/prefs.ui" |
|
39178
53a96425ffc0
Start switching Preferences dialog to Glade.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39177
diff
changeset
|
219 | ); |
|
53a96425ffc0
Start switching Preferences dialog to Glade.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39177
diff
changeset
|
220 | |
|
39182
a7a028be4bcd
prefs: Convert Logging page to glade.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39181
diff
changeset
|
221 | /* Main window */ |
|
41490
2b1695327414
Make VV libraries required
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41397
diff
changeset
|
222 | gtk_widget_class_bind_template_callback(widget_class, |
|
2b1695327414
Make VV libraries required
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41397
diff
changeset
|
223 | vv_test_switch_page_cb); |
|
39178
53a96425ffc0
Start switching Preferences dialog to Glade.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39177
diff
changeset
|
224 | } |
|
53a96425ffc0
Start switching Preferences dialog to Glade.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39177
diff
changeset
|
225 | |
|
53a96425ffc0
Start switching Preferences dialog to Glade.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39177
diff
changeset
|
226 | static void |
|
53a96425ffc0
Start switching Preferences dialog to Glade.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39177
diff
changeset
|
227 | pidgin_prefs_window_init(PidginPrefsWindow *win) |
|
53a96425ffc0
Start switching Preferences dialog to Glade.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39177
diff
changeset
|
228 | { |
|
53a96425ffc0
Start switching Preferences dialog to Glade.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39177
diff
changeset
|
229 | gtk_widget_init_template(GTK_WIDGET(win)); |
|
53a96425ffc0
Start switching Preferences dialog to Glade.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39177
diff
changeset
|
230 | } |
|
53a96425ffc0
Start switching Preferences dialog to Glade.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39177
diff
changeset
|
231 | |
|
41397
91e5ee47f5a1
Cleanup pidgin prefs
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41394
diff
changeset
|
232 | /****************************************************************************** |
|
91e5ee47f5a1
Cleanup pidgin prefs
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41394
diff
changeset
|
233 | * API |
|
91e5ee47f5a1
Cleanup pidgin prefs
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41394
diff
changeset
|
234 | *****************************************************************************/ |
|
39178
53a96425ffc0
Start switching Preferences dialog to Glade.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39177
diff
changeset
|
235 | void |
|
22419
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
236 | pidgin_prefs_init(void) |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
237 | { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
238 | purple_prefs_add_none(PIDGIN_PREFS_ROOT ""); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
239 | purple_prefs_add_none("/plugins/gtk"); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
240 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
241 | /* Plugins */ |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
242 | purple_prefs_add_none(PIDGIN_PREFS_ROOT "/plugins"); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
243 | purple_prefs_add_path_list(PIDGIN_PREFS_ROOT "/plugins/loaded", NULL); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
244 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
245 | /* File locations */ |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
246 | purple_prefs_add_none(PIDGIN_PREFS_ROOT "/filelocations"); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
247 | purple_prefs_add_path(PIDGIN_PREFS_ROOT "/filelocations/last_save_folder", ""); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
248 | purple_prefs_add_path(PIDGIN_PREFS_ROOT "/filelocations/last_open_folder", ""); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
249 | purple_prefs_add_path(PIDGIN_PREFS_ROOT "/filelocations/last_icon_folder", ""); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
250 | |
|
33508
188563e24535
Migrate and correctly create VV prefs.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33507
diff
changeset
|
251 | /* Voice/Video */ |
|
188563e24535
Migrate and correctly create VV prefs.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33507
diff
changeset
|
252 | purple_prefs_add_none(PIDGIN_PREFS_ROOT "/vvconfig"); |
|
188563e24535
Migrate and correctly create VV prefs.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33507
diff
changeset
|
253 | purple_prefs_add_none(PIDGIN_PREFS_ROOT "/vvconfig/audio"); |
|
188563e24535
Migrate and correctly create VV prefs.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33507
diff
changeset
|
254 | purple_prefs_add_none(PIDGIN_PREFS_ROOT "/vvconfig/audio/src"); |
|
188563e24535
Migrate and correctly create VV prefs.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33507
diff
changeset
|
255 | purple_prefs_add_string(PIDGIN_PREFS_ROOT "/vvconfig/audio/src/device", ""); |
|
188563e24535
Migrate and correctly create VV prefs.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33507
diff
changeset
|
256 | purple_prefs_add_none(PIDGIN_PREFS_ROOT "/vvconfig/audio/sink"); |
|
188563e24535
Migrate and correctly create VV prefs.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33507
diff
changeset
|
257 | purple_prefs_add_string(PIDGIN_PREFS_ROOT "/vvconfig/audio/sink/device", ""); |
|
188563e24535
Migrate and correctly create VV prefs.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33507
diff
changeset
|
258 | purple_prefs_add_none(PIDGIN_PREFS_ROOT "/vvconfig/video"); |
|
188563e24535
Migrate and correctly create VV prefs.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33507
diff
changeset
|
259 | purple_prefs_add_none(PIDGIN_PREFS_ROOT "/vvconfig/video/src"); |
|
188563e24535
Migrate and correctly create VV prefs.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33507
diff
changeset
|
260 | purple_prefs_add_string(PIDGIN_PREFS_ROOT "/vvconfig/video/src/device", ""); |
|
188563e24535
Migrate and correctly create VV prefs.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33507
diff
changeset
|
261 | purple_prefs_add_none(PIDGIN_PREFS_ROOT "/vvconfig/video"); |
|
188563e24535
Migrate and correctly create VV prefs.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33507
diff
changeset
|
262 | purple_prefs_add_none(PIDGIN_PREFS_ROOT "/vvconfig/video/sink"); |
|
188563e24535
Migrate and correctly create VV prefs.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33507
diff
changeset
|
263 | purple_prefs_add_string(PIDGIN_PREFS_ROOT "/vvconfig/video/sink/device", ""); |
|
188563e24535
Migrate and correctly create VV prefs.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33507
diff
changeset
|
264 | |
|
22419
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
265 | pidgin_prefs_update_old(); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
266 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
267 | |
|
27493
96dc1b8abdf9
You should check the indenting before a copy & paste...
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
27451
diff
changeset
|
268 | void |
|
96dc1b8abdf9
You should check the indenting before a copy & paste...
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
27451
diff
changeset
|
269 | pidgin_prefs_update_old(void) |
|
22419
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
270 | { |
|
40547
86e0c5080a58
vv: Switch to GTK sinks by default.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40542
diff
changeset
|
271 | const gchar *video_sink = NULL; |
|
86e0c5080a58
vv: Switch to GTK sinks by default.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40542
diff
changeset
|
272 | |
|
22419
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
273 | /* Rename some old prefs */ |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
274 | purple_prefs_rename(PIDGIN_PREFS_ROOT "/conversations/im/raise_on_events", "/plugins/gtk/X11/notify/method_raise"); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
275 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
276 | purple_prefs_rename_boolean_toggle(PIDGIN_PREFS_ROOT "/conversations/ignore_colors", |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
277 | PIDGIN_PREFS_ROOT "/conversations/show_incoming_formatting"); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
278 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
279 | /* Remove some no-longer-used prefs */ |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
280 | purple_prefs_remove(PIDGIN_PREFS_ROOT "/blist/auto_expand_contacts"); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
281 | purple_prefs_remove(PIDGIN_PREFS_ROOT "/blist/button_style"); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
282 | purple_prefs_remove(PIDGIN_PREFS_ROOT "/blist/grey_idle_buddies"); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
283 | purple_prefs_remove(PIDGIN_PREFS_ROOT "/blist/raise_on_events"); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
284 | purple_prefs_remove(PIDGIN_PREFS_ROOT "/blist/show_group_count"); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
285 | purple_prefs_remove(PIDGIN_PREFS_ROOT "/blist/show_warning_level"); |
|
34259
5309bb9956cf
Remove the tooltip_delay pref from prefs.xml.
Mark Doliner <mark@kingant.net>
parents:
34241
diff
changeset
|
286 | purple_prefs_remove(PIDGIN_PREFS_ROOT "/blist/tooltip_delay"); |
|
39317
b31b810fe6db
gtkblist: Remove blist position storage
Mike Ruprecht <cmaiku@gmail.com>
parents:
39281
diff
changeset
|
287 | purple_prefs_remove(PIDGIN_PREFS_ROOT "/blist/x"); |
|
b31b810fe6db
gtkblist: Remove blist position storage
Mike Ruprecht <cmaiku@gmail.com>
parents:
39281
diff
changeset
|
288 | purple_prefs_remove(PIDGIN_PREFS_ROOT "/blist/y"); |
|
40501
011cdaa64ecc
Replace the manual browser opening code with gtk_show_uri_on_window
Gary Kramlich <grim@reaperworld.com>
parents:
40496
diff
changeset
|
289 | purple_prefs_remove(PIDGIN_PREFS_ROOT "/browsers"); |
|
011cdaa64ecc
Replace the manual browser opening code with gtk_show_uri_on_window
Gary Kramlich <grim@reaperworld.com>
parents:
40496
diff
changeset
|
290 | purple_prefs_remove(PIDGIN_PREFS_ROOT "/browsers/browser"); |
|
011cdaa64ecc
Replace the manual browser opening code with gtk_show_uri_on_window
Gary Kramlich <grim@reaperworld.com>
parents:
40496
diff
changeset
|
291 | purple_prefs_remove(PIDGIN_PREFS_ROOT "/browsers/command"); |
|
011cdaa64ecc
Replace the manual browser opening code with gtk_show_uri_on_window
Gary Kramlich <grim@reaperworld.com>
parents:
40496
diff
changeset
|
292 | purple_prefs_remove(PIDGIN_PREFS_ROOT "/browsers/place"); |
|
011cdaa64ecc
Replace the manual browser opening code with gtk_show_uri_on_window
Gary Kramlich <grim@reaperworld.com>
parents:
40496
diff
changeset
|
293 | purple_prefs_remove(PIDGIN_PREFS_ROOT "/browsers/manual_command"); |
|
22419
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
294 | purple_prefs_remove(PIDGIN_PREFS_ROOT "/conversations/button_type"); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
295 | purple_prefs_remove(PIDGIN_PREFS_ROOT "/conversations/ctrl_enter_sends"); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
296 | purple_prefs_remove(PIDGIN_PREFS_ROOT "/conversations/enter_sends"); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
297 | purple_prefs_remove(PIDGIN_PREFS_ROOT "/conversations/escape_closes"); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
298 | purple_prefs_remove(PIDGIN_PREFS_ROOT "/conversations/html_shortcuts"); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
299 | purple_prefs_remove(PIDGIN_PREFS_ROOT "/conversations/icons_on_tabs"); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
300 | purple_prefs_remove(PIDGIN_PREFS_ROOT "/conversations/send_formatting"); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
301 | purple_prefs_remove(PIDGIN_PREFS_ROOT "/conversations/show_urls_as_links"); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
302 | purple_prefs_remove(PIDGIN_PREFS_ROOT "/conversations/use_custom_bgcolor"); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
303 | purple_prefs_remove(PIDGIN_PREFS_ROOT "/conversations/use_custom_fgcolor"); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
304 | purple_prefs_remove(PIDGIN_PREFS_ROOT "/conversations/use_custom_font"); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
305 | purple_prefs_remove(PIDGIN_PREFS_ROOT "/conversations/use_custom_size"); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
306 | purple_prefs_remove(PIDGIN_PREFS_ROOT "/conversations/chat/old_tab_complete"); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
307 | purple_prefs_remove(PIDGIN_PREFS_ROOT "/conversations/chat/tab_completion"); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
308 | purple_prefs_remove(PIDGIN_PREFS_ROOT "/conversations/im/hide_on_send"); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
309 | purple_prefs_remove(PIDGIN_PREFS_ROOT "/conversations/chat/color_nicks"); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
310 | purple_prefs_remove(PIDGIN_PREFS_ROOT "/conversations/chat/raise_on_events"); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
311 | purple_prefs_remove(PIDGIN_PREFS_ROOT "/conversations/ignore_fonts"); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
312 | purple_prefs_remove(PIDGIN_PREFS_ROOT "/conversations/ignore_font_sizes"); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
313 | purple_prefs_remove(PIDGIN_PREFS_ROOT "/conversations/passthrough_unknown_commands"); |
|
32732
3166ba6f2096
We haven't used this pref in a while. We stopped adding it in
Mark Doliner <markdoliner@pidgin.im>
parents:
32596
diff
changeset
|
314 | purple_prefs_remove(PIDGIN_PREFS_ROOT "/debug/timestamps"); |
|
22419
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
315 | purple_prefs_remove(PIDGIN_PREFS_ROOT "/idle"); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
316 | purple_prefs_remove(PIDGIN_PREFS_ROOT "/sound/signon"); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
317 | purple_prefs_remove(PIDGIN_PREFS_ROOT "/sound/silent_signon"); |
|
40509
6748a5ec6644
remove the old sound api
Gary Kramlich <grim@reaperworld.com>
parents:
40504
diff
changeset
|
318 | purple_prefs_remove(PIDGIN_PREFS_ROOT "/sound/command"); |
|
6748a5ec6644
remove the old sound api
Gary Kramlich <grim@reaperworld.com>
parents:
40504
diff
changeset
|
319 | purple_prefs_remove(PIDGIN_PREFS_ROOT "/sound/conv_focus"); |
|
6748a5ec6644
remove the old sound api
Gary Kramlich <grim@reaperworld.com>
parents:
40504
diff
changeset
|
320 | purple_prefs_remove(PIDGIN_PREFS_ROOT "/sound/enabled/chat_msg_recv"); |
|
6748a5ec6644
remove the old sound api
Gary Kramlich <grim@reaperworld.com>
parents:
40504
diff
changeset
|
321 | purple_prefs_remove(PIDGIN_PREFS_ROOT "/sound/enabled/first_im_recv"); |
|
6748a5ec6644
remove the old sound api
Gary Kramlich <grim@reaperworld.com>
parents:
40504
diff
changeset
|
322 | purple_prefs_remove(PIDGIN_PREFS_ROOT "/sound/enabled/got_attention"); |
|
6748a5ec6644
remove the old sound api
Gary Kramlich <grim@reaperworld.com>
parents:
40504
diff
changeset
|
323 | purple_prefs_remove(PIDGIN_PREFS_ROOT "/sound/enabled/im_recv"); |
|
6748a5ec6644
remove the old sound api
Gary Kramlich <grim@reaperworld.com>
parents:
40504
diff
changeset
|
324 | purple_prefs_remove(PIDGIN_PREFS_ROOT "/sound/enabled/join_chat"); |
|
6748a5ec6644
remove the old sound api
Gary Kramlich <grim@reaperworld.com>
parents:
40504
diff
changeset
|
325 | purple_prefs_remove(PIDGIN_PREFS_ROOT "/sound/enabled/left_chat"); |
|
6748a5ec6644
remove the old sound api
Gary Kramlich <grim@reaperworld.com>
parents:
40504
diff
changeset
|
326 | purple_prefs_remove(PIDGIN_PREFS_ROOT "/sound/enabled/login"); |
|
6748a5ec6644
remove the old sound api
Gary Kramlich <grim@reaperworld.com>
parents:
40504
diff
changeset
|
327 | purple_prefs_remove(PIDGIN_PREFS_ROOT "/sound/enabled/logout"); |
|
6748a5ec6644
remove the old sound api
Gary Kramlich <grim@reaperworld.com>
parents:
40504
diff
changeset
|
328 | purple_prefs_remove(PIDGIN_PREFS_ROOT "/sound/enabled/nick_said"); |
|
6748a5ec6644
remove the old sound api
Gary Kramlich <grim@reaperworld.com>
parents:
40504
diff
changeset
|
329 | purple_prefs_remove(PIDGIN_PREFS_ROOT "/sound/enabled/pounce_default"); |
|
6748a5ec6644
remove the old sound api
Gary Kramlich <grim@reaperworld.com>
parents:
40504
diff
changeset
|
330 | purple_prefs_remove(PIDGIN_PREFS_ROOT "/sound/enabled/send_chat_msg"); |
|
6748a5ec6644
remove the old sound api
Gary Kramlich <grim@reaperworld.com>
parents:
40504
diff
changeset
|
331 | purple_prefs_remove(PIDGIN_PREFS_ROOT "/sound/enabled/send_im"); |
|
6748a5ec6644
remove the old sound api
Gary Kramlich <grim@reaperworld.com>
parents:
40504
diff
changeset
|
332 | purple_prefs_remove(PIDGIN_PREFS_ROOT "/sound/enabled/sent_attention"); |
|
6748a5ec6644
remove the old sound api
Gary Kramlich <grim@reaperworld.com>
parents:
40504
diff
changeset
|
333 | purple_prefs_remove(PIDGIN_PREFS_ROOT "/sound/enabled"); |
|
6748a5ec6644
remove the old sound api
Gary Kramlich <grim@reaperworld.com>
parents:
40504
diff
changeset
|
334 | purple_prefs_remove(PIDGIN_PREFS_ROOT "/sound/file/chat_msg_recv"); |
|
6748a5ec6644
remove the old sound api
Gary Kramlich <grim@reaperworld.com>
parents:
40504
diff
changeset
|
335 | purple_prefs_remove(PIDGIN_PREFS_ROOT "/sound/file/first_im_recv"); |
|
6748a5ec6644
remove the old sound api
Gary Kramlich <grim@reaperworld.com>
parents:
40504
diff
changeset
|
336 | purple_prefs_remove(PIDGIN_PREFS_ROOT "/sound/file/got_attention"); |
|
6748a5ec6644
remove the old sound api
Gary Kramlich <grim@reaperworld.com>
parents:
40504
diff
changeset
|
337 | purple_prefs_remove(PIDGIN_PREFS_ROOT "/sound/file/im_recv"); |
|
6748a5ec6644
remove the old sound api
Gary Kramlich <grim@reaperworld.com>
parents:
40504
diff
changeset
|
338 | purple_prefs_remove(PIDGIN_PREFS_ROOT "/sound/file/join_chat"); |
|
6748a5ec6644
remove the old sound api
Gary Kramlich <grim@reaperworld.com>
parents:
40504
diff
changeset
|
339 | purple_prefs_remove(PIDGIN_PREFS_ROOT "/sound/file/left_chat"); |
|
6748a5ec6644
remove the old sound api
Gary Kramlich <grim@reaperworld.com>
parents:
40504
diff
changeset
|
340 | purple_prefs_remove(PIDGIN_PREFS_ROOT "/sound/file/login"); |
|
6748a5ec6644
remove the old sound api
Gary Kramlich <grim@reaperworld.com>
parents:
40504
diff
changeset
|
341 | purple_prefs_remove(PIDGIN_PREFS_ROOT "/sound/file/logout"); |
|
6748a5ec6644
remove the old sound api
Gary Kramlich <grim@reaperworld.com>
parents:
40504
diff
changeset
|
342 | purple_prefs_remove(PIDGIN_PREFS_ROOT "/sound/file/nick_said"); |
|
6748a5ec6644
remove the old sound api
Gary Kramlich <grim@reaperworld.com>
parents:
40504
diff
changeset
|
343 | purple_prefs_remove(PIDGIN_PREFS_ROOT "/sound/file/pounce_default"); |
|
6748a5ec6644
remove the old sound api
Gary Kramlich <grim@reaperworld.com>
parents:
40504
diff
changeset
|
344 | purple_prefs_remove(PIDGIN_PREFS_ROOT "/sound/file/send_chat_msg"); |
|
6748a5ec6644
remove the old sound api
Gary Kramlich <grim@reaperworld.com>
parents:
40504
diff
changeset
|
345 | purple_prefs_remove(PIDGIN_PREFS_ROOT "/sound/file/send_im"); |
|
6748a5ec6644
remove the old sound api
Gary Kramlich <grim@reaperworld.com>
parents:
40504
diff
changeset
|
346 | purple_prefs_remove(PIDGIN_PREFS_ROOT "/sound/file/sent_attention"); |
|
6748a5ec6644
remove the old sound api
Gary Kramlich <grim@reaperworld.com>
parents:
40504
diff
changeset
|
347 | purple_prefs_remove(PIDGIN_PREFS_ROOT "/sound/file"); |
|
6748a5ec6644
remove the old sound api
Gary Kramlich <grim@reaperworld.com>
parents:
40504
diff
changeset
|
348 | purple_prefs_remove(PIDGIN_PREFS_ROOT "/sound/method"); |
|
6748a5ec6644
remove the old sound api
Gary Kramlich <grim@reaperworld.com>
parents:
40504
diff
changeset
|
349 | purple_prefs_remove(PIDGIN_PREFS_ROOT "/sound/mute"); |
|
6748a5ec6644
remove the old sound api
Gary Kramlich <grim@reaperworld.com>
parents:
40504
diff
changeset
|
350 | purple_prefs_remove(PIDGIN_PREFS_ROOT "/sound/theme"); |
|
6748a5ec6644
remove the old sound api
Gary Kramlich <grim@reaperworld.com>
parents:
40504
diff
changeset
|
351 | purple_prefs_remove(PIDGIN_PREFS_ROOT "/sound"); |
|
22419
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
352 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
353 | purple_prefs_remove(PIDGIN_PREFS_ROOT "/away/queue_messages"); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
354 | purple_prefs_remove(PIDGIN_PREFS_ROOT "/away"); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
355 | purple_prefs_remove("/plugins/gtk/docklet/queue_messages"); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
356 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
357 | purple_prefs_remove(PIDGIN_PREFS_ROOT "/conversations/chat/default_width"); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
358 | purple_prefs_remove(PIDGIN_PREFS_ROOT "/conversations/chat/default_height"); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
359 | purple_prefs_remove(PIDGIN_PREFS_ROOT "/conversations/im/default_width"); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
360 | purple_prefs_remove(PIDGIN_PREFS_ROOT "/conversations/im/default_height"); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
361 | purple_prefs_rename(PIDGIN_PREFS_ROOT "/conversations/x", |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
362 | PIDGIN_PREFS_ROOT "/conversations/im/x"); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
363 | purple_prefs_rename(PIDGIN_PREFS_ROOT "/conversations/y", |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
364 | PIDGIN_PREFS_ROOT "/conversations/im/y"); |
|
33508
188563e24535
Migrate and correctly create VV prefs.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33507
diff
changeset
|
365 | |
|
188563e24535
Migrate and correctly create VV prefs.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33507
diff
changeset
|
366 | /* Fixup vvconfig plugin prefs */ |
|
188563e24535
Migrate and correctly create VV prefs.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33507
diff
changeset
|
367 | if (purple_prefs_exists("/plugins/core/vvconfig/audio/src/device")) { |
|
188563e24535
Migrate and correctly create VV prefs.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33507
diff
changeset
|
368 | purple_prefs_set_string(PIDGIN_PREFS_ROOT "/vvconfig/audio/src/device", |
|
188563e24535
Migrate and correctly create VV prefs.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33507
diff
changeset
|
369 | purple_prefs_get_string("/plugins/core/vvconfig/audio/src/device")); |
|
188563e24535
Migrate and correctly create VV prefs.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33507
diff
changeset
|
370 | } |
|
188563e24535
Migrate and correctly create VV prefs.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33507
diff
changeset
|
371 | if (purple_prefs_exists("/plugins/core/vvconfig/audio/sink/device")) { |
|
188563e24535
Migrate and correctly create VV prefs.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33507
diff
changeset
|
372 | purple_prefs_set_string(PIDGIN_PREFS_ROOT "/vvconfig/audio/sink/device", |
|
188563e24535
Migrate and correctly create VV prefs.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33507
diff
changeset
|
373 | purple_prefs_get_string("/plugins/core/vvconfig/audio/sink/device")); |
|
188563e24535
Migrate and correctly create VV prefs.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33507
diff
changeset
|
374 | } |
|
188563e24535
Migrate and correctly create VV prefs.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33507
diff
changeset
|
375 | if (purple_prefs_exists("/plugins/core/vvconfig/video/src/device")) { |
|
188563e24535
Migrate and correctly create VV prefs.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33507
diff
changeset
|
376 | purple_prefs_set_string(PIDGIN_PREFS_ROOT "/vvconfig/video/src/device", |
|
188563e24535
Migrate and correctly create VV prefs.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33507
diff
changeset
|
377 | purple_prefs_get_string("/plugins/core/vvconfig/video/src/device")); |
|
188563e24535
Migrate and correctly create VV prefs.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33507
diff
changeset
|
378 | } |
|
188563e24535
Migrate and correctly create VV prefs.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33507
diff
changeset
|
379 | if (purple_prefs_exists("/plugins/gtk/vvconfig/video/sink/device")) { |
|
188563e24535
Migrate and correctly create VV prefs.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33507
diff
changeset
|
380 | purple_prefs_set_string(PIDGIN_PREFS_ROOT "/vvconfig/video/sink/device", |
|
188563e24535
Migrate and correctly create VV prefs.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33507
diff
changeset
|
381 | purple_prefs_get_string("/plugins/gtk/vvconfig/video/sink/device")); |
|
188563e24535
Migrate and correctly create VV prefs.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33507
diff
changeset
|
382 | } |
|
188563e24535
Migrate and correctly create VV prefs.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33507
diff
changeset
|
383 | |
|
40547
86e0c5080a58
vv: Switch to GTK sinks by default.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40542
diff
changeset
|
384 | video_sink = purple_prefs_get_string(PIDGIN_PREFS_ROOT "/vvconfig/video/sink/device"); |
|
86e0c5080a58
vv: Switch to GTK sinks by default.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40542
diff
changeset
|
385 | if (purple_strequal(video_sink, "glimagesink") || purple_strequal(video_sink, "directdrawsink")) { |
|
86e0c5080a58
vv: Switch to GTK sinks by default.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40542
diff
changeset
|
386 | /* Accelerated sinks move to GTK GL. */ |
|
40647
33d7e6abb37f
Fix a few random issues that scanbuild found.
Gary Kramlich <grim@reaperworld.com>
parents:
40552
diff
changeset
|
387 | /* video_sink = "gtkglsink"; */ |
|
40547
86e0c5080a58
vv: Switch to GTK sinks by default.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40542
diff
changeset
|
388 | /* FIXME: I haven't been able to get gtkglsink to work yet: */ |
|
86e0c5080a58
vv: Switch to GTK sinks by default.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40542
diff
changeset
|
389 | video_sink = "gtksink"; |
|
86e0c5080a58
vv: Switch to GTK sinks by default.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40542
diff
changeset
|
390 | } else { |
|
86e0c5080a58
vv: Switch to GTK sinks by default.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40542
diff
changeset
|
391 | /* Everything else, including default will be moved to GTK sink. */ |
|
86e0c5080a58
vv: Switch to GTK sinks by default.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40542
diff
changeset
|
392 | video_sink = "gtksink"; |
|
86e0c5080a58
vv: Switch to GTK sinks by default.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40542
diff
changeset
|
393 | } |
|
86e0c5080a58
vv: Switch to GTK sinks by default.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40542
diff
changeset
|
394 | purple_prefs_set_string(PIDGIN_PREFS_ROOT "/vvconfig/video/sink/device", video_sink); |
|
86e0c5080a58
vv: Switch to GTK sinks by default.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40542
diff
changeset
|
395 | |
|
33508
188563e24535
Migrate and correctly create VV prefs.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33507
diff
changeset
|
396 | purple_prefs_remove("/plugins/core/vvconfig"); |
|
188563e24535
Migrate and correctly create VV prefs.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33507
diff
changeset
|
397 | purple_prefs_remove("/plugins/gtk/vvconfig"); |
|
35105
ed127ccd9b9f
Remove the "existing window" option for where to open URLs.
Mark Doliner <mark@kingant.net>
parents:
34955
diff
changeset
|
398 | |
|
37886
d4ed67195cbf
gtkprefs: rework Voice/Video preferences page
Jakub Adam <jakub.adam@ktknet.cz>
parents:
37677
diff
changeset
|
399 | purple_prefs_remove(PIDGIN_PREFS_ROOT "/vvconfig/audio/src/plugin"); |
|
d4ed67195cbf
gtkprefs: rework Voice/Video preferences page
Jakub Adam <jakub.adam@ktknet.cz>
parents:
37677
diff
changeset
|
400 | purple_prefs_remove(PIDGIN_PREFS_ROOT "/vvconfig/audio/sink/plugin"); |
|
d4ed67195cbf
gtkprefs: rework Voice/Video preferences page
Jakub Adam <jakub.adam@ktknet.cz>
parents:
37677
diff
changeset
|
401 | purple_prefs_remove(PIDGIN_PREFS_ROOT "/vvconfig/video/src/plugin"); |
|
d4ed67195cbf
gtkprefs: rework Voice/Video preferences page
Jakub Adam <jakub.adam@ktknet.cz>
parents:
37677
diff
changeset
|
402 | purple_prefs_remove(PIDGIN_PREFS_ROOT "/vvconfig/video/sink/plugin"); |
|
22419
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
403 | } |
|
33508
188563e24535
Migrate and correctly create VV prefs.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33507
diff
changeset
|
404 |