Wed, 30 Apr 2008 22:52:16 +0000
Add a tickybox to set the 'close conversation window' shortcut to Escape.
If you set a custom accelerator, then toggle this tickybox on and off again,
it'll be reset to ^W not your custom one. Do we care?
|
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
|
1 | /** |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2 | * @file gtkprefs.c GTK+ Preferences |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
3 | * @ingroup pidgin |
|
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 | |
|
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 | /* pidgin |
|
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 | * |
|
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 | * 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
|
9 | * 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
|
10 | * 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
|
11 | * |
|
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 | * 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
|
13 | * 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
|
14 | * 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
|
15 | * (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
|
16 | * |
|
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 | * 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
|
18 | * 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
|
19 | * 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
|
20 | * 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
|
21 | * |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
22 | * You should have received a copy of the GNU General Public License |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
23 | * along with this program; if not, write to the Free Software |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
24 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
25 | * |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
26 | */ |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
27 | #include "internal.h" |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
28 | #include "pidgin.h" |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
29 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
30 | #include "debug.h" |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
31 | #include "notify.h" |
|
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 | #include "prefs.h" |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
33 | #include "proxy.h" |
|
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 | #include "prpl.h" |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
35 | #include "request.h" |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
36 | #include "savedstatuses.h" |
|
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 "sound.h" |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
38 | #include "util.h" |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
39 | #include "network.h" |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
40 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
41 | #include "gtkblist.h" |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
42 | #include "gtkconv.h" |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
43 | #include "gtkdebug.h" |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
44 | #include "gtkdialogs.h" |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
45 | #include "gtkimhtml.h" |
|
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 | #include "gtkimhtmltoolbar.h" |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
47 | #include "gtkprefs.h" |
|
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 | #include "gtksavedstatuses.h" |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
49 | #include "gtksound.h" |
|
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 | #include "gtkthemes.h" |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
51 | #include "gtkutils.h" |
|
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 | #include "pidginstock.h" |
|
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 | |
|
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 | #define PROXYHOST 0 |
|
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 | #define PROXYPORT 1 |
|
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 | #define PROXYUSER 2 |
|
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 | #define PROXYPASS 3 |
|
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 | |
|
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 | static int sound_row_sel = 0; |
|
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 | static GtkWidget *prefsnotebook; |
|
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 | static GtkWidget *sound_entry = 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
|
63 | static GtkListStore *smiley_theme_store = 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
|
64 | static GtkTreeSelection *smiley_theme_sel = 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
|
65 | static GtkWidget *prefs_proxy_frame = 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
|
66 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
67 | static GtkWidget *prefs = 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
|
68 | static GtkWidget *debugbutton = 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
|
69 | static int notebook_page = 0; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
70 | static GtkTreeRowReference *previous_smiley_row = 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
|
71 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
72 | /* |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
73 | * PROTOTYPES |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
74 | */ |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
75 | static void delete_prefs(GtkWidget *, 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
|
76 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
77 | static 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
|
78 | update_spin_value(GtkWidget *w, GtkWidget *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
|
79 | { |
|
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 | 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
|
81 | 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
|
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 | 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
|
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 | 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
|
86 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
87 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
88 | GtkWidget * |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
89 | pidgin_prefs_labeled_spin_button(GtkWidget *box, const gchar *title, |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
90 | const char *key, int min, int max, GtkSizeGroup *sg) |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
91 | { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
92 | GtkWidget *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
|
93 | GtkObject *adjust; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
94 | int 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
|
95 | |
|
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 | val = purple_prefs_get_int(key); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
97 | |
|
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 | adjust = gtk_adjustment_new(val, min, max, 1, 1, 1); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
99 | spin = gtk_spin_button_new(GTK_ADJUSTMENT(adjust), 1, 0); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
100 | g_object_set_data(G_OBJECT(spin), "val", (char *)key); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
101 | if (max < 10000) |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
102 | gtk_widget_set_size_request(spin, 50, -1); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
103 | else |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
104 | gtk_widget_set_size_request(spin, 60, -1); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
105 | g_signal_connect(G_OBJECT(adjust), "value-changed", |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
106 | G_CALLBACK(update_spin_value), GTK_WIDGET(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
|
107 | gtk_widget_show(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
|
108 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
109 | return pidgin_add_widget_to_vbox(GTK_BOX(box), title, sg, spin, FALSE, 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
|
110 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
111 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
112 | static 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
|
113 | entry_set(GtkEntry *entry, gpointer 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
|
114 | 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
|
115 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
116 | purple_prefs_set_string(key, gtk_entry_get_text(entry)); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
117 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
118 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
119 | GtkWidget * |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
120 | pidgin_prefs_labeled_entry(GtkWidget *page, const gchar *title, |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
121 | const char *key, GtkSizeGroup *sg) |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
122 | { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
123 | GtkWidget *entry; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
124 | const gchar *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
|
125 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
126 | value = purple_prefs_get_string(key); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
127 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
128 | entry = gtk_entry_new(); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
129 | gtk_entry_set_text(GTK_ENTRY(entry), 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
|
130 | g_signal_connect(G_OBJECT(entry), "changed", |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
131 | G_CALLBACK(entry_set), (char*)key); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
132 | gtk_widget_show(entry); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
133 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
134 | return pidgin_add_widget_to_vbox(GTK_BOX(page), title, sg, entry, TRUE, 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
|
135 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
136 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
137 | static 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
|
138 | dropdown_set(GObject *w, const char *key) |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
139 | { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
140 | const char *str_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
|
141 | int 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
|
142 | PurplePrefType 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
|
143 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
144 | type = GPOINTER_TO_INT(g_object_get_data(w, "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
|
145 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
146 | if (type == PURPLE_PREF_INT) { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
147 | int_value = GPOINTER_TO_INT(g_object_get_data(w, "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
|
148 | |
|
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 | purple_prefs_set_int(key, 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
|
150 | } |
|
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 | else if (type == PURPLE_PREF_STRING) { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
152 | str_value = (const char *)g_object_get_data(w, "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
|
153 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
154 | purple_prefs_set_string(key, str_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
|
155 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
156 | else if (type == PURPLE_PREF_BOOLEAN) { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
157 | purple_prefs_set_bool(key, |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
158 | GPOINTER_TO_INT(g_object_get_data(w, "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
|
159 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
160 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
161 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
162 | GtkWidget * |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
163 | pidgin_prefs_dropdown_from_list(GtkWidget *box, const gchar *title, |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
164 | PurplePrefType type, const char *key, GList *menuitems) |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
165 | { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
166 | GtkWidget *dropdown, *opt, *menu; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
167 | GtkWidget *label = 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
|
168 | gchar *text; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
169 | const char *stored_str = 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
|
170 | int stored_int = 0; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
171 | int int_value = 0; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
172 | const char *str_value = 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
|
173 | int o = 0; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
174 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
175 | g_return_val_if_fail(menuitems != NULL, 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
|
176 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
177 | #if 0 /* GTK_CHECK_VERSION(2,4,0) */ |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
178 | if(type == PURPLE_PREF_INT) |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
179 | model = gtk_list_store_new(2, G_TYPE_STRING, G_TYPE_INT); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
180 | else if(type == PURPLE_PREF_STRING) |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
181 | model = gtk_list_store_new(2, G_TYPE_STRING, G_TYPE_STRING); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
182 | dropdown = gtk_combo_box_new_with_model(model); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
183 | #else |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
184 | dropdown = gtk_option_menu_new(); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
185 | menu = gtk_menu_new(); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
186 | #endif |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
187 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
188 | if (type == PURPLE_PREF_INT) |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
189 | stored_int = purple_prefs_get_int(key); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
190 | else if (type == PURPLE_PREF_STRING) |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
191 | stored_str = purple_prefs_get_string(key); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
192 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
193 | while (menuitems != NULL && (text = (char *) menuitems->data) != 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
|
194 | menuitems = g_list_next(menuitems); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
195 | g_return_val_if_fail(menuitems != NULL, 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
|
196 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
197 | opt = gtk_menu_item_new_with_label(text); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
198 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
199 | g_object_set_data(G_OBJECT(opt), "type", GINT_TO_POINTER(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
|
200 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
201 | if (type == PURPLE_PREF_INT) { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
202 | int_value = GPOINTER_TO_INT(menuitems->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
|
203 | g_object_set_data(G_OBJECT(opt), "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
|
204 | GINT_TO_POINTER(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
|
205 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
206 | else if (type == PURPLE_PREF_STRING) { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
207 | str_value = (const char *)menuitems->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
|
208 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
209 | g_object_set_data(G_OBJECT(opt), "value", (char *)str_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
|
210 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
211 | else if (type == PURPLE_PREF_BOOLEAN) { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
212 | g_object_set_data(G_OBJECT(opt), "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
|
213 | menuitems->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
|
214 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
215 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
216 | g_signal_connect(G_OBJECT(opt), "activate", |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
217 | G_CALLBACK(dropdown_set), (char *)key); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
218 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
219 | gtk_widget_show(opt); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
220 | gtk_menu_shell_append(GTK_MENU_SHELL(menu), opt); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
221 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
222 | if ((type == PURPLE_PREF_INT && stored_int == 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
|
223 | (type == PURPLE_PREF_STRING && stored_str != 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
|
224 | !strcmp(stored_str, str_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
|
225 | (type == PURPLE_PREF_BOOLEAN && |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
226 | (purple_prefs_get_bool(key) == GPOINTER_TO_INT(menuitems->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
|
227 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
228 | gtk_menu_set_active(GTK_MENU(menu), o); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
229 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
230 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
231 | menuitems = g_list_next(menuitems); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
232 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
233 | o++; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
234 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
235 | |
|
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 | gtk_option_menu_set_menu(GTK_OPTION_MENU(dropdown), menu); |
|
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 | pidgin_add_widget_to_vbox(GTK_BOX(box), title, NULL, dropdown, FALSE, &label); |
|
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 | |
|
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 | return label; |
|
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 | } |
|
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 | |
|
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 | GtkWidget * |
|
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 | pidgin_prefs_dropdown(GtkWidget *box, const gchar *title, PurplePrefType 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
|
245 | const char *key, ...) |
|
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 | va_list ap; |
|
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 | GList *menuitems = 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
|
249 | GtkWidget *dropdown = 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 | char *name; |
|
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 | int 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
|
252 | const char *str_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
|
253 | |
|
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 | g_return_val_if_fail(type == PURPLE_PREF_BOOLEAN || type == PURPLE_PREF_INT || |
|
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 | type == PURPLE_PREF_STRING, 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
|
256 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
257 | va_start(ap, key); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
258 | while ((name = va_arg(ap, char *)) != 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
|
259 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
260 | menuitems = g_list_prepend(menuitems, name); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
261 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
262 | if (type == PURPLE_PREF_INT || type == PURPLE_PREF_BOOLEAN) { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
263 | int_value = va_arg(ap, int); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
264 | menuitems = g_list_prepend(menuitems, GINT_TO_POINTER(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
|
265 | } |
|
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 | else { |
|
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 | str_value = va_arg(ap, const char *); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
268 | menuitems = g_list_prepend(menuitems, (char *)str_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
|
269 | } |
|
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 | } |
|
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 | va_end(ap); |
|
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 | g_return_val_if_fail(menuitems != NULL, 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
|
274 | |
|
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 | menuitems = g_list_reverse(menuitems); |
|
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 | |
|
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 | dropdown = pidgin_prefs_dropdown_from_list(box, title, type, key, |
|
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 | menuitems); |
|
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 | |
|
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 | g_list_free(menuitems); |
|
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 | return dropdown; |
|
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 | } |
|
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 | static 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
|
286 | delete_prefs(GtkWidget *asdf, void *gdsa) |
|
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 | { |
|
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 | /* Close any "select sound" request dialogs */ |
|
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_request_close_with_handle(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
|
290 | |
|
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 | /* Unregister callbacks. */ |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
292 | purple_prefs_disconnect_by_handle(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
|
293 | |
|
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 | prefs = 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
|
295 | sound_entry = 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
|
296 | debugbutton = 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
|
297 | notebook_page = 0; |
|
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 | smiley_theme_store = 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
|
299 | if (previous_smiley_row) |
|
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 | gtk_tree_row_reference_free(previous_smiley_row); |
|
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 | previous_smiley_row = 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
|
302 | |
|
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 | } |
|
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 | |
|
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 | static void smiley_sel(GtkTreeSelection *sel, GtkTreeModel *model) { |
|
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 | GtkTreeIter iter; |
|
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 | const char *themename; |
|
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 | char *description; |
|
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 | GValue 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
|
310 | GtkTreePath *path, *oldpath; |
|
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 | struct smiley_theme *new_theme, *old_theme; |
|
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 | GtkWidget *remove_button = g_object_get_data(G_OBJECT(sel), "remove_button"); |
|
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 | |
|
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 | if (!gtk_tree_selection_get_selected(sel, &model, &iter)) { |
|
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 | gtk_widget_set_sensitive(remove_button, FALSE); |
|
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 | return; |
|
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 | } |
|
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 | |
|
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 | old_theme = current_smiley_theme; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
320 | val.g_type = 0; |
|
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 | gtk_tree_model_get_value(model, &iter, 3, &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
|
322 | path = gtk_tree_model_get_path(model, &iter); |
|
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 | themename = g_value_get_string(&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
|
324 | purple_prefs_set_string(PIDGIN_PREFS_ROOT "/smileys/theme", themename); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
325 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
326 | gtk_widget_set_sensitive(remove_button, (strcmp(themename, "none") && |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
327 | strcmp(themename, _("Default")))); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
328 | g_value_unset (&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
|
329 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
330 | /* current_smiley_theme is set in callback for the above pref change */ |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
331 | new_theme = current_smiley_theme; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
332 | description = g_strdup_printf("<span size='larger' weight='bold'>%s</span> - %s\n" |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
333 | "<span size='smaller' foreground='white'>%s</span>", |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
334 | _(new_theme->name), _(new_theme->author), _(new_theme->desc)); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
335 | gtk_list_store_set(smiley_theme_store, &iter, 1, description, -1); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
336 | g_free(description); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
337 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
338 | if (new_theme != old_theme && previous_smiley_row) { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
339 | oldpath = gtk_tree_row_reference_get_path(previous_smiley_row); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
340 | if (gtk_tree_model_get_iter(model, &iter, oldpath)) { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
341 | description = g_strdup_printf("<span size='larger' weight='bold'>%s</span> - %s\n" |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
342 | "<span size='smaller' foreground='dim grey'>%s</span>", |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
343 | _(old_theme->name), _(old_theme->author), _(old_theme->desc)); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
344 | gtk_list_store_set(smiley_theme_store, &iter, 1, |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
345 | description, -1); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
346 | g_free(description); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
347 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
348 | gtk_tree_path_free(oldpath); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
349 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
350 | if (previous_smiley_row) |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
351 | gtk_tree_row_reference_free(previous_smiley_row); |
|
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 | previous_smiley_row = gtk_tree_row_reference_new(model, path); |
|
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 | gtk_tree_path_free(path); |
|
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 | } |
|
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 | |
|
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 | static GtkTreeRowReference *theme_refresh_theme_list(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
|
357 | { |
|
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 | GdkPixbuf *pixbuf; |
|
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 | GSList *themes; |
|
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 | GtkTreeIter iter; |
|
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 | GtkTreeRowReference *row_ref = 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
|
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 | if (previous_smiley_row) |
|
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 | gtk_tree_row_reference_free(previous_smiley_row); |
|
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 | previous_smiley_row = 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
|
366 | |
|
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 | pidgin_themes_smiley_theme_probe(); |
|
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 | |
|
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 | if (!(themes = smiley_themes)) |
|
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 | return 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
|
371 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
372 | gtk_list_store_clear(smiley_theme_store); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
373 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
374 | while (themes) { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
375 | struct smiley_theme *theme = themes->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
|
376 | char *description = g_strdup_printf("<span size='larger' weight='bold'>%s</span> - %s\n" |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
377 | "<span size='smaller' foreground='dim grey'>%s</span>", |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
378 | _(theme->name), _(theme->author), _(theme->desc)); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
379 | gtk_list_store_append (smiley_theme_store, &iter); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
380 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
381 | /* |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
382 | * LEAK - Gentoo memprof thinks pixbuf is leaking here... but it |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
383 | * looks like it should be ok to me. Anyone know what's up? --Mark |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
384 | */ |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
385 | pixbuf = (theme->icon ? gdk_pixbuf_new_from_file(theme->icon, NULL) : 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
|
386 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
387 | gtk_list_store_set(smiley_theme_store, &iter, |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
388 | 0, pixbuf, |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
389 | 1, description, |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
390 | 2, theme->path, |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
391 | 3, theme->name, |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
392 | -1); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
393 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
394 | if (pixbuf != 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
|
395 | g_object_unref(G_OBJECT(pixbuf)); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
396 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
397 | g_free(description); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
398 | themes = themes->next; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
399 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
400 | /* If this is the currently selected theme, |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
401 | * we will need to select it. Grab the row reference. */ |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
402 | if (theme == current_smiley_theme) { |
|
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 | GtkTreePath *path = gtk_tree_model_get_path( |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
404 | GTK_TREE_MODEL(smiley_theme_store), &iter); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
405 | row_ref = gtk_tree_row_reference_new( |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
406 | GTK_TREE_MODEL(smiley_theme_store), path); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
407 | gtk_tree_path_free(path); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
408 | } |
|
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 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
410 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
411 | return row_ref; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
412 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
413 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
414 | static void theme_install_theme(char *path, char *extn) { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
415 | #ifndef _WIN32 |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
416 | gchar *command; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
417 | #endif |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
418 | gchar *destdir; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
419 | gchar *tail; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
420 | GtkTreeRowReference *theme_rowref; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
421 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
422 | /* Just to be safe */ |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
423 | g_strchomp(path); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
424 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
425 | /* I dont know what you are, get out of here */ |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
426 | if (extn != 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
|
427 | tail = extn; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
428 | else if ((tail = strrchr(path, '.')) == 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
|
429 | return; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
430 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
431 | destdir = g_strconcat(purple_user_dir(), G_DIR_SEPARATOR_S "smileys", 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
|
432 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
433 | /* We'll check this just to make sure. This also lets us do something different on |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
434 | * other platforms, if need be */ |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
435 | if (!g_ascii_strcasecmp(tail, ".gz") || !g_ascii_strcasecmp(tail, ".tgz")) { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
436 | #ifndef _WIN32 |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
437 | gchar *path_escaped = g_shell_quote(path); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
438 | gchar *destdir_escaped = g_shell_quote(destdir); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
439 | command = g_strdup_printf("tar > /dev/null xzf %s -C %s", path_escaped, destdir_escaped); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
440 | g_free(path_escaped); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
441 | g_free(destdir_escaped); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
442 | #else |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
443 | if(!winpidgin_gz_untar(path, destdir)) { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
444 | g_free(destdir); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
445 | return; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
446 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
447 | #endif |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
448 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
449 | else { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
450 | g_free(destdir); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
451 | return; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
452 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
453 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
454 | #ifndef _WIN32 |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
455 | /* Fire! */ |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
456 | if (system(command)) |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
457 | { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
458 | purple_notify_error(NULL, NULL, _("Smiley theme failed to unpack."), 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
|
459 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
460 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
461 | g_free(command); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
462 | #endif |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
463 | g_free(destdir); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
464 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
465 | theme_rowref = theme_refresh_theme_list(); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
466 | if (theme_rowref != 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
|
467 | GtkTreePath *tp = gtk_tree_row_reference_get_path(theme_rowref); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
468 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
469 | if (tp) |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
470 | gtk_tree_selection_select_path(smiley_theme_sel, tp); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
471 | gtk_tree_row_reference_free(theme_rowref); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
472 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
473 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
474 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
475 | static 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
|
476 | theme_got_url(PurpleUtilFetchUrlData *url_data, gpointer user_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
|
477 | const gchar *themedata, size_t len, const gchar *error_message) |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
478 | { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
479 | FILE *f; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
480 | gchar *path; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
481 | size_t wc; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
482 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
483 | if ((error_message != NULL) || (len == 0)) |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
484 | return; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
485 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
486 | f = purple_mkstemp(&path, TRUE); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
487 | wc = fwrite(themedata, len, 1, f); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
488 | if (wc != 1) { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
489 | purple_debug_warning("theme_got_url", "Unable to write theme data.\n"); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
490 | fclose(f); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
491 | g_unlink(path); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
492 | g_free(path); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
493 | return; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
494 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
495 | fclose(f); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
496 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
497 | theme_install_theme(path, user_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
|
498 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
499 | g_unlink(path); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
500 | g_free(path); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
501 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
502 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
503 | static 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
|
504 | theme_dnd_recv(GtkWidget *widget, GdkDragContext *dc, guint x, guint 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
|
505 | GtkSelectionData *sd, guint info, guint t, gpointer 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
|
506 | { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
507 | gchar *name = (gchar *)sd->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
|
508 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
509 | if ((sd->length >= 0) && (sd->format == 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
|
510 | /* Well, it looks like the drag event was cool. |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
511 | * Let's do something with it */ |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
512 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
513 | if (!g_ascii_strncasecmp(name, "file://", 7)) { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
514 | GError *converr = 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
|
515 | gchar *tmp; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
516 | /* It looks like we're dealing with a local file. Let's |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
517 | * just untar it in the right place */ |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
518 | if(!(tmp = g_filename_from_uri(name, NULL, &converr))) { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
519 | purple_debug(PURPLE_DEBUG_ERROR, "theme dnd", "%s\n", |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
520 | (converr ? converr->message : |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
521 | "g_filename_from_uri error")); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
522 | return; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
523 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
524 | theme_install_theme(tmp, 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
|
525 | g_free(tmp); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
526 | } else if (!g_ascii_strncasecmp(name, "http://", 7)) { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
527 | /* Oo, a web drag and drop. This is where things |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
528 | * will start to get interesting */ |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
529 | purple_util_fetch_url(name, TRUE, NULL, FALSE, theme_got_url, ".tgz"); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
530 | } else if (!g_ascii_strncasecmp(name, "https://", 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
|
531 | /* purple_util_fetch_url() doesn't support HTTPS, but we want users |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
532 | * to be able to drag and drop links from the SF trackers, so |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
533 | * we'll try it as an HTTP URL. */ |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
534 | char *tmp = g_strdup(name + 1); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
535 | tmp[0] = 'h'; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
536 | tmp[1] = 't'; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
537 | tmp[2] = 't'; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
538 | tmp[3] = 'p'; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
539 | purple_util_fetch_url(tmp, TRUE, NULL, FALSE, theme_got_url, ".tgz"); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
540 | g_free(tmp); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
541 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
542 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
543 | gtk_drag_finish(dc, TRUE, FALSE, t); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
544 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
545 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
546 | gtk_drag_finish(dc, FALSE, FALSE, t); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
547 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
548 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
549 | /* Does same as normal sort, except "none" is sorted first */ |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
550 | static gint pidgin_sort_smileys (GtkTreeModel *model, |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
551 | GtkTreeIter *a, |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
552 | GtkTreeIter *b, |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
553 | gpointer userdata) |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
554 | { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
555 | gint ret = 0; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
556 | gchar *name1 = NULL, *name2 = 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
|
557 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
558 | gtk_tree_model_get(model, a, 3, &name1, -1); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
559 | gtk_tree_model_get(model, b, 3, &name2, -1); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
560 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
561 | if (name1 == NULL || name2 == 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
|
562 | if (!(name1 == NULL && name2 == 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
|
563 | ret = (name1 == NULL) ? -1: 1; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
564 | } else if (!g_ascii_strcasecmp(name1, "none")) { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
565 | if (!g_utf8_collate(name1, name2)) |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
566 | ret = 0; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
567 | else |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
568 | /* Sort name1 first */ |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
569 | ret = -1; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
570 | } else if (!g_ascii_strcasecmp(name2, "none")) { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
571 | /* Sort name2 first */ |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
572 | ret = 1; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
573 | } else { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
574 | /* Neither string is "none", default to normal sort */ |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
575 | ret = purple_utf8_strcasecmp(name1,name2); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
576 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
577 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
578 | g_free(name1); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
579 | g_free(name2); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
580 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
581 | return ret; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
582 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
583 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
584 | static 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
|
585 | request_theme_file_name_cb(gpointer data, char *theme_file_name) |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
586 | { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
587 | theme_install_theme(theme_file_name, 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
|
588 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
589 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
590 | static 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
|
591 | add_theme_button_clicked_cb(GtkWidget *widget, gpointer 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
|
592 | { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
593 | purple_request_file(NULL, _("Install Theme"), NULL, FALSE, (GCallback)request_theme_file_name_cb, NULL, NULL, NULL, NULL, 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
|
594 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
595 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
596 | static 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
|
597 | remove_theme_button_clicked_cb(GtkWidget *button, GtkTreeView *tv) |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
598 | { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
599 | char *theme_name = NULL, *theme_file = 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
|
600 | GtkTreeModel *tm; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
601 | GtkTreeIter itr; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
602 | GtkTreeRowReference *trr = 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
|
603 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
604 | if ((tm = gtk_tree_view_get_model(tv)) == 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
|
605 | return; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
606 | if (!gtk_tree_selection_get_selected(smiley_theme_sel, NULL, &itr)) |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
607 | return; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
608 | gtk_tree_model_get(tm, &itr, 2, &theme_file, 3, &theme_name, -1); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
609 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
610 | if (theme_file && theme_name && strcmp(theme_name, "none")) |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
611 | pidgin_themes_remove_smiley_theme(theme_file); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
612 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
613 | if ((trr = theme_refresh_theme_list()) != 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
|
614 | GtkTreePath *tp = gtk_tree_row_reference_get_path(trr); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
615 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
616 | if (tp) { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
617 | gtk_tree_selection_select_path(smiley_theme_sel, tp); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
618 | gtk_tree_path_free(tp); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
619 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
620 | gtk_tree_row_reference_free(trr); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
621 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
622 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
623 | g_free(theme_file); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
624 | g_free(theme_name); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
625 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
626 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
627 | static GtkWidget * |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
628 | theme_page(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
|
629 | { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
630 | GtkWidget *add_button, *remove_button; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
631 | GtkWidget *hbox_buttons; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
632 | GtkWidget *alignment; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
633 | GtkWidget *ret; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
634 | GtkWidget *sw; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
635 | GtkWidget *view; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
636 | GtkCellRenderer *rend; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
637 | GtkTreeViewColumn *col; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
638 | GtkTreeSelection *sel; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
639 | GtkTreeRowReference *rowref; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
640 | GtkWidget *label; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
641 | GtkTargetEntry te[3] = {{"text/plain", 0, 0},{"text/uri-list", 0, 1},{"STRING", 0, 2}}; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
642 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
643 | ret = gtk_vbox_new(FALSE, PIDGIN_HIG_CAT_SPACE); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
644 | gtk_container_set_border_width (GTK_CONTAINER (ret), PIDGIN_HIG_BORDER); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
645 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
646 | label = gtk_label_new(_("Select a smiley theme that you would like to use from the list below. New themes can be installed by dragging and dropping them onto the theme list.")); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
647 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
648 | gtk_label_set_line_wrap(GTK_LABEL(label), TRUE); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
649 | gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
650 | gtk_label_set_justify(GTK_LABEL(label), GTK_JUSTIFY_LEFT); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
651 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
652 | gtk_box_pack_start(GTK_BOX(ret), label, FALSE, TRUE, 0); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
653 | gtk_widget_show(label); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
654 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
655 | sw = gtk_scrolled_window_new(NULL,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
|
656 | gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
657 | gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_IN); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
658 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
659 | gtk_box_pack_start(GTK_BOX(ret), sw, TRUE, TRUE, 0); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
660 | smiley_theme_store = gtk_list_store_new (4, GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
661 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
662 | rowref = theme_refresh_theme_list(); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
663 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
664 | view = gtk_tree_view_new_with_model (GTK_TREE_MODEL(smiley_theme_store)); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
665 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
666 | gtk_drag_dest_set(view, GTK_DEST_DEFAULT_MOTION | GTK_DEST_DEFAULT_HIGHLIGHT | GTK_DEST_DEFAULT_DROP, te, |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
667 | sizeof(te) / sizeof(GtkTargetEntry) , GDK_ACTION_COPY | GDK_ACTION_MOVE); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
668 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
669 | g_signal_connect(G_OBJECT(view), "drag_data_received", G_CALLBACK(theme_dnd_recv), smiley_theme_store); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
670 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
671 | rend = gtk_cell_renderer_pixbuf_new(); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
672 | smiley_theme_sel = sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (view)); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
673 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
674 | /* Custom sort so "none" theme is at top of list */ |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
675 | gtk_tree_sortable_set_sort_func(GTK_TREE_SORTABLE(smiley_theme_store), |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
676 | 3, pidgin_sort_smileys, NULL, 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
|
677 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
678 | gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(smiley_theme_store), |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
679 | 3, GTK_SORT_ASCENDING); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
680 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
681 | col = gtk_tree_view_column_new_with_attributes (_("Icon"), |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
682 | rend, |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
683 | "pixbuf", 0, |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
684 | 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
|
685 | gtk_tree_view_append_column (GTK_TREE_VIEW(view), col); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
686 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
687 | rend = gtk_cell_renderer_text_new(); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
688 | col = gtk_tree_view_column_new_with_attributes (_("Description"), |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
689 | rend, |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
690 | "markup", 1, |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
691 | 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
|
692 | gtk_tree_view_append_column (GTK_TREE_VIEW(view), col); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
693 | g_object_unref(G_OBJECT(smiley_theme_store)); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
694 | gtk_container_add(GTK_CONTAINER(sw), view); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
695 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
696 | g_signal_connect(G_OBJECT(sel), "changed", G_CALLBACK(smiley_sel), 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
|
697 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
698 | alignment = gtk_alignment_new(1.0, 0.5, 0.0, 1.0); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
699 | gtk_widget_show(alignment); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
700 | gtk_box_pack_start(GTK_BOX(ret), alignment, FALSE, TRUE, 0); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
701 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
702 | hbox_buttons = gtk_hbox_new(TRUE, PIDGIN_HIG_CAT_SPACE); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
703 | gtk_widget_show(hbox_buttons); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
704 | gtk_container_add(GTK_CONTAINER(alignment), hbox_buttons); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
705 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
706 | add_button = gtk_button_new_from_stock(GTK_STOCK_ADD); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
707 | gtk_widget_show(add_button); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
708 | gtk_box_pack_start(GTK_BOX(hbox_buttons), add_button, FALSE, TRUE, 0); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
709 | g_signal_connect(G_OBJECT(add_button), "clicked", (GCallback)add_theme_button_clicked_cb, view); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
710 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
711 | remove_button = gtk_button_new_from_stock(GTK_STOCK_REMOVE); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
712 | gtk_widget_show(remove_button); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
713 | gtk_box_pack_start(GTK_BOX(hbox_buttons), remove_button, FALSE, TRUE, 0); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
714 | g_signal_connect(G_OBJECT(remove_button), "clicked", (GCallback)remove_theme_button_clicked_cb, view); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
715 | g_object_set_data(G_OBJECT(sel), "remove_button", remove_button); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
716 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
717 | if (rowref) { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
718 | GtkTreePath *path = gtk_tree_row_reference_get_path(rowref); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
719 | gtk_tree_row_reference_free(rowref); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
720 | gtk_tree_selection_select_path(sel, path); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
721 | gtk_tree_path_free(path); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
722 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
723 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
724 | gtk_widget_show_all(ret); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
725 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
726 | pidgin_set_accessible_label (view, label); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
727 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
728 | return ret; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
729 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
730 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
731 | static 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
|
732 | formatting_toggle_cb(GtkIMHtml *imhtml, GtkIMHtmlButtons buttons, void *toolbar) |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
733 | { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
734 | gboolean bold, italic, uline; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
735 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
736 | gtk_imhtml_get_current_format(GTK_IMHTML(imhtml), |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
737 | &bold, &italic, &uline); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
738 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
739 | if (buttons & GTK_IMHTML_BOLD) |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
740 | purple_prefs_set_bool(PIDGIN_PREFS_ROOT "/conversations/send_bold", bold); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
741 | if (buttons & GTK_IMHTML_ITALIC) |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
742 | purple_prefs_set_bool(PIDGIN_PREFS_ROOT "/conversations/send_italic", italic); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
743 | if (buttons & GTK_IMHTML_UNDERLINE) |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
744 | purple_prefs_set_bool(PIDGIN_PREFS_ROOT "/conversations/send_underline", uline); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
745 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
746 | if (buttons & GTK_IMHTML_GROW || buttons & GTK_IMHTML_SHRINK) |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
747 | purple_prefs_set_int(PIDGIN_PREFS_ROOT "/conversations/font_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
|
748 | gtk_imhtml_get_current_fontsize(GTK_IMHTML(imhtml))); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
749 | if (buttons & GTK_IMHTML_FACE) { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
750 | char *face = gtk_imhtml_get_current_fontface(GTK_IMHTML(imhtml)); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
751 | if (!face) |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
752 | face = g_strdup(""); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
753 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
754 | purple_prefs_set_string(PIDGIN_PREFS_ROOT "/conversations/font_face", face); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
755 | g_free(face); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
756 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
757 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
758 | if (buttons & GTK_IMHTML_FORECOLOR) { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
759 | char *color = gtk_imhtml_get_current_forecolor(GTK_IMHTML(imhtml)); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
760 | if (!color) |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
761 | color = g_strdup(""); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
762 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
763 | purple_prefs_set_string(PIDGIN_PREFS_ROOT "/conversations/fgcolor", color); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
764 | g_free(color); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
765 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
766 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
767 | if (buttons & GTK_IMHTML_BACKCOLOR) { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
768 | char *color; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
769 | GObject *object; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
770 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
771 | color = gtk_imhtml_get_current_backcolor(GTK_IMHTML(imhtml)); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
772 | if (!color) |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
773 | color = g_strdup(""); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
774 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
775 | /* Block the signal to prevent a loop. */ |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
776 | object = g_object_ref(G_OBJECT(imhtml)); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
777 | g_signal_handlers_block_matched(object, G_SIGNAL_MATCH_DATA, 0, 0, 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
|
778 | NULL, toolbar); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
779 | /* Clear the backcolor. */ |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
780 | gtk_imhtml_toggle_backcolor(GTK_IMHTML(imhtml), ""); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
781 | /* Unblock the signal. */ |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
782 | g_signal_handlers_unblock_matched(object, G_SIGNAL_MATCH_DATA, 0, 0, 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
|
783 | NULL, toolbar); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
784 | g_object_unref(object); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
785 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
786 | /* This will fire a toggle signal and get saved below. */ |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
787 | gtk_imhtml_toggle_background(GTK_IMHTML(imhtml), color); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
788 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
789 | g_free(color); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
790 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
791 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
792 | if (buttons & GTK_IMHTML_BACKGROUND) { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
793 | char *color = gtk_imhtml_get_current_background(GTK_IMHTML(imhtml)); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
794 | if (!color) |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
795 | color = g_strdup(""); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
796 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
797 | purple_prefs_set_string(PIDGIN_PREFS_ROOT "/conversations/bgcolor", color); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
798 | g_free(color); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
799 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
800 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
801 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
802 | static 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
|
803 | formatting_clear_cb(GtkIMHtml *imhtml, void *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
|
804 | { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
805 | purple_prefs_set_bool(PIDGIN_PREFS_ROOT "/conversations/send_bold", FALSE); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
806 | purple_prefs_set_bool(PIDGIN_PREFS_ROOT "/conversations/send_italic", FALSE); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
807 | purple_prefs_set_bool(PIDGIN_PREFS_ROOT "/conversations/send_underline", FALSE); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
808 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
809 | purple_prefs_set_int(PIDGIN_PREFS_ROOT "/conversations/font_size", 3); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
810 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
811 | purple_prefs_set_string(PIDGIN_PREFS_ROOT "/conversations/font_face", ""); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
812 | purple_prefs_set_string(PIDGIN_PREFS_ROOT "/conversations/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
|
813 | purple_prefs_set_string(PIDGIN_PREFS_ROOT "/conversations/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
|
814 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
815 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
816 | static 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
|
817 | conversation_usetabs_cb(const char *name, PurplePrefType 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
|
818 | gconstpointer value, gpointer 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
|
819 | { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
820 | gboolean usetabs = GPOINTER_TO_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
|
821 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
822 | if (usetabs) |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
823 | gtk_widget_set_sensitive(GTK_WIDGET(data), TRUE); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
824 | else |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
825 | gtk_widget_set_sensitive(GTK_WIDGET(data), FALSE); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
826 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
827 | |
|
22944
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
828 | |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
829 | #define CONVERSATION_CLOSE_ACCEL_PATH "<main>/Conversation/Close" |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
830 | |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
831 | /* Filled in in keyboard_shortcuts(). */ |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
832 | static GtkAccelKey ctrl_w = { 0, 0, 0 }; |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
833 | static GtkAccelKey escape = { 0, 0, 0 }; |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
834 | |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
835 | static guint escape_closes_conversation_cb_id = 0; |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
836 | |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
837 | static gboolean |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
838 | accel_is_escape(GtkAccelKey *k) |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
839 | { |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
840 | return (k->accel_key == escape.accel_key |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
841 | && k->accel_mods == escape.accel_mods); |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
842 | } |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
843 | |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
844 | /* Update the tickybox in Preferences when the keybinding for Conversation -> |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
845 | * Close is changed via Gtk. |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
846 | */ |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
847 | static void |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
848 | conversation_close_accel_changed_cb (GtkAccelMap *object, |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
849 | gchar *accel_path, |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
850 | guint accel_key, |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
851 | GdkModifierType accel_mods, |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
852 | gpointer checkbox_) |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
853 | { |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
854 | GtkToggleButton *checkbox = GTK_TOGGLE_BUTTON(checkbox_); |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
855 | GtkAccelKey new = { accel_key, accel_mods, 0 }; |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
856 | |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
857 | g_signal_handler_block(checkbox, escape_closes_conversation_cb_id); |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
858 | gtk_toggle_button_set_active(checkbox, accel_is_escape(&new)); |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
859 | g_signal_handler_unblock(checkbox, escape_closes_conversation_cb_id); |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
860 | } |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
861 | |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
862 | |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
863 | static void |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
864 | escape_closes_conversation_cb(GtkWidget *w, |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
865 | gpointer unused) |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
866 | { |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
867 | gboolean active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w)); |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
868 | gboolean changed; |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
869 | GtkAccelKey *new_key = active ? &escape : &ctrl_w; |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
870 | |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
871 | changed = gtk_accel_map_change_entry(CONVERSATION_CLOSE_ACCEL_PATH, |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
872 | new_key->accel_key, new_key->accel_mods, TRUE); |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
873 | |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
874 | /* If another path is already bound to the new accelerator, |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
875 | * _change_entry tries to delete that binding (because it was passed |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
876 | * replace=TRUE). If that other path is locked, then _change_entry |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
877 | * will fail. We don't ever lock any accelerator paths, so this case |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
878 | * should never arise. |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
879 | */ |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
880 | if(!changed) |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
881 | purple_notify_warning (NULL, NULL, |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
882 | _("IT'S A LION! GET IN THE CAR!"), NULL); |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
883 | |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
884 | /* TODO: create pidgin_accels_schedule_save */ |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
885 | pidgin_save_accels_cb(NULL, 0, 0, NULL, NULL); |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
886 | } |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
887 | |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
888 | |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
889 | /* Creates preferences for keyboard shortcuts that it's hard to change with the |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
890 | * standard Gtk accelerator-changing mechanism. |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
891 | */ |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
892 | static void |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
893 | keyboard_shortcuts(GtkWidget *page) |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
894 | { |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
895 | GtkWidget *vbox = pidgin_make_frame(page, _("Keyboard Shortcuts")); |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
896 | GtkWidget *checkbox; |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
897 | GtkAccelKey current = { 0, 0, 0 }; |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
898 | GtkAccelMap *map = gtk_accel_map_get(); |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
899 | |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
900 | /* Maybe it would be better just to hardcode the values? |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
901 | * -- resiak, 2007-04-30 |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
902 | */ |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
903 | if (ctrl_w.accel_key == 0) |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
904 | { |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
905 | gtk_accelerator_parse ("<Control>w", &(ctrl_w.accel_key), |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
906 | &(ctrl_w.accel_mods)); |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
907 | g_assert(ctrl_w.accel_key != 0); |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
908 | |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
909 | gtk_accelerator_parse ("Escape", &(escape.accel_key), |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
910 | &(escape.accel_mods)); |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
911 | g_assert(escape.accel_key != 0); |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
912 | } |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
913 | |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
914 | checkbox = gtk_check_button_new_with_mnemonic( |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
915 | _("Cl_ose conversations with the Escape key")); |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
916 | gtk_accel_map_lookup_entry(CONVERSATION_CLOSE_ACCEL_PATH, ¤t); |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
917 | gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbox), |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
918 | accel_is_escape(¤t)); |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
919 | |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
920 | escape_closes_conversation_cb_id = g_signal_connect(checkbox, |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
921 | "clicked", G_CALLBACK(escape_closes_conversation_cb), NULL); |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
922 | |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
923 | g_signal_connect(map, "changed::" CONVERSATION_CLOSE_ACCEL_PATH, |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
924 | G_CALLBACK(conversation_close_accel_changed_cb), checkbox); |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
925 | |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
926 | gtk_box_pack_start(GTK_BOX(vbox), checkbox, FALSE, FALSE, 0); |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
927 | } |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
928 | |
|
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
|
929 | static GtkWidget * |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
930 | interface_page(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
|
931 | { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
932 | GtkWidget *ret; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
933 | GtkWidget *vbox; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
934 | GtkWidget *vbox2; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
935 | GtkWidget *label; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
936 | GtkSizeGroup *sg; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
937 | GList *names = 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
|
938 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
939 | ret = gtk_vbox_new(FALSE, PIDGIN_HIG_CAT_SPACE); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
940 | gtk_container_set_border_width(GTK_CONTAINER(ret), PIDGIN_HIG_BORDER); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
941 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
942 | sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
943 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
944 | vbox = pidgin_make_frame(ret, _("System Tray Icon")); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
945 | label = pidgin_prefs_dropdown(vbox, _("_Show system tray icon:"), PURPLE_PREF_STRING, |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
946 | PIDGIN_PREFS_ROOT "/docklet/show", |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
947 | _("Always"), "always", |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
948 | _("On unread messages"), "pending", |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
949 | _("Never"), "never", |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
950 | 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
|
951 | gtk_size_group_add_widget(sg, label); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
952 | gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
953 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
954 | vbox = pidgin_make_frame(ret, _("Conversation Window Hiding")); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
955 | label = pidgin_prefs_dropdown(vbox, _("_Hide new IM conversations:"), |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
956 | PURPLE_PREF_STRING, PIDGIN_PREFS_ROOT "/conversations/im/hide_new", |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
957 | _("Never"), "never", |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
958 | _("When away"), "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
|
959 | _("Always"), "always", |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
960 | 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
|
961 | gtk_size_group_add_widget(sg, label); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
962 | gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
963 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
964 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
965 | /* All the tab options! */ |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
966 | vbox = pidgin_make_frame(ret, _("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
|
967 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
968 | pidgin_prefs_checkbox(_("Show IMs and chats in _tabbed windows"), |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
969 | PIDGIN_PREFS_ROOT "/conversations/tabs", vbox); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
970 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
971 | /* |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
972 | * Connect a signal to the above preference. When conversations are not |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
973 | * shown in a tabbed window then all tabbing options should be disabled. |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
974 | */ |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
975 | vbox2 = gtk_vbox_new(FALSE, 9); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
976 | gtk_box_pack_start(GTK_BOX(vbox), vbox2, FALSE, FALSE, 0); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
977 | purple_prefs_connect_callback(prefs, PIDGIN_PREFS_ROOT "/conversations/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
|
978 | conversation_usetabs_cb, vbox2); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
979 | if (!purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/conversations/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
|
980 | gtk_widget_set_sensitive(vbox2, FALSE); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
981 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
982 | pidgin_prefs_checkbox(_("Show close b_utton 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
|
983 | PIDGIN_PREFS_ROOT "/conversations/close_on_tabs", vbox2); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
984 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
985 | label = pidgin_prefs_dropdown(vbox2, _("_Placement:"), PURPLE_PREF_INT, |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
986 | PIDGIN_PREFS_ROOT "/conversations/tab_side", |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
987 | _("Top"), GTK_POS_TOP, |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
988 | _("Bottom"), GTK_POS_BOTTOM, |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
989 | _("Left"), GTK_POS_LEFT, |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
990 | _("Right"), GTK_POS_RIGHT, |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
991 | #if GTK_CHECK_VERSION(2,6,0) |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
992 | _("Left Vertical"), GTK_POS_LEFT|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
|
993 | _("Right Vertical"), GTK_POS_RIGHT|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
|
994 | #endif |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
995 | 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
|
996 | gtk_size_group_add_widget(sg, label); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
997 | gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
998 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
999 | names = pidgin_conv_placement_get_options(); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1000 | label = pidgin_prefs_dropdown_from_list(vbox2, _("N_ew conversations:"), |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1001 | PURPLE_PREF_STRING, PIDGIN_PREFS_ROOT "/conversations/placement", names); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1002 | gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1003 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1004 | gtk_size_group_add_widget(sg, label); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1005 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1006 | g_list_free(names); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1007 | |
|
22944
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
1008 | |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
1009 | keyboard_shortcuts(ret); |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
1010 | |
|
212075e27ec1
Add a tickybox to set the 'close conversation window' shortcut to Escape.
Will Thompson <resiak@pidgin.im>
parents:
22419
diff
changeset
|
1011 | |
|
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
|
1012 | gtk_widget_show_all(ret); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1013 | g_object_unref(sg); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1014 | return ret; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1015 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1016 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1017 | #if GTK_CHECK_VERSION(2,4,0) |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1018 | static 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
|
1019 | pidgin_custom_font_set(GtkFontButton *font_button, gpointer nul) |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1020 | { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1021 | purple_prefs_set_string(PIDGIN_PREFS_ROOT "/conversations/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
|
1022 | gtk_font_button_get_font_name(font_button)); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1023 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1024 | #endif |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1025 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1026 | static GtkWidget * |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1027 | conv_page(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
|
1028 | { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1029 | GtkWidget *ret; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1030 | GtkWidget *vbox; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1031 | GtkWidget *toolbar; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1032 | GtkWidget *iconpref1; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1033 | GtkWidget *iconpref2; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1034 | GtkWidget *fontpref; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1035 | GtkWidget *imhtml; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1036 | GtkWidget *frame; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1037 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1038 | #if GTK_CHECK_VERSION(2,4,0) |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1039 | GtkWidget *hbox; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1040 | GtkWidget *font_button; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1041 | const char *font_name; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1042 | #endif |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1043 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1044 | ret = gtk_vbox_new(FALSE, PIDGIN_HIG_CAT_SPACE); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1045 | gtk_container_set_border_width(GTK_CONTAINER(ret), PIDGIN_HIG_BORDER); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1046 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1047 | vbox = pidgin_make_frame(ret, _("Conversations")); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1048 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1049 | pidgin_prefs_checkbox(_("Show _formatting on incoming 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
|
1050 | PIDGIN_PREFS_ROOT "/conversations/show_incoming_formatting", vbox); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1051 | pidgin_prefs_checkbox(_("Close IMs immediately when the tab is closed"), |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1052 | PIDGIN_PREFS_ROOT "/conversations/im/close_immediately", vbox); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1053 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1054 | iconpref1 = pidgin_prefs_checkbox(_("Show _detailed information"), |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1055 | PIDGIN_PREFS_ROOT "/conversations/im/show_buddy_icons", vbox); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1056 | iconpref2 = pidgin_prefs_checkbox(_("Enable buddy ic_on animation"), |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1057 | PIDGIN_PREFS_ROOT "/conversations/im/animate_buddy_icons", vbox); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1058 | if (!purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/conversations/im/show_buddy_icons")) |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1059 | gtk_widget_set_sensitive(iconpref2, FALSE); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1060 | g_signal_connect(G_OBJECT(iconpref1), "clicked", |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1061 | G_CALLBACK(pidgin_toggle_sensitive), iconpref2); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1062 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1063 | pidgin_prefs_checkbox(_("_Notify buddies that you are typing to them"), |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1064 | "/purple/conversations/im/send_typing", vbox); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1065 | #ifdef USE_GTKSPELL |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1066 | pidgin_prefs_checkbox(_("Highlight _misspelled words"), |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1067 | PIDGIN_PREFS_ROOT "/conversations/spellcheck", vbox); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1068 | #endif |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1069 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1070 | pidgin_prefs_checkbox(_("Use smooth-scrolling"), PIDGIN_PREFS_ROOT "/conversations/use_smooth_scrolling", vbox); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1071 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1072 | #ifdef _WIN32 |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1073 | pidgin_prefs_checkbox(_("F_lash window when IMs are received"), PIDGIN_PREFS_ROOT "/win32/blink_im", vbox); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1074 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1075 | pidgin_prefs_checkbox(_("Minimi_ze new conversation windows"), PIDGIN_PREFS_ROOT "/win32/minimize_new_convs", vbox); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1076 | #endif |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1077 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1078 | #if GTK_CHECK_VERSION(2,4,0) |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1079 | vbox = pidgin_make_frame(ret, _("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
|
1080 | if (purple_running_gnome()) |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1081 | fontpref = pidgin_prefs_checkbox(_("Use document font from _theme"), PIDGIN_PREFS_ROOT "/conversations/use_theme_font", vbox); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1082 | else |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1083 | fontpref = pidgin_prefs_checkbox(_("Use font from _theme"), PIDGIN_PREFS_ROOT "/conversations/use_theme_font", vbox); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1084 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1085 | font_name = purple_prefs_get_string(PIDGIN_PREFS_ROOT "/conversations/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
|
1086 | font_button = gtk_font_button_new_with_font(font_name ? font_name : 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
|
1087 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1088 | gtk_font_button_set_show_style(GTK_FONT_BUTTON(font_button), TRUE); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1089 | hbox = pidgin_add_widget_to_vbox(GTK_BOX(vbox), _("Conversation _font:"), NULL, font_button, FALSE, 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
|
1090 | if (purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/conversations/use_theme_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
|
1091 | gtk_widget_set_sensitive(hbox, FALSE); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1092 | g_signal_connect(G_OBJECT(fontpref), "clicked", G_CALLBACK(pidgin_toggle_sensitive), hbox); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1093 | g_signal_connect(G_OBJECT(font_button), "font-set", G_CALLBACK(pidgin_custom_font_set), 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
|
1094 | #endif |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1095 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1096 | vbox = pidgin_make_frame(ret, _("Default 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
|
1097 | gtk_box_set_child_packing(GTK_BOX(vbox->parent), vbox, TRUE, TRUE, 0, GTK_PACK_START); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1098 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1099 | frame = pidgin_create_imhtml(TRUE, &imhtml, &toolbar, 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
|
1100 | gtk_widget_show(frame); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1101 | gtk_widget_set_name(imhtml, "pidgin_prefs_font_imhtml"); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1102 | gtk_widget_set_size_request(frame, 300, -1); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1103 | gtk_imhtml_set_whole_buffer_formatting_only(GTK_IMHTML(imhtml), TRUE); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1104 | gtk_imhtml_set_format_functions(GTK_IMHTML(imhtml), |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1105 | GTK_IMHTML_BOLD | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1106 | GTK_IMHTML_ITALIC | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1107 | GTK_IMHTML_UNDERLINE | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1108 | GTK_IMHTML_GROW | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1109 | GTK_IMHTML_SHRINK | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1110 | GTK_IMHTML_FACE | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1111 | GTK_IMHTML_FORECOLOR | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1112 | GTK_IMHTML_BACKCOLOR | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1113 | GTK_IMHTML_BACKGROUND); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1114 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1115 | gtk_imhtml_append_text(GTK_IMHTML(imhtml), _("This is how your outgoing message text will appear when you use protocols that support formatting."), 0); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1116 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1117 | gtk_box_pack_start(GTK_BOX(vbox), frame, TRUE, TRUE, 0); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1118 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1119 | gtk_imhtml_setup_entry(GTK_IMHTML(imhtml), PURPLE_CONNECTION_HTML | PURPLE_CONNECTION_FORMATTING_WBFO); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1120 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1121 | g_signal_connect_after(G_OBJECT(imhtml), "format_function_toggle", |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1122 | G_CALLBACK(formatting_toggle_cb), toolbar); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1123 | g_signal_connect_after(G_OBJECT(imhtml), "format_function_clear", |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1124 | G_CALLBACK(formatting_clear_cb), 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
|
1125 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1126 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1127 | gtk_widget_show(ret); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1128 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1129 | return ret; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1130 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1131 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1132 | static void network_ip_changed(GtkEntry *entry, gpointer 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
|
1133 | { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1134 | /* |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1135 | * TODO: It would be nice if we could validate this and show a |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1136 | * red background in the box when the IP address is invalid |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1137 | * and a green background when the IP address is valid. |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1138 | */ |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1139 | purple_network_set_public_ip(gtk_entry_get_text(entry)); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1140 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1141 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1142 | static 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
|
1143 | proxy_changed_cb(const char *name, PurplePrefType 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
|
1144 | gconstpointer value, gpointer 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
|
1145 | { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1146 | GtkWidget *frame = 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
|
1147 | const char *proxy = 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
|
1148 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1149 | if (strcmp(proxy, "none") && strcmp(proxy, "envvar")) |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1150 | gtk_widget_show_all(frame); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1151 | else |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1152 | gtk_widget_hide(frame); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1153 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1154 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1155 | static void proxy_print_option(GtkEntry *entry, int entrynum) |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1156 | { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1157 | if (entrynum == PROXYHOST) |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1158 | purple_prefs_set_string("/purple/proxy/host", gtk_entry_get_text(entry)); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1159 | else if (entrynum == PROXYPORT) |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1160 | purple_prefs_set_int("/purple/proxy/port", atoi(gtk_entry_get_text(entry))); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1161 | else if (entrynum == PROXYUSER) |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1162 | purple_prefs_set_string("/purple/proxy/username", gtk_entry_get_text(entry)); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1163 | else if (entrynum == PROXYPASS) |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1164 | purple_prefs_set_string("/purple/proxy/password", gtk_entry_get_text(entry)); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1165 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1166 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1167 | static 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
|
1168 | proxy_button_clicked_cb(GtkWidget *button, gpointer 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
|
1169 | { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1170 | GError *err = 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
|
1171 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1172 | if (g_spawn_command_line_async ("gnome-network-preferences", &err)) |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1173 | return; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1174 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1175 | purple_notify_error(NULL, NULL, _("Cannot start proxy configuration program."), err->message); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1176 | g_error_free(err); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1177 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1178 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1179 | static 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
|
1180 | browser_button_clicked_cb(GtkWidget *button, gpointer 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
|
1181 | { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1182 | GError *err = 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
|
1183 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1184 | if (g_spawn_command_line_async ("gnome-default-applications-properties", &err)) |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1185 | return; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1186 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1187 | purple_notify_error(NULL, NULL, _("Cannot start browser configuration program."), err->message); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1188 | g_error_free(err); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1189 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1190 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1191 | static GtkWidget * |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1192 | network_page(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
|
1193 | { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1194 | GtkWidget *ret; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1195 | GtkWidget *vbox, *hbox, *entry; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1196 | GtkWidget *table, *label, *auto_ip_checkbox, *ports_checkbox, *spin_button; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1197 | GtkWidget *proxy_warning = NULL, *browser_warning = 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
|
1198 | GtkWidget *proxy_button = NULL, *browser_button = 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
|
1199 | GtkSizeGroup *sg; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1200 | PurpleProxyInfo *proxy_info = 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
|
1201 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1202 | ret = gtk_vbox_new(FALSE, PIDGIN_HIG_CAT_SPACE); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1203 | gtk_container_set_border_width (GTK_CONTAINER (ret), PIDGIN_HIG_BORDER); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1204 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1205 | vbox = pidgin_make_frame (ret, _("IP Address")); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1206 | sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1207 | pidgin_prefs_labeled_entry(vbox,_("ST_UN server:"), |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1208 | "/purple/network/stun_server", sg); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1209 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1210 | hbox = gtk_hbox_new(FALSE, PIDGIN_HIG_BOX_SPACE); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1211 | gtk_container_add(GTK_CONTAINER(vbox), hbox); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1212 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1213 | label = gtk_label_new(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
|
1214 | gtk_container_add(GTK_CONTAINER(hbox), label); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1215 | gtk_size_group_add_widget(sg, label); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1216 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1217 | label = gtk_label_new(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
|
1218 | gtk_label_set_markup(GTK_LABEL(label), |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1219 | _("<span style=\"italic\">Example: stunserver.org</span>")); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1220 | gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1221 | gtk_container_add(GTK_CONTAINER(hbox), label); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1222 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1223 | auto_ip_checkbox = pidgin_prefs_checkbox(_("_Autodetect IP address"), |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1224 | "/purple/network/auto_ip", vbox); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1225 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1226 | table = gtk_table_new(2, 2, FALSE); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1227 | gtk_container_set_border_width(GTK_CONTAINER(table), 0); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1228 | gtk_table_set_col_spacings(GTK_TABLE(table), 5); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1229 | gtk_table_set_row_spacings(GTK_TABLE(table), 10); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1230 | gtk_container_add(GTK_CONTAINER(vbox), table); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1231 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1232 | label = gtk_label_new_with_mnemonic(_("Public _IP:")); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1233 | gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1234 | gtk_table_attach(GTK_TABLE(table), label, 0, 1, 0, 1, GTK_FILL, 0, 0, 0); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1235 | gtk_size_group_add_widget(sg, label); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1236 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1237 | entry = gtk_entry_new(); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1238 | gtk_label_set_mnemonic_widget(GTK_LABEL(label), entry); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1239 | gtk_table_attach(GTK_TABLE(table), entry, 1, 2, 0, 1, GTK_FILL, 0, 0, 0); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1240 | g_signal_connect(G_OBJECT(entry), "changed", |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1241 | G_CALLBACK(network_ip_changed), 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
|
1242 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1243 | /* |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1244 | * TODO: This could be better by showing the autodeteced |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1245 | * IP separately from the user-specified IP. |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1246 | */ |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1247 | if (purple_network_get_my_ip(-1) != 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
|
1248 | gtk_entry_set_text(GTK_ENTRY(entry), |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1249 | purple_network_get_my_ip(-1)); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1250 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1251 | pidgin_set_accessible_label (entry, label); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1252 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1253 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1254 | if (purple_prefs_get_bool("/purple/network/auto_ip")) { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1255 | gtk_widget_set_sensitive(GTK_WIDGET(table), FALSE); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1256 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1257 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1258 | g_signal_connect(G_OBJECT(auto_ip_checkbox), "clicked", |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1259 | G_CALLBACK(pidgin_toggle_sensitive), table); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1260 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1261 | g_object_unref(sg); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1262 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1263 | vbox = pidgin_make_frame (ret, _("Ports")); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1264 | sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1265 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1266 | pidgin_prefs_checkbox(_("_Enable automatic router port forwarding"), |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1267 | "/purple/network/map_ports", vbox); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1268 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1269 | ports_checkbox = pidgin_prefs_checkbox(_("_Manually specify range of ports to listen on"), |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1270 | "/purple/network/ports_range_use", vbox); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1271 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1272 | spin_button = pidgin_prefs_labeled_spin_button(vbox, _("_Start port:"), |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1273 | "/purple/network/ports_range_start", 0, 65535, sg); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1274 | if (!purple_prefs_get_bool("/purple/network/ports_range_use")) |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1275 | gtk_widget_set_sensitive(GTK_WIDGET(spin_button), FALSE); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1276 | g_signal_connect(G_OBJECT(ports_checkbox), "clicked", |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1277 | G_CALLBACK(pidgin_toggle_sensitive), spin_button); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1278 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1279 | spin_button = pidgin_prefs_labeled_spin_button(vbox, _("_End port:"), |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1280 | "/purple/network/ports_range_end", 0, 65535, sg); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1281 | if (!purple_prefs_get_bool("/purple/network/ports_range_use")) |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1282 | gtk_widget_set_sensitive(GTK_WIDGET(spin_button), FALSE); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1283 | g_signal_connect(G_OBJECT(ports_checkbox), "clicked", |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1284 | G_CALLBACK(pidgin_toggle_sensitive), spin_button); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1285 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1286 | if (purple_running_gnome()) { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1287 | vbox = pidgin_make_frame(ret, _("Proxy Server & Browser")); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1288 | prefs_proxy_frame = gtk_vbox_new(FALSE, 0); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1289 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1290 | proxy_warning = hbox = gtk_hbox_new(FALSE, PIDGIN_HIG_BOX_SPACE); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1291 | gtk_container_add(GTK_CONTAINER(vbox), hbox); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1292 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1293 | label = gtk_label_new(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
|
1294 | gtk_label_set_markup(GTK_LABEL(label), |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1295 | _("<b>Proxy configuration program was not found.</b>")); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1296 | gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1297 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1298 | browser_warning = hbox = gtk_hbox_new(FALSE, PIDGIN_HIG_BOX_SPACE); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1299 | gtk_container_add(GTK_CONTAINER(vbox), hbox); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1300 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1301 | label = gtk_label_new(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
|
1302 | gtk_label_set_markup(GTK_LABEL(label), |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1303 | _("<b>Browser configuration program was not found.</b>")); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1304 | gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1305 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1306 | hbox = gtk_hbox_new(FALSE, PIDGIN_HIG_BOX_SPACE); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1307 | gtk_container_add(GTK_CONTAINER(vbox), hbox); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1308 | label = gtk_label_new(_("Proxy & Browser preferences are configured\n" |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1309 | "in GNOME Preferences")); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1310 | gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1311 | gtk_widget_show(label); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1312 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1313 | hbox = gtk_hbox_new(FALSE, PIDGIN_HIG_BOX_SPACE); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1314 | gtk_container_add(GTK_CONTAINER(vbox), hbox); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1315 | proxy_button = gtk_button_new_with_mnemonic(_("Configure _Proxy")); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1316 | g_signal_connect(G_OBJECT(proxy_button), "clicked", |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1317 | G_CALLBACK(proxy_button_clicked_cb), 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
|
1318 | gtk_box_pack_start(GTK_BOX(hbox), proxy_button, FALSE, FALSE, 0); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1319 | gtk_widget_show(proxy_button); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1320 | browser_button = gtk_button_new_with_mnemonic(_("Configure _Browser")); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1321 | g_signal_connect(G_OBJECT(browser_button), "clicked", |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1322 | G_CALLBACK(browser_button_clicked_cb), 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
|
1323 | gtk_box_pack_start(GTK_BOX(hbox), browser_button, FALSE, FALSE, 0); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1324 | gtk_widget_show(browser_button); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1325 | } else { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1326 | vbox = pidgin_make_frame(ret, _("Proxy Server")); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1327 | prefs_proxy_frame = gtk_vbox_new(FALSE, 0); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1328 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1329 | pidgin_prefs_dropdown(vbox, _("Proxy _type:"), PURPLE_PREF_STRING, |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1330 | "/purple/proxy/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
|
1331 | _("No proxy"), "none", |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1332 | "SOCKS 4", "socks4", |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1333 | "SOCKS 5", "socks5", |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1334 | "HTTP", "http", |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1335 | _("Use Environmental Settings"), "envvar", |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1336 | 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
|
1337 | gtk_box_pack_start(GTK_BOX(vbox), prefs_proxy_frame, 0, 0, 0); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1338 | proxy_info = purple_global_proxy_get_info(); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1339 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1340 | purple_prefs_connect_callback(prefs, "/purple/proxy/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
|
1341 | proxy_changed_cb, prefs_proxy_frame); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1342 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1343 | table = gtk_table_new(4, 2, FALSE); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1344 | gtk_container_set_border_width(GTK_CONTAINER(table), 0); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1345 | gtk_table_set_col_spacings(GTK_TABLE(table), 5); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1346 | gtk_table_set_row_spacings(GTK_TABLE(table), 10); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1347 | gtk_container_add(GTK_CONTAINER(prefs_proxy_frame), table); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1348 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1349 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1350 | label = gtk_label_new_with_mnemonic(_("_Host:")); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1351 | gtk_misc_set_alignment(GTK_MISC(label), 1.0, 0.5); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1352 | gtk_table_attach(GTK_TABLE(table), label, 0, 1, 0, 1, GTK_FILL, 0, 0, 0); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1353 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1354 | entry = gtk_entry_new(); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1355 | gtk_label_set_mnemonic_widget(GTK_LABEL(label), entry); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1356 | gtk_table_attach(GTK_TABLE(table), entry, 1, 2, 0, 1, GTK_FILL, 0, 0, 0); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1357 | g_signal_connect(G_OBJECT(entry), "changed", |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1358 | G_CALLBACK(proxy_print_option), (void *)PROXYHOST); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1359 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1360 | if (proxy_info != NULL && purple_proxy_info_get_host(proxy_info)) |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1361 | gtk_entry_set_text(GTK_ENTRY(entry), |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1362 | purple_proxy_info_get_host(proxy_info)); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1363 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1364 | hbox = gtk_hbox_new(TRUE, 5); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1365 | gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1366 | pidgin_set_accessible_label (entry, label); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1367 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1368 | label = gtk_label_new_with_mnemonic(_("_Port:")); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1369 | gtk_misc_set_alignment(GTK_MISC(label), 1.0, 0.5); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1370 | gtk_table_attach(GTK_TABLE(table), label, 2, 3, 0, 1, GTK_FILL, 0, 0, 0); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1371 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1372 | entry = gtk_entry_new(); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1373 | gtk_label_set_mnemonic_widget(GTK_LABEL(label), entry); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1374 | gtk_table_attach(GTK_TABLE(table), entry, 3, 4, 0, 1, GTK_FILL, 0, 0, 0); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1375 | g_signal_connect(G_OBJECT(entry), "changed", |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1376 | G_CALLBACK(proxy_print_option), (void *)PROXYPORT); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1377 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1378 | if (proxy_info != NULL && purple_proxy_info_get_port(proxy_info) != 0) { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1379 | char buf[128]; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1380 | g_snprintf(buf, sizeof(buf), "%d", |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1381 | purple_proxy_info_get_port(proxy_info)); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1382 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1383 | gtk_entry_set_text(GTK_ENTRY(entry), buf); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1384 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1385 | pidgin_set_accessible_label (entry, label); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1386 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1387 | label = gtk_label_new_with_mnemonic(_("_User:")); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1388 | gtk_misc_set_alignment(GTK_MISC(label), 1.0, 0.5); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1389 | gtk_table_attach(GTK_TABLE(table), label, 0, 1, 1, 2, GTK_FILL, 0, 0, 0); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1390 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1391 | entry = gtk_entry_new(); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1392 | gtk_label_set_mnemonic_widget(GTK_LABEL(label), entry); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1393 | gtk_table_attach(GTK_TABLE(table), entry, 1, 2, 1, 2, GTK_FILL, 0, 0, 0); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1394 | g_signal_connect(G_OBJECT(entry), "changed", |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1395 | G_CALLBACK(proxy_print_option), (void *)PROXYUSER); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1396 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1397 | if (proxy_info != NULL && purple_proxy_info_get_username(proxy_info) != 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
|
1398 | gtk_entry_set_text(GTK_ENTRY(entry), |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1399 | purple_proxy_info_get_username(proxy_info)); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1400 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1401 | hbox = gtk_hbox_new(TRUE, 5); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1402 | gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1403 | pidgin_set_accessible_label (entry, label); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1404 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1405 | label = gtk_label_new_with_mnemonic(_("Pa_ssword:")); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1406 | gtk_misc_set_alignment(GTK_MISC(label), 1.0, 0.5); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1407 | gtk_table_attach(GTK_TABLE(table), label, 2, 3, 1, 2, GTK_FILL, 0, 0, 0); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1408 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1409 | entry = gtk_entry_new(); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1410 | gtk_label_set_mnemonic_widget(GTK_LABEL(label), entry); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1411 | gtk_table_attach(GTK_TABLE(table), entry, 3, 4, 1, 2, GTK_FILL , 0, 0, 0); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1412 | gtk_entry_set_visibility(GTK_ENTRY(entry), FALSE); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1413 | if (gtk_entry_get_invisible_char(GTK_ENTRY(entry)) == '*') |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1414 | gtk_entry_set_invisible_char(GTK_ENTRY(entry), PIDGIN_INVISIBLE_CHAR); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1415 | g_signal_connect(G_OBJECT(entry), "changed", |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1416 | G_CALLBACK(proxy_print_option), (void *)PROXYPASS); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1417 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1418 | if (proxy_info != NULL && purple_proxy_info_get_password(proxy_info) != 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
|
1419 | gtk_entry_set_text(GTK_ENTRY(entry), |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1420 | purple_proxy_info_get_password(proxy_info)); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1421 | pidgin_set_accessible_label (entry, label); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1422 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1423 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1424 | gtk_widget_show_all(ret); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1425 | g_object_unref(sg); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1426 | /* Only hide table if not running gnome otherwise we hide the IP address table! */ |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1427 | if (!purple_running_gnome() && (proxy_info == 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
|
1428 | purple_proxy_info_get_type(proxy_info) == PURPLE_PROXY_NONE || |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1429 | purple_proxy_info_get_type(proxy_info) == PURPLE_PROXY_USE_ENVVAR)) { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1430 | gtk_widget_hide(table); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1431 | } else if (purple_running_gnome()) { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1432 | gchar *path; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1433 | path = g_find_program_in_path("gnome-network-preferences"); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1434 | if (path != 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
|
1435 | gtk_widget_set_sensitive(proxy_button, TRUE); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1436 | gtk_widget_hide(proxy_warning); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1437 | g_free(path); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1438 | } else { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1439 | gtk_widget_set_sensitive(proxy_button, FALSE); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1440 | gtk_widget_show(proxy_warning); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1441 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1442 | path = g_find_program_in_path("gnome-default-applications-properties"); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1443 | if (path != 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
|
1444 | gtk_widget_set_sensitive(browser_button, TRUE); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1445 | gtk_widget_hide(browser_warning); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1446 | g_free(path); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1447 | } else { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1448 | gtk_widget_set_sensitive(browser_button, FALSE); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1449 | gtk_widget_show(browser_warning); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1450 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1451 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1452 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1453 | return ret; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1454 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1455 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1456 | #ifndef _WIN32 |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1457 | static gboolean manual_browser_set(GtkWidget *entry, GdkEventFocus *event, gpointer 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
|
1458 | const char *program = gtk_entry_get_text(GTK_ENTRY(entry)); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1459 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1460 | purple_prefs_set_path(PIDGIN_PREFS_ROOT "/browsers/command", program); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1461 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1462 | /* carry on normally */ |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1463 | return FALSE; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1464 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1465 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1466 | static GList *get_available_browsers(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
|
1467 | { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1468 | struct browser { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1469 | char *name; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1470 | char *command; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1471 | }; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1472 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1473 | /* Sorted reverse alphabetically */ |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1474 | static const struct browser possible_browsers[] = { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1475 | {N_("Seamonkey"), "seamonkey"}, |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1476 | {N_("Opera"), "opera"}, |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1477 | {N_("Netscape"), "netscape"}, |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1478 | {N_("Mozilla"), "mozilla"}, |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1479 | {N_("Konqueror"), "kfmclient"}, |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1480 | {N_("Desktop Default"), "xdg-open"}, |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1481 | {N_("GNOME Default"), "gnome-open"}, |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1482 | {N_("Galeon"), "galeon"}, |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1483 | {N_("Firefox"), "firefox"}, |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1484 | {N_("Firebird"), "mozilla-firebird"}, |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1485 | {N_("Epiphany"), "epiphany"} |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1486 | }; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1487 | static const int num_possible_browsers = G_N_ELEMENTS(possible_browsers); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1488 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1489 | GList *browsers = 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
|
1490 | int i = 0; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1491 | char *browser_setting = (char *)purple_prefs_get_string(PIDGIN_PREFS_ROOT "/browsers/browser"); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1492 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1493 | browsers = g_list_prepend(browsers, (gpointer)"custom"); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1494 | browsers = g_list_prepend(browsers, (gpointer)_("Manual")); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1495 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1496 | for (i = 0; i < num_possible_browsers; i++) { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1497 | if (purple_program_is_valid(possible_browsers[i].command)) { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1498 | browsers = g_list_prepend(browsers, |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1499 | possible_browsers[i].command); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1500 | browsers = g_list_prepend(browsers, (gpointer)_(possible_browsers[i].name)); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1501 | if(browser_setting && !strcmp(possible_browsers[i].command, browser_setting)) |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1502 | browser_setting = 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
|
1503 | /* If xdg-open is valid, prefer it over gnome-open and skip forward */ |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1504 | if(!strcmp(possible_browsers[i].command, "xdg-open")) { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1505 | if (browser_setting && !strcmp("gnome-open", browser_setting)) { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1506 | purple_prefs_set_string(PIDGIN_PREFS_ROOT "/browsers/browser", possible_browsers[i].command); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1507 | browser_setting = 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
|
1508 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1509 | i++; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1510 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1511 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1512 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1513 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1514 | if(browser_setting) |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1515 | purple_prefs_set_string(PIDGIN_PREFS_ROOT "/browsers/browser", "custom"); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1516 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1517 | return browsers; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1518 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1519 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1520 | static 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
|
1521 | browser_changed1_cb(const char *name, PurplePrefType 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
|
1522 | gconstpointer value, gpointer 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
|
1523 | { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1524 | GtkWidget *hbox = 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
|
1525 | const char *browser = 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
|
1526 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1527 | gtk_widget_set_sensitive(hbox, strcmp(browser, "custom")); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1528 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1529 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1530 | static 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
|
1531 | browser_changed2_cb(const char *name, PurplePrefType 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
|
1532 | gconstpointer value, gpointer 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
|
1533 | { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1534 | GtkWidget *hbox = 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
|
1535 | const char *browser = 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
|
1536 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1537 | gtk_widget_set_sensitive(hbox, !strcmp(browser, "custom")); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1538 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1539 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1540 | static GtkWidget * |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1541 | browser_page(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
|
1542 | { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1543 | GtkWidget *ret; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1544 | GtkWidget *vbox; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1545 | GtkWidget *hbox; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1546 | GtkWidget *label; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1547 | GtkWidget *entry; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1548 | GtkSizeGroup *sg; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1549 | GList *browsers = 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
|
1550 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1551 | ret = gtk_vbox_new(FALSE, PIDGIN_HIG_CAT_SPACE); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1552 | gtk_container_set_border_width (GTK_CONTAINER (ret), PIDGIN_HIG_BORDER); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1553 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1554 | sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1555 | vbox = pidgin_make_frame (ret, _("Browser Selection")); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1556 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1557 | browsers = get_available_browsers(); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1558 | if (browsers != 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
|
1559 | label = pidgin_prefs_dropdown_from_list(vbox,_("_Browser:"), PURPLE_PREF_STRING, |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1560 | PIDGIN_PREFS_ROOT "/browsers/browser", |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1561 | browsers); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1562 | g_list_free(browsers); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1563 | gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1564 | gtk_size_group_add_widget(sg, label); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1565 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1566 | hbox = gtk_hbox_new(FALSE, 0); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1567 | label = pidgin_prefs_dropdown(hbox, _("_Open link in:"), PURPLE_PREF_INT, |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1568 | PIDGIN_PREFS_ROOT "/browsers/place", |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1569 | _("Browser default"), PIDGIN_BROWSER_DEFAULT, |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1570 | _("Existing window"), PIDGIN_BROWSER_CURRENT, |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1571 | _("New window"), PIDGIN_BROWSER_NEW_WINDOW, |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1572 | _("New tab"), PIDGIN_BROWSER_NEW_TAB, |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1573 | 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
|
1574 | gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1575 | gtk_size_group_add_widget(sg, label); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1576 | gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1577 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1578 | if (!strcmp(purple_prefs_get_string(PIDGIN_PREFS_ROOT "/browsers/browser"), "custom")) |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1579 | gtk_widget_set_sensitive(hbox, FALSE); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1580 | purple_prefs_connect_callback(prefs, PIDGIN_PREFS_ROOT "/browsers/browser", |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1581 | browser_changed1_cb, hbox); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1582 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1583 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1584 | entry = gtk_entry_new(); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1585 | gtk_entry_set_text(GTK_ENTRY(entry), |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1586 | purple_prefs_get_path(PIDGIN_PREFS_ROOT "/browsers/command")); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1587 | g_signal_connect(G_OBJECT(entry), "focus-out-event", |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1588 | G_CALLBACK(manual_browser_set), 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
|
1589 | hbox = pidgin_add_widget_to_vbox(GTK_BOX(vbox), _("_Manual:\n(%s for URL)"), sg, entry, TRUE, 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
|
1590 | if (strcmp(purple_prefs_get_string(PIDGIN_PREFS_ROOT "/browsers/browser"), "custom")) |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1591 | gtk_widget_set_sensitive(hbox, FALSE); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1592 | purple_prefs_connect_callback(prefs, PIDGIN_PREFS_ROOT "/browsers/browser", |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1593 | browser_changed2_cb, hbox); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1594 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1595 | gtk_widget_show_all(ret); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1596 | g_object_unref(sg); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1597 | return ret; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1598 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1599 | #endif /*_WIN32*/ |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1600 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1601 | static GtkWidget * |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1602 | logging_page(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
|
1603 | { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1604 | GtkWidget *ret; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1605 | GtkWidget *vbox; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1606 | GList *names; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1607 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1608 | ret = gtk_vbox_new(FALSE, PIDGIN_HIG_CAT_SPACE); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1609 | gtk_container_set_border_width (GTK_CONTAINER (ret), PIDGIN_HIG_BORDER); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1610 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1611 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1612 | vbox = pidgin_make_frame (ret, _("Logging")); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1613 | names = purple_log_logger_get_options(); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1614 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1615 | pidgin_prefs_dropdown_from_list(vbox, _("Log _format:"), PURPLE_PREF_STRING, |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1616 | "/purple/logging/format", names); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1617 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1618 | g_list_free(names); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1619 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1620 | pidgin_prefs_checkbox(_("Log all _instant 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
|
1621 | "/purple/logging/log_ims", vbox); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1622 | pidgin_prefs_checkbox(_("Log all c_hats"), |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1623 | "/purple/logging/log_chats", vbox); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1624 | pidgin_prefs_checkbox(_("Log all _status changes to system log"), |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1625 | "/purple/logging/log_system", vbox); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1626 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1627 | gtk_widget_show_all(ret); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1628 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1629 | return ret; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1630 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1631 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1632 | #ifndef _WIN32 |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1633 | static gint sound_cmd_yeah(GtkEntry *entry, gpointer d) |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1634 | { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1635 | purple_prefs_set_path(PIDGIN_PREFS_ROOT "/sound/command", |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1636 | gtk_entry_get_text(GTK_ENTRY(entry))); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1637 | return TRUE; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1638 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1639 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1640 | static 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
|
1641 | sound_changed1_cb(const char *name, PurplePrefType 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
|
1642 | gconstpointer value, gpointer 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
|
1643 | { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1644 | GtkWidget *hbox = 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
|
1645 | const char *method = 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
|
1646 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1647 | gtk_widget_set_sensitive(hbox, !strcmp(method, "custom")); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1648 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1649 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1650 | static 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
|
1651 | sound_changed2_cb(const char *name, PurplePrefType 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
|
1652 | gconstpointer value, gpointer 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
|
1653 | { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1654 | GtkWidget *vbox = 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
|
1655 | const char *method = 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
|
1656 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1657 | gtk_widget_set_sensitive(vbox, strcmp(method, "none")); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1658 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1659 | #endif /* !_WIN32 */ |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1660 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1661 | #ifdef USE_GSTREAMER |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1662 | static 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
|
1663 | sound_changed3_cb(const char *name, PurplePrefType 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
|
1664 | gconstpointer value, gpointer 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
|
1665 | { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1666 | GtkWidget *hbox = 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
|
1667 | const char *method = 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
|
1668 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1669 | gtk_widget_set_sensitive(hbox, |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1670 | !strcmp(method, "automatic") || |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1671 | !strcmp(method, "esd")); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1672 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1673 | #endif /* USE_GSTREAMER */ |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1674 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1675 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1676 | static 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
|
1677 | event_toggled(GtkCellRendererToggle *cell, gchar *pth, gpointer 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
|
1678 | { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1679 | GtkTreeModel *model = (GtkTreeModel *)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
|
1680 | GtkTreeIter iter; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1681 | GtkTreePath *path = gtk_tree_path_new_from_string(pth); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1682 | char *pref; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1683 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1684 | gtk_tree_model_get_iter (model, &iter, path); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1685 | gtk_tree_model_get (model, &iter, |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1686 | 2, &pref, |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1687 | -1); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1688 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1689 | purple_prefs_set_bool(pref, !gtk_cell_renderer_toggle_get_active(cell)); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1690 | g_free(pref); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1691 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1692 | gtk_list_store_set(GTK_LIST_STORE (model), &iter, |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1693 | 0, !gtk_cell_renderer_toggle_get_active(cell), |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1694 | -1); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1695 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1696 | gtk_tree_path_free(path); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1697 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1698 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1699 | static 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
|
1700 | test_sound(GtkWidget *button, gpointer i_am_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
|
1701 | { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1702 | char *pref; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1703 | gboolean temp_enabled; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1704 | gboolean temp_mute; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1705 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1706 | pref = g_strdup_printf(PIDGIN_PREFS_ROOT "/sound/enabled/%s", |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1707 | pidgin_sound_get_event_option(sound_row_sel)); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1708 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1709 | temp_enabled = purple_prefs_get_bool(pref); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1710 | temp_mute = purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/sound/mute"); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1711 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1712 | if (!temp_enabled) purple_prefs_set_bool(pref, TRUE); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1713 | if (temp_mute) purple_prefs_set_bool(PIDGIN_PREFS_ROOT "/sound/mute", FALSE); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1714 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1715 | purple_sound_play_event(sound_row_sel, 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
|
1716 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1717 | if (!temp_enabled) purple_prefs_set_bool(pref, FALSE); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1718 | if (temp_mute) purple_prefs_set_bool(PIDGIN_PREFS_ROOT "/sound/mute", TRUE); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1719 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1720 | g_free(pref); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1721 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1722 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1723 | /* |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1724 | * Resets a sound file back to default. |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1725 | */ |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1726 | static 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
|
1727 | reset_sound(GtkWidget *button, gpointer i_am_also_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
|
1728 | { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1729 | gchar *pref; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1730 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1731 | pref = g_strdup_printf(PIDGIN_PREFS_ROOT "/sound/file/%s", |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1732 | pidgin_sound_get_event_option(sound_row_sel)); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1733 | purple_prefs_set_path(pref, ""); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1734 | g_free(pref); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1735 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1736 | gtk_entry_set_text(GTK_ENTRY(sound_entry), _("(default)")); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1737 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1738 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1739 | static 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
|
1740 | sound_chosen_cb(void *user_data, const char *filename) |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1741 | { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1742 | gchar *pref; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1743 | int sound; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1744 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1745 | sound = GPOINTER_TO_INT(user_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
|
1746 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1747 | /* Set it -- and forget it */ |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1748 | pref = g_strdup_printf(PIDGIN_PREFS_ROOT "/sound/file/%s", |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1749 | pidgin_sound_get_event_option(sound)); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1750 | purple_prefs_set_path(pref, filename); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1751 | g_free(pref); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1752 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1753 | /* |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1754 | * If the sound we just changed is still the currently selected |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1755 | * sound, then update the box showing the file name. |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1756 | */ |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1757 | if (sound == sound_row_sel) |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1758 | gtk_entry_set_text(GTK_ENTRY(sound_entry), filename); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1759 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1760 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1761 | static void select_sound(GtkWidget *button, gpointer being_NULL_is_fun) |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1762 | { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1763 | gchar *pref; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1764 | const char *filename; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1765 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1766 | pref = g_strdup_printf(PIDGIN_PREFS_ROOT "/sound/file/%s", |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1767 | pidgin_sound_get_event_option(sound_row_sel)); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1768 | filename = purple_prefs_get_path(pref); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1769 | g_free(pref); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1770 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1771 | if (*filename == '\0') |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1772 | filename = 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
|
1773 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1774 | purple_request_file(prefs, _("Sound Selection"), filename, FALSE, |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1775 | G_CALLBACK(sound_chosen_cb), 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
|
1776 | NULL, NULL, 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
|
1777 | GINT_TO_POINTER(sound_row_sel)); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1778 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1779 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1780 | #ifdef USE_GSTREAMER |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1781 | static gchar* prefs_sound_volume_format(GtkScale *scale, gdouble 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
|
1782 | { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1783 | if(val < 15) { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1784 | return g_strdup_printf(_("Quietest")); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1785 | } else if(val < 30) { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1786 | return g_strdup_printf(_("Quieter")); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1787 | } else if(val < 45) { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1788 | return g_strdup_printf(_("Quiet")); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1789 | } else if(val < 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
|
1790 | return g_strdup_printf(_("Normal")); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1791 | } else if(val < 70) { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1792 | return g_strdup_printf(_("Loud")); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1793 | } else if(val < 85) { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1794 | return g_strdup_printf(_("Louder")); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1795 | } else { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1796 | return g_strdup_printf(_("Loudest")); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1797 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1798 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1799 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1800 | static void prefs_sound_volume_changed(GtkRange *range) |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1801 | { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1802 | int val = (int)gtk_range_get_value(GTK_RANGE(range)); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1803 | purple_prefs_set_int(PIDGIN_PREFS_ROOT "/sound/volume", 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
|
1804 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1805 | #endif |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1806 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1807 | static void prefs_sound_sel(GtkTreeSelection *sel, GtkTreeModel *model) { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1808 | GtkTreeIter iter; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1809 | GValue 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
|
1810 | const char *file; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1811 | char *pref; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1812 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1813 | if (! gtk_tree_selection_get_selected (sel, &model, &iter)) |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1814 | return; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1815 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1816 | val.g_type = 0; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1817 | gtk_tree_model_get_value (model, &iter, 3, &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
|
1818 | sound_row_sel = g_value_get_uint(&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
|
1819 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1820 | pref = g_strdup_printf(PIDGIN_PREFS_ROOT "/sound/file/%s", |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1821 | pidgin_sound_get_event_option(sound_row_sel)); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1822 | file = purple_prefs_get_path(pref); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1823 | g_free(pref); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1824 | if (sound_entry) |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1825 | gtk_entry_set_text(GTK_ENTRY(sound_entry), (file && *file != '\0') ? file : _("(default)")); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1826 | g_value_unset (&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
|
1827 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1828 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1829 | static GtkWidget * |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1830 | sound_page(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
|
1831 | { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1832 | GtkWidget *ret; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1833 | GtkWidget *vbox, *sw, *button; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1834 | GtkSizeGroup *sg; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1835 | GtkTreeIter iter; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1836 | GtkWidget *event_view; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1837 | GtkListStore *event_store; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1838 | GtkCellRenderer *rend; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1839 | GtkTreeViewColumn *col; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1840 | GtkTreeSelection *sel; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1841 | GtkTreePath *path; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1842 | GtkWidget *hbox; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1843 | int j; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1844 | const char *file; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1845 | char *pref; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1846 | #ifndef _WIN32 |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1847 | GtkWidget *dd; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1848 | GtkWidget *entry; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1849 | const char *cmd; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1850 | #endif |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1851 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1852 | ret = gtk_vbox_new(FALSE, PIDGIN_HIG_CAT_SPACE); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1853 | gtk_container_set_border_width (GTK_CONTAINER (ret), PIDGIN_HIG_BORDER); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1854 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1855 | sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1856 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1857 | #ifndef _WIN32 |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1858 | vbox = pidgin_make_frame (ret, _("Sound Method")); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1859 | dd = pidgin_prefs_dropdown(vbox, _("_Method:"), PURPLE_PREF_STRING, |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1860 | PIDGIN_PREFS_ROOT "/sound/method", |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1861 | _("Console beep"), "beep", |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1862 | #ifdef USE_GSTREAMER |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1863 | _("Automatic"), "automatic", |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1864 | "ESD", "esd", |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1865 | "ALSA", "alsa", |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1866 | #endif |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1867 | _("Command"), "custom", |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1868 | _("No sounds"), "none", |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1869 | 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
|
1870 | gtk_size_group_add_widget(sg, dd); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1871 | gtk_misc_set_alignment(GTK_MISC(dd), 0, 0.5); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1872 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1873 | entry = gtk_entry_new(); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1874 | gtk_editable_set_editable(GTK_EDITABLE(entry), TRUE); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1875 | cmd = purple_prefs_get_path(PIDGIN_PREFS_ROOT "/sound/command"); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1876 | if(cmd) |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1877 | gtk_entry_set_text(GTK_ENTRY(entry), cmd); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1878 | g_signal_connect(G_OBJECT(entry), "changed", |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1879 | G_CALLBACK(sound_cmd_yeah), 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
|
1880 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1881 | hbox = pidgin_add_widget_to_vbox(GTK_BOX(vbox), _("Sound c_ommand:\n(%s for filename)"), sg, entry, TRUE, 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
|
1882 | purple_prefs_connect_callback(prefs, PIDGIN_PREFS_ROOT "/sound/method", |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1883 | sound_changed1_cb, hbox); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1884 | gtk_widget_set_sensitive(hbox, |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1885 | !strcmp(purple_prefs_get_string(PIDGIN_PREFS_ROOT "/sound/method"), |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1886 | "custom")); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1887 | #endif /* _WIN32 */ |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1888 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1889 | vbox = pidgin_make_frame (ret, _("Sound Options")); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1890 | pidgin_prefs_checkbox(_("Sounds when conversation has _focus"), |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1891 | PIDGIN_PREFS_ROOT "/sound/conv_focus", vbox); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1892 | pidgin_prefs_dropdown(vbox, _("Enable sounds:"), |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1893 | PURPLE_PREF_INT, "/purple/sound/while_status", |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1894 | _("Only when available"), 1, |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1895 | _("Only when not available"), 2, |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1896 | _("Always"), 3, |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1897 | 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
|
1898 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1899 | #ifdef USE_GSTREAMER |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1900 | sw = gtk_hscale_new_with_range(0.0, 100.0, 5.0); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1901 | gtk_range_set_increments(GTK_RANGE(sw), 5.0, 25.0); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1902 | gtk_range_set_value(GTK_RANGE(sw), purple_prefs_get_int(PIDGIN_PREFS_ROOT "/sound/volume")); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1903 | g_signal_connect (G_OBJECT (sw), "format-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
|
1904 | G_CALLBACK (prefs_sound_volume_format), |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1905 | 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
|
1906 | g_signal_connect (G_OBJECT (sw), "value-changed", |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1907 | G_CALLBACK (prefs_sound_volume_changed), |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1908 | 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
|
1909 | hbox = pidgin_add_widget_to_vbox(GTK_BOX(vbox), _("Volume:"), NULL, sw, TRUE, 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
|
1910 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1911 | purple_prefs_connect_callback(prefs, PIDGIN_PREFS_ROOT "/sound/method", |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1912 | sound_changed3_cb, hbox); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1913 | sound_changed3_cb(PIDGIN_PREFS_ROOT "/sound/method", PURPLE_PREF_STRING, |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1914 | purple_prefs_get_string(PIDGIN_PREFS_ROOT "/sound/method"), hbox); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1915 | #endif |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1916 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1917 | #ifndef _WIN32 |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1918 | gtk_widget_set_sensitive(vbox, |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1919 | strcmp(purple_prefs_get_string(PIDGIN_PREFS_ROOT "/sound/method"), "none")); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1920 | purple_prefs_connect_callback(prefs, PIDGIN_PREFS_ROOT "/sound/method", |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1921 | sound_changed2_cb, vbox); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1922 | #endif |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1923 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1924 | vbox = pidgin_make_frame(ret, _("Sound 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
|
1925 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1926 | /* The following is an ugly hack to make the frame expand so 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
|
1927 | * sound events list is big enough to be usable */ |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1928 | gtk_box_set_child_packing(GTK_BOX(vbox->parent), vbox, TRUE, TRUE, 0, |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1929 | GTK_PACK_START); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1930 | gtk_box_set_child_packing(GTK_BOX(vbox->parent->parent), vbox->parent, TRUE, |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1931 | TRUE, 0, GTK_PACK_START); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1932 | gtk_box_set_child_packing(GTK_BOX(vbox->parent->parent->parent), |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1933 | vbox->parent->parent, TRUE, TRUE, 0, GTK_PACK_START); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1934 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1935 | sw = gtk_scrolled_window_new(NULL,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
|
1936 | gtk_widget_set_size_request(sw, -1, 100); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1937 | gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1938 | gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_IN); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1939 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1940 | gtk_box_pack_start(GTK_BOX(vbox), sw, TRUE, TRUE, 0); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1941 | event_store = gtk_list_store_new (4, G_TYPE_BOOLEAN, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_UINT); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1942 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1943 | for (j=0; j < PURPLE_NUM_SOUNDS; j++) { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1944 | char *pref = g_strdup_printf(PIDGIN_PREFS_ROOT "/sound/enabled/%s", |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1945 | pidgin_sound_get_event_option(j)); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1946 | const char *label = pidgin_sound_get_event_label(j); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1947 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1948 | if (label == 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
|
1949 | g_free(pref); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1950 | continue; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1951 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1952 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1953 | gtk_list_store_append (event_store, &iter); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1954 | gtk_list_store_set(event_store, &iter, |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1955 | 0, purple_prefs_get_bool(pref), |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1956 | 1, _(label), |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1957 | 2, pref, |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1958 | 3, j, |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1959 | -1); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1960 | g_free(pref); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1961 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1962 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1963 | event_view = gtk_tree_view_new_with_model (GTK_TREE_MODEL(event_store)); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1964 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1965 | rend = gtk_cell_renderer_toggle_new(); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1966 | sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (event_view)); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1967 | g_signal_connect (G_OBJECT (sel), "changed", |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1968 | G_CALLBACK (prefs_sound_sel), |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1969 | 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
|
1970 | g_signal_connect (G_OBJECT(rend), "toggled", |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1971 | G_CALLBACK(event_toggled), event_store); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1972 | path = gtk_tree_path_new_first(); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1973 | gtk_tree_selection_select_path(sel, path); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1974 | gtk_tree_path_free(path); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1975 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1976 | col = gtk_tree_view_column_new_with_attributes (_("Play"), |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1977 | rend, |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1978 | "active", 0, |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1979 | 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
|
1980 | gtk_tree_view_append_column (GTK_TREE_VIEW(event_view), col); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1981 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1982 | rend = gtk_cell_renderer_text_new(); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1983 | col = gtk_tree_view_column_new_with_attributes (_("Event"), |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1984 | rend, |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1985 | "text", 1, |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1986 | 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
|
1987 | gtk_tree_view_append_column (GTK_TREE_VIEW(event_view), col); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1988 | g_object_unref(G_OBJECT(event_store)); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1989 | gtk_container_add(GTK_CONTAINER(sw), event_view); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1990 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1991 | hbox = gtk_hbox_new(FALSE, PIDGIN_HIG_BOX_SPACE); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1992 | gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1993 | sound_entry = gtk_entry_new(); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1994 | pref = g_strdup_printf(PIDGIN_PREFS_ROOT "/sound/file/%s", |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1995 | pidgin_sound_get_event_option(0)); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1996 | file = purple_prefs_get_path(pref); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1997 | g_free(pref); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1998 | gtk_entry_set_text(GTK_ENTRY(sound_entry), (file && *file != '\0') ? file : _("(default)")); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
1999 | gtk_editable_set_editable(GTK_EDITABLE(sound_entry), FALSE); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2000 | gtk_box_pack_start(GTK_BOX(hbox), sound_entry, FALSE, FALSE, PIDGIN_HIG_BOX_SPACE); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2001 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2002 | button = gtk_button_new_with_label(_("Test")); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2003 | g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(test_sound), 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
|
2004 | gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 1); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2005 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2006 | button = gtk_button_new_with_label(_("Reset")); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2007 | g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(reset_sound), 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
|
2008 | gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 1); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2009 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2010 | button = gtk_button_new_with_label(_("Choose...")); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2011 | g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(select_sound), 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
|
2012 | gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 1); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2013 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2014 | gtk_widget_show_all(ret); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2015 | g_object_unref(sg); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2016 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2017 | return ret; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2018 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2019 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2020 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2021 | static 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
|
2022 | set_idle_away(PurpleSavedStatus *status) |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2023 | { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2024 | purple_prefs_set_int("/purple/savedstatus/idleaway", purple_savedstatus_get_creation_time(status)); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2025 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2026 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2027 | static 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
|
2028 | set_startupstatus(PurpleSavedStatus *status) |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2029 | { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2030 | purple_prefs_set_int("/purple/savedstatus/startup", purple_savedstatus_get_creation_time(status)); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2031 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2032 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2033 | static GtkWidget * |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2034 | away_page(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
|
2035 | { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2036 | GtkWidget *ret; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2037 | GtkWidget *vbox; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2038 | GtkWidget *dd; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2039 | GtkWidget *label; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2040 | GtkWidget *button; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2041 | GtkWidget *select; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2042 | GtkWidget *menu; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2043 | GtkSizeGroup *sg; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2044 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2045 | ret = gtk_vbox_new(FALSE, PIDGIN_HIG_CAT_SPACE); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2046 | gtk_container_set_border_width (GTK_CONTAINER (ret), PIDGIN_HIG_BORDER); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2047 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2048 | sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2049 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2050 | /* Idle stuff */ |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2051 | vbox = pidgin_make_frame(ret, _("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
|
2052 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2053 | dd = pidgin_prefs_dropdown(vbox, _("_Report idle time:"), |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2054 | PURPLE_PREF_STRING, "/purple/away/idle_reporting", |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2055 | _("Never"), "none", |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2056 | _("From last sent message"), "purple", |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2057 | #if defined(USE_SCREENSAVER) || defined(HAVE_IOKIT) |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2058 | _("Based on keyboard or mouse use"), "system", |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2059 | #endif |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2060 | 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
|
2061 | gtk_size_group_add_widget(sg, dd); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2062 | gtk_misc_set_alignment(GTK_MISC(dd), 0, 0.5); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2063 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2064 | /* Away stuff */ |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2065 | vbox = pidgin_make_frame(ret, _("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
|
2066 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2067 | dd = pidgin_prefs_dropdown(vbox, _("_Auto-reply:"), |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2068 | PURPLE_PREF_STRING, "/purple/away/auto_reply", |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2069 | _("Never"), "never", |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2070 | _("When away"), "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
|
2071 | _("When both away and idle"), "awayidle", |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2072 | 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
|
2073 | gtk_size_group_add_widget(sg, dd); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2074 | gtk_misc_set_alignment(GTK_MISC(dd), 0, 0.5); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2075 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2076 | /* Auto-away stuff */ |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2077 | vbox = pidgin_make_frame(ret, _("Auto-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
|
2078 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2079 | button = pidgin_prefs_checkbox(_("Change status when _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
|
2080 | "/purple/away/away_when_idle", vbox); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2081 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2082 | select = pidgin_prefs_labeled_spin_button(vbox, |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2083 | _("_Minutes before becoming idle:"), "/purple/away/mins_before_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
|
2084 | 1, 24 * 60, sg); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2085 | g_signal_connect(G_OBJECT(button), "clicked", |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2086 | G_CALLBACK(pidgin_toggle_sensitive), select); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2087 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2088 | /* TODO: Show something useful if we don't have any saved statuses. */ |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2089 | menu = pidgin_status_menu(purple_savedstatus_get_idleaway(), G_CALLBACK(set_idle_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
|
2090 | pidgin_add_widget_to_vbox(GTK_BOX(vbox), _("Change _status to:"), sg, menu, TRUE, &label); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2091 | g_signal_connect(G_OBJECT(button), "clicked", |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2092 | G_CALLBACK(pidgin_toggle_sensitive), menu); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2093 | g_signal_connect(G_OBJECT(button), "clicked", |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2094 | G_CALLBACK(pidgin_toggle_sensitive), label); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2095 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2096 | if (!purple_prefs_get_bool("/purple/away/away_when_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
|
2097 | gtk_widget_set_sensitive(GTK_WIDGET(menu), FALSE); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2098 | gtk_widget_set_sensitive(GTK_WIDGET(select), FALSE); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2099 | gtk_widget_set_sensitive(GTK_WIDGET(label), FALSE); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2100 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2101 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2102 | /* Signon status stuff */ |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2103 | vbox = pidgin_make_frame(ret, _("Status at Startup")); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2104 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2105 | button = pidgin_prefs_checkbox(_("Use status from last _exit at startup"), |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2106 | "/purple/savedstatus/startup_current_status", vbox); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2107 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2108 | /* TODO: Show something useful if we don't have any saved statuses. */ |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2109 | menu = pidgin_status_menu(purple_savedstatus_get_startup(), G_CALLBACK(set_startupstatus)); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2110 | g_signal_connect(G_OBJECT(button), "clicked", |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2111 | G_CALLBACK(pidgin_toggle_sensitive), menu); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2112 | pidgin_add_widget_to_vbox(GTK_BOX(vbox), _("Status to a_pply at startup:"), sg, menu, TRUE, &label); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2113 | g_signal_connect(G_OBJECT(button), "clicked", |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2114 | G_CALLBACK(pidgin_toggle_sensitive), label); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2115 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2116 | if (purple_prefs_get_bool("/purple/savedstatus/startup_current_status")) { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2117 | gtk_widget_set_sensitive(GTK_WIDGET(menu), FALSE); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2118 | gtk_widget_set_sensitive(GTK_WIDGET(label), FALSE); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2119 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2120 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2121 | gtk_widget_show_all(ret); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2122 | g_object_unref(sg); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2123 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2124 | return ret; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2125 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2126 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2127 | static int |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2128 | prefs_notebook_add_page(const char *text, |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2129 | GtkWidget *page, |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2130 | int ind) { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2131 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2132 | #if GTK_CHECK_VERSION(2,4,0) |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2133 | return gtk_notebook_append_page(GTK_NOTEBOOK(prefsnotebook), page, gtk_label_new(text)); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2134 | #else |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2135 | gtk_notebook_append_page(GTK_NOTEBOOK(prefsnotebook), page, gtk_label_new(text)); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2136 | return gtk_notebook_page_num(GTK_NOTEBOOK(prefsnotebook), page); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2137 | #endif |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2138 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2139 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2140 | static void prefs_notebook_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
|
2141 | prefs_notebook_add_page(_("Interface"), interface_page(), notebook_page++); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2142 | prefs_notebook_add_page(_("Conversations"), conv_page(), notebook_page++); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2143 | prefs_notebook_add_page(_("Smiley Themes"), theme_page(), notebook_page++); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2144 | prefs_notebook_add_page(_("Sounds"), sound_page(), notebook_page++); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2145 | prefs_notebook_add_page(_("Network"), network_page(), notebook_page++); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2146 | #ifndef _WIN32 |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2147 | /* We use the registered default browser in windows */ |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2148 | /* if the user is running gnome 2.x or Mac OS X, hide the browsers tab */ |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2149 | if ((purple_running_gnome() == FALSE) && (purple_running_osx() == FALSE)) { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2150 | prefs_notebook_add_page(_("Browser"), browser_page(), notebook_page++); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2151 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2152 | #endif |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2153 | prefs_notebook_add_page(_("Logging"), logging_page(), notebook_page++); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2154 | prefs_notebook_add_page(_("Status / Idle"), away_page(), notebook_page++); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2155 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2156 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2157 | void pidgin_prefs_show(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
|
2158 | { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2159 | GtkWidget *vbox; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2160 | GtkWidget *notebook; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2161 | GtkWidget *button; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2162 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2163 | if (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
|
2164 | gtk_window_present(GTK_WINDOW(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
|
2165 | return; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2166 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2167 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2168 | /* copy the preferences to tmp values... |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2169 | * I liked "take affect immediately" Oh well :-( */ |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2170 | /* (that should have been "effect," right?) */ |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2171 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2172 | /* Back to instant-apply! I win! BU-HAHAHA! */ |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2173 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2174 | /* Create the window */ |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2175 | prefs = pidgin_create_dialog(_("Preferences"), PIDGIN_HIG_BORDER, "preferences", FALSE); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2176 | g_signal_connect(G_OBJECT(prefs), "destroy", |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2177 | G_CALLBACK(delete_prefs), 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
|
2178 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2179 | vbox = pidgin_dialog_get_vbox_with_properties(GTK_DIALOG(prefs), FALSE, PIDGIN_HIG_BORDER); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2180 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2181 | /* The notebook */ |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2182 | prefsnotebook = notebook = gtk_notebook_new (); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2183 | gtk_box_pack_start (GTK_BOX (vbox), notebook, FALSE, FALSE, 0); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2184 | gtk_widget_show(prefsnotebook); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2185 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2186 | button = pidgin_dialog_add_button(GTK_DIALOG(prefs), GTK_STOCK_CLOSE, NULL, 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
|
2187 | g_signal_connect_swapped(G_OBJECT(button), "clicked", |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2188 | G_CALLBACK(gtk_widget_destroy), 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
|
2189 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2190 | prefs_notebook_init(); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2191 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2192 | /* Show everything. */ |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2193 | gtk_widget_show(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
|
2194 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2195 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2196 | static 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
|
2197 | set_bool_pref(GtkWidget *w, const char *key) |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2198 | { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2199 | purple_prefs_set_bool(key, |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2200 | gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w))); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2201 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2202 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2203 | GtkWidget * |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2204 | pidgin_prefs_checkbox(const char *text, const char *key, GtkWidget *page) |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2205 | { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2206 | GtkWidget *button; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2207 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2208 | button = gtk_check_button_new_with_mnemonic(text); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2209 | gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2210 | purple_prefs_get_bool(key)); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2211 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2212 | gtk_box_pack_start(GTK_BOX(page), button, FALSE, FALSE, 0); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2213 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2214 | g_signal_connect(G_OBJECT(button), "clicked", |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2215 | G_CALLBACK(set_bool_pref), (char *)key); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2216 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2217 | gtk_widget_show(button); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2218 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2219 | return button; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2220 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2221 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2222 | static 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
|
2223 | smiley_theme_pref_cb(const char *name, PurplePrefType 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
|
2224 | gconstpointer value, gpointer 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
|
2225 | { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2226 | const char *themename = 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
|
2227 | GSList *themes; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2228 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2229 | for (themes = smiley_themes; themes; themes = themes->next) { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2230 | struct smiley_theme *smile = themes->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
|
2231 | if (smile->name && strcmp(themename, smile->name) == 0) { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2232 | pidgin_themes_load_smiley_theme(smile->path, TRUE); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2233 | break; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2234 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2235 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2236 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2237 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2238 | 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
|
2239 | 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
|
2240 | { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2241 | 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
|
2242 | 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
|
2243 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2244 | #ifndef _WIN32 |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2245 | /* Browsers */ |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2246 | purple_prefs_add_none(PIDGIN_PREFS_ROOT "/browsers"); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2247 | purple_prefs_add_int(PIDGIN_PREFS_ROOT "/browsers/place", PIDGIN_BROWSER_DEFAULT); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2248 | purple_prefs_add_path(PIDGIN_PREFS_ROOT "/browsers/command", ""); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2249 | purple_prefs_add_string(PIDGIN_PREFS_ROOT "/browsers/browser", "mozilla"); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2250 | #endif |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2251 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2252 | /* 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
|
2253 | 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
|
2254 | 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
|
2255 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2256 | /* 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
|
2257 | 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
|
2258 | 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
|
2259 | 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
|
2260 | 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
|
2261 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2262 | /* Smiley Themes */ |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2263 | purple_prefs_add_none(PIDGIN_PREFS_ROOT "/smileys"); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2264 | purple_prefs_add_string(PIDGIN_PREFS_ROOT "/smileys/theme", "Default"); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2265 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2266 | /* Smiley Callbacks */ |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2267 | purple_prefs_connect_callback(prefs, PIDGIN_PREFS_ROOT "/smileys/theme", |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2268 | smiley_theme_pref_cb, 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
|
2269 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2270 | 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
|
2271 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2272 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2273 | void 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
|
2274 | { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2275 | const char *str; |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2276 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2277 | purple_prefs_rename("/gaim/gtk", 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
|
2278 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2279 | /* 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
|
2280 | purple_prefs_rename(PIDGIN_PREFS_ROOT "/logging/log_ims", "/purple/logging/log_ims"); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2281 | purple_prefs_rename(PIDGIN_PREFS_ROOT "/logging/log_chats", "/purple/logging/log_chats"); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2282 | purple_prefs_rename("/purple/conversations/placement", |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2283 | PIDGIN_PREFS_ROOT "/conversations/placement"); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2284 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2285 | purple_prefs_rename(PIDGIN_PREFS_ROOT "/debug/timestamps", "/purple/debug/timestamps"); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2286 | 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
|
2287 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2288 | 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
|
2289 | 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
|
2290 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2291 | /* this string pref moved into the core, try to be friendly */ |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2292 | purple_prefs_rename(PIDGIN_PREFS_ROOT "/idle/reporting_method", "/purple/away/idle_reporting"); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2293 | if ((str = purple_prefs_get_string("/purple/away/idle_reporting")) && |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2294 | strcmp(str, "gaim") == 0) |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2295 | purple_prefs_set_string("/purple/away/idle_reporting", "purple"); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2296 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2297 | /* 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
|
2298 | 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
|
2299 | 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
|
2300 | 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
|
2301 | 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
|
2302 | 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
|
2303 | purple_prefs_remove(PIDGIN_PREFS_ROOT "/blist/show_warning_level"); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2304 | 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
|
2305 | 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
|
2306 | 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
|
2307 | 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
|
2308 | 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
|
2309 | 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
|
2310 | 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
|
2311 | purple_prefs_remove(PIDGIN_PREFS_ROOT "/conversations/show_smileys"); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2312 | 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
|
2313 | purple_prefs_remove(PIDGIN_PREFS_ROOT "/conversations/smiley_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
|
2314 | 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
|
2315 | 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
|
2316 | 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
|
2317 | 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
|
2318 | 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
|
2319 | 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
|
2320 | 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
|
2321 | 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
|
2322 | 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
|
2323 | 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
|
2324 | 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
|
2325 | purple_prefs_remove(PIDGIN_PREFS_ROOT "/conversations/passthrough_unknown_commands"); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2326 | 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
|
2327 | purple_prefs_remove(PIDGIN_PREFS_ROOT "/logging/individual_logs"); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2328 | 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
|
2329 | purple_prefs_remove(PIDGIN_PREFS_ROOT "/sound/silent_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
|
2330 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2331 | /* Convert old queuing prefs to hide_new 3-way pref. */ |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2332 | if (purple_prefs_exists("/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
|
2333 | purple_prefs_get_bool("/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
|
2334 | { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2335 | purple_prefs_set_string(PIDGIN_PREFS_ROOT "/conversations/im/hide_new", "always"); |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2336 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2337 | else if (purple_prefs_exists(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
|
2338 | purple_prefs_get_bool(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
|
2339 | { |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2340 | purple_prefs_set_string(PIDGIN_PREFS_ROOT "/conversations/im/hide_new", "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
|
2341 | } |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2342 | 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
|
2343 | 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
|
2344 | 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
|
2345 | |
|
e7d643f4de4b
Bring back the "Close IMs immediately when the tab is closed" pref. As far
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
22412
diff
changeset
|
2346 | 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
|
2347 | 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
|
2348 | 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
|
2349 | 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
|
2350 | 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
|
2351 | 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
|
2352 | 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
|
2353 | PIDGIN_PREFS_ROOT "/conversations/im/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
|
2354 | } |