gtkHScale - scroll wheel behaviour

2009-01-20 Thread Neil
hi all, how would i go about changing the behaviour of an hscale widget when the mouse scroll wheel is used? for example, swapping what happens when you wheel up with when you wheel down? would i have to code a new class that inherits hscale? i don't think the gtk_range_set_inverted method p

Re: g_malloc overhead

2009-01-20 Thread Liam R E Quin
On Mon, 2009-01-19 at 18:43 +0100, BJörn Lindqvist wrote: > Actually, a custom allocator could be useful even in the general case. > Malloc is a system call and has quite bad performance on certain > platforms (windows in particular i think). Something like the gslice > allocator could > Probably i

Re: g_malloc overhead

2009-01-20 Thread BJörn Lindqvist
Actually, a custom allocator could be useful even in the general case. Malloc is a system call and has quite bad performance on certain platforms (windows in particular i think). Something like the gslice allocator could Probably improve performance a bit. 2009/1/18, muppet : > > On Jan 18, 2009,

Re: g_malloc overhead

2009-01-20 Thread muppet
On Jan 18, 2009, at 11:43 AM, Martín Vales wrote: What are the advantages of use a glib_mem_vtable ???. I think we have the same malloc function in all operating systems? This vtable allows you to swap in a different allocator with next to no effort. Maybe it has special OOM handling, or

Re: compile 2 libs together

2009-01-20 Thread Till Harbaum / Lists
Hi, Am Dienstag 20 Januar 2009 schrieb frederico schardong: > But now I must use allegro and libglade together. Why not: gcc -o main main.c `pkg-config --cflags --libs libglade-2.0` `allegro-config --libs` Till ___ gtk-app-devel-list mailing list gtk-

compile 2 libs together

2009-01-20 Thread frederico schardong
Hi, when I'm using allegro, this line is to compile it: gcc -o main main.c `allegro-config --libs` and when I'm using libglade, this line is used: gcc -o main main.c `pkg-config --cflags --libs libglade-2.0` But now I must use allegro and libglade together. How I can compile this together? Tha

Re: many buttons, one handler with gtkbuilder

2009-01-20 Thread Tristan Van Berkom
On Tue, Jan 20, 2009 at 7:27 AM, Peter F. Patel-Schneider wrote: [...] > As I expected, I guess, but it sure would be nice to be able to easily build > objects or handlers that have extra information in them in the form of > integers or strings. Just being able to initialize the user-data propert

Re: saving window size?

2009-01-20 Thread Emmanuele Bassi
On Tue, 2009-01-20 at 10:29 -0500, Dr. Michael J. Chudobiak wrote: > > don't *ever* use GConf to store the window size. it's *not* a user > > preference, and the GConf can very well be not writable. > > > > use a file inside a directory like the user cache directory as > > established by the XDG b

Re: saving window size?

