/*
* Claws Mail templates subsystem
* Copyright (C) 2001 Alexander Barinov
- * Copyright (C) 2001-2013 Hiroyuki Yamamoto and the Claws Mail team
+ * Copyright (C) 2001-2013 The Claws Mail team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
window = gtkut_window_new(GTK_WINDOW_TOPLEVEL, "prefs_template");
gtk_window_set_position(GTK_WINDOW(window), GTK_WIN_POS_CENTER);
gtk_window_set_resizable(GTK_WINDOW(window), TRUE);
+ gtk_window_set_type_hint(GTK_WINDOW(window), GDK_WINDOW_TYPE_HINT_DIALOG);
vbox = gtk_vbox_new(FALSE, 8);
gtk_widget_show(vbox);
arrow1 = gtk_arrow_new(GTK_ARROW_DOWN, GTK_SHADOW_OUT);
gtk_widget_show(arrow1);
gtk_box_pack_start(GTK_BOX(hbox2), arrow1, FALSE, FALSE, 0);
- gtk_widget_set_size_request(arrow1, -1, 16);
hbox3 = gtk_hbox_new(TRUE, 4);
gtk_widget_show(hbox3);
CLAWS_SET_TIP(top_btn,
_("Move the selected template to the top"));
- PACK_VSPACER(vbox3, spc_vbox, VSPACING_NARROW_2);
+ PACK_SPACER(vbox3, spc_vbox, VSPACING_NARROW_2);
up_btn = gtk_button_new_from_stock(GTK_STOCK_GO_UP);
gtk_widget_show(up_btn);
CLAWS_SET_TIP(down_btn,
_("Move the selected template down"));
- PACK_VSPACER(vbox3, spc_vbox, VSPACING_NARROW_2);
+ PACK_SPACER(vbox3, spc_vbox, VSPACING_NARROW_2);
bottom_btn = gtk_button_new_from_stock(GTK_STOCK_GOTO_BOTTOM);
gtk_widget_show(bottom_btn);
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 (!parsed_buf) {
if (line)
*line = quote_fmt_get_line();
+ quote_fmtlex_destroy();
return FALSE;
}
- if (email) {
- const gchar *start = strrchr(parsed_buf, '<');
- const gchar *end = strrchr(parsed_buf, '>');
- const gchar *at = strrchr(parsed_buf, '@');
- const gchar *space = strrchr(parsed_buf, ' ');
- if (!at)
- result = FALSE;
- if (at && space && (!start || !end || end < start || start < space))
- result = FALSE;
- }
quote_fmt_reset_vartable();
+ quote_fmtlex_destroy();
}
return result;
}
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();
static GtkActionEntry prefs_template_popup_entries[] =
{
- {"PrefsTemplatePopup", NULL, "PrefsTemplatePopup" },
+ {"PrefsTemplatePopup", NULL, "PrefsTemplatePopup", NULL, NULL, NULL },
{"PrefsTemplatePopup/Delete", NULL, N_("_Delete"), NULL, NULL, G_CALLBACK(prefs_template_delete_cb) },
{"PrefsTemplatePopup/DeleteAll", NULL, N_("Delete _all"), NULL, NULL, G_CALLBACK(prefs_template_delete_all_cb) },
{"PrefsTemplatePopup/Duplicate", NULL, N_("D_uplicate"), NULL, NULL, G_CALLBACK(prefs_template_duplicate_cb) },