summaryrefslogtreecommitdiff
path: root/plugins/ContextHelp
diff options
context:
space:
mode:
authorGoraf <goraf@miranda-ng.org>2016-02-06 21:35:37 +0000
committerGoraf <goraf@miranda-ng.org>2016-02-06 21:35:37 +0000
commit941dca4cf7a93100c19a6e3b92e1bc6bf9e71f04 (patch)
tree3d33cf2d259e525888700be71bd90b04b20e2018 /plugins/ContextHelp
parent19f2b2f3335306efc1619a377ba28dc265ebb180 (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')
-rw-r--r--plugins/ContextHelp/res/resource.rc50
-rw-r--r--plugins/ContextHelp/src/help.h13
-rw-r--r--plugins/ContextHelp/src/helpdlg.cpp8
-rw-r--r--plugins/ContextHelp/src/main.cpp6
-rw-r--r--plugins/ContextHelp/src/options.cpp23
-rw-r--r--plugins/ContextHelp/src/resource.h11
6 files changed, 14 insertions, 97 deletions
diff --git a/plugins/ContextHelp/res/resource.rc b/plugins/ContextHelp/res/resource.rc
index f915b51fa6..05f66326cc 100644
--- a/plugins/ContextHelp/res/resource.rc
+++ b/plugins/ContextHelp/res/resource.rc
@@ -118,51 +118,6 @@ BEGIN
END
#endif
-IDD_UPDATENOTIFY DIALOG DISCARDABLE 0, 0, 259, 115
-STYLE DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_VISIBLE |
- WS_CAPTION | WS_SYSMENU
-CAPTION "Help pack update now available"
-FONT 8, "MS Shell Dlg"
-BEGIN
- LTEXT "A new version of a help pack is now available. Click the install button to download and install this new update.",
- IDC_STATIC,8,7,243,21,SS_NOPREFIX
- CONTROL "Language:",IDC_LANGUAGELABEL,"Static",SS_SIMPLE |
- SS_NOPREFIX | WS_GROUP,8,29,65,8
- EDITTEXT IDC_LANGUAGE,78,29,173,8,ES_AUTOHSCROLL | ES_READONLY |
- NOT WS_BORDER
- CONTROL "Current:",IDC_STATIC,"Static",SS_SIMPLE | SS_NOPREFIX |
- WS_GROUP,8,43,65,8
- EDITTEXT IDC_CURRENTVERSION,78,43,173,8,ES_AUTOHSCROLL |
- ES_READONLY | NOT WS_BORDER
- CONTROL "New:",IDC_NEWVERSIONLABEL,"Static",SS_SIMPLE |
- SS_NOPREFIX | WS_GROUP,8,58,65,8
- EDITTEXT IDC_NEWVERSION,78,58,173,8,ES_AUTOHSCROLL | ES_READONLY |
- NOT WS_BORDER
- PUSHBUTTON "&Install now",IDOK,7,73,66,15,WS_GROUP
- CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,7,92,245,1
- DEFPUSHBUTTON "Close",IDCANCEL,202,96,50,15
-END
-
-IDD_DOWNLOADLANG DIALOG DISCARDABLE 0, 0, 200, 126
-STYLE DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_VISIBLE |
- WS_CAPTION | WS_SYSMENU
-CAPTION "Select your help language"
-FONT 8, "MS Shell Dlg"
-BEGIN
- LTEXT "Help is available in different languages.\nHere is a list of all available languages of the file listing, please select your native &language:",
- IDC_STATIC,5,5,189,26
- COMBOBOX IDC_LANGCOMBO,46,36,106,126,CBS_DROPDOWNLIST |
- CBS_AUTOHSCROLL | CBS_SORT | WS_VSCROLL | WS_TABSTOP
- CONTROL "Download &all languages",IDC_DOWNLOADALL,"Button",
- BS_AUTOCHECKBOX | WS_TABSTOP,46,53,148,10
- LTEXT "Note: This will download and install the newest help pack available for the selected language. There might be help packs from other authors available on the file listing.",
- IDC_STATIC,5,69,189,34,SS_NOPREFIX | WS_DISABLED
- CTEXT "",IDC_LOADING,1,109,86,8,SS_NOPREFIX | SS_CENTERIMAGE |
- NOT WS_VISIBLE
- PUSHBUTTON "OK",IDOK,89,106,50,14,WS_DISABLED
- DEFPUSHBUTTON "Cancel",IDCANCEL,144,106,50,15
-END
-
IDD_OPT_LANG DIALOGEX 0, 0, 301, 227
STYLE DS_FIXEDSYS | WS_CHILD
EXSTYLE WS_EX_CONTROLPARENT
@@ -201,11 +156,6 @@ BEGIN
WS_BORDER | WS_VSCROLL | WS_TABSTOP,WS_EX_TRANSPARENT
CONTROL "Download more help packs",IDC_MORELANG,"Hyperlink",
WS_GROUP | WS_TABSTOP | 0x1,2,191,299,10
- CONTROL "Check for new &versions of help packs periodically",
- IDC_ENABLEHELPUPDATES,"Button",BS_AUTOCHECKBOX |
- WS_GROUP | WS_TABSTOP,2,214,209,10
- PUSHBUTTON "&Download language",IDC_DOWNLOADLANG,213,213,86,14,
- WS_GROUP
END
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