[gnome-sound-recorder] row: restore focus on entry
- From: Bilal Elmoussaoui <bilelmoussaoui src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-sound-recorder] row: restore focus on entry
- Date: Sat, 4 Jul 2020 20:57:05 +0000 (UTC)
commit b468d95c36d4998a439be67f081a408369634f43
Author: Kavan Mevada <kavanmevada gmail com>
Date: Sun Jul 5 02:14:43 2020 +0530
row: restore focus on entry
data/ui/row.ui | 1 -
src/row.js | 6 +++---
2 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/data/ui/row.ui b/data/ui/row.ui
index 868f134..97c94a5 100644
--- a/data/ui/row.ui
+++ b/data/ui/row.ui
@@ -165,7 +165,6 @@
<property name="margin_right">12</property>
<property name="activates_default">True</property>
<property name="width_chars">29</property>
- <property name="input_purpose">name</property>
</object>
<packing>
<property name="name">edit</property>
diff --git a/src/row.js b/src/row.js
index 0edd38c..e329d17 100644
--- a/src/row.js
+++ b/src/row.js
@@ -95,12 +95,12 @@ var Row = GObject.registerClass({
this._editMode = state;
if (state) {
+ if (!this.expanded)
+ this.activate();
+
this._entry.grab_focus();
this._saveBtn.grab_default();
this._renameStack.visible_child_name = 'save';
-
- if (!this.expanded)
- this.activate();
} else {
this._renameStack.visible_child_name = 'rename';
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]