[gnome-documents/wip/ui-changes] preview: don't show document pages in the toolbar



commit db65da268562c7d2b4aa147e5ffb04cf628391a2
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Wed Nov 28 15:10:50 2012 -0500

    preview: don't show document pages in the toolbar

 src/preview.js |   20 +-------------------
 1 files changed, 1 insertions(+), 19 deletions(-)
---
diff --git a/src/preview.js b/src/preview.js
index 2720fe8..d7f9818 100644
--- a/src/preview.js
+++ b/src/preview.js
@@ -403,25 +403,12 @@ const PreviewToolbar = new Lang.Class({
 
     _setToolbarTitle: function() {
         let primary = null;
-        let detail = null;
         let doc = Global.documentManager.getActiveItem();
 
         if (doc)
             primary = doc.name;
 
-        if (this._model) {
-            let curPage, totPages;
-
-            curPage = this._model.get_page();
-            totPages = this._model.get_document().get_n_pages();
-
-            detail = _("%d of %d").format(curPage + 1, totPages);
-        }
-
-        if (detail)
-            detail = '(' + detail + ')';
-
-        this.widget.set_labels(primary, detail);
+        this.widget.set_labels(primary, null);
     },
 
     setModel: function(model) {
@@ -429,11 +416,6 @@ const PreviewToolbar = new Lang.Class({
             return;
 
         this._model = model;
-        this._model.connect('page-changed', Lang.bind(this,
-            function() {
-                this._setToolbarTitle();
-            }));
-
         this._setToolbarTitle();
     }
 });



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]