[gnome-documents] selections: only show the separator when the favorite icon is shown
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-documents] selections: only show the separator when the favorite icon is shown
- Date: Tue, 1 Nov 2011 16:02:31 +0000 (UTC)
commit 8c5f415faa14c1805b6e0a56155436226011d758
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Tue Nov 1 11:57:50 2011 -0400
selections: only show the separator when the favorite icon is shown
src/selections.js | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/src/selections.js b/src/selections.js
index f8e502a..ca9cf23 100644
--- a/src/selections.js
+++ b/src/selections.js
@@ -105,9 +105,8 @@ SelectionToolbar.prototype = {
this.widget.insert(this._toolbarFavorite, 0);
this._toolbarFavorite.connect('clicked', Lang.bind(this, this._onToolbarFavorite));
- let separator = new Gtk.SeparatorToolItem();
- separator.show();
- this.widget.insert(separator, 1);
+ this._separator = new Gtk.SeparatorToolItem();
+ this.widget.insert(this._separator, 1);
this._toolbarOpen = new Gtk.ToolButton({ icon_name: 'document-open-symbolic' });
this.widget.insert(this._toolbarOpen, 2);
@@ -179,6 +178,9 @@ SelectionToolbar.prototype = {
showFavorite &= ((favCount == 0) || (favCount == selection.length));
+ // if we're showing the favorite icon, also show the separator
+ this._separator.set_visible(showFavorite);
+
let openLabel = null;
if (apps.length == 1) {
// Translators: this is the Open action in a context menu
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]