2006-01-22 [colin] 1.9.100cvs180
authorColin Leroy <colin@colino.net>
Sun, 22 Jan 2006 21:47:22 +0000 (21:47 +0000)
committerColin Leroy <colin@colino.net>
Sun, 22 Jan 2006 21:47:22 +0000 (21:47 +0000)
* src/compose.c
* src/gtk/gtkaspell.c
Don't deselect stuff before right-clicking, with aspell.
(This prevented right-click Copy, for example).
Thanks to Clo!

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

index 0e0c0a1c159813fdc57e39248e645b26c7cf02eb..8c555f5697f7a8985c92846fdc25d72a138718b8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2006-01-22 [colin]     1.9.100cvs180
+
+       * src/compose.c
+       * src/gtk/gtkaspell.c
+               Don't deselect stuff before right-clicking, with aspell.
+               (This prevented right-click Copy, for example).
+               Thanks to Clo!
+
 2006-01-22 [paul]      1.9.100cvs179
 
        * src/summary_search.c
index 4cbb6686e4b5aa952ebcbba245c6bf4429d03702..bf0d1b8c924013c638abb027b5ef7a215478ce65 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.42.2.18 -r 1.42.2.19 po/fr.po;  ) > 1.9.100cvs177.patchset
 ( cvs diff -u -r 1.3.2.37 -r 1.3.2.38 src/prefs_themes.c;  ) > 1.9.100cvs178.patchset
 ( cvs diff -u -r 1.15.2.21 -r 1.15.2.22 src/summary_search.c;  ) > 1.9.100cvs179.patchset
+( cvs diff -u -r 1.382.2.228 -r 1.382.2.229 src/compose.c;  cvs diff -u -r 1.9.2.35 -r 1.9.2.36 src/gtk/gtkaspell.c;  ) > 1.9.100cvs180.patchset
index 95790e98e57196aa39bff86ec272b6838e336ae4..8d87ba60f8eb4ccf2b182243a4303ce17cd08434 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 MICRO_VERSION=100
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=179
+EXTRA_VERSION=180
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 5e521c8f2d1435878639aa155e93e5b2a6b338a9..46dca69c062470b2e7d2702956eeb44580767096 100644 (file)
@@ -5308,6 +5308,8 @@ static gboolean text_clicked(GtkWidget *text, GdkEventButton *event,
 #if USE_ASPELL
        if (event->button == 3) {
                GtkTextIter iter;
+               GtkTextIter sel_start, sel_end;
+               gboolean stuff_selected;
                gint x, y;
                /* move the cursor to allow GtkAspell to check the word
                 * under the mouse */
@@ -5316,7 +5318,18 @@ static gboolean text_clicked(GtkWidget *text, GdkEventButton *event,
                        &x, &y);
                gtk_text_view_get_iter_at_location (GTK_TEXT_VIEW(text),
                        &iter, x, y);
+               /* get selection */
+               stuff_selected = gtk_text_buffer_get_selection_bounds(
+                               GTK_TEXT_VIEW(text)->buffer,
+                               &sel_start, &sel_end);
+
                gtk_text_buffer_place_cursor (GTK_TEXT_VIEW(text)->buffer, &iter);
+               /* reselect stuff */
+               if (stuff_selected 
+               && gtk_text_iter_in_range(&iter, &sel_start, &sel_end)) {
+                       gtk_text_buffer_select_range(GTK_TEXT_VIEW(text)->buffer,
+                               &sel_start, &sel_end);
+               }
                return FALSE; /* pass the event so that the right-click goes through */
        }
 #endif
index 0d3d877f4bee3f393e2fc08b574427c47f140564..8519ffa67d1734d4d7aa9279f969ce7b24b973cb 100644 (file)
@@ -548,15 +548,11 @@ static void button_press_intercept_cb(GtkTextView *gtktext,
 
        if (check_at(gtkaspell, gtkaspell->orig_pos)) {
 
-               set_textview_buffer_offset(gtktext, gtkaspell->orig_pos);
-
                if (misspelled_suggest(gtkaspell, gtkaspell->theword)) {
                        spell_menu = make_sug_menu(gtkaspell);
                        suggest = TRUE;
                }
-       } else
-               set_textview_buffer_offset(gtktext, gtkaspell->orig_pos);
-
+       } 
        if (!spell_menu) 
                spell_menu = make_config_menu(gtkaspell);