[anjuta-devel] Common settings



Hi,


I'm looking at this bug
https://bugzilla.gnome.org/show_bug.cgi?id=664514

There are several issues with settings, especially editor settings. By example currently we have the menu View->Editor which is managed by the documentation manager and his setting
org.gnome.anjuta.document-manager/docman-eol
org.gnome.anjuta.document-manager/docman-linenumber-visible

Then sourceview is using
org.gnome.anjuta.document-manager/docman-eol
org.gnome.anjuta.sourceview/margin-linenumber-visible

And scintilla
org.gnome.anjuta.plugins.scintilla/view-eol
org.gnome.anjuta.plugins.scintilla/margin-linenumber-visible

It means that with sourceview only the first settings is working as expected and with scintilla both settings are not working.


Anyway, I'm not sure it's a good idea to manager these settings in the document manager. - If we have an editor which doesn't support line number, I don't know how to remove this setting. - If we have another plugin for the document manager, it must provide these settings. I think it will be better to define them in the interface as they are part of the API. + The nice thing to have them in the document manager is that you can change the editor and still keep your settings.


So, I can propose several solutions.

1. Move and duplicate these settings in each editor settings so
org.gnome.anjuta.plugins.sourceview/view-eol
org.gnome.anjuta.plugins.sourceview/margin-linenumber-visible
org.gnome.anjuta.plugins.scintilla/view-eol
org.gnome.anjuta.plugins.scintilla/margin-linenumber-visible
and create the menu item in the editor plugins.


2. Move these settings in special area and share them between the editor so by example
org.gnome.anjuta.common.editor/view-eol
org.gnome.anjuta.common.editor/margin-linenumber-visible
declare them in a file in libanjuta directory but still create the menu item in the editor plugins. A editor plugin could use only a part of these settings.


3. Keep these settings in the document manager so
org.gnome.anjuta.plugins.document-manager/view-eol
org.gnome.anjuta.plugins.document-manager/margin-linenumber-visible
Declare them in the libanjuta/interface/libanjuta.idl file and create the menu item in the editor plugins.


4. Keep these settings in the document manager so
org.gnome.anjuta.plugins.document-manager/view-eol
org.gnome.anjuta.plugins.document-manager/margin-linenumber-visible
Declare them in the libanjuta/interface/libanjuta.idl file and create the menu item in the document manager plugin.


I would prefer rather the solution 2 then 1. The drawback of the solution 2 is that we need to define all common settings. And if we change a private settings to a common one, its path will change and the user with loose its original value. I don't think it's a big issue though or we can keep the common keys in their original directories, just listing them in a libanjuta header file.

The common area could be used for warning and error colors currently defined in the message view plugin and used by the editors too.



What do you think about this? Do you have other ideas?


Regards,

Sébastien



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