[nautilus] Select all on F2 in rename mode
- From: Alexander Larsson <alexl src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [nautilus] Select all on F2 in rename mode
- Date: Tue, 6 Oct 2009 10:10:48 +0000 (UTC)
commit c7bfedfbf8883ddeacfdd0818d7c1af9530c4f52
Author: Marcus Carlson <mdc tajt nu>
Date: Tue Oct 6 12:08:44 2009 +0200
Select all on F2 in rename mode
This is a another quick way to switch from not selecting extension
to selecting everything (in addition to the existing shift-F2 combo).
libnautilus-private/nautilus-icon-container.c | 5 ++++-
src/file-manager/fm-list-view.c | 7 +++++--
2 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/libnautilus-private/nautilus-icon-container.c b/libnautilus-private/nautilus-icon-container.c
index e2bbcb3..4393e68 100644
--- a/libnautilus-private/nautilus-icon-container.c
+++ b/libnautilus-private/nautilus-icon-container.c
@@ -8285,9 +8285,12 @@ nautilus_icon_container_start_renaming_selected_item (NautilusIconContainer *con
int x, y, width;
int start_offset, end_offset;
- /* Check if it already in renaming mode. */
+ /* Check if it already in renaming mode, if so - select all */
details = container->details;
if (details->renaming) {
+ eel_editable_label_select_region (EEL_EDITABLE_LABEL (details->rename_widget),
+ 0,
+ -1);
return;
}
diff --git a/src/file-manager/fm-list-view.c b/src/file-manager/fm-list-view.c
index b48a40b..99d205b 100644
--- a/src/file-manager/fm-list-view.c
+++ b/src/file-manager/fm-list-view.c
@@ -2483,9 +2483,12 @@ fm_list_view_start_renaming_file (FMDirectoryView *view,
list_view = FM_LIST_VIEW (view);
- /* Don't start renaming if another rename in this listview is
- * already in progress. */
+ /* Select all if we are in renaming mode already */
if (list_view->details->file_name_column && list_view->details->file_name_column->editable_widget) {
+ gtk_editable_select_region (
+ GTK_EDITABLE (list_view->details->file_name_column->editable_widget),
+ 0,
+ -1);
return;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]