Various bug fixes and enhancements, see ChangeLog.claws 2002-02-03
This commit is contained in:
parent
1ef3cdf1fd
commit
8069c3d170
5 changed files with 431 additions and 322 deletions
|
@ -1,3 +1,22 @@
|
|||
2002-02-03 [melvin] 0.7.0claws45
|
||||
|
||||
* src/gtkspell.[ch]
|
||||
Readded function to highlight all misspelled words.
|
||||
Fixed bug where user-provided-words did not replace
|
||||
correctly the misspelled word when using the mouse.
|
||||
Fixed bug where checking a region selected from right to left did
|
||||
not check the region at all.
|
||||
Fixed bug where 'Check backwards' may not check at all.
|
||||
Fixed memory leaks where popup menus and accel_groups were not destroyed.
|
||||
Fixed possible buffer overflow when checking for long strings (>1k).
|
||||
Made cursor and scrollbar positions non changing after uncheck_all/check_all.
|
||||
Accelerators code uses now gtk_widget_add_accel.
|
||||
Removed and disabled obsolete and unfinished code.
|
||||
Cleaning up.
|
||||
|
||||
* src/compose.c
|
||||
Added menu item to Highlight all misspelled words.
|
||||
|
||||
2002-02-01 [paul] 0.7.0claws44
|
||||
|
||||
* src/mainwindow.c
|
||||
|
|
|
@ -8,7 +8,7 @@ MINOR_VERSION=7
|
|||
MICRO_VERSION=0
|
||||
INTERFACE_AGE=0
|
||||
BINARY_AGE=0
|
||||
EXTRA_VERSION=claws44
|
||||
EXTRA_VERSION=claws45
|
||||
VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
|
||||
|
||||
dnl set $target
|
||||
|
|
|
@ -450,11 +450,10 @@ void compose_headerentry_key_press_event_cb(GtkWidget *entry,
|
|||
|
||||
static void compose_show_first_last_header (Compose *compose, gboolean show_first);
|
||||
|
||||
|
||||
#if USE_PSPELL
|
||||
static void compose_check_all (Compose *compose);
|
||||
static void compose_highlight_all (Compose *compose);
|
||||
static void compose_check_backwards (Compose *compose);
|
||||
|
||||
static void compose_check_forwards_go (Compose *compose);
|
||||
#endif
|
||||
|
||||
|
@ -462,7 +461,6 @@ static gboolean compose_send_control_enter (Compose *compose);
|
|||
static void text_activated (GtkWidget *widget,
|
||||
Compose *compose);
|
||||
|
||||
|
||||
static GtkItemFactoryEntry compose_popup_entries[] =
|
||||
{
|
||||
{N_("/_Add..."), NULL, compose_attach_cb, 0, NULL},
|
||||
|
@ -568,11 +566,17 @@ static GtkItemFactoryEntry compose_entries[] =
|
|||
"<control>X", compose_ext_editor_cb, 0, NULL},
|
||||
#if USE_PSPELL
|
||||
{N_("/_Spelling"), NULL, NULL, 0, "<Branch>"},
|
||||
{N_("/_Spelling/Check all or selection"),NULL, compose_check_all, 0, NULL},
|
||||
{N_("/_Spelling/Check backwards misspelled word"), NULL, compose_check_backwards , 0, NULL},
|
||||
{N_("/_Spelling/Forward to next misspelled word"), NULL, compose_check_forwards_go, 0, NULL},
|
||||
{N_("/_Spelling/_Check all or check selection"),
|
||||
NULL, compose_check_all, 0, NULL},
|
||||
{N_("/_Spelling/_Highlight all misspelled words"),
|
||||
NULL, compose_highlight_all, 0, NULL},
|
||||
{N_("/_Spelling/Check _backwards misspelled word"),
|
||||
NULL, compose_check_backwards , 0, NULL},
|
||||
{N_("/_Spelling/_Forward to next misspelled word"),
|
||||
NULL, compose_check_forwards_go, 0, NULL},
|
||||
{N_("/_Spelling/---"), NULL, NULL, 0, "<Separator>"},
|
||||
{N_("/_Spelling/Spelling Configuration"),NULL, NULL, 0, "<Branch>"},
|
||||
{N_("/_Spelling/_Spelling Configuration"),
|
||||
NULL, NULL, 0, "<Branch>"},
|
||||
#endif
|
||||
#if 0 /* NEW COMPOSE GUI */
|
||||
{N_("/_View"), NULL, NULL, 0, "<Branch>"},
|
||||
|
@ -4655,16 +4659,22 @@ static Compose *compose_create(PrefsAccount *account, ComposeMode mode)
|
|||
if (prefs_common.enable_pspell) {
|
||||
gtkpspell = gtkpspell_new((const gchar*)prefs_common.dictionary,
|
||||
conv_get_current_charset_str(),
|
||||
prefs_common.misspelled_col,
|
||||
prefs_common.check_while_typing,
|
||||
GTK_STEXT(text));
|
||||
if (!gtkpspell) {
|
||||
alertpanel_error(_("Spell checker could not be started.\n%s"), gtkpspellcheckers->error_message);
|
||||
gtkpspell_checkers_reset();
|
||||
gtkpspell_checkers_reset_error();
|
||||
} else {
|
||||
|
||||
GtkWidget *menuitem;
|
||||
|
||||
gtkpspell_set_sug_mode(gtkpspell, prefs_common.pspell_sugmode);
|
||||
if (!gtkpspell_set_sug_mode(gtkpspell, prefs_common.pspell_sugmode)) {
|
||||
debug_print(_("Pspell: could not set suggestion mode %s"),
|
||||
gtkpspellcheckers->error_message);
|
||||
gtkpspell_checkers_reset_error();
|
||||
}
|
||||
|
||||
menuitem = gtk_item_factory_get_item(ifactory, "/Spelling/Spelling Configuration");
|
||||
gtkpspell_populate_submenu(gtkpspell, menuitem);
|
||||
menu_set_sensitive(ifactory, "/Spelling", TRUE);
|
||||
|
@ -6647,6 +6657,12 @@ static void compose_check_all(Compose *compose)
|
|||
gtkpspell_check_all(compose->gtkpspell);
|
||||
}
|
||||
|
||||
static void compose_highlight_all(Compose *compose)
|
||||
{
|
||||
if (compose->gtkpspell)
|
||||
gtkpspell_highlight_all(compose->gtkpspell);
|
||||
}
|
||||
|
||||
static void compose_check_backwards(Compose *compose)
|
||||
{
|
||||
if (compose->gtkpspell)
|
||||
|
|
549
src/gtkspell.c
549
src/gtkspell.c
File diff suppressed because it is too large
Load diff
|
@ -41,15 +41,15 @@
|
|||
#define PSPELL_BADSPELLERMODE 3
|
||||
|
||||
typedef struct _GtkPspellCheckers {
|
||||
GSList * checkers;
|
||||
GSList * dictionary_list;
|
||||
gchar * error_message;
|
||||
GSList *checkers;
|
||||
GSList *dictionary_list;
|
||||
gchar *error_message;
|
||||
} GtkPspellCheckers;
|
||||
|
||||
typedef struct _Dictionary {
|
||||
gchar * fullname;
|
||||
gchar * dictname; /* dictname points into fullname */
|
||||
gchar * encoding;
|
||||
gchar *fullname;
|
||||
gchar *dictname; /* dictname points into fullname */
|
||||
gchar *encoding;
|
||||
} Dictionary;
|
||||
|
||||
typedef struct _GtkPspeller {
|
||||
|
@ -64,32 +64,33 @@ typedef void (*ContCheckFunc) (gpointer *gtkpspell);
|
|||
|
||||
#define GTKPSPELLWORDSIZE 1024
|
||||
typedef struct _GtkPspell {
|
||||
GtkPspeller * gtkpspeller;
|
||||
GtkPspeller *gtkpspeller;
|
||||
gchar theword[GTKPSPELLWORDSIZE];
|
||||
gchar newword[GTKPSPELLWORDSIZE];
|
||||
gint start_pos;
|
||||
gint end_pos;
|
||||
gint orig_pos;
|
||||
gint last_check_pos;
|
||||
gint end_check_pos;
|
||||
gboolean misspelled;
|
||||
gboolean check_while_typing;
|
||||
|
||||
ContCheckFunc continue_check;
|
||||
#if 0
|
||||
Dictionary *dict1;
|
||||
Dictionary *dict2;
|
||||
|
||||
Dictionary * dict1;
|
||||
Dictionary * dict2;
|
||||
|
||||
GtkWidget * gui;
|
||||
gpointer * compose;
|
||||
|
||||
GtkWidget* config_menu;
|
||||
GtkWidget * replace_entry;
|
||||
GtkWidget *gui;
|
||||
gpointer *compose;
|
||||
#endif
|
||||
GtkWidget *config_menu;
|
||||
GtkWidget *popup_config_menu;
|
||||
GtkWidget *sug_menu;
|
||||
GtkWidget *replace_entry;
|
||||
|
||||
gint default_sug_mode;
|
||||
gint max_sug;
|
||||
GList * suggestions_list;
|
||||
GList *suggestions_list;
|
||||
|
||||
GtkSText * gtktext;
|
||||
GtkSText *gtktext;
|
||||
GdkColor highlight;
|
||||
} GtkPspell;
|
||||
|
||||
|
@ -101,10 +102,11 @@ GtkPspellCheckers* gtkpspell_checkers_new ();
|
|||
|
||||
GtkPspellCheckers* gtkpspell_checkers_delete ();
|
||||
|
||||
void gtkpspell_checkers_reset ();
|
||||
void gtkpspell_checkers_reset_error ();
|
||||
|
||||
GtkPspell* gtkpspell_new (const gchar *dictionary,
|
||||
const gchar *encoding,
|
||||
gint misspelled_color,
|
||||
gboolean check_while_typing,
|
||||
GtkSText *gtktext);
|
||||
|
||||
|
@ -127,6 +129,7 @@ void gtkpspell_check_backwards (GtkPspell *gtkpspell);
|
|||
|
||||
void gtkpspell_check_all (GtkPspell *gtkpspell);
|
||||
void gtkpspell_uncheck_all (GtkPspell *gtkpspell);
|
||||
void gtkpspell_highlight_all (GtkPspell *gtkpspell);
|
||||
|
||||
void gtkpspell_populate_submenu (GtkPspell *gtkpspell,
|
||||
GtkWidget *menuitem);
|
||||
|
|
Loading…
Reference in a new issue