projects
/
modest
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
* Modified the _get_display_size method to fit with the file management specs
[modest]
/
src
/
widgets
/
modest-recpt-editor.c
diff --git
a/src/widgets/modest-recpt-editor.c
b/src/widgets/modest-recpt-editor.c
index
73be435
..
6f4d1a1
100644
(file)
--- a/
src/widgets/modest-recpt-editor.c
+++ b/
src/widgets/modest-recpt-editor.c
@@
-42,6
+42,7
@@
#include <pango/pango-attributes.h>
#include <string.h>
#include <gdk/gdkkeysyms.h>
#include <pango/pango-attributes.h>
#include <string.h>
#include <gdk/gdkkeysyms.h>
+#include <gtk/gtk.h>
static GObjectClass *parent_class = NULL;
static GObjectClass *parent_class = NULL;
@@
-629,10
+630,18
@@
modest_recpt_editor_on_key_press_event (GtkTextView *text_view,
break;
case GDK_BackSpace:
{
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;
}
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;
tag = prev_iter_has_recipient (&location);
if (tag != NULL) {
GtkTextIter iter_in_tag;