[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Detecting value change in GtkCombo



Keith Maika wrote:
> 
> Hello,
> 
> I'm making an application similar to WinSCP using GTK+-2.0  I have a 
> tree view that will list all the files and directories in the working 
> directory.  The working directory is displayied in a toolbar above the 
> tree view using GtkCombo widget.  I'd like to be able to be able to 
> change the working directory by either typing in another path in the 
> entry of that combo, or select a parent directory from the drop-down 
> list.  I've got it working by typing in an entry, but I cant get it to 
> let me select one.  I've tried connecting the list inside the combo to 
> the select-child and selection-changed signals and I'm able to get the 
> selected value, but my application seg faults when I do that.  I'm 
> thinking the reason behind the seg-fault is because I change the 
> drop-down list inside of the selection-changed handler, but I can't 
> think of any other way to do this.  I just recently tried the hide event 
> but that doesn't even fire the signal handler function.
> 
> Does anyone have an suggestions on how to get notified when an item in a 
> GtkCombo has been selected?  If you need/want to see what I have so far, 
> you can get the source code from my site at: 
> http://kicken.mine.nu:8008/GtkSSH/
> 
> Thanks
> 


Ok.  I did manage to get something that seems to work ok by connecting 
to the button-release-event in the combo box's list.  The program 
doesn't crash any longer, and it loads the newly selected directory 
fine.  However it creates a message like this:
(gtkssh:23611): Gtk-CRITICAL **: file gtkwidget.c: line 5724 
(gtk_widget_is_ancestor): assertion `GTK_IS_WIDGET (widget)' failed

It doesn't seem to hurt the program any, but it looks bad so I'd like to 
fix the problem if I can.  Would anyone have any ideas?  The source code 
can be found here: http://cvs.kicken.mine.nu:8008/cvsweb.cgi/gtkssh/

Thanks again,


-- 
Keith Maika
http://kicken.mine.nu:8008/  - Personal Site.
http://wiser.kicks-ass.org:8008/  - Long-term Project.
http://www.fsf.org/philosophy/can-you-trust.html - Can you trust your 
computer?
http://www.fsf.org/philosophy/no-word-attachments.html - Support Free 
Communication.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]