Re: [Geany-devel] Assorted file extensions

2012-01-02 Thread Ross McKay
Lex Trotman wrote:

>Thanks Ross, I presume you have checked that they work if you open 
>such files :)

I pulled those lines from my personal .conf :)
-- 
Ross McKay, Toronto, NSW Australia
"The chief cause of problems is solutions" -Eric Sevareid
___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel


Re: [Geany-devel] Assorted file extensions

2012-01-02 Thread Lex Trotman
On Mon, Jan 2, 2012 at 4:39 PM, Ross McKay  wrote:
> G'day,
>
> While I'm messing around with Geany, here's a few extensions on the
> standard filetype_extensions.conf that I reckon should be part of the
> base:
>
> [Extensions]
> HTML=*.htm;*.html;*.shtml;*.hta;*.htd;*.htt;*.cfm;*.asp;*.asa;
> Javascript=*.js;*.htc;
> SQL=*.sql;*.SQL;*.ddl;*.DDL;*.prc;*.PRC;
>
> .asp = Classic ASP (VBScript / JScript server-side scripts)
> .asa = as above
> .htc = Microsoft Internet Explorer component script (JScript)
> .ddl = SQL data definition language, basically create statements
> .prc = SQL stored procedures (commonly MS but also others sometimes)
> --

Thanks Ross, I presume you have checked that they work if you open such files :)

Cheers
Lex
___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel


Re: [Geany-devel] Replacing the control socket with dbus

2012-01-02 Thread Lex Trotman
On Mon, Jan 2, 2012 at 8:16 PM, Thomas Martitz
 wrote:
> Am 01.01.2012 01:49, schrieb Matthew Brush:
>
>> As the others have said the two key issues here are 1) too new GTK/GLib
>> version and 2) dependence on DBus which I'm going to guess isn't easily
>> working and installable on Win32/OSX?
>
>
> Isn't it GLib that has the dependency on DBus (to implement GApplication),
> not Geany?

IIUC yes, and so it is a glib responsibility to safely do nothing on
other platforms IMHO.

So long as we only use GTKApplication's action interface and don't
fall over if it doesn't work then it should be ok.

Working on windows is still a question iiuc

Cheers
Lex


>
> Best regards.
>
> ___
> Geany-devel mailing list
> Geany-devel@uvena.de
> https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel
___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel


Re: [Geany-devel] Weird Segfault Crash

2012-01-02 Thread Lex Trotman
On Tue, Jan 3, 2012 at 1:33 AM, Colomban Wendling
 wrote:
> Hi,
>
> Le 02/01/2012 06:01, Matthew Brush a écrit :
>> Hi,
>>
>> I'm having some random crashes, possibly due to bad tag files?  Patch
>> attached "fixes" the segfault, but I'm pretty sure it's not the
>> "correct" fix.
>
> Well, you spotted a quite complex bug in tag encoding management...
> what we currently do is to assume tag's strings are encoded in the
> document's encoding, which is probably true for document tags but not
> necessarily for global tags.
>
> I'm not sure what would be the right fix... we either need to always
> have the same encoding in a TMTag (better be UTF8), or we need to have a
> way to find what's the tag's encoding (e.g. a new TMTag field, ouch).

I agree the only way is to have all tag files have the same UTF-8
encoding.  Since we only read tag files we write that shouldn't be a
problem.

[...]
Cheers
Lex
___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel


Re: [Geany-devel] Session Management Interim Solution Proposal

2012-01-02 Thread Lex Trotman
On Tue, Jan 3, 2012 at 4:19 AM, Dimitar Zhekov  wrote:
> Hi, all,
>
> Some guys with GNOME 2/3/Unify, KDE 3/4 and LXDE, can you please check
> if the X11R4 session protocol works? Just activate your "save session
> on logout", run a couple of gtk+ programs (evince/charmap without gnome
> support, firefox, transmission, ...), then logout, login, and see if
> the programs are restarted.

Perhaps you already know since you didn't list it, XFCE4 will re-start
firefox 5 with the tabs it last had open.  XFCE is of course the DE of
choice for developers since Linus switched to it from Gnome.

I *thought* that geany sm branch worked with it too, but that was on
another machine, and I havn't the bandwidth here to download it to
test.

[...]
> XSMP support is a grief. And looking at GNOME, I'm now unsure which
> DE-s support X11R4 (let's avoid "legacy", which in gnome means "xsmp").

My Googling before the OP suggested that Gnome didn't and there were a
lot of unhappy people as a result.

>
> As of ability, WM_SAVE_YOURSELF is much easier to support than XSMP,
> and the change will affect almost exclusively sm.c, anything else being
> 95% identical to the existing sm code. Many years ago, I extended the
> nedit save yourself handler a bit, in the (never released) 5.6 version.
>
>> Won't allow user choice for saving files but will restore session?
>
> Yes.
>

Fine by me, the OP was prompted by being sick and tired of having to
close and re-open Geany to save build commands and preferences.

Cheers
Lex

> --
> E-gards: Jimmy
> ___
> Geany-devel mailing list
> Geany-devel@uvena.de
> https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel
___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel


Re: [Geany-devel] Session Management Interim Solution Proposal

2012-01-02 Thread Dimitar Zhekov
Hi, all,

Some guys with GNOME 2/3/Unify, KDE 3/4 and LXDE, can you please check
if the X11R4 session protocol works? Just activate your "save session
on logout", run a couple of gtk+ programs (evince/charmap without gnome
support, firefox, transmission, ...), then logout, login, and see if
the programs are restarted.

Information about smaller WM-s with some kind of "session support" is
welcome too.

--

