Logo Search packages:      
Sourcecode: inkscape version File versions

void Inkscape::UI::Dialogs::FileSaveDialogImpl::createFileTypeMenu (  )  [private]

Create a filter menu for this type of dialog

Definition at line 1138 of file filedialog.cpp.

References fileTypeChangedCallback(), fileTypeComboBox, and fileTypes.

Referenced by FileSaveDialogImpl().

{
    Inkscape::Extension::DB::OutputList extension_list;
    Inkscape::Extension::db.get_output_list(extension_list);

    for (Inkscape::Extension::DB::OutputList::iterator current_item = extension_list.begin();
         current_item != extension_list.end(); current_item++)
    {
        Inkscape::Extension::Output * omod = *current_item;

        // FIXME: would be nice to grey them out instead of not listing them
        if (omod->deactivated()) continue;

        FileType type;
        type.name     = (_(omod->get_filetypename()));
        type.pattern  = "*";
        FileDialogExtensionToPattern (type.pattern, omod->get_extension());
        type.extension= omod;
        fileTypeComboBox.append_text(type.name);
        fileTypes.push_back(type);
    }

    //#Let user choose
    FileType guessType;
    guessType.name = _("Guess from extension");
    guessType.pattern = "*";
    guessType.extension = NULL;
    fileTypeComboBox.append_text(guessType.name);
    fileTypes.push_back(guessType);


    fileTypeComboBox.set_active(0);
    fileTypeChangedCallback(); //call at least once to set the filter
}


Generated by  Doxygen 1.6.0   Back to index