GSlice: g_thread_init() must be called before all other GLib functions;

2007-06-19 Thread John Zoidberg
Hi,

I get the following error message when running my GTK app:

GSlice: g_thread_init() must be called before all other GLib functions;
memory corruption due to late invocation of g_thread_init() has been
detected; this program is likely to crash, leak or unexpectedly abort
soon...


I read 
herehttp://blogs.gnome.org/timj/2007/01/02/28122006-g_slicedebug-blocks/that
the correct workaround is to call
g_thread_init(NULL).
However, when I try to do that I get an undefined reference to
g_thread_init error.

And this happens even if I include glib.h.

I did a grep on the header files I have in /usr/include and got this:
glib-1.2/glib.h:void   g_thread_init   (GThreadFunctions   *vtable);
glib-2.0/glib/gthread.h:voidg_thread_init   (GThreadFunctions
*vtable);
glib-2.0/glib/gthread.h:voidg_thread_init_with_errorcheck_mutexes
(GThreadFunctions* vtable);
glib-2.0/glib/gthread.h:#define g_thread_init(vtable)
g_thread_init_with_errorcheck_mutexes (vtable)
glibmm-2.4/glibmm/thread.h:  g_thread_init(vtable);
grep: warning: lua50/lua: recursive directory loop

So I added the corresponding headers:
#include glib-2.0/glib/gthread.h
#include glib-1.2/glib.h

But I still get the undefined reference error.

After some printf debugging, I traced the origin of the warning to the
creation of a filechooser button.
And when I create a new GTK project with Anjuta+Glade2 and place a
filechooser button, I do indeed always get this warning.

How can I get rid of this warning the correct way?
Where am I supposed to place the g_thread_init() call?
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


gtk+ about dialog doesn't close

2007-06-01 Thread John Zoidberg
Hi,

I have a problem with the gtk about dialog: When I click on the Close button
it doesn't close.
There seems to be no event connected to the close button clicked signal.
And I can't add one either in Glade (v2 as well as v3).

What am I supposed to add to the code so that it works?
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: How to create a simple multilingual GUI

2007-05-30 Thread John Zoidberg

Ooop, took wrong file.
It's hello_intl-0.1.tar.gz which is the GTK app, not gettext-0.16 (gettext
tarball). :/
=
I finally managed to make a dynamically language-changing console app.
However, I'm still trying to understand how to correctly use gettext with
Anjuta+Glade.

Here is my source code for my apps, as well as .mo files I took from the
gettext tarball.

How should I proceed to use .mo files with a GTK app created using the
Anjuta+Glade combo?
I tried placing .po files (created from the Anjuta generated .pot template)
in the po directory and adding a LINGUAS file with the available languages,
but it didn't work.

On 5/29/07, John Zoidberg [EMAIL PROTECTED] wrote:


I finally managed to make a dynamically language-changing console app.
However, I'm still trying to understand how to correctly use gettext with
Anjuta+Glade.

Here is my source code for my apps, as well as .mo files I took from the
gettext tarball.

How should I proceed to use .mo files with a GTK app created using the
Anjuta+Glade combo?
I tried placing .po files (created from the Anjuta generated .pot
template) in the po directory and adding a LINGUAS file with the available
languages, but it didn't work.


On 5/18/07, Michelle Konzack [EMAIL PROTECTED] wrote:

 Am 2007-05-16 09:47:07, schrieb Andreas Stricker:
  It works only for the widget itself. Usually there is also
  localized code in the program control flow like this:
 
  if (condition)
   status_text = _(Condition is true);
 
  If a branch like this is not executed again on reload or branch
  into another part of the code, the language of the text stays
  in the former language.

 Ah right...

 I had put all strings in an array which I reload. :-)
 Then, all strings are new translated if I reinitialize the array.

 This is why it worked 4me.

 Greetings
 Michelle Konzack


 --
 Linux-User #280138 with the Linux Counter, http://counter.li.org/
 # Debian GNU/Linux Consultant #
 Michelle Konzack   Apt. 917  ICQ #328449886
50, rue de Soultz MSN LinuxMichi
 0033/6/6192519367100 Strasbourg/France   IRC #Debian (irc.icq.com)

 ___
 gtk-app-devel-list mailing list
 gtk-app-devel-list@gnome.org
 http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list




___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Re: How to create a simple multilingual GUI

2007-05-15 Thread John Zoidberg
Well, it's possible to change the language in Firefox and in a lot of other
programs.
I don't mind having to restart the program to do it.
I just don't want to have to change the system's local language to do it.

I know that gettext is mostly used for internationalisation. However, I have
problems creating a program with it where I choose the language in the
program, independently of the system settings.

If somebody knows how to do this, I would be really grateful for a simple
example program, even if it's only command-line and without a GUI.
In the meanwhile, I began looking at the source code of tuxtyping, where
changing the language at runtime is possible.
But having a clear simple source code for something like that really makes
it easier.


On 5/12/07, rush ta [EMAIL PROTECTED] wrote:

 if that is at all possible... I would be looking forward to it too !!

 On 5/11/07, John Zoidberg [EMAIL PROTECTED]  wrote:

  I would like to create a GUI with GTK where the language can be chosen
  interactively in a settings menu.
  I would like this to be independant of the machines local language
  settings.
 
  How can I do that?
  ___
  gtk-app-devel-list mailing list
  gtk-app-devel-list@gnome.org
  http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
 


___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


How to create a simple multilingual GUI

2007-05-12 Thread John Zoidberg
I would like to create a GUI with GTK where the language can be chosen
interactively in a settings menu.
I would like this to be independant of the machines local language settings.

How can I do that?
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list