Re: [gedit-list] Feature bounty: Support for profiles



On Tue, Aug 3, 2010 at 2:36 PM, ricardo lafuente <bollecs sollec org> wrote:
Hi all,

Some months ago i asked the list regarding support for 'profiles' in Gedit -- i.e. being able to load Gedit with a different set of options according to a saved settings profile. There is an old feature request for this: https://bugzilla.gnome.org/show_bug.cgi?id=392023 , as well as a thread discussing it: http://osdir.com/ml/gedit-list/2010-01/msg00011.html

I am working on an application that uses Gedit as a small IDE. It works great, but requires users to activate plugins manually in order to work. And the 'profiles' feature is almost essential to this project, since it's mostly aimed at newbies who never coded before.

So i would like to put forward a feature bounty -- i'm an independent coder and not part of an organisation/company, so my funds are very limited for the moment; i would be happy to shell out 200 euro to a developer that would implement this feature.

Also, i'd encourage anyone who also wants to see this happen to pitch in a few quid to the bounty, since this is not a trivial feature to implement, apparently.

Anyone up for this?

On Tue, 3 Aug 2010 14:40:48, Nacho <nacho resa gmail com> wrote:

Hey,

not sure yet but maybe this can be done with GSettingsList that AFAIK we are still
waiting for it.

Regards.

=====

Hello,

I also want to have Gedit profiles, and I have some ideas on how to implement it.

A profile is not just a list of which plugins to enable, but _all_ the settings, including the "common" settings like indentation style, style scheme, etc.

What we can do for creating a new profile is simply create a copy of org.gnome.gedit.gschema.xml, change its default values and install it into another name like "org.gnome.gedit-profile_name" or "org.gnome.gedit.profile_name", but the second form can have conflicts.

Then we could invoke gedit like this (an alias can be created for more convenience):
gedit --profile profile_name

It should be possible to run different instances of gedit with different profiles that are completely independent.

I have looked a little at the sources and I think it's not difficult to do.
First, a function like get_root_settings () could be created that returns the string "org.gnome.gedit" or "org.gnome.gedit-profile_name" if we are on a profile, etc.
And the other thing is to change the dbus name in gedit_dbus_run ().
I think there is nothing else to do, but I'll see tomorrow when I'll try that.

A drawback of this solution is that if the settings of Gedit change (a new setting, or a name modification, ...), the gschemas of the profiles have to be updated too.

This solution, if it works, is fine but the user can not creates its own profiles easily.
GSettingsList could be a solution for that since it could be used to store gnome-terminal profiles or telepathy accounts, according to [1].
And indeed, GSettingsList is not currently pushed on the master branch of glib, but the code is in the gsettings branch [2].


Another thing that I would like to see (and will try to do in the future) in Gedit is a libgedit, so IDEs can use it like a framework. This is not incompatible with profiles, and some developers who wants more flexibility than a Gedit plugin can create a new IDE more easily. And maybe it could be even possible to use gedit plugins in an IDE that use libgedit, since it's the same API, but it's not for tomorrow...

[1] http://www.mail-archive.com/gtk-devel-list gnome org/msg11753.html
[2] http://git.gnome.org/browse/glib/tree/gio/gsettingslist.h?h=gsettings

Best regards,
Sébastien


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