added: new plugin: menu
fixed: System::FollowAllLinks didn't check permissions to a file (only to a simlink or a directory)
added: new ezc function: insert_page
now we are able to nest pages in pages
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@750 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
78
plugins/menu/init.cpp
Executable file
78
plugins/menu/init.cpp
Executable file
@@ -0,0 +1,78 @@
|
||||
/*
|
||||
* This file is a part of Winix
|
||||
* and is not publicly distributed
|
||||
*
|
||||
* Copyright (c) 2011, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include "core/log.h"
|
||||
#include "core/plugin.h"
|
||||
|
||||
|
||||
|
||||
extern "C" void Init(PluginInfo &);
|
||||
|
||||
|
||||
|
||||
|
||||
namespace Menu
|
||||
{
|
||||
|
||||
|
||||
const wchar_t plugin_name[] = L"menu";
|
||||
int mount_par_menu_skip = -1;
|
||||
|
||||
|
||||
|
||||
void AddMountParams(PluginInfo & info)
|
||||
{
|
||||
using TemplatesFunctions::system;
|
||||
|
||||
mount_par_menu_skip = system->mounts.AddMountPar(L"menu_skip");
|
||||
}
|
||||
|
||||
|
||||
|
||||
void FstabChanged(PluginInfo & info)
|
||||
{
|
||||
if( mount_par_menu_skip == -1 )
|
||||
return;
|
||||
|
||||
/*
|
||||
// GetMountTab() returns a const pointer so we cannot sort menu_skip parameters
|
||||
// may change it to non-const in the future?
|
||||
|
||||
const Mounts::MountTab * mt = system->mounts.GetMountTab();
|
||||
Mounts::MountTab::const_iterator i;
|
||||
|
||||
for(i = mt->begin() ; i != mt->end() ; ++i)
|
||||
SortMenuSkip(i->second);
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
|
||||
void AddEzcFunctions(PluginInfo & info);
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void Init(PluginInfo & info)
|
||||
{
|
||||
using namespace Menu;
|
||||
|
||||
plugin.Assign(WINIX_TEMPLATES_CREATEFUNCTIONS, AddEzcFunctions);
|
||||
plugin.Assign(WINIX_ADD_MOUNTS, AddMountParams);
|
||||
plugin.Assign(WINIX_FSTAB_CHANGED, FstabChanged);
|
||||
|
||||
|
||||
info.p1 = (void*)(plugin_name);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user