Mercurial > pidgin
comparison src/gtkrequest.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 | 8c44020a958e |
children | d1d8e70cf33d |
comparison
equal
deleted
inserted
replaced
6108:edbd278822a0 | 6109:0922bb7a7bbc |
---|---|
77 else | 77 else |
78 value = gtk_entry_get_text(GTK_ENTRY(data->u.input.entry)); | 78 value = gtk_entry_get_text(GTK_ENTRY(data->u.input.entry)); |
79 | 79 |
80 if (id < data->cb_count && data->cbs[id] != NULL) | 80 if (id < data->cb_count && data->cbs[id] != NULL) |
81 ((GaimRequestInputCb)data->cbs[id])(data->user_data, value); | 81 ((GaimRequestInputCb)data->cbs[id])(data->user_data, value); |
82 else | |
83 ((GaimRequestInputCb)data->cbs[1])(data->user_data, value); | |
82 | 84 |
83 gaim_request_close(GAIM_REQUEST_INPUT, data); | 85 gaim_request_close(GAIM_REQUEST_INPUT, data); |
84 } | 86 } |
85 | 87 |
86 static void | 88 static void |
203 | 205 |
204 data->cbs[0] = ok_cb; | 206 data->cbs[0] = ok_cb; |
205 data->cbs[1] = cancel_cb; | 207 data->cbs[1] = cancel_cb; |
206 | 208 |
207 /* Create the dialog. */ | 209 /* Create the dialog. */ |
208 dialog = gtk_dialog_new_with_buttons("", NULL, 0, | 210 dialog = gtk_dialog_new_with_buttons(title, NULL, 0, |
209 text_to_stock(cancel_text), 1, | 211 text_to_stock(cancel_text), 1, |
210 text_to_stock(ok_text), 0, | 212 text_to_stock(ok_text), 0, |
211 NULL); | 213 NULL); |
212 data->dialog = dialog; | 214 data->dialog = dialog; |
213 | 215 |
341 buttons[(action_count * 2) - i - 1] = va_arg(actions, GCallback); | 343 buttons[(action_count * 2) - i - 1] = va_arg(actions, GCallback); |
342 } | 344 } |
343 | 345 |
344 /* Create the dialog. */ | 346 /* Create the dialog. */ |
345 data->dialog = dialog = gtk_dialog_new(); | 347 data->dialog = dialog = gtk_dialog_new(); |
348 if (title != NULL) | |
349 gtk_window_set_title(GTK_WINDOW(dialog), title); | |
346 | 350 |
347 for (i = 0; i < action_count; i++) { | 351 for (i = 0; i < action_count; i++) { |
348 gtk_dialog_add_button(GTK_DIALOG(dialog), | 352 gtk_dialog_add_button(GTK_DIALOG(dialog), |
349 text_to_stock(buttons[2 * i]), i); | 353 text_to_stock(buttons[2 * i]), i); |
350 | 354 |
434 | 438 |
435 data->cbs[0] = ok_cb; | 439 data->cbs[0] = ok_cb; |
436 data->cbs[1] = cancel_cb; | 440 data->cbs[1] = cancel_cb; |
437 | 441 |
438 data->dialog = win = gtk_window_new(GTK_WINDOW_TOPLEVEL); | 442 data->dialog = win = gtk_window_new(GTK_WINDOW_TOPLEVEL); |
443 if (title != NULL) | |
444 gtk_window_set_title(GTK_WINDOW(win), title); | |
439 gtk_window_set_role(GTK_WINDOW(win), "multifield"); | 445 gtk_window_set_role(GTK_WINDOW(win), "multifield"); |
440 gtk_container_set_border_width(GTK_CONTAINER(win), 12); | 446 gtk_container_set_border_width(GTK_CONTAINER(win), 12); |
441 gtk_window_set_resizable(GTK_WINDOW(win), FALSE); | 447 gtk_window_set_resizable(GTK_WINDOW(win), FALSE); |
442 | 448 |
443 /* Setup the vbox */ | 449 /* Setup the vbox */ |