Re: [Geany-Devel] Problems calling ui_update_statusbar from a plugin

2015-11-01 Thread Colomban Wendling
On 31/10/2015 14:40, Abel wrote:
> I have a fix for #631 but I was trying to fix this statusbar
> inconsistency thing as well, but I think I will open a new issue for
> that and work on them separately.
> 
> On 31 October 2015 at 13:16, Thomas Martitz  > wrote:
> 
> 
> Are you working on the existing splitwindow plugin or are you
> creating a new one?
> 
>  
> I'm working on the existing one. I prefer to solve some quick &
> essential issues first rather than create a new one

Take a look at https://github.com/geany/geany/pull/724

> I'm slowly working on a in-core solution, you can find it at
> https://github.com/kugel-/geany/tree/splitwindow2?files=1
> 
> 
> Last commit is on November of former year? that's really slowly :/
> Anyway, has it been taken any *official* decision of moving on to a
> built-in feature instead of a plugin? On other words, Geany dev team, do
> you have plans of putting splitwindow into core and dropping it as plugin??

Short answer: yes.

Longer answer: I myself have low interest for the feature (read: I don't
use it, and probably wouldn't much), but the quality of the current
splitwindow plugin definitely leaves a lot to be desired.  However, we
all know and agreed that it's probably currently impossible to implement
a perfect "split window" feature as a plugin, so yes, it probably would
have to land in core anyway.  I would probably accept a version of this,
and could be reviewing it.  It however absolutely has to be
*non-intrusive* to the non-split case.

Also, IMO a replacement/large improvement should include the following
in the end:

1. Seamless integration (all features in all splits)
2. (keep) support for multiple views of the same document
3. multiple (arbitrary) splits

Point 1 is obvly the main goal of everyone who ever tried to improve the
situation.

Point 2 would IMO be important, especially to avoid changes in some
views when another changes (i.e. if I want to display document A in view
V, and I already have it in view W, I don't want view W to stop
displaying it).
On this point I'm on disagreement with others, who are happy with the
idea that documents are dispatched on the various areas, rather than
areas are views for documents; so your opinion might vary.  I also won't
strongly oppose either way, as again I probably wouldn't make much use
of the feature myself.

Point 3 would be great, but I guess less of a primary goal.


Regards,
Colomban
___
Devel mailing list
Devel@lists.geany.org
https://lists.geany.org/cgi-bin/mailman/listinfo/devel


Re: [Geany-Devel] Problems calling ui_update_statusbar from a plugin

2015-11-01 Thread Lex Trotman
On 2 November 2015 at 03:50, Colomban Wendling
 wrote:
> On 31/10/2015 14:40, Abel wrote:
>> I have a fix for #631 but I was trying to fix this statusbar
>> inconsistency thing as well, but I think I will open a new issue for
>> that and work on them separately.
>>
>> On 31 October 2015 at 13:16, Thomas Martitz > > wrote:
>>
>>
>> Are you working on the existing splitwindow plugin or are you
>> creating a new one?
>>
>>
>> I'm working on the existing one. I prefer to solve some quick &
>> essential issues first rather than create a new one
>
> Take a look at https://github.com/geany/geany/pull/724
>
>> I'm slowly working on a in-core solution, you can find it at
>> https://github.com/kugel-/geany/tree/splitwindow2?files=1
>>
>>
>> Last commit is on November of former year? that's really slowly :/
>> Anyway, has it been taken any *official* decision of moving on to a
>> built-in feature instead of a plugin? On other words, Geany dev team, do
>> you have plans of putting splitwindow into core and dropping it as plugin??
>
> Short answer: yes.
>
> Longer answer: I myself have low interest for the feature (read: I don't
> use it, and probably wouldn't much), but the quality of the current
> splitwindow plugin definitely leaves a lot to be desired.  However, we
> all know and agreed that it's probably currently impossible to implement
> a perfect "split window" feature as a plugin, so yes, it probably would
> have to land in core anyway.  I would probably accept a version of this,
> and could be reviewing it.  It however absolutely has to be
> *non-intrusive* to the non-split case.
>
> Also, IMO a replacement/large improvement should include the following
> in the end:
>
> 1. Seamless integration (all features in all splits)
> 2. (keep) support for multiple views of the same document
> 3. multiple (arbitrary) splits
>
> Point 1 is obvly the main goal of everyone who ever tried to improve the
> situation.
>
> Point 2 would IMO be important, especially to avoid changes in some
> views when another changes (i.e. if I want to display document A in view
> V, and I already have it in view W, I don't want view W to stop
> displaying it).
> On this point I'm on disagreement with others, who are happy with the
> idea that documents are dispatched on the various areas, rather than
> areas are views for documents; so your opinion might vary.  I also won't
> strongly oppose either way, as again I probably wouldn't make much use
> of the feature myself.
>
> Point 3 would be great, but I guess less of a primary goal.

And IMHO the way to approach it would be:

1)  to let everyone know what you are doing and how you intend to do
it so the general approach can be commented on,

2) submit a series of small PRs that change the parts of Geany that
assume one window/document/split or otherwise cause problems with a
proper split/multiple views UI, so they can be added progressively and
tested

