-2001-01-16 [darko] 0.7.0claws10
+2002-01-17 [melvin] 0.7.0claws11
+
+ * src/gtkspell.c
+ fix default dictionary not being saved.
+
+2002-01-16 [darko] 0.7.0claws10
* src/compose.c
fix wrapping crash with URL longer than wrapping margin
-2001-12-08 [hoa] 0.7.0claws10
+2002-12-08 [hoa] 0.7.0claws10
* src/matcher_parser_parse.y
fixed some bugs
fixed a long standingspell checker bug which could
cause a crash after sending a message.
-2001-01-16 [paul] 0.7.0claws6
+2002-01-16 [paul] 0.7.0claws6
* sync with sylpheed 0.7.0cvs7
see ChangeLog entries 2002-01-10, 2002-01-11, 2002-01-14,
for (tmp = dict_list; tmp != NULL; tmp = g_slist_next(tmp)) {
dict = (Dictionary *) tmp->data;
item = gtk_menu_item_new_with_label(dict->dictname);
- if (dict->dictname)
- gtk_object_set_data(GTK_OBJECT(item), "dict_name",
- dict);
+ gtk_object_set_data(GTK_OBJECT(item), "dict_name",
+ dict->fullname);
gtk_menu_append(GTK_MENU(menu), item);
gtk_widget_show(item);
gchar *gtkpspell_get_dictionary_menu_active_item(GtkWidget *menu)
{
GtkWidget *menuitem;
- Dictionary *result;
+ gchar *dict_fullname;
gchar *label;
g_return_val_if_fail(GTK_IS_MENU(menu), NULL);
menuitem = gtk_menu_get_active(GTK_MENU(menu));
- result = (Dictionary *) gtk_object_get_data(GTK_OBJECT(menuitem), "dict_name");
- g_return_val_if_fail(result->fullname, NULL);
- label = g_strdup(result->fullname);
+ dict_fullname = (gchar *) gtk_object_get_data(GTK_OBJECT(menuitem), "dict_name");
+ g_return_val_if_fail(dict_fullname, NULL);
+ label = g_strdup(dict_fullname);
return label;
}
tmp = g_slist_next(tmp)) {
dict = (Dictionary *) tmp->data;
item = gtk_check_menu_item_new_with_label(dict->dictname);
- gtk_object_set_data(GTK_OBJECT(item), "dict_name", dict);
+ gtk_object_set_data(GTK_OBJECT(item), "dict_name", dict->fullname);
if (strcmp2(dict->fullname, gtkpspell->gtkpspeller->dictionary->fullname))
gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(item), FALSE);
else {
/* change_dict_cb() - Menu callback : change dict */
static void change_dict_cb(GtkWidget *w, GtkPspell *gtkpspell)
{
- Dictionary *dict, *dict2;
+ Dictionary *dict;
+ gchar *fullname;
GtkPspeller *gtkpspeller;
gint sug_mode;
- /* Dict is simply the menu label */
-
- dict = (Dictionary *) gtk_object_get_data(GTK_OBJECT(w), "dict_name");
+ fullname = (gchar *) gtk_object_get_data(GTK_OBJECT(w), "dict_name");
- if (!strcmp2(dict->fullname, _("None")))
+ if (!strcmp2(fullname, _("None")))
return;
sug_mode = gtkpspell->default_sug_mode;
- dict2 = dictionary_dup(dict);
- if (dict2->encoding)
- g_free(dict2->encoding);
- dict2->encoding = g_strdup(gtkpspell->gtkpspeller->dictionary->encoding);
+ dict = g_new0(Dictionary, 1);
+ dict->fullname = g_strdup(fullname);
+ dict->encoding = g_strdup(gtkpspell->gtkpspeller->dictionary->encoding);
- gtkpspeller = gtkpspeller_new(dict2);
+ gtkpspeller = gtkpspeller_new(dict);
if (!gtkpspeller) {
gchar *message;
gtkpspell_set_sug_mode(gtkpspell, sug_mode);
}
- dictionary_delete(dict2);
+ dictionary_delete(dict);
}
/******************************************************************************/