Re: Drawing on gtk textview

2008-10-19 Thread Miroslav Rajcic
I had a same problem a while ago with expose drawing, and it turned out that the problem was this: to draw something in your handler, you must use "event->window" as a pointer to the window that is being drawn, not "widget->window" or anything else. Once I've made that change, my expose drawi

Re: Passing Struct to g_signal_connect

2008-10-19 Thread beginner.c
Thank you. However, now I'm getting a segfault when trying to access any of the elements of the passed struct. Does it matter that the button to which the signal is attached is actually in the struct I'm passing to the callback? This is what GDB gives me Program received signal SIGSEGV, Segmentat

Re: What widgets in TES Construction Set?

2008-10-19 Thread Tristan Van Berkom
On Sat, Oct 18, 2008 at 1:26 PM, Juhana Sadeharju <[EMAIL PROTECTED]> wrote: [...] > I tried Glade but soon found that plain GTK is more for my > taste. In Glade, good is that all the widget properties are > listed, no guess work. Bad was that I could not do what > I wanted. Hi, before you give up

Entry completion

2008-10-19 Thread Sujith
Hi, I am facing a problem and would like any suggestion on the best way to solve it. I have a tree model that looks something like this: Genre |_Artist |_Album For enabling text entry completion, I add this model to 3 GtkEntryCompletion instances, associated with 3 different text entry

Re: Passing Struct to g_signal_connect

2008-10-19 Thread Till Harbaum / Lists
Hi, you have to make sure that the parameters of your callback function exactly match what's been described for this particular event. In your case your have to check the "clicked" event for a GtkButton which gives us: void user_function(GtkButton *button, gpointer user_data) So this is how

Passing Struct to g_signal_connect

2008-10-19 Thread beginner.c
I need to pass a struct using g_signal_connect, but the issue I'm having is that I can't alter the elements of the struct within the called function e.g. void on_button2_clicked (struct allStructs *by_ptr) { gtk_label_set_text ((GtkLabel*)by_ptr->widgets.label, "whatever"); } main { bla