From 130d8f100ed687082c3ed8e1456df2a469f3d030 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Mon, 10 Mar 2014 21:57:07 +0100 Subject: [PATCH] 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 file changed, 20 insertions(+) diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c index a445730c9a..f27a98c0c7 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