Re: gtk_tree_model_get_iter segfault in on_row_activated

2006-06-16 Thread Yeti
On Thu, Jun 15, 2006 at 10:44:57PM +0100, Christopher Backhouse wrote: > I have connected to the row activated signal and want to handle it - so > I am doing this: > > void on_row_activated(GtkTreeView* tree_view,GtkTreePath* > path,GtkTreeViewColumn* column,gpointer user_data) > { > std::

C/GTK question

2006-06-16 Thread Matías Torres
I'm building an application in C that uses GTK. The reason i'm doing this is to learn GTK (and C as well) the main problem I've found is that i write all the GTK code in only one file and is getting too da## big, so i tried to divide the GTK code in different files, but it seems i'm do not understa

Send file to system browser

2006-06-16 Thread Peter Robinson
Hi GTKlers, I am writing my first GTK program in order to turn a command-line afair that does various bioinformatics calculations into a more user-friendly tool. I would like to results of analyis to appear in a browser window. I have had a look at gtkhtml for this, but wonder if it might not b

Re: gtk_tree_model_get_iter segfault in on_row_activated

2006-06-16 Thread blythe2
Iter needs to be an actual object, not just a pointer. You are *creating* a n iterator, then passing it by reference to be filled. As your code stands now, you're passing an uninitialized pointer to be written to, which of course crashes. Try the following: void on_row_activated(GtkTreeView* tr

Re: gtk_tree_model_get_iter segfault in on_row_activated

2006-06-16 Thread Greg Suarez
> > > void on_row_activated(GtkTreeView* tree_view,GtkTreePath* > path,GtkTreeViewColumn* column,gpointer user_data) > { > std::cout<<"path was "< GtkTreeModel* model=gtk_tree_view_get_model(tree_view); > if(model!=NULL) > std::cout<<"got the model OK\n"; >

Simple Yes/No dialog

2006-06-16 Thread blythe2
Ok, you guys were a great help with my last question :) Does GTK have a simple blocking yes/no dialog? Something that will return true or false, or similar? I could write my own really quickly, but I was kinda hoping GTK would save me a few lines of code. ___

Startup splash screen..

2006-06-16 Thread Daniel Pekelharing
Hi all, This may be a rather stupid question, but here goes: I want to implement a simple startup splash screen for my app, a simple border-less window with an image which displays for a few seconds... It's really nothing complicated to implement, just a simple timer to close the window or somet

Re: Application runs slowly, crashes when wiggling the mouse quickly

2006-06-16 Thread blythe2
> In the function, shove the serial data into a pipe that the main thread > can read from in a function invoked by a GDK Input call: Done. Seems to work... I worked on the code and tried to crash it for an hour and a half, to no avail, so I think it's fixed. I guess GDK just cleans itself up bef

Re: Application runs slowly, crashes when wiggling the mouse quickly

2006-06-16 Thread Matt Hull
are you using multiple threads ? i would assume not. perhaps put the serial port code in another thread. and leave the gtk user inferace in the main thread. matt On Thu, 15 Jun 2006 [EMAIL PROTECTED] wrote: > I'm writing an application that makes fairly heavy use of the serial port. > While

gtk_tree_model_get_iter segfault in on_row_activated

2006-06-16 Thread Christopher Backhouse
I have connected to the row activated signal and want to handle it - so I am doing this: void on_row_activated(GtkTreeView* tree_view,GtkTreePath* path,GtkTreeViewColumn* column,gpointer user_data) { std::cout<<"path was "

Re: Application runs slowly, crashes when wiggling the mouse quickly

2006-06-16 Thread Wallace Owen
On Thu, 2006-06-15 at 16:28 -0400, [EMAIL PROTECTED] wrote: > No, it's not in a seperate thread, it's a function that gets called > asynchronously by the kernel. But that function *does* then make GTK > calls. Would it be safer to tie my serial port routines to one of those > GDK IO callbacks, th

Re: Application runs slowly, crashes when wiggling the mouse quickly

2006-06-16 Thread blythe2
No, it's not in a seperate thread, it's a function that gets called asynchronously by the kernel. But that function *does* then make GTK calls. Would it be safer to tie my serial port routines to one of those GDK IO callbacks, that way I know it's safe to muck around when I get called? - Nate >

Re: Application runs slowly, crashes when wiggling the mouse quickly

2006-06-16 Thread blythe2
I just thought of something else. I'm using asynchronous IO, which means that data coming into my serial port (caught via a kernel signal) can interrupt the gui and call some other code, which in turn tells the GUI to update various parts of it. Is it possible that I'm interrupting the GUI from d

Re: Application runs slowly, crashes when wiggling the mouse quickly

2006-06-16 Thread Wallace Owen
It sounds like lightening the load merely reduces the chance of hitting some race condition. You say your app makes heavy use of the serial port. Are you doing this in a separate thread? If so, is that thread also making gtk calls (in addition to the main thread)? // Wally On Thu, 2006-06-1