3) submit the multiple split PR

Agree with Colomban that his 1. and 2. are essential, and I see his 3.
as probably more useful than he does.

Cheers
Lex


>
>
> Regards,
> Colomban
> ___
> Devel mailing list
> Devel@lists.geany.org
> https://lists.geany.org/cgi-bin/mailman/listinfo/devel
___
Devel mailing list
Devel@lists.geany.org
https://lists.geany.org/cgi-bin/mailman/listinfo/devel


Re: [Geany-Devel] Problems calling ui_update_statusbar from a plugin

2015-11-01 Thread Thomas Martitz

Am 01.11.2015 um 18:50 schrieb Colomban Wendling:

Also, IMO a replacement/large improvement should include the following
in the end:

1. Seamless integration (all features in all splits)
2. (keep) support for multiple views of the same document
3. multiple (arbitrary) splits

Point 1 is obvly the main goal of everyone who ever tried to improve the
situation.

Point 2 would IMO be important, especially to avoid changes in some
views when another changes (i.e. if I want to display document A in view
V, and I already have it in view W, I don't want view W to stop
displaying it).
On this point I'm on disagreement with others, who are happy with the
idea that documents are dispatched on the various areas, rather than
areas are views for documents; so your opinion might vary.  I also won't
strongly oppose either way, as again I probably wouldn't make much use
of the feature myself.


Yea, I have no use for 2). And it would require many more changes inside 
Geany than the plain "two (or more) editor notebooks". Just think about 
what happens to document->editor->sci pointer when there are two scis 
(this pointer is also heavily used by plugins).


But my approach was to implement the plain splitwindow via multiple 
editor notebooks inside Geany, and then modify the splitwindow plugin to 
just offer the cloned view of one document, so there's no regression for 
that use case. I hope that pleases you.


Best regards.
___
Devel mailing list
Devel@lists.geany.org
https://lists.geany.org/cgi-bin/mailman/listinfo/devel


Re: [Geany-Devel] Problems calling ui_update_statusbar from a plugin

2015-10-31 Thread Lex Trotman
On 31 October 2015 at 20:39, Abel  wrote:
> I understand. I'm trying to solve the inconsistency of being editing a
> document on split window but having the status bar showing something else
> (Should I open a issue to report this bug?). So, yes, you can take this as a
> request for the API :)

Umm, yeah, that sounds like a bug.  And then you have something to
refer to when you submit the PR with the changes.

>
> I haven't ever doxygened anything. But would it be enough for getting added
> it to the API just adding doxygen comments to it?

The documentation is added by adding doxygen comments for the
function, see doxygen docs and examples of other API functions.
Generating the docs is in HACKING IIRC.

> I want to test that the
> function is suitable for the purpose I want it for, before sending a PR for
> getting it into the API.

Well, you can make and test the changes in your git clone first, and I
think so long as its a separate commit, the changes to make the
function available can be part of the PR that needs it.  That way
there are no dependencies between two PRs, one making the function
available and one using it.

Cheers
Lex

