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