2005-11-22 [colin] 1.9.100cvs27
authorColin Leroy <colin@colino.net>
Tue, 22 Nov 2005 18:17:50 +0000 (18:17 +0000)
committerColin Leroy <colin@colino.net>
Tue, 22 Nov 2005 18:17:50 +0000 (18:17 +0000)
* src/compose.c
* src/gtk/gtkaspell.c
Fix right-clicking on a misspelled word
Fix More... in suggestions menu

ChangeLog
PATCHSETS
configure.ac
src/compose.c
src/gtk/gtkaspell.c

index 77633be..5304ac8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2005-11-22 [colin]     1.9.100cvs27
+
+       * src/compose.c
+       * src/gtk/gtkaspell.c
+               Fix right-clicking on a misspelled word
+               Fix More... in suggestions menu
+
 2005-11-22 [wwp]       1.9.100cvs26
 
        * src/prefs_template.c
index d3be77f..4a0bab5 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.1.2.2 -r 1.1.2.3 manual/handling.xml;  ) > 1.9.100cvs24.patchset
 ( cvs diff -u -r 1.60.2.38 -r 1.60.2.39 src/addressbook.c;  cvs diff -u -r 1.382.2.194 -r 1.382.2.195 src/compose.c;  cvs diff -u -r 1.9.2.30 -r 1.9.2.31 src/gtk/gtkaspell.c;  cvs diff -u -r 1.5.2.3 -r 1.5.2.4 src/gtk/gtkaspell.h;  ) > 1.9.100cvs25.patchset
 ( cvs diff -u -r 1.12.2.16 -r 1.12.2.17 src/prefs_template.c;  ) > 1.9.100cvs26.patchset
+( cvs diff -u -r 1.382.2.195 -r 1.382.2.196 src/compose.c;  cvs diff -u -r 1.9.2.31 -r 1.9.2.32 src/gtk/gtkaspell.c;  ) > 1.9.100cvs27.patchset
index 5eddf46..7874065 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 MICRO_VERSION=100
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=26
+EXTRA_VERSION=27
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 9bfc98d..88c6f1d 100644 (file)
@@ -5211,6 +5211,21 @@ static gboolean text_clicked(GtkWidget *text, GdkEventButton *event,
 {
        gint prev_autowrap;
        GtkTextBuffer *buffer;
+#if USE_ASPELL
+       if (event->button == 3) {
+               GtkTextIter iter;
+               gint x, y;
+               /* move the cursor to allow GtkAspell to check the word
+                * under the mouse */
+               gtk_text_view_window_to_buffer_coords(GTK_TEXT_VIEW(text),
+                       GTK_TEXT_WINDOW_TEXT, event->x, event->y,
+                       &x, &y);
+               gtk_text_view_get_iter_at_location (GTK_TEXT_VIEW(text),
+                       &iter, x, y);
+               gtk_text_buffer_place_cursor (GTK_TEXT_VIEW(text)->buffer, &iter);
+               return FALSE; /* pass the event so that the right-click goes through */
+       }
+#endif
        if (event->button == 2) {
                BLOCK_WRAP();
                entry_paste_clipboard(compose, compose->focused_editable, 
@@ -5556,9 +5571,6 @@ static Compose *compose_create(PrefsAccount *account, ComposeMode mode)
                                                gtkaspell_checkers_strerror());
                                gtkaspell_checkers_reset_error();
                        } else {
-
-                               GtkWidget *menuitem;
-
                                if (!gtkaspell_set_sug_mode(gtkaspell,
                                                prefs_common.aspell_sugmode)) {
                                        debug_print("Aspell: could not set "
index a51ec3f..f2abc66 100644 (file)
@@ -1992,7 +1992,11 @@ static GSList *make_sug_menu(GtkAspell *gtkaspell)
                        item = gtk_menu_item_new_with_label(utf8buf);
                        g_free(utf8buf);
                        gtk_widget_show(item);
-                       list = g_slist_append(list, item);
+                       if (curmenu == NULL) {
+                               list = g_slist_append(list, item);
+                       } else {
+                               gtk_menu_append(GTK_MENU(curmenu), item);
+                       }
                        g_signal_connect(G_OBJECT(item), "activate",
                                         G_CALLBACK(replace_word_cb),
                                         gtkaspell);