On Mon, 2 Jan 2012 09:48:36 +1100
Lex Trotman  wrote:

> Hi Dimitar,
> 
> > Aside from [...] XSMP, which was never implemented properly by
> > anyone except maybe the KDE4 guys, there's something called "legacy"
> > X11 session protocol. It's OK, except that no "Save foo.c"? questions
> > are allowed (this part of XSMP is implemented especially bad anyway).
> 
> Am I right in thinking that what you are saying is that the situation
> is a mess, but that you *may* be able to get the legacy mode running?

XSMP support is a grief. And looking at GNOME, I'm now unsure which
DE-s support X11R4 (let's avoid "legacy", which in gnome means "xsmp").

As of ability, WM_SAVE_YOURSELF is much easier to support than XSMP,
and the change will affect almost exclusively sm.c, anything else being
95% identical to the existing sm code. Many years ago, I extended the
nedit save yourself handler a bit, in the (never released) 5.6 version.

> Won't allow user choice for saving files but will restore session?

Yes.

-- 
E-gards: Jimmy
___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel


Re: [Geany-devel] Weird Segfault Crash

2012-01-02 Thread Nick Treleaven

On 02/01/2012 14:33, Colomban Wendling wrote:

 encodings_convert_to_utf8_from_charset(utf8_name, (gsize) -1, ...)
>
>  Is it OK the cast a negative number to `gsize` and will it have the
>  desired effect for that function? The `-1` here is supposed to tell the
>  encoding function that the string is nul terminated and is to be
>  measured with `strlen()` IIUC.

It's ugly, but AFAIK it'll work fine everywhere since it's casted back
to gssize in that function.  But you're right, it should definitely be a
gssize parameter.  Unfortunately this function is in the plugin API, and
I'm not sure of the implications of changing that parameter's type...


That should be fixed. I'm not sure whether it needs an ABI break or not 
(guess not), but if the parameter can be -1 then make it gssize.


Nick
___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel


Re: [Geany-devel] Is the field "type" of struct GeanyProject used somewhere

2012-01-02 Thread Johann SAUNIER
Ok, I'll probibly file a bug report for project->type which is not used.

Thanks,
Johann

2011/12/31 Matthew Brush :
> On 12/30/2011 08:28 AM, Johann SAUNIER wrote:
>>
>> Hi,
>>
>> I'm trying to hack geanyprj plugin to add the current project's name
>> in the main window's title bar, the same way gproject does.
>>
>> What I plan to do is using the field "name" of the GeanyProject
>> structure. This struct contains a field named "type" that means
>> "Identifier whether it is a pure Geany project or modified/extended by
>> a plugin. " but I can't find out where it is used. Any idea ?
>>
>
> I don't think you're supposed to modify the members like `project->name`
> even though it's not documented or enforced. I'm not sure how GProject does
> it but a quick scan of the source suggests it doesn't modify this member (I
> didn't look too close though). Maybe Jiri can say for sure how GProject does
> it.
>
> For the `project->type` member, I have no idea what it's for, but it's not
> used by Geany or any plugins from what I can tell. I'd say just ignore it or
> file a bug report that it should be deprecated or better documented.
>
> Cheers,
> Matthew Brush
> ___
> Geany-devel mailing list
> Geany-devel@uvena.de
> https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel
___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel


Re: [Geany-devel] Weird Segfault Crash

2012-01-02 Thread Colomban Wendling
Hi,

Le 02/01/2012 06:01, Matthew Brush a écrit :
> Hi,
> 
> I'm having some random crashes, possibly due to bad tag files?  Patch
> attached "fixes" the segfault, but I'm pretty sure it's not the
> "correct" fix.

Well, you spotted a quite complex bug in tag encoding management...
what we currently do is to assume tag's strings are encoded in the
document's encoding, which is probably true for document tags but not
necessarily for global tags.

I'm not sure what would be the right fix... we either need to always
have the same encoding in a TMTag (better be UTF8), or we need to have a
way to find what's the tag's encoding (e.g. a new TMTag field, ouch).

Your change at least prevents a crash, but it skips completely the tag.
 It's probably better than crashing, but still not perfect.  Another bad
solution would be to do something like [1].

This said, I'm pretty sure that if you get this bug you have some tags
with non-ASCII characters, which is huh... weird.  The only language I
know would work with such mixed-encoding non-ASCII names is Python3 --
and even there it's considered bad practice to use the feature :D

So, I'm not sure what we should do here, but we probably do something.
Any idea?

> 
> P.S. I also noticed in this block of code::
> 
> encodings_convert_to_utf8_from_charset(utf8_name, (gsize) -1, ...)
> 
> Is it OK the cast a negative number to `gsize` and will it have the
> desired effect for that function? The `-1` here is supposed to tell the
> encoding function that the string is nul terminated and is to be
> measured with `strlen()` IIUC.

It's ugly, but AFAIK it'll work fine everywhere since it's casted back
to gssize in that function.  But you're right, it should definitely be a
gssize parameter.  Unfortunately this function is in the plugin API, and
I'm not sure of the implications of changing that parameter's type...


Cheers,
Colomban

> 
> Cheers,
> Matthew Brush
___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel


Re: [Geany-devel] Replacing the control socket with dbus

2012-01-02 Thread Thomas Martitz

Am 01.01.2012 01:49, schrieb Matthew Brush:
As the others have said the two key issues here are 1) too new 
GTK/GLib version and 2) dependence on DBus which I'm going to guess 
isn't easily working and installable on Win32/OSX?


Isn't it GLib that has the dependency on DBus (to implement 
GApplication), not Geany?


Best regards.
___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel