summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-08-13 18:27:35 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-08-13 18:27:35 +0000
commita29237f73b954461088a5cd59f9593b9d874ce34 (patch)
tree50a588f3507961117aad6df829af5a24eb892db3
parent83a018b7db482f5b2b434f21ef27de161d5a6a6d (diff)
fix for the Profile Manager plugin. it returned to the plugin's list
git-svn-id: http://svn.miranda-ng.org/main/trunk@1446 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--plugins/ProfileManager/docs/profilemanager-translation.txt (renamed from plugins/!Deprecated/ProfileManager/docs/profilemanager-translation.txt)0
-rw-r--r--plugins/ProfileManager/pmanagerEx.vcxproj (renamed from plugins/!Deprecated/ProfileManager/pmanagerEx.vcxproj)0
-rw-r--r--plugins/ProfileManager/pmanagerEx.vcxproj.filters (renamed from plugins/!Deprecated/ProfileManager/pmanagerEx.vcxproj.filters)0
-rw-r--r--plugins/ProfileManager/res/ChangePM.ico (renamed from plugins/!Deprecated/ProfileManager/res/ChangePM.ico)bin1150 -> 1150 bytes
-rw-r--r--plugins/ProfileManager/res/LoadPM.ico (renamed from plugins/!Deprecated/ProfileManager/res/LoadPM.ico)bin1150 -> 1150 bytes
-rw-r--r--plugins/ProfileManager/res/resource.rc (renamed from plugins/!Deprecated/ProfileManager/res/resource.rc)0
-rw-r--r--plugins/ProfileManager/src/pmanagerEx.cpp (renamed from plugins/!Deprecated/ProfileManager/src/pmanagerEx.cpp)8
-rw-r--r--plugins/ProfileManager/src/resource.h (renamed from plugins/!Deprecated/ProfileManager/src/resource.h)0
-rw-r--r--src/modules/database/database.cpp14
9 files changed, 14 insertions, 8 deletions
diff --git a/plugins/!Deprecated/ProfileManager/docs/profilemanager-translation.txt b/plugins/ProfileManager/docs/profilemanager-translation.txt
index 52329c17db..52329c17db 100644
--- a/plugins/!Deprecated/ProfileManager/docs/profilemanager-translation.txt
+++ b/plugins/ProfileManager/docs/profilemanager-translation.txt
diff --git a/plugins/!Deprecated/ProfileManager/pmanagerEx.vcxproj b/plugins/ProfileManager/pmanagerEx.vcxproj
index d672501b04..d672501b04 100644
--- a/plugins/!Deprecated/ProfileManager/pmanagerEx.vcxproj
+++ b/plugins/ProfileManager/pmanagerEx.vcxproj
diff --git a/plugins/!Deprecated/ProfileManager/pmanagerEx.vcxproj.filters b/plugins/ProfileManager/pmanagerEx.vcxproj.filters
index 223e2d2d66..223e2d2d66 100644
--- a/plugins/!Deprecated/ProfileManager/pmanagerEx.vcxproj.filters
+++ b/plugins/ProfileManager/pmanagerEx.vcxproj.filters
diff --git a/plugins/!Deprecated/ProfileManager/res/ChangePM.ico b/plugins/ProfileManager/res/ChangePM.ico
index 89b5d08f0f..89b5d08f0f 100644
--- a/plugins/!Deprecated/ProfileManager/res/ChangePM.ico
+++ b/plugins/ProfileManager/res/ChangePM.ico
Binary files differ
diff --git a/plugins/!Deprecated/ProfileManager/res/LoadPM.ico b/plugins/ProfileManager/res/LoadPM.ico
index ec298dea37..ec298dea37 100644
--- a/plugins/!Deprecated/ProfileManager/res/LoadPM.ico
+++ b/plugins/ProfileManager/res/LoadPM.ico
Binary files differ
diff --git a/plugins/!Deprecated/ProfileManager/res/resource.rc b/plugins/ProfileManager/res/resource.rc
index 8a81324da1..8a81324da1 100644
--- a/plugins/!Deprecated/ProfileManager/res/resource.rc
+++ b/plugins/ProfileManager/res/resource.rc
diff --git a/plugins/!Deprecated/ProfileManager/src/pmanagerEx.cpp b/plugins/ProfileManager/src/pmanagerEx.cpp
index be69d4f553..e2d9f0a3de 100644
--- a/plugins/!Deprecated/ProfileManager/src/pmanagerEx.cpp
+++ b/plugins/ProfileManager/src/pmanagerEx.cpp
@@ -54,7 +54,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
static INT_PTR ChangePM(WPARAM wParam, LPARAM lParam)
{
GetModuleFileName(GetModuleHandle(NULL), fn, SIZEOF(fn));
- ShellExecute(0, _T("open"), fn, _T("/FORCESHOW"), _T(""), 1);
+ ShellExecute(0, _T("open"), fn, _T("/ForceShowPM"), _T(""), 1);
CallService("CloseAction", 0, 0);
return 0;
}
@@ -62,7 +62,7 @@ static INT_PTR ChangePM(WPARAM wParam, LPARAM lParam)
static INT_PTR LoadPM(WPARAM wParam, LPARAM lParam)
{
GetModuleFileName(GetModuleHandle(NULL), fn, SIZEOF(fn));
- ShellExecute(0, _T("open"), fn, _T("/FORCESHOW"), _T(""), 1);
+ ShellExecute(0, _T("open"), fn, _T("/ForceShowPM"), _T(""), 1);
return 0;
}
@@ -82,7 +82,7 @@ extern "C" __declspec(dllexport) int Load(void)
mi.ptszName = _T("Load profile");
mi.pszService = "Database/LoadPM";
Menu_AddMainMenuItem(&mi);
-
+
hChangePM = CreateServiceFunction("Database/ChangePM", ChangePM);
ZeroMemory(&mi, sizeof(mi));
mi.cbSize = sizeof(mi);
@@ -103,4 +103,4 @@ extern "C" __declspec(dllexport) int Unload(void)
DestroyServiceFunction(hChangePM);
return 0;
-} \ No newline at end of file
+}
diff --git a/plugins/!Deprecated/ProfileManager/src/resource.h b/plugins/ProfileManager/src/resource.h
index 638fcfb4f6..638fcfb4f6 100644
--- a/plugins/!Deprecated/ProfileManager/src/resource.h
+++ b/plugins/ProfileManager/src/resource.h
diff --git a/src/modules/database/database.cpp b/src/modules/database/database.cpp
index e25747b9fb..ae5e497a8d 100644
--- a/src/modules/database/database.cpp
+++ b/src/modules/database/database.cpp
@@ -293,6 +293,7 @@ static int getProfileAutoRun(TCHAR *szProfile)
// returns 1 if a profile was selected
static int getProfile(TCHAR *szProfile, size_t cch)
{
+ PROFILEMANAGERDATA pd = {0};
getProfilePath(g_profileDir, SIZEOF(g_profileDir));
if (IsInsideRootDir(g_profileDir, true))
if (WritePrivateProfileString(_T("Database"), _T("ProfileDir"), _T(""), mirandabootini))
@@ -308,16 +309,21 @@ static int getProfile(TCHAR *szProfile, size_t cch)
_T("Miranda NG"), MB_ICONERROR | MB_OK);
return 0;
}
+
+ if ( CmdLine_GetOption( _T("ForceShowPM"))) {
+LBL_Show:
+ pd.szProfile = szProfile;
+ pd.szProfileDir = g_profileDir;
+ return getProfileManager(&pd);
+ }
+
if (getProfileAutoRun(szProfile))
return 1;
- PROFILEMANAGERDATA pd = {0};
if (getProfile1(szProfile, cch, g_profileDir, &pd.noProfiles))
return 1;
- pd.szProfile = szProfile;
- pd.szProfileDir = g_profileDir;
- return getProfileManager(&pd);
+ goto LBL_Show;
}
// carefully converts a file name from TCHAR* to char*