Gtk File Chooser Dialog
Creating the Glade File
-
Start by creating a simple Glade GUI with a window and a vertical box with 2 items. Add a menu to the top, a label in the bottom one. Save the glade file as gtk10.glade.
Your project should look like this now.
-
Next add the on_window1_destroy Handler to the window1 GtkObject destroy handler.
-
Next change the names of some of the menu items so they make sense:
-
Change imagemenuitem1 to file_new
-
Change imagemenuitem2 to file_open
-
Change imagemenuitem3 to file_save
-
Change imagemenuitem4 to file_save_as
-
Change imagemenuitem5 to file_quit
Your project should look like this now.
-
-
Next add handlers to each GtkMenuItem activate signal for each menu item we changed above and save the glade file. Your project should look like this now.
Comments
Even though Glade has a File Chooser Dialog I find it easier to create the GTK File Chooser Dialog in Python.