diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2012-05-27 07:00:19 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2012-05-27 07:00:19 +0000 |
commit | ab30760975535269bef135883d3394760bd4eade (patch) | |
tree | 843362bde4bfd65a5f279aedc26ac06e7cee6a81 /plugins/Folders/folders | |
parent | 64e5be276b2b883ea354b1efe77d788cfa1a567d (diff) |
projects cleanup
git-svn-id: http://svn.miranda-ng.org/main/trunk@193 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Folders/folders')
23 files changed, 0 insertions, 2958 deletions
diff --git a/plugins/Folders/folders/commonheaders.h b/plugins/Folders/folders/commonheaders.h deleted file mode 100644 index 3cab4024b1..0000000000 --- a/plugins/Folders/folders/commonheaders.h +++ /dev/null @@ -1,80 +0,0 @@ -/*
-Custom profile folders plugin for Miranda IM
-
-Copyright © 2005 Cristian Libotean
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-#ifndef M_FOLDERS_COMMONHEADERS_H
-#define M_FOLDERS_COMMONHEADERS_H
-
-#define MAX_FOLDER_SIZE 2048
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <windows.h>
-
-#include "newpluginapi.h"
-#include "m_utils.h"
-#include "m_folders.h"
-
-#include "version.h"
-#include "utils.h"
-#include "resource.h"
-#include "foldersList.h"
-#include "dlg_handlers.h"
-
-#include "m_database.h"
-#include "m_system.h"
-#include "m_skin.h"
-#include "m_options.h"
-#include "m_clist.h"
-#include "m_langpack.h"
-#include "m_history.h"
-#include "m_contacts.h"
-#include "m_popup.h"
-#include "m_fontservice.h"
-#include "m_updater.h"
-#include "m_variables.h"
-
-#ifndef MS_DB_GETPROFILEPATH_BASIC //db3xSA
-#define MS_DB_GETPROFILEPATH_BASIC "DB/GetProfilePathBasic"
-#endif
-
-extern char ModuleName[];
-extern HINSTANCE hInstance;
-extern CFoldersList &lstRegisteredFolders;
-
-#define OLD_MIRANDAPLUGININFO_SUPPORT PLUGININFO oldPluginInfo = { \
- sizeof(PLUGININFO), \
- pluginInfo.shortName, \
- pluginInfo.version, \
- pluginInfo.description, \
- pluginInfo.author, \
- pluginInfo.authorEmail, \
- pluginInfo.copyright, \
- pluginInfo.homepage, \
- pluginInfo.flags, \
- pluginInfo.replacesDefaultModule \
-}; \
-\
-extern "C" __declspec(dllexport) PLUGININFO *MirandaPluginInfo(DWORD mirandaVersion) \
-{ \
- return &oldPluginInfo; \
-}
-
-#endif //FOLDERS_COMMONHEADERS_H
\ No newline at end of file diff --git a/plugins/Folders/folders/dlg_handlers.cpp b/plugins/Folders/folders/dlg_handlers.cpp deleted file mode 100644 index 74d3715835..0000000000 --- a/plugins/Folders/folders/dlg_handlers.cpp +++ /dev/null @@ -1,413 +0,0 @@ -#include "dlg_handlers.h"
-
-PFolderItem lastItem = NULL;
-
-static int bInitializing = 0;
-
-int GetCurrentItemSelection(HWND hWnd)
-{
- return SendDlgItemMessageW(hWnd, IDC_FOLDERS_ITEMS_LIST, LB_GETCURSEL, 0, 0);
-}
-
-int GetCurrentSectionSelection(HWND hWnd)
-{
- return SendDlgItemMessageW(hWnd, IDC_FOLDERS_SECTIONS_LIST, LB_GETCURSEL, 0, 0);
-}
-
-PFolderItem GetSelectedItem(HWND hWnd)
-{
- WCHAR section[MAX_FOLDER_SIZE];
- WCHAR item[MAX_FOLDER_SIZE];
- GetCurrentItemText(hWnd, item, MAX_FOLDER_SIZE);
- GetCurrentSectionText(hWnd, section, MAX_FOLDER_SIZE);
- return lstRegisteredFolders.GetTranslated(section, item);
-}
-
-int GetCurrentItemText(HWND hWnd, WCHAR *buffer, int count)
-{
- int index = GetCurrentItemSelection(hWnd);
- if (index != LB_ERR)
- {
- SendDlgItemMessageW(hWnd, IDC_FOLDERS_ITEMS_LIST, LB_GETTEXT, index, (LPARAM) buffer);
- return 1;
- }
- else{
- buffer[0] = L'\0';
- return 0;
- }
-}
-
-int GetCurrentSectionText(HWND hWnd, WCHAR *buffer, int count)
-{
- int index = GetCurrentSectionSelection(hWnd);
- if (index != LB_ERR)
- {
- SendDlgItemMessageW(hWnd, IDC_FOLDERS_SECTIONS_LIST, LB_GETTEXT, index, (LPARAM) buffer);
- return 1;
- }
- else{
- buffer[0] = L'0';
- return 0;
- }
-}
-
-//void GetEditText(HWND hWnd, char *buffer, int size)
-//{
-// GetWindowText(GetDlgItem(hWnd, IDC_FOLDER_EDIT), buffer, size);
-// StrTrim(buffer, "\\\t \n");
-//}
-
-void GetEditTextW(HWND hWnd, wchar_t *buffer, int size)
-{
- GetWindowTextW(GetDlgItem(hWnd, IDC_FOLDER_EDIT), buffer, size);
-}
-
-//void SetEditText(HWND hWnd, const char *buffer)
-//{
-// bInitializing = 1;
-// SetWindowText(GetDlgItem(hWnd, IDC_FOLDER_EDIT), buffer);
-// bInitializing = 0;
-//// SendDlgItemMessage(hWnd, IDC_FOLDER_EDIT, WM_SETTEXT, 0, (LPARAM) buffer);
-//}
-
-void SetEditTextW(HWND hWnd, const wchar_t *buffer)
-{
- bInitializing = 1;
- SetWindowTextW(GetDlgItem(hWnd, IDC_FOLDER_EDIT), buffer);
- bInitializing = 0;
-}
-
-int ContainsSection(HWND hWnd, const WCHAR *section)
-{
- int index = SendDlgItemMessageW(hWnd, IDC_FOLDERS_SECTIONS_LIST, LB_FINDSTRINGEXACT, -1, (LPARAM) section);
- return (index != LB_ERR);
-}
-
-void LoadRegisteredFolderSections(HWND hWnd)
-{
- for (int i = 0; i < lstRegisteredFolders.Count(); i++)
- {
- PFolderItem tmp = lstRegisteredFolders.Get(i + 1);
- WCHAR *translated = mir_a2u(Translate(tmp->GetSection()));
- if (!ContainsSection(hWnd, translated))
- {
- SendDlgItemMessageW(hWnd, IDC_FOLDERS_SECTIONS_LIST, LB_ADDSTRING, 0, (LPARAM) translated);
- }
- mir_free(translated);
- }
-}
-
-void LoadRegisteredFolderItems(HWND hWnd)
-{
- WCHAR buffer[MAX_FOLDER_SIZE];
- GetCurrentSectionText(hWnd, buffer, MAX_FOLDER_SIZE);
- SendDlgItemMessageW(hWnd, IDC_FOLDERS_ITEMS_LIST, LB_RESETCONTENT, 0, 0);
- for (int i = 0; i < lstRegisteredFolders.Count(); i++)
- {
- PFolderItem item = lstRegisteredFolders.Get(i + 1);
- WCHAR *wide = mir_a2u(Translate(item->GetSection()));
- if (wcscmp(buffer, wide) == 0)
- {
- mir_free(wide);
- wide = mir_a2u(Translate(item->GetName()));
- SendDlgItemMessageW(hWnd, IDC_FOLDERS_ITEMS_LIST, LB_ADDSTRING, 0, (LPARAM) wide);
- }
- mir_free(wide);
- }
- SendDlgItemMessageW(hWnd, IDC_FOLDERS_ITEMS_LIST, LB_SETCURSEL, 0, 0); //select the first item
- PostMessage(hWnd, WM_COMMAND, MAKEWPARAM(IDC_FOLDERS_ITEMS_LIST, LBN_SELCHANGE), 0); //tell the dialog to refresh the preview
-}
-
-void LoadItem(HWND hWnd, PFolderItem item)
-{
- if (item)
- {
- if (item->IsUnicode())
- {
- SetEditTextW(hWnd, item->GetFormatW());
- }
- else{
- WCHAR *buffer = mir_a2u(item->GetFormat());
- SetEditTextW(hWnd, buffer);
- mir_free(buffer);
- }
- RefreshPreview(hWnd);
- }
-}
-
-void SaveItem(HWND hWnd, PFolderItem item, int bEnableApply)
-{
- if (item)
- {
- if (item->IsUnicode())
- {
- wchar_t buffer[MAX_FOLDER_SIZE];
- GetEditTextW(hWnd, buffer, MAX_FOLDER_SIZE);
- item->SetFormatW(buffer);
- }
- else{
- WCHAR buffer[MAX_FOLDER_SIZE];
- char ansi[MAX_FOLDER_SIZE];
- GetEditTextW(hWnd, buffer, MAX_FOLDER_SIZE);
- WideCharToMultiByte(CallService(MS_LANGPACK_GETCODEPAGE, 0, 0), 0, buffer, -1, ansi, MAX_FOLDER_SIZE, NULL, NULL);
- item->SetFormat(ansi);
- }
- if (bEnableApply)
- {
- SendMessage(GetParent(hWnd), PSM_CHANGED, 0, 0);
- }
- }
-}
-
-int ChangesNotSaved(HWND hWnd, PFolderItem item)
-{
- int res = 0;
- if (item)
- {
- if (item->IsUnicode())
- {
- wchar_t buffer[MAX_FOLDER_SIZE];
- GetEditTextW(hWnd, buffer, MAX_FOLDER_SIZE);
- res = (wcscmp(item->GetFormatW(), buffer) != 0);
- }
- else{
- WCHAR buffer[MAX_FOLDER_SIZE];
- GetEditTextW(hWnd, buffer, MAX_FOLDER_SIZE);
- char *ansi = mir_u2a(buffer);
-
- res = (strcmp(item->GetFormat(), ansi) != 0);
- mir_free(ansi);
- }
- }
-
- return res;
-}
-
-void CheckForChanges(HWND hWnd, int bNeedConfirmation = 1)
-{
- if (ChangesNotSaved(hWnd, lastItem))
- {
- if ((!bNeedConfirmation) || MessageBoxW(hWnd, TranslateW(L"Some changes weren't saved. Apply the changes now ?"), TranslateW(L"Changes not saved"), MB_YESNO | MB_ICONINFORMATION) == IDYES)
- {
- SaveItem(hWnd, lastItem);
- }
- }
-}
-
-void RefreshPreview(HWND hWnd)
-{
- wchar_t tmp[MAX_FOLDER_SIZE];
- wchar_t res[MAX_FOLDER_SIZE];
- GetEditTextW(hWnd, tmp, MAX_FOLDER_SIZE);
- ExpandPathW(res, tmp, MAX_FOLDER_SIZE);
- SetWindowTextW(GetDlgItem(hWnd, IDC_PREVIEW_EDIT), res);
- //SendDlgItemMessage(hWnd, IDC_PREVIEW_EDIT, WM_SETTEXT, 0, (LPARAM) res);
-}
-
-
-void LoadHelp(HWND hWnd)
-{
- SETTEXTEX tmp = {0};
- tmp.flags = ST_SELECTION;
- tmp.codepage = CallService(MS_LANGPACK_GETCODEPAGE, 0, 0);
- char *text =
-#include "variablesHelp.inc"
-;
-
- char buffer[2048];
- char line[2048];
- int len;
-
- char *p;
- while ((p = strchr(text, '\n')))
- {
- len = p - text + 1;
- memcpy(line, text, len);
- line[len] = 0;
-
- mir_snprintf(buffer, sizeof(buffer), "{\\rtf1\\ansi\\deff0\\pard\\li%u\\fi-%u\\ri%u\\tx%u\\fs19 %s\\par}", 60*15, 60*15, 5*15, 60*15, Translate(line));
- text = p + 1;
-
- SendDlgItemMessageW(hWnd, IDC_HELP_RICHEDIT, EM_SETTEXTEX, (WPARAM) &tmp, (LPARAM) buffer);
- }
-
-
-}
-
-/************************************** DIALOG HANDLERS *************************************/
-#include "commctrl.h"
-
-INT_PTR CALLBACK DlgProcOpts(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
-{
- switch (msg)
- {
- case WM_INITDIALOG:
- {
- bInitializing = 1;
- lastItem = NULL;
- TranslateDialogDefault(hWnd);
- LoadRegisteredFolderSections(hWnd);
- bInitializing = 0;
-
- break;
- }
-
- case WM_COMMAND:
- {
- switch (LOWORD(wParam))
- {
- case IDC_FOLDER_EDIT:
- {
- switch (HIWORD(wParam))
- {
- case EN_CHANGE:
- {
- RefreshPreview(hWnd);
- if (!bInitializing)
- {
- SendMessage(GetParent(hWnd), PSM_CHANGED, 0, 0); //show the apply button.
- }
-
- break;
- }
- }
-
- break;
- }
-
- case IDC_REFRESH_BUTTON:
- {
- RefreshPreview(hWnd);
-
- break;
- }
-
- case IDC_HELP_BUTTON:
- {
- HWND helpDlg = CreateDialogW(hInstance, MAKEINTRESOURCEW(IDD_VARIABLES_HELP), hWnd, DlgProcVariables);
- ShowWindow(helpDlg, SW_SHOW);
-
- break;
- }
-
- case IDC_FOLDERS_SECTIONS_LIST:
- {
- switch (HIWORD(wParam))
- {
- case LBN_SELCHANGE:
- {
- CheckForChanges(hWnd);
- LoadRegisteredFolderItems(hWnd);
- lastItem = NULL;
- SetEditTextW(hWnd, L"");
- RefreshPreview(hWnd);
-
- break;
- }
- }
-
- break;
- }
-
- case IDC_FOLDERS_ITEMS_LIST:
- {
- switch (HIWORD(wParam))
- {
- case LBN_SELCHANGE:
- {
- PFolderItem item = GetSelectedItem(hWnd);
- if (item != NULL)
- {
- CheckForChanges(hWnd);
- LoadItem(hWnd, item);
- }
- lastItem = item;
-
- break;
- }
- }
-
- break;
- }
- }
-
- break;
- }
-
- case WM_NOTIFY:
- {
-// Log("WM_NOTIFY %d %d", wParam, lParam);
- switch(((LPNMHDR)lParam)->idFrom)
- {
- case 0:
- switch (((LPNMHDR)lParam)->code)
- {
- case PSN_APPLY:
- {
- PFolderItem item = GetSelectedItem(hWnd);
- if (item)
- {
- SaveItem(hWnd, item, FALSE);
- LoadItem(hWnd, item);
- }
-
- lstRegisteredFolders.Save();
- CallPathChangedEvents();
-
- break;
- }
- }
-
- break;
- }
- }
-
- break;
-
- default:
- {
-
- break;
- }
- }
-
- return 0;
-}
-
-INT_PTR CALLBACK DlgProcVariables(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
-{
- switch (msg)
- {
- case WM_INITDIALOG:
- {
- TranslateDialogDefault(hWnd);
- LoadHelp(hWnd);
-
- break;
- }
-
- case WM_CLOSE:
- {
- DestroyWindow(hWnd);
-
- break;
- }
-
- case WM_COMMAND:
- {
- switch (LOWORD(wParam))
- {
- case IDCLOSE:
- {
- DestroyWindow(hWnd);
-
- break;
- }
- }
-
- break;
- }
- }
-
- return 0;
-}
\ No newline at end of file diff --git a/plugins/Folders/folders/dlg_handlers.h b/plugins/Folders/folders/dlg_handlers.h deleted file mode 100644 index 4f3a4f15ca..0000000000 --- a/plugins/Folders/folders/dlg_handlers.h +++ /dev/null @@ -1,28 +0,0 @@ -#ifndef M_FOLDERS_DLG_HANDLERS_H
-#define M_FOLDERS_DLG_HANDLERS_H
-
-//#include "commonheaders.h"
-#include "services.h"
-#include "events.h"
-#include <richedit.h>
-
-INT_PTR CALLBACK DlgProcOpts(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
-INT_PTR CALLBACK DlgProcVariables(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
-
-int GetCurrentItemSelection(HWND hWnd);
-int GetCurrentSectionSelection(HWND hWnd);
-PFolderItem GetSelectedItem(HWND hWnd);
-int GetCurrentSectionText(HWND hWnd, WCHAR *buffer, int count);
-int GetCurrentItemText(HWND hWnd, WCHAR *buffer, int count);
-//void GetEditText(HWND hWnd, char *buffer, int size);
-void GetEditTextW(HWND hWnd, wchar_t *buffer, int size);
-//void SetEditText(HWND hWnd, const char *buffer);
-void SetEditTextW(HWND hWnd, const wchar_t *buffer);
-void LoadRegisteredFolderSections(HWND hWnd);
-void LoadRegisteredFolderItems(HWND hWnd);
-void LoadItem(HWND hWnd, PFolderItem item);
-void SaveItem(HWND hWnd, PFolderItem item, int bEnableApply = TRUE);
-int ChangesNotSaved(HWND hWnd);
-void RefreshPreview(HWND hWnd);
-
-#endif //M_FOLDERS_DLG_HANDLERS_H
\ No newline at end of file diff --git a/plugins/Folders/folders/events.cpp b/plugins/Folders/folders/events.cpp deleted file mode 100644 index 359ac81bf4..0000000000 --- a/plugins/Folders/folders/events.cpp +++ /dev/null @@ -1,41 +0,0 @@ -/*
-Custom profile folders plugin for Miranda IM
-
-Copyright © 2005 Cristian Libotean
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-#include "events.h"
-
-HANDLE hPathChanged;
-
-int InitEvents()
-{
- hPathChanged = CreateHookableEvent(ME_FOLDERS_PATH_CHANGED);
- return 0;
-}
-
-int DestroyEvents()
-{
- DestroyHookableEvent(hPathChanged);
- hPathChanged = 0;
- return 0;
-}
-
-int CallPathChangedEvents()
-{
- return NotifyEventHooks(hPathChanged, 0, 0);
-}
\ No newline at end of file diff --git a/plugins/Folders/folders/events.h b/plugins/Folders/folders/events.h deleted file mode 100644 index 8f73ee7cfe..0000000000 --- a/plugins/Folders/folders/events.h +++ /dev/null @@ -1,36 +0,0 @@ -/*
-Custom profile folders plugin for Miranda IM
-
-Copyright © 2005 Cristian Libotean
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-#ifndef M_FOLDERS_EVENTS_H
-#define M_FOLDERS_EVENTS_H
-
-#include "commonheaders.h"
-#include "m_folders.h"
-
-extern HANDLE hPathChanged;
-
-int InitEvents();
-int DestroyEvents();
-
-int CallPathChangedEvents();
-
-
-
-#endif //M_FOLDERS_EVENTS_H
\ No newline at end of file diff --git a/plugins/Folders/folders/folderItem.cpp b/plugins/Folders/folders/folderItem.cpp deleted file mode 100644 index cf58e5feac..0000000000 --- a/plugins/Folders/folders/folderItem.cpp +++ /dev/null @@ -1,250 +0,0 @@ -/*
-Custom profile folders plugin for Miranda IM
-
-Copyright © 2005 Cristian Libotean
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-#include "folderItem.h"
-#include "commonheaders.h"
-#include "services.h"
-
-CFolderItem::CFolderItem(const char *sectionName, const char *name, const char *format, const DWORD flags)
-{
- strncpy(szSection, sectionName, sizeof(szSection));
- szFormat = NULL;
- szOldFormat = NULL;
- szFormatW = NULL;
- szOldFormatW = NULL;
- strncpy(szName, name, sizeof(szName));
- this->flags = flags;
- GetDataFromDatabase(format);
- FolderCreateDirectory();
-}
-
-void MyFree(void *data)
-{
- if (data)
- {
- free(data);
- }
-}
-
-CFolderItem::~CFolderItem()
-{
-// WriteDataToDatabase();
- if (IsUnicode())
- {
- MyFree(szFormatW);
- MyFree(szOldFormatW);
- }
- else{
- MyFree(szFormat);
- MyFree(szOldFormat);
- }
-}
-
-const char *CFolderItem::GetSection() const
-{
- return szSection;
-}
-
-const char *CFolderItem::GetName() const
-{
- return szName;
-}
-
-const char *CFolderItem::GetFormat() const
-{
- return szFormat;
-}
-
-const wchar_t *CFolderItem::GetFormatW() const
-{
- return szFormatW;
-}
-
-void CFolderItem::SetFormat(const char *newFormat)
-{
- MyFree(szOldFormat);
- szOldFormat = szFormat;
- szFormat = _strdup((strlen(newFormat) > 0) ? newFormat : MIRANDA_PATH);
-}
-
-void CFolderItem::SetFormatW(const wchar_t *newFormat)
-{
- MyFree(szOldFormatW);
- szOldFormatW = szFormatW;
- szFormatW = _wcsdup((wcslen(newFormat) > 0) ? newFormat : MIRANDA_PATHW);
-}
-
-int CFolderItem::IsUnicode() const
-{
- return (flags & FF_UNICODE);
-}
-
-int CFolderItem::IsEqual(const CFolderItem *other)
-{
- return (IsEqual(other->GetSection(), other->GetName()));
-}
-
-int CFolderItem::IsEqual(const char *section, const char *name)
-{
- return ((strcmp(szName, name) == 0) && (strcmp(szSection, section) == 0));
-}
-
-int CFolderItem::IsEqualTranslated(const char *trSection, const char *trName)
-{
- return ((strcmp(Translate(szName), trName) == 0) && (strcmp(Translate(szSection), trSection) == 0));
-}
-
-int CFolderItem::operator ==(const CFolderItem *other)
-{
- return IsEqual(other);
-}
-
-void CFolderItem::Expand(char *buffer, int size)
-{
- if (IsUnicode())
- {
- ExpandPathW((wchar_t *) buffer, szFormatW, size);
- }
- else{
- ExpandPath(buffer, szFormat, size);
- }
-}
-
-void CFolderItem::Save()
-{
- int res = FolderDeleteOldDirectory(FALSE);
- //FolderCreateDirectory(!res);
- FolderCreateDirectory(FALSE);
- WriteDataToDatabase();
-}
-
-int CFolderItem::FolderCreateDirectory(int showFolder)
-{
- int res = FOLDER_SUCCESS;
- if (IsUnicode())
- {
- wchar_t buffer[MAX_FOLDER_SIZE];
- if (szFormatW)
- {
- ExpandPathW(buffer, szFormatW, MAX_FOLDER_SIZE);
- CreateDirectories(buffer);
- if (showFolder)
- {
- ShellExecuteW(NULL, L"explore", buffer, NULL, NULL, SW_SHOW);
- }
- res = (DirectoryExists(buffer)) ? FOLDER_SUCCESS : FOLDER_FAILURE;
- }
- }
- else{
- char buffer[MAX_FOLDER_SIZE];
- if (szFormat)
- {
- ExpandPath(buffer, szFormat, MAX_FOLDER_SIZE);
- CreateDirectories(buffer);
- if (showFolder)
- {
- ShellExecuteA(NULL, "explore", buffer, NULL, NULL, SW_SHOW);
- }
- res = (DirectoryExists(buffer)) ? FOLDER_SUCCESS : FOLDER_FAILURE;
- }
- }
- return res;
-}
-
-int CFolderItem::FolderDeleteOldDirectory(int showFolder)
-{
- int res = FOLDER_SUCCESS;
- if (IsUnicode())
- {
- wchar_t buffer[MAX_FOLDER_SIZE];
- if (szOldFormatW)
- {
- if (wcscmp(szFormatW, szOldFormatW) == 0) //format wasn't changed
- {
- return res;
- }
- ExpandPathW(buffer, szOldFormatW, MAX_FOLDER_SIZE);
- RemoveDirectories(buffer);
- res = (DirectoryExists(buffer)) ? FOLDER_FAILURE : FOLDER_SUCCESS;
- if ((res == FOLDER_FAILURE) && (showFolder))
- {
- ShellExecuteW(NULL, L"explore", buffer, NULL, NULL, SW_SHOW);
- }
- }
- }
- else{
- char buffer[MAX_FOLDER_SIZE];
- if (szOldFormat)
- {
- if (strcmp(szFormat, szOldFormat) == 0) //format wasn't changed
- {
- return res;
- }
- ExpandPath(buffer, szOldFormat, MAX_FOLDER_SIZE);
- RemoveDirectories(buffer);
- res = (DirectoryExists(buffer)) ? FOLDER_FAILURE : FOLDER_SUCCESS;
- if ((res == FOLDER_FAILURE) && (showFolder))
- {
- ShellExecuteA(NULL, "explore", buffer, NULL, NULL, SW_SHOW);
- }
- }
- }
- return res;
-}
-
-void CFolderItem::GetDataFromDatabase(const char *szNotFound)
-{
- char name[256];
- strcpy(name, szSection);
- strcat(name, szName);
-
- if (IsUnicode())
- {
- wchar_t buffer[MAX_FOLDER_SIZE];
- GetStringFromDatabase(name, (const wchar_t *) szNotFound, buffer, MAX_FOLDER_SIZE);
- SetFormatW(buffer);
- }
- else{
- char buffer[MAX_FOLDER_SIZE];
- GetStringFromDatabase(name, szNotFound, buffer, MAX_FOLDER_SIZE);
- SetFormat(buffer);
- }
-}
-
-void CFolderItem::WriteDataToDatabase()
-{
- char name[256];
- strcpy(name, szSection);
- strcat(name, szName);
-
- if (IsUnicode())
- {
- if (szFormatW)
- {
- WriteStringToDatabase(name, szFormatW);
- }
- }
- else{
- if (szFormat)
- {
- WriteStringToDatabase(name, szFormat);
- }
- }
-}
\ No newline at end of file diff --git a/plugins/Folders/folders/folderItem.h b/plugins/Folders/folders/folderItem.h deleted file mode 100644 index b60891c2ff..0000000000 --- a/plugins/Folders/folders/folderItem.h +++ /dev/null @@ -1,78 +0,0 @@ -/*
-Custom profile folders plugin for Miranda IM
-
-Copyright © 2005 Cristian Libotean
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-#ifndef M_FOLDERS_FOLDER_ITEM_H
-#define M_FOLDERS_FOLDER_ITEM_H
-
-#include <string.h>
-#include <malloc.h>
-#include <windows.h>
-
-#define FOLDERS_NO_HELPER_FUNCTIONS
-#include "m_folders.h"
-#undef FOLDERS_NO_HELPER_FUNCTIONS
-
-
-#define FOLDER_SUCCESS 1
-#define FOLDER_FAILURE 0
-
-class CFolderItem{
- protected:
- char szSection[FOLDERS_NAME_MAX_SIZE];
- char szName[FOLDERS_NAME_MAX_SIZE]; //don't forget to modify in m_folders.h
- union{
- char *szFormat;
- wchar_t *szFormatW;
- };
- union{
- char *szOldFormat;
- wchar_t *szOldFormatW;
- };
- DWORD flags;
-
- void GetDataFromDatabase(const char *szNotFound);
- void WriteDataToDatabase();
-
- int FolderCreateDirectory(int showFolder = 0);
- int FolderDeleteOldDirectory(int showFolder = 0);
-
- public:
- CFolderItem(const char *sectionName, const char *name, const char *format, const DWORD flags);
- virtual ~CFolderItem();
- void Expand(char *buffer, int size);
- void Save();
-
- int IsUnicode() const;
- int IsEqual(const CFolderItem *other);
- int IsEqual(const char *section, const char *name);
- int IsEqualTranslated(const char *trSection, const char *trName);
- int operator ==(const CFolderItem *other);
-
- const char *GetSection() const;
- const char *GetName() const;
- const char *GetFormat() const;
- const wchar_t *GetFormatW() const;
- void SetFormat(const char *newFormat);
- void SetFormatW(const wchar_t *newFormat);
-};
-
-typedef CFolderItem *PFolderItem;
-
-#endif //M_FOLDERS_FOLDER_ITEM_H
\ No newline at end of file diff --git a/plugins/Folders/folders/folders.cpp b/plugins/Folders/folders/folders.cpp deleted file mode 100644 index 4628f2ffbc..0000000000 --- a/plugins/Folders/folders/folders.cpp +++ /dev/null @@ -1,246 +0,0 @@ -/*
-Custom profile folders plugin for Miranda IM
-
-Copyright © 2005 Cristian Libotean
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-#include "commonheaders.h"
-#include "hooked_events.h"
-#include "services.h"
-#include "events.h"
-
-#include "m_folders.h"
-
-#define MS_FOLDERS_TEST_PLUGIN "Folders/Test/Plugin"
-
-char ModuleName[] = "Folders";
-HINSTANCE hInstance;
-int hLangpack;
-struct MM_INTERFACE mmi;
-
-CFoldersList &lstRegisteredFolders = CFoldersList(10); //the list
-
-PLUGINLINK *pluginLink;
-
-PLUGININFOEX pluginInfo = {
- sizeof(PLUGININFOEX),
- __PLUGIN_DISPLAY_NAME,
- VERSION,
- __DESC,
- __AUTHOR,
- __AUTHOREMAIL,
- __COPYRIGHT,
- __AUTHORWEB,
- 1,
- 0,
- {0x2f129563, 0x2c7d, 0x4a9a, {0xb9, 0x48, 0x97, 0xdf, 0xcc, 0x0a, 0xfd, 0xd7}} //{2f129563-2c7d-4a9a-b948-97dfcc0afdd7}
-}; //not used
-
-OLD_MIRANDAPLUGININFO_SUPPORT;
-
-#ifdef _DEBUG
-
-typedef struct{
- int cbSize; //size of struct
- int nUniqueID; //unique id for this path. This ID should be unique for your plugin.
- char szName[FOLDERS_NAME_MAX_SIZE]; //name to show in options
-} FOLDERSDATA_OLD;
-
-INT_PTR TestPlugin(WPARAM wParam, LPARAM lParam)
-{
- char temp[MAX_PATH];
- const int MAX = 20;
- int i;
- HANDLE handles[MAX][2];
-/* FOLDERSDATA caca;
- caca.cbSize = sizeof(caca);
- caca.szFormat = FOLDER_LOGS;*/
- char *section;
- for (i = 0; i < MAX; i++)
- {
- switch (i % 4)
- {
- case 0:
- section = "Section 1";
- break;
- case 1:
- section = "Section 2";
- break;
- case 2:
- section = "Yet another section";
- break;
- case 3:
- section = "Section no 4";
- break;
- default:
- section = "Uhh ohh";
- break;
- }
- //strcpy(caca.szSection, section);
- _itoa(i, temp, 10);
- //strcpy(caca.szName, temp);
-
- handles[i][0] = FoldersRegisterCustomPathT(section, temp, FOLDER_LOGS); //CallService(MS_FOLDERS_REGISTER_PATH, 0, (LPARAM) &caca);
- }
- //caca.szFormatW = L"%profile_path%\\%current_profile%\\Ø";
- //caca.flags = FF_UNICODE;
- FoldersRegisterCustomPath("Unicode stuff", "non unicode", " %profile_path%\\%current_profile%\\Ø\\\\\\");
- for (i = 0; i < MAX; i++)
- {
- //strcpy(caca.szSection, "Unicode stuff");
- sprintf(temp, "Value %d", i);
- //strcpy(caca.szName, temp);
- handles[i][1] = FoldersRegisterCustomPathW("Unicode stuff", temp, L"%profile_path%\\%current_profile%\\\u1FA6"); //CallService(MS_FOLDERS_REGISTER_PATH, 0, (LPARAM) &caca);
- }
-/*
- FOLDERSAPPENDDATA data;
- data.hRegisteredPath = handles[0];
- data.szAppendData = "just an appended string";
- char *cacat;
- CallService(MS_FOLDERS_GET_PATH_ALLOC_APPEND, (WPARAM) &data, (LPARAM) &cacat);
- Log("Append function returned : %s", cacat); */
- /*FOLDERSGETDATA data = {0};
- data.cbSize = sizeof(data);
- data.nMaxPathSize = sizeof(temp);
- data.szPath = temp; */
- for (i = 0; i < MAX; i++)
- {
- //CallService(MS_FOLDERS_GET_PATH, handles[i][0], (LPARAM) &data);
- FoldersGetCustomPath((HANDLE) handles[i][0], temp, sizeof(temp), "<not found>");
- Log("Path function[%d] returned : %s", i, temp);
- }
- wchar_t buffer[MAX_PATH];
- //data.szPathW = buffer;
- for (i = 0; i < MAX; i++)
- {
- //CallService(MS_FOLDERS_GET_PATH, handles[i][0], (LPARAM) &data);
- FoldersGetCustomPathW((HANDLE) handles[i][1], buffer, MAX_PATH, L"<not found>");
- Log("Unicode path function[%d] returned: %S", i, buffer);
- }
-// GetPathService(CONFIGURATION_PATH, (LPARAM) temp);
-// GetPathAllocService(AVATARS_PATH, (LPARAM) &caca);
-
-
- for (i = 0; i < MAX; i++)
- {
- FoldersGetCustomPathEx((HANDLE) handles[i][0], temp, sizeof(temp), "<not found>", "test");
- Log("Path function Ex (test) [%d] returned : %s", i, temp);
- FoldersGetCustomPathEx((HANDLE) handles[i][0], temp, sizeof(temp), "<not found>", "");
- Log("Path function Ex () [%d] returned : %s", i, temp);
- FoldersGetCustomPathEx((HANDLE) handles[i][0], temp, sizeof(temp), "<not found>", NULL);
- Log("Path function Ex (NULL) [%d] returned : %s", i, temp);
- }
-
- for (i = 0; i < MAX; i++)
- {
- FoldersGetCustomPathExW((HANDLE) handles[i][1], buffer, MAX_PATH, L"<not found>", L"test");
- Log("Unicode path function Ex (test) [%d] returned : %S", i, buffer);
- FoldersGetCustomPathExW((HANDLE) handles[i][1], buffer, MAX_PATH, L"<not found>", L"");
- Log("Unicode path function Ex () [%d] returned : %S", i, buffer);
- FoldersGetCustomPathExW((HANDLE) handles[i][1], buffer, MAX_PATH, L"<not found>", NULL);
- Log("Unicode path function Ex (NULL) [%d] returned : %S", i, buffer);
- }
-
- return 0;
-}
-
-HANDLE hTestPlugin;
-#endif
-
-extern "C" __declspec(dllexport) PLUGININFOEX *MirandaPluginInfoEx(DWORD mirandaVersion)
-{
-#if _MSC_VER >= 1300
- Log("%s", "Entering function " __FUNCTION__);
- Log("%s", "Leaving function " __FUNCTION__);
-#endif
- pluginInfo.cbSize = sizeof(PLUGININFOEX);
- return &pluginInfo;
-}
-
-static const MUUID interfaces[] = {MIID_FOLDERS, MIID_LAST};
-
-extern "C" __declspec(dllexport) const MUUID *MirandaPluginInterfaces()
-{
- return interfaces;
-}
-
-extern "C" int __declspec(dllexport) Load(PLUGINLINK *link)
-{
-#if _MSC_VER >= 1300
- Log("%s", "Entering function " __FUNCTION__);
-#endif
- pluginLink = link;
- mir_getLP(&pluginInfo);
- mir_getMMI(&mmi);
-
- Log("%s", "Creating service functions ...");
- InitServices();
- InitEvents();
-
-#ifdef _DEBUG
- hTestPlugin = CreateServiceFunction(MS_FOLDERS_TEST_PLUGIN, TestPlugin);
- CLISTMENUITEM mi = {0};
-
- mi.cbSize=sizeof(mi);
- mi.position=300050000;
- mi.flags=0;
- mi.hIcon=0;
- mi.pszName=Translate("Test folders");
- mi.pszService=MS_FOLDERS_TEST_PLUGIN;
- CallService(MS_CLIST_ADDMAINMENUITEM,0,(LPARAM)&mi);
-#endif
-#if _MSC_VER >= 1300
- Log("%s", "Hooking events ...");
-#endif
- HookEvents();
-#if _MSC_VER >= 1300
- Log("%s", "Leaving function " __FUNCTION__);
-#endif
- return 0;
-}
-
-extern "C" int __declspec(dllexport) Unload()
-{
-#if _MSC_VER >= 1300
- Log("%s", "Entering function " __FUNCTION__);
- Log("%s", "Unhooking events ...");
-
- Log("%s", "Destroying service functions ...");
-#endif
-// DestroyServiceFunction(MS_HISTORY_SHOWCONTACTHISTORY);
- DestroyServices();
- DestroyEvents();
- UnhookEvents();
-#ifdef _DEBUG
- DestroyServiceFunction(hTestPlugin);
-#endif
-
-#if _MSC_VER >= 1300
- Log("%s", "Leaving function " __FUNCTION__);
-#endif
- return 0;
-}
-
-bool WINAPI DllMain(HINSTANCE hinstDLL,DWORD fdwReason,LPVOID lpvReserved)
-{
- hInstance = hinstDLL;
- if (fdwReason == DLL_PROCESS_ATTACH)
- {
- DisableThreadLibraryCalls(hinstDLL);
- }
- return TRUE;
-}
\ No newline at end of file diff --git a/plugins/Folders/folders/folders.rc b/plugins/Folders/folders/folders.rc deleted file mode 100644 index b87bcd9447..0000000000 --- a/plugins/Folders/folders/folders.rc +++ /dev/null @@ -1,129 +0,0 @@ -// Microsoft Visual C++ generated resource script.
-//
-#include "resource.h"
-
-#define APSTUDIO_READONLY_SYMBOLS
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 2 resource.
-//
-#include "afxres.h"
-
-/////////////////////////////////////////////////////////////////////////////
-#undef APSTUDIO_READONLY_SYMBOLS
-
-/////////////////////////////////////////////////////////////////////////////
-// English (U.S.) resources
-
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
-#ifdef _WIN32
-LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
-#pragma code_page(1252)
-#endif //_WIN32
-
-#ifdef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// TEXTINCLUDE
-//
-
-1 TEXTINCLUDE
-BEGIN
- "resource.h\0"
-END
-
-2 TEXTINCLUDE
-BEGIN
- "#include ""afxres.h""\r\n"
- "\0"
-END
-
-3 TEXTINCLUDE
-BEGIN
- "\r\n"
- "\0"
-END
-
-#endif // APSTUDIO_INVOKED
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Dialog
-//
-
-IDD_OPT_FOLDERS DIALOGEX 0, 0, 314, 254
-STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CONTROL | WS_POPUP | WS_CAPTION | WS_SYSMENU
-CAPTION "Dialog"
-FONT 8, "MS Shell Dlg", 400, 0, 0x1
-BEGIN
- GROUPBOX "Custom folders",IDC_FOLDERS_GROUPBOX,0,1,313,250
- LISTBOX IDC_FOLDERS_SECTIONS_LIST,14,12,77,116,LBS_SORT | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
- LISTBOX IDC_FOLDERS_ITEMS_LIST,98,12,208,116,LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
- GROUPBOX "Preview",IDC_PREVIEW_GROUPBOX,6,131,300,55
- EDITTEXT IDC_PREVIEW_EDIT,14,143,284,35,ES_MULTILINE | ES_AUTOHSCROLL | ES_READONLY | WS_VSCROLL | NOT WS_TABSTOP
- GROUPBOX "Edit",IDC_EDIT_FOLDER_GROUPBOX,6,189,300,58
- EDITTEXT IDC_FOLDER_EDIT,14,202,284,14,ES_AUTOHSCROLL
- PUSHBUTTON "Refresh preview",IDC_REFRESH_BUTTON,14,227,71,14
- PUSHBUTTON "Variables help",IDC_HELP_BUTTON,231,227,67,14
-END
-
-IDD_VARIABLES_HELP DIALOGEX 0, 0, 449, 237
-STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
-CAPTION "Custom folders variables help"
-FONT 8, "MS Shell Dlg", 400, 0, 0x1
-BEGIN
- DEFPUSHBUTTON "Close",IDCLOSE,392,216,50,14
- CONTROL "",IDC_HELP_RICHEDIT,"RichEdit20A",ES_MULTILINE | ES_AUTOHSCROLL | ES_READONLY | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP,7,7,435,203
-END
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// DESIGNINFO
-//
-
-#ifdef APSTUDIO_INVOKED
-GUIDELINES DESIGNINFO
-BEGIN
- IDD_OPT_FOLDERS, DIALOG
- BEGIN
- RIGHTMARGIN, 313
- VERTGUIDE, 6
- VERTGUIDE, 14
- VERTGUIDE, 298
- VERTGUIDE, 306
- TOPMARGIN, 1
- BOTTOMMARGIN, 251
- HORZGUIDE, 12
- HORZGUIDE, 128
- HORZGUIDE, 202
- HORZGUIDE, 241
- HORZGUIDE, 247
- END
-
- IDD_VARIABLES_HELP, DIALOG
- BEGIN
- LEFTMARGIN, 7
- RIGHTMARGIN, 442
- TOPMARGIN, 7
- BOTTOMMARGIN, 230
- END
-END
-#endif // APSTUDIO_INVOKED
-
-#endif // English (U.S.) resources
-/////////////////////////////////////////////////////////////////////////////
-
-
-
-#ifndef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 3 resource.
-//
-
-
-/////////////////////////////////////////////////////////////////////////////
-#endif // not APSTUDIO_INVOKED
-
diff --git a/plugins/Folders/folders/folders.vcxproj b/plugins/Folders/folders/folders.vcxproj deleted file mode 100644 index 74871aec39..0000000000 --- a/plugins/Folders/folders/folders.vcxproj +++ /dev/null @@ -1,218 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{019FAEBD-BD7B-4470-A15B-A7DB1787E6BD}</ProjectGuid>
- <RootNamespace>folders</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- <ProjectName>Folders</ProjectName>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)/Plugins\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)/Obj/$(ProjectName)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Configuration)64/Plugins\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Configuration)64/Obj/$(ProjectName)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)/Plugins\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)/Obj/$(ProjectName)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Configuration)64/Plugins\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Configuration)64/Obj/$(ProjectName)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>../../../include;../../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_WINDOWS;_USRDLL;FOLDERS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <BrowseInformation>
- </BrowseInformation>
- <WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <CompileAs>CompileAsCpp</CompileAs>
- </ClCompile>
- <Link>
- <AdditionalDependencies>unicows.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <GenerateMapFile>false</GenerateMapFile>
- <SubSystem>Windows</SubSystem>
- <BaseAddress>0x2F000000</BaseAddress>
- <TargetMachine>MachineX86</TargetMachine>
- <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>../../../include;../../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN64;_DEBUG;_WINDOWS;_USRDLL;FOLDERS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <BrowseInformation>
- </BrowseInformation>
- <WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <CompileAs>CompileAsCpp</CompileAs>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <GenerateMapFile>false</GenerateMapFile>
- <SubSystem>Windows</SubSystem>
- <BaseAddress>0x2F000000</BaseAddress>
- <TargetMachine>MachineX64</TargetMachine>
- <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <Optimization>Full</Optimization>
- <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
- <AdditionalIncludeDirectories>../../../include;../../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_WINDOWS;_USRDLL;FOLDERS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <BrowseInformation>
- </BrowseInformation>
- <WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
- </ClCompile>
- <Link>
- <AdditionalDependencies>unicows.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Windows</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <BaseAddress>0x2F000000</BaseAddress>
- <TargetMachine>MachineX86</TargetMachine>
- <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Full</Optimization>
- <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
- <AdditionalIncludeDirectories>../../../include;../../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN64;NDEBUG;_WINDOWS;_USRDLL;FOLDERS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <BrowseInformation>
- </BrowseInformation>
- <WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Windows</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <BaseAddress>0x2F000000</BaseAddress>
- <TargetMachine>MachineX64</TargetMachine>
- <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="dlg_handlers.cpp" />
- <ClCompile Include="events.cpp" />
- <ClCompile Include="folderItem.cpp" />
- <ClCompile Include="folders.cpp" />
- <ClCompile Include="foldersList.cpp" />
- <ClCompile Include="hooked_events.cpp" />
- <ClCompile Include="services.cpp" />
- <ClCompile Include="utils.cpp" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="commonheaders.h" />
- <ClInclude Include="dlg_handlers.h" />
- <ClInclude Include="events.h" />
- <ClInclude Include="folderItem.h" />
- <ClInclude Include="foldersList.h" />
- <ClInclude Include="hooked_events.h" />
- <ClInclude Include="resource.h" />
- <ClInclude Include="services.h" />
- <ClInclude Include="utils.h" />
- <ClInclude Include="version.h" />
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="folders.rc" />
- <ResourceCompile Include="version.rc" />
- </ItemGroup>
- <ItemGroup>
- <None Include="variablesHelp.inc" />
- <None Include="..\docs\folders_readme.txt" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project>
\ No newline at end of file diff --git a/plugins/Folders/folders/folders.vcxproj.filters b/plugins/Folders/folders/folders.vcxproj.filters deleted file mode 100644 index 2590b3f380..0000000000 --- a/plugins/Folders/folders/folders.vcxproj.filters +++ /dev/null @@ -1,89 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
- <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Resource Files">
- <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
- <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="dlg_handlers.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="events.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="folderItem.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="folders.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="foldersList.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="hooked_events.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="services.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="utils.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="commonheaders.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="dlg_handlers.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="events.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="folderItem.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="foldersList.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="hooked_events.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="resource.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="services.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="utils.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="version.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="folders.rc">
- <Filter>Resource Files</Filter>
- </ResourceCompile>
- <ResourceCompile Include="version.rc">
- <Filter>Resource Files</Filter>
- </ResourceCompile>
- </ItemGroup>
- <ItemGroup>
- <None Include="variablesHelp.inc">
- <Filter>Resource Files</Filter>
- </None>
- <None Include="..\docs\folders_readme.txt" />
- </ItemGroup>
-</Project>
\ No newline at end of file diff --git a/plugins/Folders/folders/foldersList.cpp b/plugins/Folders/folders/foldersList.cpp deleted file mode 100644 index b13620fe71..0000000000 --- a/plugins/Folders/folders/foldersList.cpp +++ /dev/null @@ -1,232 +0,0 @@ -/*
-Custom profile folders plugin for Miranda IM
-
-Copyright © 2005 Cristian Libotean
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-#include "foldersList.h"
-
-CFoldersList::CFoldersList(int initialSize)
-{
- capacity = 0;
- count = 0;
- list = NULL;
- Enlarge(initialSize);
-}
-
-CFoldersList::~CFoldersList()
-{
- Clear();
- free(list);
-}
-
-void CFoldersList::Clear()
-{
- int i;
- for (i = 0; i < count; i++)
- {
- delete (list[i]);
- }
-
- count = 0;
-}
-
-int CFoldersList::Count()
-{
- return count;
-}
-
-int CFoldersList::Capacity()
-{
- return capacity;
-}
-
-void CFoldersList::Save()
-{
- int i;
- for (i = 0; i < count; i++)
- {
- list[i]->Save();
- }
-}
-
-PFolderItem CFoldersList::Get(int index)
-{
- index--;
- if ((index < 0) || (index >= count))
- {
- return NULL;
- }
- return list[index];
-}
-
-PFolderItem CFoldersList::Get(const char *section, const char *name)
-{
- int i;
- for (i = 0; i < count; i++)
- {
- if (list[i]->IsEqual(section, name))
- {
- return list[i];
- }
- }
- return NULL;
-}
-
-PFolderItem CFoldersList::Get(const WCHAR *section, const WCHAR *name)
-{
- const int MAX_SIZE = 2048;
- char aSection[MAX_SIZE];
- char aName[MAX_SIZE];
- UINT cp = static_cast<UINT>(CallService(MS_LANGPACK_GETCODEPAGE, 0, 0));
-
- WideCharToMultiByte(cp, 0, section, -1, aSection, MAX_SIZE, NULL, NULL);
- WideCharToMultiByte(cp, 0, name, -1, aName, MAX_SIZE, NULL, NULL);
-
- return Get(aSection, aName);
-}
-
-PFolderItem CFoldersList::GetTranslated(const char *trSection, const char *trName)
-{
- int i;
- for (i = 0; i < count; i++)
- {
- if (list[i]->IsEqualTranslated(trSection, trName))
- {
- return list[i];
- }
- }
-
- return NULL;
-}
-
-PFolderItem CFoldersList::GetTranslated(WCHAR *trSection, const WCHAR *trName)
-{
- const int MAX_SIZE = 2048;
- char aSection[MAX_SIZE];
- char aName[MAX_SIZE];
- UINT cp = static_cast<UINT>(CallService(MS_LANGPACK_GETCODEPAGE, 0, 0));
-
- WideCharToMultiByte(cp, 0, trSection, -1, aSection, MAX_SIZE, NULL, NULL);
- WideCharToMultiByte(cp, 0, trName, -1, aName, MAX_SIZE, NULL, NULL);
-
- return GetTranslated(aSection, aName);
-}
-
-
-int CFoldersList::Expand(int index, char *szResult, int size)
-{
- PFolderItem tmp = Get(index);
- int res = 1;
- if (tmp)
- {
- tmp->Expand(szResult, size);
- res = 0;
- }
- else{
- memset(szResult, 0, size);
- }
- return res;
-}
-
-int CFoldersList::Add(CFolderItem *item)
-{
- EnsureCapacity();
- int pos = Contains(item);
- if (!pos)
- {
- list[count++] = item;
- return count;
- }
- else{
- delete item;
- return pos;
- }
- return 0;
-}
-
-int CFoldersList::Add(FOLDERSDATA data)
-{
- CFolderItem *item;
- if (data.flags & FF_UNICODE)
- {
- item = new CFolderItem(data.szSection, data.szName, (char *) data.szFormatW, data.flags);
- }
- else{
- item = new CFolderItem(data.szSection, data.szName, data.szFormat, data.flags);
- }
- return Add(item);
-}
-
-void CFoldersList::Remove(CFolderItem *item)
-{
-// Remove(item->GetUniqueID());
-}
-
-void CFoldersList::Remove(int uniqueID)
-{
-/* int i, j;
- CFolderItem *tmp;
- for (i = 0; i < count; i++)
- {
- if (list[i]->GetUniqueID() == uniqueID)
- {
- tmp = list[i];
- for (j = i; j < count - 1; j++)
- {
- list[j] = list[j + 1];
- }
- count--;
- delete tmp;
- return;
- }
- }
-*/
-}
-
-int CFoldersList::Contains(CFolderItem *item)
-{
- return Contains(item->GetSection(), item->GetName());
-}
-
-int CFoldersList::Contains(const char *section, const char *name)
-{
- int i;
- for (i = 0; i < count; i++)
- {
- if (list[i]->IsEqual(section, name))
- {
- return i + 1;
- }
- }
- return 0;
-}
-
-void CFoldersList::EnsureCapacity()
-{
- if (count >= capacity)
- {
- Enlarge(capacity / 2);
- }
-}
-
-void CFoldersList::Enlarge(int increaseAmount)
-{
- int newSize = capacity + increaseAmount;
- list = (PFolderItem *) realloc(list, newSize * sizeof(PFolderItem));
- capacity = newSize;
-}
\ No newline at end of file diff --git a/plugins/Folders/folders/foldersList.h b/plugins/Folders/folders/foldersList.h deleted file mode 100644 index 854249b3a3..0000000000 --- a/plugins/Folders/folders/foldersList.h +++ /dev/null @@ -1,69 +0,0 @@ -/*
-Custom profile folders plugin for Miranda IM
-
-Copyright © 2005 Cristian Libotean
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-#ifndef M_FOLDERS_LIST_H
-#define M_FOLDERS_LIST_H
-
-#include <string.h>
-#include <malloc.h>
-
-#include "folderItem.h"
-
-#define FOLDERS_NO_HELPER_FUNCTIONS
-#include "m_folders.h"
-#undef FOLDERS_NO_HELPER_FUNCTIONS
-#include "newpluginapi.h"
-#include "m_langpack.h"
-
-class CFoldersList{
- protected:
- PFolderItem *list; //the list
- int count;
- int capacity;
-
- void Enlarge(int increaseAmount);
- void EnsureCapacity();
-
- public:
- CFoldersList(int initialSize = 10);
- virtual ~CFoldersList();
-
- void Clear();
- int Add(CFolderItem *item);
- int Add(FOLDERSDATA data);
- void Remove(CFolderItem *item);
- void Remove(int uniqueID);
- int Contains(CFolderItem *item);
- int Contains(const char *section, const char *name);
-
- int Count();
- int Capacity();
-
- PFolderItem Get(int index);
- PFolderItem Get(const char *section, const char *name);
- PFolderItem Get(const WCHAR *section, const WCHAR *name);
- PFolderItem GetTranslated(const char *trSection, const char *trName);
- PFolderItem GetTranslated(WCHAR *trSection, const WCHAR *trName);
- int Expand(int index, char *szResult, int size);
- void Save();
-};
-
-
-#endif
\ No newline at end of file diff --git a/plugins/Folders/folders/hooked_events.cpp b/plugins/Folders/folders/hooked_events.cpp deleted file mode 100644 index 78439bb3da..0000000000 --- a/plugins/Folders/folders/hooked_events.cpp +++ /dev/null @@ -1,86 +0,0 @@ -/*
-Custom profile folders plugin for Miranda IM
-
-Copyright © 2005 Cristian Libotean
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-#include "hooked_events.h"
-#include "events.h"
-
-#define HOST "http://eblis.tla.ro/projects"
-
-#if defined(WIN64) || defined(_WIN64)
-#define FOLDERS_VERSION_URL HOST "/miranda/Folders/updater/x64/Folders.html"
-#define FOLDERS_UPDATE_URL HOST "/miranda/Folders/updater/x64/Folders.zip"
-#else
-#define FOLDERS_VERSION_URL HOST "/miranda/Folders/updater/Folders.html"
-#define FOLDERS_UPDATE_URL HOST "/miranda/Folders/updater/Folders.zip"
-#endif
-#define FOLDERS_VERSION_PREFIX "Custom profile folders version "
-
-HANDLE hModulesLoaded;
-HANDLE hOptionsInitialize;
-
-int HookEvents()
-{
- hModulesLoaded = HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded);
- hOptionsInitialize = HookEvent(ME_OPT_INITIALISE, OnOptionsInitialize);
- return 0;
-}
-
-int UnhookEvents()
-{
- UnhookEvent(hModulesLoaded);
- UnhookEvent(hOptionsInitialize);
- return 0;
-}
-
-int OnModulesLoaded(WPARAM wParam, LPARAM lParam)
-{
- char buffer[1024];
- Update update = {0};
- update.cbSize = sizeof(Update);
- update.szComponentName = __PLUGIN_DISPLAY_NAME;
- update.pbVersion = (BYTE *) CreateVersionString(VERSION, buffer);
- update.cpbVersion = (int)strlen((char *) update.pbVersion);
- update.szUpdateURL = UPDATER_AUTOREGISTER;
- update.szBetaVersionURL = FOLDERS_VERSION_URL;
- update.szBetaUpdateURL = FOLDERS_UPDATE_URL;
- update.pbBetaVersionPrefix = (BYTE *) FOLDERS_VERSION_PREFIX;
- update.cpbBetaVersionPrefix = (int)strlen(FOLDERS_VERSION_PREFIX);
- CallService(MS_UPDATE_REGISTER, 0, (LPARAM) &update);
-
- return 0;
-}
-
-int OnOptionsInitialize(WPARAM wParam, LPARAM lParam)
-{
- OPTIONSDIALOGPAGE odp = { 0 };
-
- odp.cbSize = sizeof(odp);
- odp.position = 100000000;
- odp.hInstance = hInstance;
- odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_FOLDERS);
- odp.pszTitle = Translate("Folders");
- odp.pszGroup = Translate("Customize");
- odp.groupPosition = 910000000;
- odp.flags=ODPF_BOLDGROUPS;
- odp.pfnDlgProc = DlgProcOpts;
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM)&odp);
-
- return 0;
-}
\ No newline at end of file diff --git a/plugins/Folders/folders/hooked_events.h b/plugins/Folders/folders/hooked_events.h deleted file mode 100644 index 92401e9850..0000000000 --- a/plugins/Folders/folders/hooked_events.h +++ /dev/null @@ -1,36 +0,0 @@ -/*
-Custom profile folders plugin for Miranda IM
-
-Copyright © 2005 Cristian Libotean
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-#ifndef M_FOLDERS_HOOKED_EVENTS_H
-#define M_FOLDERS_HOOKED_EVENTS_H
-
-#include "commonheaders.h"
-#include "services.h"
-
-extern HANDLE hModulesLoaded;
-extern HANDLE hOptionsInitialize;
-
-int UnhookEvents();
-int HookEvents();
-
-int OnModulesLoaded(WPARAM wParam, LPARAM lParam);
-int OnOptionsInitialize(WPARAM wParam, LPARAM lParam);
-
-#endif
\ No newline at end of file diff --git a/plugins/Folders/folders/resource.h b/plugins/Folders/folders/resource.h deleted file mode 100644 index e8ff0247cf..0000000000 --- a/plugins/Folders/folders/resource.h +++ /dev/null @@ -1,27 +0,0 @@ -//{{NO_DEPENDENCIES}}
-// Microsoft Visual C++ generated include file.
-// Used by folders.rc
-//
-#define IDD_OPT_FOLDERS 101
-#define IDD_VARIABLES_HELP 102
-#define IDC_FOLDERS_ITEMS_LIST 1002
-#define IDC_FOLDERS_GROUPBOX 1003
-#define IDC_EDIT_FOLDER_GROUPBOX 1004
-#define IDC_FOLDER_EDIT 1005
-#define IDC_REFRESH_BUTTON 1008
-#define IDC_PREVIEW_GROUPBOX 1009
-#define IDC_PREVIEW_EDIT 1010
-#define IDC_HELP_BUTTON 1011
-#define IDC_HELP_RICHEDIT 1012
-#define IDC_FOLDERS_SECTIONS_LIST 1013
-
-// Next default values for new objects
-//
-#ifdef APSTUDIO_INVOKED
-#ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NEXT_RESOURCE_VALUE 105
-#define _APS_NEXT_COMMAND_VALUE 40001
-#define _APS_NEXT_CONTROL_VALUE 1014
-#define _APS_NEXT_SYMED_VALUE 101
-#endif
-#endif
diff --git a/plugins/Folders/folders/services.cpp b/plugins/Folders/folders/services.cpp deleted file mode 100644 index f811bf2246..0000000000 --- a/plugins/Folders/folders/services.cpp +++ /dev/null @@ -1,250 +0,0 @@ -/*
-Custom profile folders plugin for Miranda IM
-
-Copyright © 2005 Cristian Libotean
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-#include "services.h"
-
-#define DEFAULT_SECTION "Unknown"
-
-char szCurrentProfilePath[MAX_FOLDERS_PATH] = {0};
-char szCurrentProfile[MAX_FOLDERS_PATH] = {0};
-char szMirandaPath[MAX_FOLDERS_PATH] = {0};
-char szUserDataPath[MAX_FOLDERS_PATH] = {0};
-
-wchar_t szCurrentProfilePathW[MAX_FOLDERS_PATH] = {0};
-wchar_t szCurrentProfileW[MAX_FOLDERS_PATH] = {0};
-wchar_t szMirandaPathW[MAX_FOLDERS_PATH] = {0};
-wchar_t szUserDataPathW[MAX_FOLDERS_PATH] = {0};
-
-HANDLE hsFoldersGetPath;
-HANDLE hsFoldersGetSize;
-HANDLE hsFoldersGetPathAlloc;
-HANDLE hsFoldersRegisterPath;
-
-int InitServices()
-{
- ServiceExists(MS_DB_GETPROFILEPATH_BASIC) ? CallService(MS_DB_GETPROFILEPATH_BASIC, sizeof(szCurrentProfilePath), (LPARAM) szCurrentProfilePath) : CallService(MS_DB_GETPROFILEPATH, sizeof(szCurrentProfilePath), (LPARAM) szCurrentProfilePath);
- CallService(MS_DB_GETPROFILENAME, sizeof(szCurrentProfile), (LPARAM) szCurrentProfile);
- char *pos = strrchr(szCurrentProfile, '.');
- szCurrentProfile[pos - szCurrentProfile] = '\0'; //remove the extension (.dat)
- GetModuleFileNameA(GetModuleHandleA(NULL), szMirandaPath, sizeof(szMirandaPath));
- pos = strrchr(szMirandaPath, '\\');
- szMirandaPath[pos - szMirandaPath] = '\0'; //remove '\miranda32.exe'
-
- char *szTemp = Utils_ReplaceVars("%miranda_userdata%");
- mir_snprintf(szUserDataPath, MAX_FOLDERS_PATH, szTemp);
- mir_free(szTemp);
-
- MultiByteToWideChar(CP_ACP, 0, szCurrentProfilePath, -1, szCurrentProfilePathW, MAX_FOLDERS_PATH);
- MultiByteToWideChar(CP_ACP, 0, szCurrentProfile, -1, szCurrentProfileW, MAX_FOLDERS_PATH);
- MultiByteToWideChar(CP_ACP, 0, szMirandaPath, -1, szMirandaPathW, MAX_FOLDERS_PATH);
- MultiByteToWideChar(CP_ACP, 0, szUserDataPath, -1, szUserDataPathW, MAX_FOLDERS_PATH);
-
- hsFoldersGetPath = CreateServiceFunction(MS_FOLDERS_GET_PATH, GetPathService);
-// CreateServiceFunction(MS_FOLDERS_GET_PATH_APPEND, GetPathAppendService);
- hsFoldersGetSize = CreateServiceFunction(MS_FOLDERS_GET_SIZE, GetPathSizeService);
- hsFoldersGetPathAlloc = CreateServiceFunction(MS_FOLDERS_GET_PATH_ALLOC, GetPathAllocService);
-// CreateServiceFunction(MS_FOLDERS_GET_PATH_ALLOC_APPEND, GetPathAllocAppendService);
- hsFoldersRegisterPath = CreateServiceFunction(MS_FOLDERS_REGISTER_PATH, RegisterPathService);
-
- return 0;
-}
-
-int DestroyServices()
-{
- DestroyServiceFunction(hsFoldersGetPath);
-// DestroyServiceFunction(MS_FOLDERS_GET_PATH_APPEND);
- DestroyServiceFunction(hsFoldersGetSize);
- DestroyServiceFunction(hsFoldersGetPathAlloc);
-// DestroyServiceFunction(MS_FOLDERS_GET_PATH_ALLOC_APPEND);
- DestroyServiceFunction(hsFoldersRegisterPath);
- return 0;
-}
-
-INT_PTR ExpandPath(char *szResult, char *format, int size)
-{
- szResult[0] = '\0';
- char *input = NULL;
-
- if (ServiceExists(MS_VARS_FORMATSTRING))
- {
- TCHAR* tmp_format = mir_a2t(format);
- TCHAR *vars_result_tmp = variables_parse(tmp_format, NULL, NULL);
- mir_free(tmp_format);
- char *vars_result = mir_t2a(vars_result_tmp);
-
- if (vars_result != NULL)
- {
- input = mir_strdup(vars_result);
-
- variables_free(vars_result_tmp);
- }
- mir_free(vars_result);
- }
-
- if (input == NULL)
- {
- input = mir_strdup(format);
- }
-
- char *core_result = Utils_ReplaceVars(input);
- strncpy(szResult, core_result, size);
-
- mir_free(core_result);
-
- StrReplace(szResult, PROFILE_PATH, szCurrentProfilePath);
- StrReplace(szResult, CURRENT_PROFILE, szCurrentProfile);
- StrReplace(szResult, MIRANDA_PATH, szMirandaPath);
- StrReplace(szResult, MIRANDA_USERDATA, szUserDataPath);
-
- StrTrim(szResult, "\t \\");
-
- mir_free(input);
-
- return strlen(szResult);
-}
-
-INT_PTR ExpandPathW(wchar_t *szResult, wchar_t *format, int size)
-{
- szResult[0] = '\0';
- wchar_t *input = NULL;
-
- if (ServiceExists(MS_VARS_FORMATSTRING))
- {
- TCHAR* tmp_format = mir_u2t(format);
- TCHAR *vars_result_tmp = variables_parse(tmp_format, NULL, NULL);
- mir_free(tmp_format);
- wchar_t *vars_result = mir_t2u(vars_result_tmp);
-
- if (vars_result != NULL)
- {
- input = mir_wstrdup(vars_result);
-
- variables_free(vars_result_tmp);
- }
- mir_free(vars_result);
- }
-
- if (input == NULL)
- {
- input = mir_wstrdup(format);
- }
-
- wchar_t *core_result = Utils_ReplaceVarsW(input);
- if (core_result)
- {
- wcsncpy(szResult, core_result, size);
- }
- else {
- wcsncpy(szResult, input, size);
- }
-
- mir_free(core_result);
-
- StrReplace(szResult, PROFILE_PATHW, szCurrentProfilePathW);
- StrReplace(szResult, CURRENT_PROFILEW, szCurrentProfileW);
- StrReplace(szResult, MIRANDA_PATHW, szMirandaPathW);
- StrReplace(szResult, MIRANDA_USERDATAW, szUserDataPathW);
-
- StrTrim(szResult, L"\t \\");
-
- mir_free(input);
-
- return wcslen(szResult);
-}
-
-INT_PTR GetPath(int hRegisteredFolder, char *szResult, int size)
-{
- return lstRegisteredFolders.Expand(hRegisteredFolder, szResult, size);
- //return 0;
-}
-
-INT_PTR RegisterPathService(WPARAM wParam, LPARAM lParam)
-{
- FOLDERSDATA tmp = *(FOLDERSDATA *) lParam;
- int res = 0;
- if (tmp.cbSize == sizeof(FOLDERSDATA))
- {
- res = lstRegisteredFolders.Add(tmp); //returns 1..n or 0 on error
- }
- return res;
-}
-
-INT_PTR GetPathSizeService(WPARAM wParam, LPARAM lParam)
-{
- char tmp[MAX_FOLDER_SIZE * 4]; //dumb
- int res = lstRegisteredFolders.Expand(wParam, tmp, sizeof(tmp));
- size_t len = 0;
- if ((lstRegisteredFolders.Get(wParam)) && (lstRegisteredFolders.Get(wParam)->IsUnicode()))
- {
- len = wcslen((wchar_t *)tmp);
- }
- else{
- len = strlen(tmp);
- }
- if (lParam != NULL)
- {
- *((size_t *) lParam) = len;
- }
- return len;
-}
-
-INT_PTR GetPathService(WPARAM wParam, LPARAM lParam)
-{
- FOLDERSGETDATA data = *(FOLDERSGETDATA *) lParam;
- size_t res = 1;
- if (data.cbSize == sizeof(FOLDERSGETDATA))
- {
- res = GetPath(wParam, data.szPath, data.nMaxPathSize); //dumb ...
- }
- return res;
-}
-
-INT_PTR GetPathAllocService(WPARAM wParam, LPARAM lParam)
-{
- int size;
- int res = 1;
- FOLDERSGETALLOCDATA data = *(FOLDERSGETALLOCDATA *) lParam;
- if (data.cbSize == sizeof(FOLDERSGETALLOCDATA))
- {
- size = GetPathSizeService(wParam, (LPARAM) &size);
- char **buffer = data.szPath;
- *buffer = (char *) mir_alloc(size + 1);
- res = GetPath(wParam, *buffer, size);
- }
- return res;
-}
-/*
-int GetPathAppendService(WPARAM wParam, LPARAM lParam)
-{
- FOLDERSAPPENDDATA data = *(FOLDERSAPPENDDATA *) wParam;
- int res = GetPathService(data.hRegisteredPath, lParam);
- strcat((char *) lParam, data.szAppendData);
- return res;
-}
-*/
-/*
-int GetPathAllocAppendService(WPARAM wParam, LPARAM lParam)
-{
- FOLDERSAPPENDDATA data = *(FOLDERSAPPENDDATA *) wParam;
- int res = GetPathAllocService(data.hRegisteredPath, lParam);
- strcat(*(char **) lParam, data.szAppendData);
- return res;
-}
-*/
\ No newline at end of file diff --git a/plugins/Folders/folders/services.h b/plugins/Folders/folders/services.h deleted file mode 100644 index 3a2ee1aa9f..0000000000 --- a/plugins/Folders/folders/services.h +++ /dev/null @@ -1,50 +0,0 @@ -/*
-Custom profile folders plugin for Miranda IM
-
-Copyright © 2005 Cristian Libotean
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-#ifndef M_FOLDERS_PROVIDED_SERVICES_H
-#define M_FOLDERS_PROVIDED_SERVICES_H
-
-#include "commonheaders.h"
-#include "m_folders.h"
-
-#define MAX_FOLDERS_PATH 512
-
-extern char szCurrentProfilePath[MAX_FOLDERS_PATH];
-extern char szCurrentProfile[MAX_FOLDERS_PATH];
-extern char szMirandaPath[MAX_FOLDERS_PATH];
-
-extern wchar_t szCurrentProfilePathW[MAX_FOLDERS_PATH];
-extern wchar_t szCurrentProfileW[MAX_FOLDERS_PATH];
-extern wchar_t szMirandaPathW[MAX_FOLDERS_PATH];
-
-int InitServices();
-int DestroyServices();
-INT_PTR ExpandPath(char *szResult, char *format, int size);
-INT_PTR ExpandPathW(wchar_t *szResult, wchar_t *format, int size);
-INT_PTR GetPath(int hRegisteredFolder, char *szResult, int size);
-
-INT_PTR RegisterPathService(WPARAM wParam, LPARAM lParam);
-INT_PTR GetPathSizeService(WPARAM wParam, LPARAM lParam);
-INT_PTR GetPathService(WPARAM wParam, LPARAM lParam);
-INT_PTR GetPathAllocService(WPARAM wParam, LPARAM lParam);
-//int GetPathAppendService(WPARAM wParam, LPARAM lParam);
-//int GetPathAllocAppendService(WPARAM wParam, LPARAM lParam);
-
-#endif //M_FOLDERS_PROVIDED_SERVICES_H
\ No newline at end of file diff --git a/plugins/Folders/folders/utils.cpp b/plugins/Folders/folders/utils.cpp deleted file mode 100644 index 64623b63f1..0000000000 --- a/plugins/Folders/folders/utils.cpp +++ /dev/null @@ -1,357 +0,0 @@ -/*
-Custom profile folders plugin for Miranda IM
-
-Copyright © 2005 Cristian Libotean
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-#include "utils.h"
-
-int Log(char *format, ...)
-{
-#ifdef _DEBUG
- char str[4096];
- va_list vararg;
- int tBytes;
- FILE *fout = fopen("folders.log", "at");
-
- va_start(vararg, format);
-
- tBytes = _vsnprintf(str, sizeof(str), format, vararg);
- if (tBytes > 0)
- {
- str[tBytes] = 0;
- }
-
- va_end(vararg);
- if (str[strlen(str) - 1] != '\n')
- {
- strcat(str, "\n");
- }
- fputs(str, fout);
- fclose(fout);
-#endif
- return 0;
-}
-
-char *StrCopy(char *source, size_t index, const char *what, size_t count)
-{
- size_t i;
- for (i = 0; i < count; i++)
- {
- source[index + i] = what[i];
- }
- return source;
-}
-
-wchar_t *StrCopy(wchar_t *source, size_t index, const wchar_t *what, size_t count)
-{
- size_t i;
- for (i = 0; i < count; i++)
- {
- source[index + i] = what[i];
- }
- return source;
-}
-
-char *StrDelete(char *source, size_t index, size_t count)
-{
- size_t len = strlen(source);
- size_t i;
- count = (count + index > len) ? len - index : count;
- for (i = index; i + count <= len; i++)
- {
- source[i] = source[i + count];
- }
- return source;
-}
-
-wchar_t *StrDelete(wchar_t *source, size_t index, size_t count)
-{
- size_t len = wcslen(source);
- size_t i;
- count = (count + index > len) ? len - index : count;
- for (i = index; i + count <= len; i++)
- {
- source[i] = source[i + count];
- }
- return source;
-}
-
-
-char *StrInsert(char *source, size_t index, const char *what)
-{
- size_t whatLen = strlen(what);
- size_t sourceLen = strlen(source);
- size_t i;
- for (i = sourceLen; i >= index; i--)
- {
- source[i + whatLen] = source[i];
- }
- for (i = 0; i < whatLen; i++)
- {
- source[index + i] = what[i];
- }
- return source;
-}
-
-wchar_t *StrInsert(wchar_t *source, size_t index, const wchar_t *what)
-{
- size_t whatLen = wcslen(what);
- size_t sourceLen = wcslen(source);
- size_t i;
- for (i = sourceLen; i >= index; i--)
- {
- source[i + whatLen] = source[i];
- }
- for (i = 0; i < whatLen; i++)
- {
- source[index + i] = what[i];
- }
- return source;
-}
-
-
-char *StrReplace(char *source, const char *what, const char *withWhat)
-{
- char *pos;
- size_t whatLen = strlen(what);
- size_t withWhatLen = strlen(withWhat);
- size_t minLen;
- size_t index;
-
- while ((pos = strstr(source, what)))
- {
- minLen = min(whatLen, withWhatLen);
- StrCopy(source, pos - source, withWhat, minLen);
- index = pos - source + minLen;
- if (whatLen > withWhatLen)
- {
- StrDelete(source, index, whatLen - withWhatLen);
- }
- else{
- if (whatLen < withWhatLen)
- {
- StrInsert(source, index, withWhat + minLen);
- }
- }
- }
- return source;
-}
-
-wchar_t *StrReplace(wchar_t *source, const wchar_t *what, const wchar_t *withWhat)
-{
- wchar_t *pos;
- size_t whatLen = wcslen(what);
- size_t withWhatLen = wcslen(withWhat);
- size_t minLen;
- size_t index;
-
- while ((pos = wcsstr(source, what)))
- {
- minLen = min(whatLen, withWhatLen);
- StrCopy(source, pos - source, withWhat, minLen);
- index = pos - source + minLen;
- if (whatLen > withWhatLen)
- {
- StrDelete(source, index, whatLen - withWhatLen);
- }
- else{
- if (whatLen < withWhatLen)
- {
- StrInsert(source, index, withWhat + minLen);
- }
- }
- }
- return source;
-}
-
-char *StrTrim(char *szText, const char *szTrimChars)
-{
- size_t i = strlen(szText) - 1;
- while ((i >= 0) && (strchr(szTrimChars, szText[i])))
- {
- szText[i--] = '\0';
- }
- i = 0;
- while ((i < strlen(szText)) && (strchr(szTrimChars, szText[i])))
- {
- i++;
- }
- if (i)
- {
- StrDelete(szText, 0, i);
- }
- return szText;
-}
-
-wchar_t *StrTrim(wchar_t *szText, const wchar_t *szTrimChars)
-{
- size_t i = wcslen(szText) - 1;
- while ((i >= 0) && (wcschr(szTrimChars, szText[i])))
- {
- szText[i--] = '\0';
- }
- i = 0;
- while ((i < wcslen(szText)) && (wcschr(szTrimChars, szText[i])))
- {
- i++;
- }
- if (i)
- {
- StrDelete(szText, 0, i);
- }
- return szText;
-}
-
-void CreateDirectories(char *path)
-{
- char *pos = path;
- char tmp;
- while (pos = strchr(pos, '\\'))
- {
- tmp = pos[0];
- pos[0] = '\0';
- CreateDirectoryA(path, NULL);
- pos[0] = tmp;
- pos++;
- }
- CreateDirectoryA(path, NULL);
- GetLastError();
-}
-
-void CreateDirectories(wchar_t *path)
-{
- wchar_t *pos = path;
- wchar_t tmp;
- while (pos = wcschr(pos, '\\'))
- {
- tmp = pos[0];
- pos[0] = '\0';
- CreateDirectoryW(path, NULL);
- pos[0] = tmp;
- pos++;
- }
- CreateDirectoryW(path, NULL);
- GetLastError();
-}
-
-void RemoveDirectories(char *path)
-{
- char *pos;
- char *buffer = _strdup(path);
- if (!(GetFileAttributesA(buffer) & FILE_ATTRIBUTE_REPARSE_POINT)) { RemoveDirectoryA(buffer); }
- while (pos = strrchr(buffer, '\\'))
- {
- pos[0] = '\0';
- if (!(GetFileAttributesA(buffer) & FILE_ATTRIBUTE_REPARSE_POINT)) { RemoveDirectoryA(buffer); }
- }
- free(buffer);
-}
-
-void RemoveDirectories(wchar_t *path)
-{
- wchar_t *pos;
- wchar_t *buffer = _wcsdup(path);
- if (!(GetFileAttributesW(buffer) & FILE_ATTRIBUTE_REPARSE_POINT)) { RemoveDirectoryW(buffer); }
- while (pos = wcsrchr(buffer, '\\'))
- {
- pos[0] = '\0';
- if (!(GetFileAttributesW(buffer) & FILE_ATTRIBUTE_REPARSE_POINT)) { RemoveDirectoryW(buffer); }
- }
- free(buffer);
-}
-
-int DirectoryExists(char *path)
-{
- char buffer[4096];
- GetCurrentDirectoryA(sizeof(buffer), buffer);
- int res = SetCurrentDirectoryA(path);
- SetCurrentDirectoryA(buffer);
- return res;
-}
-
-int DirectoryExists(wchar_t *path)
-{
- wchar_t buffer[4096];
- GetCurrentDirectoryW(sizeof(buffer), buffer);
- int res = SetCurrentDirectoryW(path);
- SetCurrentDirectoryW(buffer);
- return res;
-}
-
-
-int GetStringFromDatabase(char *szSettingName, const char *szError, char *szResult, size_t size)
-{
- DBVARIANT dbv = {0};
- int res = 1;
- size_t len;
- dbv.type = DBVT_ASCIIZ;
- if (DBGetContactSetting(NULL, ModuleName, szSettingName, &dbv) == 0)
- {
- res = 0;
- size_t tmp = strlen(dbv.pszVal);
- len = (tmp < size - 1) ? tmp : size - 1;
- strncpy(szResult, dbv.pszVal, len);
- szResult[len] = '\0';
- mir_free(dbv.pszVal);
- }
- else{
- res = 1;
- size_t tmp = strlen(szError);
- len = (tmp < size - 1) ? tmp : size - 1;
- strncpy(szResult, szError, len);
- szResult[len] = '\0';
- }
- return res;
-}
-
-int GetStringFromDatabase(char *szSettingName, const wchar_t *szError, wchar_t *szResult, size_t size)
-{
- DBVARIANT dbv = {0};
- int res = 1;
- size_t len;
- dbv.type = DBVT_WCHAR;
- if (DBGetContactSettingWString(NULL, ModuleName, szSettingName, &dbv) == 0)
- //if (DBGetContactSetting(NULL, ModuleName, szSettingName, &dbv) == 0)
- {
- res = 0;
- size_t tmp = wcslen(dbv.pwszVal);
- len = (tmp < size - 1) ? tmp : size - 1;
- wcsncpy(szResult, dbv.pwszVal, len);
- szResult[len] = '\0';
- mir_free(dbv.pwszVal);
- }
- else{
- res = 1;
- size_t tmp = wcslen(szError);
- len = (tmp < size - 1) ? tmp : size - 1;
- wcsncpy(szResult, szError, len);
- szResult[len] = '\0';
- }
- return res;
-}
-
-
-int WriteStringToDatabase(char *szSettingName, const char *szValue)
-{
- return DBWriteContactSettingString(NULL, ModuleName, szSettingName, szValue);
-}
-
-int WriteStringToDatabase(char *szSettingName, const wchar_t *szValue)
-{
- return DBWriteContactSettingWString(NULL, ModuleName, szSettingName, szValue);
-}
\ No newline at end of file diff --git a/plugins/Folders/folders/utils.h b/plugins/Folders/folders/utils.h deleted file mode 100644 index 066c822900..0000000000 --- a/plugins/Folders/folders/utils.h +++ /dev/null @@ -1,62 +0,0 @@ -/*
-Custom profile folders plugin for Miranda IM
-
-Copyright © 2005 Cristian Libotean
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-#ifndef M_FOLDERS_UTILS_H
-#define M_FOLDERS_UTILS_H
-
-#include <stdarg.h>
-#include "commonheaders.h"
-
-int Log(char *format, ...);
-
-char *StrReplace(char *source, const char *what, const char *withWhat);
-char *StrCopy(char *source, size_t index, const char *what, size_t count);
-char *StrDelete(char *source, size_t index, size_t count);
-char *StrInsert(char *source, size_t index, const char *what);
-char *StrTrim(char *szText, const char *szTrimChars);
-
-wchar_t *StrReplace(wchar_t *source, const wchar_t *what, const wchar_t *withWhat);
-wchar_t *StrCopy(wchar_t *source, size_t index, const wchar_t *what, size_t count);
-wchar_t *StrDelete(wchar_t *source, size_t index, size_t count);
-wchar_t *StrInsert(wchar_t *source, size_t index, const wchar_t *what);
-wchar_t *StrTrim(wchar_t *szText, const wchar_t *szTrimChars);
-
-void CreateDirectories(char *szPath);
-void RemoveDirectories(char *szPath);
-int DirectoryExists(char *szPath);
-
-void CreateDirectories(wchar_t *szPath);
-void RemoveDirectories(wchar_t *szPath);
-int DirectoryExists(wchar_t *szPath);
-
-int GetStringFromDatabase(char *szSettingName, const char *szError, char *szResult, size_t size);
-int WriteStringToDatabase(char *szSettingName, const char *szValue);
-
-int GetStringFromDatabase(char *szSettingName, const wchar_t *szError, wchar_t *szResult, size_t size);
-int WriteStringToDatabase(char *szSettingName, const wchar_t *szValue);
-
-__inline static wchar_t *Utils_ReplaceVarsW(wchar_t *szData) {
- REPLACEVARSDATA dat = {0};
- dat.cbSize = sizeof(dat);
- dat.dwFlags = RVF_UNICODE;
- return (wchar_t *) CallService(MS_UTILS_REPLACEVARS, (WPARAM) szData, (LPARAM) &dat);
-}
-
-#endif
\ No newline at end of file diff --git a/plugins/Folders/folders/variablesHelp.inc b/plugins/Folders/folders/variablesHelp.inc deleted file mode 100644 index bdc79692e6..0000000000 --- a/plugins/Folders/folders/variablesHelp.inc +++ /dev/null @@ -1,32 +0,0 @@ -"{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033\\deflangfe1033{\\fonttbl{\\f0\\fswiss\\fprq2\\fcharset0 Arial;}}\n"
-"{\\*\\generator Msftedit 5.41.21.2500;}\\viewkind4\\uc1\\pard\\nowidctlpar\\ri-1686\\f0\\fs20 Don't forget to click on \\i Apply\\i0 to save the changes. If you don't then the changes won't\n"
-"be saved to the database, they will only be valid for this session.\\par"
-"\\pard\\nowidctlpar\\ul\\b\\par\n"
-"Variable string\\ulnone\\b0\\tab\\tab\\ul\\b What it expands to:\\ulnone\\b0\\par\n"
-"%miranda_userdata%\\tab Expands to the private profile data directory.\\par"
-"%miranda_path%\\tab Expands to your miranda path (e.g: c:\\\\program files\\\\miranda im).\\par"
-"%profile_path%\\tab\\tab Expands to your profile path - the value found in mirandaboot.ini,\\par"
-"\\tab\\tab\\tab\\ul ProfileDir\\ulnone section (usually inside miranda's folder).\\par"
-"\\pard\\nowidctlpar\\ri-696 %current_profile%\\tab Expands to your current profile name without the extenstion.\\par"
-"\\tab\\tab\\tab (e.g.\\b default\\b0 if your your profile is \\i default.dat\\i0 ).\\par"
-"\\par\n"
-"\\ul\\b Environment variables\\par\n"
-"\\ulnone\\b0 The plugin can also expand environment variables; the variables are specified like in any other\n"
-"program that can use environment variables, i.e. %<env variable>%.\n\n"
-"\\b Note\\b0 : Environment variables are expanded before any Miranda variables. So if you have, for\n"
-"example, %profile_path% defined as a system variable then it will be expanded to that value\\n"
-"instead of expanding to Miranda\\rquote s profile path.\\par\n"
-"\\ul\\b Examples:\\par\n"
-"\\ulnone\\b0 If the value for the ProfileDir inside \\i mirandaboot.ini\\i0 , \\ul ProfileDir\\ulnone section is '.\\\\profiles', current\n"
-"profile is 'default.dat' and miranda's path is 'c:\\\\program files\\\\miranda im' then:\\par\n"
-"\\b %miranda_path%\\b0 \\tab\\tab\\tab will expand to 'c:\\\\program files\\\\miranda im'\\par"
-"\\b %profile_path%\\b0 \\tab\\tab\\tab will expand to 'c:\\\\program files\\\\miranda im\\\\profiles'\\par"
-"\\b %current_profile%\\b0\\tab\\tab\\tab will expand to 'default'\\par"
-"\\b %temp%\\b0\\tab\\tab\\tab\\tab will expand to the temp folder of the current user.\\par"
-"\\b %profile_path%\\\\%current_profile%\\tab\\b0 will expand to 'c:\\\\program files\\\\miranda im\\\\profiles\\\\default'\\par"
-"\\b %miranda_path%\\\\plugins\\\\config\\b0\\tab will expand to 'c:\\\\program files\\\\miranda im\\\\plugins\\\\config'\\par"
-"\\b ' %miranda_path%\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ '\\b0\\tab will expand to 'c:\\\\program files\\\\miranda im'\\par\n"
-"notice that the spaces at the beginning and the end of the string are trimmed, as well as the last \\\\\\par\n"
-"}\n"
-"\n"
-"\n"
diff --git a/plugins/Folders/folders/version.h b/plugins/Folders/folders/version.h deleted file mode 100644 index 77f4d886fa..0000000000 --- a/plugins/Folders/folders/version.h +++ /dev/null @@ -1,49 +0,0 @@ -/*
-Custom profile folders plugin for Miranda IM
-
-Copyright © 2005-2012 Cristian Libotean
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-#ifndef M_FOLDERS_VERSION_H
-#define M_FOLDERS_VERSION_H
-
-#define __MAJOR_VERSION 0
-#define __MINOR_VERSION 1
-#define __RELEASE_NUM 6
-#define __BUILD_NUM 0
-
-#define VERSION PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM)
-
-#define __PLUGINVERSION_STRING __MAJOR_VERSION,__MINOR_VERSION,__RELEASE_NUM,__BUILD_NUM
-#define __PLUGINVERSION_STRING_DOTS __MAJOR_VERSION.__MINOR_VERSION.__RELEASE_NUM.__BUILD_NUM
-#define __STRINGIFY_(x) #x
-#define __STRINGIFY(x) __STRINGIFY_(x)
-#define __VERSION_STRING __STRINGIFY(__PLUGINVERSION_STRING_DOTS)
-
-#define __DESC "Service plugin. Allows plugins to save their data to user selected folders; supports variables."
-#define __AUTHOR "Cristian Libotean"
-#define __AUTHOREMAIL "eblis102@yahoo.com"
-#define __COPYRIGHT "© 2005-2012 Cristian Libotean"
-#define __AUTHORWEB "http://www.miranda-im.org/"
-
-#if defined(WIN64) || defined(_WIN64)
-#define __PLUGIN_DISPLAY_NAME "Custom profile folders (x64)"
-#else
-#define __PLUGIN_DISPLAY_NAME "Custom profile folders"
-#endif
-
-#endif //M_FOLDERS_VERSION_H
diff --git a/plugins/Folders/folders/version.rc b/plugins/Folders/folders/version.rc deleted file mode 100644 index 0f8fea03fc..0000000000 --- a/plugins/Folders/folders/version.rc +++ /dev/null @@ -1,100 +0,0 @@ -// Microsoft Visual C++ generated resource script.
-//
-#include "resource.h"
-#include "version.h"
-
-#define APSTUDIO_READONLY_SYMBOLS
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 2 resource.
-//
-#include "afxres.h"
-
-/////////////////////////////////////////////////////////////////////////////
-#undef APSTUDIO_READONLY_SYMBOLS
-
-/////////////////////////////////////////////////////////////////////////////
-// English (U.S.) resources
-
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
-#ifdef _WIN32
-LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
-#pragma code_page(1252)
-#endif //_WIN32
-
-#ifdef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// TEXTINCLUDE
-//
-
-1 TEXTINCLUDE
-BEGIN
- "resource1.h\0"
-END
-
-2 TEXTINCLUDE
-BEGIN
- "#include ""afxres.h""\r\n"
- "\0"
-END
-
-3 TEXTINCLUDE
-BEGIN
- "\r\n"
- "\0"
-END
-
-#endif // APSTUDIO_INVOKED
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Version
-//
-
-VS_VERSION_INFO VERSIONINFO
- FILEVERSION __PLUGINVERSION_STRING
- PRODUCTVERSION __PLUGINVERSION_STRING
- FILEFLAGSMASK 0x17L
-#ifdef _DEBUG
- FILEFLAGS 0x1L
-#else
- FILEFLAGS 0x0L
-#endif
- FILEOS 0x4L
- FILETYPE 0x2L
- FILESUBTYPE 0x0L
-BEGIN
- BLOCK "StringFileInfo"
- BEGIN
- BLOCK "040904b0"
- BEGIN
- VALUE "Author", __AUTHOR
- VALUE "FileDescription", __DESC
- VALUE "FileVersion", __VERSION_STRING
- VALUE "InternalName", __PLUGIN_DISPLAY_NAME
- VALUE "LegalCopyright", __COPYRIGHT
- END
- END
- BLOCK "VarFileInfo"
- BEGIN
- VALUE "Translation", 0x409, 1200
- END
-END
-
-#endif // English (U.S.) resources
-/////////////////////////////////////////////////////////////////////////////
-
-
-
-#ifndef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 3 resource.
-//
-
-
-/////////////////////////////////////////////////////////////////////////////
-#endif // not APSTUDIO_INVOKED
-
|