Mercurial > pidgin
annotate src/gtkprefs.c @ 5718:c19cc2a3d65e
[gaim-migrate @ 6140]
Connecting using the checkbox works again. Sean broke it. Tsk tsk.
committer: Tailor Script <tailor@pidgin.im>
| author | Christian Hammond <chipx86@chipx86.com> |
|---|---|
| date | Tue, 03 Jun 2003 20:25:21 +0000 |
| parents | 52f301dbfeaa |
| children | 96214f5de47c |
| rev | line source |
|---|---|
|
5550
b18c2a37cc96
[gaim-migrate @ 5951]
Christian Hammond <chipx86@chipx86.com>
parents:
5547
diff
changeset
|
1 /*** |
|
5530
2c4c975620f0
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5440
diff
changeset
|
2 * @file gtkprefs.c GTK+ Preferences |
|
2c4c975620f0
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5440
diff
changeset
|
3 * @ingroup gtkui |
|
2c4c975620f0
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5440
diff
changeset
|
4 * |
| 5440 | 5 * gaim |
| 6 * | |
| 7 * Copyright (C) 1998-2002, Mark Spencer <markster@marko.net> | |
| 8 * | |
| 9 * This program is free software; you can redistribute it and/or modify | |
| 10 * it under the terms of the GNU General Public License as published by | |
| 11 * the Free Software Foundation; either version 2 of the License, or | |
| 12 * (at your option) any later version. | |
| 13 * | |
| 14 * This program is distributed in the hope that it will be useful, | |
| 15 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 17 * GNU General Public License for more details. | |
| 18 * | |
| 19 * You should have received a copy of the GNU General Public License | |
| 20 * along with this program; if not, write to the Free Software | |
| 21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
| 22 * | |
| 23 */ | |
| 24 | |
| 25 #ifdef HAVE_CONFIG_H | |
| 26 #include <config.h> | |
| 27 #endif | |
| 28 #include <string.h> | |
| 29 #include <sys/time.h> | |
| 30 | |
| 31 #include <sys/types.h> | |
| 32 #include <sys/stat.h> | |
| 33 | |
| 34 #include <unistd.h> | |
| 35 #include <stdio.h> | |
| 36 #include <stdlib.h> | |
| 37 #include <stdarg.h> | |
| 38 #include <ctype.h> | |
| 39 #include <gtk/gtk.h> | |
| 40 #include "gtkimhtml.h" | |
| 41 #include "gaim.h" | |
| 42 #include "gtkblist.h" | |
|
5530
2c4c975620f0
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5440
diff
changeset
|
43 #include "gtkdebug.h" |
| 5440 | 44 #include "gtkplugin.h" |
|
5530
2c4c975620f0
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5440
diff
changeset
|
45 #include "gtkprefs.h" |
| 5440 | 46 #include "prpl.h" |
|
5530
2c4c975620f0
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5440
diff
changeset
|
47 #include "prefs.h" |
| 5440 | 48 #include "proxy.h" |
| 49 #include "sound.h" | |
| 5684 | 50 #include "gtksound.h" |
| 5440 | 51 #include "notify.h" |
| 52 | |
| 53 #ifdef _WIN32 | |
| 54 #include "win32dep.h" | |
| 55 #endif | |
| 56 | |
|
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
57 #define PROXYHOST 0 |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
58 #define PROXYPORT 1 |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
59 #define PROXYTYPE 2 |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
60 #define PROXYUSER 3 |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
61 #define PROXYPASS 4 |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
62 |
|
5560
b7319c094153
[gaim-migrate @ 5961]
Christian Hammond <chipx86@chipx86.com>
parents:
5554
diff
changeset
|
63 /* XXX This needs to be made static after we solve the away.c mess. */ |
|
b7319c094153
[gaim-migrate @ 5961]
Christian Hammond <chipx86@chipx86.com>
parents:
5554
diff
changeset
|
64 GtkListStore *prefs_away_store = NULL; |
|
b7319c094153
[gaim-migrate @ 5961]
Christian Hammond <chipx86@chipx86.com>
parents:
5554
diff
changeset
|
65 GtkWidget *prefs_away_menu = NULL; |
|
b7319c094153
[gaim-migrate @ 5961]
Christian Hammond <chipx86@chipx86.com>
parents:
5554
diff
changeset
|
66 |
|
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
67 static GtkWidget *tree_v = NULL; |
|
5560
b7319c094153
[gaim-migrate @ 5961]
Christian Hammond <chipx86@chipx86.com>
parents:
5554
diff
changeset
|
68 |
| 5440 | 69 |
| 70 static int sound_row_sel = 0; | |
| 71 static char *last_sound_dir = NULL; | |
|
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
72 static GtkWidget *preflabel; |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
73 static GtkWidget *prefsnotebook; |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
74 static GtkTreeStore *prefstree; |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
75 |
| 5440 | 76 |
| 77 static GtkWidget *sounddialog = NULL; | |
| 78 static GtkWidget *browser_entry = NULL; | |
| 79 static GtkWidget *sound_entry = NULL; | |
| 80 static GtkWidget *away_text = NULL; | |
| 81 static GtkListStore *smiley_theme_store = NULL; | |
|
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
82 static GtkWidget *prefs_proxy_frame = NULL; |
| 5440 | 83 |
| 84 static GtkWidget *prefs = NULL; | |
|
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
85 static GtkWidget *debugbutton = NULL; |
| 5440 | 86 static int notebook_page = 0; |
| 87 static GtkTreeIter plugin_iter; | |
| 88 | |
|
5568
fb4f7bd7525c
[gaim-migrate @ 5970]
Christian Hammond <chipx86@chipx86.com>
parents:
5567
diff
changeset
|
89 static guint browser_pref_id = 0; |
|
fb4f7bd7525c
[gaim-migrate @ 5970]
Christian Hammond <chipx86@chipx86.com>
parents:
5567
diff
changeset
|
90 |
| 5440 | 91 /* |
| 92 * PROTOTYPES | |
| 93 */ | |
|
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
94 static GtkTreeIter *prefs_notebook_add_page(const char*, GdkPixbuf*, |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
95 GtkWidget*, GtkTreeIter*, |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
96 GtkTreeIter*, int); |
|
5550
b18c2a37cc96
[gaim-migrate @ 5951]
Christian Hammond <chipx86@chipx86.com>
parents:
5547
diff
changeset
|
97 static GtkWidget *prefs_checkbox(const char *, const char *, GtkWidget *); |
|
b18c2a37cc96
[gaim-migrate @ 5951]
Christian Hammond <chipx86@chipx86.com>
parents:
5547
diff
changeset
|
98 static GtkWidget *prefs_labeled_spin_button(GtkWidget *, const gchar *, |
|
5551
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
99 char *key, int, int, |
|
5550
b18c2a37cc96
[gaim-migrate @ 5951]
Christian Hammond <chipx86@chipx86.com>
parents:
5547
diff
changeset
|
100 GtkSizeGroup *); |
|
b18c2a37cc96
[gaim-migrate @ 5951]
Christian Hammond <chipx86@chipx86.com>
parents:
5547
diff
changeset
|
101 static GtkWidget *prefs_dropdown(GtkWidget *, const gchar *, GaimPrefType type, |
|
b18c2a37cc96
[gaim-migrate @ 5951]
Christian Hammond <chipx86@chipx86.com>
parents:
5547
diff
changeset
|
102 const char *, ...); |
|
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
103 static GtkWidget *prefs_dropdown_from_list(GtkWidget *, const gchar *, |
|
5550
b18c2a37cc96
[gaim-migrate @ 5951]
Christian Hammond <chipx86@chipx86.com>
parents:
5547
diff
changeset
|
104 GaimPrefType type, |
|
5551
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
105 const char *, GList *); |
|
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
106 static GtkWidget *show_color_pref(GtkWidget *, gboolean); |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
107 static void delete_prefs(GtkWidget *, void *); |
| 5440 | 108 static void update_plugin_list(void *data); |
| 109 | |
|
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
110 #ifndef _WIN32 |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
111 static gboolean program_is_valid(const char *); |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
112 #endif |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
113 |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
114 void set_default_away(GtkWidget *, gpointer); |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
115 |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
116 static void |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
117 update_spin_value(GtkWidget *w, GtkWidget *spin) |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
118 { |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
119 const char *key = g_object_get_data(G_OBJECT(spin), "val"); |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
120 int value; |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
121 |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
122 value = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(spin)); |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
123 |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
124 gaim_prefs_set_int(key, value); |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
125 } |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
126 |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
127 static GtkWidget * |
|
5551
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
128 prefs_labeled_spin_button(GtkWidget *box, const gchar *title, char *key, |
|
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
129 int min, int max, GtkSizeGroup *sg) |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
130 { |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
131 GtkWidget *hbox; |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
132 GtkWidget *label; |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
133 GtkWidget *spin; |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
134 GtkObject *adjust; |
|
5550
b18c2a37cc96
[gaim-migrate @ 5951]
Christian Hammond <chipx86@chipx86.com>
parents:
5547
diff
changeset
|
135 int val; |
|
b18c2a37cc96
[gaim-migrate @ 5951]
Christian Hammond <chipx86@chipx86.com>
parents:
5547
diff
changeset
|
136 |
|
b18c2a37cc96
[gaim-migrate @ 5951]
Christian Hammond <chipx86@chipx86.com>
parents:
5547
diff
changeset
|
137 val = gaim_prefs_get_int(key); |
|
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
138 |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
139 hbox = gtk_hbox_new(FALSE, 5); |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
140 gtk_box_pack_start(GTK_BOX(box), hbox, FALSE, FALSE, 5); |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
141 gtk_widget_show(hbox); |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
142 |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
143 label = gtk_label_new_with_mnemonic(title); |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
144 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
145 gtk_widget_show(label); |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
146 |
|
5550
b18c2a37cc96
[gaim-migrate @ 5951]
Christian Hammond <chipx86@chipx86.com>
parents:
5547
diff
changeset
|
147 adjust = gtk_adjustment_new(val, min, max, 1, 1, 1); |
|
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
148 spin = gtk_spin_button_new(GTK_ADJUSTMENT(adjust), 1, 0); |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
149 g_object_set_data(G_OBJECT(spin), "val", key); |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
150 gtk_widget_set_size_request(spin, 50, -1); |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
151 gtk_box_pack_start(GTK_BOX(hbox), spin, FALSE, FALSE, 0); |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
152 g_signal_connect(G_OBJECT(adjust), "value-changed", |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
153 G_CALLBACK(update_spin_value), GTK_WIDGET(spin)); |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
154 gtk_widget_show(spin); |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
155 |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
156 gtk_label_set_mnemonic_widget(GTK_LABEL(label), spin); |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
157 |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
158 if (sg) { |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
159 gtk_size_group_add_widget(sg, label); |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
160 gtk_misc_set_alignment(GTK_MISC(label), 0, 0); |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
161 } |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
162 |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
163 return label; |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
164 } |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
165 |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
166 static void |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
167 dropdown_set(GObject *w, const char *key) |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
168 { |
|
5551
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
169 const char *bool_key; |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
170 const char *str_value; |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
171 int int_value; |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
172 GaimPrefType type; |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
173 |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
174 type = GPOINTER_TO_INT(g_object_get_data(w, "type")); |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
175 |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
176 if (type == GAIM_PREF_INT) { |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
177 int_value = GPOINTER_TO_INT(g_object_get_data(w, "value")); |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
178 |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
179 gaim_prefs_set_int(key, int_value); |
|
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
180 } |
|
5551
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
181 else if (type == GAIM_PREF_STRING) { |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
182 str_value = (const char *)g_object_get_data(w, "value"); |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
183 |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
184 gaim_prefs_set_string(key, str_value); |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
185 } |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
186 else if (type == GAIM_PREF_BOOLEAN) { |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
187 bool_key = (const char *)g_object_get_data(w, "value"); |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
188 |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
189 if (!strcmp(key, bool_key)) |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
190 return; |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
191 |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
192 gaim_prefs_set_bool(key, FALSE); |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
193 gaim_prefs_set_bool(bool_key, TRUE); |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
194 } |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
195 |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
196 #if 0 |
|
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
197 if (option == (int*)&global_proxy_info.proxytype) { |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
198 if (opt == PROXY_NONE) |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
199 gtk_widget_set_sensitive(prefs_proxy_frame, FALSE); |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
200 else |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
201 gtk_widget_set_sensitive(prefs_proxy_frame, TRUE); |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
202 } else if (option == &web_browser) { |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
203 if (opt == BROWSER_MANUAL) |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
204 gtk_widget_set_sensitive(gtk_widget_get_parent(browser_entry), TRUE); |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
205 else |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
206 gtk_widget_set_sensitive(gtk_widget_get_parent(browser_entry), FALSE); |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
207 } else if (option == (int*)&sound_options) { |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
208 if (opt == OPT_SOUND_CMD) |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
209 gtk_widget_set_sensitive(sndcmd, TRUE); |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
210 else |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
211 gtk_widget_set_sensitive(sndcmd, FALSE); |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
212 gaim_sound_change_output_method(); |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
213 } else if (option == (int*)&blist_options) { |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
214 gaim_gtk_blist_update_toolbar(); |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
215 } else if (option == (int*)&im_options) { |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
216 if (clear == (OPT_IM_SIDE_TAB | OPT_IM_BR_TAB)) |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
217 gaim_gtkconv_update_tabs(); |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
218 else if (clear == (OPT_IM_BUTTON_TEXT | OPT_IM_BUTTON_XPM)) |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
219 gaim_gtkconv_update_im_button_style(); |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
220 } else if (option == (int*)&chat_options) { |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
221 if (clear == (OPT_CHAT_SIDE_TAB | OPT_CHAT_BR_TAB)) |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
222 gaim_gtkconv_update_tabs(); |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
223 else if (clear == (OPT_CHAT_BUTTON_TEXT | OPT_CHAT_BUTTON_XPM)) |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
224 gaim_gtkconv_update_chat_button_style(); |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
225 // } else if (option == (int*)&blist_options) { |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
226 // set_blist_tab(); |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
227 } else if (option == (int *)&conv_placement_option) { |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
228 gaim_conv_placement_set_active(conv_placement_option); |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
229 } |
|
5551
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
230 #endif |
|
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
231 } |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
232 |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
233 static GtkWidget * |
|
5546
22cf337e8b8f
[gaim-migrate @ 5947]
Christian Hammond <chipx86@chipx86.com>
parents:
5545
diff
changeset
|
234 prefs_dropdown_from_list(GtkWidget *box, const gchar *title, GaimPrefType type, |
|
22cf337e8b8f
[gaim-migrate @ 5947]
Christian Hammond <chipx86@chipx86.com>
parents:
5545
diff
changeset
|
235 const char *key, GList *menuitems) |
|
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
236 { |
|
5546
22cf337e8b8f
[gaim-migrate @ 5947]
Christian Hammond <chipx86@chipx86.com>
parents:
5545
diff
changeset
|
237 GtkWidget *dropdown, *opt, *menu; |
|
22cf337e8b8f
[gaim-migrate @ 5947]
Christian Hammond <chipx86@chipx86.com>
parents:
5545
diff
changeset
|
238 GtkWidget *label; |
|
22cf337e8b8f
[gaim-migrate @ 5947]
Christian Hammond <chipx86@chipx86.com>
parents:
5545
diff
changeset
|
239 GtkWidget *hbox; |
|
22cf337e8b8f
[gaim-migrate @ 5947]
Christian Hammond <chipx86@chipx86.com>
parents:
5545
diff
changeset
|
240 gchar *text; |
|
5551
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
241 const char *bool_key = NULL; |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
242 const char *stored_str = NULL; |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
243 int stored_int = 0; |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
244 int int_value = 0; |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
245 const char *str_value = NULL; |
|
5546
22cf337e8b8f
[gaim-migrate @ 5947]
Christian Hammond <chipx86@chipx86.com>
parents:
5545
diff
changeset
|
246 int o = 0; |
|
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
247 |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
248 g_return_val_if_fail(menuitems != NULL, NULL); |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
249 |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
250 hbox = gtk_hbox_new(FALSE, 5); |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
251 gtk_container_add (GTK_CONTAINER (box), hbox); |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
252 gtk_widget_show(hbox); |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
253 |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
254 label = gtk_label_new_with_mnemonic(title); |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
255 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
256 gtk_widget_show(label); |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
257 |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
258 dropdown = gtk_option_menu_new(); |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
259 menu = gtk_menu_new(); |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
260 |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
261 gtk_label_set_mnemonic_widget(GTK_LABEL(label), dropdown); |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
262 |
|
5546
22cf337e8b8f
[gaim-migrate @ 5947]
Christian Hammond <chipx86@chipx86.com>
parents:
5545
diff
changeset
|
263 if (type == GAIM_PREF_INT) |
|
22cf337e8b8f
[gaim-migrate @ 5947]
Christian Hammond <chipx86@chipx86.com>
parents:
5545
diff
changeset
|
264 stored_int = gaim_prefs_get_int(key); |
|
22cf337e8b8f
[gaim-migrate @ 5947]
Christian Hammond <chipx86@chipx86.com>
parents:
5545
diff
changeset
|
265 else if (type == GAIM_PREF_STRING) |
|
22cf337e8b8f
[gaim-migrate @ 5947]
Christian Hammond <chipx86@chipx86.com>
parents:
5545
diff
changeset
|
266 stored_str = gaim_prefs_get_string(key); |
|
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
267 |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
268 while (menuitems != NULL && (text = (char *) menuitems->data) != NULL) { |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
269 menuitems = g_list_next(menuitems); |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
270 g_return_val_if_fail(menuitems != NULL, NULL); |
|
5546
22cf337e8b8f
[gaim-migrate @ 5947]
Christian Hammond <chipx86@chipx86.com>
parents:
5545
diff
changeset
|
271 |
|
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
272 opt = gtk_menu_item_new_with_label(text); |
|
5551
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
273 |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
274 g_object_set_data(G_OBJECT(opt), "type", GINT_TO_POINTER(type)); |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
275 |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
276 if (type == GAIM_PREF_INT) { |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
277 int_value = GPOINTER_TO_INT(menuitems->data); |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
278 g_object_set_data(G_OBJECT(opt), "value", |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
279 GINT_TO_POINTER(int_value)); |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
280 } |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
281 else if (type == GAIM_PREF_STRING) { |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
282 str_value = (const char *)menuitems->data; |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
283 |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
284 g_object_set_data(G_OBJECT(opt), "value", (char *)str_value); |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
285 } |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
286 else if (type == GAIM_PREF_BOOLEAN) { |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
287 bool_key = (const char *)menuitems->data; |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
288 |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
289 g_object_set_data(G_OBJECT(opt), "value", (char *)bool_key); |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
290 } |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
291 |
|
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
292 g_signal_connect(G_OBJECT(opt), "activate", |
|
5551
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
293 G_CALLBACK(dropdown_set), (char *)key); |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
294 |
|
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
295 gtk_widget_show(opt); |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
296 gtk_menu_shell_append(GTK_MENU_SHELL(menu), opt); |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
297 |
|
5551
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
298 if ((type == GAIM_PREF_INT && stored_int == int_value) || |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
299 (type == GAIM_PREF_STRING && !strcmp(stored_str, str_value)) || |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
300 (type == GAIM_PREF_BOOLEAN && gaim_prefs_get_bool(bool_key))) { |
|
5546
22cf337e8b8f
[gaim-migrate @ 5947]
Christian Hammond <chipx86@chipx86.com>
parents:
5545
diff
changeset
|
301 |
|
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
302 gtk_menu_set_active(GTK_MENU(menu), o); |
|
5546
22cf337e8b8f
[gaim-migrate @ 5947]
Christian Hammond <chipx86@chipx86.com>
parents:
5545
diff
changeset
|
303 } |
|
22cf337e8b8f
[gaim-migrate @ 5947]
Christian Hammond <chipx86@chipx86.com>
parents:
5545
diff
changeset
|
304 |
|
5568
fb4f7bd7525c
[gaim-migrate @ 5970]
Christian Hammond <chipx86@chipx86.com>
parents:
5567
diff
changeset
|
305 menuitems = g_list_next(menuitems); |
|
fb4f7bd7525c
[gaim-migrate @ 5970]
Christian Hammond <chipx86@chipx86.com>
parents:
5567
diff
changeset
|
306 |
|
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
307 o++; |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
308 } |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
309 |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
310 gtk_option_menu_set_menu(GTK_OPTION_MENU(dropdown), menu); |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
311 gtk_box_pack_start(GTK_BOX(hbox), dropdown, FALSE, FALSE, 0); |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
312 gtk_widget_show(dropdown); |
|
5551
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
313 |
|
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
314 return label; |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
315 } |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
316 |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
317 static GtkWidget * |
|
5546
22cf337e8b8f
[gaim-migrate @ 5947]
Christian Hammond <chipx86@chipx86.com>
parents:
5545
diff
changeset
|
318 prefs_dropdown(GtkWidget *box, const gchar *title, GaimPrefType type, |
|
5550
b18c2a37cc96
[gaim-migrate @ 5951]
Christian Hammond <chipx86@chipx86.com>
parents:
5547
diff
changeset
|
319 const char *key, ...) |
|
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
320 { |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
321 va_list ap; |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
322 GList *menuitems = NULL; |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
323 GtkWidget *dropdown = NULL; |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
324 char *name; |
|
5546
22cf337e8b8f
[gaim-migrate @ 5947]
Christian Hammond <chipx86@chipx86.com>
parents:
5545
diff
changeset
|
325 int int_value; |
|
22cf337e8b8f
[gaim-migrate @ 5947]
Christian Hammond <chipx86@chipx86.com>
parents:
5545
diff
changeset
|
326 const char *str_value; |
|
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
327 |
|
5551
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
328 va_start(ap, key); |
|
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
329 while ((name = va_arg(ap, char *)) != NULL) { |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
330 |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
331 menuitems = g_list_prepend(menuitems, name); |
|
5546
22cf337e8b8f
[gaim-migrate @ 5947]
Christian Hammond <chipx86@chipx86.com>
parents:
5545
diff
changeset
|
332 |
|
22cf337e8b8f
[gaim-migrate @ 5947]
Christian Hammond <chipx86@chipx86.com>
parents:
5545
diff
changeset
|
333 if (type == GAIM_PREF_INT) { |
|
22cf337e8b8f
[gaim-migrate @ 5947]
Christian Hammond <chipx86@chipx86.com>
parents:
5545
diff
changeset
|
334 int_value = va_arg(ap, int); |
|
22cf337e8b8f
[gaim-migrate @ 5947]
Christian Hammond <chipx86@chipx86.com>
parents:
5545
diff
changeset
|
335 menuitems = g_list_prepend(menuitems, GINT_TO_POINTER(int_value)); |
|
22cf337e8b8f
[gaim-migrate @ 5947]
Christian Hammond <chipx86@chipx86.com>
parents:
5545
diff
changeset
|
336 } |
|
22cf337e8b8f
[gaim-migrate @ 5947]
Christian Hammond <chipx86@chipx86.com>
parents:
5545
diff
changeset
|
337 else { |
|
22cf337e8b8f
[gaim-migrate @ 5947]
Christian Hammond <chipx86@chipx86.com>
parents:
5545
diff
changeset
|
338 str_value = va_arg(ap, const char *); |
|
5551
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
339 menuitems = g_list_prepend(menuitems, (char *)str_value); |
|
5546
22cf337e8b8f
[gaim-migrate @ 5947]
Christian Hammond <chipx86@chipx86.com>
parents:
5545
diff
changeset
|
340 } |
|
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
341 } |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
342 va_end(ap); |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
343 |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
344 g_return_val_if_fail(menuitems != NULL, NULL); |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
345 |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
346 menuitems = g_list_reverse(menuitems); |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
347 |
|
5551
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
348 dropdown = prefs_dropdown_from_list(box, title, type, key, menuitems); |
|
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
349 |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
350 g_list_free(menuitems); |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
351 |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
352 return dropdown; |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
353 } |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
354 |
|
5551
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
355 static void |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
356 delete_prefs(GtkWidget *asdf, void *gdsa) |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
357 { |
| 5440 | 358 GList *l; |
| 359 GaimPlugin *plug; | |
| 360 | |
| 361 gaim_plugins_unregister_probe_notify_cb(update_plugin_list); | |
| 362 | |
| 363 prefs = NULL; | |
| 364 tree_v = NULL; | |
| 365 sound_entry = NULL; | |
| 366 browser_entry = NULL; | |
| 367 debugbutton = NULL; | |
| 368 prefs_away_menu = NULL; | |
| 369 notebook_page = 0; | |
| 370 smiley_theme_store = NULL; | |
| 371 if(sounddialog) | |
| 372 gtk_widget_destroy(sounddialog); | |
| 373 g_object_unref(G_OBJECT(prefs_away_store)); | |
| 374 prefs_away_store = NULL; | |
| 375 | |
|
5568
fb4f7bd7525c
[gaim-migrate @ 5970]
Christian Hammond <chipx86@chipx86.com>
parents:
5567
diff
changeset
|
376 /* Unregister callbacks. */ |
|
fb4f7bd7525c
[gaim-migrate @ 5970]
Christian Hammond <chipx86@chipx86.com>
parents:
5567
diff
changeset
|
377 gaim_prefs_disconnect_callback(browser_pref_id); |
|
fb4f7bd7525c
[gaim-migrate @ 5970]
Christian Hammond <chipx86@chipx86.com>
parents:
5567
diff
changeset
|
378 |
| 5440 | 379 for (l = gaim_plugins_get_loaded(); l != NULL; l = l->next) { |
| 380 plug = l->data; | |
| 381 | |
| 382 if (GAIM_IS_GTK_PLUGIN(plug)) { | |
| 383 GaimGtkPluginUiInfo *ui_info; | |
| 384 | |
| 385 ui_info = GAIM_GTK_PLUGIN_UI_INFO(plug); | |
| 386 | |
| 387 if (ui_info->iter != NULL) { | |
| 388 g_free(ui_info->iter); | |
| 389 ui_info->iter = NULL; | |
| 390 } | |
| 391 } | |
| 392 } | |
| 393 } | |
| 394 | |
| 395 static void proxy_print_option(GtkEntry *entry, int entrynum) | |
| 396 { | |
|
5681
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5673
diff
changeset
|
397 GaimProxyInfo *info = gaim_global_proxy_get_info(); |
|
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5673
diff
changeset
|
398 |
| 5440 | 399 if (entrynum == PROXYHOST) |
|
5681
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5673
diff
changeset
|
400 gaim_proxy_info_set_host(info, gtk_entry_get_text(entry)); |
| 5440 | 401 else if (entrynum == PROXYPORT) |
|
5681
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5673
diff
changeset
|
402 gaim_proxy_info_set_port(info, atoi(gtk_entry_get_text(entry))); |
| 5440 | 403 else if (entrynum == PROXYUSER) |
|
5681
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5673
diff
changeset
|
404 gaim_proxy_info_set_username(info, gtk_entry_get_text(entry)); |
| 5440 | 405 else if (entrynum == PROXYPASS) |
|
5681
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5673
diff
changeset
|
406 gaim_proxy_info_set_password(info, gtk_entry_get_text(entry)); |
|
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5673
diff
changeset
|
407 |
|
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5673
diff
changeset
|
408 /* If the user specifies it, we want to save it. */ |
|
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5673
diff
changeset
|
409 gaim_global_proxy_set_from_prefs(TRUE); |
| 5440 | 410 } |
| 411 | |
| 412 /* OK, Apply and Cancel */ | |
| 413 | |
| 414 static void pref_nb_select(GtkTreeSelection *sel, GtkNotebook *nb) { | |
| 415 GtkTreeIter iter; | |
| 416 char text[128]; | |
| 417 GValue val = { 0, }; | |
| 418 GtkTreeModel *model = GTK_TREE_MODEL(prefstree); | |
| 419 | |
| 420 if (! gtk_tree_selection_get_selected (sel, &model, &iter)) | |
| 421 return; | |
| 422 gtk_tree_model_get_value (model, &iter, 1, &val); | |
| 423 g_snprintf(text, sizeof(text), "<span weight=\"bold\" size=\"larger\">%s</span>", | |
| 424 g_value_get_string(&val)); | |
| 425 gtk_label_set_markup (GTK_LABEL(preflabel), text); | |
| 426 g_value_unset (&val); | |
| 427 gtk_tree_model_get_value (model, &iter, 2, &val); | |
| 428 gtk_notebook_set_current_page (GTK_NOTEBOOK (prefsnotebook), g_value_get_int (&val)); | |
| 429 | |
| 430 } | |
| 431 | |
| 432 /* These are the pages in the preferences notebook */ | |
| 433 GtkWidget *interface_page() { | |
| 434 GtkWidget *ret; | |
| 435 GtkWidget *vbox; | |
| 436 ret = gtk_vbox_new(FALSE, 18); | |
| 437 gtk_container_set_border_width (GTK_CONTAINER (ret), 12); | |
| 438 | |
|
5530
2c4c975620f0
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5440
diff
changeset
|
439 vbox = gaim_gtk_make_frame(ret, _("Interface Options")); |
| 5440 | 440 |
|
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
441 prefs_checkbox(_("D_isplay remote nicknames if no alias is set"), |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
442 "/core/buddies/use_server_alias", vbox); |
| 5440 | 443 |
| 444 | |
| 445 gtk_widget_show_all(ret); | |
| 446 return ret; | |
| 447 } | |
| 448 | |
| 449 static void smiley_sel (GtkTreeSelection *sel, GtkTreeModel *model) { | |
| 450 GtkTreeIter iter; | |
| 451 const char *filename; | |
| 452 GValue val = { 0, }; | |
| 453 | |
| 454 if (! gtk_tree_selection_get_selected (sel, &model, &iter)) | |
| 455 return; | |
| 456 gtk_tree_model_get_value (model, &iter, 2, &val); | |
| 457 filename = g_value_get_string(&val); | |
| 458 load_smiley_theme(filename, TRUE); | |
| 459 g_value_unset (&val); | |
| 460 } | |
| 461 | |
| 462 GtkTreePath *theme_refresh_theme_list() | |
| 463 { | |
| 464 GdkPixbuf *pixbuf; | |
| 465 GSList *themes; | |
| 466 GtkTreeIter iter; | |
| 467 GtkTreePath *path = NULL; | |
| 468 int ind = 0; | |
| 469 | |
| 470 | |
| 471 smiley_theme_probe(); | |
| 472 | |
| 473 if (!smiley_themes) | |
| 474 return NULL; | |
| 475 | |
| 476 themes = smiley_themes; | |
| 477 | |
| 478 gtk_list_store_clear(smiley_theme_store); | |
| 479 | |
| 480 while (themes) { | |
| 481 struct smiley_theme *theme = themes->data; | |
| 482 char *description = g_strdup_printf("<span size='larger' weight='bold'>%s</span> - %s\n" | |
| 483 "<span size='smaller' foreground='dim grey'>%s</span>", | |
| 484 theme->name, theme->author, theme->desc); | |
| 485 gtk_list_store_append (smiley_theme_store, &iter); | |
| 486 pixbuf = gdk_pixbuf_new_from_file(theme->icon, NULL); | |
| 487 | |
| 488 gtk_list_store_set(smiley_theme_store, &iter, | |
| 489 0, pixbuf, | |
| 490 1, description, | |
| 491 2, theme->path, | |
| 492 -1); | |
| 493 g_object_unref(G_OBJECT(pixbuf)); | |
| 494 g_free(description); | |
| 495 themes = themes->next; | |
| 496 if (current_smiley_theme && !strcmp(theme->path, current_smiley_theme->path)) { | |
| 497 /* path = gtk_tree_path_new_from_indices(ind); */ | |
| 498 char *iwishihadgtk2_2 = g_strdup_printf("%d", ind); | |
| 499 path = gtk_tree_path_new_from_string(iwishihadgtk2_2); | |
| 500 g_free(iwishihadgtk2_2); | |
| 501 } | |
| 502 ind++; | |
| 503 } | |
| 504 | |
| 505 return path; | |
| 506 } | |
| 507 | |
| 508 void theme_install_theme(char *path, char *extn) { | |
| 509 #ifndef _WIN32 | |
| 510 gchar *command; | |
| 511 #endif | |
| 512 gchar *destdir; | |
| 513 gchar *tail; | |
| 514 | |
| 515 /* Just to be safe */ | |
| 516 g_strchomp(path); | |
| 517 | |
| 518 /* I dont know what you are, get out of here */ | |
| 519 if (extn != NULL) | |
| 520 tail = extn; | |
| 521 else if ((tail = strrchr(path, '.')) == NULL) | |
| 522 return; | |
| 523 | |
| 524 destdir = g_strconcat(gaim_user_dir(), G_DIR_SEPARATOR_S "smileys", NULL); | |
| 525 | |
| 526 /* We'll check this just to make sure. This also lets us do something different on | |
| 527 * other platforms, if need be */ | |
| 528 if (!g_ascii_strcasecmp(tail, ".gz") || !g_ascii_strcasecmp(tail, ".tgz")) { | |
| 529 #ifndef _WIN32 | |
| 530 command = g_strdup_printf("tar > /dev/null xzf \"%s\" -C %s", path, destdir); | |
| 531 #else | |
| 532 if(!wgaim_gz_untar(path, destdir)) { | |
| 533 g_free(destdir); | |
| 534 return; | |
| 535 } | |
| 536 #endif | |
| 537 } | |
| 538 else { | |
| 539 g_free(destdir); | |
| 540 return; | |
| 541 } | |
| 542 | |
| 543 #ifndef _WIN32 | |
| 544 /* Fire! */ | |
| 545 system(command); | |
| 546 | |
| 547 g_free(command); | |
| 548 #endif | |
| 549 g_free(destdir); | |
| 550 | |
| 551 theme_refresh_theme_list(); | |
| 552 } | |
| 553 | |
| 554 static void theme_got_url(gpointer data, char *themedata, unsigned long len) { | |
| 555 FILE *f; | |
| 556 gchar *path; | |
| 557 | |
| 558 f = gaim_mkstemp(&path); | |
| 559 fwrite(themedata, len, 1, f); | |
| 560 fclose(f); | |
| 561 | |
| 562 theme_install_theme(path, data); | |
| 563 | |
| 564 unlink(path); | |
| 565 g_free(path); | |
| 566 } | |
| 567 | |
| 568 void theme_dnd_recv(GtkWidget *widget, GdkDragContext *dc, guint x, guint y, GtkSelectionData *sd, | |
| 569 guint info, guint t, gpointer data) { | |
| 570 gchar *name = sd->data; | |
| 571 | |
| 572 if ((sd->length >= 0) && (sd->format == 8)) { | |
| 573 /* Well, it looks like the drag event was cool. | |
| 574 * Let's do something with it */ | |
| 575 | |
| 576 if (!g_ascii_strncasecmp(name, "file://", 7)) { | |
| 577 GError *converr = NULL; | |
| 578 gchar *tmp; | |
| 579 /* It looks like we're dealing with a local file. Let's | |
| 580 * just untar it in the right place */ | |
| 581 if(!(tmp = g_filename_from_uri(name, NULL, &converr))) { | |
| 582 gaim_debug(GAIM_DEBUG_ERROR, "theme dnd", "%s\n", | |
| 583 (converr ? converr->message : | |
| 584 "g_filename_from_uri error")); | |
| 585 return; | |
| 586 } | |
| 587 theme_install_theme(tmp, NULL); | |
| 588 g_free(tmp); | |
| 589 } else if (!g_ascii_strncasecmp(name, "http://", 7)) { | |
| 590 /* Oo, a web drag and drop. This is where things | |
| 591 * will start to get interesting */ | |
| 592 gchar *tail; | |
| 593 | |
| 594 if ((tail = strrchr(name, '.')) == NULL) | |
| 595 return; | |
| 596 | |
| 597 /* We'll check this just to make sure. This also lets us do something different on | |
| 598 * other platforms, if need be */ | |
| 599 grab_url(name, TRUE, theme_got_url, ".tgz"); | |
| 600 } | |
| 601 | |
| 602 gtk_drag_finish(dc, TRUE, FALSE, t); | |
| 603 } | |
| 604 | |
| 605 gtk_drag_finish(dc, FALSE, FALSE, t); | |
| 606 } | |
| 607 | |
| 608 GtkWidget *theme_page() { | |
| 609 GtkWidget *ret; | |
| 610 GtkWidget *sw; | |
| 611 GtkWidget *view; | |
| 612 GtkCellRenderer *rend; | |
| 613 GtkTreeViewColumn *col; | |
| 614 GtkTreeSelection *sel; | |
| 615 GtkTreePath *path = NULL; | |
| 616 GtkWidget *label; | |
| 617 GtkTargetEntry te[3] = {{"text/plain", 0, 0},{"text/uri-list", 0, 1},{"STRING", 0, 2}}; | |
| 618 | |
| 619 ret = gtk_vbox_new(FALSE, 18); | |
| 620 gtk_container_set_border_width (GTK_CONTAINER (ret), 12); | |
| 621 | |
| 622 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.")); | |
| 623 | |
| 624 gtk_label_set_line_wrap(GTK_LABEL(label), TRUE); | |
| 625 gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); | |
| 626 gtk_label_set_justify(GTK_LABEL(label), GTK_JUSTIFY_LEFT); | |
| 627 | |
| 628 gtk_box_pack_start(GTK_BOX(ret), label, FALSE, TRUE, 0); | |
| 629 gtk_widget_show(label); | |
| 630 | |
| 631 sw = gtk_scrolled_window_new(NULL,NULL); | |
| 632 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); | |
| 633 gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_IN); | |
| 634 | |
| 635 gtk_box_pack_start(GTK_BOX(ret), sw, TRUE, TRUE, 0); | |
| 636 smiley_theme_store = gtk_list_store_new (3, GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_STRING); | |
| 637 | |
| 638 path = theme_refresh_theme_list(); | |
| 639 | |
| 640 view = gtk_tree_view_new_with_model (GTK_TREE_MODEL(smiley_theme_store)); | |
| 641 | |
| 642 gtk_drag_dest_set(view, GTK_DEST_DEFAULT_MOTION | GTK_DEST_DEFAULT_HIGHLIGHT | GTK_DEST_DEFAULT_DROP, te, | |
| 643 sizeof(te) / sizeof(GtkTargetEntry) , GDK_ACTION_COPY | GDK_ACTION_MOVE); | |
| 644 | |
| 645 g_signal_connect(G_OBJECT(view), "drag_data_received", G_CALLBACK(theme_dnd_recv), smiley_theme_store); | |
| 646 | |
| 647 rend = gtk_cell_renderer_pixbuf_new(); | |
| 648 sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (view)); | |
| 649 | |
| 650 if(path) { | |
| 651 gtk_tree_selection_select_path(sel, path); | |
| 652 gtk_tree_path_free(path); | |
| 653 } | |
| 654 | |
| 655 col = gtk_tree_view_column_new_with_attributes (_("Icon"), | |
| 656 rend, | |
| 657 "pixbuf", 0, | |
| 658 NULL); | |
| 659 gtk_tree_view_append_column (GTK_TREE_VIEW(view), col); | |
| 660 | |
| 661 rend = gtk_cell_renderer_text_new(); | |
| 662 col = gtk_tree_view_column_new_with_attributes (_("Description"), | |
| 663 rend, | |
| 664 "markup", 1, | |
| 665 NULL); | |
| 666 gtk_tree_view_append_column (GTK_TREE_VIEW(view), col); | |
| 667 g_object_unref(G_OBJECT(smiley_theme_store)); | |
| 668 gtk_container_add(GTK_CONTAINER(sw), view); | |
| 669 | |
| 670 g_signal_connect (G_OBJECT (sel), "changed", | |
| 671 G_CALLBACK (smiley_sel), | |
| 672 NULL); | |
| 673 | |
| 674 | |
| 675 gtk_widget_show_all(ret); | |
| 676 return ret; | |
| 677 } | |
| 678 | |
|
5530
2c4c975620f0
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5440
diff
changeset
|
679 static void update_color(GtkWidget *w, GtkWidget *pic) |
|
2c4c975620f0
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5440
diff
changeset
|
680 { |
|
2c4c975620f0
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5440
diff
changeset
|
681 GdkColor c; |
|
2c4c975620f0
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5440
diff
changeset
|
682 GtkStyle *style; |
| 5627 | 683 GdkColor color; |
| 684 | |
|
5530
2c4c975620f0
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5440
diff
changeset
|
685 c.pixel = 0; |
|
2c4c975620f0
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5440
diff
changeset
|
686 |
|
2c4c975620f0
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5440
diff
changeset
|
687 if (pic == pref_fg_picture) { |
|
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
688 if (gaim_prefs_get_bool("/gaim/gtk/conversations/use_custom_fgcolor")) { |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
689 gdk_color_parse(gaim_prefs_get_string("/gaim/gtk/conversations/fgcolor"), |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
690 &color); |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
691 c.red = color.red; |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
692 c.blue = color.blue; |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
693 c.green = color.green; |
|
5530
2c4c975620f0
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5440
diff
changeset
|
694 } else { |
|
2c4c975620f0
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5440
diff
changeset
|
695 c.red = 0; |
|
2c4c975620f0
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5440
diff
changeset
|
696 c.blue = 0; |
|
2c4c975620f0
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5440
diff
changeset
|
697 c.green = 0; |
|
2c4c975620f0
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5440
diff
changeset
|
698 } |
|
2c4c975620f0
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5440
diff
changeset
|
699 } else { |
|
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
700 if (gaim_prefs_get_bool("/gaim/gtk/conversations/use_custom_bgcolor")) { |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
701 gdk_color_parse(gaim_prefs_get_string("/gaim/gtk/conversations/bgcolor"), |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
702 &color); |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
703 c.red = color.red; |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
704 c.blue = color.blue; |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
705 c.green = color.green; |
|
5530
2c4c975620f0
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5440
diff
changeset
|
706 } else { |
|
2c4c975620f0
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5440
diff
changeset
|
707 c.red = 0xffff; |
|
2c4c975620f0
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5440
diff
changeset
|
708 c.blue = 0xffff; |
|
2c4c975620f0
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5440
diff
changeset
|
709 c.green = 0xffff; |
|
2c4c975620f0
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5440
diff
changeset
|
710 } |
|
2c4c975620f0
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5440
diff
changeset
|
711 } |
|
2c4c975620f0
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5440
diff
changeset
|
712 |
|
2c4c975620f0
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5440
diff
changeset
|
713 style = gtk_style_new(); |
|
2c4c975620f0
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5440
diff
changeset
|
714 style->bg[0] = c; |
|
2c4c975620f0
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5440
diff
changeset
|
715 gtk_widget_set_style(pic, style); |
|
2c4c975620f0
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5440
diff
changeset
|
716 g_object_unref(style); |
|
2c4c975620f0
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5440
diff
changeset
|
717 } |
|
2c4c975620f0
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5440
diff
changeset
|
718 |
| 5440 | 719 GtkWidget *font_page() { |
| 720 GtkWidget *ret; | |
| 721 GtkWidget *button; | |
| 722 GtkWidget *vbox, *hbox; | |
| 723 GtkWidget *select = NULL; | |
| 724 GtkSizeGroup *sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); | |
| 725 | |
| 726 ret = gtk_vbox_new(FALSE, 18); | |
| 727 gtk_container_set_border_width (GTK_CONTAINER (ret), 12); | |
| 728 | |
|
5530
2c4c975620f0
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5440
diff
changeset
|
729 vbox = gaim_gtk_make_frame(ret, _("Style")); |
|
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
730 prefs_checkbox(_("_Bold"), |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
731 "/gaim/gtk/conversations/send_bold", vbox); |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
732 prefs_checkbox(_("_Italics"), |
|
5568
fb4f7bd7525c
[gaim-migrate @ 5970]
Christian Hammond <chipx86@chipx86.com>
parents:
5567
diff
changeset
|
733 "/gaim/gtk/conversations/send_italic", vbox); |
|
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
734 prefs_checkbox(_("_Underline"), |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
735 "/gaim/gtk/conversations/send_underline", vbox); |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
736 prefs_checkbox(_("_Strikethrough"), |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
737 "/gaim/gtk/conversations/send_strikethrough", vbox); |
| 5440 | 738 |
|
5530
2c4c975620f0
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5440
diff
changeset
|
739 vbox = gaim_gtk_make_frame(ret, _("Face")); |
| 5440 | 740 hbox = gtk_hbox_new(FALSE, 6); |
| 741 gtk_container_add(GTK_CONTAINER(vbox), hbox); | |
|
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
742 button = prefs_checkbox(_("Use custo_m face"), |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
743 "/gaim/gtk/conversations/use_custom_font", hbox); |
| 5440 | 744 gtk_size_group_add_widget(sg, button); |
| 745 select = gtk_button_new_from_stock(GTK_STOCK_SELECT_FONT); | |
| 746 | |
|
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
747 if (!gaim_prefs_get_bool("/gaim/gtk/conversations/use_custom_font")) |
| 5440 | 748 gtk_widget_set_sensitive(GTK_WIDGET(select), FALSE); |
|
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
749 |
| 5440 | 750 g_signal_connect(G_OBJECT(button), "clicked", |
| 751 G_CALLBACK(gaim_gtk_toggle_sensitive), select); | |
| 752 g_signal_connect(G_OBJECT(select), "clicked", | |
| 753 G_CALLBACK(show_font_dialog), NULL); | |
| 754 gtk_box_pack_start(GTK_BOX(hbox), select, FALSE, FALSE, 0); | |
| 755 | |
| 756 hbox = gtk_hbox_new(FALSE, 5); | |
| 757 gtk_container_add(GTK_CONTAINER(vbox), hbox); | |
|
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
758 |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
759 button = prefs_checkbox(_("Use custom si_ze"), |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
760 "/gaim/gtk/conversations/use_custom_font", hbox); |
| 5440 | 761 gtk_size_group_add_widget(sg, button); |
|
5550
b18c2a37cc96
[gaim-migrate @ 5951]
Christian Hammond <chipx86@chipx86.com>
parents:
5547
diff
changeset
|
762 select = prefs_labeled_spin_button(hbox, NULL, |
|
b18c2a37cc96
[gaim-migrate @ 5951]
Christian Hammond <chipx86@chipx86.com>
parents:
5547
diff
changeset
|
763 "/gaim/gtk/conversations/font_size", |
|
b18c2a37cc96
[gaim-migrate @ 5951]
Christian Hammond <chipx86@chipx86.com>
parents:
5547
diff
changeset
|
764 1, 7, NULL); |
|
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
765 |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
766 if (!gaim_prefs_get_bool("/gaim/gtk/conversations/use_custom_font")) |
| 5440 | 767 gtk_widget_set_sensitive(GTK_WIDGET(select), FALSE); |
|
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
768 |
| 5440 | 769 g_signal_connect(G_OBJECT(button), "clicked", |
| 770 G_CALLBACK(gaim_gtk_toggle_sensitive), select); | |
| 771 | |
|
5530
2c4c975620f0
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5440
diff
changeset
|
772 vbox = gaim_gtk_make_frame(ret, _("Color")); |
| 5440 | 773 hbox = gtk_hbox_new(FALSE, 5); |
| 774 gtk_container_add(GTK_CONTAINER(vbox), hbox); | |
| 775 | |
|
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
776 button = prefs_checkbox(_("_Text color"), |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
777 "/gaim/gtk/conversations/use_custom_fgcolor", hbox); |
| 5440 | 778 gtk_size_group_add_widget(sg, button); |
| 779 | |
| 780 select = gtk_button_new_from_stock(GTK_STOCK_SELECT_COLOR); | |
| 781 gtk_box_pack_start(GTK_BOX(hbox), select, FALSE, FALSE, 0); | |
| 782 pref_fg_picture = show_color_pref(hbox, TRUE); | |
| 783 g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(update_color), | |
| 784 pref_fg_picture); | |
| 785 | |
|
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
786 if (!gaim_prefs_get_bool("/gaim/gtk/conversations/use_custom_fgcolor")) |
| 5440 | 787 gtk_widget_set_sensitive(GTK_WIDGET(select), FALSE); |
|
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
788 |
| 5440 | 789 g_signal_connect(G_OBJECT(button), "clicked", |
| 790 G_CALLBACK(gaim_gtk_toggle_sensitive), select); | |
| 791 g_signal_connect(G_OBJECT(select), "clicked", G_CALLBACK(show_fgcolor_dialog), NULL); | |
| 792 hbox = gtk_hbox_new(FALSE, 5); | |
| 793 gtk_container_add(GTK_CONTAINER(vbox), hbox); | |
| 794 | |
|
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
795 button = prefs_checkbox(_("Bac_kground color"), |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
796 "/gaim/gtk/conversations/use_custom_bgcolor", hbox); |
| 5440 | 797 gtk_size_group_add_widget(sg, button); |
| 798 select = gtk_button_new_from_stock(GTK_STOCK_SELECT_COLOR); | |
| 799 gtk_box_pack_start(GTK_BOX(hbox), select, FALSE, FALSE, 0); | |
| 800 pref_bg_picture = show_color_pref(hbox, FALSE); | |
|
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
801 g_signal_connect(G_OBJECT(button), "clicked", |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
802 G_CALLBACK(update_color), pref_bg_picture); |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
803 |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
804 if (!gaim_prefs_get_bool("/gaim/gtk/conversations/use_custom_bgcolor")) |
| 5440 | 805 gtk_widget_set_sensitive(GTK_WIDGET(select), FALSE); |
|
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
806 |
| 5440 | 807 g_signal_connect(G_OBJECT(select), "clicked", |
| 808 G_CALLBACK(show_bgcolor_dialog), NULL); | |
| 809 g_signal_connect(G_OBJECT(button), "clicked", | |
| 810 G_CALLBACK(gaim_gtk_toggle_sensitive), select); | |
| 811 | |
| 812 gtk_widget_show_all(ret); | |
| 813 return ret; | |
| 814 } | |
| 815 | |
| 816 | |
| 817 GtkWidget *messages_page() { | |
| 818 GtkWidget *ret; | |
| 819 GtkWidget *vbox; | |
| 820 ret = gtk_vbox_new(FALSE, 18); | |
| 821 gtk_container_set_border_width (GTK_CONTAINER (ret), 12); | |
| 822 | |
|
5530
2c4c975620f0
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5440
diff
changeset
|
823 vbox = gaim_gtk_make_frame (ret, _("Display")); |
|
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
824 prefs_checkbox(_("Show graphical _smileys"), |
|
5546
22cf337e8b8f
[gaim-migrate @ 5947]
Christian Hammond <chipx86@chipx86.com>
parents:
5545
diff
changeset
|
825 "/gaim/gtk/conversations/show_smileys", vbox); |
|
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
826 prefs_checkbox(_("Show _timestamp on messages"), |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
827 "/gaim/gtk/conversations/show_timestamps", vbox); |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
828 prefs_checkbox(_("Show _URLs as links"), |
|
5539
de09863bd4b5
[gaim-migrate @ 5939]
Christian Hammond <chipx86@chipx86.com>
parents:
5535
diff
changeset
|
829 "/gaim/gtk/conversations/show_urls_as_links", vbox); |
|
de09863bd4b5
[gaim-migrate @ 5939]
Christian Hammond <chipx86@chipx86.com>
parents:
5535
diff
changeset
|
830 |
| 5440 | 831 #ifdef USE_GTKSPELL |
|
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
832 prefs_checkbox(_("_Highlight misspelled words"), |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
833 "/gaim/gtk/conversations/spellcheck", vbox); |
| 5440 | 834 #endif |
|
5530
2c4c975620f0
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5440
diff
changeset
|
835 vbox = gaim_gtk_make_frame (ret, _("Ignore")); |
|
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
836 prefs_checkbox(_("Ignore c_olors"), |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
837 "/gaim/gtk/conversations/ignore_colors", vbox); |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
838 prefs_checkbox(_("Ignore font _faces"), |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
839 "/gaim/gtk/conversations/ignore_fonts", vbox); |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
840 prefs_checkbox(_("Ignore font si_zes"), |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
841 "/gaim/gtk/conversations/ignore_font_sizes", vbox); |
| 5440 | 842 |
| 843 gtk_widget_show_all(ret); | |
| 844 return ret; | |
| 845 } | |
| 846 | |
| 847 GtkWidget *hotkeys_page() { | |
| 848 GtkWidget *ret; | |
| 849 GtkWidget *vbox; | |
| 850 ret = gtk_vbox_new(FALSE, 18); | |
| 851 gtk_container_set_border_width (GTK_CONTAINER (ret), 12); | |
| 852 | |
|
5530
2c4c975620f0
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5440
diff
changeset
|
853 vbox = gaim_gtk_make_frame(ret, _("Send Message")); |
| 5716 | 854 prefs_checkbox(_("Enter _sends message"), |
|
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
855 "/gaim/gtk/conversations/enter_sends", vbox); |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
856 prefs_checkbox(_("C_ontrol-Enter sends message"), |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
857 "/gaim/gtk/conversations/ctrl_enter_sends", vbox); |
| 5440 | 858 |
|
5530
2c4c975620f0
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5440
diff
changeset
|
859 vbox = gaim_gtk_make_frame (ret, _("Window Closing")); |
| 5716 | 860 prefs_checkbox(_("_Escape closes window"), |
|
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
861 "/gaim/gtk/conversations/escape_closes", vbox); |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
862 prefs_checkbox(_("Control-_W closes window"), |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
863 "/gaim/gtk/conversations/ctrl_w_closes", vbox); |
| 5440 | 864 |
|
5530
2c4c975620f0
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5440
diff
changeset
|
865 vbox = gaim_gtk_make_frame(ret, _("Insertions")); |
|
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
866 prefs_checkbox(_("Control-{B/I/U/S} inserts _HTML tags"), |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
867 "/gaim/gtk/conversations/html_shortcuts", vbox); |
| 5716 | 868 prefs_checkbox(_("Control-(number) _inserts smileys"), |
|
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
869 "/gaim/gtk/conversations/smiley_shortcuts", vbox); |
| 5440 | 870 |
| 871 gtk_widget_show_all(ret); | |
| 872 return ret; | |
| 873 } | |
| 874 | |
| 875 GtkWidget *list_page() { | |
| 876 GtkWidget *ret; | |
| 877 GtkWidget *vbox; | |
|
5547
90a67ea697f7
[gaim-migrate @ 5948]
Christian Hammond <chipx86@chipx86.com>
parents:
5546
diff
changeset
|
878 GtkWidget *button, *warn_checkbox, *idle_checkbox; |
| 5440 | 879 GList *l= NULL; |
|
5567
cc9ddec20010
[gaim-migrate @ 5969]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
880 GSList *sl; |
| 5440 | 881 ret = gtk_vbox_new(FALSE, 18); |
| 882 gtk_container_set_border_width (GTK_CONTAINER (ret), 12); | |
| 883 | |
| 884 | |
|
5530
2c4c975620f0
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5440
diff
changeset
|
885 vbox = gaim_gtk_make_frame (ret, _("Buddy List Sorting")); |
|
5567
cc9ddec20010
[gaim-migrate @ 5969]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
886 |
|
cc9ddec20010
[gaim-migrate @ 5969]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
887 for (sl = gaim_gtk_blist_sort_methods; sl != NULL; sl = sl->next) { |
| 5631 | 888 struct gaim_gtk_blist_sort_method *method = sl->data; |
| 889 | |
| 890 l = g_list_append(l, method->name); | |
| 891 l = g_list_append(l, method->id); | |
| 5440 | 892 } |
|
5546
22cf337e8b8f
[gaim-migrate @ 5947]
Christian Hammond <chipx86@chipx86.com>
parents:
5545
diff
changeset
|
893 |
|
22cf337e8b8f
[gaim-migrate @ 5947]
Christian Hammond <chipx86@chipx86.com>
parents:
5545
diff
changeset
|
894 prefs_dropdown_from_list(vbox, _("Sorting:"), GAIM_PREF_STRING, |
|
5551
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
895 "/gaim/gtk/blist/sort_type", l); |
|
5546
22cf337e8b8f
[gaim-migrate @ 5947]
Christian Hammond <chipx86@chipx86.com>
parents:
5545
diff
changeset
|
896 |
| 5440 | 897 g_list_free(l); |
| 898 | |
|
5530
2c4c975620f0
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5440
diff
changeset
|
899 vbox = gaim_gtk_make_frame (ret, _("Buddy List Toolbar")); |
|
5551
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
900 prefs_dropdown(vbox, _("Show _buttons as:"), GAIM_PREF_INT, |
|
5546
22cf337e8b8f
[gaim-migrate @ 5947]
Christian Hammond <chipx86@chipx86.com>
parents:
5545
diff
changeset
|
901 "/gaim/gtk/blist/button_style", |
|
5547
90a67ea697f7
[gaim-migrate @ 5948]
Christian Hammond <chipx86@chipx86.com>
parents:
5546
diff
changeset
|
902 _("Pictures"), GAIM_BUTTON_IMAGE, |
|
90a67ea697f7
[gaim-migrate @ 5948]
Christian Hammond <chipx86@chipx86.com>
parents:
5546
diff
changeset
|
903 _("Text"), GAIM_BUTTON_TEXT, |
|
90a67ea697f7
[gaim-migrate @ 5948]
Christian Hammond <chipx86@chipx86.com>
parents:
5546
diff
changeset
|
904 _("Pictures and text"), GAIM_BUTTON_TEXT_IMAGE, |
|
90a67ea697f7
[gaim-migrate @ 5948]
Christian Hammond <chipx86@chipx86.com>
parents:
5546
diff
changeset
|
905 _("None"), GAIM_BUTTON_NONE, |
|
90a67ea697f7
[gaim-migrate @ 5948]
Christian Hammond <chipx86@chipx86.com>
parents:
5546
diff
changeset
|
906 NULL); |
| 5440 | 907 |
|
5530
2c4c975620f0
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5440
diff
changeset
|
908 vbox = gaim_gtk_make_frame (ret, _("Buddy List Window")); |
|
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
909 prefs_checkbox(_("_Raise window on events"), |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
910 "/gaim/gtk/blist/raise_on_events", vbox); |
| 5440 | 911 |
|
5530
2c4c975620f0
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5440
diff
changeset
|
912 vbox = gaim_gtk_make_frame (ret, _("Group Display")); |
|
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
913 /* prefs_checkbox(_("Show _groups with no online buddies"), "/gaim/gtk/blist/show_empty_groups", vbox); */ |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
914 prefs_checkbox(_("Show _numbers in groups"), |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
915 "/gaim/gtk/blist/show_group_count", vbox); |
| 5440 | 916 |
|
5530
2c4c975620f0
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5440
diff
changeset
|
917 vbox = gaim_gtk_make_frame (ret, _("Buddy Display")); |
|
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
918 button = prefs_checkbox(_("Show buddy _icons"), |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
919 "/gaim/gtk/blist/show_buddy_icons", vbox); |
|
5547
90a67ea697f7
[gaim-migrate @ 5948]
Christian Hammond <chipx86@chipx86.com>
parents:
5546
diff
changeset
|
920 warn_checkbox = prefs_checkbox(_("Show _warning levels"), |
|
90a67ea697f7
[gaim-migrate @ 5948]
Christian Hammond <chipx86@chipx86.com>
parents:
5546
diff
changeset
|
921 "/gaim/gtk/blist/show_warning_level", vbox); |
|
90a67ea697f7
[gaim-migrate @ 5948]
Christian Hammond <chipx86@chipx86.com>
parents:
5546
diff
changeset
|
922 |
|
90a67ea697f7
[gaim-migrate @ 5948]
Christian Hammond <chipx86@chipx86.com>
parents:
5546
diff
changeset
|
923 idle_checkbox = prefs_checkbox(_("Show idle _times"), |
|
90a67ea697f7
[gaim-migrate @ 5948]
Christian Hammond <chipx86@chipx86.com>
parents:
5546
diff
changeset
|
924 "/gaim/gtk/blist/show_idle_time", vbox); |
|
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
925 |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
926 g_signal_connect(G_OBJECT(button), "clicked", |
|
5547
90a67ea697f7
[gaim-migrate @ 5948]
Christian Hammond <chipx86@chipx86.com>
parents:
5546
diff
changeset
|
927 G_CALLBACK(gaim_gtk_toggle_sensitive), warn_checkbox); |
| 5440 | 928 g_signal_connect(G_OBJECT(button), "clicked", |
|
5547
90a67ea697f7
[gaim-migrate @ 5948]
Christian Hammond <chipx86@chipx86.com>
parents:
5546
diff
changeset
|
929 G_CALLBACK(gaim_gtk_toggle_sensitive), idle_checkbox); |
|
90a67ea697f7
[gaim-migrate @ 5948]
Christian Hammond <chipx86@chipx86.com>
parents:
5546
diff
changeset
|
930 |
|
90a67ea697f7
[gaim-migrate @ 5948]
Christian Hammond <chipx86@chipx86.com>
parents:
5546
diff
changeset
|
931 if (gaim_prefs_get_bool("/gaim/gtk/blist/show_buddy_icons")) { |
|
90a67ea697f7
[gaim-migrate @ 5948]
Christian Hammond <chipx86@chipx86.com>
parents:
5546
diff
changeset
|
932 |
|
90a67ea697f7
[gaim-migrate @ 5948]
Christian Hammond <chipx86@chipx86.com>
parents:
5546
diff
changeset
|
933 gtk_widget_set_sensitive(GTK_WIDGET(warn_checkbox), FALSE); |
|
90a67ea697f7
[gaim-migrate @ 5948]
Christian Hammond <chipx86@chipx86.com>
parents:
5546
diff
changeset
|
934 gtk_widget_set_sensitive(GTK_WIDGET(idle_checkbox), FALSE); |
|
90a67ea697f7
[gaim-migrate @ 5948]
Christian Hammond <chipx86@chipx86.com>
parents:
5546
diff
changeset
|
935 } |
|
90a67ea697f7
[gaim-migrate @ 5948]
Christian Hammond <chipx86@chipx86.com>
parents:
5546
diff
changeset
|
936 |
|
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
937 prefs_checkbox(_("Dim i_dle buddies"), |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
938 "/gaim/gtk/blist/grey_idle_buddies", vbox); |
| 5440 | 939 |
| 940 gtk_widget_show_all(ret); | |
|
5547
90a67ea697f7
[gaim-migrate @ 5948]
Christian Hammond <chipx86@chipx86.com>
parents:
5546
diff
changeset
|
941 |
| 5440 | 942 return ret; |
| 943 } | |
| 944 | |
| 945 GtkWidget *conv_page() { | |
| 946 GtkWidget *ret; | |
| 947 GtkWidget *vbox; | |
| 948 GtkWidget *label; | |
|
5547
90a67ea697f7
[gaim-migrate @ 5948]
Christian Hammond <chipx86@chipx86.com>
parents:
5546
diff
changeset
|
949 GtkWidget *button, *close_checkbox; |
| 5440 | 950 GtkSizeGroup *sg; |
| 951 GList *names = NULL; | |
| 952 int i; | |
| 953 | |
| 954 ret = gtk_vbox_new(FALSE, 18); | |
| 955 gtk_container_set_border_width(GTK_CONTAINER(ret), 12); | |
| 956 | |
| 957 sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); | |
|
5530
2c4c975620f0
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5440
diff
changeset
|
958 vbox = gaim_gtk_make_frame(ret, _("Conversations")); |
| 5440 | 959 |
| 960 /* Build a list of names. */ | |
| 961 for (i = 0; i < gaim_conv_placement_get_fnc_count(); i++) { | |
| 962 names = g_list_append(names, (char *)gaim_conv_placement_get_name(i)); | |
|
5547
90a67ea697f7
[gaim-migrate @ 5948]
Christian Hammond <chipx86@chipx86.com>
parents:
5546
diff
changeset
|
963 names = g_list_append(names, (char *)gaim_conv_placement_get_name(i)); |
| 5440 | 964 } |
| 965 | |
|
5547
90a67ea697f7
[gaim-migrate @ 5948]
Christian Hammond <chipx86@chipx86.com>
parents:
5546
diff
changeset
|
966 label = prefs_dropdown_from_list(vbox, _("_Placement:"), GAIM_PREF_STRING, |
|
5550
b18c2a37cc96
[gaim-migrate @ 5951]
Christian Hammond <chipx86@chipx86.com>
parents:
5547
diff
changeset
|
967 "/gaim/gtk/conversations/placement", |
|
5547
90a67ea697f7
[gaim-migrate @ 5948]
Christian Hammond <chipx86@chipx86.com>
parents:
5546
diff
changeset
|
968 names); |
| 5440 | 969 |
| 970 g_list_free(names); | |
| 971 | |
| 972 gtk_misc_set_alignment(GTK_MISC(label), 0, 0); | |
| 973 gtk_size_group_add_widget(sg, label); | |
| 974 | |
|
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
975 prefs_checkbox(_("Send _URLs as Links"), |
|
5539
de09863bd4b5
[gaim-migrate @ 5939]
Christian Hammond <chipx86@chipx86.com>
parents:
5535
diff
changeset
|
976 "/core/conversations/send_urls_as_links", vbox); |
| 5440 | 977 |
|
5547
90a67ea697f7
[gaim-migrate @ 5948]
Christian Hammond <chipx86@chipx86.com>
parents:
5546
diff
changeset
|
978 vbox = gaim_gtk_make_frame (ret, _("Tab Options")); |
|
90a67ea697f7
[gaim-migrate @ 5948]
Christian Hammond <chipx86@chipx86.com>
parents:
5546
diff
changeset
|
979 |
| 5667 | 980 names = NULL; |
| 981 names = g_list_append(names, _("Top")); | |
| 982 names = g_list_append(names, GINT_TO_POINTER(GTK_POS_TOP)); | |
| 983 names = g_list_append(names, _("Bottom")); | |
| 984 names = g_list_append(names, GINT_TO_POINTER(GTK_POS_BOTTOM)); | |
| 985 names = g_list_append(names, _("Left")); | |
| 986 names = g_list_append(names, GINT_TO_POINTER(GTK_POS_LEFT)); | |
| 987 names = g_list_append(names, _("Right")); | |
| 988 names = g_list_append(names, GINT_TO_POINTER(GTK_POS_RIGHT)); | |
| 989 | |
| 5668 | 990 label = prefs_dropdown(vbox, _("_Tab Placement:"), GAIM_PREF_INT, |
| 5667 | 991 "/gaim/gtk/conversations/tab_side", |
| 5668 | 992 _("Top"), GTK_POS_TOP, |
| 993 _("Bottom"), GTK_POS_BOTTOM, | |
| 994 _("Left"), GTK_POS_LEFT, | |
| 995 _("Right"), GTK_POS_RIGHT, | |
| 996 NULL); | |
| 5667 | 997 |
| 998 gtk_misc_set_alignment(GTK_MISC(label), 0, 0); | |
| 999 gtk_size_group_add_widget(sg, label); | |
| 1000 | |
|
5547
90a67ea697f7
[gaim-migrate @ 5948]
Christian Hammond <chipx86@chipx86.com>
parents:
5546
diff
changeset
|
1001 button = prefs_checkbox(_("Show IMs and chats in _tabbed windows"), |
|
90a67ea697f7
[gaim-migrate @ 5948]
Christian Hammond <chipx86@chipx86.com>
parents:
5546
diff
changeset
|
1002 "/gaim/gtk/conversations/tabs", vbox); |
|
90a67ea697f7
[gaim-migrate @ 5948]
Christian Hammond <chipx86@chipx86.com>
parents:
5546
diff
changeset
|
1003 |
|
90a67ea697f7
[gaim-migrate @ 5948]
Christian Hammond <chipx86@chipx86.com>
parents:
5546
diff
changeset
|
1004 close_checkbox = prefs_checkbox(_("Show _close button on tabs."), |
|
90a67ea697f7
[gaim-migrate @ 5948]
Christian Hammond <chipx86@chipx86.com>
parents:
5546
diff
changeset
|
1005 "/gaim/gtk/conversations/close_on_tabs", |
|
90a67ea697f7
[gaim-migrate @ 5948]
Christian Hammond <chipx86@chipx86.com>
parents:
5546
diff
changeset
|
1006 vbox); |
|
90a67ea697f7
[gaim-migrate @ 5948]
Christian Hammond <chipx86@chipx86.com>
parents:
5546
diff
changeset
|
1007 |
|
5568
fb4f7bd7525c
[gaim-migrate @ 5970]
Christian Hammond <chipx86@chipx86.com>
parents:
5567
diff
changeset
|
1008 if (!gaim_prefs_get_bool("/gaim/gtk/conversations/tabs")) { |
|
5547
90a67ea697f7
[gaim-migrate @ 5948]
Christian Hammond <chipx86@chipx86.com>
parents:
5546
diff
changeset
|
1009 gtk_widget_set_sensitive(GTK_WIDGET(close_checkbox), FALSE); |
|
90a67ea697f7
[gaim-migrate @ 5948]
Christian Hammond <chipx86@chipx86.com>
parents:
5546
diff
changeset
|
1010 } |
|
90a67ea697f7
[gaim-migrate @ 5948]
Christian Hammond <chipx86@chipx86.com>
parents:
5546
diff
changeset
|
1011 |
|
90a67ea697f7
[gaim-migrate @ 5948]
Christian Hammond <chipx86@chipx86.com>
parents:
5546
diff
changeset
|
1012 g_signal_connect(G_OBJECT(button), "clicked", |
|
90a67ea697f7
[gaim-migrate @ 5948]
Christian Hammond <chipx86@chipx86.com>
parents:
5546
diff
changeset
|
1013 G_CALLBACK(gaim_gtk_toggle_sensitive), close_checkbox); |
|
90a67ea697f7
[gaim-migrate @ 5948]
Christian Hammond <chipx86@chipx86.com>
parents:
5546
diff
changeset
|
1014 |
| 5440 | 1015 gtk_widget_show_all(ret); |
| 1016 | |
| 1017 return ret; | |
| 1018 } | |
| 1019 | |
| 1020 GtkWidget *im_page() { | |
| 1021 GtkWidget *ret; | |
| 1022 GtkWidget *vbox; | |
|
5551
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
1023 GtkWidget *widge; |
| 5440 | 1024 GtkSizeGroup *sg; |
| 1025 | |
| 1026 ret = gtk_vbox_new(FALSE, 18); | |
| 1027 gtk_container_set_border_width (GTK_CONTAINER (ret), 12); | |
| 1028 | |
| 1029 sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); | |
| 1030 | |
|
5530
2c4c975620f0
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5440
diff
changeset
|
1031 vbox = gaim_gtk_make_frame (ret, _("Window")); |
|
5547
90a67ea697f7
[gaim-migrate @ 5948]
Christian Hammond <chipx86@chipx86.com>
parents:
5546
diff
changeset
|
1032 widge = prefs_dropdown(vbox, _("Show _buttons as:"), GAIM_PREF_INT, |
|
90a67ea697f7
[gaim-migrate @ 5948]
Christian Hammond <chipx86@chipx86.com>
parents:
5546
diff
changeset
|
1033 "/gaim/gtk/conversations/im/button_type", |
|
90a67ea697f7
[gaim-migrate @ 5948]
Christian Hammond <chipx86@chipx86.com>
parents:
5546
diff
changeset
|
1034 _("Pictures"), GAIM_BUTTON_IMAGE, |
|
90a67ea697f7
[gaim-migrate @ 5948]
Christian Hammond <chipx86@chipx86.com>
parents:
5546
diff
changeset
|
1035 _("Text"), GAIM_BUTTON_TEXT, |
|
90a67ea697f7
[gaim-migrate @ 5948]
Christian Hammond <chipx86@chipx86.com>
parents:
5546
diff
changeset
|
1036 _("Pictures and text"), GAIM_BUTTON_TEXT_IMAGE, |
|
90a67ea697f7
[gaim-migrate @ 5948]
Christian Hammond <chipx86@chipx86.com>
parents:
5546
diff
changeset
|
1037 NULL); |
|
90a67ea697f7
[gaim-migrate @ 5948]
Christian Hammond <chipx86@chipx86.com>
parents:
5546
diff
changeset
|
1038 |
| 5440 | 1039 gtk_size_group_add_widget(sg, widge); |
| 1040 gtk_misc_set_alignment(GTK_MISC(widge), 0, 0); | |
|
5550
b18c2a37cc96
[gaim-migrate @ 5951]
Christian Hammond <chipx86@chipx86.com>
parents:
5547
diff
changeset
|
1041 prefs_labeled_spin_button(vbox, _("New window _width:"), |
|
b18c2a37cc96
[gaim-migrate @ 5951]
Christian Hammond <chipx86@chipx86.com>
parents:
5547
diff
changeset
|
1042 "/gaim/gtk/conversations/im/default_width", |
|
b18c2a37cc96
[gaim-migrate @ 5951]
Christian Hammond <chipx86@chipx86.com>
parents:
5547
diff
changeset
|
1043 25, 9999, sg); |
|
b18c2a37cc96
[gaim-migrate @ 5951]
Christian Hammond <chipx86@chipx86.com>
parents:
5547
diff
changeset
|
1044 prefs_labeled_spin_button(vbox, _("New window _height:"), |
|
b18c2a37cc96
[gaim-migrate @ 5951]
Christian Hammond <chipx86@chipx86.com>
parents:
5547
diff
changeset
|
1045 "/gaim/gtk/conversations/im/default_height", |
|
b18c2a37cc96
[gaim-migrate @ 5951]
Christian Hammond <chipx86@chipx86.com>
parents:
5547
diff
changeset
|
1046 25, 9999, sg); |
|
b18c2a37cc96
[gaim-migrate @ 5951]
Christian Hammond <chipx86@chipx86.com>
parents:
5547
diff
changeset
|
1047 prefs_labeled_spin_button(vbox, _("_Entry field height:"), |
|
b18c2a37cc96
[gaim-migrate @ 5951]
Christian Hammond <chipx86@chipx86.com>
parents:
5547
diff
changeset
|
1048 "/gaim/gtk/conversations/im/entry_height", |
|
b18c2a37cc96
[gaim-migrate @ 5951]
Christian Hammond <chipx86@chipx86.com>
parents:
5547
diff
changeset
|
1049 25, 9999, sg); |
|
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
1050 prefs_checkbox(_("_Raise windows on events"), |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
1051 "/gaim/gtk/conversations/im/raise_on_events", vbox); |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
1052 prefs_checkbox(_("Hide window on _send"), |
| 5631 | 1053 "/gaim/gtk/conversations/im/hide_on_send", vbox); |
| 5440 | 1054 gtk_widget_show (vbox); |
| 1055 | |
|
5530
2c4c975620f0
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5440
diff
changeset
|
1056 vbox = gaim_gtk_make_frame (ret, _("Buddy Icons")); |
|
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
1057 prefs_checkbox(_("Show buddy _icons"), |
|
5568
fb4f7bd7525c
[gaim-migrate @ 5970]
Christian Hammond <chipx86@chipx86.com>
parents:
5567
diff
changeset
|
1058 "/gaim/gtk/conversations/im/show_buddy_icons", vbox); |
|
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
1059 prefs_checkbox(_("Enable buddy icon a_nimation"), |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
1060 "/gaim/gtk/conversations/im/animate_buddy_icons", vbox); |
| 5440 | 1061 |
|
5530
2c4c975620f0
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5440
diff
changeset
|
1062 vbox = gaim_gtk_make_frame (ret, _("Display")); |
|
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
1063 prefs_checkbox(_("Show _logins in window"), |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
1064 "/core/conversations/im/show_login", vbox); |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
1065 prefs_checkbox(_("Show a_liases in tabs/titles"), |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
1066 "/core/conversations/use_alias_for_title", vbox); |
| 5440 | 1067 |
|
5530
2c4c975620f0
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5440
diff
changeset
|
1068 vbox = gaim_gtk_make_frame (ret, _("Typing Notification")); |
|
5551
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
1069 prefs_checkbox(_("Notify buddies that you are _typing to them"), |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
1070 "/core/conversations/im/send_typing", vbox); |
| 5440 | 1071 |
| 1072 gtk_widget_show_all(ret); | |
| 1073 return ret; | |
| 1074 } | |
| 1075 | |
| 1076 GtkWidget *chat_page() { | |
| 1077 GtkWidget *ret; | |
| 1078 GtkWidget *vbox; | |
| 1079 GtkWidget *dd; | |
| 1080 GtkSizeGroup *sg; | |
| 1081 | |
| 1082 ret = gtk_vbox_new(FALSE, 18); | |
| 1083 gtk_container_set_border_width (GTK_CONTAINER (ret), 12); | |
| 1084 | |
| 1085 sg = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL); | |
| 1086 | |
|
5530
2c4c975620f0
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5440
diff
changeset
|
1087 vbox = gaim_gtk_make_frame (ret, _("Window")); |
|
5547
90a67ea697f7
[gaim-migrate @ 5948]
Christian Hammond <chipx86@chipx86.com>
parents:
5546
diff
changeset
|
1088 dd = prefs_dropdown(vbox, _("Show _buttons as:"), GAIM_PREF_INT, |
|
90a67ea697f7
[gaim-migrate @ 5948]
Christian Hammond <chipx86@chipx86.com>
parents:
5546
diff
changeset
|
1089 "/gaim/gtk/conversations/chat/button_type", |
|
90a67ea697f7
[gaim-migrate @ 5948]
Christian Hammond <chipx86@chipx86.com>
parents:
5546
diff
changeset
|
1090 _("Pictures"), GAIM_BUTTON_IMAGE, |
|
90a67ea697f7
[gaim-migrate @ 5948]
Christian Hammond <chipx86@chipx86.com>
parents:
5546
diff
changeset
|
1091 _("Text"), GAIM_BUTTON_TEXT, |
|
90a67ea697f7
[gaim-migrate @ 5948]
Christian Hammond <chipx86@chipx86.com>
parents:
5546
diff
changeset
|
1092 _("Pictures and text"), GAIM_BUTTON_TEXT_IMAGE, |
|
90a67ea697f7
[gaim-migrate @ 5948]
Christian Hammond <chipx86@chipx86.com>
parents:
5546
diff
changeset
|
1093 NULL); |
|
90a67ea697f7
[gaim-migrate @ 5948]
Christian Hammond <chipx86@chipx86.com>
parents:
5546
diff
changeset
|
1094 |
| 5440 | 1095 gtk_size_group_add_widget(sg, dd); |
| 1096 gtk_misc_set_alignment(GTK_MISC(dd), 0, 0); | |
|
5550
b18c2a37cc96
[gaim-migrate @ 5951]
Christian Hammond <chipx86@chipx86.com>
parents:
5547
diff
changeset
|
1097 prefs_labeled_spin_button(vbox, _("New window _width:"), |
|
b18c2a37cc96
[gaim-migrate @ 5951]
Christian Hammond <chipx86@chipx86.com>
parents:
5547
diff
changeset
|
1098 "/gaim/gtk/conversations/chat/default_width", |
|
b18c2a37cc96
[gaim-migrate @ 5951]
Christian Hammond <chipx86@chipx86.com>
parents:
5547
diff
changeset
|
1099 25, 9999, sg); |
|
b18c2a37cc96
[gaim-migrate @ 5951]
Christian Hammond <chipx86@chipx86.com>
parents:
5547
diff
changeset
|
1100 prefs_labeled_spin_button(vbox, _("New window _height:"), |
|
b18c2a37cc96
[gaim-migrate @ 5951]
Christian Hammond <chipx86@chipx86.com>
parents:
5547
diff
changeset
|
1101 "/gaim/gtk/conversations/chat/default_height", |
|
b18c2a37cc96
[gaim-migrate @ 5951]
Christian Hammond <chipx86@chipx86.com>
parents:
5547
diff
changeset
|
1102 25, 9999, sg); |
|
b18c2a37cc96
[gaim-migrate @ 5951]
Christian Hammond <chipx86@chipx86.com>
parents:
5547
diff
changeset
|
1103 prefs_labeled_spin_button(vbox, _("_Entry field height:"), |
|
b18c2a37cc96
[gaim-migrate @ 5951]
Christian Hammond <chipx86@chipx86.com>
parents:
5547
diff
changeset
|
1104 "/gaim/gtk/conversations/chat/entry_height", |
|
b18c2a37cc96
[gaim-migrate @ 5951]
Christian Hammond <chipx86@chipx86.com>
parents:
5547
diff
changeset
|
1105 25, 9999, sg); |
|
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
1106 prefs_checkbox(_("_Raise windows on events"), |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
1107 "/gaim/gtk/conversations/chat/raise_on_events", vbox); |
| 5440 | 1108 |
|
5530
2c4c975620f0
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5440
diff
changeset
|
1109 vbox = gaim_gtk_make_frame (ret, _("Tab Completion")); |
|
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
1110 prefs_checkbox(_("_Tab-complete nicks"), |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
1111 "/gaim/gtk/conversations/chat/tab_completion", vbox); |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
1112 prefs_checkbox(_("_Old-style tab completion"), |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
1113 "/gaim/gtk/conversations/chat/old_tab_complete", vbox); |
| 5440 | 1114 |
|
5530
2c4c975620f0
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5440
diff
changeset
|
1115 vbox = gaim_gtk_make_frame (ret, _("Display")); |
|
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
1116 prefs_checkbox(_("_Show people joining in window"), |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
1117 "/core/conversations/chat/show_join", vbox); |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
1118 prefs_checkbox(_("_Show people leaving in window"), |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
1119 "/core/conversations/chat/show_leave", vbox); |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
1120 prefs_checkbox(_("Co_lorize screennames"), |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
1121 "/gaim/gtk/conversations/chat/color_nicks", vbox); |
| 5440 | 1122 |
| 1123 gtk_widget_show_all(ret); | |
| 1124 return ret; | |
| 1125 } | |
| 1126 | |
| 1127 GtkWidget *proxy_page() { | |
| 1128 GtkWidget *ret; | |
| 1129 GtkWidget *vbox; | |
| 1130 GtkWidget *entry; | |
| 1131 GtkWidget *label; | |
| 1132 GtkWidget *hbox; | |
| 1133 GtkWidget *table; | |
|
5681
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5673
diff
changeset
|
1134 GaimProxyInfo *proxy_info; |
| 5440 | 1135 |
| 1136 ret = gtk_vbox_new(FALSE, 18); | |
| 1137 gtk_container_set_border_width (GTK_CONTAINER (ret), 12); | |
| 1138 | |
|
5530
2c4c975620f0
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5440
diff
changeset
|
1139 vbox = gaim_gtk_make_frame (ret, _("Proxy Type")); |
|
5551
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
1140 prefs_dropdown(vbox, _("Proxy _type:"), GAIM_PREF_STRING, |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
1141 "/core/proxy/type", |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
1142 _("No proxy"), "none", |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
1143 "SOCKS 4", "socks4", |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
1144 "SOCKS 5", "socks5", |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
1145 "HTTP", "http", |
|
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
1146 NULL); |
| 5440 | 1147 |
|
5530
2c4c975620f0
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5440
diff
changeset
|
1148 vbox = gaim_gtk_make_frame(ret, _("Proxy Server")); |
| 5440 | 1149 prefs_proxy_frame = vbox; |
| 1150 | |
|
5681
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5673
diff
changeset
|
1151 proxy_info = gaim_global_proxy_get_info(); |
|
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5673
diff
changeset
|
1152 |
|
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5673
diff
changeset
|
1153 if (proxy_info == NULL || |
|
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5673
diff
changeset
|
1154 gaim_proxy_info_get_type(proxy_info) == GAIM_PROXY_NONE) { |
|
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5673
diff
changeset
|
1155 |
| 5440 | 1156 gtk_widget_set_sensitive(GTK_WIDGET(vbox), FALSE); |
|
5681
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5673
diff
changeset
|
1157 } |
| 5440 | 1158 |
| 1159 table = gtk_table_new(2, 4, FALSE); | |
| 1160 gtk_container_set_border_width(GTK_CONTAINER(table), 5); | |
| 1161 gtk_table_set_col_spacings(GTK_TABLE(table), 5); | |
| 1162 gtk_table_set_row_spacings(GTK_TABLE(table), 10); | |
| 1163 gtk_container_add(GTK_CONTAINER(vbox), table); | |
| 1164 | |
| 1165 | |
| 1166 label = gtk_label_new_with_mnemonic(_("_Host")); | |
| 1167 gtk_misc_set_alignment(GTK_MISC(label), 1.0, 0.5); | |
| 1168 gtk_table_attach(GTK_TABLE(table), label, 0, 1, 0, 1, GTK_FILL, 0, 0, 0); | |
| 1169 | |
| 1170 entry = gtk_entry_new(); | |
| 1171 gtk_label_set_mnemonic_widget(GTK_LABEL(label), entry); | |
| 1172 gtk_table_attach(GTK_TABLE(table), entry, 1, 2, 0, 1, GTK_FILL, 0, 0, 0); | |
| 1173 g_signal_connect(G_OBJECT(entry), "changed", | |
| 1174 G_CALLBACK(proxy_print_option), (void *)PROXYHOST); | |
|
5681
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5673
diff
changeset
|
1175 |
|
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5673
diff
changeset
|
1176 if (proxy_info != NULL && gaim_proxy_info_get_host(proxy_info)) |
|
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5673
diff
changeset
|
1177 gtk_entry_set_text(GTK_ENTRY(entry), |
|
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5673
diff
changeset
|
1178 gaim_proxy_info_get_host(proxy_info)); |
| 5440 | 1179 |
| 1180 hbox = gtk_hbox_new(TRUE, 5); | |
| 1181 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); | |
| 1182 | |
| 1183 label = gtk_label_new_with_mnemonic(_("Port")); | |
| 1184 gtk_misc_set_alignment(GTK_MISC(label), 1.0, 0.5); | |
| 1185 gtk_table_attach(GTK_TABLE(table), label, 0, 1, 1, 2, GTK_FILL, 0, 0, 0); | |
| 1186 | |
| 1187 entry = gtk_entry_new(); | |
| 1188 gtk_label_set_mnemonic_widget(GTK_LABEL(label), entry); | |
| 1189 gtk_table_attach(GTK_TABLE(table), entry, 1, 2, 1, 2, GTK_FILL, 0, 0, 0); | |
| 1190 g_signal_connect(G_OBJECT(entry), "changed", | |
| 1191 G_CALLBACK(proxy_print_option), (void *)PROXYPORT); | |
| 1192 | |
|
5681
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5673
diff
changeset
|
1193 if (proxy_info != NULL && gaim_proxy_info_get_port(proxy_info) != 0) { |
| 5440 | 1194 char buf[128]; |
|
5681
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5673
diff
changeset
|
1195 g_snprintf(buf, sizeof(buf), "%d", |
|
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5673
diff
changeset
|
1196 gaim_proxy_info_get_port(proxy_info)); |
|
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5673
diff
changeset
|
1197 |
| 5440 | 1198 gtk_entry_set_text(GTK_ENTRY(entry), buf); |
| 1199 } | |
| 1200 | |
| 1201 label = gtk_label_new_with_mnemonic(_("_User")); | |
| 1202 gtk_misc_set_alignment(GTK_MISC(label), 1.0, 0.5); | |
| 1203 gtk_table_attach(GTK_TABLE(table), label, 0, 1, 2, 3, GTK_FILL, 0, 0, 0); | |
| 1204 | |
| 1205 entry = gtk_entry_new(); | |
| 1206 gtk_label_set_mnemonic_widget(GTK_LABEL(label), entry); | |
| 1207 gtk_table_attach(GTK_TABLE(table), entry, 1, 2, 2, 3, GTK_FILL, 0, 0, 0); | |
| 1208 g_signal_connect(G_OBJECT(entry), "changed", | |
| 1209 G_CALLBACK(proxy_print_option), (void *)PROXYUSER); | |
|
5681
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5673
diff
changeset
|
1210 |
|
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5673
diff
changeset
|
1211 if (proxy_info != NULL && gaim_proxy_info_get_username(proxy_info) != NULL) |
|
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5673
diff
changeset
|
1212 gtk_entry_set_text(GTK_ENTRY(entry), |
|
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5673
diff
changeset
|
1213 gaim_proxy_info_get_username(proxy_info)); |
| 5440 | 1214 |
| 1215 hbox = gtk_hbox_new(TRUE, 5); | |
| 1216 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); | |
| 1217 | |
| 1218 label = gtk_label_new_with_mnemonic(_("Pa_ssword")); | |
| 1219 gtk_misc_set_alignment(GTK_MISC(label), 1.0, 0.5); | |
| 1220 gtk_table_attach(GTK_TABLE(table), label, 0, 1, 3, 4, GTK_FILL, 0, 0, 0); | |
| 1221 | |
| 1222 entry = gtk_entry_new(); | |
| 1223 gtk_label_set_mnemonic_widget(GTK_LABEL(label), entry); | |
| 1224 gtk_table_attach(GTK_TABLE(table), entry, 1, 2, 3, 4, GTK_FILL , 0, 0, 0); | |
| 1225 gtk_entry_set_visibility(GTK_ENTRY(entry), FALSE); | |
| 1226 g_signal_connect(G_OBJECT(entry), "changed", | |
| 1227 G_CALLBACK(proxy_print_option), (void *)PROXYPASS); | |
|
5681
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5673
diff
changeset
|
1228 |
|
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5673
diff
changeset
|
1229 if (proxy_info != NULL && gaim_proxy_info_get_password(proxy_info) != NULL) |
|
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5673
diff
changeset
|
1230 gtk_entry_set_text(GTK_ENTRY(entry), |
|
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5673
diff
changeset
|
1231 gaim_proxy_info_get_password(proxy_info)); |
| 5440 | 1232 |
| 1233 gtk_widget_show_all(ret); | |
| 1234 return ret; | |
| 1235 } | |
| 1236 | |
| 1237 #ifndef _WIN32 | |
| 1238 static gboolean manual_browser_set(GtkWidget *entry, GdkEventFocus *event, gpointer data) { | |
| 1239 const char *program = gtk_entry_get_text(GTK_ENTRY(entry)); | |
| 1240 | |
| 1241 if (!program_is_valid(program)) { | |
| 1242 char *error = g_strdup_printf(_("The entered manual browser " | |
| 1243 "'%s' is not valid. Hyperlinks will " | |
| 1244 "not work."), program); | |
| 1245 gaim_notify_warning(NULL, NULL, error, NULL); | |
| 1246 } | |
| 1247 | |
|
5560
b7319c094153
[gaim-migrate @ 5961]
Christian Hammond <chipx86@chipx86.com>
parents:
5554
diff
changeset
|
1248 gaim_prefs_set_string("/gaim/gtk/browsers/command", program); |
| 5440 | 1249 |
| 1250 /* carry on normally */ | |
| 1251 return FALSE; | |
| 1252 } | |
| 1253 | |
| 5633 | 1254 static GList *get_available_browsers() |
| 5440 | 1255 { |
| 1256 struct browser { | |
| 1257 char *name; | |
| 1258 char *command; | |
| 1259 }; | |
| 1260 | |
| 1261 static struct browser possible_browsers[] = { | |
| 5633 | 1262 {N_("Konqueror"), "kfmclient"}, |
| 1263 {N_("Opera"), "opera"}, | |
| 1264 {N_("Galeon"), "galeon"}, | |
| 1265 {N_("Netscape"), "netscape"}, | |
| 1266 {N_("Mozilla"), "mozilla"}, | |
| 5440 | 1267 }; |
| 1268 static const int num_possible_browsers = 5; | |
| 1269 | |
| 1270 GList *browsers = NULL; | |
| 1271 int i = 0; | |
| 1272 | |
|
5568
fb4f7bd7525c
[gaim-migrate @ 5970]
Christian Hammond <chipx86@chipx86.com>
parents:
5567
diff
changeset
|
1273 browsers = g_list_prepend(browsers, "custom"); |
| 5440 | 1274 browsers = g_list_prepend(browsers, _("Manual")); |
|
5568
fb4f7bd7525c
[gaim-migrate @ 5970]
Christian Hammond <chipx86@chipx86.com>
parents:
5567
diff
changeset
|
1275 |
| 5440 | 1276 for (i = 0; i < num_possible_browsers; i++) { |
| 1277 if (program_is_valid(possible_browsers[i].command)) { | |
| 5633 | 1278 browsers = g_list_prepend(browsers, |
|
5551
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
1279 possible_browsers[i].command); |
|
5568
fb4f7bd7525c
[gaim-migrate @ 5970]
Christian Hammond <chipx86@chipx86.com>
parents:
5567
diff
changeset
|
1280 browsers = g_list_prepend(browsers, _(possible_browsers[i].name)); |
| 5440 | 1281 } |
| 1282 } | |
| 1283 | |
| 1284 return browsers; | |
| 1285 } | |
| 1286 | |
|
5568
fb4f7bd7525c
[gaim-migrate @ 5970]
Christian Hammond <chipx86@chipx86.com>
parents:
5567
diff
changeset
|
1287 static void |
|
fb4f7bd7525c
[gaim-migrate @ 5970]
Christian Hammond <chipx86@chipx86.com>
parents:
5567
diff
changeset
|
1288 browser_changed_cb(const char *name, GaimPrefType type, gpointer value, |
|
fb4f7bd7525c
[gaim-migrate @ 5970]
Christian Hammond <chipx86@chipx86.com>
parents:
5567
diff
changeset
|
1289 gpointer data) |
|
fb4f7bd7525c
[gaim-migrate @ 5970]
Christian Hammond <chipx86@chipx86.com>
parents:
5567
diff
changeset
|
1290 { |
|
fb4f7bd7525c
[gaim-migrate @ 5970]
Christian Hammond <chipx86@chipx86.com>
parents:
5567
diff
changeset
|
1291 GtkWidget *hbox = data; |
|
fb4f7bd7525c
[gaim-migrate @ 5970]
Christian Hammond <chipx86@chipx86.com>
parents:
5567
diff
changeset
|
1292 const char *browser = value; |
|
fb4f7bd7525c
[gaim-migrate @ 5970]
Christian Hammond <chipx86@chipx86.com>
parents:
5567
diff
changeset
|
1293 |
|
fb4f7bd7525c
[gaim-migrate @ 5970]
Christian Hammond <chipx86@chipx86.com>
parents:
5567
diff
changeset
|
1294 gtk_widget_set_sensitive(hbox, !strcmp(browser, "custom")); |
|
fb4f7bd7525c
[gaim-migrate @ 5970]
Christian Hammond <chipx86@chipx86.com>
parents:
5567
diff
changeset
|
1295 } |
|
fb4f7bd7525c
[gaim-migrate @ 5970]
Christian Hammond <chipx86@chipx86.com>
parents:
5567
diff
changeset
|
1296 |
| 5440 | 1297 GtkWidget *browser_page() { |
| 1298 GtkWidget *ret; | |
| 1299 GtkWidget *vbox; | |
| 1300 GtkWidget *hbox; | |
| 1301 GtkWidget *label; | |
| 1302 GtkSizeGroup *sg; | |
| 1303 GList *browsers = NULL; | |
| 1304 | |
| 1305 ret = gtk_vbox_new(FALSE, 18); | |
| 1306 gtk_container_set_border_width (GTK_CONTAINER (ret), 12); | |
| 1307 | |
| 1308 sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); | |
|
5530
2c4c975620f0
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5440
diff
changeset
|
1309 vbox = gaim_gtk_make_frame (ret, _("Browser Selection")); |
| 5440 | 1310 |
| 1311 browsers = get_available_browsers(); | |
| 1312 if (browsers != NULL) { | |
|
5551
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
1313 label = prefs_dropdown_from_list(vbox,_("_Browser"), GAIM_PREF_STRING, |
|
5550
b18c2a37cc96
[gaim-migrate @ 5951]
Christian Hammond <chipx86@chipx86.com>
parents:
5547
diff
changeset
|
1314 "/gaim/gtk/browsers/browser", |
|
b18c2a37cc96
[gaim-migrate @ 5951]
Christian Hammond <chipx86@chipx86.com>
parents:
5547
diff
changeset
|
1315 browsers); |
|
b18c2a37cc96
[gaim-migrate @ 5951]
Christian Hammond <chipx86@chipx86.com>
parents:
5547
diff
changeset
|
1316 |
| 5440 | 1317 gtk_misc_set_alignment(GTK_MISC(label), 0, 0); |
| 1318 gtk_size_group_add_widget(sg, label); | |
| 1319 } | |
| 1320 | |
| 1321 hbox = gtk_hbox_new(FALSE, 5); | |
| 1322 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); | |
| 1323 label = gtk_label_new_with_mnemonic(_("_Manual: ")); | |
| 1324 gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); | |
| 1325 gtk_misc_set_alignment(GTK_MISC(label), 0, 0); | |
| 1326 gtk_size_group_add_widget(sg, label); | |
| 1327 | |
| 1328 browser_entry = gtk_entry_new(); | |
| 1329 gtk_label_set_mnemonic_widget(GTK_LABEL(label), browser_entry); | |
|
5560
b7319c094153
[gaim-migrate @ 5961]
Christian Hammond <chipx86@chipx86.com>
parents:
5554
diff
changeset
|
1330 |
|
b7319c094153
[gaim-migrate @ 5961]
Christian Hammond <chipx86@chipx86.com>
parents:
5554
diff
changeset
|
1331 if (strcmp(gaim_prefs_get_string("/gaim/gtk/browsers/browser"), "custom")) |
| 5440 | 1332 gtk_widget_set_sensitive(hbox, FALSE); |
|
5560
b7319c094153
[gaim-migrate @ 5961]
Christian Hammond <chipx86@chipx86.com>
parents:
5554
diff
changeset
|
1333 |
| 5440 | 1334 gtk_box_pack_start (GTK_BOX (hbox), browser_entry, FALSE, FALSE, 0); |
| 1335 | |
|
5560
b7319c094153
[gaim-migrate @ 5961]
Christian Hammond <chipx86@chipx86.com>
parents:
5554
diff
changeset
|
1336 gtk_entry_set_text(GTK_ENTRY(browser_entry), |
|
b7319c094153
[gaim-migrate @ 5961]
Christian Hammond <chipx86@chipx86.com>
parents:
5554
diff
changeset
|
1337 gaim_prefs_get_string("/gaim/gtk/browsers/command")); |
|
b7319c094153
[gaim-migrate @ 5961]
Christian Hammond <chipx86@chipx86.com>
parents:
5554
diff
changeset
|
1338 g_signal_connect(G_OBJECT(browser_entry), "focus-out-event", |
|
b7319c094153
[gaim-migrate @ 5961]
Christian Hammond <chipx86@chipx86.com>
parents:
5554
diff
changeset
|
1339 G_CALLBACK(manual_browser_set), NULL); |
| 5440 | 1340 |
|
5568
fb4f7bd7525c
[gaim-migrate @ 5970]
Christian Hammond <chipx86@chipx86.com>
parents:
5567
diff
changeset
|
1341 browser_pref_id = gaim_prefs_connect_callback("/gaim/gtk/browsers/browser", |
|
fb4f7bd7525c
[gaim-migrate @ 5970]
Christian Hammond <chipx86@chipx86.com>
parents:
5567
diff
changeset
|
1342 browser_changed_cb, hbox); |
|
fb4f7bd7525c
[gaim-migrate @ 5970]
Christian Hammond <chipx86@chipx86.com>
parents:
5567
diff
changeset
|
1343 |
| 5440 | 1344 if (browsers != NULL) { |
|
5530
2c4c975620f0
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5440
diff
changeset
|
1345 vbox = gaim_gtk_make_frame (ret, _("Browser Options")); |
|
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
1346 label = prefs_checkbox(_("Open new _window by default"), |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
1347 "/gaim/gtk/browsers/new_window", vbox); |
| 5440 | 1348 } |
| 1349 | |
| 1350 gtk_widget_show_all(ret); | |
| 1351 return ret; | |
| 1352 } | |
| 1353 #endif /*_WIN32*/ | |
| 1354 | |
| 1355 GtkWidget *logging_page() { | |
| 1356 GtkWidget *ret; | |
| 1357 GtkWidget *vbox; | |
| 1358 ret = gtk_vbox_new(FALSE, 18); | |
| 1359 gtk_container_set_border_width (GTK_CONTAINER (ret), 12); | |
| 1360 | |
|
5530
2c4c975620f0
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5440
diff
changeset
|
1361 vbox = gaim_gtk_make_frame (ret, _("Message Logs")); |
|
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
1362 prefs_checkbox(_("_Log all instant messages"), |
| 5635 | 1363 "/gaim/gtk/logging/log_ims", vbox); |
|
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
1364 prefs_checkbox(_("Log all c_hats"), |
| 5635 | 1365 "/gaim/gtk/logging/log_chats", vbox); |
|
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
1366 prefs_checkbox(_("Strip _HTML from logs"), |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
1367 "/gaim/gtk/logging/strip_html", vbox); |
| 5440 | 1368 |
|
5530
2c4c975620f0
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5440
diff
changeset
|
1369 vbox = gaim_gtk_make_frame (ret, _("System Logs")); |
|
5551
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
1370 prefs_checkbox(_("Log when buddies _sign on/sign off"), |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
1371 "/gaim/gtk/logging/log_signon_signoff", vbox); |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
1372 prefs_checkbox(_("Log when buddies become _idle/un-idle"), |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
1373 "/gaim/gtk/logging/log_idle_state", vbox); |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
1374 prefs_checkbox(_("Log when buddies go away/come _back"), |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
1375 "/gaim/gtk/logging/log_away_state", vbox); |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
1376 prefs_checkbox(_("Log your _own signons/idleness/awayness"), |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
1377 "/gaim/gtk/logging/log_own_states", vbox); |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
1378 prefs_checkbox(_("I_ndividual log file for each buddy's signons"), |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
1379 "/gaim/gtk/logging/individual_logs", vbox); |
| 5440 | 1380 |
| 1381 gtk_widget_show_all(ret); | |
| 1382 return ret; | |
| 1383 } | |
| 1384 | |
| 1385 static GtkWidget *sndcmd = NULL; | |
| 1386 | |
| 1387 #ifndef _WIN32 | |
| 1388 static gint sound_cmd_yeah(GtkEntry *entry, gpointer d) | |
| 1389 { | |
| 5684 | 1390 gaim_prefs_set_string("/gaim/gtk/sound/command", |
| 1391 gtk_entry_get_text(GTK_ENTRY(sndcmd))); | |
| 5440 | 1392 return TRUE; |
| 1393 } | |
| 1394 #endif | |
| 1395 | |
| 1396 GtkWidget *sound_page() { | |
| 1397 GtkWidget *ret; | |
| 1398 GtkWidget *vbox; | |
| 1399 GtkSizeGroup *sg; | |
| 1400 #ifndef _WIN32 | |
| 1401 GtkWidget *dd; | |
| 1402 GtkWidget *hbox; | |
| 1403 GtkWidget *label; | |
| 5684 | 1404 const char *cmd; |
| 5440 | 1405 #endif |
| 1406 | |
| 1407 ret = gtk_vbox_new(FALSE, 18); | |
| 1408 gtk_container_set_border_width (GTK_CONTAINER (ret), 12); | |
| 1409 | |
| 1410 sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); | |
| 1411 | |
|
5530
2c4c975620f0
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5440
diff
changeset
|
1412 vbox = gaim_gtk_make_frame (ret, _("Sound Options")); |
|
5551
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
1413 prefs_checkbox(_("_No sounds when you log in"), |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
1414 "/gaim/gtk/sound/silent_signon", vbox); |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
1415 prefs_checkbox(_("_Sounds while away"), |
| 5684 | 1416 "/core/sound/while_away", vbox); |
| 5440 | 1417 |
| 1418 #ifndef _WIN32 | |
|
5530
2c4c975620f0
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5440
diff
changeset
|
1419 vbox = gaim_gtk_make_frame (ret, _("Sound Method")); |
|
5551
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
1420 dd = prefs_dropdown(vbox, _("_Method"), GAIM_PREF_STRING, |
| 5684 | 1421 "/gaim/gtk/sound/method", |
|
5551
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
1422 _("Console beep"), "beep", |
| 5440 | 1423 #ifdef USE_AO |
|
5551
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
1424 _("Automatic"), "automatic", |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
1425 "ESD", "esd", |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
1426 "Arts", "arts", |
| 5440 | 1427 #endif |
| 1428 #ifdef USE_NAS_AUDIO | |
|
5551
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
1429 "NAS", "nas", |
| 5440 | 1430 #endif |
| 5684 | 1431 _("Command"), "custom", |
|
5550
b18c2a37cc96
[gaim-migrate @ 5951]
Christian Hammond <chipx86@chipx86.com>
parents:
5547
diff
changeset
|
1432 NULL); |
| 5440 | 1433 gtk_size_group_add_widget(sg, dd); |
| 1434 gtk_misc_set_alignment(GTK_MISC(dd), 0, 0); | |
| 1435 | |
| 1436 hbox = gtk_hbox_new(FALSE, 5); | |
| 1437 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 5); | |
| 1438 | |
| 1439 hbox = gtk_hbox_new(FALSE, 5); | |
| 1440 gtk_container_add(GTK_CONTAINER(vbox), hbox); | |
| 1441 label = gtk_label_new_with_mnemonic(_("Sound c_ommand\n(%s for filename)")); | |
| 1442 gtk_size_group_add_widget(sg, label); | |
| 1443 gtk_misc_set_alignment(GTK_MISC(label), 0, 0); | |
| 1444 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 5); | |
| 1445 | |
| 1446 sndcmd = gtk_entry_new(); | |
| 1447 gtk_label_set_mnemonic_widget(GTK_LABEL(label), sndcmd); | |
| 1448 | |
| 1449 gtk_editable_set_editable(GTK_EDITABLE(sndcmd), TRUE); | |
| 5684 | 1450 cmd = gaim_prefs_get_string("/gaim/gtk/sound/command"); |
| 5440 | 1451 if(cmd) |
| 1452 gtk_entry_set_text(GTK_ENTRY(sndcmd), cmd); | |
| 1453 gtk_widget_set_size_request(sndcmd, 75, -1); | |
| 1454 | |
| 5684 | 1455 gtk_widget_set_sensitive(sndcmd, |
| 1456 !strcmp(gaim_prefs_get_string("/gaim/gtk/sound/method"), | |
|
5551
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
1457 "command")); |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
1458 |
| 5440 | 1459 gtk_box_pack_start(GTK_BOX(hbox), sndcmd, TRUE, TRUE, 5); |
| 1460 g_signal_connect(G_OBJECT(sndcmd), "changed", | |
| 1461 G_CALLBACK(sound_cmd_yeah), NULL); | |
| 1462 #endif /* _WIN32 */ | |
| 1463 gtk_widget_show_all(ret); | |
| 1464 return ret; | |
| 1465 } | |
| 1466 | |
| 1467 GtkWidget *away_page() { | |
| 1468 GtkWidget *ret; | |
| 1469 GtkWidget *vbox; | |
| 1470 GtkWidget *hbox; | |
| 1471 GtkWidget *label; | |
| 1472 GtkWidget *button; | |
| 1473 GtkWidget *select; | |
| 1474 GtkWidget *dd; | |
| 1475 GtkSizeGroup *sg; | |
| 1476 | |
| 1477 ret = gtk_vbox_new(FALSE, 18); | |
| 1478 gtk_container_set_border_width (GTK_CONTAINER (ret), 12); | |
| 1479 | |
| 1480 sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); | |
| 1481 | |
|
5530
2c4c975620f0
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5440
diff
changeset
|
1482 vbox = gaim_gtk_make_frame (ret, _("Away")); |
|
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
1483 prefs_checkbox(_("_Sending messages removes away status"), |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
1484 "/core/conversations/away_back_on_send", vbox); |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
1485 prefs_checkbox(_("_Queue new messages when away"), |
|
5573
5e7de337a053
[gaim-migrate @ 5976]
Christian Hammond <chipx86@chipx86.com>
parents:
5568
diff
changeset
|
1486 "/gaim/gtk/away/queue_messages", vbox); |
| 5440 | 1487 |
|
5530
2c4c975620f0
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5440
diff
changeset
|
1488 vbox = gaim_gtk_make_frame (ret, _("Auto-response")); |
| 5440 | 1489 hbox = gtk_hbox_new(FALSE, 0); |
| 1490 gtk_container_add(GTK_CONTAINER(vbox), hbox); | |
|
5550
b18c2a37cc96
[gaim-migrate @ 5951]
Christian Hammond <chipx86@chipx86.com>
parents:
5547
diff
changeset
|
1491 prefs_labeled_spin_button(hbox, _("Seconds before _resending:"), |
|
b18c2a37cc96
[gaim-migrate @ 5951]
Christian Hammond <chipx86@chipx86.com>
parents:
5547
diff
changeset
|
1492 "/core/away/auto_response/sec_before_resend", |
|
b18c2a37cc96
[gaim-migrate @ 5951]
Christian Hammond <chipx86@chipx86.com>
parents:
5547
diff
changeset
|
1493 1, 24 * 60 * 60, sg); |
|
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
1494 prefs_checkbox(_("_Send auto-response"), |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
1495 "/core/away/auto_response/enabled", vbox); |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
1496 prefs_checkbox(_("_Only send auto-response when idle"), |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
1497 "/core/away/auto_response/idle_only", vbox); |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
1498 prefs_checkbox(_("Send auto-response in active conversations"), |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
1499 "/core/away/auto_response/in_active_conv", vbox); |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
1500 |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
1501 if (!gaim_prefs_get_bool("/core/away/auto_response/enabled")) |
| 5440 | 1502 gtk_widget_set_sensitive(hbox, FALSE); |
| 1503 | |
|
5530
2c4c975620f0
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5440
diff
changeset
|
1504 vbox = gaim_gtk_make_frame (ret, _("Idle")); |
|
5550
b18c2a37cc96
[gaim-migrate @ 5951]
Christian Hammond <chipx86@chipx86.com>
parents:
5547
diff
changeset
|
1505 dd = prefs_dropdown(vbox, _("Idle _time reporting:"), GAIM_PREF_STRING, |
|
b18c2a37cc96
[gaim-migrate @ 5951]
Christian Hammond <chipx86@chipx86.com>
parents:
5547
diff
changeset
|
1506 "/gaim/gtk/idle/reporting_method", |
|
b18c2a37cc96
[gaim-migrate @ 5951]
Christian Hammond <chipx86@chipx86.com>
parents:
5547
diff
changeset
|
1507 _("None"), "none", |
|
b18c2a37cc96
[gaim-migrate @ 5951]
Christian Hammond <chipx86@chipx86.com>
parents:
5547
diff
changeset
|
1508 _("Gaim usage"), "gaim", |
| 5440 | 1509 #ifdef USE_SCREENSAVER |
| 1510 #ifndef _WIN32 | |
|
5550
b18c2a37cc96
[gaim-migrate @ 5951]
Christian Hammond <chipx86@chipx86.com>
parents:
5547
diff
changeset
|
1511 _("X usage"), "system", |
| 5440 | 1512 #else |
|
5550
b18c2a37cc96
[gaim-migrate @ 5951]
Christian Hammond <chipx86@chipx86.com>
parents:
5547
diff
changeset
|
1513 _("Windows usage"), "system", |
| 5440 | 1514 #endif |
| 1515 #endif | |
|
5550
b18c2a37cc96
[gaim-migrate @ 5951]
Christian Hammond <chipx86@chipx86.com>
parents:
5547
diff
changeset
|
1516 NULL); |
|
b18c2a37cc96
[gaim-migrate @ 5951]
Christian Hammond <chipx86@chipx86.com>
parents:
5547
diff
changeset
|
1517 |
| 5440 | 1518 gtk_size_group_add_widget(sg, dd); |
| 1519 gtk_misc_set_alignment(GTK_MISC(dd), 0, 0); | |
| 1520 | |
|
5530
2c4c975620f0
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5440
diff
changeset
|
1521 vbox = gaim_gtk_make_frame (ret, _("Auto-away")); |
|
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
1522 button = prefs_checkbox(_("Set away _when idle"), |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
1523 "/core/away/away_when_idle", vbox); |
|
5550
b18c2a37cc96
[gaim-migrate @ 5951]
Christian Hammond <chipx86@chipx86.com>
parents:
5547
diff
changeset
|
1524 select = prefs_labeled_spin_button(vbox, _("_Minutes before setting away:"), |
|
b18c2a37cc96
[gaim-migrate @ 5951]
Christian Hammond <chipx86@chipx86.com>
parents:
5547
diff
changeset
|
1525 "/core/away/mins_before_away", |
|
b18c2a37cc96
[gaim-migrate @ 5951]
Christian Hammond <chipx86@chipx86.com>
parents:
5547
diff
changeset
|
1526 1, 24 * 60, sg); |
|
b18c2a37cc96
[gaim-migrate @ 5951]
Christian Hammond <chipx86@chipx86.com>
parents:
5547
diff
changeset
|
1527 |
| 5440 | 1528 g_signal_connect(G_OBJECT(button), "clicked", |
| 1529 G_CALLBACK(gaim_gtk_toggle_sensitive), select); | |
| 1530 | |
| 1531 label = gtk_label_new_with_mnemonic(_("Away m_essage:")); | |
| 1532 gtk_size_group_add_widget(sg, label); | |
| 1533 gtk_misc_set_alignment(GTK_MISC(label), 0, 0); | |
| 1534 hbox = gtk_hbox_new(FALSE, 0); | |
| 1535 gtk_container_add(GTK_CONTAINER(vbox), hbox); | |
| 1536 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); | |
| 1537 prefs_away_menu = gtk_option_menu_new(); | |
| 1538 gtk_label_set_mnemonic_widget(GTK_LABEL(label), prefs_away_menu); | |
|
5550
b18c2a37cc96
[gaim-migrate @ 5951]
Christian Hammond <chipx86@chipx86.com>
parents:
5547
diff
changeset
|
1539 |
| 5440 | 1540 g_signal_connect(G_OBJECT(button), "clicked", |
| 1541 G_CALLBACK(gaim_gtk_toggle_sensitive), prefs_away_menu); | |
| 1542 default_away_menu_init(prefs_away_menu); | |
| 1543 gtk_widget_show(prefs_away_menu); | |
| 1544 gtk_box_pack_start(GTK_BOX(hbox), prefs_away_menu, FALSE, FALSE, 0); | |
| 1545 | |
|
5550
b18c2a37cc96
[gaim-migrate @ 5951]
Christian Hammond <chipx86@chipx86.com>
parents:
5547
diff
changeset
|
1546 if (!gaim_prefs_get_bool("/core/away/away_when_idle")) { |
|
b18c2a37cc96
[gaim-migrate @ 5951]
Christian Hammond <chipx86@chipx86.com>
parents:
5547
diff
changeset
|
1547 gtk_widget_set_sensitive(GTK_WIDGET(select), FALSE); |
|
b18c2a37cc96
[gaim-migrate @ 5951]
Christian Hammond <chipx86@chipx86.com>
parents:
5547
diff
changeset
|
1548 gtk_widget_set_sensitive(GTK_WIDGET(prefs_away_menu), FALSE); |
|
b18c2a37cc96
[gaim-migrate @ 5951]
Christian Hammond <chipx86@chipx86.com>
parents:
5547
diff
changeset
|
1549 } |
|
b18c2a37cc96
[gaim-migrate @ 5951]
Christian Hammond <chipx86@chipx86.com>
parents:
5547
diff
changeset
|
1550 |
| 5440 | 1551 gtk_widget_show_all(ret); |
|
5550
b18c2a37cc96
[gaim-migrate @ 5951]
Christian Hammond <chipx86@chipx86.com>
parents:
5547
diff
changeset
|
1552 |
| 5440 | 1553 return ret; |
| 1554 } | |
| 1555 | |
| 1556 static GtkWidget *plugin_description=NULL, *plugin_details=NULL; | |
| 1557 | |
| 1558 static void prefs_plugin_sel (GtkTreeSelection *sel, GtkTreeModel *model) | |
| 1559 { | |
| 1560 gchar *buf, *pname, *perr, *pdesc, *pauth, *pweb; | |
| 1561 GtkTreeIter iter; | |
| 1562 GValue val = { 0, }; | |
| 1563 GaimPlugin *plug; | |
| 1564 | |
| 1565 if (! gtk_tree_selection_get_selected (sel, &model, &iter)) | |
| 1566 return; | |
| 1567 gtk_tree_model_get_value (model, &iter, 2, &val); | |
| 1568 plug = g_value_get_pointer(&val); | |
| 1569 | |
| 1570 pname = g_markup_escape_text(_(plug->info->name), -1); | |
| 1571 pdesc = g_markup_escape_text(_(plug->info->description), -1); | |
| 1572 pauth = g_markup_escape_text(_(plug->info->author), -1); | |
| 1573 pweb = g_markup_escape_text(_(plug->info->homepage), -1); | |
| 1574 if (plug->error != NULL) { | |
| 1575 perr = g_markup_escape_text(_(plug->error), -1); | |
| 1576 buf = g_strdup_printf( | |
| 1577 "<span size=\"larger\">%s %s</span>\n\n" | |
| 1578 "<span weight=\"bold\" color=\"red\">%s</span>\n\n" | |
| 1579 "%s", | |
| 1580 pname, plug->info->version, perr, pdesc); | |
| 1581 g_free(perr); | |
| 1582 } | |
| 1583 else { | |
| 1584 buf = g_strdup_printf( | |
| 1585 "<span size=\"larger\">%s %s</span>\n\n%s", | |
| 1586 pname, plug->info->version, pdesc); | |
| 1587 } | |
| 1588 gtk_label_set_markup(GTK_LABEL(plugin_description), buf); | |
| 1589 g_free(buf); | |
| 1590 | |
| 1591 buf = g_strdup_printf( | |
| 1592 #ifndef _WIN32 | |
| 1593 _("<span size=\"larger\">%s %s</span>\n\n" | |
| 1594 "<span weight=\"bold\">Written by:</span>\t%s\n" | |
| 1595 "<span weight=\"bold\">Web site:</span>\t\t%s\n" | |
| 1596 "<span weight=\"bold\">File name:</span>\t%s"), | |
| 1597 #else | |
| 1598 _("<span size=\"larger\">%s %s</span>\n\n" | |
| 1599 "<span weight=\"bold\">Written by:</span> %s\n" | |
| 1600 "<span weight=\"bold\">URL:</span> %s\n" | |
| 1601 "<span weight=\"bold\">File name:</span> %s"), | |
| 1602 #endif | |
| 1603 pname, plug->info->version, pauth, pweb, plug->path); | |
| 1604 | |
| 1605 gtk_label_set_markup(GTK_LABEL(plugin_details), buf); | |
| 1606 g_value_unset(&val); | |
| 1607 g_free(buf); | |
| 1608 g_free(pname); | |
| 1609 g_free(pdesc); | |
| 1610 g_free(pauth); | |
| 1611 g_free(pweb); | |
| 1612 } | |
| 1613 | |
| 1614 static void plugin_load (GtkCellRendererToggle *cell, gchar *pth, gpointer data) | |
| 1615 { | |
| 1616 GtkTreeModel *model = (GtkTreeModel *)data; | |
| 1617 GtkTreeIter iter; | |
| 1618 GtkTreePath *path = gtk_tree_path_new_from_string(pth); | |
| 1619 GaimPlugin *plug; | |
| 1620 gchar buf[1024]; | |
| 1621 | |
| 1622 GdkCursor *wait = gdk_cursor_new (GDK_WATCH); | |
| 1623 gdk_window_set_cursor(prefs->window, wait); | |
| 1624 gdk_cursor_unref(wait); | |
| 1625 | |
| 1626 gtk_tree_model_get_iter (model, &iter, path); | |
| 1627 gtk_tree_model_get (model, &iter, 2, &plug, -1); | |
| 1628 | |
| 1629 if (!gaim_plugin_is_loaded(plug)) { | |
| 1630 gaim_plugin_load(plug); | |
| 1631 | |
| 1632 /* | |
| 1633 * NOTE: This is basically the same check as before | |
| 1634 * (plug->type == plugin), but now there aren't plugin types. | |
| 1635 * Not yet, anyway. I want to do a V2 of the plugin API. | |
| 1636 * The thing is, we should have a flag specifying the UI type, | |
| 1637 * or just whether it's a general plugin or a UI-specific | |
| 1638 * plugin. We should only load this if it's UI-specific. | |
| 1639 * | |
| 1640 * -- ChipX86 | |
| 1641 */ | |
| 1642 if (GAIM_IS_GTK_PLUGIN(plug)) | |
| 1643 { | |
| 1644 GtkWidget *config_frame; | |
| 1645 GaimGtkPluginUiInfo *ui_info; | |
| 1646 | |
| 1647 ui_info = GAIM_GTK_PLUGIN_UI_INFO(plug); | |
| 1648 config_frame = gaim_gtk_plugin_get_config_frame(plug); | |
| 1649 | |
| 1650 if (config_frame != NULL) { | |
| 1651 ui_info->iter = g_new0(GtkTreeIter, 1); | |
| 1652 prefs_notebook_add_page(_(plug->info->name), NULL, | |
| 1653 config_frame, ui_info->iter, | |
| 1654 &plugin_iter, notebook_page++); | |
| 1655 | |
| 1656 if (gtk_tree_model_iter_n_children(GTK_TREE_MODEL(prefstree), | |
| 1657 &plugin_iter) == 1) { | |
| 1658 | |
| 1659 /* Expand the tree for the first plugin added */ | |
| 1660 GtkTreePath *path2; | |
| 1661 | |
| 1662 path2 = gtk_tree_model_get_path(GTK_TREE_MODEL(prefstree), | |
| 1663 &plugin_iter); | |
| 1664 gtk_tree_view_expand_row(GTK_TREE_VIEW(tree_v), | |
| 1665 path2, TRUE); | |
| 1666 gtk_tree_path_free(path2); | |
| 1667 } | |
| 1668 } | |
| 1669 } | |
| 1670 } | |
| 1671 else { | |
| 1672 if (GAIM_IS_GTK_PLUGIN(plug)) { | |
| 1673 GaimGtkPluginUiInfo *ui_info; | |
| 1674 | |
| 1675 ui_info = GAIM_GTK_PLUGIN_UI_INFO(plug); | |
| 1676 | |
| 1677 if (ui_info != NULL && ui_info->iter != NULL) { | |
| 1678 gtk_tree_store_remove(GTK_TREE_STORE(prefstree), ui_info->iter); | |
| 1679 g_free(ui_info->iter); | |
| 1680 ui_info->iter = NULL; | |
| 1681 } | |
| 1682 } | |
| 1683 | |
| 1684 gaim_plugin_unload(plug); | |
| 1685 } | |
| 1686 | |
| 1687 gdk_window_set_cursor(prefs->window, NULL); | |
| 1688 | |
| 1689 if (plug->error != NULL) { | |
| 1690 g_snprintf(buf, sizeof(buf), | |
| 1691 "<span size=\"larger\">%s %s</span>\n\n" | |
| 1692 "<span weight=\"bold\" color=\"red\">%s</span>\n\n" | |
| 1693 "%s", | |
| 1694 g_markup_escape_text(_(plug->info->name), -1), | |
| 1695 plug->info->version, | |
| 1696 g_markup_escape_text(plug->error, -1), | |
| 1697 g_markup_escape_text(_(plug->info->description), -1)); | |
| 1698 } | |
| 1699 else { | |
| 1700 g_snprintf(buf, sizeof(buf), | |
| 1701 "<span size=\"larger\">%s %s</span>\n\n%s", | |
| 1702 g_markup_escape_text(_(plug->info->name), -1), | |
| 1703 plug->info->version, | |
| 1704 g_markup_escape_text(_(plug->info->description), -1)); | |
| 1705 } | |
| 1706 | |
| 1707 gtk_label_set_markup(GTK_LABEL(plugin_description), buf); | |
| 1708 gtk_list_store_set (GTK_LIST_STORE (model), &iter, 0, | |
| 1709 gaim_plugin_is_loaded(plug), -1); | |
| 1710 | |
| 1711 gtk_label_set_markup(GTK_LABEL(plugin_description), buf); | |
| 1712 gtk_tree_path_free(path); | |
| 1713 } | |
| 1714 | |
| 1715 static void | |
| 1716 update_plugin_list(void *data) | |
| 1717 { | |
| 1718 GtkListStore *ls = GTK_LIST_STORE(data); | |
| 1719 GtkTreeIter iter; | |
| 1720 GList *probes; | |
| 1721 GaimPlugin *plug; | |
| 1722 | |
| 1723 gtk_list_store_clear(ls); | |
| 1724 | |
| 1725 for (probes = gaim_plugins_get_all(); | |
| 1726 probes != NULL; | |
| 1727 probes = probes->next) { | |
| 1728 | |
| 1729 plug = probes->data; | |
| 1730 | |
| 1731 if (plug->info->type != GAIM_PLUGIN_STANDARD) | |
| 1732 continue; | |
| 1733 | |
| 1734 gtk_list_store_append (ls, &iter); | |
| 1735 gtk_list_store_set(ls, &iter, | |
| 1736 0, gaim_plugin_is_loaded(plug), | |
| 1737 1, plug->info->name ? _(plug->info->name) : plug->path, | |
| 1738 2, plug, -1); | |
| 1739 } | |
| 1740 } | |
| 1741 | |
| 1742 static GtkWidget *plugin_page () | |
| 1743 { | |
| 1744 GtkWidget *ret; | |
| 1745 GtkWidget *sw, *vp; | |
| 1746 GtkWidget *event_view; | |
| 1747 GtkListStore *ls; | |
| 1748 GtkCellRenderer *rend, *rendt; | |
| 1749 GtkTreeViewColumn *col; | |
| 1750 GtkTreeSelection *sel; | |
| 1751 GtkTreePath *path; | |
| 1752 GtkWidget *nb; | |
| 1753 | |
| 1754 ret = gtk_vbox_new(FALSE, 18); | |
| 1755 gtk_container_set_border_width (GTK_CONTAINER (ret), 12); | |
| 1756 | |
| 1757 sw = gtk_scrolled_window_new(NULL,NULL); | |
| 1758 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS); | |
| 1759 gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_IN); | |
| 1760 | |
| 1761 gtk_box_pack_start(GTK_BOX(ret), sw, TRUE, TRUE, 0); | |
| 1762 | |
| 1763 ls = gtk_list_store_new (3, G_TYPE_BOOLEAN, G_TYPE_STRING, G_TYPE_POINTER); | |
| 1764 | |
| 1765 update_plugin_list(ls); | |
| 1766 | |
| 1767 event_view = gtk_tree_view_new_with_model (GTK_TREE_MODEL(ls)); | |
| 1768 | |
| 1769 rend = gtk_cell_renderer_toggle_new(); | |
| 1770 sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (event_view)); | |
| 1771 | |
| 1772 | |
| 1773 col = gtk_tree_view_column_new_with_attributes (_("Load"), | |
| 1774 rend, | |
| 1775 "active", 0, | |
| 1776 NULL); | |
| 1777 gtk_tree_view_append_column (GTK_TREE_VIEW(event_view), col); | |
| 1778 | |
| 1779 rendt = gtk_cell_renderer_text_new(); | |
| 1780 col = gtk_tree_view_column_new_with_attributes (_("Name"), | |
| 1781 rendt, | |
| 1782 "text", 1, | |
| 1783 NULL); | |
| 1784 gtk_tree_view_append_column (GTK_TREE_VIEW(event_view), col); | |
| 1785 g_object_unref(G_OBJECT(ls)); | |
| 1786 gtk_container_add(GTK_CONTAINER(sw), event_view); | |
| 1787 | |
| 1788 | |
| 1789 nb = gtk_notebook_new(); | |
| 1790 gtk_notebook_set_tab_pos (GTK_NOTEBOOK(nb), GTK_POS_BOTTOM); | |
| 1791 gtk_notebook_popup_disable(GTK_NOTEBOOK(nb)); | |
| 1792 | |
| 1793 /* Description */ | |
| 1794 sw = gtk_scrolled_window_new(NULL, NULL); | |
| 1795 gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW(sw), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); | |
| 1796 plugin_description = gtk_label_new(NULL); | |
| 1797 | |
| 1798 vp = gtk_viewport_new(NULL, NULL); | |
| 1799 gtk_viewport_set_shadow_type(GTK_VIEWPORT(vp), GTK_SHADOW_NONE); | |
| 1800 gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_NONE); | |
| 1801 | |
| 1802 gtk_container_add(GTK_CONTAINER(vp), plugin_description); | |
| 1803 gtk_container_add(GTK_CONTAINER(sw), vp); | |
| 1804 | |
| 1805 gtk_label_set_selectable(GTK_LABEL(plugin_description), TRUE); | |
| 1806 gtk_label_set_line_wrap(GTK_LABEL(plugin_description), TRUE); | |
| 1807 gtk_misc_set_alignment(GTK_MISC(plugin_description), 0, 0); | |
| 1808 gtk_misc_set_padding(GTK_MISC(plugin_description), 6, 6); | |
| 1809 gtk_notebook_append_page(GTK_NOTEBOOK(nb), sw, gtk_label_new(_("Description"))); | |
| 1810 | |
| 1811 /* Details */ | |
| 1812 sw = gtk_scrolled_window_new(NULL, NULL); | |
| 1813 gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW(sw), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); | |
| 1814 plugin_details = gtk_label_new(NULL); | |
| 1815 | |
| 1816 vp = gtk_viewport_new(NULL, NULL); | |
| 1817 gtk_viewport_set_shadow_type(GTK_VIEWPORT(vp), GTK_SHADOW_NONE); | |
| 1818 gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_NONE); | |
| 1819 | |
| 1820 gtk_container_add(GTK_CONTAINER(vp), plugin_details); | |
| 1821 gtk_container_add(GTK_CONTAINER(sw), vp); | |
| 1822 | |
| 1823 gtk_label_set_selectable(GTK_LABEL(plugin_details), TRUE); | |
| 1824 gtk_label_set_line_wrap(GTK_LABEL(plugin_details), TRUE); | |
| 1825 gtk_misc_set_alignment(GTK_MISC(plugin_details), 0, 0); | |
| 1826 gtk_misc_set_padding(GTK_MISC(plugin_details), 6, 6); | |
| 1827 gtk_notebook_append_page(GTK_NOTEBOOK(nb), sw, gtk_label_new(_("Details"))); | |
| 1828 gtk_box_pack_start(GTK_BOX(ret), nb, TRUE, TRUE, 0); | |
| 1829 | |
| 1830 g_signal_connect (G_OBJECT (sel), "changed", | |
| 1831 G_CALLBACK (prefs_plugin_sel), | |
| 1832 NULL); | |
| 1833 g_signal_connect (G_OBJECT(rend), "toggled", | |
| 1834 G_CALLBACK(plugin_load), ls); | |
| 1835 | |
| 1836 path = gtk_tree_path_new_first(); | |
| 1837 gtk_tree_selection_select_path(sel, path); | |
| 1838 gtk_tree_path_free(path); | |
| 1839 | |
| 1840 gaim_plugins_register_probe_notify_cb(update_plugin_list, ls); | |
| 1841 | |
| 1842 gtk_widget_show_all(ret); | |
| 1843 return ret; | |
| 1844 } | |
| 1845 | |
|
5551
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
1846 static void |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
1847 event_toggled(GtkCellRendererToggle *cell, gchar *pth, gpointer data) |
| 5440 | 1848 { |
| 1849 GtkTreeModel *model = (GtkTreeModel *)data; | |
| 1850 GtkTreeIter iter; | |
| 1851 GtkTreePath *path = gtk_tree_path_new_from_string(pth); | |
|
5551
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
1852 const char *pref; |
| 5440 | 1853 |
| 1854 gtk_tree_model_get_iter (model, &iter, path); | |
|
5551
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
1855 gtk_tree_model_get (model, &iter, |
| 5612 | 1856 2, &pref, |
|
5551
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
1857 -1); |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
1858 |
| 5684 | 1859 gaim_prefs_set_bool(pref, !gtk_cell_renderer_toggle_get_active(cell)); |
|
5551
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
1860 |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
1861 gtk_list_store_set(GTK_LIST_STORE (model), &iter, |
| 5612 | 1862 0, !gtk_cell_renderer_toggle_get_active(cell), |
| 1863 -1); | |
| 5440 | 1864 |
| 1865 gtk_tree_path_free(path); | |
| 1866 } | |
| 1867 | |
|
5551
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
1868 static void |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
1869 test_sound(GtkWidget *button, gpointer i_am_NULL) |
| 5440 | 1870 { |
| 5684 | 1871 char *pref; |
|
5551
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
1872 gboolean temp_value1, temp_value2; |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
1873 |
| 5684 | 1874 pref = g_strdup_printf("/gaim/gtk/sound/enabled/%s", |
| 1875 gaim_gtk_sound_get_event_option(sound_row_sel)); | |
|
5551
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
1876 |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
1877 temp_value1 = gaim_prefs_get_bool("/gaim/gtk/sound/while_away"); |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
1878 temp_value2 = gaim_prefs_get_bool(pref); |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
1879 |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
1880 if (!temp_value1) gaim_prefs_set_bool("/gaim/gtk/sound/while_away", TRUE); |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
1881 if (!temp_value2) gaim_prefs_set_bool(pref, TRUE); |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
1882 |
| 5440 | 1883 gaim_sound_play_event(sound_row_sel); |
| 1884 | |
|
5551
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
1885 if (!temp_value1) gaim_prefs_set_bool("/gaim/gtk/sound/while_away", FALSE); |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
1886 if (!temp_value2) gaim_prefs_set_bool(pref, FALSE); |
| 5684 | 1887 |
| 1888 g_free(pref); | |
| 5440 | 1889 } |
| 1890 | |
|
5551
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
1891 static void |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
1892 reset_sound(GtkWidget *button, gpointer i_am_also_NULL) |
| 5440 | 1893 { |
| 5684 | 1894 char *pref = g_strdup_printf("/gaim/gtk/sound/file/%s", |
| 1895 gaim_gtk_sound_get_event_option(sound_row_sel)); | |
| 1896 | |
| 5440 | 1897 /* This just resets a sound file back to default */ |
| 5684 | 1898 gaim_prefs_set_string(pref, ""); |
| 1899 g_free(pref); | |
| 5440 | 1900 |
| 1901 gtk_entry_set_text(GTK_ENTRY(sound_entry), "(default)"); | |
| 1902 } | |
| 1903 | |
| 1904 void close_sounddialog(GtkWidget *w, GtkWidget *w2) | |
| 1905 { | |
| 1906 | |
| 1907 GtkWidget *dest; | |
| 1908 | |
| 1909 if (!GTK_IS_WIDGET(w2)) | |
| 1910 dest = w; | |
| 1911 else | |
| 1912 dest = w2; | |
| 1913 | |
| 1914 sounddialog = NULL; | |
| 1915 | |
| 1916 gtk_widget_destroy(dest); | |
| 1917 } | |
| 1918 | |
| 1919 void do_select_sound(GtkWidget *w, int snd) | |
| 1920 { | |
| 1921 const char *file; | |
| 5684 | 1922 char *pref; |
| 5440 | 1923 |
| 1924 file = gtk_file_selection_get_filename(GTK_FILE_SELECTION(sounddialog)); | |
| 1925 | |
| 1926 /* If they type in a directory, change there */ | |
| 1927 if (file_is_dir(file, sounddialog)) | |
| 1928 return; | |
| 1929 | |
| 1930 /* Set it -- and forget it */ | |
| 5684 | 1931 pref = g_strdup_printf("/gaim/gtk/sound/file/%s", |
| 1932 gaim_gtk_sound_get_event_option(snd)); | |
| 1933 gaim_prefs_set_string(pref, file); | |
| 1934 g_free(pref); | |
| 5440 | 1935 |
| 1936 /* Set our text entry */ | |
| 1937 gtk_entry_set_text(GTK_ENTRY(sound_entry), file); | |
| 1938 | |
| 1939 /* Close the window! It's getting cold in here! */ | |
| 1940 close_sounddialog(NULL, sounddialog); | |
| 1941 | |
| 1942 if (last_sound_dir) | |
| 1943 g_free(last_sound_dir); | |
| 1944 last_sound_dir = g_path_get_dirname(file); | |
| 1945 } | |
| 1946 | |
| 1947 static void sel_sound(GtkWidget *button, gpointer being_NULL_is_fun) | |
| 1948 { | |
| 1949 char *buf = g_malloc(BUF_LEN); | |
| 1950 | |
| 1951 if (!sounddialog) { | |
| 1952 sounddialog = gtk_file_selection_new(_("Sound Selection")); | |
| 1953 | |
| 1954 gtk_file_selection_hide_fileop_buttons(GTK_FILE_SELECTION(sounddialog)); | |
| 1955 | |
| 1956 g_snprintf(buf, BUF_LEN - 1, "%s" G_DIR_SEPARATOR_S, last_sound_dir ? last_sound_dir : gaim_home_dir()); | |
| 1957 | |
| 1958 gtk_file_selection_set_filename(GTK_FILE_SELECTION(sounddialog), buf); | |
| 1959 | |
| 1960 g_signal_connect(G_OBJECT(sounddialog), "destroy", | |
| 1961 G_CALLBACK(close_sounddialog), sounddialog); | |
| 1962 | |
| 1963 g_signal_connect(G_OBJECT(GTK_FILE_SELECTION(sounddialog)->ok_button), | |
| 1964 "clicked", | |
| 1965 G_CALLBACK(do_select_sound), (int *)sound_row_sel); | |
| 1966 | |
| 1967 g_signal_connect(G_OBJECT(GTK_FILE_SELECTION(sounddialog)->cancel_button), | |
| 1968 "clicked", | |
| 1969 G_CALLBACK(close_sounddialog), sounddialog); | |
| 1970 } | |
| 1971 | |
| 1972 g_free(buf); | |
| 1973 gtk_widget_show(sounddialog); | |
| 1974 gdk_window_raise(sounddialog->window); | |
| 1975 } | |
| 1976 | |
| 1977 | |
| 1978 static void prefs_sound_sel (GtkTreeSelection *sel, GtkTreeModel *model) { | |
| 1979 GtkTreeIter iter; | |
| 1980 GValue val = { 0, }; | |
| 5684 | 1981 const char *file; |
| 1982 char *pref; | |
| 5440 | 1983 |
| 1984 if (! gtk_tree_selection_get_selected (sel, &model, &iter)) | |
| 1985 return; | |
| 5612 | 1986 gtk_tree_model_get_value (model, &iter, 3, &val); |
| 5440 | 1987 sound_row_sel = g_value_get_uint(&val); |
| 5684 | 1988 |
| 1989 pref = g_strdup_printf("/gaim/gtk/sound/file/%s", | |
| 1990 gaim_gtk_sound_get_event_option(sound_row_sel)); | |
| 1991 file = gaim_prefs_get_string(pref); | |
| 1992 g_free(pref); | |
| 5440 | 1993 if (sound_entry) |
| 1994 gtk_entry_set_text(GTK_ENTRY(sound_entry), file ? file : "(default)"); | |
| 1995 g_value_unset (&val); | |
| 1996 if (sounddialog) | |
| 1997 gtk_widget_destroy(sounddialog); | |
| 1998 } | |
| 1999 | |
| 2000 GtkWidget *sound_events_page() { | |
| 2001 | |
| 2002 GtkWidget *ret; | |
| 2003 GtkWidget *sw; | |
| 2004 GtkWidget *button, *hbox; | |
| 2005 GtkTreeIter iter; | |
| 2006 GtkWidget *event_view; | |
| 2007 GtkListStore *event_store; | |
| 2008 GtkCellRenderer *rend; | |
| 2009 GtkTreeViewColumn *col; | |
| 2010 GtkTreeSelection *sel; | |
| 2011 GtkTreePath *path; | |
| 2012 int j; | |
| 5684 | 2013 const char *file; |
| 2014 char *pref; | |
| 5440 | 2015 |
| 2016 ret = gtk_vbox_new(FALSE, 18); | |
| 2017 gtk_container_set_border_width (GTK_CONTAINER (ret), 12); | |
| 2018 | |
| 2019 sw = gtk_scrolled_window_new(NULL,NULL); | |
| 2020 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); | |
| 2021 gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_IN); | |
| 2022 | |
| 2023 gtk_box_pack_start(GTK_BOX(ret), sw, TRUE, TRUE, 0); | |
| 5612 | 2024 event_store = gtk_list_store_new (4, G_TYPE_BOOLEAN, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_UINT); |
| 5440 | 2025 |
| 2026 for (j=0; j < GAIM_NUM_SOUNDS; j++) { | |
| 5684 | 2027 char *pref = g_strdup_printf("/gaim/gtk/sound/enabled/%s", |
| 2028 gaim_gtk_sound_get_event_option(j)); | |
| 2029 const char *label = gaim_gtk_sound_get_event_label(j); | |
| 2030 | |
| 2031 if (label == NULL) | |
| 5440 | 2032 continue; |
| 2033 | |
| 2034 gtk_list_store_append (event_store, &iter); | |
| 2035 gtk_list_store_set(event_store, &iter, | |
| 5612 | 2036 0, gaim_prefs_get_bool(pref), |
| 5684 | 2037 1, _(label), |
| 5612 | 2038 2, pref, |
| 2039 3, j, | |
| 2040 -1); | |
| 5684 | 2041 g_free(pref); |
| 5440 | 2042 } |
| 2043 | |
| 2044 event_view = gtk_tree_view_new_with_model (GTK_TREE_MODEL(event_store)); | |
| 2045 | |
| 2046 rend = gtk_cell_renderer_toggle_new(); | |
| 2047 sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (event_view)); | |
| 2048 g_signal_connect (G_OBJECT (sel), "changed", | |
| 2049 G_CALLBACK (prefs_sound_sel), | |
| 2050 NULL); | |
| 2051 g_signal_connect (G_OBJECT(rend), "toggled", | |
| 2052 G_CALLBACK(event_toggled), event_store); | |
| 2053 path = gtk_tree_path_new_first(); | |
| 2054 gtk_tree_selection_select_path(sel, path); | |
| 2055 gtk_tree_path_free(path); | |
| 2056 | |
| 2057 col = gtk_tree_view_column_new_with_attributes (_("Play"), | |
| 2058 rend, | |
| 2059 "active", 0, | |
| 2060 NULL); | |
| 2061 gtk_tree_view_append_column (GTK_TREE_VIEW(event_view), col); | |
| 2062 | |
| 2063 rend = gtk_cell_renderer_text_new(); | |
| 2064 col = gtk_tree_view_column_new_with_attributes (_("Event"), | |
| 2065 rend, | |
| 2066 "text", 1, | |
| 2067 NULL); | |
| 2068 gtk_tree_view_append_column (GTK_TREE_VIEW(event_view), col); | |
| 2069 g_object_unref(G_OBJECT(event_store)); | |
| 2070 gtk_container_add(GTK_CONTAINER(sw), event_view); | |
| 2071 | |
| 2072 hbox = gtk_hbox_new(FALSE, 6); | |
| 2073 gtk_box_pack_start(GTK_BOX(ret), hbox, FALSE, FALSE, 0); | |
| 2074 sound_entry = gtk_entry_new(); | |
| 5684 | 2075 pref = g_strdup_printf("/gaim/gtk/sound/file/%s", |
| 2076 gaim_gtk_sound_get_event_option(0)); | |
| 2077 file = gaim_prefs_get_string(pref); | |
| 2078 g_free(pref); | |
| 5440 | 2079 gtk_entry_set_text(GTK_ENTRY(sound_entry), file ? file : "(default)"); |
| 2080 gtk_editable_set_editable(GTK_EDITABLE(sound_entry), FALSE); | |
| 2081 gtk_box_pack_start(GTK_BOX(hbox), sound_entry, FALSE, FALSE, 5); | |
| 2082 | |
| 2083 button = gtk_button_new_with_label(_("Test")); | |
| 2084 g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(test_sound), NULL); | |
| 2085 gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 1); | |
| 2086 | |
| 2087 button = gtk_button_new_with_label(_("Reset")); | |
| 2088 g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(reset_sound), NULL); | |
| 2089 gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 1); | |
| 2090 | |
| 2091 button = gtk_button_new_with_label(_("Choose...")); | |
| 2092 g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(sel_sound), NULL); | |
| 2093 gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 1); | |
| 2094 | |
| 2095 gtk_widget_show_all (ret); | |
| 2096 | |
| 2097 return ret; | |
| 2098 } | |
| 2099 | |
| 2100 void away_message_sel(GtkTreeSelection *sel, GtkTreeModel *model) | |
| 2101 { | |
| 2102 GtkTreeIter iter; | |
| 2103 GValue val = { 0, }; | |
| 2104 gchar buffer[BUF_LONG]; | |
| 2105 char *tmp; | |
| 2106 struct away_message *am; | |
| 2107 | |
| 2108 if (! gtk_tree_selection_get_selected (sel, &model, &iter)) | |
| 2109 return; | |
| 2110 gtk_tree_model_get_value (model, &iter, 1, &val); | |
| 2111 am = g_value_get_pointer(&val); | |
| 2112 gtk_imhtml_clear(GTK_IMHTML(away_text)); | |
| 2113 strncpy(buffer, am->message, BUF_LONG); | |
| 2114 tmp = stylize(buffer, BUF_LONG); | |
| 2115 gtk_imhtml_append_text(GTK_IMHTML(away_text), tmp, -1, GTK_IMHTML_NO_TITLE | | |
| 2116 GTK_IMHTML_NO_COMMENTS | GTK_IMHTML_NO_SCROLL); | |
| 2117 gtk_imhtml_append_text(GTK_IMHTML(away_text), "<BR>", -1, GTK_IMHTML_NO_TITLE | | |
| 2118 GTK_IMHTML_NO_COMMENTS | GTK_IMHTML_NO_SCROLL); | |
| 2119 g_free(tmp); | |
| 2120 g_value_unset (&val); | |
| 2121 | |
| 2122 } | |
| 2123 | |
| 2124 void remove_away_message(GtkWidget *widget, GtkTreeView *tv) { | |
| 2125 struct away_message *am; | |
| 2126 GtkTreeIter iter; | |
| 2127 GtkTreeSelection *sel = gtk_tree_view_get_selection(tv); | |
| 2128 GtkTreeModel *model = GTK_TREE_MODEL(prefs_away_store); | |
| 2129 GValue val = { 0, }; | |
| 2130 | |
| 2131 if (! gtk_tree_selection_get_selected (sel, &model, &iter)) | |
| 2132 return; | |
| 2133 gtk_tree_model_get_value (GTK_TREE_MODEL(prefs_away_store), &iter, 1, &val); | |
| 2134 am = g_value_get_pointer (&val); | |
| 2135 gtk_imhtml_clear(GTK_IMHTML(away_text)); | |
| 2136 rem_away_mess(NULL, am); | |
| 2137 } | |
| 2138 | |
| 2139 GtkWidget *away_message_page() { | |
| 2140 GtkWidget *ret; | |
| 2141 GtkWidget *hbox; | |
| 2142 GtkWidget *button; | |
| 2143 GtkWidget *sw; | |
| 2144 GtkTreeIter iter; | |
| 2145 GtkWidget *event_view; | |
| 2146 GtkCellRenderer *rend; | |
| 2147 GtkTreeViewColumn *col; | |
| 2148 GtkTreeSelection *sel; | |
| 2149 GSList *awy = away_messages; | |
| 2150 struct away_message *a; | |
| 2151 GtkWidget *sw2; | |
| 2152 GtkSizeGroup *sg; | |
| 2153 | |
| 2154 ret = gtk_vbox_new(FALSE, 18); | |
| 2155 gtk_container_set_border_width (GTK_CONTAINER (ret), 12); | |
| 2156 | |
| 2157 sg = gtk_size_group_new(GTK_SIZE_GROUP_BOTH); | |
| 2158 | |
| 2159 sw = gtk_scrolled_window_new(NULL,NULL); | |
| 2160 away_text = gtk_imhtml_new(NULL, NULL); | |
| 2161 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS); | |
| 2162 /* | |
| 2163 gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_IN); | |
| 2164 */ | |
| 2165 gtk_box_pack_start(GTK_BOX(ret), sw, TRUE, TRUE, 0); | |
| 2166 | |
| 2167 prefs_away_store = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_POINTER); | |
| 2168 while (awy) { | |
| 2169 a = (struct away_message *)awy->data; | |
| 2170 gtk_list_store_append (prefs_away_store, &iter); | |
| 2171 gtk_list_store_set(prefs_away_store, &iter, | |
| 2172 0, a->name, | |
| 2173 1, a, -1); | |
| 2174 awy = awy->next; | |
| 2175 } | |
| 2176 event_view = gtk_tree_view_new_with_model (GTK_TREE_MODEL(prefs_away_store)); | |
| 2177 | |
| 2178 | |
| 2179 rend = gtk_cell_renderer_text_new(); | |
| 2180 col = gtk_tree_view_column_new_with_attributes ("NULL", | |
| 2181 rend, | |
| 2182 "text", 0, | |
| 2183 NULL); | |
| 2184 gtk_tree_view_append_column (GTK_TREE_VIEW(event_view), col); | |
| 2185 gtk_tree_view_set_headers_visible (GTK_TREE_VIEW(event_view), FALSE); | |
| 2186 gtk_widget_show(event_view); | |
| 2187 gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(sw), event_view); | |
| 2188 | |
| 2189 sw2 = gtk_scrolled_window_new(NULL, NULL); | |
| 2190 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw2), | |
| 2191 GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS); | |
| 2192 gtk_box_pack_start(GTK_BOX(ret), sw2, TRUE, TRUE, 0); | |
| 2193 | |
| 2194 gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(sw2), away_text); | |
| 2195 gaim_setup_imhtml(away_text); | |
| 2196 sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (event_view)); | |
| 2197 g_signal_connect (G_OBJECT (sel), "changed", | |
| 2198 G_CALLBACK (away_message_sel), | |
| 2199 NULL); | |
| 2200 hbox = gtk_hbox_new(TRUE, 5); | |
| 2201 gtk_box_pack_start(GTK_BOX(ret), hbox, FALSE, FALSE, 0); | |
| 2202 button = gtk_button_new_from_stock (GTK_STOCK_ADD); | |
| 2203 gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0); | |
| 2204 gtk_size_group_add_widget(sg, button); | |
| 2205 g_signal_connect(G_OBJECT(button), "clicked", | |
| 2206 G_CALLBACK(create_away_mess), NULL); | |
| 2207 | |
| 2208 button = gtk_button_new_from_stock (GTK_STOCK_REMOVE); | |
| 2209 gtk_size_group_add_widget(sg, button); | |
| 2210 g_signal_connect(G_OBJECT(button), "clicked", | |
| 2211 G_CALLBACK(remove_away_message), event_view); | |
| 2212 | |
| 2213 gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0); | |
| 2214 | |
| 2215 button = gaim_pixbuf_button_from_stock(_("_Edit"), GAIM_STOCK_EDIT, GAIM_BUTTON_HORIZONTAL); | |
| 2216 gtk_size_group_add_widget(sg, button); | |
| 2217 g_signal_connect(G_OBJECT(button), "clicked", | |
| 2218 G_CALLBACK(create_away_mess), event_view); | |
| 2219 gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0); | |
| 2220 | |
| 2221 gtk_widget_show_all(ret); | |
| 2222 return ret; | |
| 2223 } | |
| 2224 | |
| 2225 GtkTreeIter *prefs_notebook_add_page(const char *text, | |
| 2226 GdkPixbuf *pixbuf, | |
| 2227 GtkWidget *page, | |
| 2228 GtkTreeIter *iter, | |
| 2229 GtkTreeIter *parent, | |
| 2230 int ind) { | |
| 2231 GdkPixbuf *icon = NULL; | |
| 2232 | |
| 2233 if (pixbuf) | |
| 2234 icon = gdk_pixbuf_scale_simple (pixbuf, 18, 18, GDK_INTERP_BILINEAR); | |
| 2235 | |
| 2236 gtk_tree_store_append (prefstree, iter, parent); | |
| 2237 gtk_tree_store_set (prefstree, iter, 0, icon, 1, text, 2, ind, -1); | |
| 2238 | |
| 2239 if (pixbuf) | |
| 2240 g_object_unref(pixbuf); | |
| 2241 if (icon) | |
| 2242 g_object_unref(icon); | |
| 2243 gtk_notebook_append_page(GTK_NOTEBOOK(prefsnotebook), page, gtk_label_new(text)); | |
| 2244 return iter; | |
| 2245 } | |
| 2246 | |
| 2247 void prefs_notebook_init() { | |
| 2248 GtkTreeIter p, p2, c; | |
| 2249 GList *l; | |
| 2250 GaimPlugin *plug; | |
| 2251 prefs_notebook_add_page(_("Interface"), NULL, interface_page(), &p, NULL, notebook_page++); | |
| 2252 prefs_notebook_add_page(_("Smiley Themes"), NULL, theme_page(), &c, &p, notebook_page++); | |
| 2253 prefs_notebook_add_page(_("Fonts"), NULL, font_page(), &c, &p, notebook_page++); | |
| 2254 prefs_notebook_add_page(_("Message Text"), NULL, messages_page(), &c, &p, notebook_page++); | |
| 2255 prefs_notebook_add_page(_("Shortcuts"), NULL, hotkeys_page(), &c, &p, notebook_page++); | |
| 2256 prefs_notebook_add_page(_("Buddy List"), NULL, list_page(), &c, &p, notebook_page++); | |
| 2257 prefs_notebook_add_page(_("Conversations"), NULL, conv_page(), &p2, NULL, notebook_page++); | |
| 2258 prefs_notebook_add_page(_("IMs"), NULL, im_page(), &c, &p2, notebook_page++); | |
| 2259 prefs_notebook_add_page(_("Chats"), NULL, chat_page(), &c, &p2, notebook_page++); | |
| 2260 prefs_notebook_add_page(_("Proxy"), NULL, proxy_page(), &p, NULL, notebook_page++); | |
| 2261 #ifndef _WIN32 | |
| 2262 /* We use the registered default browser in windows */ | |
| 2263 prefs_notebook_add_page(_("Browser"), NULL, browser_page(), &p, NULL, notebook_page++); | |
| 2264 #endif | |
| 2265 prefs_notebook_add_page(_("Logging"), NULL, logging_page(), &p, NULL, notebook_page++); | |
| 2266 prefs_notebook_add_page(_("Sounds"), NULL, sound_page(), &p, NULL, notebook_page++); | |
| 2267 prefs_notebook_add_page(_("Sound Events"), NULL, sound_events_page(), &c, &p, notebook_page++); | |
| 2268 prefs_notebook_add_page(_("Away / Idle"), NULL, away_page(), &p, NULL, notebook_page++); | |
| 2269 prefs_notebook_add_page(_("Away Messages"), NULL, away_message_page(), &c, &p, notebook_page++); | |
| 2270 | |
| 2271 if (gaim_plugins_enabled()) { | |
| 2272 prefs_notebook_add_page(_("Plugins"), NULL, plugin_page(), &plugin_iter, NULL, notebook_page++); | |
| 2273 | |
| 2274 for (l = gaim_plugins_get_loaded(); l != NULL; l = l->next) { | |
| 2275 plug = l->data; | |
| 2276 | |
| 2277 if (GAIM_IS_GTK_PLUGIN(plug)) { | |
| 2278 GtkWidget *config_frame; | |
| 2279 GaimGtkPluginUiInfo *ui_info; | |
| 2280 | |
| 2281 ui_info = GAIM_GTK_PLUGIN_UI_INFO(plug); | |
| 2282 config_frame = gaim_gtk_plugin_get_config_frame(plug); | |
| 2283 | |
| 2284 if (config_frame != NULL) { | |
| 2285 ui_info->iter = g_new0(GtkTreeIter, 1); | |
| 2286 prefs_notebook_add_page(_(plug->info->name), NULL, | |
| 2287 config_frame, ui_info->iter, | |
| 2288 &plugin_iter, notebook_page++); | |
| 2289 } | |
| 2290 } | |
| 2291 } | |
| 2292 } | |
| 2293 } | |
| 2294 | |
|
5530
2c4c975620f0
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5440
diff
changeset
|
2295 void gaim_gtk_prefs_show(void) |
| 5440 | 2296 { |
| 2297 GtkWidget *vbox, *vbox2; | |
| 2298 GtkWidget *hbox; | |
| 2299 GtkWidget *frame; | |
| 2300 GtkTreeViewColumn *column; | |
| 2301 GtkCellRenderer *cell; | |
| 2302 GtkTreeSelection *sel; | |
| 2303 GtkWidget *notebook; | |
| 2304 GtkWidget *sep; | |
| 2305 GtkWidget *button; | |
| 2306 GtkSizeGroup *sg = gtk_size_group_new(GTK_SIZE_GROUP_BOTH); | |
| 2307 | |
| 2308 if (prefs) { | |
| 2309 gtk_window_present(GTK_WINDOW(prefs)); | |
| 2310 return; | |
| 2311 } | |
| 2312 | |
| 2313 /* copy the preferences to tmp values... | |
| 2314 * I liked "take affect immediately" Oh well :-( */ | |
| 2315 | |
| 2316 /* Back to instant-apply! I win! BU-HAHAHA! */ | |
| 2317 | |
| 2318 /* Create the window */ | |
| 2319 prefs = gtk_window_new(GTK_WINDOW_TOPLEVEL); | |
| 2320 gtk_window_set_role(GTK_WINDOW(prefs), "preferences"); | |
| 2321 gtk_widget_realize(prefs); | |
| 2322 gtk_window_set_title(GTK_WINDOW(prefs), _("Preferences")); | |
| 2323 gtk_window_set_resizable (GTK_WINDOW(prefs), FALSE); | |
| 2324 g_signal_connect(G_OBJECT(prefs), "destroy", | |
| 2325 G_CALLBACK(delete_prefs), NULL); | |
| 2326 | |
| 2327 vbox = gtk_vbox_new(FALSE, 5); | |
| 2328 gtk_container_set_border_width(GTK_CONTAINER(vbox), 5); | |
| 2329 gtk_container_add(GTK_CONTAINER(prefs), vbox); | |
| 2330 gtk_widget_show(vbox); | |
| 2331 | |
| 2332 hbox = gtk_hbox_new (FALSE, 6); | |
| 2333 gtk_container_set_border_width (GTK_CONTAINER (hbox), 6); | |
| 2334 gtk_container_add (GTK_CONTAINER(vbox), hbox); | |
| 2335 gtk_widget_show (hbox); | |
| 2336 | |
| 2337 frame = gtk_frame_new (NULL); | |
| 2338 gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN); | |
| 2339 gtk_box_pack_start (GTK_BOX (hbox), frame, FALSE, FALSE, 0); | |
| 2340 gtk_widget_show (frame); | |
| 2341 | |
| 2342 /* The tree -- much inspired by the Gimp */ | |
| 2343 prefstree = gtk_tree_store_new (3, GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_INT); | |
| 2344 tree_v = gtk_tree_view_new_with_model (GTK_TREE_MODEL (prefstree)); | |
| 2345 gtk_container_add (GTK_CONTAINER (frame), tree_v); | |
| 2346 | |
| 2347 gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (tree_v), FALSE); | |
| 2348 gtk_widget_show(tree_v); | |
| 2349 /* icons */ | |
| 2350 /* XXX: to be used at a later date | |
| 2351 cell = gtk_cell_renderer_pixbuf_new (); | |
| 2352 column = gtk_tree_view_column_new_with_attributes ("icons", cell, "pixbuf", 0, NULL); | |
| 2353 */ | |
| 2354 | |
| 2355 /* text */ | |
| 2356 cell = gtk_cell_renderer_text_new (); | |
| 2357 column = gtk_tree_view_column_new_with_attributes ("text", cell, "text", 1, NULL); | |
| 2358 | |
| 2359 gtk_tree_view_append_column (GTK_TREE_VIEW (tree_v), column); | |
| 2360 | |
| 2361 /* The right side */ | |
| 2362 frame = gtk_frame_new (NULL); | |
| 2363 gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN); | |
| 2364 gtk_box_pack_start (GTK_BOX (hbox), frame, TRUE, TRUE, 0); | |
| 2365 gtk_widget_show (frame); | |
| 2366 | |
| 2367 vbox2 = gtk_vbox_new (FALSE, 4); | |
| 2368 gtk_container_add (GTK_CONTAINER (frame), vbox2); | |
| 2369 gtk_widget_show (vbox2); | |
| 2370 | |
| 2371 frame = gtk_frame_new (NULL); | |
| 2372 gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_OUT); | |
| 2373 gtk_box_pack_start (GTK_BOX (vbox2), frame, FALSE, TRUE, 0); | |
| 2374 gtk_widget_show (frame); | |
| 2375 | |
| 2376 hbox = gtk_hbox_new (FALSE, 4); | |
| 2377 gtk_container_set_border_width (GTK_CONTAINER (hbox), 4); | |
| 2378 gtk_container_add (GTK_CONTAINER (frame), hbox); | |
| 2379 gtk_widget_show (hbox); | |
| 2380 | |
| 2381 preflabel = gtk_label_new(NULL); | |
| 2382 gtk_box_pack_end (GTK_BOX (hbox), preflabel, FALSE, FALSE, 0); | |
| 2383 gtk_widget_show (preflabel); | |
| 2384 | |
| 2385 /* The notebook */ | |
| 2386 prefsnotebook = notebook = gtk_notebook_new (); | |
| 2387 gtk_notebook_set_show_tabs (GTK_NOTEBOOK (notebook), FALSE); | |
| 2388 gtk_notebook_set_show_border (GTK_NOTEBOOK (notebook), FALSE); | |
| 2389 gtk_box_pack_start (GTK_BOX (vbox2), notebook, FALSE, FALSE, 0); | |
| 2390 | |
| 2391 sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (tree_v)); | |
| 2392 g_signal_connect (G_OBJECT (sel), "changed", | |
| 2393 G_CALLBACK (pref_nb_select), | |
| 2394 notebook); | |
| 2395 gtk_widget_show(notebook); | |
| 2396 sep = gtk_hseparator_new(); | |
| 2397 gtk_widget_show(sep); | |
| 2398 gtk_box_pack_start (GTK_BOX (vbox), sep, FALSE, FALSE, 0); | |
| 2399 | |
| 2400 /* The buttons^H to press! */ | |
| 2401 hbox = gtk_hbox_new (FALSE, 6); | |
| 2402 gtk_container_set_border_width (GTK_CONTAINER (hbox), 6); | |
| 2403 gtk_container_add (GTK_CONTAINER(vbox), hbox); | |
| 2404 gtk_widget_show (hbox); | |
| 2405 | |
| 2406 button = gtk_button_new_from_stock (GTK_STOCK_CLOSE); | |
| 2407 gtk_size_group_add_widget(sg, button); | |
| 2408 g_signal_connect_swapped(G_OBJECT(button), "clicked", | |
| 2409 G_CALLBACK(gtk_widget_destroy), prefs); | |
| 2410 gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); | |
| 2411 gtk_widget_show(button); | |
| 2412 | |
| 2413 prefs_notebook_init(); | |
| 2414 | |
|
5568
fb4f7bd7525c
[gaim-migrate @ 5970]
Christian Hammond <chipx86@chipx86.com>
parents:
5567
diff
changeset
|
2415 /* Show everything. */ |
| 5440 | 2416 gtk_tree_view_expand_all (GTK_TREE_VIEW(tree_v)); |
| 2417 gtk_widget_show(prefs); | |
| 2418 } | |
| 2419 | |
|
5551
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
2420 #if 0 |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
2421 static void set_misc_option(GtkWidget *w, const char *key) |
| 5440 | 2422 { |
| 2423 | |
| 5535 | 2424 if(option == OPT_MISC_USE_SERVER_ALIAS) { |
| 5440 | 2425 /* XXX blist reset the aliases here */ |
| 2426 gaim_conversation_foreach(gaim_conversation_autoset_title); | |
| 2427 } | |
| 2428 } | |
| 2429 | |
| 2430 static void set_logging_option(GtkWidget *w, int option) | |
| 2431 { | |
| 2432 logging_options ^= option; | |
| 2433 | |
| 2434 if (option == OPT_LOG_CONVOS || option == OPT_LOG_CHATS) | |
| 2435 update_log_convs(); | |
| 2436 } | |
| 2437 | |
| 2438 static void set_blist_option(GtkWidget *w, int option) | |
| 2439 { | |
| 2440 struct gaim_gtk_buddy_list *gtkblist; | |
| 2441 | |
| 2442 gtkblist = GAIM_GTK_BLIST(gaim_get_blist()); | |
| 2443 | |
| 2444 blist_options ^= option; | |
| 2445 | |
| 2446 if (!gtkblist) | |
| 2447 return; | |
| 2448 | |
| 2449 if (option == OPT_BLIST_SHOW_WARN) | |
| 2450 gaim_gtk_blist_update_columns(); | |
| 2451 else if (option == OPT_BLIST_SHOW_IDLETIME) { | |
| 2452 gaim_gtk_blist_update_refresh_timeout(); | |
| 2453 gaim_gtk_blist_update_columns(); | |
| 2454 } | |
| 2455 else if (option == OPT_BLIST_SHOW_ICONS) { | |
| 2456 gaim_gtk_blist_update_refresh_timeout(); | |
| 2457 gaim_gtk_blist_refresh(gaim_get_blist()); | |
| 2458 gaim_gtk_blist_update_columns(); | |
| 2459 } else | |
| 2460 gaim_gtk_blist_refresh(gaim_get_blist()); | |
| 2461 | |
| 2462 } | |
| 2463 | |
| 2464 static void set_convo_option(GtkWidget *w, int option) | |
| 2465 { | |
| 2466 convo_options ^= option; | |
| 2467 | |
| 2468 if (option == OPT_CONVO_SHOW_SMILEY) | |
| 2469 gaim_gtkconv_toggle_smileys(); | |
| 2470 | |
| 2471 if (option == OPT_CONVO_SHOW_TIME) | |
| 2472 gaim_gtkconv_toggle_timestamps(); | |
| 2473 | |
| 2474 if (option == OPT_CONVO_CHECK_SPELLING) | |
| 2475 gaim_gtkconv_toggle_spellchk(); | |
| 2476 | |
| 2477 if (option == OPT_CONVO_NO_X_ON_TAB) | |
| 2478 gaim_gtkconv_toggle_close_buttons(); | |
| 2479 } | |
| 2480 | |
| 2481 static void set_im_option(GtkWidget *w, int option) | |
| 2482 { | |
| 2483 im_options ^= option; | |
| 2484 | |
| 2485 #if 0 | |
| 2486 if (option == OPT_IM_ONE_WINDOW) | |
| 2487 im_tabize(); | |
| 2488 #endif | |
| 2489 | |
| 2490 if (option == OPT_IM_HIDE_ICONS) | |
| 2491 gaim_gtkconv_hide_buddy_icons(); | |
| 2492 | |
| 2493 if (option == OPT_IM_ALIAS_TAB) | |
| 2494 gaim_conversation_foreach(gaim_conversation_autoset_title); | |
| 2495 | |
| 2496 if (option == OPT_IM_NO_ANIMATION) | |
| 2497 gaim_gtkconv_set_anim(); | |
| 2498 } | |
| 2499 | |
| 2500 static void set_chat_option(GtkWidget *w, int option) | |
| 2501 { | |
| 2502 chat_options ^= option; | |
| 2503 | |
| 2504 #if 0 | |
| 2505 if (option == OPT_CHAT_ONE_WINDOW) | |
| 2506 chat_tabize(); | |
| 2507 #endif | |
| 2508 } | |
| 2509 | |
| 2510 void set_sound_option(GtkWidget *w, int option) | |
| 2511 { | |
| 2512 sound_options ^= option; | |
| 2513 } | |
| 2514 | |
| 2515 static void set_away_option(GtkWidget *w, int option) | |
| 2516 { | |
| 2517 away_options ^= option; | |
| 2518 | |
| 2519 if (option == OPT_AWAY_QUEUE) | |
| 2520 toggle_away_queue(); | |
| 2521 } | |
|
5551
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
2522 #endif |
| 5440 | 2523 |
|
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
2524 static void |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
2525 set_bool_pref(GtkWidget *w, const char *key) |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
2526 { |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
2527 gaim_prefs_set_bool(key, |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
2528 gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w))); |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
2529 } |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
2530 |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
2531 static GtkWidget * |
|
5551
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
2532 prefs_checkbox(const char *text, const char *key, GtkWidget *page) |
| 5440 | 2533 { |
| 2534 GtkWidget *button; | |
|
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
2535 |
| 5440 | 2536 button = gtk_check_button_new_with_mnemonic(text); |
|
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
2537 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
2538 gaim_prefs_get_bool(key)); |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
2539 |
| 5440 | 2540 gtk_box_pack_start(GTK_BOX(page), button, FALSE, FALSE, 0); |
|
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
2541 |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
2542 g_signal_connect(G_OBJECT(button), "clicked", |
|
5551
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
2543 G_CALLBACK(set_bool_pref), (char *)key); |
|
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
2544 |
| 5440 | 2545 gtk_widget_show(button); |
| 2546 | |
| 2547 return button; | |
| 2548 } | |
| 2549 | |
| 2550 void default_away_menu_init(GtkWidget *omenu) | |
| 2551 { | |
| 2552 GtkWidget *menu, *opt; | |
| 2553 int index = 0; | |
| 2554 GSList *awy = away_messages; | |
| 2555 struct away_message *a; | |
| 2556 | |
| 2557 menu = gtk_menu_new(); | |
| 2558 | |
| 2559 while (awy) { | |
| 2560 a = (struct away_message *)awy->data; | |
| 2561 opt = gtk_menu_item_new_with_label(a->name); | |
| 2562 g_signal_connect(G_OBJECT(opt), "activate", | |
| 2563 G_CALLBACK(set_default_away), (gpointer)index); | |
| 2564 gtk_widget_show(opt); | |
| 2565 gtk_menu_shell_append(GTK_MENU_SHELL(menu), opt); | |
| 2566 | |
| 2567 awy = awy->next; | |
| 2568 index++; | |
| 2569 } | |
| 2570 | |
| 2571 gtk_option_menu_remove_menu(GTK_OPTION_MENU(omenu)); | |
| 2572 gtk_option_menu_set_menu(GTK_OPTION_MENU(omenu), menu); | |
| 2573 gtk_option_menu_set_history(GTK_OPTION_MENU(omenu), g_slist_index(away_messages, default_away)); | |
| 2574 } | |
| 2575 | |
| 2576 GtkWidget *pref_fg_picture = NULL; | |
| 2577 GtkWidget *pref_bg_picture = NULL; | |
| 2578 | |
| 2579 void destroy_colorsel(GtkWidget *w, gpointer d) | |
| 2580 { | |
| 2581 if (d) { | |
| 2582 gtk_widget_destroy(fgcseld); | |
| 2583 fgcseld = NULL; | |
| 2584 } else { | |
| 2585 gtk_widget_destroy(bgcseld); | |
| 2586 bgcseld = NULL; | |
| 2587 } | |
| 2588 } | |
| 2589 | |
| 2590 void apply_color_dlg(GtkWidget *w, gpointer d) | |
| 2591 { | |
| 5671 | 2592 char buf[14]; |
|
5551
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
2593 |
| 5440 | 2594 if ((int)d == 1) { |
|
5551
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
2595 GdkColor fgcolor; |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
2596 |
| 5440 | 2597 gtk_color_selection_get_current_color(GTK_COLOR_SELECTION |
| 2598 (GTK_COLOR_SELECTION_DIALOG(fgcseld)->colorsel), | |
| 2599 &fgcolor); | |
|
5551
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
2600 |
| 5671 | 2601 g_snprintf(buf, sizeof(buf), "#%04x%04x%04x", |
|
5551
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
2602 fgcolor.red, fgcolor.green, fgcolor.blue); |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
2603 |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
2604 gaim_prefs_set_string("/gaim/gtk/conversations/fgcolor", buf); |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
2605 |
| 5440 | 2606 destroy_colorsel(NULL, (void *)1); |
| 2607 update_color(NULL, pref_fg_picture); | |
| 2608 } else { | |
|
5551
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
2609 GdkColor bgcolor; |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
2610 |
| 5440 | 2611 gtk_color_selection_get_current_color(GTK_COLOR_SELECTION |
| 2612 (GTK_COLOR_SELECTION_DIALOG(bgcseld)->colorsel), | |
| 2613 &bgcolor); | |
|
5551
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
2614 |
| 5671 | 2615 g_snprintf(buf, sizeof(buf), "#%04x%04x%04x", |
|
5551
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
2616 bgcolor.red, bgcolor.green, bgcolor.blue); |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
2617 |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
2618 gaim_prefs_set_string("/gaim/gtk/conversations/bgcolor", buf); |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
2619 |
| 5440 | 2620 destroy_colorsel(NULL, (void *)0); |
| 2621 update_color(NULL, pref_bg_picture); | |
| 2622 } | |
| 2623 gaim_conversation_foreach(gaim_gtkconv_update_font_colors); | |
| 2624 } | |
| 2625 | |
| 2626 void set_default_away(GtkWidget *w, gpointer i) | |
| 2627 { | |
| 2628 | |
| 2629 int length = g_slist_length(away_messages); | |
| 2630 | |
| 2631 if (away_messages == NULL) | |
| 2632 default_away = NULL; | |
| 2633 else if ((int)i >= length) | |
| 2634 default_away = g_slist_nth_data(away_messages, length - 1); | |
| 2635 else | |
| 2636 default_away = g_slist_nth_data(away_messages, (int)i); | |
| 2637 } | |
| 2638 | |
| 2639 #ifndef _WIN32 | |
| 2640 static gboolean program_is_valid(const char *program) | |
| 2641 { | |
| 2642 GError *error = NULL; | |
| 2643 char **argv; | |
| 2644 gchar *progname; | |
| 2645 gboolean is_valid = FALSE; | |
| 2646 | |
| 2647 if (program == NULL || *program == '\0') { | |
| 2648 return FALSE; | |
| 2649 } | |
| 2650 | |
| 2651 if (!g_shell_parse_argv(program, NULL, &argv, &error)) { | |
| 2652 gaim_debug(GAIM_DEBUG_ERROR, "program_is_valid", | |
| 2653 "Could not parse program '%s': %s\n", | |
| 2654 program, error->message); | |
| 2655 g_error_free(error); | |
| 2656 return FALSE; | |
| 2657 } | |
| 2658 | |
| 2659 if (argv == NULL) { | |
| 2660 return FALSE; | |
| 2661 } | |
| 2662 | |
| 2663 progname = g_find_program_in_path(argv[0]); | |
| 2664 is_valid = (progname != NULL); | |
| 2665 | |
| 2666 g_strfreev(argv); | |
| 2667 g_free(progname); | |
| 2668 | |
| 2669 return is_valid; | |
| 2670 } | |
| 2671 #endif | |
| 2672 | |
| 2673 static GtkWidget *show_color_pref(GtkWidget *box, gboolean fgc) | |
| 2674 { | |
| 2675 /* more stuff stolen from X-Chat */ | |
| 2676 GtkWidget *swid; | |
| 2677 GdkColor c; | |
| 2678 GtkStyle *style; | |
| 2679 c.pixel = 0; | |
|
5551
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
2680 |
| 5440 | 2681 if (fgc) { |
|
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
2682 if (gaim_prefs_get_bool("/gaim/gtk/conversations/use_custom_fgcolor")) { |
|
5551
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
2683 GdkColor fgcolor; |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
2684 |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
2685 gdk_color_parse( |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
2686 gaim_prefs_get_string("/gaim/gtk/conversations/fgcolor"), |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
2687 &fgcolor); |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
2688 |
| 5440 | 2689 c.red = fgcolor.red; |
| 2690 c.blue = fgcolor.blue; | |
| 2691 c.green = fgcolor.green; | |
| 2692 } else { | |
| 2693 c.red = 0; | |
| 2694 c.blue = 0; | |
| 2695 c.green = 0; | |
| 2696 } | |
| 2697 } else { | |
|
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
2698 if (gaim_prefs_get_bool("/gaim/gtk/conversations/use_custom_bgcolor")) { |
|
5551
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
2699 GdkColor bgcolor; |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
2700 |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
2701 gdk_color_parse( |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
2702 gaim_prefs_get_string("/gaim/gtk/conversations/bgcolor"), |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
2703 &bgcolor); |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
2704 |
| 5440 | 2705 c.red = bgcolor.red; |
| 2706 c.blue = bgcolor.blue; | |
| 2707 c.green = bgcolor.green; | |
| 2708 } else { | |
| 2709 c.red = 0xffff; | |
| 2710 c.blue = 0xffff; | |
| 2711 c.green = 0xffff; | |
| 2712 } | |
| 2713 } | |
| 2714 | |
| 2715 style = gtk_style_new(); | |
| 2716 style->bg[0] = c; | |
| 2717 | |
| 2718 swid = gtk_event_box_new(); | |
| 2719 gtk_widget_set_style(GTK_WIDGET(swid), style); | |
| 2720 g_object_unref(style); | |
| 2721 gtk_widget_set_size_request(GTK_WIDGET(swid), 40, -1); | |
| 2722 gtk_box_pack_start(GTK_BOX(box), swid, FALSE, FALSE, 5); | |
| 2723 gtk_widget_show(swid); | |
| 2724 return swid; | |
| 2725 } | |
| 2726 | |
| 2727 void apply_font_dlg(GtkWidget *w, GtkWidget *f) | |
| 2728 { | |
|
5551
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
2729 char *fontname, *c; |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
2730 |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
2731 fontname = |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
2732 gtk_font_selection_dialog_get_font_name(GTK_FONT_SELECTION_DIALOG(f)); |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
2733 |
| 5440 | 2734 destroy_fontsel(0, 0); |
| 2735 | |
|
5551
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
2736 for (c = fontname; *c != '\0'; c++) { |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
2737 if (isdigit(*c)) { |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
2738 *(--c) = '\0'; |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
2739 break; |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
2740 } |
| 5440 | 2741 } |
| 2742 | |
|
5551
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
2743 gaim_prefs_set_string("/gaim/gtk/conversations/font_face", fontname); |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
2744 |
| 5440 | 2745 g_free(fontname); |
| 2746 | |
| 2747 gaim_conversation_foreach(gaim_gtkconv_update_font_face); | |
| 2748 } | |
| 2749 | |
|
5530
2c4c975620f0
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5440
diff
changeset
|
2750 void |
|
2c4c975620f0
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5440
diff
changeset
|
2751 gaim_gtk_prefs_init(void) |
|
2c4c975620f0
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5440
diff
changeset
|
2752 { |
|
2c4c975620f0
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5440
diff
changeset
|
2753 gaim_prefs_add_none("/gaim"); |
|
2c4c975620f0
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5440
diff
changeset
|
2754 gaim_prefs_add_none("/gaim/gtk"); |
|
5550
b18c2a37cc96
[gaim-migrate @ 5951]
Christian Hammond <chipx86@chipx86.com>
parents:
5547
diff
changeset
|
2755 gaim_prefs_add_none("/plugins/gtk"); |
|
b18c2a37cc96
[gaim-migrate @ 5951]
Christian Hammond <chipx86@chipx86.com>
parents:
5547
diff
changeset
|
2756 |
|
b18c2a37cc96
[gaim-migrate @ 5951]
Christian Hammond <chipx86@chipx86.com>
parents:
5547
diff
changeset
|
2757 /* XXX Move this! HACK! :( Aww... */ |
|
b18c2a37cc96
[gaim-migrate @ 5951]
Christian Hammond <chipx86@chipx86.com>
parents:
5547
diff
changeset
|
2758 gaim_prefs_add_none("/plugins/gtk/docklet"); |
|
5554
7b36d02031a2
[gaim-migrate @ 5955]
Christian Hammond <chipx86@chipx86.com>
parents:
5551
diff
changeset
|
2759 gaim_prefs_add_bool("/plugins/gtk/docklet/queue_messages", FALSE); |
|
5530
2c4c975620f0
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5440
diff
changeset
|
2760 |
|
5563
9eb5b13fd412
[gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
5560
diff
changeset
|
2761 /* Accounts Dialog */ |
|
5567
cc9ddec20010
[gaim-migrate @ 5969]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
2762 gaim_prefs_add_none("/gaim/gtk/accounts"); |
|
cc9ddec20010
[gaim-migrate @ 5969]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
2763 gaim_prefs_add_none("/gaim/gtk/accounts/dialog"); |
|
5563
9eb5b13fd412
[gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
5560
diff
changeset
|
2764 gaim_prefs_add_int("/gaim/gtk/accounts/dialog/width", 550); |
|
9eb5b13fd412
[gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
5560
diff
changeset
|
2765 gaim_prefs_add_int("/gaim/gtk/accounts/dialog/height", 250); |
|
9eb5b13fd412
[gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
5560
diff
changeset
|
2766 |
|
5573
5e7de337a053
[gaim-migrate @ 5976]
Christian Hammond <chipx86@chipx86.com>
parents:
5568
diff
changeset
|
2767 /* Away Queueing */ |
|
5e7de337a053
[gaim-migrate @ 5976]
Christian Hammond <chipx86@chipx86.com>
parents:
5568
diff
changeset
|
2768 gaim_prefs_add_none("/gaim/gtk/away"); |
|
5e7de337a053
[gaim-migrate @ 5976]
Christian Hammond <chipx86@chipx86.com>
parents:
5568
diff
changeset
|
2769 gaim_prefs_add_bool("/gaim/gtk/away/queue_messages", FALSE); |
|
5e7de337a053
[gaim-migrate @ 5976]
Christian Hammond <chipx86@chipx86.com>
parents:
5568
diff
changeset
|
2770 |
|
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
2771 /* Browsers */ |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
2772 gaim_prefs_add_none("/gaim/gtk/browsers"); |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
2773 gaim_prefs_add_bool("/gaim/gtk/browsers/new_window", FALSE); |
|
5560
b7319c094153
[gaim-migrate @ 5961]
Christian Hammond <chipx86@chipx86.com>
parents:
5554
diff
changeset
|
2774 gaim_prefs_add_string("/gaim/gtk/browsers/command", ""); |
|
5546
22cf337e8b8f
[gaim-migrate @ 5947]
Christian Hammond <chipx86@chipx86.com>
parents:
5545
diff
changeset
|
2775 gaim_prefs_add_string("/gaim/gtk/browsers/browser", "mozilla"); |
|
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
2776 |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
2777 /* Buddy List */ |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
2778 gaim_prefs_add_none("/gaim/gtk/blist"); |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
2779 gaim_prefs_add_int("/gaim/gtk/blist/button_style", GAIM_BUTTON_TEXT_IMAGE); |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
2780 gaim_prefs_add_bool("/gaim/gtk/blist/grey_idle_buddies", TRUE); |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
2781 gaim_prefs_add_bool("/gaim/gtk/blist/raise_on_events", FALSE); |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
2782 gaim_prefs_add_bool("/gaim/gtk/blist/show_buddy_icons", TRUE); |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
2783 gaim_prefs_add_bool("/gaim/gtk/blist/show_empty_groups", FALSE); |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
2784 gaim_prefs_add_bool("/gaim/gtk/blist/show_group_count", TRUE); |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
2785 gaim_prefs_add_bool("/gaim/gtk/blist/show_idle_time", TRUE); |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
2786 gaim_prefs_add_bool("/gaim/gtk/blist/show_offline_buddies", FALSE); |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
2787 gaim_prefs_add_bool("/gaim/gtk/blist/show_warning_level", TRUE); |
|
5546
22cf337e8b8f
[gaim-migrate @ 5947]
Christian Hammond <chipx86@chipx86.com>
parents:
5545
diff
changeset
|
2788 gaim_prefs_add_string("/gaim/gtk/blist/sort_type", ""); |
|
5560
b7319c094153
[gaim-migrate @ 5961]
Christian Hammond <chipx86@chipx86.com>
parents:
5554
diff
changeset
|
2789 gaim_prefs_add_int("/gaim/gtk/blist/x", 0); |
|
b7319c094153
[gaim-migrate @ 5961]
Christian Hammond <chipx86@chipx86.com>
parents:
5554
diff
changeset
|
2790 gaim_prefs_add_int("/gaim/gtk/blist/y", 0); |
|
b7319c094153
[gaim-migrate @ 5961]
Christian Hammond <chipx86@chipx86.com>
parents:
5554
diff
changeset
|
2791 gaim_prefs_add_int("/gaim/gtk/blist/width", 0); |
|
b7319c094153
[gaim-migrate @ 5961]
Christian Hammond <chipx86@chipx86.com>
parents:
5554
diff
changeset
|
2792 gaim_prefs_add_int("/gaim/gtk/blist/height", 0); |
|
5539
de09863bd4b5
[gaim-migrate @ 5939]
Christian Hammond <chipx86@chipx86.com>
parents:
5535
diff
changeset
|
2793 |
|
5550
b18c2a37cc96
[gaim-migrate @ 5951]
Christian Hammond <chipx86@chipx86.com>
parents:
5547
diff
changeset
|
2794 /* Idle */ |
|
b18c2a37cc96
[gaim-migrate @ 5951]
Christian Hammond <chipx86@chipx86.com>
parents:
5547
diff
changeset
|
2795 gaim_prefs_add_none("/gaim/gtk/idle"); |
|
b18c2a37cc96
[gaim-migrate @ 5951]
Christian Hammond <chipx86@chipx86.com>
parents:
5547
diff
changeset
|
2796 gaim_prefs_add_string("/gaim/gtk/idle/reporting_method", "system"); |
|
b18c2a37cc96
[gaim-migrate @ 5951]
Christian Hammond <chipx86@chipx86.com>
parents:
5547
diff
changeset
|
2797 |
|
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
2798 /* Logging */ |
|
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
2799 gaim_prefs_add_none("/gaim/gtk/logging"); |
|
5551
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
2800 gaim_prefs_add_bool("/gaim/gtk/logging/log_ims", TRUE); |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
2801 gaim_prefs_add_bool("/gaim/gtk/logging/log_chats", TRUE); |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
2802 gaim_prefs_add_bool("/gaim/gtk/logging/strip_html", TRUE); |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
2803 gaim_prefs_add_bool("/gaim/gtk/logging/log_signon_signoff", TRUE); |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
2804 gaim_prefs_add_bool("/gaim/gtk/logging/log_idle_state", TRUE); |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
2805 gaim_prefs_add_bool("/gaim/gtk/logging/log_away_state", TRUE); |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
2806 gaim_prefs_add_bool("/gaim/gtk/logging/log_own_states", TRUE); |
|
51699de873af
[gaim-migrate @ 5952]
Christian Hammond <chipx86@chipx86.com>
parents:
5550
diff
changeset
|
2807 gaim_prefs_add_bool("/gaim/gtk/logging/individual_logs", FALSE); |
|
5539
de09863bd4b5
[gaim-migrate @ 5939]
Christian Hammond <chipx86@chipx86.com>
parents:
5535
diff
changeset
|
2808 |
|
de09863bd4b5
[gaim-migrate @ 5939]
Christian Hammond <chipx86@chipx86.com>
parents:
5535
diff
changeset
|
2809 /* Smiley Themes */ |
|
5546
22cf337e8b8f
[gaim-migrate @ 5947]
Christian Hammond <chipx86@chipx86.com>
parents:
5545
diff
changeset
|
2810 gaim_prefs_add_none("/gaim/gtk/smileys"); |
|
22cf337e8b8f
[gaim-migrate @ 5947]
Christian Hammond <chipx86@chipx86.com>
parents:
5545
diff
changeset
|
2811 gaim_prefs_add_string("/gaim/gtk/smileys/theme", ""); |
|
5545
7a64114641c3
[gaim-migrate @ 5946]
Christian Hammond <chipx86@chipx86.com>
parents:
5539
diff
changeset
|
2812 |
|
5530
2c4c975620f0
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5440
diff
changeset
|
2813 } |
|
2c4c975620f0
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5440
diff
changeset
|
2814 |
