From 01f87c824137c048e7ba81002b90f5b89b400f84 Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Mon, 29 Jul 2013 14:37:16 +0000 Subject: double click now move item to 2nd listbox git-svn-id: http://svn.miranda-ng.org/main/trunk@5525 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/NewsAggregator/Src/ExportImport.cpp | 92 +++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) (limited to 'plugins/NewsAggregator') diff --git a/plugins/NewsAggregator/Src/ExportImport.cpp b/plugins/NewsAggregator/Src/ExportImport.cpp index 021f4078df..dc94515e6a 100644 --- a/plugins/NewsAggregator/Src/ExportImport.cpp +++ b/plugins/NewsAggregator/Src/ExportImport.cpp @@ -559,6 +559,52 @@ INT_PTR CALLBACK DlgProcImportOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM EnableWindow(GetDlgItem(hwndDlg, IDOK), FALSE); } break; + + case IDC_FEEDSLIST: + { + if (HIWORD(wParam) == LBN_DBLCLK) + { + if (!IsWindowEnabled(GetDlgItem(hwndDlg, IDC_REMOVEFEED))) + EnableWindow(GetDlgItem(hwndDlg, IDC_REMOVEFEED), TRUE); + if (!IsWindowEnabled(GetDlgItem(hwndDlg, IDC_REMOVEALLFEEDS))) + EnableWindow(GetDlgItem(hwndDlg, IDC_REMOVEALLFEEDS), TRUE); + if (!IsWindowEnabled(GetDlgItem(hwndDlg, IDOK))) + EnableWindow(GetDlgItem(hwndDlg, IDOK), TRUE); + int cursel = SendMessage(FeedsList, LB_GETCURSEL, 0, 0); + TCHAR item[MAX_PATH]; + SendMessage(FeedsList, LB_GETTEXT, cursel, (LPARAM)item); + SendMessage(FeedsImportList, LB_ADDSTRING, 0, (LPARAM)item); + SendMessage(FeedsList, LB_DELETESTRING, cursel, 0); + if (!SendMessage(FeedsList, LB_GETCOUNT, 0, 0)) { + EnableWindow(GetDlgItem(hwndDlg, IDC_ADDFEED), FALSE); + EnableWindow(GetDlgItem(hwndDlg, IDC_ADDALLFEEDS), FALSE); + } + } + } + break; + + case IDC_FEEDSIMPORTLIST: + { + if (HIWORD(wParam) == LBN_DBLCLK) + { + if (!IsWindowEnabled(GetDlgItem(hwndDlg, IDC_ADDFEED))) + EnableWindow(GetDlgItem(hwndDlg, IDC_ADDFEED), TRUE); + if (!IsWindowEnabled(GetDlgItem(hwndDlg, IDC_ADDALLFEEDS))) + EnableWindow(GetDlgItem(hwndDlg, IDC_ADDALLFEEDS), TRUE); + int cursel = SendMessage(FeedsImportList, LB_GETCURSEL, 0, 0); + TCHAR item[MAX_PATH]; + SendMessage(FeedsImportList, LB_GETTEXT, cursel, (LPARAM)item); + SendMessage(FeedsList, LB_ADDSTRING, 0, (LPARAM)item); + SendMessage(FeedsImportList, LB_DELETESTRING, cursel, 0); + if (!SendMessage(FeedsImportList, LB_GETCOUNT, 0, 0)) + { + EnableWindow(GetDlgItem(hwndDlg, IDC_REMOVEFEED), FALSE); + EnableWindow(GetDlgItem(hwndDlg, IDC_REMOVEALLFEEDS), FALSE); + EnableWindow(GetDlgItem(hwndDlg, IDOK), FALSE); + } + } + } + break; } break; @@ -770,6 +816,52 @@ INT_PTR CALLBACK DlgProcExportOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM EnableWindow(GetDlgItem(hwndDlg, IDOK), FALSE); } break; + + case IDC_FEEDSLIST: + { + if (HIWORD(wParam) == LBN_DBLCLK) + { + if (!IsWindowEnabled(GetDlgItem(hwndDlg, IDC_REMOVEFEED))) + EnableWindow(GetDlgItem(hwndDlg, IDC_REMOVEFEED), TRUE); + if (!IsWindowEnabled(GetDlgItem(hwndDlg, IDC_REMOVEALLFEEDS))) + EnableWindow(GetDlgItem(hwndDlg, IDC_REMOVEALLFEEDS), TRUE); + if (!IsWindowEnabled(GetDlgItem(hwndDlg, IDOK))) + EnableWindow(GetDlgItem(hwndDlg, IDOK), TRUE); + int cursel = SendMessage(FeedsList, LB_GETCURSEL, 0, 0); + TCHAR item[MAX_PATH]; + SendMessage(FeedsList, LB_GETTEXT, cursel, (LPARAM)item); + SendMessage(FeedsExportList, LB_ADDSTRING, 0, (LPARAM)item); + SendMessage(FeedsList, LB_DELETESTRING, cursel, 0); + if (!SendMessage(FeedsList, LB_GETCOUNT, 0, 0)) { + EnableWindow(GetDlgItem(hwndDlg, IDC_ADDFEED), FALSE); + EnableWindow(GetDlgItem(hwndDlg, IDC_ADDALLFEEDS), FALSE); + } + } + } + break; + + case IDC_FEEDSEXPORTLIST: + { + if (HIWORD(wParam) == LBN_DBLCLK) + { + if (!IsWindowEnabled(GetDlgItem(hwndDlg, IDC_ADDFEED))) + EnableWindow(GetDlgItem(hwndDlg, IDC_ADDFEED), TRUE); + if (!IsWindowEnabled(GetDlgItem(hwndDlg, IDC_ADDALLFEEDS))) + EnableWindow(GetDlgItem(hwndDlg, IDC_ADDALLFEEDS), TRUE); + int cursel = SendMessage(FeedsExportList, LB_GETCURSEL, 0, 0); + TCHAR item[MAX_PATH]; + SendMessage(FeedsExportList, LB_GETTEXT, cursel, (LPARAM)item); + SendMessage(FeedsList, LB_ADDSTRING, 0, (LPARAM)item); + SendMessage(FeedsExportList, LB_DELETESTRING, cursel, 0); + if (!SendMessage(FeedsExportList, LB_GETCOUNT, 0, 0)) + { + EnableWindow(GetDlgItem(hwndDlg, IDC_REMOVEFEED), FALSE); + EnableWindow(GetDlgItem(hwndDlg, IDC_REMOVEALLFEEDS), FALSE); + EnableWindow(GetDlgItem(hwndDlg, IDOK), FALSE); + } + } + } + break; } break; -- cgit v1.2.3