X-Git-Url: http://git.maemo.org/git/?a=blobdiff_plain;f=src%2Fwidgets%2Fmodest-recpt-editor.c;h=6f4d1a15d723c8858b08e425ed7649726d9963a9;hb=ec47f9c9669fccab54927a49c3c0f4233df2f180;hp=73be435586020b1bc5e7bf030029b58a1b73f16c;hpb=84c2681caafc791433135f704227111272e45203;p=modest diff --git a/src/widgets/modest-recpt-editor.c b/src/widgets/modest-recpt-editor.c index 73be435..6f4d1a1 100644 --- a/src/widgets/modest-recpt-editor.c +++ b/src/widgets/modest-recpt-editor.c @@ -42,6 +42,7 @@ #include #include #include +#include static GObjectClass *parent_class = NULL; @@ -629,10 +630,18 @@ modest_recpt_editor_on_key_press_event (GtkTextView *text_view, break; case GDK_BackSpace: { + #if GTK_CHECK_VERSION(2, 10, 0) /* gtk_text_buffer_get_has_selection is only available in GTK+ 2.10 */ if (gtk_text_buffer_get_has_selection (buffer)) { gtk_text_buffer_delete_selection (buffer, TRUE, TRUE); return TRUE; } + #else + if (gtk_text_buffer_get_selection_bounds (buffer, NULL, NULL)) { + gtk_text_buffer_delete_selection (buffer, TRUE, TRUE); + return TRUE; + } + #endif + tag = prev_iter_has_recipient (&location); if (tag != NULL) { GtkTextIter iter_in_tag;