Re: How to internationalize a shared library

2009-06-24 Thread jvetterli
On Wed, Jun 24, 2009 at 08:48:23PM +0800, Zhihai Wang wrote:
 Anyone knows?
 Should I also do following as what I did to internationalize an application?
 setlocale(LC_ALL, );
 bindtextdomain(GETTEXT_PACKAGE, LOCALEDIR);
 bind_textdomain_codeset(GETTEXT_PACKAGE, UTF-8);
 textdomain(GETTEXT_PACKAGE);
 Will there be any problem to call these APIs above?

I would remove the call to setlocale, since this will probably by done 
by the application (or by gtk_init).

Remove the call to textdomain -- the application will call that for its 
own domain.  Instead of using gettext, use dgettext (or g_dgettext), and 
pass the libraries' domain as the first parameter.

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


Re: qt vs gtk

2009-01-15 Thread jvetterli
Some of my thoughts on the matter:

On Wed, Jan 14, 2009 at 10:10:42AM -0600, Thomas Stover wrote:
 ...
 -QT (last time I checked) is not even C++. It's C++ and a custom macro 
 language. building ouch. debugging ouch. C++ paradigm ouch.

The Qt macros aren't very intrusive.

Once you have your makefiles figured out, it's not building is not 
terribly painful, for either one.  Figuring out the makefiles means 
automating moc for Qt, and glib-genmarshal for Gtk.

I agree 100% that debugging with gdb is much easier for C than C++.

I find that deriving classes in C++ is alot easier than going through 
the GObject type system.

 -HUGE: glib and gtk are separate. glib can be used on it's own. so one 
 mental model to work with for gui and non-gui events.

Qt4 has been split into different modules -- QtCore (think glib), QtGui 
(think Gtk), QtXml, etc.

 -When you start getting into it, there is just no contest. I love GTK. I 
 have no doubt that if I started to read about qt, that I would 
 constantly be saying, oh you can't do that, and you mean you have to 
 that. Long live GTK!

When it comes to documentation, Qt really outshines Gtk.  I have never 
had to dive through code to figure something out in Qt.  I always have a 
copy of the Gtk source code untarred and ready, though.

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