Dear Geany devs,
Some time ago I received the attached patch though this list (from
Enrico?). I really love the added functionality to prevent duplicate
automatically added quotes and brackets.
Can this be added to Geany itself? Ideally this would be activated
with a checkbox in prefs > editor > completions.
-tnx!-
Harold
I've found one more issue with Geany's "Safe file saving" option. When using g_file_set_contents(), file ownership and permissions are replaced with those for a new file. That fully conforms to GLib documentation (http://library.gnome.org/devel/glib/unstable/glib-File-Utilities.html#g-fil…), but is not good sometimes (e.g. editing an executable script file).
I propose to use GIO API (GFile) instead of g_file_set_contents; the patch is attached. This solution, however, raises some questions:
- It does work for my system (Ubuntu 9.10), but will it work for others, especially Windows? It seems that GIO is also available on Win32, but it requires some testing
- This cannot be named "Safe" file saving, as it does not create a backup first (we can call g_file_replace_contents with make_backup = TRUE, but it would not delete this backup file when the operation completes). Maybe there should be some other configuration option to use (or not to use) this setting? Or should I replace "unsafe" file saving with GIO functions instead of replacing "safe"?
Or even more - make this option work like in GEdit (which, I suppose, uses g_file_replace_contents for both cases, with make_backup=TRUE in "safe" case), adding the corresponding checkbox to preferences dialog?
What do you think?
Hi all.
When several instances of Geany quit in the same time, there is a high
possibility of a conflict. I can reproduce it easily on my machine,
using either trunk or SM version.
To reproduce: open three instances of geany, "geany", "geany -i" and
another "geany" (absence of file names implies -i automatically in
this case). It would be better to open three different files in
the instances, to distinguish them. Then logout or reboot without
quitting geany manually. On my machine, after I (in case of
trunk) or SM code (in case of SM) restart geany, the default session is
always cleared. Expected behaviour: the default session is managed by
the first of the three instances and contains the files, which
were opened in that instance, after restart.
I can see two solutions for this problem. The first is an
additional POSIX process-shared semaphore / mutex for Windows to guard
geany.conf. This should eliminate the problem completely. AFAIK, there
are no wrappers for process synchronization primitives in GLib, so I'll
need to write a thin wrapper myself.
The second option is to change the behaviour of "new instances". If
such an instance (#1) detects a "main instance" (#2) running, it should
not touch geany.conf. Actually, to deal with the described issue, it
is enough to implement this behaviour only when #1 tries to save
geany.conf while quitting.
The second option is easier to write as it does not require
additional synchronization primitives and it's possible to reuse the
code of socket.c. Actually, I already have this option implemented, to
check whether it indeed solves the problem. But, you see, this
solution can't prevent the race condition completely, in distinction
from the first solution. Moreover, some of you may consider the second
solution "hackish", which is enough to decline it.
So, the first solution is right, but the second is easy :-) What do you
think?
Best regards,
Eugene.
Hi!
As some of you might have noticed, the sorting in the "Documents" side
panel is not perfect when extensions are involved. For example, if you
have the three files a.c, a.h and a-b.c, they will be sorted in the
following order [1]:
a.c, a-b.c, a.h
rather than [2]:
a.c, a.h, a-b.c
This is a little annoying to find the a.h file.
As you expected, I've written a patch to fix this, an I propose it here.
Hum, well no: I've written two different patches. Why? Both have
advantages and inconveniences over the other.
Both use g_utf8_collate_key_for_filename() to get a clever sort, which
fixes the problem I spoken above, and also sorts 1, 2 and 10 numerically
rather than alphabetically - thus we have 1, 2, 10 and not 1, 10, 2.
The difference between the two patches is the way thy integrate in Geany.
0001-improved-documents-sorting.diff:
This one is small, almost no code changes, and don't persistently use
more memory. But OTHO, it computes the collate key of both names to
compare each and every time the sort function is called.
0001-improved-documents-sorting-2.diff:
This one is probably faster, but persistently use a little more memory:
it computes the collate key only when adding the item, and stores it in
the tree model.
Another "advantage" of it is that it easily allow to use different
collate functions for files and directories - not sure it is useful.
Then, there are the two patches, I let you chose/discuss the one is the
better if you're interested.
Regards,
Colomban
[1] without the patch,
http://ban.free-h.net/geany/improved-documents-sorting/before.png
[2] with the patch:
http://ban.free-h.net/geany/improved-documents-sorting/after.png
Hi,
Geany 0.18.1.1 was released.
This is a Windows-only release without any code changes. 0.18.1.1
includes the (again) the older and more stable GTK 2.16 release (and
GLib 2.20) to fix compatibility issues with Windows 2000 and more
stability.
All downloads can be found on http://download.geany.org.
Regards,
Enrico
--
Get my GPG key from http://www.uvena.de/pub.asc
Hi. I'm Tony Rick, and I hit the wrong list for requesting the 'help'
response the first time.
I'm in Portland Oregon, where a lot of programmers like me are 'at
liberty' and looking for things to do. I'm currently helping teach a
Beginning C Programming class at a local computer hardware recycling
non-profit organization, FreeGeek. (Maybe you've heard of it,
http://www.freegeek.org if not). The class is using Geany v0.14 on
Debian Lenny, which will update to 0.17 with a backports repository
enabled. One of the questions that came up in class was about the GPL
license in the header being a visual irritant. I explained briefly
about editing templates, but having them updated requires a Geany
restart in that version. I scanned the mailing list archives and
features list and template management issues have been raised before.
One of the features requests (2925273, from arquebus), requested a
templates file selection item in the Tools menu. I thought I might
start there. I haven't figured out yet what the criteria are for
deciding what should be psrt of the core and what should be a plugin.
I also discovered that custom templates do not appear automatically when
saved. The Documentation indicates that this requires a Geany restart
also, but the 'Reload Configuration' tool does indeed add them. I'm not
sure whether this is a bug (templates and related menus should be
updated when files are modified, like configuration files), or a
serendipitous feature that simply 'came along with' Reload
Configuration, or should be mentioned in the Templates section of the
documentation (which it currently does not, IIRC).
My original thought was to use GIO and monitor the templates directory
for changes, but I saw several posts about problems with GIO and
detecting remote file changes and the use of the GIO compiler
conditional, and so assumed that the Reload Configuration method had
been chosen as an interrim solution, and that GIO file change detection
was on hold until the remote file issue had been resolved.
- tony
Hi,
In my GeanyGenDoc plugin I was using sci_insert_text() to insert the
generated documentation comment; but I wanted to be able to indent the
inserted comment to follow the indentation at the insertion position.
I found editor_insert_text_block() which seemed quite interesting, but
it didn't do what I expected -- and still no indentation. Of course when
going a bit in the code, since I inserted my comment at the start of the
line, and editor_insert_text_block() adds the indentation that is found
between the start of the line and the insertion position… which are the
same in my case.
Then, I wondered how to fix my problem, and finally found a solution
that consists to insert at start of line + sci_get_line_indentation() [1].
But I have some questions:
1) How editor_insert_text_block() is meant to be used to get the right
indentation, since (if I'm right) we need to insert at the right
position in the first line? Is the solution I've found the right one, or
is there a cleaner/simpler solution?
2) If this is a good way to proceed, could we have
sci_get_line_indentation() in the plugin API? Even though it is easy to
reproduce [2] it would be nicer to have it directly.
Regards,
Colomban
[1]
http://geany-plugins.svn.sourceforge.net/viewvc/geany-plugins/trunk/geanyge…
[2]
http://geany-plugins.svn.sourceforge.net/viewvc/geany-plugins/trunk/geanyge…
>-------- Оригинално писмо --------
>От: Frank Lanitz
>Относно: Re: [Geany-devel] Geany Treebrowser Plugin
>До:
Geany development list
>Изпратено на:
Вторник, 2010, Април 27 17:39:10 EEST
>Hi,
>
>On Sun, 25 Apr 2010 22:13:08 +0300 (EEST), Enzo Matrix
>wrote:
>> Well,... i was posting an ask for English string
help, then nobody send
>me
Oh.. sorry but i am not recieveing anything :( ?!
>> error report, i am
thinking that i had no errors with english strings
>> *ROFL*
>>
>> Now I want asking You for help with testing the
stability and usability,
>> any cryticisms are welcome.
>
>Well, I'd like to have the field for typing some content in
on top of
>view.
What kind of content?
>More feedback maybe later :)
>
>Cheers,
>Frank
Thanks
>-------- Оригинално писмо --------
>От: Tambet Arak
>Относно: Re: [Geany-devel] Geany Treebrowser Plugin
>До: Geany development list
>Изпратено на: Вторник, 2010, Април 27 19:55:13 EEST
>Hi,
>
>Some quick feedback:
>
>1. You could watch filesystem changes and update the tree
>automatically. Right now no new files appear when they're created. The
>user has to manually hit Refresh
I will try to implement some filesystem watch signals for future
>, but then there's another problem:
>the tree is reset to the home dir.
Can u tell where this is happen
>
>2. Restore tree state after opening Geany (i.e. the current directory,
>all opened branches etc).
>
>3. Even when a branch is closed, its state is forgotten. E.g. when I
>have /a/b/c/d/e open in the treeviewer, close /a and reopen it, I
>don't see c, d, or e any longer.
Yes i am working under these problems now
>
>Best regards,
>Tambet
Thanks
>_______________________________________________
>Geany-devel mailing list
>Geany-devel(a)uvena.de
>http://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel
>
Well,... i was posting an ask for English string help, then nobody send me error report, i am thinking that i had no errors with english strings *ROFL*
Now I want asking You for help with testing the stability and usability, any cryticisms are welcome.
For these that didn`t know what i am talking about http://img22.imageshack.us/img22/1553/geanytreebrowserplugin0.png
Hey,
just for your information:
some time ago, I set up two other systems to create nightly builds for
Debian Stable (i386) and ArchLinux (i686), with corresponding package
repositories of course.
And with the help of Dominic, now we also have nightly builds for
Fedora 12 i686. Thank you!
All details, logs, packages and repository information can be found on
http://geany.nightlybuilds.org/.
Regards,
Enrico
--
Get my GPG key from http://www.uvena.de/pub.asc