[gnome-shell] endSessionDialog: hide app list when there are no apps
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] endSessionDialog: hide app list when there are no apps
- Date: Tue, 22 Mar 2011 18:23:06 +0000 (UTC)
commit 7dcd2313d87592e904952711e804ea69f2795a12
Author: Ray Strode <rstrode redhat com>
Date: Mon Mar 21 16:11:15 2011 -0400
endSessionDialog: hide app list when there are no apps
We don't want its padding to show up when it shouldn't
be visible.
https://bugzilla.gnome.org/show_bug.cgi?id=641375
js/ui/endSessionDialog.js | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/endSessionDialog.js b/js/ui/endSessionDialog.js
index d1fff2d..55aa05a 100644
--- a/js/ui/endSessionDialog.js
+++ b/js/ui/endSessionDialog.js
@@ -288,12 +288,26 @@ EndSessionDialog.prototype = {
this.contentLayout.add(scrollView,
{ x_fill: true,
y_fill: true });
+ scrollView.hide();
+
this._applicationList = new St.BoxLayout({ vertical: true });
scrollView.add_actor(this._applicationList,
{ x_fill: true,
y_fill: true,
x_align: St.Align.START,
y_align: St.Align.MIDDLE });
+
+ this._applicationList.connect('actor-added',
+ Lang.bind(this, function() {
+ if (this._applicationList.get_children().length == 1)
+ scrollView.show();
+ }));
+
+ this._applicationList.connect('actor-removed',
+ Lang.bind(this, function() {
+ if (this._applicationList.get_children().length == 0)
+ scrollView.hide();
+ }));
},
_onDestroy: function() {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]