[polari] connections: Suggest default values for new connections
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [polari] connections: Suggest default values for new connections
- Date: Sun, 27 Sep 2015 15:59:11 +0000 (UTC)
commit a4e2b5dc7957f861f73b5790ca94d53c856e36b4
Author: Kunaal Jain <kunaalus gmail com>
Date: Sun Sep 27 12:52:32 2015 +0530
connections: Suggest default values for new connections
Reduce the work users have to do to setup a new connection by using
the user's username as default nickname and offer completion for the
optional realname field.
https://bugzilla.gnome.org/show_bug.cgi?id=709980
src/connections.js | 14 +++++++++++++-
1 files changed, 13 insertions(+), 1 deletions(-)
---
diff --git a/src/connections.js b/src/connections.js
index c00bc4a..273a1a1 100644
--- a/src/connections.js
+++ b/src/connections.js
@@ -205,6 +205,18 @@ const ConnectionDetails = new Lang.Class({
this._nickEntry.connect('changed',
Lang.bind(this, this._onCanConfirmChanged));
+ this._nickEntry.text = GLib.get_user_name();
+
+ let realnameStore = new Gtk.ListStore();
+ realnameStore.set_column_types([GObject.TYPE_STRING]);
+ realnameStore.insert_with_valuesv(-1, [0], [GLib.get_real_name()]);
+
+ let completion = new Gtk.EntryCompletion({ model: realnameStore,
+ text_column: 0,
+ inline_completion: true,
+ popup_completion: false });
+ this._realnameEntry.set_completion(completion);
+
if (!this._account)
return;
@@ -256,7 +268,7 @@ const ConnectionDetails = new Lang.Class({
reset: function() {
this._serverEntry.text = '';
this._descEntry.text = '';
- this._nickEntry.text = '';
+ this._nickEntry.text = GLib.get_user_name();
this._realnameEntry.text = '';
},
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]