diff options
author | Goraf <goraf@miranda-ng.org> | 2016-02-06 21:35:37 +0000 |
---|---|---|
committer | Goraf <goraf@miranda-ng.org> | 2016-02-06 21:35:37 +0000 |
commit | 941dca4cf7a93100c19a6e3b92e1bc6bf9e71f04 (patch) | |
tree | 3d33cf2d259e525888700be71bd90b04b20e2018 /plugins/ContextHelp/src | |
parent | 19f2b2f3335306efc1619a377ba28dc265ebb180 (diff) |
ContextHelp:
* not used controls removed
* links fixed
* decapitalization
git-svn-id: http://svn.miranda-ng.org/main/trunk@16232 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/ContextHelp/src')
-rw-r--r-- | plugins/ContextHelp/src/help.h | 13 | ||||
-rw-r--r-- | plugins/ContextHelp/src/helpdlg.cpp | 8 | ||||
-rw-r--r-- | plugins/ContextHelp/src/main.cpp | 6 | ||||
-rw-r--r-- | plugins/ContextHelp/src/options.cpp | 23 | ||||
-rw-r--r-- | plugins/ContextHelp/src/resource.h | 11 |
5 files changed, 14 insertions, 47 deletions
diff --git a/plugins/ContextHelp/src/help.h b/plugins/ContextHelp/src/help.h index cd6e095e7e..3eb43f9982 100644 --- a/plugins/ContextHelp/src/help.h +++ b/plugins/ContextHelp/src/help.h @@ -52,17 +52,21 @@ int RemoveDialogBoxHook(void); #define CTLTYPE_COLOUR 25
#define CTLTYPE_TOOLBAR 26
#define CTLTYPE_SIZEGRIP 27
+
extern const TCHAR *szControlTypeNames[];
+
int GetControlType(HWND hwndCtl);
HWND GetControlDialog(HWND hwndCtl);
int GetControlTitle(HWND hwndCtl, TCHAR *pszTitle, int cchTitle);
char *GetControlModuleName(HWND hwndCtl);
int GetControlID(HWND hwndCtl);
char *CreateDialogIdString(HWND hwndDlg);
+
struct ResizableCharBuffer {
char *sz;
int iEnd, cbAlloced;
};
+
void AppendCharToCharBuffer(struct ResizableCharBuffer *rcb, char c);
void AppendToCharBuffer(struct ResizableCharBuffer *rcb, const char *fmt, ...);
@@ -114,6 +118,7 @@ void UninitOptions(void); void TrimStringSimple(char *str);
void TrimString(char *str);
BOOL IsEmpty(const char *str);
+
typedef struct {
TCHAR szLanguage[64];
LCID Locale;
@@ -128,9 +133,11 @@ typedef struct { TCHAR szFileName[MAX_PATH]; /* just the file name itself */
BYTE flags; /* see HPIF_* flags */
} HELPPACK_INFO;
+
#define HPF_ENABLED 0x01 // pack is enabled
#define HPF_NOLOCALE 0x02 // pack has no valid locale
-#define HPF_DEFAULT 0x04 // pack is english default
+#define HPF_DEFAULT 0x04 // pack is english default
+
BOOL GetPackPath(TCHAR *pszPath, int nSize, BOOL fEnabledPacks, const TCHAR *pszFile);
typedef INT_PTR(CALLBACK *ENUM_PACKS_CALLBACK)(HELPPACK_INFO *pack, WPARAM wParam, LPARAM lParam);
BOOL EnumPacks(ENUM_PACKS_CALLBACK callback, const TCHAR *pszFilePattern, const char *pszFileVersionHeader, WPARAM wParam, LPARAM lParam);
@@ -138,9 +145,5 @@ BOOL IsPluginIncluded(const HELPPACK_INFO *pack, char *pszFileBaseName); BOOL EnablePack(const HELPPACK_INFO *pack, const TCHAR *pszFilePattern);
void CorrectPacks(const TCHAR *pszFilePattern, const TCHAR *pszDefaultFile, BOOL fDisableAll);
-/* update.c
-INT_PTR ServiceShowLangDialog(WPARAM wParam, LPARAM lPARAM);
-void InitUpdate(void);
-void UninitUpdate(void);*/
#endif // __CONTEXTHELP_HELP_H__
\ No newline at end of file diff --git a/plugins/ContextHelp/src/helpdlg.cpp b/plugins/ContextHelp/src/helpdlg.cpp index 38d2b5d058..82266f1773 100644 --- a/plugins/ContextHelp/src/helpdlg.cpp +++ b/plugins/ContextHelp/src/helpdlg.cpp @@ -208,14 +208,6 @@ INT_PTR CALLBACK HelpDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara return TRUE;
case WM_SIZE:
{
- /* UTILRESIZEDIALOG urd;
- ZeroMemory(&urd,sizeof(urd));
- urd.cbSize=sizeof(urd);
- urd.hInstance=hInst;
- urd.hwndDlg=hwndDlg;
- urd.lpTemplate=MAKEINTRESOURCEA(IDD_HELP);
- urd.pfnResizer=HelpDialogResize;
- CallService(MS_UTILS_RESIZEDIALOG,0,(LPARAM)&urd); */
Utils_ResizeDialog(hwndDlg, hInst, MAKEINTRESOURCEA(IDD_HELP), HelpDialogResize);
InvalidateRect(hwndDlg, NULL, TRUE);
#ifdef EDITOR
diff --git a/plugins/ContextHelp/src/main.cpp b/plugins/ContextHelp/src/main.cpp index fe8f60baee..6ddc2363b5 100644 --- a/plugins/ContextHelp/src/main.cpp +++ b/plugins/ContextHelp/src/main.cpp @@ -110,11 +110,6 @@ extern "C" __declspec(dllexport) int Load(void) InitOptions();
InitDialogCache();
- // InitUpdate();
-
- // InstallFile(_T("Help-Readme.txt"),_T("Docs\\"));
- // InstallFile(_T("Help-License.txt"),_T("Docs\\"));
- // InstallFile(_T("Help-SDK.zip"),_T("Docs\\"));
return 0;
}
@@ -122,7 +117,6 @@ extern "C" __declspec(dllexport) int Load(void) extern "C" __declspec(dllexport) int Unload(void)
{
UninitOptions();
- // UninitUpdate();
RemoveDialogBoxHook();
if (hwndHelpDlg != NULL)
diff --git a/plugins/ContextHelp/src/options.cpp b/plugins/ContextHelp/src/options.cpp index 564630d8b3..175b2731f9 100644 --- a/plugins/ContextHelp/src/options.cpp +++ b/plugins/ContextHelp/src/options.cpp @@ -425,13 +425,12 @@ static INT_PTR CALLBACK LangOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP {
LVCOLUMN lvc;
lvc.mask = LVCF_TEXT;
- lvc.pszText = TranslateT("Installed Languages");
+ lvc.pszText = TranslateT("Installed languages");
ListView_InsertColumn(hwndList, 0, &lvc);
}
if (ServiceExists(MS_FLAGS_LOADFLAGICON))
ListView_SetImageList(hwndList, ImageList_Create(GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), ILC_COLOR24, 8, 8), LVSIL_SMALL);
CorrectPacks(_T("helppack_*.txt"), _T("helppack_english.txt"), FALSE);
- CheckDlgButton(hwndDlg, IDC_ENABLEHELPUPDATES, db_get_b(NULL, "HelpPlugin", "EnableHelpUpdates", SETTING_ENABLEHELPUPDATES_DEFAULT) != 0);
SendMessage(hwndDlg, M_RELOADLIST, 0, 0);
SendMessage(hwndDlg, M_SHOWFILECOL, 0, 1);
return TRUE;
@@ -451,7 +450,6 @@ static INT_PTR CALLBACK LangOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP DisplayPackInfo(hwndDlg, NULL);
/* make it use current langpack locale for sort */
ListView_SortItems(hwndList, CompareListItem, Langpack_GetDefaultLocale());
- CheckDlgButton(hwndDlg, IDC_ENABLEHELPUPDATES, db_get_b(NULL, "HelpPlugin", "EnableHelpUpdates", SETTING_ENABLEHELPUPDATES_DEFAULT) != 0);
/* show selection */
int iItem = ListView_GetNextItem(hwndList, -1, LVNI_SELECTED);
if (iItem != -1)
@@ -501,22 +499,14 @@ static INT_PTR CALLBACK LangOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP case IDC_LANGEMAIL:
{
char buf[512];
- lstrcpyA(buf, "mailto:");
- if (GetWindowTextA(GetDlgItem(hwndDlg, LOWORD(wParam)), &buf[7], sizeof(buf) - 7))
- // CallService(MS_UTILS_OPENURL,FALSE,(LPARAM)buf); // look at !!
- return TRUE;
+ mir_strcpy(buf, "mailto:");
+ if (GetDlgItemTextA(hwndDlg, LOWORD(wParam), &buf[7], _countof(buf) - 7))
+ Utils_OpenUrl(buf);
+ return TRUE;
}
case IDC_MORELANG:
- // CallService(MS_UTILS_OPENURL,TRUE,(LPARAM)"http://miranda-ng.org/"); //look at !!
- return TRUE;
-
- case IDC_ENABLEHELPUPDATES:
- SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0); /* enable apply */
- return TRUE;
-
- case IDC_DOWNLOADLANG:
- // ServiceShowLangDialog(0, 0);
+ Utils_OpenUrl("http://wiki.miranda-ng.org/index.php?title=Download");
return TRUE;
}
break;
@@ -653,7 +643,6 @@ static INT_PTR CALLBACK LangOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP else
pack->flags &= ~HPF_ENABLED;
}
- db_set_b(NULL, "HelpPlugin", "EnableAutoUpdates", (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_ENABLEHELPUPDATES) != 0));
return TRUE;
}
} /* switch nmhdr->idFrom */
diff --git a/plugins/ContextHelp/src/resource.h b/plugins/ContextHelp/src/resource.h index e9f9b0622f..6710ecaf41 100644 --- a/plugins/ContextHelp/src/resource.h +++ b/plugins/ContextHelp/src/resource.h @@ -6,7 +6,6 @@ #define IDD_SHADOW 102
#define IDD_OPT_LANG 103
#define IDD_OPT_ADV 104
-#define IDD_UPDATENOTIFY 105
#define IDD_DOWNLOADLANG 106
#define IDC_CTLTEXT 1001
#define IDC_TEXT 1002
@@ -33,16 +32,6 @@ #define IDC_LANGNOTINCLUDED 1023
#define IDC_MORELANG 1024
#define IDC_NOPACK 1025
-#define IDC_ENABLEHELPUPDATES 1026
-#define IDC_DOWNLOADLANG 1027
-#define IDC_LANGCOMBO 1028
-#define IDC_DOWNLOADALL 1029
-#define IDC_LOADING 1030
-#define IDC_LANGUAGELABEL 1031
-#define IDC_LANGUAGE 1032
-#define IDC_CURRENTVERSION 1033
-#define IDC_NEWVERSION 1034
-#define IDC_NEWVERSIONLABEL 1035
#define IDC_AUTOTIPSENABLED 1036
#define IDC_AUTOTIPDELAY 1037
#define IDC_AUTOTIPDELAYSPIN 1038
|