X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPyConsole%2FPyConsole_Console.cxx;fp=src%2FPyConsole%2FPyConsole_Console.cxx;h=f386ebfdb6ee77588d7a0af85fcc0f2df911ce49;hb=e49ea868e39afd8b5b3d74708997f2b3c705b0b7;hp=c613866d1e10cadf7cec28eb0739f42e6a8eba8e;hpb=922191c3b660e48d13bcf1b4651068d4f0e34205;p=modules%2Fgui.git diff --git a/src/PyConsole/PyConsole_Console.cxx b/src/PyConsole/PyConsole_Console.cxx index c613866d1..f386ebfdb 100644 --- a/src/PyConsole/PyConsole_Console.cxx +++ b/src/PyConsole/PyConsole_Console.cxx @@ -248,7 +248,10 @@ void PyConsole_Console::contextMenuPopup( QMenu* menu ) menu->addAction( myActions[SelectAllId] ); menu->addSeparator(); menu->addAction( myActions[DumpCommandsId] ); - menu->addAction( myActions[SaveLogId] ); + if ( !myEditor->isLogging() ) + menu->addAction( myActions[StartLogId] ); + else + menu->addAction( myActions[StopLogId] ); Qtx::simplifySeparators( menu ); @@ -270,7 +273,8 @@ void PyConsole_Console::setMenuActions( const int flags ) myActions[ClearId]->setVisible( flags & ClearId ); myActions[SelectAllId]->setVisible( flags & SelectAllId ); myActions[DumpCommandsId]->setVisible( flags & DumpCommandsId ); - myActions[SaveLogId]->setVisible( flags & SaveLogId ); + myActions[StartLogId]->setVisible( flags & StartLogId ); + myActions[StopLogId]->setVisible( flags & StopLogId ); } /*! @@ -286,7 +290,8 @@ int PyConsole_Console::menuActions() const ret = ret | ( myActions[ClearId]->isVisible() ? ClearId : 0 ); ret = ret | ( myActions[SelectAllId]->isVisible() ? SelectAllId : 0 ); ret = ret | ( myActions[DumpCommandsId]->isVisible() ? DumpCommandsId : 0 ); - ret = ret | ( myActions[SaveLogId]->isVisible() ? SaveLogId : 0 ); + ret = ret | ( myActions[StartLogId]->isVisible() ? StartLogId : 0 ); + ret = ret | ( myActions[StopLogId]->isVisible() ? StopLogId : 0 ); return ret; } @@ -322,10 +327,15 @@ void PyConsole_Console::createActions() connect( a, SIGNAL( triggered( bool ) ), myEditor, SLOT( dump() ) ); myActions.insert( DumpCommandsId, a ); - a = new QAction( tr( "EDIT_SAVELOG_CMD" ), this ); - a->setStatusTip( tr( "EDIT_SAVELOG_CMD" ) ); - connect( a, SIGNAL( triggered( bool ) ), myEditor, SLOT( saveLog() ) ); - myActions.insert( SaveLogId, a ); + a = new QAction( tr( "EDIT_STARTLOG_CMD" ), this ); + a->setStatusTip( tr( "EDIT_STARTLOG_CMD" ) ); + connect( a, SIGNAL( triggered( bool ) ), myEditor, SLOT( startLog() ) ); + myActions.insert( StartLogId, a ); + + a = new QAction( tr( "EDIT_STOPLOG_CMD" ), this ); + a->setStatusTip( tr( "EDIT_STOPLOG_CMD" ) ); + connect( a, SIGNAL( triggered( bool ) ), myEditor, SLOT( stopLog() ) ); + myActions.insert( StopLogId, a ); } /*!