[gnome-documents] sidebar: minor cleanups



commit 6d71db393295ab279d5baad08d8032ba1f9fd1f1
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Thu Oct 13 15:06:34 2011 -0400

    sidebar: minor cleanups
    
    Don't store the global CategoryManager in a local variable.

 src/sidebar.js |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/src/sidebar.js b/src/sidebar.js
index 91f9eff..a4760a1 100644
--- a/src/sidebar.js
+++ b/src/sidebar.js
@@ -52,9 +52,8 @@ SidebarModel.prototype = {
         let iter = null;
 
         this.model = Gd.create_sidebar_store();
-        this._categoryManager = Global.categoryManager;
 
-        let categories = this._categoryManager.getCategories();
+        let categories = Global.categoryManager.getCategories();
         for (idx in categories) {
             let category = categories[idx];
             iter = this.model.append();
@@ -72,7 +71,6 @@ SidebarView.prototype = {
     _init: function() {
         this._model = new SidebarModel();
         this._treeModel = this._model.model;
-        this._categoryManager = Global.categoryManager;
 
         this._treeView = new Gtk.TreeView({ headers_visible: false,
                                             vexpand: true });
@@ -87,7 +85,7 @@ SidebarView.prototype = {
                 let iter = this._treeModel.get_iter(path)[1];
                 let id = this._treeModel.get_value(iter, SidebarModelColumns.ID);
 
-                this._categoryManager.setActiveCategoryId(id);
+                Global.categoryManager.setActiveCategoryId(id);
             }));
 
         let col = new Gtk.TreeViewColumn();



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