Mercurial > pidgin
changeset 4245:cd84b0fd63fc
[gaim-migrate @ 4495]
Now, shut up and leave me alone.
committer: Tailor Script <tailor@pidgin.im>
author | Rob Flynn <gaim@robflynn.com> |
---|---|
date | Wed, 08 Jan 2003 05:52:17 +0000 |
parents | 091e9db94ebc |
children | 2a2d6d21f1d7 |
files | src/dialogs.c src/ft.c src/multi.c src/protocols/icq/gaim_icq.c src/protocols/irc/irc.c src/protocols/jabber/jabber.c src/protocols/msn/msn.c src/protocols/oscar/oscar.c src/protocols/toc/toc.c src/prpl.c src/prpl.h |
diffstat | 11 files changed, 26 insertions(+), 21 deletions(-) [+] |
line wrap: on
line diff
--- a/src/dialogs.c Wed Jan 08 05:23:22 2003 +0000 +++ b/src/dialogs.c Wed Jan 08 05:52:17 2003 +0000 @@ -475,7 +475,7 @@ return; text = g_strdup_printf("You are about to remove %s from your buddy list. Do you want to continue?", name); - do_ask_dialog("Remove Buddy", text, bd, "Remove Buddy", do_remove_buddy, "Cancel", NULL); + do_ask_dialog("Remove Buddy", text, bd, "Remove Buddy", do_remove_buddy, "Cancel", NULL, FALSE); g_free(text); }
--- a/src/ft.c Wed Jan 08 05:23:22 2003 +0000 +++ b/src/ft.c Wed Jan 08 05:52:17 2003 +0000 @@ -144,7 +144,7 @@ buf = newmsg; } - do_ask_dialog(buf, NULL, xfer, _("Accept"), ft_choose_file, _("Cancel"), ft_cancel); + do_ask_dialog(buf, NULL, xfer, _("Accept"), ft_choose_file, _("Cancel"), ft_cancel, FALSE); g_free(buf); return xfer;
--- a/src/multi.c Wed Jan 08 05:23:22 2003 +0000 +++ b/src/multi.c Wed Jan 08 05:52:17 2003 +0000 @@ -1136,7 +1136,7 @@ g_snprintf(buf, sizeof(buf), _("Are you sure you want to delete %s?"), u->username); - do_ask_dialog(buf, NULL, u, _("Delete"), do_del_acct, _("Cancel"), NULL); + do_ask_dialog(buf, NULL, u, _("Delete"), do_del_acct, _("Cancel"), NULL, FALSE); } }
--- a/src/protocols/icq/gaim_icq.c Wed Jan 08 05:23:22 2003 +0000 +++ b/src/protocols/icq/gaim_icq.c Wed Jan 08 05:52:17 2003 +0000 @@ -276,7 +276,7 @@ iqnew->nick = g_strdup(iq->nick); g_snprintf(msg, sizeof(msg), "Add %ld to your buddy list?", iq->uin); - do_ask_dialog(msg, NULL, iqnew, _("Add"), icq_add_after_auth, _("Cancel"), icq_den_auth); + do_ask_dialog(msg, NULL, iqnew, _("Add"), icq_add_after_auth, _("Cancel"), icq_den_auth, FALSE); icq_den_auth(iq); } @@ -294,7 +294,7 @@ g_snprintf(msg, sizeof(msg), "The user %s (%s%s%s%s%s) wants you to authorize them.", nick, first ? first : "", first && last ? " " : "", last ? last : "", (first || last) && email ? ", " : "", email ? email : ""); - do_ask_dialog(msg, NULL, iq, _("Authorize"), icq_acc_auth, _("Deny"), icq_den_auth); + do_ask_dialog(msg, NULL, iq, _("Authorize"), icq_acc_auth, _("Deny"), icq_den_auth, FALSE); } static void icq_login(struct aim_user *user) {
--- a/src/protocols/irc/irc.c Wed Jan 08 05:23:22 2003 +0000 +++ b/src/protocols/irc/irc.c Wed Jan 08 05:52:17 2003 +0000 @@ -1255,7 +1255,7 @@ dccchat->port=atoi(chat_args[4]); g_snprintf(dccchat->nick, sizeof(dccchat->nick), nick); g_snprintf(ask, sizeof(ask), _("%s would like to establish a DCC chat"), nick); - do_ask_dialog(ask, _("This requires a direct connection to be established between the two computers. Messages sent will not pass through the IRC server"), dccchat, _("Connect"), dcc_chat_init, _("Cancel"), dcc_chat_cancel); + do_ask_dialog(ask, _("This requires a direct connection to be established between the two computers. Messages sent will not pass through the IRC server"), dccchat, _("Connect"), dcc_chat_init, _("Cancel"), dcc_chat_cancel, FALSE); }
--- a/src/protocols/jabber/jabber.c Wed Jan 08 05:23:22 2003 +0000 +++ b/src/protocols/jabber/jabber.c Wed Jan 08 05:52:17 2003 +0000 @@ -1649,7 +1649,7 @@ jap->gjc = gjc; jap->user = g_strdup(Jid); - do_ask_dialog(msg, NULL, jap, _("Authorize"), jabber_accept_add, _("Deny"), jabber_deny_add); + do_ask_dialog(msg, NULL, jap, _("Authorize"), jabber_accept_add, _("Deny"), jabber_deny_add, FALSE); g_free(msg); xmlnode_free(g); /* Never needed it here anyway */
--- a/src/protocols/msn/msn.c Wed Jan 08 05:23:22 2003 +0000 +++ b/src/protocols/msn/msn.c Wed Jan 08 05:52:17 2003 +0000 @@ -1143,7 +1143,7 @@ g_snprintf(msg, sizeof(msg), _("The user %s (%s) wants to add %s to his or her buddy list."), ap->user, ap->friend, ap->gc->username); - do_ask_dialog(msg, NULL, ap, _("Authorize"), msn_accept_add, _("Deny"), msn_cancel_add); + do_ask_dialog(msg, NULL, ap, _("Authorize"), msn_accept_add, _("Deny"), msn_cancel_add, FALSE); } else if (!g_strncasecmp(buf, "BLP", 3)) { char *type, *tmp = buf; @@ -1293,7 +1293,7 @@ ap->gc = gc; g_snprintf(msg, sizeof(msg), _("The user %s (%s) wants to add you to their buddy list"),ap->user, ap->friend); - do_ask_dialog(msg, NULL, ap, _("Authorize"), msn_accept_add, _("Deny"), msn_cancel_add); + do_ask_dialog(msg, NULL, ap, _("Authorize"), msn_accept_add, _("Deny"), msn_cancel_add, FALSE); } }
--- a/src/protocols/oscar/oscar.c Wed Jan 08 05:23:22 2003 +0000 +++ b/src/protocols/oscar/oscar.c Wed Jan 08 05:52:17 2003 +0000 @@ -2049,7 +2049,7 @@ memcpy(d->cookie, args->cookie, 8); g_snprintf(buf, sizeof buf, "%s has just asked to directly connect to %s.", userinfo->sn, gc->username); - do_ask_dialog(buf, _("This requires a direct connection between the two computers and is necessary for IM Images. Because your IP address will be revealed, this may be considered a privacy risk."), d, _("Connect"), accept_direct_im, _("Cancel"), cancel_direct_im); + do_ask_dialog(buf, _("This requires a direct connection between the two computers and is necessary for IM Images. Because your IP address will be revealed, this may be considered a privacy risk."), d, _("Connect"), accept_direct_im, _("Cancel"), cancel_direct_im, FALSE); } else { debug_printf("Unknown reqclass %hu\n", args->reqclass); } @@ -2195,7 +2195,7 @@ data->gc = gc; data->name = g_strdup_printf("%lu", args->uin); data->nick = NULL; - do_ask_dialog(_("Authorization Request"), dialog_msg, data, _("Authorize"), gaim_auth_grant, _("Deny"), gaim_auth_dontgrant); + do_ask_dialog(_("Authorization Request"), dialog_msg, data, _("Authorize"), gaim_auth_grant, _("Deny"), gaim_auth_dontgrant, FALSE); g_free(dialog_msg); } } break; @@ -2249,7 +2249,7 @@ data->gc = gc; data->name = g_strdup(text[i*2+2]); data->nick = g_strdup(text[i*2+1]); - do_ask_dialog(message, _("Do you want to add this contact to your Buddy List?"), data, _("Add"), gaim_icq_contactadd, _("Decline"), gaim_free_name_data); + do_ask_dialog(message, _("Do you want to add this contact to your Buddy List?"), data, _("Add"), gaim_icq_contactadd, _("Decline"), gaim_free_name_data, FALSE); g_free(message); } g_strfreev(text); @@ -4256,7 +4256,7 @@ data->gc = gc; data->name = g_strdup(retval->name); data->nick = NULL; - do_ask_dialog(_("Request Authorization"), dialog_msg, data, _("Request Authorization"), gaim_auth_request, _("Cancel"), gaim_auth_dontrequest); + do_ask_dialog(_("Request Authorization"), dialog_msg, data, _("Request Authorization"), gaim_auth_request, _("Cancel"), gaim_auth_dontrequest, FALSE); g_free(dialog_msg); g_free(nombre); @@ -4301,7 +4301,7 @@ data->gc = gc; data->name = g_strdup(sn); data->nick = NULL; - do_ask_dialog(_("Authorization Given"), dialog_msg, data, _("Yes"), gaim_icq_contactadd, _("No"), gaim_free_name_data); + do_ask_dialog(_("Authorization Given"), dialog_msg, data, _("Yes"), gaim_icq_contactadd, _("No"), gaim_free_name_data, FALSE); g_free(dialog_msg); g_free(nombre); @@ -4335,7 +4335,7 @@ data->gc = gc; data->name = g_strdup(sn); data->nick = NULL; - do_ask_dialog(_("Authorization Request"), dialog_msg, data, _("Authorize"), gaim_auth_grant, _("Deny"), gaim_auth_dontgrant); + do_ask_dialog(_("Authorization Request"), dialog_msg, data, _("Authorize"), gaim_auth_grant, _("Deny"), gaim_auth_dontgrant, FALSE); g_free(dialog_msg); g_free(nombre); @@ -4848,7 +4848,7 @@ data->who = who; data->gc = gc; g_snprintf(buf, sizeof(buf), _("You have selected to open a Direct IM connection with %s."), who); - do_ask_dialog(buf, _("Because this reveals your IP address, it may be considered a privacy risk. Do you wish to continue?"), data, _("Connect"), oscar_direct_im, _("Cancel"), oscar_cancel_direct_im); + do_ask_dialog(buf, _("Because this reveals your IP address, it may be considered a privacy risk. Do you wish to continue?"), data, _("Connect"), oscar_direct_im, _("Cancel"), oscar_cancel_direct_im, FALSE); } static void oscar_get_away_msg(struct gaim_connection *gc, char *who) {
--- a/src/protocols/toc/toc.c Wed Jan 08 05:23:22 2003 +0000 +++ b/src/protocols/toc/toc.c Wed Jan 08 05:52:17 2003 +0000 @@ -1984,5 +1984,5 @@ } else { g_snprintf(buf, sizeof(buf), _("%s requests you to send them a file"), ft->user); } - do_ask_dialog(buf, NULL, ft, _("Accept"), toc_accept_ft, _("Cancel"), toc_reject_ft); + do_ask_dialog(buf, NULL, ft, _("Accept"), toc_accept_ft, _("Cancel"), toc_reject_ft, FALSE); }
--- a/src/prpl.c Wed Jan 08 05:23:22 2003 +0000 +++ b/src/prpl.c Wed Jan 08 05:52:17 2003 +0000 @@ -163,7 +163,7 @@ if (!strcmp(r,notext)) \ notext = l; -void do_ask_dialog(const char *prim, const char *sec, void *data, char *yestext, void *doit, char *notext, void *dont) +void do_ask_dialog(const char *prim, const char *sec, void *data, char *yestext, void *doit, char *notext, void *dont, int modal) { GtkWidget *window; GtkWidget *hbox; @@ -192,7 +192,12 @@ STOCK_ITEMIZE("Yes", GTK_STOCK_YES); STOCK_ITEMIZE("No", GTK_STOCK_NO); - window = gtk_dialog_new_with_buttons("", NULL, GTK_DIALOG_MODAL, notext, GTK_RESPONSE_NO, yestext, GTK_RESPONSE_YES, NULL); + window = gtk_dialog_new_with_buttons("", NULL, 0, notext, GTK_RESPONSE_NO, yestext, GTK_RESPONSE_YES, NULL); + + if (modal) { + gtk_window_set_modal(GTK_WINDOW(window), TRUE); + } + gtk_dialog_set_default_response (GTK_DIALOG(window), GTK_RESPONSE_YES); g_signal_connect(G_OBJECT(window), "response", G_CALLBACK(do_ask_callback), doask); @@ -636,7 +641,7 @@ if (find_buddy(gc, ga->who)) do_error_dialog(buf, NULL, GAIM_INFO); else - do_ask_dialog(buf, NULL, ga, _("Add"), do_add, _("Cancel"), dont_add); + do_ask_dialog(buf, NULL, ga, _("Add"), do_add, _("Cancel"), dont_add, FALSE); } static GtkWidget *regdlg = NULL;
--- a/src/prpl.h Wed Jan 08 05:23:22 2003 +0000 +++ b/src/prpl.h Wed Jan 08 05:52:17 2003 +0000 @@ -210,7 +210,7 @@ extern void show_got_added(struct gaim_connection *, const char *, const char *, const char *, const char *); -extern void do_ask_dialog(const char *, const char *, void *, char*, void *, char *, void *); +extern void do_ask_dialog(const char *, const char *, void *, char*, void *, char *, void *, int); extern void do_prompt_dialog(const char *, const char *, void *, void *, void *); extern void connection_has_mail(struct gaim_connection *, int, const char *, const char *, const char *);