[gtk+] entry: revert text handles to cursor mode after cut/paste
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] entry: revert text handles to cursor mode after cut/paste
- Date: Mon, 10 Mar 2014 22:49:30 +0000 (UTC)
commit 130d8f100ed687082c3ed8e1456df2a469f3d030
Author: Carlos Garnacho <carlosg gnome org>
Date: Mon Mar 10 21:57:07 2014 +0100
entry: revert text handles to cursor mode after cut/paste
The current text selection goes away in that case, so reflect
that too in the handles.
gtk/gtkentry.c | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c
index a445730..f27a98c 100644
--- a/gtk/gtkentry.c
+++ b/gtk/gtkentry.c
@@ -5795,6 +5795,16 @@ gtk_entry_cut_clipboard (GtkEntry *entry)
}
gtk_entry_selection_bubble_popup_unset (entry);
+
+ if (priv->text_handle)
+ {
+ GtkTextHandleMode handle_mode;
+
+ handle_mode = _gtk_text_handle_get_mode (priv->text_handle);
+
+ if (handle_mode != GTK_TEXT_HANDLE_MODE_NONE)
+ gtk_entry_update_handles (entry, GTK_TEXT_HANDLE_MODE_CURSOR);
+ }
}
static void
@@ -5806,6 +5816,16 @@ gtk_entry_paste_clipboard (GtkEntry *entry)
gtk_entry_paste (entry, GDK_SELECTION_CLIPBOARD);
else
gtk_widget_error_bell (GTK_WIDGET (entry));
+
+ if (priv->text_handle)
+ {
+ GtkTextHandleMode handle_mode;
+
+ handle_mode = _gtk_text_handle_get_mode (priv->text_handle);
+
+ if (handle_mode != GTK_TEXT_HANDLE_MODE_NONE)
+ gtk_entry_update_handles (entry, GTK_TEXT_HANDLE_MODE_CURSOR);
+ }
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]