Re: Implementing settings for extensions



On Mon, Apr 9, 2012 at 11:21 AM, Davide Alberelli <dadexix86 gmail com> wrote:
>> Hm, the configure button shouldn't appear if the extension isn't configurable.
>>
>> Anyway, you implement configurability by adding a prefs.js. See this
>> post for more details:
>>
>>     http://blog.mecheye.net/2012/02/more-extension-api-breaks/
>
>
> Actually that button appears always, also on Gnome 3.2.

Whoops. Should be fixed now.

> Is there a way to have some "how-to"s for using gsettings, schemas, pref.js ecc?
> I'm not a professional programmer and mantain my extension just like a
> hobby, so it would be great to have a place with some (simple)
> examples, maybe with a lot of comments, to start from.
> I know this may take some time to do, but i think that it is more and
> more necessary as time goes and Gnome estensions' way to work spreads.

prefs.js should be a GTK+ widget that interfaces with GSettings. I
gave a very simple example widget in the blog post. The system-monitor
extension has probably the most complicated prefs.js file that I've
seen yet:

    https://github.com/paradoxxxzero/gnome-shell-system-monitor-applet/blob/master/system-monitor paradoxxx zero gmail com/prefs.js

> --
> Davide Alberelli.
> ___
> On Google+ and deviantART.



-- 
  Jasper


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