diff options
Diffstat (limited to 'plugins/NewsAggregator')
-rw-r--r-- | plugins/NewsAggregator/Src/Common.h | 2 | ||||
-rw-r--r-- | plugins/NewsAggregator/Src/ExportImport.cpp | 68 | ||||
-rw-r--r-- | plugins/NewsAggregator/Src/Options.cpp | 9 |
3 files changed, 73 insertions, 6 deletions
diff --git a/plugins/NewsAggregator/Src/Common.h b/plugins/NewsAggregator/Src/Common.h index c332557b8c..b51d13d5b8 100644 --- a/plugins/NewsAggregator/Src/Common.h +++ b/plugins/NewsAggregator/Src/Common.h @@ -137,6 +137,8 @@ BOOL DownloadFile(LPCTSTR tszURL, LPCTSTR tszLocal); int StrReplace(TCHAR *lpszOld, TCHAR *lpszNew, TCHAR *&lpszStr);
void CreateAuthString(char *auth, HANDLE hContact, HWND hwndDlg);
INT_PTR CALLBACK AuthenticationProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
+INT_PTR CALLBACK DlgProcImportOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
+INT_PTR CALLBACK DlgProcExportOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
// =============== NewsAggregator SERVICES ================
// Check all Feeds info
diff --git a/plugins/NewsAggregator/Src/ExportImport.cpp b/plugins/NewsAggregator/Src/ExportImport.cpp index 364f08ce65..fae8680156 100644 --- a/plugins/NewsAggregator/Src/ExportImport.cpp +++ b/plugins/NewsAggregator/Src/ExportImport.cpp @@ -270,4 +270,72 @@ VOID ExportFeedsDialog() xi.toFile(hXml, FileName, 1);
xi.destroyNode(hXml);
}
+}
+
+INT_PTR CALLBACK DlgProcImportOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
+{
+ switch (msg) {
+ case WM_INITDIALOG:
+ TranslateDialogDefault(hwndDlg);
+ SetWindowLongPtr(hwndDlg, GWLP_USERDATA, lParam);
+ Utils_RestoreWindowPositionNoSize(hwndDlg, NULL, MODULE, "ImportDlg");
+ return TRUE;
+
+ case WM_COMMAND:
+ switch (LOWORD(wParam)) {
+ case IDOK:
+ {
+ }
+
+ case IDCANCEL:
+ DestroyWindow(hwndDlg);
+ break;
+
+ }
+ break;
+
+ case WM_CLOSE:
+ DestroyWindow(hwndDlg);
+ break;
+
+ case WM_DESTROY:
+ Utils_SaveWindowPosition(hwndDlg, NULL, MODULE, "ImportDlg");
+ break;
+ }
+
+ return FALSE;
+}
+
+INT_PTR CALLBACK DlgProcExportOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
+{
+ switch (msg) {
+ case WM_INITDIALOG:
+ TranslateDialogDefault(hwndDlg);
+ SetWindowLongPtr(hwndDlg, GWLP_USERDATA, lParam);
+ Utils_RestoreWindowPositionNoSize(hwndDlg, NULL, MODULE, "ExportDlg");
+ return TRUE;
+
+ case WM_COMMAND:
+ switch (LOWORD(wParam)) {
+ case IDOK:
+ {
+ }
+
+ case IDCANCEL:
+ DestroyWindow(hwndDlg);
+ break;
+
+ }
+ break;
+
+ case WM_CLOSE:
+ DestroyWindow(hwndDlg);
+ break;
+
+ case WM_DESTROY:
+ Utils_SaveWindowPosition(hwndDlg, NULL, MODULE, "ExportDlg");
+ break;
+ }
+
+ return FALSE;
}
\ No newline at end of file diff --git a/plugins/NewsAggregator/Src/Options.cpp b/plugins/NewsAggregator/Src/Options.cpp index 8fe44be7d9..fa47ec2afb 100644 --- a/plugins/NewsAggregator/Src/Options.cpp +++ b/plugins/NewsAggregator/Src/Options.cpp @@ -31,7 +31,7 @@ INT_PTR CALLBACK DlgProcAddFeedOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA SendDlgItemMessage(hwndDlg, IDC_CHECKTIME, EM_LIMITTEXT, 3, 0);
SetDlgItemInt(hwndDlg, IDC_CHECKTIME, DEFAULT_UPDATE_TIME, TRUE);
SendDlgItemMessage(hwndDlg, IDC_TIMEOUT_VALUE_SPIN, UDM_SETRANGE32, 0, 999);
- Utils_RestoreWindowPositionNoSize(hwndDlg,NULL,MODULE,"AddDlg");
+ Utils_RestoreWindowPositionNoSize(hwndDlg, NULL, MODULE, "AddDlg");
return TRUE;
case WM_COMMAND:
@@ -529,14 +529,11 @@ INT_PTR CALLBACK UpdateNotifyOptsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPA return FALSE;
case IDC_IMPORT:
- if ( !ImportFeedsDialog()) {
- DeleteAllItems(hwndList);
- UpdateList(hwndList);
- }
+ CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_FEEDIMPORT), hwndDlg, DlgProcImportOpts, (LPARAM)hwndList);
return FALSE;
case IDC_EXPORT:
- ExportFeedsDialog();
+ CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_FEEDEXPORT), hwndDlg, DlgProcExportOpts, (LPARAM)hwndList);
return FALSE;
case IDC_STARTUPRETRIEVE:
|