[gedit] File browser: focus the text cell before editing
- From: Robert Roth <robertroth src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit] File browser: focus the text cell before editing
- Date: Thu, 29 May 2014 12:16:21 +0000 (UTC)
commit 1953f47f59a67f436bbc86e0f8c7c27740ed0702
Author: Robert Roth <robert roth off gmail com>
Date: Thu May 29 15:14:46 2014 +0300
File browser: focus the text cell before editing
https://bugzilla.gnome.org/show_bug.cgi?id=697101
This patch sets the focus cell to the text cell, as it was not
possible to start a rename before clicking an item in the tree
view because of the focus cell being the icon cell, which can
not be edited.
After setting the focus cell to the text cell, new file and folder
creation starts a rename even before the first tree selection.
plugins/filebrowser/gedit-file-browser-view.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/plugins/filebrowser/gedit-file-browser-view.c b/plugins/filebrowser/gedit-file-browser-view.c
index 52acf76..48ffc70 100644
--- a/plugins/filebrowser/gedit-file-browser-view.c
+++ b/plugins/filebrowser/gedit-file-browser-view.c
@@ -1180,6 +1180,10 @@ gedit_file_browser_view_start_rename (GeditFileBrowserView *tree_view,
tree_view->priv->orig_markup = markup;
tree_view->priv->editable = rowref;
+ /* grab focus on the text cell which is editable */
+ gtk_tree_view_column_focus_cell (tree_view->priv->column,
+ tree_view->priv->text_renderer);
+
gtk_tree_view_set_cursor (GTK_TREE_VIEW (tree_view),
gtk_tree_row_reference_get_path (tree_view->priv->editable),
tree_view->priv->column, TRUE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]