Re: [Github-comments] [geany/geany] Fix crash if plugin manager is opened more than once (#1564)

2017-07-27 Thread Matthew Brush
codebrainz approved this pull request.

Works for me



-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/1564#pullrequestreview-52840790

Re: [Github-comments] [geany/geany] Fix crash if plugin manager is opened more than once (#1564)

2017-07-27 Thread Matthew Brush
Merged #1564.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/1564#event-1182901392

Re: [Github-comments] [geany/geany] Fix crash if plugin manager is opened more than once (#1564)

2017-07-27 Thread elextr
elextr approved this pull request.

LGBI



-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/1564#pullrequestreview-52840302

Re: [Github-comments] [geany/geany] Snippets: Use ASCII ellipsis for the cursor placeholder (957b49b)

2017-07-27 Thread elextr
> I didn't meant for this to be the syntax but the result. For the syntax I 
> would rather suggest something like %cursor=function_name% or similar, 
> extending the current syntax in what seems at a glance like a compatible way.

Ok, fine.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/commit/957b49b868214a4aea81641dedeabb98a497e4c1#commitcomment-23347078

Re: [Github-comments] [geany/geany] Snippets: Use ASCII ellipsis for the cursor placeholder (957b49b)

2017-07-27 Thread Colomban Wendling
> And yeah a semantic snippet placeholder might be a nice future improvement, 
> but [ ] is a common language syntax, so I suspect it may get used in 
> snippets, so another syntax for indicating the placeholder might be better […]

I didn't meant for this to be the syntax but the result.  For the syntax I 
would rather suggest something like `%cursor=function_name%` or similar, 
extending the current syntax in what seems at a glance like a compatible way.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/commit/957b49b868214a4aea81641dedeabb98a497e4c1#commitcomment-23347074

Re: [Github-comments] [geany/geany] editor: fix incorrect variable reference (#1561)

2017-07-27 Thread elextr
@b4n just beat me to it :smile:

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/1561#issuecomment-318552037

[Github-comments] [geany/geany] Fix crash if plugin manager is opened more than once (#1564)

2017-07-27 Thread Colomban Wendling
Do not allow more than one plugin manager dialog at a time.  It doesn't make 
sense and the code is not fully re-entrant and leads to a crash toggling 
plugins in both dialogs.

Fixes #1563.
You can view, comment on, or merge this pull request online at:

  https://github.com/geany/geany/pull/1564

-- Commit Summary --

  * Fix crash if plugin manager is opened more than once

-- File Changes --

M src/plugins.c (7)

-- Patch Links --

https://github.com/geany/geany/pull/1564.patch
https://github.com/geany/geany/pull/1564.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/1564


Re: [Github-comments] [geany/geany] Plugin Manager causes Geany to crash when opened more than once at a time (#1563)

2017-07-27 Thread Colomban Wendling
> Should just de-sensitize `tools->Plugin Manager` menu item when open.

I don't think so, it makes some sense to have a mean to call upon the dialog if 
it's already open, and disabling the item isn't necessarily totally safe if 
there was another way of triggering it (like keybinding not taking the 
sensitivity into account).

I like @dmaphy's suggestion better.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/1563#issuecomment-318551348

Re: [Github-comments] [geany/geany] Fixes & changes for #1470 (#1554)

2017-07-27 Thread Colomban Wendling
b4n commented on this pull request.



> @@ -2394,7 +2394,7 @@ typedef struct
 } SelectionRange;
 
 
-#define CURSOR_PLACEHOLDER "_" /* Would rather use … but not all docs are 
unicode */
+#define CURSOR_PLACEHOLDER "..." /* Would rather use … but not all docs are 
unicode */

S/A 
https://github.com/geany/geany/commit/957b49b868214a4aea81641dedeabb98a497e4c1#comments

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/1554#pullrequestreview-52837417

Re: [Github-comments] [geany/geany] Snippets: Use ASCII ellipsis for the cursor placeholder (957b49b)

2017-07-27 Thread Colomban Wendling
> I disagree that it looks better, I prefer one char. Unfortunately … is 
> troublesome.

Well, I don't feel like `_` really looks like a placeholder in the context of 
programming.  Maybe a space would fit better for only one ASCII character?

> I then chose _ because it's also less likely to mess up the tagmanager due to 
> syntax errors introduced by the ellipsis.

It is indeed, though good parsers should handle it not too badly.  But that 
might be a valid point indeed.  I guess ideally the snippet could provide the 
placeholder, to expand like:
```
def [function_name]([arguments]):
"""[documentation]"""
[body]
```
with `[]` representing the indicator range.  But that's a whole other story.

@codebrainz @elextr opinions on that?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/commit/957b49b868214a4aea81641dedeabb98a497e4c1#commitcomment-23346900

Re: [Github-comments] [geany/geany] editor: fix incorrect variable reference (#1561)

2017-07-27 Thread Colomban Wendling
Merged #1561.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/1561#event-1182874369

Re: [Github-comments] [geany/geany] editor: fix incorrect variable reference (#1561)

2017-07-27 Thread elextr
> The function is, however, exported to plugins. I haven't verified callers in 
> plugins.

Well lets apply this fix before we get a rash of plugin bug reports.  Will 
assume the @b4n approval means the compiler warnings are gone, like you I don't 
get any warnings in the first place.

> This PR fixes a bug introduced in #1470, but is meant to be applied 
> separately to #1554.

Ahhh, you noticed my deliberate error referencing #1470 instead of #1554 :grin: 
and answered the right question.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/1561#issuecomment-318522625

Re: [Github-comments] [geany/geany] Activate local plugin from configuration file (#1562)

2017-07-27 Thread elextr
Closed #1562.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/1562#event-1182730035

Re: [Github-comments] [geany/geany] Plugin Manager causes Geany to crash when opened more than once at a time (#1563)

2017-07-27 Thread elextr
Confirmed.

IIUC the plugin manager is non-modal so you can change plugin prefs and check 
their effects with it still open but its not intended to be re-entrant.

Should just de-sensitize `tools->Plugin Manager` menu item when open.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/1563#issuecomment-318518827

Re: [Github-comments] [geany/geany-plugins] Addons: Hightlighting after Double-Click does not work on pasted/fileless content (#562)

2017-07-27 Thread elextr
Confirmed current Git

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany-plugins/issues/562#issuecomment-318516520

Re: [Github-comments] [geany/geany-plugins] Addons: Hightlighting after Double-Click does not work on pasted/fileless content (#562)

2017-07-27 Thread RalphBike
Has been rolled out via my linux distribution. Works! Thanks guys, great job!



-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany-plugins/issues/562#issuecomment-318490928

[Github-comments] [geany/geany] Plugin Manager causes Geany to crash when opened more than once at a time (#1563)

2017-07-27 Thread Dominic Hopf
Currently Geany allows you to open the Plugin Manager dialog more than once at 
a time. If you do that, and enable/disable a plugin in one dialog, and then 
enable/disable plugin in the other dialog, Geany crashes. My personal 
suggestion to solve this would be to check if an instance of this dialog is 
already open and, if so, just set the focus on the dialog again and bring it to 
the foreground.

This issue has been reported against the Fedora package of Geany here:
https://bugzilla.redhat.com/show_bug.cgi?id=1473527

I'm going to close the RedHat bug in favor of this upstream one. :-)

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/1563

Re: [Github-comments] [geany/geany] Activate local plugin from configuration file (#1562)

2017-07-27 Thread fjvico
@elextr @codebrainz fully understand your point, it's the user who has to 
enable what has been installed. But this is a particular situation, where Geany 
is the editor of a programming environment for children which is to be used at 
schools, meaning that after a fresh installation by the admin, the (normally) 
computer-illiterate teacher is not supposed to follow instructions to activate 
plugins, and the child is not intended to have access to such a thing 
(actually, that's the reason to use `togglebars`: to keep the menu bar away 
from children's' curiosity). So, precisely like `savewhenoutoffocus` is 
enabled, I need this plugin enabled by default.
The problem above has been fixed with a `find` and a `sed` commands that 
updates `geany.conf`, but now I need help to make it active by default. By now, 
when the program is run for the first time (after been installed), it copies 
`geany.conf` in a directory (from where Geany is to be configured), and it 
contains the line:
`active_plugins=/usr/lib/x86_64-linux-gnu/geany/geanypy.so;/usr/lib/x86_64-linux-gnu/geany/saveactions.so;/home/fjv/.toolbox//util/geany/plugins/togglebars.py;´
- `togglebars.pyc` is built by `python -m compileall togglebars.py`, placing 
the py file in the same directory plus `plugins` folder, and
- `togglebars.on` is just copied in the same `plubins` folder.
When the environment is run, it launces Geany, it is configured from this 
directory, and I see `GeanyPy` enabled, and `Toogle bars` disabled.
What is left in the process to have it enabled by default?


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/1562#issuecomment-318424149

Re: [Github-comments] [geany/geany] editor: fix incorrect variable reference (#1561)

2017-07-27 Thread Thomas Martitz
This PR fixes a bug introduced in #1470, but is meant to be applied separately 
to #1554. In fact it supersedes 
https://github.com/geany/geany/pull/1554/commits/734e0604254bcb9f12285c54309e7e71394f75c8

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/1561#issuecomment-318378847

Re: [Github-comments] [geany/geany] editor: fix incorrect variable reference (#1561)

2017-07-27 Thread Thomas Martitz
@elextr In the core, the only caller is editor_insert_snippet() which calls the 
function with parameters such that the bug doesn't trigger. The function is, 
however, exported to plugins. I haven't verified callers in plugins.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/1561#issuecomment-318377978