annotate src/aim.c @ 644:b3900e312d8e

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