This is a multi-part message in MIME format. --------------030605060905050100080406 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit - K_WS_QTONLY removed (eventually it will be totally removed) - KApplication_init_windows() added -- regards / pozdrawiam, Jaroslaw Staniek / OpenOffice Polska Kexi project: http://koffice.org/kexi/ http://www.kexi-project.org/ Qt-KDE Wrapper project: http://iidea.pl/~js/qkw/ --------------030605060905050100080406 Content-Type: text/plain; name="kdecore.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="kdecore.patch" Index: kapplication.cpp =================================================================== RCS file: /home/kde/kdelibs/kdecore/kapplication.cpp,v retrieving revision 1.684 diff -u -r1.684 kapplication.cpp --- kapplication.cpp 13 Oct 2004 11:15:40 -0000 1.684 +++ kapplication.cpp 14 Oct 2004 18:59:26 -0000 @@ -73,7 +73,7 @@ #include #include -#if defined Q_WS_X11 && ! defined K_WS_QTONLY +#if defined Q_WS_X11 #include #endif @@ -101,7 +101,7 @@ #include #include #include -#if defined Q_WS_X11 && ! defined K_WS_QTONLY +#if defined Q_WS_X11 //#ifndef Q_WS_QWS //FIXME(E): NetWM should talk to QWS... #include #endif @@ -112,7 +112,6 @@ #include #endif -//#if defined Q_WS_X11 && ! defined K_WS_QTONLY #ifdef Q_WS_X11 #include // schrode #include // schrode @@ -138,7 +137,7 @@ #define DISPLAY "QWS_DISPLAY" #endif -#if defined Q_WS_X11 && ! defined K_WS_QTONLY +#if defined Q_WS_X11 #include #endif @@ -191,6 +190,10 @@ } #endif +#ifdef Q_WS_WIN +void KApplication_init_windows(bool GUIenabled); +#endif + /* Private data to make keeping binary compatibility easier */ @@ -498,7 +501,7 @@ if( t == QEvent::Show && receiver->isWidgetType()) { QWidget* w = static_cast< QWidget* >( receiver ); -#if defined Q_WS_X11 && ! defined K_WS_QTONLY +#if defined Q_WS_X11 if( w->isTopLevel() && !startupId().isEmpty()) // TODO better done using window group leader? KStartupInfo::setWindowStartupId( w->winId(), startupId()); #endif @@ -518,7 +521,7 @@ void KApplication::checkAppStartedSlot() { -#if defined Q_WS_X11 && ! defined K_WS_QTONLY +#if defined Q_WS_X11 KStartupInfo::handleAutoAppStartedSending(); #endif } @@ -781,7 +784,7 @@ smw = 0; // Initial KIPC event mask. -#if defined Q_WS_X11 && ! defined K_WS_QTONLY +#if defined Q_WS_X11 kipcEventMask = (1 << KIPC::StyleChanged) | (1 << KIPC::PaletteChanged) | (1 << KIPC::FontChanged) | (1 << KIPC::BackgroundChanged) | (1 << KIPC::ToolbarStyleChanged) | (1 << KIPC::SettingsChanged) | @@ -879,6 +882,8 @@ 32, PropModeReplace, (unsigned char *)&data, 1); } d->oldIceIOErrorHandler = IceSetIOErrorHandler( kde_ice_ioerrorhandler ); +#elif defined(Q_WS_WIN) + KApplication_init_windows(GUIenabled); #else // FIXME(E): Implement for Qt Embedded #endif @@ -1715,7 +1720,6 @@ } } -#if defined Q_WS_X11 && ! defined K_WS_QTONLY if ((_event->type == ClientMessage) && (_event->xclient.message_type == kipcCommAtom)) { @@ -1780,14 +1784,13 @@ } return true; } -#endif // Q_WS_X11 && ! K_WS_QTONLY return false; } -#endif +#endif // Q_WS_X11 void KApplication::updateUserTimestamp( unsigned long time ) { -#if defined Q_WS_X11 && ! defined K_WS_QTONLY +#if defined Q_WS_X11 if( time == 0 ) { // get current X timestamp Window w = XCreateSimpleWindow( qt_xdisplay(), qt_xrootwin(), 0, 0, 1, 1, 0, 0, 0 ); @@ -1807,7 +1810,7 @@ unsigned long KApplication::userTimestamp() const { -#if defined Q_WS_X11 && ! defined K_WS_QTONLY +#if defined Q_WS_X11 return qt_x_user_time; #else return 0; @@ -1816,7 +1819,7 @@ void KApplication::updateRemoteUserTimestamp( const QCString& dcopId, unsigned long time ) { -#if defined Q_WS_X11 && ! defined K_WS_QTONLY +#if defined Q_WS_X11 if( time == 0 ) time = qt_x_user_time; DCOPRef( dcopId, "MainApplication-Interface" ).call( "updateUserTimestamp", time ); @@ -2463,7 +2466,7 @@ } #endif stream << envs; -#if defined Q_WS_X11 && ! defined K_WS_QTONLY +#if defined Q_WS_X11 // make sure there is id, so that user timestamp exists stream << ( startup_id.isEmpty() ? KStartupInfo::createNewStartupId() : startup_id ); #endif @@ -2702,7 +2705,7 @@ // set the specified icons topWidget->setIcon( icon() ); //standard X11 -#if defined Q_WS_X11 && ! defined K_WS_QTONLY +#if defined Q_WS_X11 //#ifdef Q_WS_X11 // FIXME(E): Implement for Qt/Embedded KWin::setIcons(topWidget->winId(), icon(), miniIcon() ); // NET_WM hints for KWin @@ -2723,7 +2726,7 @@ else { d->startup_id = startup_id; -#if defined Q_WS_X11 && ! defined K_WS_QTONLY +#if defined Q_WS_X11 KStartupInfoId id; id.initId( startup_id ); long timestamp = id.timestamp(); @@ -2737,7 +2740,7 @@ // not to propagate it to processes started from this app void KApplication::read_app_startup_id() { -#if defined Q_WS_X11 && ! defined K_WS_QTONLY +#if defined Q_WS_X11 KStartupInfoId id = KStartupInfo::currentStartupIdEnv(); KStartupInfo::resetStartupEnv(); d->startup_id = id.id(); --------------030605060905050100080406 Content-Type: text/x-c++src; name="kapplication_win.cpp" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="kapplication_win.cpp" /* This file is part of the KDE libraries Copyright (C) 2004 Jaroslaw Staniek This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License version 2 as published by the Free Software Foundation. This library 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 Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include #include /** * MS Windows-related actions for KApplication startup. * * - Use Qt translation which will be usable for QFileDialog * and other Qt-only GUIs. The "qt_.qm" file should be stored * in the same place as .po files for a given language. * * @internal */ void KApplication_init_windows(bool /*GUIenabled*/) { QString qt_transl_file = ::locate( "locale", KGlobal::locale()->language() + "/LC_MESSAGES/qt_" + KGlobal::locale()->language() + ".qm" ); QTranslator *qt_transl = new QTranslator(); if (qt_transl->load( qt_transl_file, "")) kapp->installTranslator( qt_transl ); else delete qt_transl; } --------------030605060905050100080406--