[gnome-documents/gnome-3-18] selections: Load spinner while creating first collection
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-documents/gnome-3-18] selections: Load spinner while creating first collection
- Date: Wed, 7 Oct 2015 13:23:49 +0000 (UTC)
commit 414001923ed6c3bcbb809a76494c036dfa1f5c41
Author: Alessandro Bono <shadow openaliasbox org>
Date: Mon Aug 31 00:54:06 2015 +0200
selections: Load spinner while creating first collection
https://bugzilla.gnome.org/show_bug.cgi?id=754338
data/ui/organize-collection-dialog.ui | 9 +++++++++
src/selections.js | 9 ++++++++-
2 files changed, 17 insertions(+), 1 deletions(-)
---
diff --git a/data/ui/organize-collection-dialog.ui b/data/ui/organize-collection-dialog.ui
index 3999e35..ab1ad31 100644
--- a/data/ui/organize-collection-dialog.ui
+++ b/data/ui/organize-collection-dialog.ui
@@ -88,6 +88,15 @@
</object>
</child>
<child>
+ <object class="GtkSpinner" id="viewSpinner">
+ <property name="visible">True</property>
+ <property name="halign">center</property>
+ <property name="valign">center</property>
+ <property name="width_request">32</property>
+ <property name="height_request">32</property>
+ </object>
+ </child>
+ <child>
<object class="GtkGrid" id="viewCollections">
<property name="visible">True</property>
<property name="orientation">vertical</property>
diff --git a/src/selections.js b/src/selections.js
index ff2abe8..22c1856 100644
--- a/src/selections.js
+++ b/src/selections.js
@@ -598,6 +598,7 @@ const OrganizeCollectionDialog = new Lang.Class({
'viewEmpty',
'addEntryEmpty',
'addButtonEmpty',
+ 'viewSpinner',
'viewCollections',
'addGridCollections',
'addEntryCollections',
@@ -680,8 +681,12 @@ const OrganizeCollectionDialog = new Lang.Class({
let job = new SetCollectionForSelectionJob(createdUrn, true);
job.run(null);
}));
- if (!this._collectionList.isEmpty())
+ if (this._collectionList.isEmpty()) {
+ this._viewSpinner.start();
+ this._content.set_visible_child(this._viewSpinner);
+ } else {
this._scrolledWindowCollections.get_vadjustment().set_value(0);
+ }
},
_onTextChanged: function(entry) {
@@ -749,10 +754,12 @@ const OrganizeCollectionDialog = new Lang.Class({
_onCollectionListChanged: function() {
if (this._collectionList.isEmpty()) {
+ this._viewSpinner.stop();
this._content.set_visible_child(this._viewEmpty);
this._addEntryEmpty.grab_focus();
this._addButtonEmpty.grab_default();
} else {
+ this._viewSpinner.stop();
this._content.set_visible_child(this._viewCollections);
this._addEntryCollections.grab_focus();
this._addButtonCollections.grab_default();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]