[gnome-shell] PlacesManager: fix .gtk-bookmarks monitor scope



commit 36eb745eccef50533995624ea4dd8df8c4673296
Author: Stefan 'psYchotic' Zwanenburg <stefanhetzwaantje gmail com>
Date:   Sun Oct 16 18:30:13 2011 +0200

    PlacesManager: fix .gtk-bookmarks monitor scope
    
    The GFileMonitor on ~/.gtk-bookmarks was block-scoped in the
    PlacesManager._init() function, which caused it to be destroyed as soon
    as the constructor was done. This caused changes in bookmarks to never
    be notified to possible watchers (such as the places-menu extension).
    To fix this, the 'monitor' variable has been promoted to an object
    instance member.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=661921

 js/ui/placeDisplay.js |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/placeDisplay.js b/js/ui/placeDisplay.js
index 4864f2c..19f823f 100644
--- a/js/ui/placeDisplay.js
+++ b/js/ui/placeDisplay.js
@@ -195,9 +195,9 @@ PlacesManager.prototype = {
 
         this._bookmarksPath = GLib.build_filenamev([GLib.get_home_dir(), '.gtk-bookmarks']);
         this._bookmarksFile = Gio.file_new_for_path(this._bookmarksPath);
-        let monitor = this._bookmarksFile.monitor_file(Gio.FileMonitorFlags.NONE, null);
+        this._monitor = this._bookmarksFile.monitor_file(Gio.FileMonitorFlags.NONE, null);
         this._bookmarkTimeoutId = 0;
-        monitor.connect('changed', Lang.bind(this, function () {
+        this._monitor.connect('changed', Lang.bind(this, function () {
             if (this._bookmarkTimeoutId > 0)
                 return;
             /* Defensive event compression */



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