Re: [Geany-Devel] RFC: Policy for Glade File Updates

2013-10-08 Thread Thomas Martitz
Am So, 6.10.2013, 15:39 schrieb Thomas Martitz:


 Lex Trotman ele...@gmail.com schrieb:
On 6 October 2013 22:21, Thomas Martitz 
thomas.mart...@student.htw-berlin.de wrote:

 Am 03.10.2013 02:00, schrieb Lex Trotman:


 Is there a problem with this approach?


 That means when the minimum version of GTK is increased we will have
to
 upgrade to version of Glade that supports the new widgets that come
with
 the new GTK.  And then apply the fixes.  So along with lack of
windows
 maintenance (please lets deprecate it) we now have Glade upgrade
issues
 slowing the movement of GTK versions.



 Ok I see you try to avoid anything which could possible mean more
 maintenance work, even if only in theory :)

 Anyway, the glade version needs only to be updated if we also make
use of
 newer widgets _and_ don't implement them programmatically. This seems
like
 a very rare event, and even then applying fixes is as easy as git
rebase.
 For the vast majority of time our set-in-stone, fixed Glade can be
used
 without extra effort.

 But you need to see it from another POV: Doing this enables us, and
more
 importantly new and fresh contributors, to use Glade for the Geany
UI. This
 clearly outweighs the very little extra maintenance effort. And I
would
 argue that this even reduces maintenance effort overall since we
don't have
 to worry about geany.xml anymore.


Well, I am wondering how much change is going to happen to the UI
within
the life of Geany on 2.x?  But if you think there are major changes to
be
made then I understand the attraction of using Glade rather than
editing
XML (shudder).

Its not just using different versions either, some versions of Glade
seem
to delight in producing noise no matter how little you do :(

So I guess the first step would be for you to identify a Glade version
that
produces a file that both GTK2 and GTK3 Geany correctly read and that
doesn't produce lots of noise each change.  Then you need to make the
modifications you mentioned.

Without knowing that such a Glade exists the whole question is
theoretical
:)

If it exists then its certainly a possible solution.


I forked glade at github and made two fixes to it: [1]

- fixed the unstable output (mostly)
- fixed stripping of icon-name attribute of GtkIconFactory. It's still
not editable in the GUI but it glade at least shouldn't remove it anymore
from existing XML

Seeing that 3.8.x is maintained actively at upstream I will try to get the
changes upstream. For the first fix I already opened [2].

Please see if it makes glade usable for us. It worked in my (limited)
testing.

Best regards.

[1] https://github.com/kugel-/glade/tree/glade-3-8-fixes
[2] https://bugzilla.gnome.org/show_bug.cgi?id=709609

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


Re: [Geany-Devel] Interested making a patch to add QML support

2013-10-08 Thread Tory Gaurnier

On 10/07/2013 12:23 PM, Colomban Wendling wrote:

Le 07/10/2013 21:01, Tory Gaurnier a écrit :

Well I've run into quite a strange bug, and I'm wondering if anyone has
had a similar issue. It's working as expected when you first open a QML
file, it finds all the tags and places them in a hierarchy/tree
structure in the symbol list, however, when you do something that causes
it to refresh (like deleting a bracket or something else), then it
suddenly removes a whole bunch of the tags from the symbol list and it
doesn't add them back no matter what. Doesn't it rerun your whole
filetype.c file every time it refreshes the symbol list?

At first I thought it could be a memory corruption because I didn't yet
have all my malloced values being freed, but I've fixed that, every bit
of memory I allocate is freed now, so it's not that.

What scenarios could possibly cause something like this?

Do you have global variables you don't re-initialize each time?
___
Devel mailing list
Devel@lists.geany.org
https://lists.geany.org/cgi-bin/mailman/listinfo/devel


I don't know how I didn't realize this, but I was using a static 
variable in a while loop only thinking of it in scope of the while loop. 
You got me thinking about it when you suggested the global variables not 
being re-initialized. I hate that I didn't notice it earlier but I'm 
glad it wasn't a complicated issue.

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


Re: [Geany-Devel] Interested making a patch to add QML support

2013-10-08 Thread Tory Gaurnier

On 10/05/2013 05:12 PM, Lex Trotman wrote:




On 6 October 2013 01:25, Tory Gaurnier tory.gaurn...@linuxmail.org 
mailto:tory.gaurn...@linuxmail.org wrote:


Just thought I'd give everyone an update, it's still coming along,
I have the tree view in the symbol list working as expected (it
was easier than I thought, I was overcomplicating it at first),
right now I'm working on cleaning up my code, and optimizing
certain things.

I would be done by now if I wasn't working so much, but I should
have QML support finished within the next few days (if I have the
time I'll get it finished tonight). Then I'll be ready to submit
my work to ctags, and Geany.


One thing you could do to assist is to make a test suite for the tag 
parser, see the preliminary ones Colomban has been adding.  Another 
thing is to see if you can get others to use and comment on the 
filetype.  There is some reluctance to commit new filetypes for 
languages that the Geany devs don't know, because of the effort 
required to learn the language to tell if the colouring and symbology 
make sense.  Having more than one user of the filetype makes it more 
likely that it will be just accepted.


Cheers
Lex


___
Devel mailing list
Devel@lists.geany.org mailto: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


Not sure what you mean by test suite, I've uploaded it to github ( 
https://github.com/tgaurnier/geany/), and would love for people to test 
it, it seems to be fairly bug free now, there's things I still want to 
fix, but when using correct QML syntax it seems to be pretty flawless 
now (at least from the testing I've done).


Could you maybe shoot me a link of one of the test suites from Colomban 
you're refering to?
___
Devel mailing list
Devel@lists.geany.org
https://lists.geany.org/cgi-bin/mailman/listinfo/devel


Re: [Geany-Devel] Interested making a patch to add QML support

2013-10-08 Thread Lex Trotman
On 8 October 2013 20:08, Lex Trotman ele...@gmail.com wrote:


 [...]

  Not sure what you mean by test suite, I've uploaded it to github (
 https://github.com/tgaurnier/geany/), and would love for people to test
 it, it seems to be fairly bug free now, there's things I still want to fix,
 but when using correct QML syntax it seems to be pretty flawless now (at
 least from the testing I've done).


Also could you put your changes in a branch, not master, so they are easier
to identify.

Cheers
Lex




 Could you maybe shoot me a link of one of the test suites from Colomban
 you're refering to?


 https://github.com/geany/geany/tree/master/tests/ctags is the tests for
 other parsers.  As the commit messages say most come from upstream, more
 are always welcome, especially for new parsers.

 Cheers
 Lex



 ___
 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] Ping on Bug #943 - windows build command

2013-10-08 Thread Dimitar Zhekov
On Mon, 07 Oct 2013 12:28:49 -0700
Matthew Brush mbr...@codebrainz.ca wrote:

  [...]
 
 Any chance you could find time to review and test Geany's implementation 
 to see if anything looks fishy?

I can simply test FiF with regex = ., which will generate a lot of
output quite fast. Without the SYNC_SPAWN patches, build.c and search.c
async executions are identical (except that build checks if the
returned pid after successful spawn async is  0, but still sets the
channels if it's not - I wonder why).

 GTK+ 2.22 is over 3 years old by now, FWIW.

I'm using 2.22 under win~1 too, and don't think it will have any
problems with async exec, but we'll see.

 OT: Do you have any idea how to make g_spawn_async_with_pipes() to not 
 open a Command Prompt window on Windows? My new plugin filters the 
 document text through a subprocess very often and the popup console 
 windows are super annoying :)

A win~1 .exe header contains a value which indicates whether it's GUI
or console (or something else). For any console executable, win~1 will
open a console automatically, unless one already exists (i.e. running
grep from cmd will not open a new console). It's not really a command
prompt, unless you start it with system() or via cmd.

What you can do is run the executable in a mimimized [console] window.
Creating a shortcut with window = minimized may affect the execution
even if you run the .exe instead of the .pif or .lnk, and if it doesn't,
you can try to run the shortcut, but I'm not sure the CLI arguments will
work properly that way.

Last, you can create a small GUI subsystem wrapper which runs your
console application with CreateProcess(), and use either the creation
flags or the startup information to hide or minimize it.

-- 
E-gards: Jimmy
___
Devel mailing list
Devel@lists.geany.org
https://lists.geany.org/cgi-bin/mailman/listinfo/devel


Re: [Geany-Devel] Interested making a patch to add QML support

2013-10-08 Thread Tory Gaurnier

On 10/08/2013 02:11 AM, Lex Trotman wrote:




On 8 October 2013 20:08, Lex Trotman ele...@gmail.com 
mailto:ele...@gmail.com wrote:



[...]

Not sure what you mean by test suite, I've uploaded it to
github ( https://github.com/tgaurnier/geany/), and would love
for people to test it, it seems to be fairly bug free now,
there's things I still want to fix, but when using correct QML
syntax it seems to be pretty flawless now (at least from the
testing I've done).


Also could you put your changes in a branch, not master, so they are 
easier to identify.


Cheers
Lex


Could you maybe shoot me a link of one of the test suites from
Colomban you're refering to?


https://github.com/geany/geany/tree/master/tests/ctags is the
tests for other parsers.  As the commit messages say most come
from upstream, more are always welcome, especially for new parsers.

Cheers
Lex


___
Devel mailing list
Devel@lists.geany.org mailto: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
That's what I was originally doing, but I forgot to switch back to it, 
and accidentally commited everything to master :P As you can tell I'm 
totally new to git.


So, should I just upload the secondary branch, or is there a way I can 
restore the master branch to it's original form?
___
Devel mailing list
Devel@lists.geany.org
https://lists.geany.org/cgi-bin/mailman/listinfo/devel


Re: [Geany-Devel] Interested making a patch to add QML support

2013-10-08 Thread Tory Gaurnier

On 10/08/2013 12:39 PM, Colomban Wendling wrote:

Le 08/10/2013 20:53, Tory Gaurnier a écrit :

On 10/08/2013 02:11 AM, Lex Trotman wrote:

[...]

Also could you put your changes in a branch, not master, so they are
easier to identify.

[...]

That's what I was originally doing, but I forgot to switch back to it,
and accidentally commited everything to master :P As you can tell I'm
totally new to git.

So, should I just upload the secondary branch, or is there a way I can
restore the master branch to it's original form?

If you want to branch master and restore it as it's original form, you
can do:

Go on master:
$ git checkout master
Create a new branch reflecting the current one's state:
$ git checkout -b your-new-branch
Go back to master as the previous command went to the new branch:
$ git checkout master
Reset the current branch (master) to the state of origin/master:
$ git reset --hard origin/master

*WARNING:* make sure you properly branched before or backed up your
commits in some way before executing the last command, because it will
*drop* the new commits from the branch you're on (master) -- hence if
they aren't in any other branch they are orphaned and you probably won't
know how to get them back.

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


Ok, I think I got it, just to be on the safe side is archived my work 
and put it in a different directory, but I created a new branch 
qml-support (I had a qml_support branch before, but I deleted it to keep 
to the naming conventions of the other branches ['-' instead of '_']). I 
set the qml-support branch as my default remote branch, then I deleted 
the master branch, and reuploaded it without my commits.


Does it look like I did it right?
___
Devel mailing list
Devel@lists.geany.org
https://lists.geany.org/cgi-bin/mailman/listinfo/devel


Re: [Geany-Devel] Ping on Bug #943 - windows build command

2013-10-08 Thread Matthew Brush

On 13-10-08 10:28 AM, Dimitar Zhekov wrote:

On Mon, 07 Oct 2013 12:28:49 -0700
Matthew Brush mbr...@codebrainz.ca wrote:


[...]


Any chance you could find time to review and test Geany's implementation
to see if anything looks fishy?


I can simply test FiF with regex = ., which will generate a lot of
output quite fast. Without the SYNC_SPAWN patches, build.c and search.c
async executions are identical (except that build checks if the
returned pid after successful spawn async is  0, but still sets the
channels if it's not - I wonder why).



Can you get grep to write a lot of stuff to both stdout and stderr in 
the same run though? What about wrapping grep in a shell script that 
uses `tee` (or equivalent) to dump the output to both streams?



GTK+ 2.22 is over 3 years old by now, FWIW.


I'm using 2.22 under win~1 too, and don't think it will have any
problems with async exec, but we'll see.



Yeah, just pointing it out because 3 years is a lot of code churn for a 
project like GTK+. There's been ~15.5 thousand commits[1] since the 
2.22.0 tag :)



OT: Do you have any idea how to make g_spawn_async_with_pipes() to not
open a Command Prompt window on Windows? My new plugin filters the
document text through a subprocess very often and the popup console
windows are super annoying :)


[snip]

Last, you can create a small GUI subsystem wrapper which runs your
console application with CreateProcess(), and use either the creation
flags or the startup information to hide or minimize it.



Hmm, this is probably the best and easiest solution, thanks for the idea!

Cheers,
Matthew Brush

[1]: According to `git rev-list 2.22.0^..HEAD | wc -l`, not sure if 
that's the right way, my gitfu is weak.

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