>
> Saludos,
>
>Abel.
>
> On 31 October 2015 at 11:28, Lex Trotman  wrote:
>>
>> Nothing is usually added to the API "just because" since it has to be
>> maintained and supported and remain stable, and if the particular
>> function is too deep in the implementation that may constrain later
>> changes to Geany.  Things are mostly added these days if a plugin has
>> a need.
>>
>> I guess we can take this as a request for the function to be added to the
>> API :)
>>
>> Maybe you can make a PR to speed the process.  Note the need to
>> doxygen document the function.
>>
>> Cheers
>> Lex
>>
>>
>> On 31 October 2015 at 19:43, Abel  wrote:
>> > And why is not such function in the API? It's very used across all the
>> > geany
>> > code and there's no reason to think a plugin wouldn't ever want to use
>> > it.
>> >
>> > I want to display the document statistics of the document opened on
>> > split
>> > window when it gets the focus. ui_set_statusbar() let you display text
>> > but
>> > doesn't give you access to create_statusbar_statistics() neither to
>> > DEFAULT_STATUSBAR_TEMPLATE.
>> >
>> > Saludos,
>> >
>> >Abel.
>> >
>> > On 31 October 2015 at 03:59, Lex Trotman  wrote:
>> >>
>> >> See the big warning message at the start of the plugins doco
>> >> http://www.geany.org/manual/reference/ "Do not use any symbol not in
>> >> the documentation".
>> >>
>> >> On more recent versions of Geany the restriction on use of functions
>> >> not in the API is better enforced to reduce the risk of accidental
>> >> use.  Functions not in the API never worked on Windows I believe, so a
>> >> plugin that used non-API functions was not portable as well as
>> >> possibly breaking without warning.
>> >>
>> >> Can you not use
>> >>
>> >>
>> >> http://www.geany.org/manual/reference/ui__utils_8h.html#aa0948006d2f45a2a2a6b7da40169b8ac
>> >>
>> >> Cheers
>> >> Lex
>> >>
>> >> On 31 October 2015 at 12:47, Abel  wrote:
>> >> > Hi!
>> >> >
>> >> > I'm hacking split window plugin and I wanted to use the function
>> >> > ui_update_statusbar(), located in ui_utils.h
>> >> >
>> >> > When I try to compile I get the following warning:
>> >> >
>> >> > "warning: implicit declaration of function 'ui_update_statusbar'
>> >> > [-Wimplicit-function-declaration]"
>> >> >
>> >> > And if I try yo execute the bin generated it doesn't allow you to
>> >> > enable
>> >> > that plugin, it is never shown anymore.
>> >> >
>> >> > The plugin includes geanyplugin.h which in turn includes ui_utils.h
>> >> >
>> >> > Some help or hints?
>> >> >
>> >> > ___
>> >> > Devel mailing list
>> >> > Devel@lists.geany.org
>> >> > https://lists.geany.org/cgi-bin/mailman/listinfo/devel
>> >> >
>> >> ___
>> >> Devel mailing list
>> >> Devel@lists.geany.org
>> >> https://lists.geany.org/cgi-bin/mailman/listinfo/devel
>> >
>> >
>> >
>> > ___
>> > Devel mailing list
>> > Devel@lists.geany.org
>> > https://lists.geany.org/cgi-bin/mailman/listinfo/devel
>> >
>> ___
>> Devel mailing list
>> Devel@lists.geany.org
>> https://lists.geany.org/cgi-bin/mailman/listinfo/devel
>
>
>
> ___
> Devel mailing list
> Devel@lists.geany.org
> https://lists.geany.org/cgi-bin/mailman/listinfo/devel
>
___
Devel mailing list
Devel@lists.geany.org
https://lists.geany.org/cgi-bin/mailman/listinfo/devel


Re: [Geany-Devel] Problems calling ui_update_statusbar from a plugin

2015-10-31 Thread Lex Trotman
Nothing is usually added to the API "just because" since it has to be
maintained and supported and remain stable, and if the particular
function is too deep in the implementation that may constrain later
changes to Geany.  Things are mostly added these days if a plugin has
a need.

I guess we can take this as a request for the function to be added to the API :)

Maybe you can make a PR to speed the process.  Note the need to
doxygen document the function.

Cheers
Lex


