summaryrefslogtreecommitdiff
path: root/plugins/NewsAggregator
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2013-03-30 18:14:09 +0000
committerKirill Volinsky <mataes2007@gmail.com>2013-03-30 18:14:09 +0000
commitae4cd75ad09d77ce4a7a4412767c23a095ff6bab (patch)
tree56bdbf20eb91978cd90f862e096a7587a33cb282 /plugins/NewsAggregator
parent6c37db3a755eacba815181c74d00c808c0d578a2 (diff)
exmort starting
git-svn-id: http://svn.miranda-ng.org/main/trunk@4257 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/NewsAggregator')
-rw-r--r--plugins/NewsAggregator/Src/Common.h1
-rw-r--r--plugins/NewsAggregator/Src/Options.cpp32
2 files changed, 26 insertions, 7 deletions
diff --git a/plugins/NewsAggregator/Src/Common.h b/plugins/NewsAggregator/Src/Common.h
index dec490a958..d26aefed29 100644
--- a/plugins/NewsAggregator/Src/Common.h
+++ b/plugins/NewsAggregator/Src/Common.h
@@ -29,7 +29,6 @@ Boston, MA 02111-1307, USA.
// Miranda header files
#include <newpluginapi.h>
#include <m_clist.h>
-#include <m_clistint.h>
#include <m_langpack.h>
#include <m_options.h>
#include <m_database.h>
diff --git a/plugins/NewsAggregator/Src/Options.cpp b/plugins/NewsAggregator/Src/Options.cpp
index 45df92ad59..271a3bc6d3 100644
--- a/plugins/NewsAggregator/Src/Options.cpp
+++ b/plugins/NewsAggregator/Src/Options.cpp
@@ -540,11 +540,6 @@ INT_PTR CALLBACK DlgProcChangeFeedMenu(HWND hwndDlg, UINT msg, WPARAM wParam, LP
return FALSE;
}
-void CreateCListGroup(TCHAR* szGroupName)
-{
- CallService(MS_CLIST_GROUPCREATE, 0, (LPARAM)szGroupName);
-}
-
INT_PTR CALLBACK UpdateNotifyOptsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
HWND hwndList = GetDlgItem(hwndDlg, IDC_FEEDLIST);
@@ -757,7 +752,7 @@ INT_PTR CALLBACK UpdateNotifyOptsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPA
} while (group_name);
if(!GroupExist)
- CreateCListGroup(utfgroup);
+ CallService(MS_CLIST_GROUPCREATE, 0, (LPARAM)utfgroup);
}
if (isUTF)
{
@@ -796,6 +791,31 @@ INT_PTR CALLBACK UpdateNotifyOptsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPA
case IDC_EXPORT:
{
+ TCHAR FileName[MAX_PATH];
+ TCHAR *tszMirDir = Utils_ReplaceVarsT(_T("%miranda_path%"));
+
+ OPENFILENAME ofn = {0};
+ ofn.lStructSize = sizeof(ofn);
+ TCHAR tmp[MAX_PATH];
+ mir_sntprintf(tmp, SIZEOF(tmp), _T("%s (*.opml)%c*.opml%c%c"), TranslateT("OPML files"), 0, 0, 0);
+ ofn.lpstrFilter = tmp;
+ ofn.hwndOwner = 0;
+ ofn.lpstrFile = FileName;
+ ofn.nMaxFile = MAX_PATH;
+ ofn.nMaxFileTitle = MAX_PATH;
+ ofn.Flags = OFN_HIDEREADONLY;
+ ofn.lpstrInitialDir = tszMirDir;
+ *FileName = '\0';
+ ofn.lpstrDefExt = _T("");
+
+ if (GetSaveFileName(&ofn))
+ {
+ HXML hXML = xi.createNode(_T("opml"), NULL, FALSE);
+ xi.addAttr(hXML, _T("version"), _T("1.0"));
+ HXML head = xi.addChild(hXML, _T("head"), NULL);
+ HXML title = xi.addChild(head, _T("title"), _T("Miranda NG NewsAggregator plugin export"));
+ xi.toFile(hXML, FileName, 1);
+ }
}
return FALSE;