#include "quote_fmt.h"
#include "combobox.h"
-#if USE_ASPELL
+#if USE_ENCHANT
#include "gtkaspell.h"
#endif
GtkWidget *entry_default_reply_to;
GtkWidget *checkbtn_enable_default_account;
GtkWidget *optmenu_default_account;
-#if USE_ASPELL
+#if USE_ENCHANT
GtkWidget *checkbtn_enable_default_dictionary;
GtkWidget *checkbtn_enable_default_alt_dictionary;
GtkWidget *combo_default_dictionary;
GtkWidget *default_to_rec_checkbtn;
GtkWidget *default_reply_to_rec_checkbtn;
GtkWidget *default_account_rec_checkbtn;
-#if USE_ASPELL
+#if USE_ENCHANT
GtkWidget *default_dictionary_rec_checkbtn;
GtkWidget *default_alt_dictionary_rec_checkbtn;
#endif
GtkWidget *enable_processing_when_opening_rec_checkbtn;
GtkWidget *newmailcheck_rec_checkbtn;
GtkWidget *offlinesync_rec_checkbtn;
- GtkTooltips *tooltips;
+ CLAWS_TIP_DECL();
- tooltips = gtk_tooltips_new();
page->item = item;
/* Table */
entry_regexp_test_result = gtk_entry_new();
gtk_box_pack_end (GTK_BOX(hbox_regexp), entry_regexp_test_result, TRUE, TRUE, 0);
SET_TOGGLE_SENSITIVITY(checkbtn_simplify_subject, entry_regexp_test_result);
- gtk_entry_set_editable(GTK_ENTRY(entry_regexp_test_result), FALSE);
+ gtk_editable_set_editable(GTK_EDITABLE(entry_regexp_test_result), FALSE);
rowcount++;
folder_color_btn = gtk_button_new_with_label("");
gtk_widget_set_size_request(folder_color_btn, 36, 26);
gtk_box_pack_start (GTK_BOX(hbox), folder_color_btn, FALSE, FALSE, 0);
- gtk_tooltips_set_tip(tooltips, folder_color_btn,
- _("Pick color for folder"), NULL);
+ CLAWS_SET_TIP(folder_color_btn,
+ _("Pick color for folder"));
page->folder_color = item->prefs->color;
/* Check folder for new mail */
checkbtn_newmailcheck = gtk_check_button_new_with_label(_("Scan for new mail"));
- gtk_tooltips_set_tip(tooltips, checkbtn_newmailcheck,
+ CLAWS_SET_TIP(checkbtn_newmailcheck,
_("Turn this option on if mail is delivered directly "
"to this folder by server side filtering on IMAP or "
- "by an external application"), NULL);
+ "by an external application"));
gtk_table_attach(GTK_TABLE(table), checkbtn_newmailcheck, 0, 2,
rowcount, rowcount+1, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
entry_offlinesync = gtk_entry_new();
gtk_widget_set_size_request (entry_offlinesync, 64, -1);
gtk_widget_show (entry_offlinesync);
- gtk_tooltips_set_tip(tooltips, entry_offlinesync, _("0: all bodies"), NULL);
+ CLAWS_SET_TIP(entry_offlinesync, _("0: all bodies"));
gtk_box_pack_start (GTK_BOX (hbox), entry_offlinesync, FALSE, FALSE, 0);
label_end_offlinesync = gtk_label_new(_("days"));
GtkWidget *optmenu_default_account = NULL;
GtkListStore *optmenu_default_account_menu = NULL;
GtkTreeIter iter;
-#if USE_ASPELL
+#if USE_ENCHANT
GtkWidget *checkbtn_enable_default_dictionary = NULL;
GtkWidget *combo_default_dictionary = NULL;
GtkWidget *checkbtn_enable_default_alt_dictionary = NULL;
page->item = item;
/* Table */
-#if USE_ASPELL
+#if USE_ENCHANT
# define TABLEHEIGHT 7
#else
# define TABLEHEIGHT 6
rowcount, rowcount + 1, GTK_SHRINK, GTK_SHRINK, 0, 0);
rowcount++;
-#if USE_ASPELL
+#if USE_ENCHANT
/* Default dictionary */
checkbtn_enable_default_dictionary = gtk_check_button_new_with_label(_("Default dictionary"));
gtk_table_attach(GTK_TABLE(table), checkbtn_enable_default_dictionary, 0, 1,
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_enable_default_dictionary),
item->prefs->enable_default_dictionary);
- combo_default_dictionary = gtkaspell_dictionary_combo_new(
- prefs_common.aspell_path, TRUE);
+ combo_default_dictionary = gtkaspell_dictionary_combo_new(TRUE);
gtk_table_attach(GTK_TABLE(table), combo_default_dictionary, 1, 2,
rowcount, rowcount + 1, GTK_EXPAND | GTK_FILL, GTK_SHRINK, 0, 0);
dictionary = item->prefs->default_dictionary;
+ if (dictionary && strrchr(dictionary, '/')) {
+ gchar *tmp = g_strdup(strrchr(dictionary, '/')+1);
+ g_free(item->prefs->default_dictionary);
+ item->prefs->default_dictionary = tmp;
+ dictionary = item->prefs->default_dictionary;
+ }
+ if (item->prefs->default_dictionary &&
+ strchr(item->prefs->default_dictionary, '-')) {
+ *(strchr(item->prefs->default_dictionary, '-')) = '\0';
+ }
if (dictionary)
gtkaspell_set_dictionary_menu_active_item(
GTK_COMBO_BOX(combo_default_dictionary), dictionary);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_enable_default_alt_dictionary),
item->prefs->enable_default_alt_dictionary);
- combo_default_alt_dictionary = gtkaspell_dictionary_combo_new(
- prefs_common.aspell_path, FALSE);
+ combo_default_alt_dictionary = gtkaspell_dictionary_combo_new(FALSE);
gtk_table_attach(GTK_TABLE(table), combo_default_alt_dictionary, 1, 2,
rowcount, rowcount + 1, GTK_EXPAND | GTK_FILL, GTK_SHRINK, 0, 0);
dictionary = item->prefs->default_alt_dictionary;
+ if (dictionary && strrchr(dictionary, '/')) {
+ gchar *tmp = g_strdup(strrchr(dictionary, '/')+1);
+ g_free(item->prefs->default_alt_dictionary);
+ item->prefs->default_alt_dictionary = tmp;
+ dictionary = item->prefs->default_alt_dictionary;
+ }
+ if (item->prefs->default_alt_dictionary &&
+ strchr(item->prefs->default_alt_dictionary, '-')) {
+ *(strchr(item->prefs->default_alt_dictionary, '-')) = '\0';
+ }
if (dictionary)
gtkaspell_set_dictionary_menu_active_item(
GTK_COMBO_BOX(combo_default_alt_dictionary), dictionary);
page->entry_default_reply_to = entry_default_reply_to;
page->checkbtn_enable_default_account = checkbtn_enable_default_account;
page->optmenu_default_account = optmenu_default_account;
-#ifdef USE_ASPELL
+#ifdef USE_ENCHANT
page->checkbtn_enable_default_dictionary = checkbtn_enable_default_dictionary;
page->combo_default_dictionary = combo_default_dictionary;
page->checkbtn_enable_default_alt_dictionary = checkbtn_enable_default_alt_dictionary;
page->default_to_rec_checkbtn = default_to_rec_checkbtn;
page->default_reply_to_rec_checkbtn = default_reply_to_rec_checkbtn;
page->default_account_rec_checkbtn = default_account_rec_checkbtn;
-#if USE_ASPELL
+#if USE_ENCHANT
page->default_dictionary_rec_checkbtn = default_dictionary_rec_checkbtn;
page->default_alt_dictionary_rec_checkbtn = default_alt_dictionary_rec_checkbtn;
#endif
GTK_COMBO_BOX(page->optmenu_default_account));
}
-#if USE_ASPELL
+#if USE_ENCHANT
if (all || gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(page->default_dictionary_rec_checkbtn))) {
prefs->enable_default_dictionary =
gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(page->checkbtn_enable_default_dictionary));
gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(page->save_copy_to_folder_rec_checkbtn)) ||
gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(page->default_to_rec_checkbtn)) ||
gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(page->default_account_rec_checkbtn)) ||
-#if USE_ASPELL
+#if USE_ENCHANT
gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(page->default_dictionary_rec_checkbtn)) ||
gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(page->default_alt_dictionary_rec_checkbtn)) ||
#endif
return TRUE;
else if ((node == page->item->node) && item_protocol(item) == A_NNTP &&
!(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(page->default_account_rec_checkbtn))
-#if USE_ASPELL
+#if USE_ENCHANT
|| gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(page->default_dictionary_rec_checkbtn))
|| gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(page->default_alt_dictionary_rec_checkbtn))
#endif
/* Notebook */
notebook = gtk_notebook_new();
gtk_widget_show(notebook);
- gtk_notebook_set_homogeneous_tabs(GTK_NOTEBOOK(notebook), TRUE);
gtk_box_pack_start(GTK_BOX(page_vbox), notebook, TRUE, TRUE, 0);
/* compose format */