aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Voker572008-04-03 16:55:27 +0000
committerGravatar Voker572008-04-03 16:55:27 +0000
commit0a9af3d9b635d3ecc78fc2d3263f105f8b535eab (patch)
tree21281c2a9ad6a5b00edcd89c1aa9feaf7ace275f
parentfixed cmake rules and added skel for windows; (diff)
downloadKVIrc-0a9af3d9b635d3ecc78fc2d3263f105f8b535eab.tar.gz
KVIrc-0a9af3d9b635d3ecc78fc2d3263f105f8b535eab.tar.bz2
KVIrc-0a9af3d9b635d3ecc78fc2d3263f105f8b535eab.zip
More kde4 porting
git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@1380 17fca916-40b9-46aa-a4ea-0a15b648b75c
-rw-r--r--src/kvilib/tal/kvi_tal_application_kde.h1
-rw-r--r--src/kvilib/tal/kvi_tal_mainwindow.cpp11
-rw-r--r--src/kvilib/tal/kvi_tal_mainwindow_kde.h3
-rw-r--r--src/kvirc/kernel/kvi_app.cpp26
-rw-r--r--src/kvirc/kernel/kvi_app_setup.cpp62
-rw-r--r--src/kvirc/kernel/kvi_ipc.cpp28
-rw-r--r--src/kvirc/ui/kvi_customtoolbar.cpp15
-rw-r--r--src/kvirc/ui/kvi_window.cpp14
8 files changed, 88 insertions, 72 deletions
diff --git a/src/kvilib/tal/kvi_tal_application_kde.h b/src/kvilib/tal/kvi_tal_application_kde.h
index 49c33d037..61767b5b2 100644
--- a/src/kvilib/tal/kvi_tal_application_kde.h
+++ b/src/kvilib/tal/kvi_tal_application_kde.h
@@ -22,7 +22,6 @@
// 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 <KApplication>
diff --git a/src/kvilib/tal/kvi_tal_mainwindow.cpp b/src/kvilib/tal/kvi_tal_mainwindow.cpp
index bea095790..73288043e 100644
--- a/src/kvilib/tal/kvi_tal_mainwindow.cpp
+++ b/src/kvilib/tal/kvi_tal_mainwindow.cpp
@@ -33,6 +33,17 @@
setCaption(nam);
}
+ bool KviTalMainWindow::usesBigPixmaps()
+ {
+ return (iconSize().width() > 40);
+ }
+
+ void KviTalMainWindow::setUsesBigPixmaps(bool b)
+ {
+ if(b)setIconSize(QSize(48,48));
+ else setIconSize(QSize(24,24));
+ }
+
#ifndef COMPILE_USE_STANDALONE_MOC_SOURCES
#include "kvi_tal_mainwindow_kde.moc"
#endif //!COMPILE_USE_STANDALONE_MOC_SOURCES
diff --git a/src/kvilib/tal/kvi_tal_mainwindow_kde.h b/src/kvilib/tal/kvi_tal_mainwindow_kde.h
index 3d65313eb..0520e0708 100644
--- a/src/kvilib/tal/kvi_tal_mainwindow_kde.h
+++ b/src/kvilib/tal/kvi_tal_mainwindow_kde.h
@@ -33,6 +33,9 @@ class KVILIB_API KviTalMainWindow : public KMainWindow
public:
KviTalMainWindow(QWidget * par,const char * nam);
~KviTalMainWindow();
+ public:
+ bool usesBigPixmaps();
+ void setUsesBigPixmaps(bool b);
};
#endif // _KVI_TAL_MAINWINDOW_KDE_H_
diff --git a/src/kvirc/kernel/kvi_app.cpp b/src/kvirc/kernel/kvi_app.cpp
index 8f1a15c96..debc78ccb 100644
--- a/src/kvirc/kernel/kvi_app.cpp
+++ b/src/kvirc/kernel/kvi_app.cpp
@@ -167,7 +167,7 @@ QPixmap * g_pActivityMeterPixmap = 0;
#endif
KviApp::KviApp(int &argc,char ** argv)
-: KviTalApplication(argc,argv)
+: KviTalApplication()
{
// Ok...everything begins here
g_pApp = this;
@@ -225,7 +225,7 @@ void KviApp::setup()
// check if we want to permanently disable the splash screen
// we do it once for every version: the user should see the new splash screens at least once
-
+
QString szSplashDisableFile;
getLocalKvircDirectory(szSplashDisableFile,Pics,"disable-splash." KVI_VERSION);
@@ -773,7 +773,7 @@ void KviApp::checkSuggestRestoreDefaultScript()
if(score < 100)return;
bSuggestedOnce = true;
-
+
switch(QMessageBox::question(0,__tr2qs("Installation problems ?"),
__tr2qs("<b>Ooops...</b><br><br>" \
"<b>There are some reasons that make me think that your KVIrc installation is incomplete.</b><br><br>" \
@@ -821,7 +821,7 @@ void KviApp::restoreDefaultScript()
KviKvs::clearRawEvents();
KviKvs::clearPopups();
KviKvs::clearScriptAddons();
-
+
KviActionManager::instance()->killAllKvsUserActions();
KviCustomToolBarManager::instance()->clear();
@@ -896,7 +896,7 @@ QString KviApp::getClipboardText()
#endif
return buffer;
*/
-
+
QString buffer = clipboard()->text(QClipboard::Clipboard);
if(buffer.isEmpty())return clipboard()->text(QClipboard::Selection);
return buffer;
@@ -1541,7 +1541,7 @@ void KviApp::autoConnectToServers()
}
g_pIrcServerDataBase->clearAutoConnectOnStartupServers();
}
-
+
KviPointerList<KviIrcServerDataBaseRecord> * lr = g_pIrcServerDataBase->autoConnectOnStartupNetworks();
if(lr)
{
@@ -1569,7 +1569,7 @@ void KviApp::createFrame()
KviKvsScript::run(m_szExecAfterStartup.ptr(),g_pFrame->firstConsole());
m_szExecAfterStartup = "";
}
-
+
// auto connect to servers if needed
if(g_pIrcServerDataBase->autoConnectOnStartupServers() || g_pIrcServerDataBase->autoConnectOnStartupNetworks())
{
@@ -1578,7 +1578,7 @@ void KviApp::createFrame()
if(KVI_OPTION_BOOL(KviOption_boolShowDockExtension))
g_pFrame->executeInternalCommand(KVI_INTERNALCOMMAND_DOCKWIDGET_SHOW);
-
+
if(KVI_OPTION_BOOL(KviOption_boolStartupMinimized))
{
if(KVI_OPTION_BOOL(KviOption_boolMinimizeInTray) && KVI_OPTION_BOOL(KviOption_boolShowDockExtension))
@@ -1771,7 +1771,7 @@ KviWindow * KviApp::findWindowByCaption(const QString &windowCaption,int iContex
while(it.current())
{
- if(KviQString::equalCI(windowCaption,it.current()->plainTextCaption()) &&
+ if(KviQString::equalCI(windowCaption,it.current()->plainTextCaption()) &&
(iContextId==-1 || it.current()->context()->id() == iContextId))
return it.current();
++it;
@@ -1865,11 +1865,11 @@ void KviApp::buildRecentChannels()
m_pRecentChannelsDict = new KviPointerHashTable<const char *,QStringList>;
m_pRecentChannelsDict->setAutoDelete(TRUE);
QString szChan,szNet;
- for (
+ for (
QStringList::Iterator it = KVI_OPTION_STRINGLIST(KviOption_stringlistRecentChannels).begin();
it != KVI_OPTION_STRINGLIST(KviOption_stringlistRecentChannels).end();
++it
- )
+ )
{
if(!(*it).isEmpty())
{
@@ -2020,7 +2020,7 @@ void KviApp::heartbeat(kvi_time_t tNow)
// FIXME: this has huge precision problems...
KVI_OPTION_UINT(KviOption_uintTotalConnectionTime)++;
}
-
+
// the line below is an approximation of (tNow / 120) == 0
// we don't need a really great precision here, so 128 is still ok
if(!(tNow & 0x7f))
@@ -2036,7 +2036,7 @@ void KviApp::timerEvent(QTimerEvent *e)
}
// our heartbeat
-
+
kvi_time_t tNow = kvi_unixTime();
heartbeat(tNow);
diff --git a/src/kvirc/kernel/kvi_app_setup.cpp b/src/kvirc/kernel/kvi_app_setup.cpp
index 785fa2b37..5c331bd6d 100644
--- a/src/kvirc/kernel/kvi_app_setup.cpp
+++ b/src/kvirc/kernel/kvi_app_setup.cpp
@@ -44,10 +44,11 @@
#include <stdlib.h> // for getenv()
#include <unistd.h> // for symlink() <-- unused ?
-
+
#ifdef COMPILE_KDE_SUPPORT
#include <kconfig.h>
- #include <kstddirs.h>
+ #include <KConfigGroup>
+// #include <kstddirs.h>
#endif
#else
@@ -92,11 +93,11 @@ bool KviApp::checkLocalKvircDirectory(const QString szDir)
//First check if the dir exists
if(!KviFileUtils::directoryExists(szDir))return false;
if(!QFileInfo(szDir).isWritable()) return false;
-
+
QString szBuff;
getLocalKvircDirectory(szBuff,Config);
if(!KviFileUtils::directoryExists(szBuff)) return false;
-
+
return true;
}
@@ -362,7 +363,7 @@ void KviApp::setupUriAssociations(char * proto)
appPath.replace('/',"\\");
SHDeleteKey(HKEY_CLASSES_ROOT,key);
-
+
err=RegCreateKeyEx(HKEY_CLASSES_ROOT,key,0,0,0,KEY_WRITE,0,&hKey,0);
RegSetValueEx( hKey,0,0,REG_SZ,(LPBYTE)"URL:IRC Protocol",16);
RegSetValueEx( hKey,"URL Protocol",0,REG_SZ,(LPBYTE)"",0);
@@ -376,7 +377,7 @@ void KviApp::setupUriAssociations(char * proto)
RegCreateKeyEx(HKEY_CLASSES_ROOT,key,0,0,0,KEY_WRITE,0,&hKey,0);
tmp=__tr2qs("Open with KVIrc").local8Bit();
RegSetValueEx( hKey,0,0,REG_SZ,(LPBYTE)tmp.data(),tmp.length());
-
+
key=storedKey+"\\Shell\\open\\command";
RegCreateKeyEx(HKEY_CLASSES_ROOT,key,0,0,0,KEY_WRITE,0,&hKey,0);
tmp=QString(appPath+" \"%1\"").local8Bit();
@@ -399,7 +400,7 @@ void KviApp::setupFileAssociations()
err=RegCreateKeyEx(HKEY_CLASSES_ROOT,".kvs",0,0,0,KEY_WRITE,0,&hKey,0);
RegSetValueEx( hKey,0,0,REG_SZ,(LPBYTE)"KVIrcScript",11);
-
+
SHDeleteKey(HKEY_CLASSES_ROOT,"KVIrcScript");
RegCreateKeyEx(HKEY_CLASSES_ROOT,"KVIrcScript",0,0,0,KEY_WRITE,0,&hKey,0);
@@ -413,7 +414,7 @@ void KviApp::setupFileAssociations()
RegCreateKeyEx(HKEY_CLASSES_ROOT,"KVIrcScript\\Shell\\Parse",0,0,0,KEY_WRITE,0,&hKey,0);
tmp=__tr2qs("Run KVS Script").local8Bit();
RegSetValueEx( hKey,0,0,REG_SZ,(LPBYTE)tmp.data(),tmp.length());
-
+
RegCreateKeyEx(HKEY_CLASSES_ROOT,"KVIrcScript\\Shell\\Parse\\command",0,0,0,KEY_WRITE,0,&hKey,0);
tmp=QString(appPath+" \"%1\"").local8Bit();
RegSetValueEx( hKey,0,0,REG_SZ,(LPBYTE)tmp.data(),tmp.length());
@@ -423,7 +424,7 @@ void KviApp::setupFileAssociations()
err=RegCreateKeyEx(HKEY_CLASSES_ROOT,".kvc",0,0,0,KEY_WRITE,0,&hKey,0);
RegSetValueEx( hKey,0,0,REG_SZ,(LPBYTE)"KVIrcConfig",11);
-
+
SHDeleteKey(HKEY_CLASSES_ROOT,"KVIrcConfig");
RegCreateKeyEx(HKEY_CLASSES_ROOT,"KVIrcConfig",0,0,0,KEY_WRITE,0,&hKey,0);
@@ -435,12 +436,12 @@ void KviApp::setupFileAssociations()
RegSetValueEx( hKey,0,0,REG_SZ,(LPBYTE)tmp.data(),tmp.length());
// Themes
-
+
SHDeleteKey(HKEY_CLASSES_ROOT,".kvt");
err=RegCreateKeyEx(HKEY_CLASSES_ROOT,".kvt",0,0,0,KEY_WRITE,0,&hKey,0);
RegSetValueEx( hKey,0,0,REG_SZ,(LPBYTE)"KVIrcTheme",11);
-
+
SHDeleteKey(HKEY_CLASSES_ROOT,"KVIrcTheme");
RegCreateKeyEx(HKEY_CLASSES_ROOT,"KVIrcTheme",0,0,0,KEY_WRITE,0,&hKey,0);
@@ -454,7 +455,7 @@ void KviApp::setupFileAssociations()
RegCreateKeyEx(HKEY_CLASSES_ROOT,"KVIrcTheme\\Shell\\Install",0,0,0,KEY_WRITE,0,&hKey,0);
tmp=__tr2qs("Install Theme Package").local8Bit();
RegSetValueEx( hKey,0,0,REG_SZ,(LPBYTE)tmp.data(),tmp.length());
-
+
RegCreateKeyEx(HKEY_CLASSES_ROOT,"KVIrcTheme\\Shell\\Install\\command",0,0,0,KEY_WRITE,0,&hKey,0);
tmp=QString(appPath+" \"%1\"").local8Bit();
RegSetValueEx( hKey,0,0,REG_SZ,(LPBYTE)tmp.data(),tmp.length());
@@ -465,7 +466,7 @@ void KviApp::setupFileAssociations()
err=RegCreateKeyEx(HKEY_CLASSES_ROOT,".kva",0,0,0,KEY_WRITE,0,&hKey,0);
RegSetValueEx( hKey,0,0,REG_SZ,(LPBYTE)"KVIrcAddon",11);
-
+
SHDeleteKey(HKEY_CLASSES_ROOT,"KVIrcAddon");
RegCreateKeyEx(HKEY_CLASSES_ROOT,"KVIrcAddon",0,0,0,KEY_WRITE,0,&hKey,0);
@@ -479,7 +480,7 @@ void KviApp::setupFileAssociations()
RegCreateKeyEx(HKEY_CLASSES_ROOT,"KVIrcAddon\\Shell\\Install",0,0,0,KEY_WRITE,0,&hKey,0);
tmp=__tr2qs("Install Package").local8Bit();
RegSetValueEx( hKey,0,0,REG_SZ,(LPBYTE)tmp.data(),tmp.length());
-
+
RegCreateKeyEx(HKEY_CLASSES_ROOT,"KVIrcAddon\\Shell\\Install\\command",0,0,0,KEY_WRITE,0,&hKey,0);
tmp=QString(appPath+" \"%1\"").local8Bit();
RegSetValueEx( hKey,0,0,REG_SZ,(LPBYTE)tmp.data(),tmp.length());
@@ -504,7 +505,7 @@ void KviApp::setupFileAssociations()
"/etc/X11", "/home", "/home/kvirc",
0
};
-
+
const char * usualKvircGlobalDir[]=
{
"/share/kvirc/", "/share/apps/kvirc/",
@@ -542,6 +543,7 @@ void KviApp::findGlobalKvircDirectory()
// Since I had many problems with it
// because of strange distributions or KDEDIRS
// I do it in that way...
+ /* does not work with kde4...
#ifdef COMPILE_KDE_SUPPORT
// KDE compilation ...
// The things usually go installed into $KDEDIR/share/apps/kvirc/$VERSION_BRANCH
@@ -562,7 +564,7 @@ void KviApp::findGlobalKvircDirectory()
}
// FAILED ? Check the usual way...
#endif //COMPILE_WITH_KDE
-
+*/
// Non KDE compilation , or not found under $KDEDIR/share/apps/kvirc/$VERSION_BRANCH
// Check for MacOS X Bundle compilation
@@ -583,7 +585,7 @@ void KviApp::findGlobalKvircDirectory()
#warning you must change back hardcoded 4.0 to VERSION_BRANCH
//m_szGlobalKvircDir+= VERSION_BRANCH;
m_szGlobalKvircDir+= "4.0/";
- if(checkGlobalKvircDirectory(m_szGlobalKvircDir))return;
+ if(checkGlobalKvircDirectory(m_szGlobalKvircDir))return;
}
}
@@ -651,15 +653,15 @@ bool KviApp::findLocalKvircDirectory()
#ifdef COMPILE_KDE_SUPPORT
if(m_szConfigFile.isEmpty())
{ // don't do that if user supplied a config file :)
- KConfig * cfg = config();
+ KConfig * cfg = new KConfig("kvirc");
+ KConfigGroup * cfgMainGroup = new KConfigGroup(cfg, "Main");
if(cfg)
{
- if(cfg->getConfigState() == KConfig::ReadWrite)
+ if(cfg->accessMode() == KConfig::ReadWrite)
{
- cfg->setGroup("Main");
- m_szLocalKvircDir = cfg->readEntry("LocalKvircDirectory","");
-
- unsigned int uSourcesDate = cfg->readUnsignedNumEntry("SourcesDate",0);
+ m_szLocalKvircDir = cfgMainGroup->readEntry("LocalKvircDirectory");
+
+ unsigned int uSourcesDate = cfgMainGroup->readEntry("SourcesDate").toInt();
if(uSourcesDate < KVI_SOURCES_DATE_NUMERIC_FORCE_SETUP)
return false; // we force a setup anyway
@@ -699,7 +701,7 @@ bool KviApp::findLocalKvircDirectory()
cfgx.setGroup("Main");
m_szLocalKvircDir = cfgx.readEntry("LocalKvircDirectory","");
-
+
unsigned int uSourcesDate = cfgx.readUIntEntry("SourcesDate",0);
if(uSourcesDate < KVI_SOURCES_DATE_NUMERIC_FORCE_SETUP)
return false; // we force a setup anyway
@@ -718,7 +720,7 @@ void KviApp::loadDirectories()
szLocalePath.append(KVI_PATH_SEPARATOR);
szLocalePath.append("locale");
szLocalePath.append(KVI_PATH_SEPARATOR);
-
+
KviLocale::init(this,szLocalePath);
//__debug_1arg("Global Kvirc directory is %s",m_szGlobalKvircDir.ptr());
@@ -830,14 +832,14 @@ void KviApp::saveKvircDirectory()
if(m_szConfigFile.isEmpty())
{
// not if user supplied a config file
- KConfig * cfg = config();
+ KConfig * cfg = new KConfig("kvirc");
+ KConfigGroup * cfgMainGroup = new KConfigGroup(cfg, "Main");
if(cfg)
{
- if(cfg->getConfigState() == KConfig::ReadWrite)
+ if(cfg->accessMode() == KConfig::ReadWrite)
{
- cfg->setGroup("Main");
- cfg->writeEntry("LocalKvircDirectory",m_szLocalKvircDir);
- cfg->writeEntry("SourcesDate",KVI_SOURCES_DATE_NUMERIC);
+ cfgMainGroup->writeEntry("LocalKvircDirectory",m_szLocalKvircDir);
+ cfgMainGroup->writeEntry("SourcesDate",KVI_SOURCES_DATE_NUMERIC);
cfg->sync();
return;
}
diff --git a/src/kvirc/kernel/kvi_ipc.cpp b/src/kvirc/kernel/kvi_ipc.cpp
index 1d9980fb8..930bc3424 100644
--- a/src/kvirc/kernel/kvi_ipc.cpp
+++ b/src/kvirc/kernel/kvi_ipc.cpp
@@ -24,7 +24,7 @@
#define __KVIRC__
-
+#include <qmetatype.h>
#include "kvi_ipc.h"
@@ -64,7 +64,7 @@
static Atom kvi_atom_ipc_remote_message;
static KviStr kvi_sentinel_id;
static bool g_bIpcAtomsLoaded = false;
-
+
static void kvi_ipcLoadAtoms()
{
if(g_bIpcAtomsLoaded)return;
@@ -74,13 +74,13 @@
kvi_atom_ipc_remote_command = XInternAtom(kvi_ipc_get_xdisplay(),"XA_KVI_IPC_REMOTE_COMMAND",False);
kvi_atom_ipc_remote_message = XInternAtom(kvi_ipc_get_xdisplay(),"XA_KVI_IPC_REMOTE_MESSAGE",False);
}
-
+
static void kvi_ipcSetRemoteCommand(Window w,const char * command)
{
XChangeProperty(kvi_ipc_get_xdisplay(),w,kvi_atom_ipc_remote_command,
XA_STRING,8,PropModeReplace,(const unsigned char *)command,kvi_strLen(command) + 1);
}
-
+
static Window kvi_x11_findIpcSentinel(Window win)
{
Atom type;
@@ -102,28 +102,28 @@
}
}
}
-
+
Window root,parent;
Window * children;
unsigned int nChildren;
-
+
if(!XQueryTree(kvi_ipc_get_xdisplay(),win,&root,&parent,&children,&nChildren))
{
if(children)XFree((char *)children);
return 0;
}
-
+
Window found = 0;
-
+
for(int i=nChildren-1;(!found) && (i >= 0);i--)
found = kvi_x11_findIpcSentinel(children[i]);
-
+
if(children)XFree((char *)children);
-
+
return found;
}
#endif //!COMPILE_NO_X
-
+
#endif //!COMPILE_ON_WINDOWS
@@ -146,7 +146,7 @@
}
#else //!COMPILE_ON_WINDOWS
#ifdef COMPILE_X11_SUPPORT
-
+
kvi_ipcLoadAtoms();
Window sentinel = kvi_x11_findIpcSentinel(kvi_ipc_get_xrootwin());
@@ -202,7 +202,7 @@
hide();
}
-
+
KviIpcSentinel::~KviIpcSentinel()
{
}
@@ -250,7 +250,7 @@
}
}
kvi_ipcSetRemoteCommand(winId(),"");
-
+
if(g_pApp)g_pApp->ipcMessage(szData.ptr());
return true;
}
diff --git a/src/kvirc/ui/kvi_customtoolbar.cpp b/src/kvirc/ui/kvi_customtoolbar.cpp
index 94e432855..4418c653b 100644
--- a/src/kvirc/ui/kvi_customtoolbar.cpp
+++ b/src/kvirc/ui/kvi_customtoolbar.cpp
@@ -250,7 +250,8 @@ void KviCustomToolBar::dragEnterEvent(QDragEnterEvent *e)
a->setVisible(true);
#ifdef COMPILE_KDE_SUPPORT
// bleah ://///
- insertWidget(-1,m_pDraggedChild->sizeHint().width(),m_pDraggedChild,idx);
+ //insertWidget(-1,m_pDraggedChild->sizeHint().width(),m_pDraggedChild,idx);
+ addWidget(m_pDraggedChild);
#endif
QEvent ev(QEvent::LayoutHint);
QApplication::sendEvent(this,&ev);
@@ -454,7 +455,8 @@ void KviCustomToolBar::drag(QWidget * child,const QPoint &pnt)
a->setVisible(true);
#ifdef COMPILE_KDE_SUPPORT
// bleah ://///
- insertWidget(-1,child->width(),child,idx);
+ // not sure if i'm losing anythig from insertWidget(-1,child->width(),child,idx);
+ addWidget(child);
#endif
QEvent ev(QEvent::LayoutHint);
QApplication::sendEvent(this,&ev);
@@ -533,14 +535,11 @@ bool KviCustomToolBar::eventFilter(QObject *o,QEvent *e)
{
// drag out!
// FIXME: This is screwed up in Qt4.... :/
-#ifdef COMPILE_USE_QT4
QDrag * d = new QDrag(this);
QMimeData * m = new QMimeData();
m->setText(m_pMovedChild->name());
d->setMimeData(m);
-#else
- QDragObject * d = new QTextDrag(m_pMovedChild->name(),this);
-#endif
+
KviAction * act = KviActionManager::instance()->getAction(m_pMovedChild->name());
if(act)
{
@@ -574,7 +573,9 @@ bool KviCustomToolBar::eventFilter(QObject *o,QEvent *e)
pActionForMovedChild->setVisible(false);
#ifdef COMPILE_KDE_SUPPORT
// bleah ://///
- insertWidget(-1,m_pMovedChild->width(),m_pMovedChild,0);
+ // muarghh
+ //insertWidget(-1,m_pMovedChild->width(),m_pMovedChild,0);
+ addWidget(m_pMovedChild);
#endif
QEvent ev(QEvent::LayoutHint);
QApplication::sendEvent(this,&ev);
diff --git a/src/kvirc/ui/kvi_window.cpp b/src/kvirc/ui/kvi_window.cpp
index 04b7be230..664f9f0a9 100644
--- a/src/kvirc/ui/kvi_window.cpp
+++ b/src/kvirc/ui/kvi_window.cpp
@@ -76,7 +76,7 @@
#endif
#ifdef COMPILE_KDE_SUPPORT
- #include <kwin.h>
+// #include <kwin.h>
#include <kdeversion.h>
#endif
@@ -276,7 +276,7 @@ bool KviWindow::focusNextPrevChild(bool next)
if(w->focusPolicy() == Qt::StrongFocus)return false;
//QVariant v = w->property("KviProperty_FocusOwner");
//if(v.isValid())return false; // Do NOT change the focus widget!
-
+
if(w->parent())
{
if(w->parent()->metaObject()->indexOfProperty("KviProperty_ChildFocusOwner") == -1)
@@ -684,7 +684,7 @@ void KviWindow::createSystemTextEncodingPopup()
{
g_pMdiWindowSystemTextEncodingPopup->clear();
}
-
+
if(!g_pMdiWindowSystemTextEncodingPopupStandard)
g_pMdiWindowSystemTextEncodingPopupStandard = new KviTalPopupMenu();
else
@@ -725,7 +725,7 @@ void KviWindow::createSystemTextEncodingPopup()
g_pMdiWindowSystemTextEncodingPopup->insertItem(__tr2qs("Standard"),g_pMdiWindowSystemTextEncodingPopupStandard);
g_pMdiWindowSystemTextEncodingPopup->insertItem(__tr2qs("Smart (Send Local)"),g_pMdiWindowSystemTextEncodingPopupSmart);
g_pMdiWindowSystemTextEncodingPopup->insertItem(__tr2qs("Smart (Send UTF-8)"),g_pMdiWindowSystemTextEncodingPopupSmartUtf8);
-
+
int i = 0;
KviLocale::EncodingDescription * d = KviLocale::encodingDescription(i);
while(d->szName)
@@ -959,7 +959,7 @@ void KviWindow::focusInEvent(QFocusEvent *)
{
// must find one NOW
// we probably have no KviInput since it would have been grabbed anyway
-
+
if(m_pIrcView)m_pFocusHandler = m_pIrcView;
else {
QList<QObject *> list = children();
@@ -1017,7 +1017,7 @@ bool KviWindow::eventFilter(QObject *o,QEvent *e)
if(m_pLastFocusedChild->hasFocus() && m_pLastFocusedChild->isVisible())
return false;
}
-
+
if(m_pFocusHandler)
{
m_pFocusHandler->setFocus();
@@ -1374,7 +1374,7 @@ void KviWindow::preprocessMessage(QString & szMessage)
else
{
*it=QString("\r!c%1\r%2\r").arg(tmp).arg(*it);
- }
+ }
}
szMessage=strings.join(" ");
}