summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfgang Ulbrich <[email protected]>2016-01-08 00:50:35 +0100
committerWolfgang Ulbrich <[email protected]>2016-01-13 15:05:42 +0100
commit288ceb4c5d5af35676031754db51cc1c5c53105f (patch)
treee5825acf756977b3d5ef374217db1b45226cc78a
parentf700d63c933877362ed1cb92d8bddd2df1e29227 (diff)
downloadcaja-288ceb4c5d5af35676031754db51cc1c5c53105f.tar.bz2
caja-288ceb4c5d5af35676031754db51cc1c5c53105f.tar.xz
GTK3 icon-container: fix setting the selection when renaming
Closes: bgo #642766 taken from: https://git.gnome.org/browse/nautilus/commit/?id=a8a5b8d
-rw-r--r--libcaja-private/caja-icon-container.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/libcaja-private/caja-icon-container.c b/libcaja-private/caja-icon-container.c
index 9a6095e7..93af49bc 100644
--- a/libcaja-private/caja-icon-container.c
+++ b/libcaja-private/caja-icon-container.c
@@ -9264,12 +9264,20 @@ caja_icon_container_start_renaming_selected_item (CajaIconContainer *container,
{
eel_filename_get_rename_region (editable_text, &start_offset, &end_offset);
}
+
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gtk_widget_show (details->rename_widget);
+ gtk_widget_grab_focus (details->rename_widget);
+#endif
+
eel_editable_label_select_region (EEL_EDITABLE_LABEL (details->rename_widget),
start_offset,
end_offset);
- gtk_widget_show (details->rename_widget);
+#if !GTK_CHECK_VERSION (3, 0, 0)
+ gtk_widget_show (details->rename_widget);
gtk_widget_grab_focus (details->rename_widget);
+#endif
g_signal_emit (container,
signals[RENAMING_ICON], 0,