added: mount options: thumb_size(cx, cy)
size of a generated thumbnail (size in pixels) added: plugin gallery: mount option gallery_type it can be: "lightbox" "galleria" "galleriathumb" git-svn-id: svn://ttmath.org/publicrep/winix/trunk@717 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -31,6 +31,13 @@ public:
|
||||
|
||||
int mount_par_gallery_size;
|
||||
|
||||
|
||||
|
||||
// "lightbox" (default)
|
||||
// "galleria" (http://galleria.aino.se/)
|
||||
// "galleriathumb" (http://galleria.aino.se/)
|
||||
int mount_par_gallery_type;
|
||||
|
||||
// id of the current plugin
|
||||
int plugin_id;
|
||||
|
||||
|
@@ -37,7 +37,7 @@ void AddFunctions(PluginInfo & info)
|
||||
|
||||
void SelectDefaultFunction(PluginInfo & info)
|
||||
{
|
||||
if( info.system->mounts.pmount->type == gallery_info.mount_type_gallery )
|
||||
if( !info.cur->request->is_item && info.system->mounts.pmount->type == gallery_info.mount_type_gallery )
|
||||
info.cur->request->function = &fun_gallery;
|
||||
}
|
||||
|
||||
@@ -46,9 +46,11 @@ void AddMounts(PluginInfo & info)
|
||||
{
|
||||
Mounts & m = info.system->mounts;
|
||||
|
||||
gallery_info.mount_type_gallery = m.AddMountType(L"gallery");
|
||||
gallery_info.mount_par_gallery = m.AddMountPar(L"gallery");
|
||||
gallery_info.mount_type_gallery = m.AddMountType(L"gallery");
|
||||
|
||||
gallery_info.mount_par_gallery = m.AddMountPar(L"gallery");
|
||||
gallery_info.mount_par_gallery_size = m.AddMountPar(L"gallery_size");
|
||||
gallery_info.mount_par_gallery_type = m.AddMountPar(L"gallery_type");
|
||||
}
|
||||
|
||||
|
||||
|
@@ -37,6 +37,12 @@ void gallery_tab(Info & i)
|
||||
}
|
||||
|
||||
|
||||
void gallery_tab_index(Info & i)
|
||||
{
|
||||
i.out << gallery_index;
|
||||
}
|
||||
|
||||
|
||||
void gallery_tab_dir(Info & i)
|
||||
{
|
||||
if( gallery_index < gallery_info.item_sort_tab.size() )
|
||||
@@ -115,6 +121,18 @@ void gallery_height(Info & i)
|
||||
}
|
||||
|
||||
|
||||
void gallery_has_not_mount_type(Info & i)
|
||||
{
|
||||
i.res = !system->mounts.pmount->IsPar(gallery_info.mount_par_gallery_type);
|
||||
}
|
||||
|
||||
|
||||
void gallery_mount_type_arg_is(Info & i)
|
||||
{
|
||||
i.res = system->mounts.pmount->IsArg(gallery_info.mount_par_gallery_type, i.par);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void AddEzcFunctions(PluginInfo & info)
|
||||
{
|
||||
@@ -122,12 +140,15 @@ void AddEzcFunctions(PluginInfo & info)
|
||||
EzcFun * fun = reinterpret_cast<EzcFun*>(info.p1);
|
||||
|
||||
fun->Insert("gallery_tab", gallery_tab);
|
||||
fun->Insert("gallery_tab_index", gallery_tab_index);
|
||||
fun->Insert("gallery_tab_dir", gallery_tab_dir);
|
||||
fun->Insert("gallery_tab_url", gallery_tab_url);
|
||||
fun->Insert("gallery_tab_subject", gallery_tab_subject);
|
||||
fun->Insert("gallery_tab_link", gallery_tab_link);
|
||||
fun->Insert("gallery_width", gallery_width);
|
||||
fun->Insert("gallery_height", gallery_height);
|
||||
fun->Insert("gallery_has_not_mount_type", gallery_has_not_mount_type);
|
||||
fun->Insert("gallery_mount_type_arg_is", gallery_mount_type_arg_is);
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user