From 17453dea5b85e96a0b6aa6f32e152aeefcd7a5f4 Mon Sep 17 00:00:00 2001 From: donho Date: Mon, 29 Dec 2008 13:19:48 +0000 Subject: [PATCH] [BUG_FIXED] Fix "Go to/Open in another instance" bug. git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository@378 f5eea248-9336-0410-98b8-ebc06183d4e3 --- PowerEditor/src/Notepad_plus.cpp | 6 ++++-- PowerEditor/src/Notepad_plus.rc | 4 ++-- PowerEditor/src/Parameters.cpp | 2 +- PowerEditor/src/WinControls/Preference/preference.rc | 2 +- PowerEditor/src/WinControls/Preference/preference_rc.h | 1 + 5 files changed, 9 insertions(+), 6 deletions(-) diff --git a/PowerEditor/src/Notepad_plus.cpp b/PowerEditor/src/Notepad_plus.cpp index e35c41e13..b7b875e59 100644 --- a/PowerEditor/src/Notepad_plus.cpp +++ b/PowerEditor/src/Notepad_plus.cpp @@ -4919,10 +4919,12 @@ void Notepad_plus::docOpenInNewInstance(FileTransferMode mode) TCHAR nppName[MAX_PATH]; ::GetModuleFileName(NULL, nppName, MAX_PATH); - std::generic_string command; + std::generic_string command = TEXT("\""); command += nppName; + command += TEXT("\""); + command += TEXT(" \"$(FULL_CURRENT_PATH)\" -multiInst -nosession"); - //Command cmd(TEXT("$(NPP_DIRECTORY)\\notepad++.exe $(FULL_CURRENT_PATH) -multiInst -nosession")); + Command cmd(command); cmd.run(_hSelf); if (mode == TransferMove) diff --git a/PowerEditor/src/Notepad_plus.rc b/PowerEditor/src/Notepad_plus.rc index d4e74d5f0..e29b1a62a 100644 --- a/PowerEditor/src/Notepad_plus.rc +++ b/PowerEditor/src/Notepad_plus.rc @@ -271,7 +271,7 @@ BEGIN BEGIN MENUITEM "Toggle Full Screen Mode", IDM_VIEW_FULLSCREENTOGGLE MENUITEM "Always on top", IDM_VIEW_ALWAYSONTOP - MENUITEM "PostIt", IDM_VIEW_POSTIT + MENUITEM "Post-it", IDM_VIEW_POSTIT MENUITEM SEPARATOR MENUITEM "Show White Space and TAB", IDM_VIEW_TAB_SPACE @@ -320,7 +320,7 @@ BEGIN MENUITEM "Clone to another view", IDM_VIEW_CLONE_TO_ANOTHER_VIEW MENUITEM "Focus on other view", IDM_VIEW_SWITCHTO_OTHER_VIEW // working, but no need in menu MENUITEM "Go to new instance", IDM_VIEW_GOTO_NEW_INSTANCE - MENUITEM "Open to new instance", IDM_VIEW_LOAD_IN_NEW_INSTANCE + MENUITEM "Open in new instance", IDM_VIEW_LOAD_IN_NEW_INSTANCE MENUITEM SEPARATOR MENUITEM "Synchronize Vertical Scrolling", IDM_VIEW_SYNSCROLLV MENUITEM "Synchronize Horizontal Scrolling", IDM_VIEW_SYNSCROLLH diff --git a/PowerEditor/src/Parameters.cpp b/PowerEditor/src/Parameters.cpp index fa49438f0..9026f66bf 100644 --- a/PowerEditor/src/Parameters.cpp +++ b/PowerEditor/src/Parameters.cpp @@ -680,7 +680,7 @@ bool NppParameters::load() TCHAR nativeLangPath[MAX_PATH]; lstrcpy(nativeLangPath, userPath); PathAppend(nativeLangPath, TEXT("nativeLang.xml")); - + if (!PathFileExists(nativeLangPath)) { lstrcpy(nativeLangPath, _nppPath); diff --git a/PowerEditor/src/WinControls/Preference/preference.rc b/PowerEditor/src/WinControls/Preference/preference.rc index e8a726052..44532af63 100644 --- a/PowerEditor/src/WinControls/Preference/preference.rc +++ b/PowerEditor/src/WinControls/Preference/preference.rc @@ -142,7 +142,7 @@ BEGIN CONTROL "UCS-2 small endian",IDC_RADIO_UCS2SMALL,"Button",BS_AUTORADIOBUTTON,64,78,102,10 RTEXT "Default Language :",IDC_DEFAULTLANG_STATIC,203,81,77,8 COMBOBOX IDC_COMBO_DEFAULTLANG,285,79,60,140,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - GROUPBOX "New Document",IDC_STATIC,47,2,304,104,BS_CENTER + GROUPBOX "New Document",IDC_NEWDOCUMENT_GR_STATIC,47,2,304,104,BS_CENTER GROUPBOX "File Open/Save Directory",IDC_OPENSAVEDIR_GR_STATIC,47,114,304,61,BS_CENTER CONTROL "Follow the current document",IDC_OPENSAVEDIR_FOLLOWCURRENT_RADIO,"Button",BS_AUTORADIOBUTTON | WS_GROUP,64,126,200,10 CONTROL "Remember the last operation directory",IDC_OPENSAVEDIR_REMEMBERLAST_RADIO,"Button",BS_AUTORADIOBUTTON,64,141,217,10 diff --git a/PowerEditor/src/WinControls/Preference/preference_rc.h b/PowerEditor/src/WinControls/Preference/preference_rc.h index 8ca99a0e2..7e5c6849a 100644 --- a/PowerEditor/src/WinControls/Preference/preference_rc.h +++ b/PowerEditor/src/WinControls/Preference/preference_rc.h @@ -126,6 +126,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. #define IDC_OPENSAVEDIR_ALWAYSON_RADIO (IDD_PREFERENCE_NEWDOCSETTING_BOX + 16) #define IDC_OPENSAVEDIR_ALWAYSON_EDIT (IDD_PREFERENCE_NEWDOCSETTING_BOX + 17) #define IDD_OPENSAVEDIR_ALWAYSON_BROWSE_BUTTON (IDD_PREFERENCE_NEWDOCSETTING_BOX + 18) + #define IDC_NEWDOCUMENT_GR_STATIC (IDD_PREFERENCE_NEWDOCSETTING_BOX + 19) #define IDD_PREFERENCE_LANG_BOX 6500 //(IDD_PREFERENCE_BOX + 500) #define IDC_LIST_ENABLEDLANG (IDD_PREFERENCE_LANG_BOX + 1)