On 31 October 2015 at 19:43, Abel  wrote:
> And why is not such function in the API? It's very used across all the geany
> code and there's no reason to think a plugin wouldn't ever want to use it.
>
> I want to display the document statistics of the document opened on split
> window when it gets the focus. ui_set_statusbar() let you display text but
> doesn't give you access to create_statusbar_statistics() neither to
> DEFAULT_STATUSBAR_TEMPLATE.
>
> Saludos,
>
>Abel.
>
> On 31 October 2015 at 03:59, Lex Trotman  wrote:
>>
>> See the big warning message at the start of the plugins doco
>> http://www.geany.org/manual/reference/ "Do not use any symbol not in
>> the documentation".
>>
>> On more recent versions of Geany the restriction on use of functions
>> not in the API is better enforced to reduce the risk of accidental
>> use.  Functions not in the API never worked on Windows I believe, so a
>> plugin that used non-API functions was not portable as well as
>> possibly breaking without warning.
>>
>> Can you not use
>>
>> http://www.geany.org/manual/reference/ui__utils_8h.html#aa0948006d2f45a2a2a6b7da40169b8ac
>>
>> Cheers
>> Lex
>>
>> On 31 October 2015 at 12:47, Abel  wrote:
>> > Hi!
>> >
>> > I'm hacking split window plugin and I wanted to use the function
>> > ui_update_statusbar(), located in ui_utils.h
>> >
>> > When I try to compile I get the following warning:
>> >
>> > "warning: implicit declaration of function 'ui_update_statusbar'
>> > [-Wimplicit-function-declaration]"
>> >
>> > And if I try yo execute the bin generated it doesn't allow you to enable
>> > that plugin, it is never shown anymore.
>> >
>> > The plugin includes geanyplugin.h which in turn includes ui_utils.h
>> >
>> > Some help or hints?
>> >
>> > ___
>> > Devel mailing list
>> > Devel@lists.geany.org
>> > https://lists.geany.org/cgi-bin/mailman/listinfo/devel
>> >
>> ___
>> Devel mailing list
>> Devel@lists.geany.org
>> https://lists.geany.org/cgi-bin/mailman/listinfo/devel
>
>
>
> ___
> Devel mailing list
> Devel@lists.geany.org
> https://lists.geany.org/cgi-bin/mailman/listinfo/devel
>
___
Devel mailing list
Devel@lists.geany.org
https://lists.geany.org/cgi-bin/mailman/listinfo/devel


Re: [Geany-Devel] Problems calling ui_update_statusbar from a plugin

2015-10-31 Thread Lex Trotman
On 31 October 2015 at 21:07, Abel  wrote:
> I didn't get it clear: If I add these doxygen comments, then there won't be
> any "implicit function declaration" warning and I'll get it compiled
> correctly?


Oh I see, its getting late here :).  You also need to export the
function so the linker will find it with GEANY_API_SYMBOL (and remove
static if the function has it).

That should probably be documented in HACKING, will persecute the
person who didn't document it tomorrow :)

Cheers
Lex


