diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2013-07-29 14:37:16 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2013-07-29 14:37:16 +0000 |
commit | 01f87c824137c048e7ba81002b90f5b89b400f84 (patch) | |
tree | 46bf545983ac6742fad7bfa2b32323492c8387f2 /plugins/NewsAggregator/Src/ExportImport.cpp | |
parent | c23dc541407d41665fa3bfdda2977f6b31694c68 (diff) |
double click now move item to 2nd listbox
git-svn-id: http://svn.miranda-ng.org/main/trunk@5525 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/NewsAggregator/Src/ExportImport.cpp')
-rw-r--r-- | plugins/NewsAggregator/Src/ExportImport.cpp | 92 |
1 files changed, 92 insertions, 0 deletions
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;
|