2009-01-20 Thread Dr. Michael J. Chudobiak
don't *ever* use GConf to store the window size. it's *not* a user preference, and the GConf can very well be not writable. use a file inside a directory like the user cache directory as established by the XDG base dir specification. Hmm. Could you expand on this (or point me to the docs that e

Re: saving window size?

2009-01-20 Thread Emmanuele Bassi
On Tue, 2009-01-20 at 09:26 -0500, Dr. Michael J. Chudobiak wrote: > Hi all, > > Suppose I have an app, and I would like to save the window size when > when quitting. > > This is easy to do if the user selects File->Quit, but what if they > click window-close? By the time you get the destroy si

Re: saving window size?

2009-01-20 Thread Dr. Michael J. Chudobiak
Tadej Borovšak wrote: I think you need to save your window's size from within the "delete-event" callback. Docs: http://library.gnome.org/devel/gtk/stable/GtkWidget.html#GtkWidget-delete-event Thanks! That did the trick. - Mike ___ gtk-app-devel-list

Re: saving window size?

2009-01-20 Thread Tadej Borovšak
Hello. I think you need to save your window's size from within the "delete-event" callback. Docs: http://library.gnome.org/devel/gtk/stable/GtkWidget.html#GtkWidget-delete-event 2009/1/20 Dr. Michael J. Chudobiak : > Hi all, > > Suppose I have an app, and I would like to save the window size when

Re: saving window size?

2009-01-20 Thread Alexander Semenov
Look at GtkWidget::delete_event signal. On Tue, 2009-01-20 at 09:26 -0500, Dr. Michael J. Chudobiak wrote: > Hi all, > > Suppose I have an app, and I would like to save the window size when > when quitting. > > This is easy to do if the user selects File->Quit, but what if they > click window-

saving window size?

2009-01-20 Thread Dr. Michael J. Chudobiak
Hi all, Suppose I have an app, and I would like to save the window size when when quitting. This is easy to do if the user selects File->Quit, but what if they click window-close? By the time you get the destroy signal, the true width/height values are gone. (You seem to get the default valu

Glib::ustring, error while reading an utf-8 encoded file

2009-01-20 Thread Bastien Dalla Piazza
Hi everybody, I don't have experience about charset issues so I tried the following to experiment: (it's in C++ using glibmm and giomm but I guess the problem is not related to that, it's just I don't understand something.) * #include #include #include #incl

Centering gtk-status-bar-label

2009-01-20 Thread Arne Pagel
Sorry, forgot Subject, Hello, I use a gtk-status-bar where i want to center the label. Following code worked: gtk_misc_set_alignment(GTK_MISC(GTK_STATUSBAR(gui.statusbar)->label),0.5,0.5); But since I updated to the new gtk-download-bundle (for win32) I get following error-messages: (config.e

Re: GtkFileChooser and filter example

2009-01-20 Thread Arne Pagel
GtkWidget * dlg; GtkFileFilter * ff, * ffa; int ret; char * name; dlg = gtk_file_chooser_dialog_new("Select File",GTK_WINDOW(gui.window),GTK_FILE_CHOOSER_ACTION_OPEN,GTK_STOCK_CANCEL,GTK_RESPONSE_CANCEL,GTK_STOCK_OPEN,GTK_RESPONSE_ACCEPT,NULL); ff = gtk_file_filter_new(); gtk_fil

[no subject]

2009-01-20 Thread Arne Pagel
Hello, I use a gtk-status-bar where i want to center the label. Following code worked: gtk_misc_set_alignment(GTK_MISC(GTK_STATUSBAR(gui.statusbar)->label),0.5,0.5); But since I updated to the new gtk-download-bundle (for win32) I get following error-messages: (config.exe:5612): GLib-GObject-WARN

Re: typo on gtk.org/download-windows.html

2009-01-20 Thread Tor Lillqvist
> on the page http://www.gtk.org/download-windows.html > stable libpng 1.2.32 is annouced, however, the download > links go to version 1.2.34 Thanks, fixed. --tml ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mai

typo on gtk.org/download-windows.html

2009-01-20 Thread fka...@googlemail.com
Hi, on the page http://www.gtk.org/download-windows.html stable libpng 1.2.32 is annouced, however, the download links go to version 1.2.34 Bye Felix ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listin

Re: g_malloc overhead

2009-01-20 Thread Emmanuel Rodriguez
On Tue, Jan 20, 2009 at 12:48 PM, Larry Reaves wrote: > On Tue, 2009-01-20 at 09:01 +0100, Martín Vales wrote: >> BJörn Lindqvist escribió: >> > Actually, a custom allocator could be useful even in the general case. >> > Malloc is a system call and has quite bad performance on certain >> > platfor

Re: g_malloc overhead

2009-01-20 Thread Larry Reaves
On Tue, 2009-01-20 at 09:01 +0100, Martín Vales wrote: > BJörn Lindqvist escribió: > > Actually, a custom allocator could be useful even in the general case. > > Malloc is a system call and has quite bad performance on certain > > platforms (windows in particular i think). Something like the gslice

Re: about the color

2009-01-20 Thread Tor Lillqvist
> As followed: > #define GTK_RED 0x,0x,0x > I don't understand why the red is "0x,0x,0x", but RGB is > "255,0,0" The GdkColor struct uses three 16-bit integers to represent the RGB components of a colour. Thus the max value for each component is 0x. The 255 you mentio

about the color

2009-01-20 Thread zhenghe zhang
Hi all Now I have a problem, and I hope you tell me, thank you. As followed: #define GTK_RED 0x,0x,0x I don't understand why the red is "0x,0x,0x", but RGB is "255,0,0" So I want to know how "gdk" parse the color ___ gt

Re: g_malloc overhead

2009-01-20 Thread Martín Vales
BJörn Lindqvist escribió: Actually, a custom allocator could be useful even in the general case. Malloc is a system call and has quite bad performance on certain platforms (windows in particular i think). Something like the gslice allocator could Probably improve performance a bit. gslice i be