aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/toolbareditor
diff options
context:
space:
mode:
authorGravatar Szymon Tomasz Stefanek2006-12-18 01:34:15 +0000
committerGravatar Szymon Tomasz Stefanek2006-12-18 01:34:15 +0000
commitc75b9f00eaeee4b8503ba662b3d7ccc9e1914096 (patch)
treea5e7ee244fa4124588a114732c4ecbc248c7c199 /src/modules/toolbareditor
parentSwitching from cvs to svn, initial import (diff)
downloadKVIrc-c75b9f00eaeee4b8503ba662b3d7ccc9e1914096.tar.gz
KVIrc-c75b9f00eaeee4b8503ba662b3d7ccc9e1914096.tar.bz2
KVIrc-c75b9f00eaeee4b8503ba662b3d7ccc9e1914096.zip
Switching from cvs to svn, initial import
git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@14 17fca916-40b9-46aa-a4ea-0a15b648b75c
Diffstat (limited to 'src/modules/toolbareditor')
-rw-r--r--src/modules/toolbareditor/.svnignore9
-rw-r--r--src/modules/toolbareditor/Makefile.am20
-rw-r--r--src/modules/toolbareditor/kvitoolbareditor.dsp146
-rw-r--r--src/modules/toolbareditor/kvitoolbareditor.dsw29
-rw-r--r--src/modules/toolbareditor/libkvitoolbareditor.cpp96
-rw-r--r--src/modules/toolbareditor/toolbareditor.cpp535
-rw-r--r--src/modules/toolbareditor/toolbareditor.h119
-rwxr-xr-xsrc/modules/toolbareditor/toolbareditor.vcproj173
-rw-r--r--src/modules/toolbareditor/toolbareditor_vc05.vcproj261
9 files changed, 1388 insertions, 0 deletions
diff --git a/src/modules/toolbareditor/.svnignore b/src/modules/toolbareditor/.svnignore
new file mode 100644
index 000000000..71a203562
--- /dev/null
+++ b/src/modules/toolbareditor/.svnignore
@@ -0,0 +1,9 @@
+Makefile.in
+Makefile
+.deps
+*.o
+*.lo
+*.la
+*.moc
+.libs
+moc_*.cpp \ No newline at end of file
diff --git a/src/modules/toolbareditor/Makefile.am b/src/modules/toolbareditor/Makefile.am
new file mode 100644
index 000000000..a578e10c2
--- /dev/null
+++ b/src/modules/toolbareditor/Makefile.am
@@ -0,0 +1,20 @@
+###############################################################################
+# KVirc IRC client Maketoolbareditor - 10.03.2000 Szymon Stefanek <stefanek@tin.it>
+###############################################################################
+
+AM_CPPFLAGS = -I$(SS_TOPSRCDIR)/src/kvilib/include/ -I$(SS_TOPSRCDIR)/src/kvirc/include/ \
+$(SS_INCDIRS) $(SS_CPPFLAGS) -DGLOBAL_KVIRC_DIR=\"$(globalkvircdir)\"
+
+
+pluglib_LTLIBRARIES = libkvitoolbareditor.la
+
+libkvitoolbareditor_la_LDFLAGS = -module -avoid-version $(SS_LDFLAGS) $(SS_LIBDIRS)
+
+libkvitoolbareditor_la_SOURCES = libkvitoolbareditor.cpp toolbareditor.cpp
+nodist_libkvitoolbareditor_la_SOURCES = moc_toolbareditor.cpp
+
+noinst_HEADERS = toolbareditor.h
+libkvitoolbareditor_la_LIBADD = $(SS_LIBLINK) ../../kvilib/build/libkvilib.la
+
+moc_toolbareditor.cpp: toolbareditor.h
+ $(SS_QT_MOC) $< -o $@
diff --git a/src/modules/toolbareditor/kvitoolbareditor.dsp b/src/modules/toolbareditor/kvitoolbareditor.dsp
new file mode 100644
index 000000000..0905f4fad
--- /dev/null
+++ b/src/modules/toolbareditor/kvitoolbareditor.dsp
@@ -0,0 +1,146 @@
+# Microsoft Developer Studio Project File - Name="kvitoolbareditor" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
+
+CFG=kvitoolbareditor - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "kvitoolbareditor.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "kvitoolbareditor.mak" CFG="kvitoolbareditor - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "kvitoolbareditor - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "kvitoolbareditor - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+MTL=midl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "kvitoolbareditor - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ACTION_EXPORTS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "_$(QTDIR)\include" /I "$(QTDIR)\include" /I "..\..\kvilib\tal" /I "..\..\kvilib\system" /I "..\..\kvilib\irc" /I "..\..\kvilib\file" /I "..\..\kvilib\ext" /I "..\..\kvilib\net" /I "..\..\kvilib\core\wstring" /I "..\..\kvilib\core" /I "..\..\kvilib\config" /I "..\..\kvirc\kvs" /I "..\..\kvirc\module" /I "..\..\kvirc\uparser\scripttoolbar" /I "..\..\kvirc\uparser" /I "..\..\kvirc\sparser" /I "..\..\kvirc\kernel" /I "..\..\kvirc\ui" /I "C:\ssl" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ACTION_EXPORTS" /D "QT_DLL" /D "QT_THREAD_SUPPORT" /YX /FD /c
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x809 /d "NDEBUG"
+# ADD RSC /l 0x809 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
+# ADD LINK32 imm32.lib wsock32.lib winmm.lib $(QTDIR)\lib\qt-mtnc321.lib $(QTDIR)\lib\qtmain.lib libeay32.lib SSLeay32.lib ws2_32.lib kvilib.lib kvirc.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /dll /machine:I386 /out:"..\..\..\win32build\bin\modules\kvitoolbareditor.dll" /libpath:"C:\OpenSSL\lib\VC" /libpath:"..\..\kvilib\Release" /libpath:"..\..\kvirc\Release"
+
+!ELSEIF "$(CFG)" == "kvitoolbareditor - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ACTION_EXPORTS" /YX /FD /GZ /c
+# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "_$(QTDIR)\include" /I "$(QTDIR)\include" /I "..\..\kvilib\tal" /I "..\..\kvilib\system" /I "..\..\kvilib\irc" /I "..\..\kvilib\file" /I "..\..\kvilib\ext" /I "..\..\kvilib\net" /I "..\..\kvilib\core\wstring" /I "..\..\kvilib\core" /I "..\..\kvilib\config" /I "..\..\kvirc\kvs" /I "..\..\kvirc\module" /I "..\..\kvirc\uparser\scripttoolbar" /I "..\..\kvirc\uparser" /I "..\..\kvirc\sparser" /I "..\..\kvirc\kernel" /I "..\..\kvirc\ui" /I "C:\ssl" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ACTION_EXPORTS" /YX /FD /GZ /c
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x809 /d "_DEBUG"
+# ADD RSC /l 0x809 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 odbc32.lib odbccp32.lib $(QTDIR)\lib\qt-mtnc321.lib $(QTDIR)\lib\qtmain.lib libeay32.lib SSLeay32.lib ws2_32.lib kvilib.lib kvirc.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /dll /debug /machine:I386 /out:"..\..\..\win32build\KviDebug\modules\kvitoolbareditor.dll" /pdbtype:sept /libpath:"C:\OpenSSL\lib\VC" /libpath:"..\..\kvilib\Debug" /libpath:"..\..\kvirc\Debug"
+
+!ENDIF
+
+# Begin Target
+
+# Name "kvitoolbareditor - Win32 Release"
+# Name "kvitoolbareditor - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=.\libkvitoolbareditor.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\moc_toolbareditor.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\toolbareditor.cpp
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=.\toolbareditor.h
+
+!IF "$(CFG)" == "kvitoolbareditor - Win32 Release"
+
+# Begin Custom Build
+InputDir=.
+InputPath=.\toolbareditor.h
+InputName=toolbareditor
+
+"$(InputDir)\moc_$(InputName).cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ %qtdir%\bin\moc.exe $(InputDir)\$(InputName).h -o $(InputDir)\moc_$(InputName).cpp
+
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "kvitoolbareditor - Win32 Debug"
+
+# Begin Custom Build
+InputDir=.
+InputPath=.\toolbareditor.h
+InputName=toolbareditor
+
+"$(InputDir)\moc_$(InputName).cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ %qtdir%\bin\moc.exe $(InputDir)\$(InputName).h -o $(InputDir)\moc_$(InputName).cpp
+
+# End Custom Build
+
+!ENDIF
+
+# End Source File
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# End Group
+# End Target
+# End Project
diff --git a/src/modules/toolbareditor/kvitoolbareditor.dsw b/src/modules/toolbareditor/kvitoolbareditor.dsw
new file mode 100644
index 000000000..621044ee5
--- /dev/null
+++ b/src/modules/toolbareditor/kvitoolbareditor.dsw
@@ -0,0 +1,29 @@
+Microsoft Developer Studio Workspace File, Format Version 6.00
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
+
+###############################################################################
+
+Project: "kvitoolbareditor"=.\kvitoolbareditor.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+
diff --git a/src/modules/toolbareditor/libkvitoolbareditor.cpp b/src/modules/toolbareditor/libkvitoolbareditor.cpp
new file mode 100644
index 000000000..a90b88c47
--- /dev/null
+++ b/src/modules/toolbareditor/libkvitoolbareditor.cpp
@@ -0,0 +1,96 @@
+//=============================================================================
+//
+// File : libkvitoolbareditor.cpp
+// Creation date : Sun 10 Nov 2002 23:25:59 2002 GMT by Szymon Stefanek
+//
+// This toolbar is part of the KVirc irc client distribution
+// Copyright (C) 2002-2004 Szymon Stefanek (pragma at kvirc dot net)
+//
+// 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 opinion) 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 "toolbareditor.h"
+#include "kvi_module.h"
+
+#include "kvi_locale.h"
+
+#include "kvi_frame.h"
+#include "kvi_actionmanager.h"
+#include "kvi_config.h"
+#include "kvi_app.h"
+
+QRect g_rectToolBarEditorDialogGeometry(0,0,0,0);
+
+/*
+ @doc: toolbareditor.open
+ @type:
+ command
+ @title:
+ toolbareditor.open
+ @short:
+ Shows the script toolbar editor
+ @syntax:
+ toolbareditor.open
+ @description:
+ Opens the script toolbar editor dialog.
+*/
+
+
+static bool toolbareditor_kvs_cmd_open(KviKvsModuleCommandCall * c)
+{
+ KviCustomizeToolBarsDialog::display();
+ return true;
+}
+
+static bool toolbareditor_module_init(KviModule * m)
+{
+ KVSM_REGISTER_SIMPLE_COMMAND(m,"open",toolbareditor_kvs_cmd_open);
+ QString szBuf;
+ m->getDefaultConfigFileName(szBuf);
+ KviConfig cfg(szBuf,KviConfig::Read);
+ g_rectToolBarEditorDialogGeometry = cfg.readRectEntry("EditorGeometry",QRect(10,10,390,440));
+
+
+ return true;
+}
+
+static bool toolbareditor_module_can_unload(KviModule * m)
+{
+ return (!KviCustomizeToolBarsDialog::instance());
+}
+
+static bool toolbareditor_module_cleanup(KviModule *m)
+{
+ KviCustomizeToolBarsDialog::cleanup();
+
+ QString szBuf;
+ m->getDefaultConfigFileName(szBuf);
+ KviConfig cfg(szBuf,KviConfig::Write);
+ cfg.writeEntry("EditorGeometry",g_rectToolBarEditorDialogGeometry);
+
+ return true;
+}
+
+KVIRC_MODULE(
+ "ToolbarEditor", // module name
+ "1.0.0", // module version
+ "Copyright (C) 2002 Szymon Stefanek (pragma at kvirc dot net)", // author & (C)
+ "Editor for the scriptable toolbars",
+ toolbareditor_module_init,
+ toolbareditor_module_can_unload,
+ 0,
+ toolbareditor_module_cleanup
+)
diff --git a/src/modules/toolbareditor/toolbareditor.cpp b/src/modules/toolbareditor/toolbareditor.cpp
new file mode 100644
index 000000000..895749e01
--- /dev/null
+++ b/src/modules/toolbareditor/toolbareditor.cpp
@@ -0,0 +1,535 @@
+//=============================================================================//
+// File : toolbareditor.cpp
+// Created on Wed 01 Dec 2004 14:42:20 by Szymon Stefanek
+//
+// This file is part of the KVIrc IRC client distribution
+// Copyright (C) 2004 Szymon Stefanek <pragma at kvirc dot net>
+//
+// 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 opinion) 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 "toolbareditor.h"
+#include "kvi_actiondrawer.h"
+#include "kvi_locale.h"
+#include "kvi_frame.h"
+#include "kvi_iconmanager.h"
+#include "kvi_actionmanager.h"
+#include "kvi_customtoolbar.h"
+#include "kvi_customtoolbarmanager.h"
+#include "kvi_customtoolbardescriptor.h"
+#include "kvi_imagedialog.h"
+#include "kvi_fileutils.h"
+#include "kvi_filedialog.h"
+#include "kvi_kvs_useraction.h"
+
+#include <qpushbutton.h>
+#include <qlayout.h>
+#include <qapplication.h>
+#include <qtooltip.h>
+#include <qdragobject.h>
+#include <qlineedit.h>
+#include <qlabel.h>
+#include <qmessagebox.h>
+#include <qframe.h>
+#include <qdir.h>
+#include <qtimer.h>
+
+KviCustomizeToolBarsDialog * KviCustomizeToolBarsDialog::m_pInstance = 0;
+extern QRect g_rectToolBarEditorDialogGeometry;
+
+
+
+KviTrashcanLabel::KviTrashcanLabel(QWidget * p)
+: QLabel(p)
+{
+ setPixmap(*(g_pIconManager->getBigIcon("kvi_bigicon_trashcan.png")));
+ QToolTip::add(this,__tr2qs("Drop here the icons from the toolbars to remove them"));
+ setFrameStyle(QFrame::Sunken | QFrame::WinPanel);
+ setAcceptDrops(true);
+ setAlignment(AlignCenter);
+ setMinimumSize(40,40);
+ m_uFlashCount = 0;
+ m_pFlashTimer = 0;
+ m_clrOriginal = paletteBackgroundColor();
+ connect(KviActionManager::instance(),SIGNAL(removeActionsHintRequest()),this,SLOT(flash()));
+}
+
+KviTrashcanLabel::~KviTrashcanLabel()
+{
+ if(m_pFlashTimer)
+ {
+ m_pFlashTimer->stop();
+ delete m_pFlashTimer;
+ }
+}
+
+void KviTrashcanLabel::flash()
+{
+ m_uFlashCount = 0;
+ if(m_pFlashTimer)return;
+ m_pFlashTimer = new QTimer();
+ connect(m_pFlashTimer,SIGNAL(timeout()),this,SLOT(heartbeat()));
+ m_pFlashTimer->start(200);
+}
+
+void KviTrashcanLabel::heartbeat()
+{
+ m_uFlashCount++;
+ if(m_uFlashCount % 2)
+ setPaletteBackgroundColor(QColor(0,0,0));
+ else
+ setPaletteBackgroundColor(m_clrOriginal);
+ update();
+ if(m_uFlashCount == 8)
+ {
+ m_pFlashTimer->stop();
+ delete m_pFlashTimer;
+ m_pFlashTimer = 0;
+ }
+}
+
+void KviTrashcanLabel::dropEvent(QDropEvent * e)
+{
+ if(QTextDrag::canDecode(e))
+ e->accept();
+}
+
+void KviTrashcanLabel::dragEnterEvent(QDragEnterEvent * e)
+{
+ QString s;
+ if(QTextDrag::decode(e,s))
+ e->accept();
+}
+
+
+
+KviCustomToolBarPropertiesDialog::KviCustomToolBarPropertiesDialog(QWidget * p,const QString &szText,const QString &szId,const QString &szLabel,const QString &szIconId)
+: QDialog(p)
+{
+ m_szId = szId;
+ m_szOriginalId = szId;
+ m_szLabel = szLabel;
+
+ setCaption(__tr2qs("ToolBar Properties"));
+ setIcon(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_TOOLBAR)));
+
+ QGridLayout * g = new QGridLayout(this,5,6,5,3);
+
+ QLabel * l = new QLabel(szText,this);
+ g->addMultiCellWidget(l,0,0,0,5);
+
+ l = new QLabel(__tr2qs("Label") + ":",this);
+ g->addWidget(l,1,0);
+
+ m_pLabelEdit = new QLineEdit(this);
+ g->addMultiCellWidget(m_pLabelEdit,1,1,1,5);
+ m_pLabelEdit->setText(szLabel);
+ connect(m_pLabelEdit,SIGNAL(textChanged(const QString &)),this,SLOT(labelTextChanged(const QString &)));
+
+ l = new QLabel(__tr2qs("Icon") + ":",this);
+ g->addWidget(l,2,0);
+
+ m_pIconEdit = new QLineEdit(this);
+ m_pIconEdit->setReadOnly(true);
+ g->addMultiCellWidget(m_pIconEdit,2,2,1,4);
+
+ m_pIconButton = new QPushButton(this);
+ g->addMultiCellWidget(m_pIconButton,2,2,5,5);
+ connect(m_pIconButton,SIGNAL(clicked()),this,SLOT(iconButtonClicked()));
+
+ iconSelected(szIconId);
+
+ m_pAdvanced = new QWidget(this);
+ QGridLayout * ag = new QGridLayout(m_pAdvanced,1,2,0,3);
+
+ l = new QLabel(__tr2qs("Id") + ":",m_pAdvanced);
+ l->setMinimumWidth(100);
+ ag->addWidget(l,0,0);
+
+ m_pIdEdit = new QLineEdit(m_pAdvanced);
+ ag->addWidget(m_pIdEdit,0,1);
+ ag->setRowStretch(0,1);
+
+ m_pIdEdit->setText(szId);
+
+ g->addMultiCellWidget(m_pAdvanced,3,3,0,5);
+ m_pAdvanced->hide();
+
+ m_pLabelEdit->setFocus();
+
+ QPushButton * pb = new QPushButton(__tr2qs("OK"),this);
+ connect(pb,SIGNAL(clicked()),this,SLOT(okClicked()));
+ pb->setMinimumWidth(80);
+ g->addMultiCellWidget(pb,4,4,4,5);
+
+ pb = new QPushButton(__tr2qs("Cancel"),this);
+ connect(pb,SIGNAL(clicked()),this,SLOT(reject()));
+ pb->setMinimumWidth(80);
+ g->addWidget(pb,4,3);
+
+ m_pAdvancedButton = new QPushButton(__tr2qs("Advanced..."),this);
+ connect(m_pAdvancedButton,SIGNAL(clicked()),this,SLOT(advancedClicked()));
+ m_pAdvancedButton->setMinimumWidth(100);
+ g->addMultiCellWidget(m_pAdvancedButton,4,4,0,1);
+
+ g->setRowStretch(0,1);
+ g->setColStretch(2,1);
+
+
+}
+
+KviCustomToolBarPropertiesDialog::~KviCustomToolBarPropertiesDialog()
+{
+}
+
+void KviCustomToolBarPropertiesDialog::iconSelected(const QString &szIconId)
+{
+ QPixmap * p = g_pIconManager->getImage(szIconId.utf8().data());
+ if(p)
+ {
+ m_pIconButton->setPixmap(*p);
+ m_szIconId = szIconId;
+ m_pIconEdit->setText(szIconId);
+ } else {
+ m_pIconButton->setText("...");
+ m_szIconId = "";
+ m_pIconEdit->setText("");
+ }
+}
+
+void KviCustomToolBarPropertiesDialog::iconButtonClicked()
+{
+ KviImageDialog * dlg = new KviImageDialog(this,__tr2qs("Please choose the icon for the ToolBar"));
+ if(dlg->exec() != QDialog::Accepted)
+ {
+ delete dlg;
+ return;
+ }
+ QString s = dlg->selectedImage();
+ delete dlg;
+ iconSelected(s);
+}
+
+
+void KviCustomToolBarPropertiesDialog::labelTextChanged(const QString &s)
+{
+ if(m_szOriginalId.isEmpty())
+ {
+ QString szId = KviCustomToolBarManager::instance()->idForNewToolBar(s);
+ m_pIdEdit->setText(szId);
+ }
+}
+
+
+void KviCustomToolBarPropertiesDialog::okClicked()
+{
+ if(m_szLabel.isEmpty())
+ {
+ QMessageBox::information(this,__tr2qs("Invalid ToolBar Label"),__tr2qs("The ToolBar Label can't be empty!"),__tr2qs("OK"));
+ return;
+ }
+
+ if(m_szId.isEmpty())
+ {
+ m_szId = KviCustomToolBarManager::instance()->idForNewToolBar(m_szLabel);
+ }
+
+ if(KviCustomToolBarManager::instance()->find(m_szId))
+ {
+ if(m_szId != m_szOriginalId)
+ {
+ if(QMessageBox::information(this,__tr2qs("Duplicate ToolBar Id"),
+ __tr2qs("The specified ToolBar Id already exists.<br>" \
+ "Would you like KVIrc to assign it automatically (so it doesn't "
+ "collide with any other toolbar) or you prefer to do it manually ?"),
+ __tr2qs("Manually"),__tr2qs("Automatically")) == 0)return;
+ m_szId = KviCustomToolBarManager::instance()->idForNewToolBar(m_szLabel);
+ }
+ }
+
+ m_szId = m_pIdEdit->text();
+ m_szLabel = m_pLabelEdit->text();
+ accept();
+}
+
+void KviCustomToolBarPropertiesDialog::advancedClicked()
+{
+ if(m_pAdvanced->isVisible())
+ {
+ m_pAdvanced->hide();
+ m_pAdvancedButton->setText(__tr2qs("Advanced..."));
+ } else {
+ m_pAdvanced->show();
+ m_pAdvancedButton->setText(__tr2qs("Hide Advanced"));
+ }
+
+}
+
+
+KviCustomizeToolBarsDialog::KviCustomizeToolBarsDialog(QWidget * p)
+: QDialog(p,"" /*,WType_TopLevel | WStyle_Customize | WStyle_Title | WStyle_StaysOnTop | WStyle_DialogBorder*/)
+{
+ setCaption(__tr2qs("Customize Toolbars"));
+ setIcon(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_TOOLBAR)));
+
+ m_pInstance = this;
+
+ QGridLayout * g = new QGridLayout(this,8,2,4,5);
+ m_pDrawer = new KviActionDrawer(this);
+ g->addMultiCellWidget(m_pDrawer,0,6,0,0);
+
+ QPushButton * b = new QPushButton(__tr2qs("New ToolBar"),this);
+ connect(b,SIGNAL(clicked()),this,SLOT(newToolBar()));
+ g->addWidget(b,0,1);
+
+ m_pDeleteToolBarButton = new QPushButton(__tr2qs("Delete ToolBar"),this);
+ connect(m_pDeleteToolBarButton,SIGNAL(clicked()),this,SLOT(deleteToolBar()));
+ g->addWidget(m_pDeleteToolBarButton,1,1);
+
+ m_pRenameToolBarButton = new QPushButton(__tr2qs("Edit ToolBar"),this);
+ connect(m_pRenameToolBarButton,SIGNAL(clicked()),this,SLOT(renameToolBar()));
+ g->addWidget(m_pRenameToolBarButton,2,1);
+
+ QFrame * f = new QFrame(this);
+ f->setFrameStyle(QFrame::HLine | QFrame::Sunken);
+ g->addWidget(f,3,1);
+
+ m_pExportToolBarButton = new QPushButton(__tr2qs("Export ToolBar"),this);
+ connect(m_pExportToolBarButton,SIGNAL(clicked()),this,SLOT(exportToolBar()));
+ g->addWidget(m_pExportToolBarButton,4,1);
+
+ KviTrashcanLabel * t = new KviTrashcanLabel(this);
+ g->addWidget(t,6,1);
+
+ b = new QPushButton(__tr2qs("Close"),this);
+ connect(b,SIGNAL(clicked()),this,SLOT(closeClicked()));
+ g->addWidget(b,7,1);
+
+ g->setRowStretch(5,1);
+ g->setColStretch(0,1);
+
+ m_pDrawer->fill();
+
+ connect(KviActionManager::instance(),SIGNAL(currentToolBarChanged()),this,SLOT(currentToolBarChanged()));
+ KviActionManager::instance()->customizeToolBarsDialogCreated();
+
+ currentToolBarChanged();
+
+ if(g_rectToolBarEditorDialogGeometry.y() < 5)
+ {
+ g_rectToolBarEditorDialogGeometry.setY(5);
+ }
+ //setGeometry(KVI_OPTION_RECT(KviOption_rectRegisteredUsersDialogGeometry));
+ resize(g_rectToolBarEditorDialogGeometry.width(),
+ g_rectToolBarEditorDialogGeometry.height());
+ move(g_rectToolBarEditorDialogGeometry.x(),
+ g_rectToolBarEditorDialogGeometry.y());
+}
+
+KviCustomizeToolBarsDialog::~KviCustomizeToolBarsDialog()
+{
+ g_rectToolBarEditorDialogGeometry = QRect(pos().x(),pos().y(),size().width(),size().height());
+
+ KviActionManager::instance()->customizeToolBarsDialogDestroyed();
+ m_pInstance = 0;
+}
+
+void KviCustomizeToolBarsDialog::currentToolBarChanged()
+{
+ m_pDeleteToolBarButton->setEnabled(KviActionManager::instance()->currentToolBar());
+ m_pRenameToolBarButton->setEnabled(KviActionManager::instance()->currentToolBar());
+}
+
+void KviCustomizeToolBarsDialog::showEvent(QShowEvent * e)
+{
+// repaintContents();
+// QRect r = parentWidget() ? parentWidget()->rect() : QApplication::desktop()->rect();
+// int x = (r.width() - width()) / 2;
+// int y = (r.height() - height()) / 2;
+// move(x,y);
+}
+
+
+void KviCustomizeToolBarsDialog::deleteToolBar()
+{
+ KviCustomToolBar * t = KviActionManager::currentToolBar();
+ if(!t)return;
+ if(QMessageBox::question(this,
+ __tr2qs("Confirm ToolBar Deletion"),
+ __tr2qs("Do you really want to delete toolbar \"%1\" ?").arg(t->label()),
+ __tr2qs("No"),
+ __tr2qs("Yes")) == 0)return;
+ KviCustomToolBarManager::instance()->destroyDescriptor(t->descriptor()->id());
+}
+
+void KviCustomizeToolBarsDialog::exportToolBar()
+{
+ KviCustomToolBar * t = KviActionManager::currentToolBar();
+ if(!t)return;
+
+ QString szName = QDir::homeDirPath();
+ if(!szName.endsWith(QString(KVI_PATH_SEPARATOR)))szName += KVI_PATH_SEPARATOR;
+ szName += t->descriptor()->id();
+ szName += ".kvs";
+
+ QString szFile;
+
+ if(!KviFileDialog::askForSaveFileName(szFile,__tr2qs("Choose a Filename - KVIrc"),szName,"*.kvs",true,true,true))return;
+
+ QString szCode;
+
+ int ret = QMessageBox::question(this,
+ __tr2qs("ToolBar Export"),
+ __tr2qs("Do you want the associated actions to be exported with the toolbar ?"),
+ __tr2qs("Yes"),
+ __tr2qs("No"),
+ __tr2qs("Cancel"));
+
+ if(ret == 2)return;
+
+ bool bExportActions = ret == 0;
+
+ if(bExportActions)
+ {
+ KviPtrList<QString> * a = t->descriptor()->actions();
+ if(a)
+ {
+ for(QString * s = a->first();s;s = a->next())
+ {
+ KviAction * act = KviActionManager::instance()->getAction(*s);
+ if(act)
+ {
+ if(act->isKviUserActionNeverOverrideThis())
+ {
+ ((KviKvsUserAction *)act)->exportToKvs(szCode);
+ szCode += "\n\n";
+ }
+ }
+ }
+ }
+ }
+
+ szCode += "toolbar.create ";
+ szCode += t->descriptor()->id();
+ szCode += " ";
+ szCode += t->descriptor()->labelCode();
+ szCode += " ";
+ szCode += t->descriptor()->iconId();
+ szCode += "\n";
+
+ KviPtrList<QString> * aa = t->descriptor()->actions();
+ if(aa)
+ {
+ for(QString * ss = aa->first();ss;ss = aa->next())
+ {
+ szCode += "toolbar.additem ";
+ szCode += t->descriptor()->id();
+ szCode += " ";
+ szCode += *ss;
+ szCode += "\n";
+ }
+ }
+
+ szCode += "toolbar.show ";
+ szCode += t->descriptor()->id();
+ szCode += "\n";
+
+ if(!KviFileUtils::writeFile(szFile,szCode))
+ {
+ QMessageBox::warning(this,__tr2qs("Write Failed - KVIrc"),__tr2qs("Unable to write to the toolbar file."),__tr2qs("OK"));
+ }
+
+}
+
+void KviCustomizeToolBarsDialog::renameToolBar()
+{
+ KviCustomToolBar * t = KviActionManager::currentToolBar();
+ if(!t)return;
+
+ KviCustomToolBarPropertiesDialog * dlg = new KviCustomToolBarPropertiesDialog(this,
+ __tr2qs("Please specify the properties for the toolbar \"%1\"").arg(t->label()),
+ t->descriptor()->id(),
+ t->descriptor()->labelCode(),
+ t->descriptor()->iconId());
+
+ dlg->show();
+ if(dlg->exec() != QDialog::Accepted)
+ {
+ delete dlg;
+ return;
+ }
+
+ QString id = dlg->id();
+ QString label = dlg->label();
+ QString icon = dlg->iconId();
+ delete dlg;
+
+ if((id == t->descriptor()->id()) && (label == t->descriptor()->labelCode()) && (icon == t->descriptor()->iconId()))return;
+
+ KviCustomToolBarManager::instance()->renameDescriptor(t->descriptor()->id(),id,label);
+ t->descriptor()->setIconId(icon);
+}
+
+void KviCustomizeToolBarsDialog::newToolBar()
+{
+ KviCustomToolBarPropertiesDialog * dlg = new KviCustomToolBarPropertiesDialog(this,
+ __tr2qs("Please specify the properties for the new toolbar"),
+ KviCustomToolBarManager::instance()->idForNewToolBar(__tr2qs("My ToolBar")),
+ __tr2qs("My ToolBar"));
+
+ dlg->show();
+ if(dlg->exec() != QDialog::Accepted)
+ {
+ delete dlg;
+ return;
+ }
+
+ QString id = dlg->id();
+ QString label = dlg->label();
+ QString icon = dlg->iconId();
+ delete dlg;
+
+ KviCustomToolBarDescriptor * d = KviCustomToolBarManager::instance()->create(id,label);
+ d->setIconId(icon);
+ KviCustomToolBar * t = d->createToolBar();
+ KviActionManager::instance()->setCurrentToolBar(t);
+}
+
+void KviCustomizeToolBarsDialog::closeClicked()
+{
+ delete this;
+}
+
+void KviCustomizeToolBarsDialog::cleanup()
+{
+ if(!m_pInstance)return;
+ delete m_pInstance;
+ m_pInstance = 0;
+}
+
+void KviCustomizeToolBarsDialog::display()
+{
+ if(m_pInstance)return;
+ m_pInstance = new KviCustomizeToolBarsDialog(g_pFrame);
+ m_pInstance->show();
+}
+
+void KviCustomizeToolBarsDialog::closeEvent(QCloseEvent * e)
+{
+ e->ignore();
+ delete this;
+}
+
diff --git a/src/modules/toolbareditor/toolbareditor.h b/src/modules/toolbareditor/toolbareditor.h
new file mode 100644
index 000000000..fe4623e96
--- /dev/null
+++ b/src/modules/toolbareditor/toolbareditor.h
@@ -0,0 +1,119 @@
+#ifndef _TOOLBAREDITOR_H_
+#define _TOOLBAREDITOR_H_
+//=============================================================================
+//
+// File : toolbareditor.h
+// Created on Wed 01 Dec 2004 14:42:20 by Szymon Stefanek
+//
+// This file is part of the KVIrc IRC client distribution
+// Copyright (C) 2004 Szymon Stefanek <pragma at kvirc dot net>
+//
+// 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 opinion) 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 "kvi_settings.h"
+#include <qwidget.h>
+#include <qlabel.h>
+#include <qdialog.h>
+#include <qcolor.h>
+
+class QPushButton;
+class KviActionDrawer;
+
+class KviCustomizeToolBarsDialog : public QDialog
+{
+ Q_OBJECT
+protected:
+ KviCustomizeToolBarsDialog(QWidget * p);
+public:
+ ~KviCustomizeToolBarsDialog();
+protected:
+ KviActionDrawer * m_pDrawer;
+ static KviCustomizeToolBarsDialog * m_pInstance;
+ QPushButton * m_pDeleteToolBarButton;
+ QPushButton * m_pRenameToolBarButton;
+ QPushButton * m_pExportToolBarButton;
+public:
+ static KviCustomizeToolBarsDialog * instance(){ return m_pInstance; };
+ static void display();
+ static void cleanup();
+protected:
+ virtual void showEvent(QShowEvent * e);
+ virtual void closeEvent(QCloseEvent *e);
+protected slots:
+ void closeClicked();
+ void newToolBar();
+ void deleteToolBar();
+ void renameToolBar();
+ void exportToolBar();
+ void currentToolBarChanged();
+};
+
+class QLineEdit;
+class QPushButton;
+
+class KviCustomToolBarPropertiesDialog : public QDialog
+{
+ Q_OBJECT
+public:
+ KviCustomToolBarPropertiesDialog(QWidget * p,const QString &szText,const QString &szId = QString::null,const QString &szLabel = QString::null,const QString &szIconId = QString::null);
+ ~KviCustomToolBarPropertiesDialog();
+protected:
+ QString m_szId;
+ QString m_szOriginalId;
+ QString m_szLabel;
+ QString m_szIconId;
+ QWidget * m_pAdvanced;
+ QLineEdit * m_pIdEdit;
+ QLineEdit * m_pLabelEdit;
+ QLineEdit * m_pIconEdit;
+ QPushButton * m_pIconButton;
+ QPushButton * m_pAdvancedButton;
+public:
+ const QString &id(){ return m_szId; };
+ const QString &label(){ return m_szLabel; };
+ const QString &iconId(){ return m_szIconId; };
+protected slots:
+ void okClicked();
+ void advancedClicked();
+ void iconButtonClicked();
+ void labelTextChanged(const QString &s);
+protected:
+ void iconSelected(const QString &szIconId);
+};
+
+class QTimer;
+
+class KviTrashcanLabel : public QLabel
+{
+ Q_OBJECT
+public:
+ KviTrashcanLabel(QWidget * p);
+ virtual ~KviTrashcanLabel();
+protected:
+ unsigned int m_uFlashCount;
+ QTimer * m_pFlashTimer;
+ QColor m_clrOriginal;
+protected:
+ virtual void dragEnterEvent(QDragEnterEvent * e);
+ virtual void dropEvent(QDropEvent * e);
+public slots:
+ void flash();
+protected slots:
+ void heartbeat();
+};
+
+#endif //!_TOOLBAREDITOR_H_
diff --git a/src/modules/toolbareditor/toolbareditor.vcproj b/src/modules/toolbareditor/toolbareditor.vcproj
new file mode 100755
index 000000000..63cd9f84b
--- /dev/null
+++ b/src/modules/toolbareditor/toolbareditor.vcproj
@@ -0,0 +1,173 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.10"
+ Name="toolbareditor"
+ ProjectGUID="{D05CBD17-50C4-4BA3-95F4-18D844CDF988}"
+ Keyword="Win32Proj">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)\win32build\bin\modules"
+ IntermediateDirectory="Debug"
+ ConfigurationType="2"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="&quot;$(ProjectDir)\..\..\kvirc\ui&quot;;&quot;$(ProjectDir)\..\..\kvilib\core&quot;;&quot;$(ProjectDir)\..\..\kvirc\module&quot;;&quot;$(ProjectDir)\..\..\kvilib\config&quot;;&quot;$(QTDIR)\include&quot;;&quot;$(ProjectDir)\..\..\kvilib\system&quot;;&quot;$(ProjectDir)\..\..\kvirc\uparser&quot;;&quot;$(ProjectDir)\..\..\kvirc\sparser&quot;;&quot;$(ProjectDir)\..\..\kvirc\kernel&quot;;&quot;$(ProjectDir)\..\..\kvilib\ext&quot;;&quot;$(ProjectDir)\..\..\kvilib\irc&quot;;&quot;$(ProjectDir)\..\..\kvilib\tal&quot;;&quot;$(ProjectDir)\..\..\kvirc\kvs&quot;;&quot;$(ProjectDir)\..\..\kvilib\file&quot;;&quot;$(ProjectDir)\..\..\kvilib\net&quot;;&quot;$(ProjectDir)\..\..\kvirc\uparser\scripttoolbar&quot;"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;TOOLBAREDITOR_EXPORTS"
+ MinimalRebuild="TRUE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="4"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="qt-mtnc321.lib qtmain.lib libeay32.lib SSLeay32.lib ws2_32.lib kvilib.lib kvirc.lib msvcrt.lib"
+ OutputFile="$(OutDir)/kvi$(ProjectName).dll"
+ LinkIncremental="2"
+ AdditionalLibraryDirectories="&quot;$(SSLLIBDIR)&quot;;&quot;$(QTDIR)\lib&quot;;&quot;$(SolutionDir)\win32build\bin&quot;"
+ IgnoreAllDefaultLibraries="TRUE"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(OutDir)/toolbareditor.pdb"
+ SubSystem="2"
+ ImportLibrary="$(OutDir)/toolbareditor.lib"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)\win32build\bin\modules"
+ IntermediateDirectory="Release"
+ ConfigurationType="2"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ GlobalOptimizations="TRUE"
+ InlineFunctionExpansion="2"
+ FavorSizeOrSpeed="1"
+ OmitFramePointers="TRUE"
+ EnableFiberSafeOptimizations="TRUE"
+ AdditionalIncludeDirectories="&quot;$(ProjectDir)\..\..\kvirc\ui&quot;;&quot;$(ProjectDir)\..\..\kvilib\core&quot;;&quot;$(ProjectDir)\..\..\kvirc\module&quot;;&quot;$(ProjectDir)\..\..\kvilib\config&quot;;&quot;$(QTDIR)\include&quot;;&quot;$(ProjectDir)\..\..\kvilib\system&quot;;&quot;$(ProjectDir)\..\..\kvirc\uparser&quot;;&quot;$(ProjectDir)\..\..\kvirc\sparser&quot;;&quot;$(ProjectDir)\..\..\kvirc\kernel&quot;;&quot;$(ProjectDir)\..\..\kvilib\ext&quot;;&quot;$(ProjectDir)\..\..\kvilib\irc&quot;;&quot;$(ProjectDir)\..\..\kvilib\tal&quot;;&quot;$(ProjectDir)\..\..\kvirc\kvs&quot;;&quot;$(ProjectDir)\..\..\kvilib\file&quot;;&quot;$(ProjectDir)\..\..\kvilib\net&quot;;&quot;$(ProjectDir)\..\..\kvirc\uparser\scripttoolbar&quot;"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;TOOLBAREDITOR_EXPORTS"
+ RuntimeLibrary="0"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="3"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="qt-mtnc321.lib qtmain.lib libeay32.lib SSLeay32.lib ws2_32.lib kvilib.lib kvirc.lib msvcrt.lib"
+ OutputFile="$(OutDir)/kvi$(ProjectName).dll"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="&quot;$(SSLLIBDIR)&quot;;&quot;$(QTDIR)\lib&quot;;&quot;$(SolutionDir)\win32build\bin&quot;"
+ IgnoreAllDefaultLibraries="TRUE"
+ GenerateDebugInformation="TRUE"
+ SubSystem="2"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ OptimizeForWindows98="1"
+ ImportLibrary="$(OutDir)/toolbareditor.lib"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
+ <File
+ RelativePath=".\libkvitoolbareditor.cpp">
+ </File>
+ <File
+ RelativePath=".\moc_toolbareditor.cpp">
+ </File>
+ <File
+ RelativePath=".\toolbareditor.cpp">
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
+ <File
+ RelativePath=".\toolbareditor.h">
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCustomBuildTool"
+ CommandLine="$(QTDIR)\bin\moc -o &quot;$(InputDir)\moc_$(InputName).cpp&quot; &quot;$(InputDir)\$(InputFileName)&quot;
+"
+ Outputs="$(InputDir)\moc_$(InputName).cpp"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCustomBuildTool"
+ CommandLine="$(QTDIR)\bin\moc -o &quot;$(InputDir)\moc_$(InputName).cpp&quot; &quot;$(InputDir)\$(InputFileName)&quot;
+"
+ Outputs="$(InputDir)\moc_$(InputName).cpp"/>
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/src/modules/toolbareditor/toolbareditor_vc05.vcproj b/src/modules/toolbareditor/toolbareditor_vc05.vcproj
new file mode 100644
index 000000000..3a037e570
--- /dev/null
+++ b/src/modules/toolbareditor/toolbareditor_vc05.vcproj
@@ -0,0 +1,261 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8,00"
+ Name="toolbareditor"
+ ProjectGUID="{D05CBD17-50C4-4BA3-95F4-18D844CDF988}"
+ RootNamespace="toolbareditor"
+ Keyword="Win32Proj"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)\win32build\bin\modules\"
+ IntermediateDirectory="Debug"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="&quot;$(ProjectDir)\..\..\kvirc\ui&quot;;&quot;$(ProjectDir)\..\..\kvilib\core&quot;;&quot;$(ProjectDir)\..\..\kvirc\module&quot;;&quot;$(ProjectDir)\..\..\kvilib\config&quot;;&quot;$(QTDIR)\include&quot;;&quot;$(ProjectDir)\..\..\kvilib\system&quot;;&quot;$(ProjectDir)\..\..\kvirc\uparser&quot;;&quot;$(ProjectDir)\..\..\kvirc\sparser&quot;;&quot;$(ProjectDir)\..\..\kvirc\kernel&quot;;&quot;$(ProjectDir)\..\..\kvilib\ext&quot;;&quot;$(ProjectDir)\..\..\kvilib\irc&quot;;&quot;$(ProjectDir)\..\..\kvilib\tal&quot;;&quot;$(ProjectDir)\..\..\kvirc\kvs&quot;;&quot;$(ProjectDir)\..\..\kvilib\file&quot;;&quot;$(ProjectDir)\..\..\kvilib\net&quot;;&quot;$(ProjectDir)\..\..\kvirc\uparser\scripttoolbar&quot;"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;TOOLBAREDITOR_EXPORTS;_CRT_SECURE_NO_DEPRECATE"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="qt-$(QTTAG).lib qtmain.lib libeay32.lib SSLeay32.lib ws2_32.lib kvilib.lib kvirc.lib msvcrt.lib perl58.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib winmm.lib"
+ OutputFile="$(OutDir)/kvi$(ProjectName).dll"
+ LinkIncremental="2"
+ AdditionalLibraryDirectories="&quot;$(SSLLIBDIR)&quot;;&quot;$(PERLDIR)\lib\CORE&quot;;&quot;$(QTDIR)\lib&quot;;&quot;$(SolutionDir)\win32build\bin&quot;;&quot;$(ZLIBLIBDIR)&quot;"
+ GenerateManifest="true"
+ IgnoreAllDefaultLibraries="true"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)/toolbareditor.pdb"
+ SubSystem="2"
+ TurnOffAssemblyGeneration="true"
+ ImportLibrary="$(OutDir)/toolbareditor.lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ EmbedManifest="true"
+ VerboseOutput="true"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)\win32build\bin\modules"
+ IntermediateDirectory="Release"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="1"
+ InlineFunctionExpansion="2"
+ EnableIntrinsicFunctions="true"
+ FavorSizeOrSpeed="2"
+ OmitFramePointers="true"
+ EnableFiberSafeOptimizations="true"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="&quot;$(ProjectDir)\..\..\kvirc\ui&quot;;&quot;$(ProjectDir)\..\..\kvilib\core&quot;;&quot;$(ProjectDir)\..\..\kvirc\module&quot;;&quot;$(ProjectDir)\..\..\kvilib\config&quot;;&quot;$(QTDIR)\include&quot;;&quot;$(ProjectDir)\..\..\kvilib\system&quot;;&quot;$(ProjectDir)\..\..\kvirc\uparser&quot;;&quot;$(ProjectDir)\..\..\kvirc\sparser&quot;;&quot;$(ProjectDir)\..\..\kvirc\kernel&quot;;&quot;$(ProjectDir)\..\..\kvilib\ext&quot;;&quot;$(ProjectDir)\..\..\kvilib\irc&quot;;&quot;$(ProjectDir)\..\..\kvilib\tal&quot;;&quot;$(ProjectDir)\..\..\kvirc\kvs&quot;;&quot;$(ProjectDir)\..\..\kvilib\file&quot;;&quot;$(ProjectDir)\..\..\kvilib\net&quot;;&quot;$(ProjectDir)\..\..\kvirc\uparser\scripttoolbar&quot;"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;TOOLBAREDITOR_EXPORTS;_CRT_SECURE_NO_DEPRECATE"
+ StringPooling="true"
+ MinimalRebuild="true"
+ ExceptionHandling="1"
+ RuntimeLibrary="0"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="qt-$(QTTAG).lib qtmain.lib libeay32.lib SSLeay32.lib ws2_32.lib kvilib.lib kvirc.lib msvcrt.lib perl58.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib winmm.lib"
+ OutputFile="$(OutDir)/kvi$(ProjectName).dll"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="&quot;$(SSLLIBDIR)&quot;;&quot;$(PERLDIR)\lib\CORE&quot;;&quot;$(QTDIR)\lib&quot;;&quot;$(SolutionDir)\win32build\bin&quot;;&quot;$(ZLIBLIBDIR)&quot;"
+ GenerateManifest="true"
+ IgnoreAllDefaultLibraries="true"
+ GenerateDebugInformation="true"
+ SubSystem="2"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ OptimizeForWindows98="1"
+ LinkTimeCodeGeneration="1"
+ TurnOffAssemblyGeneration="true"
+ ImportLibrary="$(OutDir)/toolbareditor.lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ EmbedManifest="true"
+ VerboseOutput="true"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\libkvitoolbareditor.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\moc_toolbareditor.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\toolbareditor.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath=".\toolbareditor.h"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ CommandLine="$(QTDIR)\bin\moc -o &quot;$(InputDir)\moc_$(InputName).cpp&quot; &quot;$(InputDir)\$(InputFileName)&quot;&#x0D;&#x0A;"
+ Outputs="$(InputDir)\moc_$(InputName).cpp"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ CommandLine="$(QTDIR)\bin\moc -o &quot;$(InputDir)\moc_$(InputName).cpp&quot; &quot;$(InputDir)\$(InputFileName)&quot;&#x0D;&#x0A;"
+ Outputs="$(InputDir)\moc_$(InputName).cpp"
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>