diff options
author | Carlos Soriano <csoriano@gnome.org> | 2015-05-05 20:30:15 +0200 |
---|---|---|
committer | Carlos Soriano <csoriano@gnome.org> | 2015-05-05 20:30:15 +0200 |
commit | 10a96ee39eadb19e1ec46393c3f79c96d271de0a (patch) | |
tree | 58f9c83a7c4189d454357a1135e70c5ff5d11345 | |
parent | 0ff112a5a1d658a791deb14004e2763428b03543 (diff) | |
download | nautilus-10a96ee39eadb19e1ec46393c3f79c96d271de0a.tar.gz |
nautilus-view: select text after showing the dialog
Until patch on bug 748805 is accepted or we figure a different recommended way,
we have to select the entry after showing the dialog, since the entry selects
all the text on focus, withouth taking into account previous selection.
-rw-r--r-- | src/nautilus-view.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/nautilus-view.c b/src/nautilus-view.c index 2adf89c25..9f3763c04 100644 --- a/src/nautilus-view.c +++ b/src/nautilus-view.c @@ -1752,12 +1752,6 @@ nautilus_view_rename_dialog_new (NautilusView *view, else gtk_label_set_text (GTK_LABEL (label_file_name), _("File name")); gtk_entry_set_text (GTK_ENTRY (dialog_data->name_entry), nautilus_file_get_name (target_file)); - /* Select the name part withouth the file extension */ - eel_filename_get_rename_region (nautilus_file_get_name (target_file), - &start_offset, &end_offset); - gtk_editable_select_region (GTK_EDITABLE (dialog_data->name_entry), - start_offset, end_offset); - gtk_builder_connect_signals (builder, dialog_data); g_signal_connect (dialog_data->dialog, @@ -1766,6 +1760,12 @@ nautilus_view_rename_dialog_new (NautilusView *view, user_data); gtk_widget_show_all (dialog_data->dialog); + /* Select the name part withouth the file extension */ + eel_filename_get_rename_region (nautilus_file_get_name (target_file), + &start_offset, &end_offset); + gtk_editable_select_region (GTK_EDITABLE (dialog_data->name_entry), + start_offset, end_offset); + /* Update the ok button status */ nautilus_view_file_name_dialog_validate_name (dialog_data); |