pidgin/prefs/pidginprefs.c

Thu, 09 May 2024 21:21:24 -0500

author
Gary Kramlich <grim@reaperworld.com>
date
Thu, 09 May 2024 21:21:24 -0500
changeset 42764
effcb245f840
parent 42575
580339aa47cc
child 42836
000d42c316cb
permissions
-rw-r--r--

Remove the media implementation for Pidgin

This API needs to be redesigned and keeping this old version around isn't doing
anyone any good. The preferences were left, but removed from the build for the
time being.

Testing Done:
Dialed TMNT

Reviewed at https://reviews.imfreedom.org/r/3173/

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
42410
563e7a17c220 Fix possible clash of config headers
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42192
diff changeset
23 #include <purpleconfig.h>
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
24
40462
24ed25d87550 Fix some issues on macos that resulted from the internal.h cleanup
Gary Kramlich <grim@reaperworld.com>
parents: 40439
diff changeset
25 #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
26 #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
27
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
28 #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
29 #include <glib/gstdio.h>
39264
8a7a775de597 Initial work moving gtkprefs to talkatu
Gary Kramlich <grim@reaperworld.com>
parents: 39189
diff changeset
30
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
31 #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
32
42764
effcb245f840 Remove the media implementation for Pidgin
Gary Kramlich <grim@reaperworld.com>
parents: 42575
diff changeset
33 #include <adwaita.h>
effcb245f840 Remove the media implementation for Pidgin
Gary Kramlich <grim@reaperworld.com>
parents: 42575
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"
42764
effcb245f840 Remove the media implementation for Pidgin
Gary Kramlich <grim@reaperworld.com>
parents: 42575
diff changeset
39 #if 0
41394
1327e58acce3 Split VV prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41390
diff changeset
40 #include "pidginvvprefs.h"
42764
effcb245f840 Remove the media implementation for Pidgin
Gary Kramlich <grim@reaperworld.com>
parents: 42575
diff changeset
41 #endif
34225
3bba206f27f6 HTTP: migrate purple_util_fetch_url to new API for Pidgin UI
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34208
diff changeset
42
39178
53a96425ffc0 Start switching Preferences dialog to Glade.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39177
diff changeset
43 struct _PidginPrefsWindow {
53a96425ffc0 Start switching Preferences dialog to Glade.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39177
diff changeset
44 GtkDialog parent;
53a96425ffc0 Start switching Preferences dialog to Glade.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39177
diff changeset
45 };
53a96425ffc0 Start switching Preferences dialog to Glade.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39177
diff changeset
46
42575
580339aa47cc Make sure all of the final types in pidgin are defined as such
Gary Kramlich <grim@reaperworld.com>
parents: 42410
diff changeset
47 G_DEFINE_FINAL_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
48
41397
91e5ee47f5a1 Cleanup pidgin prefs
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41394
diff changeset
49 /******************************************************************************
91e5ee47f5a1 Cleanup pidgin prefs
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41394
diff changeset
50 * Helpers
91e5ee47f5a1 Cleanup pidgin prefs
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41394
diff changeset
51 *****************************************************************************/
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 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
53 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
54 {
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 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
56 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
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 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
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 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
61 }
e7d643f4de4b Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 22412
diff changeset
62
41366
789f96848a43 Expose prefs binding functions internally
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41319
diff changeset
63 void
39181
f0cd633d86d4 prefs: Add binding versions of pref widget functions.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39180
diff changeset
64 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
65 {
f0cd633d86d4 prefs: Add binding versions of pref widget functions.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39180
diff changeset
66 GtkAdjustment *adjust;
f0cd633d86d4 prefs: Add binding versions of pref widget functions.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39180
diff changeset
67 int val;
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 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
70
f0cd633d86d4 prefs: Add binding versions of pref widget functions.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39180
diff changeset
71 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
72 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
73 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
74 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
75 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
76 }
f0cd633d86d4 prefs: Add binding versions of pref widget functions.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39180
diff changeset
77
f0cd633d86d4 prefs: Add binding versions of pref widget functions.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39180
diff changeset
78 static void
27493
96dc1b8abdf9 You should check the indenting before a copy & paste...
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 27451
diff changeset
79 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
80 {
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
81 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
82
41531
2b86501d13fe Replace gtk_entry_[gs]et_text with gtk_editable_[gs]et_text
Gary Kramlich <grim@reaperworld.com>
parents: 41490
diff changeset
83 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
84 }
e7d643f4de4b Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 22412
diff changeset
85
41366
789f96848a43 Expose prefs binding functions internally
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41319
diff changeset
86 void
39181
f0cd633d86d4 prefs: Add binding versions of pref widget functions.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39180
diff changeset
87 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
88 {
f0cd633d86d4 prefs: Add binding versions of pref widget functions.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39180
diff changeset
89 const gchar *value;
f0cd633d86d4 prefs: Add binding versions of pref widget functions.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39180
diff changeset
90
f0cd633d86d4 prefs: Add binding versions of pref widget functions.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39180
diff changeset
91 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
92
41531
2b86501d13fe Replace gtk_entry_[gs]et_text with gtk_editable_[gs]et_text
Gary Kramlich <grim@reaperworld.com>
parents: 41490
diff changeset
93 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
94 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
95 (char*)key);
f0cd633d86d4 prefs: Add binding versions of pref widget functions.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39180
diff changeset
96 }
f0cd633d86d4 prefs: Add binding versions of pref widget functions.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39180
diff changeset
97
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
98 static void
41653
0a37c380d760 Port proxy type chooser to an AdwComboRow
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41620
diff changeset
99 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
100 gpointer data)
0a37c380d760 Port proxy type chooser to an AdwComboRow
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41620
diff changeset
101 {
0a37c380d760 Port proxy type chooser to an AdwComboRow
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41620
diff changeset
102 const gchar *key = data;
0a37c380d760 Port proxy type chooser to an AdwComboRow
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41620
diff changeset
103 GtkStringObject *item = NULL;
0a37c380d760 Port proxy type chooser to an AdwComboRow
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41620
diff changeset
104 const gchar *value = NULL;
0a37c380d760 Port proxy type chooser to an AdwComboRow
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41620
diff changeset
105
0a37c380d760 Port proxy type chooser to an AdwComboRow
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41620
diff changeset
106 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
107 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
108 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
109 }
0a37c380d760 Port proxy type chooser to an AdwComboRow
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41620
diff changeset
110
0a37c380d760 Port proxy type chooser to an AdwComboRow
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41620
diff changeset
111 void
0a37c380d760 Port proxy type chooser to an AdwComboRow
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41620
diff changeset
112 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
113 GtkStringList *model = NULL;
41653
0a37c380d760 Port proxy type chooser to an AdwComboRow
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41620
diff changeset
114 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
115 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
116
0a37c380d760 Port proxy type chooser to an AdwComboRow
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41620
diff changeset
117 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
118 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
119
42179
b8bb444799a4 Fix leaks from g_list_model_get_item
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42072
diff changeset
120 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
121 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
122
0a37c380d760 Port proxy type chooser to an AdwComboRow
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41620
diff changeset
123 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
124 selected = i;
0a37c380d760 Port proxy type chooser to an AdwComboRow
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41620
diff changeset
125 break;
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 }
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 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
130
0a37c380d760 Port proxy type chooser to an AdwComboRow
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41620
diff changeset
131 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
132 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
133 }
0a37c380d760 Port proxy type chooser to an AdwComboRow
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41620
diff changeset
134
0a37c380d760 Port proxy type chooser to an AdwComboRow
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41620
diff changeset
135 static void
39180
17bacc12c28f prefs: Move pidgin_prefs_checkbox earlier.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39179
diff changeset
136 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
137 {
17bacc12c28f prefs: Move pidgin_prefs_checkbox earlier.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39179
diff changeset
138 purple_prefs_set_bool(key,
41581
732b1fcb8e31 Fix prefs on GTK4
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41553
diff changeset
139 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
140 }
17bacc12c28f prefs: Move pidgin_prefs_checkbox earlier.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39179
diff changeset
141
41366
789f96848a43 Expose prefs binding functions internally
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41319
diff changeset
142 void
39181
f0cd633d86d4 prefs: Add binding versions of pref widget functions.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39180
diff changeset
143 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
144 {
41581
732b1fcb8e31 Fix prefs on GTK4
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41553
diff changeset
145 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
146 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
147 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
148 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
149 }
f0cd633d86d4 prefs: Add binding versions of pref widget functions.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39180
diff changeset
150
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
151 static void
41620
c6f7795ae294 Add some new helpers for pref widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41581
diff changeset
152 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
153 gpointer 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 const gchar *key = data;
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 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
158 }
c6f7795ae294 Add some new helpers for pref widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41581
diff changeset
159
c6f7795ae294 Add some new helpers for pref widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41581
diff changeset
160 void
c6f7795ae294 Add some new helpers for pref widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41581
diff changeset
161 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
162 {
c6f7795ae294 Add some new helpers for pref widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41581
diff changeset
163 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
164 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
165 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
166 }
c6f7795ae294 Add some new helpers for pref widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41581
diff changeset
167
c6f7795ae294 Add some new helpers for pref widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41581
diff changeset
168 static void
c6f7795ae294 Add some new helpers for pref widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41581
diff changeset
169 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
170 gpointer data)
c6f7795ae294 Add some new helpers for pref widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41581
diff changeset
171 {
c6f7795ae294 Add some new helpers for pref widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41581
diff changeset
172 const gchar *key = data;
c6f7795ae294 Add some new helpers for pref widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41581
diff changeset
173 gboolean enabled;
c6f7795ae294 Add some new helpers for pref widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41581
diff changeset
174
c6f7795ae294 Add some new helpers for pref widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41581
diff changeset
175 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
176 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
177 }
c6f7795ae294 Add some new helpers for pref widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41581
diff changeset
178
c6f7795ae294 Add some new helpers for pref widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41581
diff changeset
179 void
c6f7795ae294 Add some new helpers for pref widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41581
diff changeset
180 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
181 {
c6f7795ae294 Add some new helpers for pref widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41581
diff changeset
182 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
183 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
184 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
185 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
186 }
c6f7795ae294 Add some new helpers for pref widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41581
diff changeset
187
42764
effcb245f840 Remove the media implementation for Pidgin
Gary Kramlich <grim@reaperworld.com>
parents: 42575
diff changeset
188 #if 0
41620
c6f7795ae294 Add some new helpers for pref widgets
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41581
diff changeset
189 static void
39780
90027b926a3e Simplify signals for disabling VV pref tests.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39779
diff changeset
190 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
191 gpointer data)
33505
76208141a643 Disable VV tests when changing notebook tabs.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 33504
diff changeset
192 {
41394
1327e58acce3 Split VV prefs into a separate widget
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41390
diff changeset
193 PidginVVPrefs *vv_prefs = data;
39780
90027b926a3e Simplify signals for disabling VV pref tests.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39779
diff changeset
194
90027b926a3e Simplify signals for disabling VV pref tests.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39779
diff changeset
195 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
196 /* 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
197 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
198 }
8959f9825768 Copy audio test from vvconfig into Preferences window.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 33502
diff changeset
199 }
42764
effcb245f840 Remove the media implementation for Pidgin
Gary Kramlich <grim@reaperworld.com>
parents: 42575
diff changeset
200 #endif
33502
f59489bd552b Copy VV device settings into a Preferences pane.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 33357
diff changeset
201
41397
91e5ee47f5a1 Cleanup pidgin prefs
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41394
diff changeset
202 /******************************************************************************
91e5ee47f5a1 Cleanup pidgin prefs
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41394
diff changeset
203 * GObject Implementation
91e5ee47f5a1 Cleanup pidgin prefs
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41394
diff changeset
204 *****************************************************************************/
27493
96dc1b8abdf9 You should check the indenting before a copy & paste...
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 27451
diff changeset
205 static void
42072
606edc665dc2 Display the preferences window as a singleton from the application
Gary Kramlich <grim@reaperworld.com>
parents: 41947
diff changeset
206 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
207 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
208
606edc665dc2 Display the preferences window as a singleton from the application
Gary Kramlich <grim@reaperworld.com>
parents: 41947
diff changeset
209 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
210 }
606edc665dc2 Display the preferences window as a singleton from the application
Gary Kramlich <grim@reaperworld.com>
parents: 41947
diff changeset
211
606edc665dc2 Display the preferences window as a singleton from the application
Gary Kramlich <grim@reaperworld.com>
parents: 41947
diff changeset
212 static void
39178
53a96425ffc0 Start switching Preferences dialog to Glade.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39177
diff changeset
213 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
214 {
42072
606edc665dc2 Display the preferences window as a singleton from the application
Gary Kramlich <grim@reaperworld.com>
parents: 41947
diff changeset
215 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
216 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
217
42072
606edc665dc2 Display the preferences window as a singleton from the application
Gary Kramlich <grim@reaperworld.com>
parents: 41947
diff changeset
218 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
219
39178
53a96425ffc0 Start switching Preferences dialog to Glade.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39177
diff changeset
220 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
221 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
222 "/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
223 );
53a96425ffc0 Start switching Preferences dialog to Glade.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39177
diff changeset
224
39182
a7a028be4bcd prefs: Convert Logging page to glade.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39181
diff changeset
225 /* Main window */
42764
effcb245f840 Remove the media implementation for Pidgin
Gary Kramlich <grim@reaperworld.com>
parents: 42575
diff changeset
226 #if 0
41490
2b1695327414 Make VV libraries required
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41397
diff changeset
227 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
228 vv_test_switch_page_cb);
42764
effcb245f840 Remove the media implementation for Pidgin
Gary Kramlich <grim@reaperworld.com>
parents: 42575
diff changeset
229 #endif
39178
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
53a96425ffc0 Start switching Preferences dialog to Glade.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39177
diff changeset
232 static void
53a96425ffc0 Start switching Preferences dialog to Glade.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39177
diff changeset
233 pidgin_prefs_window_init(PidginPrefsWindow *win)
53a96425ffc0 Start switching Preferences dialog to Glade.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39177
diff changeset
234 {
53a96425ffc0 Start switching Preferences dialog to Glade.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39177
diff changeset
235 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
236 }
53a96425ffc0 Start switching Preferences dialog to Glade.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39177
diff changeset
237
41397
91e5ee47f5a1 Cleanup pidgin prefs
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41394
diff changeset
238 /******************************************************************************
91e5ee47f5a1 Cleanup pidgin prefs
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41394
diff changeset
239 * API
91e5ee47f5a1 Cleanup pidgin prefs
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41394
diff changeset
240 *****************************************************************************/
39178
53a96425ffc0 Start switching Preferences dialog to Glade.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39177
diff changeset
241 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
242 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
243 {
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 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
245 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
246
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 /* 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
248 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
249 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
250
e7d643f4de4b Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 22412
diff changeset
251 /* 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
252 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
253 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
254 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
255 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
256
33508
188563e24535 Migrate and correctly create VV prefs.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 33507
diff changeset
257 /* Voice/Video */
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");
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/audio");
188563e24535 Migrate and correctly create VV prefs.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 33507
diff changeset
260 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
261 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
262 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
263 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
264 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
265 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
266 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
267 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
268 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
269 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
270
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
271 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
272 }
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
27493
96dc1b8abdf9 You should check the indenting before a copy & paste...
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 27451
diff changeset
274 void
96dc1b8abdf9 You should check the indenting before a copy & paste...
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 27451
diff changeset
275 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
276 {
40547
86e0c5080a58 vv: Switch to GTK sinks by default.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 40542
diff changeset
277 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
278
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
279 /* 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
280 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
281
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_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
283 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
284
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 /* 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
286 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
287 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
288 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
289 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
290 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
291 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
292 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
293 purple_prefs_remove(PIDGIN_PREFS_ROOT "/blist/x");
b31b810fe6db gtkblist: Remove blist position storage
Mike Ruprecht <cmaiku@gmail.com>
parents: 39281
diff changeset
294 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
295 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
296 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
297 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
298 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
299 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
300 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
301 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
302 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
303 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
304 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
305 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
306 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
307 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
308 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
309 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
310 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
311 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
312 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
313 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
314 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
315 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
316 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
317 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
318 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
319 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
320 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
321 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
322 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
323 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
324 purple_prefs_remove(PIDGIN_PREFS_ROOT "/sound/command");
6748a5ec6644 remove the old sound api
Gary Kramlich <grim@reaperworld.com>
parents: 40504
diff changeset
325 purple_prefs_remove(PIDGIN_PREFS_ROOT "/sound/conv_focus");
6748a5ec6644 remove the old sound api
Gary Kramlich <grim@reaperworld.com>
parents: 40504
diff changeset
326 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
327 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
328 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
329 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
330 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
331 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
332 purple_prefs_remove(PIDGIN_PREFS_ROOT "/sound/enabled/login");
6748a5ec6644 remove the old sound api
Gary Kramlich <grim@reaperworld.com>
parents: 40504
diff changeset
333 purple_prefs_remove(PIDGIN_PREFS_ROOT "/sound/enabled/logout");
6748a5ec6644 remove the old sound api
Gary Kramlich <grim@reaperworld.com>
parents: 40504
diff changeset
334 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
335 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
336 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
337 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
338 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
339 purple_prefs_remove(PIDGIN_PREFS_ROOT "/sound/enabled");
6748a5ec6644 remove the old sound api
Gary Kramlich <grim@reaperworld.com>
parents: 40504
diff changeset
340 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
341 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
342 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
343 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
344 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
345 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
346 purple_prefs_remove(PIDGIN_PREFS_ROOT "/sound/file/login");
6748a5ec6644 remove the old sound api
Gary Kramlich <grim@reaperworld.com>
parents: 40504
diff changeset
347 purple_prefs_remove(PIDGIN_PREFS_ROOT "/sound/file/logout");
6748a5ec6644 remove the old sound api
Gary Kramlich <grim@reaperworld.com>
parents: 40504
diff changeset
348 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
349 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
350 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
351 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
352 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
353 purple_prefs_remove(PIDGIN_PREFS_ROOT "/sound/file");
6748a5ec6644 remove the old sound api
Gary Kramlich <grim@reaperworld.com>
parents: 40504
diff changeset
354 purple_prefs_remove(PIDGIN_PREFS_ROOT "/sound/method");
6748a5ec6644 remove the old sound api
Gary Kramlich <grim@reaperworld.com>
parents: 40504
diff changeset
355 purple_prefs_remove(PIDGIN_PREFS_ROOT "/sound/mute");
6748a5ec6644 remove the old sound api
Gary Kramlich <grim@reaperworld.com>
parents: 40504
diff changeset
356 purple_prefs_remove(PIDGIN_PREFS_ROOT "/sound/theme");
6748a5ec6644 remove the old sound api
Gary Kramlich <grim@reaperworld.com>
parents: 40504
diff changeset
357 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
358
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 "/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
360 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
361 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
362
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_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
364 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
365 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
366 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
367 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
368 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
369 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
370 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
371
188563e24535 Migrate and correctly create VV prefs.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 33507
diff changeset
372 /* Fixup vvconfig plugin prefs */
188563e24535 Migrate and correctly create VV prefs.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 33507
diff changeset
373 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
374 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
375 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
376 }
188563e24535 Migrate and correctly create VV prefs.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 33507
diff changeset
377 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
378 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
379 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
380 }
188563e24535 Migrate and correctly create VV prefs.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 33507
diff changeset
381 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
382 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
383 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
384 }
188563e24535 Migrate and correctly create VV prefs.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 33507
diff changeset
385 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
386 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
387 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
388 }
188563e24535 Migrate and correctly create VV prefs.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 33507
diff changeset
389
40547
86e0c5080a58 vv: Switch to GTK sinks by default.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 40542
diff changeset
390 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
391 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
392 /* 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
393 /* video_sink = "gtkglsink"; */
40547
86e0c5080a58 vv: Switch to GTK sinks by default.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 40542
diff changeset
394 /* 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
395 video_sink = "gtksink";
86e0c5080a58 vv: Switch to GTK sinks by default.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 40542
diff changeset
396 } else {
86e0c5080a58 vv: Switch to GTK sinks by default.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 40542
diff changeset
397 /* 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
398 video_sink = "gtksink";
86e0c5080a58 vv: Switch to GTK sinks by default.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 40542
diff changeset
399 }
86e0c5080a58 vv: Switch to GTK sinks by default.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 40542
diff changeset
400 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
401
33508
188563e24535 Migrate and correctly create VV prefs.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 33507
diff changeset
402 purple_prefs_remove("/plugins/core/vvconfig");
188563e24535 Migrate and correctly create VV prefs.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 33507
diff changeset
403 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
404
37886
d4ed67195cbf gtkprefs: rework Voice/Video preferences page
Jakub Adam <jakub.adam@ktknet.cz>
parents: 37677
diff changeset
405 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
406 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
407 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
408 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
409 }
33508
188563e24535 Migrate and correctly create VV prefs.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 33507
diff changeset
410

mercurial