]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Add new and correct old menu items.
authorakl <alexander.kovalev@opencascade.com>
Mon, 22 Sep 2014 13:24:39 +0000 (17:24 +0400)
committerakl <alexander.kovalev@opencascade.com>
Mon, 22 Sep 2014 13:24:39 +0000 (17:24 +0400)
src/STD/STD_Application.cxx
src/STD/STD_Application.h
src/STD/resources/STD_msg_en.ts
src/STD/resources/STD_msg_fr.ts
src/STD/resources/STD_msg_ja.ts
src/SalomeApp/SalomeApp_Application.cxx
src/SalomeApp/SalomeApp_Application.h
src/SalomeApp/resources/SalomeApp_msg_en.ts
src/SalomeApp/resources/SalomeApp_msg_fr.ts
src/SalomeApp/resources/SalomeApp_msg_ja.ts

index 994edd195e08b961566b3b1b5f0ab3c31628b29e..86b408315524654030b6e45a992320fb18af53eb 100755 (executable)
@@ -229,10 +229,9 @@ void STD_Application::createActions()
   createMenu( FileNewId,    fileMenu, 0 );
   createMenu( FileOpenId,   fileMenu, 0 );
   createMenu( FileReopenId, fileMenu, 0 ); 
-  createMenu( FileCloseId,  fileMenu, 5 );
-  createMenu( separator(),  fileMenu, -1, 5 );
   createMenu( FileSaveId,   fileMenu, 5 );
   createMenu( FileSaveAsId, fileMenu, 5 );
+  createMenu( FileCloseId,  fileMenu, 5 );
   createMenu( separator(),  fileMenu, -1, 5 );
 
   createMenu( separator(),  fileMenu );
@@ -403,12 +402,18 @@ bool STD_Application::closeDoc( bool ask )
   if ( ask && !isPossibleToClose( closePermanently ) )
     return false;
 
