[Geany-devel] Edit/Save config files anomaly?

Tony Rick tonyr42 at xxxxx
Wed Mar 3 22:08:36 UTC 2010


On Tue, Mar 2, 2010 at 10:59 PM, Tony Rick <tonyr42 at gmail.com> wrote:

> At revision 4720.
>
> I'm trying to understand the Tools->Configuration Files Edit/Save behavior,
> so that I can mimic that in a plugin that does the same thing for template
> files.  When I select *snippets.conf* from the *Configuration Files*submenu, and there is no
> *snippets.conf* in *~/.config/geany (app->configdir)*,  the default  file
> from */usr/share/geany (app->datadir)*  is obviously opened, but a Status
> message is issued indicating that the file is opened in *~/.config/geany
> (app->configdir)*.  I take this to mean that the override convention
> (files in *configdir* overriding files of the same name in *datadir)* is
> being enforced in the editor.  However, when I save the modified file, using
> either the *Save* icon or * File->Save*, I am put into a file save dialog,
> as if I had selected* File->Save As*.
>
> Is this the specified behavior?  Having the *File->Save As* dialog appear
> when *Save* is specified is confusing and inconsistent. It seems to me
> that if the override convention is being enforced, selecting *Save* should
> write the modified file to the location reported in the Status window
> without question, and the save location dialog only offered specifically
> when *Save As* is selected.  If the override convention is not being
> enforced in the editor,  then the Status message is misleading.  The manual
> does not refer specifically to this behavior, only to the fact that *.conf
> * can be manually copied to *configdir* and modified, and will then
> override the default file.   I think it is more consistent to have the
> editor enforce the override file location policy by default on *Save*,
> allow *File->Save As *to be used as an option at the user's discretion,
> and state the override file location policy and the editor's enforcement of
> such clearly in the manual.
>

Here's a simple patch that modifies the Save behavior for config files
edited from the Tools->Configuration Files submenu for your consideration.
Config files that are read from the geany data directory (because they did
not already exist in the local config directory) will be saved to the local
config directory by default.

- tony
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.geany.org/pipermail/devel/attachments/20100303/380bb0fd/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: config_file_save.patch
Type: text/x-patch
Size: 1023 bytes
Desc: not available
URL: <http://lists.geany.org/pipermail/devel/attachments/20100303/380bb0fd/attachment.bin>


More information about the Devel mailing list