Questions about "filechooser_widget"

View: New views
2 Messages — Rating Filter:   Alert me  

Questions about "filechooser_widget"

by Zampini Samuele :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi there,

I am trying to build a GUI and I would like to open a file (let's say a picture).

Well, I have a main window and a second window which contains a gtk_filechooser_widget.

Now, how do have a couple of question:

1. I would like that when I click on the Menu_Button "Open", the window which contains the gtk_filechooser_widget appears. How is that possible?
2. Also, once selected the file, I would lik to save the path as a string.

Could you help?

Thanks a lot,

samuele
_______________________________________________
Glade-users maillist  -  Glade-users@...
http://lists.ximian.com/mailman/listinfo/glade-users

Re: Questions about "filechooser_widget"

by Alexey Kurochkin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Wed, 2009-11-04 at 10:47 +0100, Zampini Samuele wrote:
> Hi there,
>
> I am trying to build a GUI and I would like to open a file (let's say a picture).
>
> Well, I have a main window and a second window which contains a gtk_filechooser_widget.
>
> Now, how do have a couple of question:
>
> 1. I would like that when I click on the Menu_Button "Open", the window which contains the gtk_filechooser_widget appears. How is that possible?

Call gtk_window_present() in your Menu_Button callback handler. If your
Menu_Button is a GtkButton then it would be "clicked" callback.

> 2. Also, once selected the file, I would lik to save the path as a string.

Call gtk_file_chooser_get_filename() whenever you want to save the path.

>
> Could you help?
>
> Thanks a lot,
>
> samuele
> _______________________________________________
> Glade-users maillist  -  Glade-users@...
> http://lists.ximian.com/mailman/listinfo/glade-users
>


_______________________________________________
Glade-users maillist  -  Glade-users@...
http://lists.ximian.com/mailman/listinfo/glade-users