Logo Search packages:      
Sourcecode: inkscape version File versions

bool Inkscape::UI::Dialogs::FileOpenDialogImpl::show (  )  [virtual]

Show this dialog modally. Return true if user hits [OK]

Implements Inkscape::UI::Dialogs::FileOpenDialog.

Definition at line 898 of file filedialog.cpp.

References extension, extensionMap, and myFilename.

    set_current_folder(get_current_folder()); //hack to force initial dir listing
    set_modal (TRUE);                      //Window
    sp_transientize((GtkWidget *)gobj());  //Make transient
    gint b = run();                        //Dialog

    if (b == Gtk::RESPONSE_OK)
        //This is a hack, to avoid the warning messages that
        //Gtk::FileChooser::get_filter() returns
        //should be:  Gtk::FileFilter *filter = get_filter();
        GtkFileChooser *gtkFileChooser = Gtk::FileChooser::gobj();
        GtkFileFilter *filter = gtk_file_chooser_get_filter(gtkFileChooser);
        if (filter)
            //Get which extension was chosen, if any
            extension = extensionMap[gtk_file_filter_get_name(filter)];
        myFilename = get_filename();
        return TRUE;
       return FALSE;

Generated by  Doxygen 1.6.0   Back to index