/*
* Claws Mail templates subsystem
* Copyright (C) 2001 Alexander Barinov
- * Copyright (C) 2001-2011 Hiroyuki Yamamoto and the Claws Mail team
+ * Copyright (C) 2001-2013 Hiroyuki Yamamoto and 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
#include "manual.h"
#include "gtkutils.h"
#include "menu.h"
+#include "account.h"
enum {
TEMPL_TEXT,
CLAWS_SET_TIP(reg_btn,
_("Append the new template above to the list"));
- subst_btn = gtkut_get_replace_btn(_("Replace"));
+ subst_btn = gtkut_get_replace_btn(_("_Replace"));
gtk_widget_show(subst_btn);
gtk_box_pack_start(GTK_BOX(hbox3), subst_btn, FALSE, TRUE, 0);
g_signal_connect(G_OBJECT(subst_btn), "clicked",
CLAWS_SET_TIP(subst_btn,
_("Replace the selected template in list with the template above"));
- del_btn = gtk_button_new_from_stock(GTK_STOCK_DELETE);
+ del_btn = gtk_button_new_with_mnemonic (_("Re_move"));
+ gtk_button_set_image(GTK_BUTTON(del_btn),
+ gtk_image_new_from_stock(GTK_STOCK_REMOVE,GTK_ICON_SIZE_BUTTON));
gtk_widget_show(del_btn);
gtk_box_pack_start(GTK_BOX(hbox3), del_btn, FALSE, TRUE, 0);
g_signal_connect(G_OBJECT(del_btn), "clicked",
CLAWS_SET_TIP(del_btn,
_("Delete the selected template from the list"));
- clear_btn = gtk_button_new_from_stock (GTK_STOCK_CLEAR);
+ clear_btn = gtk_button_new_with_mnemonic (_("C_lear"));
+ gtk_button_set_image(GTK_BUTTON(clear_btn),
+ gtk_image_new_from_stock(GTK_STOCK_CLEAR,GTK_ICON_SIZE_BUTTON));
gtk_widget_show (clear_btn);
gtk_box_pack_start (GTK_BOX (hbox3), clear_btn, FALSE, TRUE, 0);
g_signal_connect(G_OBJECT (clear_btn), "clicked",
gchar *value;
GtkTextBuffer *buffer;
GtkTextIter start, end;
- GtkTreeModel *model;
gint line;
- model = gtk_tree_view_get_model(GTK_TREE_VIEW(templates.list_view));
-
buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(templates.text_value));
gtk_text_buffer_get_start_iter(buffer, &start);
gtk_text_buffer_get_iter_at_offset(buffer, &end, -1);
static void prefs_template_delete_all_cb(gpointer action, gpointer data)
{
- GtkListStore *list_store;
-
if (alertpanel(_("Delete all templates"),
_("Do you really want to delete all the templates?"),
GTK_STOCK_CANCEL, "+"GTK_STOCK_DELETE, NULL) == G_ALERTDEFAULT)
return;
- list_store = GTK_LIST_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(templates.list_view)));
prefs_template_clear_list();
modified = FALSE;
list_view = GTK_TREE_VIEW(gtk_tree_view_new_with_model(model));
g_object_unref(model);
-#ifndef MAEMO
g_signal_connect(G_OBJECT(list_view), "popup-menu",
G_CALLBACK(prefs_template_list_popup_menu), list_view);
-#else
- gtk_widget_tap_and_hold_setup(GTK_WIDGET(list_view), NULL, NULL,
- GTK_TAP_AND_HOLD_NONE | GTK_TAP_AND_HOLD_NO_INTERNALS);
- g_signal_connect(G_OBJECT(list_view), "tap-and-hold",
- G_CALLBACK(prefs_template_list_popup_menu), list_view);
-#endif
g_signal_connect(G_OBJECT(list_view), "button-press-event",
G_CALLBACK(prefs_template_list_btn_pressed), list_view);