Mercurial > pidgin.yaz
changeset 4275:5ce5b252cdb1
[gaim-migrate @ 4526]
Nicola's Lichtmaier (niqueco) fixed a possible segfault in the account editor
and cleaned closing it up some.
committer: Tailor Script <tailor@pidgin.im>
author | Luke Schierer <lschiere@pidgin.im> |
---|---|
date | Fri, 10 Jan 2003 07:04:23 +0000 |
parents | 906f61f27479 |
children | 32fcf4cf5f80 |
files | src/multi.c |
diffstat | 1 files changed, 13 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/src/multi.c Fri Jan 10 06:32:14 2003 +0000 +++ b/src/multi.c Fri Jan 10 07:04:23 2003 +0000 @@ -144,24 +144,26 @@ gtk_widget_show(mainwindow); } -static void delete_acctedit(GtkWidget *w, gpointer d) +static void quit_acctedit(gpointer d) { if (acctedit) { save_prefs(); gtk_widget_destroy(acctedit); + acctedit = NULL; } - acctedit = NULL; treeview = NULL; if (!d && !blist && !mainwindow && !connections) do_quit(); } -static gint acctedit_close(GtkWidget *w, gpointer d) +static void on_delete_acctedit(GtkWidget *w, GdkEvent *ev, gpointer d) { - gtk_widget_destroy(acctedit); - if (!d && !blist && !mainwindow && !connections) - do_quit(); - return FALSE; + quit_acctedit(d); +} + +static void on_close_acctedit(GtkButton *button, gpointer d) +{ + quit_acctedit(d); } static char *proto_name(int proto) @@ -1189,7 +1191,7 @@ gtk_widget_realize(acctedit); gtk_widget_set_usize(acctedit, -1, 250); gtk_window_set_default_size(GTK_WINDOW(acctedit), 550, 250); - g_signal_connect(GTK_OBJECT(acctedit), "destroy", G_CALLBACK(delete_acctedit), W); + g_signal_connect(GTK_OBJECT(acctedit), "delete_event", G_CALLBACK(on_delete_acctedit), W); vbox = gtk_vbox_new(FALSE, 6); gtk_container_set_border_width(GTK_CONTAINER(vbox), 6); @@ -1247,7 +1249,7 @@ button = gtk_button_new_from_stock(GTK_STOCK_CLOSE); gtk_size_group_add_widget(sg, button); gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); - g_signal_connect(GTK_OBJECT(button), "clicked", G_CALLBACK(acctedit_close), W); + g_signal_connect(GTK_OBJECT(button), "clicked", G_CALLBACK(on_close_acctedit), W); button = gtk_button_new_from_stock(GTK_STOCK_DELETE); gtk_size_group_add_widget(sg, button); @@ -1303,7 +1305,7 @@ void kill_meter(struct signon_meter *meter) { gtk_widget_set_sensitive (meter->button, FALSE); - gtk_progress_bar_update(GTK_PROGRESS_BAR(meter->progress), 1); + gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(meter->progress), 1); gtk_statusbar_pop(GTK_STATUSBAR(meter->status), 1); gtk_statusbar_push(GTK_STATUSBAR(meter->status), 1, _("Done.")); meter_win->active_count--; @@ -1532,7 +1534,7 @@ g_snprintf(buf, sizeof(buf), "%s Signing On (using %s)", gc->username, gc->prpl->name); } - gtk_progress_bar_update(GTK_PROGRESS_BAR(meter->progress), howfar / LOGIN_STEPS); + gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(meter->progress), howfar / LOGIN_STEPS); gtk_statusbar_pop(GTK_STATUSBAR(meter->status), 1); gtk_statusbar_push(GTK_STATUSBAR(meter->status), 1, message); }