+  closeActiveDoc( closePermanently );
+}
+
+/*!Close document.*/
+bool STD_Application::closeActiveDoc( bool permanently )
+{
   SUIT_Study* study = activeStudy();
 
   beforeCloseDoc( study );
 
   if ( study )
-    study->closeDocument( closePermanently );
+    study->closeDocument( permanently );
 
   clearViewManagers();
 
index 8e5703b01f9e6b6b8ab6d6ed29fd0ec8385d5597..8073407c369927d1438d3404fc90d056145c5472 100755 (executable)
@@ -168,6 +168,7 @@ protected:
   virtual int           closeChoice( const QString& );
   virtual bool          closeAction( const int, bool& );
   virtual bool          closeDoc( bool ask = true );
+  virtual bool          closeActiveDoc( bool permanently = true );
 
 private:
   ViewManagerList       myViewMgrs;
index dd91f9b929e6c16ce8d789719d6e5aa4a43edef1..6782289064ca43d0f70ee0250686300e6a3a81ec 100644 (file)
@@ -363,8 +363,12 @@ Do you want to overwrite it?</translation>
         <translation>Exit from application</translation>
     </message>
     <message>
-        <source>TOT_DESK_FILE_LOAD</source>
-        <translation>Load document</translation>
+        <source>TOT_DESK_CONNECT_STUDY</source>
+        <translation>Connect study</translation>
+    </message>
+    <message>
+        <source>TOT_DESK_DISCONNECT_STUDY</source>
+        <translation>Disconnect study</translation>
     </message>
     <message>
         <source>TOT_DESK_FILE_OPEN</source>
@@ -391,8 +395,12 @@ Do you want to overwrite it?</translation>
         <translation>Saves the active document</translation>
     </message>
     <message>
-        <source>PRP_DESK_FILE_LOAD</source>
-        <translation>Loads a document</translation>
+        <source>PRP_DESK_CONNECT</source>
+        <translation>Connect active study</translation>
+    </message>
+    <message>
+        <source>PRP_DESK_DISCONNECT</source>
+        <translation>Disconnect the current study</translation>
     </message>
     <message>
         <source>PRP_DESK_WINDOW_HTILE</source>
@@ -419,8 +427,12 @@ Do you want to overwrite it?</translation>
         <translation>Reopen</translation>
     </message>
     <message>
-        <source>MEN_DESK_FILE_LOAD</source>
-        <translation>Conn&amp;ect...</translation>
+        <source>MEN_DESK_CONNECT</source>
+        <translation>Conn&amp;ect</translation>
+    </message>
+    <message>
+        <source>MEN_DESK_DISCONNECT</source>
+        <translation>D&amp;isconnect</translation>
     </message>
     <message>
         <source>MEN_DESK_FILE_SAVE</source>
index 87c71765e33b467f4c8cd3c0c72b255ebb6e5b7d..e225ff9a3489e80ec132a4f41d70828808622d8f 100755 (executable)
@@ -363,8 +363,12 @@ Voulez-vous l&apos;écraser ?</translation>
         <translation>Quitter l&apos;application</translation>
     </message>
     <message>
-        <source>TOT_DESK_FILE_LOAD</source>
-        <translation>Charger le document</translation>
+        <source>TOT_DESK_CONNECT_STUDY</source>
+        <translation type="unfinished">Connect study</translation>
+    </message>
+    <message>
+        <source>TOT_DESK_DISCONNECT_STUDY</source>
+        <translation type="unfinished">Disconnect study</translation>
     </message>
     <message>
         <source>TOT_DESK_FILE_OPEN</source>
@@ -391,8 +395,12 @@ Voulez-vous l&apos;écraser ?</translation>
         <translation>Sauvegarder le document actuel</translation>
     </message>
     <message>
-        <source>PRP_DESK_FILE_LOAD</source>
-        <translation>Charge un document</translation>
+        <source>PRP_DESK_CONNECT</source>
+        <translation type="unfinished">Connect active study</translation>
+    </message>
+    <message>
+        <source>PRP_DESK_DISCONNECT</source>
+        <translation type="unfinished">Disconnect the current study</translation>
     </message>
     <message>
         <source>PRP_DESK_WINDOW_HTILE</source>
@@ -419,8 +427,12 @@ Voulez-vous l&apos;écraser ?</translation>
         <translation>&amp;Réouvrir</translation>
     </message>
     <message>
-        <source>MEN_DESK_FILE_LOAD</source>
-        <translation>Connec&amp;ter...</translation>
+        <source>MEN_DESK_CONNECT</source>
+        <translation type="unfinished">Conn&amp;ect</translation>
+    </message>
+    <message>
+        <source>MEN_DESK_DISCONNECT</source>
+        <translation type="unfinished">D&amp;isconnect</translation>
     </message>
     <message>
         <source>MEN_DESK_FILE_SAVE</source>
index 6f7dbd730d3c0d43f69de527400bbd9b05c02714..2e06d72c89f05560b485c1fe911a904dd93eeb58 100644 (file)
     <name>@default</name>
     <message>
       <source>TOT_DESK_EDIT_CUT</source>
-      <translation>カット</translation>
+      <translation>?????????</translation>
     </message>
     <message>
       <source>PRP_DESK_EDIT_CUT</source>
-      <translation>選択範囲を切り取って、クリップボードにコピー</translation>
+      <translation>??????????????????????????????????????????????????????????????????</translation>
     </message>
     <message>
       <source>MEN_DESK_EDIT_CUT</source>
-      <translation>カット(&amp;t)</translation>
+      <translation>?????????(&amp;t)</translation>
     </message>
     <message>
       <source>ERR_APP_NOAPP</source>
-      <translation>アプリケーションがありません</translation>
+      <translation>??????????????????????????????????????????</translation>
     </message>
     <message>
       <source>MEN_DESK_WINDOW</source>
-      <translation>ウィンドウ(&amp;W)</translation>
+      <translation>???????????????(&amp;W)</translation>
     </message>
     <message>
       <source>TOT_DESK_EDIT_COPY</source>
-      <translation>コピー</translation>
+      <translation>?????????</translation>
     </message>
     <message>
       <source>MEN_DESK_WINDOW_CASCADE</source>
-      <translation>カスケード(&amp;C)</translation>
+      <translation>???????????????(&amp;C)</translation>
     </message>
     <message>
       <source>PRP_DESK_EDIT_COPY</source>
-      <translation>選択範囲をクリップボードにコピー</translation>
+      <translation>????????????????????????????????????????????????</translation>
     </message>
     <message>
       <source>PRP_DESK_WINDOW_CASCADE</source>
-      <translation>ウィンドウを重ねて整理</translation>
+      <translation>?????????????????????????????????</translation>
     </message>
     <message>
       <source>TOT_DESK_FILE_SAVEAS</source>
-      <translation>ドキュメントを別名で保存...</translation>
+      <translation>????????????????????????????????????...</translation>
     </message>
     <message>
       <source>MEN_DESK_EDIT_COPY</source>
-      <translation>コピー(&amp;C)</translation>
+      <translation>?????????(&amp;C)</translation>
     </message>
     <message>
       <source>MSG_CANT_SAVE</source>
-      <translation>ファイル"%1"を保存できませんでした</translation>
+      <translation>????????????"%1"?????????????????????????????????</translation>
     </message>
     <message>
       <source>INF_DESK_TOOLBAR_STANDARD</source>
-      <translation>標準</translation>
+      <translation>??????</translation>
     </message>
     <message>
       <source>ALL_FILES</source>
-      <translation>すべてのファイル (*. *)</translation>
+      <translation>???????????????????????? (*. *)</translation>
     </message>
     <message>
       <source>DESK_DEFAULTTITLE</source>
-      <translation>Qtアプリケーション デスクトップ</translation>
+      <translation>Qt???????????????????????? ??????????????????</translation>
     </message>
     <message>
       <source>QUE_DESK_EXIT</source>
-      <translation>本当に終了しますか?</translation>
+      <translation>??????????????????????????????</translation>
     </message>
     <message>
       <source>INF_INFO</source>
-      <translation>情報</translation>
+      <translation>??????</translation>
     </message>
     <message>
       <source>ERR_DOC_UNKNOWNTYPE_OPEN</source>
-      <translation>不明な種類 (%1) のドキュメントを開こうとしています。</translation>
+      <translation>??????????????? (%1) ??????????????????????????????????????????????????????</translation>
     </message>
     <message>
       <source>ERR_DOC_UNKNOWNTYPE_SAVE</source>
-      <translation>不明な種類 (%1) のドキュメントを保存しようしています。</translation>
+      <translation>??????????????? (%1) ?????????????????????????????????????????????????????????</translation>
     </message>
     <message>
       <source>TOT_DESK_NEWWINDOW</source>
-      <translation>新しいウィンドウを作成</translation>
+      <translation>?????????????????????????????????</translation>
     </message>
     <message>
       <source>BUT_CANCEL</source>
-      <translation>キャンセル(&amp;C)</translation>
+      <translation>???????????????(&amp;C)</translation>
     </message>
     <message>
       <source>MEN_DESK_HELP_ABOUT</source>
-      <translation>バージョン情報...(&amp;A)</translation>
+      <translation>?????????????????????...(&amp;A)</translation>
     </message>
     <message>
       <source>PRP_DESK_NEWWINDOW</source>
-      <translation>新しいウィンドウを作成</translation>
+      <translation>?????????????????????????????????</translation>
     </message>
     <message>
       <source>MEN_DESK_VIEW_STATUSBAR</source>
-      <translation>ステータス バー(&amp;S)</translation>
+      <translation>??????????????? ??????(&amp;S)</translation>
     </message>
     <message>
       <source>MEN_DESK_NEWWINDOW</source>
-      <translation>新しいウィンドウ(&amp;N)</translation>
+      <translation>????????????????????????(&amp;N)</translation>
     </message>
     <message>
       <source>PRP_DESK_VIEW_STATUSBAR</source>
-      <translation>ステータスバーの有効/無効</translation>
+      <translation>??????????????????????????????/??????</translation>
     </message>
     <message>
       <source>ERR_DOC_DIRWITHNAMEEXIST_SAVE</source>
-      <translation>ファイル %1 を保存できません。\nこの名前のディレクトリが既にディスクに存在します。別の名前を使用してください。</translation>
+      <translation>???????????? %1 ???????????????????????????\n?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????</translation>
     </message>
     <message>
       <source>BUT_NO</source>
-      <translation>いいえ(&amp;N)</translation>
+      <translation>?????????(&amp;N)</translation>
     </message>
     <message>
       <source>BUT_OK</source>
     </message>
     <message>
       <source>FILTER_FILES</source>
-      <translation>%1 ファイル (%2)</translation>
+      <translation>%1 ???????????? (%2)</translation>
     </message>
     <message>
       <source>PRP_DESK_WINDOW_ACTIVATE</source>
-      <translation>このウィンドウをアクティブ化</translation>
+      <translation>??????????????????????????????????????????</translation>
     </message>
     <message>
       <source>TOT_DESK_FILE_PRINT</source>
-      <translation>ドキュメントを印刷</translation>
+      <translation>???????????????????????????</translation>
     </message>
     <message>
       <source>TOT_DESK_FILE_CLOSE</source>
-      <translation>ドキュメントを閉じる</translation>
+      <translation>??????????????????????????????</translation>
     </message>
     <message>
       <source>TOT_DESK_FILE_NEW</source>
-      <translation>新しいドキュメント</translation>
+      <translation>???????????????????????????</translation>
     </message>
     <message>
       <source>PRP_DESK_FILE_NEW</source>
-      <translation>新しいドキュメントを作成</translation>
+      <translation>????????????????????????????????????</translation>
     </message>
     <message>
       <source>PRP_DESK_FILE_MRU</source>
-      <translation>ドキュメントを開く</translation>
+      <translation>???????????????????????????</translation>
     </message>
     <message>
       <source>MEN_DESK_FILE_NEW</source>
-      <translation>新規作成(&amp;N)</translation>
+      <translation>????????????(&amp;N)</translation>
     </message>
     <message>
       <source>MEN_DESK_FILE_MRU</source>
-      <translation>最近使用したファイル(&amp;F)</translation>
+      <translation>??????????????????????????????(&amp;F)</translation>
     </message>
     <message>
       <source>TOT_DESK_EDIT_PASTE</source>
-      <translation>貼り付け</translation>
+      <translation>????????????</translation>
     </message>
     <message>
       <source>MEN_DESK_VIEW_DOCKWINDOWS</source>
     </message>
     <message>
       <source>BUT_YES</source>
-      <translation>はい(&amp;Y)</translation>
+      <translation>??????(&amp;Y)</translation>
     </message>
     <message>
       <source>MEN_DESK_VIEW</source>
-      <translation>表示(&amp;V)</translation>
+      <translation>??????(&amp;V)</translation>
     </message>
     <message>
       <source>PRP_DESK_HELP_ABOUT</source>
-      <translation>ソフト情報の表示</translation>
+      <translation>????????????????????????</translation>
     </message>
     <message>
       <source>MEN_DESK_FILE</source>
-      <translation>ファイル(&amp;F)</translation>
+      <translation>????????????(&amp;F)</translation>
     </message>
     <message>
       <source>MEN_DESK_EDIT</source>
-      <translation>編集(&amp;E)</translation>
+      <translation>??????(&amp;E)</translation>
     </message>
     <message>
       <source>MEN_DESK_HELP</source>
-      <translation>ヘルプ(&amp;H)</translation>
+      <translation>?????????(&amp;H)</translation>
     </message>
     <message>
       <source>ERR_ERROR</source>
-      <translation>エラー</translation>
+      <translation>?????????</translation>
     </message>
     <message>
       <source>ERR_DESK_NOAPP</source>
-      <translation>登録されたアプリケーションがありません</translation>
+      <translation>?????????????????????????????????????????????????????????</translation>
     </message>
     <message>
       <source>INF_DESK_DOC_CREATE</source>
-      <translation>新しいドキュメントを作成</translation>
+      <translation>????????????????????????????????????</translation>
     </message>
     <message>
       <source>QUE_DOC_ALREADYOPEN</source>
-      <translation>ドキュメント %1 は既に開いています。\n再読込みしますか?</translation>
+      <translation>?????????????????? %1 ??????????????????????????????\n???????????????????????????</translation>
     </message>
     <message>
       <source>BUT_APPLY</source>
-      <translation>適用(&amp;A)</translation>
+      <translation>??????(&amp;A)</translation>
     </message>
     <message>
       <source>BUT_CLOSE</source>
-      <translation>閉じる(&amp;C)</translation>
+      <translation>?????????(&amp;C)</translation>
     </message>
     <message>
       <source>BUT_APPLY_AND_CLOSE</source>
-      <translation>適用して閉じる(&amp;p)</translation>
+      <translation>????????????????????????&amp;p???</translation>
     </message>
     <message>
       <source>INF_DESK_EXIT</source>
-      <translation>終了</translation>
+      <translation>??????</translation>
     </message>
     <message>
       <source>ERR_UNKNOWN</source>
-      <translation>不明なエラー</translation>
+      <translation>??????????????????</translation>
     </message>
     <message>
       <source>BUT_HELP</source>
-      <translation>ヘルプ(&amp;H)</translation>
+      <translation>?????????(&amp;H)</translation>
     </message>
     <message>
       <source>PRP_DESK_FILE_CLOSE</source>
-      <translation>現在のドキュメントを閉じる</translation>
+      <translation>???????????????????????????????????????</translation>
     </message>
     <message>
       <source>PRP_DESK_FILE_PRINT</source>
-      <translation>現在のドキュメントを印刷</translation>
+      <translation>????????????????????????????????????</translation>
     </message>
     <message>
       <source>WRN_WARNING</source>
-      <translation>警告</translation>
+      <translation>??????</translation>
     </message>
     <message>
       <source>TOT_DESK_HELP_ABOUT</source>
     </message>
     <message>
       <source>MEN_DESK_VIEW_TOOLBARS</source>
-      <translation>ツールバー(&amp;o)</translation>
+      <translation>???????????????(&amp;o)</translation>
     </message>
     <message>
       <source>PRP_DESK_WINDOW_HSPLIT</source>
-      <translation>現在のウィンドウを 2つに水平分割</translation>
+      <translation>??????????????????????????? 2??????????????????</translation>
     </message>
     <message>
       <source>MEN_DESK_WINDOW_HSPLIT</source>
-      <translation>水平分割(&amp;H)</translation>
+      <translation>????????????(&amp;H)</translation>
     </message>
     <message>
       <source>PRP_DESK_EDIT_PASTE</source>
-      <translation>クリップボードの内容を挿入</translation>
+      <translation>???????????????????????????????????????</translation>
     </message>
     <message>
       <source>DLG_LOAD_STUDY_CAPTION</source>
-      <translation>スタディを読み込む</translation>
+      <translation>???????????????????????????</translation>
     </message>
     <message>
       <source>PRP_DESK_HELP_SEARCH</source>
-      <translation>ヘルプのトピック検索</translation>
+      <translation>??????????????????????????????</translation>
     </message>
     <message>
       <source>PRP_DESK_FILE_SAVEAS</source>
-      <translation>現在のドキュメントを新しい名前で保存</translation>
+      <translation>??????????????????????????????????????????????????????</translation>
     </message>
     <message>
       <source>INF_READY</source>
-      <translation>準備完了</translation>
+      <translation>????????????</translation>
     </message>
     <message>
       <source>INF_CANCELLED</source>
-      <translation>キャンセル</translation>
+      <translation>???????????????</translation>
     </message>
     <message>
       <source>PRP_DESK_WINDOW_VSPLIT</source>
-      <translation>現在のウィンドウを2つに上下分割</translation>
+      <translation>????????????????????????????????????????????????</translation>
     </message>
     <message>
       <source>MEN_DESK_WINDOW_VSPLIT</source>
-      <translation>垂直分割(&amp;V)</translation>
+      <translation>????????????(&amp;V)</translation>
     </message>
     <message>
       <source>PRP_DESK_WINDOW_TILE</source>
-      <translation>ウィンドウを並べて表示</translation>
+      <translation>?????????????????????????????????</translation>
     </message>
     <message>
       <source>MEN_DESK_HELP_CONTENTS</source>
-      <translation>コンテンツ(&amp;C)</translation>
+      <translation>???????????????(&amp;C)</translation>
     </message>
     <message>
       <source>PRP_DESK_HELP_CONTENTS</source>
-      <translation>ヘルプコンテンツの全表示</translation>
+      <translation>????????????????????????????????????</translation>
     </message>
     <message>
       <source>MEN_DESK_WINDOW_HTILE</source>
-      <translation>水平方向に並べて表示(&amp;H)</translation>
+      <translation>??????????????????????????????(&amp;H)</translation>
     </message>
     <message>
       <source>MEN_DESK_WINDOW_VTILE</source>
-      <translation>垂直方向に並べて表示(&amp;V)</translation>
+      <translation>??????????????????????????????(&amp;V)</translation>
     </message>
     <message>
       <source>ERR_DOC_PERMISSIONDENIED_SAVE</source>
-      <translation>ファイル %1 を保存できません。権限がありません。</translation>
+      <translation>???????????? %1 ??????????????????????????????????????????????????????</translation>
     </message>
     <message>
       <source>INF_DESK_DOCALREADYOPEN</source>
-      <translation>既に開いているドキュメントと同じ名前で保存できません。\n保存するには別の名前を指定してください。\n( %1 )</translation>
+      <translation>?????????????????????????????????????????????????????????????????????????????????\n????????????????????????????????????????????????????????????\n( %1 )</translation>
     </message>
     <message>
       <source>TIT_FILE_SAVEAS</source>
-      <translation>別名保存</translation>
+      <translation>????????????</translation>
     </message>
     <message>
       <source>MEN_DESK_FILE_CLOSE</source>
-      <translation>閉じる(&amp;C)</translation>
+      <translation>?????????(&amp;C)</translation>
     </message>
     <message>
       <source>MSG_FILE_EXISTS</source>
-      <translation>ファイル"%1"は既に存在します。\n上書きしますか?</translation>
+      <translation>????????????"%1"???????????????????????????\n????????????????????????</translation>
     </message>
     <message>
       <source>MEN_DESK_FILE_PRINT</source>
-      <translation>印刷(&amp;P)</translation>
+      <translation>??????(&amp;P)</translation>
     </message>
     <message>
       <source>MEN_DESK_HELP_SEARCH</source>
-      <translation>検索...(&amp;S)</translation>
+      <translation>??????...(&amp;S)</translation>
     </message>
     <message>
       <source>MEN_DESK_VIEW_STDTOOLBAR</source>
-      <translation>標準(&amp;S)</translation>
+      <translation>??????(&amp;S)</translation>
     </message>
     <message>
       <source>MEN_DESK_FILE_SAVEAS</source>
-      <translation>別名保存...(&amp;A)</translation>
+      <translation>????????????...(&amp;A)</translation>
     </message>
     <message>
       <source>PRP_DESK_VIEW_STDTOOLBAR</source>
-      <translation>標準ツールバーの有効/無効</translation>
+      <translation>??????????????????????????????/??????</translation>
     </message>
     <message>
       <source>TOT_DESK_FILE_SAVE</source>
-      <translation>ドキュメントを保存</translation>
+      <translation>???????????????????????????</translation>
     </message>
     <message>
       <source>TOT_DESK_FILE_EXIT</source>
-      <translation>アプリケーションを終了</translation>
+      <translation>?????????????????????????????????</translation>
     </message>
     <message>
-      <source>TOT_DESK_FILE_LOAD</source>
-      <translation>ドキュメントを読み込む</translation>
+      <source>TOT_DESK_CONNECT_STUDY</source>
+      <translation type="unfinished">Connect study</translation>
+    </message>
+    <message>
+      <source>TOT_DESK_DISCONNECT_STUDY</source>
+      <translation type="unfinished">Disconnect study</translation>
     </message>
     <message>
       <source>TOT_DESK_FILE_OPEN</source>
-      <translation>文書を開く</translation>
+      <translation>???????????????</translation>
     </message>
     <message>
       <source>TOT_DESK_FILE_REOPEN</source>
-      <translation>ドキュメントの再読み込み</translation>
+      <translation>????????????????????????????????????</translation>
     </message>
     <message>
       <source>PRP_DESK_FILE_EXIT</source>
-      <translation>アプリケーションを終了</translation>
+      <translation>?????????????????????????????????</translation>
     </message>
     <message>
       <source>PRP_DESK_FILE_OPEN</source>
-      <translation>既存のドキュメントを開く</translation>
+      <translation>????????????????????????????????????</translation>
     </message>
     <message>
       <source>PRP_DESK_FILE_REOPEN</source>
-      <translation>現在のドキュメントを再読込み</translation>
+      <translation>??????????????????????????????????????????</translation>
     </message>
     <message>
       <source>PRP_DESK_FILE_SAVE</source>
-      <translation>現在のドキュメントを保存</translation>
+      <translation>????????????????????????????????????</translation>
+    </message>
+    <message>
+      <source>PRP_DESK_CONNECT</source>
+      <translation type="unfinished">Connect active study</translation>
     </message>
     <message>
-      <source>PRP_DESK_FILE_LOAD</source>
-      <translation>ドキュメントを読み込み</translation>
+      <source>PRP_DESK_DISCONNECT</source>
+      <translation type="unfinished">Disconnect the current study</translation>
     </message>
     <message>
       <source>PRP_DESK_WINDOW_HTILE</source>
-      <translation>ウィンドウを左右に並べて表示</translation>
+      <translation>??????????????????????????????????????????</translation>
     </message>
     <message>
       <source>PRP_DESK_WINDOW_VTILE</source>
-      <translation>ウィンドウを上下に並べて表示</translation>
+      <translation>??????????????????????????????????????????</translation>
     </message>
     <message>
       <source>MEN_DESK_WINDOW_TILE</source>
-      <translation>モザイク(&amp;T)</translation>
+      <translation>????????????(&amp;T)</translation>
     </message>
     <message>
       <source>MEN_DESK_FILE_EXIT</source>
-      <translation>終了(&amp;x)</translation>
+      <translation>??????(&amp;x)</translation>
     </message>
     <message>
       <source>MEN_DESK_FILE_OPEN</source>
-      <translation>開く...(&amp;O)</translation>
+      <translation>??????...(&amp;O)</translation>
     </message>
     <message>
       <source>MEN_DESK_FILE_REOPEN</source>
-      <translation>再読み込み</translation>
+      <translation>???????????????</translation>
+    </message>
+    <message>
+      <source>MEN_DESK_CONNECT</source>
+      <translation type="unfinished">Conn&amp;ect</translation>
     </message>
     <message>
-      <source>MEN_DESK_FILE_LOAD</source>
-      <translation>接続...(&amp;e)</translation>
+      <source>MEN_DESK_DISCONNECT</source>
+      <translation type="unfinished">D&amp;isconnect</translation>
     </message>
     <message>
       <source>MEN_DESK_FILE_SAVE</source>
-      <translation>保存(&amp;S)</translation>
+      <translation>??????(&amp;S)</translation>
     </message>
     <message>
       <source>MEN_DESK_EDIT_PASTE</source>
-      <translation>貼り付け(&amp;P)</translation>
+      <translation>????????????(&amp;P)</translation>
     </message>
     <message>
       <source>MEN_STUDIES_CHOICE</source>
-      <translation>既存のスタディを選択</translation>
+      <translation>??????????????????????????????</translation>
     </message>
   </context>
   <context>
     <name>STD_Application</name>
     <message>
       <source>INF_DOC_MODIFIED</source>
-      <translation>ドキュメントが変更されています。変更を保存しますか。</translation>
+      <translation>??????????????????????????????????????????????????????????????????????????????</translation>
     </message>
     <message>
       <source>INF_DOC_SAVING</source>
-      <translation>スタディを保存</translation>
+      <translation>?????????????????????</translation>
     </message>
     <message>
       <source>INF_DOC_SAVED</source>
-      <translation>Study %1 を保存</translation>
+      <translation>Study %1 ?????????</translation>
     </message>
     <message>
       <source>TOT_DOCK_WINDOWS</source>
-      <translation>ドッキング可能なウィンドウとツールバーを表示/非表示</translation>
+      <translation>??????????????????????????????????????????????????????????????????/?????????</translation>
     </message>
     <message>
       <source>MEN_DOCK_WINDOWS</source>
-      <translation>ウィンドウとツールバー</translation>
+      <translation>?????????????????????????????????</translation>
     </message>
     <message>
       <source>ABOUT_INFO</source>
-      <translation>SUIT標準アプリケーション</translation>
+      <translation>SUIT??????????????????????????????</translation>
     </message>
     <message>
       <source>INF_DOC_SAVING_FAILS</source>
-      <translation>ファイル"%1"を保存できません.\n理由:\n- 権限がない;\n- ディスクの残りのスペースが不十分;\n- アプリケーション エラー.\n別のファイル名をご使用ください。</translation>
+      <translation>????????????"%1"????????????????????????.\n??????:\n- ???????????????;\n- ????????????????????????????????????????????????;\n- ???????????????????????? ?????????.\n????????????????????????????????????????????????</translation>
     </message>
     <message>
       <source>INF_DOCUMENT_MODIFIED</source>
-      <translation>ドキュメント"%1"が変更されました。変更を保存しますか。</translation>
+      <translation>??????????????????"%1"?????????????????????????????????????????????????????????</translation>
     </message>
     <message>
       <source>CLOSE_STUDY</source>
-      <translation>現在のスタディを閉じる</translation>
+      <translation>?????????????????????????????????</translation>
     </message>
     <message>
       <source>CLOSE_QUESTION</source>
-      <translation>閉じる前にスタディを保存しますか?</translation>
+      <translation>???????????????????????????????????????????????????</translation>
     </message>
     <message>
       <source>REOPEN_STUDY</source>
-      <translation>スタディを再読み込み</translation>
+      <translation>??????????????????????????????</translation>
     </message>
     <message>
       <source>REOPEN_QUESTION</source>
-      <translation>スタディを再開しますか。\n最後に保存してからのすべての変更は失われます。</translation>
+      <translation>????????????????????????????????????\n?????????????????????????????????????????????????????????????????????</translation>
     </message>
   </context>
 </TS>
index 282a26f300a4200a56eeb27a05c371b70d02418a..8b73674bda29e6102fb168ccb4f72603e6803fa9 100644 (file)
@@ -320,12 +320,15 @@ void SalomeApp_Application::createActions()
                 tr( "MEN_DESK_REGISTRY_DISPLAY" ), tr( "PRP_DESK_REGISTRY_DISPLAY" ),
                 /*Qt::SHIFT+Qt::Key_D*/0, desk, false, this, SLOT( onRegDisplay() ) );
 
