Logo Search packages:      
Sourcecode: inkscape version File versions

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

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

Implements Inkscape::UI::Dialogs::FileSaveDialog.

Definition at line 1332 of file filedialog.cpp.

References extension, fileTypeComboBox, fileTypes, 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
    hide();

    if (b == Gtk::RESPONSE_OK)
        {
        int sel = fileTypeComboBox.get_active_row_number ();
        if (sel>=0 && sel< (int)fileTypes.size())
            {
            FileType &type = fileTypes[sel];
            extension = type.extension;
            }
        myFilename = get_filename();

        /*

        // FIXME: Why do we have more code

        append_extension = checkbox.get_active();
        prefs_set_int_attribute("dialogs.save_as", "append_extension", append_extension);
        prefs_set_string_attribute("dialogs.save_as", "default",
                  ( extension != NULL ? extension->get_id() : "" ));
        */
        return TRUE;
        }
    else
        {
        return FALSE;
        }
}


Generated by  Doxygen 1.6.0   Back to index