Ignore:
Timestamp:
Jan 7, 2010, 2:46:34 PM (16 years ago)
Author:
Tillmann Crueger <crueger@…>
Children:
d97af9
Parents:
34ff5e6
Message:

Added a central registry that allows access to actions by name.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • molecuilder/src/builder.cpp

    r34ff5e6 r3e8325  
    6565#include "molecule.hpp"
    6666#include "periodentafel.hpp"
    67 #include "menu.hpp"
     67#include "UIElements/UIFactory.hpp"
     68#include "UIElements/MainWindow.hpp"
    6869
    6970/** Parses the command line options.
     
    904905    char *ConfigFileName = NULL;
    905906    int j;
    906     oldmenu *main_menu;
    907     main_menu = new oldmenu;
    908907    setVerbosity(0);
    909908    /* structure of ParseCommandLineOptions will be refactored later */
     
    940939
    941940
    942 
    943     main_menu->perform(molecules, configuration, periode, ConfigFileName);
     941    UIFactory::makeUserInterface(UIFactory::Text);
     942    MainWindow *mainWindow = UIFactory::get()->makeMainWindow();
     943    mainWindow->display(molecules, configuration, periode, ConfigFileName);
    944944
    945945    if(periode->StorePeriodentafel(configuration->databasepath))
     
    952952    delete(periode);
    953953  delete(configuration);
     954
     955  delete mainWindow;
    954956
    955957  Log() << Verbose(0) <<  "Maximum of allocated memory: "
     
    960962  logger::purgeInstance();
    961963  errorLogger::purgeInstance();
    962 
     964  UIFactory::purgeInstance();
    963965  return (0);
    964966}
Note: See TracChangeset for help on using the changeset viewer.