From b5c155b92736385bfe69c80f7a8acb73a40537a4 Mon Sep 17 00:00:00 2001 From: Tomasz Sowa Date: Fri, 3 Aug 2012 10:55:14 +0000 Subject: [PATCH] added: export plugin the possibility to export only non static files in a directory git-svn-id: svn://ttmath.org/publicrep/winix/trunk@870 e52654a7-88a9-db11-a3e9-0013d4bc506e --- html/fun_export.html | 4 ++++ plugins/export/funexport.cpp | 11 +++++++---- plugins/export/funexport.h | 2 +- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/html/fun_export.html b/html/fun_export.html index 9ee707b..14165e3 100644 --- a/html/fun_export.html +++ b/html/fun_export.html @@ -7,6 +7,10 @@
+ + + +

diff --git a/plugins/export/funexport.cpp b/plugins/export/funexport.cpp index d07cee3..a95ea1d 100755 --- a/plugins/export/funexport.cpp +++ b/plugins/export/funexport.cpp @@ -52,7 +52,7 @@ void FunExport::ExportFile(const Item & item) } -void FunExport::ExportDir(const Item & dir) +void FunExport::ExportDir(const Item & dir, bool only_non_static_files) { export_info->SendDir(dir); @@ -64,7 +64,9 @@ void FunExport::ExportDir(const Item & dir) iq_dir.sel_file = true; iq_dir.WhereParentId(dir.id); iq_dir.WhereType(Item::file); - //iq_dir.WhereFileType(WINIX_ITEM_FILETYPE_NONE); + + if( only_non_static_files ) + iq_dir.WhereFileType(WINIX_ITEM_FILETYPE_NONE); db->GetItems(dir_items, iq_dir); @@ -79,7 +81,7 @@ void FunExport::ExportDir(const Item & dir) for( ; i != system->dirs.ParentEnd() ; i = system->dirs.NextChild(i) ) { - ExportDir(*i->second); + ExportDir(*i->second, only_non_static_files); } } @@ -87,11 +89,12 @@ void FunExport::ExportDir(const Item & dir) void FunExport::Export() { export_info->ResetRecurrenceCheck(); + bool onlynonstatic = cur->request->IsPostVar(L"onlynonstatic"); if( cur->request->is_item ) ExportFile(cur->request->item); else - ExportDir(*cur->request->dir_tab.back()); + ExportDir(*cur->request->dir_tab.back(), onlynonstatic); } diff --git a/plugins/export/funexport.h b/plugins/export/funexport.h index 97ad99c..9d2e809 100755 --- a/plugins/export/funexport.h +++ b/plugins/export/funexport.h @@ -33,7 +33,7 @@ public: void ExportFile(const Item & item); - void ExportDir(const Item & dir); + void ExportDir(const Item & dir, bool only_non_static_files = false); private: