Re: Embed theme with a gtk app?

2009-01-29 Thread Tomas Soltys
Yes there is a way. Here is how I have done it. gchar *rc_files[] = { path to your rc file, NULL}; gtk_rc_set_default_files (rc_files); Regards, Tomas Soltys Is there any way to either embed or make a gtk program load a theme that comes with the program, without the user having to install

Re: GtkImage

2009-01-29 Thread frederico schardong
2009/1/29 Dov Grobgeld dov.grobg...@gmail.com: The GtkImage will change its size automatically according to the size of the image that you load. If you want to change the image size, then you should load it into a GdkPixbuf, resize it, and then set it with gtk_image_set_from_pixbuf(). Btw,

Re: GtkImage

2009-01-29 Thread Dov Grobgeld
In glade, try erasing the size. There is almost never any need to set the size of a widget in glade. Instead the size of a widget should be the size of its contained widgets. Regards, Dov 2009/1/29 frederico schardong frede@gmail.com 2009/1/29 Dov Grobgeld dov.grobg...@gmail.com: The

Re: jpeg to bmp with pixbuf

2009-01-29 Thread Tor Lillqvist
Adding gtk-app-devel-list back. Please don't respond privately. .bmp Uncompressed image. Without any image compression algorithm. Hmm. .bmp is a file format, and as it has several parameters that can vary independently, effectively a collection of subformats. (Not all of the possible

Status Indication GUI development using GTK++

2009-01-29 Thread Adeel Malik
Hello,     I have just newly subscribed to thie mailing list and wanted to post a question. I am doing application development on Fedora Core 6 Linux Machine. I need to implement the status indication GUI such that it could display a simple traffic light indication i.e, green light for

Re: g_malloc overhead

2009-01-29 Thread Paul LeoNerd Evans
On Sun, 18 Jan 2009 17:43:57 +0100 Martín Vales mar...@opengeomap.org wrote: Other overhead i see is the open dir/file funtions, where in windows we need do the utf8 to utf16 everytime in windows. If JAVA,.NET and Qt use utf16 by default why in gnome world we use utf8 by default?. Probably

Re: g_malloc overhead

2009-01-29 Thread Mathias Hasselmann
Am Montag, den 26.01.2009, 12:40 +0100 schrieb Martín Vales: Paul LeoNerd Evans escribió: On Sun, 18 Jan 2009 17:43:57 +0100 Martín Vales mar...@opengeomap.org wrote: Other overhead i see is the open dir/file funtions, where in windows we need do the utf8 to utf16 everytime in

Re: utf-16 and glib

2009-01-29 Thread Dominic Lachowicz
What is wrong with: gchar* g_utf8_strncpy (gchar *dest,const gchar *src,gsize n); That's one not needed as strncpy should work. hehe i know but that function it really exist: http://library.gnome.org/devel/glib/unstable/glib-Unicode-Manipulation.html#g-utf8-strncpy It does make sense.

Re: g_malloc overhead

2009-01-29 Thread Maciej Piechotka
On Mon, 2009-01-26 at 22:30 +0100, Martin (OPENGeoMap) wrote: hi: Well - what do you mean? Having 2 functions - one reciving utf-16 and one utf-8? To be honest - it doesn't make any sense to me (it would create much mess, double the code, make programming errors easier...).

Re: utf-16 and glib (was: g_malloc overhead)

2009-01-29 Thread Maciej Piechotka
On Mon, 2009-01-26 at 22:49 +0100, Martin (OPENGeoMap) wrote: Maciej Piechotka escribió: On Mon, 2009-01-26 at 22:30 +0100, Martin (OPENGeoMap) wrote: hi: Well - what do you mean? Having 2 functions - one reciving utf-16 and one utf-8? To be honest - it

Re: utf-16 and glib

2009-01-29 Thread Maciej Piechotka
On Mon, 2009-01-26 at 23:01 +0100, Martin (OPENGeoMap) wrote: Maciej Piechotka escribió: On Mon, 2009-01-26 at 22:49 +0100, Martin (OPENGeoMap) wrote: Maciej Piechotka escribió: On Mon, 2009-01-26 at 22:30 +0100, Martin (OPENGeoMap) wrote: hi:

Re: utf-16 and glib

2009-01-29 Thread Maciej Piechotka
On Mon, 2009-01-26 at 23:48 +0100, Martin (OPENGeoMap) wrote: Dominic Lachowicz escribió: What is wrong with: gchar* g_utf8_strncpy (gchar *dest,const gchar *src,gsize n); That's one not needed as strncpy should work. hehe i know but that function it really

Re: utf-16 and glib

2009-01-29 Thread Dominic Lachowicz
Glib/gtk is full of macros. I believe que a C compiler is the right place to this kind of unsafe code. If i want create safe code i have c#,c++, JAVA, D or VALA. Using macros is the only way to ensure intermediate APIs don´t have any overhead. Besides modern GUIs have support to understand

GGtk-CRITICAL **: gtk_label_set_text: assertion `GTK_IS_LABEL (label)` failed

2009-01-29 Thread Jacob Wiltgen
Hello everyone, I am currently developing my first GTK+ GUI using glade to initiate bus master DMA. The GUI is set to take DMA transfer specifics (payload, number of packets, etc). Based on these inputs, I need to set a label or text box showing the total amount of bytes to be transferred

Re: g_malloc overhead

2009-01-29 Thread Tor Lillqvist
What is wrong with: gchar* g_utf8_strncpy (gchar *dest,const gchar *src,gsize n); It isn't needed. The nice thing about UTF-8 is that strings in UTF-8 can be handled with normal C str* functions just fine. gunichar2 * g_utf16_strncpy (gunichar2*dest,const gunichar2*src,gsize n); Such a

Re: g_malloc overhead

2009-01-29 Thread Xavier Bestel
On Thu, 2009-01-29 at 16:51 +0200, Tor Lillqvist wrote: I think strncpy() is one of the few that needs an utf8 equivalent, because a char may span several bytes. Well, he didn't say exactly what semantics he wanted his g_utf8_strncpy() and g_utf16_strncpy() to have. In the UTF-8 case,

Re: GGtk-CRITICAL **: gtk_label_set_text: assertion `GTK_IS_LABEL (label)` failed

2009-01-29 Thread Larry Reaves
On Wed, 2009-01-28 at 20:16 -0700, Jacob Wiltgen wrote: Hello everyone, I am currently developing my first GTK+ GUI using glade to initiate bus master DMA. The GUI is set to take DMA transfer specifics (payload, number of packets, etc). Based on these inputs, I need to set a label or

Re: g_malloc overhead

2009-01-29 Thread Martín Vales
Tor Lillqvist escribió: What is wrong with: gchar* g_utf8_strncpy (gchar *dest,const gchar *src,gsize n); It isn't needed. The nice thing about UTF-8 is that strings in UTF-8 can be handled with normal C str* functions just fine. this function it really exist :-[ .