summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorraveit65 <[email protected]>2015-06-18 02:15:03 +0200
committerraveit65 <[email protected]>2015-06-18 02:15:03 +0200
commit2365acdcb607f7cbb3820900b2a979b1bf23778a (patch)
tree25ad632725737da9bca5de4d91d2f55c98e13d1c
parentb4e25754bf17ef54569367718eda57ea759108c5 (diff)
downloadcaja-2365acdcb607f7cbb3820900b2a979b1bf23778a.tar.bz2
caja-2365acdcb607f7cbb3820900b2a979b1bf23778a.tar.xz
editable-label GTk3: only clear the selection if we change to insensitive
this fixes non selected text if renaming a file taken from: https://git.gnome.org/browse/nautilus/commit/?h=gnome-3-0&id=d2c3410
-rw-r--r--eel/eel-editable-label.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/eel/eel-editable-label.c b/eel/eel-editable-label.c
index 54ed3087..fe7d5e2f 100644
--- a/eel/eel-editable-label.c
+++ b/eel/eel-editable-label.c
@@ -1208,7 +1208,9 @@ eel_editable_label_state_changed (GtkWidget *widget,
label = EEL_EDITABLE_LABEL (widget);
- eel_editable_label_select_region (label, 0, 0);
+ /* clear any selection if we're insensitive */
+ if (!gtk_widget_is_sensitive (widget))
+ eel_editable_label_select_region (label, 0, 0);
if (GTK_WIDGET_CLASS (eel_editable_label_parent_class)->state_changed)
GTK_WIDGET_CLASS (eel_editable_label_parent_class)->state_changed (widget, prev_state);