Exemplo n.º 1
0
void MoveMenuItem(int Pos,int NewPos)
{
	string strSrc,strDst,strTmp;
	strSrc.Format(FTS.TypeFmt,Pos);
	strDst.Format(FTS.TypeFmt,NewPos);
	strTmp.Format(L"Associations\\Tmp%u",GetTickCount());
	CopyLocalKeyTree(strDst,strTmp);
	DeleteKeyTree(strDst);
	CopyLocalKeyTree(strSrc,strDst);
	DeleteKeyTree(strSrc);
	CopyLocalKeyTree(strTmp,strSrc);
	DeleteKeyTree(strTmp);
}
Exemplo n.º 2
0
NodeTree* DeleteKeyTree(NodeTree** ApT, key k) {

    if(*ApT == NULL) {
        return NULL;
    }
    else if ((*ApT)->info == k) {

        return DeleteNodeTree(ApT);
    }
    else if((*ApT)->info > k) {
        return DeleteKeyTree(&((*ApT)->left), k);	// LEFT - SMALLER ELEMENTS
    }
    else {
        return DeleteKeyTree(&((*ApT)->right), k);	//RIGHT - BIGGER ELEMENTS
    }

}
Exemplo n.º 3
0
Shortcuts::~Shortcuts()
{
	for(size_t i = 0; i < KeyCount; i++)
	{
		FormatString strFolderShortcuts;
		strFolderShortcuts << FolderShortcutsKey << i;

		int index = 0;
		DeleteKeyTree(strFolderShortcuts);

		for(ShortcutItem* j = Items[i].First(); j; j = Items[i].Next(j), index++)
		{
			FormatString ValueName;
			ValueName << RecTypeName[PSCR_RT_SHORTCUT] << index;
			SetRegKey(strFolderShortcuts, ValueName, j->strFolder);
			ValueName.Clear();
			if(!j->strPluginModule.IsEmpty())
			{
				ValueName << RecTypeName[PSCR_RT_PLUGINMODULE] << index;
				SetRegKey(strFolderShortcuts, ValueName, j->strPluginModule);
				ValueName.Clear();
			}
			if(!j->strPluginFile.IsEmpty())
			{
				ValueName << RecTypeName[PSCR_RT_PLUGINFILE] << index;
				SetRegKey(strFolderShortcuts, ValueName, j->strPluginFile);
				ValueName.Clear();
			}
			if(!j->strPluginData.IsEmpty())
			{
				ValueName << RecTypeName[PSCR_RT_PLUGINDATA] << index;
				SetRegKey(strFolderShortcuts, ValueName, j->strPluginData);
				ValueName.Clear();
			}
		}
	}
}
Exemplo n.º 4
0
void ClearTree(NodeTree** ApT) {

    while(EmptyTree(*ApT) == FALSE) {
        free(DeleteKeyTree(ApT, (*ApT)->info));
    }
}