Hi,
if I open a document via document_open_file() will it also be opened if
it is already opened?
So, do I need to check myself if a file is already open to prevent it
from being opened again?
Thanks for all help in advance.
Cheers,
Lars
Hello Colomban,
I thought I was onto something with there being a need to also call vte_terminal_set_encoding, besides
running Geany with LANG=C.UTF-8 given in the environment. I have rebuild Geany without the
vte_terminal_set_encoding code, and LANG=C.UTF-8 alone gave the expected representation of 'ș' in
the Terminal. It results I made a mistake. Sorry for wasting a little time with this non-issue.
Also thanks for helping with clarifying the utf-8 behavior in Geany's terminal.
Best Regards,
Marius
Here it is my default environment:
$ env | grep -E '^(LC|LANG)'
LC_PAPER=en_US.UTF-8
LC_ADDRESS=en_US.UTF-8
LC_MONETARY=en_US.UTF-8
LC_NUMERIC=en_US.UTF-8
LC_TELEPHONE=en_US.UTF-8
LC_IDENTIFICATION=en_US.UTF-8
LANG=en_US.UTF-8
LC_MEASUREMENT=en_US.UTF-8
LANGUAGE=en_US:en
LC_TIME=en_US.UTF-8
LC_NAME=en_US.UTF-8
I start Geany with a Gnu Bash script which exports LANG=C.UTF-8 before running Geany.
--------------------------------------------
On Sun, 10/22/17, Colomban Wendling <lists.ban(a)herbesfolles.org> wrote:
Subject: Re: [Geany-Devel] UTF-8 in geany's termina, eg. ș
To: "Geany development list" <devel(a)lists.geany.org>
Date: Sunday, October 22, 2017, 1:25 AM
Hi Marius,
Le
21/10/2017 à 06:49, marius buzea a écrit :
> I would like to share a simple use-case
with Geany. Here it is: you go to the Geany's
terminal and
> you list a directory that
contains files with names containing 'ș'. It may
be that instead of 'ș' you see
> '??'.
That's very odd, because I've never
seen this problem, and use UTF-8
characters
occasionally (I'm French and we do have é, è, ê, ô,
etc.) and
have never ever seen this
problem. I just tested with Geany with
LANG=C.UTF-8 and it does work just fine.
You might see a problem if the
encoding of one of the locale environment
variables is not properly set to UTF-8: e.g. if
I set LANG=C (so not
specifying the
encoding) I do see what you mention; but not if I
properly set the encoding using
LANG=C.UTF-8.
What is the
output of `env | grep -E '^(LC|LANG)'`? If any of
those
variables doesn't properly have an
encoding set it might be the reason.
Regards,
Colomban
_______________________________________________
Devel mailing list
Devel(a)lists.geany.org
https://lists.geany.org/cgi-bin/mailman/listinfo/devel
Hello,
I would like to share a simple use-case with Geany. Here it is: you go to the Geany's terminal and
you list a directory that contains files with names containing 'ș'. It may be that instead of 'ș' you see
'??'. For my own use, I have changed vte.c with a call to vte_terminal_set_encoding ( … "UTF-8" … )
and then started Geany with "LANG=C.UTF-8" in the environment, for the result 'ș' being displayed as 'ș'.
You can see the sketch of my approach below. If you think this idea is good for Geany, feel free to apply it,
into vte.c, for example. :) I would also be happy to make a pull request that would add this
change, so that I do not add work for somebody else. (Also, if a pull-request is okay, I would use in it
geany code convention, code style, etc.).
Best regards,
Marius
geany-1.31/src/vte.c
struct VteFunctions
{
…
gboolean
( * vte_terminal_set_encoding )
( VteTerminal * terminal
, const char * codeset
, GError * * error
)
;
…
}
;
static gboolean vte_register_symbols(GModule *mod)
{
…
BIND_REQUIRED_SYMBOL(vte_terminal_set_encoding);
…
}
void vte_apply_user_settings(void)
{
…
if (NULL != (vf->vte_terminal_set_encoding) )
{
gboolean ignoredTmpAux =
vf->vte_terminal_set_encoding
( VTE_TERMINAL(vc->vte)
, "UTF-8"
, NULL
)
;
(void) ignoredTmpAux;
}
…
}
In GNU Bash:
$ export LANG=C.UTF-8
$ cd ~/geany-1.31/usr/bin
$ ./geany
I'm trying to build plugins in OSX, and I'm a bit out of my element.
(I've had problems with my yahoo email not getting through to this list, but
I haven't had a chance to switch email accounts. I hope this makes it.)
I'm following the guide on https://github.com/geany/geany-osx
I get stuck running in step 6:
jhbuild build meta-gtk-osx-bootstrap
..
checking for python module libxml2... ./configure: line 2422: 83400 Done
echo "import $py_module"
83401 Abort trap: 6 | python - >&/dev/null
not found
configure: error: Python module libxml2 is needed to run this package
*** Error during phase configure of itstool: ########## Error running
../configure --prefix /Users/steve/gtk/inst *** [7/12]
[1] Rerun phase configure
[2] Ignore error and continue to build
[3] Give up on module
[4] Start shell
[5] Reload configuration
[6] Go to phase "wipe directory and start over"
[7] Go to phase "clean"
[8] Go to phase "distclean"
I've installed libxml2 via homebrew, and py-libxml2 and py27-libxml2 via
macports to no avail.
I figured out how to build the .o file for one of my plugins:
gcc -c quick-search.c -fPIC -std=c99 -DGTK -I
/Users/steve/projects/geany/geany/plugins/ -I
/Users/steve/projects/geany/geany/src/ -I
/Users/steve/projects/geany/geany/tagmanager/src/ -I
/Users/steve/projects/geany/geany/scintilla/include/ `pkg-config --cflags
glib-2.0` `pkg-config --cflags gtk+-2.0` -I
/Users/steve/projects/geany/geany/scintilla/
But not the .so file.
Thanks for any help,
Steve