Re: [Geany-Devel] Blank completion popups on Windows

2015-04-19 Thread Lex Trotman
On 20 April 2015 at 07:58, Enrico Tröger  wrote:
> On 19/04/15 23:46, Lex Trotman wrote:
>> On 20 April 2015 at 07:43, Enrico Tröger  wrote:
>>> On 19/04/15 17:39, Thomas Martitz wrote:
 Am 19.04.2015 um 15:57 schrieb Enrico Tröger:
> This said, the reason we need the hack is because of
> https://bugzilla.gnome.org/show_bug.cgi?id=712220, so if this was fixed
> we could one day drop the hack.  But this would mean depend on a fixed
> version, which probably won't be acceptable before a decade or so :)
>
> So we'll have to fix the Windows build issue in some way…
> I gave it another look, however I sort of give up :(.
>
> What I know is, with gcc 3.4 the popups work cleanly and as expected,
> even when compiled natively on Windows. This is why the nightly builds
> work, they are built with an old gcc 3.4.
>

 What gives sizeof(GtkScrolledWindow) with the old gcc vs new gcc? Did
 you try -mms-bitfields or -mno-ms-bitfields with the old one, does that
 make a difference?
>>>
>>> I already tried -mms-bitfields vs. -mno-ms-bitfields but forgot to
>>> mention it, sorry.
>>> -mno-ms-bitfields is not an option at all because GTK is built with and
>>> building Geany without leads to crashes at early startup.
>>>
>>> Sizeof is good idea.
>>> gcc-4.8: 84
>>> gcc-3.4: 88
>>>
>>> So, this supports the theory of an ABI incompatibility?
>>
>> Just a wild stab, does it work with 64 bit?
>
> No idea, I never got a 64bit Windows build environment.

Ok, never mind, just a thought to try a different ABI

Cheers
Lex

>
>
> Regards,
> Enrico
>
> --
> Get my GPG key from http://www.uvena.de/pub.asc
>
>
> ___
> 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] Blank completion popups on Windows

2015-04-19 Thread Enrico Tröger
On 19/04/15 23:46, Lex Trotman wrote:
> On 20 April 2015 at 07:43, Enrico Tröger  wrote:
>> On 19/04/15 17:39, Thomas Martitz wrote:
>>> Am 19.04.2015 um 15:57 schrieb Enrico Tröger:
 This said, the reason we need the hack is because of
 https://bugzilla.gnome.org/show_bug.cgi?id=712220, so if this was fixed
 we could one day drop the hack.  But this would mean depend on a fixed
 version, which probably won't be acceptable before a decade or so :)

 So we'll have to fix the Windows build issue in some way…
 I gave it another look, however I sort of give up :(.

 What I know is, with gcc 3.4 the popups work cleanly and as expected,
 even when compiled natively on Windows. This is why the nightly builds
 work, they are built with an old gcc 3.4.

>>>
>>> What gives sizeof(GtkScrolledWindow) with the old gcc vs new gcc? Did
>>> you try -mms-bitfields or -mno-ms-bitfields with the old one, does that
>>> make a difference?
>>
>> I already tried -mms-bitfields vs. -mno-ms-bitfields but forgot to
>> mention it, sorry.
>> -mno-ms-bitfields is not an option at all because GTK is built with and
>> building Geany without leads to crashes at early startup.
>>
>> Sizeof is good idea.
>> gcc-4.8: 84
>> gcc-3.4: 88
>>
>> So, this supports the theory of an ABI incompatibility?
> 
> Just a wild stab, does it work with 64 bit?

No idea, I never got a 64bit Windows build environment.


Regards,
Enrico

-- 
Get my GPG key from http://www.uvena.de/pub.asc



signature.asc
Description: OpenPGP digital signature
___
Devel mailing list
Devel@lists.geany.org
https://lists.geany.org/cgi-bin/mailman/listinfo/devel


Re: [Geany-Devel] Blank completion popups on Windows

2015-04-19 Thread Lex Trotman
On 20 April 2015 at 07:43, Enrico Tröger  wrote:
> On 19/04/15 17:39, Thomas Martitz wrote:
>> Am 19.04.2015 um 15:57 schrieb Enrico Tröger:
>>> This said, the reason we need the hack is because of
>>> https://bugzilla.gnome.org/show_bug.cgi?id=712220, so if this was fixed
>>> we could one day drop the hack.  But this would mean depend on a fixed
>>> version, which probably won't be acceptable before a decade or so :)
>>>
>>> So we'll have to fix the Windows build issue in some way…
>>> I gave it another look, however I sort of give up :(.
>>>
>>> What I know is, with gcc 3.4 the popups work cleanly and as expected,
>>> even when compiled natively on Windows. This is why the nightly builds
>>> work, they are built with an old gcc 3.4.
>>>
>>
>> What gives sizeof(GtkScrolledWindow) with the old gcc vs new gcc? Did
>> you try -mms-bitfields or -mno-ms-bitfields with the old one, does that
>> make a difference?
>
> I already tried -mms-bitfields vs. -mno-ms-bitfields but forgot to
> mention it, sorry.
> -mno-ms-bitfields is not an option at all because GTK is built with and
> building Geany without leads to crashes at early startup.
>
> Sizeof is good idea.
> gcc-4.8: 84
> gcc-3.4: 88
>
> So, this supports the theory of an ABI incompatibility?

Just a wild stab, does it work with 64 bit?

Cheers
Lex

>
> Regards,
> Enrico
>
> --
> Get my GPG key from http://www.uvena.de/pub.asc
>
>
> ___
> 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] Blank completion popups on Windows

2015-04-19 Thread Enrico Tröger
On 19/04/15 17:39, Thomas Martitz wrote:
> Am 19.04.2015 um 15:57 schrieb Enrico Tröger:
>> This said, the reason we need the hack is because of
>> https://bugzilla.gnome.org/show_bug.cgi?id=712220, so if this was fixed
>> we could one day drop the hack.  But this would mean depend on a fixed
>> version, which probably won't be acceptable before a decade or so :)
>>
>> So we'll have to fix the Windows build issue in some way…
>> I gave it another look, however I sort of give up :(.
>>
>> What I know is, with gcc 3.4 the popups work cleanly and as expected,
>> even when compiled natively on Windows. This is why the nightly builds
>> work, they are built with an old gcc 3.4.
>>
> 
> What gives sizeof(GtkScrolledWindow) with the old gcc vs new gcc? Did
> you try -mms-bitfields or -mno-ms-bitfields with the old one, does that
> make a difference?

I already tried -mms-bitfields vs. -mno-ms-bitfields but forgot to
mention it, sorry.
-mno-ms-bitfields is not an option at all because GTK is built with and
building Geany without leads to crashes at early startup.

Sizeof is good idea.
gcc-4.8: 84
gcc-3.4: 88

So, this supports the theory of an ABI incompatibility?

Regards,
Enrico

-- 
Get my GPG key from http://www.uvena.de/pub.asc



signature.asc
Description: OpenPGP digital signature
___
Devel mailing list
Devel@lists.geany.org
https://lists.geany.org/cgi-bin/mailman/listinfo/devel


Re: [Geany-Devel] Blank completion popups on Windows

2015-04-19 Thread Thomas Martitz

Am 19.04.2015 um 15:57 schrieb Enrico Tröger:

This said, the reason we need the hack is because of
https://bugzilla.gnome.org/show_bug.cgi?id=712220, so if this was fixed
we could one day drop the hack.  But this would mean depend on a fixed
version, which probably won't be acceptable before a decade or so :)

So we'll have to fix the Windows build issue in some way…
I gave it another look, however I sort of give up :(.

What I know is, with gcc 3.4 the popups work cleanly and as expected,
even when compiled natively on Windows. This is why the nightly builds
work, they are built with an old gcc 3.4.



What gives sizeof(GtkScrolledWindow) with the old gcc vs new gcc? Did 
you try -mms-bitfields or -mno-ms-bitfields with the old one, does that 
make a difference?


Thanks for your effort!


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


Re: [Geany-Devel] Blank completion popups on Windows

2015-04-19 Thread Colomban Wendling
Le 19/04/2015 15:57, Enrico Tröger a écrit :
> On 17/04/15 19:44, Colomban Wendling wrote:
>> Le 15/04/2015 15:27, Colomban Wendling a écrit :
>> […]
>>
>> So we'll have to fix the Windows build issue in some way…
> 
> I gave it another look, however I sort of give up :(.
> 
> What I know is, with gcc 3.4 the popups work cleanly and as expected,
> even when compiled natively on Windows. This is why the nightly builds
> work, they are built with an old gcc 3.4.
> 
> Then I tried gcc 4.8 and gcc 4.6 on Windows, both are failing.
> […]
> 
> This might support the above supposition about binary incompatibilities
> with the GTK libs. But maybe it is something completely different.

Thanks a lot for that in-depth investigation and testing!

But… dammit.  If this is really an ABI issue depending on the GCC
version, we don't have so many solutions:

1) build Geany using the same GCC as GTK was build;

2) use a GTK that is built with the same GCC as GTK (would mean
rebuilding GTK I guess);

3) avoid hitting the ABI issue by not relying on the size of the
structure (would mean not subclassing, but then I don't really have a
solution);

4) avoid hitting the ABI issue by adding dummy padding (as we don't
actually access any data ourselves it doesn't matter).

None of those solutions are really great… 1 is not really practical, and
2 is just a dream.  I don't have a good way of doing 3.  4 is a bit ugly
but quite easy to implement.

> While the
>> typedef struct { GtkScrolledWindow parent; int dummy; } SmallScroller;
>> typedef struct { GtkScrolledWindowClass parent; int dummy; } SmallS...
>
> hack works pretty fine, it is still a crude hack and feels weird to send
> this to Scintilla upstream.

At worse we can always add it to our Scintilla patch…

I'll open an issue on Scintilla and see what Neil thinks, whether he'd
accept a hack like that dummy field -- or maybe if he has a better
understanding of ABI issues on Windows (but I'm afraid here there really
is an ABI incompatibility and we're screwed on that front).

> The other way, to stick with gcc 3.4.x for Windows, seems also quite
> ridiculous :(.

Indeed.  And the mingw package for GCC3 even conflicts with the 4.x one :(

Regards,
Colomban



signature.asc
Description: OpenPGP digital signature
___
Devel mailing list
Devel@lists.geany.org
https://lists.geany.org/cgi-bin/mailman/listinfo/devel


Re: [Geany-Devel] Blank completion popups on Windows

2015-04-19 Thread Enrico Tröger
On 17/04/15 19:44, Colomban Wendling wrote:
> Le 15/04/2015 15:27, Colomban Wendling a écrit :
>> […]
>>
>> BTW, I think I found a way to avoid the oversize without subclassing
>> GtkScrolledWindow, which might even be a better fix for the original issue.
> 
> Okay, the idea was setting the style property
> `GtkScrollbar::min-slider-length` to something smaller than the default
> 21, but a bug in GTK3 makes it virtually impossible (as while the
> property is set, it is not taken into account the first time, meaning
> the popup would still be too tall.
> Of course we don't have the problem on GTK3, but I don't feel like
> submitting a patch to Scintilla which uses one hack for GTK2 and a
> completely different one for GTK3.
> 
> This said, the reason we need the hack is because of
> https://bugzilla.gnome.org/show_bug.cgi?id=712220, so if this was fixed
> we could one day drop the hack.  But this would mean depend on a fixed
> version, which probably won't be acceptable before a decade or so :)
> 
> So we'll have to fix the Windows build issue in some way…

I gave it another look, however I sort of give up :(.

What I know is, with gcc 3.4 the popups work cleanly and as expected,
even when compiled natively on Windows. This is why the nightly builds
work, they are built with an old gcc 3.4.

Then I tried gcc 4.8 and gcc 4.6 on Windows, both are failing.
I have no idea why. I went through the release notes of all gcc versions
between 4.0 and 4.6 looking for promising changes mentioning "align" or
"pack" but without success.
I'm a bit clueless what really is the issue.

The best guess I have so far is that the GTK 2.24 bundle is compiled
with an older gcc, maybe even 3.4, and in later versions some internals
have changed which cause ABI breaks. So when we now build with a recent
gcc 4.8 our code and link it against the GTK libs which were built with
an older gcc, something breaks in the binary alignment of some structs.
Though no idea if this is really the case, I'm just guessing here and my
knowledge of how compilers work is fairly limited :(.

Furthermore, I tested the SmallerScroller code itself by extracting it
from PlatGTK.cxx and put it into src/log.c to replace the stock
GtkScrolledWindow there, just to get it sure it is not related to C++
code around in Scintilla. Unfortunately, it didn't work either.
Compiled on Windows with gcc-4.8 the log window freezes with
SmallerScroller code. The exact same code on Linux works flawlessly.

This might support the above supposition about binary incompatibilities
with the GTK libs. But maybe it is something completely different.


So, no idea what to do next.

While the
> typedef struct { GtkScrolledWindow parent; int dummy; } SmallScroller;
> typedef struct { GtkScrolledWindowClass parent; int dummy; } SmallS...
hack works pretty fine, it is still a crude hack and feels weird to send
this to Scintilla upstream.

The other way, to stick with gcc 3.4.x for Windows, seems also quite
ridiculous :(.

Regards,
Enrico

-- 
Get my GPG key from http://www.uvena.de/pub.asc



signature.asc
Description: OpenPGP digital signature
___
Devel mailing list
Devel@lists.geany.org
https://lists.geany.org/cgi-bin/mailman/listinfo/devel


Re: [Geany-Devel] [geany/geany-plugins] 73ae49: waf: Fix the checks for openpty() on FreeBSD

2015-04-19 Thread Enrico Tröger
On 17/04/15 21:42, Dimitar Zhekov wrote:
> On 16.4.2015 г. 23:36, Colomban Wendling wrote:
> 
>> I can't seem to really change the colors when using the "MS-Windows"
>> theme, but I guess it's kinda expected some things aren't really
>> overridable with a "native" theme that uses the Windows theming API or
>> something.
> 
> But the vertical tabs still respect bg[ACTIVE]. Gee...
> 
>> However, using "Raleigh" (the one you seem to use given the look) it's
>> relatively easy (well, not to guess what to change, but to change it).
>> [...]
> 
> Alright, I finally got it.
> To whoever might be interested:
> 
> 1. The default theme for gtk+ 2.24 under Windows has been changed to
> "MS-Windows". Raleigh/gtk-2.0/gtkrc still says "This theme is the
> default theme if no other theme is selected", but that's wrong. The
> bundle README still contains instructions on how to set the theme to
> "MS-Windows", which is now unneeded - it would have been better if they
> changed it with "how to set Raleigh if you want the previous look".
> 
> 2. The horizontal (only) notebook tabs backgrounds under "MS-Windows" is
> unchangeable with any gtkrc settings. That applies to 2.24, _2.22_, and
> probably the previous versions. The backgrounds are taken from the
> Windows theme, but seem to ignore the settings in Display -> Appearance
> -> Advanced, or there might be no appropriate setting. And on XP, that
> may be dependent on Appearance -> Windows XP style vs. Windows Classic
> style.
> 
> Thanks to everyone in the mailing list who was willing to help.
> It was a waste of time, but at least if someone in the users list
> complains, we know the answer.
> 
> (At some point, I changed the theme to "Emacs" - but only under 2.22, to
> see how it looks. Have I done that under 2.24, this thread would have
> been much shorter.)

Thanks a lot for the clarification.

So, how do we want to proceed?

Provided that Thomas' underline trick works with the MS-Windows theme,
we could maybe add this to the Wiki by providing a copy&paste ready
gtkrc snippet for Windows users who want to a better visual indication
of the active tab?

That would be cleaner and easier than a new preference just for the
underlining.


Regards,
Enrico

-- 
Get my GPG key from http://www.uvena.de/pub.asc



signature.asc
Description: OpenPGP digital signature
___
Devel mailing list
Devel@lists.geany.org
https://lists.geany.org/cgi-bin/mailman/listinfo/devel


Re: [Geany-Devel] [geany/geany] f03206: Windows: Compile geany_private.rc into Geany.exe for version data and icon

2015-04-19 Thread Enrico Tröger
On 18/04/15 21:35, Matthew Brush wrote:
> On 15-04-18 03:51 AM, Enrico Tröger wrote:
>> On 18/04/15 11:47, Enrico Tröger wrote:
>>> On 17/04/15 21:32, Colomban Wendling wrote:
 Le 12/04/2015 22:54, Enrico Tröger a écrit :
> Branch:  refs/heads/master
> Author:  Enrico Tröger 
> Committer:   Enrico Tröger 
> Date:Sun, 12 Apr 2015 20:54:16 UTC
> Commit:  f03206744361baac1c811db97f5d2816409d7787
>  
> https://github.com/geany/geany/commit/f03206744361baac1c811db97f5d2816409d7787
>
>
> Log Message:
> ---
> Windows: Compile geany_private.rc into Geany.exe for version data
> and icon

 Should we integrate geany_private.rc in the library too?  This isn't
 done with Autotools, but could be added.
>>>
>>> It's not really necessary. For Waf, I just added it to the binary where
>>> it is necessary and kept it for the library.
>>> The rc file serves two main purposes:
>>> - add the icon to the binary
>>> - add versioning information to the binary (e.g. in the file properties
>>> dialog in the Details tab)
>>>
>>> While especially the icon is important for the binary, I guess the rc
>>> file is just nice to have for the library but not necessary.
>>> But I agree we should do the same for Waf and autotools, either link it
>>> or don't link it.
>>> I don't mind which way to go.
>>
>> After thinking a bit more about this, I think we should not link the rc
>> file against the library. We also don't link it against the plugin
>> libraries.
>>
>> The rc file contains settings that the resulting binary is an executable
>> and it includes also the geany.exe.manifest. Both do not apply to the
>> library. So it is actually wrong to use that rc file for the library.
>>
>> If there are no objections, I will remove linking the rc file against
>> the library in Waf.
>>
> 
> None here.
> 
> I think the way it might make sense is if it contained artwork, UIs,
> translations and stuff like they often do for Win32 API projects, and
> that were actually used in libgeany.dll, but since we just use it for
> the .exe icon, meta-info, styles, etc. I tend to agree it makes more
> sense linked to the .exe.
> 
> We might still want an .rc file for the library though, if it's
> important to show the correct meta-info in Windows explorer for the .dll
> file (I dunno if it is?).

I don't think so. The only benefit I see is that in the Windows explorer
file properties dialog version information would appear. I don't know if
Windows or any related software rely on this information or use it in
any way.

We also don't add this information to the plugin libraries and so why do
it for geany.dll.


Regards,
Enrico

-- 
Get my GPG key from http://www.uvena.de/pub.asc



signature.asc
Description: OpenPGP digital signature
___
Devel mailing list
Devel@lists.geany.org
https://lists.geany.org/cgi-bin/mailman/listinfo/devel