Mercurial > pidgin
comparison src/multi.c @ 3375:fb1a0caadb9f
[gaim-migrate @ 3394]
A patch by Etan. A patch by Ben.
committer: Tailor Script <tailor@pidgin.im>
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Mon, 05 Aug 2002 07:44:11 +0000 |
parents | 3b00d97d59aa |
children | 8c394e9f0dfb |
comparison
equal
deleted
inserted
replaced
3374:3cd2fbddf95a | 3375:fb1a0caadb9f |
---|---|
1073 gtk_widget_show_all(acctedit); | 1073 gtk_widget_show_all(acctedit); |
1074 } | 1074 } |
1075 | 1075 |
1076 struct signon_meter { | 1076 struct signon_meter { |
1077 struct gaim_connection *gc; | 1077 struct gaim_connection *gc; |
1078 GtkWidget *label; | |
1078 GtkWidget *button; | 1079 GtkWidget *button; |
1079 GtkWidget *progress; | 1080 GtkWidget *progress; |
1080 GtkWidget *status; | 1081 GtkWidget *status; |
1081 }; | 1082 }; |
1082 static GSList *meters = NULL; | 1083 static GSList *meters = NULL; |
1109 void kill_meter(struct signon_meter *meter) { | 1110 void kill_meter(struct signon_meter *meter) { |
1110 gtk_widget_set_sensitive (meter->button, FALSE); | 1111 gtk_widget_set_sensitive (meter->button, FALSE); |
1111 gtk_progress_bar_update(GTK_PROGRESS_BAR(meter->progress), 1); | 1112 gtk_progress_bar_update(GTK_PROGRESS_BAR(meter->progress), 1); |
1112 gtk_statusbar_pop(GTK_STATUSBAR(meter->status), 1); | 1113 gtk_statusbar_pop(GTK_STATUSBAR(meter->status), 1); |
1113 gtk_statusbar_push(GTK_STATUSBAR(meter->status), 1, "Done."); | 1114 gtk_statusbar_push(GTK_STATUSBAR(meter->status), 1, "Done."); |
1115 | |
1116 gtk_widget_hide(meter->label); | |
1117 gtk_widget_hide(meter->button); | |
1118 gtk_widget_hide(meter->progress); | |
1119 gtk_widget_hide(meter->status); | |
1120 | |
1114 meter_win->active_count--; | 1121 meter_win->active_count--; |
1115 if (meter_win->active_count == 0) { | 1122 if (meter_win->active_count == 0) { |
1116 gtk_widget_destroy(meter_win->window); | 1123 gtk_widget_destroy(meter_win->window); |
1117 g_free (meter_win); | 1124 g_free (meter_win); |
1118 meter_win = NULL; | 1125 meter_win = NULL; |
1232 } | 1239 } |
1233 | 1240 |
1234 static struct signon_meter *register_meter(struct gaim_connection *gc, GtkWidget *widget, GtkTable *table, gint *rows) | 1241 static struct signon_meter *register_meter(struct gaim_connection *gc, GtkWidget *widget, GtkTable *table, gint *rows) |
1235 { | 1242 { |
1236 GtkWidget *graphic; | 1243 GtkWidget *graphic; |
1237 GtkWidget *label; | |
1238 GtkWidget *nest_vbox; | 1244 GtkWidget *nest_vbox; |
1239 GString *name_to_print; | 1245 GString *name_to_print; |
1240 struct signon_meter *meter; | 1246 struct signon_meter *meter; |
1241 | 1247 |
1242 name_to_print = g_string_new(gc->username); | 1248 name_to_print = g_string_new(gc->username); |
1249 graphic = create_meter_pixmap( widget , gc); | 1255 graphic = create_meter_pixmap( widget , gc); |
1250 | 1256 |
1251 nest_vbox = gtk_vbox_new (FALSE, 0); | 1257 nest_vbox = gtk_vbox_new (FALSE, 0); |
1252 | 1258 |
1253 name_to_print = g_string_prepend(name_to_print, "Signon: "); | 1259 name_to_print = g_string_prepend(name_to_print, "Signon: "); |
1254 label = gtk_label_new (name_to_print->str); | 1260 meter->label = gtk_label_new (name_to_print->str); |
1255 gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5); | 1261 gtk_misc_set_alignment (GTK_MISC (meter->label), 0, 0.5); |
1256 | 1262 |
1257 meter->status = gtk_statusbar_new(); | 1263 meter->status = gtk_statusbar_new(); |
1258 gtk_widget_set_usize(meter->status, 250, 0); | 1264 gtk_widget_set_usize(meter->status, 250, 0); |
1259 | 1265 |
1260 meter->progress = gtk_progress_bar_new (); | 1266 meter->progress = gtk_progress_bar_new (); |
1262 meter->button = gtk_button_new_with_label ("Cancel"); | 1268 meter->button = gtk_button_new_with_label ("Cancel"); |
1263 gtk_signal_connect (GTK_OBJECT (meter->button), "clicked", GTK_SIGNAL_FUNC (cancel_signon), meter); | 1269 gtk_signal_connect (GTK_OBJECT (meter->button), "clicked", GTK_SIGNAL_FUNC (cancel_signon), meter); |
1264 | 1270 |
1265 gtk_table_attach (GTK_TABLE (table), graphic, 0, 1, *rows, *rows+1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); | 1271 gtk_table_attach (GTK_TABLE (table), graphic, 0, 1, *rows, *rows+1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); |
1266 gtk_table_attach (GTK_TABLE (table), nest_vbox, 1, 2, *rows, *rows+1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); | 1272 gtk_table_attach (GTK_TABLE (table), nest_vbox, 1, 2, *rows, *rows+1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); |
1267 gtk_box_pack_start (GTK_BOX (nest_vbox), GTK_WIDGET (label), FALSE, FALSE, 0); | 1273 gtk_box_pack_start (GTK_BOX (nest_vbox), GTK_WIDGET (meter->label), FALSE, FALSE, 0); |
1268 gtk_box_pack_start (GTK_BOX (nest_vbox), GTK_WIDGET (meter->status), FALSE, FALSE, 0); | 1274 gtk_box_pack_start (GTK_BOX (nest_vbox), GTK_WIDGET (meter->status), FALSE, FALSE, 0); |
1269 gtk_table_attach (GTK_TABLE (table), meter->progress, 2, 3, *rows, *rows+1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); | 1275 gtk_table_attach (GTK_TABLE (table), meter->progress, 2, 3, *rows, *rows+1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); |
1270 gtk_table_attach (GTK_TABLE (table), meter->button, 3, 4, *rows, *rows+1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); | 1276 gtk_table_attach (GTK_TABLE (table), meter->button, 3, 4, *rows, *rows+1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); |
1271 | 1277 |
1272 gtk_widget_show_all (GTK_WIDGET (meter_win->window)); | 1278 gtk_widget_show_all (GTK_WIDGET (meter_win->window)); |