Set up callbacks for dynamically created buttons

2006-04-21 Thread 3saul
I'm creating some buttons using: buttons = g_new(GtkWidget*, n); for (i = 0; i < n; i++) { buttons[i] = gtk_button_new... gtk_button_whatever(GTK_BUTTON(buttons[i])... ... gtk_box_pack_start(GTK_BOX(some_box), buttons[i]... } how would I set these buttons up with call backs once they'r

Re: GTK+ 2.8.17 and background colours

2006-04-21 Thread James Scott Jr
On Fri, 2006-04-21 at 20:36 +0200, Francesco Montorsi wrote: > Hi, > I'm struggling with my GTK+ (2.8.17 - coming with ubuntu dapper) to > be able to set the background colour of a button. > > I've googled and searched the archives of this mailing list and I have > found exactly same questi

Re: GtkTreeView PixBuf cell to display 2 images

2006-04-21 Thread daa84
Van H Tran wrote: Hi! I want to implement some kind of FOLDER browser window using GtkTreeView. This tree has 2 columns, first column for some icon, and the second for the folder name I have 4 icons 1. icon of a Folder open 2. icon of a Folder closed 3. icon of a small + sign 4. icon of a smal

GtkTreeView PixBuf cell to display 2 images

2006-04-21 Thread Van H Tran
Hi! I want to implement some kind of FOLDER browser window using GtkTreeView. This tree has 2 columns, first column for some icon, and the second for the folder name I have 4 icons 1. icon of a Folder open 2. icon of a Folder closed 3. icon of a small + sign 4. icon of a small - sign If icon 1

GTK+ 2.8.17 and background colours

2006-04-21 Thread Francesco Montorsi
Hi, I'm struggling with my GTK+ (2.8.17 - coming with ubuntu dapper) to be able to set the background colour of a button. I've googled and searched the archives of this mailing list and I have found exactly same questions with attached test programs. I'm attaching two short, simple test pro

RE: Refreshing the progressbar

2006-04-21 Thread Freddie Unpenstein
> Hello all, I am using the probress bar to show the progress of some > event. Initially i have some text in theprogress bar. After the > event is complete, i change the text on the progress bar.. But it > is not getting changed... But once i minimise the window and then > maximise it, the text on

re:re:Re: can't ercieve data passed to g_signal_connect

2006-04-21 Thread rachit goel
thanks guys i was mistaken in my assumption about omitting the arguments well thanks anyways that solved the probs Send instant messages to your online friends http://uk.messenger.yahoo.com ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnom

Re: Random Number of Buttons

2006-04-21 Thread James Scott Jr
On Thu, 2006-04-20 at 18:40 -0700, 3saul wrote: > OK what I'm trying to do is this: > > 1. Read a directory full of images (the images in the directory will change) > 2. Create a table with the correct number of cells. > 3. Put a button in each cell with an image on it from the directory > 4. In

Re: How to detect if a glist->data is a GUINT_TO_POINTER for not freeing it ?

2006-04-21 Thread Colossus
Hi, Thank you all for your kind answers. -- Colossus Xarchiver, a Linux GTK+2 only archive manager - http://xarchiver.xfce.org Cpsed, a Linux OpenGL 3D scene editor - http://cpsed.sourceforge.net Mizio, a QT proxy hunter scanner tool - http://mizio.sourceforge.net

GTK+ 2.8.17 runtime and package

2006-04-21 Thread Benoit Carpentier
Hi everybody, GTK+ 2.8.17 runtime for windows and package for Dev-Cpp are released. There are available at : http://gtk.alkia.org Regards, Benoît Carpentier, "GTKool" - Faites de Yahoo! votre page d'accueil sur le web pour retrouver directement

Scrollable windows (page-size).

2006-04-21 Thread Magnus Myrefors
Hi, I wonder if there is if there is a gtk-signal emitted when the widget inside a scrollable window is equal to the "page-size" of the scrollable window. I also wonder if you somehow can get the "page-size" ? /Magnus ___ gtk-app-devel-list mailing list

Re: can't ercieve data passed to g_signal_connect

2006-04-21 Thread David Necas (Yeti)
On Fri, Apr 21, 2006 at 12:45:35PM +0100, rachit goel wrote: > > g_signal_connect ((gpointer)eventt[iter],"leave_notify_event", > G_CALLBACK (mouse_leave1),data1); > g_signal_connect ((gpointer)eventt[iter],"button_press_event", > G_CALLBACK (tab_click1), data1); >

Re: can't ercieve data passed to g_signal_connect

2006-04-21 Thread John Cupitt
On 4/21/06, rachit goel <[EMAIL PROTECTED]> wrote: > g_signal_connect ((gpointer)eventt[iter],"button_press_event", > G_CALLBACK (tab_click1), data1); > void tab_click1(GtkWidget *widget,gchar* data1) You have the type of your callback wrong: http://developer.gnome.org/doc/API/2.0/gtk

Re: can't ercieve data passed to g_signal_connect

