comparison src/main.c @ 6109:0922bb7a7bbc

[gaim-migrate @ 6571] Make attempting to sign on to an account twice not crash Gaim, and make the prompt for password request window only open once at max. I might change this in a few minutes, but this works, and I wanted to commit it before I break something. Move the gaim_request_input() call for "Please enter your password" to connection.c instead of gtkconn.c. There is no need for this to be in gtkconn.c, and doing it in core means less work for UIs. Make closing a notify window call the cancel action. Set the titles for request windows, when given. Remove a bit of odd, un-needed code from main.c (hitting "enter" in the password field was calling doenter which called dologin. Now it just calls dologin). committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Sun, 13 Jul 2003 18:33:25 +0000
parents 99f4bbeb27bc
children 0d2bd49c611e
comparison
equal deleted inserted replaced
6108:edbd278822a0 6109:0922bb7a7bbc
290 } 290 }
291 291
292 292
293 static void doenter(GtkWidget *widget, GtkWidget *w) 293 static void doenter(GtkWidget *widget, GtkWidget *w)
294 { 294 {
295 if (widget == name) { 295 gtk_entry_set_text(GTK_ENTRY(pass), "");
296 gtk_entry_set_text(GTK_ENTRY(pass), ""); 296 gtk_editable_select_region(GTK_EDITABLE(GTK_COMBO(name)->entry), 0, 0);
297 gtk_editable_select_region(GTK_EDITABLE(GTK_COMBO(name)->entry), 0, 0); 297 gtk_widget_grab_focus(pass);
298 gtk_widget_grab_focus(pass);
299 } else if (widget == pass) {
300 dologin(widget, w);
301 }
302 } 298 }
303 299
304 300
305 static void combo_changed(GtkWidget *w, GtkWidget *combo) 301 static void combo_changed(GtkWidget *w, GtkWidget *combo)
306 { 302 {
405 gtk_box_pack_start(GTK_BOX(vbox2), label, FALSE, FALSE, 0); 401 gtk_box_pack_start(GTK_BOX(vbox2), label, FALSE, FALSE, 0);
406 402
407 pass = gtk_entry_new(); 403 pass = gtk_entry_new();
408 gtk_entry_set_visibility(GTK_ENTRY(pass), FALSE); 404 gtk_entry_set_visibility(GTK_ENTRY(pass), FALSE);
409 g_signal_connect(G_OBJECT(pass), "activate", 405 g_signal_connect(G_OBJECT(pass), "activate",
410 G_CALLBACK(doenter), mainwindow); 406 G_CALLBACK(dologin), mainwindow);
411 gtk_box_pack_start(GTK_BOX(vbox2), pass, FALSE, TRUE, 0); 407 gtk_box_pack_start(GTK_BOX(vbox2), pass, FALSE, TRUE, 0);
412 gtk_box_pack_start(GTK_BOX(vbox), vbox2, FALSE, TRUE, 0); 408 gtk_box_pack_start(GTK_BOX(vbox), vbox2, FALSE, TRUE, 0);
413 409
414 /* Now for the button box */ 410 /* Now for the button box */
415 hbox = gtk_hbox_new(TRUE, 0); 411 hbox = gtk_hbox_new(TRUE, 0);