annotate src/gtkconn.c @ 6066:c99959f1bb73

[gaim-migrate @ 6516] Re-add javabsp's F2 patch. I didn't feel like taking it out of my CVS again, and I think he'll be able to get it working without the weird highlight behavior. Also fixed the ctlr+a/ctrl+pgup/ctrl+pgdown thing in gtkimhtml rather than gtkconv.c. So now it applies to info windows and other stuff. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Wed, 09 Jul 2003 00:33:06 +0000
parents 547ba881bc7e
children 99f4bbeb27bc
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5717
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
1 /*
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
2 * gaim
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
3 *
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
4 * Copyright (C) 1998-1999, Mark Spencer <markster@marko.net>
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
5 *
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
6 * This program is free software; you can redistribute it and/or modify
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
7 * it under the terms of the GNU General Public License as published by
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
8 * the Free Software Foundation; either version 2 of the License, or
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
9 * (at your option) any later version.
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
10 *
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
11 * This program is distributed in the hope that it will be useful,
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
14 * GNU General Public License for more details.
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
15 *
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
16 * You should have received a copy of the GNU General Public License
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
17 * along with this program; if not, write to the Free Software
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
19 *
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
20 */
5872
059d95c67cda [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5746
diff changeset
21 #include "internal.h"
5717
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
22
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
23 #include "account.h"
5872
059d95c67cda [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5746
diff changeset
24 #include "debug.h"
059d95c67cda [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5746
diff changeset
25 #include "notify.h"
059d95c67cda [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5746
diff changeset
26 #include "util.h"
5717
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
27
5872
059d95c67cda [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5746
diff changeset
28 #include "gtkblist.h"
6036
547ba881bc7e [gaim-migrate @ 6486]
Mark Doliner <mark@kingant.net>
parents: 6021
diff changeset
29 #include "gtkrequest.h"
5872
059d95c67cda [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5746
diff changeset
30 #include "gtkutils.h"
059d95c67cda [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5746
diff changeset
31
059d95c67cda [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5746
diff changeset
32 #include "ui.h"
5717
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
33
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
34 struct signon_meter {
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
35 GaimAccount *account;
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
36 GtkWidget *button;
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
37 GtkWidget *progress;
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
38 GtkWidget *status;
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
39 };
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
40
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
41 struct meter_window {
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
42 GtkWidget *window;
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
43 GtkWidget *table;
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
44 gint rows;
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
45 gint active_count;
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
46 GSList *meters;
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
47 } *meter_win = NULL;
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
48
5991
5d5bad909bc4 [gaim-migrate @ 6439]
Christian Hammond <chipx86@chipx86.com>
parents: 5989
diff changeset
49 static void kill_meter(struct signon_meter *meter, const char *text);
5d5bad909bc4 [gaim-migrate @ 6439]
Christian Hammond <chipx86@chipx86.com>
parents: 5989
diff changeset
50
5717
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
51 static void cancel_signon(GtkWidget *button, struct signon_meter *meter)
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
52 {
5991
5d5bad909bc4 [gaim-migrate @ 6439]
Christian Hammond <chipx86@chipx86.com>
parents: 5989
diff changeset
53 if (meter->account->gc != NULL) {
5d5bad909bc4 [gaim-migrate @ 6439]
Christian Hammond <chipx86@chipx86.com>
parents: 5989
diff changeset
54 meter->account->gc->wants_to_die = TRUE;
5d5bad909bc4 [gaim-migrate @ 6439]
Christian Hammond <chipx86@chipx86.com>
parents: 5989
diff changeset
55 gaim_connection_destroy(meter->account->gc);
5d5bad909bc4 [gaim-migrate @ 6439]
Christian Hammond <chipx86@chipx86.com>
parents: 5989
diff changeset
56 }
5d5bad909bc4 [gaim-migrate @ 6439]
Christian Hammond <chipx86@chipx86.com>
parents: 5989
diff changeset
57 else {
5d5bad909bc4 [gaim-migrate @ 6439]
Christian Hammond <chipx86@chipx86.com>
parents: 5989
diff changeset
58 kill_meter(meter, _("Done."));
5987
6e19ad2ef712 [gaim-migrate @ 6435]
Christian Hammond <chipx86@chipx86.com>
parents: 5936
diff changeset
59
5991
5d5bad909bc4 [gaim-migrate @ 6439]
Christian Hammond <chipx86@chipx86.com>
parents: 5989
diff changeset
60 if (gaim_connections_get_all() == NULL) {
5d5bad909bc4 [gaim-migrate @ 6439]
Christian Hammond <chipx86@chipx86.com>
parents: 5989
diff changeset
61 destroy_all_dialogs();
5d5bad909bc4 [gaim-migrate @ 6439]
Christian Hammond <chipx86@chipx86.com>
parents: 5989
diff changeset
62
5d5bad909bc4 [gaim-migrate @ 6439]
Christian Hammond <chipx86@chipx86.com>
parents: 5989
diff changeset
63 gaim_blist_destroy();
5d5bad909bc4 [gaim-migrate @ 6439]
Christian Hammond <chipx86@chipx86.com>
parents: 5989
diff changeset
64
5d5bad909bc4 [gaim-migrate @ 6439]
Christian Hammond <chipx86@chipx86.com>
parents: 5989
diff changeset
65 show_login();
5d5bad909bc4 [gaim-migrate @ 6439]
Christian Hammond <chipx86@chipx86.com>
parents: 5989
diff changeset
66 }
5d5bad909bc4 [gaim-migrate @ 6439]
Christian Hammond <chipx86@chipx86.com>
parents: 5989
diff changeset
67 }
5717
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
68 }
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
69
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
70 static void cancel_all () {
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
71 GSList *m = meter_win ? meter_win->meters : NULL;
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
72
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
73 while (m) {
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
74 cancel_signon(NULL, m->data);
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
75 m = meter_win ? meter_win->meters : NULL;
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
76 }
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
77 }
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
78
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
79 static gint meter_destroy(GtkWidget *window, GdkEvent *evt, struct signon_meter *meter)
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
80 {
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
81 return TRUE;
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
82 }
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
83
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
84 static struct signon_meter *find_signon_meter(GaimConnection *gc)
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
85 {
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
86 GSList *m = meter_win ? meter_win->meters : NULL;
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
87
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
88 while (m) {
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
89 if (((struct signon_meter *)m->data)->account == gc->account)
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
90 return m->data;
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
91 m = m->next;
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
92 }
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
93
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
94 return NULL;
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
95 }
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
96
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
97 static GtkWidget* create_meter_pixmap (GaimConnection *gc)
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
98 {
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
99 GdkPixbuf *pb = create_prpl_icon(gc->account);
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
100 GdkPixbuf *scale = gdk_pixbuf_scale_simple(pb, 30,30,GDK_INTERP_BILINEAR);
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
101 GtkWidget *image =
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
102 gtk_image_new_from_pixbuf(scale);
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
103 g_object_unref(G_OBJECT(pb));
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
104 g_object_unref(G_OBJECT(scale));
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
105 return image;
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
106 }
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
107
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
108
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
109
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
110 static struct signon_meter *
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
111 new_meter(GaimConnection *gc, GtkWidget *widget,
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
112 GtkWidget *table, gint *rows)
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
113 {
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
114 GtkWidget *graphic;
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
115 GtkWidget *label;
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
116 GtkWidget *nest_vbox;
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
117 GString *name_to_print;
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
118 struct signon_meter *meter;
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
119
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
120
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
121 meter = g_new0(struct signon_meter, 1);
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
122
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
123 meter->account = gaim_connection_get_account(gc);
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
124 name_to_print = g_string_new(gaim_account_get_username(meter->account));
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
125
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
126 (*rows)++;
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
127 gtk_table_resize (GTK_TABLE(table), *rows, 4);
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
128
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
129 graphic = create_meter_pixmap(gc);
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
130
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
131 nest_vbox = gtk_vbox_new (FALSE, 0);
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
132
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
133 g_string_prepend(name_to_print, _("Signon: "));
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
134 label = gtk_label_new (name_to_print->str);
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
135 g_string_free(name_to_print, TRUE);
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
136 gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
137
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
138 meter->status = gtk_label_new("");
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
139 gtk_misc_set_alignment(GTK_MISC(meter->status), 0, 0.5);
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
140 gtk_widget_set_size_request(meter->status, 250, -1);
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
141
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
142 meter->progress = gtk_progress_bar_new ();
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
143
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
144 meter->button = gaim_pixbuf_button_from_stock (_("Cancel"), GTK_STOCK_CANCEL, GAIM_BUTTON_HORIZONTAL);
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
145 g_signal_connect(G_OBJECT (meter->button), "clicked",
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
146 G_CALLBACK (cancel_signon), meter);
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
147
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
148 gtk_table_attach (GTK_TABLE (table), graphic, 0, 1, *rows, *rows+1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0);
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
149 gtk_table_attach (GTK_TABLE (table), nest_vbox, 1, 2, *rows, *rows+1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0);
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
150 gtk_box_pack_start (GTK_BOX (nest_vbox), GTK_WIDGET (label), FALSE, FALSE, 0);
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
151 gtk_box_pack_start (GTK_BOX (nest_vbox), GTK_WIDGET (meter->status), FALSE, FALSE, 0);
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
152 gtk_table_attach (GTK_TABLE (table), meter->progress, 2, 3, *rows, *rows+1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0);
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
153 gtk_table_attach (GTK_TABLE (table), meter->button, 3, 4, *rows, *rows+1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0);
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
154
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
155 gtk_widget_show_all (GTK_WIDGET (meter_win->window));
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
156
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
157 meter_win->active_count++;
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
158
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
159 return meter;
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
160 }
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
161
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
162 static void kill_meter(struct signon_meter *meter, const char *text) {
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
163 gtk_widget_set_sensitive (meter->button, FALSE);
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
164 gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(meter->progress), 1);
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
165 gtk_label_set_text(GTK_LABEL(meter->status), text);
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
166 meter_win->active_count--;
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
167 if (meter_win->active_count == 0) {
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
168 gtk_widget_destroy(meter_win->window);
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
169 g_free (meter_win);
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
170 meter_win = NULL;
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
171 }
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
172 }
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
173
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
174 static void gaim_gtk_connection_connect_progress(GaimConnection *gc,
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
175 const char *text, size_t step, size_t step_count)
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
176 {
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
177 struct signon_meter *meter;
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
178
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
179 if(!meter_win) {
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
180 GtkWidget *vbox;
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
181 GtkWidget *cancel_button;
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
182
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
183 if(mainwindow)
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
184 gtk_widget_hide(mainwindow);
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
185
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
186 meter_win = g_new0(struct meter_window, 1);
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
187 meter_win->window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
188 gtk_window_set_resizable(GTK_WINDOW(meter_win->window), FALSE);
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
189 gtk_window_set_role(GTK_WINDOW(meter_win->window), "signon");
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
190 gtk_container_set_border_width(GTK_CONTAINER(meter_win->window), 5);
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
191 gtk_window_set_title(GTK_WINDOW(meter_win->window), _("Signon"));
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
192 gtk_widget_realize(meter_win->window);
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
193
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
194 vbox = gtk_vbox_new (FALSE, 0);
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
195 gtk_container_add(GTK_CONTAINER(meter_win->window), vbox);
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
196
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
197 meter_win->table = gtk_table_new(1, 4, FALSE);
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
198 gtk_box_pack_start(GTK_BOX(vbox), GTK_WIDGET(meter_win->table),
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
199 FALSE, FALSE, 0);
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
200 gtk_container_set_border_width(GTK_CONTAINER(meter_win->table), 5);
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
201 gtk_table_set_row_spacings(GTK_TABLE(meter_win->table), 5);
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
202 gtk_table_set_col_spacings(GTK_TABLE(meter_win->table), 10);
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
203
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
204 cancel_button = gaim_pixbuf_button_from_stock(_("Cancel All"),
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
205 GTK_STOCK_QUIT, GAIM_BUTTON_HORIZONTAL);
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
206 g_signal_connect_swapped(G_OBJECT(cancel_button), "clicked",
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
207 G_CALLBACK(cancel_all), NULL);
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
208 gtk_box_pack_start(GTK_BOX(vbox), GTK_WIDGET(cancel_button),
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
209 FALSE, FALSE, 0);
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
210
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
211 g_signal_connect(G_OBJECT(meter_win->window), "delete_event",
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
212 G_CALLBACK(meter_destroy), NULL);
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
213 }
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
214
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
215 meter = find_signon_meter(gc);
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
216 if(!meter) {
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
217 meter = new_meter(gc, meter_win->window, meter_win->table,
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
218 &meter_win->rows);
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
219
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
220 meter_win->meters = g_slist_append(meter_win->meters, meter);
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
221 }
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
222
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
223 gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(meter->progress),
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
224 (float)step / (float)step_count);
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
225 gtk_label_set_text(GTK_LABEL(meter->status), text);
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
226 }
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
227
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
228 static void gaim_gtk_connection_connected(GaimConnection *gc)
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
229 {
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
230 struct signon_meter *meter = find_signon_meter(gc);
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
231
5885
02569519d0cc [gaim-migrate @ 6317]
Christian Hammond <chipx86@chipx86.com>
parents: 5883
diff changeset
232 gaim_setup(gc);
02569519d0cc [gaim-migrate @ 6317]
Christian Hammond <chipx86@chipx86.com>
parents: 5883
diff changeset
233
6021
d2d5d1984b09 [gaim-migrate @ 6471]
Mark Doliner <mark@kingant.net>
parents: 5991
diff changeset
234 update_privacy_connections();
5885
02569519d0cc [gaim-migrate @ 6317]
Christian Hammond <chipx86@chipx86.com>
parents: 5883
diff changeset
235 do_away_menu();
5936
1b56a833d665 [gaim-migrate @ 6376]
Christian Hammond <chipx86@chipx86.com>
parents: 5885
diff changeset
236 gaim_gtk_blist_update_protocol_actions();
5885
02569519d0cc [gaim-migrate @ 6317]
Christian Hammond <chipx86@chipx86.com>
parents: 5883
diff changeset
237
5717
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
238 if(meter)
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
239 kill_meter(meter, _("Done."));
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
240 }
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
241
6036
547ba881bc7e [gaim-migrate @ 6486]
Mark Doliner <mark@kingant.net>
parents: 6021
diff changeset
242 static void request_pass_ok_cb(GaimConnection *gc, const char *entry)
547ba881bc7e [gaim-migrate @ 6486]
Mark Doliner <mark@kingant.net>
parents: 6021
diff changeset
243 {
547ba881bc7e [gaim-migrate @ 6486]
Mark Doliner <mark@kingant.net>
parents: 6021
diff changeset
244 GaimAccount *account = gaim_connection_get_account(gc);
547ba881bc7e [gaim-migrate @ 6486]
Mark Doliner <mark@kingant.net>
parents: 6021
diff changeset
245
547ba881bc7e [gaim-migrate @ 6486]
Mark Doliner <mark@kingant.net>
parents: 6021
diff changeset
246 gaim_account_set_password(account, (*entry != '\0') ? entry : NULL);
547ba881bc7e [gaim-migrate @ 6486]
Mark Doliner <mark@kingant.net>
parents: 6021
diff changeset
247
547ba881bc7e [gaim-migrate @ 6486]
Mark Doliner <mark@kingant.net>
parents: 6021
diff changeset
248 gaim_connection_connect(gc);
547ba881bc7e [gaim-migrate @ 6486]
Mark Doliner <mark@kingant.net>
parents: 6021
diff changeset
249 }
547ba881bc7e [gaim-migrate @ 6486]
Mark Doliner <mark@kingant.net>
parents: 6021
diff changeset
250
547ba881bc7e [gaim-migrate @ 6486]
Mark Doliner <mark@kingant.net>
parents: 6021
diff changeset
251 static void request_pass_cancel_cb(GaimConnection *gc, const char *entry)
547ba881bc7e [gaim-migrate @ 6486]
Mark Doliner <mark@kingant.net>
parents: 6021
diff changeset
252 {
547ba881bc7e [gaim-migrate @ 6486]
Mark Doliner <mark@kingant.net>
parents: 6021
diff changeset
253 gaim_connection_destroy(gc);
547ba881bc7e [gaim-migrate @ 6486]
Mark Doliner <mark@kingant.net>
parents: 6021
diff changeset
254 }
547ba881bc7e [gaim-migrate @ 6486]
Mark Doliner <mark@kingant.net>
parents: 6021
diff changeset
255
5717
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
256 static void gaim_gtk_connection_request_pass(GaimConnection *gc)
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
257 {
6036
547ba881bc7e [gaim-migrate @ 6486]
Mark Doliner <mark@kingant.net>
parents: 6021
diff changeset
258 gaim_request_input(gc, NULL, _("Enter your password."), NULL,
547ba881bc7e [gaim-migrate @ 6486]
Mark Doliner <mark@kingant.net>
parents: 6021
diff changeset
259 NULL, FALSE, TRUE,
547ba881bc7e [gaim-migrate @ 6486]
Mark Doliner <mark@kingant.net>
parents: 6021
diff changeset
260 _("OK"), G_CALLBACK(request_pass_ok_cb),
547ba881bc7e [gaim-migrate @ 6486]
Mark Doliner <mark@kingant.net>
parents: 6021
diff changeset
261 _("Cancel"), G_CALLBACK(request_pass_cancel_cb), gc);
5717
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
262 }
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
263
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
264 static void gaim_gtk_connection_disconnected(GaimConnection *gc,
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
265 const char *reason)
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
266 {
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
267 struct signon_meter *meter = find_signon_meter(gc);
5883
f5b0c6073264 [gaim-migrate @ 6315]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
268
f5b0c6073264 [gaim-migrate @ 6315]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
269 update_privacy_connections();
5885
02569519d0cc [gaim-migrate @ 6317]
Christian Hammond <chipx86@chipx86.com>
parents: 5883
diff changeset
270 do_away_menu();
5936
1b56a833d665 [gaim-migrate @ 6376]
Christian Hammond <chipx86@chipx86.com>
parents: 5885
diff changeset
271 gaim_gtk_blist_update_protocol_actions();
5883
f5b0c6073264 [gaim-migrate @ 6315]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
272
5717
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
273 if(meter)
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
274 kill_meter(meter, _("Done."));
5883
f5b0c6073264 [gaim-migrate @ 6315]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
275
f5b0c6073264 [gaim-migrate @ 6315]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
276 if (gaim_connections_get_all() != NULL)
f5b0c6073264 [gaim-migrate @ 6315]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
277 return;
f5b0c6073264 [gaim-migrate @ 6315]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
278
f5b0c6073264 [gaim-migrate @ 6315]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
279 destroy_all_dialogs();
f5b0c6073264 [gaim-migrate @ 6315]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
280
f5b0c6073264 [gaim-migrate @ 6315]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
281 gaim_blist_destroy();
f5b0c6073264 [gaim-migrate @ 6315]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
282
f5b0c6073264 [gaim-migrate @ 6315]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
283 show_login();
5717
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
284 }
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
285
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
286 static void gaim_gtk_connection_notice(GaimConnection *gc,
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
287 const char *text)
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
288 {
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
289 }
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
290
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
291 static GaimConnectionUiOps conn_ui_ops =
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
292 {
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
293 gaim_gtk_connection_connect_progress,
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
294 gaim_gtk_connection_connected,
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
295 gaim_gtk_connection_request_pass,
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
296 gaim_gtk_connection_disconnected,
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
297 gaim_gtk_connection_notice
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
298 };
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
299
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
300 GaimConnectionUiOps *gaim_get_gtk_connection_ui_ops(void)
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
301 {
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
302 return &conn_ui_ops;
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
303 }
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
304
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
305
5746
2c04c55222b7 [gaim-migrate @ 6171]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 5717
diff changeset
306 void away_on_login(char *mesg)
5717
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
307 {
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
308 GSList *awy = away_messages;
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
309 struct away_message *a, *message = NULL;
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
310 struct gaim_gtk_buddy_list *gtkblist;
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
311
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
312 gtkblist = GAIM_GTK_BLIST(gaim_get_blist());
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
313
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
314 if (!gtkblist->window) {
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
315 return;
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
316 }
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
317
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
318 if (mesg == NULL) {
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
319 /* Use default message */
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
320 do_away_message(NULL, default_away);
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
321 } else {
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
322 /* Use argument */
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
323 while (awy) {
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
324 a = (struct away_message *)awy->data;
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
325 if (strcmp(a->name, mesg) == 0) {
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
326 message = a;
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
327 break;
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
328 }
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
329 awy = awy->next;
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
330 }
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
331 if (message == NULL)
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
332 message = default_away;
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
333 do_away_message(NULL, message);
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
334 }
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
335 return;
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
336 }
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
337
5872
059d95c67cda [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5746
diff changeset
338 #if 0
5717
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
339 struct kick_dlg {
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
340 GaimAccount *account;
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
341 GtkWidget *dlg;
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
342 };
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
343 static GSList *kicks = NULL;
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
344
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
345 static struct kick_dlg *find_kick_dlg(GaimAccount *account)
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
346 {
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
347 GSList *k = kicks;
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
348 while (k) {
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
349 struct kick_dlg *d = k->data;
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
350 if (d->account == account)
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
351 return d;
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
352 k = k->next;
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
353 }
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
354 return NULL;
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
355 }
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
356
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
357 static void set_kick_null(struct kick_dlg *k)
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
358 {
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
359 kicks = g_slist_remove(kicks, k);
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
360 g_free(k);
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
361 }
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
362
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
363 /*
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
364 * Common code for hide_login_progress(), and hide_login_progress_info()
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
365 */
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
366 static void hide_login_progress_common(GaimConnection *gc,
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
367 char *details,
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
368 char *title,
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
369 char *prologue)
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
370 {
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
371 gchar *buf;
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
372 struct kick_dlg *k = find_kick_dlg(gc->account);
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
373 struct signon_meter *meter = find_signon_meter(gc);
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
374 buf = g_strdup_printf(_("%s\n%s: %s"), full_date(), prologue, details);
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
375 if (k)
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
376 gtk_widget_destroy(k->dlg);
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
377 k = g_new0(struct kick_dlg, 1);
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
378 k->account = gc->account;
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
379 k->dlg = gaim_notify_message(NULL, GAIM_NOTIFY_MSG_ERROR, NULL,
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
380 title, buf, G_CALLBACK(set_kick_null), k);
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
381 kicks = g_slist_append(kicks, k);
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
382 if (meter) {
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
383 kill_meter(meter, _("Done."));
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
384 meter_win->meters = g_slist_remove(meter_win->meters, meter);
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
385 g_free(meter);
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
386 }
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
387 g_free(buf);
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
388 }
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
389
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
390 static void hide_login_progress(GaimConnection *gc, char *why)
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
391 {
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
392 GaimAccount *account = gaim_connection_get_account(gc);
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
393 gchar *buf;
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
394
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
395 gaim_event_broadcast(event_error, gc, why);
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
396 buf = g_strdup_printf(_("%s was unable to sign on"),
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
397 gaim_account_get_username(account));
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
398 hide_login_progress_common(gc, why, _("Signon Error"), buf);
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
399 g_free(buf);
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
400 }
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
401
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
402 /*
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
403 * Like hide_login_progress(), but for informational, not error/warning,
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
404 * messages.
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
405 *
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
406 */
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
407 static void hide_login_progress_notice(GaimConnection *gc, char *why)
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
408 {
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
409 GaimAccount *account = gaim_connection_get_account(gc);
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
410
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
411 hide_login_progress_common(gc, why, _("Notice"),
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
412 (char *)gaim_account_get_username(account));
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
413 }
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
414
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
415 /*
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
416 * Like hide_login_progress(), but for non-signon error messages.
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
417 *
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
418 */
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
419 static void hide_login_progress_error(GaimConnection *gc, char *why)
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
420 {
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
421 char buf[2048];
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
422 GaimAccount *account = gaim_connection_get_account(gc);
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
423
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
424 gaim_event_broadcast(event_error, gc, why);
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
425 g_snprintf(buf, sizeof(buf), _("%s has been signed off"),
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
426 gaim_account_get_username(account));
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
427 hide_login_progress_common(gc, why, _("Connection Error"), buf);
1d140b31d4b3 [gaim-migrate @ 6138]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
428 }
5872
059d95c67cda [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5746
diff changeset
429 #endif