2006-04-21 Thread rachit goel
interface.h . . . GtkEventBox **eventt; . . . . interface.c GtkWidget* create_window1 (void) { . . . . . eventt = g_new0 (GtkWidget * , tab_count); . . . for (iter = 1 ; iter <= tab_count ; iter++) { . . . . eventt[iter]=GTK_EVEN

Re: Howto really debug gdk_x_error?

2006-04-21 Thread John Cupitt
On 4/21/06, Wojciech Kromer <[EMAIL PROTECTED]> wrote: > Where is your code called? > -mine is from fimer function added by g_timeout_add > > Are You using timers, pthreads, gthreads? > - i'm using pthreads, but there are no gtk call from there > > How often are made changes to markupLabel? > -m

Re: How to detect if a glist->data is a GUINT_TO_POINTER for not freeing it ?

2006-04-21 Thread Enrico Tröger
On Fri, 21 Apr 2006 13:01:10 +0200, Colossus <[EMAIL PROTECTED]> wrote: > Enrico Tröger wrote: > > No, it is a simple decimal value. I appended the l to emphasise > > that it is a long int. I'm not completely sure, but I think you can > > safely omit it. > > This is my code: > original = g_strndu

Re: How to detect if a glist->data is a GUINT_TO_POINTER for not freeing it ?

2006-04-21 Thread Christian Neumair
Am Freitag, den 21.04.2006, 13:01 +0200 schrieb Colossus: > Enrico Tröger wrote: > > No, it is a simple decimal value. I appended the l to emphasise that it > > is a long int. I'm not completely sure, but I think you can safely omit > > it. Why don't you use two lists instead of one? Same number o

Re: Howto really debug gdk_x_error?

2006-04-21 Thread Wojciech Kromer
Dnia 2006-04-20 13:30, Użytkownik Faria, Sydney C napisał: I used the following code to update a Pango string with no problems: char *markup = g_strconcat(s1, standdata.Stand, s2, standdata.Engine, s3, standdata.jobnumber,

Re: How to detect if a glist->data is a GUINT_TO_POINTER for not freeing it ?

2006-04-21 Thread Colossus
Enrico Tröger wrote: No, it is a simple decimal value. I appended the l to emphasise that it is a long int. I'm not completely sure, but I think you can safely omit it. This is my code: original = g_strndup ( start , end - start); unsigned long long int *_original = g_malloc(sizeof(unsigned lon

Re: How to detect if a glist->data is a GUINT_TO_POINTER for not freeing it ?

2006-04-21 Thread Enrico Tröger
On Fri, 21 Apr 2006 12:44:48 +0200, Colossus <[EMAIL PROTECTED]> wrote: > Enrico Tröger wrote: > > > give it some value > > *iptr = 100l; > > thanks for replying. Which value is the above ? Hexadecimal one ?? Or > what else ? No, it is a simple decimal value. I appended the l to emphasise that

Re: How to detect if a glist->data is a GUINT_TO_POINTER for not freeing it ?

2006-04-21 Thread Colossus
Enrico Tröger wrote: give it some value *iptr = 100l; Hi Enrico, thanks for replying. Which value is the above ? Hexadecimal one ?? Or what else ? -- Colossus Xarchiver, a Linux GTK+2 only archive manager - http://xarchiver.xfce.org Cpsed, a Linux OpenGL 3D scene editor - http://cpsed.source

Re: How to detect if a glist->data is a GUINT_TO_POINTER for not freeing it ?

2006-04-21 Thread Enrico Tröger
On Fri, 21 Apr 2006 12:11:48 +0200, Colossus <[EMAIL PROTECTED]> wrote: Hi Colossus, > I have to fill a GList with strings and unsigned long int. > The content of the GList is not always the same so I don't > know wich element is a string to free or a GUINT_TO_POINTER don't use GUINT_TO_POINTER.

How to detect if a glist->data is a GUINT_TO_POINTER for not freeing it ?

2006-04-21 Thread Colossus
Hi, I have to fill a GList with strings and unsigned long int. The content of the GList is not always the same so I don't know wich element is a string to free or a GUINT_TO_POINTER that I don't have to free. Is there a trick to do so ? Thanks, -- Colossus Xarchiver, a Linux GTK+2 only archive m

RE: Scroll WIndow with GtkTreeView

2006-04-21 Thread Sailaxmi korada
Thanks, it worked. -Original Message- From: David Necas (Yeti) [mailto:[EMAIL PROTECTED] Sent: Friday, April 21, 2006 1:15 PM To: Sailaxmi korada Cc: gtk-app-devel-list@gnome.org Subject: Re: Scroll WIndow with GtkTreeView On Fri, Apr 21, 2006 at 01:00:10PM +0530, Sailaxmi korada wrote:

Re: Scroll WIndow with GtkTreeView

2006-04-21 Thread David Necas (Yeti)
On Fri, Apr 21, 2006 at 01:00:10PM +0530, Sailaxmi korada wrote: > abnormal way. Is there any other way that I can make them move in sync... > and be scrolled together. Without Viewport, the table is behaving in an > My application requires Tree Widget and Table to be placed in same container Sin

RE: Scroll WIndow with GtkTreeView

2006-04-21 Thread Sailaxmi korada
My application requires Tree Widget and Table to be placed in same container and be scrolled together. Without Viewport, the table is behaving in an abnormal way. Is there any other way that I can make them move in sync... laxmi -Original Message- From: David Necas (Yeti) [mailto:[EMAIL P

Re: Scroll WIndow with GtkTreeView

2006-04-21 Thread David Necas (Yeti)
On Fri, Apr 21, 2006 at 10:47:24AM +0530, Sailaxmi korada wrote: > In my application, I'm placing my TreeView widget in a scrolled window. > When I'm scrolling down the list, my headers are getting scrolled up, so > they are no more visible. Is there any way to retain the headers in the > visibl