>
> OK for the rest.
>
> Saludos,
>
>Abel.
>
> On 31 October 2015 at 11:55, Lex Trotman  wrote:
>>
>> On 31 October 2015 at 20:39, Abel  wrote:
>> > I understand. I'm trying to solve the inconsistency of being editing a
>> > document on split window but having the status bar showing something
>> > else
>> > (Should I open a issue to report this bug?). So, yes, you can take this
>> > as a
>> > request for the API :)
>>
>> Umm, yeah, that sounds like a bug.  And then you have something to
>> refer to when you submit the PR with the changes.
>>
>> >
>> > I haven't ever doxygened anything. But would it be enough for getting
>> > added
>> > it to the API just adding doxygen comments to it?
>>
>> The documentation is added by adding doxygen comments for the
>> function, see doxygen docs and examples of other API functions.
>> Generating the docs is in HACKING IIRC.
>>
>> > I want to test that the
>> > function is suitable for the purpose I want it for, before sending a PR
>> > for
>> > getting it into the API.
>>
>> Well, you can make and test the changes in your git clone first, and I
>> think so long as its a separate commit, the changes to make the
>> function available can be part of the PR that needs it.  That way
>> there are no dependencies between two PRs, one making the function
>> available and one using it.
>>
>> Cheers
>> Lex
>>
>> >
>> > Saludos,
>> >
>> >Abel.
>> >
>> > On 31 October 2015 at 11:28, Lex Trotman  wrote:
>> >>
>> >> Nothing is usually added to the API "just because" since it has to be
>> >> maintained and supported and remain stable, and if the particular
>> >> function is too deep in the implementation that may constrain later
>> >> changes to Geany.  Things are mostly added these days if a plugin has
>> >> a need.
>> >>
>> >> I guess we can take this as a request for the function to be added to
>> >> the
>> >> API :)
>> >>
>> >> Maybe you can make a PR to speed the process.  Note the need to
>> >> doxygen document the function.
>> >>
>> >> Cheers
>> >> Lex
>> >>
>> >>
>> >> On 31 October 2015 at 19:43, Abel  wrote:
>> >> > And why is not such function in the API? It's very used across all
>> >> > the
>> >> > geany
>> >> > code and there's no reason to think a plugin wouldn't ever want to
>> >> > use
>> >> > it.
>> >> >
>> >> > I want to display the document statistics of the document opened on
>> >> > split
>> >> > window when it gets the focus. ui_set_statusbar() let you display
>> >> > text
>> >> > but
>> >> > doesn't give you access to create_statusbar_statistics() neither to
>> >> > DEFAULT_STATUSBAR_TEMPLATE.
>> >> >
>> >> > Saludos,
>> >> >
>> >> >Abel.
>> >> >
>> >> > On 31 October 2015 at 03:59, Lex Trotman  wrote:
>> >> >>
>> >> >> See the big warning message at the start of the plugins doco
>> >> >> http://www.geany.org/manual/reference/ "Do not use any symbol not in
>> >> >> the documentation".
>> >> >>
>> >> >> On more recent versions of Geany the restriction on use of functions
>> >> >> not in the API is better enforced to reduce the risk of accidental
>> >> >> use.  Functions not in the API never worked on Windows I believe, so
>> >> >> a
>> >> >> plugin that used non-API functions was not portable as well as
>> >> >> possibly breaking without warning.
>> >> >>
>> >> >> Can you not use
>> >> >>
>> >> >>
>> >> >>
>> >> >> http://www.geany.org/manual/reference/ui__utils_8h.html#aa0948006d2f45a2a2a6b7da40169b8ac
>> >> >>
>> >> >> Cheers
>> >> >> Lex
>> >> >>
>> >> >> On 31 October 2015 at 12:47, Abel  wrote:
>> >> >> > Hi!
>> >> >> >
>> >> >> > I'm hacking split window plugin and I wanted to use the function
>> >> >> > ui_update_statusbar(), located in ui_utils.h
>> >> >> >
>> >> >> > When I try to compile I get the following warning:
>> >> >> >
>> >> >> > "warning: implicit declaration of function 'ui_update_statusbar'
>> >> >> > [-Wimplicit-function-declaration]"
>> >> >> >
>> >> >> > And if I try yo execute the bin generated it doesn't allow you to
>> >> >> > enable
>> >> >> > that plugin, it is never shown anymore.
>> >> >> >
>> >> >> > The plugin includes geanyplugin.h which in turn includes
>> >> >> > ui_utils.h
>> >> >> >
>> >> >> > Some help or hints?
>> >> >> >
>> >> >> > 

Re: [Geany-Devel] Problems calling ui_update_statusbar from a plugin

2015-10-31 Thread Thomas Martitz

Am 31. Oktober 2015 11:39:21 MEZ, schrieb Abel :

I understand. I'm trying to solve the inconsistency of being editing a
document on split window but having the status bar showing something
else
(Should I open a issue to report this bug?). So, yes, you can take this
as
a request for the API :)

I haven't ever doxygened anything. But would it be enough for getting
added
it to the API just adding doxygen comments to it? I want to test that
the
function is suitable for the purpose I want it for, before sending a PR
for
getting it into the API.

Saludos,



Are you working on the existing splitwindow plugin or are you creating a 
new one?


I'm slowly working on a in-core solution, you can find it at
https://github.com/kugel-/geany/tree/splitwindow2?files=1

PS: Please do not top post.

Best regards
___
Devel mailing list
Devel@lists.geany.org
https://lists.geany.org/cgi-bin/mailman/listinfo/devel