The watched pot did not boil. gnome-shell-extension preferences via website



It's all my fault.

I think I understand why the gnome-shell-preferences-prefs tool
functions properly with my extension when the extension is picked from
the combobox and fails when the extenion is passed on the command-line.
In extensionPrefs/main.js  _getExtensionPrefsModule is called twice if
the extension is passed on the command-line, but it is called only once
if the tool is invoked with no argument and the extension is picked from
the combobox. On the first call _getExtensionPrefsModule imports the
prefs, inits the prefs and then stores it away and returns the prefs.
On the second call it just returns the stored object from the first
call.  When I tracked this down I realized that in my prefs.js the prefs
gobject was created at import time and I had assigned it with "let".
Apparently it lost its scope when it was stored away.  I don't think
this is a problem with extensionPrefs/main.js.  I think you just have to
create your gobject in buildPrefsWidget.  Its only a two line change in
my prefs.js so I will re-submit my extension today.  My experience is
limited with java so if what I've written here is way off base please
enligten me.  

Jasper, thanks for your help.

Norman



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