From 353b34d1aa41743eafa50d5a60fb42d6f31dfaeb Mon Sep 17 00:00:00 2001 From: None Date: Sat, 4 Apr 2015 00:09:17 +0200 Subject: [PATCH] Remove some comments, fix an obscure undefined variable error on gnome-shell 3.10 . --- src/prefs.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/prefs.js b/src/prefs.js index 1beba7d..78988ea 100644 --- a/src/prefs.js +++ b/src/prefs.js @@ -101,9 +101,7 @@ const WeatherPrefsWidget = new GObject.Class({ this.MainWidget = this.Window.get_object("main-widget"); this.treeview = this.Window.get_object("tree-treeview"); - // this.liststore = this.Window.get_object("treestore"); this.liststore = this.Window.get_object("tree-liststore"); - this.Iter = this.liststore.get_iter_first(); this.Window.get_object("tree-toolbutton-add").connect("clicked", Lang.bind(this, function() { this.addCity(); @@ -121,10 +119,6 @@ const WeatherPrefsWidget = new GObject.Class({ this.selectionChanged(selection); })); - - - // this.treeview.set_model(this.liststore); - let column = new Gtk.TreeViewColumn(); this.treeview.append_column(column); @@ -182,7 +176,12 @@ const WeatherPrefsWidget = new GObject.Class({ }, refreshUI: function() { + this.MainWidget = this.Window.get_object("main-widget"); + this.treeview = this.Window.get_object("tree-treeview"); + this.liststore = this.Window.get_object("tree-liststore"); + this.Window.get_object("tree-toolbutton-remove").sensitive = Boolean(this.city.length); + this.Window.get_object("tree-toolbutton-edit").sensitive = Boolean(this.city.length); if (mCities != this.city) { if (this.liststore !== undefined)