Mercurial > pidgin.yaz
annotate src/prefs.c @ 992:09dd5725945c
[gaim-migrate @ 1002]
what a stupid bug this turned out to be. thanks to ari pollak for pointing out my stupidity
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Fri, 13 Oct 2000 21:36:46 +0000 |
parents | ca8f1d02630a |
children | 1d8f05ea6bdf |
rev | line source |
---|---|
1 | 1 /* |
2 * gaim | |
3 * | |
4 * Copyright (C) 1998-1999, Mark Spencer <markster@marko.net> | |
5 * | |
6 * This program is free software; you can redistribute it and/or modify | |
7 * it under the terms of the GNU General Public License as published by | |
8 * the Free Software Foundation; either version 2 of the License, or | |
9 * (at your option) any later version. | |
10 * | |
11 * This program is distributed in the hope that it will be useful, | |
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 * GNU General Public License for more details. | |
15 * | |
16 * You should have received a copy of the GNU General Public License | |
17 * along with this program; if not, write to the Free Software | |
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
19 * | |
20 */ | |
21 | |
349
b402a23f35df
[gaim-migrate @ 359]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
340
diff
changeset
|
22 #ifdef HAVE_CONFIG_H |
b402a23f35df
[gaim-migrate @ 359]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
340
diff
changeset
|
23 #include "../config.h" |
b402a23f35df
[gaim-migrate @ 359]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
340
diff
changeset
|
24 #endif |
1 | 25 #include <string.h> |
26 #include <sys/time.h> | |
27 | |
28 #include <sys/types.h> | |
29 #include <sys/stat.h> | |
30 | |
31 #include <unistd.h> | |
32 #include <stdio.h> | |
33 #include <stdlib.h> | |
970 | 34 #include <stdarg.h> |
1 | 35 #include <gtk/gtk.h> |
36 #include "gaim.h" | |
37 #include "proxy.h" | |
411
a330017b3aa4
[gaim-migrate @ 421]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
378
diff
changeset
|
38 #include "gnome_applet_mgr.h" |
588 | 39 #include "pixmaps/cancel.xpm" |
595 | 40 #include "pixmaps/fontface2.xpm" |
41 #include "pixmaps/refresh.xpm" | |
617 | 42 #include "pixmaps/gnome_add.xpm" |
43 #include "pixmaps/gnome_remove.xpm" | |
832
0142b4c66394
[gaim-migrate @ 842]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
830
diff
changeset
|
44 #include "pixmaps/gnome_preferences.xpm" |
855
82673bb41e2f
[gaim-migrate @ 865]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
834
diff
changeset
|
45 #include "pixmaps/bgcolor.xpm" |
82673bb41e2f
[gaim-migrate @ 865]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
834
diff
changeset
|
46 #include "pixmaps/fgcolor.xpm" |
821 | 47 #include "pixmaps/save.xpm" |
1 | 48 |
49 struct debug_window *dw = NULL; | |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
50 static GtkWidget *prefs = NULL; |
1 | 51 |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
52 static GtkWidget *gaim_button(const char *, int *, int, GtkWidget *); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
53 static void prefs_build_general(GtkWidget *); |
960
fa681641643d
[gaim-migrate @ 970]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
940
diff
changeset
|
54 static void prefs_build_proxy(GtkWidget *); |
930
a88af4cc626a
[gaim-migrate @ 940]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
915
diff
changeset
|
55 #ifdef USE_APPLET |
a88af4cc626a
[gaim-migrate @ 940]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
915
diff
changeset
|
56 static void prefs_build_applet(GtkWidget *); |
a88af4cc626a
[gaim-migrate @ 940]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
915
diff
changeset
|
57 #endif |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
58 static void prefs_build_buddy(GtkWidget *); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
59 static void prefs_build_convo(GtkWidget *); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
60 static void prefs_build_sound(GtkWidget *); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
61 static void prefs_build_away(GtkWidget *); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
62 static void prefs_build_browser(GtkWidget *); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
63 static gint handle_delete(GtkWidget *, GdkEvent *, void *); |
915
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
64 static void delete_prefs(GtkWidget *, void *); |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
65 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
66 static GtkWidget *prefdialog = NULL; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
67 static GtkWidget *debugbutton = NULL; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
68 GtkWidget *prefs_away_list = NULL; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
69 |
678
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
70 static void destdeb(GtkWidget *m, gpointer n) |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
71 { |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
72 gtk_widget_destroy(debugbutton); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
73 debugbutton = NULL; |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
74 } |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
75 |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
76 static void general_page() |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
77 { |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
78 GtkWidget *parent; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
79 GtkWidget *box; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
80 GtkWidget *label; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
81 GtkWidget *sep; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
82 GtkWidget *idle; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
83 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
84 parent = prefdialog->parent; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
85 gtk_widget_destroy(prefdialog); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
86 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
87 prefdialog = gtk_frame_new(_("General Options")); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
88 gtk_container_add(GTK_CONTAINER(parent), prefdialog); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
89 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
90 box = gtk_vbox_new(FALSE, 5); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
91 gtk_container_add(GTK_CONTAINER(prefdialog), box); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
92 gtk_widget_show(box); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
93 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
94 label = gtk_label_new(_("All options take effect immediately unless otherwise noted.")); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
95 gtk_box_pack_start(GTK_BOX(box), label, FALSE, FALSE, 5); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
96 gtk_widget_show(label); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
97 |
960
fa681641643d
[gaim-migrate @ 970]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
940
diff
changeset
|
98 /* |
705
dcf672c5a1ff
[gaim-migrate @ 715]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
702
diff
changeset
|
99 prefrem = gaim_button(_("Remember password"), &general_options, OPT_GEN_REMEMBER_PASS, box); |
dcf672c5a1ff
[gaim-migrate @ 715]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
702
diff
changeset
|
100 gtk_signal_connect(GTK_OBJECT(prefrem), "destroy", GTK_SIGNAL_FUNC(remdes), 0); |
960
fa681641643d
[gaim-migrate @ 970]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
940
diff
changeset
|
101 */ |
fa681641643d
[gaim-migrate @ 970]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
940
diff
changeset
|
102 /* gaim_button(_("Auto-login"), &general_options, OPT_GEN_AUTO_LOGIN, box); */ |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
103 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
104 sep = gtk_hseparator_new(); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
105 gtk_box_pack_start(GTK_BOX(box), sep, FALSE, FALSE, 5); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
106 gtk_widget_show(sep); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
107 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
108 gaim_button(_("Use borderless buttons (requires restart for some buttons)"), &display_options, OPT_DISP_COOL_LOOK, box); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
109 gaim_button(_("Show Buddy Ticker after restart"), &display_options, OPT_DISP_SHOW_BUDDYTICKER, box); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
110 if (!dw && (general_options & OPT_GEN_DEBUG)) |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
111 general_options = general_options ^ OPT_GEN_DEBUG; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
112 debugbutton = gaim_button(_("Show Debug Window"), &general_options, OPT_GEN_DEBUG, box); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
113 gtk_signal_connect_object(GTK_OBJECT(debugbutton), "clicked", GTK_SIGNAL_FUNC(show_debug), 0); |
678
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
114 gtk_signal_connect(GTK_OBJECT(debugbutton), "destroy", GTK_SIGNAL_FUNC(destdeb), 0); |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
115 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
116 sep = gtk_hseparator_new(); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
117 gtk_box_pack_start(GTK_BOX(box), sep, FALSE, FALSE, 5); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
118 gtk_widget_show(sep); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
119 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
120 idle = gaim_button(_("Report Idle Times"), &report_idle, 1, box); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
121 gtk_signal_connect(GTK_OBJECT(idle), "clicked", set_option, &report_idle); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
122 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
123 gtk_widget_show(prefdialog); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
124 } |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
125 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
126 static GtkWidget *aim_host_entry; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
127 static GtkWidget *aim_port_entry; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
128 static GtkWidget *login_host_entry; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
129 static GtkWidget *login_port_entry; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
130 static GtkWidget *proxy_host_entry; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
131 static GtkWidget *proxy_port_entry; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
132 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
133 static int connection_key_pressed(GtkWidget *w, GdkEvent *event, void *dummy) |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
134 { |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
135 g_snprintf(aim_host, sizeof(aim_host), "%s", gtk_entry_get_text(GTK_ENTRY(aim_host_entry))); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
136 sscanf(gtk_entry_get_text(GTK_ENTRY(aim_port_entry)), "%d", &aim_port); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
137 g_snprintf(login_host, sizeof(login_host), "%s", gtk_entry_get_text(GTK_ENTRY(login_host_entry))); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
138 sscanf(gtk_entry_get_text(GTK_ENTRY(login_port_entry)), "%d", &login_port); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
139 if (proxy_type != PROXY_NONE) { |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
140 g_snprintf(proxy_host, sizeof(proxy_host), "%s", gtk_entry_get_text(GTK_ENTRY(proxy_host_entry))); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
141 sscanf(gtk_entry_get_text(GTK_ENTRY(proxy_port_entry)), "%d", &proxy_port); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
142 } |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
143 save_prefs(); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
144 return TRUE; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
145 } |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
146 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
147 static void set_connect(GtkWidget *w, int *data) |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
148 { |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
149 proxy_type = (int)data; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
150 if (proxy_type != PROXY_NONE) { |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
151 if (proxy_host_entry) |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
152 gtk_widget_set_sensitive(proxy_host_entry, TRUE); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
153 if (proxy_port_entry) |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
154 gtk_widget_set_sensitive(proxy_port_entry, TRUE); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
155 } else { |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
156 if (proxy_host_entry) |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
157 gtk_widget_set_sensitive(proxy_host_entry, FALSE); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
158 if (proxy_port_entry) |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
159 gtk_widget_set_sensitive(proxy_port_entry, FALSE); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
160 } |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
161 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
162 save_prefs(); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
163 } |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
164 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
165 static GtkWidget *connect_radio(char *label, int which, GtkWidget *box, GtkWidget *set) |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
166 { |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
167 GtkWidget *opt; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
168 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
169 if (!set) |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
170 opt = gtk_radio_button_new_with_label(NULL, label); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
171 else |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
172 opt = gtk_radio_button_new_with_label(gtk_radio_button_group(GTK_RADIO_BUTTON(set)), label); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
173 gtk_box_pack_start(GTK_BOX(box), opt, FALSE, FALSE, 0); |
683
2186b43872b7
[gaim-migrate @ 693]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
682
diff
changeset
|
174 gtk_signal_connect(GTK_OBJECT(opt), "clicked", GTK_SIGNAL_FUNC(set_connect), (void *)which); |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
175 gtk_widget_show(opt); |
666
71ea550c22ac
[gaim-migrate @ 676]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
660
diff
changeset
|
176 if (proxy_type == which) |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
177 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(opt), TRUE); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
178 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
179 return opt; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
180 } |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
181 |
666
71ea550c22ac
[gaim-migrate @ 676]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
660
diff
changeset
|
182 static void connect_destroy(GtkWidget *n, gpointer d) |
71ea550c22ac
[gaim-migrate @ 676]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
660
diff
changeset
|
183 { |
71ea550c22ac
[gaim-migrate @ 676]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
660
diff
changeset
|
184 proxy_host_entry = NULL; |
71ea550c22ac
[gaim-migrate @ 676]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
660
diff
changeset
|
185 proxy_port_entry = NULL; |
71ea550c22ac
[gaim-migrate @ 676]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
660
diff
changeset
|
186 } |
71ea550c22ac
[gaim-migrate @ 676]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
660
diff
changeset
|
187 |
960
fa681641643d
[gaim-migrate @ 970]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
940
diff
changeset
|
188 static void proxy_page() |
891
fa2feef25e1e
[gaim-migrate @ 901]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
878
diff
changeset
|
189 { |
fa2feef25e1e
[gaim-migrate @ 901]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
878
diff
changeset
|
190 GtkWidget *parent; |
fa2feef25e1e
[gaim-migrate @ 901]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
878
diff
changeset
|
191 GtkWidget *box; |
fa2feef25e1e
[gaim-migrate @ 901]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
878
diff
changeset
|
192 GtkWidget *label; |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
193 GtkWidget *hbox; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
194 GtkWidget *opt; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
195 char buffer[1024]; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
196 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
197 parent = prefdialog->parent; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
198 gtk_widget_destroy(prefdialog); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
199 |
960
fa681641643d
[gaim-migrate @ 970]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
940
diff
changeset
|
200 prefdialog = gtk_frame_new(_("Proxy Options")); |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
201 gtk_container_add(GTK_CONTAINER(parent), prefdialog); |
666
71ea550c22ac
[gaim-migrate @ 676]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
660
diff
changeset
|
202 gtk_signal_connect(GTK_OBJECT(prefdialog), "destroy", GTK_SIGNAL_FUNC(connect_destroy), 0); |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
203 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
204 box = gtk_vbox_new(FALSE, 5); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
205 gtk_container_add(GTK_CONTAINER(prefdialog), box); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
206 gtk_widget_show(box); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
207 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
208 hbox = gtk_hbox_new(FALSE, 0); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
209 gtk_box_pack_start(GTK_BOX(box), hbox, FALSE, FALSE, 0); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
210 gtk_widget_show(hbox); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
211 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
212 label = gtk_label_new(_("TOC Host:")); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
213 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 5); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
214 gtk_widget_show(label); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
215 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
216 aim_host_entry = gtk_entry_new(); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
217 gtk_box_pack_start(GTK_BOX(hbox), aim_host_entry, FALSE, FALSE, 0); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
218 gtk_entry_set_text(GTK_ENTRY(aim_host_entry), aim_host); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
219 gtk_signal_connect(GTK_OBJECT(aim_host_entry), "focus_out_event", GTK_SIGNAL_FUNC(connection_key_pressed), NULL); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
220 gtk_widget_show(aim_host_entry); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
221 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
222 label = gtk_label_new(_("Port:")); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
223 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 5); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
224 gtk_widget_show(label); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
225 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
226 aim_port_entry = gtk_entry_new(); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
227 gtk_box_pack_start(GTK_BOX(hbox), aim_port_entry, FALSE, FALSE, 0); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
228 g_snprintf(buffer, sizeof(buffer), "%d", aim_port); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
229 gtk_entry_set_text(GTK_ENTRY(aim_port_entry), buffer); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
230 gtk_signal_connect(GTK_OBJECT(aim_port_entry), "focus_out_event", GTK_SIGNAL_FUNC(connection_key_pressed), NULL); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
231 gtk_widget_show(aim_port_entry); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
232 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
233 hbox = gtk_hbox_new(FALSE, 0); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
234 gtk_box_pack_start(GTK_BOX(box), hbox, FALSE, FALSE, 0); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
235 gtk_widget_show(hbox); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
236 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
237 label = gtk_label_new(_("Login Host:")); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
238 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 5); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
239 gtk_widget_show(label); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
240 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
241 login_host_entry = gtk_entry_new(); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
242 gtk_box_pack_start(GTK_BOX(hbox), login_host_entry, FALSE, FALSE, 0); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
243 gtk_entry_set_text(GTK_ENTRY(login_host_entry), login_host); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
244 gtk_signal_connect(GTK_OBJECT(login_host_entry), "focus_out_event", GTK_SIGNAL_FUNC(connection_key_pressed), NULL); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
245 gtk_widget_show(login_host_entry); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
246 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
247 label = gtk_label_new(_("Port:")); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
248 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 5); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
249 gtk_widget_show(label); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
250 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
251 login_port_entry = gtk_entry_new(); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
252 gtk_box_pack_start(GTK_BOX(hbox), login_port_entry, FALSE, FALSE, 0); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
253 g_snprintf(buffer, sizeof(buffer), "%d", login_port); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
254 gtk_entry_set_text(GTK_ENTRY(login_port_entry), buffer); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
255 gtk_signal_connect(GTK_OBJECT(login_port_entry), "focus_out_event", GTK_SIGNAL_FUNC(connection_key_pressed), NULL); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
256 gtk_widget_show(login_port_entry); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
257 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
258 opt = connect_radio(_("No Proxy"), PROXY_NONE, box, NULL); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
259 opt = connect_radio(_("HTTP Proxy"), PROXY_HTTP, box, opt); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
260 opt = connect_radio(_("Socks 4 Proxy"), PROXY_SOCKS4, box, opt); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
261 opt = connect_radio(_("Socks 5 Proxy"), PROXY_SOCKS5, box, opt); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
262 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
263 hbox = gtk_hbox_new(FALSE, 0); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
264 gtk_box_pack_start(GTK_BOX(box), hbox, FALSE, FALSE, 0); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
265 gtk_widget_show(hbox); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
266 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
267 label = gtk_label_new(_("Proxy Host:")); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
268 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 5); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
269 gtk_widget_show(label); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
270 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
271 proxy_host_entry = gtk_entry_new(); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
272 gtk_box_pack_start(GTK_BOX(hbox), proxy_host_entry, FALSE, FALSE, 0); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
273 gtk_entry_set_text(GTK_ENTRY(proxy_host_entry), proxy_host); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
274 gtk_signal_connect(GTK_OBJECT(proxy_host_entry), "focus_out_event", GTK_SIGNAL_FUNC(connection_key_pressed), NULL); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
275 gtk_widget_show(proxy_host_entry); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
276 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
277 hbox = gtk_hbox_new(FALSE, 0); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
278 gtk_box_pack_start(GTK_BOX(box), hbox, FALSE, FALSE, 0); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
279 gtk_widget_show(hbox); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
280 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
281 label = gtk_label_new(_("Port:")); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
282 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 5); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
283 gtk_widget_show(label); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
284 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
285 proxy_port_entry = gtk_entry_new(); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
286 gtk_box_pack_start(GTK_BOX(hbox), proxy_port_entry, FALSE, FALSE, 0); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
287 g_snprintf(buffer, sizeof(buffer), "%d", proxy_port); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
288 gtk_entry_set_text(GTK_ENTRY(proxy_port_entry), buffer); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
289 gtk_signal_connect(GTK_OBJECT(proxy_port_entry), "focus_out_event", GTK_SIGNAL_FUNC(connection_key_pressed), NULL); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
290 gtk_widget_show(proxy_port_entry); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
291 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
292 if (proxy_type != PROXY_NONE) { |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
293 gtk_widget_set_sensitive(proxy_host_entry, TRUE); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
294 gtk_widget_set_sensitive(proxy_port_entry, TRUE); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
295 } else { |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
296 gtk_widget_set_sensitive(proxy_host_entry, FALSE); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
297 gtk_widget_set_sensitive(proxy_port_entry, FALSE); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
298 } |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
299 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
300 gtk_widget_show(prefdialog); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
301 } |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
302 |
930
a88af4cc626a
[gaim-migrate @ 940]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
915
diff
changeset
|
303 #ifdef USE_APPLET |
a88af4cc626a
[gaim-migrate @ 940]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
915
diff
changeset
|
304 static void applet_page() |
a88af4cc626a
[gaim-migrate @ 940]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
915
diff
changeset
|
305 { |
a88af4cc626a
[gaim-migrate @ 940]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
915
diff
changeset
|
306 GtkWidget *parent; |
a88af4cc626a
[gaim-migrate @ 940]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
915
diff
changeset
|
307 GtkWidget *box; |
a88af4cc626a
[gaim-migrate @ 940]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
915
diff
changeset
|
308 GtkWidget *label; |
a88af4cc626a
[gaim-migrate @ 940]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
915
diff
changeset
|
309 GtkWidget *sep; |
a88af4cc626a
[gaim-migrate @ 940]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
915
diff
changeset
|
310 |
a88af4cc626a
[gaim-migrate @ 940]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
915
diff
changeset
|
311 parent = prefdialog->parent; |
a88af4cc626a
[gaim-migrate @ 940]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
915
diff
changeset
|
312 gtk_widget_destroy(prefdialog); |
a88af4cc626a
[gaim-migrate @ 940]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
915
diff
changeset
|
313 |
a88af4cc626a
[gaim-migrate @ 940]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
915
diff
changeset
|
314 prefdialog = gtk_frame_new(_("Applet Options")); |
a88af4cc626a
[gaim-migrate @ 940]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
915
diff
changeset
|
315 gtk_container_add(GTK_CONTAINER(parent), prefdialog); |
a88af4cc626a
[gaim-migrate @ 940]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
915
diff
changeset
|
316 |
a88af4cc626a
[gaim-migrate @ 940]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
915
diff
changeset
|
317 box = gtk_vbox_new(FALSE, 5); |
a88af4cc626a
[gaim-migrate @ 940]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
915
diff
changeset
|
318 gtk_container_add(GTK_CONTAINER(prefdialog), box); |
a88af4cc626a
[gaim-migrate @ 940]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
915
diff
changeset
|
319 gtk_widget_show(box); |
a88af4cc626a
[gaim-migrate @ 940]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
915
diff
changeset
|
320 |
a88af4cc626a
[gaim-migrate @ 940]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
915
diff
changeset
|
321 label = gtk_label_new(_("All options take effect immediately unless otherwise noted.")); |
a88af4cc626a
[gaim-migrate @ 940]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
915
diff
changeset
|
322 gtk_box_pack_start(GTK_BOX(box), label, FALSE, FALSE, 5); |
a88af4cc626a
[gaim-migrate @ 940]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
915
diff
changeset
|
323 gtk_widget_show(label); |
a88af4cc626a
[gaim-migrate @ 940]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
915
diff
changeset
|
324 |
a88af4cc626a
[gaim-migrate @ 940]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
915
diff
changeset
|
325 gaim_button(_("Display Buddy List near applet"), &general_options, OPT_GEN_NEAR_APPLET, box); |
a88af4cc626a
[gaim-migrate @ 940]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
915
diff
changeset
|
326 |
a88af4cc626a
[gaim-migrate @ 940]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
915
diff
changeset
|
327 gtk_widget_show(prefdialog); |
a88af4cc626a
[gaim-migrate @ 940]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
915
diff
changeset
|
328 } |
a88af4cc626a
[gaim-migrate @ 940]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
915
diff
changeset
|
329 #endif |
a88af4cc626a
[gaim-migrate @ 940]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
915
diff
changeset
|
330 |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
331 static void buddy_page() |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
332 { |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
333 GtkWidget *parent; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
334 GtkWidget *box; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
335 GtkWidget *label; |
702
056ed55962e0
[gaim-migrate @ 712]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
701
diff
changeset
|
336 GtkWidget *sep; |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
337 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
338 parent = prefdialog->parent; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
339 gtk_widget_destroy(prefdialog); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
340 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
341 prefdialog = gtk_frame_new(_("Buddy List Options")); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
342 gtk_container_add(GTK_CONTAINER(parent), prefdialog); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
343 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
344 box = gtk_vbox_new(FALSE, 5); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
345 gtk_container_add(GTK_CONTAINER(prefdialog), box); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
346 gtk_widget_show(box); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
347 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
348 label = gtk_label_new(_("All options take effect immediately unless otherwise noted.")); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
349 gtk_box_pack_start(GTK_BOX(box), label, FALSE, FALSE, 5); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
350 gtk_widget_show(label); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
351 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
352 gaim_button(_("Show numbers in groups"), &display_options, OPT_DISP_SHOW_GRPNUM, box); |
902
bd5f4997f063
[gaim-migrate @ 912]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
901
diff
changeset
|
353 gaim_button(_("Hide groups with no online buddies"), &display_options, OPT_DISP_NO_MT_GRP, box); |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
354 gaim_button(_("Show idle times"), &display_options, OPT_DISP_SHOW_IDLETIME, box); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
355 gaim_button(_("Show buddy type icons"), &display_options, OPT_DISP_SHOW_PIXMAPS, box); |
702
056ed55962e0
[gaim-migrate @ 712]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
701
diff
changeset
|
356 |
056ed55962e0
[gaim-migrate @ 712]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
701
diff
changeset
|
357 sep = gtk_hseparator_new(); |
056ed55962e0
[gaim-migrate @ 712]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
701
diff
changeset
|
358 gtk_box_pack_start(GTK_BOX(box), sep, FALSE, FALSE, 5); |
056ed55962e0
[gaim-migrate @ 712]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
701
diff
changeset
|
359 gtk_widget_show(sep); |
056ed55962e0
[gaim-migrate @ 712]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
701
diff
changeset
|
360 |
696
97b75ed155b0
[gaim-migrate @ 706]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
683
diff
changeset
|
361 gaim_button(_("Hide IM/Info/Chat buttons"), &display_options, OPT_DISP_NO_BUTTONS, box); |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
362 gaim_button(_("Show pictures on buttons"), &display_options, OPT_DISP_SHOW_BUTTON_XPM, box); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
363 |
702
056ed55962e0
[gaim-migrate @ 712]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
701
diff
changeset
|
364 sep = gtk_hseparator_new(); |
056ed55962e0
[gaim-migrate @ 712]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
701
diff
changeset
|
365 gtk_box_pack_start(GTK_BOX(box), sep, FALSE, FALSE, 5); |
056ed55962e0
[gaim-migrate @ 712]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
701
diff
changeset
|
366 gtk_widget_show(sep); |
056ed55962e0
[gaim-migrate @ 712]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
701
diff
changeset
|
367 |
056ed55962e0
[gaim-migrate @ 712]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
701
diff
changeset
|
368 gaim_button(_("Save Window Size/Position"), &general_options, OPT_GEN_SAVED_WINDOWS, box); |
746
5a908dd5cfc4
[gaim-migrate @ 756]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
736
diff
changeset
|
369 #ifdef USE_APPLET |
5a908dd5cfc4
[gaim-migrate @ 756]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
736
diff
changeset
|
370 gaim_button(_("Automatically show buddy list on sign on"), &general_options, OPT_GEN_APP_BUDDY_SHOW, box); |
5a908dd5cfc4
[gaim-migrate @ 756]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
736
diff
changeset
|
371 #endif |
702
056ed55962e0
[gaim-migrate @ 712]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
701
diff
changeset
|
372 |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
373 gtk_widget_show(prefdialog); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
374 } |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
375 |
678
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
376 static GtkWidget *permtree = NULL; |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
377 |
679
71b2477033cb
[gaim-migrate @ 689]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
678
diff
changeset
|
378 static void build_deny_tree() |
678
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
379 { |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
380 GtkWidget *ti; |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
381 GtkWidget *sub; |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
382 GList *plist = permit; |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
383 GList *dlist = deny; |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
384 |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
385 if (!permtree) return; |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
386 |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
387 gtk_tree_clear_items(GTK_TREE(permtree), 0, -1); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
388 |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
389 ti = gtk_tree_item_new_with_label(_("Permit")); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
390 sub = gtk_tree_new(); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
391 gtk_widget_show(ti); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
392 gtk_widget_show(sub); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
393 gtk_tree_prepend(GTK_TREE(permtree), ti); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
394 gtk_tree_item_set_subtree(GTK_TREE_ITEM(ti), sub); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
395 gtk_tree_item_expand(GTK_TREE_ITEM(ti)); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
396 |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
397 while(plist) { |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
398 ti = gtk_tree_item_new_with_label((char *)plist->data); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
399 gtk_widget_show(ti); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
400 gtk_tree_prepend(GTK_TREE(sub), ti); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
401 plist = plist->next; |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
402 } |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
403 |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
404 |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
405 ti = gtk_tree_item_new_with_label(_("Deny")); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
406 sub = gtk_tree_new(); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
407 gtk_widget_show(ti); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
408 gtk_widget_show(sub); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
409 gtk_tree_prepend(GTK_TREE(permtree), ti); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
410 gtk_tree_item_set_subtree(GTK_TREE_ITEM(ti), sub); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
411 gtk_tree_item_expand(GTK_TREE_ITEM(ti)); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
412 |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
413 while(dlist) { |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
414 ti = gtk_tree_item_new_with_label((char *)dlist->data); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
415 gtk_widget_show(ti); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
416 gtk_tree_prepend(GTK_TREE(sub), ti); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
417 dlist = dlist->next; |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
418 } |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
419 } |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
420 |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
421 static void do_del_perm(GtkWidget *w, GtkTree *ptree) |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
422 { |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
423 GtkLabel *label, *plabel; |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
424 GtkWidget *item, *pitem; |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
425 char *c, *d; |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
426 GList *i; |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
427 |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
428 GList *plist; |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
429 GList *dlist; |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
430 int level; |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
431 |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
432 plist = permit; |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
433 dlist = deny; |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
434 |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
435 i = GTK_TREE_SELECTION(ptree); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
436 if (i) { |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
437 item = GTK_WIDGET(i->data); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
438 gtk_tree_unselect_child(GTK_TREE(ptree), item); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
439 label = GTK_LABEL(GTK_BIN(item)->child); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
440 gtk_label_get(label, &c); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
441 level = GTK_TREE(item->parent)->level; |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
442 if (level > 0) { |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
443 pitem = GTK_WIDGET(GTK_TREE(item->parent)->tree_owner); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
444 plabel = GTK_LABEL(GTK_BIN(pitem)->child); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
445 gtk_label_get(plabel, &d); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
446 if (!strcasecmp(d, _("Permit"))) { |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
447 while(plist) { |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
448 if (!strcasecmp((char *)(plist->data), c)) { |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
449 permit = g_list_remove(permit, plist->data); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
450 break; |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
451 } |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
452 |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
453 plist = plist->next; |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
454 } |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
455 |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
456 } else { |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
457 while(dlist) { |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
458 if (!strcasecmp((char *)(dlist->data), c)) { |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
459 deny = g_list_remove(deny, dlist->data); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
460 |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
461 break; |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
462 } |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
463 dlist = dlist->next; |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
464 } |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
465 |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
466 } |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
467 |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
468 |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
469 } else { |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
470 /* Can't delete groups here! :) */ |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
471 return; |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
472 } |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
473 serv_set_permit_deny(); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
474 gtk_tree_clear_items(GTK_TREE(ptree), 0, -1); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
475 build_permit_tree(); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
476 serv_save_config(); |
986
ca8f1d02630a
[gaim-migrate @ 996]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
970
diff
changeset
|
477 do_export(0, 0); |
678
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
478 } |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
479 } |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
480 |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
481 |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
482 static void set_permit(GtkWidget *w, int *data) |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
483 { |
682
9b189d028b34
[gaim-migrate @ 692]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
679
diff
changeset
|
484 if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w))) { |
9b189d028b34
[gaim-migrate @ 692]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
679
diff
changeset
|
485 permdeny = (int)data; |
9b189d028b34
[gaim-migrate @ 692]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
679
diff
changeset
|
486 if (blist) { |
710
efd72a117875
[gaim-migrate @ 720]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
705
diff
changeset
|
487 do_export(0, 0); |
682
9b189d028b34
[gaim-migrate @ 692]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
679
diff
changeset
|
488 serv_save_config(); |
9b189d028b34
[gaim-migrate @ 692]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
679
diff
changeset
|
489 /* we do this here because we can :) */ |
9b189d028b34
[gaim-migrate @ 692]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
679
diff
changeset
|
490 serv_set_permit_deny(); |
9b189d028b34
[gaim-migrate @ 692]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
679
diff
changeset
|
491 } |
678
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
492 } |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
493 } |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
494 |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
495 static GtkWidget *deny_radio(char *label, int which, GtkWidget *box, GtkWidget *set) |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
496 { |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
497 GtkWidget *opt; |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
498 |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
499 if (!set) |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
500 opt = gtk_radio_button_new_with_label(NULL, label); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
501 else |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
502 opt = gtk_radio_button_new_with_label(gtk_radio_button_group(GTK_RADIO_BUTTON(set)), label); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
503 gtk_box_pack_start(GTK_BOX(box), opt, FALSE, FALSE, 0); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
504 gtk_signal_connect(GTK_OBJECT(opt), "clicked", GTK_SIGNAL_FUNC(set_permit), (void *)which); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
505 gtk_widget_show(opt); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
506 if (permdeny == which) |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
507 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(opt), TRUE); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
508 |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
509 return opt; |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
510 } |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
511 |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
512 static void permdest(GtkWidget *m, gpointer n) |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
513 { |
986
ca8f1d02630a
[gaim-migrate @ 996]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
970
diff
changeset
|
514 do_export(0, 0); |
ca8f1d02630a
[gaim-migrate @ 996]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
970
diff
changeset
|
515 serv_save_config(); |
678
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
516 gtk_widget_destroy(permtree); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
517 permtree = NULL; |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
518 } |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
519 |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
520 static void add_perm_callback(GtkWidget *widget, void *dummy) |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
521 { |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
522 if (!blist) |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
523 do_error_dialog(_("Please sign on before editing the permit/deny lists."), |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
524 _("Please sign on")); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
525 else |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
526 show_add_perm(NULL); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
527 } |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
528 |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
529 static void deny_page() |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
530 { |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
531 GtkWidget *parent; |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
532 GtkWidget *box; |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
533 GtkWidget *label; |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
534 GtkWidget *sep; |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
535 GtkWidget *hbox; |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
536 GtkWidget *vbox; |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
537 GtkWidget *xbox; |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
538 GtkWidget *opt; |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
539 GtkWidget *button; |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
540 |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
541 parent = prefdialog->parent; |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
542 gtk_widget_destroy(prefdialog); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
543 |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
544 prefdialog = gtk_frame_new(_("Permit/Deny List Options")); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
545 gtk_container_add(GTK_CONTAINER(parent), prefdialog); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
546 |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
547 box = gtk_vbox_new(FALSE, 5); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
548 gtk_container_add(GTK_CONTAINER(prefdialog), box); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
549 gtk_widget_show(box); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
550 |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
551 label = gtk_label_new(_("All options take effect immediately unless otherwise noted.")); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
552 gtk_box_pack_start(GTK_BOX(box), label, FALSE, FALSE, 5); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
553 gtk_widget_show(label); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
554 |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
555 sep = gtk_hseparator_new(); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
556 gtk_box_pack_start(GTK_BOX(box), sep, FALSE, FALSE, 5); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
557 gtk_widget_show(sep); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
558 |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
559 label = gtk_label_new(_("The permit/deny configuration will change between users,\n" |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
560 "and changes while you are signed off will not be saved.")); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
561 gtk_box_pack_start(GTK_BOX(box), label, FALSE, FALSE, 5); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
562 gtk_widget_show(label); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
563 |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
564 hbox = gtk_hbox_new(FALSE, 0); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
565 gtk_box_pack_start(GTK_BOX(box), hbox, FALSE, FALSE, 5); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
566 gtk_widget_show(hbox); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
567 |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
568 vbox = gtk_vbox_new(FALSE, 0); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
569 gtk_box_pack_start(GTK_BOX(hbox), vbox, FALSE, FALSE, 5); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
570 gtk_widget_show(vbox); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
571 |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
572 opt = deny_radio(_("Allow Anyone"), PERMIT_ALL, vbox, NULL); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
573 #if 0 |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
574 /* This doesn't work because TOC doesn't have a PERMIT_BUDDY setting |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
575 * and merging the two would be very difficult at best, most likely |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
576 * impossible. If we can guarantee only Oscar than this is easy */ |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
577 opt = deny_radio(_("Allow only users on Buddy List"), PERMIT_BUDDY, vbox, opt); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
578 #endif |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
579 opt = deny_radio(_("Allow only the users in \"Permit\""), PERMIT_SOME, vbox, opt); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
580 |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
581 vbox = gtk_vbox_new(FALSE, 0); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
582 gtk_box_pack_start(GTK_BOX(hbox), vbox, FALSE, FALSE, 5); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
583 gtk_widget_show(vbox); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
584 |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
585 opt = deny_radio(_("Block all users"), PERMIT_NONE, vbox, opt); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
586 opt = deny_radio(_("Block the users in \"Deny\""), DENY_SOME, vbox, opt); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
587 |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
588 xbox = gtk_scrolled_window_new(NULL, NULL); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
589 gtk_box_pack_start(GTK_BOX(box), xbox, TRUE, TRUE, 5); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
590 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(xbox), |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
591 GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
592 gtk_widget_show(xbox); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
593 |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
594 permtree = gtk_tree_new(); |
679
71b2477033cb
[gaim-migrate @ 689]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
678
diff
changeset
|
595 build_deny_tree(); |
678
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
596 gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(xbox), permtree); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
597 gtk_signal_connect(GTK_OBJECT(permtree), "destroy", GTK_SIGNAL_FUNC(permdest), 0); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
598 gtk_widget_show(permtree); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
599 |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
600 hbox = gtk_hbox_new(TRUE, 10); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
601 gtk_box_pack_start(GTK_BOX(box), hbox, FALSE, FALSE, 5); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
602 gtk_widget_show(hbox); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
603 |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
604 button = picture_button(prefs, _("Add"), gnome_add_xpm); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
605 gtk_box_pack_start(GTK_BOX(hbox), button, TRUE, TRUE, 10); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
606 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(add_perm_callback), NULL); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
607 |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
608 button = picture_button(prefs, _("Remove"), gnome_remove_xpm); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
609 gtk_box_pack_start(GTK_BOX(hbox), button, TRUE, TRUE, 10); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
610 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(do_del_perm), permtree); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
611 |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
612 gtk_widget_show(prefdialog); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
613 } |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
614 |
679
71b2477033cb
[gaim-migrate @ 689]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
678
diff
changeset
|
615 void build_permit_tree() |
71b2477033cb
[gaim-migrate @ 689]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
678
diff
changeset
|
616 { |
71b2477033cb
[gaim-migrate @ 689]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
678
diff
changeset
|
617 if (permtree) |
71b2477033cb
[gaim-migrate @ 689]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
678
diff
changeset
|
618 deny_page(); |
71b2477033cb
[gaim-migrate @ 689]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
678
diff
changeset
|
619 } |
71b2477033cb
[gaim-migrate @ 689]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
678
diff
changeset
|
620 |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
621 static void convo_page() |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
622 { |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
623 GtkWidget *parent; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
624 GtkWidget *box; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
625 GtkWidget *label; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
626 GtkWidget *sep; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
627 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
628 parent = prefdialog->parent; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
629 gtk_widget_destroy(prefdialog); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
630 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
631 prefdialog = gtk_frame_new(_("Conversation Window Options")); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
632 gtk_container_add(GTK_CONTAINER(parent), prefdialog); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
633 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
634 box = gtk_vbox_new(FALSE, 5); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
635 gtk_container_add(GTK_CONTAINER(prefdialog), box); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
636 gtk_widget_show(box); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
637 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
638 label = gtk_label_new(_("All options take effect immediately unless otherwise noted.")); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
639 gtk_box_pack_start(GTK_BOX(box), label, FALSE, FALSE, 5); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
640 gtk_widget_show(label); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
641 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
642 gaim_button(_("Enter sends message"), &general_options, OPT_GEN_ENTER_SENDS, box); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
643 gaim_button(_("Control-{B/I/U/S} inserts HTML tags"), &general_options, OPT_GEN_CTL_CHARS, box); |
830
60284aef22f0
[gaim-migrate @ 840]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
822
diff
changeset
|
644 gaim_button(_("Control-(number) inserts smileys"), &general_options, OPT_GEN_CTL_SMILEYS, box); |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
645 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
646 sep = gtk_hseparator_new(); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
647 gtk_box_pack_start(GTK_BOX(box), sep, FALSE, FALSE, 5); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
648 gtk_widget_show(sep); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
649 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
650 gaim_button(_("Show graphical smileys"), &display_options, OPT_DISP_SHOW_SMILEY, box); |
754 | 651 gaim_button(_("Show timestamp on messages"), &display_options, OPT_DISP_SHOW_TIME, box); |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
652 gaim_button(_("Ignore incoming colors"), &display_options, OPT_DISP_IGNORE_COLOUR, box); |
667
45ed2ca0756e
[gaim-migrate @ 677]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
666
diff
changeset
|
653 gaim_button(_("Ignore white backgrounds"), &display_options, OPT_DISP_IGN_WHITE, box); |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
654 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
655 sep = gtk_hseparator_new(); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
656 gtk_box_pack_start(GTK_BOX(box), sep, FALSE, FALSE, 5); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
657 gtk_widget_show(sep); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
658 |
702
056ed55962e0
[gaim-migrate @ 712]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
701
diff
changeset
|
659 gaim_button(_("Log all conversations"), &general_options, OPT_GEN_LOG_ALL, box); |
056ed55962e0
[gaim-migrate @ 712]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
701
diff
changeset
|
660 gaim_button(_("Strip HTML from logs"), &general_options, OPT_GEN_STRIP_HTML, box); |
056ed55962e0
[gaim-migrate @ 712]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
701
diff
changeset
|
661 |
056ed55962e0
[gaim-migrate @ 712]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
701
diff
changeset
|
662 sep = gtk_hseparator_new(); |
056ed55962e0
[gaim-migrate @ 712]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
701
diff
changeset
|
663 gtk_box_pack_start(GTK_BOX(box), sep, FALSE, FALSE, 5); |
056ed55962e0
[gaim-migrate @ 712]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
701
diff
changeset
|
664 gtk_widget_show(sep); |
056ed55962e0
[gaim-migrate @ 712]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
701
diff
changeset
|
665 |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
666 gaim_button(_("Highlight misspelled words"), &general_options, OPT_GEN_CHECK_SPELLING, box); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
667 gaim_button(_("Show URLs as links"), &general_options, OPT_GEN_SEND_LINKS, box); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
668 gaim_button(_("Sending messages removes away status"), &general_options, OPT_GEN_BACK_ON_IM, box); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
669 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
670 gtk_widget_show(prefdialog); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
671 } |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
672 |
915
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
673 static void set_buttons_opt(GtkWidget *w, int data) |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
674 { |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
675 int mask; |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
676 if (data & 0x1) /* set the first bit if we're affecting chat buttons */ |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
677 mask = (OPT_DISP_CHAT_BUTTON_TEXT | OPT_DISP_CHAT_BUTTON_XPM); |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
678 else |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
679 mask = (OPT_DISP_CONV_BUTTON_TEXT | OPT_DISP_CONV_BUTTON_XPM); |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
680 display_options &= ~(mask); |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
681 display_options |= (data & mask); |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
682 |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
683 if (data & 0x1) |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
684 update_chat_button_pix(); |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
685 else |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
686 update_im_button_pix(); |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
687 } |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
688 |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
689 static void im_buttons_menu_init(GtkWidget *omenu) |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
690 { |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
691 GtkWidget *menu, *opt; |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
692 int index; |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
693 |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
694 switch (display_options & |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
695 (OPT_DISP_CONV_BUTTON_TEXT | OPT_DISP_CONV_BUTTON_XPM)) { |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
696 case OPT_DISP_CONV_BUTTON_TEXT: |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
697 index = 2; |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
698 break; |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
699 case OPT_DISP_CONV_BUTTON_XPM: |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
700 index = 1; |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
701 break; |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
702 default: /* both or neither */ |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
703 index = 0; |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
704 break; |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
705 } |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
706 |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
707 menu = gtk_menu_new(); |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
708 |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
709 opt = gtk_menu_item_new_with_label(_("Pictures and Text")); |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
710 gtk_signal_connect(GTK_OBJECT(opt), "activate", GTK_SIGNAL_FUNC(set_buttons_opt), (void *)(OPT_DISP_CONV_BUTTON_TEXT | OPT_DISP_CONV_BUTTON_XPM)); |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
711 gtk_widget_show(opt); |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
712 gtk_menu_append(GTK_MENU(menu), opt); |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
713 |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
714 opt = gtk_menu_item_new_with_label(_("Pictures Only")); |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
715 gtk_signal_connect(GTK_OBJECT(opt), "activate", GTK_SIGNAL_FUNC(set_buttons_opt), (void *)OPT_DISP_CONV_BUTTON_XPM); |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
716 gtk_widget_show(opt); |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
717 gtk_menu_append(GTK_MENU(menu), opt); |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
718 |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
719 opt = gtk_menu_item_new_with_label(_("Text Only")); |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
720 gtk_signal_connect(GTK_OBJECT(opt), "activate", GTK_SIGNAL_FUNC(set_buttons_opt), (void *)OPT_DISP_CONV_BUTTON_TEXT); |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
721 gtk_widget_show(opt); |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
722 gtk_menu_append(GTK_MENU(menu), opt); |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
723 |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
724 gtk_option_menu_remove_menu(GTK_OPTION_MENU(omenu)); |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
725 gtk_option_menu_set_menu(GTK_OPTION_MENU(omenu), menu); |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
726 gtk_option_menu_set_history(GTK_OPTION_MENU(omenu), index); |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
727 } |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
728 |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
729 static void im_page() |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
730 { |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
731 GtkWidget *parent; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
732 GtkWidget *box; |
915
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
733 GtkWidget *hbox; |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
734 GtkWidget *label; |
915
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
735 GtkWidget *opt; |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
736 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
737 parent = prefdialog->parent; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
738 gtk_widget_destroy(prefdialog); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
739 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
740 prefdialog = gtk_frame_new(_("IM Options")); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
741 gtk_container_add(GTK_CONTAINER(parent), prefdialog); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
742 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
743 box = gtk_vbox_new(FALSE, 5); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
744 gtk_container_add(GTK_CONTAINER(prefdialog), box); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
745 gtk_widget_show(box); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
746 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
747 label = gtk_label_new(_("All options take effect immediately unless otherwise noted.")); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
748 gtk_box_pack_start(GTK_BOX(box), label, FALSE, FALSE, 5); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
749 gtk_widget_show(label); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
750 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
751 gaim_button(_("Show logins in window"), &display_options, OPT_DISP_SHOW_LOGON, box); |
915
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
752 |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
753 hbox = gtk_hbox_new(FALSE, 0); |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
754 gtk_box_pack_start(GTK_BOX(box), hbox, FALSE, FALSE, 5); |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
755 gtk_widget_show(hbox); |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
756 |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
757 label = gtk_label_new(_("Show buttons as ")); |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
758 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 5); |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
759 gtk_widget_show(label); |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
760 |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
761 opt = gtk_option_menu_new(); |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
762 gtk_box_pack_start(GTK_BOX(hbox), opt, FALSE, FALSE, 5); |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
763 im_buttons_menu_init(opt); |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
764 gtk_widget_show(opt); |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
765 |
864 | 766 gaim_button(_("Show larger entry box on new windows"), &display_options, OPT_DISP_CONV_BIG_ENTRY, box); |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
767 gaim_button(_("Raise windows on events"), &general_options, OPT_GEN_POPUP_WINDOWS, box); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
768 gaim_button(_("Ignore new conversations when away"), &general_options, OPT_GEN_DISCARD_WHEN_AWAY, box); |
736
d05d746384a7
[gaim-migrate @ 746]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
735
diff
changeset
|
769 gaim_button(_("Ignore TiK Automated Messages"), &general_options, OPT_GEN_TIK_HACK, box); |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
770 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
771 gtk_widget_show(prefdialog); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
772 } |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
773 |
915
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
774 static void chat_buttons_menu_init(GtkWidget *omenu) |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
775 { |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
776 GtkWidget *menu, *opt; |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
777 int index; |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
778 |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
779 switch (display_options & |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
780 (OPT_DISP_CHAT_BUTTON_TEXT | OPT_DISP_CHAT_BUTTON_XPM)) { |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
781 case OPT_DISP_CHAT_BUTTON_TEXT: |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
782 index = 2; |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
783 break; |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
784 case OPT_DISP_CHAT_BUTTON_XPM: |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
785 index = 1; |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
786 break; |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
787 default: /* both or neither */ |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
788 index = 0; |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
789 break; |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
790 } |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
791 |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
792 menu = gtk_menu_new(); |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
793 |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
794 opt = gtk_menu_item_new_with_label(_("Pictures and Text")); |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
795 gtk_signal_connect(GTK_OBJECT(opt), "activate", GTK_SIGNAL_FUNC(set_buttons_opt), (void *)(OPT_DISP_CHAT_BUTTON_TEXT | OPT_DISP_CHAT_BUTTON_XPM | 1)); |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
796 gtk_widget_show(opt); |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
797 gtk_menu_append(GTK_MENU(menu), opt); |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
798 |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
799 opt = gtk_menu_item_new_with_label(_("Pictures Only")); |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
800 gtk_signal_connect(GTK_OBJECT(opt), "activate", GTK_SIGNAL_FUNC(set_buttons_opt), (void *)(OPT_DISP_CHAT_BUTTON_XPM | 1)); |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
801 gtk_widget_show(opt); |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
802 gtk_menu_append(GTK_MENU(menu), opt); |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
803 |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
804 opt = gtk_menu_item_new_with_label(_("Text Only")); |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
805 gtk_signal_connect(GTK_OBJECT(opt), "activate", GTK_SIGNAL_FUNC(set_buttons_opt), (void *)(OPT_DISP_CHAT_BUTTON_TEXT | 1)); |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
806 gtk_widget_show(opt); |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
807 gtk_menu_append(GTK_MENU(menu), opt); |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
808 |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
809 gtk_option_menu_remove_menu(GTK_OPTION_MENU(omenu)); |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
810 gtk_option_menu_set_menu(GTK_OPTION_MENU(omenu), menu); |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
811 gtk_option_menu_set_history(GTK_OPTION_MENU(omenu), index); |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
812 } |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
813 |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
814 static void chat_page() |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
815 { |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
816 GtkWidget *parent; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
817 GtkWidget *box; |
915
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
818 GtkWidget *hbox; |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
819 GtkWidget *label; |
915
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
820 GtkWidget *opt; |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
821 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
822 parent = prefdialog->parent; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
823 gtk_widget_destroy(prefdialog); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
824 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
825 prefdialog = gtk_frame_new(_("Chat Options")); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
826 gtk_container_add(GTK_CONTAINER(parent), prefdialog); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
827 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
828 box = gtk_vbox_new(FALSE, 5); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
829 gtk_container_add(GTK_CONTAINER(prefdialog), box); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
830 gtk_widget_show(box); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
831 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
832 label = gtk_label_new(_("All options take effect immediately unless otherwise noted.")); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
833 gtk_box_pack_start(GTK_BOX(box), label, FALSE, FALSE, 5); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
834 gtk_widget_show(label); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
835 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
836 gaim_button(_("Show people joining/leaving in window"), &display_options, OPT_DISP_CHAT_LOGON, box); |
915
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
837 |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
838 hbox = gtk_hbox_new(FALSE, 0); |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
839 gtk_box_pack_start(GTK_BOX(box), hbox, FALSE, FALSE, 5); |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
840 gtk_widget_show(hbox); |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
841 |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
842 label = gtk_label_new(_("Show buttons as ")); |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
843 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 5); |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
844 gtk_widget_show(label); |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
845 |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
846 opt = gtk_option_menu_new(); |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
847 gtk_box_pack_start(GTK_BOX(hbox), opt, FALSE, FALSE, 5); |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
848 chat_buttons_menu_init(opt); |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
849 gtk_widget_show(opt); |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
850 |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
851 |
864 | 852 gaim_button(_("Show larger entry box on new windows"), &display_options, OPT_DISP_CHAT_BIG_ENTRY, box); |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
853 gaim_button(_("Raise windows on events"), &general_options, OPT_GEN_POPUP_CHAT, box); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
854 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
855 gtk_widget_show(prefdialog); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
856 } |
1 | 857 |
858 struct chat_page { | |
859 GtkWidget *list1; | |
860 GtkWidget *list2; | |
861 }; | |
862 | |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
863 static struct chat_page *cp = NULL; |
1 | 864 |
747
eec93c5929b9
[gaim-migrate @ 757]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
746
diff
changeset
|
865 static void refresh_list(GtkWidget *w, gpointer *m) |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
866 { |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
867 char *text = grab_url("http://www.aol.com/community/chat/allchats.html"); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
868 char *c; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
869 int len = strlen(text); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
870 GtkWidget *item; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
871 GList *items = GTK_LIST(cp->list1)->children; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
872 struct chat_room *cr; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
873 c = text; |
1 | 874 |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
875 while(items) { |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
876 g_free(gtk_object_get_user_data(GTK_OBJECT(items->data))); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
877 items = items->next; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
878 } |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
879 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
880 items = NULL; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
881 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
882 gtk_list_clear_items(GTK_LIST(cp->list1), 0, -1); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
883 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
884 item = gtk_list_item_new_with_label(_("Gaim Chat")); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
885 cr = g_new0(struct chat_room, 1); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
886 strcpy(cr->name, _("Gaim Chat")); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
887 cr->exchange = 4; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
888 gtk_object_set_user_data(GTK_OBJECT(item), cr); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
889 gtk_widget_show(item); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
890 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
891 items = g_list_append(NULL, item); |
1 | 892 |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
893 while(c) { |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
894 if (c - text > len - 30) |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
895 break; /* assume no chat rooms 30 from end, padding */ |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
896 if (!strncasecmp(AOL_SRCHSTR, c, strlen(AOL_SRCHSTR))) { |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
897 char *t; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
898 int len=0; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
899 int exchange; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
900 char *name = NULL; |
1 | 901 |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
902 c += strlen(AOL_SRCHSTR); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
903 t = c; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
904 while(t) { |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
905 len++; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
906 name = g_realloc(name, len); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
907 if (*t == '+') |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
908 name[len - 1] = ' '; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
909 else if (*t == '&') { |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
910 name[len - 1] = 0; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
911 sscanf(t, "&Exchange=%d", &exchange); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
912 c = t + strlen("&Exchange=x"); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
913 break; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
914 } else |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
915 name[len - 1] = *t; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
916 t++; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
917 } |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
918 cr = g_new0(struct chat_room, 1); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
919 strcpy(cr->name, name); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
920 cr->exchange = exchange; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
921 item = gtk_list_item_new_with_label(name); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
922 gtk_widget_show(item); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
923 items = g_list_append(items, item); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
924 gtk_object_set_user_data(GTK_OBJECT(item), cr); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
925 g_free(name); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
926 } |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
927 c++; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
928 } |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
929 gtk_list_append_items(GTK_LIST(cp->list1), items); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
930 g_free(text); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
931 } |
1 | 932 |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
933 static void add_chat(GtkWidget *w, gpointer *m) |
1 | 934 { |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
935 GList *sel = GTK_LIST(cp->list1)->selection; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
936 struct chat_room *cr, *cr2; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
937 GList *crs = chat_rooms; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
938 GtkWidget *item; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
939 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
940 if (sel) { |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
941 cr = (struct chat_room *)gtk_object_get_user_data(GTK_OBJECT(sel->data)); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
942 } else |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
943 return; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
944 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
945 while(crs) { |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
946 cr2 = (struct chat_room *)crs->data; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
947 if (!strcasecmp(cr->name, cr2->name)) |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
948 return; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
949 crs = crs->next; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
950 } |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
951 item = gtk_list_item_new_with_label(cr->name); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
952 cr2 = g_new0(struct chat_room, 1); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
953 strcpy(cr2->name, cr->name); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
954 cr2->exchange = cr->exchange; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
955 gtk_object_set_user_data(GTK_OBJECT(item), cr2); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
956 gtk_widget_show(item); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
957 sel = g_list_append(NULL, item); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
958 gtk_list_append_items(GTK_LIST(cp->list2), sel); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
959 chat_rooms = g_list_append(chat_rooms, cr2); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
960 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
961 setup_buddy_chats(); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
962 save_prefs(); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
963 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
964 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
965 } |
1 | 966 |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
967 static void remove_chat(GtkWidget *w, gpointer *m) |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
968 { |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
969 GList *sel = GTK_LIST(cp->list2)->selection; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
970 struct chat_room *cr; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
971 GList *crs; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
972 GtkWidget *item; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
973 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
974 if (sel) { |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
975 item = (GtkWidget *)sel->data; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
976 cr = (struct chat_room *)gtk_object_get_user_data(GTK_OBJECT(item)); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
977 } else |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
978 return; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
979 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
980 chat_rooms = g_list_remove(chat_rooms, cr); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
981 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
982 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
983 gtk_list_clear_items(GTK_LIST(cp->list2), 0, -1); |
1 | 984 |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
985 if (g_list_length(chat_rooms) == 0) |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
986 chat_rooms = NULL; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
987 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
988 crs = chat_rooms; |
1 | 989 |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
990 while(crs) { |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
991 cr = (struct chat_room *)crs->data; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
992 item = gtk_list_item_new_with_label(cr->name); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
993 gtk_object_set_user_data(GTK_OBJECT(item), cr); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
994 gtk_widget_show(item); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
995 gtk_list_append_items(GTK_LIST(cp->list2), g_list_append(NULL, item)); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
996 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
997 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
998 crs = crs->next; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
999 } |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1000 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1001 setup_buddy_chats(); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1002 save_prefs(); |
1 | 1003 } |
1004 | |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1005 static void room_page() |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1006 { |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1007 GtkWidget *table; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1008 GtkWidget *rem_button, *add_button, *ref_button; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1009 GtkWidget *list1, *list2; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1010 GtkWidget *label; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1011 GtkWidget *sw1, *sw2; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1012 GtkWidget *item; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1013 GList *crs = chat_rooms; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1014 GList *items = NULL; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1015 struct chat_room *cr; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1016 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1017 GtkWidget *parent; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1018 GtkWidget *box; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1019 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1020 if (!cp) |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1021 g_free(cp); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1022 cp = g_new0(struct chat_page, 1); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1023 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1024 parent = prefdialog->parent; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1025 gtk_widget_destroy(prefdialog); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1026 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1027 prefdialog = gtk_frame_new(_("Chat Options")); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1028 gtk_container_add(GTK_CONTAINER(parent), prefdialog); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1029 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1030 box = gtk_vbox_new(FALSE, 5); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1031 gtk_container_add(GTK_CONTAINER(prefdialog), box); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1032 gtk_widget_show(box); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1033 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1034 table = gtk_table_new(4, 2, FALSE); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1035 gtk_widget_show(table); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1036 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1037 gtk_box_pack_start(GTK_BOX(box), table, TRUE, TRUE, 0); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1038 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1039 list1 = gtk_list_new(); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1040 list2 = gtk_list_new(); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1041 sw1 = gtk_scrolled_window_new(NULL, NULL); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1042 sw2 = gtk_scrolled_window_new(NULL, NULL); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1043 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1044 ref_button = picture_button(prefs, _("Refresh"), refresh_xpm); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1045 add_button = picture_button(prefs, _("Add"), gnome_add_xpm); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1046 rem_button = picture_button(prefs, _("Remove"), gnome_remove_xpm); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1047 gtk_widget_show(list1); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1048 gtk_widget_show(sw1); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1049 gtk_widget_show(list2); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1050 gtk_widget_show(sw2); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1051 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1052 gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(sw1), list1); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1053 gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(sw2), list2); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1054 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1055 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw1), |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1056 GTK_POLICY_AUTOMATIC,GTK_POLICY_ALWAYS); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1057 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw2), |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1058 GTK_POLICY_AUTOMATIC,GTK_POLICY_ALWAYS); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1059 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1060 cp->list1 = list1; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1061 cp->list2 = list2; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1062 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1063 gtk_signal_connect(GTK_OBJECT(ref_button), "clicked", |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1064 GTK_SIGNAL_FUNC(refresh_list), cp); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1065 gtk_signal_connect(GTK_OBJECT(rem_button), "clicked", |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1066 GTK_SIGNAL_FUNC(remove_chat), cp); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1067 gtk_signal_connect(GTK_OBJECT(add_button), "clicked", |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1068 GTK_SIGNAL_FUNC(add_chat), cp); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1069 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1070 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1071 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1072 label = gtk_label_new(_("List of available chats")); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1073 gtk_widget_show(label); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1074 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1075 gtk_table_attach(GTK_TABLE(table), label, 0, 1, 0, 1, |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1076 GTK_SHRINK, GTK_SHRINK, 0, 0); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1077 gtk_table_attach(GTK_TABLE(table), ref_button, 0, 1, 1, 2, |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1078 GTK_SHRINK, GTK_SHRINK, 0, 0); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1079 gtk_table_attach(GTK_TABLE(table), sw1, 0, 1, 2, 3, |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1080 GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1081 5, 5); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1082 gtk_table_attach(GTK_TABLE(table), add_button, 0, 1, 3, 4, |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1083 GTK_SHRINK, GTK_SHRINK, 0, 0); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1084 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1085 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1086 label = gtk_label_new(_("List of subscribed chats")); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1087 gtk_widget_show(label); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1088 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1089 gtk_table_attach(GTK_TABLE(table), label, 1, 2, 0, 1, |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1090 GTK_SHRINK, GTK_SHRINK, 0, 0); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1091 gtk_table_attach(GTK_TABLE(table), sw2, 1, 2, 2, 3, |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1092 GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1093 5, 5); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1094 gtk_table_attach(GTK_TABLE(table), rem_button, 1, 2, 3, 4, |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1095 GTK_SHRINK, GTK_SHRINK, 0, 0); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1096 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1097 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1098 item = gtk_list_item_new_with_label(_("Gaim Chat")); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1099 cr = g_new0(struct chat_room, 1); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1100 strcpy(cr->name, _("Gaim Chat")); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1101 cr->exchange = 4; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1102 gtk_object_set_user_data(GTK_OBJECT(item), cr); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1103 gtk_widget_show(item); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1104 gtk_list_append_items(GTK_LIST(list1), g_list_append(NULL, item)); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1105 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1106 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1107 while(crs) { |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1108 cr = (struct chat_room *)crs->data; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1109 item = gtk_list_item_new_with_label(cr->name); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1110 gtk_object_set_user_data(GTK_OBJECT(item), cr); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1111 gtk_widget_show(item); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1112 items = g_list_append(items, item); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1113 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1114 crs = crs->next; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1115 } |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1116 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1117 gtk_list_append_items(GTK_LIST(list2), items); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1118 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1119 gtk_widget_show(prefdialog); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1120 } |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1121 |
873
789df4b47508
[gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
864
diff
changeset
|
1122 static GtkWidget *show_color_pref(GtkWidget *box, gboolean fgc) |
789df4b47508
[gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
864
diff
changeset
|
1123 { |
789df4b47508
[gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
864
diff
changeset
|
1124 /* more stuff stolen from X-Chat */ |
789df4b47508
[gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
864
diff
changeset
|
1125 GtkWidget *swid; |
789df4b47508
[gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
864
diff
changeset
|
1126 GdkColor c; |
789df4b47508
[gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
864
diff
changeset
|
1127 GtkStyle *style; |
789df4b47508
[gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
864
diff
changeset
|
1128 c.pixel = 0; |
789df4b47508
[gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
864
diff
changeset
|
1129 if (fgc) { |
789df4b47508
[gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
864
diff
changeset
|
1130 if (font_options & OPT_FONT_FGCOL) { |
789df4b47508
[gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
864
diff
changeset
|
1131 c.red = fgcolor.red << 8; |
789df4b47508
[gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
864
diff
changeset
|
1132 c.blue = fgcolor.blue << 8; |
789df4b47508
[gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
864
diff
changeset
|
1133 c.green = fgcolor.green << 8; |
789df4b47508
[gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
864
diff
changeset
|
1134 } else { |
789df4b47508
[gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
864
diff
changeset
|
1135 c.red = 0; |
789df4b47508
[gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
864
diff
changeset
|
1136 c.blue = 0; |
789df4b47508
[gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
864
diff
changeset
|
1137 c.green = 0; |
789df4b47508
[gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
864
diff
changeset
|
1138 } |
789df4b47508
[gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
864
diff
changeset
|
1139 } else { |
789df4b47508
[gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
864
diff
changeset
|
1140 if (font_options & OPT_FONT_BGCOL) { |
789df4b47508
[gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
864
diff
changeset
|
1141 c.red = bgcolor.red << 8; |
789df4b47508
[gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
864
diff
changeset
|
1142 c.blue = bgcolor.blue << 8; |
789df4b47508
[gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
864
diff
changeset
|
1143 c.green = bgcolor.green << 8; |
789df4b47508
[gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
864
diff
changeset
|
1144 } else { |
789df4b47508
[gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
864
diff
changeset
|
1145 c.red = 0xffff; |
789df4b47508
[gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
864
diff
changeset
|
1146 c.blue = 0xffff; |
789df4b47508
[gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
864
diff
changeset
|
1147 c.green = 0xffff; |
789df4b47508
[gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
864
diff
changeset
|
1148 } |
789df4b47508
[gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
864
diff
changeset
|
1149 } |
789df4b47508
[gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
864
diff
changeset
|
1150 |
789df4b47508
[gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
864
diff
changeset
|
1151 style = gtk_style_new(); |
789df4b47508
[gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
864
diff
changeset
|
1152 style->bg[0] = c; |
789df4b47508
[gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
864
diff
changeset
|
1153 |
789df4b47508
[gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
864
diff
changeset
|
1154 swid = gtk_event_box_new(); |
789df4b47508
[gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
864
diff
changeset
|
1155 gtk_widget_set_style(GTK_WIDGET(swid), style); |
789df4b47508
[gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
864
diff
changeset
|
1156 gtk_style_unref(style); |
789df4b47508
[gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
864
diff
changeset
|
1157 gtk_widget_set_usize(GTK_WIDGET(swid), 40, -1); |
789df4b47508
[gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
864
diff
changeset
|
1158 gtk_box_pack_start(GTK_BOX(box), swid, FALSE, FALSE, 5); |
789df4b47508
[gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
864
diff
changeset
|
1159 gtk_widget_show(swid); |
789df4b47508
[gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
864
diff
changeset
|
1160 return swid; |
789df4b47508
[gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
864
diff
changeset
|
1161 } |
789df4b47508
[gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
864
diff
changeset
|
1162 |
789df4b47508
[gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
864
diff
changeset
|
1163 GtkWidget *pref_fg_picture = NULL; |
789df4b47508
[gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
864
diff
changeset
|
1164 GtkWidget *pref_bg_picture = NULL; |
789df4b47508
[gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
864
diff
changeset
|
1165 |
789df4b47508
[gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
864
diff
changeset
|
1166 void update_color(GtkWidget *w, GtkWidget *pic) |
789df4b47508
[gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
864
diff
changeset
|
1167 { |
789df4b47508
[gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
864
diff
changeset
|
1168 GdkColor c; |
789df4b47508
[gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
864
diff
changeset
|
1169 GtkStyle *style; |
789df4b47508
[gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
864
diff
changeset
|
1170 c.pixel = 0; |
789df4b47508
[gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
864
diff
changeset
|
1171 if (pic == pref_fg_picture) { |
789df4b47508
[gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
864
diff
changeset
|
1172 if (font_options & OPT_FONT_FGCOL) { |
789df4b47508
[gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
864
diff
changeset
|
1173 c.red = fgcolor.red << 8; |
789df4b47508
[gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
864
diff
changeset
|
1174 c.blue = fgcolor.blue << 8; |
789df4b47508
[gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
864
diff
changeset
|
1175 c.green = fgcolor.green << 8; |
789df4b47508
[gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
864
diff
changeset
|
1176 } else { |
789df4b47508
[gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
864
diff
changeset
|
1177 c.red = 0; |
789df4b47508
[gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
864
diff
changeset
|
1178 c.blue = 0; |
789df4b47508
[gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
864
diff
changeset
|
1179 c.green = 0; |
789df4b47508
[gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
864
diff
changeset
|
1180 } |
789df4b47508
[gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
864
diff
changeset
|
1181 } else { |
789df4b47508
[gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
864
diff
changeset
|
1182 if (font_options & OPT_FONT_BGCOL) { |
789df4b47508
[gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
864
diff
changeset
|
1183 c.red = bgcolor.red << 8; |
789df4b47508
[gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
864
diff
changeset
|
1184 c.blue = bgcolor.blue << 8; |
789df4b47508
[gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
864
diff
changeset
|
1185 c.green = bgcolor.green << 8; |
789df4b47508
[gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
864
diff
changeset
|
1186 } else { |
789df4b47508
[gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
864
diff
changeset
|
1187 c.red = 0xffff; |
789df4b47508
[gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
864
diff
changeset
|
1188 c.blue = 0xffff; |
789df4b47508
[gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
864
diff
changeset
|
1189 c.green = 0xffff; |
789df4b47508
[gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
864
diff
changeset
|
1190 } |
789df4b47508
[gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
864
diff
changeset
|
1191 } |
789df4b47508
[gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
864
diff
changeset
|
1192 |
789df4b47508
[gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
864
diff
changeset
|
1193 style = gtk_style_new(); |
789df4b47508
[gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
864
diff
changeset
|
1194 style->bg[0] = c; |
789df4b47508
[gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
864
diff
changeset
|
1195 gtk_widget_set_style(pic, style); |
789df4b47508
[gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
864
diff
changeset
|
1196 gtk_style_unref(style); |
789df4b47508
[gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
864
diff
changeset
|
1197 } |
789df4b47508
[gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
864
diff
changeset
|
1198 |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1199 static void font_page() |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1200 { |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1201 GtkWidget *parent; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1202 GtkWidget *box; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1203 GtkWidget *label; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1204 GtkWidget *sep; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1205 GtkWidget *hbox; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1206 GtkWidget *button; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1207 GtkWidget *select; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1208 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1209 parent = prefdialog->parent; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1210 gtk_widget_destroy(prefdialog); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1211 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1212 prefdialog = gtk_frame_new(_("Font Options")); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1213 gtk_container_add(GTK_CONTAINER(parent), prefdialog); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1214 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1215 box = gtk_vbox_new(FALSE, 5); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1216 gtk_container_add(GTK_CONTAINER(prefdialog), box); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1217 gtk_widget_show(box); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1218 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1219 label = gtk_label_new(_("All options take effect immediately unless otherwise noted.")); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1220 gtk_box_pack_start(GTK_BOX(box), label, FALSE, FALSE, 5); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1221 gtk_widget_show(label); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1222 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1223 gaim_button(_("Bold Text"), &font_options, OPT_FONT_BOLD, box); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1224 gaim_button(_("Italics Text"), &font_options, OPT_FONT_ITALIC, box); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1225 gaim_button(_("Underlined Text"), &font_options, OPT_FONT_UNDERLINE, box); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1226 gaim_button(_("Strike Text"), &font_options, OPT_FONT_STRIKE, box); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1227 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1228 sep = gtk_hseparator_new(); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1229 gtk_box_pack_start(GTK_BOX(box), sep, FALSE, FALSE, 5); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1230 gtk_widget_show(sep); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1231 |
666
71ea550c22ac
[gaim-migrate @ 676]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
660
diff
changeset
|
1232 hbox = gtk_hbox_new(FALSE, 5); |
71ea550c22ac
[gaim-migrate @ 676]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
660
diff
changeset
|
1233 gtk_box_pack_start(GTK_BOX(box), hbox, FALSE, FALSE, 5); |
71ea550c22ac
[gaim-migrate @ 676]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
660
diff
changeset
|
1234 gtk_widget_show(hbox); |
71ea550c22ac
[gaim-migrate @ 676]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
660
diff
changeset
|
1235 |
873
789df4b47508
[gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
864
diff
changeset
|
1236 pref_fg_picture = show_color_pref(hbox, TRUE); |
666
71ea550c22ac
[gaim-migrate @ 676]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
660
diff
changeset
|
1237 button = gaim_button(_("Text Color"), &font_options, OPT_FONT_FGCOL, hbox); |
71ea550c22ac
[gaim-migrate @ 676]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
660
diff
changeset
|
1238 |
855
82673bb41e2f
[gaim-migrate @ 865]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
834
diff
changeset
|
1239 select = picture_button(prefs, _("Select"), fgcolor_xpm); |
666
71ea550c22ac
[gaim-migrate @ 676]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
660
diff
changeset
|
1240 gtk_box_pack_start(GTK_BOX(hbox), select, FALSE, FALSE, 5); |
71ea550c22ac
[gaim-migrate @ 676]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
660
diff
changeset
|
1241 if (!(font_options & OPT_FONT_FGCOL)) |
71ea550c22ac
[gaim-migrate @ 676]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
660
diff
changeset
|
1242 gtk_widget_set_sensitive(GTK_WIDGET(select), FALSE); |
858
3de6e98e8898
[gaim-migrate @ 868]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
855
diff
changeset
|
1243 gtk_signal_connect(GTK_OBJECT(select), "clicked", GTK_SIGNAL_FUNC(show_fgcolor_dialog), NULL); |
666
71ea550c22ac
[gaim-migrate @ 676]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
660
diff
changeset
|
1244 gtk_widget_show(select); |
71ea550c22ac
[gaim-migrate @ 676]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
660
diff
changeset
|
1245 |
71ea550c22ac
[gaim-migrate @ 676]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
660
diff
changeset
|
1246 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(toggle_sensitive), select); |
873
789df4b47508
[gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
864
diff
changeset
|
1247 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(update_color), pref_fg_picture); |
666
71ea550c22ac
[gaim-migrate @ 676]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
660
diff
changeset
|
1248 |
71ea550c22ac
[gaim-migrate @ 676]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
660
diff
changeset
|
1249 hbox = gtk_hbox_new(FALSE, 5); |
71ea550c22ac
[gaim-migrate @ 676]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
660
diff
changeset
|
1250 gtk_box_pack_start(GTK_BOX(box), hbox, FALSE, FALSE, 5); |
71ea550c22ac
[gaim-migrate @ 676]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
660
diff
changeset
|
1251 gtk_widget_show(hbox); |
71ea550c22ac
[gaim-migrate @ 676]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
660
diff
changeset
|
1252 |
873
789df4b47508
[gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
864
diff
changeset
|
1253 pref_bg_picture = show_color_pref(hbox, FALSE); |
666
71ea550c22ac
[gaim-migrate @ 676]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
660
diff
changeset
|
1254 button = gaim_button(_("Background Color"), &font_options, OPT_FONT_BGCOL, hbox); |
71ea550c22ac
[gaim-migrate @ 676]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
660
diff
changeset
|
1255 |
855
82673bb41e2f
[gaim-migrate @ 865]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
834
diff
changeset
|
1256 select = picture_button(prefs, _("Select"), bgcolor_xpm); |
666
71ea550c22ac
[gaim-migrate @ 676]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
660
diff
changeset
|
1257 gtk_box_pack_start(GTK_BOX(hbox), select, FALSE, FALSE, 5); |
71ea550c22ac
[gaim-migrate @ 676]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
660
diff
changeset
|
1258 if (!(font_options & OPT_FONT_BGCOL)) |
71ea550c22ac
[gaim-migrate @ 676]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
660
diff
changeset
|
1259 gtk_widget_set_sensitive(GTK_WIDGET(select), FALSE); |
858
3de6e98e8898
[gaim-migrate @ 868]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
855
diff
changeset
|
1260 gtk_signal_connect(GTK_OBJECT(select), "clicked", GTK_SIGNAL_FUNC(show_bgcolor_dialog), NULL); |
666
71ea550c22ac
[gaim-migrate @ 676]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
660
diff
changeset
|
1261 gtk_widget_show(select); |
71ea550c22ac
[gaim-migrate @ 676]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
660
diff
changeset
|
1262 |
71ea550c22ac
[gaim-migrate @ 676]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
660
diff
changeset
|
1263 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(toggle_sensitive), select); |
873
789df4b47508
[gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
864
diff
changeset
|
1264 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(update_color), pref_bg_picture); |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1265 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1266 sep = gtk_hseparator_new(); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1267 gtk_box_pack_start(GTK_BOX(box), sep, FALSE, FALSE, 5); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1268 gtk_widget_show(sep); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1269 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1270 hbox = gtk_hbox_new(FALSE, 5); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1271 gtk_box_pack_start(GTK_BOX(box), hbox, FALSE, FALSE, 5); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1272 gtk_widget_show(hbox); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1273 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1274 button = gaim_button(_("Font Face for Text"), &font_options, OPT_FONT_FACE, hbox); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1275 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1276 select = picture_button(prefs, _("Select"), fontface2_xpm); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1277 gtk_box_pack_start(GTK_BOX(hbox), select, FALSE, FALSE, 0); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1278 if (!(font_options & OPT_FONT_FACE)) |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1279 gtk_widget_set_sensitive(GTK_WIDGET(select), FALSE); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1280 gtk_signal_connect(GTK_OBJECT(select), "clicked", GTK_SIGNAL_FUNC(show_font_dialog), NULL); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1281 gtk_widget_show(select); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1282 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1283 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(toggle_sensitive), select); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1284 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1285 gtk_widget_show(prefdialog); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1286 } |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1287 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1288 static void sound_page() |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1289 { |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1290 GtkWidget *parent; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1291 GtkWidget *box; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1292 GtkWidget *label; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1293 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1294 parent = prefdialog->parent; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1295 gtk_widget_destroy(prefdialog); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1296 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1297 prefdialog = gtk_frame_new(_("Sound Options")); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1298 gtk_container_add(GTK_CONTAINER(parent), prefdialog); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1299 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1300 box = gtk_vbox_new(FALSE, 5); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1301 gtk_container_add(GTK_CONTAINER(prefdialog), box); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1302 gtk_widget_show(box); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1303 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1304 label = gtk_label_new(_("All options take effect immediately unless otherwise noted.")); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1305 gtk_box_pack_start(GTK_BOX(box), label, FALSE, FALSE, 5); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1306 gtk_widget_show(label); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1307 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1308 #ifdef USE_GNOME |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1309 gaim_button(_("Sounds go through GNOME"), &sound_options, OPT_SOUND_THROUGH_GNOME, box); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1310 #endif |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1311 gaim_button(_("No sounds when you log in"), &sound_options, OPT_SOUND_SILENT_SIGNON, box); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1312 gaim_button(_("Sounds while away"), &sound_options, OPT_SOUND_WHEN_AWAY, box); |
775
9614e69f68ca
[gaim-migrate @ 785]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
768
diff
changeset
|
1313 gaim_button(_("Beep instead of playing sound"), &sound_options, OPT_SOUND_BEEP, box); |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1314 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1315 gtk_widget_show(prefdialog); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1316 } |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1317 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1318 static void event_page() |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1319 { |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1320 GtkWidget *parent; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1321 GtkWidget *box; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1322 GtkWidget *label; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1323 GtkWidget *sep; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1324 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1325 parent = prefdialog->parent; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1326 gtk_widget_destroy(prefdialog); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1327 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1328 prefdialog = gtk_frame_new(_("Sound Events")); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1329 gtk_container_add(GTK_CONTAINER(parent), prefdialog); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1330 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1331 box = gtk_vbox_new(FALSE, 5); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1332 gtk_container_add(GTK_CONTAINER(prefdialog), box); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1333 gtk_widget_show(box); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1334 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1335 label = gtk_label_new(_("All options take effect immediately unless otherwise noted.")); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1336 gtk_box_pack_start(GTK_BOX(box), label, FALSE, FALSE, 5); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1337 gtk_widget_show(label); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1338 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1339 gaim_button(_("Sound when buddy logs in"), &sound_options, OPT_SOUND_LOGIN, box); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1340 gaim_button(_("Sound when buddy logs out"), &sound_options, OPT_SOUND_LOGOUT, box); |
723
b54b8d64d8b8
[gaim-migrate @ 733]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
717
diff
changeset
|
1341 |
b54b8d64d8b8
[gaim-migrate @ 733]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
717
diff
changeset
|
1342 sep = gtk_hseparator_new(); |
b54b8d64d8b8
[gaim-migrate @ 733]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
717
diff
changeset
|
1343 gtk_box_pack_start(GTK_BOX(box), sep, FALSE, FALSE, 5); |
b54b8d64d8b8
[gaim-migrate @ 733]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
717
diff
changeset
|
1344 gtk_widget_show(sep); |
b54b8d64d8b8
[gaim-migrate @ 733]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
717
diff
changeset
|
1345 |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1346 gaim_button(_("Sound when message is received"), &sound_options, OPT_SOUND_RECV, box); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1347 gaim_button(_("Sound when message is first received"), &sound_options, OPT_SOUND_FIRST_RCV, box); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1348 gaim_button(_("Sound when message is sent"), &sound_options, OPT_SOUND_SEND, box); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1349 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1350 sep = gtk_hseparator_new(); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1351 gtk_box_pack_start(GTK_BOX(box), sep, FALSE, FALSE, 5); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1352 gtk_widget_show(sep); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1353 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1354 gaim_button(_("Sound in chat rooms when people enter/leave"), &sound_options, OPT_SOUND_CHAT_JOIN, box); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1355 gaim_button(_("Sound in chat rooms when people talk"), &sound_options, OPT_SOUND_CHAT_SAY, box); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1356 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1357 gtk_widget_show(prefdialog); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1358 } |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1359 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1360 static struct away_message *cur_message; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1361 static char *edited_message; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1362 static GtkWidget *away_text; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1363 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1364 void away_list_clicked(GtkWidget *widget, struct away_message *a) |
1 | 1365 { |
1366 gchar buffer[2048]; | |
1367 guint text_len; | |
821 | 1368 |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1369 cur_message = a; |
821 | 1370 |
1 | 1371 /* Get proper Length */ |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1372 text_len = gtk_text_get_length(GTK_TEXT(away_text)); |
821 | 1373 |
1 | 1374 /* Clear the Box */ |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1375 gtk_text_set_point(GTK_TEXT(away_text), 0 ); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1376 gtk_text_forward_delete (GTK_TEXT(away_text), text_len); |
1 | 1377 |
1378 /* Fill the text box with new message */ | |
1379 strcpy(buffer, a->message); | |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1380 gtk_text_insert(GTK_TEXT(away_text), NULL, NULL, NULL, buffer, -1); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1381 } |
821 | 1382 |
1383 void save_away_message(GtkWidget *widget, void *dummy) | |
1384 { | |
1385 /* grab the current message */ | |
763 | 1386 edited_message = gtk_editable_get_chars(GTK_EDITABLE(away_text), 0, -1); |
821 | 1387 strcpy(cur_message->message, edited_message); |
1388 save_prefs(); | |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1389 } |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1390 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1391 void remove_away_message(GtkWidget *widget, void *dummy) |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1392 { |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1393 GList *i; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1394 struct away_message *a; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1395 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1396 i = GTK_LIST(prefs_away_list)->selection; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1397 |
832
0142b4c66394
[gaim-migrate @ 842]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
830
diff
changeset
|
1398 if (!i->next) { |
0142b4c66394
[gaim-migrate @ 842]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
830
diff
changeset
|
1399 int text_len = gtk_text_get_length(GTK_TEXT(away_text)); |
0142b4c66394
[gaim-migrate @ 842]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
830
diff
changeset
|
1400 gtk_text_set_point(GTK_TEXT(away_text), 0 ); |
0142b4c66394
[gaim-migrate @ 842]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
830
diff
changeset
|
1401 gtk_text_forward_delete (GTK_TEXT(away_text), text_len); |
0142b4c66394
[gaim-migrate @ 842]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
830
diff
changeset
|
1402 } |
0142b4c66394
[gaim-migrate @ 842]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
830
diff
changeset
|
1403 a = gtk_object_get_user_data(GTK_OBJECT(i->data)); |
0142b4c66394
[gaim-migrate @ 842]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
830
diff
changeset
|
1404 rem_away_mess(NULL, a); |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1405 } |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1406 |
678
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
1407 static void paldest(GtkWidget *m, gpointer n) |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
1408 { |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
1409 gtk_widget_destroy(prefs_away_list); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
1410 prefs_away_list = NULL; |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
1411 } |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
1412 |
832
0142b4c66394
[gaim-migrate @ 842]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
830
diff
changeset
|
1413 static void do_away_mess(GtkWidget *m, gpointer n) |
0142b4c66394
[gaim-migrate @ 842]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
830
diff
changeset
|
1414 { |
0142b4c66394
[gaim-migrate @ 842]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
830
diff
changeset
|
1415 GList *i = GTK_LIST(prefs_away_list)->selection; |
0142b4c66394
[gaim-migrate @ 842]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
830
diff
changeset
|
1416 if (i) |
0142b4c66394
[gaim-migrate @ 842]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
830
diff
changeset
|
1417 do_away_message(NULL, gtk_object_get_user_data(GTK_OBJECT(i->data))); |
0142b4c66394
[gaim-migrate @ 842]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
830
diff
changeset
|
1418 } |
0142b4c66394
[gaim-migrate @ 842]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
830
diff
changeset
|
1419 |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1420 static void away_page() |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1421 { |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1422 GtkWidget *parent; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1423 GtkWidget *box; |
832
0142b4c66394
[gaim-migrate @ 842]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
830
diff
changeset
|
1424 GtkWidget *hbox; |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1425 GtkWidget *top; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1426 GtkWidget *bot; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1427 GtkWidget *sw; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1428 GtkWidget *sw2; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1429 GtkWidget *button; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1430 GtkWidget *label; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1431 GtkWidget *list_item; |
832
0142b4c66394
[gaim-migrate @ 842]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
830
diff
changeset
|
1432 GtkWidget *sep; |
940 | 1433 GSList *awy = away_messages; |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1434 struct away_message *a; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1435 char buffer[BUF_LONG]; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1436 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1437 parent = prefdialog->parent; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1438 gtk_widget_destroy(prefdialog); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1439 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1440 prefdialog = gtk_frame_new(_("Away Messages")); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1441 gtk_container_add(GTK_CONTAINER(parent), prefdialog); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1442 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1443 box = gtk_vbox_new(FALSE, 5); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1444 gtk_container_add(GTK_CONTAINER(prefdialog), box); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1445 gtk_widget_show(box); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1446 |
832
0142b4c66394
[gaim-migrate @ 842]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
830
diff
changeset
|
1447 hbox = gtk_hbox_new(TRUE, 0); |
0142b4c66394
[gaim-migrate @ 842]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
830
diff
changeset
|
1448 gtk_box_pack_start(GTK_BOX(box), hbox, FALSE, FALSE, 5); |
0142b4c66394
[gaim-migrate @ 842]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
830
diff
changeset
|
1449 gtk_widget_set_usize(hbox, -1, 30); |
0142b4c66394
[gaim-migrate @ 842]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
830
diff
changeset
|
1450 gtk_widget_show(hbox); |
0142b4c66394
[gaim-migrate @ 842]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
830
diff
changeset
|
1451 |
0142b4c66394
[gaim-migrate @ 842]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
830
diff
changeset
|
1452 hbox = gtk_hbox_new(TRUE, 0); |
0142b4c66394
[gaim-migrate @ 842]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
830
diff
changeset
|
1453 gtk_box_pack_start(GTK_BOX(box), hbox, FALSE, FALSE, 5); |
0142b4c66394
[gaim-migrate @ 842]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
830
diff
changeset
|
1454 gtk_widget_show(hbox); |
0142b4c66394
[gaim-migrate @ 842]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
830
diff
changeset
|
1455 |
0142b4c66394
[gaim-migrate @ 842]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
830
diff
changeset
|
1456 label = gtk_label_new(_("Title")); |
0142b4c66394
[gaim-migrate @ 842]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
830
diff
changeset
|
1457 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 5); |
0142b4c66394
[gaim-migrate @ 842]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
830
diff
changeset
|
1458 gtk_widget_show(label); |
0142b4c66394
[gaim-migrate @ 842]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
830
diff
changeset
|
1459 |
0142b4c66394
[gaim-migrate @ 842]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
830
diff
changeset
|
1460 label = gtk_label_new(_("Message")); |
0142b4c66394
[gaim-migrate @ 842]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
830
diff
changeset
|
1461 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 5); |
0142b4c66394
[gaim-migrate @ 842]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
830
diff
changeset
|
1462 gtk_widget_show(label); |
0142b4c66394
[gaim-migrate @ 842]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
830
diff
changeset
|
1463 |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1464 top = gtk_hbox_new(FALSE, 0); |
832
0142b4c66394
[gaim-migrate @ 842]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
830
diff
changeset
|
1465 gtk_box_pack_start(GTK_BOX(box), top, FALSE, TRUE, 0); |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1466 gtk_widget_show(top); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1467 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1468 sw = gtk_scrolled_window_new(NULL, NULL); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1469 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1470 GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1471 gtk_box_pack_start(GTK_BOX(top), sw, TRUE, TRUE, 0); |
832
0142b4c66394
[gaim-migrate @ 842]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
830
diff
changeset
|
1472 gtk_widget_set_usize(sw, -1, 225); |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1473 gtk_widget_show(sw); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1474 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1475 prefs_away_list = gtk_list_new(); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1476 gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(sw), prefs_away_list); |
678
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
1477 gtk_signal_connect(GTK_OBJECT(prefs_away_list), "destroy", GTK_SIGNAL_FUNC(paldest), 0); |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1478 gtk_widget_show(prefs_away_list); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1479 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1480 sw2 = gtk_scrolled_window_new(NULL, NULL); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1481 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw2), |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1482 GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1483 gtk_box_pack_start(GTK_BOX(top), sw2, TRUE, TRUE, 0); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1484 gtk_widget_show(sw2); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1485 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1486 away_text = gtk_text_new(NULL, NULL); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1487 gtk_container_add(GTK_CONTAINER(sw2), away_text); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1488 gtk_text_set_word_wrap(GTK_TEXT(away_text), TRUE); |
832
0142b4c66394
[gaim-migrate @ 842]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
830
diff
changeset
|
1489 gtk_text_set_editable(GTK_TEXT(away_text), FALSE); |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1490 gtk_widget_show(away_text); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1491 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1492 bot = gtk_hbox_new(FALSE, 0); |
832
0142b4c66394
[gaim-migrate @ 842]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
830
diff
changeset
|
1493 gtk_box_pack_start(GTK_BOX(box), bot, FALSE, FALSE, 5); |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1494 gtk_widget_show(bot); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1495 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1496 button = picture_button(prefs, _("Add"), gnome_add_xpm); |
832
0142b4c66394
[gaim-migrate @ 842]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
830
diff
changeset
|
1497 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(create_away_mess), NULL); |
0142b4c66394
[gaim-migrate @ 842]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
830
diff
changeset
|
1498 gtk_box_pack_start(GTK_BOX(bot), button, TRUE, FALSE, 5); |
0142b4c66394
[gaim-migrate @ 842]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
830
diff
changeset
|
1499 |
0142b4c66394
[gaim-migrate @ 842]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
830
diff
changeset
|
1500 button = picture_button(prefs, _("Edit"), save_xpm); |
717 | 1501 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(create_away_mess), button); |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1502 gtk_box_pack_start(GTK_BOX(bot), button, TRUE, FALSE, 5); |
832
0142b4c66394
[gaim-migrate @ 842]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
830
diff
changeset
|
1503 |
0142b4c66394
[gaim-migrate @ 842]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
830
diff
changeset
|
1504 button = picture_button(prefs, _("Make Away"), gnome_preferences_xpm); |
0142b4c66394
[gaim-migrate @ 842]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
830
diff
changeset
|
1505 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(do_away_mess), NULL); |
0142b4c66394
[gaim-migrate @ 842]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
830
diff
changeset
|
1506 gtk_box_pack_start(GTK_BOX(bot), button, TRUE, FALSE, 5); |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1507 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1508 button = picture_button(prefs, _("Remove"), gnome_remove_xpm); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1509 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(remove_away_message), NULL); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1510 gtk_box_pack_start(GTK_BOX(bot), button, TRUE, FALSE, 5); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1511 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1512 if (awy != NULL) { |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1513 a = (struct away_message *)awy->data; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1514 g_snprintf(buffer, sizeof(buffer), "%s", a->message); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1515 gtk_text_insert(GTK_TEXT(away_text), NULL, NULL, NULL, buffer, -1); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1516 } |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1517 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1518 while (awy) { |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1519 a = (struct away_message *)awy->data; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1520 label = gtk_label_new(a->name); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1521 list_item = gtk_list_item_new(); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1522 gtk_container_add(GTK_CONTAINER(list_item), label); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1523 gtk_signal_connect(GTK_OBJECT(list_item), "select", GTK_SIGNAL_FUNC(away_list_clicked), a); |
821 | 1524 /* gtk_signal_connect(GTK_OBJECT(list_item), "deselect", GTK_SIGNAL_FUNC(away_list_unclicked), a);*/ |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1525 gtk_object_set_user_data(GTK_OBJECT(list_item), a); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1526 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1527 gtk_widget_show(label); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1528 gtk_container_add(GTK_CONTAINER(prefs_away_list), list_item); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1529 gtk_widget_show(list_item); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1530 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1531 awy = awy->next; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1532 } |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1533 |
832
0142b4c66394
[gaim-migrate @ 842]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
830
diff
changeset
|
1534 sep = gtk_hseparator_new(); |
0142b4c66394
[gaim-migrate @ 842]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
830
diff
changeset
|
1535 gtk_box_pack_start(GTK_BOX(box), sep, FALSE, FALSE, 0); |
0142b4c66394
[gaim-migrate @ 842]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
830
diff
changeset
|
1536 gtk_widget_show(sep); |
0142b4c66394
[gaim-migrate @ 842]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
830
diff
changeset
|
1537 |
0142b4c66394
[gaim-migrate @ 842]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
830
diff
changeset
|
1538 hbox = gtk_hbox_new(TRUE, 0); |
0142b4c66394
[gaim-migrate @ 842]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
830
diff
changeset
|
1539 gtk_box_pack_start(GTK_BOX(box), hbox, FALSE, FALSE, 0); |
0142b4c66394
[gaim-migrate @ 842]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
830
diff
changeset
|
1540 gtk_widget_show(hbox); |
0142b4c66394
[gaim-migrate @ 842]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
830
diff
changeset
|
1541 |
0142b4c66394
[gaim-migrate @ 842]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
830
diff
changeset
|
1542 gaim_button(_("Ignore new conversations when away"), &general_options, OPT_GEN_DISCARD_WHEN_AWAY, hbox); |
0142b4c66394
[gaim-migrate @ 842]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
830
diff
changeset
|
1543 gaim_button(_("Sounds while away"), &sound_options, OPT_SOUND_WHEN_AWAY, hbox); |
0142b4c66394
[gaim-migrate @ 842]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
830
diff
changeset
|
1544 |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1545 gtk_widget_show(prefdialog); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1546 } |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1547 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1548 static GtkWidget *browser_entry = NULL; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1549 static GtkWidget *new_window = NULL; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1550 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1551 static void set_browser(GtkWidget *w, int *data) |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1552 { |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1553 web_browser = (int)data; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1554 if (web_browser != BROWSER_MANUAL) { |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1555 if (browser_entry) |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1556 gtk_widget_set_sensitive(browser_entry, FALSE); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1557 } else { |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1558 if (browser_entry) |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1559 gtk_widget_set_sensitive(browser_entry, TRUE); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1560 } |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1561 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1562 if (web_browser != BROWSER_NETSCAPE) { |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1563 if (new_window) |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1564 gtk_widget_set_sensitive(new_window, FALSE); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1565 } else { |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1566 if (new_window) |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1567 gtk_widget_set_sensitive(new_window, TRUE); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1568 } |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1569 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1570 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1571 save_prefs(); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1572 } |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1573 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1574 static int manualentry_key_pressed(GtkWidget *w, GdkEvent *event, void *dummy) |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1575 { |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1576 g_snprintf(web_command, sizeof(web_command), "%s", gtk_entry_get_text(GTK_ENTRY(browser_entry))); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1577 save_prefs(); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1578 return TRUE; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1579 } |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1580 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1581 static GtkWidget *browser_radio(char *label, int which, GtkWidget *box, GtkWidget *set) |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1582 { |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1583 GtkWidget *opt; |
1 | 1584 |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1585 if (!set) |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1586 opt = gtk_radio_button_new_with_label(NULL, label); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1587 else |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1588 opt = gtk_radio_button_new_with_label(gtk_radio_button_group(GTK_RADIO_BUTTON(set)), label); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1589 gtk_box_pack_start(GTK_BOX(box), opt, FALSE, FALSE, 0); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1590 gtk_signal_connect(GTK_OBJECT(opt), "clicked", GTK_SIGNAL_FUNC(set_browser), (void *)which); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1591 gtk_widget_show(opt); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1592 if (web_browser == which) |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1593 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(opt), TRUE); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1594 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1595 return opt; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1596 } |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1597 |
748
c32d4fae9bbd
[gaim-migrate @ 758]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
747
diff
changeset
|
1598 static void brentdes(GtkWidget *m, gpointer n) |
c32d4fae9bbd
[gaim-migrate @ 758]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
747
diff
changeset
|
1599 { |
c32d4fae9bbd
[gaim-migrate @ 758]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
747
diff
changeset
|
1600 browser_entry = NULL; |
c32d4fae9bbd
[gaim-migrate @ 758]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
747
diff
changeset
|
1601 new_window = NULL; |
c32d4fae9bbd
[gaim-migrate @ 758]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
747
diff
changeset
|
1602 } |
c32d4fae9bbd
[gaim-migrate @ 758]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
747
diff
changeset
|
1603 |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1604 static void browser_page() |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1605 { |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1606 GtkWidget *parent; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1607 GtkWidget *box; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1608 GtkWidget *label; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1609 GtkWidget *opt; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1610 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1611 parent = prefdialog->parent; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1612 gtk_widget_destroy(prefdialog); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1613 prefs_away_list = NULL; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1614 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1615 prefdialog = gtk_frame_new(_("Browser Options")); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1616 gtk_container_add(GTK_CONTAINER(parent), prefdialog); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1617 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1618 box = gtk_vbox_new(FALSE, 5); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1619 gtk_container_add(GTK_CONTAINER(prefdialog), box); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1620 gtk_widget_show(box); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1621 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1622 label = gtk_label_new(_("All options take effect immediately unless otherwise noted.")); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1623 gtk_box_pack_start(GTK_BOX(box), label, FALSE, FALSE, 5); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1624 gtk_widget_show(label); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1625 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1626 opt = browser_radio(_("Netscape"), BROWSER_NETSCAPE, box, NULL); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1627 opt = browser_radio(_("KFM"), BROWSER_KFM, box, opt); |
734 | 1628 #ifdef USE_GNOME |
1629 opt = browser_radio(_("GNOME URL Handler"), BROWSER_GNOME, box, opt); | |
1630 #endif /* USE_GNOME */ | |
735
51f1b6f7794b
[gaim-migrate @ 745]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
734
diff
changeset
|
1631 opt = browser_radio(_("Internal HTML Widget (Quite likely a bad idea!)"), BROWSER_INTERNAL, box, opt); |
51f1b6f7794b
[gaim-migrate @ 745]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
734
diff
changeset
|
1632 opt = browser_radio(_("Manual"), BROWSER_MANUAL, box, opt); |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1633 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1634 browser_entry = gtk_entry_new(); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1635 gtk_box_pack_start(GTK_BOX(box), browser_entry, FALSE, FALSE, 0); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1636 gtk_entry_set_text(GTK_ENTRY(browser_entry), web_command); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1637 gtk_signal_connect(GTK_OBJECT(browser_entry), "focus_out_event", GTK_SIGNAL_FUNC(manualentry_key_pressed), NULL); |
748
c32d4fae9bbd
[gaim-migrate @ 758]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
747
diff
changeset
|
1638 gtk_signal_connect(GTK_OBJECT(browser_entry), "destroy", GTK_SIGNAL_FUNC(brentdes), NULL); |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1639 gtk_widget_show(browser_entry); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1640 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1641 new_window = gaim_button(_("Pop up new window by default"), &general_options, OPT_GEN_BROWSER_POPUP, box); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1642 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1643 if (web_browser != BROWSER_MANUAL) { |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1644 gtk_widget_set_sensitive(browser_entry, FALSE); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1645 } else { |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1646 gtk_widget_set_sensitive(browser_entry, TRUE); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1647 } |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1648 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1649 if (web_browser != BROWSER_NETSCAPE) { |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1650 gtk_widget_set_sensitive(new_window, FALSE); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1651 } else { |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1652 gtk_widget_set_sensitive(new_window, TRUE); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1653 } |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1654 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1655 gtk_widget_show(prefdialog); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1656 } |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1657 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1658 static void try_me(GtkCTree *ctree, GtkCTreeNode *node) |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1659 { |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1660 /* this is a hack */ |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1661 void (*func)(); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1662 func = gtk_ctree_node_get_row_data(ctree, node); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1663 (*func)(); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1664 } |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1665 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1666 void show_prefs() |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1667 { |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1668 GtkWidget *vbox; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1669 GtkWidget *hpaned; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1670 GtkWidget *scroll; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1671 GtkWidget *preftree; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1672 GtkWidget *container; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1673 GtkWidget *hbox; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1674 GtkWidget *close; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1675 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1676 if (prefs) { |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1677 gtk_widget_show(prefs); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1678 return; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1679 } |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1680 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1681 prefs = gtk_window_new(GTK_WINDOW_TOPLEVEL); |
905 | 1682 gtk_window_set_wmclass(GTK_WINDOW(prefs), "preferences", "Gaim"); |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1683 gtk_widget_realize(prefs); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1684 aol_icon(prefs->window); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1685 gtk_container_border_width(GTK_CONTAINER(prefs), 10); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1686 gtk_window_set_title(GTK_WINDOW(prefs), _("Gaim - Preferences")); |
768
0b160e27904b
[gaim-migrate @ 778]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
763
diff
changeset
|
1687 gtk_widget_set_usize(prefs, 600, 550); |
915
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
1688 gtk_signal_connect(GTK_OBJECT(prefs), "destroy", |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
1689 GTK_SIGNAL_FUNC(delete_prefs), NULL); |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1690 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1691 vbox = gtk_vbox_new(FALSE, 5); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1692 gtk_container_add(GTK_CONTAINER(prefs), vbox); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1693 gtk_widget_show(vbox); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1694 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1695 hpaned = gtk_hpaned_new(); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1696 gtk_box_pack_start(GTK_BOX(vbox), hpaned, TRUE, TRUE, 5); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1697 gtk_widget_show(hpaned); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1698 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1699 scroll = gtk_scrolled_window_new(NULL, NULL); |
768
0b160e27904b
[gaim-migrate @ 778]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
763
diff
changeset
|
1700 gtk_paned_pack1(GTK_PANED(hpaned), scroll, FALSE, FALSE); |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1701 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scroll), |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1702 GTK_POLICY_NEVER, GTK_POLICY_NEVER); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1703 gtk_widget_set_usize(scroll, 125, -1); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1704 gtk_widget_show(scroll); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1705 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1706 preftree = gtk_ctree_new(1, 0); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1707 gtk_ctree_set_line_style (GTK_CTREE(preftree), GTK_CTREE_LINES_SOLID); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1708 gtk_ctree_set_expander_style(GTK_CTREE(preftree), GTK_CTREE_EXPANDER_TRIANGLE); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1709 gtk_clist_set_reorderable(GTK_CLIST(preftree), FALSE); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1710 gtk_container_add(GTK_CONTAINER(scroll), preftree); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1711 gtk_signal_connect(GTK_OBJECT(preftree), "tree_select_row", GTK_SIGNAL_FUNC(try_me), NULL); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1712 gtk_widget_show(preftree); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1713 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1714 container = gtk_frame_new(NULL); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1715 gtk_container_set_border_width(GTK_CONTAINER(container), 0); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1716 gtk_frame_set_shadow_type(GTK_FRAME(container), GTK_SHADOW_NONE); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1717 gtk_paned_pack2(GTK_PANED(hpaned), container, TRUE, TRUE); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1718 gtk_widget_show(container); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1719 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1720 prefdialog = gtk_vbox_new(FALSE, 5); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1721 gtk_container_add(GTK_CONTAINER(container), prefdialog); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1722 gtk_widget_show(prefdialog); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1723 |
901
f168f2c7b357
[gaim-migrate @ 911]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
893
diff
changeset
|
1724 prefs_build_general(preftree); |
960
fa681641643d
[gaim-migrate @ 970]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
940
diff
changeset
|
1725 prefs_build_proxy(preftree); |
930
a88af4cc626a
[gaim-migrate @ 940]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
915
diff
changeset
|
1726 #ifdef USE_APPLET |
a88af4cc626a
[gaim-migrate @ 940]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
915
diff
changeset
|
1727 prefs_build_applet(preftree); |
a88af4cc626a
[gaim-migrate @ 940]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
915
diff
changeset
|
1728 #endif |
901
f168f2c7b357
[gaim-migrate @ 911]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
893
diff
changeset
|
1729 prefs_build_buddy(preftree); |
f168f2c7b357
[gaim-migrate @ 911]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
893
diff
changeset
|
1730 prefs_build_convo(preftree); |
f168f2c7b357
[gaim-migrate @ 911]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
893
diff
changeset
|
1731 prefs_build_sound(preftree); |
f168f2c7b357
[gaim-migrate @ 911]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
893
diff
changeset
|
1732 prefs_build_away(preftree); |
f168f2c7b357
[gaim-migrate @ 911]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
893
diff
changeset
|
1733 prefs_build_browser(preftree); |
f168f2c7b357
[gaim-migrate @ 911]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
893
diff
changeset
|
1734 |
f168f2c7b357
[gaim-migrate @ 911]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
893
diff
changeset
|
1735 //general_page(); |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1736 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1737 hbox = gtk_hbox_new(FALSE, 5); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1738 gtk_box_pack_end(GTK_BOX(vbox), hbox, FALSE, FALSE, 5); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1739 gtk_widget_show(hbox); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1740 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1741 close = picture_button(prefs, _("Close"), cancel_xpm); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1742 gtk_box_pack_end(GTK_BOX(hbox), close, FALSE, FALSE, 5); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1743 gtk_signal_connect(GTK_OBJECT(close), "clicked", GTK_SIGNAL_FUNC(handle_delete), NULL); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1744 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1745 gtk_widget_show(prefs); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1746 } |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1747 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1748 char debug_buff[BUF_LONG]; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1749 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1750 static gint debug_delete(GtkWidget *w, GdkEvent *event, void *dummy) |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1751 { |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1752 if (debugbutton) |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1753 gtk_button_clicked(GTK_BUTTON(debugbutton)); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1754 if (general_options & OPT_GEN_DEBUG) |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1755 { |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1756 general_options = general_options ^ (int)OPT_GEN_DEBUG; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1757 save_prefs(); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1758 } |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1759 g_free(dw); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1760 dw=NULL; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1761 return FALSE; |
1 | 1762 |
1763 } | |
1764 | |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1765 static void build_debug() |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1766 { |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1767 GtkWidget *scroll; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1768 GtkWidget *box; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1769 if (!dw) |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1770 dw = g_new0(struct debug_window, 1); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1771 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1772 box = gtk_hbox_new(FALSE,0); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1773 dw->window = gtk_window_new(GTK_WINDOW_DIALOG); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1774 gtk_window_set_title(GTK_WINDOW(dw->window), _("GAIM debug output window")); |
905 | 1775 gtk_window_set_wmclass(GTK_WINDOW(dw->window), |
1776 "debug_out", "Gaim"); | |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1777 gtk_container_add(GTK_CONTAINER(dw->window), box); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1778 dw->entry = gtk_text_new(NULL,NULL); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1779 gtk_widget_set_usize(dw->entry, 500, 200); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1780 scroll = gtk_vscrollbar_new(GTK_TEXT(dw->entry)->vadj); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1781 gtk_box_pack_start(GTK_BOX(box), dw->entry, TRUE,TRUE,0); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1782 gtk_box_pack_end(GTK_BOX(box), scroll,FALSE,FALSE,0); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1783 gtk_widget_show(dw->entry); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1784 gtk_widget_show(scroll); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1785 gtk_widget_show(box); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1786 gtk_signal_connect(GTK_OBJECT(dw->window),"delete_event", GTK_SIGNAL_FUNC(debug_delete), NULL); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1787 gtk_widget_show(dw->window); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1788 } |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1789 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1790 void show_debug(GtkObject *obj) |
1 | 1791 { |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1792 if((general_options & OPT_GEN_DEBUG)) { |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1793 if(!dw || !dw->window) |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1794 build_debug(); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1795 gtk_widget_show(dw->window); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1796 } else { |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1797 if (!dw) return; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1798 gtk_widget_destroy(dw->window); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1799 dw->window = NULL; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1800 } |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1801 } |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1802 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1803 void debug_print(char *chars) |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1804 { |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1805 if (general_options & OPT_GEN_DEBUG && dw) |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1806 gtk_text_insert(GTK_TEXT(dw->entry), NULL, NULL, NULL, chars, strlen(chars)); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1807 #ifdef DEBUG |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1808 printf("%s\n", chars); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1809 #endif |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1810 } |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1811 |
970 | 1812 void debug_printf(char *fmt, ...) |
1813 { | |
1814 va_list ap; | |
1815 gchar *s; | |
1816 | |
1817 if (general_options & OPT_GEN_DEBUG && dw) { | |
1818 va_start(ap, fmt); | |
1819 s = g_strdup_vprintf(fmt, ap); | |
1820 va_end(ap); | |
1821 | |
1822 gtk_text_insert(GTK_TEXT(dw->entry), NULL, NULL, NULL, s, -1); | |
1823 g_free(s); | |
1824 } | |
1825 } | |
1826 | |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1827 static gint handle_delete(GtkWidget *w, GdkEvent *event, void *dummy) |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1828 { |
572
faca21605e1b
[gaim-migrate @ 582]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
570
diff
changeset
|
1829 save_prefs(); |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1830 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1831 if (cp) |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1832 g_free(cp); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1833 cp = NULL; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1834 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1835 if (event == NULL) |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1836 gtk_widget_destroy(prefs); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1837 prefs = NULL; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1838 prefdialog = NULL; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1839 debugbutton = NULL; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1840 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1841 return FALSE; |
1 | 1842 } |
1843 | |
915
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
1844 static void delete_prefs(GtkWidget *w, void *data) |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
1845 { |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
1846 if (prefs) { |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
1847 save_prefs(); |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
1848 gtk_widget_destroy(prefs); |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
1849 } |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
1850 prefs = NULL; |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
1851 } |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
1852 |
378c862a2381
[gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
910
diff
changeset
|
1853 |
1 | 1854 void set_option(GtkWidget *w, int *option) |
1855 { | |
1856 *option = !(*option); | |
1857 } | |
1858 | |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1859 void set_general_option(GtkWidget *w, int *option) |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1860 { |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1861 general_options = general_options ^ (int)option; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1862 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1863 if ((int)option == OPT_GEN_LOG_ALL) |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1864 update_log_convs(); |
705
dcf672c5a1ff
[gaim-migrate @ 715]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
702
diff
changeset
|
1865 |
960
fa681641643d
[gaim-migrate @ 970]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
940
diff
changeset
|
1866 /* |
705
dcf672c5a1ff
[gaim-migrate @ 715]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
702
diff
changeset
|
1867 if (prefrem) |
dcf672c5a1ff
[gaim-migrate @ 715]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
702
diff
changeset
|
1868 gtk_signal_handler_block_by_data(GTK_OBJECT(prefrem), (int *)OPT_GEN_REMEMBER_PASS); |
dcf672c5a1ff
[gaim-migrate @ 715]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
702
diff
changeset
|
1869 if (remember) |
dcf672c5a1ff
[gaim-migrate @ 715]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
702
diff
changeset
|
1870 gtk_signal_handler_block_by_data(GTK_OBJECT(remember), (int *)OPT_GEN_REMEMBER_PASS); |
dcf672c5a1ff
[gaim-migrate @ 715]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
702
diff
changeset
|
1871 if (prefrem) |
dcf672c5a1ff
[gaim-migrate @ 715]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
702
diff
changeset
|
1872 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(prefrem), |
dcf672c5a1ff
[gaim-migrate @ 715]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
702
diff
changeset
|
1873 (general_options & OPT_GEN_REMEMBER_PASS)); |
dcf672c5a1ff
[gaim-migrate @ 715]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
702
diff
changeset
|
1874 if (remember) |
dcf672c5a1ff
[gaim-migrate @ 715]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
702
diff
changeset
|
1875 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(remember), |
dcf672c5a1ff
[gaim-migrate @ 715]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
702
diff
changeset
|
1876 (general_options & OPT_GEN_REMEMBER_PASS)); |
dcf672c5a1ff
[gaim-migrate @ 715]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
702
diff
changeset
|
1877 if (prefrem) |
dcf672c5a1ff
[gaim-migrate @ 715]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
702
diff
changeset
|
1878 gtk_signal_handler_unblock_by_data(GTK_OBJECT(prefrem), (int *)OPT_GEN_REMEMBER_PASS); |
dcf672c5a1ff
[gaim-migrate @ 715]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
702
diff
changeset
|
1879 if (remember) |
dcf672c5a1ff
[gaim-migrate @ 715]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
702
diff
changeset
|
1880 gtk_signal_handler_unblock_by_data(GTK_OBJECT(remember), (int *)OPT_GEN_REMEMBER_PASS); |
960
fa681641643d
[gaim-migrate @ 970]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
940
diff
changeset
|
1881 */ |
705
dcf672c5a1ff
[gaim-migrate @ 715]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
702
diff
changeset
|
1882 |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1883 save_prefs(); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1884 } |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1885 |
1 | 1886 void set_display_option(GtkWidget *w, int *option) |
1887 { | |
1888 display_options = display_options ^ (int)option; | |
9 | 1889 |
701
8a9e9e694ba4
[gaim-migrate @ 711]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
696
diff
changeset
|
1890 if (blist) build_imchat_box(!(display_options & OPT_DISP_NO_BUTTONS)); |
696
97b75ed155b0
[gaim-migrate @ 706]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
683
diff
changeset
|
1891 |
18 | 1892 if (blist) update_button_pix(); |
9 | 1893 |
84 | 1894 #ifdef USE_APPLET |
82 | 1895 update_pixmaps(); |
1896 #endif | |
572
faca21605e1b
[gaim-migrate @ 582]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
570
diff
changeset
|
1897 |
faca21605e1b
[gaim-migrate @ 582]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
570
diff
changeset
|
1898 save_prefs(); |
1 | 1899 } |
1900 | |
1901 void set_sound_option(GtkWidget *w, int *option) | |
1902 { | |
1903 sound_options = sound_options ^ (int)option; | |
572
faca21605e1b
[gaim-migrate @ 582]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
570
diff
changeset
|
1904 save_prefs(); |
1 | 1905 } |
1906 | |
1907 void set_font_option(GtkWidget *w, int *option) | |
1908 { | |
1909 font_options = font_options ^ (int)option; | |
1910 | |
1911 update_font_buttons(); | |
572
faca21605e1b
[gaim-migrate @ 582]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
570
diff
changeset
|
1912 |
faca21605e1b
[gaim-migrate @ 582]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
570
diff
changeset
|
1913 save_prefs(); |
1 | 1914 } |
1915 | |
1916 GtkWidget *gaim_button(const char *text, int *options, int option, GtkWidget *page) | |
1917 { | |
1918 GtkWidget *button; | |
1919 button = gtk_check_button_new_with_label(text); | |
1920 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(button), (*options & option)); | |
1921 gtk_box_pack_start(GTK_BOX(page), button, FALSE, FALSE, 0); | |
1922 | |
1923 if (options == &font_options) | |
1924 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(set_font_option), (int *)option); | |
1925 | |
1926 if (options == &sound_options) | |
1927 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(set_sound_option), (int *)option); | |
1928 if (options == &display_options) | |
1929 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(set_display_option), (int *)option); | |
1930 | |
1931 if (options == &general_options) | |
1932 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(set_general_option), (int *)option); | |
1933 gtk_widget_show(button); | |
1934 | |
1935 return button; | |
1936 } | |
1937 | |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1938 void prefs_build_general(GtkWidget *preftree) |
1 | 1939 { |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1940 GtkCTreeNode *parent; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1941 char *text[1]; |
338
9d258a0aa560
[gaim-migrate @ 348]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
337
diff
changeset
|
1942 |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1943 text[0] = _("General"); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1944 parent = gtk_ctree_insert_node(GTK_CTREE(preftree), NULL, NULL, |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1945 text, 5, NULL, NULL, NULL, NULL, 0, 1); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1946 gtk_ctree_node_set_row_data(GTK_CTREE(preftree), parent, general_page); |
901
f168f2c7b357
[gaim-migrate @ 911]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
893
diff
changeset
|
1947 |
f168f2c7b357
[gaim-migrate @ 911]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
893
diff
changeset
|
1948 gtk_ctree_select(GTK_CTREE(preftree), parent); |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1949 } |
1 | 1950 |
960
fa681641643d
[gaim-migrate @ 970]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
940
diff
changeset
|
1951 void prefs_build_proxy(GtkWidget *preftree) |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1952 { |
960
fa681641643d
[gaim-migrate @ 970]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
940
diff
changeset
|
1953 GtkCTreeNode *parent; |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1954 char *text[1]; |
1 | 1955 |
960
fa681641643d
[gaim-migrate @ 970]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
940
diff
changeset
|
1956 text[0] = _("Proxy"); |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1957 parent = gtk_ctree_insert_node(GTK_CTREE(preftree), NULL, NULL, |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1958 text, 5, NULL, NULL, NULL, NULL, 0, 1); |
960
fa681641643d
[gaim-migrate @ 970]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
940
diff
changeset
|
1959 gtk_ctree_node_set_row_data(GTK_CTREE(preftree), parent, proxy_page); |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1960 } |
1 | 1961 |
930
a88af4cc626a
[gaim-migrate @ 940]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
915
diff
changeset
|
1962 #ifdef USE_APPLET |
a88af4cc626a
[gaim-migrate @ 940]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
915
diff
changeset
|
1963 void prefs_build_applet(GtkWidget *preftree) |
a88af4cc626a
[gaim-migrate @ 940]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
915
diff
changeset
|
1964 { |
a88af4cc626a
[gaim-migrate @ 940]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
915
diff
changeset
|
1965 GtkCTreeNode *parent, *node; |
a88af4cc626a
[gaim-migrate @ 940]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
915
diff
changeset
|
1966 char *text[1]; |
a88af4cc626a
[gaim-migrate @ 940]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
915
diff
changeset
|
1967 |
a88af4cc626a
[gaim-migrate @ 940]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
915
diff
changeset
|
1968 text[0] = _("Applet"); |
a88af4cc626a
[gaim-migrate @ 940]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
915
diff
changeset
|
1969 parent = gtk_ctree_insert_node(GTK_CTREE(preftree), NULL, NULL, |
a88af4cc626a
[gaim-migrate @ 940]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
915
diff
changeset
|
1970 text, 5, NULL, NULL, NULL, NULL, 0, 1); |
a88af4cc626a
[gaim-migrate @ 940]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
915
diff
changeset
|
1971 gtk_ctree_node_set_row_data(GTK_CTREE(preftree), parent, applet_page); |
a88af4cc626a
[gaim-migrate @ 940]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
915
diff
changeset
|
1972 } |
a88af4cc626a
[gaim-migrate @ 940]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
915
diff
changeset
|
1973 #endif |
a88af4cc626a
[gaim-migrate @ 940]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
915
diff
changeset
|
1974 |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1975 void prefs_build_buddy(GtkWidget *preftree) |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1976 { |
678
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
1977 GtkCTreeNode *parent, *node; |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1978 char *text[1]; |
1 | 1979 |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1980 text[0] = _("Buddy List"); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1981 parent = gtk_ctree_insert_node(GTK_CTREE(preftree), NULL, NULL, |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1982 text, 5, NULL, NULL, NULL, NULL, 0, 1); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1983 gtk_ctree_node_set_row_data(GTK_CTREE(preftree), parent, buddy_page); |
678
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
1984 |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
1985 /* FIXME ! We shouldn't be showing this if we're not signed on */ |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
1986 text[0] = _("Permit/Deny"); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
1987 node = gtk_ctree_insert_node(GTK_CTREE(preftree), parent, NULL, |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
1988 text, 5, NULL, NULL, NULL, NULL, 0, 1); |
c72f58814e9f
[gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
673
diff
changeset
|
1989 gtk_ctree_node_set_row_data(GTK_CTREE(preftree), node, deny_page); |
1 | 1990 } |
1991 | |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1992 void prefs_build_convo(GtkWidget *preftree) |
1 | 1993 { |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1994 GtkCTreeNode *parent, *node, *node2; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1995 char *text[1]; |
1 | 1996 |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1997 text[0] = _("Conversations"); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1998 parent = gtk_ctree_insert_node(GTK_CTREE(preftree), NULL, NULL, |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
1999 text, 5, NULL, NULL, NULL, NULL, 0, 1); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
2000 gtk_ctree_node_set_row_data(GTK_CTREE(preftree), parent, convo_page); |
1 | 2001 |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
2002 text[0] = _("IM Window"); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
2003 node = gtk_ctree_insert_node(GTK_CTREE(preftree), parent, NULL, |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
2004 text, 5, NULL, NULL, NULL, NULL, 0, 1); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
2005 gtk_ctree_node_set_row_data(GTK_CTREE(preftree), node, im_page); |
1 | 2006 |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
2007 text[0] = _("Chat Window"); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
2008 node = gtk_ctree_insert_node(GTK_CTREE(preftree), parent, NULL, |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
2009 text, 5, NULL, NULL, NULL, NULL, 0, 1); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
2010 gtk_ctree_node_set_row_data(GTK_CTREE(preftree), node, chat_page); |
1 | 2011 |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
2012 text[0] = _("Chat Rooms"); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
2013 node2 = gtk_ctree_insert_node(GTK_CTREE(preftree), node, NULL, |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
2014 text, 5, NULL, NULL, NULL, NULL, 1, 0); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
2015 gtk_ctree_node_set_row_data(GTK_CTREE(preftree), node2, room_page); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
2016 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
2017 text[0] = _("Font Options"); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
2018 node = gtk_ctree_insert_node(GTK_CTREE(preftree), parent, NULL, |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
2019 text, 5, NULL, NULL, NULL, NULL, 0, 1); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
2020 gtk_ctree_node_set_row_data(GTK_CTREE(preftree), node, font_page); |
1 | 2021 } |
2022 | |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
2023 void prefs_build_sound(GtkWidget *preftree) |
1 | 2024 { |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
2025 GtkCTreeNode *parent, *node; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
2026 char *text[1]; |
1 | 2027 |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
2028 text[0] = _("Sounds"); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
2029 parent = gtk_ctree_insert_node(GTK_CTREE(preftree), NULL, NULL, |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
2030 text, 5, NULL, NULL, NULL, NULL, 0, 1); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
2031 gtk_ctree_node_set_row_data(GTK_CTREE(preftree), parent, sound_page); |
1 | 2032 |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
2033 text[0] = _("Events"); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
2034 node = gtk_ctree_insert_node(GTK_CTREE(preftree), parent, NULL, |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
2035 text, 5, NULL, NULL, NULL, NULL, 0, 1); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
2036 gtk_ctree_node_set_row_data(GTK_CTREE(preftree), node, event_page); |
1 | 2037 } |
2038 | |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
2039 void prefs_build_away(GtkWidget *preftree) |
1 | 2040 { |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
2041 GtkCTreeNode *parent; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
2042 char *text[1]; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
2043 |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
2044 text[0] = _("Away Messages"); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
2045 parent = gtk_ctree_insert_node(GTK_CTREE(preftree), NULL, NULL, |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
2046 text, 5, NULL, NULL, NULL, NULL, 0, 1); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
2047 gtk_ctree_node_set_row_data(GTK_CTREE(preftree), parent, away_page); |
1 | 2048 } |
2049 | |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
2050 void prefs_build_browser(GtkWidget *preftree) |
1 | 2051 { |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
2052 GtkCTreeNode *parent; |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
2053 char *text[1]; |
1 | 2054 |
652
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
2055 text[0] = _("Browser"); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
2056 parent = gtk_ctree_insert_node(GTK_CTREE(preftree), NULL, NULL, |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
2057 text, 5, NULL, NULL, NULL, NULL, 0, 1); |
4d3285caa191
[gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
619
diff
changeset
|
2058 gtk_ctree_node_set_row_data(GTK_CTREE(preftree), parent, browser_page); |
1 | 2059 } |