[gnome-documents] all: code cleanups



commit fcc6ce227f16c4b3e672533545c5acc0fb6eb4ff
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Fri Aug 26 16:07:22 2011 -0400

    all: code cleanups

 src/documents.js         |    4 +---
 src/trackerController.js |   13 +------------
 2 files changed, 2 insertions(+), 15 deletions(-)
---
diff --git a/src/documents.js b/src/documents.js
index d2eb24e..538341b 100644
--- a/src/documents.js
+++ b/src/documents.js
@@ -268,7 +268,7 @@ DocumentManager.prototype = {
                 (identifier.indexOf('https://docs.google.com') != -1));
     },
 
-    newDocument: function(cursor) {
+    addDocument: function(cursor) {
         let identifier = cursor.get_string(Query.QueryColumns.IDENTIFIER)[0];
         let doc;
 
@@ -279,8 +279,6 @@ DocumentManager.prototype = {
 
         this._docs.push(doc);
         this.emit('new-document', doc);
-
-        return doc;
     },
 
     clear: function() {
diff --git a/src/trackerController.js b/src/trackerController.js
index 8432ab1..168a546 100644
--- a/src/trackerController.js
+++ b/src/trackerController.js
@@ -24,16 +24,9 @@ const Lang = imports.lang;
 const Mainloop = imports.mainloop;
 const Signals = imports.signals;
 
-const Gio = imports.gi.Gio;
-const GLib = imports.gi.GLib;
-const Tracker = imports.gi.Tracker;
-const Gd = imports.gi.Gd;
-const Gtk = imports.gi.Gtk;
-
 const GDataMiner = imports.gDataMiner;
 const Global = imports.global;
 const Query = imports.query;
-const TrackerUtils = imports.trackerUtils;
 const Utils = imports.utils;
 
 const MINER_REFRESH_TIMEOUT = 60; /* seconds */
@@ -90,7 +83,7 @@ TrackerController.prototype = {
 
     _addRowFromCursor: function(cursor) {
         this._offsetController.setItemCount(cursor.get_integer(Query.QueryColumns.TOTAL_COUNT));
-        Global.documentManager.newDocument(cursor);
+        Global.documentManager.addDocument(cursor);
     },
 
     _onQueryFinished: function() {
@@ -134,10 +127,6 @@ TrackerController.prototype = {
                                       null, Lang.bind(this, this._onQueryExecuted));
     },
 
-    _emitModelUpdateDone: function() {
-        this.emit('model-update-done');
-    },
-
     _refresh: function() {
         Global.selectionController.freezeSelection(true);
         Global.documentManager.clear();



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