-  //rnv commented : implementation of the mono-study in GUI
-  //
-  //createAction( FileLoadId, tr( "TOT_DESK_FILE_LOAD" ),
-  //              resourceMgr()->loadPixmap( "STD", tr( "ICON_FILE_OPEN" ) ),
-  //              tr( "MEN_DESK_FILE_LOAD" ), tr( "PRP_DESK_FILE_LOAD" ),
-  //              Qt::CTRL+Qt::Key_L, desk, false, this, SLOT( onLoadDoc() ) );
+  createAction( ConnectId, tr( "TOT_DESK_CONNECT_STUDY" ),
+                resourceMgr()->loadPixmap( "STD", tr( "ICON_FILE_OPEN" ) ),
+                tr( "MEN_DESK_CONNECT" ), tr( "PRP_DESK_CONNECT" ),
+                Qt::CTRL+Qt::Key_L, desk, false, this, SLOT( onLoadDoc() ) );
+
+  createAction( DisconnectId, tr( "TOT_DESK_DISCONNECT_STUDY" ),
+                resourceMgr()->loadPixmap( "STD", tr( "ICON_FILE_CLOSE" ) ),
+                tr( "MEN_DESK_DISCONNECT" ), tr( "PRP_DESK_DISCONNECT" ),
+                Qt::CTRL+Qt::Key_U, desk, false, this, SLOT( onUnloadDoc() ) );
 
 
 #ifdef WITH_SIMANIO
