Пример #1
0
void BuildSettingsDialog::enterScreen()
{
    ScannedComponentInfo scannedCompInfo;
    OovStatus status = scannedCompInfo.readScannedInfo();
    if(status.ok())
    {
        GtkComboBoxText *typeBox = GTK_COMBO_BOX_TEXT(Builder::getBuilder()->getWidget(
                                       "ComponentTypeComboboxtext"));
        Gui::clear(typeBox);
        Gui::setSelected(GTK_COMBO_BOX(typeBox), -1);
        Gui::appendText(typeBox, ComponentTypesFile::getLongComponentTypeName(
                            CT_Unknown));
        Gui::appendText(typeBox, ComponentTypesFile::getLongComponentTypeName(
                            CT_StaticLib));
        Gui::appendText(typeBox, ComponentTypesFile::getLongComponentTypeName(
                            CT_SharedLib));
        Gui::appendText(typeBox, ComponentTypesFile::getLongComponentTypeName(
                            CT_Program));
        Gui::appendText(typeBox, ComponentTypesFile::getLongComponentTypeName(
                            CT_JavaJarLib));
        Gui::appendText(typeBox, ComponentTypesFile::getLongComponentTypeName(
                            CT_JavaJarProg));

        mComponentTree.clear();
        for(auto const &name : scannedCompInfo.getComponentNames())
        {
            if(mLastCompName.length() == 0)
            {
                mLastCompName = name;
            }
            mComponentTree.appendText(getParent(name),
                                      ComponentTypesFile::getComponentChildName(name));
        }
    }
    if(status.needReport())
    {
        status.report(ET_Error, "Unable to read component settings file");
    }
    GuiTreePath path("0");
    gtk_tree_view_set_cursor(mComponentTree.getTreeView(), path.getPath(),
                             nullptr, false);
}
Пример #2
0
void BuildVarSettingsDialog::updateFilterValueList()
    {
    int index = getComboId("FilterNameComboboxtext", mFilterNames);
    if(index != BAD_INDEX)
        {
        mFilterValuesTreeView.clear();
        GuiTreeItem parent;
        switch(index)
            {
            case FT_BuildConfig:
                mFilterValuesTreeView.appendText(parent, BuildConfigAnalysis);
                mFilterValuesTreeView.appendText(parent, BuildConfigDebug);
                mFilterValuesTreeView.appendText(parent, BuildConfigRelease);
                for(auto const &cfgName : mBuildConfigs)
                    {
                    mFilterValuesTreeView.appendText(parent, cfgName);
                    }
                break;

            case FT_BuildMode:
                mFilterValuesTreeView.appendText(parent, OptFilterValueBuildModeAnalyze);
                mFilterValuesTreeView.appendText(parent, OptFilterValueBuildModeBuild);
                break;

            case FT_Component:
                {
                ScannedComponentInfo scannedCompInfo;
                OovStatus status = scannedCompInfo.readScannedInfo();
                for(auto const &name : scannedCompInfo.getComponentNames())
                    {
                    mFilterValuesTreeView.appendText(parent, name);
                    }
                }
                break;

            case FT_Platform:
                mFilterValuesTreeView.appendText(parent, OptFilterValuePlatformLinux);
                mFilterValuesTreeView.appendText(parent, OptFilterValuePlatformWindows);
                break;
            }
        }
    }