GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Sun Sep 21, 2014 2:04 pm

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: GtkFileChooserDialog Layout
PostPosted: Fri Dec 30, 2011 6:33 pm 
Offline

Joined: Fri Dec 30, 2011 6:22 pm
Posts: 2
Does anyone know where I can find the layout of the GtkFileChooserDialog?

I mean the children of the dialog: Containers, Widget Names, anything would actually help.
I had considered writing some code to show the dialog and then interrogate the children recursively through a GList, but that seems like a lot of work.

Thanks, TR.


Top
 Profile  
 
 Post subject: Re: GtkFileChooserDialog Layout
PostPosted: Mon Jan 02, 2012 11:43 pm 
Offline
Never Seen the Sunlight

Joined: Thu Mar 24, 2011 2:10 pm
Posts: 328
Location: Sydney, Australia
I took a while finding this too. The GtkFileChooserDialog widget implements GtkDialog and GtkFileChooser and you can access the commands for each by casting to them. The children can be accessed by gtk_dialog_get_content_area and gtk_dialog_get_action_area, casting to containers and then accessing the contents.


Top
 Profile  
 
 Post subject: Re: GtkFileChooserDialog Layout
PostPosted: Thu Jan 05, 2012 11:42 pm 
Offline

Joined: Fri Dec 30, 2011 6:22 pm
Posts: 2
Yes, I had gotten that far from the GTK Reference Manual.

What I really want to do is stick a widget on the GTKFileChooser, next to the widget for the file filters. I assumed that it was in a BOX.


Top
 Profile  
 
 Post subject: Re: GtkFileChooserDialog Layout
PostPosted: Sat Jan 07, 2012 9:12 am 
Offline
Never Seen the Sunlight

Joined: Mon Apr 28, 2008 5:52 am
Posts: 745
Location: UK
Hi,

Please do not try scanning the widget tree for the GtkFileChooser to work out a place to put your own widgets. This is totally undocumented, so if you do get it to work it will probably break unexpectedly in the next version of GTK, even a minor version change in GTK could do this.

The only ways to add extra widgets to the GtkFileChooser widget is to use " gtk_file_chooser_set_preview_widget() " if the style of widget is like that of a preview to the selected file. It even has a signal to indicate if there is a need to change the preview.

http://developer.gnome.org/gtk3/stable/GtkFileChooser.html#gtk-file-chooser-set-preview-widget

The other method is to use " gtk_file_chooser_set_extra_widget () " this will then add an extra widget, say for other file options.

http://developer.gnome.org/gtk3/stable/GtkFileChooser.html#gtk-file-chooser-set-extra-widget

Remember with these methods that the passed widget could be a container which then can have many other widgets inside them.

_________________
E.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group