@@ -346,7 +349,9 @@ void SalomeApp_Application::createActions()
   // creation of menu item is moved to VISU
   //  createMenu( SaveGUIStateId, fileMenu, 10, -1 );
 
-  // createMenu( FileLoadId,   fileMenu, 0 );
+  createMenu( ConnectId,    fileMenu, 5 );
+  createMenu( DisconnectId, fileMenu, 5 );
+  createMenu( separator(),  fileMenu, -1, 5 );
 
 #ifdef WITH_SIMANIO
   if (myIsSiman) {
@@ -358,7 +363,6 @@ void SalomeApp_Application::createActions()
   }
 #endif
   createMenu( DumpStudyId, fileMenu, 10, -1 );
-  createMenu( separator(), fileMenu, -1, 10, -1 );
   createMenu( LoadScriptId, fileMenu, 10, -1 );
   createMenu( separator(), fileMenu, -1, 10, -1 );
   createMenu( PropertiesId, fileMenu, 10, -1 );
@@ -477,6 +481,31 @@ void SalomeApp_Application::onLoadDoc()
   }
 }
 
+/*!SLOT. Unload document.*/
+void SalomeApp_Application::onUnloadDoc( bool ask )
+{
+  if ( ask ) {
+    activeStudy()->abortAllOperations();
+    if ( activeStudy()->isModified() ) {
+      QString docName = activeStudy()->studyName().trimmed();
+      int answer = SUIT_MessageBox::question( desktop(), tr( "DISCONNECT_CAPTION" ),
+                                           tr( "DISCONNECT_DESCRIPTION" ),
+                                           tr( "DISCONNECT_SAVE" ), 
+                                           tr( "DISCONNECT_WO_SAVE" ),
+                                           tr( "APPCLOSE_CANCEL" ), 0 );
+      if ( answer == 0 ) { // save before unload
+       if ( activeStudy()->isSaved() )
+         onSaveDoc();
+       else if ( !onSaveAsDoc() )
+         return;
+      }
+      else if ( answer == 2 ) // Cancel
+       return;
+    }
+  }
+  closeActiveDoc( false );
+}
+
 /*!SLOT. Create new study and load script*/
 void SalomeApp_Application::onNewWithScript()
 {
@@ -773,6 +802,16 @@ void SalomeApp_Application::updateCommandsStatus()
   if( a )
     a->setEnabled( activeStudy() );
 
+  // Connect study menu
+  a = action( ConnectId );
+  if( a )
+    a->setEnabled( !activeStudy() );
+
+  // Disconnect study menu
+  a = action( DisconnectId );
+  if( a )
+    a->setEnabled( activeStudy() );
+
   // update state of Copy/Paste menu items
   onSelectionChanged();
 }
