ac_prefs->account_name ? ac_prefs->account_name :
_("(Untitled)"));
if (alertpanel_full(_("Delete account"), buf,
- GTK_STOCK_CANCEL, GTK_STOCK_DELETE, NULL, FALSE,
- NULL, ALERT_WARNING, G_ALERTDEFAULT) != G_ALERTALTERNATE)
+ GTK_STOCK_CANCEL, GTK_STOCK_DELETE, NULL, ALERTFOCUS_FIRST, FALSE,
+ NULL, ALERT_WARNING) != G_ALERTALTERNATE)
return;
account_list_dirty = TRUE;
{
if (!warn || alertpanel(_("Delete all attribute names"),
_("Do you really want to delete all attribute names?"),
- GTK_STOCK_CANCEL, GTK_STOCK_DELETE, NULL) == G_ALERTALTERNATE) {
+ GTK_STOCK_CANCEL, GTK_STOCK_DELETE, NULL, ALERTFOCUS_FIRST) == G_ALERTALTERNATE) {
GtkListStore *list_store = GTK_LIST_STORE(gtk_tree_view_get_model
(GTK_TREE_VIEW(list_view)));
gtk_list_store_clear(list_store);
if (alertpanel(_("Delete attribute name"),
_("Do you really want to delete this attribute name?"),
- GTK_STOCK_CANCEL, GTK_STOCK_DELETE, NULL) == G_ALERTALTERNATE) {
+ GTK_STOCK_CANCEL, GTK_STOCK_DELETE, NULL, ALERTFOCUS_FIRST) == G_ALERTALTERNATE) {
gtk_list_store_remove(GTK_LIST_STORE(model), &sel);
dirty = TRUE;
}
{
if (alertpanel(_("Reset to default"),
_("Do you really want to replace all attribute names\nwith the default set?"),
- GTK_STOCK_NO, GTK_STOCK_YES, NULL) == G_ALERTALTERNATE) {
+ GTK_STOCK_NO, GTK_STOCK_YES, NULL, ALERTFOCUS_FIRST) == G_ALERTALTERNATE) {
GList *tmp = custom_attr_default_list();
custom_attr_window_load_list(tmp);
if (tmp) {
val = alertpanel_full(_("Find address book email duplicates"),
_("Claws Mail will now search for duplicate email "
"addresses in the address book."),
- GTK_STOCK_CANCEL,GTK_STOCK_FIND,NULL, FALSE, vbox, ALERT_NOTICE,
- G_ALERTALTERNATE);
+ GTK_STOCK_CANCEL,GTK_STOCK_FIND, NULL,
+ ALERTFOCUS_SECOND, FALSE, vbox, ALERT_NOTICE);
if(val == G_ALERTALTERNATE) {
want_search = TRUE;
aval = alertpanel(_("Delete address(es)"),
_("Really delete the address(es)?"),
- GTK_STOCK_CANCEL, "+"GTK_STOCK_DELETE, NULL);
+ GTK_STOCK_CANCEL, GTK_STOCK_DELETE, NULL,
+ ALERTFOCUS_SECOND);
if(aval != G_ALERTALTERNATE)
return;
if( iface && iface->readOnly ) {
alertpanel( _("Delete address"),
_("This address data is readonly and cannot be deleted."),
- GTK_STOCK_CLOSE, NULL, NULL );
+ GTK_STOCK_CLOSE, NULL, NULL, ALERTFOCUS_FIRST );
return FALSE;
}
if (server->retVal != LDAPRC_SUCCESS) {
alertpanel( _("Add address(es)"),
_("Can't add the specified address"),
- GTK_STOCK_CLOSE, NULL, NULL );
+ GTK_STOCK_CLOSE, NULL, NULL, ALERTFOCUS_FIRST );
return server->retVal;
}
}
if( iface->readOnly ) {
alertpanel( _("Delete address(es)"),
_("This address data is readonly and cannot be deleted."),
- GTK_STOCK_CLOSE, NULL, NULL );
+ GTK_STOCK_CLOSE, NULL, NULL, ALERTFOCUS_FIRST);
return;
}
aval = alertpanel( _("Delete group"),
_("Really delete the group(s)?\n"
"The addresses it contains will not be lost."),
- GTK_STOCK_CANCEL, "+"GTK_STOCK_DELETE, NULL );
+ GTK_STOCK_CANCEL, GTK_STOCK_DELETE, NULL, ALERTFOCUS_SECOND );
if( aval != G_ALERTALTERNATE ) {
goto thaw_ret;
}
} else {
aval = alertpanel( _("Delete address(es)"),
_("Really delete the address(es)?"),
- GTK_STOCK_CANCEL, "+"GTK_STOCK_DELETE, NULL );
+ GTK_STOCK_CANCEL, GTK_STOCK_DELETE, NULL, ALERTFOCUS_SECOND );
if( aval != G_ALERTALTERNATE ) {
goto thaw_ret;
}
"results and addresses in '%s'?" ),
obj->name );
aval = alertpanel( _("Delete"), message,
- GTK_STOCK_CANCEL, "+"GTK_STOCK_DELETE, NULL );
+ GTK_STOCK_CANCEL, GTK_STOCK_DELETE, NULL, ALERTFOCUS_SECOND );
g_free(message);
if( aval == G_ALERTALTERNATE ) {
delType = ADDRTREE_DEL_FOLDER_ADDR;
"If you delete the folder only, the addresses it contains will be moved into the parent folder." ),
obj->name );
aval = alertpanel( _("Delete folder"), message,
- GTK_STOCK_CANCEL, g_strconcat("+",_("Delete _folder only"), NULL), _("Delete folder and _addresses"));
+ GTK_STOCK_CANCEL, _("Delete _folder only"), _("Delete folder and _addresses"), ALERTFOCUS_SECOND);
g_free(message);
if( aval == G_ALERTALTERNATE ) {
delType = ADDRTREE_DEL_FOLDER_ONLY;
message = g_strdup_printf(_("Do you want to delete '%s'?\n"
"The addresses it contains will not be lost."), obj->name);
aval = alertpanel(_("Delete"), message, GTK_STOCK_CANCEL,
- "+" GTK_STOCK_DELETE, NULL);
+ GTK_STOCK_DELETE, NULL, ALERTFOCUS_SECOND);
g_free(message);
if( aval == G_ALERTALTERNATE ) delType = ADDRTREE_DEL_FOLDER_ONLY;
} else {
message = g_strdup_printf(_("Do you want to delete '%s'?\n"
"The addresses it contains will be lost."), obj->name);
aval = alertpanel(_("Delete"), message, GTK_STOCK_CANCEL,
- "+" GTK_STOCK_DELETE, NULL);
+ GTK_STOCK_DELETE, NULL, ALERTFOCUS_SECOND);
g_free(message);
if( aval == G_ALERTALTERNATE ) delType = ADDRTREE_DEL_DATA;
}
if (server->retVal != LDAPRC_SUCCESS) {
alertpanel( _("Add address(es)"),
addressbook_err2string(_lutErrorsLDAP_, server->retVal),
- GTK_STOCK_CLOSE, NULL, NULL );
+ GTK_STOCK_CLOSE, NULL, NULL, ALERTFOCUS_FIRST );
server->retVal = LDAPRC_SUCCESS;
return;
}
if (server->retVal != LDAPRC_SUCCESS) {
alertpanel( _("Add address(es)"),
addressbook_err2string(_lutErrorsLDAP_, server->retVal),
- GTK_STOCK_CLOSE, NULL, NULL );
+ GTK_STOCK_CLOSE, NULL, NULL, ALERTFOCUS_FIRST );
return;
}
}
if( errFlag ) {
debug_print( "Error\n%s\n", msg );
alertpanel_full(_("Addressbook conversion error"), msg,
- GTK_STOCK_CLOSE, NULL, NULL, FALSE,
- NULL, ALERT_ERROR, G_ALERTDEFAULT);
+ GTK_STOCK_CLOSE, NULL, NULL, ALERTFOCUS_FIRST, FALSE,
+ NULL, ALERT_ERROR);
}
else if( msg ) {
debug_print( "Warning\n%s\n", msg );
alertpanel_full(_("Addressbook conversion error"), msg,
- GTK_STOCK_CLOSE, NULL, NULL, FALSE,
- NULL, ALERT_WARNING, G_ALERTDEFAULT);
+ GTK_STOCK_CLOSE, NULL, NULL, ALERTFOCUS_FIRST, FALSE,
+ NULL, ALERT_WARNING);
}
return retVal;
addrindex_print_index( addrIndex, stdout );
alertpanel_full(_("Addressbook Error"),
_("Could not read address index"),
- GTK_STOCK_CLOSE, NULL, NULL, FALSE,
- NULL, ALERT_ERROR, G_ALERTDEFAULT);
+ GTK_STOCK_CLOSE, NULL, NULL, ALERTFOCUS_FIRST, FALSE,
+ NULL, ALERT_ERROR);
}
debug_print( "done.\n" );
}
if( abf->retVal != LDAPRC_SUCCESS ) {
alertpanel( _("Address(es) update"),
_("Update failed. Changes not written to Directory."),
- GTK_STOCK_CLOSE, NULL, NULL );
+ GTK_STOCK_CLOSE, NULL, NULL, ALERTFOCUS_FIRST );
}
else {
abf->retVal = MGU_SUCCESS;
const gchar *button1_label,
const gchar *button2_label,
const gchar *button3_label,
+ AlertFocus focus,
gboolean can_disable,
GtkWidget *custom_widget,
- gint alert_type,
- AlertValue default_value);
+ gint alert_type);
static void alertpanel_button_toggled (GtkToggleButton *button,
gpointer data);
const gchar *button1_label,
const gchar *button2_label,
const gchar *button3_label,
+ AlertFocus focus,
gboolean can_disable,
- AlertValue default_value,
GtkWidget *widget)
{
return alertpanel_full(title, message, button1_label,
- button2_label, button3_label,
- can_disable, widget, ALERT_QUESTION,
- default_value);
+ button2_label, button3_label, focus,
+ can_disable, widget, ALERT_QUESTION);
}
AlertValue alertpanel_full(const gchar *title, const gchar *message,
const gchar *button1_label,
const gchar *button2_label,
const gchar *button3_label,
+ AlertFocus focus,
gboolean can_disable,
GtkWidget *widget,
- AlertType alert_type,
- AlertValue default_value)
+ AlertType alert_type)
{
if (alertpanel_is_open)
return -1;
hooks_invoke(ALERTPANEL_OPENED_HOOKLIST, &alertpanel_is_open);
}
alertpanel_create(title, message, button1_label, button2_label,
- button3_label, can_disable, widget, alert_type,
- default_value);
+ button3_label, focus, can_disable, widget, alert_type);
alertpanel_show();
debug_print("return value = %d\n", value);
const gchar *message,
const gchar *button1_label,
const gchar *button2_label,
- const gchar *button3_label)
+ const gchar *button3_label,
+ AlertFocus focus)
{
return alertpanel_full(title, message, button1_label, button2_label,
- button3_label, FALSE, NULL, ALERT_QUESTION,
- G_ALERTDEFAULT);
+ button3_label, focus, FALSE, NULL, ALERT_QUESTION);
}
static void alertpanel_message(const gchar *title, const gchar *message, gint type)
}
alertpanel_create(title, message, GTK_STOCK_CLOSE, NULL, NULL,
- FALSE, NULL, type, G_ALERTDEFAULT);
+ ALERTFOCUS_FIRST, FALSE, NULL, type);
alertpanel_show();
}
if (mainwin && mainwin->logwin) {
mainwindow_clear_error(mainwin);
val = alertpanel_full(_("Error"), buf, GTK_STOCK_CLOSE,
- _("_View log"), NULL, FALSE, NULL,
- ALERT_ERROR, G_ALERTDEFAULT);
+ _("_View log"), NULL, ALERTFOCUS_FIRST, FALSE, NULL,
+ ALERT_ERROR);
if (val == G_ALERTALTERNATE)
log_window_show(mainwin->logwin);
} else
const gchar *button1_label,
const gchar *button2_label,
const gchar *button3_label,
+ AlertFocus focus,
gboolean can_disable,
GtkWidget *custom_widget,
- gint alert_type,
- AlertValue default_value)
+ gint alert_type)
{
static PangoFontDescription *font_desc;
GtkWidget *image;
GtkWidget *button1;
GtkWidget *button2;
GtkWidget *button3;
+ GtkWidget *focusbutton;
const gchar *label2;
const gchar *label3;
gchar *tmp = title?g_markup_printf_escaped("%s", title)
button1_label = GTK_STOCK_OK;
label2 = button2_label;
label3 = button3_label;
- if (label2 && *label2 == '+') label2++;
- if (label3 && *label3 == '+') label3++;
gtkut_stock_button_set_create(&confirm_area,
&button1, button1_label,
gtk_box_pack_end(GTK_BOX(gtk_dialog_get_action_area(GTK_DIALOG(dialog))),
confirm_area, FALSE, FALSE, 0);
gtk_container_set_border_width(GTK_CONTAINER(confirm_area), 5);
- gtk_widget_grab_default(button1);
- gtk_widget_grab_focus(button1);
- if (button2_label &&
- (default_value == G_ALERTALTERNATE || *button2_label == '+')) {
- gtk_widget_grab_default(button2);
- gtk_widget_grab_focus(button2);
- }
- if (button3_label &&
- (default_value == G_ALERTOTHER || *button3_label == '+')) {
- gtk_widget_grab_default(button3);
- gtk_widget_grab_focus(button3);
+
+ /* Set focus on correct button as requested. */
+ focusbutton = button1;
+ switch (focus) {
+ case ALERTFOCUS_SECOND:
+ if (button2_label != NULL)
+ focusbutton = button2;
+ break;
+ case ALERTFOCUS_THIRD:
+ if (button3_label != NULL)
+ focusbutton = button3;
+ break;
+ case ALERTFOCUS_FIRST:
+ default:
+ focusbutton = button1;
+ break;
}
+ gtk_widget_grab_default(focusbutton);
+ gtk_widget_grab_focus(focusbutton);
g_signal_connect(G_OBJECT(button1), "clicked",
G_CALLBACK(alertpanel_button_clicked),
} AlertType;
#define G_ALERT_VALUE_MASK 0x0000ffff
+typedef enum
+{
+ ALERTFOCUS_FIRST,
+ ALERTFOCUS_SECOND,
+ ALERTFOCUS_THIRD
+} AlertFocus;
+
#define ALERTPANEL_OPENED_HOOKLIST "alertpanel_opened_hooklist"
AlertValue alertpanel_full(const gchar *title, const gchar *message,
const gchar *button1_label,
const gchar *button2_label,
const gchar *button3_label,
+ AlertFocus focus,
gboolean can_disable,
GtkWidget *widget,
- AlertType alert_type,
- AlertValue default_value);
+ AlertType alert_type);
AlertValue alertpanel (const gchar *title,
const gchar *message,
const gchar *button1_label,
const gchar *button2_label,
- const gchar *button3_label);
+ const gchar *button3_label,
+ AlertFocus focus);
AlertValue alertpanel_with_widget (const gchar *title,
const gchar *message,
const gchar *button1_label,
const gchar *button2_label,
const gchar *button3_label,
+ AlertFocus focus,
gboolean can_disable,
- AlertValue default_value,
GtkWidget *widget);
void alertpanel_notice (const gchar *format,
"in the message body. Are you sure you want to do that?"),
to_human_readable(size));
aval = alertpanel_full(_("Are you sure?"), msg, GTK_STOCK_CANCEL,
- g_strconcat("+", _("_Insert"), NULL), NULL, TRUE, NULL, ALERT_QUESTION, G_ALERTDEFAULT);
+ _("_Insert"), NULL, ALERTFOCUS_SECOND, TRUE,
+ NULL, ALERT_QUESTION);
g_free(msg);
/* do we ask for confirmation next time? */
if (size == 0 && !compose->batch) {
gchar * msg = g_strdup_printf(_("File %s is empty."), filename);
AlertValue aval = alertpanel_full(_("Empty file"), msg,
- GTK_STOCK_CANCEL, g_strconcat("+", _("_Attach anyway"), NULL), NULL, FALSE,
- NULL, ALERT_WARNING, G_ALERTDEFAULT);
+ GTK_STOCK_CANCEL, _("_Attach anyway"), NULL,
+ ALERTFOCUS_SECOND, FALSE, NULL, ALERT_WARNING);
g_free(msg);
if (aval != G_ALERTALTERNATE) {
prefs_common_translated_header_name("Cc"));
aval = alertpanel(_("Send"),
text,
- GTK_STOCK_CANCEL, g_strconcat("+", _("_Send"), NULL), NULL);
+ GTK_STOCK_CANCEL, _("_Send"), NULL, ALERTFOCUS_SECOND);
g_free(text);
if (aval != G_ALERTALTERNATE)
return FALSE;
prefs_common_translated_header_name("Bcc"));
aval = alertpanel(_("Send"),
text,
- GTK_STOCK_CANCEL, g_strconcat("+", _("_Send"), NULL), NULL);
+ GTK_STOCK_CANCEL, _("_Send"), NULL, ALERTFOCUS_SECOND);
g_free(text);
if (aval != G_ALERTALTERNATE)
return FALSE;
_("Queue it anyway?"));
aval = alertpanel_full(compose->sending?_("Send"):_("Send later"), message,
- GTK_STOCK_CANCEL, button_label, NULL, TRUE, NULL,
- ALERT_QUESTION, G_ALERTDEFAULT);
+ GTK_STOCK_CANCEL, button_label, NULL, ALERTFOCUS_FIRST,
+ TRUE, NULL, ALERT_QUESTION);
g_free(message);
g_free(button_label);
if (aval & G_ALERTDISABLE) {
_("Queue it anyway?"));
aval = alertpanel_full(compose->sending?_("Send"):_("Send later"), message,
- GTK_STOCK_CANCEL, button_label, NULL, TRUE, NULL,
- ALERT_QUESTION, G_ALERTDEFAULT);
+ GTK_STOCK_CANCEL, button_label, NULL, ALERTFOCUS_FIRST,
+ TRUE, NULL, ALERT_QUESTION);
g_free(message);
if (aval & G_ALERTDISABLE) {
aval &= ~G_ALERTDISABLE;
"to the specified %s charset.\n"
"Send it as %s?"), out_codeset, src_codeset);
aval = alertpanel_full(_("Error"), msg, GTK_STOCK_CANCEL,
- g_strconcat("+", _("_Send"), NULL), NULL, FALSE,
- NULL, ALERT_ERROR, G_ALERTDEFAULT);
+ _("_Send"), NULL, ALERTFOCUS_SECOND, FALSE,
+ NULL, ALERT_ERROR);
g_free(msg);
if (aval != G_ALERTALTERNATE) {
"The contents of the message might be broken on the way to the delivery.\n"
"\n"
"Send it anyway?"), line + 1);
- aval = alertpanel(_("Warning"), msg, GTK_STOCK_CANCEL, GTK_STOCK_OK, NULL);
+ aval = alertpanel(_("Warning"), msg, GTK_STOCK_CANCEL, GTK_STOCK_OK, NULL,
+ ALERTFOCUS_FIRST);
g_free(msg);
if (aval != G_ALERTALTERNATE) {
g_free(buf);
return TRUE;
val = alertpanel_full(_("Encryption warning"), warning,
- GTK_STOCK_CANCEL, g_strconcat("+", _("C_ontinue"), NULL), NULL,
- TRUE, NULL, ALERT_WARNING, G_ALERTALTERNATE);
+ GTK_STOCK_CANCEL, _("C_ontinue"), NULL, ALERTFOCUS_SECOND,
+ TRUE, NULL, ALERT_WARNING);
if (val & G_ALERTDISABLE) {
val &= ~G_ALERTDISABLE;
if (val == G_ALERTALTERNATE)
if (!is_file_exist(ainfo->file)) {
gchar *msg = g_strdup_printf(_("Attachment %s doesn't exist anymore. Ignore?"), ainfo->file);
- AlertValue val = alertpanel_full(_("Warning"), msg, _("Cancel sending"), _("Ignore attachment"),
- NULL, FALSE, NULL, ALERT_WARNING, G_ALERTDEFAULT);
+ AlertValue val = alertpanel_full(_("Warning"), msg,
+ _("Cancel sending"), _("Ignore attachment"), NULL,
+ ALERTFOCUS_FIRST, FALSE, NULL, ALERT_WARNING);
g_free(msg);
if (val == G_ALERTDEFAULT) {
return -1;
"Force terminating the process?\n"
"process group id: %d"), -pgid);
val = alertpanel_full(_("Notice"), msg, GTK_STOCK_NO, GTK_STOCK_YES,
- NULL, FALSE, NULL, ALERT_WARNING, G_ALERTDEFAULT);
+ NULL, ALERTFOCUS_FIRST, FALSE, NULL,
+ ALERT_WARNING);
g_free(msg);
val = alertpanel_full(_("Could not save draft"),
_("Could not save draft.\n"
"Do you want to cancel exit or discard this email?"),
- _("_Cancel exit"), _("_Discard email"), NULL,
- FALSE, NULL, ALERT_QUESTION, G_ALERTDEFAULT);
+ _("_Cancel exit"), _("_Discard email"), NULL, ALERTFOCUS_FIRST,
+ FALSE, NULL, ALERT_QUESTION);
if (val == G_ALERTALTERNATE) {
lock = FALSE;
g_mutex_unlock(compose->mutex); /* must be done before closing */
if (!reedit) {
val = alertpanel(_("Discard message"),
_("This message has been modified. Discard it?"),
- _("_Discard"), _("_Save to Drafts"), GTK_STOCK_CANCEL);
+ _("_Discard"), _("_Save to Drafts"), GTK_STOCK_CANCEL,
+ ALERTFOCUS_FIRST);
} else {
val = alertpanel(_("Save changes"),
_("This message has been modified. Save the latest changes?"),
- _("_Don't save"), g_strconcat("+", _("_Save to Drafts"), NULL),
- GTK_STOCK_CANCEL);
+ _("_Don't save"), _("_Save to Drafts"), GTK_STOCK_CANCEL,
+ ALERTFOCUS_SECOND);
}
g_mutex_unlock(compose->mutex);
switch (val) {
msg = g_strdup_printf(_("Do you want to apply the template '%s'?"),
tmpl->name);
val = alertpanel(_("Apply template"), msg,
- _("_Replace"), _("_Insert"), GTK_STOCK_CANCEL);
+ _("_Replace"), _("_Insert"), GTK_STOCK_CANCEL, ALERTFOCUS_FIRST);
g_free(msg);
if (val == G_ALERTDEFAULT)
num_files),
num_files);
val = alertpanel_full(_("Insert or attach?"), msg,
- GTK_STOCK_CANCEL, g_strconcat("+", _("_Insert"), NULL), _("_Attach"),
- TRUE, NULL, ALERT_QUESTION, G_ALERTALTERNATE);
+ GTK_STOCK_CANCEL, _("_Insert"), _("_Attach"),
+ ALERTFOCUS_SECOND,
+ TRUE, NULL, ALERT_QUESTION);
g_free(msg);
break;
case COMPOSE_DND_INSERT:
"want to continue?"),
g_slist_length(msginfo_list));
if (g_slist_length(msginfo_list) > 9
- && alertpanel(_("Warning"), msg, GTK_STOCK_CANCEL, "+" GTK_STOCK_YES, NULL)
- != G_ALERTALTERNATE) {
+ && alertpanel(_("Warning"), msg, GTK_STOCK_CANCEL, GTK_STOCK_YES, NULL,
+ ALERTFOCUS_SECOND) != G_ALERTALTERNATE) {
g_free(msg);
return;
}
"Click OK to keep editing this contact.\n"
"Click Cancel to close without saving."),
#endif
- GTK_STOCK_CANCEL, "+"GTK_STOCK_OK, NULL );
+ GTK_STOCK_CANCEL, GTK_STOCK_OK, NULL, ALERTFOCUS_SECOND );
if( val == G_ALERTDEFAULT ) {
edit_person_cancel(widget, cancelled);
}
if (alertpanel(_("Delete tag"),
_("Do you really want to delete this tag?"),
- GTK_STOCK_CANCEL, GTK_STOCK_DELETE, NULL) != G_ALERTALTERNATE)
+ GTK_STOCK_CANCEL, GTK_STOCK_DELETE, NULL,
+ ALERTFOCUS_FIRST) != G_ALERTALTERNATE)
return;
APPLYWINDOW_LOCK();
if (alertpanel(_("Delete all tags"),
_("Do you really want to delete all tags?"),
- GTK_STOCK_CANCEL, GTK_STOCK_DELETE, NULL) != G_ALERTALTERNATE)
+ GTK_STOCK_CANCEL, GTK_STOCK_DELETE, NULL,
+ ALERTFOCUS_FIRST) != G_ALERTALTERNATE)
return;
APPLYWINDOW_LOCK();
"does not exist. Do you want to create it?" ),
_exportCtl_->dirOutput );
aval = alertpanel( _("Create directory" ),
- msg, GTK_STOCK_NO, GTK_STOCK_YES, NULL );
+ msg, GTK_STOCK_NO, GTK_STOCK_YES, NULL, ALERTFOCUS_FIRST );
g_free( msg );
if( aval != G_ALERTALTERNATE ) return FALSE;
"Could not create output directory for HTML file:\n%s" ),
reason );
aval = alertpanel_full(_("Failed to Create Directory"), msg,
- GTK_STOCK_CLOSE, NULL, NULL, FALSE,
- NULL, ALERT_ERROR, G_ALERTDEFAULT);
+ GTK_STOCK_CLOSE, NULL, NULL, ALERTFOCUS_FIRST, FALSE,
+ NULL, ALERT_ERROR);
g_free( msg );
return FALSE;
}
"does not exist. OK to create new directory?" ),
_exportCtl_->dirOutput );
aval = alertpanel( _("Create Directory" ),
- msg, GTK_STOCK_NO, GTK_STOCK_YES, NULL );
+ msg, GTK_STOCK_NO, GTK_STOCK_YES, NULL, ALERTFOCUS_FIRST );
g_free( msg );
if( aval != G_ALERTALTERNATE ) return FALSE;
"Could not create output directory for LDIF file:\n%s" ),
reason );
aval = alertpanel_full(_("Failed to Create Directory"), msg,
- GTK_STOCK_CLOSE, NULL, NULL, FALSE,
- NULL, ALERT_ERROR, G_ALERTDEFAULT);
+ GTK_STOCK_CLOSE, NULL, NULL, ALERTFOCUS_FIRST, FALSE,
+ NULL, ALERT_ERROR);
g_free( msg );
return FALSE;
}
"for an LDAP server. Are you sure you wish " \
"to proceed without a suffix?"
),
- GTK_STOCK_NO, GTK_STOCK_YES, NULL );
+ GTK_STOCK_NO, GTK_STOCK_YES, NULL, ALERTFOCUS_FIRST );
if( aval != G_ALERTALTERNATE ) {
gtk_widget_grab_focus( expldif_dlg.entrySuffix );
errFlag = TRUE;
msg = g_strdup_printf
(_("The file %s is missing! "
"Do you want to use the backup file from %s?"), FOLDER_LIST,buf);
- aval = alertpanel(_("Warning"), msg, GTK_STOCK_NO, GTK_STOCK_YES, NULL);
+ aval = alertpanel(_("Warning"), msg, GTK_STOCK_NO, GTK_STOCK_YES, NULL,
+ ALERTFOCUS_FIRST);
g_free(msg);
if (aval != G_ALERTALTERNATE)
return FALSE;
msg = g_strdup_printf
(_("The file %s is empty or corrupted! "
"Do you want to use the backup file from %s?"), FOLDER_LIST,buf);
- aval = alertpanel(_("Warning"), msg, GTK_STOCK_NO, GTK_STOCK_YES, NULL);
+ aval = alertpanel(_("Warning"), msg, GTK_STOCK_NO, GTK_STOCK_YES, NULL,
+ ALERTFOCUS_FIRST);
g_free(msg);
if (aval != G_ALERTALTERNATE)
return FALSE;
}
if (prefs_common.ask_mark_all_read) {
val = alertpanel_full(title, message,
- GTK_STOCK_NO, GTK_STOCK_YES, NULL,
- TRUE, NULL, ALERT_QUESTION, G_ALERTDEFAULT);
+ GTK_STOCK_NO, GTK_STOCK_YES, NULL, ALERTFOCUS_FIRST,
+ TRUE, NULL, ALERT_QUESTION);
if ((val & ~G_ALERTDISABLE) != G_ALERTALTERNATE)
return;
alertpanel_full(_("Rebuild folder tree"),
_("Rebuilding the folder tree will remove "
"local caches. Do you want to continue?"),
- GTK_STOCK_NO, GTK_STOCK_YES, NULL, FALSE,
- NULL, ALERT_WARNING, G_ALERTDEFAULT)
+ GTK_STOCK_NO, GTK_STOCK_YES, NULL, ALERTFOCUS_FIRST,
+ FALSE, NULL, ALERT_WARNING)
!= G_ALERTALTERNATE) {
return;
}
if (prefs_common.ask_on_clean) {
if (alertpanel(_("Empty trash"),
_("Delete all messages in trash?"),
- GTK_STOCK_CANCEL, g_strconcat("+", _("_Empty trash"), NULL), NULL) != G_ALERTALTERNATE)
+ GTK_STOCK_CANCEL, _("_Empty trash"), NULL,
+ ALERTFOCUS_SECOND) != G_ALERTALTERNATE)
return;
}
if (alertpanel(_("Offline warning"),
_("You're working offline. Override?"),
GTK_STOCK_NO, GTK_STOCK_YES,
- NULL) != G_ALERTALTERNATE)
+ NULL, ALERTFOCUS_FIRST) != G_ALERTALTERNATE)
return;
/* ask for confirmation before sending queued messages only
if (alertpanel(_("Send queued messages"),
_("Send all queued messages?"),
GTK_STOCK_CANCEL, _("_Send"),
- NULL) != G_ALERTALTERNATE)
+ NULL, ALERTFOCUS_FIRST) != G_ALERTALTERNATE)
return;
}
}
_("Do you really want to make folder '%s' a subfolder of '%s'?"),
from_folder->name, to_folder->name);
status = alertpanel_full(copy ? _("Copy folder"):_("Move folder"), buf,
- GTK_STOCK_NO, GTK_STOCK_YES, NULL, TRUE,
- NULL, ALERT_QUESTION, G_ALERTDEFAULT);
+ GTK_STOCK_NO, GTK_STOCK_YES, NULL, ALERTFOCUS_FIRST,
+ TRUE, NULL, ALERT_QUESTION);
g_free(buf);
if ((status & ~G_ALERTDISABLE) != G_ALERTALTERNATE)
buf = g_strdup_printf(_("SSL/TLS certificate for %s"), cert->host);
alertpanel_full(buf, NULL, GTK_STOCK_CLOSE, NULL, NULL,
- FALSE, cert_widget, ALERT_NOTICE, G_ALERTDEFAULT);
+ ALERTFOCUS_FIRST, FALSE, cert_widget, ALERT_NOTICE);
g_free(buf);
}
val = alertpanel_full(title, NULL,
_("_Cancel connection"), _("_Accept and save"), NULL,
- FALSE, vbox, ALERT_QUESTION, G_ALERTDEFAULT);
+ ALERTFOCUS_FIRST, FALSE, vbox, ALERT_QUESTION);
return (val == G_ALERTALTERNATE);
}
val = alertpanel_full(title, NULL,
_("_Cancel connection"), _("_Accept"), NULL,
- FALSE, vbox, ALERT_QUESTION, G_ALERTDEFAULT);
+ ALERTFOCUS_FIRST, FALSE, vbox, ALERT_QUESTION);
return (val == G_ALERTALTERNATE);
}
title = _("SSL/TLS certificate changed");
val = alertpanel_full(title, NULL,
_("_Cancel connection"), _("_Accept and save"), NULL,
- FALSE, vbox2, ALERT_WARNING, G_ALERTDEFAULT);
+ ALERTFOCUS_FIRST, FALSE, vbox2, ALERT_WARNING);
return (val == G_ALERTALTERNATE);
}
"Recovery will not be possible.\n\n"
"Do you really want to delete?"), name);
avalue = alertpanel_full(_("Delete folder"), message,
- GTK_STOCK_CANCEL, GTK_STOCK_DELETE, NULL, FALSE,
- NULL, ALERT_WARNING, G_ALERTDEFAULT);
+ GTK_STOCK_CANCEL, GTK_STOCK_DELETE, NULL, ALERTFOCUS_FIRST, FALSE,
+ NULL, ALERT_WARNING);
g_free(message);
if (avalue != G_ALERTALTERNATE) return;
G_CALLBACK(chk_update_val), &recurse);
avalue = alertpanel_full(_("Subscriptions"), message,
- GTK_STOCK_CANCEL, g_strconcat("+", _("_Search"), NULL),
- NULL, FALSE, rec_chk, ALERT_QUESTION, G_ALERTDEFAULT);
+ GTK_STOCK_CANCEL, _("_Search"), NULL, ALERTFOCUS_SECOND,
+ FALSE, rec_chk, ALERT_QUESTION);
g_free(message);
if (avalue != G_ALERTALTERNATE) return;
G_CALLBACK(chk_update_val), &recurse);
avalue = alertpanel_full(_("Subscriptions"), message,
- GTK_STOCK_CANCEL, action?g_strconcat("+", _("_Subscribe"), NULL):
- g_strconcat("+", _("_Unsubscribe"), NULL), NULL, FALSE,
- rec_chk, ALERT_QUESTION, G_ALERTDEFAULT);
+ GTK_STOCK_CANCEL, action?_("_Subscribe"):_("_Unsubscribe"), NULL,
+ ALERTFOCUS_SECOND, FALSE, rec_chk, ALERT_QUESTION);
g_free(message);
if (avalue != G_ALERTALTERNATE) return;
}
if (destdir && !*destdir) {
if (alertpanel(_("Import mbox file"), _("Destination folder is not set.\nImport mbox file to the Inbox folder?"),
- GTK_STOCK_OK, GTK_STOCK_CANCEL, NULL)
+ GTK_STOCK_OK, GTK_STOCK_CANCEL, NULL, ALERTFOCUS_FIRST)
== G_ALERTALTERNATE) {
gtk_widget_grab_focus(dest_entry);
return;
answer = alertpanel(_("Offline warning"),
tmp,
- GTK_STOCK_NO, "+" GTK_STOCK_YES,
- !force_ask? _("On_ly once"):NULL);
+ GTK_STOCK_NO, GTK_STOCK_YES,
+ !force_ask? _("On_ly once"):NULL, ALERTFOCUS_SECOND);
g_free(tmp);
if (answer == G_ALERTALTERNATE) {
overridden_yes = time(NULL);
G_CALLBACK(chk_update_val), &backup);
if (alertpanel_full(_("Migration of configuration"), message,
- GTK_STOCK_NO, "+" GTK_STOCK_YES, NULL, FALSE,
- keep_backup_chk, ALERT_QUESTION, G_ALERTDEFAULT) != G_ALERTALTERNATE) {
+ GTK_STOCK_NO, GTK_STOCK_YES, NULL, ALERTFOCUS_SECOND, FALSE,
+ keep_backup_chk, ALERT_QUESTION) != G_ALERTALTERNATE) {
return FALSE;
}
if (prefs_common.warn_queued_on_exit && procmsg_have_queued_mails_fast()) {
if (alertpanel(_("Queued messages"),
_("Some unsent messages are queued. Exit now?"),
- GTK_STOCK_CANCEL, GTK_STOCK_OK, NULL)
+ GTK_STOCK_CANCEL, GTK_STOCK_OK, NULL, ALERTFOCUS_FIRST)
!= G_ALERTALTERNATE) {
main_window_popup(mainwin);
sc_exiting = FALSE;
if (for_quit)
val = alertpanel(_("Empty trash"),
_("Delete all messages in trash folders?"),
- GTK_STOCK_NO, "+" GTK_STOCK_YES, _("Don't quit"));
+ GTK_STOCK_NO, GTK_STOCK_YES, _("Don't quit"),
+ ALERTFOCUS_SECOND);
else
val = alertpanel(_("Empty trash"),
_("Delete all messages in trash folders?"),
- GTK_STOCK_NO, "+" GTK_STOCK_YES, NULL);
+ GTK_STOCK_NO, GTK_STOCK_YES, NULL,
+ ALERTFOCUS_SECOND);
if (val == G_ALERTALTERNATE) {
debug_print("will empty trash\n");
} else if (val == G_ALERTDEFAULT) {
if (prefs_common.confirm_on_exit) {
if (alertpanel(_("Exit"), _("Exit Claws Mail?"),
- GTK_STOCK_CANCEL, GTK_STOCK_QUIT, NULL)
+ GTK_STOCK_CANCEL, GTK_STOCK_QUIT, NULL, ALERTFOCUS_FIRST)
!= G_ALERTALTERNATE)
return;
manage_window_focus_in(mainwin->window, NULL, NULL);
if (offline_ask_sync && ask && alertpanel(_("Folder synchronisation"),
_("Do you want to synchronise your folders now?"),
- GTK_STOCK_CANCEL, g_strconcat("+", _("_Synchronise"), NULL), NULL) != G_ALERTALTERNATE)
+ GTK_STOCK_CANCEL, _("_Synchronise"), NULL, ALERTFOCUS_SECOND) != G_ALERTALTERNATE)
return;
if (offline_ask_sync)
if (g_file_test(mbox, G_FILE_TEST_EXISTS) == TRUE) {
if (alertpanel_full(_("Overwrite mbox file"),
_("This file already exists. Do you want to overwrite it?"),
- GTK_STOCK_CANCEL, _("Overwrite"), NULL, FALSE,
- NULL, ALERT_WARNING, G_ALERTDEFAULT)
+ GTK_STOCK_CANCEL, _("Overwrite"), NULL,
+ ALERTFOCUS_FIRST, FALSE, NULL, ALERT_WARNING)
!= G_ALERTALTERNATE) {
return -2;
}
alertpanel_full(_("Search failed"),
_("Search string not found."),
GTK_STOCK_CLOSE, NULL, NULL, FALSE,
- NULL, ALERT_WARNING, G_ALERTDEFAULT);
+ ALERTFOCUS_FIRST, NULL, ALERT_WARNING);
break;
}
"continue from beginning?");
val = alertpanel(_("Search finished"), str,
- GTK_STOCK_NO, "+" GTK_STOCK_YES, NULL);
+ GTK_STOCK_NO, GTK_STOCK_YES, NULL, ALERTFOCUS_SECOND);
if (G_ALERTALTERNATE == val) {
manage_window_focus_in(search_window.window,
NULL, NULL);
"It is advised to not send the return receipt."),
to, buf);
val = alertpanel_full(_("Warning"), message,
- _("_Don't Send"), _("_Send"), NULL, FALSE,
- NULL, ALERT_WARNING, G_ALERTDEFAULT);
+ _("_Don't Send"), _("_Send"), NULL, ALERTFOCUS_FIRST, FALSE,
+ NULL, ALERT_WARNING);
g_free(message);
if (val != G_ALERTALTERNATE) {
g_free(buf);
prefs_common_translated_header_name("Cc"));
val = alertpanel_full(_("Warning"),
text,
- _("_Don't Send"), _("_Send"), NULL, FALSE,
- NULL, ALERT_WARNING, G_ALERTDEFAULT);
+ _("_Don't Send"), _("_Send"), NULL, ALERTFOCUS_FIRST, FALSE,
+ NULL, ALERT_WARNING);
g_free(text);
g_free(tr);
if (val != G_ALERTALTERNATE)
aval = alertpanel(_("Overwrite"),
_("Overwrite existing file?"),
- GTK_STOCK_CANCEL, GTK_STOCK_OK, NULL);
+ GTK_STOCK_CANCEL, GTK_STOCK_OK, NULL, ALERTFOCUS_FIRST);
if (G_ALERTALTERNATE != aval) return;
}
"address that this message was sent to.\n"
"Please choose which account you want to "
"use for sending the receipt notification:"),
- _("_Cancel"), _("_Send Notification"), NULL,
- FALSE, G_ALERTDEFAULT, optmenu) != G_ALERTALTERNATE)
+ _("_Cancel"), _("_Send Notification"), NULL, ALERTFOCUS_FIRST,
+ FALSE, optmenu) != G_ALERTALTERNATE)
return NULL;
return account_find_from_id(account_id);
}
"Recovery will not be possible.\n\n"
"Do you really want to delete?"), name);
avalue = alertpanel_full(_("Delete folder"), message,
- GTK_STOCK_CANCEL, GTK_STOCK_DELETE, NULL, FALSE,
- NULL, ALERT_WARNING, G_ALERTDEFAULT);
+ GTK_STOCK_CANCEL, GTK_STOCK_DELETE, NULL, ALERTFOCUS_FIRST, FALSE,
+ NULL, ALERT_WARNING);
g_free(message);
if (avalue != G_ALERTALTERNATE) return;
(_("Really remove the mailbox '%s'?\n"
"(The messages are NOT deleted from the disk)"), name);
avalue = alertpanel_full(_("Remove mailbox"), message,
- GTK_STOCK_CANCEL, _("_Remove"), NULL, FALSE,
- NULL, ALERT_WARNING, G_ALERTDEFAULT);
+ GTK_STOCK_CANCEL, _("_Remove"), NULL, ALERTFOCUS_FIRST, FALSE,
+ NULL, ALERT_WARNING);
g_free(message);
g_free(name);
tmp);
g_free(tmp);
aval = alertpanel(_("Overwrite"), res, GTK_STOCK_CANCEL,
- GTK_STOCK_OK, NULL);
+ GTK_STOCK_OK, NULL, ALERTFOCUS_FIRST);
g_free(res);
if (G_ALERTALTERNATE != aval) return FALSE;
}
"continue?"), n);
AlertValue av = alertpanel_full(_("Error saving all message parts"),
message, GTK_STOCK_CANCEL, _("Skip"), _("Skip all"),
- FALSE, NULL, ALERT_WARNING, G_ALERTDEFAULT);
+ ALERTFOCUS_FIRST, FALSE, NULL, ALERT_WARNING);
g_free(message);
return av;
}
name = trim_string(item->path, 32);
message = g_strdup_printf(_("Really unsubscribe newsgroup '%s'?"), name);
avalue = alertpanel_full(_("Unsubscribe newsgroup"), message,
- GTK_STOCK_CANCEL, _("_Unsubscribe"), NULL, FALSE,
- NULL, ALERT_WARNING, G_ALERTDEFAULT);
+ GTK_STOCK_CANCEL, _("_Unsubscribe"), NULL,
+ ALERTFOCUS_FIRST, FALSE, NULL, ALERT_WARNING);
g_free(message);
g_free(name);
if (avalue != G_ALERTALTERNATE) return;
AlertValue aval;
aval = alertpanel_full(_("Creating archive"), msg,
- GTK_STOCK_CANCEL, GTK_STOCK_OK, NULL, FALSE,
- NULL, ALERT_WARNING, G_ALERTDEFAULT);
+ GTK_STOCK_CANCEL, GTK_STOCK_OK, NULL, ALERTFOCUS_FIRST, FALSE,
+ NULL, ALERT_WARNING);
g_free(msg);
if (aval != G_ALERTALTERNATE)
return FALSE;
"\nContinue anyway?"),
orig_file, g_slist_length(list));
aval = alertpanel_full(_("Creating archive"), msg,
- GTK_STOCK_CANCEL, GTK_STOCK_OK, NULL, FALSE,
- NULL, ALERT_WARNING, G_ALERTDEFAULT);
+ GTK_STOCK_CANCEL, GTK_STOCK_OK, NULL, ALERTFOCUS_FIRST, FALSE,
+ NULL, ALERT_WARNING);
g_free(msg);
if (aval != G_ALERTALTERNATE) {
archive_free_file_list(page->md5, page->rename);
_("Do you really want to remove all attachments from "
"the selected messages?\n\n"
"The deleted data will be unrecoverable."),
- GTK_STOCK_CANCEL, GTK_STOCK_DELETE, NULL,
- FALSE, NULL, ALERT_QUESTION, G_ALERTALTERNATE) != G_ALERTALTERNATE)
+ GTK_STOCK_CANCEL, GTK_STOCK_DELETE, NULL, ALERTFOCUS_SECOND,
+ FALSE, NULL, ALERT_QUESTION) != G_ALERTALTERNATE)
return;
main_window_cursor_wait(summaryview->mainwin);
mention = are_attachments_mentioned(compose);
if (does_not_have_attachments(compose) && mention != NULL) {
AlertValue aval;
- gchar *button_label;
gchar *message;
gchar *bold_text;
- debug_print("user has to decide\n");
- if (compose->sending)
- button_label = g_strconcat("+", _("_Send"), NULL);
- else
- button_label = g_strconcat("+", _("_Queue"), NULL);
-
bold_text = g_strdup_printf("<span weight=\"bold\">%.20s</span>...",
mention->context);
message = g_strdup_printf(
bold_text,
compose->sending?_("Send it anyway?"):_("Queue it anyway?"));
aval = alertpanel(_("Attachment warning"), message,
- GTK_STOCK_CANCEL, button_label, NULL);
+ GTK_STOCK_CANCEL,
+ compose->sending ? _("_Send") : _("Queue"),
+ NULL,
+ ALERTFOCUS_SECOND);
g_free(message);
g_free(bold_text);
- g_free(button_label);
if (aval != G_ALERTALTERNATE)
return TRUE;
}
val = alertpanel_full(_("Clear icon cache"),
_("Are you sure you want to remove all cached avatar icons?"),
- GTK_STOCK_NO, GTK_STOCK_YES, NULL, FALSE,
- NULL, ALERT_WARNING, G_ALERTDEFAULT);
+ GTK_STOCK_NO, GTK_STOCK_YES, NULL, ALERTFOCUS_FIRST, FALSE,
+ NULL, ALERT_WARNING);
if (val != G_ALERTALTERNATE)
return;
(_("Really remove the mailbox '%s'?\n"
"(The messages are NOT deleted from the disk)"), name);
avalue = alertpanel_full(_("Remove mailbox"), message,
- GTK_STOCK_CANCEL, _("_Remove"), NULL, FALSE,
- NULL, ALERT_WARNING, G_ALERTDEFAULT);
+ GTK_STOCK_CANCEL, _("_Remove"), NULL, ALERTFOCUS_FIRST, FALSE,
+ NULL, ALERT_WARNING);
g_free(message);
g_free(name);
if (avalue != G_ALERTALTERNATE) return;
(_("All folders and messages under '%s' will be deleted.\n"
"Do you really want to delete?"), name);
avalue = alertpanel_full(_("Delete folder"), message,
- GTK_STOCK_CANCEL, GTK_STOCK_DELETE, NULL, FALSE,
- NULL, ALERT_NOTICE, G_ALERTDEFAULT);
+ GTK_STOCK_CANCEL, GTK_STOCK_DELETE, NULL, ALERTFOCUS_FIRST, FALSE,
+ NULL, ALERT_NOTICE);
g_free(message);
if (avalue != G_ALERTALTERNATE) return;
if (!page->modified ||
alertpanel(_("Revert script"),
_("This script has been modified. Revert the unsaved changes?"),
- _("_Revert"), NULL, GTK_STOCK_CANCEL) == G_ALERTDEFAULT)
+ _("_Revert"), NULL, GTK_STOCK_CANCEL, ALERTFOCUS_FIRST) == G_ALERTDEFAULT)
sieve_editor_revert(page);
}
if (page->modified) {
switch (alertpanel(_("Save changes"),
_("This script has been modified. Save the latest changes?"),
- _("_Discard"), g_strconcat("+", _("_Save"), NULL), GTK_STOCK_CANCEL)) {
+ _("_Discard"), _("_Save"), GTK_STOCK_CANCEL,
+ ALERTFOCUS_SECOND)) {
case G_ALERTDEFAULT:
return TRUE;
case G_ALERTALTERNATE:
g_snprintf(buf, sizeof(buf),
_("Do you really want to delete the filter '%s'?"), filter_name);
if (alertpanel_full(_("Delete filter"), buf,
- GTK_STOCK_CANCEL, GTK_STOCK_DELETE, NULL, FALSE,
- NULL, ALERT_WARNING, G_ALERTDEFAULT) != G_ALERTALTERNATE)
+ GTK_STOCK_CANCEL, GTK_STOCK_DELETE, NULL, ALERTFOCUS_FIRST, FALSE,
+ NULL, ALERT_WARNING) != G_ALERTALTERNATE)
return;
cmd_data = g_new(CommandDataName, 1);
if(prefs_common_get_prefs()->confirm_on_exit) {
if(alertpanel(_("Exit"), _("Exit Claws Mail?"),
GTK_STOCK_CANCEL, GTK_STOCK_OK,
- NULL) != G_ALERTALTERNATE) {
+ NULL, ALERTFOCUS_FIRST) != G_ALERTALTERNATE) {
return;
}
manage_window_focus_in(mainwin->window, NULL, NULL);
static void pdf_viewer_button_document_info_cb(GtkButton *button, PdfViewer *viewer)
{
alertpanel_full(_("PDF properties"), NULL, GTK_STOCK_CLOSE, NULL, NULL,
- FALSE, (GtkWidget *) pdf_viewer_fill_info_table(viewer),
- ALERT_NOTICE, G_ALERTDEFAULT);
+ ALERTFOCUS_FIRST, FALSE,
+ GTK_WIDGET(pdf_viewer_fill_info_table(viewer)),
+ ALERT_NOTICE);
}
/*
message = g_strdup_printf("Error processing Perl script file: "
"(line numbers may not be valid)\n%s",
SvPV(ERRSV,n_a));
- val = alertpanel("Perl Plugin error",message,"Retry","Abort","Edit");
+ val = alertpanel("Perl Plugin error",message,"Retry","Abort","Edit",
+ ALERTFOCUS_FIRST);
g_free(message);
if(val == G_ALERTOTHER) {
_("This key is not in your keyring. Do you want "
"Claws Mail to try and import it from a "
"keyserver?"),
- GTK_STOCK_NO, "+" GTK_STOCK_YES, NULL);
+ GTK_STOCK_NO, GTK_STOCK_YES, NULL, ALERTFOCUS_SECOND);
GTK_EVENTS_FLUSH();
}
if (val == G_ALERTDEFAULT) {
"Key details: ID %s, primary identity %s <%s>\n\n"
"Do you trust this key enough to use it anyway?"),
key->subkeys->keyid, key->uids->name, key->uids->email);
- aval = alertpanel
- (title, buf,
- GTK_STOCK_NO, GTK_STOCK_YES, NULL);
+ aval = alertpanel(title, buf,
+ GTK_STOCK_NO, GTK_STOCK_YES, NULL, ALERTFOCUS_FIRST);
g_free(buf);
g_free(title);
if (aval == G_ALERTALTERNATE)
_("GnuPG is not installed properly, or needs "
"to be upgraded.\n"
"OpenPGP support disabled."),
- GTK_STOCK_CLOSE, NULL, NULL, TRUE, NULL,
- ALERT_WARNING, G_ALERTDEFAULT);
+ GTK_STOCK_CLOSE, NULL, NULL, ALERTFOCUS_FIRST, TRUE, NULL,
+ ALERT_WARNING);
if (val & G_ALERTDISABLE)
prefs_gpg_get_config()->gpg_warning = FALSE;
}
"which means that you won't be able to sign "
"emails or receive encrypted emails.\n"
"Do you want to create a new key pair now?"),
- GTK_STOCK_NO, "+" GTK_STOCK_YES, NULL);
+ GTK_STOCK_NO, GTK_STOCK_YES, NULL, ALERTFOCUS_SECOND);
if (val == G_ALERTDEFAULT) {
return;
}
"to a keyserver?"),
key->fpr ? key->fpr:"null");
AlertValue val = alertpanel(_("Key generated"), buf,
- GTK_STOCK_NO, "+" GTK_STOCK_YES, NULL);
+ GTK_STOCK_NO, GTK_STOCK_YES, NULL, ALERTFOCUS_SECOND);
g_free(buf);
if (val == G_ALERTALTERNATE) {
gchar *gpgbin = get_gpg_executable_name();
"Recovery will not be possible.\n\n"
"Do you really want to delete?"), name);
avalue = alertpanel_full(_("Delete folder"), message,
- GTK_STOCK_CANCEL, GTK_STOCK_DELETE, NULL, FALSE,
- NULL, ALERT_WARNING, G_ALERTDEFAULT);
+ GTK_STOCK_CANCEL, GTK_STOCK_DELETE, NULL, ALERTFOCUS_FIRST, FALSE,
+ NULL, ALERT_WARNING);
g_free(message);
if (avalue != G_ALERTALTERNATE) return;
n = trim_string(item->folder->name, 32);
message = g_strdup_printf(_("Really remove the feed tree `%s' ?\n"), n);
avalue = alertpanel_full(_("Remove feed tree"), message,
- GTK_STOCK_CANCEL, _("_Remove"), NULL, FALSE,
- NULL, ALERT_WARNING, G_ALERTDEFAULT);
+ GTK_STOCK_CANCEL, _("_Remove"), NULL, ALERTFOCUS_FIRST, FALSE,
+ NULL, ALERT_WARNING);
g_free(message);
g_free(n);
message = g_strdup_printf
(_("Do you really want to unsubscribe?"));
avalue = alertpanel_full(_("Delete subscription"), message,
- GTK_STOCK_CANCEL, GTK_STOCK_DELETE, NULL,
- FALSE, NULL, ALERT_WARNING, G_ALERTDEFAULT);
+ GTK_STOCK_CANCEL, GTK_STOCK_DELETE, NULL, ALERTFOCUS_FIRST,
+ FALSE, NULL, ALERT_WARNING);
g_free(message);
if (avalue != G_ALERTALTERNATE) return;
msg = get_avail_msg(unavailable_persons, (total > 1), FALSE, offset_before, offset_after);
val = alertpanel_full(_("Not everyone is available"), msg,
- GTK_STOCK_CANCEL, _("Send anyway"), NULL, FALSE,
- NULL, ALERT_QUESTION, G_ALERTDEFAULT);
+ GTK_STOCK_CANCEL, _("Send anyway"), NULL, ALERTFOCUS_FIRST,
+ FALSE, NULL, ALERT_QUESTION);
g_free(msg);
}
msg = get_avail_msg(unavailable_persons, TRUE, TRUE, offset_before, offset_after);
postpone_min > 1 ? 2:1),
postpone_min);
aval = alertpanel_full(title, message,
- label, GTK_STOCK_OK, NULL, FALSE,
- NULL, ALERT_NOTICE, G_ALERTDEFAULT);
+ label, GTK_STOCK_OK, NULL, ALERTFOCUS_FIRST, FALSE,
+ NULL, ALERT_NOTICE);
g_free(label);
g_free(title);
if (!automatic) {
alertpanel_full(_("Empty calendar"),
_("There is nothing to export."),
- GTK_STOCK_OK, NULL, NULL, FALSE,
- NULL, ALERT_NOTICE, G_ALERTDEFAULT);
+ GTK_STOCK_OK, NULL, NULL, ALERTFOCUS_FIRST, FALSE,
+ NULL, ALERT_NOTICE);
return FALSE;
} else {
str_write_to_file("", tmpfile);
"want to continue?"),
total);
if (total > 9
- && alertpanel(_("Warning"), msg, GTK_STOCK_CANCEL, "+" GTK_STOCK_YES, NULL)
+ && alertpanel(_("Warning"), msg, GTK_STOCK_CANCEL, GTK_STOCK_YES, NULL,
+ ALERTFOCUS_SECOND)
!= G_ALERTALTERNATE) {
g_free(msg);
return;
val = alertpanel_full(_("Cancel meeting"),
_("Are you sure you want to cancel this meeting?"),
- GTK_STOCK_NO, GTK_STOCK_YES, NULL, FALSE,
- send_notify_chkbtn, ALERT_WARNING, G_ALERTDEFAULT);
+ GTK_STOCK_NO, GTK_STOCK_YES, NULL, ALERTFOCUS_FIRST, FALSE,
+ send_notify_chkbtn, ALERT_WARNING);
if (val != G_ALERTALTERNATE)
return;
AlertValue val = alertpanel_full(_("No account found"),
_("You have no account matching any attendee.\n"
"Do you want to reply anyway?"),
- GTK_STOCK_CANCEL, g_strconcat("+", _("Reply anyway"), NULL),
- NULL, FALSE, NULL, ALERT_QUESTION, G_ALERTDEFAULT);
+ GTK_STOCK_CANCEL, _("Reply anyway"), NULL,
+ ALERTFOCUS_SECOND, FALSE, NULL, ALERT_QUESTION);
if (val == G_ALERTALTERNATE) {
account = account_get_default();
vcal_manager_update_answer(event, account->address,
if (alertpanel(_("Delete action"),
_("Do you really want to delete this action?"),
- GTK_STOCK_CANCEL, GTK_STOCK_DELETE, NULL) != G_ALERTALTERNATE)
+ GTK_STOCK_CANCEL, GTK_STOCK_DELETE, NULL, ALERTFOCUS_FIRST) != G_ALERTALTERNATE)
return;
/* XXX: Here's the reason why we need to store the original
if (alertpanel(_("Delete all actions"),
_("Do you really want to delete all the actions?"),
- GTK_STOCK_CANCEL, GTK_STOCK_DELETE, NULL) != G_ALERTDEFAULT)
+ GTK_STOCK_CANCEL, GTK_STOCK_DELETE, NULL, ALERTFOCUS_FIRST) != G_ALERTDEFAULT)
return;
list_store = GTK_LIST_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(actions.actions_list_view)));
if (modified && alertpanel(_("Entry not saved"),
_("The entry was not saved. Close anyway?"),
- GTK_STOCK_CLOSE, g_strconcat("+", _("_Continue editing"), NULL),
- NULL) != G_ALERTDEFAULT) {
+ GTK_STOCK_CLOSE, _("_Continue editing"), NULL,
+ ALERTFOCUS_SECOND) != G_ALERTDEFAULT) {
return;
} else if (modified_list && alertpanel(_("Actions list not saved"),
_("The actions list has been modified. Close anyway?"),
- GTK_STOCK_CLOSE, g_strconcat("+", _("_Continue editing"), NULL),
- NULL) != G_ALERTDEFAULT) {
+ GTK_STOCK_CLOSE, _("_Continue editing"), NULL,
+ ALERTFOCUS_SECOND) != G_ALERTDEFAULT) {
return;
}
modified = FALSE;
if (modified && alertpanel(_("Entry not saved"),
_("The entry was not saved. Close anyway?"),
- GTK_STOCK_CLOSE, g_strconcat("+", _("_Continue editing"), NULL),
- NULL) != G_ALERTDEFAULT) {
+ GTK_STOCK_CLOSE, _("_Continue editing"),
+ NULL, ALERTFOCUS_SECOND) != G_ALERTDEFAULT) {
return;
}
modified = FALSE;
if (alertpanel(_("Delete header"),
_("Do you really want to delete this header?"),
- GTK_STOCK_CANCEL, GTK_STOCK_DELETE, NULL) != G_ALERTALTERNATE)
+ GTK_STOCK_CANCEL, GTK_STOCK_DELETE, NULL, ALERTFOCUS_FIRST) != G_ALERTALTERNATE)
return;
gtk_tree_model_get(model, &sel,
if (alertpanel(_("Delete rule"),
_("Do you really want to delete this rule?"),
- GTK_STOCK_CANCEL, "+"GTK_STOCK_DELETE, NULL) == G_ALERTDEFAULT)
+ GTK_STOCK_CANCEL, GTK_STOCK_DELETE, NULL, ALERTFOCUS_SECOND) == G_ALERTDEFAULT)
return;
model = gtk_tree_view_get_model(list_view);
if (alertpanel(_("Delete all rules"),
_("Do you really want to delete all the rules?"),
- GTK_STOCK_CANCEL, "+"GTK_STOCK_DELETE, NULL) == G_ALERTDEFAULT)
+ GTK_STOCK_CANCEL, GTK_STOCK_DELETE, NULL, ALERTFOCUS_SECOND) == G_ALERTDEFAULT)
return;
list_store = GTK_LIST_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(filtering.cond_list_view)));
if (check_changed_list) {
if (modified && alertpanel(_("Filtering rules not saved"),
_("The list of filtering rules have been modified. Close anyway?"),
- GTK_STOCK_CLOSE, g_strconcat("+", _("_Continue editing"), NULL),
- NULL) != G_ALERTDEFAULT) {
+ GTK_STOCK_CLOSE, _("_Continue editing"), NULL,
+ ALERTFOCUS_SECOND) != G_ALERTDEFAULT) {
return TRUE;
}
}
if (!filtering_str) {
val = alertpanel(_("Entry not saved"),
_("The entry was not saved. Close anyway?"),
- GTK_STOCK_CLOSE, g_strconcat("+", _("_Continue editing"),NULL), NULL);
+ GTK_STOCK_CLOSE, _("_Continue editing"), NULL, ALERTFOCUS_SECOND);
if (G_ALERTDEFAULT != val) {
g_free(filtering_str);
g_free(str); /* fixed two leaks: huzzah! */
strlen(action)) {
val = alertpanel(_("Entry not saved"),
_("The entry was not saved. Close anyway?"),
- GTK_STOCK_CLOSE, g_strconcat("+", _("_Continue editing"), NULL), NULL);
+ GTK_STOCK_CLOSE, _("_Continue editing"), NULL, ALERTFOCUS_SECOND);
if (G_ALERTDEFAULT != val) {
g_free(name);
g_free(condition);
if (alertpanel_full(_("Discard cache"),
_("Do you really want to discard the local cached "
"data for this folder?"),
- GTK_STOCK_CANCEL, g_strconcat("+", _("Discard"), NULL),
- NULL, FALSE, NULL, ALERT_WARNING, G_ALERTDEFAULT)
+ GTK_STOCK_CANCEL, _("Discard"), NULL, ALERTFOCUS_SECOND,
+ FALSE, NULL, ALERT_WARNING)
!= G_ALERTALTERNATE)
return;
val = alertpanel(_("Entry not saved"),
_("The entry was not saved.\nClose anyway?"),
GTK_STOCK_CLOSE,
- g_strconcat("+", _("_Continue editing"), NULL),
- NULL);
+ _("_Continue editing"),
+ NULL,
+ ALERTFOCUS_SECOND);
if (G_ALERTDEFAULT != val) {
g_free(matcher_str);
g_free(str);
markup, "</span></a>");
g_free(markup);
av = alertpanel_full(_("Configuration warning"), msg,
- GTK_STOCK_NO, GTK_STOCK_YES, NULL,
- FALSE, NULL,
- ALERT_ERROR, G_ALERTALTERNATE);
+ GTK_STOCK_NO, GTK_STOCK_YES, NULL, ALERTFOCUS_SECOND,
+ FALSE, NULL, ALERT_ERROR);
g_free(msg);
if (av != G_ALERTDEFAULT)
if (modified && alertpanel(_("Entry not saved"),
_("The entry was not saved. Close anyway?"),
- GTK_STOCK_CLOSE, g_strconcat("+", _("_Continue editing"), NULL),
- NULL) != G_ALERTDEFAULT) {
+ GTK_STOCK_CLOSE, _("_Continue editing"), NULL,
+ ALERTFOCUS_SECOND) != G_ALERTDEFAULT) {
return;
}
if (modified && alertpanel(_("Entry not saved"),
_("The entry was not saved. Close anyway?"),
- GTK_STOCK_CLOSE, g_strconcat("+", _("_Continue editing"), NULL),
- NULL) != G_ALERTDEFAULT) {
+ GTK_STOCK_CLOSE, _("_Continue editing"), NULL,
+ ALERTFOCUS_SECOND) != G_ALERTDEFAULT) {
return;
} else if (modified_list && alertpanel(_("Templates list not saved"),
_("The templates list has been modified. Close anyway?"),
- GTK_STOCK_CLOSE, g_strconcat("+", _("_Continue editing"), NULL),
- NULL) != G_ALERTDEFAULT) {
+ GTK_STOCK_CLOSE, _("_Continue editing"), NULL,
+ ALERTFOCUS_SECOND) != G_ALERTDEFAULT) {
return;
}
if (alertpanel(_("Delete template"),
_("Do you really want to delete this template?"),
- GTK_STOCK_CANCEL, GTK_STOCK_DELETE,
- NULL) != G_ALERTALTERNATE)
+ GTK_STOCK_CANCEL, GTK_STOCK_DELETE, NULL,
+ ALERTFOCUS_FIRST) != G_ALERTALTERNATE)
return;
gtk_list_store_remove(GTK_LIST_STORE(model), &iter);
{
if (alertpanel(_("Delete all templates"),
_("Do you really want to delete all the templates?"),
- GTK_STOCK_CANCEL, "+"GTK_STOCK_DELETE, NULL) == G_ALERTDEFAULT)
+ GTK_STOCK_CANCEL, GTK_STOCK_DELETE, NULL,
+ ALERTFOCUS_SECOND) == G_ALERTDEFAULT)
return;
prefs_template_clear_list();
val = alertpanel(alert_title,
_("Are you sure you want to remove this theme?"),
- GTK_STOCK_NO, GTK_STOCK_YES, NULL);
+ GTK_STOCK_NO, GTK_STOCK_YES, NULL, ALERTFOCUS_FIRST);
g_free(alert_title);
if (G_ALERTALTERNATE == val) {
if (file_exist(themeinfo, FALSE) == FALSE) {
val = alertpanel(alert_title,
_("This folder doesn't seem to be a theme folder.\nInstall anyway?"),
- GTK_STOCK_NO, GTK_STOCK_YES, NULL);
+ GTK_STOCK_NO, GTK_STOCK_YES, NULL, ALERTFOCUS_FIRST);
if (G_ALERTALTERNATE != val)
goto end_inst;
}
if (superuser_p ()) {
val = alertpanel(alert_title,
_("Do you want to install theme for all users?"),
- GTK_STOCK_NO, GTK_STOCK_YES, NULL);
+ GTK_STOCK_NO, GTK_STOCK_YES, NULL, ALERTFOCUS_FIRST);
switch (val) {
case G_ALERTALTERNATE:
cinfo->dest = stock_pixmap_get_system_theme_dir_for_theme(
AlertValue val = alertpanel_full(_("Theme exists"),
_("A theme with the same name is\nalready installed in this location.\n\n"
"Do you want to replace it?"),
- GTK_STOCK_CANCEL, _("Overwrite"), NULL, FALSE,
- NULL, ALERT_WARNING, G_ALERTDEFAULT);
+ GTK_STOCK_CANCEL, _("Overwrite"), NULL, ALERTFOCUS_FIRST,
+ FALSE, NULL, ALERT_WARNING);
if (val == G_ALERTALTERNATE) {
if (remove_dir_recursive(cinfo->dest) < 0) {
alertpanel_error(_("Couldn't delete the old theme in %s."), cinfo->dest);
val = alertpanel_full(_("Delete certificate"),
_("Do you really want to delete this certificate?"),
- GTK_STOCK_CANCEL, GTK_STOCK_DELETE, NULL, FALSE,
- NULL, ALERT_WARNING, G_ALERTDEFAULT);
+ GTK_STOCK_CANCEL, GTK_STOCK_DELETE, NULL, ALERTFOCUS_FIRST,
+ FALSE, NULL, ALERT_WARNING);
if (val != G_ALERTALTERNATE)
if (all_searched) {
alertpanel_full(_("Search failed"),
_("Search string not found."),
- GTK_STOCK_CLOSE, NULL, NULL, FALSE,
- NULL, ALERT_WARNING, G_ALERTDEFAULT);
+ GTK_STOCK_CLOSE, NULL, NULL, ALERTFOCUS_FIRST,
+ FALSE, NULL, ALERT_WARNING);
break;
}
str = _("End of list reached; continue from beginning?");
val = alertpanel(_("Search finished"), str,
- GTK_STOCK_NO, "+" GTK_STOCK_YES, NULL);
+ GTK_STOCK_NO, GTK_STOCK_YES, NULL,
+ ALERTFOCUS_SECOND);
if (G_ALERTALTERNATE == val) {
if (backward) {
node = GTK_CMCTREE_NODE(GTK_CMCLIST(ctree)->row_list_end);
val = alertpanel(_("Process mark"),
_("Some marks are left. Process them?"),
- GTK_STOCK_NO, GTK_STOCK_YES, GTK_STOCK_CANCEL);
+ GTK_STOCK_NO, GTK_STOCK_YES, GTK_STOCK_CANCEL, ALERTFOCUS_FIRST);
if (G_ALERTALTERNATE == val) {
summary_unlock(summaryview);
summary_execute(summaryview);
val = alertpanel(_("No more unread messages"),
_("No unread message found. "
"Search from the end?"),
- GTK_STOCK_NO, "+"GTK_STOCK_YES, NULL);
+ GTK_STOCK_NO, GTK_STOCK_YES, NULL, ALERTFOCUS_SECOND);
break;
case NEXTUNREADMSGDIALOG_ASSUME_YES:
val = G_ALERTALTERNATE;
val = alertpanel(_("No more unread messages"),
_("No unread message found. "
"Go to next folder?"),
- GTK_STOCK_NO, "+"GTK_STOCK_YES, NULL);
+ GTK_STOCK_NO, GTK_STOCK_YES, NULL, ALERTFOCUS_SECOND);
break;
case NEXTUNREADMSGDIALOG_ASSUME_YES:
val = G_ALERTALTERNATE;
val = alertpanel(_("No more new messages"),
_("No new message found. "
"Search from the end?"),
- GTK_STOCK_NO, "+"GTK_STOCK_YES, NULL);
+ GTK_STOCK_NO, GTK_STOCK_YES, NULL, ALERTFOCUS_SECOND);
break;
case NEXTUNREADMSGDIALOG_ASSUME_YES:
val = G_ALERTALTERNATE;
val = alertpanel(_("No more new messages"),
_("No new message found. "
"Go to next folder?"),
- GTK_STOCK_NO, "+"GTK_STOCK_YES, NULL);
+ GTK_STOCK_NO, GTK_STOCK_YES, NULL, ALERTFOCUS_SECOND);
break;
case NEXTUNREADMSGDIALOG_ASSUME_YES:
val = G_ALERTALTERNATE;
val = alertpanel(_("No more marked messages"),
_("No marked message found. "
"Search from the end?"),
- GTK_STOCK_NO, "+"GTK_STOCK_YES, NULL);
+ GTK_STOCK_NO, GTK_STOCK_YES, NULL, ALERTFOCUS_SECOND);
if (val != G_ALERTALTERNATE) return;
node = summary_find_prev_flagged_msg(summaryview, NULL,
MSG_MARKED, TRUE);
val = alertpanel(_("No more marked messages"),
_("No marked message found. "
"Go to next folder?"),
- GTK_STOCK_NO, "+"GTK_STOCK_YES, NULL);
+ GTK_STOCK_NO, GTK_STOCK_YES, NULL, ALERTFOCUS_SECOND);
break;
case NEXTUNREADMSGDIALOG_ASSUME_YES:
val = G_ALERTALTERNATE;
val = alertpanel(_("No more labeled messages"),
_("No labeled message found. "
"Search from the end?"),
- GTK_STOCK_NO, "+"GTK_STOCK_YES, NULL);
+ GTK_STOCK_NO, GTK_STOCK_YES, NULL, ALERTFOCUS_SECOND);
if (val != G_ALERTALTERNATE) return;
node = summary_find_prev_flagged_msg(summaryview, NULL,
MSG_CLABEL_FLAG_MASK, TRUE);
val = alertpanel(_("No more labeled messages"),
_("No labeled message found. "
"Search from the beginning?"),
- GTK_STOCK_NO, "+"GTK_STOCK_YES, NULL);
+ GTK_STOCK_NO, GTK_STOCK_YES, NULL, ALERTFOCUS_SECOND);
if (val != G_ALERTALTERNATE) return;
if (summaryview->sort_type == SORT_ASCENDING)
node = summary_find_next_flagged_msg(summaryview, NULL,
if (ask_if_needed && prefs_common.ask_mark_all_read) {
val = alertpanel_full(_("Mark all as read"),
_("Do you really want to mark all mails in this folder as read?"),
- GTK_STOCK_NO, GTK_STOCK_YES, NULL,
- TRUE, NULL, ALERT_QUESTION, G_ALERTDEFAULT);
+ GTK_STOCK_NO, GTK_STOCK_YES, NULL, ALERTFOCUS_FIRST,
+ TRUE, NULL, ALERT_QUESTION);
if ((val & ~G_ALERTDISABLE) != G_ALERTALTERNATE)
return;
if (ask_if_needed && prefs_common.ask_mark_all_read) {
val = alertpanel_full(_("Mark all as unread"),
_("Do you really want to mark all mails in this folder as unread?"),
- GTK_STOCK_NO, GTK_STOCK_YES, NULL,
- TRUE, NULL, ALERT_QUESTION, G_ALERTDEFAULT);
+ GTK_STOCK_NO, GTK_STOCK_YES, NULL, ALERTFOCUS_FIRST,
+ TRUE, NULL, ALERT_QUESTION);
if ((val & ~G_ALERTDISABLE) != G_ALERTALTERNATE)
return;
num);
aval = alertpanel(ngettext("Delete message", "Delete messages", num),
buf,
- GTK_STOCK_CANCEL, "+"GTK_STOCK_DELETE, NULL);
+ GTK_STOCK_CANCEL, GTK_STOCK_DELETE, NULL, ALERTFOCUS_SECOND);
g_free(buf);
if (aval != G_ALERTALTERNATE) {
END_LONG_OPERATION(summaryview);
if (is_file_exist(dest)) {
aval = alertpanel(_("Append or Overwrite"),
_("Append or overwrite existing file?"),
- _("_Append"), _("_Overwrite"),
- GTK_STOCK_CANCEL);
+ _("_Append"), _("_Overwrite"), GTK_STOCK_CANCEL,
+ ALERTFOCUS_FIRST);
if (aval != 0 && aval != 1)
return;
}
"want to continue?"),
g_list_length(clist->selection));
if (g_list_length(clist->selection) > 9
- && alertpanel(_("Warning"), msg, GTK_STOCK_CANCEL, "+" GTK_STOCK_YES, NULL)
- != G_ALERTALTERNATE) {
+ && alertpanel(_("Warning"), msg, GTK_STOCK_CANCEL, GTK_STOCK_YES,
+ NULL, ALERTFOCUS_SECOND) != G_ALERTALTERNATE) {
g_free(msg);
return;
}
_("Filtering"),
_("There are some filtering rules that belong to an account.\n"
"Please choose what to do with these rules:"),
- GTK_STOCK_CANCEL, _("_Filter"), NULL, TRUE, G_ALERTALTERNATE, vbox);
+ GTK_STOCK_CANCEL, _("_Filter"), NULL, ALERTFOCUS_SECOND,
+ TRUE, vbox);
if ((val & ~G_ALERTDISABLE) != G_ALERTALTERNATE) {
return FALSE;
_("Real URL:"), uri->uri,
_("Open it anyway?"));
aval = alertpanel_full(_("Phishing attempt warning"), msg,
- GTK_STOCK_CANCEL, _("_Open URL"), NULL, FALSE,
- NULL, ALERT_WARNING, G_ALERTDEFAULT);
+ GTK_STOCK_CANCEL, _("_Open URL"), NULL, ALERTFOCUS_FIRST,
+ FALSE, NULL, ALERT_WARNING);
g_free(msg);
if (aval == G_ALERTALTERNATE)
retval = TRUE;
res = g_strdup_printf(_("Overwrite existing file '%s'?"),
filename);
aval = alertpanel(_("Overwrite"), res, GTK_STOCK_CANCEL,
- GTK_STOCK_OK, NULL);
+ GTK_STOCK_OK, NULL, ALERTFOCUS_FIRST);
g_free(res);
if (G_ALERTALTERNATE != aval)
return;
if (alertpanel(_("Offline warning"),
_("You're working offline. Override?"),
GTK_STOCK_NO, GTK_STOCK_YES,
- NULL) != G_ALERTALTERNATE)
+ NULL, ALERTFOCUS_FIRST) != G_ALERTALTERNATE)
return;
/* ask for confirmation before sending queued messages only
if (alertpanel(_("Send queued messages"),
_("Send all queued messages?"),
GTK_STOCK_CANCEL, _("_Send"),
- NULL) != G_ALERTALTERNATE)
+ NULL, ALERTFOCUS_FIRST) != G_ALERTALTERNATE)
return;
}
}