- if (isSalomeMode()) {
- // Create only Undo, Redo commands
- QAction* aAction = salomeConnector()->addDesktopCommand("UNDO_CMD", tr("Undo"),
- tr("Undo last command"),
- QIcon(":pictures/undo.png"),
- QKeySequence::Undo, false, "MEN_DESK_EDIT");
- QString aToolBarTitle = tr( "INF_DESK_TOOLBAR_STANDARD" );
- salomeConnector()->addActionInToolbar( aAction,aToolBarTitle );
-
- connect(aAction, SIGNAL(triggered(bool)), this, SLOT(onUndo()));
- addHistoryMenu(aAction, SIGNAL(updateUndoHistory(const QList<ActionInfo>&)), SLOT(onUndo(int)));
-
- aAction = salomeConnector()->addDesktopCommand("REDO_CMD", tr("Redo"), tr("Redo last command"),
- QIcon(":pictures/redo.png"), QKeySequence::Redo,
- false, "MEN_DESK_EDIT");
- salomeConnector()->addActionInToolbar( aAction, aToolBarTitle );
-
- connect(aAction, SIGNAL(triggered(bool)), this, SLOT(onRedo()));
- addHistoryMenu(aAction, SIGNAL(updateRedoHistory(const QList<ActionInfo>&)), SLOT(onRedo(int)));
-
- salomeConnector()->addDesktopMenuSeparator("MEN_DESK_EDIT");
- aAction = salomeConnector()->addDesktopCommand("REBUILD_CMD", tr("Rebuild"), tr("Rebuild data objects"),
- QIcon(":pictures/rebuild.png"), QKeySequence(),
- false, "MEN_DESK_EDIT");
- salomeConnector()->addActionInToolbar( aAction, aToolBarTitle );
-
- connect(aAction, SIGNAL(triggered(bool)), this, SLOT(onRebuild()));
- salomeConnector()->addDesktopMenuSeparator("MEN_DESK_EDIT");
-
- aAction = salomeConnector()->addDesktopCommand("SAVEAS_CMD", tr("Export NewGeom..."), tr("Export the current document into a NewGeom file"),
- QIcon(), QKeySequence(),
- false, "MEN_DESK_FILE");
- connect(aAction, SIGNAL(triggered(bool)), this, SLOT(onSaveAs()));
-
- aAction = salomeConnector()->addDesktopCommand("OPEN_CMD", tr("Import NewGeom..."), tr("Import a NewGeom file"),
- QIcon(), QKeySequence(),
- false, "MEN_DESK_FILE");
- connect(aAction, SIGNAL(triggered(bool)), this, SLOT(onOpen()));
- salomeConnector()->addDesktopMenuSeparator("MEN_DESK_FILE");
+#ifdef HAVE_SALOME
+ // Create only Undo, Redo commands
+ QAction* aAction = salomeConnector()->addDesktopCommand("UNDO_CMD", tr("Undo"),
+ tr("Undo last command"),
+ QIcon(":pictures/undo.png"),
+ QKeySequence::Undo, false, "MEN_DESK_EDIT");
+ QString aToolBarTitle = tr( "INF_DESK_TOOLBAR_STANDARD" );
+ salomeConnector()->addActionInToolbar( aAction,aToolBarTitle );
+
+ connect(aAction, SIGNAL(triggered(bool)), this, SLOT(onUndo()));
+ addHistoryMenu(aAction, SIGNAL(updateUndoHistory(const QList<ActionInfo>&)), SLOT(onUndo(int)));
+
+ aAction = salomeConnector()->addDesktopCommand("REDO_CMD", tr("Redo"), tr("Redo last command"),
+ QIcon(":pictures/redo.png"), QKeySequence::Redo,
+ false, "MEN_DESK_EDIT");
+ salomeConnector()->addActionInToolbar( aAction, aToolBarTitle );
+
+ connect(aAction, SIGNAL(triggered(bool)), this, SLOT(onRedo()));
+ addHistoryMenu(aAction, SIGNAL(updateRedoHistory(const QList<ActionInfo>&)), SLOT(onRedo(int)));
+
+ salomeConnector()->addDesktopMenuSeparator("MEN_DESK_EDIT");
+ //aAction = salomeConnector()->addDesktopCommand("REBUILD_CMD", tr("Rebuild"), tr("Rebuild data objects"),
+ // QIcon(":pictures/rebuild.png"), QKeySequence(),
+ // false, "MEN_DESK_EDIT");
+ //salomeConnector()->addActionInToolbar( aAction, aToolBarTitle );
+
+ //connect(aAction, SIGNAL(triggered(bool)), this, SLOT(onRebuild()));
+ //salomeConnector()->addDesktopMenuSeparator("MEN_DESK_EDIT");
+
+ aAction = salomeConnector()->addDesktopCommand("SAVEAS_CMD", tr("Export native..."), tr("Export the current document into a native file"),
+ QIcon(), QKeySequence(),
+ false, "MEN_DESK_FILE");
+ connect(aAction, SIGNAL(triggered(bool)), this, SLOT(onSaveAs()));
+
+ aAction = salomeConnector()->addDesktopCommand("OPEN_CMD", tr("Import native..."), tr("Import native file"),
+ QIcon(), QKeySequence(),
+ false, "MEN_DESK_FILE");
+ connect(aAction, SIGNAL(triggered(bool)), this, SLOT(onOpen()));
+ salomeConnector()->addDesktopMenuSeparator("MEN_DESK_FILE");