annotate src/dialogs.c @ 593:37dd78318a2e

[gaim-migrate @ 603] Wagii committer: Tailor Script <tailor@pidgin.im>
author Rob Flynn <gaim@robflynn.com>
date Thu, 03 Aug 2000 08:54:41 +0000
parents a0d68eab359a
children 3fd5311a3894
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: 338
diff changeset
22 #ifdef HAVE_CONFIG_H
b402a23f35df [gaim-migrate @ 359]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 338
diff changeset
23 #include "../config.h"
b402a23f35df [gaim-migrate @ 359]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 338
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 <stdio.h>
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
27 #include <stdlib.h>
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
28 #include <time.h>
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
29 #include <sys/types.h>
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
30 #include <sys/stat.h>
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
31 #include <fcntl.h>
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
32 #include <sys/socket.h>
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
33 #include <netdb.h>
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
34 #include <netinet/in.h>
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
35 #include <unistd.h>
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
36 #include <netinet/in.h>
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
37 #include <arpa/inet.h>
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
38
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
39 #include <gtk/gtk.h>
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
40 #include "gaim.h"
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
41 #include "gtkhtml.h"
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
42
441
995b0fc981a3 [gaim-migrate @ 451]
Rob Flynn <gaim@robflynn.com>
parents: 440
diff changeset
43 #include "pixmaps/cancel.xpm"
995b0fc981a3 [gaim-migrate @ 451]
Rob Flynn <gaim@robflynn.com>
parents: 440
diff changeset
44 #include "pixmaps/save.xpm"
443
a86882c351f0 [gaim-migrate @ 453]
Rob Flynn <gaim@robflynn.com>
parents: 442
diff changeset
45 #include "pixmaps/ok.xpm"
459
fb1d671e168e [gaim-migrate @ 469]
Rob Flynn <gaim@robflynn.com>
parents: 458
diff changeset
46 #include "pixmaps/add.xpm"
467
04f4ed4e34fc [gaim-migrate @ 477]
Rob Flynn <gaim@robflynn.com>
parents: 463
diff changeset
47 #include "pixmaps/warn.xpm"
441
995b0fc981a3 [gaim-migrate @ 451]
Rob Flynn <gaim@robflynn.com>
parents: 440
diff changeset
48
555
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
49 #include "pixmaps/angel.xpm"
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
50 #include "pixmaps/bigsmile.xpm"
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
51 #include "pixmaps/burp.xpm"
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
52 #include "pixmaps/crossedlips.xpm"
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
53 #include "pixmaps/cry.xpm"
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
54 #include "pixmaps/embarrassed.xpm"
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
55 #include "pixmaps/kiss.xpm"
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
56 #include "pixmaps/moneymouth.xpm"
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
57 #include "pixmaps/sad.xpm"
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
58 #include "pixmaps/scream.xpm"
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
59 #include "pixmaps/smile.xpm"
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
60 #include "pixmaps/smile8.xpm"
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
61 #include "pixmaps/think.xpm"
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
62 #include "pixmaps/tongue.xpm"
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
63 #include "pixmaps/wink.xpm"
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
64 #include "pixmaps/yell.xpm"
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
65
230
83dd297aa363 [gaim-migrate @ 240]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 229
diff changeset
66 #define DEFAULT_FONT_NAME "-adobe-helvetica-medium-r-normal--12-120-75-75-p-67-iso8859-1"
83dd297aa363 [gaim-migrate @ 240]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 229
diff changeset
67
83dd297aa363 [gaim-migrate @ 240]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 229
diff changeset
68 char *fontface;
83dd297aa363 [gaim-migrate @ 240]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 229
diff changeset
69 char *fontname;
555
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
70 int smiley_array[FACE_TOTAL];
230
83dd297aa363 [gaim-migrate @ 240]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 229
diff changeset
71
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
72 static GtkWidget *imdialog = NULL; /*I only want ONE of these :) */
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
73 static GList *dialogwindows = NULL;
311
0a8b4edc4732 [gaim-migrate @ 321]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 308
diff changeset
74 static GtkWidget *linkdialog, *exportdialog, *importdialog, *logdialog;
230
83dd297aa363 [gaim-migrate @ 240]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 229
diff changeset
75
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
76 struct create_away {
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
77 GtkWidget *window;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
78 GtkWidget *entry;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
79 GtkWidget *text;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
80 GtkWidget *checkbx;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
81 };
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
82
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
83
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
84 struct warning {
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
85 GtkWidget *window;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
86 GtkWidget *anon;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
87 char *who;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
88 };
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
89
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
90 struct addbuddy {
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
91 GtkWidget *window;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
92 GtkWidget *combo;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
93 GtkWidget *entry;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
94 };
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
95
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
96 struct addperm {
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
97 GtkWidget *window;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
98 GSList *buttons;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
99 GtkWidget *entry;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
100 };
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
101
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
102 struct addbp {
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
103 GtkWidget *window;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
104 GtkWidget *nameentry;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
105 GtkWidget *messentry;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
106 GtkWidget *sendim;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
107 GtkWidget *openwindow;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
108 };
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
109
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
110 struct findbyemail {
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
111 GtkWidget *window;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
112 GtkWidget *emailentry;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
113 };
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
114
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
115 struct findbyinfo {
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
116 GtkWidget *window;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
117 GtkWidget *firstentry;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
118 GtkWidget *middleentry;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
119 GtkWidget *lastentry;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
120 GtkWidget *maidenentry;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
121 GtkWidget *cityentry;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
122 GtkWidget *stateentry;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
123 GtkWidget *countryentry;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
124 };
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
125
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
126 struct registerdlg {
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
127 GtkWidget *window;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
128 GtkWidget *name;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
129 GtkWidget *email;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
130 GtkWidget *uname;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
131 GtkWidget *sname;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
132 GtkWidget *country;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
133 };
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
134
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
135 struct info_dlg {
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
136 GtkWidget *window;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
137 GtkWidget *text;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
138 GtkWidget *close;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
139 };
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
140
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
141
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
142 struct set_info_dlg {
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
143 GtkWidget *window;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
144 GtkWidget *text;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
145 GtkWidget *save;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
146 GtkWidget *cancel;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
147 };
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
148
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
149 struct set_dir_dlg {
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
150 GtkWidget *window;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
151 GtkWidget *first;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
152 GtkWidget *middle;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
153 GtkWidget *last;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
154 GtkWidget *maiden;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
155 GtkWidget *city;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
156 GtkWidget *state;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
157 GtkWidget *country;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
158 GtkWidget *web;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
159 GtkWidget *cancel;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
160 GtkWidget *save;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
161 };
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
162
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
163 struct linkdlg {
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
164 GtkWidget *ok;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
165 GtkWidget *cancel;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
166 GtkWidget *window;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
167 GtkWidget *url;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
168 GtkWidget *text;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
169 GtkWidget *toggle;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
170 GtkWidget *entry;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
171 };
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
172
146
99248fb977c2 [gaim-migrate @ 156]
Rob Flynn <gaim@robflynn.com>
parents: 137
diff changeset
173 struct passwddlg {
99248fb977c2 [gaim-migrate @ 156]
Rob Flynn <gaim@robflynn.com>
parents: 137
diff changeset
174 GtkWidget *window;
99248fb977c2 [gaim-migrate @ 156]
Rob Flynn <gaim@robflynn.com>
parents: 137
diff changeset
175 GtkWidget *ok;
99248fb977c2 [gaim-migrate @ 156]
Rob Flynn <gaim@robflynn.com>
parents: 137
diff changeset
176 GtkWidget *cancel;
99248fb977c2 [gaim-migrate @ 156]
Rob Flynn <gaim@robflynn.com>
parents: 137
diff changeset
177 GtkWidget *original;
99248fb977c2 [gaim-migrate @ 156]
Rob Flynn <gaim@robflynn.com>
parents: 137
diff changeset
178 GtkWidget *new1;
99248fb977c2 [gaim-migrate @ 156]
Rob Flynn <gaim@robflynn.com>
parents: 137
diff changeset
179 GtkWidget *new2;
99248fb977c2 [gaim-migrate @ 156]
Rob Flynn <gaim@robflynn.com>
parents: 137
diff changeset
180 };
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
181
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
182 /*------------------------------------------------------------------------*/
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
183 /* Function to Send an Email */
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
184 /*------------------------------------------------------------------------*/
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
185
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
186 static int g_sendemail(char *name, char *email, int uname, int sname, char *country)
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
187 {
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
188 static char email_data[2000];
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
189 int sock;
253
5b28ef2b550e [gaim-migrate @ 263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 247
diff changeset
190 struct in_addr *host;
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
191 /* char data[3]; */
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
192 FILE *sockfile;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
193 char uname_output;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
194 FILE *tmpfile;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
195 char filename[128];
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
196 char buf[256];
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
197 int i=0, tmpfd=-1;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
198
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
199 while (i<10000 && tmpfd < 0) {
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
200 g_snprintf(filename, 128, "/tmp/gaim_%s%d.tmp", current_user->username, i++);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
201
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
202 tmpfd = open(filename, O_RDWR|O_CREAT|O_EXCL, 0600);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
203 }
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
204
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
205 if(tmpfd < 0) {
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
206 return -1;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
207 }
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
208
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
209
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
210 if (uname)
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
211 {
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
212 g_snprintf(buf, sizeof(buf), "uname -a > %s", filename);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
213 system(buf);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
214 }
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
215
253
5b28ef2b550e [gaim-migrate @ 263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 247
diff changeset
216 host = (struct in_addr *)get_address(REG_SRVR);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
217 if (!host)
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
218 {
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
219 printf(_("Error Resolving Mail Server.\n"));
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
220 return -1;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
221 }
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
222
253
5b28ef2b550e [gaim-migrate @ 263]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 247
diff changeset
223 if ((sock = connect_address(host->s_addr, REG_PORT)) < 0)
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
224 {
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
225 printf(_("Error Connecting to Socket.\n"));
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
226 return -1;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
227 }
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
228
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
229 sockfile = fdopen(sock, "r+");
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
230
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
231 g_snprintf(email_data, sizeof(email_data), "mail from: %s\n", REG_EMAIL_ADDR);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
232 fputs(email_data, sockfile);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
233
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
234 g_snprintf(email_data, sizeof(email_data), "rcpt to: %s\n", REG_EMAIL_ADDR);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
235 fputs(email_data, sockfile);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
236
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
237 g_snprintf(email_data, sizeof(email_data), "data\n");
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
238 fputs(email_data, sockfile);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
239 g_snprintf(email_data, sizeof(email_data), "Subject: Registration Information\n\nBelow is the submitted Registration Information\n----------------------------------\nName: %s\nEmail: %s\nCountry: %s\nSName: %s\nGAIM: v%s\nUname: ", name, email, country, sname ? current_user->username : "N/A", VERSION);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
240 fputs(email_data, sockfile);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
241
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
242 if (uname)
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
243 {
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
244 tmpfile = fopen(filename, "r");
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
245 while (!feof(tmpfile))
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
246 {
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
247 uname_output = fgetc(tmpfile);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
248 if (!feof(tmpfile))
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
249 fputc(uname_output, sockfile);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
250 }
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
251 fclose(tmpfile);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
252 }
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
253
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
254 unlink(filename);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
255
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
256 g_snprintf(email_data, sizeof(email_data), "\n.\nquit\n\n");
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
257 fputs(email_data, sockfile);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
258
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
259 /* while (fgets(data, 2, sockfile)) {
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
260 }
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
261 */
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
262 /* I don't think the above is necessary... */
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
263
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
264 close(sock);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
265
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
266 return 1;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
267 }
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
268
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
269 /*------------------------------------------------------------------------*/
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
270 /* Destroys */
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
271 /*------------------------------------------------------------------------*/
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
272
311
0a8b4edc4732 [gaim-migrate @ 321]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 308
diff changeset
273 static gint delete_event_dialog(GtkWidget *w, GdkEventAny *e, struct conversation *c)
0a8b4edc4732 [gaim-migrate @ 321]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 308
diff changeset
274 {
0a8b4edc4732 [gaim-migrate @ 321]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 308
diff changeset
275 dialogwindows = g_list_remove(dialogwindows, w);
0a8b4edc4732 [gaim-migrate @ 321]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 308
diff changeset
276 gtk_widget_destroy(w);
0a8b4edc4732 [gaim-migrate @ 321]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 308
diff changeset
277
0a8b4edc4732 [gaim-migrate @ 321]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 308
diff changeset
278 if (GTK_IS_COLOR_SELECTION_DIALOG(w))
0a8b4edc4732 [gaim-migrate @ 321]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 308
diff changeset
279 c->color_dialog = NULL;
0a8b4edc4732 [gaim-migrate @ 321]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 308
diff changeset
280 if (GTK_IS_FONT_SELECTION_DIALOG(w))
0a8b4edc4732 [gaim-migrate @ 321]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 308
diff changeset
281 c->font_dialog = NULL;
0a8b4edc4732 [gaim-migrate @ 321]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 308
diff changeset
282
0a8b4edc4732 [gaim-migrate @ 321]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 308
diff changeset
283 return FALSE;
0a8b4edc4732 [gaim-migrate @ 321]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 308
diff changeset
284 }
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
285
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
286 static void destroy_dialog(GtkWidget *w, GtkWidget *w2)
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
287 {
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
288 GtkWidget *dest;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
289
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
290 if (!GTK_IS_WIDGET(w2))
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
291 dest = w;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
292 else
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
293 dest = w2;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
294
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
295 if (dest == imdialog)
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
296 imdialog = NULL;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
297
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
298 if (dest == exportdialog)
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
299 exportdialog = NULL;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
300
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
301 if (dest == importdialog)
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
302 importdialog = NULL;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
303
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
304 if (dest == logdialog)
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
305 logdialog = NULL;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
306
311
0a8b4edc4732 [gaim-migrate @ 321]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 308
diff changeset
307 /* if (GTK_COLOR_SELECTION_DIALOG(dest))
0a8b4edc4732 [gaim-migrate @ 321]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 308
diff changeset
308 color_dialog = NULL;*/
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
309
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
310 if (dest == linkdialog)
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
311 linkdialog = NULL;
234
985635758c33 [gaim-migrate @ 244]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 231
diff changeset
312
311
0a8b4edc4732 [gaim-migrate @ 321]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 308
diff changeset
313 /* if (dest == fontdialog)
0a8b4edc4732 [gaim-migrate @ 321]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 308
diff changeset
314 fontdialog = NULL;*/
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
315
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
316 dialogwindows = g_list_remove(dialogwindows, dest);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
317 gtk_widget_destroy(dest);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
318
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
319 }
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
320
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
321
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
322 void destroy_all_dialogs()
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
323 {
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
324 GList *d = dialogwindows;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
325
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
326 while(d) {
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
327 destroy_dialog(NULL, d->data);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
328 d = d->next;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
329 }
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
330
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
331 g_list_free(dialogwindows);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
332 dialogwindows = NULL;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
333
391
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 350
diff changeset
334 if (awaymessage)
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 350
diff changeset
335 do_im_back(NULL, NULL);
84
51943f1a97a0 [gaim-migrate @ 94]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 79
diff changeset
336
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
337 if (imdialog) {
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
338 destroy_dialog(NULL, imdialog);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
339 imdialog = NULL;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
340 }
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
341
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
342 if (linkdialog) {
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
343 destroy_dialog(NULL, linkdialog);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
344 linkdialog = NULL;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
345 }
311
0a8b4edc4732 [gaim-migrate @ 321]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 308
diff changeset
346 /* is this needed? */
0a8b4edc4732 [gaim-migrate @ 321]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 308
diff changeset
347 /* if (colordialog) {
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
348 destroy_dialog(NULL, colordialog);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
349 colordialog = NULL;
311
0a8b4edc4732 [gaim-migrate @ 321]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 308
diff changeset
350 }*/
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
351
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
352 if (exportdialog) {
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
353 destroy_dialog(NULL, exportdialog);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
354 exportdialog = NULL;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
355 }
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
356
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
357 if (importdialog) {
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
358 destroy_dialog(NULL, exportdialog);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
359 importdialog = NULL;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
360 }
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
361
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
362 if (logdialog) {
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
363 destroy_dialog(NULL, logdialog);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
364 logdialog = NULL;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
365 }
311
0a8b4edc4732 [gaim-migrate @ 321]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 308
diff changeset
366 /* is this needed? */
0a8b4edc4732 [gaim-migrate @ 321]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 308
diff changeset
367 /* if (fontdialog) {
234
985635758c33 [gaim-migrate @ 244]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 231
diff changeset
368 destroy_dialog(NULL, fontdialog);
985635758c33 [gaim-migrate @ 244]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 231
diff changeset
369 fontdialog = NULL;
311
0a8b4edc4732 [gaim-migrate @ 321]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 308
diff changeset
370 }*/
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
371 }
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
372
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
373 static void do_warn(GtkWidget *widget, struct warning *w)
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
374 {
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
375 serv_warn(w->who, (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w->anon))) ?
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
376 1 : 0);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
377
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
378 destroy_dialog(NULL, w->window);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
379 }
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
380
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
381
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
382 void show_warn_dialog(char *who)
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
383 {
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
384 GtkWidget *cancel;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
385 GtkWidget *warn;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
386 GtkWidget *label;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
387 GtkWidget *vbox;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
388 GtkWidget *bbox;
467
04f4ed4e34fc [gaim-migrate @ 477]
Rob Flynn <gaim@robflynn.com>
parents: 463
diff changeset
389 GtkWidget *button_box;
04f4ed4e34fc [gaim-migrate @ 477]
Rob Flynn <gaim@robflynn.com>
parents: 463
diff changeset
390 GtkWidget *icon_i;
04f4ed4e34fc [gaim-migrate @ 477]
Rob Flynn <gaim@robflynn.com>
parents: 463
diff changeset
391 GdkBitmap *mask;
04f4ed4e34fc [gaim-migrate @ 477]
Rob Flynn <gaim@robflynn.com>
parents: 463
diff changeset
392 GdkPixmap *icon;
04f4ed4e34fc [gaim-migrate @ 477]
Rob Flynn <gaim@robflynn.com>
parents: 463
diff changeset
393 GtkWidget *frame;
04f4ed4e34fc [gaim-migrate @ 477]
Rob Flynn <gaim@robflynn.com>
parents: 463
diff changeset
394 GtkWidget *fbox;
441
995b0fc981a3 [gaim-migrate @ 451]
Rob Flynn <gaim@robflynn.com>
parents: 440
diff changeset
395
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
396 struct warning *w = g_new0(struct warning, 1);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
397
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
398 char *buf = g_malloc(128);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
399 w->window = gtk_window_new(GTK_WINDOW_DIALOG);
467
04f4ed4e34fc [gaim-migrate @ 477]
Rob Flynn <gaim@robflynn.com>
parents: 463
diff changeset
400 gtk_window_set_policy(GTK_WINDOW(w->window), FALSE, FALSE, TRUE);
04f4ed4e34fc [gaim-migrate @ 477]
Rob Flynn <gaim@robflynn.com>
parents: 463
diff changeset
401 gtk_widget_show(w->window);
04f4ed4e34fc [gaim-migrate @ 477]
Rob Flynn <gaim@robflynn.com>
parents: 463
diff changeset
402 dialogwindows = g_list_prepend(dialogwindows, w->window);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
403 bbox = gtk_hbox_new(TRUE, 10);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
404 vbox = gtk_vbox_new(FALSE, 5);
467
04f4ed4e34fc [gaim-migrate @ 477]
Rob Flynn <gaim@robflynn.com>
parents: 463
diff changeset
405 fbox = gtk_vbox_new(FALSE, 5);
04f4ed4e34fc [gaim-migrate @ 477]
Rob Flynn <gaim@robflynn.com>
parents: 463
diff changeset
406
04f4ed4e34fc [gaim-migrate @ 477]
Rob Flynn <gaim@robflynn.com>
parents: 463
diff changeset
407 frame = gtk_frame_new(_("Warn"));
535
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
408
467
04f4ed4e34fc [gaim-migrate @ 477]
Rob Flynn <gaim@robflynn.com>
parents: 463
diff changeset
409 /* Build Warn Button */
04f4ed4e34fc [gaim-migrate @ 477]
Rob Flynn <gaim@robflynn.com>
parents: 463
diff changeset
410
04f4ed4e34fc [gaim-migrate @ 477]
Rob Flynn <gaim@robflynn.com>
parents: 463
diff changeset
411 warn = gtk_button_new();
04f4ed4e34fc [gaim-migrate @ 477]
Rob Flynn <gaim@robflynn.com>
parents: 463
diff changeset
412
04f4ed4e34fc [gaim-migrate @ 477]
Rob Flynn <gaim@robflynn.com>
parents: 463
diff changeset
413 button_box = gtk_hbox_new(FALSE, 5);
04f4ed4e34fc [gaim-migrate @ 477]
Rob Flynn <gaim@robflynn.com>
parents: 463
diff changeset
414 icon = gdk_pixmap_create_from_xpm_d ( w->window->window, &mask, NULL, warn_xpm);
04f4ed4e34fc [gaim-migrate @ 477]
Rob Flynn <gaim@robflynn.com>
parents: 463
diff changeset
415 icon_i = gtk_pixmap_new(icon, mask);
04f4ed4e34fc [gaim-migrate @ 477]
Rob Flynn <gaim@robflynn.com>
parents: 463
diff changeset
416
04f4ed4e34fc [gaim-migrate @ 477]
Rob Flynn <gaim@robflynn.com>
parents: 463
diff changeset
417 label = gtk_label_new(_("Warn"));
04f4ed4e34fc [gaim-migrate @ 477]
Rob Flynn <gaim@robflynn.com>
parents: 463
diff changeset
418
04f4ed4e34fc [gaim-migrate @ 477]
Rob Flynn <gaim@robflynn.com>
parents: 463
diff changeset
419 gtk_box_pack_start(GTK_BOX(button_box), icon_i, FALSE, FALSE, 2);
04f4ed4e34fc [gaim-migrate @ 477]
Rob Flynn <gaim@robflynn.com>
parents: 463
diff changeset
420 gtk_box_pack_end(GTK_BOX(button_box), label, FALSE, FALSE, 2);
04f4ed4e34fc [gaim-migrate @ 477]
Rob Flynn <gaim@robflynn.com>
parents: 463
diff changeset
421
04f4ed4e34fc [gaim-migrate @ 477]
Rob Flynn <gaim@robflynn.com>
parents: 463
diff changeset
422 gtk_widget_show(label);
04f4ed4e34fc [gaim-migrate @ 477]
Rob Flynn <gaim@robflynn.com>
parents: 463
diff changeset
423 gtk_widget_show(icon_i);
04f4ed4e34fc [gaim-migrate @ 477]
Rob Flynn <gaim@robflynn.com>
parents: 463
diff changeset
424
04f4ed4e34fc [gaim-migrate @ 477]
Rob Flynn <gaim@robflynn.com>
parents: 463
diff changeset
425 gtk_widget_show(button_box);
04f4ed4e34fc [gaim-migrate @ 477]
Rob Flynn <gaim@robflynn.com>
parents: 463
diff changeset
426
04f4ed4e34fc [gaim-migrate @ 477]
Rob Flynn <gaim@robflynn.com>
parents: 463
diff changeset
427 gtk_container_add(GTK_CONTAINER(warn), button_box);
04f4ed4e34fc [gaim-migrate @ 477]
Rob Flynn <gaim@robflynn.com>
parents: 463
diff changeset
428
04f4ed4e34fc [gaim-migrate @ 477]
Rob Flynn <gaim@robflynn.com>
parents: 463
diff changeset
429 /* End of OK Button */
04f4ed4e34fc [gaim-migrate @ 477]
Rob Flynn <gaim@robflynn.com>
parents: 463
diff changeset
430
04f4ed4e34fc [gaim-migrate @ 477]
Rob Flynn <gaim@robflynn.com>
parents: 463
diff changeset
431 /* Build Cancel Button */
04f4ed4e34fc [gaim-migrate @ 477]
Rob Flynn <gaim@robflynn.com>
parents: 463
diff changeset
432
04f4ed4e34fc [gaim-migrate @ 477]
Rob Flynn <gaim@robflynn.com>
parents: 463
diff changeset
433 cancel = gtk_button_new();
04f4ed4e34fc [gaim-migrate @ 477]
Rob Flynn <gaim@robflynn.com>
parents: 463
diff changeset
434
04f4ed4e34fc [gaim-migrate @ 477]
Rob Flynn <gaim@robflynn.com>
parents: 463
diff changeset
435 button_box = gtk_hbox_new(FALSE, 5);
04f4ed4e34fc [gaim-migrate @ 477]
Rob Flynn <gaim@robflynn.com>
parents: 463
diff changeset
436 icon = gdk_pixmap_create_from_xpm_d ( w->window->window, &mask, NULL, cancel_xpm);
04f4ed4e34fc [gaim-migrate @ 477]
Rob Flynn <gaim@robflynn.com>
parents: 463
diff changeset
437
04f4ed4e34fc [gaim-migrate @ 477]
Rob Flynn <gaim@robflynn.com>
parents: 463
diff changeset
438 icon_i = gtk_pixmap_new(icon, mask);
04f4ed4e34fc [gaim-migrate @ 477]
Rob Flynn <gaim@robflynn.com>
parents: 463
diff changeset
439
04f4ed4e34fc [gaim-migrate @ 477]
Rob Flynn <gaim@robflynn.com>
parents: 463
diff changeset
440 label = gtk_label_new(_("Cancel"));
04f4ed4e34fc [gaim-migrate @ 477]
Rob Flynn <gaim@robflynn.com>
parents: 463
diff changeset
441
04f4ed4e34fc [gaim-migrate @ 477]
Rob Flynn <gaim@robflynn.com>
parents: 463
diff changeset
442 gtk_box_pack_start(GTK_BOX(button_box), icon_i, FALSE, FALSE, 2);
04f4ed4e34fc [gaim-migrate @ 477]
Rob Flynn <gaim@robflynn.com>
parents: 463
diff changeset
443 gtk_box_pack_end(GTK_BOX(button_box), label, FALSE, FALSE, 2);
04f4ed4e34fc [gaim-migrate @ 477]
Rob Flynn <gaim@robflynn.com>
parents: 463
diff changeset
444
04f4ed4e34fc [gaim-migrate @ 477]
Rob Flynn <gaim@robflynn.com>
parents: 463
diff changeset
445 gtk_widget_show(label);
04f4ed4e34fc [gaim-migrate @ 477]
Rob Flynn <gaim@robflynn.com>
parents: 463
diff changeset
446 gtk_widget_show(icon_i);
04f4ed4e34fc [gaim-migrate @ 477]
Rob Flynn <gaim@robflynn.com>
parents: 463
diff changeset
447
04f4ed4e34fc [gaim-migrate @ 477]
Rob Flynn <gaim@robflynn.com>
parents: 463
diff changeset
448 gtk_widget_show(button_box);
04f4ed4e34fc [gaim-migrate @ 477]
Rob Flynn <gaim@robflynn.com>
parents: 463
diff changeset
449
04f4ed4e34fc [gaim-migrate @ 477]
Rob Flynn <gaim@robflynn.com>
parents: 463
diff changeset
450 gtk_container_add(GTK_CONTAINER(cancel), button_box);
04f4ed4e34fc [gaim-migrate @ 477]
Rob Flynn <gaim@robflynn.com>
parents: 463
diff changeset
451
04f4ed4e34fc [gaim-migrate @ 477]
Rob Flynn <gaim@robflynn.com>
parents: 463
diff changeset
452 /* End of Cancel Button */
535
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
453
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
454
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
455 if (display_options & OPT_DISP_COOL_LOOK)
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
456 {
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
457 gtk_button_set_relief(GTK_BUTTON(cancel), GTK_RELIEF_NONE);
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
458 gtk_button_set_relief(GTK_BUTTON(warn), GTK_RELIEF_NONE);
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
459 }
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
460
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
461 /* Put the buttons in the box */
467
04f4ed4e34fc [gaim-migrate @ 477]
Rob Flynn <gaim@robflynn.com>
parents: 463
diff changeset
462
483
1a9d2b345b79 [gaim-migrate @ 493]
Rob Flynn <gaim@robflynn.com>
parents: 480
diff changeset
463 gtk_widget_set_usize(warn, 75, 30);
1a9d2b345b79 [gaim-migrate @ 493]
Rob Flynn <gaim@robflynn.com>
parents: 480
diff changeset
464 gtk_widget_set_usize(cancel, 75, 30);
1a9d2b345b79 [gaim-migrate @ 493]
Rob Flynn <gaim@robflynn.com>
parents: 480
diff changeset
465
485
a15d87ea1d4c [gaim-migrate @ 495]
Rob Flynn <gaim@robflynn.com>
parents: 484
diff changeset
466 gtk_box_pack_start(GTK_BOX(bbox), warn, FALSE, FALSE, 5);
a15d87ea1d4c [gaim-migrate @ 495]
Rob Flynn <gaim@robflynn.com>
parents: 484
diff changeset
467 gtk_box_pack_end(GTK_BOX(bbox), cancel, FALSE, FALSE, 5);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
468
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
469 g_snprintf(buf, 127, _("Do you really want to warn %s?"), who);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
470 label = gtk_label_new(buf);
467
04f4ed4e34fc [gaim-migrate @ 477]
Rob Flynn <gaim@robflynn.com>
parents: 463
diff changeset
471 gtk_box_pack_start(GTK_BOX(vbox), label, TRUE, TRUE, 5);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
472 gtk_widget_show(label);
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
473 w->anon = gtk_check_button_new_with_label(_("Warn anonymously?"));
467
04f4ed4e34fc [gaim-migrate @ 477]
Rob Flynn <gaim@robflynn.com>
parents: 463
diff changeset
474 gtk_box_pack_start(GTK_BOX(vbox), w->anon, TRUE, TRUE, 5);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
475
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
476 label = gtk_label_new(_("Anonymous warnings are less harsh."));
467
04f4ed4e34fc [gaim-migrate @ 477]
Rob Flynn <gaim@robflynn.com>
parents: 463
diff changeset
477 gtk_box_pack_start(GTK_BOX(vbox), label, TRUE, TRUE, 5);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
478 gtk_widget_show(label);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
479
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
480 w->who = who;
467
04f4ed4e34fc [gaim-migrate @ 477]
Rob Flynn <gaim@robflynn.com>
parents: 463
diff changeset
481
04f4ed4e34fc [gaim-migrate @ 477]
Rob Flynn <gaim@robflynn.com>
parents: 463
diff changeset
482 gtk_container_add(GTK_CONTAINER(frame), vbox);
04f4ed4e34fc [gaim-migrate @ 477]
Rob Flynn <gaim@robflynn.com>
parents: 463
diff changeset
483
04f4ed4e34fc [gaim-migrate @ 477]
Rob Flynn <gaim@robflynn.com>
parents: 463
diff changeset
484 gtk_box_pack_start(GTK_BOX(fbox), frame, FALSE, FALSE, 5);
04f4ed4e34fc [gaim-migrate @ 477]
Rob Flynn <gaim@robflynn.com>
parents: 463
diff changeset
485 gtk_box_pack_start(GTK_BOX(fbox), bbox, FALSE, FALSE, 5);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
486
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
487 /* Handle closes right */
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
488 gtk_signal_connect(GTK_OBJECT(w->window), "delete_event",
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
489 GTK_SIGNAL_FUNC(destroy_dialog), w->window);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
490 gtk_signal_connect(GTK_OBJECT(cancel), "clicked",
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
491 GTK_SIGNAL_FUNC(destroy_dialog), w->window);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
492 gtk_signal_connect(GTK_OBJECT(warn), "clicked",
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
493 GTK_SIGNAL_FUNC(do_warn), w);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
494 /* Finish up */
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
495 gtk_widget_show(warn);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
496 gtk_widget_show(cancel);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
497 gtk_widget_show(w->anon);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
498 gtk_widget_show(bbox);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
499 gtk_widget_show(vbox);
467
04f4ed4e34fc [gaim-migrate @ 477]
Rob Flynn <gaim@robflynn.com>
parents: 463
diff changeset
500 gtk_widget_show(frame);
04f4ed4e34fc [gaim-migrate @ 477]
Rob Flynn <gaim@robflynn.com>
parents: 463
diff changeset
501 gtk_widget_show(fbox);
04f4ed4e34fc [gaim-migrate @ 477]
Rob Flynn <gaim@robflynn.com>
parents: 463
diff changeset
502
04f4ed4e34fc [gaim-migrate @ 477]
Rob Flynn <gaim@robflynn.com>
parents: 463
diff changeset
503 gtk_window_set_title(GTK_WINDOW(w->window), _("Gaim - Warn user?"));
04f4ed4e34fc [gaim-migrate @ 477]
Rob Flynn <gaim@robflynn.com>
parents: 463
diff changeset
504 gtk_container_add(GTK_CONTAINER(w->window), fbox);
04f4ed4e34fc [gaim-migrate @ 477]
Rob Flynn <gaim@robflynn.com>
parents: 463
diff changeset
505 gtk_container_set_border_width(GTK_CONTAINER(w->window), 5);
04f4ed4e34fc [gaim-migrate @ 477]
Rob Flynn <gaim@robflynn.com>
parents: 463
diff changeset
506 gtk_widget_realize(w->window);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
507 aol_icon(w->window->window);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
508
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
509 gtk_widget_show(w->window);
25
c56db1b46b0d [gaim-migrate @ 34]
Rob Flynn <gaim@robflynn.com>
parents: 24
diff changeset
510 g_free(buf);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
511 }
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
512
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
513
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
514 /*------------------------------------------------------------------------*/
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
515 /* The dialog for getting an error */
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
516 /*------------------------------------------------------------------------*/
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
517
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
518 void
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
519 do_error_dialog(char *message, char *title)
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
520 {
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
521 GtkWidget *d;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
522 GtkWidget *label;
463
be7cf1868b76 [gaim-migrate @ 473]
Rob Flynn <gaim@robflynn.com>
parents: 459
diff changeset
523 GtkWidget *icon_i;
be7cf1868b76 [gaim-migrate @ 473]
Rob Flynn <gaim@robflynn.com>
parents: 459
diff changeset
524 GdkBitmap *mask;
be7cf1868b76 [gaim-migrate @ 473]
Rob Flynn <gaim@robflynn.com>
parents: 459
diff changeset
525 GdkPixmap *icon;
be7cf1868b76 [gaim-migrate @ 473]
Rob Flynn <gaim@robflynn.com>
parents: 459
diff changeset
526 GtkWidget *button_box;
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
527 GtkWidget *close;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
528
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
529
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
530 d = gtk_dialog_new();
463
be7cf1868b76 [gaim-migrate @ 473]
Rob Flynn <gaim@robflynn.com>
parents: 459
diff changeset
531 gtk_window_set_policy(GTK_WINDOW(d), FALSE, FALSE, TRUE);
471
4d0b703a094c [gaim-migrate @ 481]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 470
diff changeset
532 gtk_widget_realize(d);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
533 label = gtk_label_new(message);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
534 gtk_label_set_line_wrap(GTK_LABEL(label), TRUE);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
535 gtk_widget_show(label);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
536 gtk_box_pack_start(GTK_BOX(GTK_DIALOG(d)->vbox),
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
537 label, FALSE, FALSE, 5);
463
be7cf1868b76 [gaim-migrate @ 473]
Rob Flynn <gaim@robflynn.com>
parents: 459
diff changeset
538
be7cf1868b76 [gaim-migrate @ 473]
Rob Flynn <gaim@robflynn.com>
parents: 459
diff changeset
539 /* Build Close Button */
be7cf1868b76 [gaim-migrate @ 473]
Rob Flynn <gaim@robflynn.com>
parents: 459
diff changeset
540
be7cf1868b76 [gaim-migrate @ 473]
Rob Flynn <gaim@robflynn.com>
parents: 459
diff changeset
541 close = gtk_button_new();
be7cf1868b76 [gaim-migrate @ 473]
Rob Flynn <gaim@robflynn.com>
parents: 459
diff changeset
542
be7cf1868b76 [gaim-migrate @ 473]
Rob Flynn <gaim@robflynn.com>
parents: 459
diff changeset
543 button_box = gtk_hbox_new(FALSE, 5);
be7cf1868b76 [gaim-migrate @ 473]
Rob Flynn <gaim@robflynn.com>
parents: 459
diff changeset
544 icon = gdk_pixmap_create_from_xpm_d ( d->window, &mask, NULL, cancel_xpm);
be7cf1868b76 [gaim-migrate @ 473]
Rob Flynn <gaim@robflynn.com>
parents: 459
diff changeset
545 icon_i = gtk_pixmap_new(icon, mask);
be7cf1868b76 [gaim-migrate @ 473]
Rob Flynn <gaim@robflynn.com>
parents: 459
diff changeset
546
be7cf1868b76 [gaim-migrate @ 473]
Rob Flynn <gaim@robflynn.com>
parents: 459
diff changeset
547 label = gtk_label_new(_("Close"));
be7cf1868b76 [gaim-migrate @ 473]
Rob Flynn <gaim@robflynn.com>
parents: 459
diff changeset
548
be7cf1868b76 [gaim-migrate @ 473]
Rob Flynn <gaim@robflynn.com>
parents: 459
diff changeset
549 gtk_box_pack_start(GTK_BOX(button_box), icon_i, FALSE, FALSE, 2);
be7cf1868b76 [gaim-migrate @ 473]
Rob Flynn <gaim@robflynn.com>
parents: 459
diff changeset
550 gtk_box_pack_end(GTK_BOX(button_box), label, FALSE, FALSE, 2);
be7cf1868b76 [gaim-migrate @ 473]
Rob Flynn <gaim@robflynn.com>
parents: 459
diff changeset
551
be7cf1868b76 [gaim-migrate @ 473]
Rob Flynn <gaim@robflynn.com>
parents: 459
diff changeset
552 gtk_widget_show(label);
be7cf1868b76 [gaim-migrate @ 473]
Rob Flynn <gaim@robflynn.com>
parents: 459
diff changeset
553 gtk_widget_show(icon_i);
be7cf1868b76 [gaim-migrate @ 473]
Rob Flynn <gaim@robflynn.com>
parents: 459
diff changeset
554
be7cf1868b76 [gaim-migrate @ 473]
Rob Flynn <gaim@robflynn.com>
parents: 459
diff changeset
555 gtk_widget_show(button_box);
be7cf1868b76 [gaim-migrate @ 473]
Rob Flynn <gaim@robflynn.com>
parents: 459
diff changeset
556
be7cf1868b76 [gaim-migrate @ 473]
Rob Flynn <gaim@robflynn.com>
parents: 459
diff changeset
557 gtk_container_add(GTK_CONTAINER(close), button_box);
483
1a9d2b345b79 [gaim-migrate @ 493]
Rob Flynn <gaim@robflynn.com>
parents: 480
diff changeset
558 gtk_widget_set_usize(close, 75, 30);
463
be7cf1868b76 [gaim-migrate @ 473]
Rob Flynn <gaim@robflynn.com>
parents: 459
diff changeset
559 gtk_widget_show(close);
be7cf1868b76 [gaim-migrate @ 473]
Rob Flynn <gaim@robflynn.com>
parents: 459
diff changeset
560
be7cf1868b76 [gaim-migrate @ 473]
Rob Flynn <gaim@robflynn.com>
parents: 459
diff changeset
561 /* End of Close Button */
be7cf1868b76 [gaim-migrate @ 473]
Rob Flynn <gaim@robflynn.com>
parents: 459
diff changeset
562
535
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
563
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
564 if (display_options & OPT_DISP_COOL_LOOK)
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
565 gtk_button_set_relief(GTK_BUTTON(close), GTK_RELIEF_NONE);
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
566
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
567 gtk_box_pack_start(GTK_BOX(GTK_DIALOG(d)->action_area),
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
568 close, FALSE, FALSE, 5);
463
be7cf1868b76 [gaim-migrate @ 473]
Rob Flynn <gaim@robflynn.com>
parents: 459
diff changeset
569
be7cf1868b76 [gaim-migrate @ 473]
Rob Flynn <gaim@robflynn.com>
parents: 459
diff changeset
570 gtk_container_set_border_width(GTK_CONTAINER(d), 5);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
571 gtk_window_set_title(GTK_WINDOW(d), title);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
572 gtk_signal_connect(GTK_OBJECT(close), "clicked", GTK_SIGNAL_FUNC(destroy_dialog), d);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
573 aol_icon(d->window);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
574
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
575 gtk_widget_show(d);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
576 }
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
577
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
578
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
579
391
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 350
diff changeset
580 void show_error_dialog(char *d)
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
581 {
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
582
391
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 350
diff changeset
583 int no = atoi(d);
423
0d4e80bdb96b [gaim-migrate @ 433]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 411
diff changeset
584 char *w;
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
585 char buf[256];
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
586 char buf2[32];
423
0d4e80bdb96b [gaim-migrate @ 433]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 411
diff changeset
587
391
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 350
diff changeset
588 #ifdef GAIM_PLUGINS
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 350
diff changeset
589 GList *c = callbacks;
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 350
diff changeset
590 struct gaim_callback *g;
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 350
diff changeset
591 void (*function)(int, void *);
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 350
diff changeset
592 while (c) {
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 350
diff changeset
593 g = (struct gaim_callback *)c->data;
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 350
diff changeset
594 if (g->event == event_error && g->function != NULL) {
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 350
diff changeset
595 function = g->function;
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 350
diff changeset
596 (*function)(no, g->data);
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 350
diff changeset
597 }
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 350
diff changeset
598 c = c->next;
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 350
diff changeset
599 }
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 350
diff changeset
600 #endif
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 350
diff changeset
601
423
0d4e80bdb96b [gaim-migrate @ 433]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 411
diff changeset
602 if (USE_OSCAR)
0d4e80bdb96b [gaim-migrate @ 433]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 411
diff changeset
603 w = d + 4;
0d4e80bdb96b [gaim-migrate @ 433]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 411
diff changeset
604 else
0d4e80bdb96b [gaim-migrate @ 433]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 411
diff changeset
605 w = strtok(NULL, ":");
0d4e80bdb96b [gaim-migrate @ 433]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 411
diff changeset
606
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
607
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
608 switch(no) {
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
609 case 69:
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
610 g_snprintf(buf, sizeof(buf), _("Unable to write file %s."), w);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
611 break;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
612 case 169:
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
613 g_snprintf(buf, sizeof(buf), _("Unable to read file %s."), w);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
614 break;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
615 case 269:
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
616 g_snprintf(buf, sizeof(buf), _("Message too long, last %s bytes truncated."), w);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
617 break;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
618 case 901:
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
619 g_snprintf(buf, sizeof(buf), _("%s not currently logged in."), w);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
620 break;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
621 case 902:
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
622 g_snprintf(buf, sizeof(buf), _("Warning of %s not allowed."), w);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
623 break;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
624 case 903:
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
625 g_snprintf(buf, sizeof(buf), _("A message has been dropped, you are exceeding the server speed limit."));
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
626 break;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
627 case 950:
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
628 g_snprintf(buf, sizeof(buf), _("Chat in %s is not available."), w);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
629 break;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
630 case 960:
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
631 g_snprintf(buf, sizeof(buf), _("You are sending messages too fast to %s."), w);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
632 break;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
633 case 961:
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
634 g_snprintf(buf, sizeof(buf), _("You missed an IM from %s because it was too big."), w);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
635 break;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
636 case 962:
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
637 g_snprintf(buf, sizeof(buf), _("You missed an IM from %s because it was sent too fast."), w);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
638 break;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
639 case 970:
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
640 g_snprintf(buf, sizeof(buf), _("Failure."));
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
641 break;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
642 case 971:
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
643 g_snprintf(buf, sizeof(buf), _("Too many matches."));
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
644 break;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
645 case 972:
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
646 g_snprintf(buf, sizeof(buf), _("Need more qualifiers."));
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
647 break;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
648 case 973:
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
649 g_snprintf(buf, sizeof(buf), _("Dir service temporarily unavailable."));
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
650 break;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
651 case 974:
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
652 g_snprintf(buf, sizeof(buf), _("Email lookup restricted."));
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
653 break;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
654 case 975:
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
655 g_snprintf(buf, sizeof(buf), _("Keyword ignored."));
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
656 break;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
657 case 976:
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
658 g_snprintf(buf, sizeof(buf), _("No keywords."));
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
659 break;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
660 case 977:
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
661 g_snprintf(buf, sizeof(buf), _("User has no directory information."));
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
662 /* g_snprintf(buf, sizeof(buf), "Language not supported."); */
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
663 break;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
664 case 978:
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
665 g_snprintf(buf, sizeof(buf), _("Country not supported."));
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
666 break;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
667 case 979:
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
668 g_snprintf(buf, sizeof(buf), _("Failure unknown: %s."), w);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
669 break;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
670 case 980:
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
671 g_snprintf(buf, sizeof(buf), _("Incorrect nickname or password."));
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
672 break;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
673 case 981:
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
674 g_snprintf(buf, sizeof(buf), _("The service is temporarily unavailable."));
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
675 break;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
676 case 982:
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
677 g_snprintf(buf, sizeof(buf), _("Your warning level is currently too high to log in."));
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
678 break;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
679 case 983:
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
680 g_snprintf(buf, sizeof(buf), _("You have been connecting and disconnecting too frequently. Wait ten minutes and try again. If you continue to try, you will need to wait even longer."));
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
681 break;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
682 case 989:
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
683 g_snprintf(buf, sizeof(buf), _("An unknown signon error has occurred: %s."), w);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
684 break;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
685 default:
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
686 g_snprintf(buf, sizeof(buf), _("An unknown error, %d, has occured. Info: %s"), no, w);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
687 }
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
688
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
689 g_snprintf(buf2, sizeof(buf2), _("Gaim - Error %d"), no);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
690
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
691
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
692 do_error_dialog(buf, buf2);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
693 return;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
694 }
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
695
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
696 static void do_im(GtkWidget *widget, GtkWidget *imentry)
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
697 {
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
698 char *who;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
699 struct conversation *c;
467
04f4ed4e34fc [gaim-migrate @ 477]
Rob Flynn <gaim@robflynn.com>
parents: 463
diff changeset
700 char *test;
04f4ed4e34fc [gaim-migrate @ 477]
Rob Flynn <gaim@robflynn.com>
parents: 463
diff changeset
701
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
702 who = g_strdup(normalize(gtk_entry_get_text(GTK_ENTRY(imentry))));
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
703 destroy_dialog(NULL, imdialog);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
704 imdialog = NULL;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
705
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
706 if (!strcasecmp(who, "")) {
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
707 g_free(who);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
708 return;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
709 }
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
710
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
711 c = find_conversation(who);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
712
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
713 if (c == NULL) {
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
714 c = new_conversation(who);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
715 } else {
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
716 gdk_window_raise(c->window->window);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
717 }
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
718 g_free(who);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
719 }
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
720
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
721 void show_ee_dialog(int ee)
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
722 {
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
723 GtkWidget *ok;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
724 GtkWidget *label;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
725 GtkWidget *box;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
726 GtkWidget *eedialog;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
727
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
728 eedialog = gtk_window_new(GTK_WINDOW_DIALOG);
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
729 ok = gtk_button_new_with_label(_("OK"));
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
730 box = gtk_vbox_new(FALSE, 10);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
731
535
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
732
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
733 if (display_options & OPT_DISP_COOL_LOOK)
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
734 gtk_button_set_relief(GTK_BUTTON(ok), GTK_RELIEF_NONE);
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
735
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
736 if (ee == 0)
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
737 label = gtk_label_new("Amazing! Simply Amazing!");
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
738 else if (ee == 1)
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
739 label = gtk_label_new("Pimpin\' Penguin Style! *Waddle Waddle*");
338
9d258a0aa560 [gaim-migrate @ 348]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 337
diff changeset
740 else if (ee == 2)
9d258a0aa560 [gaim-migrate @ 348]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 337
diff changeset
741 label = gtk_label_new("You should be me. I'm so cute!");
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
742 else
338
9d258a0aa560 [gaim-migrate @ 348]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 337
diff changeset
743 label = gtk_label_new("Now that's what I like!");
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
744
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
745 gtk_widget_show(label);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
746 gtk_widget_show(ok);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
747
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
748 gtk_box_pack_start(GTK_BOX(box), label, TRUE, TRUE, 10);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
749 gtk_box_pack_start(GTK_BOX(box), ok, FALSE, FALSE, 10);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
750
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
751 gtk_widget_show(box);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
752
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
753 gtk_container_add(GTK_CONTAINER(eedialog), box);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
754 gtk_window_set_title(GTK_WINDOW(eedialog), "Gaim - SUPRISE!");
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
755
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
756 gtk_signal_connect(GTK_OBJECT(ok), "clicked",
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
757 GTK_SIGNAL_FUNC(destroy_dialog), eedialog);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
758 gtk_widget_realize(eedialog);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
759 aol_icon(eedialog->window);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
760
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
761 gtk_widget_show(eedialog);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
762 }
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
763
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
764 void show_im_dialog(GtkWidget *w, GtkWidget *w2)
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
765 {
455
430bde33209b [gaim-migrate @ 465]
Rob Flynn <gaim@robflynn.com>
parents: 454
diff changeset
766 GtkWidget *button;
430bde33209b [gaim-migrate @ 465]
Rob Flynn <gaim@robflynn.com>
parents: 454
diff changeset
767 GtkWidget *button_box;
430bde33209b [gaim-migrate @ 465]
Rob Flynn <gaim@robflynn.com>
parents: 454
diff changeset
768 GtkWidget *icon_i;
430bde33209b [gaim-migrate @ 465]
Rob Flynn <gaim@robflynn.com>
parents: 454
diff changeset
769 GdkBitmap *mask;
430bde33209b [gaim-migrate @ 465]
Rob Flynn <gaim@robflynn.com>
parents: 454
diff changeset
770 GdkPixmap *icon;
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
771 GtkWidget *imentry;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
772 GtkWidget *vbox;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
773 GtkWidget *ebox;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
774 GtkWidget *bbox;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
775 GtkWidget *label;
455
430bde33209b [gaim-migrate @ 465]
Rob Flynn <gaim@robflynn.com>
parents: 454
diff changeset
776 GtkWidget *frame;
430bde33209b [gaim-migrate @ 465]
Rob Flynn <gaim@robflynn.com>
parents: 454
diff changeset
777 GtkWidget *fbox;
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
778
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
779 if (!imdialog) {
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
780
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
781 imdialog = gtk_window_new(GTK_WINDOW_DIALOG);
455
430bde33209b [gaim-migrate @ 465]
Rob Flynn <gaim@robflynn.com>
parents: 454
diff changeset
782 gtk_widget_set_usize(imdialog, 255, 105);
430bde33209b [gaim-migrate @ 465]
Rob Flynn <gaim@robflynn.com>
parents: 454
diff changeset
783 gtk_container_border_width(GTK_CONTAINER(imdialog), 5);
458
4f09ffbd2a78 [gaim-migrate @ 468]
Rob Flynn <gaim@robflynn.com>
parents: 455
diff changeset
784 gtk_window_set_policy(GTK_WINDOW(imdialog), FALSE, FALSE, TRUE);
455
430bde33209b [gaim-migrate @ 465]
Rob Flynn <gaim@robflynn.com>
parents: 454
diff changeset
785 gtk_widget_show(imdialog);
430bde33209b [gaim-migrate @ 465]
Rob Flynn <gaim@robflynn.com>
parents: 454
diff changeset
786
430bde33209b [gaim-migrate @ 465]
Rob Flynn <gaim@robflynn.com>
parents: 454
diff changeset
787 bbox = gtk_hbox_new(TRUE, 10);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
788 vbox = gtk_vbox_new(FALSE, 5);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
789 ebox = gtk_hbox_new(FALSE, 2);
455
430bde33209b [gaim-migrate @ 465]
Rob Flynn <gaim@robflynn.com>
parents: 454
diff changeset
790 fbox = gtk_vbox_new(TRUE, 10);
430bde33209b [gaim-migrate @ 465]
Rob Flynn <gaim@robflynn.com>
parents: 454
diff changeset
791
430bde33209b [gaim-migrate @ 465]
Rob Flynn <gaim@robflynn.com>
parents: 454
diff changeset
792 frame = gtk_frame_new(_("Send Instant Message"));
467
04f4ed4e34fc [gaim-migrate @ 477]
Rob Flynn <gaim@robflynn.com>
parents: 463
diff changeset
793
04f4ed4e34fc [gaim-migrate @ 477]
Rob Flynn <gaim@robflynn.com>
parents: 463
diff changeset
794 imentry = gtk_entry_new();
455
430bde33209b [gaim-migrate @ 465]
Rob Flynn <gaim@robflynn.com>
parents: 454
diff changeset
795
430bde33209b [gaim-migrate @ 465]
Rob Flynn <gaim@robflynn.com>
parents: 454
diff changeset
796 /* Build OK Button */
430bde33209b [gaim-migrate @ 465]
Rob Flynn <gaim@robflynn.com>
parents: 454
diff changeset
797
430bde33209b [gaim-migrate @ 465]
Rob Flynn <gaim@robflynn.com>
parents: 454
diff changeset
798 button = gtk_button_new();
430bde33209b [gaim-migrate @ 465]
Rob Flynn <gaim@robflynn.com>
parents: 454
diff changeset
799
430bde33209b [gaim-migrate @ 465]
Rob Flynn <gaim@robflynn.com>
parents: 454
diff changeset
800 button_box = gtk_hbox_new(FALSE, 5);
430bde33209b [gaim-migrate @ 465]
Rob Flynn <gaim@robflynn.com>
parents: 454
diff changeset
801 icon = gdk_pixmap_create_from_xpm_d ( imdialog->window, &mask, NULL, ok_xpm);
430bde33209b [gaim-migrate @ 465]
Rob Flynn <gaim@robflynn.com>
parents: 454
diff changeset
802 icon_i = gtk_pixmap_new(icon, mask);
430bde33209b [gaim-migrate @ 465]
Rob Flynn <gaim@robflynn.com>
parents: 454
diff changeset
803
430bde33209b [gaim-migrate @ 465]
Rob Flynn <gaim@robflynn.com>
parents: 454
diff changeset
804 label = gtk_label_new(_("OK"));
430bde33209b [gaim-migrate @ 465]
Rob Flynn <gaim@robflynn.com>
parents: 454
diff changeset
805
430bde33209b [gaim-migrate @ 465]
Rob Flynn <gaim@robflynn.com>
parents: 454
diff changeset
806 gtk_box_pack_start(GTK_BOX(button_box), icon_i, FALSE, FALSE, 2);
430bde33209b [gaim-migrate @ 465]
Rob Flynn <gaim@robflynn.com>
parents: 454
diff changeset
807 gtk_box_pack_end(GTK_BOX(button_box), label, FALSE, FALSE, 2);
430bde33209b [gaim-migrate @ 465]
Rob Flynn <gaim@robflynn.com>
parents: 454
diff changeset
808
430bde33209b [gaim-migrate @ 465]
Rob Flynn <gaim@robflynn.com>
parents: 454
diff changeset
809 gtk_widget_show(label);
430bde33209b [gaim-migrate @ 465]
Rob Flynn <gaim@robflynn.com>
parents: 454
diff changeset
810 gtk_widget_show(icon_i);
430bde33209b [gaim-migrate @ 465]
Rob Flynn <gaim@robflynn.com>
parents: 454
diff changeset
811
430bde33209b [gaim-migrate @ 465]
Rob Flynn <gaim@robflynn.com>
parents: 454
diff changeset
812 gtk_widget_show(button_box);
430bde33209b [gaim-migrate @ 465]
Rob Flynn <gaim@robflynn.com>
parents: 454
diff changeset
813
430bde33209b [gaim-migrate @ 465]
Rob Flynn <gaim@robflynn.com>
parents: 454
diff changeset
814 gtk_container_add(GTK_CONTAINER(button), button_box);
430bde33209b [gaim-migrate @ 465]
Rob Flynn <gaim@robflynn.com>
parents: 454
diff changeset
815
430bde33209b [gaim-migrate @ 465]
Rob Flynn <gaim@robflynn.com>
parents: 454
diff changeset
816 gtk_signal_connect(GTK_OBJECT(button), "clicked",
430bde33209b [gaim-migrate @ 465]
Rob Flynn <gaim@robflynn.com>
parents: 454
diff changeset
817 GTK_SIGNAL_FUNC(do_im), imentry);
430bde33209b [gaim-migrate @ 465]
Rob Flynn <gaim@robflynn.com>
parents: 454
diff changeset
818
430bde33209b [gaim-migrate @ 465]
Rob Flynn <gaim@robflynn.com>
parents: 454
diff changeset
819 gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 5);
430bde33209b [gaim-migrate @ 465]
Rob Flynn <gaim@robflynn.com>
parents: 454
diff changeset
820
535
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
821 if (display_options & OPT_DISP_COOL_LOOK)
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
822 gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE);
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
823
483
1a9d2b345b79 [gaim-migrate @ 493]
Rob Flynn <gaim@robflynn.com>
parents: 480
diff changeset
824 gtk_widget_set_usize(button, 75, 30);
455
430bde33209b [gaim-migrate @ 465]
Rob Flynn <gaim@robflynn.com>
parents: 454
diff changeset
825 gtk_widget_show(button);
430bde33209b [gaim-migrate @ 465]
Rob Flynn <gaim@robflynn.com>
parents: 454
diff changeset
826
430bde33209b [gaim-migrate @ 465]
Rob Flynn <gaim@robflynn.com>
parents: 454
diff changeset
827 /* End of OK Button */
430bde33209b [gaim-migrate @ 465]
Rob Flynn <gaim@robflynn.com>
parents: 454
diff changeset
828
430bde33209b [gaim-migrate @ 465]
Rob Flynn <gaim@robflynn.com>
parents: 454
diff changeset
829 /* Build Cancel Button */
430bde33209b [gaim-migrate @ 465]
Rob Flynn <gaim@robflynn.com>
parents: 454
diff changeset
830
430bde33209b [gaim-migrate @ 465]
Rob Flynn <gaim@robflynn.com>
parents: 454
diff changeset
831 button = gtk_button_new();
430bde33209b [gaim-migrate @ 465]
Rob Flynn <gaim@robflynn.com>
parents: 454
diff changeset
832
430bde33209b [gaim-migrate @ 465]
Rob Flynn <gaim@robflynn.com>
parents: 454
diff changeset
833 button_box = gtk_hbox_new(FALSE, 5);
430bde33209b [gaim-migrate @ 465]
Rob Flynn <gaim@robflynn.com>
parents: 454
diff changeset
834 icon = gdk_pixmap_create_from_xpm_d ( imdialog->window, &mask, NULL, cancel_xpm);
430bde33209b [gaim-migrate @ 465]
Rob Flynn <gaim@robflynn.com>
parents: 454
diff changeset
835
430bde33209b [gaim-migrate @ 465]
Rob Flynn <gaim@robflynn.com>
parents: 454
diff changeset
836 icon_i = gtk_pixmap_new(icon, mask);
430bde33209b [gaim-migrate @ 465]
Rob Flynn <gaim@robflynn.com>
parents: 454
diff changeset
837
430bde33209b [gaim-migrate @ 465]
Rob Flynn <gaim@robflynn.com>
parents: 454
diff changeset
838 label = gtk_label_new(_("Cancel"));
430bde33209b [gaim-migrate @ 465]
Rob Flynn <gaim@robflynn.com>
parents: 454
diff changeset
839
430bde33209b [gaim-migrate @ 465]
Rob Flynn <gaim@robflynn.com>
parents: 454
diff changeset
840 gtk_box_pack_start(GTK_BOX(button_box), icon_i, FALSE, FALSE, 2);
430bde33209b [gaim-migrate @ 465]
Rob Flynn <gaim@robflynn.com>
parents: 454
diff changeset
841 gtk_box_pack_end(GTK_BOX(button_box), label, FALSE, FALSE, 2);
430bde33209b [gaim-migrate @ 465]
Rob Flynn <gaim@robflynn.com>
parents: 454
diff changeset
842
430bde33209b [gaim-migrate @ 465]
Rob Flynn <gaim@robflynn.com>
parents: 454
diff changeset
843 gtk_widget_show(label);
430bde33209b [gaim-migrate @ 465]
Rob Flynn <gaim@robflynn.com>
parents: 454
diff changeset
844 gtk_widget_show(icon_i);
430bde33209b [gaim-migrate @ 465]
Rob Flynn <gaim@robflynn.com>
parents: 454
diff changeset
845
430bde33209b [gaim-migrate @ 465]
Rob Flynn <gaim@robflynn.com>
parents: 454
diff changeset
846 gtk_widget_show(button_box);
430bde33209b [gaim-migrate @ 465]
Rob Flynn <gaim@robflynn.com>
parents: 454
diff changeset
847
430bde33209b [gaim-migrate @ 465]
Rob Flynn <gaim@robflynn.com>
parents: 454
diff changeset
848 gtk_container_add(GTK_CONTAINER(button), button_box);
430bde33209b [gaim-migrate @ 465]
Rob Flynn <gaim@robflynn.com>
parents: 454
diff changeset
849
430bde33209b [gaim-migrate @ 465]
Rob Flynn <gaim@robflynn.com>
parents: 454
diff changeset
850 gtk_signal_connect(GTK_OBJECT(button), "clicked",
430bde33209b [gaim-migrate @ 465]
Rob Flynn <gaim@robflynn.com>
parents: 454
diff changeset
851 GTK_SIGNAL_FUNC(destroy_dialog), imdialog);
430bde33209b [gaim-migrate @ 465]
Rob Flynn <gaim@robflynn.com>
parents: 454
diff changeset
852
430bde33209b [gaim-migrate @ 465]
Rob Flynn <gaim@robflynn.com>
parents: 454
diff changeset
853 gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 5);
430bde33209b [gaim-migrate @ 465]
Rob Flynn <gaim@robflynn.com>
parents: 454
diff changeset
854
535
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
855 if (display_options & OPT_DISP_COOL_LOOK)
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
856 gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE);
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
857
483
1a9d2b345b79 [gaim-migrate @ 493]
Rob Flynn <gaim@robflynn.com>
parents: 480
diff changeset
858 gtk_widget_set_usize(button, 75, 30);
455
430bde33209b [gaim-migrate @ 465]
Rob Flynn <gaim@robflynn.com>
parents: 454
diff changeset
859 gtk_widget_show(button);
430bde33209b [gaim-migrate @ 465]
Rob Flynn <gaim@robflynn.com>
parents: 454
diff changeset
860
430bde33209b [gaim-migrate @ 465]
Rob Flynn <gaim@robflynn.com>
parents: 454
diff changeset
861 /* End of Cancel Button */
430bde33209b [gaim-migrate @ 465]
Rob Flynn <gaim@robflynn.com>
parents: 454
diff changeset
862
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
863 label = gtk_label_new(_("IM who: "));
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
864 gtk_box_pack_start(GTK_BOX(ebox), label, TRUE, TRUE, 10);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
865 gtk_widget_show(label);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
866
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
867 gtk_box_pack_start(GTK_BOX(ebox), imentry, TRUE, TRUE, 10);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
868
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
869 gtk_box_pack_start(GTK_BOX(vbox), ebox, FALSE, FALSE, 5);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
870 gtk_box_pack_start(GTK_BOX(vbox), bbox, FALSE, FALSE, 5);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
871
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
872 /* Handle closes right */
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
873 gtk_signal_connect(GTK_OBJECT(imentry), "activate",
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
874 GTK_SIGNAL_FUNC(do_im), imentry);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
875 gtk_signal_connect(GTK_OBJECT(imdialog), "destroy",
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
876 GTK_SIGNAL_FUNC(destroy_dialog), imdialog);
455
430bde33209b [gaim-migrate @ 465]
Rob Flynn <gaim@robflynn.com>
parents: 454
diff changeset
877
430bde33209b [gaim-migrate @ 465]
Rob Flynn <gaim@robflynn.com>
parents: 454
diff changeset
878 /* Finish up */
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
879 gtk_widget_show(ebox);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
880 gtk_widget_show(imentry);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
881 gtk_widget_show(bbox);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
882 gtk_widget_show(vbox);
455
430bde33209b [gaim-migrate @ 465]
Rob Flynn <gaim@robflynn.com>
parents: 454
diff changeset
883 gtk_widget_show(fbox);
430bde33209b [gaim-migrate @ 465]
Rob Flynn <gaim@robflynn.com>
parents: 454
diff changeset
884 gtk_widget_show(frame);
430bde33209b [gaim-migrate @ 465]
Rob Flynn <gaim@robflynn.com>
parents: 454
diff changeset
885 gtk_container_add(GTK_CONTAINER(frame), vbox);
430bde33209b [gaim-migrate @ 465]
Rob Flynn <gaim@robflynn.com>
parents: 454
diff changeset
886 gtk_box_pack_start(GTK_BOX(fbox), frame, FALSE, FALSE, 5);
430bde33209b [gaim-migrate @ 465]
Rob Flynn <gaim@robflynn.com>
parents: 454
diff changeset
887 gtk_window_set_title(GTK_WINDOW(imdialog), _("Gaim - IM user"));
430bde33209b [gaim-migrate @ 465]
Rob Flynn <gaim@robflynn.com>
parents: 454
diff changeset
888 gtk_container_add(GTK_CONTAINER(imdialog), fbox);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
889 gtk_widget_grab_focus(imentry);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
890 gtk_widget_realize(imdialog);
455
430bde33209b [gaim-migrate @ 465]
Rob Flynn <gaim@robflynn.com>
parents: 454
diff changeset
891
430bde33209b [gaim-migrate @ 465]
Rob Flynn <gaim@robflynn.com>
parents: 454
diff changeset
892 aol_icon(imdialog->window);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
893
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
894 }
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
895 gtk_widget_show(imdialog);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
896 }
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
897
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
898
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
899 /*------------------------------------------------------------------------*/
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
900 /* The dialog for adding buddies */
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
901 /*------------------------------------------------------------------------*/
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
902
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
903 void do_add_buddy(GtkWidget *w, struct addbuddy *a)
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
904 {
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
905 char *grp, *who;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
906 struct conversation *c;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
907
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
908 who = gtk_entry_get_text(GTK_ENTRY(a->entry));
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
909 grp = gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(a->combo)->entry));
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
910
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
911 c = find_conversation(who);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
912
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
913 add_buddy(grp, who);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
914
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
915 if (c != NULL)
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
916 gtk_label_set_text(GTK_LABEL(GTK_BIN(c->add_button)->child), _("Remove"));
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
917
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
918 build_edit_tree();
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
919
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
920 serv_save_config();
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
921
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
922 serv_add_buddy(who);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
923
228
f3b61c04f44e [gaim-migrate @ 238]
Syd Logan <slogan>
parents: 198
diff changeset
924 do_export( (GtkWidget *) NULL, 0 );
f3b61c04f44e [gaim-migrate @ 238]
Syd Logan <slogan>
parents: 198
diff changeset
925
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
926 update_num_groups();
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
927
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
928 destroy_dialog(NULL, a->window);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
929 }
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
930
577
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
931 void do_add_group(GtkWidget *w, struct addbuddy *a)
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
932 {
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
933 char *grp;
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
934
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
935 grp = gtk_entry_get_text(GTK_ENTRY(a->entry));
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
936
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
937 add_group(grp);
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
938
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
939 build_edit_tree();
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
940
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
941 serv_save_config();
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
942
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
943 do_export( (GtkWidget *) NULL, 0 );
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
944
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
945 update_num_groups();
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
946
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
947 destroy_dialog(NULL, a->window);
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
948 }
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
949
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
950
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
951 static GList *groups_tree()
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
952 {
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
953 GList *tmp=NULL;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
954 char *tmp2;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
955 struct group *g;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
956 GList *grp = groups;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
957
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
958 if (!grp) {
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
959 tmp2 = g_strdup(_("Buddies"));
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
960 tmp = g_list_append(tmp, tmp2);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
961 } else {
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
962 while(grp) {
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
963 g = (struct group *)grp->data;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
964 tmp2 = g->name;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
965 tmp=g_list_append(tmp, tmp2);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
966 grp = grp->next;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
967 }
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
968 }
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
969 return tmp;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
970 }
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
971
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
972
577
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
973 void show_add_group()
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
974 {
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
975 GtkWidget *cancel;
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
976 GtkWidget *add;
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
977 GtkWidget *label;
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
978 GtkWidget *bbox;
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
979 GtkWidget *vbox;
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
980 GtkWidget *topbox;
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
981 GtkWidget *frame;
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
982 GtkWidget *icon_i;
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
983 GdkBitmap *mask;
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
984 GdkPixmap *icon;
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
985 GtkWidget *button_box;
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
986
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
987 struct addbuddy *a = g_new0(struct addbuddy, 1);
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
988
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
989 a->window = gtk_window_new(GTK_WINDOW_DIALOG);
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
990 gtk_window_set_policy(GTK_WINDOW(a->window), FALSE, FALSE, TRUE);
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
991 gtk_widget_show(a->window);
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
992 dialogwindows = g_list_prepend(dialogwindows, a->window);
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
993
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
994 bbox = gtk_hbox_new(TRUE, 10);
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
995 topbox = gtk_hbox_new(FALSE, 5);
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
996 vbox = gtk_vbox_new(FALSE, 5);
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
997
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
998 a->entry = gtk_entry_new();
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
999 /* Put the buttons in the box */
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1000
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1001 /* Build Add Button */
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1002
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1003 add = gtk_button_new();
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1004
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1005 if (display_options & OPT_DISP_COOL_LOOK)
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1006 gtk_button_set_relief(GTK_BUTTON(add), GTK_RELIEF_NONE);
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1007
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1008 button_box = gtk_hbox_new(FALSE, 5);
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1009 icon = gdk_pixmap_create_from_xpm_d ( a->window->window, &mask, NULL, add_xpm);
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1010 icon_i = gtk_pixmap_new(icon, mask);
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1011
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1012 label = gtk_label_new(_("Add"));
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1013
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1014 gtk_box_pack_start(GTK_BOX(button_box), icon_i, FALSE, FALSE, 2);
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1015 gtk_box_pack_end(GTK_BOX(button_box), label, FALSE, FALSE, 2);
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1016
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1017 gtk_widget_show(label);
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1018 gtk_widget_show(icon_i);
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1019
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1020 gtk_widget_show(button_box);
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1021
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1022 gtk_container_add(GTK_CONTAINER(add), button_box);
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1023
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1024 /* End of OK Button */
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1025
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1026 /* Build Cancel Button */
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1027
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1028 cancel = gtk_button_new();
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1029
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1030 if (display_options & OPT_DISP_COOL_LOOK)
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1031 gtk_button_set_relief(GTK_BUTTON(cancel), GTK_RELIEF_NONE);
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1032
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1033 button_box = gtk_hbox_new(FALSE, 5);
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1034 icon = gdk_pixmap_create_from_xpm_d ( a->window->window, &mask, NULL, cancel_xpm);
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1035 icon_i = gtk_pixmap_new(icon, mask);
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1036
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1037 label = gtk_label_new(_("Cancel"));
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1038
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1039 gtk_box_pack_start(GTK_BOX(button_box), icon_i, FALSE, FALSE, 2);
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1040 gtk_box_pack_end(GTK_BOX(button_box), label, FALSE, FALSE, 2);
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1041
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1042 gtk_widget_show(label);
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1043 gtk_widget_show(icon_i);
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1044
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1045 gtk_widget_show(button_box);
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1046
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1047 gtk_container_add(GTK_CONTAINER(cancel), button_box);
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1048
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1049 /* End of Cancel Button */
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1050
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1051 gtk_widget_set_usize(add, 75, 30);
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1052 gtk_widget_set_usize(cancel, 75, 30);
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1053
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1054 gtk_box_pack_start(GTK_BOX(bbox), add, FALSE, FALSE, 5);
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1055 gtk_box_pack_end(GTK_BOX(bbox), cancel, FALSE, FALSE, 5);
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1056
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1057 frame = gtk_frame_new(NULL);
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1058 gtk_frame_set_label(GTK_FRAME(frame), _("Add Group"));
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1059
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1060 label = gtk_label_new(_("Group"));
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1061 gtk_widget_show(label);
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1062 gtk_box_pack_start(GTK_BOX(topbox), label, FALSE, FALSE, 5);
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1063 gtk_box_pack_start(GTK_BOX(topbox), a->entry, FALSE, FALSE, 5);
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1064
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1065 /* And the boxes in the box */
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1066 gtk_box_pack_start(GTK_BOX(vbox), topbox, TRUE, TRUE, 5);
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1067 gtk_box_pack_start(GTK_BOX(vbox), bbox, TRUE, TRUE, 5);
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1068
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1069 /* Handle closes right */
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1070 gtk_signal_connect(GTK_OBJECT(a->window), "destroy",
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1071 GTK_SIGNAL_FUNC(destroy_dialog), a->window);
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1072 gtk_signal_connect(GTK_OBJECT(cancel), "clicked",
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1073 GTK_SIGNAL_FUNC(destroy_dialog), a->window);
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1074 gtk_signal_connect(GTK_OBJECT(add), "clicked",
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1075 GTK_SIGNAL_FUNC(do_add_group), a);
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1076 gtk_signal_connect(GTK_OBJECT(a->entry), "activate",
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1077 GTK_SIGNAL_FUNC(do_add_group), a);
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1078 /* Finish up */
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1079 gtk_widget_show(add);
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1080 gtk_widget_show(cancel);
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1081 gtk_widget_show(a->entry);
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1082 gtk_widget_show(topbox);
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1083 gtk_widget_show(bbox);
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1084 gtk_widget_show(vbox);
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1085 gtk_widget_show(frame);
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1086 gtk_window_set_title(GTK_WINDOW(a->window), _("Gaim - Add Buddy"));
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1087 gtk_window_set_focus(GTK_WINDOW(a->window), a->entry);
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1088 gtk_container_add(GTK_CONTAINER(frame), vbox);
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1089 gtk_container_add(GTK_CONTAINER(a->window), frame);
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1090 gtk_container_set_border_width(GTK_CONTAINER(a->window), 5);
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1091 gtk_widget_realize(a->window);
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1092 aol_icon(a->window->window);
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1093
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1094 gtk_widget_show(a->window);
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1095 }
aa9a8bcddd80 [gaim-migrate @ 587]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 570
diff changeset
1096
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1097 void show_add_buddy(char *buddy, char *group)
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1098 {
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1099 GtkWidget *cancel;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1100 GtkWidget *add;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1101 GtkWidget *label;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1102 GtkWidget *bbox;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1103 GtkWidget *vbox;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1104 GtkWidget *topbox;
236
62d470738cc7 [gaim-migrate @ 246]
Rob Flynn <gaim@robflynn.com>
parents: 234
diff changeset
1105 GtkWidget *frame;
459
fb1d671e168e [gaim-migrate @ 469]
Rob Flynn <gaim@robflynn.com>
parents: 458
diff changeset
1106 GtkWidget *icon_i;
fb1d671e168e [gaim-migrate @ 469]
Rob Flynn <gaim@robflynn.com>
parents: 458
diff changeset
1107 GdkBitmap *mask;
fb1d671e168e [gaim-migrate @ 469]
Rob Flynn <gaim@robflynn.com>
parents: 458
diff changeset
1108 GdkPixmap *icon;
fb1d671e168e [gaim-migrate @ 469]
Rob Flynn <gaim@robflynn.com>
parents: 458
diff changeset
1109 GtkWidget *button_box;
236
62d470738cc7 [gaim-migrate @ 246]
Rob Flynn <gaim@robflynn.com>
parents: 234
diff changeset
1110
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1111 struct addbuddy *a = g_new0(struct addbuddy, 1);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1112
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1113 a->window = gtk_window_new(GTK_WINDOW_DIALOG);
459
fb1d671e168e [gaim-migrate @ 469]
Rob Flynn <gaim@robflynn.com>
parents: 458
diff changeset
1114 gtk_widget_set_usize(a->window, 480, 105);
fb1d671e168e [gaim-migrate @ 469]
Rob Flynn <gaim@robflynn.com>
parents: 458
diff changeset
1115 gtk_window_set_policy(GTK_WINDOW(a->window), FALSE, FALSE, TRUE);
fb1d671e168e [gaim-migrate @ 469]
Rob Flynn <gaim@robflynn.com>
parents: 458
diff changeset
1116 gtk_widget_show(a->window);
fb1d671e168e [gaim-migrate @ 469]
Rob Flynn <gaim@robflynn.com>
parents: 458
diff changeset
1117 dialogwindows = g_list_prepend(dialogwindows, a->window);
fb1d671e168e [gaim-migrate @ 469]
Rob Flynn <gaim@robflynn.com>
parents: 458
diff changeset
1118
fb1d671e168e [gaim-migrate @ 469]
Rob Flynn <gaim@robflynn.com>
parents: 458
diff changeset
1119 bbox = gtk_hbox_new(TRUE, 10);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1120 topbox = gtk_hbox_new(FALSE, 5);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1121 vbox = gtk_vbox_new(FALSE, 5);
244
25518ef9efe6 [gaim-migrate @ 254]
Rob Flynn <gaim@robflynn.com>
parents: 238
diff changeset
1122
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1123 a->entry = gtk_entry_new();
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1124 a->combo = gtk_combo_new();
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1125 /* Fix the combo box */
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1126 gtk_combo_set_popdown_strings(GTK_COMBO(a->combo), groups_tree());
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1127 /* Put the buttons in the box */
236
62d470738cc7 [gaim-migrate @ 246]
Rob Flynn <gaim@robflynn.com>
parents: 234
diff changeset
1128
459
fb1d671e168e [gaim-migrate @ 469]
Rob Flynn <gaim@robflynn.com>
parents: 458
diff changeset
1129 /* Build Add Button */
fb1d671e168e [gaim-migrate @ 469]
Rob Flynn <gaim@robflynn.com>
parents: 458
diff changeset
1130
fb1d671e168e [gaim-migrate @ 469]
Rob Flynn <gaim@robflynn.com>
parents: 458
diff changeset
1131 add = gtk_button_new();
fb1d671e168e [gaim-migrate @ 469]
Rob Flynn <gaim@robflynn.com>
parents: 458
diff changeset
1132
535
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
1133 if (display_options & OPT_DISP_COOL_LOOK)
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
1134 gtk_button_set_relief(GTK_BUTTON(add), GTK_RELIEF_NONE);
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
1135
459
fb1d671e168e [gaim-migrate @ 469]
Rob Flynn <gaim@robflynn.com>
parents: 458
diff changeset
1136 button_box = gtk_hbox_new(FALSE, 5);
fb1d671e168e [gaim-migrate @ 469]
Rob Flynn <gaim@robflynn.com>
parents: 458
diff changeset
1137 icon = gdk_pixmap_create_from_xpm_d ( a->window->window, &mask, NULL, add_xpm);
fb1d671e168e [gaim-migrate @ 469]
Rob Flynn <gaim@robflynn.com>
parents: 458
diff changeset
1138 icon_i = gtk_pixmap_new(icon, mask);
fb1d671e168e [gaim-migrate @ 469]
Rob Flynn <gaim@robflynn.com>
parents: 458
diff changeset
1139
fb1d671e168e [gaim-migrate @ 469]
Rob Flynn <gaim@robflynn.com>
parents: 458
diff changeset
1140 label = gtk_label_new(_("Add"));
fb1d671e168e [gaim-migrate @ 469]
Rob Flynn <gaim@robflynn.com>
parents: 458
diff changeset
1141
fb1d671e168e [gaim-migrate @ 469]
Rob Flynn <gaim@robflynn.com>
parents: 458
diff changeset
1142 gtk_box_pack_start(GTK_BOX(button_box), icon_i, FALSE, FALSE, 2);
fb1d671e168e [gaim-migrate @ 469]
Rob Flynn <gaim@robflynn.com>
parents: 458
diff changeset
1143 gtk_box_pack_end(GTK_BOX(button_box), label, FALSE, FALSE, 2);
fb1d671e168e [gaim-migrate @ 469]
Rob Flynn <gaim@robflynn.com>
parents: 458
diff changeset
1144
fb1d671e168e [gaim-migrate @ 469]
Rob Flynn <gaim@robflynn.com>
parents: 458
diff changeset
1145 gtk_widget_show(label);
fb1d671e168e [gaim-migrate @ 469]
Rob Flynn <gaim@robflynn.com>
parents: 458
diff changeset
1146 gtk_widget_show(icon_i);
fb1d671e168e [gaim-migrate @ 469]
Rob Flynn <gaim@robflynn.com>
parents: 458
diff changeset
1147
fb1d671e168e [gaim-migrate @ 469]
Rob Flynn <gaim@robflynn.com>
parents: 458
diff changeset
1148 gtk_widget_show(button_box);
fb1d671e168e [gaim-migrate @ 469]
Rob Flynn <gaim@robflynn.com>
parents: 458
diff changeset
1149
fb1d671e168e [gaim-migrate @ 469]
Rob Flynn <gaim@robflynn.com>
parents: 458
diff changeset
1150 gtk_container_add(GTK_CONTAINER(add), button_box);
fb1d671e168e [gaim-migrate @ 469]
Rob Flynn <gaim@robflynn.com>
parents: 458
diff changeset
1151
fb1d671e168e [gaim-migrate @ 469]
Rob Flynn <gaim@robflynn.com>
parents: 458
diff changeset
1152 /* End of OK Button */
fb1d671e168e [gaim-migrate @ 469]
Rob Flynn <gaim@robflynn.com>
parents: 458
diff changeset
1153
fb1d671e168e [gaim-migrate @ 469]
Rob Flynn <gaim@robflynn.com>
parents: 458
diff changeset
1154 /* Build Cancel Button */
fb1d671e168e [gaim-migrate @ 469]
Rob Flynn <gaim@robflynn.com>
parents: 458
diff changeset
1155
fb1d671e168e [gaim-migrate @ 469]
Rob Flynn <gaim@robflynn.com>
parents: 458
diff changeset
1156 cancel = gtk_button_new();
fb1d671e168e [gaim-migrate @ 469]
Rob Flynn <gaim@robflynn.com>
parents: 458
diff changeset
1157
535
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
1158 if (display_options & OPT_DISP_COOL_LOOK)
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
1159 gtk_button_set_relief(GTK_BUTTON(cancel), GTK_RELIEF_NONE);
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
1160
459
fb1d671e168e [gaim-migrate @ 469]
Rob Flynn <gaim@robflynn.com>
parents: 458
diff changeset
1161 button_box = gtk_hbox_new(FALSE, 5);
fb1d671e168e [gaim-migrate @ 469]
Rob Flynn <gaim@robflynn.com>
parents: 458
diff changeset
1162 icon = gdk_pixmap_create_from_xpm_d ( a->window->window, &mask, NULL, cancel_xpm);
fb1d671e168e [gaim-migrate @ 469]
Rob Flynn <gaim@robflynn.com>
parents: 458
diff changeset
1163 icon_i = gtk_pixmap_new(icon, mask);
fb1d671e168e [gaim-migrate @ 469]
Rob Flynn <gaim@robflynn.com>
parents: 458
diff changeset
1164
fb1d671e168e [gaim-migrate @ 469]
Rob Flynn <gaim@robflynn.com>
parents: 458
diff changeset
1165 label = gtk_label_new(_("Cancel"));
fb1d671e168e [gaim-migrate @ 469]
Rob Flynn <gaim@robflynn.com>
parents: 458
diff changeset
1166
fb1d671e168e [gaim-migrate @ 469]
Rob Flynn <gaim@robflynn.com>
parents: 458
diff changeset
1167 gtk_box_pack_start(GTK_BOX(button_box), icon_i, FALSE, FALSE, 2);
fb1d671e168e [gaim-migrate @ 469]
Rob Flynn <gaim@robflynn.com>
parents: 458
diff changeset
1168 gtk_box_pack_end(GTK_BOX(button_box), label, FALSE, FALSE, 2);
fb1d671e168e [gaim-migrate @ 469]
Rob Flynn <gaim@robflynn.com>
parents: 458
diff changeset
1169
fb1d671e168e [gaim-migrate @ 469]
Rob Flynn <gaim@robflynn.com>
parents: 458
diff changeset
1170 gtk_widget_show(label);
fb1d671e168e [gaim-migrate @ 469]
Rob Flynn <gaim@robflynn.com>
parents: 458
diff changeset
1171 gtk_widget_show(icon_i);
fb1d671e168e [gaim-migrate @ 469]
Rob Flynn <gaim@robflynn.com>
parents: 458
diff changeset
1172
fb1d671e168e [gaim-migrate @ 469]
Rob Flynn <gaim@robflynn.com>
parents: 458
diff changeset
1173 gtk_widget_show(button_box);
fb1d671e168e [gaim-migrate @ 469]
Rob Flynn <gaim@robflynn.com>
parents: 458
diff changeset
1174
fb1d671e168e [gaim-migrate @ 469]
Rob Flynn <gaim@robflynn.com>
parents: 458
diff changeset
1175 gtk_container_add(GTK_CONTAINER(cancel), button_box);
fb1d671e168e [gaim-migrate @ 469]
Rob Flynn <gaim@robflynn.com>
parents: 458
diff changeset
1176
fb1d671e168e [gaim-migrate @ 469]
Rob Flynn <gaim@robflynn.com>
parents: 458
diff changeset
1177 /* End of Cancel Button */
483
1a9d2b345b79 [gaim-migrate @ 493]
Rob Flynn <gaim@robflynn.com>
parents: 480
diff changeset
1178
1a9d2b345b79 [gaim-migrate @ 493]
Rob Flynn <gaim@robflynn.com>
parents: 480
diff changeset
1179 gtk_widget_set_usize(add, 75, 30);
1a9d2b345b79 [gaim-migrate @ 493]
Rob Flynn <gaim@robflynn.com>
parents: 480
diff changeset
1180 gtk_widget_set_usize(cancel, 75, 30);
459
fb1d671e168e [gaim-migrate @ 469]
Rob Flynn <gaim@robflynn.com>
parents: 458
diff changeset
1181
fb1d671e168e [gaim-migrate @ 469]
Rob Flynn <gaim@robflynn.com>
parents: 458
diff changeset
1182 gtk_box_pack_start(GTK_BOX(bbox), add, FALSE, FALSE, 5);
fb1d671e168e [gaim-migrate @ 469]
Rob Flynn <gaim@robflynn.com>
parents: 458
diff changeset
1183 gtk_box_pack_end(GTK_BOX(bbox), cancel, FALSE, FALSE, 5);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1184
236
62d470738cc7 [gaim-migrate @ 246]
Rob Flynn <gaim@robflynn.com>
parents: 234
diff changeset
1185 frame = gtk_frame_new(NULL);
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
1186 gtk_frame_set_label(GTK_FRAME(frame), _("Add Buddy"));
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
1187
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
1188 label = gtk_label_new(_("Buddy"));
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1189 gtk_widget_show(label);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1190 gtk_box_pack_start(GTK_BOX(topbox), label, FALSE, FALSE, 5);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1191 gtk_box_pack_start(GTK_BOX(topbox), a->entry, FALSE, FALSE, 5);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1192 if (buddy != NULL)
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1193 gtk_entry_set_text(GTK_ENTRY(a->entry), buddy);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1194
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
1195 label = gtk_label_new(_("Group"));
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1196 gtk_widget_show(label);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1197 gtk_box_pack_start(GTK_BOX(topbox), label, FALSE, FALSE, 5);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1198 gtk_box_pack_start(GTK_BOX(topbox), a->combo, FALSE, FALSE, 5);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1199
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1200 if (group != NULL)
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1201 gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(a->combo)->entry), group);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1202
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1203 /* And the boxes in the box */
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1204 gtk_box_pack_start(GTK_BOX(vbox), topbox, TRUE, TRUE, 5);
459
fb1d671e168e [gaim-migrate @ 469]
Rob Flynn <gaim@robflynn.com>
parents: 458
diff changeset
1205 gtk_box_pack_start(GTK_BOX(vbox), bbox, TRUE, TRUE, 5);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1206
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1207 /* Handle closes right */
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1208 gtk_signal_connect(GTK_OBJECT(a->window), "destroy",
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1209 GTK_SIGNAL_FUNC(destroy_dialog), a->window);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1210 gtk_signal_connect(GTK_OBJECT(cancel), "clicked",
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1211 GTK_SIGNAL_FUNC(destroy_dialog), a->window);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1212 gtk_signal_connect(GTK_OBJECT(add), "clicked",
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1213 GTK_SIGNAL_FUNC(do_add_buddy), a);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1214 gtk_signal_connect(GTK_OBJECT(a->entry), "activate",
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1215 GTK_SIGNAL_FUNC(do_add_buddy), a);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1216 /* Finish up */
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1217 gtk_widget_show(add);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1218 gtk_widget_show(cancel);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1219 gtk_widget_show(a->combo);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1220 gtk_widget_show(a->entry);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1221 gtk_widget_show(topbox);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1222 gtk_widget_show(bbox);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1223 gtk_widget_show(vbox);
236
62d470738cc7 [gaim-migrate @ 246]
Rob Flynn <gaim@robflynn.com>
parents: 234
diff changeset
1224 gtk_widget_show(frame);
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
1225 gtk_window_set_title(GTK_WINDOW(a->window), _("Gaim - Add Buddy"));
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1226 gtk_window_set_focus(GTK_WINDOW(a->window), a->entry);
245
7cdc778e6e55 [gaim-migrate @ 255]
Rob Flynn <gaim@robflynn.com>
parents: 244
diff changeset
1227 gtk_container_add(GTK_CONTAINER(frame), vbox);
236
62d470738cc7 [gaim-migrate @ 246]
Rob Flynn <gaim@robflynn.com>
parents: 234
diff changeset
1228 gtk_container_add(GTK_CONTAINER(a->window), frame);
62d470738cc7 [gaim-migrate @ 246]
Rob Flynn <gaim@robflynn.com>
parents: 234
diff changeset
1229 gtk_container_set_border_width(GTK_CONTAINER(a->window), 5);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1230 gtk_widget_realize(a->window);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1231 aol_icon(a->window->window);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1232
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1233 gtk_widget_show(a->window);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1234 }
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1235
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1236
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1237 /*------------------------------------------------------------------------*/
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1238 /* The dialog for new buddy pounces */
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1239 /*------------------------------------------------------------------------*/
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1240
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1241
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1242 void do_new_bp(GtkWidget *w, struct addbp *b)
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1243 {
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1244 struct buddy_pounce *bp = g_new0(struct buddy_pounce, 1);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1245
26
b9e90a914e20 [gaim-migrate @ 35]
Rob Flynn <gaim@robflynn.com>
parents: 25
diff changeset
1246 g_snprintf(bp->name, 80, "%s", gtk_entry_get_text(GTK_ENTRY(b->nameentry)));
b9e90a914e20 [gaim-migrate @ 35]
Rob Flynn <gaim@robflynn.com>
parents: 25
diff changeset
1247 g_snprintf(bp->message, 2048, "%s", gtk_entry_get_text(GTK_ENTRY(b->messentry)));
b9e90a914e20 [gaim-migrate @ 35]
Rob Flynn <gaim@robflynn.com>
parents: 25
diff changeset
1248
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1249 if (GTK_TOGGLE_BUTTON(b->openwindow)->active)
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1250 bp->popup = 1;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1251 else
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1252 bp->popup = 0;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1253
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1254 if (GTK_TOGGLE_BUTTON(b->sendim)->active)
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1255 bp->sendim = 1;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1256 else
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1257 bp->sendim = 0;
26
b9e90a914e20 [gaim-migrate @ 35]
Rob Flynn <gaim@robflynn.com>
parents: 25
diff changeset
1258
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1259 buddy_pounces = g_list_append(buddy_pounces, bp);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1260
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1261 do_bp_menu();
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1262
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1263 destroy_dialog(NULL, b->window);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1264 g_free(b);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1265 }
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1266
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1267
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1268 void show_new_bp(char *name)
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1269 {
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1270 GtkWidget *label;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1271 GtkWidget *bbox;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1272 GtkWidget *vbox;
443
a86882c351f0 [gaim-migrate @ 453]
Rob Flynn <gaim@robflynn.com>
parents: 442
diff changeset
1273 GtkWidget *icon_i;
a86882c351f0 [gaim-migrate @ 453]
Rob Flynn <gaim@robflynn.com>
parents: 442
diff changeset
1274 GdkPixmap *icon;
a86882c351f0 [gaim-migrate @ 453]
Rob Flynn <gaim@robflynn.com>
parents: 442
diff changeset
1275 GdkBitmap *mask;
a86882c351f0 [gaim-migrate @ 453]
Rob Flynn <gaim@robflynn.com>
parents: 442
diff changeset
1276 GtkWidget *button;
a86882c351f0 [gaim-migrate @ 453]
Rob Flynn <gaim@robflynn.com>
parents: 442
diff changeset
1277 GtkWidget *button_box;
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1278
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1279 struct addbp *b = g_new0(struct addbp, 1);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1280
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1281 b->window = gtk_window_new(GTK_WINDOW_DIALOG);
458
4f09ffbd2a78 [gaim-migrate @ 468]
Rob Flynn <gaim@robflynn.com>
parents: 455
diff changeset
1282 gtk_window_set_policy(GTK_WINDOW(b->window), FALSE, FALSE, TRUE);
443
a86882c351f0 [gaim-migrate @ 453]
Rob Flynn <gaim@robflynn.com>
parents: 442
diff changeset
1283 gtk_widget_show(b->window);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1284 dialogwindows = g_list_prepend(dialogwindows, b->window);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1285 bbox = gtk_hbox_new(TRUE, 10);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1286 vbox = gtk_vbox_new(FALSE, 5);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1287 b->nameentry = gtk_entry_new();
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1288 b->messentry = gtk_entry_new();
443
a86882c351f0 [gaim-migrate @ 453]
Rob Flynn <gaim@robflynn.com>
parents: 442
diff changeset
1289
a86882c351f0 [gaim-migrate @ 453]
Rob Flynn <gaim@robflynn.com>
parents: 442
diff changeset
1290 /* Build OK Button */
a86882c351f0 [gaim-migrate @ 453]
Rob Flynn <gaim@robflynn.com>
parents: 442
diff changeset
1291
a86882c351f0 [gaim-migrate @ 453]
Rob Flynn <gaim@robflynn.com>
parents: 442
diff changeset
1292 button = gtk_button_new();
a86882c351f0 [gaim-migrate @ 453]
Rob Flynn <gaim@robflynn.com>
parents: 442
diff changeset
1293
a86882c351f0 [gaim-migrate @ 453]
Rob Flynn <gaim@robflynn.com>
parents: 442
diff changeset
1294 button_box = gtk_hbox_new(FALSE, 5);
a86882c351f0 [gaim-migrate @ 453]
Rob Flynn <gaim@robflynn.com>
parents: 442
diff changeset
1295 icon = gdk_pixmap_create_from_xpm_d ( b->window->window, &mask, NULL, ok_xpm);
a86882c351f0 [gaim-migrate @ 453]
Rob Flynn <gaim@robflynn.com>
parents: 442
diff changeset
1296 icon_i = gtk_pixmap_new(icon, mask);
a86882c351f0 [gaim-migrate @ 453]
Rob Flynn <gaim@robflynn.com>
parents: 442
diff changeset
1297
a86882c351f0 [gaim-migrate @ 453]
Rob Flynn <gaim@robflynn.com>
parents: 442
diff changeset
1298 label = gtk_label_new(_("OK"));
a86882c351f0 [gaim-migrate @ 453]
Rob Flynn <gaim@robflynn.com>
parents: 442
diff changeset
1299
a86882c351f0 [gaim-migrate @ 453]
Rob Flynn <gaim@robflynn.com>
parents: 442
diff changeset
1300 gtk_box_pack_start(GTK_BOX(button_box), icon_i, FALSE, FALSE, 2);
a86882c351f0 [gaim-migrate @ 453]
Rob Flynn <gaim@robflynn.com>
parents: 442
diff changeset
1301 gtk_box_pack_end(GTK_BOX(button_box), label, FALSE, FALSE, 2);
a86882c351f0 [gaim-migrate @ 453]
Rob Flynn <gaim@robflynn.com>
parents: 442
diff changeset
1302
a86882c351f0 [gaim-migrate @ 453]
Rob Flynn <gaim@robflynn.com>
parents: 442
diff changeset
1303 gtk_widget_show(label);
a86882c351f0 [gaim-migrate @ 453]
Rob Flynn <gaim@robflynn.com>
parents: 442
diff changeset
1304 gtk_widget_show(icon_i);
a86882c351f0 [gaim-migrate @ 453]
Rob Flynn <gaim@robflynn.com>
parents: 442
diff changeset
1305
a86882c351f0 [gaim-migrate @ 453]
Rob Flynn <gaim@robflynn.com>
parents: 442
diff changeset
1306 gtk_widget_show(button_box);
a86882c351f0 [gaim-migrate @ 453]
Rob Flynn <gaim@robflynn.com>
parents: 442
diff changeset
1307
a86882c351f0 [gaim-migrate @ 453]
Rob Flynn <gaim@robflynn.com>
parents: 442
diff changeset
1308 gtk_container_add(GTK_CONTAINER(button), button_box);
a86882c351f0 [gaim-migrate @ 453]
Rob Flynn <gaim@robflynn.com>
parents: 442
diff changeset
1309
a86882c351f0 [gaim-migrate @ 453]
Rob Flynn <gaim@robflynn.com>
parents: 442
diff changeset
1310 gtk_signal_connect(GTK_OBJECT(button), "clicked",
a86882c351f0 [gaim-migrate @ 453]
Rob Flynn <gaim@robflynn.com>
parents: 442
diff changeset
1311 GTK_SIGNAL_FUNC(do_new_bp), b);
a86882c351f0 [gaim-migrate @ 453]
Rob Flynn <gaim@robflynn.com>
parents: 442
diff changeset
1312
a86882c351f0 [gaim-migrate @ 453]
Rob Flynn <gaim@robflynn.com>
parents: 442
diff changeset
1313 gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 5);
a86882c351f0 [gaim-migrate @ 453]
Rob Flynn <gaim@robflynn.com>
parents: 442
diff changeset
1314
535
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
1315 if (display_options & OPT_DISP_COOL_LOOK)
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
1316 gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE);
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
1317
483
1a9d2b345b79 [gaim-migrate @ 493]
Rob Flynn <gaim@robflynn.com>
parents: 480
diff changeset
1318 gtk_widget_set_usize(button, 75, 30);
443
a86882c351f0 [gaim-migrate @ 453]
Rob Flynn <gaim@robflynn.com>
parents: 442
diff changeset
1319 gtk_widget_show(button);
a86882c351f0 [gaim-migrate @ 453]
Rob Flynn <gaim@robflynn.com>
parents: 442
diff changeset
1320
a86882c351f0 [gaim-migrate @ 453]
Rob Flynn <gaim@robflynn.com>
parents: 442
diff changeset
1321 /* End of OK Button */
a86882c351f0 [gaim-migrate @ 453]
Rob Flynn <gaim@robflynn.com>
parents: 442
diff changeset
1322
a86882c351f0 [gaim-migrate @ 453]
Rob Flynn <gaim@robflynn.com>
parents: 442
diff changeset
1323 /* Build Cancel Button */
a86882c351f0 [gaim-migrate @ 453]
Rob Flynn <gaim@robflynn.com>
parents: 442
diff changeset
1324
a86882c351f0 [gaim-migrate @ 453]
Rob Flynn <gaim@robflynn.com>
parents: 442
diff changeset
1325 button = gtk_button_new();
a86882c351f0 [gaim-migrate @ 453]
Rob Flynn <gaim@robflynn.com>
parents: 442
diff changeset
1326
a86882c351f0 [gaim-migrate @ 453]
Rob Flynn <gaim@robflynn.com>
parents: 442
diff changeset
1327 button_box = gtk_hbox_new(FALSE, 5);
a86882c351f0 [gaim-migrate @ 453]
Rob Flynn <gaim@robflynn.com>
parents: 442
diff changeset
1328 icon = gdk_pixmap_create_from_xpm_d ( b->window->window, &mask, NULL, cancel_xpm);
a86882c351f0 [gaim-migrate @ 453]
Rob Flynn <gaim@robflynn.com>
parents: 442
diff changeset
1329 icon_i = gtk_pixmap_new(icon, mask);
a86882c351f0 [gaim-migrate @ 453]
Rob Flynn <gaim@robflynn.com>
parents: 442
diff changeset
1330
a86882c351f0 [gaim-migrate @ 453]
Rob Flynn <gaim@robflynn.com>
parents: 442
diff changeset
1331 label = gtk_label_new(_("Cancel"));
a86882c351f0 [gaim-migrate @ 453]
Rob Flynn <gaim@robflynn.com>
parents: 442
diff changeset
1332
a86882c351f0 [gaim-migrate @ 453]
Rob Flynn <gaim@robflynn.com>
parents: 442
diff changeset
1333 gtk_box_pack_start(GTK_BOX(button_box), icon_i, FALSE, FALSE, 2);
a86882c351f0 [gaim-migrate @ 453]
Rob Flynn <gaim@robflynn.com>
parents: 442
diff changeset
1334 gtk_box_pack_end(GTK_BOX(button_box), label, FALSE, FALSE, 2);
a86882c351f0 [gaim-migrate @ 453]
Rob Flynn <gaim@robflynn.com>
parents: 442
diff changeset
1335
a86882c351f0 [gaim-migrate @ 453]
Rob Flynn <gaim@robflynn.com>
parents: 442
diff changeset
1336 gtk_widget_show(label);
a86882c351f0 [gaim-migrate @ 453]
Rob Flynn <gaim@robflynn.com>
parents: 442
diff changeset
1337 gtk_widget_show(icon_i);
a86882c351f0 [gaim-migrate @ 453]
Rob Flynn <gaim@robflynn.com>
parents: 442
diff changeset
1338
a86882c351f0 [gaim-migrate @ 453]
Rob Flynn <gaim@robflynn.com>
parents: 442
diff changeset
1339 gtk_widget_show(button_box);
a86882c351f0 [gaim-migrate @ 453]
Rob Flynn <gaim@robflynn.com>
parents: 442
diff changeset
1340
a86882c351f0 [gaim-migrate @ 453]
Rob Flynn <gaim@robflynn.com>
parents: 442
diff changeset
1341 gtk_container_add(GTK_CONTAINER(button), button_box);
a86882c351f0 [gaim-migrate @ 453]
Rob Flynn <gaim@robflynn.com>
parents: 442
diff changeset
1342
a86882c351f0 [gaim-migrate @ 453]
Rob Flynn <gaim@robflynn.com>
parents: 442
diff changeset
1343 gtk_signal_connect(GTK_OBJECT(button), "clicked",
a86882c351f0 [gaim-migrate @ 453]
Rob Flynn <gaim@robflynn.com>
parents: 442
diff changeset
1344 GTK_SIGNAL_FUNC(destroy_dialog), b->window);
a86882c351f0 [gaim-migrate @ 453]
Rob Flynn <gaim@robflynn.com>
parents: 442
diff changeset
1345
a86882c351f0 [gaim-migrate @ 453]
Rob Flynn <gaim@robflynn.com>
parents: 442
diff changeset
1346 gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 5);
a86882c351f0 [gaim-migrate @ 453]
Rob Flynn <gaim@robflynn.com>
parents: 442
diff changeset
1347
535
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
1348 if (display_options & OPT_DISP_COOL_LOOK)
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
1349 gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE);
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
1350
483
1a9d2b345b79 [gaim-migrate @ 493]
Rob Flynn <gaim@robflynn.com>
parents: 480
diff changeset
1351 gtk_widget_set_usize(button, 75, 30);
443
a86882c351f0 [gaim-migrate @ 453]
Rob Flynn <gaim@robflynn.com>
parents: 442
diff changeset
1352 gtk_widget_show(button);
a86882c351f0 [gaim-migrate @ 453]
Rob Flynn <gaim@robflynn.com>
parents: 442
diff changeset
1353
a86882c351f0 [gaim-migrate @ 453]
Rob Flynn <gaim@robflynn.com>
parents: 442
diff changeset
1354 /* End of Cancel Button */
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1355
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1356 /* Put the buttons in the box */
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
1357 label = gtk_label_new(_("Buddy To Pounce:"));
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1358 gtk_widget_show(label);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1359 gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1360 gtk_box_pack_start(GTK_BOX(vbox), b->nameentry, FALSE, FALSE, 0);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1361
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
1362 b->openwindow = gtk_check_button_new_with_label(_("Open IM Window on Buddy Logon"));
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1363 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(b->openwindow), FALSE);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1364
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
1365 b->sendim = gtk_check_button_new_with_label(_("Send IM on Buddy Logon"));
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1366 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(b->sendim), TRUE);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1367
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1368 gtk_widget_show(b->openwindow);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1369 gtk_widget_show(b->sendim);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1370 gtk_box_pack_start(GTK_BOX(vbox), b->openwindow, FALSE, FALSE, 0);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1371 gtk_box_pack_start(GTK_BOX(vbox), b->sendim, FALSE, FALSE, 0);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1372
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
1373 label = gtk_label_new(_("Message to send:"));
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1374 gtk_widget_show(label);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1375 gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1376 gtk_box_pack_start(GTK_BOX(vbox), b->messentry, FALSE, FALSE, 0);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1377
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1378
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1379 /* And the boxes in the box */
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1380 gtk_box_pack_start(GTK_BOX(vbox), bbox, FALSE, FALSE, 0);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1381
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1382 /* Handle closes right */
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1383 gtk_signal_connect(GTK_OBJECT(b->window), "destroy",
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1384 GTK_SIGNAL_FUNC(destroy_dialog), b->window);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1385 gtk_signal_connect(GTK_OBJECT(b->messentry), "activate",
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1386 GTK_SIGNAL_FUNC(do_new_bp), b);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1387
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1388
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1389 /* Finish up */
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1390 gtk_widget_show(b->nameentry);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1391 gtk_widget_show(b->messentry);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1392 gtk_widget_show(bbox);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1393 gtk_widget_show(vbox);
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
1394 gtk_window_set_title(GTK_WINDOW(b->window), _("Gaim - New Buddy Pounce"));
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1395 if (name != NULL) {
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1396 gtk_entry_set_text(GTK_ENTRY(b->nameentry), name);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1397 gtk_window_set_focus(GTK_WINDOW(b->window), b->messentry);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1398 } else
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1399 gtk_window_set_focus(GTK_WINDOW(b->window), b->nameentry);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1400 gtk_container_add(GTK_CONTAINER(b->window), vbox);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1401 gtk_container_border_width(GTK_CONTAINER(b->window), 10);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1402 gtk_widget_realize(b->window);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1403 aol_icon(b->window->window);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1404 }
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1405
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1406
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1407
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1408 /*------------------------------------------------------------------------*/
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1409 /* The dialog for SET INFO / SET DIR INFO */
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1410 /*------------------------------------------------------------------------*/
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1411
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1412 void do_save_info(GtkWidget *widget, struct set_info_dlg *b)
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1413 {
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1414 gchar *junk;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1415 char *buf;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1416
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1417 junk = gtk_editable_get_chars(GTK_EDITABLE(b->text), 0, -1);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1418
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1419 g_snprintf(current_user->user_info, sizeof(current_user->user_info), "%s", junk);
25
c56db1b46b0d [gaim-migrate @ 34]
Rob Flynn <gaim@robflynn.com>
parents: 24
diff changeset
1420
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1421 save_prefs();
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1422
79
bfdc427b936d [gaim-migrate @ 89]
Rob Flynn <gaim@robflynn.com>
parents: 62
diff changeset
1423 buf = g_malloc(strlen(current_user->user_info) * 4);
122
521db4bf5f28 [gaim-migrate @ 132]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 84
diff changeset
1424 if (!buf) {
521db4bf5f28 [gaim-migrate @ 132]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 84
diff changeset
1425 buf = g_malloc(1);
521db4bf5f28 [gaim-migrate @ 132]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 84
diff changeset
1426 buf[0] = 0;
521db4bf5f28 [gaim-migrate @ 132]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 84
diff changeset
1427 }
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1428 g_snprintf(buf, strlen(current_user->user_info) * 2, "%s", current_user->user_info);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1429 escape_text(buf);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1430 serv_set_info(buf);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1431 g_free(buf);
25
c56db1b46b0d [gaim-migrate @ 34]
Rob Flynn <gaim@robflynn.com>
parents: 24
diff changeset
1432 g_free(junk);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1433 destroy_dialog(NULL, b->window);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1434 g_free(b);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1435 }
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1436
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1437 void do_set_dir(GtkWidget *widget, struct set_dir_dlg *b)
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1438 {
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1439 char *first = gtk_entry_get_text(GTK_ENTRY(b->first));
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1440 int web = GTK_TOGGLE_BUTTON(b->web)->active;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1441 char *middle = gtk_entry_get_text(GTK_ENTRY(b->middle));
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1442 char *last = gtk_entry_get_text(GTK_ENTRY(b->last));
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1443 char *maiden = gtk_entry_get_text(GTK_ENTRY(b->maiden));
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1444 char *city = gtk_entry_get_text(GTK_ENTRY(b->city));
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1445 char *state = gtk_entry_get_text(GTK_ENTRY(b->state));
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1446 char *country = gtk_entry_get_text(GTK_ENTRY(b->country));
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1447
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1448
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1449 serv_set_dir(first, middle, last, maiden, city, state, country, web);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1450
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1451 destroy_dialog(NULL, b->window);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1452 g_free(b);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1453 }
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1454
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1455 void show_set_dir()
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1456 {
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1457 GtkWidget *label;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1458 GtkWidget *bot;
484
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1459 GtkWidget *vbox;
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1460 GtkWidget *hbox;
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1461 GtkWidget *icon_i;
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1462 GdkBitmap *mask;
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1463 GdkPixmap *icon;
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1464 GtkWidget *button_box;
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1465 GtkWidget *frame;
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1466 GtkWidget *fbox;
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1467
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1468 struct set_dir_dlg *b = g_new0(struct set_dir_dlg, 1);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1469
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1470 b->window = gtk_window_new(GTK_WINDOW_DIALOG);
484
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1471 gtk_widget_set_usize(b->window, 300, 320);
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1472 gtk_window_set_policy(GTK_WINDOW(b->window), FALSE, FALSE, TRUE);
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1473 gtk_widget_show(b->window);
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1474
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1475 dialogwindows = g_list_prepend(dialogwindows, b->window);
484
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1476
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1477 vbox = gtk_vbox_new(FALSE, 5);
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1478 fbox = gtk_vbox_new(FALSE, 5);
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1479
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1480 frame = gtk_frame_new(_("Directory Info"));
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1481
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1482 /* Build Save Button */
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1483
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1484 b->save = gtk_button_new();
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1485
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1486 button_box = gtk_hbox_new(FALSE, 5);
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1487 icon = gdk_pixmap_create_from_xpm_d ( b->window->window, &mask, NULL, save_xpm);
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1488 icon_i = gtk_pixmap_new(icon, mask);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1489
484
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1490 label = gtk_label_new(_("Save"));
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1491
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1492 gtk_box_pack_start(GTK_BOX(button_box), icon_i, FALSE, FALSE, 2);
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1493 gtk_box_pack_end(GTK_BOX(button_box), label, FALSE, FALSE, 2);
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1494
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1495 gtk_widget_show(label);
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1496 gtk_widget_show(icon_i);
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1497
535
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
1498 if (display_options & OPT_DISP_COOL_LOOK)
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
1499 gtk_button_set_relief(GTK_BUTTON(b->save), GTK_RELIEF_NONE);
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
1500
484
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1501 gtk_widget_show(button_box);
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1502
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1503 gtk_container_add(GTK_CONTAINER(b->save), button_box);
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1504
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1505 /* End of OK Button */
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1506
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1507 /* Build Cancel Button */
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1508
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1509 b->cancel = gtk_button_new();
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1510
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1511 button_box = gtk_hbox_new(FALSE, 5);
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1512 icon = gdk_pixmap_create_from_xpm_d ( b->window->window, &mask, NULL, cancel_xpm);
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1513 icon_i = gtk_pixmap_new(icon, mask);
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1514
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1515 label = gtk_label_new(_("Cancel"));
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1516
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1517 gtk_box_pack_start(GTK_BOX(button_box), icon_i, FALSE, FALSE, 2);
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1518 gtk_box_pack_end(GTK_BOX(button_box), label, FALSE, FALSE, 2);
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1519
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1520 gtk_widget_show(label);
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1521 gtk_widget_show(icon_i);
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1522
535
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
1523 if (display_options & OPT_DISP_COOL_LOOK)
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
1524 gtk_button_set_relief(GTK_BUTTON(b->cancel), GTK_RELIEF_NONE);
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
1525
484
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1526 gtk_widget_show(button_box);
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1527
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1528 gtk_container_add(GTK_CONTAINER(b->cancel), button_box);
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1529
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1530 /* End of Cancel Button */
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1531 bot = gtk_hbox_new(TRUE, 10);
484
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1532
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1533 gtk_widget_set_usize(b->save, 75, 30);
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1534 gtk_widget_set_usize(b->cancel, 75, 30);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1535
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1536 gtk_widget_show(b->save);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1537 gtk_widget_show(b->cancel);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1538
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1539 gtk_box_pack_start(GTK_BOX(bot), b->save, FALSE, FALSE, 5);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1540 gtk_box_pack_start(GTK_BOX(bot), b->cancel, FALSE, FALSE, 5);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1541
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1542 gtk_widget_show(bot);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1543
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1544 b->first = gtk_entry_new();
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1545 b->middle = gtk_entry_new();
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1546 b->last = gtk_entry_new();
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1547 b->maiden = gtk_entry_new();
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1548 b->city = gtk_entry_new();
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1549 b->state = gtk_entry_new();
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1550 b->country = gtk_entry_new();
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
1551 b->web = gtk_check_button_new_with_label(_("Allow Web Searches To Find Your Info"));
484
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1552
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1553 /* Line 1 */
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
1554 label = gtk_label_new(_("First Name"));
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1555 gtk_widget_show(label);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1556
484
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1557 hbox = gtk_hbox_new(FALSE, 5);
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1558 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 2);
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1559 gtk_box_pack_end(GTK_BOX(hbox), b->first, FALSE, FALSE, 2);
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1560
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1561 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 2);
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1562 gtk_widget_show(hbox);
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1563
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1564 /* Line 2 */
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
1565 label = gtk_label_new(_("Middle Name"));
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1566 gtk_widget_show(label);
484
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1567
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1568 hbox = gtk_hbox_new(FALSE, 5);
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1569 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 2);
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1570 gtk_box_pack_end(GTK_BOX(hbox), b->middle, FALSE, FALSE, 2);
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1571
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1572 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 2);
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1573 gtk_widget_show(hbox);
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1574
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1575
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1576 /* Line 3 */
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
1577 label = gtk_label_new(_("Last Name"));
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1578 gtk_widget_show(label);
484
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1579
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1580 hbox = gtk_hbox_new(FALSE, 5);
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1581 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 2);
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1582 gtk_box_pack_end(GTK_BOX(hbox), b->last, FALSE, FALSE, 2);
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1583
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1584 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 2);
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1585 gtk_widget_show(hbox);
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1586
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1587 /* Line 4 */
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
1588 label = gtk_label_new(_("Maiden Name"));
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1589 gtk_widget_show(label);
484
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1590
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1591 hbox = gtk_hbox_new(FALSE, 5);
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1592 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 2);
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1593 gtk_box_pack_end(GTK_BOX(hbox), b->maiden, FALSE, FALSE, 2);
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1594
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1595 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 2);
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1596 gtk_widget_show(hbox);
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1597
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1598 /* Line 5 */
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
1599 label = gtk_label_new(_("City"));
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1600 gtk_widget_show(label);
484
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1601
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1602 hbox = gtk_hbox_new(FALSE, 5);
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1603 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 2);
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1604 gtk_box_pack_end(GTK_BOX(hbox), b->city, FALSE, FALSE, 2);
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1605
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1606 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 2);
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1607 gtk_widget_show(hbox);
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1608
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1609 /* Line 6 */
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
1610 label = gtk_label_new(_("State"));
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1611 gtk_widget_show(label);
484
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1612
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1613 hbox = gtk_hbox_new(FALSE, 5);
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1614 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 2);
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1615 gtk_box_pack_end(GTK_BOX(hbox), b->state, FALSE, FALSE, 2);
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1616
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1617 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 2);
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1618 gtk_widget_show(hbox);
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1619
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1620 /* Line 7 */
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
1621 label = gtk_label_new(_("Country"));
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1622 gtk_widget_show(label);
484
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1623
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1624 hbox = gtk_hbox_new(FALSE, 5);
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1625 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 2);
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1626 gtk_box_pack_end(GTK_BOX(hbox), b->country, FALSE, FALSE, 2);
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1627
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1628 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 2);
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1629 gtk_widget_show(hbox);
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1630
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1631 /* Line 8 */
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1632
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1633 hbox = gtk_hbox_new(FALSE, 5);
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1634 gtk_box_pack_start(GTK_BOX(hbox), b->web, TRUE, TRUE, 2);
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1635 gtk_widget_show(hbox);
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1636 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 2);
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1637
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1638 /* And add the buttons */
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1639 gtk_container_add(GTK_CONTAINER(frame), vbox);
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1640 gtk_box_pack_start(GTK_BOX(fbox), frame, FALSE, FALSE, 2);
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1641 gtk_box_pack_start(GTK_BOX(fbox), bot, FALSE, FALSE, 2);
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1642
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1643
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1644 gtk_widget_show(vbox);
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1645 gtk_widget_show(fbox);
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1646
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1647 gtk_widget_show(frame);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1648 gtk_widget_show(b->first);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1649 gtk_widget_show(b->middle);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1650 gtk_widget_show(b->last);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1651 gtk_widget_show(b->maiden);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1652 gtk_widget_show(b->city);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1653 gtk_widget_show(b->state);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1654 gtk_widget_show(b->country);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1655 gtk_widget_show(b->web);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1656
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1657 gtk_signal_connect(GTK_OBJECT(b->window), "destroy",
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1658 GTK_SIGNAL_FUNC(destroy_dialog), b->window);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1659 gtk_signal_connect(GTK_OBJECT(b->cancel), "clicked",
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1660 GTK_SIGNAL_FUNC(destroy_dialog), b->window);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1661 gtk_signal_connect(GTK_OBJECT(b->save), "clicked", GTK_SIGNAL_FUNC(do_set_dir), b);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1662
484
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1663 gtk_container_add(GTK_CONTAINER(b->window), fbox);
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1664 gtk_container_border_width(GTK_CONTAINER(b->window), 5);
a9e485c388c4 [gaim-migrate @ 494]
Rob Flynn <gaim@robflynn.com>
parents: 483
diff changeset
1665
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
1666 gtk_window_set_title(GTK_WINDOW(b->window), _("Gaim - Set Dir Info"));
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1667 gtk_window_set_focus(GTK_WINDOW(b->window), b->first);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1668 gtk_widget_realize(b->window);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1669 aol_icon(b->window->window);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1670
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1671 gtk_widget_show(b->window);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1672 }
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1673
149
9d684979f507 [gaim-migrate @ 159]
Rob Flynn <gaim@robflynn.com>
parents: 146
diff changeset
1674 void do_change_password(GtkWidget *widget, struct passwddlg *b)
9d684979f507 [gaim-migrate @ 159]
Rob Flynn <gaim@robflynn.com>
parents: 146
diff changeset
1675 {
9d684979f507 [gaim-migrate @ 159]
Rob Flynn <gaim@robflynn.com>
parents: 146
diff changeset
1676 gchar *orig, *new1, *new2;
9d684979f507 [gaim-migrate @ 159]
Rob Flynn <gaim@robflynn.com>
parents: 146
diff changeset
1677
9d684979f507 [gaim-migrate @ 159]
Rob Flynn <gaim@robflynn.com>
parents: 146
diff changeset
1678 orig = gtk_entry_get_text(GTK_ENTRY(b->original));
9d684979f507 [gaim-migrate @ 159]
Rob Flynn <gaim@robflynn.com>
parents: 146
diff changeset
1679 new1 = gtk_entry_get_text(GTK_ENTRY(b->new1));
9d684979f507 [gaim-migrate @ 159]
Rob Flynn <gaim@robflynn.com>
parents: 146
diff changeset
1680 new2 = gtk_entry_get_text(GTK_ENTRY(b->new2));
9d684979f507 [gaim-migrate @ 159]
Rob Flynn <gaim@robflynn.com>
parents: 146
diff changeset
1681
9d684979f507 [gaim-migrate @ 159]
Rob Flynn <gaim@robflynn.com>
parents: 146
diff changeset
1682 if (strcasecmp(new1, new2)) {
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
1683 do_error_dialog(_("New Passwords Do Not Match"), _("Gaim - Change Password Error"));
149
9d684979f507 [gaim-migrate @ 159]
Rob Flynn <gaim@robflynn.com>
parents: 146
diff changeset
1684 return ;
9d684979f507 [gaim-migrate @ 159]
Rob Flynn <gaim@robflynn.com>
parents: 146
diff changeset
1685 }
9d684979f507 [gaim-migrate @ 159]
Rob Flynn <gaim@robflynn.com>
parents: 146
diff changeset
1686
9d684979f507 [gaim-migrate @ 159]
Rob Flynn <gaim@robflynn.com>
parents: 146
diff changeset
1687 if ((strlen(orig) < 1) || (strlen(new1) < 1) || (strlen(new2) < 1)) {
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
1688 do_error_dialog(_("Fill out all fields completely"), _("Gaim - Change Password Error"));
149
9d684979f507 [gaim-migrate @ 159]
Rob Flynn <gaim@robflynn.com>
parents: 146
diff changeset
1689 return;
9d684979f507 [gaim-migrate @ 159]
Rob Flynn <gaim@robflynn.com>
parents: 146
diff changeset
1690 }
9d684979f507 [gaim-migrate @ 159]
Rob Flynn <gaim@robflynn.com>
parents: 146
diff changeset
1691
237
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 236
diff changeset
1692 serv_change_passwd(orig, new1);
149
9d684979f507 [gaim-migrate @ 159]
Rob Flynn <gaim@robflynn.com>
parents: 146
diff changeset
1693
9d684979f507 [gaim-migrate @ 159]
Rob Flynn <gaim@robflynn.com>
parents: 146
diff changeset
1694 destroy_dialog(NULL, b->window);
9d684979f507 [gaim-migrate @ 159]
Rob Flynn <gaim@robflynn.com>
parents: 146
diff changeset
1695 g_free(b);
9d684979f507 [gaim-migrate @ 159]
Rob Flynn <gaim@robflynn.com>
parents: 146
diff changeset
1696 }
9d684979f507 [gaim-migrate @ 159]
Rob Flynn <gaim@robflynn.com>
parents: 146
diff changeset
1697
146
99248fb977c2 [gaim-migrate @ 156]
Rob Flynn <gaim@robflynn.com>
parents: 137
diff changeset
1698 void show_change_passwd()
99248fb977c2 [gaim-migrate @ 156]
Rob Flynn <gaim@robflynn.com>
parents: 137
diff changeset
1699 {
99248fb977c2 [gaim-migrate @ 156]
Rob Flynn <gaim@robflynn.com>
parents: 137
diff changeset
1700 GtkWidget *hbox;
99248fb977c2 [gaim-migrate @ 156]
Rob Flynn <gaim@robflynn.com>
parents: 137
diff changeset
1701 GtkWidget *label;
99248fb977c2 [gaim-migrate @ 156]
Rob Flynn <gaim@robflynn.com>
parents: 137
diff changeset
1702 GtkWidget *vbox;
475
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1703
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1704 GtkWidget *button_box;
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1705 GtkWidget *icon_i;
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1706 GdkBitmap *mask;
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1707 GdkPixmap *icon;
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1708
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1709 GtkWidget *fbox;
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1710 GtkWidget *frame;
454
c9d87901afff [gaim-migrate @ 464]
Rob Flynn <gaim@robflynn.com>
parents: 452
diff changeset
1711
146
99248fb977c2 [gaim-migrate @ 156]
Rob Flynn <gaim@robflynn.com>
parents: 137
diff changeset
1712 struct passwddlg *b = g_new0(struct passwddlg, 1);
99248fb977c2 [gaim-migrate @ 156]
Rob Flynn <gaim@robflynn.com>
parents: 137
diff changeset
1713
99248fb977c2 [gaim-migrate @ 156]
Rob Flynn <gaim@robflynn.com>
parents: 137
diff changeset
1714 b->window = gtk_window_new(GTK_WINDOW_DIALOG);
476
48346068df3b [gaim-migrate @ 486]
Rob Flynn <gaim@robflynn.com>
parents: 475
diff changeset
1715 gtk_widget_set_usize(b->window, 325, 195);
475
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1716 gtk_window_set_policy(GTK_WINDOW(b->window), FALSE, FALSE, TRUE);
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1717 gtk_widget_show(b->window);
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1718
146
99248fb977c2 [gaim-migrate @ 156]
Rob Flynn <gaim@robflynn.com>
parents: 137
diff changeset
1719 dialogwindows = g_list_prepend(dialogwindows, b->window);
149
9d684979f507 [gaim-migrate @ 159]
Rob Flynn <gaim@robflynn.com>
parents: 146
diff changeset
1720
475
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1721 frame = gtk_frame_new(_("Change Password"));
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1722 fbox = gtk_vbox_new(FALSE, 5);
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1723
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1724 /* Build OK Button */
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1725
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1726 b->ok = gtk_button_new();
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1727
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1728 button_box = gtk_hbox_new(FALSE, 5);
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1729 icon = gdk_pixmap_create_from_xpm_d ( b->window->window, &mask, NULL, ok_xpm);
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1730 icon_i = gtk_pixmap_new(icon, mask);
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1731
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1732 label = gtk_label_new(_("OK"));
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1733
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1734 gtk_box_pack_start(GTK_BOX(button_box), icon_i, FALSE, FALSE, 2);
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1735 gtk_box_pack_end(GTK_BOX(button_box), label, FALSE, FALSE, 2);
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1736
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1737 gtk_widget_show(label);
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1738 gtk_widget_show(icon_i);
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1739
535
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
1740 if (display_options & OPT_DISP_COOL_LOOK)
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
1741 gtk_button_set_relief(GTK_BUTTON(b->ok), GTK_RELIEF_NONE);
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
1742
475
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1743 gtk_widget_show(button_box);
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1744
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1745 gtk_container_add(GTK_CONTAINER(b->ok), button_box);
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1746
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1747 /* End of OK Button */
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1748
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1749 /* Build Cancel Button */
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1750
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1751 b->cancel = gtk_button_new();
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1752
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1753 button_box = gtk_hbox_new(FALSE, 5);
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1754 icon = gdk_pixmap_create_from_xpm_d ( b->window->window, &mask, NULL, cancel_xpm);
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1755 icon_i = gtk_pixmap_new(icon, mask);
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1756
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1757 label = gtk_label_new(_("Cancel"));
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1758
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1759 gtk_box_pack_start(GTK_BOX(button_box), icon_i, FALSE, FALSE, 2);
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1760 gtk_box_pack_end(GTK_BOX(button_box), label, FALSE, FALSE, 2);
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1761
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1762 gtk_widget_show(label);
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1763 gtk_widget_show(icon_i);
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1764
535
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
1765 if (display_options & OPT_DISP_COOL_LOOK)
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
1766 gtk_button_set_relief(GTK_BUTTON(b->cancel), GTK_RELIEF_NONE);
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
1767
475
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1768 gtk_widget_show(button_box);
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1769
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1770 gtk_container_add(GTK_CONTAINER(b->cancel), button_box);
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1771
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1772 /* End of Cancel Button */
149
9d684979f507 [gaim-migrate @ 159]
Rob Flynn <gaim@robflynn.com>
parents: 146
diff changeset
1773
483
1a9d2b345b79 [gaim-migrate @ 493]
Rob Flynn <gaim@robflynn.com>
parents: 480
diff changeset
1774 gtk_widget_set_usize(b->ok, 75, 30);
1a9d2b345b79 [gaim-migrate @ 493]
Rob Flynn <gaim@robflynn.com>
parents: 480
diff changeset
1775 gtk_widget_set_usize(b->cancel, 75, 30);
1a9d2b345b79 [gaim-migrate @ 493]
Rob Flynn <gaim@robflynn.com>
parents: 480
diff changeset
1776
149
9d684979f507 [gaim-migrate @ 159]
Rob Flynn <gaim@robflynn.com>
parents: 146
diff changeset
1777 gtk_widget_show(b->ok);
9d684979f507 [gaim-migrate @ 159]
Rob Flynn <gaim@robflynn.com>
parents: 146
diff changeset
1778 gtk_widget_show(b->cancel);
9d684979f507 [gaim-migrate @ 159]
Rob Flynn <gaim@robflynn.com>
parents: 146
diff changeset
1779
475
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1780 /* Create our vbox */
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1781 vbox = gtk_vbox_new(FALSE, 5);
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1782
149
9d684979f507 [gaim-migrate @ 159]
Rob Flynn <gaim@robflynn.com>
parents: 146
diff changeset
1783
475
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1784 /* First Line */
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1785 hbox = gtk_hbox_new(FALSE, 5);
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
1786 label = gtk_label_new(_("Original Password"));
146
99248fb977c2 [gaim-migrate @ 156]
Rob Flynn <gaim@robflynn.com>
parents: 137
diff changeset
1787 gtk_widget_show(label);
475
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1788
146
99248fb977c2 [gaim-migrate @ 156]
Rob Flynn <gaim@robflynn.com>
parents: 137
diff changeset
1789 b->original = gtk_entry_new();
160
aaa8f0a2140e [gaim-migrate @ 170]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 149
diff changeset
1790 gtk_entry_set_visibility(GTK_ENTRY(b->original), FALSE);
149
9d684979f507 [gaim-migrate @ 159]
Rob Flynn <gaim@robflynn.com>
parents: 146
diff changeset
1791 gtk_widget_show(b->original);
475
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1792
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1793 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 5);
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1794 gtk_box_pack_end(GTK_BOX(hbox), b->original, FALSE, FALSE, 5);
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1795
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1796 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 5);
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1797
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1798 gtk_widget_show(hbox);
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1799
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1800 /* Next Line */
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1801 hbox = gtk_hbox_new(FALSE, 5);
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
1802 label = gtk_label_new(_("New Password"));
149
9d684979f507 [gaim-migrate @ 159]
Rob Flynn <gaim@robflynn.com>
parents: 146
diff changeset
1803 gtk_widget_show(label);
9d684979f507 [gaim-migrate @ 159]
Rob Flynn <gaim@robflynn.com>
parents: 146
diff changeset
1804 b->new1 = gtk_entry_new();
160
aaa8f0a2140e [gaim-migrate @ 170]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 149
diff changeset
1805 gtk_entry_set_visibility(GTK_ENTRY(b->new1), FALSE);
149
9d684979f507 [gaim-migrate @ 159]
Rob Flynn <gaim@robflynn.com>
parents: 146
diff changeset
1806 gtk_widget_show(b->new1);
475
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1807
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1808 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 5);
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1809 gtk_box_pack_end(GTK_BOX(hbox), b->new1, FALSE, FALSE, 5);
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1810
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1811 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 5);
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1812 gtk_widget_show(hbox);
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1813
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1814 /* Next Line */
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1815 hbox = gtk_hbox_new(FALSE, 5);
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1816 label = gtk_label_new(_("New Password (again)"));
149
9d684979f507 [gaim-migrate @ 159]
Rob Flynn <gaim@robflynn.com>
parents: 146
diff changeset
1817 gtk_widget_show(label);
9d684979f507 [gaim-migrate @ 159]
Rob Flynn <gaim@robflynn.com>
parents: 146
diff changeset
1818 b->new2 = gtk_entry_new();
160
aaa8f0a2140e [gaim-migrate @ 170]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 149
diff changeset
1819 gtk_entry_set_visibility(GTK_ENTRY(b->new2), FALSE);
149
9d684979f507 [gaim-migrate @ 159]
Rob Flynn <gaim@robflynn.com>
parents: 146
diff changeset
1820 gtk_widget_show(b->new2);
475
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1821
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1822 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 5);
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1823 gtk_box_pack_end(GTK_BOX(hbox), b->new2, FALSE, FALSE, 5);
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1824
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1825 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 5);
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1826
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1827 gtk_widget_show(hbox);
149
9d684979f507 [gaim-migrate @ 159]
Rob Flynn <gaim@robflynn.com>
parents: 146
diff changeset
1828
475
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1829 /* Now do our row of buttons */
149
9d684979f507 [gaim-migrate @ 159]
Rob Flynn <gaim@robflynn.com>
parents: 146
diff changeset
1830 hbox = gtk_hbox_new(TRUE, TRUE);
9d684979f507 [gaim-migrate @ 159]
Rob Flynn <gaim@robflynn.com>
parents: 146
diff changeset
1831 gtk_box_pack_start(GTK_BOX(hbox), b->ok, FALSE, FALSE, 5);
9d684979f507 [gaim-migrate @ 159]
Rob Flynn <gaim@robflynn.com>
parents: 146
diff changeset
1832 gtk_box_pack_start(GTK_BOX(hbox), b->cancel, FALSE, FALSE, 5);
475
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1833
146
99248fb977c2 [gaim-migrate @ 156]
Rob Flynn <gaim@robflynn.com>
parents: 137
diff changeset
1834 gtk_widget_show(hbox);
475
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1835
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1836 /* Pack our entries into a frame */
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1837 gtk_container_add(GTK_CONTAINER(frame), vbox);
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1838
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1839 /* Add our frame to our frame box */
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1840 gtk_box_pack_start(GTK_BOX(fbox), frame, FALSE, FALSE, 5);
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1841
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1842 /* And add our row of buttons */
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1843 gtk_box_pack_start(GTK_BOX(fbox), hbox, FALSE, FALSE, 5);
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1844
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1845
146
99248fb977c2 [gaim-migrate @ 156]
Rob Flynn <gaim@robflynn.com>
parents: 137
diff changeset
1846 gtk_widget_show(vbox);
475
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1847 gtk_widget_show(frame);
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1848 gtk_widget_show(fbox);
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1849
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1850 gtk_container_add(GTK_CONTAINER(b->window), fbox);
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1851
f5772f2d83ee [gaim-migrate @ 485]
Rob Flynn <gaim@robflynn.com>
parents: 471
diff changeset
1852 gtk_container_border_width(GTK_CONTAINER(b->window), 5);
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
1853 gtk_window_set_title(GTK_WINDOW(b->window), _("Gaim - Password Change"));
149
9d684979f507 [gaim-migrate @ 159]
Rob Flynn <gaim@robflynn.com>
parents: 146
diff changeset
1854
9d684979f507 [gaim-migrate @ 159]
Rob Flynn <gaim@robflynn.com>
parents: 146
diff changeset
1855 gtk_signal_connect(GTK_OBJECT(b->window), "destroy",
9d684979f507 [gaim-migrate @ 159]
Rob Flynn <gaim@robflynn.com>
parents: 146
diff changeset
1856 GTK_SIGNAL_FUNC(destroy_dialog), b->window);
9d684979f507 [gaim-migrate @ 159]
Rob Flynn <gaim@robflynn.com>
parents: 146
diff changeset
1857 gtk_signal_connect(GTK_OBJECT(b->cancel), "clicked",
9d684979f507 [gaim-migrate @ 159]
Rob Flynn <gaim@robflynn.com>
parents: 146
diff changeset
1858 GTK_SIGNAL_FUNC(destroy_dialog), b->window);
9d684979f507 [gaim-migrate @ 159]
Rob Flynn <gaim@robflynn.com>
parents: 146
diff changeset
1859 gtk_signal_connect(GTK_OBJECT(b->ok), "clicked",
9d684979f507 [gaim-migrate @ 159]
Rob Flynn <gaim@robflynn.com>
parents: 146
diff changeset
1860 GTK_SIGNAL_FUNC(do_change_password), b);
9d684979f507 [gaim-migrate @ 159]
Rob Flynn <gaim@robflynn.com>
parents: 146
diff changeset
1861
9d684979f507 [gaim-migrate @ 159]
Rob Flynn <gaim@robflynn.com>
parents: 146
diff changeset
1862
146
99248fb977c2 [gaim-migrate @ 156]
Rob Flynn <gaim@robflynn.com>
parents: 137
diff changeset
1863 }
99248fb977c2 [gaim-migrate @ 156]
Rob Flynn <gaim@robflynn.com>
parents: 137
diff changeset
1864
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1865 void show_set_info()
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1866 {
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1867 GtkWidget *bot;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1868 GtkWidget *top;
454
c9d87901afff [gaim-migrate @ 464]
Rob Flynn <gaim@robflynn.com>
parents: 452
diff changeset
1869 GtkWidget *icon_i;
c9d87901afff [gaim-migrate @ 464]
Rob Flynn <gaim@robflynn.com>
parents: 452
diff changeset
1870 GdkBitmap *mask;
c9d87901afff [gaim-migrate @ 464]
Rob Flynn <gaim@robflynn.com>
parents: 452
diff changeset
1871 GdkPixmap *icon;
c9d87901afff [gaim-migrate @ 464]
Rob Flynn <gaim@robflynn.com>
parents: 452
diff changeset
1872 GtkWidget *button_box;
c9d87901afff [gaim-migrate @ 464]
Rob Flynn <gaim@robflynn.com>
parents: 452
diff changeset
1873 GtkWidget *label;
c9d87901afff [gaim-migrate @ 464]
Rob Flynn <gaim@robflynn.com>
parents: 452
diff changeset
1874
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1875 struct set_info_dlg *b = g_new0(struct set_info_dlg, 1);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1876
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1877 b->window = gtk_window_new(GTK_WINDOW_DIALOG);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1878 dialogwindows = g_list_prepend(dialogwindows, b->window);
454
c9d87901afff [gaim-migrate @ 464]
Rob Flynn <gaim@robflynn.com>
parents: 452
diff changeset
1879 gtk_widget_show(b->window);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1880
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1881 bot = gtk_hbox_new(TRUE, 10);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1882 top = gtk_vbox_new(FALSE, 10);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1883
454
c9d87901afff [gaim-migrate @ 464]
Rob Flynn <gaim@robflynn.com>
parents: 452
diff changeset
1884 /* Build OK Button */
c9d87901afff [gaim-migrate @ 464]
Rob Flynn <gaim@robflynn.com>
parents: 452
diff changeset
1885
c9d87901afff [gaim-migrate @ 464]
Rob Flynn <gaim@robflynn.com>
parents: 452
diff changeset
1886 b->save = gtk_button_new();
c9d87901afff [gaim-migrate @ 464]
Rob Flynn <gaim@robflynn.com>
parents: 452
diff changeset
1887
c9d87901afff [gaim-migrate @ 464]
Rob Flynn <gaim@robflynn.com>
parents: 452
diff changeset
1888 button_box = gtk_hbox_new(FALSE, 5);
c9d87901afff [gaim-migrate @ 464]
Rob Flynn <gaim@robflynn.com>
parents: 452
diff changeset
1889 icon = gdk_pixmap_create_from_xpm_d ( b->window->window, &mask, NULL, save_xpm);
c9d87901afff [gaim-migrate @ 464]
Rob Flynn <gaim@robflynn.com>
parents: 452
diff changeset
1890 icon_i = gtk_pixmap_new(icon, mask);
c9d87901afff [gaim-migrate @ 464]
Rob Flynn <gaim@robflynn.com>
parents: 452
diff changeset
1891
c9d87901afff [gaim-migrate @ 464]
Rob Flynn <gaim@robflynn.com>
parents: 452
diff changeset
1892 label = gtk_label_new(_("Save"));
c9d87901afff [gaim-migrate @ 464]
Rob Flynn <gaim@robflynn.com>
parents: 452
diff changeset
1893
c9d87901afff [gaim-migrate @ 464]
Rob Flynn <gaim@robflynn.com>
parents: 452
diff changeset
1894 gtk_box_pack_start(GTK_BOX(button_box), icon_i, FALSE, FALSE, 2);
c9d87901afff [gaim-migrate @ 464]
Rob Flynn <gaim@robflynn.com>
parents: 452
diff changeset
1895 gtk_box_pack_end(GTK_BOX(button_box), label, FALSE, FALSE, 2);
c9d87901afff [gaim-migrate @ 464]
Rob Flynn <gaim@robflynn.com>
parents: 452
diff changeset
1896
c9d87901afff [gaim-migrate @ 464]
Rob Flynn <gaim@robflynn.com>
parents: 452
diff changeset
1897 gtk_widget_show(label);
c9d87901afff [gaim-migrate @ 464]
Rob Flynn <gaim@robflynn.com>
parents: 452
diff changeset
1898 gtk_widget_show(icon_i);
c9d87901afff [gaim-migrate @ 464]
Rob Flynn <gaim@robflynn.com>
parents: 452
diff changeset
1899
535
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
1900 if (display_options & OPT_DISP_COOL_LOOK)
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
1901 gtk_button_set_relief(GTK_BUTTON(b->save), GTK_RELIEF_NONE);
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
1902
454
c9d87901afff [gaim-migrate @ 464]
Rob Flynn <gaim@robflynn.com>
parents: 452
diff changeset
1903 gtk_widget_show(button_box);
c9d87901afff [gaim-migrate @ 464]
Rob Flynn <gaim@robflynn.com>
parents: 452
diff changeset
1904
c9d87901afff [gaim-migrate @ 464]
Rob Flynn <gaim@robflynn.com>
parents: 452
diff changeset
1905 gtk_container_add(GTK_CONTAINER(b->save), button_box);
c9d87901afff [gaim-migrate @ 464]
Rob Flynn <gaim@robflynn.com>
parents: 452
diff changeset
1906
c9d87901afff [gaim-migrate @ 464]
Rob Flynn <gaim@robflynn.com>
parents: 452
diff changeset
1907 /* End of OK Button */
c9d87901afff [gaim-migrate @ 464]
Rob Flynn <gaim@robflynn.com>
parents: 452
diff changeset
1908
c9d87901afff [gaim-migrate @ 464]
Rob Flynn <gaim@robflynn.com>
parents: 452
diff changeset
1909 /* Build Cancel Button */
c9d87901afff [gaim-migrate @ 464]
Rob Flynn <gaim@robflynn.com>
parents: 452
diff changeset
1910
c9d87901afff [gaim-migrate @ 464]
Rob Flynn <gaim@robflynn.com>
parents: 452
diff changeset
1911 b->cancel = gtk_button_new();
c9d87901afff [gaim-migrate @ 464]
Rob Flynn <gaim@robflynn.com>
parents: 452
diff changeset
1912
c9d87901afff [gaim-migrate @ 464]
Rob Flynn <gaim@robflynn.com>
parents: 452
diff changeset
1913 button_box = gtk_hbox_new(FALSE, 5);
c9d87901afff [gaim-migrate @ 464]
Rob Flynn <gaim@robflynn.com>
parents: 452
diff changeset
1914 icon = gdk_pixmap_create_from_xpm_d ( b->window->window, &mask, NULL, cancel_xpm);
c9d87901afff [gaim-migrate @ 464]
Rob Flynn <gaim@robflynn.com>
parents: 452
diff changeset
1915 icon_i = gtk_pixmap_new(icon, mask);
c9d87901afff [gaim-migrate @ 464]
Rob Flynn <gaim@robflynn.com>
parents: 452
diff changeset
1916
c9d87901afff [gaim-migrate @ 464]
Rob Flynn <gaim@robflynn.com>
parents: 452
diff changeset
1917 label = gtk_label_new(_("Cancel"));
c9d87901afff [gaim-migrate @ 464]
Rob Flynn <gaim@robflynn.com>
parents: 452
diff changeset
1918
c9d87901afff [gaim-migrate @ 464]
Rob Flynn <gaim@robflynn.com>
parents: 452
diff changeset
1919 gtk_box_pack_start(GTK_BOX(button_box), icon_i, FALSE, FALSE, 2);
c9d87901afff [gaim-migrate @ 464]
Rob Flynn <gaim@robflynn.com>
parents: 452
diff changeset
1920 gtk_box_pack_end(GTK_BOX(button_box), label, FALSE, FALSE, 2);
c9d87901afff [gaim-migrate @ 464]
Rob Flynn <gaim@robflynn.com>
parents: 452
diff changeset
1921
c9d87901afff [gaim-migrate @ 464]
Rob Flynn <gaim@robflynn.com>
parents: 452
diff changeset
1922 gtk_widget_show(label);
c9d87901afff [gaim-migrate @ 464]
Rob Flynn <gaim@robflynn.com>
parents: 452
diff changeset
1923 gtk_widget_show(icon_i);
c9d87901afff [gaim-migrate @ 464]
Rob Flynn <gaim@robflynn.com>
parents: 452
diff changeset
1924
535
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
1925 if (display_options & OPT_DISP_COOL_LOOK)
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
1926 gtk_button_set_relief(GTK_BUTTON(b->cancel), GTK_RELIEF_NONE);
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
1927
454
c9d87901afff [gaim-migrate @ 464]
Rob Flynn <gaim@robflynn.com>
parents: 452
diff changeset
1928 gtk_widget_show(button_box);
c9d87901afff [gaim-migrate @ 464]
Rob Flynn <gaim@robflynn.com>
parents: 452
diff changeset
1929
c9d87901afff [gaim-migrate @ 464]
Rob Flynn <gaim@robflynn.com>
parents: 452
diff changeset
1930 gtk_container_add(GTK_CONTAINER(b->cancel), button_box);
c9d87901afff [gaim-migrate @ 464]
Rob Flynn <gaim@robflynn.com>
parents: 452
diff changeset
1931
c9d87901afff [gaim-migrate @ 464]
Rob Flynn <gaim@robflynn.com>
parents: 452
diff changeset
1932 /* End of Cancel Button */
c9d87901afff [gaim-migrate @ 464]
Rob Flynn <gaim@robflynn.com>
parents: 452
diff changeset
1933
483
1a9d2b345b79 [gaim-migrate @ 493]
Rob Flynn <gaim@robflynn.com>
parents: 480
diff changeset
1934 gtk_widget_set_usize(b->save, 75, 30);
1a9d2b345b79 [gaim-migrate @ 493]
Rob Flynn <gaim@robflynn.com>
parents: 480
diff changeset
1935 gtk_widget_set_usize(b->cancel, 75, 30);
454
c9d87901afff [gaim-migrate @ 464]
Rob Flynn <gaim@robflynn.com>
parents: 452
diff changeset
1936
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1937 gtk_widget_show(b->save);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1938 gtk_widget_show(b->cancel);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1939
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1940 gtk_box_pack_start(GTK_BOX(bot), b->save, FALSE, FALSE, 10);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1941 gtk_box_pack_start(GTK_BOX(bot), b->cancel, FALSE, FALSE, 10);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1942
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1943 gtk_signal_connect(GTK_OBJECT(b->window), "destroy",
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1944 GTK_SIGNAL_FUNC(destroy_dialog), b->window);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1945 gtk_signal_connect(GTK_OBJECT(b->cancel), "clicked",
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1946 GTK_SIGNAL_FUNC(destroy_dialog), b->window);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1947 gtk_signal_connect(GTK_OBJECT(b->save), "clicked",
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1948 GTK_SIGNAL_FUNC(do_save_info), b);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1949
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1950 gtk_widget_show(bot);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1951
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1952
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1953 b->text = gtk_text_new(NULL, NULL);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1954 gtk_text_set_word_wrap(GTK_TEXT(b->text), TRUE);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1955 gtk_text_set_editable(GTK_TEXT(b->text), TRUE);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1956 gtk_widget_set_usize(b->text, 350, 100);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1957 gtk_text_insert(GTK_TEXT(b->text), NULL, NULL, NULL, current_user->user_info, -1);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1958
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1959 gtk_widget_show(b->text);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1960
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1961 gtk_box_pack_start(GTK_BOX(top), b->text, TRUE, TRUE, 10);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1962 gtk_widget_show(top);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1963
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1964 gtk_box_pack_start(GTK_BOX(top), bot, FALSE, FALSE, 10);
454
c9d87901afff [gaim-migrate @ 464]
Rob Flynn <gaim@robflynn.com>
parents: 452
diff changeset
1965
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1966 gtk_container_add(GTK_CONTAINER(b->window), top);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1967 gtk_container_border_width(GTK_CONTAINER(b->window), 10);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1968 gtk_widget_realize(b->window);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1969 aol_icon(b->window->window);
454
c9d87901afff [gaim-migrate @ 464]
Rob Flynn <gaim@robflynn.com>
parents: 452
diff changeset
1970
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
1971 gtk_window_set_title(GTK_WINDOW(b->window), _("Gaim - Set User Info"));
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1972 gtk_widget_show(b->window);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1973
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1974 }
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1975
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1976 /*------------------------------------------------------------------------*/
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1977 /* The dialog for registration information */
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1978 /*------------------------------------------------------------------------*/
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1979
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1980 void do_register_dialog(GtkWidget *widget, struct registerdlg *b)
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1981 {
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1982 char *email = gtk_entry_get_text(GTK_ENTRY(b->email));
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1983 char *name = gtk_entry_get_text(GTK_ENTRY(b->name));
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1984 int uname = GTK_TOGGLE_BUTTON(b->uname)->active;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1985 int sname = GTK_TOGGLE_BUTTON(b->sname)->active;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1986 char *country = gtk_entry_get_text(GTK_ENTRY(b->country));
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1987
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1988 general_options |= OPT_GEN_REGISTERED;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1989 save_prefs();
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1990
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1991 destroy_dialog(NULL, b->window);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1992
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1993 g_free(b);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1994
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1995 g_sendemail(name, email, uname, sname, country);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1996 }
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1997
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1998 void set_reg_flag(GtkWidget *widget, struct registerdlg *b)
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
1999 {
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2000 general_options |= OPT_GEN_REGISTERED;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2001 save_prefs();
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2002 destroy_dialog(NULL, b->window);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2003 g_free(b);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2004 }
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2005
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2006 void show_register_dialog()
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2007 {
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2008 GtkWidget *ok;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2009 GtkWidget *cancel;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2010 GtkWidget *label;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2011 GtkWidget *table;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2012 GtkWidget *vbox;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2013 GtkWidget *bbox;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2014
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2015 struct registerdlg *b = g_new0(struct registerdlg, 1);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2016 b->window = gtk_window_new(GTK_WINDOW_DIALOG);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2017 dialogwindows = g_list_prepend(dialogwindows, b->window);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2018
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
2019 cancel = gtk_button_new_with_label(_("Cancel"));
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
2020 ok = gtk_button_new_with_label(_("Send"));
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2021
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2022 bbox = gtk_hbox_new(TRUE, 10);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2023 table = gtk_table_new(6, 2, TRUE);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2024 vbox = gtk_vbox_new(FALSE, 5);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2025
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2026 b->name = gtk_entry_new();
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2027 b->email = gtk_entry_new();
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2028 b->uname = gtk_check_button_new_with_label("Send the output of uname -a with registration");
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2029 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(b->uname), TRUE);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2030 b->sname = gtk_check_button_new_with_label("Send my screenname with registration");
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2031 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(b->sname), TRUE);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2032 gtk_box_pack_start(GTK_BOX(bbox), ok, TRUE, TRUE, 10);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2033 gtk_box_pack_start(GTK_BOX(bbox), cancel, TRUE, TRUE, 10);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2034
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2035 label = gtk_label_new("This list will not, in any way, be distributed and\nwill be used for internal census purposes only.\nAll fields are completely optional.");
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2036 gtk_widget_show(label);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2037 gtk_table_attach_defaults(GTK_TABLE(table), label, 0, 2, 0, 1);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2038
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2039 label = gtk_label_new("Name");
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2040 gtk_widget_show(label);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2041 gtk_table_attach_defaults(GTK_TABLE(table), label, 0, 1, 1, 2);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2042 gtk_table_attach_defaults(GTK_TABLE(table), b->name, 1, 2, 1, 2);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2043
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2044 label = gtk_label_new("Email");
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2045 gtk_widget_show(label);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2046 gtk_table_attach_defaults(GTK_TABLE(table), label, 0, 1, 2, 3);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2047 gtk_table_attach_defaults(GTK_TABLE(table), b->email, 1, 2, 2, 3);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2048
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2049 label = gtk_label_new("Country");
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2050 b->country = gtk_entry_new();
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2051 gtk_widget_show(label);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2052 gtk_table_attach_defaults(GTK_TABLE(table), label, 0, 1, 3, 4);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2053 gtk_table_attach_defaults(GTK_TABLE(table), b->country, 1, 2, 3, 4);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2054
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2055 gtk_table_attach_defaults(GTK_TABLE(table), b->sname, 0, 2, 4, 5);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2056 gtk_table_attach_defaults(GTK_TABLE(table), b->uname, 0, 2, 5, 6);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2057
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2058 gtk_box_pack_start(GTK_BOX(vbox), table, TRUE, TRUE, 5);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2059 gtk_box_pack_start(GTK_BOX(vbox), bbox, FALSE, FALSE, 5);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2060
535
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
2061 if (display_options & OPT_DISP_COOL_LOOK)
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
2062 {
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
2063 gtk_button_set_relief(GTK_BUTTON(ok), GTK_RELIEF_NONE);
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
2064 gtk_button_set_relief(GTK_BUTTON(cancel), GTK_RELIEF_NONE);
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
2065 }
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
2066
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2067 gtk_signal_connect(GTK_OBJECT(b->window), "destroy",
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2068 GTK_SIGNAL_FUNC(destroy_dialog), b->window);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2069 gtk_signal_connect(GTK_OBJECT(cancel), "clicked",
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2070 GTK_SIGNAL_FUNC(set_reg_flag), b);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2071 gtk_signal_connect(GTK_OBJECT(ok), "clicked",
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2072 GTK_SIGNAL_FUNC(do_register_dialog), b);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2073
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2074 gtk_widget_show(ok);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2075 gtk_widget_show(cancel);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2076 gtk_widget_show(b->name);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2077 gtk_widget_show(b->email);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2078 gtk_widget_show(b->uname);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2079 gtk_widget_show(b->sname);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2080 gtk_widget_show(b->country);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2081 gtk_widget_show(table);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2082 gtk_widget_show(bbox);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2083 gtk_widget_show(vbox);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2084 gtk_window_set_title(GTK_WINDOW(b->window), "Gaim - Registration");
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2085 gtk_window_set_focus(GTK_WINDOW(b->window), b->name);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2086 gtk_container_add(GTK_CONTAINER(b->window), vbox);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2087 gtk_container_border_width(GTK_CONTAINER(b->window), 10);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2088 gtk_widget_realize(b->window);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2089 aol_icon(b->window->window);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2090
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2091 gtk_widget_show(b->window);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2092 }
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2093
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2094
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2095 /*------------------------------------------------------------------------*/
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2096 /* The dialog for the info requests */
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2097 /*------------------------------------------------------------------------*/
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2098
247
f6e8ea29b24f [gaim-migrate @ 257]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 245
diff changeset
2099 void g_show_info_text(char *info)
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2100 {
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2101 GtkWidget *ok;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2102 GtkWidget *label;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2103 GtkWidget *text;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2104 GtkWidget *bbox;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2105 GtkWidget *sw;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2106
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2107 struct info_dlg *b = g_new0(struct info_dlg, 1);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2108
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2109 b->window = gtk_window_new(GTK_WINDOW_DIALOG);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2110 dialogwindows = g_list_prepend(dialogwindows, b->window);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2111 gtk_container_border_width(GTK_CONTAINER(b->window), 5);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2112 bbox = gtk_vbox_new(FALSE, 5);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2113 gtk_container_add(GTK_CONTAINER(b->window), bbox);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2114
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
2115 ok = gtk_button_new_with_label(_("OK"));
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2116 gtk_signal_connect(GTK_OBJECT(b->window), "destroy",
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2117 GTK_SIGNAL_FUNC(destroy_dialog), b->window);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2118 gtk_signal_connect(GTK_OBJECT(ok), "clicked",
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2119 GTK_SIGNAL_FUNC(destroy_dialog), b->window);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2120
535
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
2121 if (display_options & OPT_DISP_COOL_LOOK)
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
2122 gtk_button_set_relief(GTK_BUTTON(ok), GTK_RELIEF_NONE);
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
2123
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
2124 label = gtk_label_new(_("Below are the results of your search: "));
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2125
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2126 sw = gtk_scrolled_window_new (NULL, NULL);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2127 gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2128 GTK_POLICY_NEVER,
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2129 GTK_POLICY_ALWAYS);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2130 text = gtk_html_new(NULL, NULL);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2131 b->text = text;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2132 gtk_container_add(GTK_CONTAINER(sw), text);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2133
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2134 GTK_HTML (text)->hadj->step_increment = 10.0;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2135 GTK_HTML (text)->vadj->step_increment = 10.0;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2136 gtk_widget_set_usize(sw, 300, 250);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2137
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2138 gtk_box_pack_start(GTK_BOX(bbox), label, FALSE, FALSE, 0);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2139 gtk_box_pack_start(GTK_BOX(bbox), sw, TRUE, TRUE, 0);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2140 gtk_box_pack_start(GTK_BOX(bbox), ok, FALSE, FALSE, 0);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2141
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2142 gtk_widget_realize(b->window);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2143 aol_icon(b->window->window);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2144 gtk_widget_show_all(b->window);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2145
247
f6e8ea29b24f [gaim-migrate @ 257]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 245
diff changeset
2146 gtk_html_append_text(GTK_HTML(b->text), info, 0);
337
f5b199e20d12 [gaim-migrate @ 347]
Rob Flynn <gaim@robflynn.com>
parents: 334
diff changeset
2147
550
6bd2bbc1b6c8 [gaim-migrate @ 560]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 535
diff changeset
2148 gtk_adjustment_set_value(gtk_scrolled_window_get_vadjustment(GTK_SCROLLED_WINDOW(sw)), 0);
247
f6e8ea29b24f [gaim-migrate @ 257]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 245
diff changeset
2149 }
f6e8ea29b24f [gaim-migrate @ 257]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 245
diff changeset
2150
f6e8ea29b24f [gaim-migrate @ 257]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 245
diff changeset
2151 void g_show_info(char *url) {
f6e8ea29b24f [gaim-migrate @ 257]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 245
diff changeset
2152 char *url_text = grab_url(url);
f6e8ea29b24f [gaim-migrate @ 257]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 245
diff changeset
2153 g_show_info_text(url_text);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2154 g_free(url_text);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2155 }
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2156
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2157 /*------------------------------------------------------------------------*/
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2158 /* The dialog for adding to permit/deny */
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2159 /*------------------------------------------------------------------------*/
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2160
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2161
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2162 static void do_add_perm(GtkWidget *w, struct addperm *p)
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2163 {
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2164
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2165 char *who;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2166 char *name;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2167 int d = 0;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2168 GSList *buttons = p->buttons;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2169
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2170
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2171 who = gtk_entry_get_text(GTK_ENTRY(p->entry));
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2172
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2173 name = g_malloc(strlen(who) + 2);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2174 g_snprintf(name, strlen(who) + 2, "%s", who);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2175
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2176 while(buttons) {
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2177 if((int)gtk_object_get_user_data(GTK_OBJECT(buttons->data)) == 1) {
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2178 if (GTK_TOGGLE_BUTTON(buttons->data)->active)
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2179 d = 1;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2180 }
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2181 buttons = buttons->next;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2182 }
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2183
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2184 if (d) {
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2185 deny = g_list_append(deny, name);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2186 serv_add_deny(name);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2187 } else {
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2188 permit = g_list_append(permit, name);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2189 serv_add_permit(name);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2190 }
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2191
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2192
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2193
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2194 build_permit_tree();
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2195
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2196 serv_save_config();
300
b32c83750104 [gaim-migrate @ 310]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 296
diff changeset
2197 do_export(0, 0);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2198
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2199 destroy_dialog(NULL, p->window);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2200 }
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2201
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2202
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2203
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2204 void show_add_perm(char *who)
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2205 {
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2206 GtkWidget *cancel;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2207 GtkWidget *add;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2208 GtkWidget *label;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2209 GtkWidget *bbox;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2210 GtkWidget *vbox;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2211 GtkWidget *rbox;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2212 GtkWidget *topbox;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2213 GtkWidget *which;
486
1045f51bcae7 [gaim-migrate @ 496]
Rob Flynn <gaim@robflynn.com>
parents: 485
diff changeset
2214 GdkBitmap *mask;
1045f51bcae7 [gaim-migrate @ 496]
Rob Flynn <gaim@robflynn.com>
parents: 485
diff changeset
2215 GdkPixmap *icon;
1045f51bcae7 [gaim-migrate @ 496]
Rob Flynn <gaim@robflynn.com>
parents: 485
diff changeset
2216 GtkWidget *icon_i;
1045f51bcae7 [gaim-migrate @ 496]
Rob Flynn <gaim@robflynn.com>
parents: 485
diff changeset
2217 GtkWidget *button_box;
487
e1021544e257 [gaim-migrate @ 497]
Rob Flynn <gaim@robflynn.com>
parents: 486
diff changeset
2218 GtkWidget *frame;
e1021544e257 [gaim-migrate @ 497]
Rob Flynn <gaim@robflynn.com>
parents: 486
diff changeset
2219
486
1045f51bcae7 [gaim-migrate @ 496]
Rob Flynn <gaim@robflynn.com>
parents: 485
diff changeset
2220 struct addperm *p = g_new0(struct addperm, 1);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2221
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2222 p->window = gtk_window_new(GTK_WINDOW_DIALOG);
487
e1021544e257 [gaim-migrate @ 497]
Rob Flynn <gaim@robflynn.com>
parents: 486
diff changeset
2223 gtk_container_set_border_width(GTK_CONTAINER(p->window), 5);
e1021544e257 [gaim-migrate @ 497]
Rob Flynn <gaim@robflynn.com>
parents: 486
diff changeset
2224 gtk_widget_set_usize(p->window, 310, 130);
e1021544e257 [gaim-migrate @ 497]
Rob Flynn <gaim@robflynn.com>
parents: 486
diff changeset
2225 gtk_window_set_policy(GTK_WINDOW(p->window), FALSE, FALSE, TRUE);
486
1045f51bcae7 [gaim-migrate @ 496]
Rob Flynn <gaim@robflynn.com>
parents: 485
diff changeset
2226 gtk_widget_show(p->window);
487
e1021544e257 [gaim-migrate @ 497]
Rob Flynn <gaim@robflynn.com>
parents: 486
diff changeset
2227
486
1045f51bcae7 [gaim-migrate @ 496]
Rob Flynn <gaim@robflynn.com>
parents: 485
diff changeset
2228 dialogwindows = g_list_prepend(dialogwindows, p->window);
1045f51bcae7 [gaim-migrate @ 496]
Rob Flynn <gaim@robflynn.com>
parents: 485
diff changeset
2229
1045f51bcae7 [gaim-migrate @ 496]
Rob Flynn <gaim@robflynn.com>
parents: 485
diff changeset
2230 bbox = gtk_hbox_new(TRUE, 10);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2231 topbox = gtk_hbox_new(FALSE, 5);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2232 vbox = gtk_vbox_new(FALSE, 5);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2233 rbox = gtk_vbox_new(FALSE, 5);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2234 p->entry = gtk_entry_new();
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2235
487
e1021544e257 [gaim-migrate @ 497]
Rob Flynn <gaim@robflynn.com>
parents: 486
diff changeset
2236 frame = gtk_frame_new(_("Permit / Deny"));
e1021544e257 [gaim-migrate @ 497]
Rob Flynn <gaim@robflynn.com>
parents: 486
diff changeset
2237
486
1045f51bcae7 [gaim-migrate @ 496]
Rob Flynn <gaim@robflynn.com>
parents: 485
diff changeset
2238 /* Build Add Button */
1045f51bcae7 [gaim-migrate @ 496]
Rob Flynn <gaim@robflynn.com>
parents: 485
diff changeset
2239
1045f51bcae7 [gaim-migrate @ 496]
Rob Flynn <gaim@robflynn.com>
parents: 485
diff changeset
2240 add = gtk_button_new();
1045f51bcae7 [gaim-migrate @ 496]
Rob Flynn <gaim@robflynn.com>
parents: 485
diff changeset
2241
1045f51bcae7 [gaim-migrate @ 496]
Rob Flynn <gaim@robflynn.com>
parents: 485
diff changeset
2242 button_box = gtk_hbox_new(FALSE, 5);
1045f51bcae7 [gaim-migrate @ 496]
Rob Flynn <gaim@robflynn.com>
parents: 485
diff changeset
2243 icon = gdk_pixmap_create_from_xpm_d ( p->window->window, &mask, NULL, add_xpm);
1045f51bcae7 [gaim-migrate @ 496]
Rob Flynn <gaim@robflynn.com>
parents: 485
diff changeset
2244 icon_i = gtk_pixmap_new(icon, mask);
1045f51bcae7 [gaim-migrate @ 496]
Rob Flynn <gaim@robflynn.com>
parents: 485
diff changeset
2245
1045f51bcae7 [gaim-migrate @ 496]
Rob Flynn <gaim@robflynn.com>
parents: 485
diff changeset
2246 label = gtk_label_new(_("Add"));
1045f51bcae7 [gaim-migrate @ 496]
Rob Flynn <gaim@robflynn.com>
parents: 485
diff changeset
2247
1045f51bcae7 [gaim-migrate @ 496]
Rob Flynn <gaim@robflynn.com>
parents: 485
diff changeset
2248 gtk_box_pack_start(GTK_BOX(button_box), icon_i, FALSE, FALSE, 2);
1045f51bcae7 [gaim-migrate @ 496]
Rob Flynn <gaim@robflynn.com>
parents: 485
diff changeset
2249 gtk_box_pack_end(GTK_BOX(button_box), label, FALSE, FALSE, 2);
1045f51bcae7 [gaim-migrate @ 496]
Rob Flynn <gaim@robflynn.com>
parents: 485
diff changeset
2250
1045f51bcae7 [gaim-migrate @ 496]
Rob Flynn <gaim@robflynn.com>
parents: 485
diff changeset
2251 gtk_widget_show(label);
1045f51bcae7 [gaim-migrate @ 496]
Rob Flynn <gaim@robflynn.com>
parents: 485
diff changeset
2252 gtk_widget_show(icon_i);
1045f51bcae7 [gaim-migrate @ 496]
Rob Flynn <gaim@robflynn.com>
parents: 485
diff changeset
2253
535
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
2254 if (display_options & OPT_DISP_COOL_LOOK)
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
2255 gtk_button_set_relief(GTK_BUTTON(add), GTK_RELIEF_NONE);
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
2256
486
1045f51bcae7 [gaim-migrate @ 496]
Rob Flynn <gaim@robflynn.com>
parents: 485
diff changeset
2257 gtk_widget_show(button_box);
1045f51bcae7 [gaim-migrate @ 496]
Rob Flynn <gaim@robflynn.com>
parents: 485
diff changeset
2258
1045f51bcae7 [gaim-migrate @ 496]
Rob Flynn <gaim@robflynn.com>
parents: 485
diff changeset
2259 gtk_container_add(GTK_CONTAINER(add), button_box);
1045f51bcae7 [gaim-migrate @ 496]
Rob Flynn <gaim@robflynn.com>
parents: 485
diff changeset
2260
1045f51bcae7 [gaim-migrate @ 496]
Rob Flynn <gaim@robflynn.com>
parents: 485
diff changeset
2261 /* End of Add Button */
1045f51bcae7 [gaim-migrate @ 496]
Rob Flynn <gaim@robflynn.com>
parents: 485
diff changeset
2262
1045f51bcae7 [gaim-migrate @ 496]
Rob Flynn <gaim@robflynn.com>
parents: 485
diff changeset
2263 /* Build Cancel Button */
1045f51bcae7 [gaim-migrate @ 496]
Rob Flynn <gaim@robflynn.com>
parents: 485
diff changeset
2264
1045f51bcae7 [gaim-migrate @ 496]
Rob Flynn <gaim@robflynn.com>
parents: 485
diff changeset
2265 cancel = gtk_button_new();
1045f51bcae7 [gaim-migrate @ 496]
Rob Flynn <gaim@robflynn.com>
parents: 485
diff changeset
2266
1045f51bcae7 [gaim-migrate @ 496]
Rob Flynn <gaim@robflynn.com>
parents: 485
diff changeset
2267 button_box = gtk_hbox_new(FALSE, 5);
1045f51bcae7 [gaim-migrate @ 496]
Rob Flynn <gaim@robflynn.com>
parents: 485
diff changeset
2268 icon = gdk_pixmap_create_from_xpm_d ( p->window->window, &mask, NULL, cancel_xpm);
1045f51bcae7 [gaim-migrate @ 496]
Rob Flynn <gaim@robflynn.com>
parents: 485
diff changeset
2269
1045f51bcae7 [gaim-migrate @ 496]
Rob Flynn <gaim@robflynn.com>
parents: 485
diff changeset
2270 icon_i = gtk_pixmap_new(icon, mask);
1045f51bcae7 [gaim-migrate @ 496]
Rob Flynn <gaim@robflynn.com>
parents: 485
diff changeset
2271
1045f51bcae7 [gaim-migrate @ 496]
Rob Flynn <gaim@robflynn.com>
parents: 485
diff changeset
2272 label = gtk_label_new(_("Cancel"));
1045f51bcae7 [gaim-migrate @ 496]
Rob Flynn <gaim@robflynn.com>
parents: 485
diff changeset
2273
1045f51bcae7 [gaim-migrate @ 496]
Rob Flynn <gaim@robflynn.com>
parents: 485
diff changeset
2274 gtk_box_pack_start(GTK_BOX(button_box), icon_i, FALSE, FALSE, 2);
1045f51bcae7 [gaim-migrate @ 496]
Rob Flynn <gaim@robflynn.com>
parents: 485
diff changeset
2275 gtk_box_pack_end(GTK_BOX(button_box), label, FALSE, FALSE, 2);
1045f51bcae7 [gaim-migrate @ 496]
Rob Flynn <gaim@robflynn.com>
parents: 485
diff changeset
2276
1045f51bcae7 [gaim-migrate @ 496]
Rob Flynn <gaim@robflynn.com>
parents: 485
diff changeset
2277 gtk_widget_show(label);
1045f51bcae7 [gaim-migrate @ 496]
Rob Flynn <gaim@robflynn.com>
parents: 485
diff changeset
2278 gtk_widget_show(icon_i);
1045f51bcae7 [gaim-migrate @ 496]
Rob Flynn <gaim@robflynn.com>
parents: 485
diff changeset
2279
535
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
2280 if (display_options & OPT_DISP_COOL_LOOK)
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
2281 gtk_button_set_relief(GTK_BUTTON(cancel), GTK_RELIEF_NONE);
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
2282
486
1045f51bcae7 [gaim-migrate @ 496]
Rob Flynn <gaim@robflynn.com>
parents: 485
diff changeset
2283 gtk_widget_show(button_box);
1045f51bcae7 [gaim-migrate @ 496]
Rob Flynn <gaim@robflynn.com>
parents: 485
diff changeset
2284
1045f51bcae7 [gaim-migrate @ 496]
Rob Flynn <gaim@robflynn.com>
parents: 485
diff changeset
2285 gtk_container_add(GTK_CONTAINER(cancel), button_box);
1045f51bcae7 [gaim-migrate @ 496]
Rob Flynn <gaim@robflynn.com>
parents: 485
diff changeset
2286
1045f51bcae7 [gaim-migrate @ 496]
Rob Flynn <gaim@robflynn.com>
parents: 485
diff changeset
2287 /* End of Cancel Button */
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2288 if (who != NULL)
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2289 gtk_entry_set_text(GTK_ENTRY(p->entry), who);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2290
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
2291 which = gtk_radio_button_new_with_label(NULL, _("Deny"));
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2292 gtk_box_pack_start(GTK_BOX(rbox), which, FALSE, FALSE, 0);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2293 gtk_object_set_user_data(GTK_OBJECT(which), (int *)1);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2294 gtk_widget_show(which);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2295
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
2296 which = gtk_radio_button_new_with_label(gtk_radio_button_group(GTK_RADIO_BUTTON(which)), _("Permit"));
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2297 gtk_box_pack_start(GTK_BOX(rbox), which, FALSE, FALSE, 0);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2298 gtk_object_set_user_data(GTK_OBJECT(which), (int *)2);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2299 gtk_widget_show(which);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2300
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2301 /* Put the buttons in the box */
486
1045f51bcae7 [gaim-migrate @ 496]
Rob Flynn <gaim@robflynn.com>
parents: 485
diff changeset
2302
1045f51bcae7 [gaim-migrate @ 496]
Rob Flynn <gaim@robflynn.com>
parents: 485
diff changeset
2303 gtk_widget_set_usize(add, 75, 30);
1045f51bcae7 [gaim-migrate @ 496]
Rob Flynn <gaim@robflynn.com>
parents: 485
diff changeset
2304 gtk_widget_set_usize(cancel, 75, 30);
1045f51bcae7 [gaim-migrate @ 496]
Rob Flynn <gaim@robflynn.com>
parents: 485
diff changeset
2305
1045f51bcae7 [gaim-migrate @ 496]
Rob Flynn <gaim@robflynn.com>
parents: 485
diff changeset
2306 gtk_box_pack_start(GTK_BOX(bbox), add, FALSE, FALSE, 5);
1045f51bcae7 [gaim-migrate @ 496]
Rob Flynn <gaim@robflynn.com>
parents: 485
diff changeset
2307 gtk_box_pack_end(GTK_BOX(bbox), cancel, FALSE, FALSE, 5);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2308
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
2309 label = gtk_label_new(_("Add"));
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2310 gtk_widget_show(label);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2311 gtk_box_pack_start(GTK_BOX(topbox), label, FALSE, FALSE, 5);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2312 gtk_box_pack_start(GTK_BOX(topbox), p->entry, FALSE, FALSE, 5);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2313 gtk_box_pack_start(GTK_BOX(topbox), rbox, FALSE, FALSE, 5);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2314 /* And the boxes in the box */
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2315 gtk_box_pack_start(GTK_BOX(vbox), topbox, TRUE, TRUE, 5);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2316 gtk_box_pack_start(GTK_BOX(vbox), bbox, FALSE, FALSE, 5);
487
e1021544e257 [gaim-migrate @ 497]
Rob Flynn <gaim@robflynn.com>
parents: 486
diff changeset
2317 gtk_container_add(GTK_CONTAINER(frame), vbox);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2318
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2319
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2320 p->buttons = gtk_radio_button_group(GTK_RADIO_BUTTON(which));
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2321 /* Handle closes right */
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2322 gtk_signal_connect(GTK_OBJECT(p->window), "destroy",
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2323 GTK_SIGNAL_FUNC(destroy_dialog), p->window);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2324 gtk_signal_connect(GTK_OBJECT(cancel), "clicked",
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2325 GTK_SIGNAL_FUNC(destroy_dialog), p->window);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2326 gtk_signal_connect(GTK_OBJECT(add), "clicked",
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2327 GTK_SIGNAL_FUNC(do_add_perm), p);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2328 gtk_signal_connect(GTK_OBJECT(p->entry), "activate",
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2329 GTK_SIGNAL_FUNC(do_add_perm), p);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2330
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2331 /* Finish up */
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2332 gtk_widget_show(add);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2333 gtk_widget_show(cancel);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2334 gtk_widget_show(p->entry);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2335 gtk_widget_show(topbox);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2336 gtk_widget_show(bbox);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2337 gtk_widget_show(vbox);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2338 gtk_widget_show(rbox);
487
e1021544e257 [gaim-migrate @ 497]
Rob Flynn <gaim@robflynn.com>
parents: 486
diff changeset
2339 gtk_widget_show(frame);
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
2340 gtk_window_set_title(GTK_WINDOW(p->window), _("Gaim - Add Permit/Deny"));
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2341 gtk_window_set_focus(GTK_WINDOW(p->window), p->entry);
487
e1021544e257 [gaim-migrate @ 497]
Rob Flynn <gaim@robflynn.com>
parents: 486
diff changeset
2342 gtk_container_add(GTK_CONTAINER(p->window), frame);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2343 gtk_widget_realize(p->window);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2344 aol_icon(p->window->window);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2345
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2346 gtk_widget_show(p->window);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2347 }
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2348
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2349
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2350 /*------------------------------------------------------------------------*/
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2351 /* Function Called To Add A Log */
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2352 /*------------------------------------------------------------------------*/
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2353
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2354 void do_log(GtkWidget *w, char *name)
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2355 {
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2356 struct log_conversation *l;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2357 struct conversation *c;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2358 char buf[128];
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2359
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2360 c = find_conversation(name);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2361 if (!find_log_info(name)) {
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2362 l = (struct log_conversation *)g_new0(struct log_conversation, 1);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2363 strcpy(l->name, name);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2364 strcpy(l->filename, gtk_file_selection_get_filename(GTK_FILE_SELECTION(logdialog)));
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2365 log_conversations = g_list_append(log_conversations, l);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2366
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2367 if (c != NULL)
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2368 {
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2369 g_snprintf(buf, sizeof(buf), LOG_CONVERSATION_TITLE, c->name);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2370 gtk_window_set_title(GTK_WINDOW(c->window), buf);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2371 }
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2372 }
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2373
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2374 save_prefs();
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2375
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2376 destroy_dialog(NULL, logdialog);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2377 logdialog = NULL;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2378 }
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2379
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2380 static void cancel_log(GtkWidget *w, char *name)
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2381 {
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2382
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2383 struct conversation *c = gtk_object_get_user_data(GTK_OBJECT(logdialog));
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2384
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2385 if (c != NULL)
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2386 {
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2387 set_state_lock(1);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2388 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(c->log_button), FALSE);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2389 set_state_lock(0);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2390 }
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2391 destroy_dialog(NULL, logdialog);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2392 }
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2393
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2394 void show_log_dialog(char *bname)
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2395 {
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2396 char *buf = g_malloc(BUF_LEN);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2397 struct conversation *c = find_conversation(bname);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2398
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2399
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2400 if (!logdialog) {
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
2401 logdialog = gtk_file_selection_new(_("Gaim - Log Conversation"));
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2402
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2403 gtk_file_selection_hide_fileop_buttons(GTK_FILE_SELECTION(logdialog));
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2404
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2405 gtk_object_set_user_data(GTK_OBJECT(logdialog), c);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2406
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2407 g_snprintf(buf, BUF_LEN - 1, "%s/%s.log", getenv("HOME"), bname);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2408
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2409 gtk_file_selection_set_filename(GTK_FILE_SELECTION(logdialog), buf);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2410 gtk_signal_connect(GTK_OBJECT(logdialog), "delete_event", GTK_SIGNAL_FUNC(cancel_log), c);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2411 gtk_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(logdialog)->ok_button), "clicked", GTK_SIGNAL_FUNC(do_log), bname);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2412 gtk_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(logdialog)->cancel_button), "clicked", GTK_SIGNAL_FUNC(cancel_log), bname);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2413 }
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2414
25
c56db1b46b0d [gaim-migrate @ 34]
Rob Flynn <gaim@robflynn.com>
parents: 24
diff changeset
2415 g_free(buf);
c56db1b46b0d [gaim-migrate @ 34]
Rob Flynn <gaim@robflynn.com>
parents: 24
diff changeset
2416
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2417 gtk_widget_show(logdialog);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2418 gdk_window_raise(logdialog->window);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2419 }
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2420
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2421 /*------------------------------------------------------*/
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2422 /* Find Buddy By Email */
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2423 /*------------------------------------------------------*/
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2424
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2425 void do_find_info(GtkWidget *w, struct findbyinfo *b)
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2426 {
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2427 char *first;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2428 char *middle;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2429 char *last;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2430 char *maiden;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2431 char *city;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2432 char *state;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2433 char *country;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2434
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2435 first = gtk_entry_get_text(GTK_ENTRY(b->firstentry));
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2436 middle = gtk_entry_get_text(GTK_ENTRY(b->middleentry));
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2437 last = gtk_entry_get_text(GTK_ENTRY(b->lastentry));
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2438 maiden = gtk_entry_get_text(GTK_ENTRY(b->maidenentry));
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2439 city = gtk_entry_get_text(GTK_ENTRY(b->cityentry));
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2440 state = gtk_entry_get_text(GTK_ENTRY(b->stateentry));
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2441 country = gtk_entry_get_text(GTK_ENTRY(b->countryentry));
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2442
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2443 serv_dir_search(first, middle, last, maiden, city, state, country, "");
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2444 destroy_dialog(NULL, b->window);
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
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2447 void do_find_email(GtkWidget *w, struct findbyemail *b)
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2448 {
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2449 char *email;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2450
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2451 email = gtk_entry_get_text(GTK_ENTRY(b->emailentry));
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2452
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2453 serv_dir_search("","","","","","","", email);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2454
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2455 destroy_dialog(NULL, b->window);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2456 }
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2457
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2458 void show_find_info()
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2459 {
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2460 GtkWidget *cancel;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2461 GtkWidget *ok;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2462 GtkWidget *label;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2463 GtkWidget *bbox;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2464 GtkWidget *vbox;
479
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2465 GtkWidget *hbox;
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2466 GtkWidget *icon_i;
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2467 GdkBitmap *mask;
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2468 GdkPixmap *icon;
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2469 GtkWidget *button_box;
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2470 GtkWidget *fbox;
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2471 GtkWidget *frame;
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2472
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2473 struct findbyinfo *b = g_new0(struct findbyinfo, 1);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2474 b->window = gtk_window_new(GTK_WINDOW_DIALOG);
480
320c2f9c0315 [gaim-migrate @ 490]
Rob Flynn <gaim@robflynn.com>
parents: 479
diff changeset
2475 gtk_widget_set_usize(b->window, 350, 320);
479
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2476 gtk_window_set_policy(GTK_WINDOW(b->window), FALSE, FALSE, TRUE);
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2477 gtk_widget_show(b->window);
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2478
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2479 dialogwindows = g_list_prepend(dialogwindows, b->window);
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2480
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2481
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2482 frame = gtk_frame_new(_("Search for Buddy"));
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2483 fbox = gtk_vbox_new(FALSE, 5);
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2484
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2485 /* Build OK Button */
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2486
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2487 ok = gtk_button_new();
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2488
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2489 button_box = gtk_hbox_new(FALSE, 5);
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2490 icon = gdk_pixmap_create_from_xpm_d ( b->window->window, &mask, NULL, ok_xpm);
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2491 icon_i = gtk_pixmap_new(icon, mask);
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2492
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2493 label = gtk_label_new(_("OK"));
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2494
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2495 gtk_box_pack_start(GTK_BOX(button_box), icon_i, FALSE, FALSE, 2);
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2496 gtk_box_pack_end(GTK_BOX(button_box), label, FALSE, FALSE, 2);
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2497
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2498 gtk_widget_show(label);
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2499 gtk_widget_show(icon_i);
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2500
535
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
2501 if (display_options & OPT_DISP_COOL_LOOK)
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
2502 gtk_button_set_relief(GTK_BUTTON(ok), GTK_RELIEF_NONE);
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
2503
479
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2504 gtk_widget_show(button_box);
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2505
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2506 gtk_container_add(GTK_CONTAINER(ok), button_box);
483
1a9d2b345b79 [gaim-migrate @ 493]
Rob Flynn <gaim@robflynn.com>
parents: 480
diff changeset
2507 gtk_widget_set_usize(ok, 75, 30);
479
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2508
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2509 /* End of OK Button */
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2510
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2511 /* Build Cancel Button */
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2512
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2513 cancel = gtk_button_new();
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2514
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2515 button_box = gtk_hbox_new(FALSE, 5);
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2516 icon = gdk_pixmap_create_from_xpm_d ( b->window->window, &mask, NULL, cancel_xpm);
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2517 icon_i = gtk_pixmap_new(icon, mask);
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2518
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2519 label = gtk_label_new(_("Cancel"));
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2520
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2521 gtk_box_pack_start(GTK_BOX(button_box), icon_i, FALSE, FALSE, 2);
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2522 gtk_box_pack_end(GTK_BOX(button_box), label, FALSE, FALSE, 2);
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2523
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2524 gtk_widget_show(label);
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2525 gtk_widget_show(icon_i);
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2526
535
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
2527 if (display_options & OPT_DISP_COOL_LOOK)
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
2528 gtk_button_set_relief(GTK_BUTTON(cancel), GTK_RELIEF_NONE);
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
2529
479
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2530 gtk_widget_show(button_box);
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2531
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2532 gtk_container_add(GTK_CONTAINER(cancel), button_box);
483
1a9d2b345b79 [gaim-migrate @ 493]
Rob Flynn <gaim@robflynn.com>
parents: 480
diff changeset
2533 gtk_widget_set_usize(cancel, 75, 30);
479
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2534
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2535 /* End of Cancel Button */
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2536
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2537 bbox = gtk_hbox_new(TRUE, 10);
479
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2538 vbox = gtk_vbox_new(FALSE, 2);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2539
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2540 b->firstentry = gtk_entry_new();
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2541 b->middleentry = gtk_entry_new();
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2542 b->lastentry = gtk_entry_new();
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2543 b->maidenentry = gtk_entry_new();
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2544 b->cityentry = gtk_entry_new();
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2545 b->stateentry = gtk_entry_new();
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2546 b->countryentry = gtk_entry_new();
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2547
483
1a9d2b345b79 [gaim-migrate @ 493]
Rob Flynn <gaim@robflynn.com>
parents: 480
diff changeset
2548 gtk_widget_set_usize(ok, 75, 30);
1a9d2b345b79 [gaim-migrate @ 493]
Rob Flynn <gaim@robflynn.com>
parents: 480
diff changeset
2549 gtk_widget_set_usize(cancel, 75, 30);
1a9d2b345b79 [gaim-migrate @ 493]
Rob Flynn <gaim@robflynn.com>
parents: 480
diff changeset
2550 gtk_box_pack_end(GTK_BOX(bbox), ok, FALSE, FALSE, 10);
1a9d2b345b79 [gaim-migrate @ 493]
Rob Flynn <gaim@robflynn.com>
parents: 480
diff changeset
2551 gtk_box_pack_end(GTK_BOX(bbox), cancel, FALSE, FALSE, 10);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2552
479
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2553 /* Line 1 */
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
2554 label = gtk_label_new(_("First Name"));
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2555 gtk_widget_show(label);
479
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2556
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2557 hbox = gtk_hbox_new(FALSE, 2);
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2558 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 5);
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2559 gtk_box_pack_end(GTK_BOX(hbox), b->firstentry, FALSE, FALSE, 5);
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2560
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2561 gtk_widget_show(hbox);
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2562 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 5);
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2563
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2564 /* Line 2 */
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2565
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
2566 label = gtk_label_new(_("Middle Name"));
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2567 gtk_widget_show(label);
479
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2568
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2569 hbox = gtk_hbox_new(FALSE, 2);
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2570 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 5);
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2571 gtk_box_pack_end(GTK_BOX(hbox), b->middleentry, FALSE, FALSE, 5);
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2572
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2573 gtk_widget_show(hbox);
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2574 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 5);
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2575
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2576 /* Line 3 */
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2577
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2578 label = gtk_label_new(_("Last Name"));
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2579 gtk_widget_show(label);
479
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2580
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2581 hbox = gtk_hbox_new(FALSE, 2);
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2582 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 5);
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2583 gtk_box_pack_end(GTK_BOX(hbox), b->lastentry, FALSE, FALSE, 5);
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2584
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2585 gtk_widget_show(hbox);
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2586 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 5);
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2587
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2588 /* Line 4 */
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2589
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2590 label = gtk_label_new(_("Maiden Name"));
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2591 gtk_widget_show(label);
479
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2592
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2593 hbox = gtk_hbox_new(FALSE, 2);
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2594 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 5);
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2595 gtk_box_pack_end(GTK_BOX(hbox), b->maidenentry, FALSE, FALSE, 5);
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2596
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2597 gtk_widget_show(hbox);
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2598 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 5);
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2599
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2600 /* Line 5 */
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2601
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2602 label = gtk_label_new(_("City"));
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2603 gtk_widget_show(label);
479
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2604
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2605 hbox = gtk_hbox_new(FALSE, 2);
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2606 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 5);
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2607 gtk_box_pack_end(GTK_BOX(hbox), b->cityentry, FALSE, FALSE, 5);
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2608
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2609 gtk_widget_show(hbox);
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2610 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 5);
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2611
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2612 /* Line 6 */
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
2613 label = gtk_label_new(_("State"));
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2614 gtk_widget_show(label);
479
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2615
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2616 hbox = gtk_hbox_new(FALSE, 2);
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2617 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 5);
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2618 gtk_box_pack_end(GTK_BOX(hbox), b->stateentry, FALSE, FALSE, 5);
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2619
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2620 gtk_widget_show(hbox);
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2621 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 5);
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2622
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2623 /* Line 7 */
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
2624 label = gtk_label_new(_("Country"));
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2625 gtk_widget_show(label);
479
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2626
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2627 hbox = gtk_hbox_new(FALSE, 2);
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2628 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 5);
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2629 gtk_box_pack_end(GTK_BOX(hbox), b->countryentry, FALSE, FALSE, 5);
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2630
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2631 gtk_widget_show(hbox);
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2632 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 5);
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2633
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2634 /* Merge The Boxes */
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2635
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2636 gtk_container_add(GTK_CONTAINER(frame), vbox);
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2637 gtk_box_pack_start(GTK_BOX(fbox), frame, FALSE, FALSE, 5);
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2638 gtk_box_pack_start(GTK_BOX(fbox), bbox, FALSE, FALSE, 5);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2639
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2640 gtk_signal_connect(GTK_OBJECT(b->window), "destroy",
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2641 GTK_SIGNAL_FUNC(destroy_dialog), b->window);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2642 gtk_signal_connect(GTK_OBJECT(cancel), "clicked",
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2643 GTK_SIGNAL_FUNC(destroy_dialog), b->window);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2644 gtk_signal_connect(GTK_OBJECT(ok), "clicked",
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2645 GTK_SIGNAL_FUNC(do_find_info), b);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2646
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2647 gtk_widget_show(ok);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2648 gtk_widget_show(cancel);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2649 gtk_widget_show(b->firstentry);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2650 gtk_widget_show(b->middleentry);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2651 gtk_widget_show(b->lastentry);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2652 gtk_widget_show(b->maidenentry);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2653 gtk_widget_show(b->cityentry);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2654 gtk_widget_show(b->stateentry);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2655 gtk_widget_show(b->countryentry);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2656 gtk_widget_show(bbox);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2657 gtk_widget_show(vbox);
479
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2658 gtk_widget_show(frame);
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2659 gtk_widget_show(fbox);
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2660
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
2661 gtk_window_set_title(GTK_WINDOW(b->window), _("Gaim - Find Buddy By Info"));
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2662 gtk_window_set_focus(GTK_WINDOW(b->window), b->firstentry);
479
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2663 gtk_container_add(GTK_CONTAINER(b->window), fbox);
d4651fd334c1 [gaim-migrate @ 489]
Rob Flynn <gaim@robflynn.com>
parents: 478
diff changeset
2664 gtk_container_border_width(GTK_CONTAINER(b->window), 5);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2665 gtk_widget_realize(b->window);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2666 aol_icon(b->window->window);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2667
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2668 gtk_widget_show(b->window);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2669 }
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2670
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2671 void show_find_email()
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2672 {
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2673 GtkWidget *label;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2674 GtkWidget *bbox;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2675 GtkWidget *vbox;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2676 GtkWidget *topbox;
444
e7885c54ed2f [gaim-migrate @ 454]
Rob Flynn <gaim@robflynn.com>
parents: 443
diff changeset
2677 GtkWidget *frame;
e7885c54ed2f [gaim-migrate @ 454]
Rob Flynn <gaim@robflynn.com>
parents: 443
diff changeset
2678 GtkWidget *icon_i;
e7885c54ed2f [gaim-migrate @ 454]
Rob Flynn <gaim@robflynn.com>
parents: 443
diff changeset
2679 GdkPixmap *icon;
e7885c54ed2f [gaim-migrate @ 454]
Rob Flynn <gaim@robflynn.com>
parents: 443
diff changeset
2680 GdkBitmap *mask;
e7885c54ed2f [gaim-migrate @ 454]
Rob Flynn <gaim@robflynn.com>
parents: 443
diff changeset
2681 GtkWidget *button_box;
e7885c54ed2f [gaim-migrate @ 454]
Rob Flynn <gaim@robflynn.com>
parents: 443
diff changeset
2682 GtkWidget *button;
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2683
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2684 struct findbyemail *b = g_new0(struct findbyemail, 1);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2685 b->window = gtk_window_new(GTK_WINDOW_DIALOG);
477
73abe7a50119 [gaim-migrate @ 487]
Rob Flynn <gaim@robflynn.com>
parents: 476
diff changeset
2686 gtk_widget_set_usize(b->window, 240, 110);
478
62595dbc99aa [gaim-migrate @ 488]
Rob Flynn <gaim@robflynn.com>
parents: 477
diff changeset
2687 gtk_window_set_policy(GTK_WINDOW(b->window), FALSE, FALSE, TRUE);
444
e7885c54ed2f [gaim-migrate @ 454]
Rob Flynn <gaim@robflynn.com>
parents: 443
diff changeset
2688 gtk_widget_show(b->window);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2689 dialogwindows = g_list_prepend(dialogwindows, b->window);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2690
444
e7885c54ed2f [gaim-migrate @ 454]
Rob Flynn <gaim@robflynn.com>
parents: 443
diff changeset
2691 frame = gtk_frame_new(_("Search for Buddy"));
e7885c54ed2f [gaim-migrate @ 454]
Rob Flynn <gaim@robflynn.com>
parents: 443
diff changeset
2692
e7885c54ed2f [gaim-migrate @ 454]
Rob Flynn <gaim@robflynn.com>
parents: 443
diff changeset
2693 bbox = gtk_hbox_new(TRUE, 10);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2694 topbox = gtk_hbox_new(FALSE, 5);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2695 vbox = gtk_vbox_new(FALSE, 5);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2696
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2697 b->emailentry = gtk_entry_new();
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2698
444
e7885c54ed2f [gaim-migrate @ 454]
Rob Flynn <gaim@robflynn.com>
parents: 443
diff changeset
2699 /* Build OK Button */
e7885c54ed2f [gaim-migrate @ 454]
Rob Flynn <gaim@robflynn.com>
parents: 443
diff changeset
2700
e7885c54ed2f [gaim-migrate @ 454]
Rob Flynn <gaim@robflynn.com>
parents: 443
diff changeset
2701 button = gtk_button_new();
e7885c54ed2f [gaim-migrate @ 454]
Rob Flynn <gaim@robflynn.com>
parents: 443
diff changeset
2702
535
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
2703 if (display_options & OPT_DISP_COOL_LOOK)
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
2704 gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE);
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
2705
444
e7885c54ed2f [gaim-migrate @ 454]
Rob Flynn <gaim@robflynn.com>
parents: 443
diff changeset
2706 button_box = gtk_hbox_new(FALSE, 5);
e7885c54ed2f [gaim-migrate @ 454]
Rob Flynn <gaim@robflynn.com>
parents: 443
diff changeset
2707 icon = gdk_pixmap_create_from_xpm_d ( b->window->window, &mask, NULL, ok_xpm);
e7885c54ed2f [gaim-migrate @ 454]
Rob Flynn <gaim@robflynn.com>
parents: 443
diff changeset
2708 icon_i = gtk_pixmap_new(icon, mask);
e7885c54ed2f [gaim-migrate @ 454]
Rob Flynn <gaim@robflynn.com>
parents: 443
diff changeset
2709
e7885c54ed2f [gaim-migrate @ 454]
Rob Flynn <gaim@robflynn.com>
parents: 443
diff changeset
2710 label = gtk_label_new(_("OK"));
e7885c54ed2f [gaim-migrate @ 454]
Rob Flynn <gaim@robflynn.com>
parents: 443
diff changeset
2711
e7885c54ed2f [gaim-migrate @ 454]
Rob Flynn <gaim@robflynn.com>
parents: 443
diff changeset
2712 gtk_box_pack_start(GTK_BOX(button_box), icon_i, FALSE, FALSE, 2);
e7885c54ed2f [gaim-migrate @ 454]
Rob Flynn <gaim@robflynn.com>
parents: 443
diff changeset
2713 gtk_box_pack_end(GTK_BOX(button_box), label, FALSE, FALSE, 2);
e7885c54ed2f [gaim-migrate @ 454]
Rob Flynn <gaim@robflynn.com>
parents: 443
diff changeset
2714
e7885c54ed2f [gaim-migrate @ 454]
Rob Flynn <gaim@robflynn.com>
parents: 443
diff changeset
2715 gtk_widget_show(label);
e7885c54ed2f [gaim-migrate @ 454]
Rob Flynn <gaim@robflynn.com>
parents: 443
diff changeset
2716 gtk_widget_show(icon_i);
e7885c54ed2f [gaim-migrate @ 454]
Rob Flynn <gaim@robflynn.com>
parents: 443
diff changeset
2717
e7885c54ed2f [gaim-migrate @ 454]
Rob Flynn <gaim@robflynn.com>
parents: 443
diff changeset
2718 gtk_widget_show(button_box);
e7885c54ed2f [gaim-migrate @ 454]
Rob Flynn <gaim@robflynn.com>
parents: 443
diff changeset
2719
e7885c54ed2f [gaim-migrate @ 454]
Rob Flynn <gaim@robflynn.com>
parents: 443
diff changeset
2720 gtk_container_add(GTK_CONTAINER(button), button_box);
e7885c54ed2f [gaim-migrate @ 454]
Rob Flynn <gaim@robflynn.com>
parents: 443
diff changeset
2721
e7885c54ed2f [gaim-migrate @ 454]
Rob Flynn <gaim@robflynn.com>
parents: 443
diff changeset
2722 gtk_signal_connect(GTK_OBJECT(button), "clicked",
e7885c54ed2f [gaim-migrate @ 454]
Rob Flynn <gaim@robflynn.com>
parents: 443
diff changeset
2723 GTK_SIGNAL_FUNC(do_find_email), b);
e7885c54ed2f [gaim-migrate @ 454]
Rob Flynn <gaim@robflynn.com>
parents: 443
diff changeset
2724
e7885c54ed2f [gaim-migrate @ 454]
Rob Flynn <gaim@robflynn.com>
parents: 443
diff changeset
2725 gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 5);
e7885c54ed2f [gaim-migrate @ 454]
Rob Flynn <gaim@robflynn.com>
parents: 443
diff changeset
2726
483
1a9d2b345b79 [gaim-migrate @ 493]
Rob Flynn <gaim@robflynn.com>
parents: 480
diff changeset
2727 gtk_widget_set_usize(button, 75, 30);
444
e7885c54ed2f [gaim-migrate @ 454]
Rob Flynn <gaim@robflynn.com>
parents: 443
diff changeset
2728 gtk_widget_show(button);
e7885c54ed2f [gaim-migrate @ 454]
Rob Flynn <gaim@robflynn.com>
parents: 443
diff changeset
2729
e7885c54ed2f [gaim-migrate @ 454]
Rob Flynn <gaim@robflynn.com>
parents: 443
diff changeset
2730 /* End of OK Button */
e7885c54ed2f [gaim-migrate @ 454]
Rob Flynn <gaim@robflynn.com>
parents: 443
diff changeset
2731
e7885c54ed2f [gaim-migrate @ 454]
Rob Flynn <gaim@robflynn.com>
parents: 443
diff changeset
2732 /* Build Cancel Button */
e7885c54ed2f [gaim-migrate @ 454]
Rob Flynn <gaim@robflynn.com>
parents: 443
diff changeset
2733
e7885c54ed2f [gaim-migrate @ 454]
Rob Flynn <gaim@robflynn.com>
parents: 443
diff changeset
2734 button = gtk_button_new();
e7885c54ed2f [gaim-migrate @ 454]
Rob Flynn <gaim@robflynn.com>
parents: 443
diff changeset
2735
e7885c54ed2f [gaim-migrate @ 454]
Rob Flynn <gaim@robflynn.com>
parents: 443
diff changeset
2736 button_box = gtk_hbox_new(FALSE, 5);
e7885c54ed2f [gaim-migrate @ 454]
Rob Flynn <gaim@robflynn.com>
parents: 443
diff changeset
2737 icon = gdk_pixmap_create_from_xpm_d ( b->window->window, &mask, NULL, cancel_xpm);
e7885c54ed2f [gaim-migrate @ 454]
Rob Flynn <gaim@robflynn.com>
parents: 443
diff changeset
2738 icon_i = gtk_pixmap_new(icon, mask);
e7885c54ed2f [gaim-migrate @ 454]
Rob Flynn <gaim@robflynn.com>
parents: 443
diff changeset
2739
e7885c54ed2f [gaim-migrate @ 454]
Rob Flynn <gaim@robflynn.com>
parents: 443
diff changeset
2740 label = gtk_label_new(_("Cancel"));
e7885c54ed2f [gaim-migrate @ 454]
Rob Flynn <gaim@robflynn.com>
parents: 443
diff changeset
2741
e7885c54ed2f [gaim-migrate @ 454]
Rob Flynn <gaim@robflynn.com>
parents: 443
diff changeset
2742 gtk_box_pack_start(GTK_BOX(button_box), icon_i, FALSE, FALSE, 2);
e7885c54ed2f [gaim-migrate @ 454]
Rob Flynn <gaim@robflynn.com>
parents: 443
diff changeset
2743 gtk_box_pack_end(GTK_BOX(button_box), label, FALSE, FALSE, 2);
e7885c54ed2f [gaim-migrate @ 454]
Rob Flynn <gaim@robflynn.com>
parents: 443
diff changeset
2744
e7885c54ed2f [gaim-migrate @ 454]
Rob Flynn <gaim@robflynn.com>
parents: 443
diff changeset
2745 gtk_widget_show(label);
e7885c54ed2f [gaim-migrate @ 454]
Rob Flynn <gaim@robflynn.com>
parents: 443
diff changeset
2746 gtk_widget_show(icon_i);
e7885c54ed2f [gaim-migrate @ 454]
Rob Flynn <gaim@robflynn.com>
parents: 443
diff changeset
2747
e7885c54ed2f [gaim-migrate @ 454]
Rob Flynn <gaim@robflynn.com>
parents: 443
diff changeset
2748 gtk_widget_show(button_box);
e7885c54ed2f [gaim-migrate @ 454]
Rob Flynn <gaim@robflynn.com>
parents: 443
diff changeset
2749
e7885c54ed2f [gaim-migrate @ 454]
Rob Flynn <gaim@robflynn.com>
parents: 443
diff changeset
2750 gtk_container_add(GTK_CONTAINER(button), button_box);
e7885c54ed2f [gaim-migrate @ 454]
Rob Flynn <gaim@robflynn.com>
parents: 443
diff changeset
2751
e7885c54ed2f [gaim-migrate @ 454]
Rob Flynn <gaim@robflynn.com>
parents: 443
diff changeset
2752 gtk_signal_connect(GTK_OBJECT(button), "clicked",
e7885c54ed2f [gaim-migrate @ 454]
Rob Flynn <gaim@robflynn.com>
parents: 443
diff changeset
2753 GTK_SIGNAL_FUNC(destroy_dialog), b->window);
e7885c54ed2f [gaim-migrate @ 454]
Rob Flynn <gaim@robflynn.com>
parents: 443
diff changeset
2754
e7885c54ed2f [gaim-migrate @ 454]
Rob Flynn <gaim@robflynn.com>
parents: 443
diff changeset
2755 gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 5);
e7885c54ed2f [gaim-migrate @ 454]
Rob Flynn <gaim@robflynn.com>
parents: 443
diff changeset
2756
535
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
2757 if (display_options & OPT_DISP_COOL_LOOK)
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
2758 gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE);
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
2759
483
1a9d2b345b79 [gaim-migrate @ 493]
Rob Flynn <gaim@robflynn.com>
parents: 480
diff changeset
2760 gtk_widget_set_usize(button, 75, 30);
444
e7885c54ed2f [gaim-migrate @ 454]
Rob Flynn <gaim@robflynn.com>
parents: 443
diff changeset
2761 gtk_widget_show(button);
e7885c54ed2f [gaim-migrate @ 454]
Rob Flynn <gaim@robflynn.com>
parents: 443
diff changeset
2762
e7885c54ed2f [gaim-migrate @ 454]
Rob Flynn <gaim@robflynn.com>
parents: 443
diff changeset
2763 /* End of Cancel Button */
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2764
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
2765 label = gtk_label_new(_("Email"));
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2766 gtk_widget_show(label);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2767 gtk_box_pack_start(GTK_BOX(topbox), label, FALSE, FALSE, 5);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2768 gtk_box_pack_start(GTK_BOX(topbox), b->emailentry, FALSE, FALSE, 5);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2769
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2770 gtk_box_pack_start(GTK_BOX(vbox), topbox, TRUE, TRUE, 5);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2771 gtk_box_pack_start(GTK_BOX(vbox), bbox, FALSE, FALSE, 5);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2772
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2773 gtk_signal_connect(GTK_OBJECT(b->window), "destroy",
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2774 GTK_SIGNAL_FUNC(destroy_dialog), b->window);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2775 gtk_signal_connect(GTK_OBJECT(b->emailentry), "activate",
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2776 GTK_SIGNAL_FUNC(do_find_email), b);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2777
444
e7885c54ed2f [gaim-migrate @ 454]
Rob Flynn <gaim@robflynn.com>
parents: 443
diff changeset
2778 gtk_container_add(GTK_CONTAINER(frame), vbox);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2779 gtk_widget_show(b->emailentry);
444
e7885c54ed2f [gaim-migrate @ 454]
Rob Flynn <gaim@robflynn.com>
parents: 443
diff changeset
2780 gtk_widget_show(frame);
e7885c54ed2f [gaim-migrate @ 454]
Rob Flynn <gaim@robflynn.com>
parents: 443
diff changeset
2781 gtk_widget_show(topbox);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2782 gtk_widget_show(bbox);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2783 gtk_widget_show(vbox);
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
2784 gtk_window_set_title(GTK_WINDOW(b->window), _("Gaim - Find Buddy By Email"));
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2785 gtk_window_set_focus(GTK_WINDOW(b->window), b->emailentry);
444
e7885c54ed2f [gaim-migrate @ 454]
Rob Flynn <gaim@robflynn.com>
parents: 443
diff changeset
2786 gtk_container_add(GTK_CONTAINER(b->window), frame);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2787 gtk_container_border_width(GTK_CONTAINER(b->window), 10);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2788 gtk_widget_realize(b->window);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2789 aol_icon(b->window->window);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2790
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2791 gtk_widget_show(b->window);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2792 }
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2793
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2794 /*------------------------------------------------------*/
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2795 /* Link Dialog */
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2796 /*------------------------------------------------------*/
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2797
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2798 void cancel_link(GtkWidget *widget, struct linkdlg *b)
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2799 {
62
03b65653798b [gaim-migrate @ 72]
Rob Flynn <gaim@robflynn.com>
parents: 61
diff changeset
2800 if (b->toggle) {
03b65653798b [gaim-migrate @ 72]
Rob Flynn <gaim@robflynn.com>
parents: 61
diff changeset
2801 set_state_lock(1);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2802 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(b->toggle), FALSE);
62
03b65653798b [gaim-migrate @ 72]
Rob Flynn <gaim@robflynn.com>
parents: 61
diff changeset
2803 set_state_lock(0);
03b65653798b [gaim-migrate @ 72]
Rob Flynn <gaim@robflynn.com>
parents: 61
diff changeset
2804 }
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2805 destroy_dialog(NULL, b->window);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2806 }
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2807
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2808 void do_add_link(GtkWidget *widget, struct linkdlg *b)
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2809 {
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2810 char *open_tag;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2811 char *urltext, *showtext;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2812 open_tag = g_malloc(2048);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2813
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2814
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2815 urltext = gtk_entry_get_text(GTK_ENTRY(b->url));
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2816 showtext = gtk_entry_get_text(GTK_ENTRY(b->text));
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2817
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2818 g_snprintf(open_tag, 2048, "<A HREF=\"%s\">%s", urltext, showtext);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2819 surround(b->entry, open_tag, "</A>");
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2820
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2821 g_free(open_tag);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2822 destroy_dialog(NULL, b->window);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2823 }
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2824
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2825
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2826 void show_add_link(GtkWidget *entry, GtkWidget *link)
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2827 {
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2828 GtkWidget *vbox;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2829 GtkWidget *bbox;
588
e2cdcbfdc0b2 [gaim-migrate @ 598]
Rob Flynn <gaim@robflynn.com>
parents: 584
diff changeset
2830 GtkWidget *hbox;
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2831 GtkWidget *label;
588
e2cdcbfdc0b2 [gaim-migrate @ 598]
Rob Flynn <gaim@robflynn.com>
parents: 584
diff changeset
2832 GtkWidget *frame;
e2cdcbfdc0b2 [gaim-migrate @ 598]
Rob Flynn <gaim@robflynn.com>
parents: 584
diff changeset
2833 GtkWidget *fbox;
e2cdcbfdc0b2 [gaim-migrate @ 598]
Rob Flynn <gaim@robflynn.com>
parents: 584
diff changeset
2834 GtkWidget *icon_i;
e2cdcbfdc0b2 [gaim-migrate @ 598]
Rob Flynn <gaim@robflynn.com>
parents: 584
diff changeset
2835 GdkBitmap *mask;
e2cdcbfdc0b2 [gaim-migrate @ 598]
Rob Flynn <gaim@robflynn.com>
parents: 584
diff changeset
2836 GdkPixmap *icon;
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2837
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2838 if (!linkdialog) {
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2839 struct linkdlg *b = g_new0(struct linkdlg, 1);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2840 linkdialog = gtk_window_new(GTK_WINDOW_DIALOG);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2841 dialogwindows = g_list_prepend(dialogwindows, linkdialog);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2842
589
a0d68eab359a [gaim-migrate @ 599]
Rob Flynn <gaim@robflynn.com>
parents: 588
diff changeset
2843 gtk_widget_set_usize(linkdialog, 270, 165);
a0d68eab359a [gaim-migrate @ 599]
Rob Flynn <gaim@robflynn.com>
parents: 588
diff changeset
2844 gtk_window_set_policy(GTK_WINDOW(linkdialog), FALSE, FALSE, TRUE);
588
e2cdcbfdc0b2 [gaim-migrate @ 598]
Rob Flynn <gaim@robflynn.com>
parents: 584
diff changeset
2845 gtk_widget_show(linkdialog);
e2cdcbfdc0b2 [gaim-migrate @ 598]
Rob Flynn <gaim@robflynn.com>
parents: 584
diff changeset
2846
e2cdcbfdc0b2 [gaim-migrate @ 598]
Rob Flynn <gaim@robflynn.com>
parents: 584
diff changeset
2847 vbox = gtk_vbox_new(FALSE, 10);
e2cdcbfdc0b2 [gaim-migrate @ 598]
Rob Flynn <gaim@robflynn.com>
parents: 584
diff changeset
2848 bbox = gtk_hbox_new(TRUE, 10);
e2cdcbfdc0b2 [gaim-migrate @ 598]
Rob Flynn <gaim@robflynn.com>
parents: 584
diff changeset
2849 frame = gtk_frame_new(_("Insert Link"));
e2cdcbfdc0b2 [gaim-migrate @ 598]
Rob Flynn <gaim@robflynn.com>
parents: 584
diff changeset
2850 fbox = gtk_vbox_new(FALSE, 5);
e2cdcbfdc0b2 [gaim-migrate @ 598]
Rob Flynn <gaim@robflynn.com>
parents: 584
diff changeset
2851
e2cdcbfdc0b2 [gaim-migrate @ 598]
Rob Flynn <gaim@robflynn.com>
parents: 584
diff changeset
2852 /* Build OK Button */
e2cdcbfdc0b2 [gaim-migrate @ 598]
Rob Flynn <gaim@robflynn.com>
parents: 584
diff changeset
2853
e2cdcbfdc0b2 [gaim-migrate @ 598]
Rob Flynn <gaim@robflynn.com>
parents: 584
diff changeset
2854 b->ok = gtk_button_new();
e2cdcbfdc0b2 [gaim-migrate @ 598]
Rob Flynn <gaim@robflynn.com>
parents: 584
diff changeset
2855
e2cdcbfdc0b2 [gaim-migrate @ 598]
Rob Flynn <gaim@robflynn.com>
parents: 584
diff changeset
2856 hbox = gtk_hbox_new(FALSE, 5);
e2cdcbfdc0b2 [gaim-migrate @ 598]
Rob Flynn <gaim@robflynn.com>
parents: 584
diff changeset
2857 icon = gdk_pixmap_create_from_xpm_d ( linkdialog->window, &mask, NULL, ok_xpm);
e2cdcbfdc0b2 [gaim-migrate @ 598]
Rob Flynn <gaim@robflynn.com>
parents: 584
diff changeset
2858 icon_i = gtk_pixmap_new(icon, mask);
e2cdcbfdc0b2 [gaim-migrate @ 598]
Rob Flynn <gaim@robflynn.com>
parents: 584
diff changeset
2859
e2cdcbfdc0b2 [gaim-migrate @ 598]
Rob Flynn <gaim@robflynn.com>
parents: 584
diff changeset
2860 label = gtk_label_new(_("OK"));
e2cdcbfdc0b2 [gaim-migrate @ 598]
Rob Flynn <gaim@robflynn.com>
parents: 584
diff changeset
2861
e2cdcbfdc0b2 [gaim-migrate @ 598]
Rob Flynn <gaim@robflynn.com>
parents: 584
diff changeset
2862 gtk_box_pack_start(GTK_BOX(hbox), icon_i, FALSE, FALSE, 2);
e2cdcbfdc0b2 [gaim-migrate @ 598]
Rob Flynn <gaim@robflynn.com>
parents: 584
diff changeset
2863 gtk_box_pack_end(GTK_BOX(hbox), label, FALSE, FALSE, 2);
e2cdcbfdc0b2 [gaim-migrate @ 598]
Rob Flynn <gaim@robflynn.com>
parents: 584
diff changeset
2864
e2cdcbfdc0b2 [gaim-migrate @ 598]
Rob Flynn <gaim@robflynn.com>
parents: 584
diff changeset
2865 gtk_widget_show(label);
e2cdcbfdc0b2 [gaim-migrate @ 598]
Rob Flynn <gaim@robflynn.com>
parents: 584
diff changeset
2866 gtk_widget_show(icon_i);
e2cdcbfdc0b2 [gaim-migrate @ 598]
Rob Flynn <gaim@robflynn.com>
parents: 584
diff changeset
2867
e2cdcbfdc0b2 [gaim-migrate @ 598]
Rob Flynn <gaim@robflynn.com>
parents: 584
diff changeset
2868 gtk_widget_show(hbox);
e2cdcbfdc0b2 [gaim-migrate @ 598]
Rob Flynn <gaim@robflynn.com>
parents: 584
diff changeset
2869 gtk_container_add(GTK_CONTAINER(b->ok), hbox);
e2cdcbfdc0b2 [gaim-migrate @ 598]
Rob Flynn <gaim@robflynn.com>
parents: 584
diff changeset
2870 gtk_widget_set_usize(b->ok, 75, 30);
e2cdcbfdc0b2 [gaim-migrate @ 598]
Rob Flynn <gaim@robflynn.com>
parents: 584
diff changeset
2871 gtk_widget_show(b->ok);
e2cdcbfdc0b2 [gaim-migrate @ 598]
Rob Flynn <gaim@robflynn.com>
parents: 584
diff changeset
2872
e2cdcbfdc0b2 [gaim-migrate @ 598]
Rob Flynn <gaim@robflynn.com>
parents: 584
diff changeset
2873 /* End of OK Button */
e2cdcbfdc0b2 [gaim-migrate @ 598]
Rob Flynn <gaim@robflynn.com>
parents: 584
diff changeset
2874
e2cdcbfdc0b2 [gaim-migrate @ 598]
Rob Flynn <gaim@robflynn.com>
parents: 584
diff changeset
2875 /* Build Cancel Button */
e2cdcbfdc0b2 [gaim-migrate @ 598]
Rob Flynn <gaim@robflynn.com>
parents: 584
diff changeset
2876
e2cdcbfdc0b2 [gaim-migrate @ 598]
Rob Flynn <gaim@robflynn.com>
parents: 584
diff changeset
2877 b->cancel = gtk_button_new();
e2cdcbfdc0b2 [gaim-migrate @ 598]
Rob Flynn <gaim@robflynn.com>
parents: 584
diff changeset
2878
e2cdcbfdc0b2 [gaim-migrate @ 598]
Rob Flynn <gaim@robflynn.com>
parents: 584
diff changeset
2879 hbox = gtk_hbox_new(FALSE, 5);
e2cdcbfdc0b2 [gaim-migrate @ 598]
Rob Flynn <gaim@robflynn.com>
parents: 584
diff changeset
2880 icon = gdk_pixmap_create_from_xpm_d ( linkdialog->window, &mask, NULL, cancel_xpm);
e2cdcbfdc0b2 [gaim-migrate @ 598]
Rob Flynn <gaim@robflynn.com>
parents: 584
diff changeset
2881 icon_i = gtk_pixmap_new(icon, mask);
e2cdcbfdc0b2 [gaim-migrate @ 598]
Rob Flynn <gaim@robflynn.com>
parents: 584
diff changeset
2882
e2cdcbfdc0b2 [gaim-migrate @ 598]
Rob Flynn <gaim@robflynn.com>
parents: 584
diff changeset
2883 label = gtk_label_new(_("Cancel"));
e2cdcbfdc0b2 [gaim-migrate @ 598]
Rob Flynn <gaim@robflynn.com>
parents: 584
diff changeset
2884
e2cdcbfdc0b2 [gaim-migrate @ 598]
Rob Flynn <gaim@robflynn.com>
parents: 584
diff changeset
2885 gtk_box_pack_start(GTK_BOX(hbox), icon_i, FALSE, FALSE, 2);
e2cdcbfdc0b2 [gaim-migrate @ 598]
Rob Flynn <gaim@robflynn.com>
parents: 584
diff changeset
2886 gtk_box_pack_end(GTK_BOX(hbox), label, FALSE, FALSE, 2);
e2cdcbfdc0b2 [gaim-migrate @ 598]
Rob Flynn <gaim@robflynn.com>
parents: 584
diff changeset
2887
e2cdcbfdc0b2 [gaim-migrate @ 598]
Rob Flynn <gaim@robflynn.com>
parents: 584
diff changeset
2888 gtk_widget_show(label);
e2cdcbfdc0b2 [gaim-migrate @ 598]
Rob Flynn <gaim@robflynn.com>
parents: 584
diff changeset
2889 gtk_widget_show(icon_i);
e2cdcbfdc0b2 [gaim-migrate @ 598]
Rob Flynn <gaim@robflynn.com>
parents: 584
diff changeset
2890
e2cdcbfdc0b2 [gaim-migrate @ 598]
Rob Flynn <gaim@robflynn.com>
parents: 584
diff changeset
2891 gtk_widget_show(hbox);
e2cdcbfdc0b2 [gaim-migrate @ 598]
Rob Flynn <gaim@robflynn.com>
parents: 584
diff changeset
2892
e2cdcbfdc0b2 [gaim-migrate @ 598]
Rob Flynn <gaim@robflynn.com>
parents: 584
diff changeset
2893 gtk_container_add(GTK_CONTAINER(b->cancel), hbox);
e2cdcbfdc0b2 [gaim-migrate @ 598]
Rob Flynn <gaim@robflynn.com>
parents: 584
diff changeset
2894
e2cdcbfdc0b2 [gaim-migrate @ 598]
Rob Flynn <gaim@robflynn.com>
parents: 584
diff changeset
2895 gtk_widget_set_usize(b->cancel, 75, 30);
e2cdcbfdc0b2 [gaim-migrate @ 598]
Rob Flynn <gaim@robflynn.com>
parents: 584
diff changeset
2896 gtk_widget_show(b->cancel);
e2cdcbfdc0b2 [gaim-migrate @ 598]
Rob Flynn <gaim@robflynn.com>
parents: 584
diff changeset
2897
e2cdcbfdc0b2 [gaim-migrate @ 598]
Rob Flynn <gaim@robflynn.com>
parents: 584
diff changeset
2898 /* End of Cancel Button */
e2cdcbfdc0b2 [gaim-migrate @ 598]
Rob Flynn <gaim@robflynn.com>
parents: 584
diff changeset
2899
535
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
2900
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
2901 if (display_options & OPT_DISP_COOL_LOOK)
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
2902 {
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
2903 gtk_button_set_relief(GTK_BUTTON(b->cancel), GTK_RELIEF_NONE);
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
2904 gtk_button_set_relief(GTK_BUTTON(b->ok), GTK_RELIEF_NONE);
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
2905 }
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
2906
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2907 gtk_widget_show(b->ok);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2908 gtk_widget_show(b->cancel);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2909
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2910 gtk_box_pack_start(GTK_BOX(bbox), b->ok, FALSE, FALSE, 10);
588
e2cdcbfdc0b2 [gaim-migrate @ 598]
Rob Flynn <gaim@robflynn.com>
parents: 584
diff changeset
2911 gtk_box_pack_end(GTK_BOX(bbox), b->cancel, FALSE, FALSE, 10);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2912 gtk_widget_show(bbox);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2913
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2914 b->url = gtk_entry_new();
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2915 b->text = gtk_entry_new();
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2916
588
e2cdcbfdc0b2 [gaim-migrate @ 598]
Rob Flynn <gaim@robflynn.com>
parents: 584
diff changeset
2917 hbox = gtk_hbox_new(FALSE, 5);
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
2918 label = gtk_label_new(_("URL"));
588
e2cdcbfdc0b2 [gaim-migrate @ 598]
Rob Flynn <gaim@robflynn.com>
parents: 584
diff changeset
2919 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 5);
e2cdcbfdc0b2 [gaim-migrate @ 598]
Rob Flynn <gaim@robflynn.com>
parents: 584
diff changeset
2920 gtk_box_pack_end(GTK_BOX(hbox), b->url, FALSE, FALSE, 5);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2921 gtk_widget_show(label);
588
e2cdcbfdc0b2 [gaim-migrate @ 598]
Rob Flynn <gaim@robflynn.com>
parents: 584
diff changeset
2922 gtk_widget_show(hbox);
e2cdcbfdc0b2 [gaim-migrate @ 598]
Rob Flynn <gaim@robflynn.com>
parents: 584
diff changeset
2923 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 5);
e2cdcbfdc0b2 [gaim-migrate @ 598]
Rob Flynn <gaim@robflynn.com>
parents: 584
diff changeset
2924
e2cdcbfdc0b2 [gaim-migrate @ 598]
Rob Flynn <gaim@robflynn.com>
parents: 584
diff changeset
2925 hbox = gtk_hbox_new(FALSE, 5);
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
2926 label = gtk_label_new(_("Description"));
588
e2cdcbfdc0b2 [gaim-migrate @ 598]
Rob Flynn <gaim@robflynn.com>
parents: 584
diff changeset
2927 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 5);
e2cdcbfdc0b2 [gaim-migrate @ 598]
Rob Flynn <gaim@robflynn.com>
parents: 584
diff changeset
2928 gtk_box_pack_end(GTK_BOX(hbox), b->text, FALSE, FALSE, 5);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2929 gtk_widget_show(label);
588
e2cdcbfdc0b2 [gaim-migrate @ 598]
Rob Flynn <gaim@robflynn.com>
parents: 584
diff changeset
2930 gtk_widget_show(hbox);
e2cdcbfdc0b2 [gaim-migrate @ 598]
Rob Flynn <gaim@robflynn.com>
parents: 584
diff changeset
2931 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 5);
e2cdcbfdc0b2 [gaim-migrate @ 598]
Rob Flynn <gaim@robflynn.com>
parents: 584
diff changeset
2932
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2933 gtk_widget_show(b->url);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2934 gtk_widget_show(b->text);
588
e2cdcbfdc0b2 [gaim-migrate @ 598]
Rob Flynn <gaim@robflynn.com>
parents: 584
diff changeset
2935 gtk_widget_show(frame);
e2cdcbfdc0b2 [gaim-migrate @ 598]
Rob Flynn <gaim@robflynn.com>
parents: 584
diff changeset
2936 gtk_widget_show(fbox);
e2cdcbfdc0b2 [gaim-migrate @ 598]
Rob Flynn <gaim@robflynn.com>
parents: 584
diff changeset
2937
e2cdcbfdc0b2 [gaim-migrate @ 598]
Rob Flynn <gaim@robflynn.com>
parents: 584
diff changeset
2938 gtk_container_add(GTK_CONTAINER(frame), vbox);
e2cdcbfdc0b2 [gaim-migrate @ 598]
Rob Flynn <gaim@robflynn.com>
parents: 584
diff changeset
2939 gtk_box_pack_start(GTK_BOX(fbox), frame, FALSE, FALSE, 5);
e2cdcbfdc0b2 [gaim-migrate @ 598]
Rob Flynn <gaim@robflynn.com>
parents: 584
diff changeset
2940 gtk_box_pack_start(GTK_BOX(fbox), bbox, TRUE, TRUE, 5);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2941 gtk_widget_show(vbox);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2942
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2943 gtk_signal_connect(GTK_OBJECT(linkdialog), "destroy",
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2944 GTK_SIGNAL_FUNC(cancel_link), b);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2945 gtk_signal_connect(GTK_OBJECT(b->cancel), "clicked",
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2946 GTK_SIGNAL_FUNC(cancel_link), b);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2947 gtk_signal_connect(GTK_OBJECT(b->ok), "clicked",
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2948 GTK_SIGNAL_FUNC(do_add_link), b);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2949
588
e2cdcbfdc0b2 [gaim-migrate @ 598]
Rob Flynn <gaim@robflynn.com>
parents: 584
diff changeset
2950 gtk_container_add(GTK_CONTAINER(linkdialog ), fbox);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2951 gtk_container_border_width(GTK_CONTAINER(linkdialog ), 10);
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
2952 gtk_window_set_title(GTK_WINDOW(linkdialog ), _("GAIM - Add URL"));
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2953 gtk_window_set_focus(GTK_WINDOW(linkdialog ), b->url);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2954 b->window = linkdialog;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2955 b->toggle = link;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2956 b->entry = entry;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2957 gtk_widget_realize(linkdialog);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2958 aol_icon(linkdialog->window);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2959
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2960 }
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2961
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2962 gtk_widget_show(linkdialog);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2963 gdk_window_raise(linkdialog->window);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2964 }
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2965
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2966
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2967 /*------------------------------------------------------*/
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2968 /* Color Selection Dialog */
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2969 /*------------------------------------------------------*/
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2970
311
0a8b4edc4732 [gaim-migrate @ 321]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 308
diff changeset
2971 void cancel_color(GtkWidget *widget, struct conversation *c)
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2972 {
311
0a8b4edc4732 [gaim-migrate @ 321]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 308
diff changeset
2973 if (c->palette && widget)
0a8b4edc4732 [gaim-migrate @ 321]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 308
diff changeset
2974 {
0a8b4edc4732 [gaim-migrate @ 321]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 308
diff changeset
2975 set_state_lock(1);
0a8b4edc4732 [gaim-migrate @ 321]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 308
diff changeset
2976 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(c->palette), FALSE);
0a8b4edc4732 [gaim-migrate @ 321]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 308
diff changeset
2977 set_state_lock(0);
61
72e6a6eb1852 [gaim-migrate @ 71]
Rob Flynn <gaim@robflynn.com>
parents: 38
diff changeset
2978 }
311
0a8b4edc4732 [gaim-migrate @ 321]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 308
diff changeset
2979 dialogwindows = g_list_remove(dialogwindows, c->color_dialog);
0a8b4edc4732 [gaim-migrate @ 321]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 308
diff changeset
2980 gtk_widget_destroy(c->color_dialog);
0a8b4edc4732 [gaim-migrate @ 321]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 308
diff changeset
2981 c->color_dialog = NULL;
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2982 }
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2983
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2984 void do_color(GtkWidget *widget, GtkColorSelection *colorsel)
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2985 {
311
0a8b4edc4732 [gaim-migrate @ 321]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 308
diff changeset
2986 gdouble color[3];
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2987 GdkColor text_color;
311
0a8b4edc4732 [gaim-migrate @ 321]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 308
diff changeset
2988 struct conversation *c;
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2989 char *open_tag;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2990
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2991 open_tag = g_malloc(30);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2992
311
0a8b4edc4732 [gaim-migrate @ 321]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 308
diff changeset
2993 gtk_color_selection_get_color (colorsel, color);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
2994
311
0a8b4edc4732 [gaim-migrate @ 321]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 308
diff changeset
2995 c = gtk_object_get_user_data(GTK_OBJECT(colorsel));
411
a330017b3aa4 [gaim-migrate @ 421]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 401
diff changeset
2996 /* GTK_IS_EDITABLE(c->entry); huh? */
311
0a8b4edc4732 [gaim-migrate @ 321]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 308
diff changeset
2997
0a8b4edc4732 [gaim-migrate @ 321]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 308
diff changeset
2998 text_color.red = ((guint16)(color[0]*65535))>>8;
0a8b4edc4732 [gaim-migrate @ 321]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 308
diff changeset
2999 text_color.green = ((guint16)(color[1]*65535))>>8;
0a8b4edc4732 [gaim-migrate @ 321]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 308
diff changeset
3000 text_color.blue = ((guint16)(color[2]*65535))>>8;
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3001
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3002 g_snprintf(open_tag, 23, "<FONT COLOR=\"#%02X%02X%02X\">", text_color.red, text_color.green, text_color.blue);
311
0a8b4edc4732 [gaim-migrate @ 321]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 308
diff changeset
3003 surround(c->entry, open_tag, "</FONT>");
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3004 sprintf(debug_buff,"#%02X%02X%02X\n", text_color.red, text_color.green, text_color.blue);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3005 debug_print(debug_buff);
311
0a8b4edc4732 [gaim-migrate @ 321]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 308
diff changeset
3006 g_free(open_tag);
0a8b4edc4732 [gaim-migrate @ 321]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 308
diff changeset
3007 cancel_color(NULL, c);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3008 }
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3009
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3010
311
0a8b4edc4732 [gaim-migrate @ 321]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 308
diff changeset
3011 void show_color_dialog(struct conversation *c, GtkWidget *color)
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3012 {
311
0a8b4edc4732 [gaim-migrate @ 321]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 308
diff changeset
3013 GtkWidget *colorsel;
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3014
311
0a8b4edc4732 [gaim-migrate @ 321]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 308
diff changeset
3015 if (!c->color_dialog)
0a8b4edc4732 [gaim-migrate @ 321]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 308
diff changeset
3016 {
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
3017 c->color_dialog = gtk_color_selection_dialog_new(_("Select Text Color"));
311
0a8b4edc4732 [gaim-migrate @ 321]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 308
diff changeset
3018 colorsel = GTK_COLOR_SELECTION_DIALOG(c->color_dialog)->colorsel;
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3019
311
0a8b4edc4732 [gaim-migrate @ 321]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 308
diff changeset
3020 gtk_object_set_user_data(GTK_OBJECT(colorsel), c);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3021
311
0a8b4edc4732 [gaim-migrate @ 321]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 308
diff changeset
3022 gtk_signal_connect(GTK_OBJECT(c->color_dialog), "delete_event", GTK_SIGNAL_FUNC(delete_event_dialog), c);
0a8b4edc4732 [gaim-migrate @ 321]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 308
diff changeset
3023 gtk_signal_connect(GTK_OBJECT(GTK_COLOR_SELECTION_DIALOG(c->color_dialog)->ok_button), "clicked", GTK_SIGNAL_FUNC(do_color), colorsel);
0a8b4edc4732 [gaim-migrate @ 321]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 308
diff changeset
3024 gtk_signal_connect(GTK_OBJECT(GTK_COLOR_SELECTION_DIALOG(c->color_dialog)->cancel_button), "clicked", GTK_SIGNAL_FUNC(cancel_color), c);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3025
311
0a8b4edc4732 [gaim-migrate @ 321]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 308
diff changeset
3026 gtk_widget_realize(c->color_dialog);
0a8b4edc4732 [gaim-migrate @ 321]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 308
diff changeset
3027 aol_icon(c->color_dialog->window);
0a8b4edc4732 [gaim-migrate @ 321]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 308
diff changeset
3028 }
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3029
311
0a8b4edc4732 [gaim-migrate @ 321]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 308
diff changeset
3030 gtk_widget_show(c->color_dialog);
0a8b4edc4732 [gaim-migrate @ 321]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 308
diff changeset
3031 gdk_window_raise(c->color_dialog->window);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3032 }
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3033
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3034 /*------------------------------------------------------------------------*/
230
83dd297aa363 [gaim-migrate @ 240]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 229
diff changeset
3035 /* Font Selection Dialog */
83dd297aa363 [gaim-migrate @ 240]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 229
diff changeset
3036 /*------------------------------------------------------------------------*/
83dd297aa363 [gaim-migrate @ 240]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 229
diff changeset
3037
311
0a8b4edc4732 [gaim-migrate @ 321]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 308
diff changeset
3038 void cancel_font(GtkWidget *widget, struct conversation *c)
234
985635758c33 [gaim-migrate @ 244]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 231
diff changeset
3039 {
311
0a8b4edc4732 [gaim-migrate @ 321]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 308
diff changeset
3040 if (c->font && widget)
0a8b4edc4732 [gaim-migrate @ 321]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 308
diff changeset
3041 {
0a8b4edc4732 [gaim-migrate @ 321]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 308
diff changeset
3042 set_state_lock(1);
0a8b4edc4732 [gaim-migrate @ 321]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 308
diff changeset
3043 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(c->font), FALSE);
0a8b4edc4732 [gaim-migrate @ 321]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 308
diff changeset
3044 set_state_lock(0);
0a8b4edc4732 [gaim-migrate @ 321]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 308
diff changeset
3045 }
0a8b4edc4732 [gaim-migrate @ 321]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 308
diff changeset
3046 dialogwindows = g_list_remove(dialogwindows, c->font_dialog);
0a8b4edc4732 [gaim-migrate @ 321]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 308
diff changeset
3047 gtk_widget_destroy(c->font_dialog);
0a8b4edc4732 [gaim-migrate @ 321]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 308
diff changeset
3048 c->font_dialog = NULL;
230
83dd297aa363 [gaim-migrate @ 240]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 229
diff changeset
3049 }
83dd297aa363 [gaim-migrate @ 240]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 229
diff changeset
3050
83dd297aa363 [gaim-migrate @ 240]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 229
diff changeset
3051 void apply_font(GtkWidget *widget, GtkFontSelection *fontsel)
83dd297aa363 [gaim-migrate @ 240]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 229
diff changeset
3052 {
83dd297aa363 [gaim-migrate @ 240]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 229
diff changeset
3053 /* this could be expanded to include font size, weight, etc.
83dd297aa363 [gaim-migrate @ 240]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 229
diff changeset
3054 but for now only works with font face */
83dd297aa363 [gaim-migrate @ 240]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 229
diff changeset
3055 int i, j = 0, k = 0;
234
985635758c33 [gaim-migrate @ 244]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 231
diff changeset
3056 struct conversation *c = gtk_object_get_user_data(GTK_OBJECT(fontsel));
230
83dd297aa363 [gaim-migrate @ 240]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 229
diff changeset
3057
234
985635758c33 [gaim-migrate @ 244]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 231
diff changeset
3058 if (c)
230
83dd297aa363 [gaim-migrate @ 240]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 229
diff changeset
3059 {
334
0fa651368776 [gaim-migrate @ 344]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 311
diff changeset
3060 char *tmp = gtk_font_selection_dialog_get_font_name(GTK_FONT_SELECTION_DIALOG(fontsel));
308
e5fa88351dc8 [gaim-migrate @ 318]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 300
diff changeset
3061 strncpy(c->current_fontname, tmp, sizeof(c->current_fontname));
234
985635758c33 [gaim-migrate @ 244]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 231
diff changeset
3062
985635758c33 [gaim-migrate @ 244]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 231
diff changeset
3063 for (i = 0; i < strlen(c->current_fontname); i++)
230
83dd297aa363 [gaim-migrate @ 240]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 229
diff changeset
3064 {
234
985635758c33 [gaim-migrate @ 244]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 231
diff changeset
3065 if (c->current_fontname[i] == '-')
985635758c33 [gaim-migrate @ 244]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 231
diff changeset
3066 {
985635758c33 [gaim-migrate @ 244]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 231
diff changeset
3067 if (++j > 2)
985635758c33 [gaim-migrate @ 244]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 231
diff changeset
3068 break;
985635758c33 [gaim-migrate @ 244]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 231
diff changeset
3069 }
985635758c33 [gaim-migrate @ 244]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 231
diff changeset
3070 else if (j == 2)
985635758c33 [gaim-migrate @ 244]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 231
diff changeset
3071 c->current_fontface[k++] = c->current_fontname[i];
985635758c33 [gaim-migrate @ 244]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 231
diff changeset
3072 }
985635758c33 [gaim-migrate @ 244]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 231
diff changeset
3073 c->current_fontface[k] = '\0';
985635758c33 [gaim-migrate @ 244]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 231
diff changeset
3074
488
0fcb7e7a263c [gaim-migrate @ 498]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 487
diff changeset
3075 sprintf(debug_buff, "Setting font face %s\n", c->current_fontface);
0fcb7e7a263c [gaim-migrate @ 498]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 487
diff changeset
3076 debug_print(debug_buff);
0fcb7e7a263c [gaim-migrate @ 498]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 487
diff changeset
3077
234
985635758c33 [gaim-migrate @ 244]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 231
diff changeset
3078 set_font_face(NULL, c);
230
83dd297aa363 [gaim-migrate @ 240]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 229
diff changeset
3079 }
234
985635758c33 [gaim-migrate @ 244]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 231
diff changeset
3080 else
985635758c33 [gaim-migrate @ 244]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 231
diff changeset
3081 {
985635758c33 [gaim-migrate @ 244]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 231
diff changeset
3082 if (fontface)
985635758c33 [gaim-migrate @ 244]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 231
diff changeset
3083 g_free(fontface);
985635758c33 [gaim-migrate @ 244]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 231
diff changeset
3084
985635758c33 [gaim-migrate @ 244]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 231
diff changeset
3085 fontface = g_malloc(64);
334
0fa651368776 [gaim-migrate @ 344]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 311
diff changeset
3086 fontname = gtk_font_selection_dialog_get_font_name(GTK_FONT_SELECTION_DIALOG(fontsel));
230
83dd297aa363 [gaim-migrate @ 240]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 229
diff changeset
3087
234
985635758c33 [gaim-migrate @ 244]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 231
diff changeset
3088 for (i = 0; i < strlen(fontname); i++)
985635758c33 [gaim-migrate @ 244]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 231
diff changeset
3089 {
985635758c33 [gaim-migrate @ 244]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 231
diff changeset
3090 if (fontname[i] == '-')
985635758c33 [gaim-migrate @ 244]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 231
diff changeset
3091 {
985635758c33 [gaim-migrate @ 244]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 231
diff changeset
3092 if (++j > 2)
985635758c33 [gaim-migrate @ 244]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 231
diff changeset
3093 break;
985635758c33 [gaim-migrate @ 244]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 231
diff changeset
3094 }
985635758c33 [gaim-migrate @ 244]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 231
diff changeset
3095 else if (j == 2)
985635758c33 [gaim-migrate @ 244]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 231
diff changeset
3096 fontface[k++] = fontname[i];
985635758c33 [gaim-migrate @ 244]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 231
diff changeset
3097 }
985635758c33 [gaim-migrate @ 244]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 231
diff changeset
3098 fontface[k] = '\0';
985635758c33 [gaim-migrate @ 244]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 231
diff changeset
3099 }
985635758c33 [gaim-migrate @ 244]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 231
diff changeset
3100
311
0a8b4edc4732 [gaim-migrate @ 321]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 308
diff changeset
3101 cancel_font(NULL, c);
230
83dd297aa363 [gaim-migrate @ 240]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 229
diff changeset
3102 }
83dd297aa363 [gaim-migrate @ 240]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 229
diff changeset
3103
334
0fa651368776 [gaim-migrate @ 344]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 311
diff changeset
3104 static GtkWidget *fontseld;
0fa651368776 [gaim-migrate @ 344]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 311
diff changeset
3105
0fa651368776 [gaim-migrate @ 344]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 311
diff changeset
3106 void destroy_fontsel(GtkWidget *w, gpointer d) {
0fa651368776 [gaim-migrate @ 344]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 311
diff changeset
3107 gtk_widget_destroy(fontseld);
0fa651368776 [gaim-migrate @ 344]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 311
diff changeset
3108 fontseld = NULL;
0fa651368776 [gaim-migrate @ 344]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 311
diff changeset
3109 }
0fa651368776 [gaim-migrate @ 344]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 311
diff changeset
3110
0fa651368776 [gaim-migrate @ 344]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 311
diff changeset
3111 void apply_font_dlg(GtkWidget *w, GtkWidget *f) {
0fa651368776 [gaim-migrate @ 344]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 311
diff changeset
3112 int i, j = 0, k = 0;
0fa651368776 [gaim-migrate @ 344]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 311
diff changeset
3113 if (fontface)
0fa651368776 [gaim-migrate @ 344]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 311
diff changeset
3114 g_free(fontface);
0fa651368776 [gaim-migrate @ 344]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 311
diff changeset
3115
0fa651368776 [gaim-migrate @ 344]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 311
diff changeset
3116 fontface = g_malloc(64);
0fa651368776 [gaim-migrate @ 344]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 311
diff changeset
3117 fontname = gtk_font_selection_dialog_get_font_name(GTK_FONT_SELECTION_DIALOG(fontseld));
0fa651368776 [gaim-migrate @ 344]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 311
diff changeset
3118 destroy_fontsel(0, 0);
0fa651368776 [gaim-migrate @ 344]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 311
diff changeset
3119 for (i = 0; i < strlen(fontname); i++) {
0fa651368776 [gaim-migrate @ 344]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 311
diff changeset
3120 if (fontname[i] == '-') {
0fa651368776 [gaim-migrate @ 344]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 311
diff changeset
3121 if (++j > 2) break;
0fa651368776 [gaim-migrate @ 344]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 311
diff changeset
3122 } else if (j == 2)
0fa651368776 [gaim-migrate @ 344]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 311
diff changeset
3123 fontface[k++] = fontname[i];
0fa651368776 [gaim-migrate @ 344]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 311
diff changeset
3124 }
0fa651368776 [gaim-migrate @ 344]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 311
diff changeset
3125 fontface[k] = '\0';
0fa651368776 [gaim-migrate @ 344]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 311
diff changeset
3126 }
0fa651368776 [gaim-migrate @ 344]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 311
diff changeset
3127
311
0a8b4edc4732 [gaim-migrate @ 321]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 308
diff changeset
3128 void show_font_dialog(struct conversation *c, GtkWidget *font)
230
83dd297aa363 [gaim-migrate @ 240]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 229
diff changeset
3129 {
334
0fa651368776 [gaim-migrate @ 344]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 311
diff changeset
3130
0fa651368776 [gaim-migrate @ 344]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 311
diff changeset
3131 if (!font) { /* we came from the prefs dialog */
0fa651368776 [gaim-migrate @ 344]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 311
diff changeset
3132 if (fontseld) return;
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
3133 fontseld = gtk_font_selection_dialog_new(_("Select Font"));
334
0fa651368776 [gaim-migrate @ 344]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 311
diff changeset
3134 if (fontname)
0fa651368776 [gaim-migrate @ 344]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 311
diff changeset
3135 gtk_font_selection_dialog_set_font_name(GTK_FONT_SELECTION_DIALOG(fontseld), fontname);
0fa651368776 [gaim-migrate @ 344]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 311
diff changeset
3136 else
0fa651368776 [gaim-migrate @ 344]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 311
diff changeset
3137 gtk_font_selection_dialog_set_font_name(GTK_FONT_SELECTION_DIALOG(fontseld), DEFAULT_FONT_NAME);
0fa651368776 [gaim-migrate @ 344]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 311
diff changeset
3138
0fa651368776 [gaim-migrate @ 344]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 311
diff changeset
3139 gtk_object_set_user_data(GTK_OBJECT(fontseld), NULL);
0fa651368776 [gaim-migrate @ 344]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 311
diff changeset
3140 gtk_signal_connect(GTK_OBJECT(fontseld), "delete_event", GTK_SIGNAL_FUNC(destroy_fontsel), NULL);
0fa651368776 [gaim-migrate @ 344]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 311
diff changeset
3141 gtk_signal_connect(GTK_OBJECT(GTK_FONT_SELECTION_DIALOG(fontseld)->cancel_button), "clicked", GTK_SIGNAL_FUNC(destroy_fontsel), NULL);
0fa651368776 [gaim-migrate @ 344]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 311
diff changeset
3142 gtk_signal_connect(GTK_OBJECT(GTK_FONT_SELECTION_DIALOG(fontseld)->ok_button), "clicked", GTK_SIGNAL_FUNC(apply_font_dlg), NULL);
0fa651368776 [gaim-migrate @ 344]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 311
diff changeset
3143 gtk_widget_realize(fontseld);
0fa651368776 [gaim-migrate @ 344]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 311
diff changeset
3144 aol_icon(fontseld->window);
0fa651368776 [gaim-migrate @ 344]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 311
diff changeset
3145 gtk_widget_show(fontseld);
0fa651368776 [gaim-migrate @ 344]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 311
diff changeset
3146 gdk_window_raise(fontseld->window);
0fa651368776 [gaim-migrate @ 344]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 311
diff changeset
3147 return;
0fa651368776 [gaim-migrate @ 344]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 311
diff changeset
3148 }
234
985635758c33 [gaim-migrate @ 244]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 231
diff changeset
3149
311
0a8b4edc4732 [gaim-migrate @ 321]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 308
diff changeset
3150 if (!c->font_dialog)
0a8b4edc4732 [gaim-migrate @ 321]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 308
diff changeset
3151 {
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
3152 c->font_dialog = gtk_font_selection_dialog_new(_("Select Font"));
234
985635758c33 [gaim-migrate @ 244]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 231
diff changeset
3153
311
0a8b4edc4732 [gaim-migrate @ 321]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 308
diff changeset
3154 if (font)
334
0fa651368776 [gaim-migrate @ 344]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 311
diff changeset
3155 gtk_object_set_user_data(GTK_OBJECT(c->font_dialog), c);
311
0a8b4edc4732 [gaim-migrate @ 321]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 308
diff changeset
3156 else
334
0fa651368776 [gaim-migrate @ 344]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 311
diff changeset
3157 gtk_object_set_user_data(GTK_OBJECT(c->font_dialog), NULL);
234
985635758c33 [gaim-migrate @ 244]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 231
diff changeset
3158
311
0a8b4edc4732 [gaim-migrate @ 321]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 308
diff changeset
3159 gtk_font_selection_dialog_set_font_name((GtkFontSelectionDialog *)c->font_dialog, DEFAULT_FONT_NAME);
0a8b4edc4732 [gaim-migrate @ 321]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 308
diff changeset
3160
0a8b4edc4732 [gaim-migrate @ 321]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 308
diff changeset
3161 gtk_signal_connect(GTK_OBJECT(c->font_dialog), "delete_event", GTK_SIGNAL_FUNC(delete_event_dialog), c);
334
0fa651368776 [gaim-migrate @ 344]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 311
diff changeset
3162 gtk_signal_connect(GTK_OBJECT(GTK_FONT_SELECTION_DIALOG(c->font_dialog)->ok_button), "clicked", GTK_SIGNAL_FUNC(apply_font), c->font_dialog);
311
0a8b4edc4732 [gaim-migrate @ 321]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 308
diff changeset
3163 gtk_signal_connect(GTK_OBJECT(GTK_FONT_SELECTION_DIALOG(c->font_dialog)->cancel_button), "clicked", GTK_SIGNAL_FUNC(cancel_font), c);
230
83dd297aa363 [gaim-migrate @ 240]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 229
diff changeset
3164
311
0a8b4edc4732 [gaim-migrate @ 321]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 308
diff changeset
3165 if (fontname)
0a8b4edc4732 [gaim-migrate @ 321]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 308
diff changeset
3166 gtk_font_selection_dialog_set_font_name((GtkFontSelectionDialog *)c->font_dialog, fontname);
0a8b4edc4732 [gaim-migrate @ 321]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 308
diff changeset
3167 else
0a8b4edc4732 [gaim-migrate @ 321]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 308
diff changeset
3168 gtk_font_selection_dialog_set_font_name((GtkFontSelectionDialog *)c->font_dialog, DEFAULT_FONT_NAME);
230
83dd297aa363 [gaim-migrate @ 240]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 229
diff changeset
3169
311
0a8b4edc4732 [gaim-migrate @ 321]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 308
diff changeset
3170 gtk_widget_realize(c->font_dialog);
230
83dd297aa363 [gaim-migrate @ 240]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 229
diff changeset
3171
311
0a8b4edc4732 [gaim-migrate @ 321]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 308
diff changeset
3172 aol_icon(c->font_dialog->window);
0a8b4edc4732 [gaim-migrate @ 321]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 308
diff changeset
3173 }
0a8b4edc4732 [gaim-migrate @ 321]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 308
diff changeset
3174 gtk_widget_show(c->font_dialog);
0a8b4edc4732 [gaim-migrate @ 321]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 308
diff changeset
3175 gdk_window_raise(c->font_dialog->window);
230
83dd297aa363 [gaim-migrate @ 240]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 229
diff changeset
3176 }
83dd297aa363 [gaim-migrate @ 240]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 229
diff changeset
3177
83dd297aa363 [gaim-migrate @ 240]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 229
diff changeset
3178 /*------------------------------------------------------------------------*/
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3179 /* The dialog for import/export */
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3180 /*------------------------------------------------------------------------*/
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3181
228
f3b61c04f44e [gaim-migrate @ 238]
Syd Logan <slogan>
parents: 198
diff changeset
3182 #define PATHSIZE 1024
f3b61c04f44e [gaim-migrate @ 238]
Syd Logan <slogan>
parents: 198
diff changeset
3183
229
e8ea7f37e28f [gaim-migrate @ 239]
Syd Logan <slogan>
parents: 228
diff changeset
3184 /* see if a buddy list cache file for this user exists */
e8ea7f37e28f [gaim-migrate @ 239]
Syd Logan <slogan>
parents: 228
diff changeset
3185
e8ea7f37e28f [gaim-migrate @ 239]
Syd Logan <slogan>
parents: 228
diff changeset
3186 gboolean
e8ea7f37e28f [gaim-migrate @ 239]
Syd Logan <slogan>
parents: 228
diff changeset
3187 bud_list_cache_exists( void )
e8ea7f37e28f [gaim-migrate @ 239]
Syd Logan <slogan>
parents: 228
diff changeset
3188 {
e8ea7f37e28f [gaim-migrate @ 239]
Syd Logan <slogan>
parents: 228
diff changeset
3189 gboolean ret = FALSE;
e8ea7f37e28f [gaim-migrate @ 239]
Syd Logan <slogan>
parents: 228
diff changeset
3190 char path[PATHSIZE];
e8ea7f37e28f [gaim-migrate @ 239]
Syd Logan <slogan>
parents: 228
diff changeset
3191 char *file;
e8ea7f37e28f [gaim-migrate @ 239]
Syd Logan <slogan>
parents: 228
diff changeset
3192 struct stat sbuf;
e8ea7f37e28f [gaim-migrate @ 239]
Syd Logan <slogan>
parents: 228
diff changeset
3193 extern char g_screenname[];
e8ea7f37e28f [gaim-migrate @ 239]
Syd Logan <slogan>
parents: 228
diff changeset
3194
e8ea7f37e28f [gaim-migrate @ 239]
Syd Logan <slogan>
parents: 228
diff changeset
3195 file = getenv( "HOME" );
e8ea7f37e28f [gaim-migrate @ 239]
Syd Logan <slogan>
parents: 228
diff changeset
3196 if ( file != (char *) NULL ) {
262
07abf2ed6665 [gaim-migrate @ 272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 255
diff changeset
3197 sprintf( path, "%s/.gaim/%s.blist", file, g_screenname );
229
e8ea7f37e28f [gaim-migrate @ 239]
Syd Logan <slogan>
parents: 228
diff changeset
3198 if ( !stat(path, &sbuf) )
e8ea7f37e28f [gaim-migrate @ 239]
Syd Logan <slogan>
parents: 228
diff changeset
3199 ret = TRUE;
e8ea7f37e28f [gaim-migrate @ 239]
Syd Logan <slogan>
parents: 228
diff changeset
3200 }
e8ea7f37e28f [gaim-migrate @ 239]
Syd Logan <slogan>
parents: 228
diff changeset
3201 return ret;
e8ea7f37e28f [gaim-migrate @ 239]
Syd Logan <slogan>
parents: 228
diff changeset
3202 }
e8ea7f37e28f [gaim-migrate @ 239]
Syd Logan <slogan>
parents: 228
diff changeset
3203
262
07abf2ed6665 [gaim-migrate @ 272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 255
diff changeset
3204 /* if dummy is 0, save to ~/.gaim/screenname.blist. Else, let user choose */
228
f3b61c04f44e [gaim-migrate @ 238]
Syd Logan <slogan>
parents: 198
diff changeset
3205
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3206 void do_export(GtkWidget *w, void *dummy)
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3207 {
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3208 FILE *f;
228
f3b61c04f44e [gaim-migrate @ 238]
Syd Logan <slogan>
parents: 198
diff changeset
3209 gint show_dialog = (int) dummy;
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3210 char *buf = g_malloc(BUF_LONG);
228
f3b61c04f44e [gaim-migrate @ 238]
Syd Logan <slogan>
parents: 198
diff changeset
3211 char *file;
f3b61c04f44e [gaim-migrate @ 238]
Syd Logan <slogan>
parents: 198
diff changeset
3212 char path[PATHSIZE];
f3b61c04f44e [gaim-migrate @ 238]
Syd Logan <slogan>
parents: 198
diff changeset
3213 extern char g_screenname[];
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3214
228
f3b61c04f44e [gaim-migrate @ 238]
Syd Logan <slogan>
parents: 198
diff changeset
3215 if ( show_dialog == 1 ) {
f3b61c04f44e [gaim-migrate @ 238]
Syd Logan <slogan>
parents: 198
diff changeset
3216 file = gtk_file_selection_get_filename(GTK_FILE_SELECTION(exportdialog));
f3b61c04f44e [gaim-migrate @ 238]
Syd Logan <slogan>
parents: 198
diff changeset
3217 strncpy( path, file, PATHSIZE - 1 );
f3b61c04f44e [gaim-migrate @ 238]
Syd Logan <slogan>
parents: 198
diff changeset
3218 }
f3b61c04f44e [gaim-migrate @ 238]
Syd Logan <slogan>
parents: 198
diff changeset
3219 else {
f3b61c04f44e [gaim-migrate @ 238]
Syd Logan <slogan>
parents: 198
diff changeset
3220 file = getenv( "HOME" );
262
07abf2ed6665 [gaim-migrate @ 272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 255
diff changeset
3221 if ( file != (char *) NULL ) {
07abf2ed6665 [gaim-migrate @ 272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 255
diff changeset
3222 FILE *dir;
266
3b5b469d07f7 [gaim-migrate @ 276]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 262
diff changeset
3223 sprintf(buf, "%s/.gaim/", file);
262
07abf2ed6665 [gaim-migrate @ 272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 255
diff changeset
3224 dir = fopen(buf, "r");
07abf2ed6665 [gaim-migrate @ 272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 255
diff changeset
3225 if (!dir)
07abf2ed6665 [gaim-migrate @ 272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 255
diff changeset
3226 mkdir(buf, S_IRUSR | S_IWUSR | S_IXUSR);
07abf2ed6665 [gaim-migrate @ 272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 255
diff changeset
3227 else
07abf2ed6665 [gaim-migrate @ 272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 255
diff changeset
3228 fclose(dir);
07abf2ed6665 [gaim-migrate @ 272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 255
diff changeset
3229 sprintf( path, "%s/.gaim/%s.blist", file, g_screenname );
07abf2ed6665 [gaim-migrate @ 272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 255
diff changeset
3230 } else
228
f3b61c04f44e [gaim-migrate @ 238]
Syd Logan <slogan>
parents: 198
diff changeset
3231 return;
f3b61c04f44e [gaim-migrate @ 238]
Syd Logan <slogan>
parents: 198
diff changeset
3232 }
f3b61c04f44e [gaim-migrate @ 238]
Syd Logan <slogan>
parents: 198
diff changeset
3233 if ((f = fopen(path,"w"))) {
237
6ced2f1c8b24 [gaim-migrate @ 247]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 236
diff changeset
3234 serv_build_config(buf, 8192 - 1);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3235 fprintf(f, "%s\n", buf);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3236 fclose(f);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3237 chmod(buf, S_IRUSR | S_IWUSR);
228
f3b61c04f44e [gaim-migrate @ 238]
Syd Logan <slogan>
parents: 198
diff changeset
3238 } else if ( show_dialog == 1 ) {
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
3239 g_snprintf(buf, BUF_LONG / 2, _("Error writing file %s"), file);
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
3240 do_error_dialog(buf, _("Error"));
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3241 }
228
f3b61c04f44e [gaim-migrate @ 238]
Syd Logan <slogan>
parents: 198
diff changeset
3242 if ( show_dialog == 1 ) {
f3b61c04f44e [gaim-migrate @ 238]
Syd Logan <slogan>
parents: 198
diff changeset
3243 destroy_dialog(NULL, exportdialog);
f3b61c04f44e [gaim-migrate @ 238]
Syd Logan <slogan>
parents: 198
diff changeset
3244 exportdialog = NULL;
f3b61c04f44e [gaim-migrate @ 238]
Syd Logan <slogan>
parents: 198
diff changeset
3245 }
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3246
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3247 g_free(buf);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3248
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3249 }
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3250
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3251
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3252 void show_export_dialog()
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3253 {
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3254 char *buf = g_malloc(BUF_LEN);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3255 if (!exportdialog) {
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
3256 exportdialog = gtk_file_selection_new(_("Gaim - Export Buddy List"));
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3257
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3258 gtk_file_selection_hide_fileop_buttons(GTK_FILE_SELECTION(exportdialog));
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3259
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3260 g_snprintf(buf, BUF_LEN - 1, "%s/gaim.buddy", getenv("HOME"));
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3261
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3262 gtk_file_selection_set_filename(GTK_FILE_SELECTION(exportdialog), buf);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3263 gtk_signal_connect(GTK_OBJECT(exportdialog), "destroy",
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3264 GTK_SIGNAL_FUNC(destroy_dialog), exportdialog);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3265
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3266 gtk_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(exportdialog)->ok_button),
230
83dd297aa363 [gaim-migrate @ 240]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 229
diff changeset
3267 "clicked", GTK_SIGNAL_FUNC(do_export), (void*)1);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3268 gtk_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(exportdialog)->cancel_button),
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3269 "clicked", GTK_SIGNAL_FUNC(destroy_dialog), exportdialog);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3270
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3271
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3272 }
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3273
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3274 g_free(buf);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3275
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3276 gtk_widget_show(exportdialog);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3277 gdk_window_raise(exportdialog->window);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3278
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3279 }
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3280
262
07abf2ed6665 [gaim-migrate @ 272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 255
diff changeset
3281 /* if dummy is 0, then import from ~/.gaim/screenname.blist, else let user
229
e8ea7f37e28f [gaim-migrate @ 239]
Syd Logan <slogan>
parents: 228
diff changeset
3282 choose */
228
f3b61c04f44e [gaim-migrate @ 238]
Syd Logan <slogan>
parents: 198
diff changeset
3283
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3284 void do_import(GtkWidget *w, void *dummy)
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3285 {
228
f3b61c04f44e [gaim-migrate @ 238]
Syd Logan <slogan>
parents: 198
diff changeset
3286 gint show_dialog = (int) dummy;
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3287 GList *grp, *grp2;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3288 char *buf = g_malloc(BUF_LONG);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3289 char *buf2;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3290 char *first = g_malloc(64);
228
f3b61c04f44e [gaim-migrate @ 238]
Syd Logan <slogan>
parents: 198
diff changeset
3291 char *file;
f3b61c04f44e [gaim-migrate @ 238]
Syd Logan <slogan>
parents: 198
diff changeset
3292 char path[PATHSIZE];
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3293 FILE *f;
228
f3b61c04f44e [gaim-migrate @ 238]
Syd Logan <slogan>
parents: 198
diff changeset
3294 extern char g_screenname[];
f3b61c04f44e [gaim-migrate @ 238]
Syd Logan <slogan>
parents: 198
diff changeset
3295
f3b61c04f44e [gaim-migrate @ 238]
Syd Logan <slogan>
parents: 198
diff changeset
3296 if ( show_dialog == 1 ) {
f3b61c04f44e [gaim-migrate @ 238]
Syd Logan <slogan>
parents: 198
diff changeset
3297 file = gtk_file_selection_get_filename(GTK_FILE_SELECTION(importdialog));
f3b61c04f44e [gaim-migrate @ 238]
Syd Logan <slogan>
parents: 198
diff changeset
3298 strncpy( path, file, PATHSIZE - 1 );
f3b61c04f44e [gaim-migrate @ 238]
Syd Logan <slogan>
parents: 198
diff changeset
3299 }
f3b61c04f44e [gaim-migrate @ 238]
Syd Logan <slogan>
parents: 198
diff changeset
3300 else {
f3b61c04f44e [gaim-migrate @ 238]
Syd Logan <slogan>
parents: 198
diff changeset
3301 file = getenv( "HOME" );
f3b61c04f44e [gaim-migrate @ 238]
Syd Logan <slogan>
parents: 198
diff changeset
3302 if ( file != (char *) NULL )
262
07abf2ed6665 [gaim-migrate @ 272]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 255
diff changeset
3303 sprintf( path, "%s/.gaim/%s.blist", file, g_screenname );
228
f3b61c04f44e [gaim-migrate @ 238]
Syd Logan <slogan>
parents: 198
diff changeset
3304 else
f3b61c04f44e [gaim-migrate @ 238]
Syd Logan <slogan>
parents: 198
diff changeset
3305 return;
f3b61c04f44e [gaim-migrate @ 238]
Syd Logan <slogan>
parents: 198
diff changeset
3306 }
f3b61c04f44e [gaim-migrate @ 238]
Syd Logan <slogan>
parents: 198
diff changeset
3307
f3b61c04f44e [gaim-migrate @ 238]
Syd Logan <slogan>
parents: 198
diff changeset
3308 if (!(f = fopen(path,"r"))) {
f3b61c04f44e [gaim-migrate @ 238]
Syd Logan <slogan>
parents: 198
diff changeset
3309 if ( show_dialog == 1 ) {
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
3310 g_snprintf(buf, BUF_LONG / 2, _("Error reading file %s"), file);
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
3311 do_error_dialog(buf, _("Error"));
228
f3b61c04f44e [gaim-migrate @ 238]
Syd Logan <slogan>
parents: 198
diff changeset
3312 destroy_dialog(NULL, importdialog);
f3b61c04f44e [gaim-migrate @ 238]
Syd Logan <slogan>
parents: 198
diff changeset
3313 importdialog = NULL;
f3b61c04f44e [gaim-migrate @ 238]
Syd Logan <slogan>
parents: 198
diff changeset
3314 }
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3315 g_free(buf);
37
d90f556e4aa3 [gaim-migrate @ 46]
Rob Flynn <gaim@robflynn.com>
parents: 26
diff changeset
3316 g_free(first);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3317 return;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3318 }
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3319
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3320 fgets(first, 64, f);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3321
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3322 if (!strcasecmp(first, "Config {\n")) {
228
f3b61c04f44e [gaim-migrate @ 238]
Syd Logan <slogan>
parents: 198
diff changeset
3323 if ( show_dialog == 1 ) {
f3b61c04f44e [gaim-migrate @ 238]
Syd Logan <slogan>
parents: 198
diff changeset
3324 destroy_dialog(NULL, importdialog);
f3b61c04f44e [gaim-migrate @ 238]
Syd Logan <slogan>
parents: 198
diff changeset
3325 importdialog = NULL;
f3b61c04f44e [gaim-migrate @ 238]
Syd Logan <slogan>
parents: 198
diff changeset
3326 }
25
c56db1b46b0d [gaim-migrate @ 34]
Rob Flynn <gaim@robflynn.com>
parents: 24
diff changeset
3327 g_free(buf);
37
d90f556e4aa3 [gaim-migrate @ 46]
Rob Flynn <gaim@robflynn.com>
parents: 26
diff changeset
3328 g_free(first);
228
f3b61c04f44e [gaim-migrate @ 238]
Syd Logan <slogan>
parents: 198
diff changeset
3329 fclose( f );
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3330 return;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3331 } else if (buf[0] == 'm') {
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3332 buf2 = buf;
231
4a638177f917 [gaim-migrate @ 241]
Rob Flynn <gaim@robflynn.com>
parents: 230
diff changeset
3333 buf = g_malloc(8193);
4a638177f917 [gaim-migrate @ 241]
Rob Flynn <gaim@robflynn.com>
parents: 230
diff changeset
3334 g_snprintf(buf, 8192, "toc_set_config {%s}\n", buf2);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3335 g_free(buf2);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3336 }
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3337
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3338
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3339 fseek(f, 0, SEEK_SET);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3340
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3341 fread(buf, BUF_LONG, 1, f);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3342
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3343 grp = groups;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3344
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3345 while(grp) {
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3346 grp2 = grp->next;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3347 remove_group((struct group *)grp->data);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3348 grp = grp2;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3349 }
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3350
296
a88b889b692b [gaim-migrate @ 306]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 266
diff changeset
3351 parse_toc_buddy_list(buf, 1);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3352
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3353 serv_save_config();
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3354
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3355 build_edit_tree();
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3356 build_permit_tree();
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3357
228
f3b61c04f44e [gaim-migrate @ 238]
Syd Logan <slogan>
parents: 198
diff changeset
3358 fclose( f );
f3b61c04f44e [gaim-migrate @ 238]
Syd Logan <slogan>
parents: 198
diff changeset
3359
f3b61c04f44e [gaim-migrate @ 238]
Syd Logan <slogan>
parents: 198
diff changeset
3360 if ( show_dialog == 1 ) {
f3b61c04f44e [gaim-migrate @ 238]
Syd Logan <slogan>
parents: 198
diff changeset
3361 /* save what we just did to cache */
f3b61c04f44e [gaim-migrate @ 238]
Syd Logan <slogan>
parents: 198
diff changeset
3362
f3b61c04f44e [gaim-migrate @ 238]
Syd Logan <slogan>
parents: 198
diff changeset
3363 do_export( (GtkWidget *) NULL, 0 );
f3b61c04f44e [gaim-migrate @ 238]
Syd Logan <slogan>
parents: 198
diff changeset
3364 destroy_dialog(NULL, importdialog);
f3b61c04f44e [gaim-migrate @ 238]
Syd Logan <slogan>
parents: 198
diff changeset
3365 importdialog = NULL;
f3b61c04f44e [gaim-migrate @ 238]
Syd Logan <slogan>
parents: 198
diff changeset
3366 }
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3367
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3368 g_free(buf);
37
d90f556e4aa3 [gaim-migrate @ 46]
Rob Flynn <gaim@robflynn.com>
parents: 26
diff changeset
3369 g_free(first);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3370 }
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3371
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3372 void show_import_dialog()
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3373 {
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3374 char *buf = g_malloc(BUF_LEN);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3375 if (!importdialog) {
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
3376 importdialog = gtk_file_selection_new(_("Gaim - Import Buddy List"));
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3377
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3378 gtk_file_selection_hide_fileop_buttons(GTK_FILE_SELECTION(importdialog));
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3379
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3380 g_snprintf(buf, BUF_LEN - 1, "%s/", getenv("HOME"));
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3381
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3382 gtk_file_selection_set_filename(GTK_FILE_SELECTION(importdialog), buf);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3383 gtk_signal_connect(GTK_OBJECT(importdialog), "destroy",
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3384 GTK_SIGNAL_FUNC(destroy_dialog), importdialog);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3385
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3386 gtk_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(importdialog)->ok_button),
230
83dd297aa363 [gaim-migrate @ 240]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 229
diff changeset
3387 "clicked", GTK_SIGNAL_FUNC(do_import), (void*)1);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3388 gtk_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(importdialog)->cancel_button),
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3389 "clicked", GTK_SIGNAL_FUNC(destroy_dialog), importdialog);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3390
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3391
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3392 }
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3393
24
7d0ef30fe8c0 [gaim-migrate @ 33]
Rob Flynn <gaim@robflynn.com>
parents: 1
diff changeset
3394 g_free(buf);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3395 gtk_widget_show(importdialog);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3396 gdk_window_raise(importdialog->window);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3397 }
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3398
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3399
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3400 /*------------------------------------------------------------------------*/
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3401 /* The dialog for new away messages */
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3402 /*------------------------------------------------------------------------*/
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3403
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3404 void create_mess(GtkWidget *widget, struct create_away *ca)
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3405 {
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3406 struct away_message *b;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3407 gchar *away_message;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3408 guint text_len;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3409 int is_checked;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3410
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3411 /* Grab the appropriate data */
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3412 b = g_new0(struct away_message, 1);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3413 g_snprintf(b->name, sizeof(b->name), "%s", gtk_entry_get_text(GTK_ENTRY(ca->entry)));
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3414
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3415 /* Get proper Length */
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3416 text_len = gtk_text_get_length(GTK_TEXT(ca->text));
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3417 away_message = gtk_editable_get_chars(GTK_EDITABLE(ca->text), 0, text_len);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3418
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3419 g_snprintf(b->message, sizeof(b->message), "%s", away_message);
38
f60e533679ce [gaim-migrate @ 47]
Rob Flynn <gaim@robflynn.com>
parents: 37
diff changeset
3420 g_free(away_message);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3421 is_checked = GTK_TOGGLE_BUTTON(ca->checkbx)->active;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3422
452
0a2eb65b6909 [gaim-migrate @ 462]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 444
diff changeset
3423 if (is_checked) {
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3424 away_messages = g_list_append(away_messages, b);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3425 save_prefs();
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3426 do_away_menu();
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3427 if (pd != NULL)
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3428 gtk_list_select_item(GTK_LIST(pd->away_list), g_list_index(away_messages, b));
452
0a2eb65b6909 [gaim-migrate @ 462]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 444
diff changeset
3429 }
0a2eb65b6909 [gaim-migrate @ 462]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 444
diff changeset
3430
0a2eb65b6909 [gaim-migrate @ 462]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 444
diff changeset
3431 /* stick it on the away list */
470
4bf9c74b9e4d [gaim-migrate @ 480]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 467
diff changeset
3432 if (!strlen(b->name))
4bf9c74b9e4d [gaim-migrate @ 480]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 467
diff changeset
3433 g_snprintf(b->name, sizeof(b->name), "I'm away!");
4bf9c74b9e4d [gaim-migrate @ 480]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 467
diff changeset
3434 do_away_message(NULL, b);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3435
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3436 destroy_dialog(NULL, ca->window);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3437 }
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3438
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3439 void create_away_mess(GtkWidget *widget, void *dummy)
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3440 {
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3441 GtkWidget *bbox;
439
9e5a6c35dd64 [gaim-migrate @ 449]
Rob Flynn <gaim@robflynn.com>
parents: 423
diff changeset
3442 GtkWidget *hbox;
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3443 GtkWidget *titlebox;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3444 GtkWidget *tbox;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3445 GtkWidget *create;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3446 GtkWidget *sw;
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3447 GtkWidget *label;
439
9e5a6c35dd64 [gaim-migrate @ 449]
Rob Flynn <gaim@robflynn.com>
parents: 423
diff changeset
3448 GtkWidget *frame;
9e5a6c35dd64 [gaim-migrate @ 449]
Rob Flynn <gaim@robflynn.com>
parents: 423
diff changeset
3449 GtkWidget *fbox;
441
995b0fc981a3 [gaim-migrate @ 451]
Rob Flynn <gaim@robflynn.com>
parents: 440
diff changeset
3450 GtkWidget *button_box;
995b0fc981a3 [gaim-migrate @ 451]
Rob Flynn <gaim@robflynn.com>
parents: 440
diff changeset
3451 GtkWidget *button;
995b0fc981a3 [gaim-migrate @ 451]
Rob Flynn <gaim@robflynn.com>
parents: 440
diff changeset
3452 GdkPixmap *icon;
995b0fc981a3 [gaim-migrate @ 451]
Rob Flynn <gaim@robflynn.com>
parents: 440
diff changeset
3453 GdkBitmap *mask;
995b0fc981a3 [gaim-migrate @ 451]
Rob Flynn <gaim@robflynn.com>
parents: 440
diff changeset
3454 GtkWidget *icon_i;
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3455
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3456 struct create_away *ca = g_new0(struct create_away, 1);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3457
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3458 /* Set up window */
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3459 ca->window = gtk_window_new(GTK_WINDOW_DIALOG);
441
995b0fc981a3 [gaim-migrate @ 451]
Rob Flynn <gaim@robflynn.com>
parents: 440
diff changeset
3460 gtk_widget_set_usize(ca->window, 275, 200);
995b0fc981a3 [gaim-migrate @ 451]
Rob Flynn <gaim@robflynn.com>
parents: 440
diff changeset
3461 gtk_widget_show(ca->window);
995b0fc981a3 [gaim-migrate @ 451]
Rob Flynn <gaim@robflynn.com>
parents: 440
diff changeset
3462 gtk_container_border_width(GTK_CONTAINER(ca->window), 5);
440
7d61632b2591 [gaim-migrate @ 450]
Syd Logan <slogan>
parents: 439
diff changeset
3463 gtk_window_set_policy(GTK_WINDOW(ca->window), FALSE, FALSE, TRUE);
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
3464 gtk_window_set_title(GTK_WINDOW(ca->window), _("Gaim - New away message"));
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3465 gtk_signal_connect(GTK_OBJECT(ca->window),"delete_event",
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3466 GTK_SIGNAL_FUNC(destroy_dialog), ca->window);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3467
439
9e5a6c35dd64 [gaim-migrate @ 449]
Rob Flynn <gaim@robflynn.com>
parents: 423
diff changeset
3468 /* Set up our frame */
9e5a6c35dd64 [gaim-migrate @ 449]
Rob Flynn <gaim@robflynn.com>
parents: 423
diff changeset
3469
9e5a6c35dd64 [gaim-migrate @ 449]
Rob Flynn <gaim@robflynn.com>
parents: 423
diff changeset
3470 frame = gtk_frame_new(_("New away message"));
9e5a6c35dd64 [gaim-migrate @ 449]
Rob Flynn <gaim@robflynn.com>
parents: 423
diff changeset
3471
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3472 /* set up container boxes */
440
7d61632b2591 [gaim-migrate @ 450]
Syd Logan <slogan>
parents: 439
diff changeset
3473 bbox = gtk_hbox_new(FALSE, 0);
439
9e5a6c35dd64 [gaim-migrate @ 449]
Rob Flynn <gaim@robflynn.com>
parents: 423
diff changeset
3474 fbox = gtk_vbox_new(FALSE, 0);
440
7d61632b2591 [gaim-migrate @ 450]
Syd Logan <slogan>
parents: 439
diff changeset
3475 hbox = gtk_hbox_new(FALSE, 0);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3476 titlebox = gtk_hbox_new(FALSE, 0);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3477 tbox = gtk_vbox_new(FALSE, 0);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3478
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3479 /* Make a label for away entry */
350
fd3cc0a28d5d [gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 349
diff changeset
3480 label = gtk_label_new(_("Away title: "));
440
7d61632b2591 [gaim-migrate @ 450]
Syd Logan <slogan>
parents: 439
diff changeset
3481 gtk_box_pack_start(GTK_BOX(titlebox), label, TRUE, TRUE, 5);
441
995b0fc981a3 [gaim-migrate @ 451]
Rob Flynn <gaim@robflynn.com>
parents: 440
diff changeset
3482 gtk_widget_show(label);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3483
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3484 /* make away title entry */
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3485 ca->entry = gtk_entry_new();
440
7d61632b2591 [gaim-migrate @ 450]
Syd Logan <slogan>
parents: 439
diff changeset
3486 gtk_box_pack_start(GTK_BOX(titlebox), ca->entry, TRUE, TRUE, 5);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3487
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3488 sw = gtk_scrolled_window_new(NULL, NULL);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3489 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw),
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3490 GTK_POLICY_AUTOMATIC,
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3491 GTK_POLICY_AUTOMATIC);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3492 gtk_widget_show(sw);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3493
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3494 /* create and format text box */
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3495 ca->text = gtk_text_new(NULL, NULL);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3496 gtk_text_set_word_wrap(GTK_TEXT(ca->text), TRUE);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3497 gtk_text_set_editable(GTK_TEXT(ca->text), TRUE );
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3498 gtk_container_add(GTK_CONTAINER(sw), ca->text);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3499 gtk_widget_show(ca->text);
440
7d61632b2591 [gaim-migrate @ 450]
Syd Logan <slogan>
parents: 439
diff changeset
3500 gtk_box_pack_start(GTK_BOX(bbox), sw, TRUE, TRUE, 5);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3501
441
995b0fc981a3 [gaim-migrate @ 451]
Rob Flynn <gaim@robflynn.com>
parents: 440
diff changeset
3502 /* create 'create' button */
439
9e5a6c35dd64 [gaim-migrate @ 449]
Rob Flynn <gaim@robflynn.com>
parents: 423
diff changeset
3503
441
995b0fc981a3 [gaim-migrate @ 451]
Rob Flynn <gaim@robflynn.com>
parents: 440
diff changeset
3504 button_box = gtk_hbox_new(TRUE, 5);
995b0fc981a3 [gaim-migrate @ 451]
Rob Flynn <gaim@robflynn.com>
parents: 440
diff changeset
3505
995b0fc981a3 [gaim-migrate @ 451]
Rob Flynn <gaim@robflynn.com>
parents: 440
diff changeset
3506 icon = gdk_pixmap_create_from_xpm_d( ca->window->window , &mask, NULL, save_xpm);
995b0fc981a3 [gaim-migrate @ 451]
Rob Flynn <gaim@robflynn.com>
parents: 440
diff changeset
3507 icon_i = gtk_pixmap_new ( icon, mask );
452
0a2eb65b6909 [gaim-migrate @ 462]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 444
diff changeset
3508 label = gtk_label_new(_("Away"));
441
995b0fc981a3 [gaim-migrate @ 451]
Rob Flynn <gaim@robflynn.com>
parents: 440
diff changeset
3509
995b0fc981a3 [gaim-migrate @ 451]
Rob Flynn <gaim@robflynn.com>
parents: 440
diff changeset
3510 gtk_box_pack_start(GTK_BOX(button_box), icon_i, FALSE, FALSE, 2);
995b0fc981a3 [gaim-migrate @ 451]
Rob Flynn <gaim@robflynn.com>
parents: 440
diff changeset
3511 gtk_box_pack_start(GTK_BOX(button_box), label, FALSE, FALSE, 2);
995b0fc981a3 [gaim-migrate @ 451]
Rob Flynn <gaim@robflynn.com>
parents: 440
diff changeset
3512 gtk_widget_show(icon_i);
995b0fc981a3 [gaim-migrate @ 451]
Rob Flynn <gaim@robflynn.com>
parents: 440
diff changeset
3513 gtk_widget_show(label);
995b0fc981a3 [gaim-migrate @ 451]
Rob Flynn <gaim@robflynn.com>
parents: 440
diff changeset
3514
995b0fc981a3 [gaim-migrate @ 451]
Rob Flynn <gaim@robflynn.com>
parents: 440
diff changeset
3515 button = gtk_button_new();
995b0fc981a3 [gaim-migrate @ 451]
Rob Flynn <gaim@robflynn.com>
parents: 440
diff changeset
3516 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(create_mess), ca);
995b0fc981a3 [gaim-migrate @ 451]
Rob Flynn <gaim@robflynn.com>
parents: 440
diff changeset
3517 gtk_widget_show(button_box);
995b0fc981a3 [gaim-migrate @ 451]
Rob Flynn <gaim@robflynn.com>
parents: 440
diff changeset
3518 gtk_container_add(GTK_CONTAINER(button), button_box);
535
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
3519
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
3520 if (display_options & OPT_DISP_COOL_LOOK)
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
3521 gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE);
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
3522
441
995b0fc981a3 [gaim-migrate @ 451]
Rob Flynn <gaim@robflynn.com>
parents: 440
diff changeset
3523 gtk_widget_show(button);
995b0fc981a3 [gaim-migrate @ 451]
Rob Flynn <gaim@robflynn.com>
parents: 440
diff changeset
3524
593
37dd78318a2e [gaim-migrate @ 603]
Rob Flynn <gaim@robflynn.com>
parents: 589
diff changeset
3525 gtk_widget_set_usize(button, 80, 30);
441
995b0fc981a3 [gaim-migrate @ 451]
Rob Flynn <gaim@robflynn.com>
parents: 440
diff changeset
3526 gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 5);
995b0fc981a3 [gaim-migrate @ 451]
Rob Flynn <gaim@robflynn.com>
parents: 440
diff changeset
3527
995b0fc981a3 [gaim-migrate @ 451]
Rob Flynn <gaim@robflynn.com>
parents: 440
diff changeset
3528 /* End of our create button code */
995b0fc981a3 [gaim-migrate @ 451]
Rob Flynn <gaim@robflynn.com>
parents: 440
diff changeset
3529
439
9e5a6c35dd64 [gaim-migrate @ 449]
Rob Flynn <gaim@robflynn.com>
parents: 423
diff changeset
3530 /* create cancel button */
441
995b0fc981a3 [gaim-migrate @ 451]
Rob Flynn <gaim@robflynn.com>
parents: 440
diff changeset
3531
995b0fc981a3 [gaim-migrate @ 451]
Rob Flynn <gaim@robflynn.com>
parents: 440
diff changeset
3532 button_box = gtk_hbox_new(TRUE, 5);
995b0fc981a3 [gaim-migrate @ 451]
Rob Flynn <gaim@robflynn.com>
parents: 440
diff changeset
3533
995b0fc981a3 [gaim-migrate @ 451]
Rob Flynn <gaim@robflynn.com>
parents: 440
diff changeset
3534 icon = gdk_pixmap_create_from_xpm_d( ca->window->window , &mask, NULL, cancel_xpm);
995b0fc981a3 [gaim-migrate @ 451]
Rob Flynn <gaim@robflynn.com>
parents: 440
diff changeset
3535 icon_i = gtk_pixmap_new ( icon, mask );
995b0fc981a3 [gaim-migrate @ 451]
Rob Flynn <gaim@robflynn.com>
parents: 440
diff changeset
3536 label = gtk_label_new(_("Cancel"));
995b0fc981a3 [gaim-migrate @ 451]
Rob Flynn <gaim@robflynn.com>
parents: 440
diff changeset
3537
995b0fc981a3 [gaim-migrate @ 451]
Rob Flynn <gaim@robflynn.com>
parents: 440
diff changeset
3538 gtk_box_pack_start(GTK_BOX(button_box), icon_i, FALSE, FALSE, 2);
995b0fc981a3 [gaim-migrate @ 451]
Rob Flynn <gaim@robflynn.com>
parents: 440
diff changeset
3539 gtk_box_pack_start(GTK_BOX(button_box), label, FALSE, FALSE, 2);
995b0fc981a3 [gaim-migrate @ 451]
Rob Flynn <gaim@robflynn.com>
parents: 440
diff changeset
3540 gtk_widget_show(icon_i);
995b0fc981a3 [gaim-migrate @ 451]
Rob Flynn <gaim@robflynn.com>
parents: 440
diff changeset
3541 gtk_widget_show(label);
995b0fc981a3 [gaim-migrate @ 451]
Rob Flynn <gaim@robflynn.com>
parents: 440
diff changeset
3542
995b0fc981a3 [gaim-migrate @ 451]
Rob Flynn <gaim@robflynn.com>
parents: 440
diff changeset
3543 button = gtk_button_new();
995b0fc981a3 [gaim-migrate @ 451]
Rob Flynn <gaim@robflynn.com>
parents: 440
diff changeset
3544 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(destroy_dialog), ca->window);
995b0fc981a3 [gaim-migrate @ 451]
Rob Flynn <gaim@robflynn.com>
parents: 440
diff changeset
3545 gtk_widget_show(button_box);
995b0fc981a3 [gaim-migrate @ 451]
Rob Flynn <gaim@robflynn.com>
parents: 440
diff changeset
3546 gtk_container_add(GTK_CONTAINER(button), button_box);
535
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
3547
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
3548 if (display_options & OPT_DISP_COOL_LOOK)
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
3549 gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE);
f03f041c1aa9 [gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 488
diff changeset
3550
593
37dd78318a2e [gaim-migrate @ 603]
Rob Flynn <gaim@robflynn.com>
parents: 589
diff changeset
3551
441
995b0fc981a3 [gaim-migrate @ 451]
Rob Flynn <gaim@robflynn.com>
parents: 440
diff changeset
3552 gtk_widget_show(button);
593
37dd78318a2e [gaim-migrate @ 603]
Rob Flynn <gaim@robflynn.com>
parents: 589
diff changeset
3553 gtk_widget_set_usize(button, 80, 30);
441
995b0fc981a3 [gaim-migrate @ 451]
Rob Flynn <gaim@robflynn.com>
parents: 440
diff changeset
3554 gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 5);
995b0fc981a3 [gaim-migrate @ 451]
Rob Flynn <gaim@robflynn.com>
parents: 440
diff changeset
3555
995b0fc981a3 [gaim-migrate @ 451]
Rob Flynn <gaim@robflynn.com>
parents: 440
diff changeset
3556 /* End of our cancel button code */
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3557
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3558 /* Checkbox for showing away msg */
452
0a2eb65b6909 [gaim-migrate @ 462]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 444
diff changeset
3559 ca->checkbx = gtk_check_button_new_with_label(_("Save for later use"));
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3560
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3561 /* pack boxes where they belong */
440
7d61632b2591 [gaim-migrate @ 450]
Syd Logan <slogan>
parents: 439
diff changeset
3562 gtk_box_pack_start(GTK_BOX(fbox), titlebox, TRUE, TRUE, 5);
7d61632b2591 [gaim-migrate @ 450]
Syd Logan <slogan>
parents: 439
diff changeset
3563 gtk_box_pack_start(GTK_BOX(fbox), bbox, TRUE, TRUE, 5);
7d61632b2591 [gaim-migrate @ 450]
Syd Logan <slogan>
parents: 439
diff changeset
3564 gtk_box_pack_start(GTK_BOX(fbox), ca->checkbx, TRUE, TRUE, 5);
439
9e5a6c35dd64 [gaim-migrate @ 449]
Rob Flynn <gaim@robflynn.com>
parents: 423
diff changeset
3565
9e5a6c35dd64 [gaim-migrate @ 449]
Rob Flynn <gaim@robflynn.com>
parents: 423
diff changeset
3566 gtk_container_add(GTK_CONTAINER(frame), fbox);
9e5a6c35dd64 [gaim-migrate @ 449]
Rob Flynn <gaim@robflynn.com>
parents: 423
diff changeset
3567 gtk_container_set_border_width(GTK_CONTAINER(frame), 5);
9e5a6c35dd64 [gaim-migrate @ 449]
Rob Flynn <gaim@robflynn.com>
parents: 423
diff changeset
3568 gtk_box_pack_start(GTK_BOX(tbox), frame, TRUE, TRUE, 0);
442
fbf45eb2cd4e [gaim-migrate @ 452]
Rob Flynn <gaim@robflynn.com>
parents: 441
diff changeset
3569 gtk_box_pack_start(GTK_BOX(tbox), hbox, TRUE, FALSE, 5);
439
9e5a6c35dd64 [gaim-migrate @ 449]
Rob Flynn <gaim@robflynn.com>
parents: 423
diff changeset
3570
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3571 gtk_container_add(GTK_CONTAINER(ca->window), tbox);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3572
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3573 /* let the world see what we have done. */
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3574 gtk_widget_show(label);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3575 gtk_widget_show(ca->checkbx);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3576 gtk_widget_show(ca->entry);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3577 gtk_widget_show(titlebox);
439
9e5a6c35dd64 [gaim-migrate @ 449]
Rob Flynn <gaim@robflynn.com>
parents: 423
diff changeset
3578 gtk_widget_show(hbox);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3579 gtk_widget_show(tbox);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3580 gtk_widget_show(bbox);
439
9e5a6c35dd64 [gaim-migrate @ 449]
Rob Flynn <gaim@robflynn.com>
parents: 423
diff changeset
3581 gtk_widget_show(fbox);
9e5a6c35dd64 [gaim-migrate @ 449]
Rob Flynn <gaim@robflynn.com>
parents: 423
diff changeset
3582 gtk_widget_show(frame);
1
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3583
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3584 gtk_widget_realize(ca->window);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3585 aol_icon(ca->window->window);
2846a03bda67 [gaim-migrate @ 10]
Rob Flynn <gaim@robflynn.com>
parents:
diff changeset
3586 }
555
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
3587
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
3588 /* smiley dialog */
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
3589
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
3590 void close_smiley_dialog(GtkWidget *widget, struct conversation *c)
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
3591 {
570
93c65fbaa622 [gaim-migrate @ 580]
Todd Kulesza <fflewddur>
parents: 567
diff changeset
3592 if (c->smiley)
93c65fbaa622 [gaim-migrate @ 580]
Todd Kulesza <fflewddur>
parents: 567
diff changeset
3593 {
93c65fbaa622 [gaim-migrate @ 580]
Todd Kulesza <fflewddur>
parents: 567
diff changeset
3594 set_state_lock(1);
93c65fbaa622 [gaim-migrate @ 580]
Todd Kulesza <fflewddur>
parents: 567
diff changeset
3595 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(c->smiley), FALSE);
93c65fbaa622 [gaim-migrate @ 580]
Todd Kulesza <fflewddur>
parents: 567
diff changeset
3596 set_state_lock(0);
93c65fbaa622 [gaim-migrate @ 580]
Todd Kulesza <fflewddur>
parents: 567
diff changeset
3597 }
555
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
3598 dialogwindows = g_list_remove(dialogwindows, c->smiley_dialog);
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
3599 gtk_widget_destroy(c->smiley_dialog);
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
3600 c->smiley_dialog = NULL;
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
3601 }
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
3602
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
3603 void set_smiley_array(GtkWidget *widget, int smiley_type)
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
3604 {
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
3605 int i;
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
3606
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
3607 for (i = 0; i < FACE_TOTAL; i++)
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
3608 smiley_array[i] = 0;
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
3609
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
3610 smiley_array[smiley_type] = 1;
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
3611
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
3612 return;
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
3613 }
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
3614
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
3615 void insert_smiley_text(GtkWidget *widget, struct conversation *c)
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
3616 {
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
3617 char *smiley_text;
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
3618 int i;
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
3619
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
3620 for (i = 0; i < FACE_TOTAL; i++)
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
3621 if (smiley_array[i] == 1)
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
3622 break;
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
3623
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
3624 switch (i)
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
3625 {
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
3626 case (FACE_ANGEL): smiley_text = g_strndup("O:-)", strlen("O:-)")); break;
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
3627 case (FACE_BIGSMILE): smiley_text = g_strndup(":-D", strlen(":-D")); break;
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
3628 case (FACE_BURP): smiley_text = g_strndup(":-!", strlen(":-!")); break;
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
3629 case (FACE_CROSSEDLIPS): smiley_text = g_strndup(":-X", strlen(":-X")); break;
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
3630 case (FACE_CRY): smiley_text = g_strndup(":'(", strlen(":'(")); break;
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
3631 case (FACE_EMBARRASSED): smiley_text = g_strndup(":-[", strlen(":-[")); break;
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
3632 case (FACE_KISS): smiley_text = g_strndup(":-*", strlen(":-*")); break;
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
3633 case (FACE_MONEYMOUTH): smiley_text = g_strndup(":-$", strlen(":-$")); break;
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
3634 case (FACE_SAD): smiley_text = g_strndup(":-(", strlen(":-(")); break;
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
3635 case (FACE_SCREAM): smiley_text = g_strndup("=-O", strlen("=-O")); break;
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
3636 case (FACE_SMILE): smiley_text = g_strndup(":-)", strlen(":-)")); break;
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
3637 case (FACE_SMILE8): smiley_text = g_strndup("8-)", strlen("8-)")); break;
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
3638 case (FACE_THINK): smiley_text = g_strndup(":-/", strlen(":-/")); break;
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
3639 case (FACE_TONGUE): smiley_text = g_strndup(":-p", strlen(":-p")); break;
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
3640 case (FACE_WINK): smiley_text = g_strndup(";-)", strlen(";-)")); break;
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
3641 case (FACE_YELL): smiley_text = g_strndup(">:o", strlen(">:o")); break;
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
3642 default: smiley_text = g_strndup(":-)", strlen(":-)")); break;
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
3643 }
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
3644
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
3645 surround(c->entry, smiley_text, "");
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
3646
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
3647 g_free(smiley_text);
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
3648
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
3649 close_smiley_dialog(NULL, c);
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
3650
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
3651 return;
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
3652 }
579
7b501c39a6ee [gaim-migrate @ 589]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 577
diff changeset
3653
7b501c39a6ee [gaim-migrate @ 589]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 577
diff changeset
3654 static void toolbar_add_smiley(struct conversation *c, GtkWidget *bar, char **xpm, GtkWidget *win, int face)
7b501c39a6ee [gaim-migrate @ 589]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 577
diff changeset
3655 {
7b501c39a6ee [gaim-migrate @ 589]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 577
diff changeset
3656 GtkWidget *tpm;
7b501c39a6ee [gaim-migrate @ 589]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 577
diff changeset
3657 GdkBitmap *mask;
7b501c39a6ee [gaim-migrate @ 589]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 577
diff changeset
3658 GdkPixmap *dpm;
7b501c39a6ee [gaim-migrate @ 589]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 577
diff changeset
3659 GtkWidget *button;
7b501c39a6ee [gaim-migrate @ 589]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 577
diff changeset
3660
7b501c39a6ee [gaim-migrate @ 589]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 577
diff changeset
3661 dpm = gdk_pixmap_create_from_xpm_d(win->window, &mask, &win->style->white, xpm);
7b501c39a6ee [gaim-migrate @ 589]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 577
diff changeset
3662 tpm = gtk_pixmap_new(dpm, mask);
7b501c39a6ee [gaim-migrate @ 589]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 577
diff changeset
3663 gtk_widget_show(tpm);
7b501c39a6ee [gaim-migrate @ 589]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 577
diff changeset
3664 button = gtk_toolbar_append_element(GTK_TOOLBAR(bar), GTK_TOOLBAR_CHILD_BUTTON, NULL, NULL, NULL, NULL, tpm, GTK_SIGNAL_FUNC(set_smiley_array), (int *)face);
7b501c39a6ee [gaim-migrate @ 589]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 577
diff changeset
3665 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(insert_smiley_text), c);
7b501c39a6ee [gaim-migrate @ 589]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 577
diff changeset
3666
7b501c39a6ee [gaim-migrate @ 589]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 577
diff changeset
3667 if (display_options & OPT_DISP_COOL_LOOK)
7b501c39a6ee [gaim-migrate @ 589]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 577
diff changeset
3668 gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE);
7b501c39a6ee [gaim-migrate @ 589]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 577
diff changeset
3669 }
555
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
3670
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
3671 void show_smiley_dialog(struct conversation *c, GtkWidget *widget)
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
3672 {
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
3673 GtkWidget *dialog;
584
56f7cb624e9e [gaim-migrate @ 594]
Todd Kulesza <fflewddur>
parents: 582
diff changeset
3674 GtkWidget *vbox, *smiley_box_1, *smiley_box_2, *smiley_box_3, *smiley_box_4;
555
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
3675 GtkWidget *win;
582
7409d7ae6621 [gaim-migrate @ 592]
Rob Flynn <gaim@robflynn.com>
parents: 579
diff changeset
3676 GtkWidget *bbox;
555
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
3677
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
3678 if (c->smiley_dialog)
558
f1b8f03db83f [gaim-migrate @ 568]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 555
diff changeset
3679 return;
579
7b501c39a6ee [gaim-migrate @ 589]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 577
diff changeset
3680
7b501c39a6ee [gaim-migrate @ 589]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 577
diff changeset
3681 win = c->window;
555
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
3682
579
7b501c39a6ee [gaim-migrate @ 589]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 577
diff changeset
3683 dialog = gtk_window_new(GTK_WINDOW_DIALOG);
7b501c39a6ee [gaim-migrate @ 589]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 577
diff changeset
3684 gtk_window_set_policy(GTK_WINDOW(dialog), 0, 0, 1);
7b501c39a6ee [gaim-migrate @ 589]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 577
diff changeset
3685
555
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
3686 /* setup boxes */
582
7409d7ae6621 [gaim-migrate @ 592]
Rob Flynn <gaim@robflynn.com>
parents: 579
diff changeset
3687 vbox = gtk_vbox_new(TRUE, 5);
7409d7ae6621 [gaim-migrate @ 592]
Rob Flynn <gaim@robflynn.com>
parents: 579
diff changeset
3688 bbox = gtk_hbox_new(FALSE, 5);
7409d7ae6621 [gaim-migrate @ 592]
Rob Flynn <gaim@robflynn.com>
parents: 579
diff changeset
3689
555
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
3690 smiley_box_1 = gtk_toolbar_new(GTK_ORIENTATION_HORIZONTAL, GTK_TOOLBAR_ICONS);
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
3691 smiley_box_2 = gtk_toolbar_new(GTK_ORIENTATION_HORIZONTAL, GTK_TOOLBAR_ICONS);
579
7b501c39a6ee [gaim-migrate @ 589]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 577
diff changeset
3692 smiley_box_3 = gtk_toolbar_new(GTK_ORIENTATION_HORIZONTAL, GTK_TOOLBAR_ICONS);
7b501c39a6ee [gaim-migrate @ 589]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 577
diff changeset
3693 smiley_box_4 = gtk_toolbar_new(GTK_ORIENTATION_HORIZONTAL, GTK_TOOLBAR_ICONS);
555
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
3694
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
3695 /* setup buttons */
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
3696
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
3697 /* pack buttons */
579
7b501c39a6ee [gaim-migrate @ 589]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 577
diff changeset
3698 toolbar_add_smiley(c, smiley_box_1, angel_xpm, win, FACE_ANGEL);
7b501c39a6ee [gaim-migrate @ 589]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 577
diff changeset
3699 toolbar_add_smiley(c, smiley_box_1, bigsmile_xpm, win, FACE_BIGSMILE);
7b501c39a6ee [gaim-migrate @ 589]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 577
diff changeset
3700 toolbar_add_smiley(c, smiley_box_1, burp_xpm, win, FACE_BURP);
7b501c39a6ee [gaim-migrate @ 589]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 577
diff changeset
3701 toolbar_add_smiley(c, smiley_box_1, crossedlips_xpm, win, FACE_CROSSEDLIPS);
7b501c39a6ee [gaim-migrate @ 589]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 577
diff changeset
3702
7b501c39a6ee [gaim-migrate @ 589]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 577
diff changeset
3703 toolbar_add_smiley(c, smiley_box_2, cry_xpm, win, FACE_CRY);
7b501c39a6ee [gaim-migrate @ 589]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 577
diff changeset
3704 toolbar_add_smiley(c, smiley_box_2, embarrassed_xpm, win, FACE_EMBARRASSED);
7b501c39a6ee [gaim-migrate @ 589]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 577
diff changeset
3705 toolbar_add_smiley(c, smiley_box_2, kiss_xpm, win, FACE_KISS);
7b501c39a6ee [gaim-migrate @ 589]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 577
diff changeset
3706 toolbar_add_smiley(c, smiley_box_2, moneymouth_xpm, win, FACE_MONEYMOUTH);
7b501c39a6ee [gaim-migrate @ 589]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 577
diff changeset
3707
7b501c39a6ee [gaim-migrate @ 589]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 577
diff changeset
3708 toolbar_add_smiley(c, smiley_box_3, sad_xpm, win, FACE_SAD);
7b501c39a6ee [gaim-migrate @ 589]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 577
diff changeset
3709 toolbar_add_smiley(c, smiley_box_3, scream_xpm, win, FACE_SCREAM);
7b501c39a6ee [gaim-migrate @ 589]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 577
diff changeset
3710 toolbar_add_smiley(c, smiley_box_3, smile_xpm, win, FACE_SMILE);
7b501c39a6ee [gaim-migrate @ 589]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 577
diff changeset
3711 toolbar_add_smiley(c, smiley_box_3, smile8_xpm, win, FACE_SMILE8);
7b501c39a6ee [gaim-migrate @ 589]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 577
diff changeset
3712
7b501c39a6ee [gaim-migrate @ 589]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 577
diff changeset
3713 toolbar_add_smiley(c, smiley_box_4, think_xpm, win, FACE_THINK);
7b501c39a6ee [gaim-migrate @ 589]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 577
diff changeset
3714 toolbar_add_smiley(c, smiley_box_4, tongue_xpm, win, FACE_TONGUE);
7b501c39a6ee [gaim-migrate @ 589]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 577
diff changeset
3715 toolbar_add_smiley(c, smiley_box_4, wink_xpm, win, FACE_WINK);
7b501c39a6ee [gaim-migrate @ 589]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 577
diff changeset
3716 toolbar_add_smiley(c, smiley_box_4, yell_xpm, win, FACE_YELL);
555
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
3717
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
3718 /* pack containers */
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
3719 gtk_box_pack_start(GTK_BOX(vbox), smiley_box_1, TRUE, TRUE, 0);
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
3720 gtk_box_pack_start(GTK_BOX(vbox), smiley_box_2, TRUE, TRUE, 0);
579
7b501c39a6ee [gaim-migrate @ 589]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 577
diff changeset
3721 gtk_box_pack_start(GTK_BOX(vbox), smiley_box_3, TRUE, TRUE, 0);
7b501c39a6ee [gaim-migrate @ 589]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 577
diff changeset
3722 gtk_box_pack_start(GTK_BOX(vbox), smiley_box_4, TRUE, TRUE, 0);
582
7409d7ae6621 [gaim-migrate @ 592]
Rob Flynn <gaim@robflynn.com>
parents: 579
diff changeset
3723
7409d7ae6621 [gaim-migrate @ 592]
Rob Flynn <gaim@robflynn.com>
parents: 579
diff changeset
3724 gtk_container_add(GTK_CONTAINER(dialog), vbox);
579
7b501c39a6ee [gaim-migrate @ 589]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 577
diff changeset
3725 gtk_container_set_border_width(GTK_CONTAINER(dialog), 5);
555
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
3726
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
3727 /* show everything */
567
102afb84ce45 [gaim-migrate @ 577]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 558
diff changeset
3728 gtk_window_set_title(GTK_WINDOW(dialog), _("Smile!"));
584
56f7cb624e9e [gaim-migrate @ 594]
Todd Kulesza <fflewddur>
parents: 582
diff changeset
3729 gtk_widget_show_all(dialog);
555
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
3730
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
3731 c->smiley_dialog = dialog;
584
56f7cb624e9e [gaim-migrate @ 594]
Todd Kulesza <fflewddur>
parents: 582
diff changeset
3732
555
66fe9f2c26ad [gaim-migrate @ 565]
Todd Kulesza <fflewddur>
parents: 550
diff changeset
3733 return;
558
f1b8f03db83f [gaim-migrate @ 568]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 555
diff changeset
3734 }