[Glade-users] Save As

John Coppens john at jcoppens.com
Wed Jun 21 13:20:24 EDT 2006


On Wed, 21 Jun 2006 12:48:41 -0400
"Kevin Hobby" <khobby at gmail.com> wrote:

> I've been learning about Glade for about a week now and have already
> figured out every thing I need to know for my application (a pretty
> large project), I still can't seem to figure out how exactly to add an
> "open/save as" feature.  Every tutorial which I can find seams to avoid
> the subject and the Glade-users mail list only touches on it.
> 
> Us beginners need an actual walk through Tutorial.
> 
>  I'm wanting to use a regular button to bring up the File Chooser
> Thingy. So far I've created a FileChooserDialog in Glade and chose in
> options the type action "SAVE" Then I loaded the widget in the
> application and called show() ---That's as far as I can get!
> 
> **

These are really GTK problems - not Glade. I'd suggest asking these
questions on the GtkAppDevel list or so.

Anyway, a good tutorial on using the widgets is:

GTK+ / Gnome Application Development   (also findable as ggad)

Or Georg Lebl's
Application Programming Using the GNOME Libraries

John

> 
> 
> 
> 
> void on_savebutton_clicked                  (GtkButton       *button,
> 
> gpointer         user_data)
> {
> 
> GtkWidget *savething = create_filechooserdialog1();

  After creating, you should (optionally) set a default filename...

> gtk_widget_show (savething);

  use gtk_dialog_run here - this simplifies calling the dialog. After it
returns, get the filename from the widget, and destroy it. Then use the
filename to do something with it...

> 
> }
> 
> 
> 
> 
> ...Please help me!!!
> 


More information about the Glade-users mailing list