Mercurial > pidgin.yaz
comparison src/prpl.c @ 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 | cba92ec56248 |
children | 9c7fcb211886 |
comparison
equal
deleted
inserted
replaced
4244:091e9db94ebc | 4245:cd84b0fd63fc |
---|---|
161 #define STOCK_ITEMIZE(r, l) if (!strcmp(r,yestext)) \ | 161 #define STOCK_ITEMIZE(r, l) if (!strcmp(r,yestext)) \ |
162 yestext = l; \ | 162 yestext = l; \ |
163 if (!strcmp(r,notext)) \ | 163 if (!strcmp(r,notext)) \ |
164 notext = l; | 164 notext = l; |
165 | 165 |
166 void do_ask_dialog(const char *prim, const char *sec, void *data, char *yestext, void *doit, char *notext, void *dont) | 166 void do_ask_dialog(const char *prim, const char *sec, void *data, char *yestext, void *doit, char *notext, void *dont, int modal) |
167 { | 167 { |
168 GtkWidget *window; | 168 GtkWidget *window; |
169 GtkWidget *hbox; | 169 GtkWidget *hbox; |
170 GtkWidget *label; | 170 GtkWidget *label; |
171 char labeltext[1024 * 2]; | 171 char labeltext[1024 * 2]; |
190 STOCK_ITEMIZE("Delete", GTK_STOCK_DELETE); | 190 STOCK_ITEMIZE("Delete", GTK_STOCK_DELETE); |
191 STOCK_ITEMIZE("Remove", GTK_STOCK_REMOVE); | 191 STOCK_ITEMIZE("Remove", GTK_STOCK_REMOVE); |
192 STOCK_ITEMIZE("Yes", GTK_STOCK_YES); | 192 STOCK_ITEMIZE("Yes", GTK_STOCK_YES); |
193 STOCK_ITEMIZE("No", GTK_STOCK_NO); | 193 STOCK_ITEMIZE("No", GTK_STOCK_NO); |
194 | 194 |
195 window = gtk_dialog_new_with_buttons("", NULL, GTK_DIALOG_MODAL, notext, GTK_RESPONSE_NO, yestext, GTK_RESPONSE_YES, NULL); | 195 window = gtk_dialog_new_with_buttons("", NULL, 0, notext, GTK_RESPONSE_NO, yestext, GTK_RESPONSE_YES, NULL); |
196 | |
197 if (modal) { | |
198 gtk_window_set_modal(GTK_WINDOW(window), TRUE); | |
199 } | |
200 | |
196 gtk_dialog_set_default_response (GTK_DIALOG(window), GTK_RESPONSE_YES); | 201 gtk_dialog_set_default_response (GTK_DIALOG(window), GTK_RESPONSE_YES); |
197 g_signal_connect(G_OBJECT(window), "response", G_CALLBACK(do_ask_callback), doask); | 202 g_signal_connect(G_OBJECT(window), "response", G_CALLBACK(do_ask_callback), doask); |
198 | 203 |
199 gtk_container_set_border_width (GTK_CONTAINER(window), 6); | 204 gtk_container_set_border_width (GTK_CONTAINER(window), 6); |
200 gtk_window_set_resizable(GTK_WINDOW(window), FALSE); | 205 gtk_window_set_resizable(GTK_WINDOW(window), FALSE); |
634 msg ? msg : "", | 639 msg ? msg : "", |
635 find_buddy(gc, ga->who) ? "" : _("\n\nDo you wish to add him or her to your buddy list?")); | 640 find_buddy(gc, ga->who) ? "" : _("\n\nDo you wish to add him or her to your buddy list?")); |
636 if (find_buddy(gc, ga->who)) | 641 if (find_buddy(gc, ga->who)) |
637 do_error_dialog(buf, NULL, GAIM_INFO); | 642 do_error_dialog(buf, NULL, GAIM_INFO); |
638 else | 643 else |
639 do_ask_dialog(buf, NULL, ga, _("Add"), do_add, _("Cancel"), dont_add); | 644 do_ask_dialog(buf, NULL, ga, _("Add"), do_add, _("Cancel"), dont_add, FALSE); |
640 } | 645 } |
641 | 646 |
642 static GtkWidget *regdlg = NULL; | 647 static GtkWidget *regdlg = NULL; |
643 static GtkWidget *reg_list = NULL; | 648 static GtkWidget *reg_list = NULL; |
644 static GtkWidget *reg_area = NULL; | 649 static GtkWidget *reg_area = NULL; |