# HG changeset patch # User Christian Hammond # Date 1054407317 0 # Node ID feb012e017411a5767fc4b14ee0322cf9ba9daa4 # Parent ba870ac49bfcec58d4f8c516300925e6bd48ba2b [gaim-migrate @ 6024] Close button works. committer: Tailor Script diff -r ba870ac49bfc -r feb012e01741 src/gtkaccount.c --- a/src/gtkaccount.c Sat May 31 18:37:49 2003 +0000 +++ b/src/gtkaccount.c Sat May 31 18:55:17 2003 +0000 @@ -60,12 +60,6 @@ } static void -__account_signed_on_cb(GaimConnection *gc, AccountsDialog *dialog) -{ - -} - -static void __signed_on_off_cb(GaimConnection *gc, AccountsDialog *dialog) { GaimAccount *account = gaim_connection_get_account(gc); @@ -81,11 +75,18 @@ } static gint -__window_destroy_cb(GtkWidget *w, GdkEvent *event, void *unused) +__window_destroy_cb(GtkWidget *w, GdkEvent *event, AccountsDialog *dialog) { g_free(accounts_dialog); accounts_dialog = NULL; + /* See if we're the main window here. */ + if (GAIM_GTK_BLIST(gaim_get_blist())->window == NULL && + mainwindow == NULL && gaim_connections_get_all() == NULL) { + + do_quit(); + } + return FALSE; } @@ -143,7 +144,9 @@ static void __close_accounts_cb(GtkWidget *w, AccountsDialog *dialog) { + gtk_widget_destroy(dialog->window); + __window_destroy_cb(NULL, NULL, dialog); } static void @@ -330,9 +333,10 @@ width = gaim_prefs_get_int("/gaim/gtk/accounts/dialog/width"); height = gaim_prefs_get_int("/gaim/gtk/accounts/dialog/height"); - win = dialog->window; + GAIM_DIALOG(win); - GAIM_DIALOG(win); + dialog->window = win; + gtk_window_set_default_size(GTK_WINDOW(win), width, height); gtk_window_set_role(GTK_WINDOW(win), "accounts"); gtk_window_set_title(GTK_WINDOW(win), "Accounts");