Mercurial > pidgin.yaz
annotate src/aim.c @ 535:f03f041c1aa9
[gaim-migrate @ 545]
fflewddur wrote a really cool patch to make buttons borderless, like the
buttons in winaim. of course, unlike winaim, it's optional. :)
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Thu, 27 Jul 2000 17:48:15 +0000 |
parents | 1181582366f5 |
children | e312b8b9bee5 |
rev | line source |
---|---|
1 | 1 /* |
2 * gaim | |
3 * | |
4 * Copyright (C) 1998-1999, Mark Spencer <markster@marko.net> | |
5 * | |
6 * This program is free software; you can redistribute it and/or modify | |
7 * it under the terms of the GNU General Public License as published by | |
8 * the Free Software Foundation; either version 2 of the License, or | |
9 * (at your option) any later version. | |
10 * | |
11 * This program is distributed in the hope that it will be useful, | |
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 * GNU General Public License for more details. | |
15 * | |
16 * You should have received a copy of the GNU General Public License | |
17 * along with this program; if not, write to the Free Software | |
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
19 * | |
20 */ | |
21 | |
349
b402a23f35df
[gaim-migrate @ 359]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
342
diff
changeset
|
22 #ifdef HAVE_CONFIG_H |
b402a23f35df
[gaim-migrate @ 359]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
342
diff
changeset
|
23 #include "../config.h" |
b402a23f35df
[gaim-migrate @ 359]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
342
diff
changeset
|
24 #endif |
1 | 25 #ifdef USE_THEMES |
26 #include <gnome.h> | |
27 #else | |
28 #ifdef USE_APPLET | |
29 #include "gnome_applet_mgr.h" | |
30 #include <gnome.h> | |
31 #endif /* USE_APPLET */ | |
32 #endif /* USE_THEMES */ | |
395
9a436c1d128d
[gaim-migrate @ 405]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
392
diff
changeset
|
33 #ifdef GAIM_PLUGINS |
9a436c1d128d
[gaim-migrate @ 405]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
392
diff
changeset
|
34 #include <dlfcn.h> |
9a436c1d128d
[gaim-migrate @ 405]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
392
diff
changeset
|
35 #endif /* GAIM_PLUGINS */ |
1 | 36 #include <gtk/gtk.h> |
37 #include <gdk/gdkx.h> | |
216
f7e17fb767eb
[gaim-migrate @ 226]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
200
diff
changeset
|
38 #include <gdk/gdk.h> |
1 | 39 #include <unistd.h> |
40 #include <netinet/in.h> | |
41 #include <arpa/inet.h> | |
42 #include <sys/wait.h> | |
43 #include <stdio.h> | |
44 #include <string.h> | |
45 #include <stdarg.h> | |
46 #include <stdlib.h> | |
228 | 47 #include <ctype.h> |
1 | 48 #include "gaim.h" |
49 #ifndef USE_APPLET | |
50 #include "pixmaps/logo.xpm" | |
51 #endif /* USE_APPLET */ | |
462 | 52 #include "locale.h" |
430 | 53 #include "gtkticker.h" |
54 | |
1 | 55 static GtkWidget *name; |
56 static GtkWidget *pass; | |
57 static GtkWidget *signon; | |
58 static GtkWidget *cancel; | |
59 static GtkWidget *progress; | |
60 static GtkWidget *notice; | |
61 | |
62 GList *permit = NULL; | |
63 GList *deny = NULL; | |
64 GList *log_conversations = NULL; | |
65 GList *buddy_pounces = NULL; | |
66 GList *away_messages = NULL; | |
67 GList *groups = NULL; | |
68 GList *buddy_chats = NULL; | |
69 GList *conversations = NULL; | |
70 GList *chat_rooms = NULL; | |
71 | |
72 GtkWidget *mainwindow = NULL; | |
73 | |
430 | 74 void BuddyTickerCreateWindow( void ); |
75 | |
1 | 76 char toc_addy[16]; |
26 | 77 char *quad_addr = NULL; |
1 | 78 |
338
9d258a0aa560
[gaim-migrate @ 348]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
296
diff
changeset
|
79 gboolean running = FALSE; /* whether or not we're currently trying to sign on */ |
1 | 80 |
81 void cancel_logon(void) | |
82 { | |
83 #ifdef USE_APPLET | |
84 set_applet_draw_closed(); | |
85 AppletCancelLogon(); | |
86 gtk_widget_hide(mainwindow); | |
87 #else | |
392
df5127560034
[gaim-migrate @ 402]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
369
diff
changeset
|
88 #ifdef GAIM_PLUGINS |
df5127560034
[gaim-migrate @ 402]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
369
diff
changeset
|
89 GList *c; |
df5127560034
[gaim-migrate @ 402]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
369
diff
changeset
|
90 struct gaim_callback *g; |
df5127560034
[gaim-migrate @ 402]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
369
diff
changeset
|
91 struct gaim_plugin *p; |
df5127560034
[gaim-migrate @ 402]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
369
diff
changeset
|
92 void (*function)(void *); |
df5127560034
[gaim-migrate @ 402]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
369
diff
changeset
|
93 void (*gaim_plugin_remove)(); |
df5127560034
[gaim-migrate @ 402]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
369
diff
changeset
|
94 char *error; |
df5127560034
[gaim-migrate @ 402]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
369
diff
changeset
|
95 |
df5127560034
[gaim-migrate @ 402]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
369
diff
changeset
|
96 /* first we tell those who have requested it we're quitting */ |
df5127560034
[gaim-migrate @ 402]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
369
diff
changeset
|
97 c = callbacks; |
df5127560034
[gaim-migrate @ 402]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
369
diff
changeset
|
98 while (c) { |
df5127560034
[gaim-migrate @ 402]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
369
diff
changeset
|
99 g = (struct gaim_callback *)c->data; |
df5127560034
[gaim-migrate @ 402]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
369
diff
changeset
|
100 if (g->event == event_quit && g->function != NULL) { |
df5127560034
[gaim-migrate @ 402]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
369
diff
changeset
|
101 function = g->function; |
df5127560034
[gaim-migrate @ 402]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
369
diff
changeset
|
102 (*function)(g->data); |
df5127560034
[gaim-migrate @ 402]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
369
diff
changeset
|
103 } |
df5127560034
[gaim-migrate @ 402]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
369
diff
changeset
|
104 c = c->next; |
df5127560034
[gaim-migrate @ 402]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
369
diff
changeset
|
105 } |
df5127560034
[gaim-migrate @ 402]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
369
diff
changeset
|
106 |
df5127560034
[gaim-migrate @ 402]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
369
diff
changeset
|
107 /* then we remove everyone in a mass suicide */ |
df5127560034
[gaim-migrate @ 402]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
369
diff
changeset
|
108 c = plugins; |
df5127560034
[gaim-migrate @ 402]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
369
diff
changeset
|
109 while (c) { |
df5127560034
[gaim-migrate @ 402]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
369
diff
changeset
|
110 p = (struct gaim_plugin *)c->data; |
df5127560034
[gaim-migrate @ 402]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
369
diff
changeset
|
111 gaim_plugin_remove = dlsym(p->handle, "gaim_plugin_remove"); |
df5127560034
[gaim-migrate @ 402]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
369
diff
changeset
|
112 if ((error = (char *)dlerror()) == NULL) |
df5127560034
[gaim-migrate @ 402]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
369
diff
changeset
|
113 (*gaim_plugin_remove)(); |
df5127560034
[gaim-migrate @ 402]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
369
diff
changeset
|
114 /* we don't need to worry about removing callbacks since |
df5127560034
[gaim-migrate @ 402]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
369
diff
changeset
|
115 * there won't be any more chance to call them back :) */ |
df5127560034
[gaim-migrate @ 402]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
369
diff
changeset
|
116 dlclose(p->handle); |
df5127560034
[gaim-migrate @ 402]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
369
diff
changeset
|
117 g_free(p->filename); /* why do i bother? */ |
df5127560034
[gaim-migrate @ 402]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
369
diff
changeset
|
118 g_free(p); |
403
d6f02d7f78d8
[gaim-migrate @ 413]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
395
diff
changeset
|
119 c = c->next; |
392
df5127560034
[gaim-migrate @ 402]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
369
diff
changeset
|
120 } |
df5127560034
[gaim-migrate @ 402]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
369
diff
changeset
|
121 #endif /* GAIM_PLUGINS */ |
df5127560034
[gaim-migrate @ 402]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
369
diff
changeset
|
122 |
1 | 123 exit(0); |
124 #endif /* USE_APPLET */ | |
125 } | |
126 | |
127 void set_login_progress(int howfar, char *whattosay) | |
128 { | |
129 gtk_progress_bar_update(GTK_PROGRESS_BAR(progress), | |
130 ((float)howfar / (float)LOGIN_STEPS)); | |
131 gtk_statusbar_pop(GTK_STATUSBAR(notice), 1); | |
132 gtk_statusbar_push(GTK_STATUSBAR(notice), 1, whattosay); | |
133 | |
134 while (gtk_events_pending()) | |
135 gtk_main_iteration(); | |
136 | |
137 /* Why do I need these? */ | |
138 usleep(10); | |
139 while (gtk_events_pending()) | |
140 gtk_main_iteration(); | |
141 | |
142 } | |
143 | |
144 void hide_login_progress(char *why) | |
145 { | |
146 gtk_progress_bar_update(GTK_PROGRESS_BAR(progress), | |
147 0); | |
148 gtk_statusbar_pop(GTK_STATUSBAR(notice), 1); | |
149 gtk_statusbar_push(GTK_STATUSBAR(notice), 1, why); | |
150 | |
151 while (gtk_events_pending()) | |
152 gtk_main_iteration(); | |
153 | |
154 /* Why do I need these? */ | |
155 usleep(10); | |
156 while (gtk_events_pending()) | |
157 gtk_main_iteration(); | |
158 } | |
159 | |
109
45bcfa3b584c
[gaim-migrate @ 119]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
107
diff
changeset
|
160 static int snd_tmout; |
133
e277d5f0c1dd
[gaim-migrate @ 143]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
109
diff
changeset
|
161 int logins_not_muted = 1; |
109
45bcfa3b584c
[gaim-migrate @ 119]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
107
diff
changeset
|
162 static void sound_timeout() { |
133
e277d5f0c1dd
[gaim-migrate @ 143]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
109
diff
changeset
|
163 logins_not_muted = 1; |
109
45bcfa3b584c
[gaim-migrate @ 119]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
107
diff
changeset
|
164 gtk_timeout_remove(snd_tmout); |
45bcfa3b584c
[gaim-migrate @ 119]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
107
diff
changeset
|
165 } |
45bcfa3b584c
[gaim-migrate @ 119]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
107
diff
changeset
|
166 |
228 | 167 char g_screenname[ 64 ]; /* gotta be enough */ |
168 | |
1 | 169 void dologin(GtkWidget *widget, GtkWidget *w) |
170 { | |
171 char *username = gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(name)->entry)); | |
172 char *password = gtk_entry_get_text(GTK_ENTRY(pass)); | |
228 | 173 int i; |
1 | 174 |
175 if (query_state() != STATE_OFFLINE) | |
176 return; | |
177 | |
178 if (!strlen(username)) { | |
355 | 179 hide_login_progress(_("Please enter your logon")); |
1 | 180 return; |
181 } | |
182 if (!strlen(password)) { | |
355 | 183 hide_login_progress(_("You must give your password")); |
1 | 184 return; |
185 } | |
186 | |
228 | 187 /* save screenname away for cache file use */ |
188 | |
189 strcpy( g_screenname, username ); | |
190 | |
191 /* fold cache screen name file to upper case to avoid problems | |
192 finding file later if user uses different case at login time */ | |
193 | |
194 for ( i = 0; i < strlen( g_screenname ); i++ ) | |
195 g_screenname[i] = toupper( g_screenname[i] ); | |
196 | |
1 | 197 #ifdef USE_APPLET |
198 set_applet_draw_closed(); | |
199 setUserState(signing_on); | |
200 #endif /* USE_APPLET */ | |
201 | |
84 | 202 if (running) return; |
203 running = TRUE; | |
1 | 204 |
84 | 205 if (serv_login(username, password) < 0) { |
206 running = FALSE; | |
1 | 207 return; |
84 | 208 } |
423
0d4e80bdb96b
[gaim-migrate @ 433]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
410
diff
changeset
|
209 |
0d4e80bdb96b
[gaim-migrate @ 433]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
410
diff
changeset
|
210 if (!USE_OSCAR) /* serv_login will set up USE_OSCAR */ |
0d4e80bdb96b
[gaim-migrate @ 433]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
410
diff
changeset
|
211 gaim_setup(); |
265
59f1748b09a6
[gaim-migrate @ 275]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
253
diff
changeset
|
212 } |
1 | 213 |
270
cfa39d39dec6
[gaim-migrate @ 280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
265
diff
changeset
|
214 void auth_failed() { |
cfa39d39dec6
[gaim-migrate @ 280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
265
diff
changeset
|
215 running = FALSE; |
cfa39d39dec6
[gaim-migrate @ 280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
265
diff
changeset
|
216 } |
cfa39d39dec6
[gaim-migrate @ 280]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
265
diff
changeset
|
217 |
265
59f1748b09a6
[gaim-migrate @ 275]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
253
diff
changeset
|
218 /* we need to do this for Oscar because serv_login only starts the login |
59f1748b09a6
[gaim-migrate @ 275]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
253
diff
changeset
|
219 * process, it doesn't end there. gaim_setup will be called later from |
59f1748b09a6
[gaim-migrate @ 275]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
253
diff
changeset
|
220 * oscar.c, after the buddy list is made and serv_finish_login is called */ |
59f1748b09a6
[gaim-migrate @ 275]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
253
diff
changeset
|
221 void gaim_setup() { |
109
45bcfa3b584c
[gaim-migrate @ 119]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
107
diff
changeset
|
222 if (sound_options & OPT_SOUND_LOGIN && |
45bcfa3b584c
[gaim-migrate @ 119]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
107
diff
changeset
|
223 sound_options & OPT_SOUND_SILENT_SIGNON) { |
133
e277d5f0c1dd
[gaim-migrate @ 143]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
109
diff
changeset
|
224 logins_not_muted = 0; |
109
45bcfa3b584c
[gaim-migrate @ 119]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
107
diff
changeset
|
225 snd_tmout = gtk_timeout_add(10000, (GtkFunction)sound_timeout, |
45bcfa3b584c
[gaim-migrate @ 119]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
107
diff
changeset
|
226 NULL); |
45bcfa3b584c
[gaim-migrate @ 119]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
107
diff
changeset
|
227 } |
45bcfa3b584c
[gaim-migrate @ 119]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
107
diff
changeset
|
228 |
84 | 229 #ifdef USE_APPLET |
342
f4fba304b236
[gaim-migrate @ 352]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
338
diff
changeset
|
230 setUserState(online); |
84 | 231 applet_widget_unregister_callback(APPLET_WIDGET(applet),"signon"); |
232 applet_widget_register_callback(APPLET_WIDGET(applet), | |
233 "signoff", | |
234 _("Signoff"), | |
235 signoff, | |
236 NULL); | |
265
59f1748b09a6
[gaim-migrate @ 275]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
253
diff
changeset
|
237 #endif /* USE_APPLET */ |
94
9f6ce50ffb78
[gaim-migrate @ 104]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
85
diff
changeset
|
238 |
9f6ce50ffb78
[gaim-migrate @ 104]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
85
diff
changeset
|
239 #ifdef GAIM_PLUGINS |
9f6ce50ffb78
[gaim-migrate @ 104]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
85
diff
changeset
|
240 { |
9f6ce50ffb78
[gaim-migrate @ 104]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
85
diff
changeset
|
241 GList *c = callbacks; |
9f6ce50ffb78
[gaim-migrate @ 104]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
85
diff
changeset
|
242 struct gaim_callback *g; |
9f6ce50ffb78
[gaim-migrate @ 104]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
85
diff
changeset
|
243 void (*function)(void *); |
9f6ce50ffb78
[gaim-migrate @ 104]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
85
diff
changeset
|
244 while (c) { |
9f6ce50ffb78
[gaim-migrate @ 104]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
85
diff
changeset
|
245 g = (struct gaim_callback *)c->data; |
9f6ce50ffb78
[gaim-migrate @ 104]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
85
diff
changeset
|
246 if (g->event == event_signon && g->function != NULL) { |
9f6ce50ffb78
[gaim-migrate @ 104]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
85
diff
changeset
|
247 function = g->function; |
9f6ce50ffb78
[gaim-migrate @ 104]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
85
diff
changeset
|
248 (*function)(g->data); |
9f6ce50ffb78
[gaim-migrate @ 104]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
85
diff
changeset
|
249 } |
9f6ce50ffb78
[gaim-migrate @ 104]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
85
diff
changeset
|
250 c = c->next; |
9f6ce50ffb78
[gaim-migrate @ 104]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
85
diff
changeset
|
251 } |
9f6ce50ffb78
[gaim-migrate @ 104]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
85
diff
changeset
|
252 } |
265
59f1748b09a6
[gaim-migrate @ 275]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
253
diff
changeset
|
253 #endif /* GAIM_PLUGINS */ |
94
9f6ce50ffb78
[gaim-migrate @ 104]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
85
diff
changeset
|
254 |
84 | 255 running = FALSE; |
256 return; | |
1 | 257 } |
258 | |
259 | |
260 | |
261 | |
262 void doenter(GtkWidget *widget, GtkWidget *w) | |
263 { | |
264 if (widget == name) { | |
265 gtk_entry_set_text(GTK_ENTRY(pass),""); | |
266 gtk_entry_select_region(GTK_ENTRY(GTK_COMBO(name)->entry), 0, 0); | |
158
e9414f13d8b7
[gaim-migrate @ 168]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
157
diff
changeset
|
267 gtk_widget_grab_focus(pass); |
1 | 268 } else if (widget == pass) { |
158
e9414f13d8b7
[gaim-migrate @ 168]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
157
diff
changeset
|
269 gtk_widget_grab_focus(signon); |
1 | 270 } |
271 | |
272 } | |
273 | |
274 | |
275 static void combo_changed(GtkWidget *w, GtkWidget *combo) | |
276 { | |
158
e9414f13d8b7
[gaim-migrate @ 168]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
157
diff
changeset
|
277 char *txt = gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(combo)->entry)); |
1 | 278 struct aim_user *u; |
279 | |
25 | 280 if (!(general_options & OPT_GEN_REMEMBER_PASS)) { |
1 | 281 return; |
25 | 282 } |
283 | |
1 | 284 u = find_user(txt); |
285 | |
286 if (u != NULL) { | |
287 gtk_entry_set_text(GTK_ENTRY(pass), u->password); | |
288 } else { | |
289 gtk_entry_set_text(GTK_ENTRY(pass), ""); | |
290 } | |
25 | 291 |
1 | 292 return; |
293 } | |
294 | |
295 static GList *combo_user_names() | |
296 { | |
297 GList *usr = aim_users; | |
298 GList *tmp = NULL; | |
299 struct aim_user *u; | |
300 | |
301 | |
302 if (!usr) | |
303 return g_list_append(NULL, "<unknown>"); | |
304 | |
305 while(usr) { | |
306 u = (struct aim_user *)usr->data; | |
307 tmp = g_list_append(tmp, g_strdup(u->username)); | |
308 usr = usr->next; | |
309 | |
310 } | |
311 | |
312 return tmp; | |
313 } | |
314 | |
315 | |
316 | |
317 void show_login() | |
318 { | |
319 GtkWidget *options; | |
96
247f540ea6e1
[gaim-migrate @ 106]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
94
diff
changeset
|
320 #ifdef GAIM_PLUGINS |
247f540ea6e1
[gaim-migrate @ 106]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
94
diff
changeset
|
321 GtkWidget *plugs; |
247f540ea6e1
[gaim-migrate @ 106]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
94
diff
changeset
|
322 #endif |
1 | 323 GtkWidget *reg; |
324 GtkWidget *bbox; | |
96
247f540ea6e1
[gaim-migrate @ 106]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
94
diff
changeset
|
325 GtkWidget *hbox; |
1 | 326 GtkWidget *sbox; |
327 GtkWidget *label; | |
328 GtkWidget *table; | |
329 GtkWidget *remember; | |
330 | |
331 #ifndef USE_APPLET | |
332 GtkWidget *pmw; | |
333 GdkPixmap *pm; | |
334 GtkStyle *style; | |
335 GdkBitmap *mask; | |
336 #endif /* USE_APPLET */ | |
337 | |
338 if (mainwindow) { | |
339 gtk_widget_show(mainwindow); | |
340 return; | |
341 } | |
430 | 342 |
1 | 343 mainwindow = gtk_window_new(GTK_WINDOW_TOPLEVEL); |
350
fd3cc0a28d5d
[gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
349
diff
changeset
|
344 signon = gtk_button_new_with_label(_("Signon")); |
fd3cc0a28d5d
[gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
349
diff
changeset
|
345 cancel = gtk_button_new_with_label(_("Cancel")); |
fd3cc0a28d5d
[gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
349
diff
changeset
|
346 reg = gtk_button_new_with_label(_("Register")); |
fd3cc0a28d5d
[gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
349
diff
changeset
|
347 options = gtk_button_new_with_label(_("Options")); |
96
247f540ea6e1
[gaim-migrate @ 106]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
94
diff
changeset
|
348 #ifdef GAIM_PLUGINS |
350
fd3cc0a28d5d
[gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
349
diff
changeset
|
349 plugs = gtk_button_new_with_label(_("Plugins")); |
96
247f540ea6e1
[gaim-migrate @ 106]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
94
diff
changeset
|
350 #endif |
1 | 351 table = gtk_table_new(8, 2, FALSE); |
352 name = gtk_combo_new(); | |
353 pass = gtk_entry_new(); | |
354 notice = gtk_statusbar_new(); | |
355 progress = gtk_progress_bar_new(); | |
356 | |
357 gtk_combo_set_popdown_strings(GTK_COMBO(name), combo_user_names()); | |
358 | |
535
f03f041c1aa9
[gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
508
diff
changeset
|
359 if (display_options & OPT_DISP_COOL_LOOK) |
f03f041c1aa9
[gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
508
diff
changeset
|
360 { |
f03f041c1aa9
[gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
508
diff
changeset
|
361 gtk_button_set_relief(GTK_BUTTON(signon), GTK_RELIEF_NONE); |
f03f041c1aa9
[gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
508
diff
changeset
|
362 gtk_button_set_relief(GTK_BUTTON(cancel), GTK_RELIEF_NONE); |
f03f041c1aa9
[gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
508
diff
changeset
|
363 gtk_button_set_relief(GTK_BUTTON(reg), GTK_RELIEF_NONE); |
f03f041c1aa9
[gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
508
diff
changeset
|
364 gtk_button_set_relief(GTK_BUTTON(options), GTK_RELIEF_NONE); |
f03f041c1aa9
[gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
508
diff
changeset
|
365 gtk_button_set_relief(GTK_BUTTON(plugs), GTK_RELIEF_NONE); |
f03f041c1aa9
[gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
508
diff
changeset
|
366 } |
f03f041c1aa9
[gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
508
diff
changeset
|
367 |
1 | 368 /* Make the buttons do stuff */ |
369 /* Clicking the button initiates a login */ | |
370 gtk_signal_connect(GTK_OBJECT(signon), "clicked", | |
371 GTK_SIGNAL_FUNC(dologin), mainwindow); | |
372 gtk_signal_connect(GTK_OBJECT(cancel), "clicked", | |
373 GTK_SIGNAL_FUNC(cancel_logon), mainwindow); | |
374 /* Allow user to change prefs before logging in */ | |
375 gtk_signal_connect(GTK_OBJECT(options), "clicked", | |
376 GTK_SIGNAL_FUNC(show_prefs), NULL); | |
96
247f540ea6e1
[gaim-migrate @ 106]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
94
diff
changeset
|
377 #ifdef GAIM_PLUGINS |
247f540ea6e1
[gaim-migrate @ 106]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
94
diff
changeset
|
378 /* Allow user to control plugins before logging in */ |
247f540ea6e1
[gaim-migrate @ 106]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
94
diff
changeset
|
379 gtk_signal_connect(GTK_OBJECT(plugs), "clicked", |
247f540ea6e1
[gaim-migrate @ 106]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
94
diff
changeset
|
380 GTK_SIGNAL_FUNC(show_plugins), NULL); |
247f540ea6e1
[gaim-migrate @ 106]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
94
diff
changeset
|
381 #endif |
1 | 382 |
383 /* Register opens the right URL */ | |
384 gtk_signal_connect(GTK_OBJECT(reg), "clicked", | |
286 | 385 GTK_SIGNAL_FUNC(open_url), "http://aim.aol.com/aimnew/Aim/register.adp?promo=106723&pageset=Aim&client=no"); |
1 | 386 /* Enter in the username clears the password and sets |
387 the pointer in the password field */ | |
388 gtk_signal_connect(GTK_OBJECT(GTK_COMBO(name)->entry), "activate", | |
389 GTK_SIGNAL_FUNC(doenter), mainwindow); | |
390 | |
391 gtk_signal_connect(GTK_OBJECT(GTK_COMBO(name)->entry), "changed", | |
392 GTK_SIGNAL_FUNC(combo_changed), name); | |
393 | |
394 gtk_signal_connect(GTK_OBJECT(pass), "activate", | |
395 GTK_SIGNAL_FUNC(doenter), mainwindow); | |
396 gtk_signal_connect(GTK_OBJECT(mainwindow), "delete_event", | |
397 GTK_SIGNAL_FUNC(cancel_logon), mainwindow); | |
398 /* Homogenous spacing, 10 padding */ | |
399 bbox = gtk_hbox_new(TRUE, 10); | |
96
247f540ea6e1
[gaim-migrate @ 106]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
94
diff
changeset
|
400 hbox = gtk_hbox_new(TRUE, 10); |
1 | 401 sbox = gtk_vbox_new(TRUE, 10); |
402 | |
403 gtk_box_pack_start(GTK_BOX(bbox), reg, TRUE, TRUE, 0); | |
404 gtk_box_pack_start(GTK_BOX(bbox), cancel, TRUE, TRUE, 0); | |
405 gtk_box_pack_start(GTK_BOX(bbox), signon, TRUE, TRUE, 0); | |
96
247f540ea6e1
[gaim-migrate @ 106]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
94
diff
changeset
|
406 |
247f540ea6e1
[gaim-migrate @ 106]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
94
diff
changeset
|
407 gtk_box_pack_start(GTK_BOX(hbox), options, TRUE, TRUE, 0); |
247f540ea6e1
[gaim-migrate @ 106]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
94
diff
changeset
|
408 #ifdef GAIM_PLUGINS |
247f540ea6e1
[gaim-migrate @ 106]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
94
diff
changeset
|
409 gtk_box_pack_start(GTK_BOX(hbox), plugs, TRUE, TRUE, 0); |
247f540ea6e1
[gaim-migrate @ 106]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
94
diff
changeset
|
410 #endif |
247f540ea6e1
[gaim-migrate @ 106]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
94
diff
changeset
|
411 |
1 | 412 gtk_box_pack_start(GTK_BOX(sbox), bbox, TRUE, TRUE, 0); |
96
247f540ea6e1
[gaim-migrate @ 106]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
94
diff
changeset
|
413 gtk_box_pack_start(GTK_BOX(sbox), hbox, TRUE, TRUE, 0); |
1 | 414 |
415 /* Labels for selectors and text boxes */ | |
416 #if 0 | |
417 label = gtk_label_new("TOC: "); | |
418 gtk_table_attach(GTK_TABLE(table), label, 0,1,1,2,0,0, 5, 5); | |
419 gtk_widget_show(label); | |
420 #endif | |
350
fd3cc0a28d5d
[gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
349
diff
changeset
|
421 label = gtk_label_new(_("Screen Name: ")); |
1 | 422 gtk_table_attach(GTK_TABLE(table), label, 0,1,2,3,0,0, 5, 5); |
423 gtk_widget_show(label); | |
350
fd3cc0a28d5d
[gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
349
diff
changeset
|
424 label = gtk_label_new(_("Password: ")); |
1 | 425 gtk_table_attach(GTK_TABLE(table), label, 0,1,3,4,0,0, 5, 5); |
426 gtk_widget_show(label); | |
350
fd3cc0a28d5d
[gaim-migrate @ 360]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
349
diff
changeset
|
427 remember = gtk_check_button_new_with_label(_("Remember Password")); |
1 | 428 gtk_table_attach(GTK_TABLE(table), remember, 0,2,4,5,0,0, 5, 5); |
429 gtk_widget_show(remember); | |
430 | |
431 gtk_widget_show(options); | |
96
247f540ea6e1
[gaim-migrate @ 106]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
94
diff
changeset
|
432 #ifdef GAIM_PLUGINS |
247f540ea6e1
[gaim-migrate @ 106]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
94
diff
changeset
|
433 gtk_widget_show(plugs); |
247f540ea6e1
[gaim-migrate @ 106]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
94
diff
changeset
|
434 #endif |
1 | 435 |
436 /* Adjust sizes of inputs */ | |
437 gtk_widget_set_usize(name,95,0); | |
438 gtk_widget_set_usize(pass,95,0); | |
439 | |
440 | |
441 /* Status and label */ | |
442 gtk_widget_show(notice); | |
443 | |
444 gtk_widget_set_usize(progress,150,0); | |
445 | |
446 gtk_widget_show(progress); | |
447 | |
448 gtk_table_attach(GTK_TABLE(table), progress, 0, 2, 6, 7, 0, 0, 5, 5); | |
449 gtk_widget_set_usize(GTK_STATUSBAR(notice)->label, 150, 0); | |
450 gtk_table_attach(GTK_TABLE(table), notice, 0, 2, 8, 9, 0, 0, 5, 5); | |
451 | |
452 /* Attach the buttons at the bottom */ | |
453 gtk_widget_show(signon); | |
454 gtk_widget_show(cancel); | |
455 gtk_widget_show(reg); | |
456 gtk_widget_show(bbox); | |
96
247f540ea6e1
[gaim-migrate @ 106]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
94
diff
changeset
|
457 gtk_widget_show(hbox); |
1 | 458 gtk_widget_show(sbox); |
459 gtk_table_attach(GTK_TABLE(table), sbox, 0,2,7,8,0,0, 5, 5); | |
460 | |
461 /* Text fields */ | |
462 | |
463 gtk_table_attach(GTK_TABLE(table),name,1,2,2,3,0,0,5,5); | |
464 gtk_widget_show(name); | |
465 gtk_table_attach(GTK_TABLE(table),pass,1,2,3,4,0,0,5,5); | |
466 gtk_entry_set_visibility(GTK_ENTRY(pass), FALSE); | |
467 gtk_widget_show(pass); | |
468 | |
469 gtk_container_border_width(GTK_CONTAINER(sbox), 10); | |
470 | |
471 gtk_container_add(GTK_CONTAINER(mainwindow),table ); | |
472 | |
473 gtk_widget_show(table); | |
355 | 474 gtk_window_set_title(GTK_WINDOW(mainwindow),_("Gaim - Login")); |
1 | 475 |
476 | |
477 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(remember), (general_options & OPT_GEN_REMEMBER_PASS)); | |
423
0d4e80bdb96b
[gaim-migrate @ 433]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
410
diff
changeset
|
478 |
1 | 479 if (current_user) { |
508
1181582366f5
[gaim-migrate @ 518]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
462
diff
changeset
|
480 sprintf(debug_buff, "Current user is %s\n", current_user->username); |
1181582366f5
[gaim-migrate @ 518]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
462
diff
changeset
|
481 debug_print(debug_buff); |
1181582366f5
[gaim-migrate @ 518]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
462
diff
changeset
|
482 gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(name)->entry), current_user->username); |
158
e9414f13d8b7
[gaim-migrate @ 168]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
157
diff
changeset
|
483 if ((general_options & OPT_GEN_REMEMBER_PASS)) { |
e9414f13d8b7
[gaim-migrate @ 168]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
157
diff
changeset
|
484 combo_changed(NULL, name); |
157
aad89d9bce85
[gaim-migrate @ 167]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
155
diff
changeset
|
485 gtk_widget_grab_focus(signon); |
158
e9414f13d8b7
[gaim-migrate @ 168]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
157
diff
changeset
|
486 } else { |
157
aad89d9bce85
[gaim-migrate @ 167]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
155
diff
changeset
|
487 gtk_widget_grab_focus(pass); |
158
e9414f13d8b7
[gaim-migrate @ 168]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
157
diff
changeset
|
488 } |
e9414f13d8b7
[gaim-migrate @ 168]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
157
diff
changeset
|
489 } else { |
157
aad89d9bce85
[gaim-migrate @ 167]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
155
diff
changeset
|
490 gtk_widget_grab_focus(name); |
158
e9414f13d8b7
[gaim-migrate @ 168]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
157
diff
changeset
|
491 } |
1 | 492 |
493 | |
494 gtk_signal_connect(GTK_OBJECT(remember), "clicked", GTK_SIGNAL_FUNC(set_general_option), (int *)OPT_GEN_REMEMBER_PASS); | |
495 | |
496 | |
497 gtk_widget_realize(mainwindow); | |
498 | |
499 #ifndef USE_APPLET | |
500 /* Logo at the top */ | |
501 style = gtk_widget_get_style(mainwindow); | |
502 pm = gdk_pixmap_create_from_xpm_d(mainwindow->window, &mask, | |
503 &style->bg[GTK_STATE_NORMAL], (gchar **)aol_logo); | |
504 pmw = gtk_pixmap_new( pm, mask); | |
505 gtk_table_attach(GTK_TABLE(table), pmw, 0,2,0,1,0,0,5,5); | |
506 gtk_widget_show(pmw); | |
507 #endif /* USE_APPLET */ | |
508 | |
509 | |
510 aol_icon(mainwindow->window); | |
511 #ifndef _WIN32 | |
512 gdk_window_set_group(mainwindow->window, mainwindow->window); | |
513 #endif | |
514 | |
515 | |
516 gtk_widget_show(mainwindow); | |
436 | 517 |
518 SetTickerPrefs(); | |
1 | 519 |
520 if((general_options & OPT_GEN_AUTO_LOGIN) && | |
521 (general_options & OPT_GEN_REMEMBER_PASS)) { | |
522 dologin(signon, NULL); | |
523 } | |
524 } | |
525 | |
200
bc117fbcf527
[gaim-migrate @ 210]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
184
diff
changeset
|
526 extern void show_debug(GtkObject *); |
180 | 527 |
1 | 528 int main(int argc, char *argv[]) |
529 { | |
369
cf895313fc50
[gaim-migrate @ 379]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
357
diff
changeset
|
530 #ifdef ENABLE_NLS |
cf895313fc50
[gaim-migrate @ 379]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
357
diff
changeset
|
531 bindtextdomain(PACKAGE, LOCALEDIR); |
cf895313fc50
[gaim-migrate @ 379]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
357
diff
changeset
|
532 textdomain(PACKAGE); |
cf895313fc50
[gaim-migrate @ 379]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
357
diff
changeset
|
533 #endif |
cf895313fc50
[gaim-migrate @ 379]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
357
diff
changeset
|
534 |
1 | 535 #ifdef USE_APPLET |
338
9d258a0aa560
[gaim-migrate @ 348]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
296
diff
changeset
|
536 init_applet_mgr(argc, argv); |
1 | 537 #elif defined USE_THEMES |
538 gnome_init("GAIM",NULL,argc,argv); | |
539 #else | |
540 gtk_init(&argc, &argv); | |
541 #endif /* USE_THEMES */ | |
542 | |
543 set_defaults(); | |
544 load_prefs(); | |
180 | 545 |
176
c99d0b82c8a8
[gaim-migrate @ 186]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
158
diff
changeset
|
546 if (general_options & OPT_GEN_DEBUG) |
c99d0b82c8a8
[gaim-migrate @ 186]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
158
diff
changeset
|
547 show_debug(NULL); |
1 | 548 |
216
f7e17fb767eb
[gaim-migrate @ 226]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
200
diff
changeset
|
549 gdk_threads_enter(); |
f7e17fb767eb
[gaim-migrate @ 226]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
200
diff
changeset
|
550 |
1 | 551 #ifdef USE_APPLET |
552 applet_widget_register_callback(APPLET_WIDGET(applet), | |
553 "prefs", | |
554 _("Preferences"), | |
555 show_prefs, | |
556 NULL); | |
557 applet_widget_register_callback(APPLET_WIDGET(applet), | |
558 "signon", | |
559 _("Signon"), | |
342
f4fba304b236
[gaim-migrate @ 352]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
338
diff
changeset
|
560 applet_do_signon, |
1 | 561 NULL); |
97
5b4b7aa8dd9a
[gaim-migrate @ 107]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
96
diff
changeset
|
562 #ifdef GAIM_PLUGINS |
96
247f540ea6e1
[gaim-migrate @ 106]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
94
diff
changeset
|
563 applet_widget_register_callback(APPLET_WIDGET(applet), |
247f540ea6e1
[gaim-migrate @ 106]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
94
diff
changeset
|
564 "plugins", |
247f540ea6e1
[gaim-migrate @ 106]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
94
diff
changeset
|
565 _("Plugins"), |
247f540ea6e1
[gaim-migrate @ 106]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
94
diff
changeset
|
566 GTK_SIGNAL_FUNC(show_plugins), |
247f540ea6e1
[gaim-migrate @ 106]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
94
diff
changeset
|
567 NULL); |
97
5b4b7aa8dd9a
[gaim-migrate @ 107]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
96
diff
changeset
|
568 #endif /* GAIM_PLUGINS */ |
1 | 569 |
570 if((general_options & OPT_GEN_AUTO_LOGIN) && | |
571 (general_options & OPT_GEN_REMEMBER_PASS)) { | |
572 | |
573 applet_show_login(APPLET_WIDGET(applet), NULL); | |
574 } | |
82 | 575 |
576 update_pixmaps(); | |
1 | 577 |
578 applet_widget_gtk_main(); | |
579 #else | |
580 | |
581 | |
582 show_login(); | |
583 gtk_main(); | |
584 | |
585 #endif /* USE_APPLET */ | |
216
f7e17fb767eb
[gaim-migrate @ 226]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
200
diff
changeset
|
586 gdk_threads_leave(); |
1 | 587 |
588 return 0; | |
589 | |
590 } |