# HG changeset patch # User Mark Doliner # Date 1101398987 0 # Node ID a2bbfdcc325de8104f48f78e16ecbc536ed2c3f0 # Parent 1aa83016fbe018d3b5da39e4a94c72e985d8eba4 [gaim-migrate @ 11403] Patch from Matthew A. Nicholson (therealman11) to add a title to the email notification dialog. committer: Tailor Script diff -r 1aa83016fbe0 -r a2bbfdcc325d COPYRIGHT --- a/COPYRIGHT Wed Nov 24 18:53:18 2004 +0000 +++ b/COPYRIGHT Thu Nov 25 16:09:47 2004 +0000 @@ -112,6 +112,7 @@ Paul Miller Arkadiusz Miskiewicz Andrew Molloy +Matthew A. Nicholson Novell Padraig O'Briain Christopher O'Brien (siege) diff -r 1aa83016fbe0 -r a2bbfdcc325d src/gtknotify.c --- a/src/gtknotify.c Wed Nov 24 18:53:18 2004 +0000 +++ b/src/gtknotify.c Thu Nov 25 16:09:47 2004 +0000 @@ -61,7 +61,7 @@ static void email_response_cb(GtkDialog *dialog, gint id, GaimNotifyMailData *data) { - if (id == 0) + if (id == GTK_RESPONSE_YES) gaim_notify_uri(NULL, data->url); gaim_notify_close(GAIM_NOTIFY_EMAILS, data); @@ -111,8 +111,8 @@ } dialog = gtk_dialog_new_with_buttons(title ? title : GAIM_ALERT_TITLE, - NULL, 0, GTK_STOCK_CLOSE, - GTK_RESPONSE_ACCEPT, NULL); + NULL, 0, GTK_STOCK_CLOSE, + GTK_RESPONSE_CLOSE, NULL); gtk_window_set_role(GTK_WINDOW(dialog), "notify_dialog"); @@ -179,13 +179,15 @@ data->url = g_strdup(urls[0]); - /* Create the dialog. */ - data->dialog = dialog = gtk_dialog_new(); - - gtk_dialog_add_button(GTK_DIALOG(dialog), GTK_STOCK_CLOSE, 1); + /* Create the dialog */ + dialog = gtk_dialog_new_with_buttons("New Mail", NULL, 0, + GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE, + NULL); + data->dialog = dialog; if (urls != NULL) - gtk_dialog_add_button(GTK_DIALOG(dialog), GAIM_STOCK_OPEN_MAIL, 0); + gtk_dialog_add_button(GTK_DIALOG(dialog), + GAIM_STOCK_OPEN_MAIL, GTK_RESPONSE_YES); g_signal_connect(G_OBJECT(dialog), "response", G_CALLBACK(email_response_cb), data); @@ -201,7 +203,7 @@ hbox = gtk_hbox_new(FALSE, 12); gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), hbox); - /* Dialog icon. */ + /* Dialog icon */ img = gtk_image_new_from_stock(GAIM_STOCK_DIALOG_INFO, GTK_ICON_SIZE_DIALOG); gtk_misc_set_alignment(GTK_MISC(img), 0, 0);