annotate src/prefs.c @ 2269:7ff6170d84a0

[gaim-migrate @ 2279] The top section of the fonts prefs was buggin' me. committer: Tailor Script <tailor@pidgin.im>
author Rob Flynn <gaim@robflynn.com>
date Tue, 11 Sep 2001 21:05:16 +0000
parents 9c8f353331e7
children 0dea5214d63f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1 /*
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2 * gaim
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3 *
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
4 * Copyright (C) 1998-1999, Mark Spencer <markster@marko.net>
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
5 *
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
6 * This program is free software; you can redistribute it and/or modify
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
7 * it under the terms of the GNU General Public License as published by
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
8 * the Free Software Foundation; either version 2 of the License, or
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
9 * (at your option) any later version.
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
10 *
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
11 * This program is distributed in the hope that it will be useful,
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
14 * GNU General Public License for more details.
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
15 *
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
16 * You should have received a copy of the GNU General Public License
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
17 * along with this program; if not, write to the Free Software
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
19 *
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
20 */
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
21
349
b402a23f35df [gaim-migrate @ 359]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 340
diff changeset
22 #ifdef HAVE_CONFIG_H
2090
b66aca8e8dce [gaim-migrate @ 2100]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2074
diff changeset
23 #include <config.h>
349
b402a23f35df [gaim-migrate @ 359]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 340
diff changeset
24 #endif
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
25 #include <string.h>
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
26 #include <sys/time.h>
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
27
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
28 #include <sys/types.h>
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
29 #include <sys/stat.h>
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
30
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
31 #include <unistd.h>
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
32 #include <stdio.h>
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
33 #include <stdlib.h>
970
9eb07b383df4 [gaim-migrate @ 980]
Rob Flynn <gaim@robflynn.com>
parents: 967
diff changeset
34 #include <stdarg.h>
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
35 #include <gtk/gtk.h>
1780
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
36 #include "gtkimhtml.h"
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
37 #include "gaim.h"
1357
783ba886b6b6 [gaim-migrate @ 1367]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1324
diff changeset
38 #include "prpl.h"
588
e2cdcbfdc0b2 [gaim-migrate @ 598]
Rob Flynn <gaim@robflynn.com>
parents: 584
diff changeset
39 #include "pixmaps/cancel.xpm"
595
3fd5311a3894 [gaim-migrate @ 605]
Todd Kulesza <fflewddur>
parents: 588
diff changeset
40 #include "pixmaps/fontface2.xpm"
617
50f7a0bc76fc [gaim-migrate @ 627]
Todd Kulesza <fflewddur>
parents: 616
diff changeset
41 #include "pixmaps/gnome_add.xpm"
50f7a0bc76fc [gaim-migrate @ 627]
Todd Kulesza <fflewddur>
parents: 616
diff changeset
42 #include "pixmaps/gnome_remove.xpm"
832
0142b4c66394 [gaim-migrate @ 842]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 830
diff changeset
43 #include "pixmaps/gnome_preferences.xpm"
855
82673bb41e2f [gaim-migrate @ 865]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 834
diff changeset
44 #include "pixmaps/bgcolor.xpm"
82673bb41e2f [gaim-migrate @ 865]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 834
diff changeset
45 #include "pixmaps/fgcolor.xpm"
821
02250312c02d [gaim-migrate @ 831]
Todd Kulesza <fflewddur>
parents: 775
diff changeset
46 #include "pixmaps/save.xpm"
1881
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
47 #include "proxy.h"
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
48
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
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
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
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 *);
1124
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
53 static void prefs_build_general();
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
54 static void prefs_build_buddy();
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
55 static void prefs_build_convo();
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
56 static void prefs_build_sound();
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
57 static void prefs_build_away();
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
58 static void prefs_build_deny();
652
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
59 static gint handle_delete(GtkWidget *, GdkEvent *, void *);
915
378c862a2381 [gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 910
diff changeset
60 static void delete_prefs(GtkWidget *, void *);
1109
c73736fa0b7c [gaim-migrate @ 1119]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1087
diff changeset
61 void set_default_away(GtkWidget *, gpointer);
2269
7ff6170d84a0 [gaim-migrate @ 2279]
Rob Flynn <gaim@robflynn.com>
parents: 2262
diff changeset
62 void set_font_option(GtkWidget *w, int *option);
652
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
63
1170
16d748023b2b [gaim-migrate @ 1180]
Rob Flynn <gaim@robflynn.com>
parents: 1147
diff changeset
64 static GtkWidget *sounddialog = NULL;
652
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
65 static GtkWidget *prefdialog = NULL;
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
66 static GtkWidget *debugbutton = NULL;
1750
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
67 static GtkWidget *tickerbutton = NULL;
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
68
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
69 extern GtkWidget *tickerwindow;
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
70 extern void BuddyTickerShow();
1175
581b3e015036 [gaim-migrate @ 1185]
Rob Flynn <gaim@robflynn.com>
parents: 1173
diff changeset
71
652
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
72 GtkWidget *prefs_away_list = NULL;
1109
c73736fa0b7c [gaim-migrate @ 1119]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1087
diff changeset
73 GtkWidget *prefs_away_menu = NULL;
1124
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
74 GtkWidget *preftree = NULL;
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
75 GtkCTreeNode *general_node = NULL;
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
76 GtkCTreeNode *deny_node = NULL;
2254
c0ac78ffe77f [gaim-migrate @ 2264]
Rob Flynn <gaim@robflynn.com>
parents: 2199
diff changeset
77 GtkWidget *prefs_proxy_frame = NULL;
652
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
78
678
c72f58814e9f [gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 673
diff changeset
79 static void destdeb(GtkWidget *m, gpointer n)
c72f58814e9f [gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 673
diff changeset
80 {
c72f58814e9f [gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 673
diff changeset
81 gtk_widget_destroy(debugbutton);
c72f58814e9f [gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 673
diff changeset
82 debugbutton = NULL;
c72f58814e9f [gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 673
diff changeset
83 }
c72f58814e9f [gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 673
diff changeset
84
1750
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
85 static void desttkr(GtkWidget *m, gpointer n)
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
86 {
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
87 gtk_widget_destroy(tickerbutton);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
88 tickerbutton = NULL;
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
89 }
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
90
1026
5bad25457843 [gaim-migrate @ 1036]
Rob Flynn <gaim@robflynn.com>
parents: 1006
diff changeset
91 static void set_idle(GtkWidget *w, int *data)
5bad25457843 [gaim-migrate @ 1036]
Rob Flynn <gaim@robflynn.com>
parents: 1006
diff changeset
92 {
1253
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
93 report_idle = (int)data;
1026
5bad25457843 [gaim-migrate @ 1036]
Rob Flynn <gaim@robflynn.com>
parents: 1006
diff changeset
94 save_prefs();
5bad25457843 [gaim-migrate @ 1036]
Rob Flynn <gaim@robflynn.com>
parents: 1006
diff changeset
95 }
5bad25457843 [gaim-migrate @ 1036]
Rob Flynn <gaim@robflynn.com>
parents: 1006
diff changeset
96
5bad25457843 [gaim-migrate @ 1036]
Rob Flynn <gaim@robflynn.com>
parents: 1006
diff changeset
97 static GtkWidget *idle_radio(char *label, int which, GtkWidget *box, GtkWidget *set)
5bad25457843 [gaim-migrate @ 1036]
Rob Flynn <gaim@robflynn.com>
parents: 1006
diff changeset
98 {
5bad25457843 [gaim-migrate @ 1036]
Rob Flynn <gaim@robflynn.com>
parents: 1006
diff changeset
99 GtkWidget *opt;
5bad25457843 [gaim-migrate @ 1036]
Rob Flynn <gaim@robflynn.com>
parents: 1006
diff changeset
100
5bad25457843 [gaim-migrate @ 1036]
Rob Flynn <gaim@robflynn.com>
parents: 1006
diff changeset
101 if (!set)
5bad25457843 [gaim-migrate @ 1036]
Rob Flynn <gaim@robflynn.com>
parents: 1006
diff changeset
102 opt = gtk_radio_button_new_with_label(NULL, label);
5bad25457843 [gaim-migrate @ 1036]
Rob Flynn <gaim@robflynn.com>
parents: 1006
diff changeset
103 else
1253
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
104 opt =
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
105 gtk_radio_button_new_with_label(gtk_radio_button_group(GTK_RADIO_BUTTON(set)),
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
106 label);
1026
5bad25457843 [gaim-migrate @ 1036]
Rob Flynn <gaim@robflynn.com>
parents: 1006
diff changeset
107 gtk_box_pack_start(GTK_BOX(box), opt, FALSE, FALSE, 0);
5bad25457843 [gaim-migrate @ 1036]
Rob Flynn <gaim@robflynn.com>
parents: 1006
diff changeset
108 gtk_signal_connect(GTK_OBJECT(opt), "clicked", GTK_SIGNAL_FUNC(set_idle), (void *)which);
5bad25457843 [gaim-migrate @ 1036]
Rob Flynn <gaim@robflynn.com>
parents: 1006
diff changeset
109 gtk_widget_show(opt);
5bad25457843 [gaim-migrate @ 1036]
Rob Flynn <gaim@robflynn.com>
parents: 1006
diff changeset
110 if (report_idle == which)
5bad25457843 [gaim-migrate @ 1036]
Rob Flynn <gaim@robflynn.com>
parents: 1006
diff changeset
111 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(opt), TRUE);
5bad25457843 [gaim-migrate @ 1036]
Rob Flynn <gaim@robflynn.com>
parents: 1006
diff changeset
112
5bad25457843 [gaim-migrate @ 1036]
Rob Flynn <gaim@robflynn.com>
parents: 1006
diff changeset
113 return opt;
5bad25457843 [gaim-migrate @ 1036]
Rob Flynn <gaim@robflynn.com>
parents: 1006
diff changeset
114 }
5bad25457843 [gaim-migrate @ 1036]
Rob Flynn <gaim@robflynn.com>
parents: 1006
diff changeset
115
1525
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
116 static GtkWidget *browser_entry = NULL;
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
117 static GtkWidget *new_window = NULL;
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
118
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
119 static void set_browser(GtkWidget *w, int *data)
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
120 {
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
121 web_browser = (int)data;
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
122 if (web_browser != BROWSER_MANUAL) {
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
123 if (browser_entry)
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
124 gtk_widget_set_sensitive(browser_entry, FALSE);
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
125 } else {
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
126 if (browser_entry)
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
127 gtk_widget_set_sensitive(browser_entry, TRUE);
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
128 }
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
129
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
130 if (web_browser != BROWSER_NETSCAPE) {
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
131 if (new_window)
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
132 gtk_widget_set_sensitive(new_window, FALSE);
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
133 } else {
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
134 if (new_window)
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
135 gtk_widget_set_sensitive(new_window, TRUE);
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
136 }
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
137
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
138
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
139 save_prefs();
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
140 }
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
141
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
142 static int manualentry_key_pressed(GtkWidget *w, GdkEvent *event, void *dummy)
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
143 {
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
144 g_snprintf(web_command, sizeof(web_command), "%s", gtk_entry_get_text(GTK_ENTRY(browser_entry)));
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
145 save_prefs();
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
146 return TRUE;
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
147 }
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
148
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
149 static GtkWidget *browser_radio(char *label, int which, GtkWidget *box, GtkWidget *set)
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
150 {
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
151 GtkWidget *opt;
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
152
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
153 if (!set)
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
154 opt = gtk_radio_button_new_with_label(NULL, label);
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
155 else
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
156 opt =
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
157 gtk_radio_button_new_with_label(gtk_radio_button_group(GTK_RADIO_BUTTON(set)),
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
158 label);
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
159 gtk_box_pack_start(GTK_BOX(box), opt, FALSE, FALSE, 0);
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
160 gtk_signal_connect(GTK_OBJECT(opt), "clicked", GTK_SIGNAL_FUNC(set_browser), (void *)which);
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
161 gtk_widget_show(opt);
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
162 if (web_browser == which)
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
163 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(opt), TRUE);
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
164
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
165 return opt;
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
166 }
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
167
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
168 static void brentdes(GtkWidget *m, gpointer n)
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
169 {
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
170 browser_entry = NULL;
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
171 new_window = NULL;
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
172 }
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
173
1750
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
174 static void general_page()
1525
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
175 {
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
176 GtkWidget *parent;
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
177 GtkWidget *box;
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
178 GtkWidget *label;
1750
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
179 GtkWidget *hbox;
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
180 GtkWidget *vbox;
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
181 GtkWidget *frame;
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
182 GtkWidget *mbox;
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
183 GtkWidget *sep;
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
184 GtkWidget *idle;
1525
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
185 GtkWidget *opt;
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
186
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
187 parent = prefdialog->parent;
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
188 gtk_widget_destroy(prefdialog);
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
189
1750
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
190 prefdialog = gtk_frame_new(_("General Options"));
1525
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
191 gtk_container_add(GTK_CONTAINER(parent), prefdialog);
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
192
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
193 box = gtk_vbox_new(FALSE, 5);
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
194 gtk_container_set_border_width(GTK_CONTAINER(box), 5);
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
195 gtk_container_add(GTK_CONTAINER(prefdialog), box);
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
196 gtk_widget_show(box);
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
197
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
198 label = gtk_label_new(_("All options take effect immediately unless otherwise noted."));
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
199 gtk_box_pack_start(GTK_BOX(box), label, FALSE, FALSE, 5);
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
200 gtk_widget_show(label);
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
201
1750
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
202 hbox = gtk_hbox_new(FALSE, 5);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
203 gtk_box_pack_start(GTK_BOX(box), hbox, FALSE, FALSE, 5);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
204 gtk_widget_show(hbox);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
205
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
206 vbox = gtk_vbox_new(TRUE, 5);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
207 gtk_box_pack_start(GTK_BOX(hbox), vbox, TRUE, TRUE, 5);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
208 gtk_widget_show(vbox);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
209
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
210 frame = gtk_frame_new(_("Miscellaneous"));
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
211 gtk_box_pack_start(GTK_BOX(vbox), frame, TRUE, TRUE, 5);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
212 gtk_widget_show(frame);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
213
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
214 mbox = gtk_vbox_new(TRUE, 5);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
215 gtk_container_add(GTK_CONTAINER(frame), mbox);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
216 gtk_widget_show(mbox);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
217
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
218 gaim_button(_("Use borderless buttons"), &display_options,
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
219 OPT_DISP_COOL_LOOK, mbox);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
220
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
221 if (!tickerwindow && (display_options & OPT_DISP_SHOW_BUDDYTICKER))
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
222 display_options = display_options ^ OPT_DISP_SHOW_BUDDYTICKER;
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
223 tickerbutton = gaim_button(_("Show Buddy Ticker"), &display_options, OPT_DISP_SHOW_BUDDYTICKER, mbox);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
224 gtk_signal_connect_object(GTK_OBJECT(tickerbutton), "clicked", GTK_SIGNAL_FUNC(BuddyTickerShow), 0);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
225 gtk_signal_connect(GTK_OBJECT(tickerbutton), "destroy", GTK_SIGNAL_FUNC(desttkr), 0);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
226
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
227 if (!dw && (general_options & OPT_GEN_DEBUG))
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
228 general_options = general_options ^ OPT_GEN_DEBUG;
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
229 debugbutton = gaim_button(_("Show Debug Window"), &general_options, OPT_GEN_DEBUG, mbox);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
230 gtk_signal_connect_object(GTK_OBJECT(debugbutton), "clicked", GTK_SIGNAL_FUNC(show_debug), 0);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
231 gtk_signal_connect(GTK_OBJECT(debugbutton), "destroy", GTK_SIGNAL_FUNC(destdeb), 0);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
232
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
233 frame = gtk_frame_new(_("Report Idle Times"));
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
234 gtk_box_pack_start(GTK_BOX(vbox), frame, TRUE, TRUE, 5);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
235 gtk_widget_show(frame);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
236
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
237 mbox = gtk_vbox_new(TRUE, 5);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
238 gtk_container_add(GTK_CONTAINER(frame), mbox);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
239 gtk_widget_show(mbox);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
240
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
241 idle = idle_radio(_("None"), IDLE_NONE, mbox, NULL);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
242 idle = idle_radio(_("GAIM Use"), IDLE_GAIM, mbox, idle);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
243 #ifdef USE_SCREENSAVER
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
244 idle = idle_radio(_("X Use"), IDLE_SCREENSAVER, mbox, idle);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
245 #endif
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
246
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
247 frame = gtk_frame_new(_("Logging"));
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
248 gtk_box_pack_start(GTK_BOX(hbox), frame, TRUE, TRUE, 5);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
249 gtk_widget_show(frame);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
250
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
251 mbox = gtk_vbox_new(TRUE, 5);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
252 gtk_container_add(GTK_CONTAINER(frame), mbox);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
253 gtk_widget_show(mbox);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
254
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
255 gaim_button(_("Log all conversations"), &logging_options, OPT_LOG_ALL, mbox);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
256 gaim_button(_("Strip HTML from logs"), &logging_options, OPT_LOG_STRIP_HTML, mbox);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
257
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
258 sep = gtk_hseparator_new();
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
259 gtk_box_pack_start(GTK_BOX(mbox), sep, FALSE, FALSE, 0);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
260 gtk_widget_show(sep);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
261
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
262 gaim_button(_("Log when buddies sign on/sign off"), &logging_options, OPT_LOG_BUDDY_SIGNON, mbox);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
263 gaim_button(_("Log when buddies become idle/un-idle"), &logging_options, OPT_LOG_BUDDY_IDLE, mbox);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
264 gaim_button(_("Log when buddies go away/come back"), &logging_options, OPT_LOG_BUDDY_AWAY, mbox);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
265 gaim_button(_("Log your own signons/idleness/awayness"), &logging_options, OPT_LOG_MY_SIGNON, mbox);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
266 gaim_button(_("Individual log file for each buddy's signons"), &logging_options, OPT_LOG_INDIVIDUAL, mbox);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
267
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
268 frame = gtk_frame_new(_("Browser"));
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
269 gtk_box_pack_start(GTK_BOX(box), frame, FALSE, FALSE, 5);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
270 gtk_widget_show(frame);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
271
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
272 hbox = gtk_hbox_new(FALSE, 5);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
273 gtk_container_add(GTK_CONTAINER(frame), hbox);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
274 gtk_widget_show(hbox);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
275
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
276 vbox = gtk_vbox_new(FALSE, 5);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
277 gtk_box_pack_start(GTK_BOX(hbox), vbox, TRUE, TRUE, 5);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
278 gtk_widget_show(vbox);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
279
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
280 opt = browser_radio(_("KFM"), BROWSER_KFM, vbox, NULL);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
281 opt = browser_radio(_("Netscape"), BROWSER_NETSCAPE, vbox, opt);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
282
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
283 new_window =
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
284 gaim_button(_("Pop up new window by default"), &general_options, OPT_GEN_BROWSER_POPUP, vbox);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
285
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
286 vbox = gtk_vbox_new(FALSE, 5);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
287 gtk_box_pack_start(GTK_BOX(hbox), vbox, TRUE, TRUE, 5);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
288 gtk_widget_show(vbox);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
289
1525
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
290 #ifdef USE_GNOME
1750
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
291 opt = browser_radio(_("GNOME URL Handler"), BROWSER_GNOME, vbox, opt);
1525
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
292 #endif /* USE_GNOME */
1750
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
293 opt = browser_radio(_("Manual"), BROWSER_MANUAL, vbox, opt);
1525
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
294
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
295 browser_entry = gtk_entry_new();
1750
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
296 gtk_box_pack_start(GTK_BOX(vbox), browser_entry, FALSE, FALSE, 0);
1525
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
297 gtk_entry_set_text(GTK_ENTRY(browser_entry), web_command);
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
298 gtk_signal_connect(GTK_OBJECT(browser_entry), "focus_out_event",
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
299 GTK_SIGNAL_FUNC(manualentry_key_pressed), NULL);
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
300 gtk_signal_connect(GTK_OBJECT(browser_entry), "destroy", GTK_SIGNAL_FUNC(brentdes), NULL);
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
301 gtk_widget_show(browser_entry);
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
302
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
303 if (web_browser != BROWSER_MANUAL) {
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
304 gtk_widget_set_sensitive(browser_entry, FALSE);
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
305 } else {
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
306 gtk_widget_set_sensitive(browser_entry, TRUE);
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
307 }
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
308
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
309 if (web_browser != BROWSER_NETSCAPE) {
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
310 gtk_widget_set_sensitive(new_window, FALSE);
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
311 } else {
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
312 gtk_widget_set_sensitive(new_window, TRUE);
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
313 }
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
314
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
315 gtk_widget_show(prefdialog);
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
316 }
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
317
1881
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
318 #define PROXYHOST 0
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
319 #define PROXYPORT 1
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
320 #define PROXYTYPE 2
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
321 #define PROXYUSER 3
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
322 #define PROXYPASS 4
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
323
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
324 static void proxy_print_option(GtkEntry *entry, int entrynum)
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
325 {
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
326 if (entrynum == PROXYHOST)
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
327 g_snprintf(proxyhost, sizeof(proxyhost), "%s", gtk_entry_get_text(entry));
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
328 else if (entrynum == PROXYPORT)
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
329 proxyport = atoi(gtk_entry_get_text(entry));
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
330 else if (entrynum == PROXYUSER)
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
331 g_snprintf(proxyuser, sizeof(proxyuser), "%s", gtk_entry_get_text(entry));
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
332 else if (entrynum == PROXYPASS)
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
333 g_snprintf(proxypass, sizeof(proxypass), "%s", gtk_entry_get_text(entry));
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
334 save_prefs();
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
335 }
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
336
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
337 static void proxy_print_optionrad(GtkRadioButton *entry, int entrynum)
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
338 {
2254
c0ac78ffe77f [gaim-migrate @ 2264]
Rob Flynn <gaim@robflynn.com>
parents: 2199
diff changeset
339 if (entrynum == PROXY_NONE)
c0ac78ffe77f [gaim-migrate @ 2264]
Rob Flynn <gaim@robflynn.com>
parents: 2199
diff changeset
340 gtk_widget_set_sensitive(GTK_WIDGET(prefs_proxy_frame), FALSE);
c0ac78ffe77f [gaim-migrate @ 2264]
Rob Flynn <gaim@robflynn.com>
parents: 2199
diff changeset
341 else
c0ac78ffe77f [gaim-migrate @ 2264]
Rob Flynn <gaim@robflynn.com>
parents: 2199
diff changeset
342 gtk_widget_set_sensitive(GTK_WIDGET(prefs_proxy_frame), TRUE);
c0ac78ffe77f [gaim-migrate @ 2264]
Rob Flynn <gaim@robflynn.com>
parents: 2199
diff changeset
343
1881
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
344 proxytype = entrynum;
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
345 save_prefs();
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
346 }
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
347
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
348 static void proxy_page()
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
349 {
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
350 GtkWidget *parent;
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
351 GtkWidget *vbox;
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
352 GtkWidget *hbox;
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
353 GtkWidget *label;
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
354 GtkWidget *entry;
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
355 GtkWidget *first, *opt;
2254
c0ac78ffe77f [gaim-migrate @ 2264]
Rob Flynn <gaim@robflynn.com>
parents: 2199
diff changeset
356 GtkWidget *frame;
c0ac78ffe77f [gaim-migrate @ 2264]
Rob Flynn <gaim@robflynn.com>
parents: 2199
diff changeset
357 GtkWidget *table;
1881
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
358
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
359 parent = prefdialog->parent;
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
360 gtk_widget_destroy(prefdialog);
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
361
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
362 prefdialog = gtk_frame_new(_("Proxy Options"));
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
363 gtk_container_add(GTK_CONTAINER(parent), prefdialog);
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
364
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
365 vbox = gtk_vbox_new(FALSE, 5);
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
366 gtk_container_set_border_width(GTK_CONTAINER(vbox), 5);
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
367 gtk_container_add(GTK_CONTAINER(prefdialog), vbox);
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
368 gtk_widget_show(vbox);
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
369
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
370 label = gtk_label_new(_("All options take effect immediately unless otherwise noted."));
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
371 gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 5);
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
372 gtk_widget_show(label);
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
373
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
374 label = gtk_label_new(_("Not all protocols can use these proxy options. Please see the "
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
375 "README file for details."));
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
376 gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 5);
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
377 gtk_widget_show(label);
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
378
2254
c0ac78ffe77f [gaim-migrate @ 2264]
Rob Flynn <gaim@robflynn.com>
parents: 2199
diff changeset
379 frame = gtk_frame_new(_("Proxy Type"));
c0ac78ffe77f [gaim-migrate @ 2264]
Rob Flynn <gaim@robflynn.com>
parents: 2199
diff changeset
380 gtk_container_set_border_width(GTK_CONTAINER(frame), 5);
c0ac78ffe77f [gaim-migrate @ 2264]
Rob Flynn <gaim@robflynn.com>
parents: 2199
diff changeset
381 gtk_widget_show(frame);
c0ac78ffe77f [gaim-migrate @ 2264]
Rob Flynn <gaim@robflynn.com>
parents: 2199
diff changeset
382 gtk_box_pack_start(GTK_BOX(vbox), frame, FALSE, FALSE, 5);
c0ac78ffe77f [gaim-migrate @ 2264]
Rob Flynn <gaim@robflynn.com>
parents: 2199
diff changeset
383
c0ac78ffe77f [gaim-migrate @ 2264]
Rob Flynn <gaim@robflynn.com>
parents: 2199
diff changeset
384 table = gtk_table_new(2, 2, FALSE);
c0ac78ffe77f [gaim-migrate @ 2264]
Rob Flynn <gaim@robflynn.com>
parents: 2199
diff changeset
385 gtk_container_set_border_width(GTK_CONTAINER(table), 5);
c0ac78ffe77f [gaim-migrate @ 2264]
Rob Flynn <gaim@robflynn.com>
parents: 2199
diff changeset
386 gtk_table_set_col_spacings(GTK_TABLE(table), 5);
c0ac78ffe77f [gaim-migrate @ 2264]
Rob Flynn <gaim@robflynn.com>
parents: 2199
diff changeset
387 gtk_table_set_row_spacings(GTK_TABLE(table), 5);
c0ac78ffe77f [gaim-migrate @ 2264]
Rob Flynn <gaim@robflynn.com>
parents: 2199
diff changeset
388 gtk_widget_show(table);
c0ac78ffe77f [gaim-migrate @ 2264]
Rob Flynn <gaim@robflynn.com>
parents: 2199
diff changeset
389 gtk_container_add(GTK_CONTAINER(frame), table);
c0ac78ffe77f [gaim-migrate @ 2264]
Rob Flynn <gaim@robflynn.com>
parents: 2199
diff changeset
390
c0ac78ffe77f [gaim-migrate @ 2264]
Rob Flynn <gaim@robflynn.com>
parents: 2199
diff changeset
391 first = gtk_radio_button_new_with_label(NULL, _("No Proxy"));
c0ac78ffe77f [gaim-migrate @ 2264]
Rob Flynn <gaim@robflynn.com>
parents: 2199
diff changeset
392 gtk_table_attach(GTK_TABLE(table), first, 0, 1, 0, 1, GTK_FILL | GTK_EXPAND, 0, 0, 0);
c0ac78ffe77f [gaim-migrate @ 2264]
Rob Flynn <gaim@robflynn.com>
parents: 2199
diff changeset
393
1881
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
394 gtk_signal_connect(GTK_OBJECT(first), "clicked",
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
395 GTK_SIGNAL_FUNC(proxy_print_optionrad), (void*)PROXY_NONE);
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
396 gtk_widget_show(first);
2254
c0ac78ffe77f [gaim-migrate @ 2264]
Rob Flynn <gaim@robflynn.com>
parents: 2199
diff changeset
397
1881
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
398 if (proxytype == PROXY_NONE)
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
399 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(first), TRUE);
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
400
2254
c0ac78ffe77f [gaim-migrate @ 2264]
Rob Flynn <gaim@robflynn.com>
parents: 2199
diff changeset
401 opt = gtk_radio_button_new_with_label(gtk_radio_button_group(GTK_RADIO_BUTTON(first)), _("SOCKS 4"));
c0ac78ffe77f [gaim-migrate @ 2264]
Rob Flynn <gaim@robflynn.com>
parents: 2199
diff changeset
402 gtk_table_attach(GTK_TABLE(table), opt, 1, 2, 0, 1, GTK_FILL | GTK_EXPAND, 0, 0, 0);
1881
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
403 gtk_signal_connect(GTK_OBJECT(opt), "clicked",
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
404 GTK_SIGNAL_FUNC(proxy_print_optionrad), (void*)PROXY_SOCKS4);
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
405 gtk_widget_show(opt);
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
406 if (proxytype == PROXY_SOCKS4)
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
407 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(opt), TRUE);
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
408
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
409 opt =
2254
c0ac78ffe77f [gaim-migrate @ 2264]
Rob Flynn <gaim@robflynn.com>
parents: 2199
diff changeset
410 gtk_radio_button_new_with_label(gtk_radio_button_group(GTK_RADIO_BUTTON(first)), _("SOCKS 5"));
c0ac78ffe77f [gaim-migrate @ 2264]
Rob Flynn <gaim@robflynn.com>
parents: 2199
diff changeset
411 gtk_table_attach(GTK_TABLE(table), opt, 0, 1, 1, 2, GTK_FILL | GTK_EXPAND, 0, 0, 0);
1881
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
412 gtk_signal_connect(GTK_OBJECT(opt), "clicked",
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
413 GTK_SIGNAL_FUNC(proxy_print_optionrad), (void*)PROXY_SOCKS5);
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
414 gtk_widget_show(opt);
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
415 if (proxytype == PROXY_SOCKS5)
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
416 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(opt), TRUE);
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
417
2254
c0ac78ffe77f [gaim-migrate @ 2264]
Rob Flynn <gaim@robflynn.com>
parents: 2199
diff changeset
418 opt = gtk_radio_button_new_with_label(gtk_radio_button_group(GTK_RADIO_BUTTON(first)), _("HTTP"));
c0ac78ffe77f [gaim-migrate @ 2264]
Rob Flynn <gaim@robflynn.com>
parents: 2199
diff changeset
419 gtk_table_attach(GTK_TABLE(table), opt, 1, 2, 1, 2, GTK_FILL | GTK_EXPAND, 0, 0, 0);
1881
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
420 gtk_signal_connect(GTK_OBJECT(opt), "clicked",
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
421 GTK_SIGNAL_FUNC(proxy_print_optionrad), (void*)PROXY_HTTP);
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
422 gtk_widget_show(opt);
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
423 if (proxytype == PROXY_HTTP)
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
424 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(opt), TRUE);
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
425
2254
c0ac78ffe77f [gaim-migrate @ 2264]
Rob Flynn <gaim@robflynn.com>
parents: 2199
diff changeset
426
c0ac78ffe77f [gaim-migrate @ 2264]
Rob Flynn <gaim@robflynn.com>
parents: 2199
diff changeset
427 frame = gtk_frame_new(_("Proxy Server"));
c0ac78ffe77f [gaim-migrate @ 2264]
Rob Flynn <gaim@robflynn.com>
parents: 2199
diff changeset
428 gtk_container_set_border_width(GTK_CONTAINER(frame), 5);
c0ac78ffe77f [gaim-migrate @ 2264]
Rob Flynn <gaim@robflynn.com>
parents: 2199
diff changeset
429 gtk_widget_show(frame);
c0ac78ffe77f [gaim-migrate @ 2264]
Rob Flynn <gaim@robflynn.com>
parents: 2199
diff changeset
430 gtk_box_pack_start(GTK_BOX(vbox), frame, FALSE, FALSE, 5);
c0ac78ffe77f [gaim-migrate @ 2264]
Rob Flynn <gaim@robflynn.com>
parents: 2199
diff changeset
431
c0ac78ffe77f [gaim-migrate @ 2264]
Rob Flynn <gaim@robflynn.com>
parents: 2199
diff changeset
432 prefs_proxy_frame = frame;
c0ac78ffe77f [gaim-migrate @ 2264]
Rob Flynn <gaim@robflynn.com>
parents: 2199
diff changeset
433
c0ac78ffe77f [gaim-migrate @ 2264]
Rob Flynn <gaim@robflynn.com>
parents: 2199
diff changeset
434 if (proxytype == PROXY_NONE)
c0ac78ffe77f [gaim-migrate @ 2264]
Rob Flynn <gaim@robflynn.com>
parents: 2199
diff changeset
435 gtk_widget_set_sensitive(GTK_WIDGET(frame), FALSE);
c0ac78ffe77f [gaim-migrate @ 2264]
Rob Flynn <gaim@robflynn.com>
parents: 2199
diff changeset
436
c0ac78ffe77f [gaim-migrate @ 2264]
Rob Flynn <gaim@robflynn.com>
parents: 2199
diff changeset
437 table = gtk_table_new(2, 4, FALSE);
c0ac78ffe77f [gaim-migrate @ 2264]
Rob Flynn <gaim@robflynn.com>
parents: 2199
diff changeset
438 gtk_container_set_border_width(GTK_CONTAINER(table), 5);
c0ac78ffe77f [gaim-migrate @ 2264]
Rob Flynn <gaim@robflynn.com>
parents: 2199
diff changeset
439 gtk_table_set_col_spacings(GTK_TABLE(table), 5);
c0ac78ffe77f [gaim-migrate @ 2264]
Rob Flynn <gaim@robflynn.com>
parents: 2199
diff changeset
440 gtk_table_set_row_spacings(GTK_TABLE(table), 10);
c0ac78ffe77f [gaim-migrate @ 2264]
Rob Flynn <gaim@robflynn.com>
parents: 2199
diff changeset
441 gtk_widget_show(table);
c0ac78ffe77f [gaim-migrate @ 2264]
Rob Flynn <gaim@robflynn.com>
parents: 2199
diff changeset
442 gtk_container_add(GTK_CONTAINER(frame), table);
c0ac78ffe77f [gaim-migrate @ 2264]
Rob Flynn <gaim@robflynn.com>
parents: 2199
diff changeset
443
c0ac78ffe77f [gaim-migrate @ 2264]
Rob Flynn <gaim@robflynn.com>
parents: 2199
diff changeset
444
c0ac78ffe77f [gaim-migrate @ 2264]
Rob Flynn <gaim@robflynn.com>
parents: 2199
diff changeset
445 label = gtk_label_new(_("Host"));
c0ac78ffe77f [gaim-migrate @ 2264]
Rob Flynn <gaim@robflynn.com>
parents: 2199
diff changeset
446 gtk_misc_set_alignment(GTK_MISC(label), 1.0, 0.5);
1881
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
447 gtk_widget_show(label);
2254
c0ac78ffe77f [gaim-migrate @ 2264]
Rob Flynn <gaim@robflynn.com>
parents: 2199
diff changeset
448 gtk_table_attach(GTK_TABLE(table), label, 0, 1, 0, 1, GTK_FILL, 0, 0, 0);
1881
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
449
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
450 entry = gtk_entry_new();
2254
c0ac78ffe77f [gaim-migrate @ 2264]
Rob Flynn <gaim@robflynn.com>
parents: 2199
diff changeset
451 gtk_table_attach(GTK_TABLE(table), entry, 1, 2, 0, 1, GTK_FILL | GTK_EXPAND, 0, 0, 0);
1881
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
452 gtk_signal_connect(GTK_OBJECT(entry), "changed",
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
453 GTK_SIGNAL_FUNC(proxy_print_option), (void*)PROXYHOST);
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
454 gtk_entry_set_text(GTK_ENTRY(entry), proxyhost);
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
455 gtk_widget_show(entry);
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
456
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
457 hbox = gtk_hbox_new(TRUE, 5);
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
458 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0);
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
459 gtk_widget_show(hbox);
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
460
2254
c0ac78ffe77f [gaim-migrate @ 2264]
Rob Flynn <gaim@robflynn.com>
parents: 2199
diff changeset
461 label = gtk_label_new(_("Port"));
c0ac78ffe77f [gaim-migrate @ 2264]
Rob Flynn <gaim@robflynn.com>
parents: 2199
diff changeset
462 gtk_misc_set_alignment(GTK_MISC(label), 1.0, 0.5);
c0ac78ffe77f [gaim-migrate @ 2264]
Rob Flynn <gaim@robflynn.com>
parents: 2199
diff changeset
463 gtk_table_attach(GTK_TABLE(table), label, 0, 1, 1, 2, GTK_FILL, 0, 0, 0);
1881
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
464 gtk_widget_show(label);
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
465
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
466 entry = gtk_entry_new();
2254
c0ac78ffe77f [gaim-migrate @ 2264]
Rob Flynn <gaim@robflynn.com>
parents: 2199
diff changeset
467 gtk_table_attach(GTK_TABLE(table), entry, 1, 2, 1, 2, GTK_FILL | GTK_EXPAND, 0, 0, 0);
1881
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
468 gtk_signal_connect(GTK_OBJECT(entry), "changed",
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
469 GTK_SIGNAL_FUNC(proxy_print_option), (void*)PROXYPORT);
2254
c0ac78ffe77f [gaim-migrate @ 2264]
Rob Flynn <gaim@robflynn.com>
parents: 2199
diff changeset
470
1881
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
471 if (proxyport) {
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
472 char buf[128];
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
473 g_snprintf(buf, sizeof(buf), "%d", proxyport);
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
474 gtk_entry_set_text(GTK_ENTRY(entry), buf);
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
475 }
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
476 gtk_widget_show(entry);
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
477
2254
c0ac78ffe77f [gaim-migrate @ 2264]
Rob Flynn <gaim@robflynn.com>
parents: 2199
diff changeset
478 label = gtk_label_new(_("User"));
c0ac78ffe77f [gaim-migrate @ 2264]
Rob Flynn <gaim@robflynn.com>
parents: 2199
diff changeset
479 gtk_misc_set_alignment(GTK_MISC(label), 1.0, 0.5);
c0ac78ffe77f [gaim-migrate @ 2264]
Rob Flynn <gaim@robflynn.com>
parents: 2199
diff changeset
480 gtk_table_attach(GTK_TABLE(table), label, 0, 1, 2, 3, GTK_FILL, 0, 0, 0);
1881
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
481 gtk_widget_show(label);
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
482
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
483 entry = gtk_entry_new();
2254
c0ac78ffe77f [gaim-migrate @ 2264]
Rob Flynn <gaim@robflynn.com>
parents: 2199
diff changeset
484 gtk_table_attach(GTK_TABLE(table), entry, 1, 2, 2, 3, GTK_FILL | GTK_EXPAND, 0, 0, 0);
1881
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
485 gtk_signal_connect(GTK_OBJECT(entry), "changed",
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
486 GTK_SIGNAL_FUNC(proxy_print_option), (void*)PROXYUSER);
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
487 gtk_entry_set_text(GTK_ENTRY(entry), proxyuser);
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
488 gtk_widget_show(entry);
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
489
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
490 hbox = gtk_hbox_new(TRUE, 5);
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
491 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0);
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
492 gtk_widget_show(hbox);
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
493
2254
c0ac78ffe77f [gaim-migrate @ 2264]
Rob Flynn <gaim@robflynn.com>
parents: 2199
diff changeset
494 label = gtk_label_new(_("Password"));
c0ac78ffe77f [gaim-migrate @ 2264]
Rob Flynn <gaim@robflynn.com>
parents: 2199
diff changeset
495 gtk_misc_set_alignment(GTK_MISC(label), 1.0, 0.5);
c0ac78ffe77f [gaim-migrate @ 2264]
Rob Flynn <gaim@robflynn.com>
parents: 2199
diff changeset
496 gtk_table_attach(GTK_TABLE(table), label, 0, 1, 3, 4, GTK_FILL, 0, 0, 0);
1881
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
497 gtk_widget_show(label);
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
498
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
499 entry = gtk_entry_new();
2254
c0ac78ffe77f [gaim-migrate @ 2264]
Rob Flynn <gaim@robflynn.com>
parents: 2199
diff changeset
500 gtk_table_attach(GTK_TABLE(table), entry, 1, 2, 3, 4, GTK_FILL | GTK_EXPAND, 0, 0, 0);
1881
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
501 gtk_entry_set_visibility(GTK_ENTRY(entry), FALSE);
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
502 gtk_signal_connect(GTK_OBJECT(entry), "changed",
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
503 GTK_SIGNAL_FUNC(proxy_print_option), (void*)PROXYPASS);
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
504 gtk_entry_set_text(GTK_ENTRY(entry), proxypass);
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
505 gtk_widget_show(entry);
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
506
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
507 gtk_widget_show(prefdialog);
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
508 }
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
509
652
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
510 static void buddy_page()
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
511 {
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
512 GtkWidget *parent;
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
513 GtkWidget *box;
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
514 GtkWidget *label;
1780
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
515 GtkWidget *frame;
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
516 GtkWidget *hbox;
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
517 GtkWidget *vbox;
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
518 GtkWidget *button;
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
519 GtkWidget *button2;
652
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
520
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
521 parent = prefdialog->parent;
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
522 gtk_widget_destroy(prefdialog);
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
523
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
524 prefdialog = gtk_frame_new(_("Buddy List Options"));
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
525 gtk_container_add(GTK_CONTAINER(parent), prefdialog);
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
526
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
527 box = gtk_vbox_new(FALSE, 5);
1253
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
528 gtk_container_set_border_width(GTK_CONTAINER(box), 5);
652
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
529 gtk_container_add(GTK_CONTAINER(prefdialog), box);
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
530 gtk_widget_show(box);
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
531
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
532 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
533 gtk_box_pack_start(GTK_BOX(box), label, FALSE, FALSE, 5);
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
534 gtk_widget_show(label);
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
535
1780
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
536 frame = gtk_frame_new(_("Buddy List Window"));
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
537 gtk_box_pack_start(GTK_BOX(box), frame, FALSE, FALSE, 5);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
538 gtk_widget_show(frame);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
539
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
540 hbox = gtk_hbox_new(TRUE, 5);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
541 gtk_container_add(GTK_CONTAINER(frame), hbox);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
542 gtk_widget_show(hbox);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
543
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
544 vbox = gtk_vbox_new(FALSE, 5);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
545 gtk_box_pack_start(GTK_BOX(hbox), vbox, TRUE, TRUE, 5);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
546 gtk_widget_show(vbox);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
547
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
548 button = gaim_button(_("Hide IM/Info/Chat buttons"), &display_options, OPT_DISP_NO_BUTTONS, vbox);
1242
8cb5c1000ea9 [gaim-migrate @ 1252]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1218
diff changeset
549 #ifdef USE_APPLET
1253
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
550 gaim_button(_("Automatically show buddy list on sign on"), &general_options,
1780
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
551 OPT_GEN_APP_BUDDY_SHOW, vbox);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
552 #endif
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
553 gaim_button(_("Save Window Size/Position"), &general_options, OPT_GEN_SAVED_WINDOWS, vbox);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
554
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
555 vbox = gtk_vbox_new(FALSE, 5);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
556 gtk_box_pack_start(GTK_BOX(hbox), vbox, TRUE, TRUE, 5);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
557 gtk_widget_show(vbox);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
558
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
559 button2 = gaim_button(_("Show pictures on buttons"), &display_options, OPT_DISP_SHOW_BUTTON_XPM, vbox);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
560 if (display_options & OPT_DISP_NO_BUTTONS)
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
561 gtk_widget_set_sensitive(button2, FALSE);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
562 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(toggle_sensitive), button2);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
563 #ifdef USE_APPLET
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
564 gaim_button(_("Display Buddy List near applet"), &general_options, OPT_GEN_NEAR_APPLET, vbox);
1242
8cb5c1000ea9 [gaim-migrate @ 1252]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1218
diff changeset
565 #endif
8cb5c1000ea9 [gaim-migrate @ 1252]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1218
diff changeset
566
1780
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
567 frame = gtk_frame_new(_("Group Displays"));
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
568 gtk_box_pack_start(GTK_BOX(box), frame, FALSE, FALSE, 5);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
569 gtk_widget_show(frame);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
570
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
571 hbox = gtk_hbox_new(TRUE, 5);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
572 gtk_container_add(GTK_CONTAINER(frame), hbox);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
573 gtk_widget_show(hbox);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
574
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
575 vbox = gtk_vbox_new(FALSE, 5);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
576 gtk_box_pack_start(GTK_BOX(hbox), vbox, TRUE, TRUE, 5);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
577 gtk_widget_show(vbox);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
578
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
579 gaim_button(_("Hide groups with no online buddies"), &display_options, OPT_DISP_NO_MT_GRP, vbox);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
580
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
581 vbox = gtk_vbox_new(FALSE, 5);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
582 gtk_box_pack_start(GTK_BOX(hbox), vbox, TRUE, TRUE, 5);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
583 gtk_widget_show(vbox);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
584
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
585 gaim_button(_("Show numbers in groups"), &display_options, OPT_DISP_SHOW_GRPNUM, vbox);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
586
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
587 frame = gtk_frame_new(_("Buddy Displays"));
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
588 gtk_box_pack_start(GTK_BOX(box), frame, FALSE, FALSE, 5);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
589 gtk_widget_show(frame);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
590
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
591 hbox = gtk_hbox_new(TRUE, 5);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
592 gtk_container_add(GTK_CONTAINER(frame), hbox);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
593 gtk_widget_show(hbox);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
594
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
595 vbox = gtk_vbox_new(FALSE, 5);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
596 gtk_box_pack_start(GTK_BOX(hbox), vbox, TRUE, TRUE, 5);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
597 gtk_widget_show(vbox);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
598
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
599 gaim_button(_("Show buddy type icons"), &display_options, OPT_DISP_SHOW_PIXMAPS, vbox);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
600 gaim_button(_("Show warning levels"), &display_options, OPT_DISP_SHOW_WARN, vbox);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
601
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
602 vbox = gtk_vbox_new(FALSE, 5);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
603 gtk_box_pack_start(GTK_BOX(hbox), vbox, TRUE, TRUE, 5);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
604 gtk_widget_show(vbox);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
605
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
606 gaim_button(_("Show idle times"), &display_options, OPT_DISP_SHOW_IDLETIME, vbox);
652
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
607
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
608 gtk_widget_show(prefdialog);
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
609 }
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
610
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
611 static void convo_page()
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
612 {
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
613 GtkWidget *parent;
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
614 GtkWidget *box;
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
615 GtkWidget *label;
1750
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
616 GtkWidget *frame;
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
617 GtkWidget *hbox;
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
618 GtkWidget *vbox;
652
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
619
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
620 parent = prefdialog->parent;
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
621 gtk_widget_destroy(prefdialog);
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
622
1750
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
623 prefdialog = gtk_frame_new(_("Conversation Options"));
652
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
624 gtk_container_add(GTK_CONTAINER(parent), prefdialog);
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
625
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
626 box = gtk_vbox_new(FALSE, 5);
1253
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
627 gtk_container_set_border_width(GTK_CONTAINER(box), 5);
652
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
628 gtk_container_add(GTK_CONTAINER(prefdialog), box);
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
629 gtk_widget_show(box);
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 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
632 gtk_box_pack_start(GTK_BOX(box), label, FALSE, FALSE, 5);
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
633 gtk_widget_show(label);
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
634
1750
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
635 frame = gtk_frame_new(_("Keyboard Options"));
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
636 gtk_box_pack_start(GTK_BOX(box), frame, FALSE, FALSE, 5);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
637 gtk_widget_show(frame);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
638
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
639 hbox = gtk_hbox_new(TRUE, 5);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
640 gtk_container_add(GTK_CONTAINER(frame), hbox);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
641 gtk_widget_show(hbox);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
642
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
643 vbox = gtk_vbox_new(TRUE, 5);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
644 gtk_box_pack_start(GTK_BOX(hbox), vbox, TRUE, TRUE, 5);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
645 gtk_widget_show(vbox);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
646
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
647 gaim_button(_("Enter sends message"), &general_options, OPT_GEN_ENTER_SENDS, vbox);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
648 gaim_button(_("Control-Enter sends message"), &general_options, OPT_GEN_CTL_ENTER, vbox);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
649 gaim_button(_("Escape closes window"), &general_options, OPT_GEN_ESC_CAN_CLOSE, vbox);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
650
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
651 vbox = gtk_vbox_new(TRUE, 5);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
652 gtk_box_pack_start(GTK_BOX(hbox), vbox, TRUE, TRUE, 5);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
653 gtk_widget_show(vbox);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
654
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
655 gaim_button(_("Control-{B/I/U/S} inserts HTML tags"), &general_options, OPT_GEN_CTL_CHARS, vbox);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
656 gaim_button(_("Control-(number) inserts smileys"), &general_options, OPT_GEN_CTL_SMILEYS, vbox);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
657 gaim_button(_("F2 toggles timestamp display"), &general_options, OPT_GEN_F2_TOGGLES, vbox);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
658
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
659 frame = gtk_frame_new(_("Display and General Options"));
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
660 gtk_box_pack_start(GTK_BOX(box), frame, FALSE, FALSE, 5);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
661 gtk_widget_show(frame);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
662
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
663 hbox = gtk_hbox_new(TRUE, 5);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
664 gtk_container_add(GTK_CONTAINER(frame), hbox);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
665 gtk_widget_show(hbox);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
666
1780
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
667 vbox = gtk_vbox_new(FALSE, 5);
1750
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
668 gtk_box_pack_start(GTK_BOX(hbox), vbox, TRUE, TRUE, 5);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
669 gtk_widget_show(vbox);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
670
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
671 gaim_button(_("Show graphical smileys"), &display_options, OPT_DISP_SHOW_SMILEY, vbox);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
672 gaim_button(_("Show timestamp on messages"), &display_options, OPT_DISP_SHOW_TIME, vbox);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
673 gaim_button(_("Show URLs as links"), &general_options, OPT_GEN_SEND_LINKS, vbox);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
674 gaim_button(_("Highlight misspelled words"), &general_options, OPT_GEN_CHECK_SPELLING, vbox);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
675 gaim_button(_("Sending messages removes away status"), &general_options, OPT_GEN_BACK_ON_IM, vbox);
1773
6d1d9e988fd4 [gaim-migrate @ 1783]
Rob Flynn <gaim@robflynn.com>
parents: 1757
diff changeset
676 gaim_button(_("Queue new messages when away"), &general_options, OPT_GEN_QUEUE_WHEN_AWAY, vbox);
1750
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
677
1780
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
678 vbox = gtk_vbox_new(FALSE, 5);
1750
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
679 gtk_box_pack_start(GTK_BOX(hbox), vbox, TRUE, TRUE, 5);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
680 gtk_widget_show(vbox);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
681
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
682 gaim_button(_("Ignore colors"), &display_options, OPT_DISP_IGNORE_COLOUR, vbox);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
683 gaim_button(_("Ignore font faces"), &display_options, OPT_DISP_IGNORE_FONTS, vbox);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
684 gaim_button(_("Ignore font sizes"), &display_options, OPT_DISP_IGNORE_SIZES, vbox);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
685 gaim_button(_("Ignore TiK Automated Messages"), &general_options, OPT_GEN_TIK_HACK, vbox);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
686 gaim_button(_("Ignore new conversations when away"), &general_options, OPT_GEN_DISCARD_WHEN_AWAY, vbox);
652
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
687
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
688 gtk_widget_show(prefdialog);
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
689 }
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
690
915
378c862a2381 [gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 910
diff changeset
691 static void set_buttons_opt(GtkWidget *w, int data)
378c862a2381 [gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 910
diff changeset
692 {
378c862a2381 [gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 910
diff changeset
693 int mask;
1253
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
694 if (data & 0x1) /* set the first bit if we're affecting chat buttons */
915
378c862a2381 [gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 910
diff changeset
695 mask = (OPT_DISP_CHAT_BUTTON_TEXT | OPT_DISP_CHAT_BUTTON_XPM);
378c862a2381 [gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 910
diff changeset
696 else
378c862a2381 [gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 910
diff changeset
697 mask = (OPT_DISP_CONV_BUTTON_TEXT | OPT_DISP_CONV_BUTTON_XPM);
378c862a2381 [gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 910
diff changeset
698 display_options &= ~(mask);
378c862a2381 [gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 910
diff changeset
699 display_options |= (data & mask);
378c862a2381 [gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 910
diff changeset
700
378c862a2381 [gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 910
diff changeset
701 if (data & 0x1)
378c862a2381 [gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 910
diff changeset
702 update_chat_button_pix();
378c862a2381 [gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 910
diff changeset
703 else
378c862a2381 [gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 910
diff changeset
704 update_im_button_pix();
1757
3dfe4aefd366 [gaim-migrate @ 1767]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1755
diff changeset
705
3dfe4aefd366 [gaim-migrate @ 1767]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1755
diff changeset
706 save_prefs();
915
378c862a2381 [gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 910
diff changeset
707 }
378c862a2381 [gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 910
diff changeset
708
1750
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
709 /* i like everclear */
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
710 static GtkWidget *am_radio(char *label, int which, GtkWidget *box, GtkWidget *set)
915
378c862a2381 [gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 910
diff changeset
711 {
1750
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
712 GtkWidget *opt;
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
713
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
714 if (!set)
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
715 opt = gtk_radio_button_new_with_label(NULL, label);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
716 else
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
717 opt =
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
718 gtk_radio_button_new_with_label(gtk_radio_button_group(GTK_RADIO_BUTTON(set)),
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
719 label);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
720 gtk_box_pack_start(GTK_BOX(box), opt, FALSE, FALSE, 0);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
721 gtk_signal_connect(GTK_OBJECT(opt), "clicked", GTK_SIGNAL_FUNC(set_buttons_opt), (void *)which);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
722 gtk_widget_show(opt);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
723 if (which & 1) {
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
724 if (which == (OPT_DISP_CHAT_BUTTON_TEXT | 1)) {
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
725 if ( (display_options & OPT_DISP_CHAT_BUTTON_TEXT) &&
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
726 !(display_options & OPT_DISP_CHAT_BUTTON_XPM))
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
727 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(opt), TRUE);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
728 } else if (which == (OPT_DISP_CHAT_BUTTON_XPM | 1)) {
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
729 if (!(display_options & OPT_DISP_CHAT_BUTTON_TEXT) &&
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
730 (display_options & OPT_DISP_CHAT_BUTTON_XPM))
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
731 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(opt), TRUE);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
732 } else {
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
733 if (((display_options & OPT_DISP_CHAT_BUTTON_TEXT) &&
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
734 (display_options & OPT_DISP_CHAT_BUTTON_XPM)) ||
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
735 (!(display_options & OPT_DISP_CHAT_BUTTON_TEXT) &&
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
736 !(display_options & OPT_DISP_CHAT_BUTTON_XPM)))
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
737 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(opt), TRUE);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
738 }
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
739 } else {
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
740 if (which == OPT_DISP_CONV_BUTTON_TEXT) {
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
741 if ( (display_options & OPT_DISP_CONV_BUTTON_TEXT) &&
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
742 !(display_options & OPT_DISP_CONV_BUTTON_XPM))
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
743 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(opt), TRUE);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
744 } else if (which == OPT_DISP_CONV_BUTTON_XPM) {
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
745 if (!(display_options & OPT_DISP_CONV_BUTTON_TEXT) &&
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
746 (display_options & OPT_DISP_CONV_BUTTON_XPM))
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
747 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(opt), TRUE);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
748 } else {
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
749 if (((display_options & OPT_DISP_CONV_BUTTON_TEXT) &&
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
750 (display_options & OPT_DISP_CONV_BUTTON_XPM)) ||
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
751 (!(display_options & OPT_DISP_CONV_BUTTON_TEXT) &&
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
752 !(display_options & OPT_DISP_CONV_BUTTON_XPM)))
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
753 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(opt), TRUE);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
754 }
915
378c862a2381 [gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 910
diff changeset
755 }
378c862a2381 [gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 910
diff changeset
756
1750
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
757 return opt;
915
378c862a2381 [gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 910
diff changeset
758 }
378c862a2381 [gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 910
diff changeset
759
1757
3dfe4aefd366 [gaim-migrate @ 1767]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1755
diff changeset
760 static void set_tab_opt(GtkWidget *w, int data)
3dfe4aefd366 [gaim-migrate @ 1767]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1755
diff changeset
761 {
3dfe4aefd366 [gaim-migrate @ 1767]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1755
diff changeset
762 int mask;
3dfe4aefd366 [gaim-migrate @ 1767]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1755
diff changeset
763 if (data & 0x1) /* set the first bit if we're affecting chat buttons */
3dfe4aefd366 [gaim-migrate @ 1767]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1755
diff changeset
764 mask = (OPT_DISP_CHAT_SIDE_TAB | OPT_DISP_CHAT_BR_TAB);
3dfe4aefd366 [gaim-migrate @ 1767]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1755
diff changeset
765 else
3dfe4aefd366 [gaim-migrate @ 1767]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1755
diff changeset
766 mask = (OPT_DISP_CONV_SIDE_TAB | OPT_DISP_CONV_BR_TAB);
3dfe4aefd366 [gaim-migrate @ 1767]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1755
diff changeset
767 display_options &= ~(mask);
3dfe4aefd366 [gaim-migrate @ 1767]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1755
diff changeset
768 display_options |= (data & mask);
3dfe4aefd366 [gaim-migrate @ 1767]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1755
diff changeset
769
3dfe4aefd366 [gaim-migrate @ 1767]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1755
diff changeset
770 if (data & 0x1)
3dfe4aefd366 [gaim-migrate @ 1767]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1755
diff changeset
771 update_chat_tabs();
3dfe4aefd366 [gaim-migrate @ 1767]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1755
diff changeset
772 else
3dfe4aefd366 [gaim-migrate @ 1767]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1755
diff changeset
773 update_im_tabs();
3dfe4aefd366 [gaim-migrate @ 1767]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1755
diff changeset
774
3dfe4aefd366 [gaim-migrate @ 1767]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1755
diff changeset
775 save_prefs();
3dfe4aefd366 [gaim-migrate @ 1767]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1755
diff changeset
776 }
3dfe4aefd366 [gaim-migrate @ 1767]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1755
diff changeset
777
3dfe4aefd366 [gaim-migrate @ 1767]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1755
diff changeset
778 static GtkWidget *tab_radio(char *label, int which, GtkWidget *box, GtkWidget *set)
3dfe4aefd366 [gaim-migrate @ 1767]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1755
diff changeset
779 {
3dfe4aefd366 [gaim-migrate @ 1767]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1755
diff changeset
780 GtkWidget *opt;
3dfe4aefd366 [gaim-migrate @ 1767]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1755
diff changeset
781
3dfe4aefd366 [gaim-migrate @ 1767]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1755
diff changeset
782 if (!set)
3dfe4aefd366 [gaim-migrate @ 1767]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1755
diff changeset
783 opt = gtk_radio_button_new_with_label(NULL, label);
3dfe4aefd366 [gaim-migrate @ 1767]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1755
diff changeset
784 else
3dfe4aefd366 [gaim-migrate @ 1767]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1755
diff changeset
785 opt =
3dfe4aefd366 [gaim-migrate @ 1767]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1755
diff changeset
786 gtk_radio_button_new_with_label(gtk_radio_button_group(GTK_RADIO_BUTTON(set)),
3dfe4aefd366 [gaim-migrate @ 1767]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1755
diff changeset
787 label);
3dfe4aefd366 [gaim-migrate @ 1767]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1755
diff changeset
788 gtk_box_pack_start(GTK_BOX(box), opt, FALSE, FALSE, 0);
3dfe4aefd366 [gaim-migrate @ 1767]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1755
diff changeset
789 gtk_signal_connect(GTK_OBJECT(opt), "clicked", GTK_SIGNAL_FUNC(set_tab_opt), (void *)which);
3dfe4aefd366 [gaim-migrate @ 1767]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1755
diff changeset
790 gtk_widget_show(opt);
3dfe4aefd366 [gaim-migrate @ 1767]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1755
diff changeset
791 if (which & 1) {
3dfe4aefd366 [gaim-migrate @ 1767]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1755
diff changeset
792 if ((display_options & (OPT_DISP_CHAT_SIDE_TAB | OPT_DISP_CHAT_BR_TAB)) == (which ^ 1))
3dfe4aefd366 [gaim-migrate @ 1767]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1755
diff changeset
793 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(opt), TRUE);
3dfe4aefd366 [gaim-migrate @ 1767]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1755
diff changeset
794 if (!(display_options & OPT_DISP_ONE_CHAT_WINDOW))
3dfe4aefd366 [gaim-migrate @ 1767]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1755
diff changeset
795 gtk_widget_set_sensitive(opt, FALSE);
3dfe4aefd366 [gaim-migrate @ 1767]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1755
diff changeset
796 } else {
3dfe4aefd366 [gaim-migrate @ 1767]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1755
diff changeset
797 if ((display_options & (OPT_DISP_CONV_SIDE_TAB | OPT_DISP_CONV_BR_TAB)) == which)
3dfe4aefd366 [gaim-migrate @ 1767]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1755
diff changeset
798 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(opt), TRUE);
3dfe4aefd366 [gaim-migrate @ 1767]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1755
diff changeset
799 if (!(display_options & OPT_DISP_ONE_WINDOW))
3dfe4aefd366 [gaim-migrate @ 1767]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1755
diff changeset
800 gtk_widget_set_sensitive(opt, FALSE);
3dfe4aefd366 [gaim-migrate @ 1767]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1755
diff changeset
801 }
3dfe4aefd366 [gaim-migrate @ 1767]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1755
diff changeset
802
3dfe4aefd366 [gaim-migrate @ 1767]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1755
diff changeset
803 return opt;
3dfe4aefd366 [gaim-migrate @ 1767]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1755
diff changeset
804 }
3dfe4aefd366 [gaim-migrate @ 1767]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1755
diff changeset
805
1813
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
806 static void update_spin_value(GtkWidget *w, GtkWidget *spin)
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
807 {
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
808 int *value = gtk_object_get_user_data(GTK_OBJECT(spin));
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
809 *value = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(spin));
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
810 }
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
811
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
812 static void gaim_labeled_spin_button(GtkWidget *box, const gchar *title, int *val)
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
813 {
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
814 GtkWidget *hbox;
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
815 GtkWidget *label;
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
816 GtkWidget *spin;
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
817 GtkObject *adjust;
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
818
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
819 hbox = gtk_hbox_new(FALSE, 5);
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
820 gtk_box_pack_start(GTK_BOX(box), hbox, FALSE, FALSE, 5);
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
821 gtk_widget_show(hbox);
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
822
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
823 label = gtk_label_new(title);
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
824 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 5);
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
825 gtk_widget_show(label);
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
826
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
827 adjust = gtk_adjustment_new(*val, 1, 9999, 1, 1, 1);
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
828 spin = gtk_spin_button_new(GTK_ADJUSTMENT(adjust), 1, 0);
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
829 gtk_object_set_user_data(GTK_OBJECT(spin), val);
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
830 gtk_widget_set_usize(spin, 50, -1);
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
831 gtk_box_pack_start(GTK_BOX(hbox), spin, FALSE, FALSE, 0);
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
832 gtk_signal_connect(GTK_OBJECT(adjust), "value-changed",
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
833 GTK_SIGNAL_FUNC(update_spin_value), GTK_WIDGET(spin));
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
834 gtk_widget_show(spin);
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
835 }
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
836
652
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
837 static void im_page()
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
838 {
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
839 GtkWidget *parent;
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
840 GtkWidget *box;
1750
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
841 GtkWidget *label;
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
842 GtkWidget *frame;
1813
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
843 GtkWidget *vbox;
915
378c862a2381 [gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 910
diff changeset
844 GtkWidget *hbox;
1813
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
845 GtkWidget *vbox2;
915
378c862a2381 [gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 910
diff changeset
846 GtkWidget *opt;
1750
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
847 GtkWidget *sep;
1757
3dfe4aefd366 [gaim-migrate @ 1767]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1755
diff changeset
848 GtkWidget *button;
3dfe4aefd366 [gaim-migrate @ 1767]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1755
diff changeset
849 GtkWidget *hbox2;
1813
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
850 GtkWidget *vbox3;
652
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
851
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
852 parent = prefdialog->parent;
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
853 gtk_widget_destroy(prefdialog);
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 prefdialog = gtk_frame_new(_("IM Options"));
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
856 gtk_container_add(GTK_CONTAINER(parent), prefdialog);
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
857
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
858 box = gtk_vbox_new(FALSE, 5);
1253
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
859 gtk_container_set_border_width(GTK_CONTAINER(box), 5);
652
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
860 gtk_container_add(GTK_CONTAINER(prefdialog), box);
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
861 gtk_widget_show(box);
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
862
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
863 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
864 gtk_box_pack_start(GTK_BOX(box), label, FALSE, FALSE, 5);
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
865 gtk_widget_show(label);
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
866
1750
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
867 frame = gtk_frame_new(_("IM Window"));
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
868 gtk_box_pack_start(GTK_BOX(box), frame, FALSE, FALSE, 5);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
869 gtk_widget_show(frame);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
870
1813
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
871 vbox = gtk_vbox_new(FALSE, 5);
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
872 gtk_container_add(GTK_CONTAINER(frame), vbox);
1750
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
873 gtk_widget_show(vbox);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
874
1813
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
875 hbox = gtk_hbox_new(FALSE, 5);
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
876 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 5);
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
877 gtk_widget_show(hbox);
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
878
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
879 vbox2 = gtk_vbox_new(TRUE, 5);
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
880 gtk_box_pack_start(GTK_BOX(hbox), vbox2, FALSE, FALSE, 5);
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
881 gtk_widget_show(vbox2);
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
882
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
883 label = gtk_label_new(_("Show buttons as: "));
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
884 gtk_box_pack_start(GTK_BOX(vbox2), label, FALSE, FALSE, 5);
915
378c862a2381 [gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 910
diff changeset
885 gtk_widget_show(label);
378c862a2381 [gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 910
diff changeset
886
1813
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
887 opt = am_radio(_("Pictures And Text"), OPT_DISP_CONV_BUTTON_TEXT | OPT_DISP_CONV_BUTTON_XPM, vbox2, NULL);
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
888 opt = am_radio(_("Pictures"), OPT_DISP_CONV_BUTTON_XPM, vbox2, opt);
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
889 opt = am_radio(_("Text"), OPT_DISP_CONV_BUTTON_TEXT, vbox2, opt);
1750
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
890
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
891 sep = gtk_vseparator_new();
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
892 gtk_box_pack_start(GTK_BOX(hbox), sep, FALSE, FALSE, 5);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
893 gtk_widget_show(sep);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
894
1813
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
895 vbox2 = gtk_vbox_new(TRUE, 5);
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
896 gtk_box_pack_start(GTK_BOX(hbox), vbox2, TRUE, TRUE, 5);
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
897 gtk_widget_show(vbox2);
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
898
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
899 button = gaim_button(_("Show all conversations in one tabbed window"), &display_options, OPT_DISP_ONE_WINDOW, vbox2);
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
900 gaim_button(_("Raise windows on events"), &general_options, OPT_GEN_POPUP_WINDOWS, vbox2);
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
901 gaim_button(_("Show logins in window"), &display_options, OPT_DISP_SHOW_LOGON, vbox2);
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
902
2262
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
903 frame = gtk_frame_new(_("Window Sizes"));
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
904 gtk_box_pack_start(GTK_BOX(box), frame, FALSE, FALSE, 5);
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
905 gtk_widget_show(frame);
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
906
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
907 vbox = gtk_vbox_new(FALSE, 5);
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
908 gtk_container_add(GTK_CONTAINER(frame), vbox);
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
909 gtk_widget_show(vbox);
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
910
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
911 gaim_labeled_spin_button(vbox, _("New window width:"), &conv_size.width);
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
912 gaim_labeled_spin_button(vbox, _("New window height:"), &conv_size.height);
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
913 gaim_labeled_spin_button(vbox, _("Entry widget height:"), &conv_size.entry_height);
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
914
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
915 frame = gtk_frame_new(_("Tab Placement"));
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
916 gtk_box_pack_start(GTK_BOX(box), frame, FALSE, FALSE, 5);
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
917 gtk_widget_show(frame);
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
918
1813
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
919 hbox = gtk_hbox_new(FALSE, 5);
2262
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
920 gtk_container_add(GTK_CONTAINER(frame), hbox);
1813
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
921 gtk_widget_show(hbox);
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
922
2262
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
923 vbox = gtk_vbox_new(FALSE, 5);
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
924 gtk_box_pack_start(GTK_BOX(hbox), vbox, TRUE, TRUE, 5);
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
925 gtk_widget_show(vbox);
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
926
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
927 hbox2 = gtk_hbox_new(TRUE, 5);
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
928 gtk_box_pack_start(GTK_BOX(vbox), hbox2, TRUE, TRUE, 5);
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
929 gtk_widget_show(hbox2);
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
930
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
931 vbox3 = gtk_vbox_new(TRUE, 5);
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
932 gtk_box_pack_start(GTK_BOX(hbox2), vbox3, TRUE, TRUE, 5);
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
933 gtk_widget_show(vbox3);
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
934
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
935 opt = tab_radio(_("Top"), 0, vbox3, NULL);
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
936 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(toggle_sensitive), opt);
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
937 opt = tab_radio(_("Bottom"), OPT_DISP_CONV_BR_TAB, vbox3, opt);
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
938 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(toggle_sensitive), opt);
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
939
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
940 vbox3 = gtk_vbox_new(TRUE, 5);
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
941 gtk_box_pack_start(GTK_BOX(hbox2), vbox3, TRUE, TRUE, 5);
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
942 gtk_widget_show(vbox3);
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
943
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
944 opt = tab_radio(_("Left"), OPT_DISP_CONV_SIDE_TAB, vbox3, opt);
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
945 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(toggle_sensitive), opt);
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
946 opt = tab_radio(_("Right"), OPT_DISP_CONV_SIDE_TAB | OPT_DISP_CONV_BR_TAB, vbox3, opt);
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
947 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(toggle_sensitive), opt);
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
948
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
949 gtk_widget_show(prefdialog);
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
950 }
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
951
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
952 static void chat_page()
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
953 {
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
954 GtkWidget *parent;
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
955 GtkWidget *box;
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
956 GtkWidget *label;
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
957 GtkWidget *frame;
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
958 GtkWidget *vbox;
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
959 GtkWidget *hbox;
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
960 GtkWidget *vbox2;
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
961 GtkWidget *opt;
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
962 GtkWidget *sep;
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
963 GtkWidget *button;
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
964 GtkWidget *hbox2;
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
965 GtkWidget *vbox3;
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
966
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
967 parent = prefdialog->parent;
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
968 gtk_widget_destroy(prefdialog);
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
969
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
970 prefdialog = gtk_frame_new(_("Chat Options"));
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
971 gtk_container_add(GTK_CONTAINER(parent), prefdialog);
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
972
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
973 box = gtk_vbox_new(FALSE, 5);
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
974 gtk_container_set_border_width(GTK_CONTAINER(box), 5);
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
975 gtk_container_add(GTK_CONTAINER(prefdialog), box);
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
976 gtk_widget_show(box);
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
977
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
978 label = gtk_label_new(_("All options take effect immediately unless otherwise noted."));
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
979 gtk_box_pack_start(GTK_BOX(box), label, FALSE, FALSE, 5);
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
980 gtk_widget_show(label);
1750
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
981
1755
300dcb2aa120 [gaim-migrate @ 1765]
Rob Flynn <gaim@robflynn.com>
parents: 1750
diff changeset
982 frame = gtk_frame_new(_("Group Chat Window"));
1750
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
983 gtk_box_pack_start(GTK_BOX(box), frame, FALSE, FALSE, 5);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
984 gtk_widget_show(frame);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
985
1813
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
986 vbox = gtk_vbox_new(FALSE, 5);
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
987 gtk_container_add(GTK_CONTAINER(frame), vbox);
1750
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
988 gtk_widget_show(vbox);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
989
1813
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
990 hbox = gtk_hbox_new(FALSE, 5);
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
991 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 5);
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
992 gtk_widget_show(hbox);
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
993
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
994 vbox2 = gtk_vbox_new(TRUE, 5);
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
995 gtk_box_pack_start(GTK_BOX(hbox), vbox2, FALSE, FALSE, 5);
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
996 gtk_widget_show(vbox2);
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
997
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
998 label = gtk_label_new(_("Show buttons as: "));
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
999 gtk_box_pack_start(GTK_BOX(vbox2), label, FALSE, FALSE, 5);
915
378c862a2381 [gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 910
diff changeset
1000 gtk_widget_show(label);
378c862a2381 [gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 910
diff changeset
1001
1813
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
1002 opt = am_radio(_("Pictures And Text"), OPT_DISP_CHAT_BUTTON_TEXT | OPT_DISP_CHAT_BUTTON_XPM | 1, vbox2, NULL);
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
1003 opt = am_radio(_("Pictures"), OPT_DISP_CHAT_BUTTON_XPM | 1, vbox2, opt);
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
1004 opt = am_radio(_("Text"), OPT_DISP_CHAT_BUTTON_TEXT | 1, vbox2, opt);
1750
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
1005
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
1006 sep = gtk_vseparator_new();
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
1007 gtk_box_pack_start(GTK_BOX(hbox), sep, FALSE, FALSE, 5);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
1008 gtk_widget_show(sep);
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
1009
1813
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
1010 vbox2 = gtk_vbox_new(TRUE, 5);
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
1011 gtk_box_pack_start(GTK_BOX(hbox), vbox2, TRUE, TRUE, 5);
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
1012 gtk_widget_show(vbox2);
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
1013
2262
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
1014 button = gaim_button(_("Show all chats in one tabbed window"), &display_options, OPT_DISP_ONE_CHAT_WINDOW, vbox2);
1813
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
1015 gaim_button(_("Raise windows on events"), &general_options, OPT_GEN_POPUP_CHAT, vbox2);
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
1016 gaim_button(_("Show people joining/leaving in window"), &display_options, OPT_DISP_CHAT_LOGON, vbox2);
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
1017
2262
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
1018 frame = gtk_frame_new(_("Window Sizes"));
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
1019 gtk_box_pack_start(GTK_BOX(box), frame, FALSE, FALSE, 5);
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
1020 gtk_widget_show(frame);
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
1021
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
1022 vbox = gtk_vbox_new(FALSE, 5);
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
1023 gtk_container_add(GTK_CONTAINER(frame), vbox);
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
1024 gtk_widget_show(vbox);
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
1025
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
1026 gaim_labeled_spin_button(vbox, _("New window width:"), &buddy_chat_size.width);
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
1027 gaim_labeled_spin_button(vbox, _("New window height:"), &buddy_chat_size.height);
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
1028 gaim_labeled_spin_button(vbox, _("Entry widget height:"), &buddy_chat_size.entry_height);
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
1029
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
1030 frame = gtk_frame_new(_("Tab Placement"));
1757
3dfe4aefd366 [gaim-migrate @ 1767]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1755
diff changeset
1031 gtk_box_pack_start(GTK_BOX(box), frame, FALSE, FALSE, 5);
3dfe4aefd366 [gaim-migrate @ 1767]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1755
diff changeset
1032 gtk_widget_show(frame);
3dfe4aefd366 [gaim-migrate @ 1767]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1755
diff changeset
1033
3dfe4aefd366 [gaim-migrate @ 1767]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1755
diff changeset
1034 hbox = gtk_hbox_new(FALSE, 5);
3dfe4aefd366 [gaim-migrate @ 1767]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1755
diff changeset
1035 gtk_container_add(GTK_CONTAINER(frame), hbox);
3dfe4aefd366 [gaim-migrate @ 1767]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1755
diff changeset
1036 gtk_widget_show(hbox);
3dfe4aefd366 [gaim-migrate @ 1767]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1755
diff changeset
1037
3dfe4aefd366 [gaim-migrate @ 1767]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1755
diff changeset
1038 vbox = gtk_vbox_new(FALSE, 5);
3dfe4aefd366 [gaim-migrate @ 1767]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1755
diff changeset
1039 gtk_box_pack_start(GTK_BOX(hbox), vbox, TRUE, TRUE, 5);
3dfe4aefd366 [gaim-migrate @ 1767]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1755
diff changeset
1040 gtk_widget_show(vbox);
3dfe4aefd366 [gaim-migrate @ 1767]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1755
diff changeset
1041
3dfe4aefd366 [gaim-migrate @ 1767]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1755
diff changeset
1042 hbox2 = gtk_hbox_new(TRUE, 5);
3dfe4aefd366 [gaim-migrate @ 1767]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1755
diff changeset
1043 gtk_box_pack_start(GTK_BOX(vbox), hbox2, TRUE, TRUE, 5);
3dfe4aefd366 [gaim-migrate @ 1767]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1755
diff changeset
1044 gtk_widget_show(hbox2);
3dfe4aefd366 [gaim-migrate @ 1767]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1755
diff changeset
1045
1813
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
1046 vbox3 = gtk_vbox_new(TRUE, 5);
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
1047 gtk_box_pack_start(GTK_BOX(hbox2), vbox3, TRUE, TRUE, 5);
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
1048 gtk_widget_show(vbox3);
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
1049
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
1050 opt = tab_radio(_("Top"), 1, vbox3, NULL);
2262
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
1051 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(toggle_sensitive), opt);
1813
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
1052 opt = tab_radio(_("Bottom"), OPT_DISP_CHAT_BR_TAB | 1, vbox3, opt);
2262
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
1053 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(toggle_sensitive), opt);
1757
3dfe4aefd366 [gaim-migrate @ 1767]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1755
diff changeset
1054
1813
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
1055 vbox3 = gtk_vbox_new(TRUE, 5);
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
1056 gtk_box_pack_start(GTK_BOX(hbox2), vbox3, TRUE, TRUE, 5);
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
1057 gtk_widget_show(vbox3);
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
1058
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
1059 opt = tab_radio(_("Left"), OPT_DISP_CHAT_SIDE_TAB | 1, vbox3, opt);
2262
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
1060 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(toggle_sensitive), opt);
1813
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
1061 opt = tab_radio(_("Right"), OPT_DISP_CHAT_SIDE_TAB | OPT_DISP_CHAT_BR_TAB | 1, vbox3, opt);
2262
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
1062 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(toggle_sensitive), opt);
1757
3dfe4aefd366 [gaim-migrate @ 1767]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1755
diff changeset
1063
652
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1064 gtk_widget_show(prefdialog);
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1065 }
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1066
873
789df4b47508 [gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 864
diff changeset
1067 static GtkWidget *show_color_pref(GtkWidget *box, gboolean fgc)
789df4b47508 [gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 864
diff changeset
1068 {
789df4b47508 [gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 864
diff changeset
1069 /* more stuff stolen from X-Chat */
789df4b47508 [gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 864
diff changeset
1070 GtkWidget *swid;
789df4b47508 [gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 864
diff changeset
1071 GdkColor c;
789df4b47508 [gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 864
diff changeset
1072 GtkStyle *style;
789df4b47508 [gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 864
diff changeset
1073 c.pixel = 0;
789df4b47508 [gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 864
diff changeset
1074 if (fgc) {
789df4b47508 [gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 864
diff changeset
1075 if (font_options & OPT_FONT_FGCOL) {
789df4b47508 [gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 864
diff changeset
1076 c.red = fgcolor.red << 8;
789df4b47508 [gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 864
diff changeset
1077 c.blue = fgcolor.blue << 8;
789df4b47508 [gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 864
diff changeset
1078 c.green = fgcolor.green << 8;
789df4b47508 [gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 864
diff changeset
1079 } else {
789df4b47508 [gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 864
diff changeset
1080 c.red = 0;
789df4b47508 [gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 864
diff changeset
1081 c.blue = 0;
789df4b47508 [gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 864
diff changeset
1082 c.green = 0;
789df4b47508 [gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 864
diff changeset
1083 }
789df4b47508 [gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 864
diff changeset
1084 } else {
789df4b47508 [gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 864
diff changeset
1085 if (font_options & OPT_FONT_BGCOL) {
789df4b47508 [gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 864
diff changeset
1086 c.red = bgcolor.red << 8;
789df4b47508 [gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 864
diff changeset
1087 c.blue = bgcolor.blue << 8;
789df4b47508 [gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 864
diff changeset
1088 c.green = bgcolor.green << 8;
789df4b47508 [gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 864
diff changeset
1089 } else {
789df4b47508 [gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 864
diff changeset
1090 c.red = 0xffff;
789df4b47508 [gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 864
diff changeset
1091 c.blue = 0xffff;
789df4b47508 [gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 864
diff changeset
1092 c.green = 0xffff;
789df4b47508 [gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 864
diff changeset
1093 }
789df4b47508 [gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 864
diff changeset
1094 }
789df4b47508 [gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 864
diff changeset
1095
789df4b47508 [gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 864
diff changeset
1096 style = gtk_style_new();
789df4b47508 [gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 864
diff changeset
1097 style->bg[0] = c;
789df4b47508 [gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 864
diff changeset
1098
789df4b47508 [gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 864
diff changeset
1099 swid = gtk_event_box_new();
789df4b47508 [gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 864
diff changeset
1100 gtk_widget_set_style(GTK_WIDGET(swid), style);
789df4b47508 [gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 864
diff changeset
1101 gtk_style_unref(style);
789df4b47508 [gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 864
diff changeset
1102 gtk_widget_set_usize(GTK_WIDGET(swid), 40, -1);
789df4b47508 [gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 864
diff changeset
1103 gtk_box_pack_start(GTK_BOX(box), swid, FALSE, FALSE, 5);
789df4b47508 [gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 864
diff changeset
1104 gtk_widget_show(swid);
789df4b47508 [gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 864
diff changeset
1105 return swid;
789df4b47508 [gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 864
diff changeset
1106 }
789df4b47508 [gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 864
diff changeset
1107
789df4b47508 [gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 864
diff changeset
1108 GtkWidget *pref_fg_picture = NULL;
789df4b47508 [gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 864
diff changeset
1109 GtkWidget *pref_bg_picture = NULL;
789df4b47508 [gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 864
diff changeset
1110
789df4b47508 [gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 864
diff changeset
1111 void update_color(GtkWidget *w, GtkWidget *pic)
789df4b47508 [gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 864
diff changeset
1112 {
789df4b47508 [gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 864
diff changeset
1113 GdkColor c;
789df4b47508 [gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 864
diff changeset
1114 GtkStyle *style;
789df4b47508 [gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 864
diff changeset
1115 c.pixel = 0;
789df4b47508 [gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 864
diff changeset
1116 if (pic == pref_fg_picture) {
789df4b47508 [gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 864
diff changeset
1117 if (font_options & OPT_FONT_FGCOL) {
789df4b47508 [gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 864
diff changeset
1118 c.red = fgcolor.red << 8;
789df4b47508 [gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 864
diff changeset
1119 c.blue = fgcolor.blue << 8;
789df4b47508 [gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 864
diff changeset
1120 c.green = fgcolor.green << 8;
789df4b47508 [gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 864
diff changeset
1121 } else {
789df4b47508 [gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 864
diff changeset
1122 c.red = 0;
789df4b47508 [gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 864
diff changeset
1123 c.blue = 0;
789df4b47508 [gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 864
diff changeset
1124 c.green = 0;
789df4b47508 [gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 864
diff changeset
1125 }
789df4b47508 [gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 864
diff changeset
1126 } else {
789df4b47508 [gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 864
diff changeset
1127 if (font_options & OPT_FONT_BGCOL) {
789df4b47508 [gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 864
diff changeset
1128 c.red = bgcolor.red << 8;
789df4b47508 [gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 864
diff changeset
1129 c.blue = bgcolor.blue << 8;
789df4b47508 [gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 864
diff changeset
1130 c.green = bgcolor.green << 8;
789df4b47508 [gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 864
diff changeset
1131 } else {
789df4b47508 [gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 864
diff changeset
1132 c.red = 0xffff;
789df4b47508 [gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 864
diff changeset
1133 c.blue = 0xffff;
789df4b47508 [gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 864
diff changeset
1134 c.green = 0xffff;
789df4b47508 [gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 864
diff changeset
1135 }
789df4b47508 [gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 864
diff changeset
1136 }
789df4b47508 [gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 864
diff changeset
1137
789df4b47508 [gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 864
diff changeset
1138 style = gtk_style_new();
789df4b47508 [gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 864
diff changeset
1139 style->bg[0] = c;
789df4b47508 [gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 864
diff changeset
1140 gtk_widget_set_style(pic, style);
789df4b47508 [gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 864
diff changeset
1141 gtk_style_unref(style);
789df4b47508 [gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 864
diff changeset
1142 }
789df4b47508 [gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 864
diff changeset
1143
652
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1144 static void font_page()
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1145 {
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1146 GtkWidget *parent;
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1147 GtkWidget *box;
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1148 GtkWidget *label;
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1149 GtkWidget *hbox;
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1150 GtkWidget *button;
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1151 GtkWidget *select;
1441
5c67b8794991 [gaim-migrate @ 1451]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1437
diff changeset
1152 GtkWidget *spin;
5c67b8794991 [gaim-migrate @ 1451]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1437
diff changeset
1153 GtkObject *adjust;
1788
c8511181823e [gaim-migrate @ 1798]
Rob Flynn <gaim@robflynn.com>
parents: 1780
diff changeset
1154 GtkWidget *frame;
c8511181823e [gaim-migrate @ 1798]
Rob Flynn <gaim@robflynn.com>
parents: 1780
diff changeset
1155 GtkWidget *fbox;
2269
7ff6170d84a0 [gaim-migrate @ 2279]
Rob Flynn <gaim@robflynn.com>
parents: 2262
diff changeset
1156 GtkWidget *table;
652
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1157
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1158 parent = prefdialog->parent;
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1159 gtk_widget_destroy(prefdialog);
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1160
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1161 prefdialog = gtk_frame_new(_("Font Options"));
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1162 gtk_container_add(GTK_CONTAINER(parent), prefdialog);
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1163
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1164 box = gtk_vbox_new(FALSE, 5);
1253
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
1165 gtk_container_set_border_width(GTK_CONTAINER(box), 5);
652
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1166 gtk_container_add(GTK_CONTAINER(prefdialog), box);
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1167 gtk_widget_show(box);
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1168
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1169 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
1170 gtk_box_pack_start(GTK_BOX(box), label, FALSE, FALSE, 5);
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1171 gtk_widget_show(label);
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1172
1788
c8511181823e [gaim-migrate @ 1798]
Rob Flynn <gaim@robflynn.com>
parents: 1780
diff changeset
1173 frame = gtk_frame_new("Font Style");
2269
7ff6170d84a0 [gaim-migrate @ 2279]
Rob Flynn <gaim@robflynn.com>
parents: 2262
diff changeset
1174
7ff6170d84a0 [gaim-migrate @ 2279]
Rob Flynn <gaim@robflynn.com>
parents: 2262
diff changeset
1175 table = gtk_table_new(2, 2, FALSE);
7ff6170d84a0 [gaim-migrate @ 2279]
Rob Flynn <gaim@robflynn.com>
parents: 2262
diff changeset
1176 gtk_container_set_border_width(GTK_CONTAINER(table), 5);
7ff6170d84a0 [gaim-migrate @ 2279]
Rob Flynn <gaim@robflynn.com>
parents: 2262
diff changeset
1177 gtk_table_set_col_spacings(GTK_TABLE(table), 5);
7ff6170d84a0 [gaim-migrate @ 2279]
Rob Flynn <gaim@robflynn.com>
parents: 2262
diff changeset
1178 gtk_table_set_row_spacings(GTK_TABLE(table), 5);
7ff6170d84a0 [gaim-migrate @ 2279]
Rob Flynn <gaim@robflynn.com>
parents: 2262
diff changeset
1179 gtk_container_add(GTK_CONTAINER(frame), table);
7ff6170d84a0 [gaim-migrate @ 2279]
Rob Flynn <gaim@robflynn.com>
parents: 2262
diff changeset
1180
7ff6170d84a0 [gaim-migrate @ 2279]
Rob Flynn <gaim@robflynn.com>
parents: 2262
diff changeset
1181 button = gtk_check_button_new_with_label(_("Bold Text"));
7ff6170d84a0 [gaim-migrate @ 2279]
Rob Flynn <gaim@robflynn.com>
parents: 2262
diff changeset
1182 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(button), (font_options & OPT_FONT_BOLD));
7ff6170d84a0 [gaim-migrate @ 2279]
Rob Flynn <gaim@robflynn.com>
parents: 2262
diff changeset
1183 gtk_table_attach(GTK_TABLE(table), button, 0, 1, 0, 1, GTK_FILL | GTK_EXPAND, 0, 0, 0);
7ff6170d84a0 [gaim-migrate @ 2279]
Rob Flynn <gaim@robflynn.com>
parents: 2262
diff changeset
1184 gtk_signal_connect(GTK_OBJECT(button), "clicked",
7ff6170d84a0 [gaim-migrate @ 2279]
Rob Flynn <gaim@robflynn.com>
parents: 2262
diff changeset
1185 GTK_SIGNAL_FUNC(set_font_option), (int*)OPT_FONT_BOLD);
7ff6170d84a0 [gaim-migrate @ 2279]
Rob Flynn <gaim@robflynn.com>
parents: 2262
diff changeset
1186
7ff6170d84a0 [gaim-migrate @ 2279]
Rob Flynn <gaim@robflynn.com>
parents: 2262
diff changeset
1187 button = gtk_check_button_new_with_label(_("Italic Text"));
7ff6170d84a0 [gaim-migrate @ 2279]
Rob Flynn <gaim@robflynn.com>
parents: 2262
diff changeset
1188 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(button), (font_options & OPT_FONT_ITALIC));
7ff6170d84a0 [gaim-migrate @ 2279]
Rob Flynn <gaim@robflynn.com>
parents: 2262
diff changeset
1189 gtk_table_attach(GTK_TABLE(table), button, 0, 1, 1, 2, GTK_FILL | GTK_EXPAND, 0, 0, 0);
7ff6170d84a0 [gaim-migrate @ 2279]
Rob Flynn <gaim@robflynn.com>
parents: 2262
diff changeset
1190 gtk_signal_connect(GTK_OBJECT(button), "clicked",
7ff6170d84a0 [gaim-migrate @ 2279]
Rob Flynn <gaim@robflynn.com>
parents: 2262
diff changeset
1191 GTK_SIGNAL_FUNC(set_font_option), (int*)OPT_FONT_ITALIC);
7ff6170d84a0 [gaim-migrate @ 2279]
Rob Flynn <gaim@robflynn.com>
parents: 2262
diff changeset
1192
7ff6170d84a0 [gaim-migrate @ 2279]
Rob Flynn <gaim@robflynn.com>
parents: 2262
diff changeset
1193 button = gtk_check_button_new_with_label(_("Underline Text"));
7ff6170d84a0 [gaim-migrate @ 2279]
Rob Flynn <gaim@robflynn.com>
parents: 2262
diff changeset
1194 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(button), (font_options & OPT_FONT_UNDERLINE));
7ff6170d84a0 [gaim-migrate @ 2279]
Rob Flynn <gaim@robflynn.com>
parents: 2262
diff changeset
1195 gtk_table_attach(GTK_TABLE(table), button, 1, 2, 0, 1, GTK_FILL | GTK_EXPAND, 0, 0, 0);
7ff6170d84a0 [gaim-migrate @ 2279]
Rob Flynn <gaim@robflynn.com>
parents: 2262
diff changeset
1196 gtk_signal_connect(GTK_OBJECT(button), "clicked",
7ff6170d84a0 [gaim-migrate @ 2279]
Rob Flynn <gaim@robflynn.com>
parents: 2262
diff changeset
1197 GTK_SIGNAL_FUNC(set_font_option), (int*)OPT_FONT_UNDERLINE);
7ff6170d84a0 [gaim-migrate @ 2279]
Rob Flynn <gaim@robflynn.com>
parents: 2262
diff changeset
1198
7ff6170d84a0 [gaim-migrate @ 2279]
Rob Flynn <gaim@robflynn.com>
parents: 2262
diff changeset
1199 button = gtk_check_button_new_with_label(_("Strike through Text"));
7ff6170d84a0 [gaim-migrate @ 2279]
Rob Flynn <gaim@robflynn.com>
parents: 2262
diff changeset
1200 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(button), (font_options & OPT_FONT_STRIKE));
7ff6170d84a0 [gaim-migrate @ 2279]
Rob Flynn <gaim@robflynn.com>
parents: 2262
diff changeset
1201 gtk_table_attach(GTK_TABLE(table), button, 1, 2, 1, 2, GTK_FILL | GTK_EXPAND, 0, 0, 0);
7ff6170d84a0 [gaim-migrate @ 2279]
Rob Flynn <gaim@robflynn.com>
parents: 2262
diff changeset
1202 gtk_signal_connect(GTK_OBJECT(button), "clicked",
7ff6170d84a0 [gaim-migrate @ 2279]
Rob Flynn <gaim@robflynn.com>
parents: 2262
diff changeset
1203 GTK_SIGNAL_FUNC(set_font_option), (int*)OPT_FONT_STRIKE);
7ff6170d84a0 [gaim-migrate @ 2279]
Rob Flynn <gaim@robflynn.com>
parents: 2262
diff changeset
1204
7ff6170d84a0 [gaim-migrate @ 2279]
Rob Flynn <gaim@robflynn.com>
parents: 2262
diff changeset
1205
7ff6170d84a0 [gaim-migrate @ 2279]
Rob Flynn <gaim@robflynn.com>
parents: 2262
diff changeset
1206 gtk_widget_show_all(table);
1788
c8511181823e [gaim-migrate @ 1798]
Rob Flynn <gaim@robflynn.com>
parents: 1780
diff changeset
1207 gtk_widget_show(frame);
c8511181823e [gaim-migrate @ 1798]
Rob Flynn <gaim@robflynn.com>
parents: 1780
diff changeset
1208
c8511181823e [gaim-migrate @ 1798]
Rob Flynn <gaim@robflynn.com>
parents: 1780
diff changeset
1209 gtk_box_pack_start(GTK_BOX(box), frame, FALSE, FALSE, 5);
c8511181823e [gaim-migrate @ 1798]
Rob Flynn <gaim@robflynn.com>
parents: 1780
diff changeset
1210
c8511181823e [gaim-migrate @ 1798]
Rob Flynn <gaim@robflynn.com>
parents: 1780
diff changeset
1211 /* ----------- */
c8511181823e [gaim-migrate @ 1798]
Rob Flynn <gaim@robflynn.com>
parents: 1780
diff changeset
1212
c8511181823e [gaim-migrate @ 1798]
Rob Flynn <gaim@robflynn.com>
parents: 1780
diff changeset
1213 frame = gtk_frame_new("Font Color");
c8511181823e [gaim-migrate @ 1798]
Rob Flynn <gaim@robflynn.com>
parents: 1780
diff changeset
1214 fbox = gtk_vbox_new(FALSE, 5);
c8511181823e [gaim-migrate @ 1798]
Rob Flynn <gaim@robflynn.com>
parents: 1780
diff changeset
1215
c8511181823e [gaim-migrate @ 1798]
Rob Flynn <gaim@robflynn.com>
parents: 1780
diff changeset
1216 gtk_container_add(GTK_CONTAINER(frame), fbox);
c8511181823e [gaim-migrate @ 1798]
Rob Flynn <gaim@robflynn.com>
parents: 1780
diff changeset
1217 gtk_container_set_border_width(GTK_CONTAINER(fbox), 5);
c8511181823e [gaim-migrate @ 1798]
Rob Flynn <gaim@robflynn.com>
parents: 1780
diff changeset
1218
c8511181823e [gaim-migrate @ 1798]
Rob Flynn <gaim@robflynn.com>
parents: 1780
diff changeset
1219 gtk_widget_show(fbox);
c8511181823e [gaim-migrate @ 1798]
Rob Flynn <gaim@robflynn.com>
parents: 1780
diff changeset
1220 gtk_widget_show(frame);
c8511181823e [gaim-migrate @ 1798]
Rob Flynn <gaim@robflynn.com>
parents: 1780
diff changeset
1221
c8511181823e [gaim-migrate @ 1798]
Rob Flynn <gaim@robflynn.com>
parents: 1780
diff changeset
1222 gtk_box_pack_start(GTK_BOX(box), frame, FALSE, FALSE, 5);
c8511181823e [gaim-migrate @ 1798]
Rob Flynn <gaim@robflynn.com>
parents: 1780
diff changeset
1223
666
71ea550c22ac [gaim-migrate @ 676]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 660
diff changeset
1224 hbox = gtk_hbox_new(FALSE, 5);
1788
c8511181823e [gaim-migrate @ 1798]
Rob Flynn <gaim@robflynn.com>
parents: 1780
diff changeset
1225 gtk_box_pack_start(GTK_BOX(fbox), hbox, FALSE, FALSE, 5);
666
71ea550c22ac [gaim-migrate @ 676]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 660
diff changeset
1226 gtk_widget_show(hbox);
1253
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
1227
873
789df4b47508 [gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 864
diff changeset
1228 pref_fg_picture = show_color_pref(hbox, TRUE);
666
71ea550c22ac [gaim-migrate @ 676]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 660
diff changeset
1229 button = gaim_button(_("Text Color"), &font_options, OPT_FONT_FGCOL, hbox);
71ea550c22ac [gaim-migrate @ 676]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 660
diff changeset
1230
855
82673bb41e2f [gaim-migrate @ 865]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 834
diff changeset
1231 select = picture_button(prefs, _("Select"), fgcolor_xpm);
666
71ea550c22ac [gaim-migrate @ 676]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 660
diff changeset
1232 gtk_box_pack_start(GTK_BOX(hbox), select, FALSE, FALSE, 5);
71ea550c22ac [gaim-migrate @ 676]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 660
diff changeset
1233 if (!(font_options & OPT_FONT_FGCOL))
71ea550c22ac [gaim-migrate @ 676]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 660
diff changeset
1234 gtk_widget_set_sensitive(GTK_WIDGET(select), FALSE);
858
3de6e98e8898 [gaim-migrate @ 868]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 855
diff changeset
1235 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
1236 gtk_widget_show(select);
71ea550c22ac [gaim-migrate @ 676]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 660
diff changeset
1237
71ea550c22ac [gaim-migrate @ 676]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 660
diff changeset
1238 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(toggle_sensitive), select);
1253
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
1239 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(update_color),
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
1240 pref_fg_picture);
666
71ea550c22ac [gaim-migrate @ 676]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 660
diff changeset
1241
71ea550c22ac [gaim-migrate @ 676]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 660
diff changeset
1242 hbox = gtk_hbox_new(FALSE, 5);
1788
c8511181823e [gaim-migrate @ 1798]
Rob Flynn <gaim@robflynn.com>
parents: 1780
diff changeset
1243 gtk_box_pack_start(GTK_BOX(fbox), hbox, FALSE, FALSE, 5);
666
71ea550c22ac [gaim-migrate @ 676]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 660
diff changeset
1244 gtk_widget_show(hbox);
1253
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
1245
873
789df4b47508 [gaim-migrate @ 883]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 864
diff changeset
1246 pref_bg_picture = show_color_pref(hbox, FALSE);
666
71ea550c22ac [gaim-migrate @ 676]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 660
diff changeset
1247 button = gaim_button(_("Background Color"), &font_options, OPT_FONT_BGCOL, hbox);
71ea550c22ac [gaim-migrate @ 676]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 660
diff changeset
1248
855
82673bb41e2f [gaim-migrate @ 865]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 834
diff changeset
1249 select = picture_button(prefs, _("Select"), bgcolor_xpm);
666
71ea550c22ac [gaim-migrate @ 676]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 660
diff changeset
1250 gtk_box_pack_start(GTK_BOX(hbox), select, FALSE, FALSE, 5);
71ea550c22ac [gaim-migrate @ 676]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 660
diff changeset
1251 if (!(font_options & OPT_FONT_BGCOL))
71ea550c22ac [gaim-migrate @ 676]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 660
diff changeset
1252 gtk_widget_set_sensitive(GTK_WIDGET(select), FALSE);
858
3de6e98e8898 [gaim-migrate @ 868]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 855
diff changeset
1253 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
1254 gtk_widget_show(select);
71ea550c22ac [gaim-migrate @ 676]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 660
diff changeset
1255
71ea550c22ac [gaim-migrate @ 676]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 660
diff changeset
1256 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(toggle_sensitive), select);
1253
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
1257 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(update_color),
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
1258 pref_bg_picture);
652
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1259
1788
c8511181823e [gaim-migrate @ 1798]
Rob Flynn <gaim@robflynn.com>
parents: 1780
diff changeset
1260 /* ----------- */
c8511181823e [gaim-migrate @ 1798]
Rob Flynn <gaim@robflynn.com>
parents: 1780
diff changeset
1261
c8511181823e [gaim-migrate @ 1798]
Rob Flynn <gaim@robflynn.com>
parents: 1780
diff changeset
1262 frame = gtk_frame_new("Font Face");
c8511181823e [gaim-migrate @ 1798]
Rob Flynn <gaim@robflynn.com>
parents: 1780
diff changeset
1263 fbox = gtk_vbox_new(FALSE, 5);
652
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1264
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1265 hbox = gtk_hbox_new(FALSE, 5);
1788
c8511181823e [gaim-migrate @ 1798]
Rob Flynn <gaim@robflynn.com>
parents: 1780
diff changeset
1266 gtk_box_pack_start(GTK_BOX(fbox), hbox, FALSE, FALSE, 5);
652
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1267 gtk_widget_show(hbox);
1788
c8511181823e [gaim-migrate @ 1798]
Rob Flynn <gaim@robflynn.com>
parents: 1780
diff changeset
1268
652
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1269 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
1270
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1271 select = picture_button(prefs, _("Select"), fontface2_xpm);
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1272 gtk_box_pack_start(GTK_BOX(hbox), select, FALSE, FALSE, 0);
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1273 if (!(font_options & OPT_FONT_FACE))
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1274 gtk_widget_set_sensitive(GTK_WIDGET(select), FALSE);
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1275 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
1276 gtk_widget_show(select);
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1277
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1278 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
1279
1441
5c67b8794991 [gaim-migrate @ 1451]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1437
diff changeset
1280 hbox = gtk_hbox_new(FALSE, 5);
1788
c8511181823e [gaim-migrate @ 1798]
Rob Flynn <gaim@robflynn.com>
parents: 1780
diff changeset
1281 gtk_box_pack_start(GTK_BOX(fbox), hbox, FALSE, FALSE, 5);
1441
5c67b8794991 [gaim-migrate @ 1451]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1437
diff changeset
1282 gtk_widget_show(hbox);
5c67b8794991 [gaim-migrate @ 1451]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1437
diff changeset
1283
5c67b8794991 [gaim-migrate @ 1451]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1437
diff changeset
1284 button = gaim_button(_("Font Size for Text"), &font_options, OPT_FONT_SIZE, hbox);
5c67b8794991 [gaim-migrate @ 1451]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1437
diff changeset
1285
5c67b8794991 [gaim-migrate @ 1451]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1437
diff changeset
1286 adjust = gtk_adjustment_new(fontsize, 1, 7, 1, 1, 1);
5c67b8794991 [gaim-migrate @ 1451]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1437
diff changeset
1287 spin = gtk_spin_button_new(GTK_ADJUSTMENT(adjust), 1, 0);
5c67b8794991 [gaim-migrate @ 1451]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1437
diff changeset
1288 gtk_widget_set_usize(spin, 50, -1);
1813
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
1289 gtk_object_set_user_data(GTK_OBJECT(spin), &fontsize);
1441
5c67b8794991 [gaim-migrate @ 1451]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1437
diff changeset
1290 if (!(font_options & OPT_FONT_SIZE))
5c67b8794991 [gaim-migrate @ 1451]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1437
diff changeset
1291 gtk_widget_set_sensitive(GTK_WIDGET(spin), FALSE);
5c67b8794991 [gaim-migrate @ 1451]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1437
diff changeset
1292 gtk_box_pack_start(GTK_BOX(hbox), spin, FALSE, FALSE, 0);
5c67b8794991 [gaim-migrate @ 1451]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1437
diff changeset
1293 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(toggle_sensitive), spin);
1813
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
1294 + gtk_signal_connect(GTK_OBJECT(adjust), "value-changed", GTK_SIGNAL_FUNC(update_spin_value),
1441
5c67b8794991 [gaim-migrate @ 1451]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1437
diff changeset
1295 GTK_WIDGET(spin));
5c67b8794991 [gaim-migrate @ 1451]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1437
diff changeset
1296 gtk_widget_show(spin);
5c67b8794991 [gaim-migrate @ 1451]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1437
diff changeset
1297
1788
c8511181823e [gaim-migrate @ 1798]
Rob Flynn <gaim@robflynn.com>
parents: 1780
diff changeset
1298 gtk_container_add(GTK_CONTAINER(frame), fbox);
c8511181823e [gaim-migrate @ 1798]
Rob Flynn <gaim@robflynn.com>
parents: 1780
diff changeset
1299 gtk_container_set_border_width(GTK_CONTAINER(fbox), 5);
c8511181823e [gaim-migrate @ 1798]
Rob Flynn <gaim@robflynn.com>
parents: 1780
diff changeset
1300 gtk_box_pack_start(GTK_BOX(box), frame, FALSE, FALSE, 5);
c8511181823e [gaim-migrate @ 1798]
Rob Flynn <gaim@robflynn.com>
parents: 1780
diff changeset
1301 gtk_widget_show(fbox);
c8511181823e [gaim-migrate @ 1798]
Rob Flynn <gaim@robflynn.com>
parents: 1780
diff changeset
1302 gtk_widget_show(frame);
c8511181823e [gaim-migrate @ 1798]
Rob Flynn <gaim@robflynn.com>
parents: 1780
diff changeset
1303
652
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1304 gtk_widget_show(prefdialog);
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1305 }
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1306
1006
0a4d0ed65e17 [gaim-migrate @ 1016]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1002
diff changeset
1307 static GtkWidget *sndent[NUM_SOUNDS];
1214
0baf39dc5437 [gaim-migrate @ 1224]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1185
diff changeset
1308 static GtkWidget *sndcmd = NULL;
1006
0a4d0ed65e17 [gaim-migrate @ 1016]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1002
diff changeset
1309
1253
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
1310 void close_sounddialog(GtkWidget *w, GtkWidget *w2)
1170
16d748023b2b [gaim-migrate @ 1180]
Rob Flynn <gaim@robflynn.com>
parents: 1147
diff changeset
1311 {
16d748023b2b [gaim-migrate @ 1180]
Rob Flynn <gaim@robflynn.com>
parents: 1147
diff changeset
1312
16d748023b2b [gaim-migrate @ 1180]
Rob Flynn <gaim@robflynn.com>
parents: 1147
diff changeset
1313 GtkWidget *dest;
1253
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
1314
1170
16d748023b2b [gaim-migrate @ 1180]
Rob Flynn <gaim@robflynn.com>
parents: 1147
diff changeset
1315 if (!GTK_IS_WIDGET(w2))
16d748023b2b [gaim-migrate @ 1180]
Rob Flynn <gaim@robflynn.com>
parents: 1147
diff changeset
1316 dest = w;
16d748023b2b [gaim-migrate @ 1180]
Rob Flynn <gaim@robflynn.com>
parents: 1147
diff changeset
1317 else
16d748023b2b [gaim-migrate @ 1180]
Rob Flynn <gaim@robflynn.com>
parents: 1147
diff changeset
1318 dest = w2;
16d748023b2b [gaim-migrate @ 1180]
Rob Flynn <gaim@robflynn.com>
parents: 1147
diff changeset
1319
16d748023b2b [gaim-migrate @ 1180]
Rob Flynn <gaim@robflynn.com>
parents: 1147
diff changeset
1320 sounddialog = NULL;
16d748023b2b [gaim-migrate @ 1180]
Rob Flynn <gaim@robflynn.com>
parents: 1147
diff changeset
1321
16d748023b2b [gaim-migrate @ 1180]
Rob Flynn <gaim@robflynn.com>
parents: 1147
diff changeset
1322 gtk_widget_destroy(dest);
16d748023b2b [gaim-migrate @ 1180]
Rob Flynn <gaim@robflynn.com>
parents: 1147
diff changeset
1323 }
16d748023b2b [gaim-migrate @ 1180]
Rob Flynn <gaim@robflynn.com>
parents: 1147
diff changeset
1324
1253
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
1325 void do_select_sound(GtkWidget *w, int snd)
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
1326 {
1953
f0ff0b367e3d [gaim-migrate @ 1963]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1930
diff changeset
1327 const char *file;
1253
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
1328
1170
16d748023b2b [gaim-migrate @ 1180]
Rob Flynn <gaim@robflynn.com>
parents: 1147
diff changeset
1329 file = gtk_file_selection_get_filename(GTK_FILE_SELECTION(sounddialog));
16d748023b2b [gaim-migrate @ 1180]
Rob Flynn <gaim@robflynn.com>
parents: 1147
diff changeset
1330
16d748023b2b [gaim-migrate @ 1180]
Rob Flynn <gaim@robflynn.com>
parents: 1147
diff changeset
1331 /* If they type in a directory, change there */
16d748023b2b [gaim-migrate @ 1180]
Rob Flynn <gaim@robflynn.com>
parents: 1147
diff changeset
1332 if (file_is_dir(file, sounddialog))
16d748023b2b [gaim-migrate @ 1180]
Rob Flynn <gaim@robflynn.com>
parents: 1147
diff changeset
1333 return;
16d748023b2b [gaim-migrate @ 1180]
Rob Flynn <gaim@robflynn.com>
parents: 1147
diff changeset
1334
16d748023b2b [gaim-migrate @ 1180]
Rob Flynn <gaim@robflynn.com>
parents: 1147
diff changeset
1335 /* Let's just be safe */
16d748023b2b [gaim-migrate @ 1180]
Rob Flynn <gaim@robflynn.com>
parents: 1147
diff changeset
1336 if (sound_file[snd])
16d748023b2b [gaim-migrate @ 1180]
Rob Flynn <gaim@robflynn.com>
parents: 1147
diff changeset
1337 free(sound_file[snd]);
16d748023b2b [gaim-migrate @ 1180]
Rob Flynn <gaim@robflynn.com>
parents: 1147
diff changeset
1338
16d748023b2b [gaim-migrate @ 1180]
Rob Flynn <gaim@robflynn.com>
parents: 1147
diff changeset
1339 /* Set it -- and forget it */
16d748023b2b [gaim-migrate @ 1180]
Rob Flynn <gaim@robflynn.com>
parents: 1147
diff changeset
1340 sound_file[snd] = g_strdup(file);
16d748023b2b [gaim-migrate @ 1180]
Rob Flynn <gaim@robflynn.com>
parents: 1147
diff changeset
1341
16d748023b2b [gaim-migrate @ 1180]
Rob Flynn <gaim@robflynn.com>
parents: 1147
diff changeset
1342 save_prefs();
1175
581b3e015036 [gaim-migrate @ 1185]
Rob Flynn <gaim@robflynn.com>
parents: 1173
diff changeset
1343
581b3e015036 [gaim-migrate @ 1185]
Rob Flynn <gaim@robflynn.com>
parents: 1173
diff changeset
1344 /* Set our text entry */
581b3e015036 [gaim-migrate @ 1185]
Rob Flynn <gaim@robflynn.com>
parents: 1173
diff changeset
1345 gtk_entry_set_text(GTK_ENTRY(sndent[snd]), sound_file[snd]);
1253
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
1346
1170
16d748023b2b [gaim-migrate @ 1180]
Rob Flynn <gaim@robflynn.com>
parents: 1147
diff changeset
1347 /* Close the window! It's getting cold in here! */
16d748023b2b [gaim-migrate @ 1180]
Rob Flynn <gaim@robflynn.com>
parents: 1147
diff changeset
1348 close_sounddialog(NULL, sounddialog);
16d748023b2b [gaim-migrate @ 1180]
Rob Flynn <gaim@robflynn.com>
parents: 1147
diff changeset
1349 }
16d748023b2b [gaim-migrate @ 1180]
Rob Flynn <gaim@robflynn.com>
parents: 1147
diff changeset
1350
1253
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
1351 static void reset_sound(GtkWidget *button, int snd)
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
1352 {
1175
581b3e015036 [gaim-migrate @ 1185]
Rob Flynn <gaim@robflynn.com>
parents: 1173
diff changeset
1353
581b3e015036 [gaim-migrate @ 1185]
Rob Flynn <gaim@robflynn.com>
parents: 1173
diff changeset
1354 /* This just resets a sound file back to default */
1176
02af8c5b9b24 [gaim-migrate @ 1186]
Rob Flynn <gaim@robflynn.com>
parents: 1175
diff changeset
1355 sound_file[snd] = NULL;
1253
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
1356
1175
581b3e015036 [gaim-migrate @ 1185]
Rob Flynn <gaim@robflynn.com>
parents: 1173
diff changeset
1357 gtk_entry_set_text(GTK_ENTRY(sndent[snd]), "(default)");
581b3e015036 [gaim-migrate @ 1185]
Rob Flynn <gaim@robflynn.com>
parents: 1173
diff changeset
1358 }
581b3e015036 [gaim-migrate @ 1185]
Rob Flynn <gaim@robflynn.com>
parents: 1173
diff changeset
1359
1253
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
1360 static void sel_sound(GtkWidget *button, int snd)
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
1361 {
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
1362
1170
16d748023b2b [gaim-migrate @ 1180]
Rob Flynn <gaim@robflynn.com>
parents: 1147
diff changeset
1363 char *buf = g_malloc(BUF_LEN);
1253
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
1364
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
1365 if (!sounddialog) {
1170
16d748023b2b [gaim-migrate @ 1180]
Rob Flynn <gaim@robflynn.com>
parents: 1147
diff changeset
1366 sounddialog = gtk_file_selection_new(_("Gaim - Sound Configuration"));
16d748023b2b [gaim-migrate @ 1180]
Rob Flynn <gaim@robflynn.com>
parents: 1147
diff changeset
1367
16d748023b2b [gaim-migrate @ 1180]
Rob Flynn <gaim@robflynn.com>
parents: 1147
diff changeset
1368 gtk_file_selection_hide_fileop_buttons(GTK_FILE_SELECTION(sounddialog));
16d748023b2b [gaim-migrate @ 1180]
Rob Flynn <gaim@robflynn.com>
parents: 1147
diff changeset
1369
1253
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
1370 g_snprintf(buf, BUF_LEN - 1, "%s/", getenv("HOME"));
1170
16d748023b2b [gaim-migrate @ 1180]
Rob Flynn <gaim@robflynn.com>
parents: 1147
diff changeset
1371
16d748023b2b [gaim-migrate @ 1180]
Rob Flynn <gaim@robflynn.com>
parents: 1147
diff changeset
1372 gtk_file_selection_set_filename(GTK_FILE_SELECTION(sounddialog), buf);
16d748023b2b [gaim-migrate @ 1180]
Rob Flynn <gaim@robflynn.com>
parents: 1147
diff changeset
1373
1253
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
1374 gtk_signal_connect(GTK_OBJECT(sounddialog), "destroy",
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
1375 GTK_SIGNAL_FUNC(close_sounddialog), sounddialog);
1170
16d748023b2b [gaim-migrate @ 1180]
Rob Flynn <gaim@robflynn.com>
parents: 1147
diff changeset
1376
16d748023b2b [gaim-migrate @ 1180]
Rob Flynn <gaim@robflynn.com>
parents: 1147
diff changeset
1377 gtk_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(sounddialog)->ok_button),
1253
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
1378 "clicked", GTK_SIGNAL_FUNC(do_select_sound), (int *)snd);
1170
16d748023b2b [gaim-migrate @ 1180]
Rob Flynn <gaim@robflynn.com>
parents: 1147
diff changeset
1379
16d748023b2b [gaim-migrate @ 1180]
Rob Flynn <gaim@robflynn.com>
parents: 1147
diff changeset
1380 gtk_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(sounddialog)->cancel_button),
1253
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
1381 "clicked", GTK_SIGNAL_FUNC(close_sounddialog), sounddialog);
1170
16d748023b2b [gaim-migrate @ 1180]
Rob Flynn <gaim@robflynn.com>
parents: 1147
diff changeset
1382 }
16d748023b2b [gaim-migrate @ 1180]
Rob Flynn <gaim@robflynn.com>
parents: 1147
diff changeset
1383
16d748023b2b [gaim-migrate @ 1180]
Rob Flynn <gaim@robflynn.com>
parents: 1147
diff changeset
1384 g_free(buf);
16d748023b2b [gaim-migrate @ 1180]
Rob Flynn <gaim@robflynn.com>
parents: 1147
diff changeset
1385 gtk_widget_show(sounddialog);
16d748023b2b [gaim-migrate @ 1180]
Rob Flynn <gaim@robflynn.com>
parents: 1147
diff changeset
1386 gdk_window_raise(sounddialog->window);
1006
0a4d0ed65e17 [gaim-migrate @ 1016]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1002
diff changeset
1387 }
0a4d0ed65e17 [gaim-migrate @ 1016]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1002
diff changeset
1388
1253
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
1389 static void sound_entry(char *label, int opt, GtkWidget *box, int snd)
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
1390 {
1006
0a4d0ed65e17 [gaim-migrate @ 1016]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1002
diff changeset
1391 GtkWidget *hbox;
0a4d0ed65e17 [gaim-migrate @ 1016]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1002
diff changeset
1392 GtkWidget *entry;
0a4d0ed65e17 [gaim-migrate @ 1016]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1002
diff changeset
1393 GtkWidget *button;
0a4d0ed65e17 [gaim-migrate @ 1016]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1002
diff changeset
1394
1780
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1395 hbox = gtk_hbox_new(FALSE, 0);
1006
0a4d0ed65e17 [gaim-migrate @ 1016]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1002
diff changeset
1396 gtk_box_pack_start(GTK_BOX(box), hbox, FALSE, FALSE, 0);
0a4d0ed65e17 [gaim-migrate @ 1016]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1002
diff changeset
1397 gtk_widget_show(hbox);
0a4d0ed65e17 [gaim-migrate @ 1016]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1002
diff changeset
1398
0a4d0ed65e17 [gaim-migrate @ 1016]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1002
diff changeset
1399 gaim_button(label, &sound_options, opt, hbox);
0a4d0ed65e17 [gaim-migrate @ 1016]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1002
diff changeset
1400
1175
581b3e015036 [gaim-migrate @ 1185]
Rob Flynn <gaim@robflynn.com>
parents: 1173
diff changeset
1401 button = gtk_button_new_with_label(_("Reset"));
1780
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1402 gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 5);
1175
581b3e015036 [gaim-migrate @ 1185]
Rob Flynn <gaim@robflynn.com>
parents: 1173
diff changeset
1403 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(reset_sound), (void *)snd);
581b3e015036 [gaim-migrate @ 1185]
Rob Flynn <gaim@robflynn.com>
parents: 1173
diff changeset
1404 gtk_widget_show(button);
581b3e015036 [gaim-migrate @ 1185]
Rob Flynn <gaim@robflynn.com>
parents: 1173
diff changeset
1405
1381
1bbdebd66afd [gaim-migrate @ 1391]
Rob Flynn <gaim@robflynn.com>
parents: 1370
diff changeset
1406 button = gtk_button_new_with_label(_("Choose..."));
1006
0a4d0ed65e17 [gaim-migrate @ 1016]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1002
diff changeset
1407 gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0);
0a4d0ed65e17 [gaim-migrate @ 1016]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1002
diff changeset
1408 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(sel_sound), (void *)snd);
0a4d0ed65e17 [gaim-migrate @ 1016]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1002
diff changeset
1409 gtk_widget_show(button);
0a4d0ed65e17 [gaim-migrate @ 1016]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1002
diff changeset
1410
0a4d0ed65e17 [gaim-migrate @ 1016]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1002
diff changeset
1411 entry = gtk_entry_new();
0a4d0ed65e17 [gaim-migrate @ 1016]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1002
diff changeset
1412 gtk_entry_set_editable(GTK_ENTRY(entry), FALSE);
1253
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
1413
1006
0a4d0ed65e17 [gaim-migrate @ 1016]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1002
diff changeset
1414 if (sound_file[snd])
0a4d0ed65e17 [gaim-migrate @ 1016]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1002
diff changeset
1415 gtk_entry_set_text(GTK_ENTRY(entry), sound_file[snd]);
0a4d0ed65e17 [gaim-migrate @ 1016]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1002
diff changeset
1416 else
0a4d0ed65e17 [gaim-migrate @ 1016]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1002
diff changeset
1417 gtk_entry_set_text(GTK_ENTRY(entry), "(default)");
1175
581b3e015036 [gaim-migrate @ 1185]
Rob Flynn <gaim@robflynn.com>
parents: 1173
diff changeset
1418
1780
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1419 gtk_box_pack_end(GTK_BOX(hbox), entry, FALSE, FALSE, 5);
1006
0a4d0ed65e17 [gaim-migrate @ 1016]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1002
diff changeset
1420 sndent[snd] = entry;
0a4d0ed65e17 [gaim-migrate @ 1016]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1002
diff changeset
1421 gtk_widget_show(entry);
0a4d0ed65e17 [gaim-migrate @ 1016]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1002
diff changeset
1422 }
0a4d0ed65e17 [gaim-migrate @ 1016]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1002
diff changeset
1423
1253
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
1424 static gint sound_cmd_yeah(GtkEntry * entry, GdkEvent *event, gpointer d)
1214
0baf39dc5437 [gaim-migrate @ 1224]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1185
diff changeset
1425 {
0baf39dc5437 [gaim-migrate @ 1224]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1185
diff changeset
1426 g_snprintf(sound_cmd, sizeof(sound_cmd), "%s", gtk_entry_get_text(GTK_ENTRY(sndcmd)));
0baf39dc5437 [gaim-migrate @ 1224]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1185
diff changeset
1427 save_prefs();
0baf39dc5437 [gaim-migrate @ 1224]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1185
diff changeset
1428 return TRUE;
0baf39dc5437 [gaim-migrate @ 1224]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1185
diff changeset
1429 }
0baf39dc5437 [gaim-migrate @ 1224]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1185
diff changeset
1430
1780
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1431 static void sound_page()
652
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1432 {
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1433 GtkWidget *parent;
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1434 GtkWidget *box;
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1435 GtkWidget *label;
1780
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1436 GtkWidget *frame;
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1437 GtkWidget *vbox;
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1438 GtkWidget *hbox;
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1439 GtkWidget *vbox2;
652
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1440 GtkWidget *sep;
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1441
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1442 parent = prefdialog->parent;
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1443 gtk_widget_destroy(prefdialog);
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1444
1780
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1445 prefdialog = gtk_frame_new(_("Sound Options"));
652
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1446 gtk_container_add(GTK_CONTAINER(parent), prefdialog);
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1447
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1448 box = gtk_vbox_new(FALSE, 5);
1253
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
1449 gtk_container_set_border_width(GTK_CONTAINER(box), 5);
652
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1450 gtk_container_add(GTK_CONTAINER(prefdialog), box);
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1451 gtk_widget_show(box);
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1452
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1453 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
1454 gtk_box_pack_start(GTK_BOX(box), label, FALSE, FALSE, 5);
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1455 gtk_widget_show(label);
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1456
1780
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1457 frame = gtk_frame_new(_("Options"));
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1458 gtk_box_pack_start(GTK_BOX(box), frame, FALSE, FALSE, 5);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1459 gtk_widget_show(frame);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1460
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1461 vbox = gtk_vbox_new(FALSE, 5);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1462 gtk_container_add(GTK_CONTAINER(frame), vbox);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1463 gtk_widget_show(vbox);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1464
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1465 hbox = gtk_hbox_new(TRUE, 5);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1466 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 5);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1467 gtk_widget_show(hbox);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1468
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1469 vbox2 = gtk_vbox_new(FALSE, 5);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1470 gtk_box_pack_start(GTK_BOX(hbox), vbox2, TRUE, TRUE, 5);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1471 gtk_widget_show(vbox2);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1472
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1473 gaim_button(_("No sounds when you log in"), &sound_options, OPT_SOUND_SILENT_SIGNON, vbox2);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1474 gaim_button(_("Sounds while away"), &sound_options, OPT_SOUND_WHEN_AWAY, vbox2);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1475
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1476 vbox2 = gtk_vbox_new(FALSE, 5);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1477 gtk_box_pack_start(GTK_BOX(hbox), vbox2, TRUE, TRUE, 5);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1478 gtk_widget_show(vbox2);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1479
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1480 gaim_button(_("Beep instead of playing sound"), &sound_options, OPT_SOUND_BEEP, vbox2);
652
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1481
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1482 sep = gtk_hseparator_new();
1780
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1483 gtk_box_pack_start(GTK_BOX(vbox), sep, FALSE, FALSE, 0);
652
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1484 gtk_widget_show(sep);
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1485
1780
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1486 hbox = gtk_hbox_new(TRUE, 5);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1487 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 5);
1214
0baf39dc5437 [gaim-migrate @ 1224]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1185
diff changeset
1488 gtk_widget_show(hbox);
0baf39dc5437 [gaim-migrate @ 1224]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1185
diff changeset
1489
1780
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1490 label = gtk_label_new(_("Command to play sound files\n(%s for filename; internal if empty)"));
1214
0baf39dc5437 [gaim-migrate @ 1224]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1185
diff changeset
1491 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 5);
0baf39dc5437 [gaim-migrate @ 1224]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1185
diff changeset
1492 gtk_widget_show(label);
0baf39dc5437 [gaim-migrate @ 1224]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1185
diff changeset
1493
0baf39dc5437 [gaim-migrate @ 1224]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1185
diff changeset
1494 sndcmd = gtk_entry_new();
0baf39dc5437 [gaim-migrate @ 1224]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1185
diff changeset
1495 gtk_entry_set_editable(GTK_ENTRY(sndcmd), TRUE);
0baf39dc5437 [gaim-migrate @ 1224]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1185
diff changeset
1496 gtk_entry_set_text(GTK_ENTRY(sndcmd), sound_cmd);
0baf39dc5437 [gaim-migrate @ 1224]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1185
diff changeset
1497 gtk_box_pack_end(GTK_BOX(hbox), sndcmd, FALSE, FALSE, 5);
0baf39dc5437 [gaim-migrate @ 1224]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1185
diff changeset
1498 gtk_signal_connect(GTK_OBJECT(sndcmd), "focus_out_event", GTK_SIGNAL_FUNC(sound_cmd_yeah), NULL);
0baf39dc5437 [gaim-migrate @ 1224]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1185
diff changeset
1499 gtk_widget_show(sndcmd);
0baf39dc5437 [gaim-migrate @ 1224]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1185
diff changeset
1500
1780
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1501 frame = gtk_frame_new(_("Events"));
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1502 gtk_box_pack_start(GTK_BOX(box), frame, FALSE, FALSE, 5);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1503 gtk_widget_show(frame);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1504
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1505 vbox = gtk_vbox_new(FALSE, 5);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1506 gtk_container_add(GTK_CONTAINER(frame), vbox);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1507 gtk_widget_show(vbox);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1508
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1509 sound_entry(_("Sound when buddy logs in"), OPT_SOUND_LOGIN, vbox, BUDDY_ARRIVE);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1510 sound_entry(_("Sound when buddy logs out"), OPT_SOUND_LOGOUT, vbox, BUDDY_LEAVE);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1511
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1512 sep = gtk_hseparator_new();
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1513 gtk_box_pack_start(GTK_BOX(vbox), sep, FALSE, FALSE, 5);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1514 gtk_widget_show(sep);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1515
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1516 sound_entry(_("Sound when received message begins conversation"), OPT_SOUND_FIRST_RCV, vbox, FIRST_RECEIVE);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1517 sound_entry(_("Sound when message is received"), OPT_SOUND_RECV, vbox, RECEIVE);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1518 sound_entry(_("Sound when message is sent"), OPT_SOUND_SEND, vbox, SEND);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1519
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1520 sep = gtk_hseparator_new();
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1521 gtk_box_pack_start(GTK_BOX(vbox), sep, FALSE, FALSE, 5);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1522 gtk_widget_show(sep);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1523
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1524 sound_entry(_("Sound in chat rooms when people enter"), OPT_SOUND_CHAT_JOIN, vbox, CHAT_JOIN);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1525 sound_entry(_("Sound in chat rooms when people leave"), OPT_SOUND_CHAT_PART, vbox, CHAT_LEAVE);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1526 sound_entry(_("Sound in chat rooms when you talk"), OPT_SOUND_CHAT_YOU_SAY, vbox, CHAT_YOU_SAY);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1527 sound_entry(_("Sound in chat rooms when others talk"), OPT_SOUND_CHAT_SAY, vbox, CHAT_SAY);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1528
652
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1529 gtk_widget_show(prefdialog);
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
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1532 static struct away_message *cur_message;
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1533 static GtkWidget *away_text;
2048
3366311426df [gaim-migrate @ 2058]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2025
diff changeset
1534 static GtkWidget *make_away_button = NULL;
652
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1535
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1536 void away_list_clicked(GtkWidget *widget, struct away_message *a)
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1537 {
1780
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1538 gchar buffer[BUF_LONG];
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1539 char *tmp;
1253
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
1540
652
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1541 cur_message = a;
1253
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
1542
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1543 /* Clear the Box */
1780
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1544 gtk_imhtml_clear(GTK_IMHTML(away_text));
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1545
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1546 /* Fill the text box with new message */
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1547 strcpy(buffer, a->message);
1780
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1548 tmp = stylize(buffer, BUF_LONG);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1549 gtk_imhtml_append_text(GTK_IMHTML(away_text), tmp, GTK_IMHTML_NO_TITLE |
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1550 GTK_IMHTML_NO_COMMENTS |
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1551 GTK_IMHTML_NO_SCROLL);
1979
e43c267b1a8a [gaim-migrate @ 1989]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1976
diff changeset
1552 gtk_imhtml_append_text(GTK_IMHTML(away_text), "<BR>", GTK_IMHTML_NO_TITLE |
e43c267b1a8a [gaim-migrate @ 1989]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1976
diff changeset
1553 GTK_IMHTML_NO_COMMENTS |
e43c267b1a8a [gaim-migrate @ 1989]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1976
diff changeset
1554 GTK_IMHTML_NO_SCROLL);
1780
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1555 g_free(tmp);
652
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1556 }
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1557
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1558 void remove_away_message(GtkWidget *widget, void *dummy)
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1559 {
1253
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
1560 GList *i;
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
1561 struct away_message *a;
652
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1562
1253
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
1563 i = GTK_LIST(prefs_away_list)->selection;
652
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1564
1253
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
1565 if (!i)
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
1566 return;
832
0142b4c66394 [gaim-migrate @ 842]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 830
diff changeset
1567 if (!i->next) {
1780
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1568 gtk_imhtml_clear(GTK_IMHTML(away_text));
832
0142b4c66394 [gaim-migrate @ 842]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 830
diff changeset
1569 }
0142b4c66394 [gaim-migrate @ 842]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 830
diff changeset
1570 a = gtk_object_get_user_data(GTK_OBJECT(i->data));
0142b4c66394 [gaim-migrate @ 842]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 830
diff changeset
1571 rem_away_mess(NULL, a);
652
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
678
c72f58814e9f [gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 673
diff changeset
1574 static void paldest(GtkWidget *m, gpointer n)
c72f58814e9f [gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 673
diff changeset
1575 {
c72f58814e9f [gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 673
diff changeset
1576 gtk_widget_destroy(prefs_away_list);
c72f58814e9f [gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 673
diff changeset
1577 prefs_away_list = NULL;
1370
776bb4c6c0b8 [gaim-migrate @ 1380]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1366
diff changeset
1578 make_away_button = NULL;
678
c72f58814e9f [gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 673
diff changeset
1579 }
c72f58814e9f [gaim-migrate @ 688]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 673
diff changeset
1580
832
0142b4c66394 [gaim-migrate @ 842]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 830
diff changeset
1581 static void do_away_mess(GtkWidget *m, gpointer n)
0142b4c66394 [gaim-migrate @ 842]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 830
diff changeset
1582 {
0142b4c66394 [gaim-migrate @ 842]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 830
diff changeset
1583 GList *i = GTK_LIST(prefs_away_list)->selection;
0142b4c66394 [gaim-migrate @ 842]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 830
diff changeset
1584 if (i)
0142b4c66394 [gaim-migrate @ 842]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 830
diff changeset
1585 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
1586 }
0142b4c66394 [gaim-migrate @ 842]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 830
diff changeset
1587
1109
c73736fa0b7c [gaim-migrate @ 1119]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1087
diff changeset
1588 void set_default_away(GtkWidget *w, gpointer i)
c73736fa0b7c [gaim-migrate @ 1119]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1087
diff changeset
1589 {
c73736fa0b7c [gaim-migrate @ 1119]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1087
diff changeset
1590 int length = g_slist_length(away_messages);
c73736fa0b7c [gaim-migrate @ 1119]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1087
diff changeset
1591
c73736fa0b7c [gaim-migrate @ 1119]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1087
diff changeset
1592 if (away_messages == NULL)
1254
9da444224f0e [gaim-migrate @ 1264]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1253
diff changeset
1593 default_away = NULL;
1109
c73736fa0b7c [gaim-migrate @ 1119]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1087
diff changeset
1594 else if ((int)i >= length)
1254
9da444224f0e [gaim-migrate @ 1264]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1253
diff changeset
1595 default_away = g_slist_nth_data(away_messages, length - 1);
1109
c73736fa0b7c [gaim-migrate @ 1119]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1087
diff changeset
1596 else
1254
9da444224f0e [gaim-migrate @ 1264]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1253
diff changeset
1597 default_away = g_slist_nth_data(away_messages, (int)i);
1109
c73736fa0b7c [gaim-migrate @ 1119]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1087
diff changeset
1598 }
c73736fa0b7c [gaim-migrate @ 1119]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1087
diff changeset
1599
c73736fa0b7c [gaim-migrate @ 1119]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1087
diff changeset
1600 void default_away_menu_init(GtkWidget *omenu)
c73736fa0b7c [gaim-migrate @ 1119]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1087
diff changeset
1601 {
c73736fa0b7c [gaim-migrate @ 1119]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1087
diff changeset
1602 GtkWidget *menu, *opt;
c73736fa0b7c [gaim-migrate @ 1119]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1087
diff changeset
1603 int index = 0;
c73736fa0b7c [gaim-migrate @ 1119]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1087
diff changeset
1604 GSList *awy = away_messages;
c73736fa0b7c [gaim-migrate @ 1119]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1087
diff changeset
1605 struct away_message *a;
c73736fa0b7c [gaim-migrate @ 1119]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1087
diff changeset
1606
c73736fa0b7c [gaim-migrate @ 1119]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1087
diff changeset
1607 menu = gtk_menu_new();
c73736fa0b7c [gaim-migrate @ 1119]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1087
diff changeset
1608
c73736fa0b7c [gaim-migrate @ 1119]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1087
diff changeset
1609 while (awy) {
c73736fa0b7c [gaim-migrate @ 1119]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1087
diff changeset
1610 a = (struct away_message *)awy->data;
c73736fa0b7c [gaim-migrate @ 1119]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1087
diff changeset
1611 opt = gtk_menu_item_new_with_label(a->name);
1253
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
1612 gtk_signal_connect(GTK_OBJECT(opt), "activate", GTK_SIGNAL_FUNC(set_default_away),
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
1613 (gpointer)index);
1109
c73736fa0b7c [gaim-migrate @ 1119]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1087
diff changeset
1614 gtk_widget_show(opt);
c73736fa0b7c [gaim-migrate @ 1119]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1087
diff changeset
1615 gtk_menu_append(GTK_MENU(menu), opt);
c73736fa0b7c [gaim-migrate @ 1119]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1087
diff changeset
1616
c73736fa0b7c [gaim-migrate @ 1119]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1087
diff changeset
1617 awy = awy->next;
c73736fa0b7c [gaim-migrate @ 1119]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1087
diff changeset
1618 index++;
c73736fa0b7c [gaim-migrate @ 1119]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1087
diff changeset
1619 }
c73736fa0b7c [gaim-migrate @ 1119]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1087
diff changeset
1620
c73736fa0b7c [gaim-migrate @ 1119]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1087
diff changeset
1621 gtk_option_menu_remove_menu(GTK_OPTION_MENU(omenu));
c73736fa0b7c [gaim-migrate @ 1119]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1087
diff changeset
1622 gtk_option_menu_set_menu(GTK_OPTION_MENU(omenu), menu);
1254
9da444224f0e [gaim-migrate @ 1264]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1253
diff changeset
1623 gtk_option_menu_set_history(GTK_OPTION_MENU(omenu), g_slist_index(away_messages, default_away));
1109
c73736fa0b7c [gaim-migrate @ 1119]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1087
diff changeset
1624 }
c73736fa0b7c [gaim-migrate @ 1119]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1087
diff changeset
1625
1253
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
1626
1109
c73736fa0b7c [gaim-migrate @ 1119]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1087
diff changeset
1627
652
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1628 static void away_page()
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1629 {
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1630 GtkWidget *parent;
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1631 GtkWidget *box;
1780
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1632 GtkWidget *label;
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1633 GtkWidget *frame;
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1634 GtkWidget *vbox;
832
0142b4c66394 [gaim-migrate @ 842]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 830
diff changeset
1635 GtkWidget *hbox;
1780
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1636 GtkWidget *vbox2;
652
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1637 GtkWidget *top;
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1638 GtkWidget *bot;
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1639 GtkWidget *sw;
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1640 GtkWidget *sw2;
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1641 GtkWidget *button;
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1642 GtkWidget *list_item;
832
0142b4c66394 [gaim-migrate @ 842]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 830
diff changeset
1643 GtkWidget *sep;
1109
c73736fa0b7c [gaim-migrate @ 1119]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1087
diff changeset
1644 GtkObject *adjust;
c73736fa0b7c [gaim-migrate @ 1119]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1087
diff changeset
1645 GtkWidget *spin;
940
9fca1293f871 [gaim-migrate @ 950]
Rob Flynn <gaim@robflynn.com>
parents: 930
diff changeset
1646 GSList *awy = away_messages;
652
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1647 struct away_message *a;
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 parent = prefdialog->parent;
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1650 gtk_widget_destroy(prefdialog);
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1651
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1652 prefdialog = gtk_frame_new(_("Away Messages"));
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1653 gtk_container_add(GTK_CONTAINER(parent), prefdialog);
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 box = gtk_vbox_new(FALSE, 5);
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1656 gtk_container_add(GTK_CONTAINER(prefdialog), box);
1253
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
1657 gtk_container_set_border_width(GTK_CONTAINER(box), 5);
652
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1658 gtk_widget_show(box);
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1659
1780
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1660 label = gtk_label_new(_("All options take effect immediately unless otherwise noted."));
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1661 gtk_box_pack_start(GTK_BOX(box), label, FALSE, FALSE, 5);
832
0142b4c66394 [gaim-migrate @ 842]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 830
diff changeset
1662 gtk_widget_show(label);
0142b4c66394 [gaim-migrate @ 842]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 830
diff changeset
1663
1780
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1664 frame = gtk_frame_new(_("Options"));
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1665 gtk_box_pack_start(GTK_BOX(box), frame, FALSE, FALSE, 5);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1666 gtk_widget_show(frame);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1667
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1668 vbox = gtk_vbox_new(FALSE, 5);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1669 gtk_container_add(GTK_CONTAINER(frame), vbox);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1670 gtk_widget_show(vbox);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1671
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1672 hbox = gtk_hbox_new(TRUE, 5);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1673 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 5);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1674 gtk_widget_show(hbox);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1675
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1676 vbox2 = gtk_vbox_new(FALSE, 5);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1677 gtk_box_pack_start(GTK_BOX(hbox), vbox2, TRUE, TRUE, 5);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1678 gtk_widget_show(vbox2);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1679
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1680 gaim_button(_("Ignore new conversations when away"), &general_options, OPT_GEN_DISCARD_WHEN_AWAY, vbox2);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1681 gaim_button(_("Sounds while away"), &sound_options, OPT_SOUND_WHEN_AWAY, vbox2);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1682 gaim_button(_("Sending messages removes away status"), &general_options, OPT_GEN_BACK_ON_IM, vbox2);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1683
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1684 vbox2 = gtk_vbox_new(FALSE, 5);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1685 gtk_box_pack_start(GTK_BOX(hbox), vbox2, TRUE, TRUE, 5);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1686 gtk_widget_show(vbox2);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1687
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1688 gaim_button(_("Don't send auto-response"), &general_options, OPT_GEN_NO_AUTO_RESP, vbox2);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1689 gaim_button(_("Queue new messages when away"), &general_options, OPT_GEN_QUEUE_WHEN_AWAY, vbox2);
652
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1690
832
0142b4c66394 [gaim-migrate @ 842]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 830
diff changeset
1691 sep = gtk_hseparator_new();
1780
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1692 gtk_box_pack_start(GTK_BOX(vbox), sep, FALSE, FALSE, 0);
1109
c73736fa0b7c [gaim-migrate @ 1119]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1087
diff changeset
1693 gtk_widget_show(sep);
c73736fa0b7c [gaim-migrate @ 1119]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1087
diff changeset
1694
c73736fa0b7c [gaim-migrate @ 1119]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1087
diff changeset
1695 hbox = gtk_hbox_new(FALSE, 5);
1780
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1696 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0);
832
0142b4c66394 [gaim-migrate @ 842]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 830
diff changeset
1697 gtk_widget_show(hbox);
0142b4c66394 [gaim-migrate @ 842]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 830
diff changeset
1698
1109
c73736fa0b7c [gaim-migrate @ 1119]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1087
diff changeset
1699 button = gaim_button(_("Auto Away after"), &general_options, OPT_GEN_AUTO_AWAY, hbox);
c73736fa0b7c [gaim-migrate @ 1119]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1087
diff changeset
1700
c73736fa0b7c [gaim-migrate @ 1119]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1087
diff changeset
1701 adjust = gtk_adjustment_new(auto_away, 1, 1440, 1, 10, 10);
c73736fa0b7c [gaim-migrate @ 1119]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1087
diff changeset
1702 spin = gtk_spin_button_new(GTK_ADJUSTMENT(adjust), 1, 0);
c73736fa0b7c [gaim-migrate @ 1119]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1087
diff changeset
1703 gtk_widget_set_usize(spin, 50, -1);
1813
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
1704 gtk_object_set_user_data(GTK_OBJECT(spin), &auto_away);
1109
c73736fa0b7c [gaim-migrate @ 1119]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1087
diff changeset
1705 if (!(general_options & OPT_GEN_AUTO_AWAY))
c73736fa0b7c [gaim-migrate @ 1119]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1087
diff changeset
1706 gtk_widget_set_sensitive(GTK_WIDGET(spin), FALSE);
c73736fa0b7c [gaim-migrate @ 1119]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1087
diff changeset
1707 gtk_box_pack_start(GTK_BOX(hbox), spin, FALSE, FALSE, 0);
1111
870d7bb95fdc [gaim-migrate @ 1121]
Rob Flynn <gaim@robflynn.com>
parents: 1109
diff changeset
1708 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(toggle_sensitive), spin);
1813
998a6a032874 [gaim-migrate @ 1823]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1805
diff changeset
1709 gtk_signal_connect(GTK_OBJECT(adjust), "value-changed", GTK_SIGNAL_FUNC(update_spin_value),
1253
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
1710 GTK_WIDGET(spin));
1109
c73736fa0b7c [gaim-migrate @ 1119]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1087
diff changeset
1711 gtk_widget_show(spin);
c73736fa0b7c [gaim-migrate @ 1119]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1087
diff changeset
1712
c73736fa0b7c [gaim-migrate @ 1119]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1087
diff changeset
1713 label = gtk_label_new(_("minutes using"));
c73736fa0b7c [gaim-migrate @ 1119]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1087
diff changeset
1714 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
c73736fa0b7c [gaim-migrate @ 1119]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1087
diff changeset
1715 gtk_widget_show(label);
c73736fa0b7c [gaim-migrate @ 1119]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1087
diff changeset
1716
c73736fa0b7c [gaim-migrate @ 1119]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1087
diff changeset
1717 prefs_away_menu = gtk_option_menu_new();
1111
870d7bb95fdc [gaim-migrate @ 1121]
Rob Flynn <gaim@robflynn.com>
parents: 1109
diff changeset
1718 gtk_box_pack_start(GTK_BOX(hbox), prefs_away_menu, FALSE, FALSE, 0);
870d7bb95fdc [gaim-migrate @ 1121]
Rob Flynn <gaim@robflynn.com>
parents: 1109
diff changeset
1719 default_away_menu_init(prefs_away_menu);
1109
c73736fa0b7c [gaim-migrate @ 1119]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1087
diff changeset
1720 if (!(general_options & OPT_GEN_AUTO_AWAY))
c73736fa0b7c [gaim-migrate @ 1119]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1087
diff changeset
1721 gtk_widget_set_sensitive(GTK_WIDGET(prefs_away_menu), FALSE);
1253
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
1722 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(toggle_sensitive),
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
1723 prefs_away_menu);
1109
c73736fa0b7c [gaim-migrate @ 1119]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1087
diff changeset
1724 gtk_widget_show(prefs_away_menu);
832
0142b4c66394 [gaim-migrate @ 842]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 830
diff changeset
1725
1780
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1726 frame = gtk_frame_new(_("Messages"));
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1727 gtk_box_pack_start(GTK_BOX(box), frame, TRUE, TRUE, 5);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1728 gtk_widget_show(frame);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1729
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1730 vbox = gtk_vbox_new(FALSE, 5);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1731 gtk_container_add(GTK_CONTAINER(frame), vbox);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1732 gtk_widget_show(vbox);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1733
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1734 hbox = gtk_hbox_new(TRUE, 0);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1735 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 5);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1736 gtk_widget_show(hbox);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1737
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1738 label = gtk_label_new(_("Title"));
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1739 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 5);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1740 gtk_widget_show(label);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1741
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1742 label = gtk_label_new(_("Message"));
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1743 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 5);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1744 gtk_widget_show(label);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1745
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1746 top = gtk_hbox_new(FALSE, 0);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1747 gtk_box_pack_start(GTK_BOX(vbox), top, TRUE, TRUE, 0);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1748 gtk_widget_show(top);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1749
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1750 sw = gtk_scrolled_window_new(NULL, NULL);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1751 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw),
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1752 GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1753 gtk_box_pack_start(GTK_BOX(top), sw, TRUE, TRUE, 0);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1754 gtk_widget_set_usize(sw, -1, 225);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1755 gtk_widget_show(sw);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1756
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1757 prefs_away_list = gtk_list_new();
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1758 gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(sw), prefs_away_list);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1759 gtk_signal_connect(GTK_OBJECT(prefs_away_list), "destroy", GTK_SIGNAL_FUNC(paldest), 0);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1760 gtk_widget_show(prefs_away_list);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1761
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1762 sw2 = gtk_scrolled_window_new(NULL, NULL);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1763 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw2),
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1764 GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1765 gtk_box_pack_start(GTK_BOX(top), sw2, TRUE, TRUE, 0);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1766 gtk_widget_show(sw2);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1767
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1768 away_text = gtk_imhtml_new(NULL, NULL);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1769 gtk_container_add(GTK_CONTAINER(sw2), away_text);
1815
f15d449b3167 [gaim-migrate @ 1825]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1813
diff changeset
1770 gaim_setup_imhtml(away_text);
1780
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1771 gtk_widget_show(away_text);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1772
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1773 bot = gtk_hbox_new(FALSE, 0);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1774 gtk_box_pack_start(GTK_BOX(vbox), bot, FALSE, FALSE, 5);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1775 gtk_widget_show(bot);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1776
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1777 button = picture_button(prefs, _("Add"), gnome_add_xpm);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1778 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(create_away_mess), NULL);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1779 gtk_box_pack_start(GTK_BOX(bot), button, TRUE, FALSE, 5);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1780
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1781 button = picture_button(prefs, _("Edit"), save_xpm);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1782 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(create_away_mess), button);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1783 gtk_box_pack_start(GTK_BOX(bot), button, TRUE, FALSE, 5);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1784
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1785 make_away_button = picture_button(prefs, _("Make Away"), gnome_preferences_xpm);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1786 gtk_signal_connect(GTK_OBJECT(make_away_button), "clicked", GTK_SIGNAL_FUNC(do_away_mess), NULL);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1787 gtk_box_pack_start(GTK_BOX(bot), make_away_button, TRUE, FALSE, 5);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1788 if (!connections)
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1789 gtk_widget_set_sensitive(make_away_button, FALSE);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1790
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1791 button = picture_button(prefs, _("Remove"), gnome_remove_xpm);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1792 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(remove_away_message), NULL);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1793 gtk_box_pack_start(GTK_BOX(bot), button, TRUE, FALSE, 5);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1794
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1795 if (awy != NULL) {
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1796 char buffer[BUF_LONG];
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1797 char *tmp;
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1798 a = (struct away_message *)awy->data;
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1799 g_snprintf(buffer, sizeof(buffer), "%s", a->message);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1800 tmp = stylize(buffer, BUF_LONG);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1801 gtk_imhtml_append_text(GTK_IMHTML(away_text), tmp, GTK_IMHTML_NO_TITLE |
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1802 GTK_IMHTML_NO_COMMENTS |
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1803 GTK_IMHTML_NO_SCROLL);
1979
e43c267b1a8a [gaim-migrate @ 1989]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1976
diff changeset
1804 gtk_imhtml_append_text(GTK_IMHTML(away_text), "<BR>", GTK_IMHTML_NO_TITLE |
e43c267b1a8a [gaim-migrate @ 1989]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1976
diff changeset
1805 GTK_IMHTML_NO_COMMENTS |
e43c267b1a8a [gaim-migrate @ 1989]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1976
diff changeset
1806 GTK_IMHTML_NO_SCROLL);
1780
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1807 g_free(tmp);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1808 }
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1809
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1810 while (awy) {
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1811 a = (struct away_message *)awy->data;
1790
c4864ac7792b [gaim-migrate @ 1800]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1788
diff changeset
1812 list_item = gtk_list_item_new();
c4864ac7792b [gaim-migrate @ 1800]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1788
diff changeset
1813 gtk_container_add(GTK_CONTAINER(prefs_away_list), list_item);
c4864ac7792b [gaim-migrate @ 1800]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1788
diff changeset
1814 gtk_signal_connect(GTK_OBJECT(list_item), "select", GTK_SIGNAL_FUNC(away_list_clicked), a);
c4864ac7792b [gaim-migrate @ 1800]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1788
diff changeset
1815 gtk_object_set_user_data(GTK_OBJECT(list_item), a);
c4864ac7792b [gaim-migrate @ 1800]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1788
diff changeset
1816 gtk_widget_show(list_item);
c4864ac7792b [gaim-migrate @ 1800]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1788
diff changeset
1817
c4864ac7792b [gaim-migrate @ 1800]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1788
diff changeset
1818 hbox = gtk_hbox_new(FALSE, 5);
c4864ac7792b [gaim-migrate @ 1800]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1788
diff changeset
1819 gtk_container_add(GTK_CONTAINER(list_item), hbox);
c4864ac7792b [gaim-migrate @ 1800]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1788
diff changeset
1820 gtk_widget_show(hbox);
c4864ac7792b [gaim-migrate @ 1800]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1788
diff changeset
1821
1780
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1822 label = gtk_label_new(a->name);
1790
c4864ac7792b [gaim-migrate @ 1800]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1788
diff changeset
1823 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 5);
1780
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1824 gtk_widget_show(label);
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1825
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1826 awy = awy->next;
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1827 }
1790
c4864ac7792b [gaim-migrate @ 1800]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1788
diff changeset
1828 if (away_messages != NULL)
c4864ac7792b [gaim-migrate @ 1800]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1788
diff changeset
1829 gtk_list_select_item(GTK_LIST(prefs_away_list), 0);
1780
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
1830
652
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1831 gtk_widget_show(prefdialog);
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1832 }
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
1833
2074
a4367a6478eb [gaim-migrate @ 2084]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2048
diff changeset
1834 static GtkWidget *deny_type = NULL;
1124
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1835 static GtkWidget *deny_conn_hbox = NULL;
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1836 static GtkWidget *deny_opt_menu = NULL;
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1837 static struct gaim_connection *current_deny_gc = NULL;
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1838 static gboolean current_is_deny = FALSE;
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1839 static GtkWidget *allow_list = NULL;
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1840 static GtkWidget *block_list = NULL;
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1841
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1842 static void set_deny_mode(GtkWidget *w, int data)
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1843 {
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1844 current_deny_gc->permdeny = data;
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1845 serv_set_permit_deny(current_deny_gc);
1805
caa605e70917 [gaim-migrate @ 1815]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1790
diff changeset
1846 do_export(current_deny_gc);
1124
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1847 }
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1848
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1849 static GtkWidget *deny_opt(char *label, int which, GtkWidget *box, GtkWidget *set)
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1850 {
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1851 GtkWidget *opt;
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1852
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1853 if (!set)
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1854 opt = gtk_radio_button_new_with_label(NULL, label);
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1855 else
1253
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
1856 opt =
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
1857 gtk_radio_button_new_with_label(gtk_radio_button_group(GTK_RADIO_BUTTON(set)),
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
1858 label);
1124
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1859 gtk_box_pack_start(GTK_BOX(box), opt, FALSE, FALSE, 0);
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1860 gtk_signal_connect(GTK_OBJECT(opt), "clicked", GTK_SIGNAL_FUNC(set_deny_mode), (void *)which);
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1861 gtk_widget_show(opt);
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1862 if (current_deny_gc->permdeny == which)
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1863 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(opt), TRUE);
1253
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
1864
1124
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1865 return opt;
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1866 }
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1867
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1868 static void des_deny_opt(GtkWidget *d, gpointer e)
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1869 {
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1870 gtk_widget_destroy(d);
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1871 current_deny_gc = NULL;
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1872 deny_conn_hbox = NULL;
2074
a4367a6478eb [gaim-migrate @ 2084]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2048
diff changeset
1873 deny_type = NULL;
1124
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1874 deny_opt_menu = NULL;
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1875 current_is_deny = FALSE;
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1876 allow_list = NULL;
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1877 block_list = NULL;
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1878 }
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1879
2074
a4367a6478eb [gaim-migrate @ 2084]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2048
diff changeset
1880 static void set_deny_type()
a4367a6478eb [gaim-migrate @ 2084]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2048
diff changeset
1881 {
a4367a6478eb [gaim-migrate @ 2084]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2048
diff changeset
1882 GSList *bg = gtk_radio_button_group(GTK_RADIO_BUTTON(deny_type));
a4367a6478eb [gaim-migrate @ 2084]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2048
diff changeset
1883
a4367a6478eb [gaim-migrate @ 2084]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2048
diff changeset
1884 switch (current_deny_gc->permdeny) {
a4367a6478eb [gaim-migrate @ 2084]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2048
diff changeset
1885 case 4:
a4367a6478eb [gaim-migrate @ 2084]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2048
diff changeset
1886 break;
a4367a6478eb [gaim-migrate @ 2084]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2048
diff changeset
1887 case 3:
a4367a6478eb [gaim-migrate @ 2084]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2048
diff changeset
1888 bg = bg->next->next;
a4367a6478eb [gaim-migrate @ 2084]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2048
diff changeset
1889 break;
a4367a6478eb [gaim-migrate @ 2084]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2048
diff changeset
1890 case 2:
a4367a6478eb [gaim-migrate @ 2084]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2048
diff changeset
1891 bg = bg->next;
a4367a6478eb [gaim-migrate @ 2084]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2048
diff changeset
1892 break;
a4367a6478eb [gaim-migrate @ 2084]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2048
diff changeset
1893 case 1:
a4367a6478eb [gaim-migrate @ 2084]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2048
diff changeset
1894 bg = bg->next->next->next;
a4367a6478eb [gaim-migrate @ 2084]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2048
diff changeset
1895 break;
a4367a6478eb [gaim-migrate @ 2084]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2048
diff changeset
1896 }
a4367a6478eb [gaim-migrate @ 2084]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2048
diff changeset
1897
a4367a6478eb [gaim-migrate @ 2084]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2048
diff changeset
1898 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(bg->data), TRUE);
a4367a6478eb [gaim-migrate @ 2084]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2048
diff changeset
1899 }
a4367a6478eb [gaim-migrate @ 2084]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2048
diff changeset
1900
1125
1a3dbc0e6529 [gaim-migrate @ 1135]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1124
diff changeset
1901 void build_allow_list()
1124
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1902 {
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1903 GtkWidget *label;
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1904 GtkWidget *list_item;
1130
d31fad9abb32 [gaim-migrate @ 1140]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1125
diff changeset
1905 GSList *p;
d31fad9abb32 [gaim-migrate @ 1140]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1125
diff changeset
1906
1144
b1454d019277 [gaim-migrate @ 1154]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1131
diff changeset
1907 if (!current_is_deny)
1130
d31fad9abb32 [gaim-migrate @ 1140]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1125
diff changeset
1908 return;
d31fad9abb32 [gaim-migrate @ 1140]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1125
diff changeset
1909
d31fad9abb32 [gaim-migrate @ 1140]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1125
diff changeset
1910 p = current_deny_gc->permit;
1124
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1911
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1912 gtk_list_remove_items(GTK_LIST(allow_list), GTK_LIST(allow_list)->children);
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1913
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1914 while (p) {
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1915 label = gtk_label_new(p->data);
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1916 list_item = gtk_list_item_new();
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1917 gtk_container_add(GTK_CONTAINER(list_item), label);
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1918 gtk_object_set_user_data(GTK_OBJECT(list_item), p->data);
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1919 gtk_widget_show(label);
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1920 gtk_container_add(GTK_CONTAINER(allow_list), list_item);
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1921 gtk_widget_show(list_item);
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1922 p = p->next;
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1923 }
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1924 }
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1925
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1926 void build_block_list()
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1927 {
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1928 GtkWidget *label;
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1929 GtkWidget *list_item;
1130
d31fad9abb32 [gaim-migrate @ 1140]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1125
diff changeset
1930 GSList *d;
1124
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1931
1130
d31fad9abb32 [gaim-migrate @ 1140]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1125
diff changeset
1932 if (!current_is_deny)
d31fad9abb32 [gaim-migrate @ 1140]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1125
diff changeset
1933 return;
d31fad9abb32 [gaim-migrate @ 1140]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1125
diff changeset
1934
d31fad9abb32 [gaim-migrate @ 1140]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1125
diff changeset
1935 d = current_deny_gc->deny;
1124
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1936
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1937 gtk_list_remove_items(GTK_LIST(block_list), GTK_LIST(block_list)->children);
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1938
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1939 while (d) {
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1940 label = gtk_label_new(d->data);
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1941 list_item = gtk_list_item_new();
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1942 gtk_container_add(GTK_CONTAINER(list_item), label);
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1943 gtk_object_set_user_data(GTK_OBJECT(list_item), d->data);
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1944 gtk_widget_show(label);
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1945 gtk_container_add(GTK_CONTAINER(block_list), list_item);
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1946 gtk_widget_show(list_item);
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1947 d = d->next;
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1948 }
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1949 }
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1950
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1951 static void deny_gc_opt(GtkWidget *opt, struct gaim_connection *gc)
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1952 {
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1953 current_deny_gc = gc;
2074
a4367a6478eb [gaim-migrate @ 2084]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2048
diff changeset
1954 set_deny_type();
1124
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1955 build_allow_list();
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1956 build_block_list();
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1957 }
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1958
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1959 static void build_deny_menu()
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1960 {
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1961 GtkWidget *menu;
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1962 GtkWidget *opt;
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1963 GSList *c = connections;
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1964 struct gaim_connection *gc;
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1965 int count = 0;
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1966 gboolean found = FALSE;
1357
783ba886b6b6 [gaim-migrate @ 1367]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1324
diff changeset
1967 char buf[2048];
1124
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1968
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1969 if (g_slist_length(connections) == 1) {
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1970 gtk_widget_hide(deny_conn_hbox);
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1971 return;
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1972 } else
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1973 gtk_widget_show(deny_conn_hbox);
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1974
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1975 menu = gtk_menu_new();
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1976
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1977 while (c) {
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1978 gc = (struct gaim_connection *)c->data;
1357
783ba886b6b6 [gaim-migrate @ 1367]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1324
diff changeset
1979 c = c->next;
783ba886b6b6 [gaim-migrate @ 1367]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1324
diff changeset
1980 if (!gc->prpl->set_permit_deny)
783ba886b6b6 [gaim-migrate @ 1367]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1324
diff changeset
1981 continue;
783ba886b6b6 [gaim-migrate @ 1367]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1324
diff changeset
1982 g_snprintf(buf, sizeof buf, "%s (%s)", gc->username, (*gc->prpl->name)());
783ba886b6b6 [gaim-migrate @ 1367]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1324
diff changeset
1983 opt = gtk_menu_item_new_with_label(buf);
1253
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
1984 gtk_signal_connect(GTK_OBJECT(opt), "activate", GTK_SIGNAL_FUNC(deny_gc_opt), gc);
1124
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1985 gtk_widget_show(opt);
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1986 gtk_menu_append(GTK_MENU(menu), opt);
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1987 if (gc == current_deny_gc)
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1988 found = TRUE;
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1989 else if (!found)
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1990 count++;
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1991 }
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1992
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1993 if (!found) {
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1994 current_deny_gc = connections->data;
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1995 count = 0;
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1996 }
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1997
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1998 gtk_option_menu_remove_menu(GTK_OPTION_MENU(deny_opt_menu));
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
1999 gtk_option_menu_set_menu(GTK_OPTION_MENU(deny_opt_menu), menu);
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2000 gtk_option_menu_set_history(GTK_OPTION_MENU(deny_opt_menu), count);
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2001
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2002 gtk_widget_show(menu);
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2003 gtk_widget_show(deny_opt_menu);
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2004 }
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2005
1144
b1454d019277 [gaim-migrate @ 1154]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1131
diff changeset
2006 static void pref_deny_add(GtkWidget *button, gboolean permit)
b1454d019277 [gaim-migrate @ 1154]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1131
diff changeset
2007 {
b1454d019277 [gaim-migrate @ 1154]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1131
diff changeset
2008 show_add_perm(current_deny_gc, NULL, permit);
b1454d019277 [gaim-migrate @ 1154]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1131
diff changeset
2009 }
b1454d019277 [gaim-migrate @ 1154]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1131
diff changeset
2010
b1454d019277 [gaim-migrate @ 1154]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1131
diff changeset
2011 static void pref_deny_rem(GtkWidget *button, gboolean permit)
b1454d019277 [gaim-migrate @ 1154]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1131
diff changeset
2012 {
b1454d019277 [gaim-migrate @ 1154]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1131
diff changeset
2013 GList *i;
b1454d019277 [gaim-migrate @ 1154]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1131
diff changeset
2014 char *who;
b1454d019277 [gaim-migrate @ 1154]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1131
diff changeset
2015
b1454d019277 [gaim-migrate @ 1154]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1131
diff changeset
2016 if (permit && !allow_list)
b1454d019277 [gaim-migrate @ 1154]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1131
diff changeset
2017 return;
b1454d019277 [gaim-migrate @ 1154]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1131
diff changeset
2018 if (!permit && !block_list)
b1454d019277 [gaim-migrate @ 1154]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1131
diff changeset
2019 return;
b1454d019277 [gaim-migrate @ 1154]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1131
diff changeset
2020
b1454d019277 [gaim-migrate @ 1154]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1131
diff changeset
2021 if (permit)
b1454d019277 [gaim-migrate @ 1154]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1131
diff changeset
2022 i = GTK_LIST(allow_list)->selection;
b1454d019277 [gaim-migrate @ 1154]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1131
diff changeset
2023 else
b1454d019277 [gaim-migrate @ 1154]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1131
diff changeset
2024 i = GTK_LIST(block_list)->selection;
b1454d019277 [gaim-migrate @ 1154]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1131
diff changeset
2025
b1454d019277 [gaim-migrate @ 1154]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1131
diff changeset
2026 if (!i)
b1454d019277 [gaim-migrate @ 1154]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1131
diff changeset
2027 return;
b1454d019277 [gaim-migrate @ 1154]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1131
diff changeset
2028 who = gtk_object_get_user_data(GTK_OBJECT(i->data));
b1454d019277 [gaim-migrate @ 1154]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1131
diff changeset
2029 if (permit) {
b1454d019277 [gaim-migrate @ 1154]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1131
diff changeset
2030 current_deny_gc->permit = g_slist_remove(current_deny_gc->permit, who);
b1454d019277 [gaim-migrate @ 1154]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1131
diff changeset
2031 serv_rem_permit(current_deny_gc, who);
b1454d019277 [gaim-migrate @ 1154]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1131
diff changeset
2032 build_allow_list();
b1454d019277 [gaim-migrate @ 1154]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1131
diff changeset
2033 } else {
b1454d019277 [gaim-migrate @ 1154]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1131
diff changeset
2034 current_deny_gc->deny = g_slist_remove(current_deny_gc->deny, who);
b1454d019277 [gaim-migrate @ 1154]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1131
diff changeset
2035 serv_rem_deny(current_deny_gc, who);
b1454d019277 [gaim-migrate @ 1154]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1131
diff changeset
2036 build_block_list();
b1454d019277 [gaim-migrate @ 1154]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1131
diff changeset
2037 }
b1454d019277 [gaim-migrate @ 1154]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1131
diff changeset
2038
1805
caa605e70917 [gaim-migrate @ 1815]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1790
diff changeset
2039 do_export(current_deny_gc);
1144
b1454d019277 [gaim-migrate @ 1154]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1131
diff changeset
2040 }
b1454d019277 [gaim-migrate @ 1154]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1131
diff changeset
2041
1124
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2042 static void deny_page()
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2043 {
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2044 GtkWidget *parent;
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2045 GtkWidget *box;
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2046 GtkWidget *hbox;
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2047 GtkWidget *label;
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2048 GtkWidget *vbox;
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2049 GtkWidget *sw;
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2050 GtkWidget *bbox;
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2051 GtkWidget *button;
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2052
2025
1bfef3e8ba63 [gaim-migrate @ 2035]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1979
diff changeset
2053 parent = prefdialog->parent;
1bfef3e8ba63 [gaim-migrate @ 2035]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1979
diff changeset
2054 gtk_widget_destroy(prefdialog);
1bfef3e8ba63 [gaim-migrate @ 2035]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1979
diff changeset
2055
1253
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
2056 current_deny_gc = connections->data; /* this is safe because this screen will only be
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
2057 available when there are connections */
1124
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2058 current_is_deny = TRUE;
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2059
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2060 prefdialog = gtk_frame_new(_("Privacy Options"));
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2061 gtk_container_add(GTK_CONTAINER(parent), prefdialog);
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2062
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2063 box = gtk_vbox_new(FALSE, 5);
1253
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
2064 gtk_container_set_border_width(GTK_CONTAINER(box), 5);
1124
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2065 gtk_container_add(GTK_CONTAINER(prefdialog), box);
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2066 gtk_widget_show(box);
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2067
1147
65e0608e19f7 [gaim-migrate @ 1157]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1144
diff changeset
2068 label = gtk_label_new(_("All options take effect immediately unless otherwise noted."));
1124
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2069 gtk_box_pack_start(GTK_BOX(box), label, FALSE, FALSE, 5);
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2070 gtk_widget_show(label);
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2071
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2072 deny_conn_hbox = gtk_hbox_new(FALSE, 5);
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2073 gtk_box_pack_start(GTK_BOX(box), deny_conn_hbox, FALSE, FALSE, 0);
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2074 gtk_widget_show(deny_conn_hbox);
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2075
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2076 label = gtk_label_new(_("Set privacy for:"));
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2077 gtk_box_pack_start(GTK_BOX(deny_conn_hbox), label, FALSE, FALSE, 5);
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2078 gtk_widget_show(label);
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2079
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2080 deny_opt_menu = gtk_option_menu_new();
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2081 gtk_box_pack_start(GTK_BOX(deny_conn_hbox), deny_opt_menu, FALSE, FALSE, 5);
1253
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
2082 gtk_signal_connect(GTK_OBJECT(deny_opt_menu), "destroy", GTK_SIGNAL_FUNC(des_deny_opt), NULL);
1124
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2083 gtk_widget_show(deny_opt_menu);
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2084
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2085 build_deny_menu();
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2086
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2087 hbox = gtk_hbox_new(FALSE, 5);
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2088 gtk_box_pack_start(GTK_BOX(box), hbox, TRUE, TRUE, 5);
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2089 gtk_widget_show(hbox);
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2090
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2091 vbox = gtk_vbox_new(FALSE, 5);
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2092 gtk_box_pack_start(GTK_BOX(hbox), vbox, TRUE, TRUE, 5);
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2093 gtk_widget_show(vbox);
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2094
2074
a4367a6478eb [gaim-migrate @ 2084]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2048
diff changeset
2095 deny_type = deny_opt(_("Allow all users to contact me"), 1, vbox, NULL);
a4367a6478eb [gaim-migrate @ 2084]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2048
diff changeset
2096 deny_type = deny_opt(_("Allow only the users below"), 3, vbox, deny_type);
1124
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2097
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2098 label = gtk_label_new(_("Allow List"));
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2099 gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 5);
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2100 gtk_widget_show(label);
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2101
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2102 sw = gtk_scrolled_window_new(NULL, NULL);
1253
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
2103 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
1124
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2104 gtk_box_pack_start(GTK_BOX(vbox), sw, TRUE, TRUE, 5);
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2105 gtk_widget_show(sw);
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2106
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2107 allow_list = gtk_list_new();
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2108 gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(sw), allow_list);
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2109 gtk_widget_show(allow_list);
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2110
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2111 build_allow_list();
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2112
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2113 bbox = gtk_hbox_new(TRUE, 5);
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2114 gtk_box_pack_end(GTK_BOX(vbox), bbox, FALSE, FALSE, 5);
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2115 gtk_widget_show(bbox);
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2116
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2117 button = picture_button(prefs, _("Add"), gnome_add_xpm);
1144
b1454d019277 [gaim-migrate @ 1154]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1131
diff changeset
2118 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(pref_deny_add), (void *)TRUE);
1124
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2119 gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 5);
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2120
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2121 button = picture_button(prefs, _("Remove"), gnome_remove_xpm);
1144
b1454d019277 [gaim-migrate @ 1154]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1131
diff changeset
2122 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(pref_deny_rem), (void *)TRUE);
1124
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2123 gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 5);
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2124
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2125 vbox = gtk_vbox_new(FALSE, 5);
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2126 gtk_box_pack_start(GTK_BOX(hbox), vbox, TRUE, TRUE, 5);
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2127 gtk_widget_show(vbox);
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2128
2074
a4367a6478eb [gaim-migrate @ 2084]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2048
diff changeset
2129 deny_type = deny_opt(_("Deny all users"), 2, vbox, deny_type);
a4367a6478eb [gaim-migrate @ 2084]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2048
diff changeset
2130 deny_type = deny_opt(_("Block the users below"), 4, vbox, deny_type);
1124
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2131
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2132 label = gtk_label_new(_("Block List"));
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2133 gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 5);
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2134 gtk_widget_show(label);
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2135
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2136 sw = gtk_scrolled_window_new(NULL, NULL);
1253
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
2137 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
1124
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2138 gtk_box_pack_start(GTK_BOX(vbox), sw, TRUE, TRUE, 5);
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2139 gtk_widget_show(sw);
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2140
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2141 block_list = gtk_list_new();
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2142 gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(sw), block_list);
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2143 gtk_widget_show(block_list);
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2144
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2145 build_block_list();
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2146
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2147 bbox = gtk_hbox_new(TRUE, 5);
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2148 gtk_box_pack_end(GTK_BOX(vbox), bbox, FALSE, FALSE, 5);
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2149 gtk_widget_show(bbox);
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2150
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2151 button = picture_button(prefs, _("Add"), gnome_add_xpm);
1144
b1454d019277 [gaim-migrate @ 1154]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1131
diff changeset
2152 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(pref_deny_add), FALSE);
1124
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2153 gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 5);
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2154
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2155 button = picture_button(prefs, _("Remove"), gnome_remove_xpm);
1144
b1454d019277 [gaim-migrate @ 1154]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1131
diff changeset
2156 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(pref_deny_rem), FALSE);
1124
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2157 gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 5);
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2158
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2159 gtk_widget_show(prefdialog);
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2160 }
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2161
1370
776bb4c6c0b8 [gaim-migrate @ 1380]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1366
diff changeset
2162 void update_connection_dependent_prefs() /* what a crappy name */
776bb4c6c0b8 [gaim-migrate @ 1380]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1366
diff changeset
2163 {
1357
783ba886b6b6 [gaim-migrate @ 1367]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1324
diff changeset
2164 gboolean needdeny = FALSE;
783ba886b6b6 [gaim-migrate @ 1367]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1324
diff changeset
2165 GSList *c = connections;
783ba886b6b6 [gaim-migrate @ 1367]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1324
diff changeset
2166 struct gaim_connection *gc = NULL;
783ba886b6b6 [gaim-migrate @ 1367]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1324
diff changeset
2167
1253
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
2168 if (!prefs)
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
2169 return;
1357
783ba886b6b6 [gaim-migrate @ 1367]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1324
diff changeset
2170
783ba886b6b6 [gaim-migrate @ 1367]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1324
diff changeset
2171 while (c) {
783ba886b6b6 [gaim-migrate @ 1367]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1324
diff changeset
2172 gc = c->data;
783ba886b6b6 [gaim-migrate @ 1367]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1324
diff changeset
2173 if (gc->prpl->set_permit_deny)
783ba886b6b6 [gaim-migrate @ 1367]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1324
diff changeset
2174 break;
783ba886b6b6 [gaim-migrate @ 1367]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1324
diff changeset
2175 gc = NULL;
783ba886b6b6 [gaim-migrate @ 1367]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1324
diff changeset
2176 c = c->next;
783ba886b6b6 [gaim-migrate @ 1367]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1324
diff changeset
2177 }
783ba886b6b6 [gaim-migrate @ 1367]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1324
diff changeset
2178 needdeny = (gc != NULL);
783ba886b6b6 [gaim-migrate @ 1367]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1324
diff changeset
2179
783ba886b6b6 [gaim-migrate @ 1367]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1324
diff changeset
2180 if (!needdeny && deny_node) {
1124
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2181 if (current_is_deny)
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2182 gtk_ctree_select(GTK_CTREE(preftree), general_node);
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2183 gtk_ctree_remove_node(GTK_CTREE(preftree), deny_node);
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2184 deny_node = NULL;
1357
783ba886b6b6 [gaim-migrate @ 1367]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1324
diff changeset
2185 } else if (deny_node && current_is_deny) {
783ba886b6b6 [gaim-migrate @ 1367]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1324
diff changeset
2186 build_deny_menu();
783ba886b6b6 [gaim-migrate @ 1367]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1324
diff changeset
2187 build_allow_list();
783ba886b6b6 [gaim-migrate @ 1367]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1324
diff changeset
2188 build_block_list();
783ba886b6b6 [gaim-migrate @ 1367]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1324
diff changeset
2189 } else if (needdeny && !deny_node) {
783ba886b6b6 [gaim-migrate @ 1367]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1324
diff changeset
2190 prefs_build_deny();
1124
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2191 }
1370
776bb4c6c0b8 [gaim-migrate @ 1380]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1366
diff changeset
2192
776bb4c6c0b8 [gaim-migrate @ 1380]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1366
diff changeset
2193 if (make_away_button) {
776bb4c6c0b8 [gaim-migrate @ 1380]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1366
diff changeset
2194 if (connections)
776bb4c6c0b8 [gaim-migrate @ 1380]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1366
diff changeset
2195 gtk_widget_set_sensitive(make_away_button, TRUE);
776bb4c6c0b8 [gaim-migrate @ 1380]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1366
diff changeset
2196 else
776bb4c6c0b8 [gaim-migrate @ 1380]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1366
diff changeset
2197 gtk_widget_set_sensitive(make_away_button, FALSE);
776bb4c6c0b8 [gaim-migrate @ 1380]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1366
diff changeset
2198 }
1124
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2199 }
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2200
1253
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
2201 static void try_me(GtkCTree * ctree, GtkCTreeNode * node)
652
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2202 {
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2203 /* this is a hack */
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2204 void (*func)();
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2205 func = gtk_ctree_node_get_row_data(ctree, node);
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2206 (*func)();
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2207 }
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2208
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2209 void show_prefs()
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2210 {
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2211 GtkWidget *vbox;
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2212 GtkWidget *hpaned;
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2213 GtkWidget *scroll;
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2214 GtkWidget *container;
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2215 GtkWidget *hbox;
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2216 GtkWidget *close;
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2217
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2218 if (prefs) {
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2219 gtk_widget_show(prefs);
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2220 return;
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2221 }
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2222
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2223 prefs = gtk_window_new(GTK_WINDOW_TOPLEVEL);
905
2876c40108cd [gaim-migrate @ 915]
Rob Flynn <gaim@robflynn.com>
parents: 902
diff changeset
2224 gtk_window_set_wmclass(GTK_WINDOW(prefs), "preferences", "Gaim");
652
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2225 gtk_widget_realize(prefs);
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2226 aol_icon(prefs->window);
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2227 gtk_window_set_title(GTK_WINDOW(prefs), _("Gaim - Preferences"));
1930
21f24c30ba1c [gaim-migrate @ 1940]
Rob Flynn <gaim@robflynn.com>
parents: 1900
diff changeset
2228 gtk_widget_set_usize(prefs, 725, 620);
1253
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
2229 gtk_signal_connect(GTK_OBJECT(prefs), "destroy", GTK_SIGNAL_FUNC(delete_prefs), NULL);
652
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2230
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2231 vbox = gtk_vbox_new(FALSE, 5);
1185
47cf56b72d4b [gaim-migrate @ 1195]
Rob Flynn <gaim@robflynn.com>
parents: 1176
diff changeset
2232 gtk_container_border_width(GTK_CONTAINER(vbox), 5);
652
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2233 gtk_container_add(GTK_CONTAINER(prefs), vbox);
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2234 gtk_widget_show(vbox);
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2235
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2236 hpaned = gtk_hpaned_new();
1185
47cf56b72d4b [gaim-migrate @ 1195]
Rob Flynn <gaim@robflynn.com>
parents: 1176
diff changeset
2237 gtk_box_pack_start(GTK_BOX(vbox), hpaned, TRUE, TRUE, 0);
652
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2238 gtk_widget_show(hpaned);
1253
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
2239
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
2240 scroll = gtk_scrolled_window_new(NULL, NULL);
768
0b160e27904b [gaim-migrate @ 778]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 763
diff changeset
2241 gtk_paned_pack1(GTK_PANED(hpaned), scroll, FALSE, FALSE);
1253
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
2242 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scroll), GTK_POLICY_NEVER, GTK_POLICY_NEVER);
652
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2243 gtk_widget_set_usize(scroll, 125, -1);
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2244 gtk_widget_show(scroll);
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2245
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2246 preftree = gtk_ctree_new(1, 0);
1253
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
2247 gtk_ctree_set_line_style(GTK_CTREE(preftree), GTK_CTREE_LINES_SOLID);
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
2248 gtk_ctree_set_expander_style(GTK_CTREE(preftree), GTK_CTREE_EXPANDER_TRIANGLE);
652
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2249 gtk_clist_set_reorderable(GTK_CLIST(preftree), FALSE);
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2250 gtk_container_add(GTK_CONTAINER(scroll), preftree);
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2251 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
2252 gtk_widget_show(preftree);
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2253
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2254 container = gtk_frame_new(NULL);
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2255 gtk_container_set_border_width(GTK_CONTAINER(container), 0);
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2256 gtk_frame_set_shadow_type(GTK_FRAME(container), GTK_SHADOW_NONE);
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2257 gtk_paned_pack2(GTK_PANED(hpaned), container, TRUE, TRUE);
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2258 gtk_widget_show(container);
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2259
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2260 prefdialog = gtk_vbox_new(FALSE, 5);
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2261 gtk_container_add(GTK_CONTAINER(container), prefdialog);
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2262 gtk_widget_show(prefdialog);
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2263
1124
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2264 prefs_build_general();
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2265 prefs_build_buddy();
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2266 prefs_build_convo();
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2267 prefs_build_sound();
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2268 prefs_build_away();
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2269 prefs_build_deny();
901
f168f2c7b357 [gaim-migrate @ 911]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 893
diff changeset
2270
1976
24aed1c31342 [gaim-migrate @ 1986]
Rob Flynn <gaim@robflynn.com>
parents: 1953
diff changeset
2271 /* general_page(); */
652
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2272
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2273 hbox = gtk_hbox_new(FALSE, 5);
1185
47cf56b72d4b [gaim-migrate @ 1195]
Rob Flynn <gaim@robflynn.com>
parents: 1176
diff changeset
2274 gtk_box_pack_end(GTK_BOX(vbox), hbox, FALSE, FALSE, 0);
652
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2275 gtk_widget_show(hbox);
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2276
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2277 close = picture_button(prefs, _("Close"), cancel_xpm);
1185
47cf56b72d4b [gaim-migrate @ 1195]
Rob Flynn <gaim@robflynn.com>
parents: 1176
diff changeset
2278 gtk_box_pack_end(GTK_BOX(hbox), close, FALSE, FALSE, 0);
652
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2279 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
2280
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2281 gtk_widget_show(prefs);
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2282 }
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2283
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2284 static gint debug_delete(GtkWidget *w, GdkEvent *event, void *dummy)
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2285 {
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2286 if (debugbutton)
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2287 gtk_button_clicked(GTK_BUTTON(debugbutton));
1253
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
2288 if (general_options & OPT_GEN_DEBUG) {
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
2289 general_options = general_options ^ (int)OPT_GEN_DEBUG;
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
2290 save_prefs();
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
2291 }
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
2292 g_free(dw);
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
2293 dw = NULL;
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
2294 return FALSE;
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2295
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2296 }
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2297
652
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2298 static void build_debug()
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2299 {
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2300 GtkWidget *scroll;
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2301 GtkWidget *box;
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2302 if (!dw)
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2303 dw = g_new0(struct debug_window, 1);
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2304
1253
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
2305 box = gtk_hbox_new(FALSE, 0);
652
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2306 dw->window = gtk_window_new(GTK_WINDOW_DIALOG);
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2307 gtk_window_set_title(GTK_WINDOW(dw->window), _("GAIM debug output window"));
1253
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
2308 gtk_window_set_wmclass(GTK_WINDOW(dw->window), "debug_out", "Gaim");
652
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2309 gtk_container_add(GTK_CONTAINER(dw->window), box);
1253
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
2310 dw->entry = gtk_text_new(NULL, NULL);
652
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2311 gtk_widget_set_usize(dw->entry, 500, 200);
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2312 scroll = gtk_vscrollbar_new(GTK_TEXT(dw->entry)->vadj);
1253
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
2313 gtk_box_pack_start(GTK_BOX(box), dw->entry, TRUE, TRUE, 0);
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
2314 gtk_box_pack_end(GTK_BOX(box), scroll, FALSE, FALSE, 0);
652
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2315 gtk_widget_show(dw->entry);
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2316 gtk_widget_show(scroll);
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2317 gtk_widget_show(box);
1253
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
2318 gtk_signal_connect(GTK_OBJECT(dw->window), "delete_event", GTK_SIGNAL_FUNC(debug_delete), NULL);
652
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2319 gtk_widget_show(dw->window);
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2320 }
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2321
1253
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
2322 void show_debug(GtkObject * obj)
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2323 {
1253
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
2324 if ((general_options & OPT_GEN_DEBUG)) {
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
2325 if (!dw || !dw->window)
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
2326 build_debug();
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
2327 gtk_widget_show(dw->window);
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
2328 } else {
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
2329 if (!dw)
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
2330 return;
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
2331 gtk_widget_destroy(dw->window);
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
2332 dw->window = NULL;
652
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2333 }
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2334 }
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2335
970
9eb07b383df4 [gaim-migrate @ 980]
Rob Flynn <gaim@robflynn.com>
parents: 967
diff changeset
2336 void debug_printf(char *fmt, ...)
9eb07b383df4 [gaim-migrate @ 980]
Rob Flynn <gaim@robflynn.com>
parents: 967
diff changeset
2337 {
9eb07b383df4 [gaim-migrate @ 980]
Rob Flynn <gaim@robflynn.com>
parents: 967
diff changeset
2338 va_list ap;
9eb07b383df4 [gaim-migrate @ 980]
Rob Flynn <gaim@robflynn.com>
parents: 967
diff changeset
2339 gchar *s;
9eb07b383df4 [gaim-migrate @ 980]
Rob Flynn <gaim@robflynn.com>
parents: 967
diff changeset
2340
1366
155db3303ebb [gaim-migrate @ 1376]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1357
diff changeset
2341 va_start(ap, fmt);
155db3303ebb [gaim-migrate @ 1376]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1357
diff changeset
2342 s = g_strdup_vprintf(fmt, ap);
155db3303ebb [gaim-migrate @ 1376]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1357
diff changeset
2343 va_end(ap);
155db3303ebb [gaim-migrate @ 1376]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1357
diff changeset
2344
970
9eb07b383df4 [gaim-migrate @ 980]
Rob Flynn <gaim@robflynn.com>
parents: 967
diff changeset
2345 if (general_options & OPT_GEN_DEBUG && dw) {
9eb07b383df4 [gaim-migrate @ 980]
Rob Flynn <gaim@robflynn.com>
parents: 967
diff changeset
2346 gtk_text_insert(GTK_TEXT(dw->entry), NULL, NULL, NULL, s, -1);
1366
155db3303ebb [gaim-migrate @ 1376]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1357
diff changeset
2347 }
155db3303ebb [gaim-migrate @ 1376]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1357
diff changeset
2348
1250
b5783215b245 [gaim-migrate @ 1260]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1244
diff changeset
2349 #ifdef DEBUG
1366
155db3303ebb [gaim-migrate @ 1376]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1357
diff changeset
2350 g_print("%s", s);
1250
b5783215b245 [gaim-migrate @ 1260]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1244
diff changeset
2351 #endif
1366
155db3303ebb [gaim-migrate @ 1376]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1357
diff changeset
2352 g_free(s);
970
9eb07b383df4 [gaim-migrate @ 980]
Rob Flynn <gaim@robflynn.com>
parents: 967
diff changeset
2353 }
9eb07b383df4 [gaim-migrate @ 980]
Rob Flynn <gaim@robflynn.com>
parents: 967
diff changeset
2354
652
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2355 static gint handle_delete(GtkWidget *w, GdkEvent *event, void *dummy)
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2356 {
572
faca21605e1b [gaim-migrate @ 582]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
2357 save_prefs();
652
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2358
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2359 if (event == NULL)
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2360 gtk_widget_destroy(prefs);
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2361 prefs = NULL;
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2362 prefdialog = NULL;
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2363 debugbutton = NULL;
1109
c73736fa0b7c [gaim-migrate @ 1119]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1087
diff changeset
2364 prefs_away_menu = NULL;
1253
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
2365
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
2366 return FALSE;
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2367 }
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2368
915
378c862a2381 [gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 910
diff changeset
2369 static void delete_prefs(GtkWidget *w, void *data)
378c862a2381 [gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 910
diff changeset
2370 {
378c862a2381 [gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 910
diff changeset
2371 if (prefs) {
378c862a2381 [gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 910
diff changeset
2372 save_prefs();
378c862a2381 [gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 910
diff changeset
2373 gtk_widget_destroy(prefs);
378c862a2381 [gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 910
diff changeset
2374 }
378c862a2381 [gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 910
diff changeset
2375 prefs = NULL;
1109
c73736fa0b7c [gaim-migrate @ 1119]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1087
diff changeset
2376 prefs_away_menu = NULL;
1124
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2377 deny_node = NULL;
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2378 current_deny_gc = NULL;
915
378c862a2381 [gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 910
diff changeset
2379 }
1253
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
2380
915
378c862a2381 [gaim-migrate @ 925]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 910
diff changeset
2381
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2382 void set_option(GtkWidget *w, int *option)
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2383 {
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2384 *option = !(*option);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2385 }
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2386
652
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2387 void set_general_option(GtkWidget *w, int *option)
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2388 {
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2389 general_options = general_options ^ (int)option;
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2390
1117
f3e0f41beddb [gaim-migrate @ 1127]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1111
diff changeset
2391 if ((int)option == OPT_GEN_CHECK_SPELLING)
f3e0f41beddb [gaim-migrate @ 1127]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1111
diff changeset
2392 toggle_spellchk();
f3e0f41beddb [gaim-migrate @ 1127]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1111
diff changeset
2393
1773
6d1d9e988fd4 [gaim-migrate @ 1783]
Rob Flynn <gaim@robflynn.com>
parents: 1757
diff changeset
2394 if ((int)option == OPT_GEN_QUEUE_WHEN_AWAY)
6d1d9e988fd4 [gaim-migrate @ 1783]
Rob Flynn <gaim@robflynn.com>
parents: 1757
diff changeset
2395 toggle_away_queue();
6d1d9e988fd4 [gaim-migrate @ 1783]
Rob Flynn <gaim@robflynn.com>
parents: 1757
diff changeset
2396
652
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2397 save_prefs();
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2398 }
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2399
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2400 void set_display_option(GtkWidget *w, int *option)
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2401 {
1253
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
2402 display_options = display_options ^ (int)option;
9
effb8a20de26 [gaim-migrate @ 18]
Rob Flynn <gaim@robflynn.com>
parents: 1
diff changeset
2403
1296
11e5b1220028 [gaim-migrate @ 1306]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1269
diff changeset
2404 if (blist && ((int)option == OPT_DISP_NO_BUTTONS)) {
1070
b288f17c2fb2 [gaim-migrate @ 1080]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1030
diff changeset
2405 build_imchat_box(!(display_options & OPT_DISP_NO_BUTTONS));
1296
11e5b1220028 [gaim-migrate @ 1306]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1269
diff changeset
2406 update_button_pix();
11e5b1220028 [gaim-migrate @ 1306]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1269
diff changeset
2407 }
696
97b75ed155b0 [gaim-migrate @ 706]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 683
diff changeset
2408
1070
b288f17c2fb2 [gaim-migrate @ 1080]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1030
diff changeset
2409 if (blist && ((int)option == OPT_DISP_SHOW_GRPNUM))
b288f17c2fb2 [gaim-migrate @ 1080]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1030
diff changeset
2410 update_num_groups();
9
effb8a20de26 [gaim-migrate @ 18]
Rob Flynn <gaim@robflynn.com>
parents: 1
diff changeset
2411
1072
81d19577285a [gaim-migrate @ 1082]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1070
diff changeset
2412 if (blist && ((int)option == OPT_DISP_NO_MT_GRP))
81d19577285a [gaim-migrate @ 1082]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1070
diff changeset
2413 toggle_show_empty_groups();
81d19577285a [gaim-migrate @ 1082]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1070
diff changeset
2414
1296
11e5b1220028 [gaim-migrate @ 1306]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1269
diff changeset
2415 if (blist && ((int)option == OPT_DISP_SHOW_BUTTON_XPM))
11e5b1220028 [gaim-migrate @ 1306]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1269
diff changeset
2416 update_button_pix();
11e5b1220028 [gaim-migrate @ 1306]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1269
diff changeset
2417
1428
00b3d02a2168 [gaim-migrate @ 1438]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1411
diff changeset
2418 if ((int)option == OPT_DISP_SHOW_SMILEY)
00b3d02a2168 [gaim-migrate @ 1438]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1411
diff changeset
2419 toggle_smileys();
00b3d02a2168 [gaim-migrate @ 1438]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1411
diff changeset
2420
00b3d02a2168 [gaim-migrate @ 1438]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1411
diff changeset
2421 if ((int)option == OPT_DISP_SHOW_TIME)
00b3d02a2168 [gaim-migrate @ 1438]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1411
diff changeset
2422 toggle_timestamps();
00b3d02a2168 [gaim-migrate @ 1438]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1411
diff changeset
2423
1573
3a8bd72f431f [gaim-migrate @ 1583]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1525
diff changeset
2424 if ((int)option == OPT_DISP_ONE_WINDOW)
3a8bd72f431f [gaim-migrate @ 1583]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1525
diff changeset
2425 tabize();
3a8bd72f431f [gaim-migrate @ 1583]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1525
diff changeset
2426
1692
a312d64a995d [gaim-migrate @ 1702]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1659
diff changeset
2427 if ((int)option == OPT_DISP_ONE_CHAT_WINDOW)
a312d64a995d [gaim-migrate @ 1702]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1659
diff changeset
2428 chat_tabize();
a312d64a995d [gaim-migrate @ 1702]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1659
diff changeset
2429
1711
9b86520e04ac [gaim-migrate @ 1721]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1692
diff changeset
2430 if ((int)option == OPT_DISP_SHOW_PIXMAPS)
9b86520e04ac [gaim-migrate @ 1721]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1692
diff changeset
2431 toggle_buddy_pixmaps();
9b86520e04ac [gaim-migrate @ 1721]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1692
diff changeset
2432
84
51943f1a97a0 [gaim-migrate @ 94]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 82
diff changeset
2433 #ifdef USE_APPLET
82
05077cb276d4 [gaim-migrate @ 92]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 18
diff changeset
2434 update_pixmaps();
05077cb276d4 [gaim-migrate @ 92]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 18
diff changeset
2435 #endif
572
faca21605e1b [gaim-migrate @ 582]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
2436
faca21605e1b [gaim-migrate @ 582]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
2437 save_prefs();
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2438 }
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2439
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2440 void set_sound_option(GtkWidget *w, int *option)
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2441 {
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2442 sound_options = sound_options ^ (int)option;
572
faca21605e1b [gaim-migrate @ 582]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
2443 save_prefs();
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2444 }
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2445
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2446 void set_font_option(GtkWidget *w, int *option)
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2447 {
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2448 font_options = font_options ^ (int)option;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2449
1253
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
2450 update_font_buttons();
572
faca21605e1b [gaim-migrate @ 582]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
2451
faca21605e1b [gaim-migrate @ 582]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
2452 save_prefs();
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2453 }
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2454
1525
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
2455 void set_logging_option(GtkWidget *w, int *option)
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
2456 {
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
2457 logging_options = logging_options ^ (int)option;
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
2458
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
2459 if ((int)option == OPT_LOG_ALL)
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
2460 update_log_convs();
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
2461
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
2462 save_prefs();
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
2463 }
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
2464
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2465 GtkWidget *gaim_button(const char *text, int *options, int option, GtkWidget *page)
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2466 {
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2467 GtkWidget *button;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2468 button = gtk_check_button_new_with_label(text);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2469 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(button), (*options & option));
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2470 gtk_box_pack_start(GTK_BOX(page), button, FALSE, FALSE, 0);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2471
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2472 if (options == &font_options)
1253
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
2473 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(set_font_option),
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
2474 (int *)option);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2475 if (options == &sound_options)
1253
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
2476 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(set_sound_option),
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
2477 (int *)option);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2478 if (options == &display_options)
1253
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
2479 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(set_display_option),
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
2480 (int *)option);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2481 if (options == &general_options)
1253
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
2482 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(set_general_option),
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
2483 (int *)option);
1525
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
2484 if (options == &logging_options)
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
2485 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(set_logging_option),
ba8e6e211af5 [gaim-migrate @ 1535]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1455
diff changeset
2486 (int *)option);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2487 gtk_widget_show(button);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2488
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2489 return button;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2490 }
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2491
1124
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2492 void prefs_build_general()
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2493 {
1881
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
2494 GtkCTreeNode *node;
652
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2495 char *text[1];
338
9d258a0aa560 [gaim-migrate @ 348]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 337
diff changeset
2496
652
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2497 text[0] = _("General");
1124
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2498 general_node = gtk_ctree_insert_node(GTK_CTREE(preftree), NULL, NULL,
1253
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
2499 text, 5, NULL, NULL, NULL, NULL, 0, 1);
1124
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2500 gtk_ctree_node_set_row_data(GTK_CTREE(preftree), general_node, general_page);
901
f168f2c7b357 [gaim-migrate @ 911]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 893
diff changeset
2501
1881
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
2502 text[0] = _("Proxy");
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
2503 node = gtk_ctree_insert_node(GTK_CTREE(preftree), general_node, NULL,
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
2504 text, 5, NULL, NULL, NULL, NULL, 0, 1);
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
2505 gtk_ctree_node_set_row_data(GTK_CTREE(preftree), node, proxy_page);
a02584b98823 [gaim-migrate @ 1891]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1840
diff changeset
2506
1124
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2507 gtk_ctree_select(GTK_CTREE(preftree), general_node);
652
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2508 }
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2509
1124
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2510 void prefs_build_buddy()
652
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2511 {
1030
38452403563b [gaim-migrate @ 1040]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1026
diff changeset
2512 GtkCTreeNode *parent;
652
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2513 char *text[1];
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2514
652
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2515 text[0] = _("Buddy List");
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2516 parent = gtk_ctree_insert_node(GTK_CTREE(preftree), NULL, NULL,
1253
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
2517 text, 5, NULL, NULL, NULL, NULL, 0, 1);
652
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2518 gtk_ctree_node_set_row_data(GTK_CTREE(preftree), parent, buddy_page);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2519 }
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2520
1124
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2521 void prefs_build_convo()
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2522 {
1750
d2eca7a46cfd [gaim-migrate @ 1760]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1711
diff changeset
2523 GtkCTreeNode *parent, *node;
652
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2524 char *text[1];
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2525
652
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2526 text[0] = _("Conversations");
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2527 parent = gtk_ctree_insert_node(GTK_CTREE(preftree), NULL, NULL,
1253
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
2528 text, 5, NULL, NULL, NULL, NULL, 0, 1);
652
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2529 gtk_ctree_node_set_row_data(GTK_CTREE(preftree), parent, convo_page);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2530
2262
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
2531 text[0] = _("IM Window");
652
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2532 node = gtk_ctree_insert_node(GTK_CTREE(preftree), parent, NULL,
1253
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
2533 text, 5, NULL, NULL, NULL, NULL, 0, 1);
652
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2534 gtk_ctree_node_set_row_data(GTK_CTREE(preftree), node, im_page);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2535
2262
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
2536 text[0] = _("Chat");
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
2537 node = gtk_ctree_insert_node(GTK_CTREE(preftree), parent, NULL,
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
2538 text, 5, NULL, NULL, NULL, NULL, 0, 1);
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
2539 gtk_ctree_node_set_row_data(GTK_CTREE(preftree), node, chat_page);
9c8f353331e7 [gaim-migrate @ 2272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 2254
diff changeset
2540
652
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2541 text[0] = _("Font Options");
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2542 node = gtk_ctree_insert_node(GTK_CTREE(preftree), parent, NULL,
1253
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
2543 text, 5, NULL, NULL, NULL, NULL, 0, 1);
652
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2544 gtk_ctree_node_set_row_data(GTK_CTREE(preftree), node, font_page);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2545 }
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2546
1124
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2547 void prefs_build_sound()
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2548 {
1780
d7cbedd1d651 [gaim-migrate @ 1790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1773
diff changeset
2549 GtkCTreeNode *parent;
652
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2550 char *text[1];
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2551
652
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2552 text[0] = _("Sounds");
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2553 parent = gtk_ctree_insert_node(GTK_CTREE(preftree), NULL, NULL,
1253
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
2554 text, 5, NULL, NULL, NULL, NULL, 0, 1);
652
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2555 gtk_ctree_node_set_row_data(GTK_CTREE(preftree), parent, sound_page);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2556 }
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2557
1124
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2558 void prefs_build_away()
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2559 {
652
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2560 GtkCTreeNode *parent;
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2561 char *text[1];
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2562
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2563 text[0] = _("Away Messages");
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2564 parent = gtk_ctree_insert_node(GTK_CTREE(preftree), NULL, NULL,
1253
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
2565 text, 5, NULL, NULL, NULL, NULL, 0, 1);
652
4d3285caa191 [gaim-migrate @ 662]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 619
diff changeset
2566 gtk_ctree_node_set_row_data(GTK_CTREE(preftree), parent, away_page);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2567 }
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2568
1124
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2569 void prefs_build_deny()
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2570 {
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2571 char *text[1];
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2572
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2573 if (connections && !deny_node) {
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2574 text[0] = _("Privacy");
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2575 deny_node = gtk_ctree_insert_node(GTK_CTREE(preftree), NULL, NULL,
1253
8342d3aab1f1 [gaim-migrate @ 1263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1250
diff changeset
2576 text, 5, NULL, NULL, NULL, NULL, 0, 1);
1124
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2577 gtk_ctree_node_set_row_data(GTK_CTREE(preftree), deny_node, deny_page);
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2578 }
a70d5200edde [gaim-migrate @ 1134]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1123
diff changeset
2579 }