@@ -1268,8 +1307,7 @@ QMap<int, QString> SalomeApp_Application::activateModuleActions() const
 {
   QMap<int, QString> opmap = LightApp_Application::activateModuleActions();
 
-  // rnv commented : implementation of the mono-study in GUI
-  // opmap.insert( LoadStudyId,     tr( "ACTIVATE_MODULE_OP_LOAD" ) );
+  opmap.insert( LoadStudyId,     tr( "ACTIVATE_MODULE_OP_LOAD" ) );
 
   opmap.insert( NewAndScriptId,  tr( "ACTIVATE_MODULE_OP_SCRIPT" ) );
   return opmap;
index 5d999d1a9135e8fb063d7929021e4e9880fe34c8..90655a4b37e4f79efe8dce3f5d5d3aff57693250 100644 (file)
@@ -69,8 +69,9 @@ class SALOMEAPP_EXPORT SalomeApp_Application : public LightApp_Application
 public:
   enum { MenuToolsId = 5 };
   enum { DumpStudyId = LightApp_Application::UserID, LoadScriptId, PropertiesId,
-         CatalogGenId, RegDisplayId, SaveGUIStateId, FileLoadId, UserID,
-         SimanCheckInId, SimanLocalCheckInId };
+         CatalogGenId, RegDisplayId, SaveGUIStateId, ConnectId, DisconnectId,
+         SimanCheckInId, SimanLocalCheckInId,
+         UserID };
 
   typedef enum { WT_NoteBook = LightApp_Application::WT_User,
                  WT_User
@@ -124,6 +125,7 @@ public slots:
   virtual void                        onLoadDoc();
   virtual void                        onNewWithScript();
   virtual bool                        onLoadDoc( const QString& );
+  virtual void                        onUnloadDoc( bool ask = true);
   virtual void                        onCloseDoc( bool ask = true);
   virtual void                        onLoadDocMessage(const QString&);
 
index af08eef16692b0bf42dfe1cb6a040092c4d38cc8..ec7ce6a2f496cf7841a00e9f0582febc021afcc3 100644 (file)
@@ -20,9 +20,7 @@ Do you want to load it?
     </message>
     <message>
         <source>STUDYCLOSE_DESCRIPTION</source>
-        <translation>You should close an existing study before.
-Do you want to close it?
-</translation>
+        <translation>You already have an active study in your session. It has to be closed before working with another study.</translation>
     </message>
     <message>
         <source>WRN_STUDY_LOCKED</source>
@@ -406,6 +404,22 @@ Do you want to reload it ?</translation>
         <source>PRP_SIMAN_LOCAL_CHECK_IN</source>
         <translation>Check In for module</translation>
     </message>
+    <message>
+        <source>DISCONNECT_CAPTION</source>
+        <translation>Disconnect active study</translation>
+    </message>
+    <message>
+        <source>DISCONNECT_DESCRIPTION</source>
+        <translation>Do you want to save study before disconnect?</translation>
+    </message>
+    <message>
+        <source>DISCONNECT_SAVE</source>
+        <translation>&amp;Save &amp;&amp; Disconnect</translation>
+    </message>
+    <message>
+        <source>DISCONNECT_WO_SAVE</source>
+        <translation>&amp;Disconnect w/o saving</translation>
+    </message>
 </context>
 <context>
     <name>SalomeApp_StudyPropertiesDlg</name>
index 345a295e0cf2070db2275f1d7affa982b2f1161e..5aee00d36400370d8df57cee84b5c7339ee8578d 100755 (executable)
@@ -12,6 +12,10 @@ Un fichier Python ne doit être composé que de lettres, chiffres et tirets bas
         <source>WRN_FILE_NOT_EXIST</source>
         <translation>Le fichier %1 n&apos;existe pas.</translation>
     </message>
+    <message>
+        <source>STUDYCLOSE_DESCRIPTION</source>
+        <translation type="unfinished">You already have an active study in your session. It has to be closed before working with another study.</translation>
+    </message>
     <message>
         <source>WRN_STUDY_LOCKED</source>
         <translation>L&apos;étude est verrouillée</translation>
@@ -382,6 +386,22 @@ Voulez-vous le recharger ?</translation>
         <source>PRP_SIMAN_LOCAL_CHECK_IN</source>
         <translation>Check In pour la module&quot;</translation>
     </message>
+    <message>
+        <source>DISCONNECT_CAPTION</source>
+        <translation type="unfinished">Disconnect active study</translation>
+    </message>
+    <message>
+        <source>DISCONNECT_DESCRIPTION</source>
+        <translation type="unfinished">Do you want to save study before disconnect?</translation>
+    </message>
+    <message>
+        <source>DISCONNECT_SAVE</source>
+        <translation type="unfinished">&amp;Save &amp;&amp; Disconnect</translation>
+    </message>
+    <message>
+        <source>DISCONNECT_WO_SAVE</source>
+        <translation type="unfinished">&amp;Disconnect w/o saving</translation>
+    </message>
 </context>
 <context>
     <name>SalomeApp_StudyPropertiesDlg</name>
index 4c0b3b96470f22c2803ecc40d65d337dfac6d151..f2084990d5c2cdefd7a11cec4c730e649f9ab122 100644 (file)
@@ -17,8 +17,8 @@
     </message>
     <message>
       <source>STUDYCLOSE_DESCRIPTION</source>
-      <translation>既存のスタディを閉じる必要があります。閉じますか?
-</translation>
+        <translation type="unfinished">You already have an active study in your 
+session. It has to be closed before working with another study.</translation>
     </message>
     <message>
       <source>WRN_STUDY_LOCKED</source>
       <source>PRP_SIMAN_LOCAL_CHECK_IN</source>
       <translation>モジュールにチェックイン</translation>
     </message>
+    <message>
+      <source>DISCONNECT_CAPTION</source>
+      <translation type="unfinished">Disconnect active study</translation>
+    </message>
+    <message>
+      <source>DISCONNECT_DESCRIPTION</source>
+      <translation type="unfinished">Do you want to save study before disconnect?</translation>
+    </message>
+    <message>
+      <source>DISCONNECT_SAVE</source>
+      <translation type="unfinished">&amp;Save &amp;&amp; Disconnect</translation>
+    </message>
+    <message>
+      <source>DISCONNECT_WO_SAVE</source>
+      <translation type="unfinished">&amp;Disconnect w/o saving</translation>
+    </message>
   </context>
   <context>
     <name>SalomeApp_StudyPropertiesDlg</name>