[polari] placeholder: Add placeholder to Add Network section
- From: Gitlab Administrative User <gitlab src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [polari] placeholder: Add placeholder to Add Network section
- Date: Sat, 28 Oct 2017 17:10:52 +0000 (UTC)
commit 8cf45802c56eec49126c7a254308990e13f946f1
Author: Augusto Cesar <augusto cms7 gmail com>
Date: Wed Dec 7 13:05:26 2016 -0200
placeholder: Add placeholder to Add Network section
The "Add Network" section of Polari's join dialog doesn't give any
feedback when the search does not return any results.
To fix this, add a GTK box with the looking glass icon and a label
giving the proper feedback as a placeholder in the connections list.
https://bugzilla.gnome.org/show_bug.cgi?id=762892
src/connections.js | 14 ++++++++++++++
1 file changed, 14 insertions(+)
---
diff --git a/src/connections.js b/src/connections.js
index 1c712dd..86f7b4a 100644
--- a/src/connections.js
+++ b/src/connections.js
@@ -98,6 +98,20 @@ var ConnectionsList = GObject.registerClass({
this._list.set_header_func(Lang.bind(this, this._updateHeader));
this._list.set_sort_func(Lang.bind(this, this._sort));
+ let placeholder = new Gtk.Box({ halign: Gtk.Align.CENTER,
+ valign: Gtk.Align.CENTER,
+ orientation: Gtk.Orientation.VERTICAL,
+ visible: true });
+ placeholder.add(new Gtk.Image({ icon_name: 'edit-find-symbolic',
+ pixel_size : 115,
+ visible : true }));
+ placeholder.add(new Gtk.Label({ label : _("No results."),
+ visible : true}));
+
+ placeholder.get_style_context().add_class('dim-label');
+
+ this._list.set_placeholder(placeholder);
+
this._accountsMonitor = AccountsMonitor.getDefault();
this._accountsMonitor.connect('account-added', (mon, account) => {
this._setAccountRowSensitive(account, false);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]