GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Fri Sep 19, 2014 7:53 pm

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: How to open FILE_CHOOSER from menu?
PostPosted: Sat Apr 16, 2011 2:19 pm 
Offline

Joined: Sat Apr 16, 2011 2:10 pm
Posts: 3
Hello!

I know there is a function that open a file chooser menu once a button is clicked.
[ button=gtk_file_chooser_button_new(("Select A File"), GTK_FILE_CHOOSER_ACTION_OPEN); ]
Is there anyway to to this same procedure by pressing a widget that is initialized as a gtk_menu_item?
In other words, can i attribute GTK_FILE_CHOOSER_ACTION_OPEN once a menu item is pressed?

Thanks.


Top
 Profile  
 
 Post subject: Re: How to open FILE_CHOOSER from menu?
PostPosted: Sun Apr 17, 2011 9:38 am 
Offline

Joined: Sat Apr 16, 2011 2:10 pm
Posts: 3
How can i write to you in PM?
i´m new in this forum, and i´m still getting used to this....


Top
 Profile  
 
 Post subject: Re: How to open FILE_CHOOSER from menu?
PostPosted: Mon Apr 18, 2011 9:37 am 
Offline
Never Seen the Sunlight

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

There is no direct way of doing what you want. GtkFileChooserButton is a compound widget that creates a GtkFileChooserDialog when it needs it.

What you need to do is have a call back (called by menu, tool bar, etc. events) that creates a GtkFileChooserDialog and runs that dialog. The manual for it is http://developer.gnome.org/gtk/stable/GtkFileChooserDialog.html

E.

_________________
E.


Top
 Profile  
 
 Post subject: Re: How to open FILE_CHOOSER from menu?
PostPosted: Mon Apr 18, 2011 7:17 pm 
Offline

Joined: Sat Apr 16, 2011 2:10 pm
Posts: 3
Thanks a lot errol! it was truly helpful.
once again thks.


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 3 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