diff options
Diffstat (limited to 'twin')
79 files changed, 975 insertions, 854 deletions
diff --git a/twin/CMakeLists.txt b/twin/CMakeLists.txt index 33a2302e4..261e0eb34 100644 --- a/twin/CMakeLists.txt +++ b/twin/CMakeLists.txt @@ -15,7 +15,6 @@ add_subdirectory( lib ) add_subdirectory( killer ) add_subdirectory( resumer ) add_subdirectory( kcmtwin ) -add_subdirectory( pics ) add_subdirectory( clients ) add_subdirectory( oldheaders ) add_subdirectory( data ) @@ -40,10 +39,18 @@ link_directories( install( FILES KWinInterface.h DESTINATION ${INCLUDE_INSTALL_DIR} ) -##### other data ################################ +##### icons ##################################### tde_install_icons( twin ) +install( + DIRECTORY pics/ + DESTINATION ${DATA_INSTALL_DIR}/twin/pics + FILES_MATCHING PATTERN *.png +) + +##### other data ################################ + tde_create_translated_desktop( SOURCE eventsrc DESTINATION ${DATA_INSTALL_DIR}/twin diff --git a/twin/KWinInterface.h b/twin/KWinInterface.h index 4eb7948fe..37fe2d9b6 100644 --- a/twin/KWinInterface.h +++ b/twin/KWinInterface.h @@ -29,6 +29,10 @@ class KWinInterface : virtual public DCOPObject virtual void circulateDesktopApplications() = 0; virtual void updateOverlappingShadows(unsigned long window) = 0; virtual void setShadowed(unsigned long window, bool shadowed) = 0; + virtual void tileWindowToBorder(unsigned long w1, int location) = 0; + virtual void tileTwoWindowsHorizontally(unsigned long w1, unsigned long w2) = 0; + virtual void tileTwoWindowsVertically(unsigned long w1, unsigned long w2) = 0; + virtual void tileFourWindowsInGrid(unsigned long w1, unsigned long w2, unsigned long w3, unsigned long w4) = 0; // kompmgr stuff virtual void startKompmgr() = 0; diff --git a/twin/activation.cpp b/twin/activation.cpp index 0deb81798..69af35576 100644 --- a/twin/activation.cpp +++ b/twin/activation.cpp @@ -166,7 +166,7 @@ namespace KWinInternal be used, and it's old; also, creation timestamp is changed to the time the instance starts (re-)initializing the window, this ensures creation timestamp will still work somewhat even in this case - - KUniqueApplication - when the window is already visible, and the new instance + - TDEUniqueApplication - when the window is already visible, and the new instance wants it to activate - without focus stealing prevention - _NET_ACTIVE_WINDOW - no problem - with ASN - ASN is forwarded, and set on the already visible window, KWin @@ -727,7 +727,7 @@ void Client::demandAttention( bool set ) if( demandAttentionKNotifyTimer == NULL ) { demandAttentionKNotifyTimer = new TQTimer( this ); - connect( demandAttentionKNotifyTimer, TQT_SIGNAL( timeout()), TQT_SLOT( demandAttentionKNotify())); + connect( demandAttentionKNotifyTimer, TQ_SIGNAL( timeout()), TQ_SLOT( demandAttentionKNotify())); } demandAttentionKNotifyTimer->start( 1000, true ); } diff --git a/twin/client.cpp b/twin/client.cpp index 75aa896d4..028c32c12 100644 --- a/twin/client.cpp +++ b/twin/client.cpp @@ -18,9 +18,9 @@ License. See the file "COPYING" for the exact licensing terms. #include <tqdatetime.h> #include <tqimage.h> #include <tqfile.h> -#include <kprocess.h> +#include <tdeprocess.h> #include <unistd.h> -#include <kstandarddirs.h> +#include <tdestandarddirs.h> #include <tqwhatsthis.h> #include <twin.h> #include <kiconloader.h> @@ -130,37 +130,37 @@ Client::Client( Workspace *ws ) shadeHoverTimer = 0; configureRequestTimer = new TQTimer(this); - connect(configureRequestTimer, TQT_SIGNAL(timeout()), TQT_SLOT(configureRequestTimeout())); + connect(configureRequestTimer, TQ_SIGNAL(timeout()), TQ_SLOT(configureRequestTimeout())); shadowDelayTimer = new TQTimer(this); opacityCache = &activeOpacityCache; shadowAfterClient = NULL; shadowWidget = NULL; shadowMe = true; - connect(shadowDelayTimer, TQT_SIGNAL(timeout()), TQT_SLOT(drawShadow())); + connect(shadowDelayTimer, TQ_SIGNAL(timeout()), TQ_SLOT(drawShadow())); // set the initial mapping state mapping_state = WithdrawnState; desk = 0; // no desktop yet mode = PositionCenter; - buttonDown = FALSE; - moveResizeMode = FALSE; + buttonDown = false; + moveResizeMode = false; info = NULL; shade_mode = ShadeNone; - active = FALSE; + active = false; deleting = false; - keep_above = FALSE; - keep_below = FALSE; - is_shape = FALSE; + keep_above = false; + keep_below = false; + is_shape = false; motif_noborder = false; - motif_may_move = TRUE; - motif_may_resize = TRUE; - motif_may_close = TRUE; + motif_may_move = true; + motif_may_resize = true; + motif_may_close = true; fullscreen_mode = FullScreenNone; - skip_taskbar = FALSE; + skip_taskbar = false; original_skip_taskbar = false; minimized = false; hidden = false; @@ -177,8 +177,8 @@ Client::Client( Workspace *ws ) Ptakeactivity = 0; Pcontexthelp = 0; Pping = 0; - input = FALSE; - skip_pager = FALSE; + input = false; + skip_pager = false; max_mode = MaximizeRestore; maxmode_restore = MaximizeRestore; @@ -224,7 +224,7 @@ void Client::releaseWindow( bool on_shutdown ) deleting = true; workspace()->discardUsedWindowRules( this, true ); // remove ForceTemporarily rules StackingUpdatesBlocker blocker( workspace()); - if (!custom_opacity) setOpacity(FALSE); + if (!custom_opacity) setOpacity(false); if (moveResizeMode) leaveMoveResize(); removeShadow(); @@ -445,7 +445,7 @@ void Client::detectShapable() case NET::Menu : case NET::Dialog : case NET::Utility : - setShapable(FALSE); + setShapable(false); break; default: assert( false ); @@ -522,9 +522,9 @@ bool Client::isModalSystemNotification() const result = XGetWindowProperty(tqt_xdisplay(), window(), atoms->net_wm_system_modal_notification, 0L, 1L, False, XA_CARDINAL, &actual, &format, &n, &left, /*(unsigned char **)*/ &data); if (result == Success && data && format == 32 ) { - return TRUE; + return true; } - return FALSE; + return false; } void Client::updateShape() @@ -541,7 +541,7 @@ void Client::updateShape() XShapeCombineShape(tqt_xdisplay(), frameId(), ShapeBounding, clientPos().x(), clientPos().y(), window(), ShapeBounding, ShapeSet); - setShapable(TRUE); + setShapable(true); } // !shape() mask setting is done in setMask() when the decoration // calls it or when the decoration is created/destroyed @@ -709,7 +709,7 @@ void Client::unminimize( bool avoid_animation ) if( isOnCurrentDesktop() && isShown( true )) { if( mainClients().isEmpty() && !avoid_animation ) - animateMinimizeOrUnminimize( FALSE ); + animateMinimizeOrUnminimize( false ); } updateVisibility(); updateAllowedActions(); @@ -778,7 +778,7 @@ void Client::animateMinimizeOrUnminimize( bool minimize ) float diff; TQPainter p ( workspace()->desktopWidget() ); - bool need_to_clear = FALSE; + bool need_to_clear = false; TQPixmap pm3; do { @@ -790,7 +790,7 @@ void Client::animateMinimizeOrUnminimize( bool minimize ) if ( need_to_clear ) { p.drawPixmap( area2.x(), area2.y(), pm3 ); - need_to_clear = FALSE; + need_to_clear = false; } area2 = area; } @@ -810,7 +810,7 @@ void Client::animateMinimizeOrUnminimize( bool minimize ) else { // no overlap, we can clear later to avoid flicker pm3 = pm2; - need_to_clear = TRUE; + need_to_clear = true; } } } while ( t.elapsed() < step); @@ -897,7 +897,7 @@ void Client::setShade( ShadeMode mode ) XSelectInput( tqt_xdisplay(), wrapper, ClientWinMask | SubstructureNotifyMask ); //as we hid the unmap event, xcompmgr didn't recognize the client wid has vanished, so we'll extra inform it //done xcompmgr workaround -// FRAME repaint( FALSE ); +// FRAME repaint( false ); // bool wasStaticContents = testWFlags( WStaticContents ); // setWFlags( WStaticContents ); int step = TQMAX( 4, TQABS( h - s.height() ) / as )+1; @@ -938,7 +938,7 @@ void Client::setShade( ShadeMode mode ) resizeDecoration( TQSize( s.width(), h )); // assume a border // we do not have time to wait for X to send us paint events -// FRAME repaint( 0, h - step-5, width(), step+5, TRUE); +// FRAME repaint( 0, h - step-5, width(), step+5, true); TQApplication::syncX(); } while ( h < s.height() - step ); // if ( !wasStaticContents ) @@ -946,7 +946,7 @@ void Client::setShade( ShadeMode mode ) shade_geometry_change = false; plainResize( s ); if( shade_mode == ShadeHover || shade_mode == ShadeActivated ) - setActive( TRUE ); + setActive( true ); XMapWindow( tqt_xdisplay(), wrapperId()); XMapWindow( tqt_xdisplay(), window()); XDeleteProperty (tqt_xdisplay(), client, atoms->net_wm_window_shade); @@ -1210,7 +1210,7 @@ void Client::drawDelayedShadow() void Client::drawShadowAfter(Client *after) { shadowAfterClient = after; - connect(after, TQT_SIGNAL(shadowDrawn()), TQT_SLOT(drawShadow())); + connect(after, TQ_SIGNAL(shadowDrawn()), TQ_SLOT(drawShadow())); } /*! @@ -1224,7 +1224,7 @@ void Client::drawShadow() // If we are waiting for another Client's shadow to be drawn, stop waiting now if (shadowAfterClient != NULL) { - disconnect(shadowAfterClient, TQT_SIGNAL(shadowDrawn()), this, TQT_SLOT(drawShadow())); + disconnect(shadowAfterClient, TQ_SIGNAL(shadowDrawn()), this, TQ_SLOT(drawShadow())); shadowAfterClient = NULL; } @@ -1791,7 +1791,7 @@ void Client::pingWindow() if( ping_timer != NULL ) return; // pinging already ping_timer = new TQTimer( this ); - connect( ping_timer, TQT_SIGNAL( timeout()), TQT_SLOT( pingTimeout())); + connect( ping_timer, TQ_SIGNAL( timeout()), TQ_SLOT( pingTimeout())); ping_timer->start( options->killPingTimeout, true ); ping_timestamp = get_tqt_x_time(); workspace()->sendPingToWindow( window(), ping_timestamp ); @@ -1850,8 +1850,8 @@ void Client::killProcess( bool ask, Time timestamp ) << "--applicationname" << resourceClass() << "--wid" << TQCString().setNum( window()) << "--timestamp" << TQCString().setNum( timestamp ); - connect( process_killer, TQT_SIGNAL( processExited( TDEProcess* )), - TQT_SLOT( processKillerExited())); + connect( process_killer, TQ_SIGNAL( processExited( TDEProcess* )), + TQ_SLOT( processKillerExited())); if( !process_killer->start( TDEProcess::NotifyOnExit )) { delete process_killer; @@ -1897,7 +1897,7 @@ bool Client::isSuspendable() const tcomm = basename(tbuf); #else /* default */ TQString statString(statRaw); - TQStringList statFields = TQStringList::split(" ", statString, TRUE); + TQStringList statFields = TQStringList::split(" ", statString, true); TQString tcomm = statFields[1]; TQString state = statFields[2]; #endif /* default */ @@ -1967,7 +1967,7 @@ bool Client::isResumeable() const TQString state(TQChar(inf->pr_sname)); #else /* default */ TQString statString(statRaw); - TQStringList statFields = TQStringList::split(" ", statString, TRUE); + TQStringList statFields = TQStringList::split(" ", statString, true); TQString tcomm = statFields[1]; TQString state = statFields[2]; #endif /* default */ @@ -2002,8 +2002,8 @@ bool Client::queryUserSuspendedResume() << "--windowname" << caption().utf8() << "--applicationname" << resourceClass() << "--wid" << TQCString().setNum( window()); - connect( process_resumer, TQT_SIGNAL( processExited( TDEProcess* )), - TQT_SLOT( processResumerExited())); + connect( process_resumer, TQ_SIGNAL( processExited( TDEProcess* )), + TQ_SLOT( processResumerExited())); if( !process_resumer->start( TDEProcess::NotifyOnExit )) { delete process_resumer; @@ -2422,11 +2422,11 @@ void Client::readIcons( Window win, TQPixmap* icon, TQPixmap* miniicon ) { // get the icons, allow scaling if( icon != NULL ) - *icon = KWin::icon( win, 32, 32, TRUE, KWin::NETWM | KWin::WMHints ); + *icon = KWin::icon( win, 32, 32, true, KWin::NETWM | KWin::WMHints ); if( miniicon != NULL ) { if( icon == NULL || !icon->isNull()) - *miniicon = KWin::icon( win, 16, 16, TRUE, KWin::NETWM | KWin::WMHints ); + *miniicon = KWin::icon( win, 16, 16, true, KWin::NETWM | KWin::WMHints ); else *miniicon = TQPixmap(); } @@ -2454,8 +2454,8 @@ void Client::getIcons() } if( icon_pix.isNull()) { // and if nothing else, load icon from classhint or xapp icon - icon_pix = KWin::icon( window(), 32, 32, TRUE, KWin::ClassHint | KWin::XApp ); - miniicon_pix = KWin::icon( window(), 16, 16, TRUE, KWin::ClassHint | KWin::XApp ); + icon_pix = KWin::icon( window(), 32, 32, true, KWin::ClassHint | KWin::XApp ); + miniicon_pix = KWin::icon( window(), 16, 16, true, KWin::ClassHint | KWin::XApp ); } if( isManaged() && decoration != NULL ) decoration->iconChange(); @@ -3022,9 +3022,9 @@ bool Client::getWindowOpacity() //query translucency settings from X, returns tr custom_opacity = true; // setOpacity(opacity_ < 0xFFFFFFFF, opacity_); XFree ((char*)data); - return TRUE; + return true; } - return FALSE; + return false; } void Client::setCustomOpacityFlag(bool custom) @@ -3046,14 +3046,14 @@ bool Client::touches(const Client* c) // checks if this client borders c, needed to test beep media player window state { if (y() == c->y() + c->height()) // this bottom to c - return TRUE; + return true; if (y() + height() == c->y()) // this top to c - return TRUE; + return true; if (x() == c->x() + c->width()) // this right to c - return TRUE; + return true; if (x() + width() == c->x()) // this left to c - return TRUE; - return FALSE; + return true; + return false; } void Client::setDecoHashProperty(uint topHeight, uint rightWidth, uint bottomHeight, uint leftWidth) diff --git a/twin/client.h b/twin/client.h index 944b837f6..178c718c4 100644 --- a/twin/client.h +++ b/twin/client.h @@ -233,13 +233,16 @@ class Client : public TQObject, public KDecorationDefines void resizeWithChecks( const TQSize& s, ForceGeometry_t force = NormalGeometrySet ); void keepInArea( TQRect area, bool partial = false ); void setActiveBorderMode( ActiveMaximizingMode mode ); + void setActiveBorderPos( TQPoint pos ); void setActiveBorder( ActiveBorder border); ActiveMaximizingMode activeBorderMode() const; + TQPoint activeBorderPos() const; ActiveBorder activeBorder() const; void setActiveBorderMaximizing(bool maximizing); void cancelActiveBorderMaximizing(); bool isActiveBorderMaximizing() const; TQRect activeBorderMaximizeGeometry(); + void tileToBorder(ActiveBorder border); void growHorizontal(); void shrinkHorizontal(); @@ -613,8 +616,8 @@ class Client : public TQObject, public KDecorationDefines bool activeMaximizing; bool activeTiled; - TQRect activeTiledOrigGeom; ActiveMaximizingMode activeMode; + TQPoint activePos; ActiveBorder currentActiveBorder; friend bool performTransiencyCheck(); @@ -758,7 +761,7 @@ inline bool Client::isOnAllDesktops() const } /*! Returns whether the client is on the virtual desktop \a d. - This is always TRUE for onAllDesktops clients. + This is always true for onAllDesktops clients. */ inline bool Client::isOnDesktop( int d ) const { diff --git a/twin/clients/PORTING b/twin/clients/PORTING index 199ddb9de..3db8af576 100644 --- a/twin/clients/PORTING +++ b/twin/clients/PORTING @@ -84,7 +84,7 @@ inline const KDecorationOptions* options() { return KDecoration::options(); } - Replace 'contextHelp()' with 'showContextHelp()'. - WindowWrapperShowEvent() is gone, simply use showEvent() filtered by the event filter if needed. - Change 'animateIconifyOrDeiconify()' to 'animateMinize()', if it's empty, simply remove it. - Make sure it doesn't reenter the event loop (no kapp->processEvents()). + Make sure it doesn't reenter the event loop (no tdeApp->processEvents()). - Buttons should use explicit setCursor() if they don't want cursor set by mousePosition(). I.e. usually call setCursor( ArrowCursor ) in your MyButton. - In the part where you insert windowWrapper() into the layout, i.e. something like diff --git a/twin/clients/b2/b2client.cpp b/twin/clients/b2/b2client.cpp index 6339402b7..571b16909 100644 --- a/twin/clients/b2/b2client.cpp +++ b/twin/clients/b2/b2client.cpp @@ -82,7 +82,7 @@ static bool drawSmallBorders = false; // ===================================== -extern "C" KDE_EXPORT KDecorationFactory* create_factory() +extern "C" TDE_EXPORT KDecorationFactory* create_factory() { return new B2::B2ClientFactory(); } @@ -444,9 +444,9 @@ bool B2Client::isModalSystemNotification() result = XGetWindowProperty(tqt_xdisplay(), windowId(), kde_wm_system_modal_notification, 0L, 1L, False, XA_CARDINAL, &actual, &format, &n, &left, /*(unsigned char **)*/ &data); if (result == Success && data != None && format == 32 ) { - return TRUE; + return true; } - return FALSE; + return false; } void B2Client::addButtons(const TQString& s, const TQString tips[], @@ -464,8 +464,8 @@ void B2Client::addButtons(const TQString& s, const TQString tips[], TQt::LeftButton | TQt::RightButton); button[BtnMenu]->setPixmaps(P_MENU); button[BtnMenu]->setUseMiniIcon(); - connect(button[BtnMenu], TQT_SIGNAL(pressed()), - this, TQT_SLOT(menuButtonPressed())); + connect(button[BtnMenu], TQ_SIGNAL(pressed()), + this, TQ_SLOT(menuButtonPressed())); titleLayout->addWidget(button[BtnMenu]); } } @@ -477,8 +477,8 @@ void B2Client::addButtons(const TQString& s, const TQString tips[], button[BtnSticky]->setPixmaps(P_PINUP); button[BtnSticky]->setToggle(); button[BtnSticky]->setDown(isOnAllDesktops()); - connect(button[BtnSticky], TQT_SIGNAL(clicked()), - this, TQT_SLOT(toggleOnAllDesktops())); + connect(button[BtnSticky], TQ_SIGNAL(clicked()), + this, TQ_SLOT(toggleOnAllDesktops())); titleLayout->addWidget(button[BtnSticky]); } } @@ -487,8 +487,8 @@ void B2Client::addButtons(const TQString& s, const TQString tips[], if (providesContextHelp() && (!button[BtnHelp])) { button[BtnHelp] = new B2Button(this, tb, tips[BtnHelp]); button[BtnHelp]->setPixmaps(P_HELP); - connect(button[BtnHelp], TQT_SIGNAL(clicked()), - this, TQT_SLOT(showContextHelp())); + connect(button[BtnHelp], TQ_SIGNAL(clicked()), + this, TQ_SLOT(showContextHelp())); titleLayout->addWidget(button[BtnHelp]); } break; @@ -496,8 +496,8 @@ void B2Client::addButtons(const TQString& s, const TQString tips[], if (isMinimizable() && (!button[BtnIconify])) { button[BtnIconify] = new B2Button(this, tb,tips[BtnIconify]); button[BtnIconify]->setPixmaps(P_ICONIFY); - connect(button[BtnIconify], TQT_SIGNAL(clicked()), - this, TQT_SLOT(minimize())); + connect(button[BtnIconify], TQ_SIGNAL(clicked()), + this, TQ_SLOT(minimize())); titleLayout->addWidget(button[BtnIconify]); } break; @@ -507,8 +507,8 @@ void B2Client::addButtons(const TQString& s, const TQString tips[], TQt::LeftButton | TQt::MidButton | TQt::RightButton); button[BtnMax]->setPixmaps(maximizeMode() == MaximizeFull ? P_NORMALIZE : P_MAX); - connect(button[BtnMax], TQT_SIGNAL(clicked()), - this, TQT_SLOT(maxButtonClicked())); + connect(button[BtnMax], TQ_SIGNAL(clicked()), + this, TQ_SLOT(maxButtonClicked())); titleLayout->addWidget(button[BtnMax]); } break; @@ -516,8 +516,8 @@ void B2Client::addButtons(const TQString& s, const TQString tips[], if (isCloseable() && !button[BtnClose]) { button[BtnClose] = new B2Button(this, tb, tips[BtnClose]); button[BtnClose]->setPixmaps(P_CLOSE); - connect(button[BtnClose], TQT_SIGNAL(clicked()), - this, TQT_SLOT(closeWindow())); + connect(button[BtnClose], TQ_SIGNAL(clicked()), + this, TQ_SLOT(closeWindow())); titleLayout->addWidget(button[BtnClose]); } break; @@ -525,8 +525,8 @@ void B2Client::addButtons(const TQString& s, const TQString tips[], if (isShadeable() && !button[BtnShade]) { button[BtnShade] = new B2Button(this, tb, tips[BtnShade]); button[BtnShade]->setPixmaps(P_SHADE); - connect(button[BtnShade], TQT_SIGNAL(clicked()), - this, TQT_SLOT(shadeButtonClicked())); + connect(button[BtnShade], TQ_SIGNAL(clicked()), + this, TQ_SLOT(shadeButtonClicked())); titleLayout->addWidget(button[BtnShade]); } break; @@ -534,8 +534,8 @@ void B2Client::addButtons(const TQString& s, const TQString tips[], if (resizable && !button[BtnResize]) { button[BtnResize] = new B2Button(this, tb, tips[BtnResize]); button[BtnResize]->setPixmaps(P_RESIZE); - connect(button[BtnResize], TQT_SIGNAL(pressed()), - this, TQT_SLOT(resizeButtonPressed())); + connect(button[BtnResize], TQ_SIGNAL(pressed()), + this, TQ_SLOT(resizeButtonPressed())); titleLayout->addWidget(button[BtnResize]); } break; diff --git a/twin/clients/b2/config/config.cpp b/twin/clients/b2/config/config.cpp index 5b7a29e0f..70942bce1 100644 --- a/twin/clients/b2/config/config.cpp +++ b/twin/clients/b2/config/config.cpp @@ -15,7 +15,7 @@ extern "C" { - KDE_EXPORT TQObject* allocate_config( TDEConfig* conf, TQWidget* parent ) + TDE_EXPORT TQObject* allocate_config( TDEConfig* conf, TQWidget* parent ) { return(new B2Config(conf, parent)); } @@ -70,12 +70,12 @@ B2Config::B2Config( TDEConfig* conf, TQWidget* parent ) load(conf); // Ensure we track user changes properly - connect(cbColorBorder, TQT_SIGNAL(clicked()), - this, TQT_SLOT(slotSelectionChanged())); - connect(showGrabHandleCb, TQT_SIGNAL(clicked()), - this, TQT_SLOT(slotSelectionChanged())); - connect(menuDblClickOp, TQT_SIGNAL(activated(int)), - this, TQT_SLOT(slotSelectionChanged())); + connect(cbColorBorder, TQ_SIGNAL(clicked()), + this, TQ_SLOT(slotSelectionChanged())); + connect(showGrabHandleCb, TQ_SIGNAL(clicked()), + this, TQ_SLOT(slotSelectionChanged())); + connect(menuDblClickOp, TQ_SIGNAL(activated(int)), + this, TQ_SLOT(slotSelectionChanged())); // Make the widgets visible in twindecoration gb->show(); } diff --git a/twin/clients/default/config/config.cpp b/twin/clients/default/config/config.cpp index 886077925..054279fc0 100644 --- a/twin/clients/default/config/config.cpp +++ b/twin/clients/default/config/config.cpp @@ -17,7 +17,7 @@ extern "C" { - KDE_EXPORT TQObject* allocate_config( TDEConfig* conf, TQWidget* parent ) + TDE_EXPORT TQObject* allocate_config( TDEConfig* conf, TQWidget* parent ) { return(new KDEDefaultConfig(conf, parent)); } @@ -61,13 +61,13 @@ KDEDefaultConfig::KDEDefaultConfig( TDEConfig* conf, TQWidget* parent ) load( conf ); // Ensure we track user changes properly - connect( cbShowStipple, TQT_SIGNAL(clicked()), - this, TQT_SLOT(slotSelectionChanged()) ); - connect( cbShowGrabBar, TQT_SIGNAL(clicked()), - this, TQT_SLOT(slotSelectionChanged()) ); + connect( cbShowStipple, TQ_SIGNAL(clicked()), + this, TQ_SLOT(slotSelectionChanged()) ); + connect( cbShowGrabBar, TQ_SIGNAL(clicked()), + this, TQ_SLOT(slotSelectionChanged()) ); if (highcolor) - connect( cbUseGradients, TQT_SIGNAL(clicked()), - this, TQT_SLOT(slotSelectionChanged()) ); + connect( cbUseGradients, TQ_SIGNAL(clicked()), + this, TQ_SLOT(slotSelectionChanged()) ); // Make the widgets visible in twindecoration gb->show(); diff --git a/twin/clients/default/kdedefault.cpp b/twin/clients/default/kdedefault.cpp index 3513ca5df..33eb46f4d 100644 --- a/twin/clients/default/kdedefault.cpp +++ b/twin/clients/default/kdedefault.cpp @@ -1060,7 +1060,7 @@ TQRegion KDEDefaultClient::cornerShape(WindowCorner corner) } // namespace // Extended KWin plugin interface -extern "C" KDE_EXPORT KDecorationFactory* create_factory() +extern "C" TDE_EXPORT KDecorationFactory* create_factory() { return new Default::KDEDefaultHandler(); } diff --git a/twin/clients/keramik/config/config.cpp b/twin/clients/keramik/config/config.cpp index dfd5e20aa..408c5a38a 100644 --- a/twin/clients/keramik/config/config.cpp +++ b/twin/clients/keramik/config/config.cpp @@ -33,7 +33,7 @@ extern "C" { - KDE_EXPORT TQObject* allocate_config( TDEConfig* conf, TQWidget* parent ) + TDE_EXPORT TQObject* allocate_config( TDEConfig* conf, TQWidget* parent ) { return ( new KeramikConfig( conf, parent ) ); } @@ -55,10 +55,10 @@ KeramikConfig::KeramikConfig( TDEConfig* conf, TQWidget* parent ) c = new TDEConfig( "twinkeramikrc" ); ui = new KeramikConfigUI( parent ); - connect( ui->showAppIcons, TQT_SIGNAL(clicked()), TQT_SIGNAL(changed()) ); - connect( ui->smallCaptions, TQT_SIGNAL(clicked()), TQT_SIGNAL(changed()) ); - connect( ui->largeGrabBars, TQT_SIGNAL(clicked()), TQT_SIGNAL(changed()) ); - connect( ui->useShadowedText, TQT_SIGNAL(clicked()), TQT_SIGNAL(changed()) ); + connect( ui->showAppIcons, TQ_SIGNAL(clicked()), TQ_SIGNAL(changed()) ); + connect( ui->smallCaptions, TQ_SIGNAL(clicked()), TQ_SIGNAL(changed()) ); + connect( ui->largeGrabBars, TQ_SIGNAL(clicked()), TQ_SIGNAL(changed()) ); + connect( ui->useShadowedText, TQ_SIGNAL(clicked()), TQ_SIGNAL(changed()) ); load( conf ); ui->show(); diff --git a/twin/clients/keramik/keramik.cpp b/twin/clients/keramik/keramik.cpp index fe7cc37d7..d5c441a26 100644 --- a/twin/clients/keramik/keramik.cpp +++ b/twin/clients/keramik/keramik.cpp @@ -907,8 +907,8 @@ KeramikClient::KeramikClient( KDecorationBridge* bridge, KDecorationFactory* fac void KeramikClient::init() { - connect( this, TQT_SIGNAL( keepAboveChanged( bool )), TQT_SLOT( keepAboveChange( bool ))); - connect( this, TQT_SIGNAL( keepBelowChanged( bool )), TQT_SLOT( keepBelowChange( bool ))); + connect( this, TQ_SIGNAL( keepAboveChanged( bool )), TQ_SLOT( keepAboveChange( bool ))); + connect( this, TQ_SIGNAL( keepBelowChanged( bool )), TQ_SLOT( keepBelowChange( bool ))); createMainWidget( (WFlags)(WStaticContents | WResizeNoErase | WRepaintNoErase) ); widget()->installEventFilter( this ); @@ -1035,9 +1035,9 @@ bool KeramikClient::isModalSystemNotification() result = XGetWindowProperty(tqt_xdisplay(), windowId(), kde_wm_system_modal_notification, 0L, 1L, False, XA_CARDINAL, &actual, &format, &n, &left, /*(unsigned char **)*/ &data); if (result == Success && data != None && format == 32 ) { - return TRUE; + return true; } - return FALSE; + return false; } void KeramikClient::addButtons( TQBoxLayout *layout, const TQString &s ) @@ -1051,7 +1051,7 @@ void KeramikClient::addButtons( TQBoxLayout *layout, const TQString &s ) if (!isModalSystemNotification()) { if ( !button[MenuButton] ) { button[MenuButton] = new KeramikButton( this, "menu", MenuButton, i18n("Menu"), TQt::LeftButton|TQt::RightButton ); - connect( button[MenuButton], TQT_SIGNAL( pressed() ), TQT_SLOT( menuButtonPressed() ) ); + connect( button[MenuButton], TQ_SIGNAL( pressed() ), TQ_SLOT( menuButtonPressed() ) ); layout->addWidget( button[MenuButton] ); } } @@ -1065,7 +1065,7 @@ void KeramikClient::addButtons( TQBoxLayout *layout, const TQString &s ) OnAllDesktopsButton, isOnAllDesktops()?i18n("Not on all desktops"):i18n("On all desktops") ); if(isOnAllDesktops()) button[OnAllDesktopsButton]->toggle(); - connect( button[OnAllDesktopsButton], TQT_SIGNAL( clicked() ), TQT_SLOT( toggleOnAllDesktops() ) ); + connect( button[OnAllDesktopsButton], TQ_SIGNAL( clicked() ), TQ_SLOT( toggleOnAllDesktops() ) ); layout->addWidget( button[OnAllDesktopsButton] ); } } @@ -1075,7 +1075,7 @@ void KeramikClient::addButtons( TQBoxLayout *layout, const TQString &s ) case 'H' : if ( !button[HelpButton] && providesContextHelp() ) { button[HelpButton] = new KeramikButton( this, "help", HelpButton, i18n("Help") ); - connect( button[HelpButton], TQT_SIGNAL( clicked() ), TQT_SLOT( showContextHelp() ) ); + connect( button[HelpButton], TQ_SIGNAL( clicked() ), TQ_SLOT( showContextHelp() ) ); layout->addWidget( button[HelpButton] ); } break; @@ -1084,7 +1084,7 @@ void KeramikClient::addButtons( TQBoxLayout *layout, const TQString &s ) case 'I' : if ( !button[MinButton] && isMinimizable() ) { button[MinButton] = new KeramikButton( this, "minimize", MinButton, i18n("Minimize") ); - connect( button[MinButton], TQT_SIGNAL( clicked() ), TQT_SLOT( minimize() ) ); + connect( button[MinButton], TQ_SIGNAL( clicked() ), TQ_SLOT( minimize() ) ); layout->addWidget( button[MinButton] ); } break; @@ -1093,7 +1093,7 @@ void KeramikClient::addButtons( TQBoxLayout *layout, const TQString &s ) case 'A' : if ( !button[MaxButton] && isMaximizable() ) { button[MaxButton] = new KeramikButton( this, "maximize", MaxButton, i18n("Maximize"), TQt::LeftButton|TQt::MidButton|TQt::RightButton ); - connect( button[MaxButton], TQT_SIGNAL( clicked() ), TQT_SLOT( slotMaximize() ) ); + connect( button[MaxButton], TQ_SIGNAL( clicked() ), TQ_SLOT( slotMaximize() ) ); layout->addWidget( button[MaxButton] ); } break; @@ -1102,7 +1102,7 @@ void KeramikClient::addButtons( TQBoxLayout *layout, const TQString &s ) case 'X' : if ( !button[CloseButton] && isCloseable() ) { button[CloseButton] = new KeramikButton( this, "close", CloseButton, i18n("Close") ); - connect( button[CloseButton], TQT_SIGNAL( clicked() ), TQT_SLOT( closeWindow() ) ); + connect( button[CloseButton], TQ_SIGNAL( clicked() ), TQ_SLOT( closeWindow() ) ); layout->addWidget( button[CloseButton] ); } break; @@ -1111,7 +1111,7 @@ void KeramikClient::addButtons( TQBoxLayout *layout, const TQString &s ) case 'F' : if ( !button[AboveButton]) { button[AboveButton] = new KeramikButton( this, "above", AboveButton, i18n("Keep Above Others") ); - connect( button[AboveButton], TQT_SIGNAL( clicked() ), TQT_SLOT( slotAbove() ) ); + connect( button[AboveButton], TQ_SIGNAL( clicked() ), TQ_SLOT( slotAbove() ) ); layout->addWidget( button[AboveButton] ); } break; @@ -1120,7 +1120,7 @@ void KeramikClient::addButtons( TQBoxLayout *layout, const TQString &s ) case 'B' : if ( !button[BelowButton]) { button[BelowButton] = new KeramikButton( this, "below", BelowButton, i18n("Keep Below Others") ); - connect( button[BelowButton], TQT_SIGNAL( clicked() ), TQT_SLOT( slotBelow() ) ); + connect( button[BelowButton], TQ_SIGNAL( clicked() ), TQ_SLOT( slotBelow() ) ); layout->addWidget( button[BelowButton] ); } break; @@ -1130,7 +1130,7 @@ void KeramikClient::addButtons( TQBoxLayout *layout, const TQString &s ) if ( !button[ShadeButton] && isShadeable() ) { button[ShadeButton] = new KeramikButton( this, "shade", ShadeButton, isSetShade() ? i18n("Unshade") : i18n( "Shade" )); - connect( button[ShadeButton], TQT_SIGNAL( clicked() ), TQT_SLOT( slotShade() ) ); + connect( button[ShadeButton], TQ_SIGNAL( clicked() ), TQ_SLOT( slotShade() ) ); layout->addWidget( button[ShadeButton] ); } break; @@ -1662,7 +1662,7 @@ void KeramikClient::resizeEvent( TQResizeEvent *e ) widget()->update( TQRect( titlebar->geometry().topRight(), TQPoint( width() - 4, titlebar->geometry().bottom() ) ) ); // Titlebar needs no paint event - TQApplication::postEvent( this, new TQPaintEvent( titlebar->geometry(), FALSE ) ); + TQApplication::postEvent( this, new TQPaintEvent( titlebar->geometry(), false ) ); } } } @@ -1836,7 +1836,7 @@ bool KeramikClient::eventFilter( TQObject* o, TQEvent* e ) extern "C" { - KDE_EXPORT KDecorationFactory *create_factory() + TDE_EXPORT KDecorationFactory *create_factory() { Keramik::clientHandler = new Keramik::KeramikHandler(); return Keramik::clientHandler; diff --git a/twin/clients/kwmtheme/cli_installer/main.cpp b/twin/clients/kwmtheme/cli_installer/main.cpp index 27af172e1..3f0e209ec 100644 --- a/twin/clients/kwmtheme/cli_installer/main.cpp +++ b/twin/clients/kwmtheme/cli_installer/main.cpp @@ -1,10 +1,10 @@ #include <tqfile.h> #include <tqdir.h> #include <tdeapplication.h> -#include <ksimpleconfig.h> +#include <tdesimpleconfig.h> #include <tdeglobal.h> #include <kdebug.h> -#include <kstandarddirs.h> +#include <tdestandarddirs.h> #include <tdecmdlineargs.h> #include <tdelocale.h> @@ -67,7 +67,7 @@ int main(int argc, char **argv) TQDir().mkdir(localDirStr); TQFileInfo fi(f); - KSimpleConfig input(fi.absFilePath()); + TDESimpleConfig input(fi.absFilePath()); srcStr = fi.dirPath(true) + "/"; TDEConfig *output = TDEGlobal::config(); input.setGroup("Window Border"); diff --git a/twin/clients/kwmtheme/kwmthemeclient.cpp b/twin/clients/kwmtheme/kwmthemeclient.cpp index 4daffae7c..b0473261b 100644 --- a/twin/clients/kwmtheme/kwmthemeclient.cpp +++ b/twin/clients/kwmtheme/kwmthemeclient.cpp @@ -5,7 +5,7 @@ #include <tqdrawutil.h> #include <tqpainter.h> #include <kpixmapeffect.h> -#include <kstandarddirs.h> +#include <tdestandarddirs.h> #include <kdebug.h> #include <tdelocale.h> #include <tqbitmap.h> @@ -293,8 +293,8 @@ void KWMThemeClient::init() iconChange(); hb->addWidget(mnuBtn); mnuBtn->setFixedSize(20, 20); - connect(mnuBtn, TQT_SIGNAL(pressed()), this, - TQT_SLOT(menuButtonPressed())); + connect(mnuBtn, TQ_SIGNAL(pressed()), this, + TQ_SLOT(menuButtonPressed())); } else if(val == "Sticky"){ stickyBtn = new MyButton(widget(), "sticky"); @@ -303,7 +303,7 @@ void KWMThemeClient::init() stickyBtn->setPixmap(*pindownPix); else stickyBtn->setPixmap(*pinupPix); - connect(stickyBtn, TQT_SIGNAL( clicked() ), this, TQT_SLOT(toggleOnAllDesktops())); + connect(stickyBtn, TQ_SIGNAL( clicked() ), this, TQ_SLOT(toggleOnAllDesktops())); hb->addWidget(stickyBtn); stickyBtn->setFixedSize(20, 20); } @@ -311,7 +311,7 @@ void KWMThemeClient::init() btn = new MyButton(widget(), "iconify"); TQToolTip::add( btn, i18n("Minimize")); btn->setPixmap(*iconifyPix); - connect(btn, TQT_SIGNAL(clicked()), this, TQT_SLOT(minimize())); + connect(btn, TQ_SIGNAL(clicked()), this, TQ_SLOT(minimize())); hb->addWidget(btn); btn->setFixedSize(20, 20); } @@ -319,7 +319,7 @@ void KWMThemeClient::init() maxBtn = new MyButton(widget(), "max"); TQToolTip::add( maxBtn, i18n("Maximize")); maxBtn->setPixmap(*maxPix); - connect(maxBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(maximize())); + connect(maxBtn, TQ_SIGNAL(clicked()), this, TQ_SLOT(maximize())); hb->addWidget(maxBtn); maxBtn->setFixedSize(20, 20); } @@ -327,7 +327,7 @@ void KWMThemeClient::init() btn = new MyButton(widget(), "close"); TQToolTip::add( btn, i18n("Close")); btn->setPixmap(*closePix); - connect(btn, TQT_SIGNAL(clicked()), this, TQT_SLOT(closeWindow())); + connect(btn, TQ_SIGNAL(clicked()), this, TQ_SLOT(closeWindow())); hb->addWidget(btn); btn->setFixedSize(20, 20); } @@ -927,7 +927,7 @@ TODO extern "C" { - KDE_EXPORT KDecorationFactory *create_factory() + TDE_EXPORT KDecorationFactory *create_factory() { return new KWMTheme::KWMThemeFactory(); } diff --git a/twin/clients/laptop/laptopclient.cpp b/twin/clients/laptop/laptopclient.cpp index 30fb76b3a..b0bc659dd 100644 --- a/twin/clients/laptop/laptopclient.cpp +++ b/twin/clients/laptop/laptopclient.cpp @@ -65,7 +65,7 @@ static bool pixmaps_created = false; // ===================================== -extern "C" KDE_EXPORT KDecorationFactory* create_factory() +extern "C" TDE_EXPORT KDecorationFactory* create_factory() { return new Laptop::LaptopClientFactory(); } diff --git a/twin/clients/modernsystem/config/config.cpp b/twin/clients/modernsystem/config/config.cpp index 4512203c4..c353abc1b 100644 --- a/twin/clients/modernsystem/config/config.cpp +++ b/twin/clients/modernsystem/config/config.cpp @@ -12,7 +12,7 @@ extern "C" { - KDE_EXPORT TQObject* allocate_config(TDEConfig* conf, TQWidget* parent) + TDE_EXPORT TQObject* allocate_config(TDEConfig* conf, TQWidget* parent) { return(new ModernSysConfig(conf, parent)); } @@ -44,7 +44,7 @@ ModernSysConfig::ModernSysConfig(TDEConfig* conf, TQWidget* parent) : TQObject(p "easier, especially for trackballs and other mouse replacements " "on laptops.")); layout->addMultiCellWidget(cbShowHandle, 0, 0, 0, 1); - connect(cbShowHandle, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotSelectionChanged())); + connect(cbShowHandle, TQ_SIGNAL(clicked()), this, TQ_SLOT(slotSelectionChanged())); sliderBox = new TQVBox(handleBox); handleSizeSlider = new TQSlider(0, 4, 1, 0, TQt::Horizontal, sliderBox); @@ -52,12 +52,12 @@ ModernSysConfig::ModernSysConfig(TDEConfig* conf, TQWidget* parent) : TQObject(p i18n("Here you can change the size of the resize handle.")); handleSizeSlider->setTickInterval(1); handleSizeSlider->setTickmarks(TQSlider::Below); - connect(handleSizeSlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotSelectionChanged())); + connect(handleSizeSlider, TQ_SIGNAL(valueChanged(int)), this, TQ_SLOT(slotSelectionChanged())); hbox = new TQHBox(sliderBox); hbox->setSpacing(6); - bool rtl = kapp->reverseLayout(); + bool rtl = tdeApp->reverseLayout(); label1 = new TQLabel(i18n("Small"), hbox); label1->setAlignment(rtl ? AlignRight : AlignLeft); label2 = new TQLabel(i18n("Medium"), hbox); diff --git a/twin/clients/modernsystem/modernsys.cpp b/twin/clients/modernsystem/modernsys.cpp index 94615b190..3777df9d8 100644 --- a/twin/clients/modernsystem/modernsys.cpp +++ b/twin/clients/modernsystem/modernsys.cpp @@ -731,7 +731,7 @@ bool ModernSysFactory::supports( Ability ability ) } // KWin extended plugin interface -extern "C" KDE_EXPORT KDecorationFactory* create_factory() +extern "C" TDE_EXPORT KDecorationFactory* create_factory() { return new ModernSystem::ModernSysFactory(); } diff --git a/twin/clients/plastik/config/config.cpp b/twin/clients/plastik/config/config.cpp index 04658796c..0fdc126e2 100644 --- a/twin/clients/plastik/config/config.cpp +++ b/twin/clients/plastik/config/config.cpp @@ -49,16 +49,16 @@ PlastikConfig::PlastikConfig(TDEConfig* config, TQWidget* parent) load(config); // setup the connections - connect(m_dialog->titleAlign, TQT_SIGNAL(clicked(int)), - this, TQT_SIGNAL(changed())); - connect(m_dialog->animateButtons, TQT_SIGNAL(toggled(bool)), - this, TQT_SIGNAL(changed())); - connect(m_dialog->menuClose, TQT_SIGNAL(toggled(bool)), - this, TQT_SIGNAL(changed())); - connect(m_dialog->titleShadow, TQT_SIGNAL(toggled(bool)), - this, TQT_SIGNAL(changed())); - connect(m_dialog->coloredBorder, TQT_SIGNAL(toggled(bool)), - this, TQT_SIGNAL(changed())); + connect(m_dialog->titleAlign, TQ_SIGNAL(clicked(int)), + this, TQ_SIGNAL(changed())); + connect(m_dialog->animateButtons, TQ_SIGNAL(toggled(bool)), + this, TQ_SIGNAL(changed())); + connect(m_dialog->menuClose, TQ_SIGNAL(toggled(bool)), + this, TQ_SIGNAL(changed())); + connect(m_dialog->titleShadow, TQ_SIGNAL(toggled(bool)), + this, TQ_SIGNAL(changed())); + connect(m_dialog->coloredBorder, TQ_SIGNAL(toggled(bool)), + this, TQ_SIGNAL(changed())); } PlastikConfig::~PlastikConfig() @@ -115,7 +115,7 @@ void PlastikConfig::defaults() extern "C" { - KDE_EXPORT TQObject* allocate_config(TDEConfig* config, TQWidget* parent) { + TDE_EXPORT TQObject* allocate_config(TDEConfig* config, TQWidget* parent) { return (new PlastikConfig(config, parent)); } } diff --git a/twin/clients/plastik/plastik.cpp b/twin/clients/plastik/plastik.cpp index b5a4808d7..6f835fde8 100644 --- a/twin/clients/plastik/plastik.cpp +++ b/twin/clients/plastik/plastik.cpp @@ -590,7 +590,7 @@ PlastikHandler* Handler() extern "C" { - KDE_EXPORT KDecorationFactory *create_factory() + TDE_EXPORT KDecorationFactory *create_factory() { KWinPlastik::handler = new KWinPlastik::PlastikHandler(); return KWinPlastik::handler; diff --git a/twin/clients/plastik/plastikbutton.cpp b/twin/clients/plastik/plastikbutton.cpp index 5fdadc8e1..3f3f81f62 100644 --- a/twin/clients/plastik/plastikbutton.cpp +++ b/twin/clients/plastik/plastikbutton.cpp @@ -51,7 +51,7 @@ PlastikButton::PlastikButton(ButtonType type, PlastikClient *parent, const char // no need to reset here as the button will be resetted on first resize. animTmr = new TQTimer(this); - connect(animTmr, TQT_SIGNAL(timeout() ), this, TQT_SLOT(animate() ) ); + connect(animTmr, TQ_SIGNAL(timeout() ), this, TQ_SLOT(animate() ) ); animProgress = 0; } diff --git a/twin/clients/quartz/config/config.cpp b/twin/clients/quartz/config/config.cpp index 70dc87965..f6bd853b1 100644 --- a/twin/clients/quartz/config/config.cpp +++ b/twin/clients/quartz/config/config.cpp @@ -15,7 +15,7 @@ extern "C" { - KDE_EXPORT TQObject* allocate_config( TDEConfig* conf, TQWidget* parent ) + TDE_EXPORT TQObject* allocate_config( TDEConfig* conf, TQWidget* parent ) { return(new QuartzConfig(conf, parent)); } @@ -49,8 +49,8 @@ QuartzConfig::QuartzConfig( TDEConfig* conf, TQWidget* parent ) load( conf ); // Ensure we track user changes properly - connect( cbColorBorder, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotSelectionChanged()) ); - connect( cbExtraSmall, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotSelectionChanged()) ); + connect( cbColorBorder, TQ_SIGNAL(clicked()), this, TQ_SLOT(slotSelectionChanged()) ); + connect( cbExtraSmall, TQ_SIGNAL(clicked()), this, TQ_SLOT(slotSelectionChanged()) ); // Make the widgets visible in twindecoration gb->show(); diff --git a/twin/clients/quartz/quartz.cpp b/twin/clients/quartz/quartz.cpp index dff79ff4b..31a0dbcf1 100644 --- a/twin/clients/quartz/quartz.cpp +++ b/twin/clients/quartz/quartz.cpp @@ -783,7 +783,7 @@ void QuartzClient::paintEvent( TQPaintEvent* ) ///////////////////////////////// extern "C" { - KDE_EXPORT KDecorationFactory *create_factory() + TDE_EXPORT KDecorationFactory *create_factory() { Quartz::clientHandler = new Quartz::QuartzHandler(); return Quartz::clientHandler; diff --git a/twin/clients/redmond/redmond.cpp b/twin/clients/redmond/redmond.cpp index 6deddeaee..006f19122 100644 --- a/twin/clients/redmond/redmond.cpp +++ b/twin/clients/redmond/redmond.cpp @@ -688,7 +688,7 @@ TQValueList< RedmondDecoFactory::BorderSize > RedmondDecoFactory::borderSizes() } -extern "C" KDE_EXPORT KDecorationFactory *create_factory() +extern "C" TDE_EXPORT KDecorationFactory *create_factory() { return new Redmond::RedmondDecoFactory(); } diff --git a/twin/clients/test/test.cpp b/twin/clients/test/test.cpp index e306520d5..113254f98 100644 --- a/twin/clients/test/test.cpp +++ b/twin/clients/test/test.cpp @@ -24,7 +24,7 @@ void Decoration::init() button->show(); button->setCursor( TQt::arrowCursor ); button->move( 0, 0 ); - connect( button, TQT_SIGNAL( clicked()), TQT_SLOT( closeWindow())); + connect( button, TQ_SIGNAL( clicked()), TQ_SLOT( closeWindow())); TQToolTip::add( button, "Zelva Mana" ); } } @@ -333,7 +333,7 @@ bool Factory::reset( unsigned long changed ) extern "C" { -KDE_EXPORT KDecorationFactory *create_factory() +TDE_EXPORT KDecorationFactory *create_factory() { return new KWinTest::Factory(); } diff --git a/twin/clients/web/Web.cpp b/twin/clients/web/Web.cpp index 5c2457e1c..f40dc552b 100644 --- a/twin/clients/web/Web.cpp +++ b/twin/clients/web/Web.cpp @@ -29,7 +29,7 @@ extern "C" { - KDE_EXPORT KDecorationFactory *create_factory() + TDE_EXPORT KDecorationFactory *create_factory() { return new Web::WebFactory(); } diff --git a/twin/compton-tde/CMakeLists.txt b/twin/compton-tde/CMakeLists.txt index d432b533f..8e29dd12c 100644 --- a/twin/compton-tde/CMakeLists.txt +++ b/twin/compton-tde/CMakeLists.txt @@ -24,7 +24,7 @@ include_directories( ${XINERAMA_INCLUDE_DIRS} ${XRANDR_INCLUDE_DIRS} ${GL_INCLUDE_DIRS} - ${LIBPCRE_INCLUDE_DIRS} + ${LIBPCRE2_INCLUDE_DIRS} ) link_directories( @@ -33,7 +33,7 @@ link_directories( ${XINERAMA_LIBRARY_DIRS} ${XRANDR_LIBRARY_DIRS} ${GL_LIBRARY_DIRS} - ${LIBPCRE_LIBRARY_DIRS} + ${LIBPCRE2_LIBRARY_DIRS} ) @@ -46,8 +46,8 @@ link_directories( # WITH_OPENGL -> CONFIG_VSYNC_OPENGL # WITH_OPENGL -> CONFIG_VSYNC_OPENGL_GLSL # WITH_OPENGL -> CONFIG_VSYNC_OPENGL_FBO -# WITH_PCRE -> CONFIG_REGEX_PCRE -# WITH_PCRE -> CONFIG_REGEX_PCRE_JIT +# WITH_PCRE2 -> CONFIG_REGEX_PCRE2 +# WITH_PCRE2 -> CONFIG_REGEX_PCRE2_JIT # WITH_LIBCONFIG -> CONFIG_LIBCONFIG # # HAVE_LIBCONFIG_OLD_API -> CONFIG_LIBCONFIG_LEGACY (set up in compton_config.h) @@ -90,10 +90,10 @@ if( WITH_XRANDR ) list( APPEND compton_LIBRARIES ${XRANDR_LIBRARIES} ) endif( ) -if( WITH_PCRE ) - set( CONFIG_REGEX_PCRE ${WITH_PCRE} ) - set( CONFIG_REGEX_PCRE_JIT ${WITH_PCRE} ) - list( APPEND compton_LIBRARIES ${LIBPCRE_LIBRARIES} ) +if( WITH_PCRE2 ) + set( CONFIG_REGEX_PCRE2 ${WITH_PCRE2} ) + set( CONFIG_REGEX_PCRE2_JIT ${WITH_PCRE2} ) + list( APPEND compton_LIBRARIES ${LIBPCRE2_LIBRARIES} ) endif( ) configure_file( compton_config.h.cmake compton_config.h ) diff --git a/twin/compton-tde/c2.c b/twin/compton-tde/c2.c index 6baf1337e..147cb781d 100644 --- a/twin/compton-tde/c2.c +++ b/twin/compton-tde/c2.c @@ -785,33 +785,34 @@ c2_l_postprocess(session_t *ps, c2_l_t *pleaf) { // PCRE patterns if (C2_L_PTSTRING == pleaf->ptntype && C2_L_MPCRE == pleaf->match) { -#ifdef CONFIG_REGEX_PCRE - const char *error = NULL; - int erroffset = 0; - int options = 0; +#ifdef CONFIG_REGEX_PCRE2 + int errorCode; + PCRE2_SIZE errorOffset; + uint32_t options = 0; // Ignore case flag if (pleaf->match_ignorecase) - options |= PCRE_CASELESS; + options |= PCRE2_CASELESS; - // Compile PCRE expression - pleaf->regex_pcre = pcre_compile(pleaf->ptnstr, options, - &error, &erroffset, NULL); + // Compile PCRE2 expression + pleaf->regex_pcre = pcre2_compile((PCRE2_SPTR)pleaf->ptnstr, PCRE2_ZERO_TERMINATED, + options, &errorCode, &errorOffset, NULL); if (!pleaf->regex_pcre) - c2_error("Pattern \"%s\": PCRE regular expression parsing failed on " - "offset %d: %s", pleaf->ptnstr, erroffset, error); -#ifdef CONFIG_REGEX_PCRE_JIT - pleaf->regex_pcre_extra = pcre_study(pleaf->regex_pcre, - PCRE_STUDY_JIT_COMPILE, &error); - if (!pleaf->regex_pcre_extra) { - printf("Pattern \"%s\": PCRE regular expression study failed: %s", - pleaf->ptnstr, error); + { + PCRE2_UCHAR errorMsg[256]; + pcre2_get_error_message(errorCode, errorMsg, sizeof(errorMsg)); + c2_error("Pattern \"%s\": PCRE2 regular expression parsing failed on " + "offset %zu: %s", pleaf->ptnstr, errorOffset, errorMsg); + } +#ifdef CONFIG_REGEX_PCRE2_JIT + int jit_res = pcre2_jit_compile(pleaf->regex_pcre, PCRE2_JIT_COMPLETE); + if (jit_res < 0) + { + printf("Pattern \"%s\": PCRE2 regular expression JIT compilation failed with error code %d", + pleaf->ptnstr, jit_res); } #endif - // Free the target string - // free(pleaf->tgt); - // pleaf->tgt = NULL; #else c2_error("PCRE regular expression support not compiled in."); #endif @@ -844,9 +845,8 @@ c2_free(c2_ptr_t p) { free(pleaf->tgt); free(pleaf->ptnstr); -#ifdef CONFIG_REGEX_PCRE - pcre_free(pleaf->regex_pcre); - LPCRE_FREE_STUDY(pleaf->regex_pcre_extra); +#ifdef CONFIG_REGEX_PCRE2 + pcre2_code_free(pleaf->regex_pcre); #endif free(pleaf); } @@ -1180,10 +1180,9 @@ c2_match_once_leaf(session_t *ps, win *w, const c2_l_t *pleaf, } break; case C2_L_MPCRE: -#ifdef CONFIG_REGEX_PCRE - *pres = (pcre_exec(pleaf->regex_pcre, - pleaf->regex_pcre_extra, - tgt, strlen(tgt), 0, 0, NULL, 0) >= 0); +#ifdef CONFIG_REGEX_PCRE2 + *pres = (pcre2_match(pleaf->regex_pcre, (PCRE2_SPTR)tgt, PCRE2_ZERO_TERMINATED, + 0, 0, NULL, NULL) >= 0); #else assert(0); #endif diff --git a/twin/compton-tde/c2.h b/twin/compton-tde/c2.h index 9e04c09a8..c84836c25 100644 --- a/twin/compton-tde/c2.h +++ b/twin/compton-tde/c2.h @@ -13,18 +13,10 @@ #include <fnmatch.h> #include <ctype.h> -// libpcre -#ifdef CONFIG_REGEX_PCRE -#include <pcre.h> - -// For compatiblity with <libpcre-8.20 -#ifndef PCRE_STUDY_JIT_COMPILE -#define PCRE_STUDY_JIT_COMPILE 0 -#define LPCRE_FREE_STUDY(extra) pcre_free(extra) -#else -#define LPCRE_FREE_STUDY(extra) pcre_free_study(extra) -#endif - +// libpcre2 +#ifdef CONFIG_REGEX_PCRE2 +#define PCRE2_CODE_UNIT_WIDTH 8 +#include <pcre2.h> #endif #define C2_MAX_LEVELS 10 @@ -139,9 +131,8 @@ struct _c2_l { } ptntype; char *ptnstr; long ptnint; -#ifdef CONFIG_REGEX_PCRE - pcre *regex_pcre; - pcre_extra *regex_pcre_extra; +#ifdef CONFIG_REGEX_PCRE2 + pcre2_code *regex_pcre; #endif }; diff --git a/twin/compton-tde/common.h b/twin/compton-tde/common.h index 9091fc582..d92396cdf 100644 --- a/twin/compton-tde/common.h +++ b/twin/compton-tde/common.h @@ -38,12 +38,10 @@ // #define MONITOR_REPAINT 1 // #define DEBUG_FADE 1 -// Whether to enable PCRE regular expression support in blacklists, enabled -// by default -// #define CONFIG_REGEX_PCRE 1 -// Whether to enable JIT support of libpcre. This may cause problems on PaX -// kernels. -// #define CONFIG_REGEX_PCRE_JIT 1 +// Whether to enable PCRE2 regular expression support in blacklists, enabled by default +// #define CONFIG_REGEX_PCRE2 1 +// Whether to enable JIT support of libpcre2. This may cause problems on PaX kernels. +// #define CONFIG_REGEX_PCRE2_JIT 1 // Whether to enable parsing of configuration files using libconfig. // #define CONFIG_LIBCONFIG 1 // Whether we are using a legacy version of libconfig (1.3.x). diff --git a/twin/compton-tde/compton_config.h.cmake b/twin/compton-tde/compton_config.h.cmake index bf3f22543..b534b1b80 100644 --- a/twin/compton-tde/compton_config.h.cmake +++ b/twin/compton-tde/compton_config.h.cmake @@ -1,11 +1,9 @@ #include "config.h" -// Whether to enable PCRE regular expression support in blacklists, enabled -// by default -#cmakedefine CONFIG_REGEX_PCRE 1 -// Whether to enable JIT support of libpcre. This may cause problems on PaX -// kernels. -#cmakedefine CONFIG_REGEX_PCRE_JIT 1 +// Whether to enable PCRE2 regular expression support in blacklists, enabled by default +#cmakedefine CONFIG_REGEX_PCRE2 1 +// Whether to enable JIT support of libpcre2. This may cause problems on PaX kernels. +#cmakedefine CONFIG_REGEX_PCRE2_JIT 1 // Whether to enable parsing of configuration files using libconfig. #cmakedefine CONFIG_LIBCONFIG 1 diff --git a/twin/compton-tde/man/compton-tde.1.html b/twin/compton-tde/man/compton-tde.1.html index 26d2a3b21..34243b08e 100644 --- a/twin/compton-tde/man/compton-tde.1.html +++ b/twin/compton-tde/man/compton-tde.1.html @@ -1422,7 +1422,7 @@ compton(1) Manual Page <div class="paragraph"><p><em>FORMAT</em> (optional) specifies the format of the property, 8, 16, or 32. On absence we use format X reports. Do not specify it for predefined or string targets.</p></div>
<div class="paragraph"><p><em>TYPE</em> is a single character representing the type of the property to match for: <tt>c</tt> for <em>CARDINAL</em>, <tt>a</tt> for <em>ATOM</em>, <tt>w</tt> for <em>WINDOW</em>, <tt>d</tt> for <em>DRAWABLE</em>, <tt>s</tt> for <em>STRING</em> (and any other string types, such as <em>UTF8_STRING</em>). Do not specify it for predefined targets.</p></div>
<div class="paragraph"><p><em>OP QUALIFIER</em> (optional), applicable only for equals operator, could be <tt>?</tt> (ignore-case).</p></div>
-<div class="paragraph"><p><em>MATCH TYPE</em> (optional), applicable only for equals operator, could be nothing (exact match), <tt>*</tt> (match anywhere), <tt>^</tt> (match from start), <tt>%</tt> (wildcard), or <tt>~</tt> (PCRE regular expression).</p></div>
+<div class="paragraph"><p><em>MATCH TYPE</em> (optional), applicable only for equals operator, could be nothing (exact match), <tt>*</tt> (match anywhere), <tt>^</tt> (match from start), <tt>%</tt> (wildcard), or <tt>~</tt> (PCRE2 regular expression).</p></div>
<div class="paragraph"><p><em>OPERATOR</em> is one of <tt>=</tt> (equals), <tt><</tt>, <tt>></tt>, <tt><=</tt>, <tt>=></tt>, or nothing (exists). Exists operator checks whether a property exists on a window (but for predefined targets, exists means != 0 then).</p></div>
<div class="paragraph"><p><em>PATTERN</em> is either an integer or a string enclosed by single or double quotes. Python-3-style escape sequences and raw string are supported in the string format.</p></div>
<div class="paragraph"><p>Supported logical operators are <tt>&&</tt> (and) and <tt>||</tt> (or). <tt>&&</tt> has higher precedence than <tt>||</tt>, left-to-right associativity. Use parentheses to change precedence.</p></div>
@@ -1468,7 +1468,7 @@ name = r"\x64\x64\o64"</tt></pre> <pre><tt>condition = TARGET:TYPE[FLAGS]:PATTERN</tt></pre>
</div></div>
<div class="paragraph"><p><em>TARGET</em> is one of "n" (window name), "i" (window class instance), "g" (window general class), and "r" (window role).</p></div>
-<div class="paragraph"><p><em>TYPE</em> is one of "e" (exact match), "a" (match anywhere), "s" (match from start), "w" (wildcard), and "p" (PCRE regular expressions, if compiled with the support).</p></div>
+<div class="paragraph"><p><em>TYPE</em> is one of "e" (exact match), "a" (match anywhere), "s" (match from start), "w" (wildcard), and "p" (PCRE2 regular expressions, if compiled with the support).</p></div>
<div class="paragraph"><p><em>FLAGS</em> could be a series of flags. Currently the only defined flag is "i" (ignore case).</p></div>
<div class="paragraph"><p><em>PATTERN</em> is the actual pattern string.</p></div>
</div>
diff --git a/twin/compton-tde/man/compton.1 b/twin/compton-tde/man/compton.1 index 964c4158d..a4e4dd7d9 100644 --- a/twin/compton-tde/man/compton.1 +++ b/twin/compton-tde/man/compton.1 @@ -659,7 +659,7 @@ With greater\-than/less\-than operators it looks like: .sp \fIOP QUALIFIER\fR (optional), applicable only for equals operator, could be ? (ignore\-case)\&. .sp -\fIMATCH TYPE\fR (optional), applicable only for equals operator, could be nothing (exact match), * (match anywhere), ^ (match from start), % (wildcard), or ~ (PCRE regular expression)\&. +\fIMATCH TYPE\fR (optional), applicable only for equals operator, could be nothing (exact match), * (match anywhere), ^ (match from start), % (wildcard), or ~ (PCRE2 regular expression)\&. .sp \fIOPERATOR\fR is one of = (equals), <, >, <=, =>, or nothing (exists)\&. Exists operator checks whether a property exists on a window (but for predefined targets, exists means != 0 then)\&. .sp @@ -720,7 +720,7 @@ condition = TARGET:TYPE[FLAGS]:PATTERN .sp \fITARGET\fR is one of "n" (window name), "i" (window class instance), "g" (window general class), and "r" (window role)\&. .sp -\fITYPE\fR is one of "e" (exact match), "a" (match anywhere), "s" (match from start), "w" (wildcard), and "p" (PCRE regular expressions, if compiled with the support)\&. +\fITYPE\fR is one of "e" (exact match), "a" (match anywhere), "s" (match from start), "w" (wildcard), and "p" (PCRE2 regular expressions, if compiled with the support)\&. .sp \fIFLAGS\fR could be a series of flags\&. Currently the only defined flag is "i" (ignore case)\&. .sp diff --git a/twin/data/update_default_rules.cpp b/twin/data/update_default_rules.cpp index 1afde0bee..c37abc81d 100644 --- a/twin/data/update_default_rules.cpp +++ b/twin/data/update_default_rules.cpp @@ -13,8 +13,8 @@ License. See the file "COPYING" for the exact licensing terms. #include <dcopclient.h> #include <tdeconfig.h> #include <kdebug.h> -#include <kinstance.h> -#include <kstandarddirs.h> +#include <tdeinstance.h> +#include <tdestandarddirs.h> int main( int argc, char* argv[] ) { diff --git a/twin/data/update_window_settings.cpp b/twin/data/update_window_settings.cpp index e52f8c760..d4b525691 100644 --- a/twin/data/update_window_settings.cpp +++ b/twin/data/update_window_settings.cpp @@ -12,7 +12,7 @@ License. See the file "COPYING" for the exact licensing terms. #include <netwm_def.h> #include <tdeconfig.h> -#include <kinstance.h> +#include <tdeinstance.h> #include <dcopclient.h> struct SessionInfo @@ -82,14 +82,14 @@ void loadFakeSessionInfo( TDEConfig* config ) info->maximized = config->readNumEntry( TQString("maximize")+n, 0 ); info->fullscreen = config->readNumEntry( TQString("fullscreen")+n, 0 ); info->desktop = config->readNumEntry( TQString("desktop")+n, 0 ); - info->minimized = config->readBoolEntry( TQString("iconified")+n, FALSE ); - info->onAllDesktops = config->readBoolEntry( TQString("sticky")+n, FALSE ); - info->shaded = config->readBoolEntry( TQString("shaded")+n, FALSE ); - info->keepAbove = config->readBoolEntry( TQString("staysOnTop")+n, FALSE ); - info->keepBelow = config->readBoolEntry( TQString("keepBelow")+n, FALSE ); - info->skipTaskbar = config->readBoolEntry( TQString("skipTaskbar")+n, FALSE ); - info->skipPager = config->readBoolEntry( TQString("skipPager")+n, FALSE ); - info->userNoBorder = config->readBoolEntry( TQString("userNoBorder")+n, FALSE ); + info->minimized = config->readBoolEntry( TQString("iconified")+n, false ); + info->onAllDesktops = config->readBoolEntry( TQString("sticky")+n, false ); + info->shaded = config->readBoolEntry( TQString("shaded")+n, false ); + info->keepAbove = config->readBoolEntry( TQString("staysOnTop")+n, false ); + info->keepBelow = config->readBoolEntry( TQString("keepBelow")+n, false ); + info->skipTaskbar = config->readBoolEntry( TQString("skipTaskbar")+n, false ); + info->skipPager = config->readBoolEntry( TQString("skipPager")+n, false ); + info->userNoBorder = config->readBoolEntry( TQString("userNoBorder")+n, false ); info->windowType = txtToWindowType( config->readEntry( TQString("windowType")+n ).latin1()); info->active = false; info->fake = true; diff --git a/twin/events.cpp b/twin/events.cpp index 166767239..5158df40b 100644 --- a/twin/events.cpp +++ b/twin/events.cpp @@ -196,7 +196,7 @@ bool Workspace::workspaceEvent( XEvent * e ) { if ( mouse_emulation && (e->type == ButtonPress || e->type == ButtonRelease ) ) { - mouse_emulation = FALSE; + mouse_emulation = false; XUngrabKeyboard( tqt_xdisplay(), get_tqt_x_time() ); } @@ -221,7 +221,7 @@ bool Workspace::workspaceEvent( XEvent * e ) if ( tab_grab || control_grab ) { tab_box->handleMouseEvent( e ); - return TRUE; + return true; } break; case KeyPress: @@ -323,7 +323,7 @@ bool Workspace::workspaceEvent( XEvent * e ) addSystemTrayWin( w ); } } - return TRUE; + return true; } return ( e->xunmap.event != e->xunmap.window ); // hide wm typical event from Qt @@ -336,12 +336,12 @@ bool Workspace::workspaceEvent( XEvent * e ) { //do not confuse Qt with these events. After all, _we_ are the //window manager who does the reparenting. - return TRUE; + return true; } case DestroyNotify: { if ( removeSystemTrayWin( e->xdestroywindow.window, false ) ) - return TRUE; + return true; return false; } case MapRequest: @@ -362,7 +362,7 @@ bool Workspace::workspaceEvent( XEvent * e ) // this code doesn't check the parent to be root. // if ( e->xmaprequest.parent == root ) { //###TODO store previously destroyed client ids if ( addSystemTrayWin( e->xmaprequest.window ) ) - return TRUE; + return true; c = createClient( e->xmaprequest.window, false ); if ( c != NULL && root != tqt_xrootwin() ) { // TODO what is this? @@ -428,7 +428,7 @@ bool Workspace::workspaceEvent( XEvent * e ) break; case KeyRelease: if ( mouse_emulation ) - return FALSE; + return false; break; case FocusIn: if( e->xfocus.window == rootWin() && TQCString( getenv("TDE_MULTIHEAD")).lower() != "true" @@ -460,7 +460,7 @@ bool Workspace::workspaceEvent( XEvent * e ) default: break; } - return FALSE; + return false; } // Some events don't have the actual window which caused the event @@ -733,7 +733,7 @@ void Client::destroyNotifyEvent( XDestroyWindowEvent* e ) } -bool blockAnimation = FALSE; +bool blockAnimation = false; /*! Handles client messages for the client window @@ -886,8 +886,8 @@ void Client::enterNotifyEvent( XCrossingEvent* e ) { delete shadeHoverTimer; shadeHoverTimer = new TQTimer( this ); - connect( shadeHoverTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( shadeHover() )); - shadeHoverTimer->start( options->shadeHoverInterval, TRUE ); + connect( shadeHoverTimer, TQ_SIGNAL( timeout() ), this, TQ_SLOT( shadeHover() )); + shadeHoverTimer->start( options->shadeHoverInterval, true ); } if ( options->focusPolicy == Options::ClickToFocus ) @@ -899,8 +899,8 @@ void Client::enterNotifyEvent( XCrossingEvent* e ) { delete autoRaiseTimer; autoRaiseTimer = new TQTimer( this ); - connect( autoRaiseTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( autoRaise() ) ); - autoRaiseTimer->start( options->autoRaiseInterval, TRUE ); + connect( autoRaiseTimer, TQ_SIGNAL( timeout() ), this, TQ_SLOT( autoRaise() ) ); + autoRaiseTimer->start( options->autoRaiseInterval, true ); } TQPoint currentPos( e->x_root, e->y_root ); @@ -979,7 +979,7 @@ void Client::grabButton( int modifier ) ++i ) XGrabButton( tqt_xdisplay(), AnyButton, modifier | mods[ i ], - wrapperId(), FALSE, ButtonPressMask, + wrapperId(), false, ButtonPressMask, GrabModeSync, GrabModeAsync, None, None ); } @@ -1425,7 +1425,7 @@ bool Client::buttonPressEvent( Window w, int button, int state, int x, int y, in bool replay = performMouseCommand( com, TQPoint( x_root, y_root), perform_handled ); if ( isSpecialWindow()) - replay = TRUE; + replay = true; if( w == wrapperId()) // these can come only from a grab XAllowEvents(tqt_xdisplay(), replay? ReplayPointer : SyncPointer, CurrentTime ); //tqt_x_time); @@ -1453,7 +1453,7 @@ void Client::processDecorationButtonPress( int button, int /*state*/, int x, int Options::MouseCommand com = Options::MouseNothing; bool active = isActive(); if ( !wantsInput() ) // we cannot be active, use it anyway - active = TRUE; + active = true; if ( button == Button1 ) com = active ? options->commandActiveTitlebar1() : options->commandInactiveTitlebar1(); @@ -1466,7 +1466,7 @@ void Client::processDecorationButtonPress( int button, int /*state*/, int x, int && com != Options::MouseMinimize ) // mouse release event { mode = mousePosition( TQPoint( x, y )); - buttonDown = TRUE; + buttonDown = true; moveOffset = TQPoint( x, y ); invertedMoveOffset = rect().bottomRight() - moveOffset; unrestrictedMoveResize = false; @@ -1517,7 +1517,7 @@ bool Client::buttonReleaseEvent( Window w, int /*button*/, int state, int x, int y = this->y(); if ( (state & ( Button1Mask & Button2Mask & Button3Mask )) == 0 ) { - buttonDown = FALSE; + buttonDown = false; if ( moveResizeMode ) { finishMoveResize( false ); @@ -1604,7 +1604,7 @@ void Client::focusInEvent( XFocusInEvent* e ) bool activate = workspace()->allowClientActivation( this, -1U, true ); workspace()->gotFocusIn( this ); // remove from should_get_focus list if( activate ) - setActive( TRUE ); + setActive( true ); else { workspace()->restoreFocus(); @@ -1673,7 +1673,7 @@ void Client::focusOutEvent( XFocusOutEvent* e ) if ( TQApplication::activePopupWidget() ) return; if( !check_follows_focusin( this )) - setActive( FALSE ); + setActive( false ); } // performs _NET_WM_MOVERESIZE @@ -1684,7 +1684,7 @@ void Client::NETMoveResize( int x_root, int y_root, NET::Direction direction ) else if( moveResizeMode && direction == NET::MoveResizeCancel ) { finishMoveResize( true ); - buttonDown = FALSE; + buttonDown = false; setCursor( mode ); } else if( direction >= NET::TopLeft && direction <= NET::Left ) @@ -1704,7 +1704,7 @@ void Client::NETMoveResize( int x_root, int y_root, NET::Direction direction ) return; if( moveResizeMode ) finishMoveResize( false ); - buttonDown = TRUE; + buttonDown = true; moveOffset = TQPoint( x_root - x(), y_root - y()); // map from global invertedMoveOffset = rect().bottomRight() - moveOffset; unrestrictedMoveResize = false; @@ -1756,12 +1756,12 @@ void Client::keyPressEvent( uint key_code ) case Key_Return: case Key_Enter: finishMoveResize( false ); - buttonDown = FALSE; + buttonDown = false; setCursor( mode ); break; case Key_Escape: finishMoveResize( true ); - buttonDown = FALSE; + buttonDown = false; setCursor( mode ); break; default: diff --git a/twin/geometry.cpp b/twin/geometry.cpp index f729c702c..6adad44fe 100644 --- a/twin/geometry.cpp +++ b/twin/geometry.cpp @@ -223,12 +223,12 @@ TQRect Workspace::clientArea( clientAreaOption opt, int screen, int desktop ) co { if( desktop == NETWinInfo::OnAllDesktops || desktop == 0 ) desktop = currentDesktop(); - TQDesktopWidget *desktopwidget = kapp->desktop(); + TQDesktopWidget *desktopwidget = tdeApp->desktop(); TQRect sarea = screenarea // may be NULL during KWin initialization ? screenarea[ desktop ][ screen ] : desktopwidget->screenGeometry( screen ); TQRect warea = workarea[ desktop ].isNull() - ? kapp->desktop()->geometry() + ? tdeApp->desktop()->geometry() : workarea[ desktop ]; switch (opt) { @@ -802,7 +802,7 @@ TQRect Client::adjustedClientArea( const TQRect &desktopArea, const TQRect& area // HACK: workarea handling is not xinerama aware, so if this strut // reserves place at a xinerama edge that's inside the virtual screen, // ignore the strut for workspace setting. - if( area == kapp->desktop()->geometry()) + if( area == tdeApp->desktop()->geometry()) { if( stareaL.left() < screenarea.left()) stareaL = TQRect(); @@ -1692,7 +1692,7 @@ bool Client::isMaximizable() const return false; } if ( maximizeMode() != MaximizeRestore ) - return TRUE; + return true; TQSize max = maxSize(); #if 0 if( max.width() < 32767 || max.height() < 32767 ) // sizes are 16bit with X @@ -1915,12 +1915,12 @@ void Client::changeMaximize( bool vertical, bool horizontal, bool adjust ) TQRect clientArea = workspace()->clientArea( MaximizeArea, this ); // save sizes for restoring, if maximalizing - if( !adjust && !( y() == clientArea.top() && height() == clientArea.height())) + if( !activeTiled && !adjust && !( y() == clientArea.top() && height() == clientArea.height())) { geom_restore.setTop( y()); geom_restore.setHeight( height()); } - if( !adjust && !( x() == clientArea.left() && width() == clientArea.width())) + if( !activeTiled && !adjust && !( x() == clientArea.left() && width() == clientArea.width())) { geom_restore.setLeft( x()); geom_restore.setWidth( width()); @@ -2328,26 +2328,19 @@ bool Client::startMoveResize() moveResizeMode = true; initialMoveResizeGeom = geometry(); - if (activeTiled) + if ( maximizeMode() != MaximizeRestore ) { - // Restore original geometry - activeTiled = false; if (options->resetMaximizedWindowGeometry() && isMove()) { /* Original geometry might be smaller than the tiled one, so the * mouse pointer might appear off-window when untiling. * Here we center the window horizontally under the mouse pointer. * This should work with most window decorations. */ - activeTiledOrigGeom.moveLeft(TQCursor::pos().x() - (activeTiledOrigGeom.width() / 2)); - moveOffset.setX(TQCursor::pos().x() - activeTiledOrigGeom.x()); + geom_restore.moveLeft(TQCursor::pos().x() - (geom_restore.width() / 2)); + moveOffset.setX(TQCursor::pos().x() - geom_restore.x()); - setGeometry(activeTiledOrigGeom); - } - } + setGeometry(geom_restore); - if ( maximizeMode() != MaximizeRestore ) - { - if (options->resetMaximizedWindowGeometry() && isMove()) { maximize(MaximizeRestore); } else { @@ -2376,14 +2369,14 @@ bool Client::startMoveResize() || ( isResize() && rules()->checkMoveResizeMode( options->resizeMode ) != Options::Opaque ) ) { grabXServer(); - kapp->sendPostedEvents(); + tdeApp->sendPostedEvents(); // we have server grab -> nothing should cause paint events // unfortunately, that's not completely true, Qt may generate // paint events on some widgets due to FocusIn(?) // eat them, otherwise XOR painting will be broken (#58054) // paint events for the geometrytip need to be allowed, though // eater = new EatAllPaintEvents; -// not needed anymore? kapp->installEventFilter( eater ); +// not needed anymore? tdeApp->installEventFilter( eater ); } Notify::raise( isResize() ? Notify::ResizeStart : Notify::MoveStart ); @@ -2411,7 +2404,7 @@ void Client::finishMoveResize( bool cancel ) kdDebug() <<"finishing moveresize in active mode, cancel is " << cancel << endl; activeMaximizing = false; activeTiled = true; - activeTiledOrigGeom = initialMoveResizeGeom; + geom_restore = initialMoveResizeGeom; switch (activeMode) { case ActiveMaximizeMode: { @@ -2425,7 +2418,6 @@ void Client::finishMoveResize( bool cancel ) setGeometry(cancel ? initialMoveResizeGeom : activeBorderMaximizeGeometry()); } - activeTiledOrigGeom.moveTopLeft(rect().topLeft()); } checkMaximizeGeometry(); @@ -2726,6 +2718,16 @@ ActiveMaximizingMode Client::activeBorderMode() const return activeMode; } +void Client::setActiveBorderPos( TQPoint pos ) +{ + activePos = pos; +} + +TQPoint Client::activeBorderPos() const +{ + return activePos; +} + void Client::setActiveBorder(ActiveBorder border) { currentActiveBorder = border; } @@ -2766,7 +2768,7 @@ void Client::cancelActiveBorderMaximizing() { TQRect Client::activeBorderMaximizeGeometry() { TQRect ret; - TQRect max = workspace()->clientArea(MaximizeArea, TQCursor::pos(), workspace()->currentDesktop()); + TQRect max = workspace()->clientArea(MaximizeArea, activePos, workspace()->currentDesktop()); switch (activeBorderMode()) { case ActiveMaximizeMode: @@ -2828,4 +2830,19 @@ TQRect Client::activeBorderMaximizeGeometry() return ret; } +void Client::tileToBorder(ActiveBorder border) { + if (!isResizable()) return; + activeTiled = true; + if (maximizeMode() == MaximizeRestore) + geom_restore = geometry(); + setActiveBorderMode(ActiveTilingMode); + setActiveBorderPos(TQCursor().pos()); + setActiveBorder(border); + TQRect geo = activeBorderMaximizeGeometry(); + if (geo.isValid() && !geo.isEmpty()) { + setGeometry(geo); + } + workspace()->raiseClient(this); +} + } // namespace diff --git a/twin/kcmtwin/twindecoration/buttons.cpp b/twin/kcmtwin/twindecoration/buttons.cpp index 40f63d981..36534f806 100644 --- a/twin/kcmtwin/twindecoration/buttons.cpp +++ b/twin/kcmtwin/twindecoration/buttons.cpp @@ -84,9 +84,9 @@ bool ButtonDrag::decode( TQDropEvent* e, Button& btn ) int supported; stream >> supported; btn.supported = supported; - return TRUE; + return true; } - return FALSE; + return false; } @@ -267,7 +267,7 @@ ButtonDropSite::ButtonDropSite( TQWidget* parent, const char* name ) : TQFrame( parent, name ), m_selected(0) { - setAcceptDrops( TRUE ); + setAcceptDrops( true ); setFrameShape( WinPanel ); setFrameShadow( Raised ); setMinimumHeight( 26 ); @@ -689,11 +689,11 @@ ButtonPositionWidget::ButtonPositionWidget(TQWidget *parent, const char* name) layout->addWidget(m_dropSite); layout->addWidget(m_buttonSource); - connect( m_dropSite, TQT_SIGNAL(buttonAdded(TQChar)), m_buttonSource, TQT_SLOT(hideButton(TQChar)) ); - connect( m_dropSite, TQT_SIGNAL(buttonRemoved(TQChar)), m_buttonSource, TQT_SLOT(showButton(TQChar)) ); - connect( m_buttonSource, TQT_SIGNAL(dropped(TQDropEvent*, TQListViewItem*)), m_dropSite, TQT_SLOT(removeSelectedButton()) ); + connect( m_dropSite, TQ_SIGNAL(buttonAdded(TQChar)), m_buttonSource, TQ_SLOT(hideButton(TQChar)) ); + connect( m_dropSite, TQ_SIGNAL(buttonRemoved(TQChar)), m_buttonSource, TQ_SLOT(showButton(TQChar)) ); + connect( m_buttonSource, TQ_SIGNAL(dropped(TQDropEvent*, TQListViewItem*)), m_dropSite, TQ_SLOT(removeSelectedButton()) ); - connect( m_dropSite, TQT_SIGNAL(changed()), TQT_SIGNAL(changed()) ); + connect( m_dropSite, TQ_SIGNAL(changed()), TQ_SIGNAL(changed()) ); // insert all possible buttons into the source (backwards to keep the preferred order...) bool dummy; diff --git a/twin/kcmtwin/twindecoration/twindecoration.cpp b/twin/kcmtwin/twindecoration/twindecoration.cpp index 062ff6ac7..408bd563c 100644 --- a/twin/kcmtwin/twindecoration/twindecoration.cpp +++ b/twin/kcmtwin/twindecoration/twindecoration.cpp @@ -47,14 +47,14 @@ #include <kcolorbutton.h> #include <kcombobox.h> #include <kdebug.h> -#include <kdesktopfile.h> -#include <kstandarddirs.h> +#include <tdedesktopfile.h> +#include <tdestandarddirs.h> #include <tdeglobal.h> #include <tdelocale.h> #include <kdialog.h> #include <kgenericfactory.h> #include <tdeaboutdata.h> -#include <kprocess.h> +#include <tdeprocess.h> #include <dcopclient.h> #include "twindecoration.h" @@ -193,32 +193,32 @@ KWinDecorationModule::KWinDecorationModule(TQWidget* parent, const char* name, c cbShadowDocks = new TQCheckBox(i18n("Docks and &panels"), whichShadowSettings); - connect(cbShadowDocks, TQT_SIGNAL(toggled(bool)), - TQT_SLOT(slotSelectionChanged())); + connect(cbShadowDocks, TQ_SIGNAL(toggled(bool)), + TQ_SLOT(slotSelectionChanged())); cbShadowOverrides = new TQCheckBox(i18n("O&verride windows"), whichShadowSettings); - connect(cbShadowOverrides, TQT_SIGNAL(toggled(bool)), - TQT_SLOT(slotSelectionChanged())); + connect(cbShadowOverrides, TQ_SIGNAL(toggled(bool)), + TQ_SLOT(slotSelectionChanged())); cbShadowTopMenus = new TQCheckBox(i18n("&Top menu"), whichShadowSettings); - connect(cbShadowTopMenus, TQT_SIGNAL(toggled(bool)), - TQT_SLOT(slotSelectionChanged())); + connect(cbShadowTopMenus, TQ_SIGNAL(toggled(bool)), + TQ_SLOT(slotSelectionChanged())); cbInactiveShadow = new TQCheckBox( i18n("Draw shadow under &inactive windows"), inactiveShadowSettings); - connect(cbInactiveShadow, TQT_SIGNAL(toggled(bool)), - TQT_SLOT(slotSelectionChanged())); + connect(cbInactiveShadow, TQ_SIGNAL(toggled(bool)), + TQ_SLOT(slotSelectionChanged())); shadowColourHBox = new TQHBox(activeShadowSettings); shadowColourHBox->setSpacing(KDialog::spacingHint()); shadowColourLabel = new TQLabel(i18n("Colour:"), shadowColourHBox); shadowColourButton = new KColorButton(shadowColourHBox); - connect(shadowColourButton, TQT_SIGNAL(changed(const TQColor &)), TQT_SLOT(slotSelectionChanged())); + connect(shadowColourButton, TQ_SIGNAL(changed(const TQColor &)), TQ_SLOT(slotSelectionChanged())); inactiveShadowColourHBox = new TQHBox(inactiveShadowSettings); inactiveShadowColourHBox->setSpacing(KDialog::spacingHint()); inactiveShadowColourLabel = new TQLabel(i18n("Colour:"), inactiveShadowColourHBox); inactiveShadowColourButton = new KColorButton(inactiveShadowColourHBox); - connect(inactiveShadowColourButton, TQT_SIGNAL(changed(const TQColor &)), TQT_SLOT(slotSelectionChanged())); + connect(inactiveShadowColourButton, TQ_SIGNAL(changed(const TQColor &)), TQ_SLOT(slotSelectionChanged())); shadowOpacityHBox = new TQHBox(activeShadowSettings); shadowOpacityHBox->setSpacing(KDialog::spacingHint()); @@ -229,12 +229,12 @@ KWinDecorationModule::KWinDecorationModule(TQWidget* parent, const char* name, c shadowOpacitySlider->setTickInterval(10); shadowOpacitySpinBox = new TQSpinBox(1, 100, 1, shadowOpacityHBox); shadowOpacitySpinBox->setSuffix(" %"); - connect(shadowOpacitySlider, TQT_SIGNAL(valueChanged(int)), shadowOpacitySpinBox, - TQT_SLOT(setValue(int))); - connect(shadowOpacitySpinBox, TQT_SIGNAL(valueChanged(int)), shadowOpacitySlider, - TQT_SLOT(setValue(int))); - connect(shadowOpacitySlider, TQT_SIGNAL(valueChanged(int)), - TQT_SLOT(slotSelectionChanged())); + connect(shadowOpacitySlider, TQ_SIGNAL(valueChanged(int)), shadowOpacitySpinBox, + TQ_SLOT(setValue(int))); + connect(shadowOpacitySpinBox, TQ_SIGNAL(valueChanged(int)), shadowOpacitySlider, + TQ_SLOT(setValue(int))); + connect(shadowOpacitySlider, TQ_SIGNAL(valueChanged(int)), + TQ_SLOT(slotSelectionChanged())); inactiveShadowOpacityHBox = new TQHBox(inactiveShadowSettings); inactiveShadowOpacityHBox->setSpacing(KDialog::spacingHint()); @@ -247,14 +247,14 @@ KWinDecorationModule::KWinDecorationModule(TQWidget* parent, const char* name, c inactiveShadowOpacitySpinBox = new TQSpinBox(1, 100, 1, inactiveShadowOpacityHBox); inactiveShadowOpacitySpinBox->setSuffix(" %"); - connect(inactiveShadowOpacitySlider, TQT_SIGNAL(valueChanged(int)), + connect(inactiveShadowOpacitySlider, TQ_SIGNAL(valueChanged(int)), inactiveShadowOpacitySpinBox, - TQT_SLOT(setValue(int))); - connect(inactiveShadowOpacitySpinBox, TQT_SIGNAL(valueChanged(int)), + TQ_SLOT(setValue(int))); + connect(inactiveShadowOpacitySpinBox, TQ_SIGNAL(valueChanged(int)), inactiveShadowOpacitySlider, - TQT_SLOT(setValue(int))); - connect(inactiveShadowOpacitySlider, TQT_SIGNAL(valueChanged(int)), - TQT_SLOT(slotSelectionChanged())); + TQ_SLOT(setValue(int))); + connect(inactiveShadowOpacitySlider, TQ_SIGNAL(valueChanged(int)), + TQ_SLOT(slotSelectionChanged())); shadowXOffsetHBox = new TQHBox(activeShadowSettings); shadowXOffsetHBox->setSpacing(KDialog::spacingHint()); @@ -263,8 +263,8 @@ KWinDecorationModule::KWinDecorationModule(TQWidget* parent, const char* name, c shadowXOffsetHBox); shadowXOffsetSpinBox = new TQSpinBox(-1024, 1024, 1, shadowXOffsetHBox); shadowXOffsetSpinBox->setSuffix(i18n(" pixels")); - connect(shadowXOffsetSpinBox, TQT_SIGNAL(valueChanged(int)), - TQT_SLOT(slotSelectionChanged())); + connect(shadowXOffsetSpinBox, TQ_SIGNAL(valueChanged(int)), + TQ_SLOT(slotSelectionChanged())); inactiveShadowXOffsetHBox = new TQHBox(inactiveShadowSettings); inactiveShadowXOffsetHBox->setSpacing(KDialog::spacingHint()); @@ -274,8 +274,8 @@ KWinDecorationModule::KWinDecorationModule(TQWidget* parent, const char* name, c inactiveShadowXOffsetSpinBox = new TQSpinBox(-1024, 1024, 1, inactiveShadowXOffsetHBox); inactiveShadowXOffsetSpinBox->setSuffix(i18n(" pixels")); - connect(inactiveShadowXOffsetSpinBox, TQT_SIGNAL(valueChanged(int)), - TQT_SLOT(slotSelectionChanged())); + connect(inactiveShadowXOffsetSpinBox, TQ_SIGNAL(valueChanged(int)), + TQ_SLOT(slotSelectionChanged())); shadowYOffsetHBox = new TQHBox(activeShadowSettings); shadowYOffsetHBox->setSpacing(KDialog::spacingHint()); @@ -284,8 +284,8 @@ KWinDecorationModule::KWinDecorationModule(TQWidget* parent, const char* name, c shadowYOffsetHBox); shadowYOffsetSpinBox = new TQSpinBox(-1024, 1024, 1, shadowYOffsetHBox); shadowYOffsetSpinBox->setSuffix(i18n(" pixels")); - connect(shadowYOffsetSpinBox, TQT_SIGNAL(valueChanged(int)), - TQT_SLOT(slotSelectionChanged())); + connect(shadowYOffsetSpinBox, TQ_SIGNAL(valueChanged(int)), + TQ_SLOT(slotSelectionChanged())); inactiveShadowYOffsetHBox = new TQHBox(inactiveShadowSettings); inactiveShadowYOffsetHBox->setSpacing(KDialog::spacingHint()); @@ -295,8 +295,8 @@ KWinDecorationModule::KWinDecorationModule(TQWidget* parent, const char* name, c inactiveShadowYOffsetSpinBox = new TQSpinBox(-1024, 1024, 1, inactiveShadowYOffsetHBox); inactiveShadowYOffsetSpinBox->setSuffix(i18n(" pixels")); - connect(inactiveShadowYOffsetSpinBox, TQT_SIGNAL(valueChanged(int)), - TQT_SLOT(slotSelectionChanged())); + connect(inactiveShadowYOffsetSpinBox, TQ_SIGNAL(valueChanged(int)), + TQ_SLOT(slotSelectionChanged())); shadowThicknessHBox = new TQHBox(activeShadowSettings); shadowThicknessHBox->setSpacing(KDialog::spacingHint()); @@ -306,8 +306,8 @@ KWinDecorationModule::KWinDecorationModule(TQWidget* parent, const char* name, c shadowThicknessSpinBox = new TQSpinBox(1, 100, 1, shadowThicknessHBox); shadowThicknessSpinBox->setSuffix(i18n(" pixels")); - connect(shadowThicknessSpinBox, TQT_SIGNAL(valueChanged(int)), - TQT_SLOT(slotSelectionChanged())); + connect(shadowThicknessSpinBox, TQ_SIGNAL(valueChanged(int)), + TQ_SLOT(slotSelectionChanged())); inactiveShadowThicknessHBox = new TQHBox(inactiveShadowSettings); inactiveShadowThicknessHBox->setSpacing(KDialog::spacingHint()); @@ -317,8 +317,8 @@ KWinDecorationModule::KWinDecorationModule(TQWidget* parent, const char* name, c inactiveShadowThicknessSpinBox = new TQSpinBox(1, 100, 1, inactiveShadowThicknessHBox); inactiveShadowThicknessSpinBox->setSuffix(i18n(" pixels")); - connect(inactiveShadowThicknessSpinBox, TQT_SIGNAL(valueChanged(int)), - TQT_SLOT(slotSelectionChanged())); + connect(inactiveShadowThicknessSpinBox, TQ_SIGNAL(valueChanged(int)), + TQ_SLOT(slotSelectionChanged())); // Page 4 (WM selector) windowmanagerPage = new TQWidget( tabWidget ); @@ -355,25 +355,25 @@ KWinDecorationModule::KWinDecorationModule(TQWidget* parent, const char* name, c tabWidget->insertTab( shadowPage, i18n("&Shadows") ); tabWidget->insertTab( windowmanagerPage, i18n("&Window Manager") ); - connect( buttonPositionWidget, TQT_SIGNAL(changed()), this, TQT_SLOT(slotButtonsChanged()) ); // update preview etc. - connect( buttonPositionWidget, TQT_SIGNAL(changed()), this, TQT_SLOT(slotSelectionChanged()) ); // emit changed()... - connect( decorationList, TQT_SIGNAL(activated(const TQString&)), TQT_SLOT(slotSelectionChanged()) ); - connect( decorationList, TQT_SIGNAL(activated(const TQString&)), - TQT_SLOT(slotChangeDecoration(const TQString&)) ); - connect( cbUseCustomButtonPositions, TQT_SIGNAL(clicked()), TQT_SLOT(slotSelectionChanged()) ); - connect(cbUseCustomButtonPositions, TQT_SIGNAL(toggled(bool)), buttonPositionWidget, TQT_SLOT(setEnabled(bool))); - connect(cbUseCustomButtonPositions, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotButtonsChanged()) ); - connect(cbWindowShadow, TQT_SIGNAL(toggled(bool)), activeShadowSettings, TQT_SLOT(setEnabled(bool))); - connect(cbWindowShadow, TQT_SIGNAL(toggled(bool)), inactiveShadowSettings, TQT_SLOT(setEnabled(bool))); - connect(cbWindowShadow, TQT_SIGNAL(toggled(bool)), whichShadowSettings, TQT_SLOT(setEnabled(bool))); - - connect( cbShowToolTips, TQT_SIGNAL(clicked()), TQT_SLOT(slotSelectionChanged()) ); - connect( cbWindowShadow, TQT_SIGNAL(clicked()), TQT_SLOT(slotSelectionChanged()) ); - connect( cBorder, TQT_SIGNAL( activated( int )), TQT_SLOT( slotBorderChanged( int ))); -// connect( cbUseMiniWindows, TQT_SIGNAL(clicked()), TQT_SLOT(slotSelectionChanged()) ); - - connect( thirdpartyWMList, TQT_SIGNAL(activated(const TQString&)), TQT_SLOT(slotSelectionChanged()) ); - connect( thirdpartyWMArguments, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(slotSelectionChanged()) ); + connect( buttonPositionWidget, TQ_SIGNAL(changed()), this, TQ_SLOT(slotButtonsChanged()) ); // update preview etc. + connect( buttonPositionWidget, TQ_SIGNAL(changed()), this, TQ_SLOT(slotSelectionChanged()) ); // emit changed()... + connect( decorationList, TQ_SIGNAL(activated(const TQString&)), TQ_SLOT(slotSelectionChanged()) ); + connect( decorationList, TQ_SIGNAL(activated(const TQString&)), + TQ_SLOT(slotChangeDecoration(const TQString&)) ); + connect( cbUseCustomButtonPositions, TQ_SIGNAL(clicked()), TQ_SLOT(slotSelectionChanged()) ); + connect(cbUseCustomButtonPositions, TQ_SIGNAL(toggled(bool)), buttonPositionWidget, TQ_SLOT(setEnabled(bool))); + connect(cbUseCustomButtonPositions, TQ_SIGNAL(toggled(bool)), this, TQ_SLOT(slotButtonsChanged()) ); + connect(cbWindowShadow, TQ_SIGNAL(toggled(bool)), activeShadowSettings, TQ_SLOT(setEnabled(bool))); + connect(cbWindowShadow, TQ_SIGNAL(toggled(bool)), inactiveShadowSettings, TQ_SLOT(setEnabled(bool))); + connect(cbWindowShadow, TQ_SIGNAL(toggled(bool)), whichShadowSettings, TQ_SLOT(setEnabled(bool))); + + connect( cbShowToolTips, TQ_SIGNAL(clicked()), TQ_SLOT(slotSelectionChanged()) ); + connect( cbWindowShadow, TQ_SIGNAL(clicked()), TQ_SLOT(slotSelectionChanged()) ); + connect( cBorder, TQ_SIGNAL( activated( int )), TQ_SLOT( slotBorderChanged( int ))); +// connect( cbUseMiniWindows, TQ_SIGNAL(clicked()), TQ_SLOT(slotSelectionChanged()) ); + + connect( thirdpartyWMList, TQ_SIGNAL(activated(const TQString&)), TQ_SLOT(slotSelectionChanged()) ); + connect( thirdpartyWMArguments, TQ_SIGNAL(textChanged(const TQString&)), TQ_SLOT(slotSelectionChanged()) ); // Allow twin dcop signal to update our selection list connectDCOPSignal("twin", 0, "dcopResetAllClients()", "dcopUpdateClientList()", false); @@ -409,9 +409,9 @@ void KWinDecorationModule::findDecorations() for (TQFileInfoListIterator it(*d.entryInfoList()); it.current(); ++it) { TQString filename(it.current()->absFilePath()); - if (KDesktopFile::isDesktopFile(filename)) + if (TDEDesktopFile::isDesktopFile(filename)) { - KDesktopFile desktopFile(filename); + TDEDesktopFile desktopFile(filename); TQString libName = desktopFile.readEntry("X-TDE-Library"); if (!libName.isEmpty() && libName.startsWith("twin_") || libName.startsWith("twin3_")) @@ -660,10 +660,10 @@ void KWinDecorationModule::resetPlugin( TDEConfig* conf, const TQString& current pluginObject = (TQObject*)(allocatePlugin( conf, pluginConfigWidget )); // connect required signals and slots together... - connect( pluginObject, TQT_SIGNAL(changed()), this, TQT_SLOT(slotSelectionChanged()) ); - connect( this, TQT_SIGNAL(pluginLoad(TDEConfig*)), pluginObject, TQT_SLOT(load(TDEConfig*)) ); - connect( this, TQT_SIGNAL(pluginSave(TDEConfig*)), pluginObject, TQT_SLOT(save(TDEConfig*)) ); - connect( this, TQT_SIGNAL(pluginDefaults()), pluginObject, TQT_SLOT(defaults()) ); + connect( pluginObject, TQ_SIGNAL(changed()), this, TQ_SLOT(slotSelectionChanged()) ); + connect( this, TQ_SIGNAL(pluginLoad(TDEConfig*)), pluginObject, TQ_SLOT(load(TDEConfig*)) ); + connect( this, TQ_SIGNAL(pluginSave(TDEConfig*)), pluginObject, TQ_SLOT(save(TDEConfig*)) ); + connect( this, TQ_SIGNAL(pluginDefaults()), pluginObject, TQ_SLOT(defaults()) ); pluginConfigWidget->show(); return; } @@ -753,11 +753,11 @@ void KWinDecorationModule::readConfig( TDEConfig* conf ) int swm; for ( swm = 0; swm < thirdpartyWMList->count(); ++swm ) { if ( thirdpartyWMList->text( swm ).startsWith(selectedWM + " ") ) { - found = TRUE; + found = true; break; } } - if (found == FALSE) { + if (found == false) { thirdpartyWMList->setCurrentItem(0); } else { @@ -970,7 +970,7 @@ TQString KWinDecorationModule::handbookSection() const void KWinDecorationModule::resetKWin() { - bool ok = kapp->dcopClient()->send("twin*", "KWinInterface", + bool ok = tdeApp->dcopClient()->send("twin*", "KWinInterface", "reconfigure()", TQByteArray()); if (!ok) kdDebug() << "kcmtwindecoration: Could not reconfigure twin" << endl; diff --git a/twin/kcmtwin/twinoptions/main.cpp b/twin/kcmtwin/twinoptions/main.cpp index e55d5a15f..0bc9c942c 100644 --- a/twin/kcmtwin/twinoptions/main.cpp +++ b/twin/kcmtwin/twinoptions/main.cpp @@ -36,7 +36,7 @@ extern "C" { - KDE_EXPORT TDECModule *create_twinfocus(TQWidget *parent, const char *name) + TDE_EXPORT TDECModule *create_twinfocus(TQWidget *parent, const char *name) { //CT there's need for decision: kwm or twin? TDEGlobal::locale()->insertCatalogue("kcmkwm"); @@ -44,14 +44,14 @@ extern "C" return new KFocusConfig(true, c, parent, name); } - KDE_EXPORT TDECModule *create_twinactions(TQWidget *parent, const char *name) + TDE_EXPORT TDECModule *create_twinactions(TQWidget *parent, const char *name) { //CT there's need for decision: kwm or twin? TDEGlobal::locale()->insertCatalogue("kcmkwm"); return new TDEActionsOptions( parent, name); } - KDE_EXPORT TDECModule *create_twinmoving(TQWidget *parent, const char *name) + TDE_EXPORT TDECModule *create_twinmoving(TQWidget *parent, const char *name) { //CT there's need for decision: kwm or twin? TDEGlobal::locale()->insertCatalogue("kcmkwm"); @@ -59,14 +59,14 @@ extern "C" return new KMovingConfig(true, c, parent, name); } - KDE_EXPORT TDECModule *create_twinaborders(TQWidget *parent, const char *name) + TDE_EXPORT TDECModule *create_twinaborders(TQWidget *parent, const char *name) { TDEGlobal::locale()->insertCatalogue("kcmkwm"); TDEConfig *c = new TDEConfig("twinrc", false, true); return new KActiveBorderConfig(true, c, parent, name); } - KDE_EXPORT TDECModule *create_twinadvanced(TQWidget *parent, const char *name) + TDE_EXPORT TDECModule *create_twinadvanced(TQWidget *parent, const char *name) { //CT there's need for decision: kwm or twin? TDEGlobal::locale()->insertCatalogue("kcmkwm"); @@ -74,7 +74,7 @@ extern "C" return new KAdvancedConfig(true, c, parent, name); } - KDE_EXPORT TDECModule *create_twintranslucency(TQWidget *parent, const char *name) + TDE_EXPORT TDECModule *create_twintranslucency(TQWidget *parent, const char *name) { //CT there's need for decision: kwm or twin? TDEGlobal::locale()->insertCatalogue("kcmkwm"); @@ -82,7 +82,7 @@ extern "C" return new KTranslucencyConfig(true, c, parent, name); } - KDE_EXPORT TDECModule *create_twinoptions ( TQWidget *parent, const char* name) + TDE_EXPORT TDECModule *create_twinoptions ( TQWidget *parent, const char* name) { //CT there's need for decision: kwm or twin? TDEGlobal::locale()->insertCatalogue("kcmkwm"); @@ -102,37 +102,37 @@ KWinOptions::KWinOptions(TQWidget *parent, const char *name) mFocus = new KFocusConfig(false, mConfig, this, "TWin Focus Config"); mFocus->layout()->setMargin( KDialog::marginHint() ); tab->addTab(mFocus, i18n("&Focus")); - connect(mFocus, TQT_SIGNAL(changed(bool)), this, TQT_SLOT(moduleChanged(bool))); + connect(mFocus, TQ_SIGNAL(changed(bool)), this, TQ_SLOT(moduleChanged(bool))); mTitleBarActions = new KTitleBarActionsConfig(false, mConfig, this, "TWin TitleBar Actions"); mTitleBarActions->layout()->setMargin( KDialog::marginHint() ); tab->addTab(mTitleBarActions, i18n("&Titlebar Actions")); - connect(mTitleBarActions, TQT_SIGNAL(changed(bool)), this, TQT_SLOT(moduleChanged(bool))); + connect(mTitleBarActions, TQ_SIGNAL(changed(bool)), this, TQ_SLOT(moduleChanged(bool))); mWindowActions = new KWindowActionsConfig(false, mConfig, this, "TWin Window Actions"); mWindowActions->layout()->setMargin( KDialog::marginHint() ); tab->addTab(mWindowActions, i18n("Window Actio&ns")); - connect(mWindowActions, TQT_SIGNAL(changed(bool)), this, TQT_SLOT(moduleChanged(bool))); + connect(mWindowActions, TQ_SIGNAL(changed(bool)), this, TQ_SLOT(moduleChanged(bool))); mMoving = new KMovingConfig(false, mConfig, this, "TWin Moving"); mMoving->layout()->setMargin( KDialog::marginHint() ); tab->addTab(mMoving, i18n("&Moving")); - connect(mMoving, TQT_SIGNAL(changed(bool)), this, TQT_SLOT(moduleChanged(bool))); + connect(mMoving, TQ_SIGNAL(changed(bool)), this, TQ_SLOT(moduleChanged(bool))); mABorders = new KActiveBorderConfig(false, mConfig, this, "TWin Active Borders"); mABorders->layout()->setMargin(KDialog::marginHint()); tab->addTab(mABorders, i18n("Active &Borders")); - connect(mABorders, TQT_SIGNAL(changed(bool)), this, TQT_SLOT(moduleChanged(bool))); + connect(mABorders, TQ_SIGNAL(changed(bool)), this, TQ_SLOT(moduleChanged(bool))); mAdvanced = new KAdvancedConfig(false, mConfig, this, "TWin Advanced"); mAdvanced->layout()->setMargin( KDialog::marginHint() ); tab->addTab(mAdvanced, i18n("Ad&vanced")); - connect(mAdvanced, TQT_SIGNAL(changed(bool)), this, TQT_SLOT(moduleChanged(bool))); + connect(mAdvanced, TQ_SIGNAL(changed(bool)), this, TQ_SLOT(moduleChanged(bool))); mTranslucency = new KTranslucencyConfig(false, mConfig, this, "TWin Translucency"); mTranslucency->layout()->setMargin( KDialog::marginHint() ); tab->addTab(mTranslucency, i18n("&Translucency")); - connect(mTranslucency, TQT_SIGNAL(changed(bool)), this, TQT_SLOT(moduleChanged(bool))); + connect(mTranslucency, TQ_SIGNAL(changed(bool)), this, TQ_SLOT(moduleChanged(bool))); TDEAboutData *about = new TDEAboutData(I18N_NOOP("kcmtwinoptions"), I18N_NOOP("Window Behavior Configuration Module"), @@ -183,9 +183,9 @@ void KWinOptions::save() emit TDECModule::changed( false ); // Send signal to twin mConfig->sync(); - if ( !kapp->dcopClient()->isAttached() ) - kapp->dcopClient()->attach(); - kapp->dcopClient()->send("twin*", "", "reconfigure()", TQString("")); + if ( !tdeApp->dcopClient()->isAttached() ) + tdeApp->dcopClient()->attach(); + tdeApp->dcopClient()->send("twin*", "", "reconfigure()", TQString("")); } @@ -266,12 +266,12 @@ TDEActionsOptions::TDEActionsOptions(TQWidget *parent, const char *name) mTitleBarActions = new KTitleBarActionsConfig(false, mConfig, this, "TWin TitleBar Actions"); mTitleBarActions->layout()->setMargin( KDialog::marginHint() ); tab->addTab(mTitleBarActions, i18n("&Titlebar Actions")); - connect(mTitleBarActions, TQT_SIGNAL(changed(bool)), this, TQT_SLOT(moduleChanged(bool))); + connect(mTitleBarActions, TQ_SIGNAL(changed(bool)), this, TQ_SLOT(moduleChanged(bool))); mWindowActions = new KWindowActionsConfig(false, mConfig, this, "TWin Window Actions"); mWindowActions->layout()->setMargin( KDialog::marginHint() ); tab->addTab(mWindowActions, i18n("Window Actio&ns")); - connect(mWindowActions, TQT_SIGNAL(changed(bool)), this, TQT_SLOT(moduleChanged(bool))); + connect(mWindowActions, TQ_SIGNAL(changed(bool)), this, TQ_SLOT(moduleChanged(bool))); } TDEActionsOptions::~TDEActionsOptions() @@ -295,9 +295,9 @@ void TDEActionsOptions::save() emit TDECModule::changed( false ); // Send signal to twin mConfig->sync(); - if ( !kapp->dcopClient()->isAttached() ) - kapp->dcopClient()->attach(); - kapp->dcopClient()->send("twin*", "", "reconfigure()", TQString("")); + if ( !tdeApp->dcopClient()->isAttached() ) + tdeApp->dcopClient()->attach(); + tdeApp->dcopClient()->send("twin*", "", "reconfigure()", TQString("")); } diff --git a/twin/kcmtwin/twinoptions/mouse.cpp b/twin/kcmtwin/twinoptions/mouse.cpp index 3314604e7..8ed44e79e 100644 --- a/twin/kcmtwin/twinoptions/mouse.cpp +++ b/twin/kcmtwin/twinoptions/mouse.cpp @@ -164,7 +164,7 @@ KTitleBarActionsConfig::KTitleBarActionsConfig (bool _standAlone, TDEConfig *_co combo->insertItem(i18n("On All Desktops")); combo->insertItem(i18n("Nothing")); combo->setSizePolicy(TQSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::Fixed)); - connect(combo, TQT_SIGNAL(activated(int)), TQT_SLOT(changed())); + connect(combo, TQ_SIGNAL(activated(int)), TQ_SLOT(changed())); hlayout->addWidget(combo); coTiDbl = combo; TQWhatsThis::add(combo, i18n("Behavior on <em>double</em> click into the titlebar.")); @@ -189,14 +189,14 @@ KTitleBarActionsConfig::KTitleBarActionsConfig (bool _standAlone, TDEConfig *_co comboW->insertItem(i18n("Change Opacity")); comboW->insertItem(i18n("Nothing")); comboW->setSizePolicy(TQSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::Fixed)); - connect(comboW, TQT_SIGNAL(activated(int)), TQT_SLOT(changed())); + connect(comboW, TQ_SIGNAL(activated(int)), TQ_SLOT(changed())); hlayoutW->addWidget(comboW); coTiW = comboW; TQWhatsThis::add(comboW, txtButton4); label->setBuddy(comboW); cbTiRevW = new TQCheckBox(i18n("Reverse wheel direction"), this); - connect(cbTiRevW, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed())); + connect(cbTiRevW, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed())); TQWhatsThis::add( cbTiRevW, i18n("Use this to reverse the action of the mouse wheel.") ); hlayoutW->addWidget(cbTiRevW); @@ -266,21 +266,21 @@ KTitleBarActionsConfig::KTitleBarActionsConfig (bool _standAlone, TDEConfig *_co // Titlebar and frame, active, mouse button 1 combo = new TQComboBox(grid); combo->insertStringList(items); - connect(combo, TQT_SIGNAL(activated(int)), TQT_SLOT(changed())); + connect(combo, TQ_SIGNAL(activated(int)), TQ_SLOT(changed())); coTiAct1 = combo; TQWhatsThis::add(combo, txtButton1); // Titlebar and frame, active, mouse button 2 combo = new TQComboBox(grid); combo->insertStringList(items); - connect(combo, TQT_SIGNAL(activated(int)), TQT_SLOT(changed())); + connect(combo, TQ_SIGNAL(activated(int)), TQ_SLOT(changed())); coTiAct2 = combo; TQWhatsThis::add(combo, i18n("Behavior on <em>middle</em> click into the titlebar or frame of an <em>active</em> window.")); // Titlebar and frame, active, mouse button 3 combo = new TQComboBox(grid); combo->insertStringList(items); - connect(combo, TQT_SIGNAL(activated(int)), TQT_SLOT(changed())); + connect(combo, TQ_SIGNAL(activated(int)), TQ_SLOT(changed())); coTiAct3 = combo; TQWhatsThis::add(combo, txtButton3 ); @@ -310,19 +310,19 @@ KTitleBarActionsConfig::KTitleBarActionsConfig (bool _standAlone, TDEConfig *_co combo = new TQComboBox(grid); combo->insertStringList(items); - connect(combo, TQT_SIGNAL(activated(int)), TQT_SLOT(changed())); + connect(combo, TQ_SIGNAL(activated(int)), TQ_SLOT(changed())); coTiInAct1 = combo; TQWhatsThis::add(combo, txtButton1); combo = new TQComboBox(grid); combo->insertStringList(items); - connect(combo, TQT_SIGNAL(activated(int)), TQT_SLOT(changed())); + connect(combo, TQ_SIGNAL(activated(int)), TQ_SLOT(changed())); coTiInAct2 = combo; TQWhatsThis::add(combo, i18n("Behavior on <em>middle</em> click into the titlebar or frame of an <em>inactive</em> window.")); combo = new TQComboBox(grid); combo->insertStringList(items); - connect(combo, TQT_SIGNAL(activated(int)), TQT_SLOT(changed())); + connect(combo, TQ_SIGNAL(activated(int)), TQ_SLOT(changed())); coTiInAct3 = combo; TQWhatsThis::add(combo, txtButton3); @@ -362,13 +362,13 @@ KTitleBarActionsConfig::KTitleBarActionsConfig (bool _standAlone, TDEConfig *_co coMax[b] = new ToolTipComboBox(box, tbl_Max); for (int t = 0; t < 3; ++t) coMax[b]->insertItem(maxButtonPixmaps[t]); - connect(coMax[b], TQT_SIGNAL(activated(int)), TQT_SLOT(changed())); - connect(coMax[b], TQT_SIGNAL(activated(int)), coMax[b], TQT_SLOT(changed())); + connect(coMax[b], TQ_SIGNAL(activated(int)), TQ_SLOT(changed())); + connect(coMax[b], TQ_SIGNAL(activated(int)), coMax[b], TQ_SLOT(changed())); TQWhatsThis::add( coMax[b], txtButton[b] ); coMax[b]->setSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Minimum )); } - connect(kapp, TQT_SIGNAL(tdedisplayPaletteChanged()), TQT_SLOT(paletteChanged())); + connect(tdeApp, TQ_SIGNAL(tdedisplayPaletteChanged()), TQ_SLOT(paletteChanged())); layout->addStretch(); @@ -567,9 +567,9 @@ void KTitleBarActionsConfig::save() if (standAlone) { config->sync(); - if ( !kapp->dcopClient()->isAttached() ) - kapp->dcopClient()->attach(); - kapp->dcopClient()->send("twin*", "", "reconfigure()", TQString("")); + if ( !tdeApp->dcopClient()->isAttached() ) + tdeApp->dcopClient()->attach(); + tdeApp->dcopClient()->send("twin*", "", "reconfigure()", TQString("")); } } @@ -655,19 +655,19 @@ KWindowActionsConfig::KWindowActionsConfig (bool _standAlone, TDEConfig *_config TQComboBox* combo = new TQComboBox(grid); combo->insertStringList(items); - connect(combo, TQT_SIGNAL(activated(int)), TQT_SLOT(changed())); + connect(combo, TQ_SIGNAL(activated(int)), TQ_SLOT(changed())); coWin1 = combo; TQWhatsThis::add( combo, strWin1 ); combo = new TQComboBox(grid); combo->insertStringList(items); - connect(combo, TQT_SIGNAL(activated(int)), TQT_SLOT(changed())); + connect(combo, TQ_SIGNAL(activated(int)), TQ_SLOT(changed())); coWin2 = combo; TQWhatsThis::add( combo, strWin2 ); combo = new TQComboBox(grid); combo->insertStringList(items); - connect(combo, TQT_SIGNAL(activated(int)), TQT_SLOT(changed())); + connect(combo, TQ_SIGNAL(activated(int)), TQ_SLOT(changed())); coWin3 = combo; TQWhatsThis::add( combo, strWin3 ); @@ -727,7 +727,7 @@ KWindowActionsConfig::KWindowActionsConfig (bool _standAlone, TDEConfig *_config combo = new TQComboBox(grid); combo->insertItem(i18n("Meta")); combo->insertItem(i18n("Alt")); - connect(combo, TQT_SIGNAL(activated(int)), TQT_SLOT(changed())); + connect(combo, TQ_SIGNAL(activated(int)), TQ_SLOT(changed())); coAllKey = combo; TQWhatsThis::add( combo, strAllKey ); @@ -743,19 +743,19 @@ KWindowActionsConfig::KWindowActionsConfig (bool _standAlone, TDEConfig *_config combo = new TQComboBox(grid); combo->insertStringList(items); - connect(combo, TQT_SIGNAL(activated(int)), TQT_SLOT(changed())); + connect(combo, TQ_SIGNAL(activated(int)), TQ_SLOT(changed())); coAll1 = combo; TQWhatsThis::add( combo, strAll1 ); combo = new TQComboBox(grid); combo->insertStringList(items); - connect(combo, TQT_SIGNAL(activated(int)), TQT_SLOT(changed())); + connect(combo, TQ_SIGNAL(activated(int)), TQ_SLOT(changed())); coAll2 = combo; TQWhatsThis::add( combo, strAll2 ); combo = new TQComboBox(grid); combo->insertStringList(items); - connect(combo, TQT_SIGNAL(activated(int)), TQT_SLOT(changed())); + connect(combo, TQ_SIGNAL(activated(int)), TQ_SLOT(changed())); coAll3 = combo; TQWhatsThis::add( combo, strAll3 ); @@ -767,12 +767,12 @@ KWindowActionsConfig::KWindowActionsConfig (bool _standAlone, TDEConfig *_config combo->insertItem(i18n("Move to Previous/Next Desktop")); combo->insertItem(i18n("Change Opacity")); combo->insertItem(i18n("Nothing")); - connect(combo, TQT_SIGNAL(activated(int)), TQT_SLOT(changed())); + connect(combo, TQ_SIGNAL(activated(int)), TQ_SLOT(changed())); coAllW = combo; TQWhatsThis::add( combo, strAllW ); cbAllRevW = new TQCheckBox(i18n("Reverse wheel direction"), grid); - connect(cbAllRevW, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed())); + connect(cbAllRevW, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed())); TQWhatsThis::add( cbAllRevW, i18n("Use this to reverse the action of the mouse wheel.") ); layout->addStretch(); @@ -850,9 +850,9 @@ void KWindowActionsConfig::save() if (standAlone) { config->sync(); - if ( !kapp->dcopClient()->isAttached() ) - kapp->dcopClient()->attach(); - kapp->dcopClient()->send("twin*", "", "reconfigure()", TQString("")); + if ( !tdeApp->dcopClient()->isAttached() ) + tdeApp->dcopClient()->attach(); + tdeApp->dcopClient()->send("twin*", "", "reconfigure()", TQString("")); } } diff --git a/twin/kcmtwin/twinoptions/windows.cpp b/twin/kcmtwin/twinoptions/windows.cpp index 30d565716..53c55f90c 100644 --- a/twin/kcmtwin/twinoptions/windows.cpp +++ b/twin/kcmtwin/twinoptions/windows.cpp @@ -45,7 +45,7 @@ #include <kdialog.h> #include <dcopclient.h> #include <tdeglobal.h> -#include <kprocess.h> +#include <tdeprocess.h> #include <tqtabwidget.h> #include <X11/X.h> @@ -169,12 +169,12 @@ KFocusConfig::KFocusConfig (bool _standAlone, TDEConfig *_config, TQWidget * par TQWhatsThis::add( focusCombo, wtstr); TQWhatsThis::add(fLabel, wtstr); - connect(focusCombo, TQT_SIGNAL(activated(int)), this, TQT_SLOT(setAutoRaiseEnabled()) ); + connect(focusCombo, TQ_SIGNAL(activated(int)), this, TQ_SLOT(setAutoRaiseEnabled()) ); // autoraise delay autoRaiseOn = new TQCheckBox(i18n("Auto &raise"), fcsBox); fLay->addWidget(autoRaiseOn); - connect(autoRaiseOn,TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(autoRaiseOnTog(bool))); + connect(autoRaiseOn,TQ_SIGNAL(toggled(bool)), this, TQ_SLOT(autoRaiseOnTog(bool))); autoRaise = new KIntNumInput(500, fcsBox); autoRaise->setLabel(i18n("Dela&y:"), TQt::AlignVCenter|TQt::AlignLeft); @@ -183,11 +183,11 @@ KFocusConfig::KFocusConfig (bool _standAlone, TDEConfig *_config, TQWidget * par autoRaise->setSuffix(i18n(" msec")); fLay->addWidget(autoRaise); - connect(focusCombo, TQT_SIGNAL(activated(int)), this, TQT_SLOT(setDelayFocusEnabled()) ); + connect(focusCombo, TQ_SIGNAL(activated(int)), this, TQ_SLOT(setDelayFocusEnabled()) ); delayFocusOn = new TQCheckBox(i18n("Delay focus"), fcsBox); fLay->addWidget(delayFocusOn); - connect(delayFocusOn,TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(delayFocusOnTog(bool))); + connect(delayFocusOn,TQ_SIGNAL(toggled(bool)), this, TQ_SLOT(delayFocusOnTog(bool))); delayFocus = new KIntNumInput(500, fcsBox); delayFocus->setLabel(i18n("Dela&y:"), TQt::AlignVCenter|TQt::AlignLeft); @@ -197,7 +197,7 @@ KFocusConfig::KFocusConfig (bool _standAlone, TDEConfig *_config, TQWidget * par fLay->addWidget(delayFocus); clickRaiseOn = new TQCheckBox(i18n("Click &raises active window"), fcsBox); - connect(clickRaiseOn,TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(clickRaiseOnTog(bool))); + connect(clickRaiseOn,TQ_SIGNAL(toggled(bool)), this, TQ_SLOT(clickRaiseOnTog(bool))); fLay->addWidget(clickRaiseOn); // fLay->addColSpacing(0,TQMAX(autoRaiseOn->sizeHint().width(), @@ -263,7 +263,7 @@ KFocusConfig::KFocusConfig (bool _standAlone, TDEConfig *_config, TQWidget * par " with the focused window. This option is by default disabled for Click to focus and" " enabled for other focus policies." ); TQWhatsThis::add( activeMouseScreen, wtstr ); - connect(focusCombo, TQT_SIGNAL(activated(int)), this, TQT_SLOT(updateActiveMouseScreen())); + connect(focusCombo, TQ_SIGNAL(activated(int)), this, TQ_SLOT(updateActiveMouseScreen())); if (!TQApplication::desktop()->isVirtualDesktop() || TQApplication::desktop()->numScreens() == 1) // No Ximerama @@ -291,7 +291,7 @@ KFocusConfig::KFocusConfig (bool _standAlone, TDEConfig *_config, TQWidget * par " is pressed, with no popup widget. In addition, the previously" " activated window will be sent to the back in this mode."); TQWhatsThis::add( altTabPopup, wtstr ); - connect(focusCombo, TQT_SIGNAL(activated(int)), this, TQT_SLOT(updateAltTabMode())); + connect(focusCombo, TQ_SIGNAL(activated(int)), this, TQ_SLOT(updateAltTabMode())); traverseAll = new TQCheckBox( i18n( "&Traverse windows on all desktops" ), kbdBox ); kLay->addWidget( traverseAll ); @@ -319,17 +319,17 @@ KFocusConfig::KFocusConfig (bool _standAlone, TDEConfig *_config, TQWidget * par lay->addStretch(); // Any changes goes to slotChanged() - connect(focusCombo, TQT_SIGNAL(activated(int)), TQT_SLOT(changed())); - connect(fcsBox, TQT_SIGNAL(clicked(int)), TQT_SLOT(changed())); - connect(autoRaise, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed())); - connect(delayFocus, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed())); - connect(separateScreenFocus, TQT_SIGNAL(clicked()), TQT_SLOT(changed())); - connect(activeMouseScreen, TQT_SIGNAL(clicked()), TQT_SLOT(changed())); - connect(altTabPopup, TQT_SIGNAL(clicked()), TQT_SLOT(changed())); - connect(traverseAll, TQT_SIGNAL(clicked()), TQT_SLOT(changed())); - connect(rollOverDesktops, TQT_SIGNAL(clicked()), TQT_SLOT(changed())); - connect(showPopupinfo, TQT_SIGNAL(clicked()), TQT_SLOT(changed())); - connect(focusStealing, TQT_SIGNAL(activated(int)), TQT_SLOT(changed())); + connect(focusCombo, TQ_SIGNAL(activated(int)), TQ_SLOT(changed())); + connect(fcsBox, TQ_SIGNAL(clicked(int)), TQ_SLOT(changed())); + connect(autoRaise, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(changed())); + connect(delayFocus, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(changed())); + connect(separateScreenFocus, TQ_SIGNAL(clicked()), TQ_SLOT(changed())); + connect(activeMouseScreen, TQ_SIGNAL(clicked()), TQ_SLOT(changed())); + connect(altTabPopup, TQ_SIGNAL(clicked()), TQ_SLOT(changed())); + connect(traverseAll, TQ_SIGNAL(clicked()), TQ_SLOT(changed())); + connect(rollOverDesktops, TQ_SIGNAL(clicked()), TQ_SLOT(changed())); + connect(showPopupinfo, TQ_SIGNAL(clicked()), TQ_SLOT(changed())); + connect(focusStealing, TQ_SIGNAL(activated(int)), TQ_SLOT(changed())); load(); } @@ -585,9 +585,9 @@ void KFocusConfig::save( void ) if (standAlone) { config->sync(); - if ( !kapp->dcopClient()->isAttached() ) - kapp->dcopClient()->attach(); - kapp->dcopClient()->send("twin*", "", "reconfigure()", TQString("")); + if ( !tdeApp->dcopClient()->isAttached() ) + tdeApp->dcopClient()->attach(); + tdeApp->dcopClient()->send("twin*", "", "reconfigure()", TQString("")); } emit TDECModule::changed(false); } @@ -656,7 +656,7 @@ KActiveBorderConfig::KActiveBorderConfig(bool _standAlone, TDEConfig *_config, T " satisfying on slow machines.")); delays = new KIntNumInput(10, active_box); - delays->setRange(0, MAX_EDGE_RES, 50, true); + delays->setRange(0, MAX_EDGE_RES, 10, true); delays->setSuffix(i18n(" msec")); delays->setLabel(i18n("Border &activation delay:")); TQWhatsThis::add( delays, i18n("Here you can set a delay for the activation of" @@ -664,7 +664,7 @@ KActiveBorderConfig::KActiveBorderConfig(bool _standAlone, TDEConfig *_config, T " has been pushed against a screen border for the specified number of milliseconds.") ); distance = new KIntNumInput(10, active_box); - distance->setRange(1, 100, 1, true); + distance->setRange(1, 300, 1, true); distance->setSuffix(i18n(" px")); distance->setLabel(i18n("Border &activation distance:")); TQWhatsThis::add( distance, i18n("The distance from which an active border can" @@ -686,15 +686,15 @@ KActiveBorderConfig::KActiveBorderConfig(bool _standAlone, TDEConfig *_config, T active_vbox->addSpacing(15); active_vbox->addWidget(tilingOpaque); - connect(active_box, TQT_SIGNAL(clicked(int)), this, TQT_SLOT(updateActiveBorders())); + connect(active_box, TQ_SIGNAL(clicked(int)), this, TQ_SLOT(updateActiveBorders())); // Any changes go to slotChanged() - connect(active_box, TQT_SIGNAL(clicked(int)), this, TQT_SLOT(changed())); - connect(active_move, TQT_SIGNAL(clicked()), this, TQT_SLOT(changed())); - connect(active_maximize, TQT_SIGNAL(clicked()), this, TQT_SLOT(changed())); - connect(delays, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(changed())); - connect(distance, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(changed())); - connect(tilingOpaque, TQT_SIGNAL(clicked()), this, TQT_SLOT(changed())); + connect(active_box, TQ_SIGNAL(clicked(int)), this, TQ_SLOT(changed())); + connect(active_move, TQ_SIGNAL(clicked()), this, TQ_SLOT(changed())); + connect(active_maximize, TQ_SIGNAL(clicked()), this, TQ_SLOT(changed())); + connect(delays, TQ_SIGNAL(valueChanged(int)), this, TQ_SLOT(changed())); + connect(distance, TQ_SIGNAL(valueChanged(int)), this, TQ_SLOT(changed())); + connect(tilingOpaque, TQ_SIGNAL(clicked()), this, TQ_SLOT(changed())); lay->addWidget(active_box); lay->addStretch(); @@ -748,9 +748,9 @@ void KActiveBorderConfig::save() { if (standAlone) { config->sync(); - if (!kapp->dcopClient()->isAttached()) - kapp->dcopClient()->attach(); - kapp->dcopClient()->send("twin*", "", "reconfigure()", TQString("")); + if (!tdeApp->dcopClient()->isAttached()) + tdeApp->dcopClient()->attach(); + tdeApp->dcopClient()->send("twin*", "", "reconfigure()", TQString("")); } emit TDECModule::changed(false); } @@ -860,7 +860,7 @@ KAdvancedConfig::KAdvancedConfig (bool _standAlone, TDEConfig *_config, TQWidget shadeHoverOn = new TQCheckBox(i18n("&Enable hover"), shBox); - connect(shadeHoverOn, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(shadeHoverChanged(bool))); + connect(shadeHoverOn, TQ_SIGNAL(toggled(bool)), this, TQ_SLOT(shadeHoverChanged(bool))); shadeHover = new KIntNumInput(500, shBox); shadeHover->setLabel(i18n("Dela&y:"), TQt::AlignVCenter|TQt::AlignLeft); @@ -878,16 +878,16 @@ KAdvancedConfig::KAdvancedConfig (bool _standAlone, TDEConfig *_config, TQWidget lay->addWidget(shBox); // Any changes goes to slotChanged() - connect(animateShade, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed())); - connect(shadeHoverOn, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed())); - connect(shadeHover, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed())); + connect(animateShade, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed())); + connect(shadeHoverOn, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed())); + connect(shadeHover, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(changed())); hideUtilityWindowsForInactive = new TQCheckBox( i18n( "Hide utility windows for inactive applications" ), this ); TQWhatsThis::add( hideUtilityWindowsForInactive, i18n( "When turned on, utility windows (tool windows, torn-off menus,…) of inactive applications will be" " hidden and will be shown only when the application becomes active. Note that applications" " have to mark the windows with the proper window type for this feature to work." )); - connect(hideUtilityWindowsForInactive, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed())); + connect(hideUtilityWindowsForInactive, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed())); lay->addWidget( hideUtilityWindowsForInactive ); lay->addStretch(); @@ -954,9 +954,9 @@ void KAdvancedConfig::save( void ) if (standAlone) { config->sync(); - if ( !kapp->dcopClient()->isAttached() ) - kapp->dcopClient()->attach(); - kapp->dcopClient()->send("twin*", "", "reconfigure()", TQString("")); + if ( !tdeApp->dcopClient()->isAttached() ) + tdeApp->dcopClient()->attach(); + tdeApp->dcopClient()->send("twin*", "", "reconfigure()", TQString("")); } emit TDECModule::changed(false); } @@ -1027,8 +1027,8 @@ KMovingConfig::KMovingConfig (bool _standAlone, TDEConfig *_config, TQWidget *pa minimizeAnimSlider->setTickmarks(TQSlider::Below); rLay->addMultiCellWidget(minimizeAnimSlider,0,0,1,2); - connect(minimizeAnimOn, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(setMinimizeAnim(bool))); - connect(minimizeAnimSlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(setMinimizeAnimSpeed(int))); + connect(minimizeAnimOn, TQ_SIGNAL(toggled(bool)), this, TQ_SLOT(setMinimizeAnim(bool))); + connect(minimizeAnimSlider, TQ_SIGNAL(valueChanged(int)), this, TQ_SLOT(setMinimizeAnimSpeed(int))); minimizeAnimSlowLabel= new TQLabel(i18n("Slow"),windowsBox); minimizeAnimSlowLabel->setAlignment(TQt::AlignTop|TQt::AlignLeft); @@ -1143,19 +1143,19 @@ KMovingConfig::KMovingConfig (bool _standAlone, TDEConfig *_config, TQWidget *pa load(); // Any changes goes to slotChanged() - connect( moveOpaque, TQT_SIGNAL(clicked()), TQT_SLOT(changed())); - connect( resizeOpaque, TQT_SIGNAL(clicked()), TQT_SLOT(changed())); - connect( geometryTipOn, TQT_SIGNAL(clicked()), TQT_SLOT(changed())); - connect( minimizeAnimOn, TQT_SIGNAL(clicked() ), TQT_SLOT(changed())); - connect( minimizeAnimSlider, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed())); - connect( moveResizeMaximized, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed())); - connect( resetMaximizedWindowGeometry, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed())); - connect( placementCombo, TQT_SIGNAL(activated(int)), TQT_SLOT(changed())); - connect( BrdrSnap, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed())); - connect( BrdrSnap, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotBrdrSnapChanged(int))); - connect( WndwSnap, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed())); - connect( WndwSnap, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotWndwSnapChanged(int))); - connect( OverlapSnap, TQT_SIGNAL(clicked()), TQT_SLOT(changed())); + connect( moveOpaque, TQ_SIGNAL(clicked()), TQ_SLOT(changed())); + connect( resizeOpaque, TQ_SIGNAL(clicked()), TQ_SLOT(changed())); + connect( geometryTipOn, TQ_SIGNAL(clicked()), TQ_SLOT(changed())); + connect( minimizeAnimOn, TQ_SIGNAL(clicked() ), TQ_SLOT(changed())); + connect( minimizeAnimSlider, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(changed())); + connect( moveResizeMaximized, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed())); + connect( resetMaximizedWindowGeometry, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed())); + connect( placementCombo, TQ_SIGNAL(activated(int)), TQ_SLOT(changed())); + connect( BrdrSnap, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(changed())); + connect( BrdrSnap, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(slotBrdrSnapChanged(int))); + connect( WndwSnap, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(changed())); + connect( WndwSnap, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(slotWndwSnapChanged(int))); + connect( OverlapSnap, TQ_SIGNAL(clicked()), TQ_SLOT(changed())); // To get suffix to BrdrSnap and WndwSnap inputs with default values. slotBrdrSnapChanged(BrdrSnap->value()); @@ -1382,9 +1382,9 @@ void KMovingConfig::save( void ) if (standAlone) { config->sync(); - if ( !kapp->dcopClient()->isAttached() ) - kapp->dcopClient()->attach(); - kapp->dcopClient()->send("twin*", "", "reconfigure()", TQString("")); + if ( !tdeApp->dcopClient()->isAttached() ) + tdeApp->dcopClient()->attach(); + tdeApp->dcopClient()->send("twin*", "", "reconfigure()", TQString("")); } emit TDECModule::changed(false); } @@ -1436,7 +1436,7 @@ KTranslucencyConfig::KTranslucencyConfig (bool _standAlone, TDEConfig *_config, : TDECModule(parent, "kcmkwm"), config(_config), standAlone(_standAlone) { kompmgr = 0L; - resetKompmgr_ = FALSE; + resetKompmgr_ = false; TQVBoxLayout *lay = new TQVBoxLayout (this); kompmgrAvailable_ = kompmgrAvailable(); if (!kompmgrAvailable_){ @@ -1523,7 +1523,7 @@ KTranslucencyConfig::KTranslucencyConfig (bool _standAlone, TDEConfig *_config, tabW->addTab(tGroup, i18n("Opacity")); TQWidget *sGroup = new TQWidget(tabW); -// sGroup->setCheckable(TRUE); +// sGroup->setCheckable(true); TQVBoxLayout *vLay2 = new TQVBoxLayout (sGroup,11,6); vLay2->addSpacing(11); // to get the proper gb top offset useShadows = new TQCheckBox(i18n("Use shadows on windows (standard effects should be disabled in the Styles module if this is checked)"),sGroup); @@ -1640,84 +1640,84 @@ KTranslucencyConfig::KTranslucencyConfig (bool _standAlone, TDEConfig *_config, lay->addWidget(useTranslucency); lay->addWidget(tabW); - connect(useTranslucency, TQT_SIGNAL(toggled(bool)), tabW, TQT_SLOT(setEnabled(bool))); - - connect(activeWindowTransparency, TQT_SIGNAL(toggled(bool)), activeWindowOpacity, TQT_SLOT(setEnabled(bool))); - connect(inactiveWindowTransparency, TQT_SIGNAL(toggled(bool)), inactiveWindowOpacity, TQT_SLOT(setEnabled(bool))); - connect(movingWindowTransparency, TQT_SIGNAL(toggled(bool)), movingWindowOpacity, TQT_SLOT(setEnabled(bool))); - connect(dockWindowTransparency, TQT_SIGNAL(toggled(bool)), dockWindowOpacity, TQT_SLOT(setEnabled(bool))); - - connect(useTranslucency, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed())); - connect(onlyDecoTranslucent, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed())); - connect(activeWindowTransparency, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed())); - connect(inactiveWindowTransparency, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed())); - connect(movingWindowTransparency, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed())); - connect(dockWindowTransparency, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed())); - connect(keepAboveAsActive, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed())); - connect(disableARGB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed())); - connect(useOpenGL, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed())); - connect(useOpenGL, TQT_SIGNAL(toggled(bool)), blurBackground, TQT_SLOT(setEnabled(bool))); - connect(blurBackground, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed())); - connect(useOpenGL, TQT_SIGNAL(toggled(bool)), greyscaleBackground, TQT_SLOT(setEnabled(bool))); - connect(greyscaleBackground, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed())); - connect(useShadows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed())); - connect(useShadowsOnMenuWindows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed())); - connect(useShadowsOnToolTipWindows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed())); - connect(useShadowsOnDockWindows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed())); - connect(removeShadowsOnResize, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed())); - connect(removeShadowsOnMove, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed())); - - connect(activeWindowOpacity, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed())); - connect(inactiveWindowOpacity, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed())); - connect(movingWindowOpacity, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed())); - connect(dockWindowOpacity, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed())); - connect(dockWindowShadowSize, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed())); - connect(menuWindowShadowSize, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed())); - connect(activeWindowShadowSize, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed())); - connect(inactiveWindowShadowSize, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed())); - connect(baseShadowSize, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed())); - connect(shadowTopOffset, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed())); - connect(shadowLeftOffset, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed())); - connect(shadowColor, TQT_SIGNAL(changed(const TQColor&)), TQT_SLOT(changed())); - connect(fadeInWindows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed())); - connect(fadeInMenuWindows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed())); - connect(fadeInToolTipWindows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed())); - connect(fadeOnOpacityChange, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed())); - connect(fadeInSpeed, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed())); - connect(fadeOutSpeed, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed())); - - connect(useShadows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(processShadowLockouts())); - connect(useShadowsOnMenuWindows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(processShadowLockouts())); - connect(useShadowsOnToolTipWindows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(processShadowLockouts())); - connect(useShadowsOnDockWindows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(processShadowLockouts())); + connect(useTranslucency, TQ_SIGNAL(toggled(bool)), tabW, TQ_SLOT(setEnabled(bool))); + + connect(activeWindowTransparency, TQ_SIGNAL(toggled(bool)), activeWindowOpacity, TQ_SLOT(setEnabled(bool))); + connect(inactiveWindowTransparency, TQ_SIGNAL(toggled(bool)), inactiveWindowOpacity, TQ_SLOT(setEnabled(bool))); + connect(movingWindowTransparency, TQ_SIGNAL(toggled(bool)), movingWindowOpacity, TQ_SLOT(setEnabled(bool))); + connect(dockWindowTransparency, TQ_SIGNAL(toggled(bool)), dockWindowOpacity, TQ_SLOT(setEnabled(bool))); + + connect(useTranslucency, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed())); + connect(onlyDecoTranslucent, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed())); + connect(activeWindowTransparency, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed())); + connect(inactiveWindowTransparency, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed())); + connect(movingWindowTransparency, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed())); + connect(dockWindowTransparency, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed())); + connect(keepAboveAsActive, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed())); + connect(disableARGB, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed())); + connect(useOpenGL, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed())); + connect(useOpenGL, TQ_SIGNAL(toggled(bool)), blurBackground, TQ_SLOT(setEnabled(bool))); + connect(blurBackground, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed())); + connect(useOpenGL, TQ_SIGNAL(toggled(bool)), greyscaleBackground, TQ_SLOT(setEnabled(bool))); + connect(greyscaleBackground, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed())); + connect(useShadows, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed())); + connect(useShadowsOnMenuWindows, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed())); + connect(useShadowsOnToolTipWindows, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed())); + connect(useShadowsOnDockWindows, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed())); + connect(removeShadowsOnResize, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed())); + connect(removeShadowsOnMove, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed())); + + connect(activeWindowOpacity, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(changed())); + connect(inactiveWindowOpacity, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(changed())); + connect(movingWindowOpacity, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(changed())); + connect(dockWindowOpacity, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(changed())); + connect(dockWindowShadowSize, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(changed())); + connect(menuWindowShadowSize, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(changed())); + connect(activeWindowShadowSize, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(changed())); + connect(inactiveWindowShadowSize, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(changed())); + connect(baseShadowSize, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(changed())); + connect(shadowTopOffset, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(changed())); + connect(shadowLeftOffset, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(changed())); + connect(shadowColor, TQ_SIGNAL(changed(const TQColor&)), TQ_SLOT(changed())); + connect(fadeInWindows, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed())); + connect(fadeInMenuWindows, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed())); + connect(fadeInToolTipWindows, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed())); + connect(fadeOnOpacityChange, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed())); + connect(fadeInSpeed, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(changed())); + connect(fadeOutSpeed, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(changed())); + + connect(useShadows, TQ_SIGNAL(toggled(bool)), TQ_SLOT(processShadowLockouts())); + connect(useShadowsOnMenuWindows, TQ_SIGNAL(toggled(bool)), TQ_SLOT(processShadowLockouts())); + connect(useShadowsOnToolTipWindows, TQ_SIGNAL(toggled(bool)), TQ_SLOT(processShadowLockouts())); + connect(useShadowsOnDockWindows, TQ_SIGNAL(toggled(bool)), TQ_SLOT(processShadowLockouts())); load(); tabW->setEnabled(useTranslucency->isChecked()); - connect(useTranslucency, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(showWarning(bool))); + connect(useTranslucency, TQ_SIGNAL(toggled(bool)), this, TQ_SLOT(showWarning(bool))); // handle kompmgr restarts if necessary - connect(useTranslucency, TQT_SIGNAL(toggled(bool)), TQT_SLOT(resetKompmgr())); - connect(disableARGB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(resetKompmgr())); - connect(useOpenGL, TQT_SIGNAL(toggled(bool)), TQT_SLOT(resetKompmgr())); - connect(blurBackground, TQT_SIGNAL(toggled(bool)), TQT_SLOT(resetKompmgr())); - connect(greyscaleBackground, TQT_SIGNAL(toggled(bool)), TQT_SLOT(resetKompmgr())); - connect(useShadows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(resetKompmgr())); - connect(useShadowsOnMenuWindows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(resetKompmgr())); - connect(useShadowsOnToolTipWindows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(resetKompmgr())); - connect(useShadowsOnDockWindows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(resetKompmgr())); - connect(inactiveWindowShadowSize, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(resetKompmgr())); - connect(baseShadowSize, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(resetKompmgr())); - connect(shadowTopOffset, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(resetKompmgr())); - connect(shadowLeftOffset, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(resetKompmgr())); - connect(shadowColor, TQT_SIGNAL(changed(const TQColor&)), TQT_SLOT(resetKompmgr())); - connect(fadeInWindows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(resetKompmgr())); - connect(fadeInMenuWindows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(resetKompmgr())); - connect(fadeInToolTipWindows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(resetKompmgr())); - connect(fadeOnOpacityChange, TQT_SIGNAL(toggled(bool)), TQT_SLOT(resetKompmgr())); - connect(fadeInSpeed, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(resetKompmgr())); - connect(fadeOutSpeed, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(resetKompmgr())); + connect(useTranslucency, TQ_SIGNAL(toggled(bool)), TQ_SLOT(resetKompmgr())); + connect(disableARGB, TQ_SIGNAL(toggled(bool)), TQ_SLOT(resetKompmgr())); + connect(useOpenGL, TQ_SIGNAL(toggled(bool)), TQ_SLOT(resetKompmgr())); + connect(blurBackground, TQ_SIGNAL(toggled(bool)), TQ_SLOT(resetKompmgr())); + connect(greyscaleBackground, TQ_SIGNAL(toggled(bool)), TQ_SLOT(resetKompmgr())); + connect(useShadows, TQ_SIGNAL(toggled(bool)), TQ_SLOT(resetKompmgr())); + connect(useShadowsOnMenuWindows, TQ_SIGNAL(toggled(bool)), TQ_SLOT(resetKompmgr())); + connect(useShadowsOnToolTipWindows, TQ_SIGNAL(toggled(bool)), TQ_SLOT(resetKompmgr())); + connect(useShadowsOnDockWindows, TQ_SIGNAL(toggled(bool)), TQ_SLOT(resetKompmgr())); + connect(inactiveWindowShadowSize, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(resetKompmgr())); + connect(baseShadowSize, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(resetKompmgr())); + connect(shadowTopOffset, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(resetKompmgr())); + connect(shadowLeftOffset, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(resetKompmgr())); + connect(shadowColor, TQ_SIGNAL(changed(const TQColor&)), TQ_SLOT(resetKompmgr())); + connect(fadeInWindows, TQ_SIGNAL(toggled(bool)), TQ_SLOT(resetKompmgr())); + connect(fadeInMenuWindows, TQ_SIGNAL(toggled(bool)), TQ_SLOT(resetKompmgr())); + connect(fadeInToolTipWindows, TQ_SIGNAL(toggled(bool)), TQ_SLOT(resetKompmgr())); + connect(fadeOnOpacityChange, TQ_SIGNAL(toggled(bool)), TQ_SLOT(resetKompmgr())); + connect(fadeInSpeed, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(resetKompmgr())); + connect(fadeOutSpeed, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(resetKompmgr())); } } @@ -1738,7 +1738,7 @@ void KTranslucencyConfig::processShadowLockouts() void KTranslucencyConfig::resetKompmgr() { - resetKompmgr_ = TRUE; + resetKompmgr_ = true; } void KTranslucencyConfig::load( void ) @@ -1778,17 +1778,17 @@ void KTranslucencyConfig::load( void ) TDEConfig conf_(TQDir::homeDirPath() + "/.xcompmgrrc"); conf_.setGroup("xcompmgr"); - disableARGB->setChecked(conf_.readBoolEntry("DisableARGB",FALSE)); - useOpenGL->setChecked(conf_.readBoolEntry("useOpenGL",FALSE)); - blurBackground->setChecked(conf_.readBoolEntry("blurBackground",FALSE)); + disableARGB->setChecked(conf_.readBoolEntry("DisableARGB",false)); + useOpenGL->setChecked(conf_.readBoolEntry("useOpenGL",false)); + blurBackground->setChecked(conf_.readBoolEntry("blurBackground",false)); blurBackground->setEnabled(useOpenGL->isChecked()); - greyscaleBackground->setChecked(conf_.readBoolEntry("greyscaleBackground",FALSE)); + greyscaleBackground->setChecked(conf_.readBoolEntry("greyscaleBackground",false)); greyscaleBackground->setEnabled(useOpenGL->isChecked()); useShadows->setChecked(conf_.readEntry("Compmode","").compare("CompClientShadows") == 0); - useShadowsOnMenuWindows->setChecked(conf_.readBoolEntry("ShadowsOnMenuWindows",TRUE)); - useShadowsOnToolTipWindows->setChecked(conf_.readBoolEntry("ShadowsOnToolTipWindows",TRUE)); - useShadowsOnDockWindows->setChecked(conf_.readBoolEntry("ShadowsOnDockWindows",FALSE)); + useShadowsOnMenuWindows->setChecked(conf_.readBoolEntry("ShadowsOnMenuWindows",true)); + useShadowsOnToolTipWindows->setChecked(conf_.readBoolEntry("ShadowsOnToolTipWindows",true)); + useShadowsOnDockWindows->setChecked(conf_.readBoolEntry("ShadowsOnDockWindows",false)); shadowTopOffset->setValue(-1*(conf_.readNumEntry("ShadowOffsetY",0))); shadowLeftOffset->setValue(-1*(conf_.readNumEntry("ShadowOffsetX",0))); @@ -1808,10 +1808,10 @@ void KTranslucencyConfig::load( void ) else shadowColor->setColor(TQColor(r,g,b)); - fadeInWindows->setChecked(conf_.readBoolEntry("FadeWindows",FALSE)); - fadeInMenuWindows->setChecked(conf_.readBoolEntry("FadeMenuWindows",TRUE)); - fadeInToolTipWindows->setChecked(conf_.readBoolEntry("FadeToolTipWindows",TRUE)); - fadeOnOpacityChange->setChecked(conf_.readBoolEntry("FadeTrans",FALSE)); + fadeInWindows->setChecked(conf_.readBoolEntry("FadeWindows",false)); + fadeInMenuWindows->setChecked(conf_.readBoolEntry("FadeMenuWindows",true)); + fadeInToolTipWindows->setChecked(conf_.readBoolEntry("FadeToolTipWindows",true)); + fadeOnOpacityChange->setChecked(conf_.readBoolEntry("FadeTrans",false)); fadeInSpeed->setValue((int)(conf_.readDoubleNumEntry("FadeInStep",0.070)*1000.0)); fadeOutSpeed->setValue((int)(conf_.readDoubleNumEntry("FadeOutStep",0.070)*1000.0)); @@ -1965,9 +1965,9 @@ void KTranslucencyConfig::save( void ) if (standAlone) { config->sync(); - if ( !kapp->dcopClient()->isAttached() ) - kapp->dcopClient()->attach(); - kapp->dcopClient()->send("twin*", "", "reconfigure()", TQString("")); + if ( !tdeApp->dcopClient()->isAttached() ) + tdeApp->dcopClient()->attach(); + tdeApp->dcopClient()->send("twin*", "", "reconfigure()", TQString("")); } if (useTranslucency->isChecked()) startKompmgr(); @@ -2006,17 +2006,17 @@ void KTranslucencyConfig::defaults() inactiveWindowOpacity->setEnabled(false); movingWindowOpacity->setEnabled(false); dockWindowOpacity->setEnabled(false); - useShadows->setChecked(FALSE); - useShadowsOnMenuWindows->setChecked(TRUE); - useShadowsOnToolTipWindows->setChecked(TRUE); - useShadowsOnDockWindows->setChecked(FALSE); - removeShadowsOnMove->setChecked(FALSE); - removeShadowsOnResize->setChecked(FALSE); + useShadows->setChecked(false); + useShadowsOnMenuWindows->setChecked(true); + useShadowsOnToolTipWindows->setChecked(true); + useShadowsOnDockWindows->setChecked(false); + removeShadowsOnMove->setChecked(false); + removeShadowsOnResize->setChecked(false); shadowColor->setColor(TQt::black); - fadeInWindows->setChecked(FALSE); - fadeInMenuWindows->setChecked(TRUE); - fadeInToolTipWindows->setChecked(TRUE); - fadeOnOpacityChange->setChecked(FALSE); + fadeInWindows->setChecked(false); + fadeInMenuWindows->setChecked(true); + fadeInToolTipWindows->setChecked(true); + fadeOnOpacityChange->setChecked(false); fadeInSpeed->setValue(70); fadeOutSpeed->setValue(70); emit TDECModule::changed(true); @@ -2035,12 +2035,12 @@ bool KTranslucencyConfig::kompmgrAvailable() void KTranslucencyConfig::startKompmgr() { - kapp->dcopClient()->send("twin*", "", "startKompmgr()", TQString("")); + tdeApp->dcopClient()->send("twin*", "", "startKompmgr()", TQString("")); } void KTranslucencyConfig::stopKompmgr() { - kapp->dcopClient()->send("twin*", "", "stopKompmgr()", TQString("")); + tdeApp->dcopClient()->send("twin*", "", "stopKompmgr()", TQString("")); } void KTranslucencyConfig::showWarning(bool alphaActivated) diff --git a/twin/kcmtwin/twinrules/editshortcutbase.ui b/twin/kcmtwin/twinrules/editshortcutbase.ui index 793784c42..8a9339c16 100644 --- a/twin/kcmtwin/twinrules/editshortcutbase.ui +++ b/twin/kcmtwin/twinrules/editshortcutbase.ui @@ -155,10 +155,10 @@ For example "<b>Shift+Alt+(123) Shift+Ctrl+(ABC)</b>" will first try <slot>clearShortcut()</slot> </connection> </connections> -<Q_SLOTS> +<slots> <slot access="protected" specifier="pure virtual">editShortcut()</slot> <slot access="protected" specifier="pure virtual">clearShortcut()</slot> -</Q_SLOTS> +</slots> <layoutdefaults spacing="6" margin="11"/> <layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> <includes> diff --git a/twin/kcmtwin/twinrules/kcm.cpp b/twin/kcmtwin/twinrules/kcm.cpp index 6e7b54890..7e2cac86c 100644 --- a/twin/kcmtwin/twinrules/kcm.cpp +++ b/twin/kcmtwin/twinrules/kcm.cpp @@ -28,7 +28,7 @@ #include "ruleslist.h" extern "C" - KDE_EXPORT TDECModule *create_twinrules( TQWidget *parent, const char *name ) + TDE_EXPORT TDECModule *create_twinrules( TQWidget *parent, const char *name ) { //CT there's need for decision: kwm or twin? TDEGlobal::locale()->insertCatalogue( "kcmtwinrules" ); @@ -45,7 +45,7 @@ KCMRules::KCMRules( TQWidget *parent, const char *name ) TQVBoxLayout *layout = new TQVBoxLayout( this ); widget = new KCMRulesList( this ); layout->addWidget( widget ); - connect( widget, TQT_SIGNAL( changed( bool )), TQT_SLOT( moduleChanged( bool ))); + connect( widget, TQ_SIGNAL( changed( bool )), TQ_SLOT( moduleChanged( bool ))); TDEAboutData *about = new TDEAboutData(I18N_NOOP( "kcmtwinrules" ), I18N_NOOP( "Window-Specific Settings Configuration Module" ), 0, 0, TDEAboutData::License_GPL, I18N_NOOP( "(c) 2004 KWin and KControl Authors" )); @@ -66,9 +66,9 @@ void KCMRules::save() emit TDECModule::changed( false ); // Send signal to twin config.sync(); - if( !kapp->dcopClient()->isAttached()) - kapp->dcopClient()->attach(); - kapp->dcopClient()->send("twin*", "", "reconfigure()", TQString("")); + if( !tdeApp->dcopClient()->isAttached()) + tdeApp->dcopClient()->attach(); + tdeApp->dcopClient()->send("twin*", "", "reconfigure()", TQString("")); } void KCMRules::defaults() diff --git a/twin/kcmtwin/twinrules/main.cpp b/twin/kcmtwin/twinrules/main.cpp index 21cb007ec..ef8a30956 100644 --- a/twin/kcmtwin/twinrules/main.cpp +++ b/twin/kcmtwin/twinrules/main.cpp @@ -256,9 +256,9 @@ static int edit( Window wid, bool whole_app ) delete orig_rule; } saveRules( rules ); - if( !kapp->dcopClient()->isAttached()) - kapp->dcopClient()->attach(); - kapp->dcopClient()->send("twin*", "", "reconfigure()", TQString("")); + if( !tdeApp->dcopClient()->isAttached()) + tdeApp->dcopClient()->attach(); + tdeApp->dcopClient()->send("twin*", "", "reconfigure()", TQString("")); return 0; } @@ -273,7 +273,7 @@ static const TDECmdLineOptions options[] = }; extern "C" -KDE_EXPORT int kdemain( int argc, char* argv[] ) +TDE_EXPORT int kdemain( int argc, char* argv[] ) { TDELocale::setMainCatalogue( "kcmtwinrules" ); TDECmdLineArgs::init( argc, argv, "twin_rules_dialog", I18N_NOOP( "TWin" ), diff --git a/twin/kcmtwin/twinrules/ruleslist.cpp b/twin/kcmtwin/twinrules/ruleslist.cpp index 8961874ae..a9238c178 100644 --- a/twin/kcmtwin/twinrules/ruleslist.cpp +++ b/twin/kcmtwin/twinrules/ruleslist.cpp @@ -33,22 +33,22 @@ KCMRulesList::KCMRulesList( TQWidget* parent, const char* name ) : KCMRulesListBase( parent, name ) { // connect both current/selected, so that current==selected (stupid TQListBox :( ) - connect( rules_listbox, TQT_SIGNAL( currentChanged( TQListBoxItem* )), - TQT_SLOT( activeChanged( TQListBoxItem*))); - connect( rules_listbox, TQT_SIGNAL( selectionChanged( TQListBoxItem* )), - TQT_SLOT( activeChanged( TQListBoxItem*))); - connect( new_button, TQT_SIGNAL( clicked()), - TQT_SLOT( newClicked())); - connect( modify_button, TQT_SIGNAL( clicked()), - TQT_SLOT( modifyClicked())); - connect( delete_button, TQT_SIGNAL( clicked()), - TQT_SLOT( deleteClicked())); - connect( moveup_button, TQT_SIGNAL( clicked()), - TQT_SLOT( moveupClicked())); - connect( movedown_button, TQT_SIGNAL( clicked()), - TQT_SLOT( movedownClicked())); - connect( rules_listbox, TQT_SIGNAL( doubleClicked ( TQListBoxItem * ) ), - TQT_SLOT( modifyClicked())); + connect( rules_listbox, TQ_SIGNAL( currentChanged( TQListBoxItem* )), + TQ_SLOT( activeChanged( TQListBoxItem*))); + connect( rules_listbox, TQ_SIGNAL( selectionChanged( TQListBoxItem* )), + TQ_SLOT( activeChanged( TQListBoxItem*))); + connect( new_button, TQ_SIGNAL( clicked()), + TQ_SLOT( newClicked())); + connect( modify_button, TQ_SIGNAL( clicked()), + TQ_SLOT( modifyClicked())); + connect( delete_button, TQ_SIGNAL( clicked()), + TQ_SLOT( deleteClicked())); + connect( moveup_button, TQ_SIGNAL( clicked()), + TQ_SLOT( moveupClicked())); + connect( movedown_button, TQ_SIGNAL( clicked()), + TQ_SLOT( movedownClicked())); + connect( rules_listbox, TQ_SIGNAL( doubleClicked ( TQListBoxItem * ) ), + TQ_SLOT( modifyClicked())); load(); } diff --git a/twin/kcmtwin/twinrules/ruleswidget.cpp b/twin/kcmtwin/twinrules/ruleswidget.cpp index 334001bf7..116ac8b41 100644 --- a/twin/kcmtwin/twinrules/ruleswidget.cpp +++ b/twin/kcmtwin/twinrules/ruleswidget.cpp @@ -41,9 +41,9 @@ namespace KWinInternal { #define SETUP( var, type ) \ - connect( enable_##var, TQT_SIGNAL( toggled( bool )), rule_##var, TQT_SLOT( setEnabled( bool ))); \ - connect( enable_##var, TQT_SIGNAL( toggled( bool )), this, TQT_SLOT( updateEnable##var())); \ - connect( rule_##var, TQT_SIGNAL( activated( int )), this, TQT_SLOT( updateEnable##var())); \ + connect( enable_##var, TQ_SIGNAL( toggled( bool )), rule_##var, TQ_SLOT( setEnabled( bool ))); \ + connect( enable_##var, TQ_SIGNAL( toggled( bool )), this, TQ_SLOT( updateEnable##var())); \ + connect( rule_##var, TQ_SIGNAL( activated( int )), this, TQ_SLOT( updateEnable##var())); \ TQWhatsThis::add( enable_##var, enableDesc ); \ TQWhatsThis::add( rule_##var, type##RuleDesc ); @@ -550,7 +550,7 @@ void RulesWidget::detectClicked() { assert( detect_dlg == NULL ); detect_dlg = new DetectDialog; - connect( detect_dlg, TQT_SIGNAL( detectionDone( bool )), this, TQT_SLOT( detected( bool ))); + connect( detect_dlg, TQ_SIGNAL( detectionDone( bool )), this, TQ_SLOT( detected( bool ))); detect_dlg->detect( 0 ); } @@ -702,7 +702,7 @@ Rules* RulesDialog::edit( Rules* r, WId window, bool show_hints ) if( window != 0 ) widget->prepareWindowSpecific( window ); if( show_hints ) - TQTimer::singleShot( 0, this, TQT_SLOT( displayHints())); + TQTimer::singleShot( 0, this, TQ_SLOT( displayHints())); exec(); return rules; } diff --git a/twin/kcmtwin/twinrules/ruleswidgetbase.ui b/twin/kcmtwin/twinrules/ruleswidgetbase.ui index b3812d394..356a99676 100644 --- a/twin/kcmtwin/twinrules/ruleswidgetbase.ui +++ b/twin/kcmtwin/twinrules/ruleswidgetbase.ui @@ -2509,7 +2509,7 @@ <tabstop>rule_disableglobalshortcuts</tabstop> <tabstop>disableglobalshortcuts</tabstop> </tabstops> -<Q_SLOTS> +<slots> <slot access="protected" specifier="pure virtual">detectClicked()</slot> <slot access="protected" specifier="pure virtual">wmclassMatchChanged()</slot> <slot access="protected" specifier="pure virtual">roleMatchChanged()</slot> @@ -2517,7 +2517,7 @@ <slot access="protected" specifier="pure virtual">extraMatchChanged()</slot> <slot access="protected" specifier="pure virtual">machineMatchChanged()</slot> <slot access="protected" specifier="pure virtual">shortcutEditClicked()</slot> -</Q_SLOTS> +</slots> <layoutdefaults spacing="6" margin="11"/> <layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> <includes> diff --git a/twin/killer/killer.cpp b/twin/killer/killer.cpp index bf763e7c1..6cbd6baa0 100644 --- a/twin/killer/killer.cpp +++ b/twin/killer/killer.cpp @@ -25,7 +25,7 @@ DEALINGS IN THE SOFTWARE. #include <tdecmdlineargs.h> #include <tdeapplication.h> #include <tdemessagebox.h> -#include <kprocess.h> +#include <tdeprocess.h> #include <tdelocale.h> #include <unistd.h> #include <twin.h> diff --git a/twin/killwindow.cpp b/twin/killwindow.cpp index c67ab50a0..8bc1abb57 100644 --- a/twin/killwindow.cpp +++ b/twin/killwindow.cpp @@ -81,7 +81,7 @@ void KillWindow::start() button_released = (ev.xbutton.button == Button1); if ( ev.xbutton.button == Button3 ) { - escape_pressed = TRUE; + escape_pressed = true; break; } if( ev.xbutton.button == Button1 || ev.xbutton.button == Button2 ) diff --git a/twin/lib/kcommondecoration.cpp b/twin/lib/kcommondecoration.cpp index 7d219ae7f..a31471611 100644 --- a/twin/lib/kcommondecoration.cpp +++ b/twin/lib/kcommondecoration.cpp @@ -122,8 +122,8 @@ void KCommonDecoration::init() resetLayout(); - connect(this, TQT_SIGNAL(keepAboveChanged(bool) ), TQT_SLOT(keepAboveChange(bool) ) ); - connect(this, TQT_SIGNAL(keepBelowChanged(bool) ), TQT_SLOT(keepBelowChange(bool) ) ); + connect(this, TQ_SIGNAL(keepAboveChanged(bool) ), TQ_SLOT(keepAboveChange(bool) ) ); + connect(this, TQ_SIGNAL(keepBelowChanged(bool) ), TQ_SLOT(keepBelowChange(bool) ) ); updateCaption(); } @@ -332,9 +332,9 @@ bool KCommonDecoration::isModalSystemNotification() result = XGetWindowProperty(tqt_xdisplay(), windowId(), kde_wm_system_modal_notification, 0L, 1L, False, XA_CARDINAL, &actual, &format, &n, &left, /*(unsigned char **)*/ &data); if (result == Success && data != None && format == 32 ) { - return TRUE; + return true; } - return FALSE; + return false; } void KCommonDecoration::addButtons(ButtonContainer &btnContainer, const TQString& s, bool isLeft) @@ -350,8 +350,8 @@ void KCommonDecoration::addButtons(ButtonContainer &btnContainer, const TQString if (!btn) break; btn->setTipText(i18n("Menu") ); btn->setRealizeButtons(TQt::LeftButton|TQt::RightButton); - connect(btn, TQT_SIGNAL(pressed()), TQT_SLOT(menuButtonPressed())); - connect(btn, TQT_SIGNAL(released()), this, TQT_SLOT(menuButtonReleased())); + connect(btn, TQ_SIGNAL(pressed()), TQ_SLOT(menuButtonPressed())); + connect(btn, TQ_SIGNAL(released()), this, TQ_SLOT(menuButtonReleased())); m_button[MenuButton] = btn; } @@ -366,7 +366,7 @@ void KCommonDecoration::addButtons(ButtonContainer &btnContainer, const TQString btn->setTipText(oad?i18n("Not on all desktops"):i18n("On all desktops") ); btn->setToggleButton(true); btn->setOn( oad ); - connect(btn, TQT_SIGNAL(clicked()), TQT_SLOT(toggleOnAllDesktops())); + connect(btn, TQ_SIGNAL(clicked()), TQ_SLOT(toggleOnAllDesktops())); m_button[OnAllDesktopsButton] = btn; } @@ -377,7 +377,7 @@ void KCommonDecoration::addButtons(ButtonContainer &btnContainer, const TQString btn = createButton(HelpButton); if (!btn) break; btn->setTipText(i18n("Help") ); - connect(btn, TQT_SIGNAL(clicked()), TQT_SLOT(showContextHelp())); + connect(btn, TQ_SIGNAL(clicked()), TQ_SLOT(showContextHelp())); m_button[HelpButton] = btn; } @@ -387,7 +387,7 @@ void KCommonDecoration::addButtons(ButtonContainer &btnContainer, const TQString btn = createButton(MinButton); if (!btn) break; btn->setTipText(i18n("Minimize") ); - connect(btn, TQT_SIGNAL(clicked()), TQT_SLOT(minimize())); + connect(btn, TQ_SIGNAL(clicked()), TQ_SLOT(minimize())); m_button[MinButton] = btn; } @@ -401,7 +401,7 @@ void KCommonDecoration::addButtons(ButtonContainer &btnContainer, const TQString btn->setTipText(max?i18n("Restore"):i18n("Maximize") ); btn->setToggleButton(true); btn->setOn( max ); - connect(btn, TQT_SIGNAL(clicked()), TQT_SLOT(slotMaximize())); + connect(btn, TQ_SIGNAL(clicked()), TQ_SLOT(slotMaximize())); m_button[MaxButton] = btn; } @@ -411,7 +411,7 @@ void KCommonDecoration::addButtons(ButtonContainer &btnContainer, const TQString btn = createButton(CloseButton); if (!btn) break; btn->setTipText(i18n("Close") ); - connect(btn, TQT_SIGNAL(clicked()), TQT_SLOT(closeWindow())); + connect(btn, TQ_SIGNAL(clicked()), TQ_SLOT(closeWindow())); m_button[CloseButton] = btn; } @@ -424,7 +424,7 @@ void KCommonDecoration::addButtons(ButtonContainer &btnContainer, const TQString btn->setTipText(above?i18n("Do not keep above others"):i18n("Keep above others") ); btn->setToggleButton(true); btn->setOn( above ); - connect(btn, TQT_SIGNAL(clicked()), TQT_SLOT(slotKeepAbove())); + connect(btn, TQ_SIGNAL(clicked()), TQ_SLOT(slotKeepAbove())); m_button[AboveButton] = btn; } @@ -437,7 +437,7 @@ void KCommonDecoration::addButtons(ButtonContainer &btnContainer, const TQString btn->setTipText(below?i18n("Do not keep below others"):i18n("Keep below others") ); btn->setToggleButton(true); btn->setOn( below ); - connect(btn, TQT_SIGNAL(clicked()), TQT_SLOT(slotKeepBelow())); + connect(btn, TQ_SIGNAL(clicked()), TQ_SLOT(slotKeepBelow())); m_button[BelowButton] = btn; } @@ -450,7 +450,7 @@ void KCommonDecoration::addButtons(ButtonContainer &btnContainer, const TQString btn->setTipText(shaded?i18n("Unshade"):i18n("Shade") ); btn->setToggleButton(true); btn->setOn( shaded ); - connect(btn, TQT_SIGNAL(clicked()), TQT_SLOT(slotShade())); + connect(btn, TQ_SIGNAL(clicked()), TQ_SLOT(slotShade())); m_button[ShadeButton] = btn; } diff --git a/twin/lib/kdecoration.cpp b/twin/lib/kdecoration.cpp index 622362e9e..b9a8e7a36 100644 --- a/twin/lib/kdecoration.cpp +++ b/twin/lib/kdecoration.cpp @@ -28,7 +28,7 @@ DEALINGS IN THE SOFTWARE. #include <tqapplication.h> #include <tdeglobal.h> #include <assert.h> -#if defined Q_WS_X11 && ! defined K_WS_QTONLY +#if defined TQ_WS_X11 && ! defined K_WS_QTONLY #include <X11/Xlib.h> #include <fixx11h.h> #endif diff --git a/twin/lib/kdecoration.h b/twin/lib/kdecoration.h index 03e1c863e..03daebc28 100644 --- a/twin/lib/kdecoration.h +++ b/twin/lib/kdecoration.h @@ -37,7 +37,7 @@ class KDecorationBridge; class KDecorationPrivate; class KDecorationFactory; -#define KWIN_EXPORT KDE_EXPORT +#define KWIN_EXPORT TDE_EXPORT /** * This class provides a namespace for all decoration related classes. @@ -659,7 +659,7 @@ class KWIN_EXPORT KDecoration * This function may be reimplemented to provide custom minimize/restore animations * The reimplementation is allowed to perform X server grabs if necessary * (only using the functions provided by this API, no direct Xlib calls), but no - * futher event processing is allowed (i.e. no kapp->processEvents()). + * futher event processing is allowed (i.e. no tdeApp->processEvents()). * @a False should be returned if the default implementation should be used. * Note that you should not use this function to force disabling of the animation. * diff --git a/twin/main.cpp b/twin/main.cpp index 4af065a8a..c988b53f2 100644 --- a/twin/main.cpp +++ b/twin/main.cpp @@ -45,13 +45,13 @@ Atoms* atoms; int screen_number = -1; bool disable_twin_composition_manager = false; -static bool initting = FALSE; +static bool initting = false; static int x11ErrorHandler(Display *d, XErrorEvent *e) { char msg[80], req[80], number[80]; - bool ignore_badwindow = TRUE; //maybe temporary + bool ignore_badwindow = true; //maybe temporary if (initting && ( @@ -146,12 +146,12 @@ Application::Application( ) ::exit(1); } } - connect( &owner, TQT_SIGNAL( lostOwnership()), TQT_SLOT( lostSelection())); + connect( &owner, TQ_SIGNAL( lostOwnership()), TQ_SLOT( lostSelection())); // if there was already twin running, it saved its configuration after loosing the selection -> reread config()->reparseConfiguration(); - initting = TRUE; // startup.... + initting = true; // startup.... // install X11 error handler XSetErrorHandler( x11ErrorHandler ); @@ -176,7 +176,7 @@ Application::Application( ) DCOPRef ref( "kded", "kded" ); ref.send( "unloadModule", TQCString( "kdetrayproxy" )); - initting = FALSE; // startup done, we are up and running now. + initting = false; // startup done, we are up and running now. dcopClient()->send( "ksplash", "", "upAndRunning(TQString)", TQString("wm started")); XEvent e; @@ -216,7 +216,7 @@ void Application::lostSelection() bool Application::x11EventFilter( XEvent *e ) { if ( Workspace::self()->workspaceEvent( e ) ) - return TRUE; + return true; return TDEApplication::x11EventFilter( e ); } @@ -240,7 +240,7 @@ static TDECmdLineOptions args[] = }; extern "C" -KDE_EXPORT int kdemain( int argc, char * argv[] ) +TDE_EXPORT int kdemain( int argc, char * argv[] ) { bool restored = false; for (int arg = 1; arg < argc; arg++) diff --git a/twin/manage.cpp b/twin/manage.cpp index 8b96c070e..394d7fc20 100644 --- a/twin/manage.cpp +++ b/twin/manage.cpp @@ -190,7 +190,7 @@ bool Client::manage( Window w, bool isMapped ) // onAllDesktopsChange(); decoration doesn't exist here yet TQRect geom( attr.x, attr.y, attr.width, attr.height ); - bool placementDone = FALSE; + bool placementDone = false; if ( session ) geom = session->geometry; @@ -269,7 +269,7 @@ bool Client::manage( Window w, bool isMapped ) if ( ( (xSizeHint.flags & PPosition) && !ignorePPosition ) || (xSizeHint.flags & USPosition) ) { - placementDone = TRUE; + placementDone = true; // disobey xinerama placement option for now (#70943) area = workspace()->clientArea( PlacementArea, geom.center(), desktop()); } @@ -290,7 +290,7 @@ bool Client::manage( Window w, bool isMapped ) if( isMovable()) { if( geom.x() > area.right() || geom.y() > area.bottom()) - placementDone = FALSE; // weird, do not trust. + placementDone = false; // weird, do not trust. } if ( placementDone ) @@ -312,7 +312,7 @@ bool Client::manage( Window w, bool isMapped ) if( !placementDone ) { // placement needs to be after setting size workspace()->place( this, area ); - placementDone = TRUE; + placementDone = true; } if(( !isSpecialWindow() || isToolbar()) && isMovable()) @@ -358,7 +358,7 @@ bool Client::manage( Window w, bool isMapped ) // probably should be replaced by something better bool doNotShow = false; if ( workspace()->isNotManaged( caption() ) ) - doNotShow = TRUE; + doNotShow = true; // other settings from the previous session if ( session ) diff --git a/twin/notifications.cpp b/twin/notifications.cpp index 5a83e9bce..43ae37cdf 100644 --- a/twin/notifications.cpp +++ b/twin/notifications.cpp @@ -92,7 +92,7 @@ TQString Notify::eventToName( Event e ) return event; } -static bool forgetIt = FALSE; +static bool forgetIt = false; TQValueList< Notify::EventData > Notify::pending_events; bool Notify::raise( Event e, const TQString& message, Client* c ) diff --git a/twin/options.cpp b/twin/options.cpp index 46c557b4a..c9411f6de 100644 --- a/twin/options.cpp +++ b/twin/options.cpp @@ -77,7 +77,7 @@ unsigned long Options::updateSettings() separateScreenFocus = config->readBoolEntry( "SeparateScreenFocus", false ); activeMouseScreen = config->readBoolEntry( "ActiveMouseScreen", focusPolicy != ClickToFocus ); - rollOverDesktops = config->readBoolEntry("RollOverDesktops", TRUE); + rollOverDesktops = config->readBoolEntry("RollOverDesktops", true); // focusStealingPreventionLevel = config->readNumEntry( "FocusStealingPreventionLevel", 2 ); // TODO use low level for now @@ -99,8 +99,8 @@ unsigned long Options::updateSettings() xineramaPlacementScreen = KCLAMP( config->readNumEntry( "XineramaPlacementScreen", -1 ), -1, tqApp->desktop()->numScreens() - 1 ); - animateShade = config->readBoolEntry("AnimateShade", TRUE ); - animateMinimize = config->readBoolEntry("AnimateMinimize", TRUE ); + animateShade = config->readBoolEntry("AnimateShade", true ); + animateMinimize = config->readBoolEntry("AnimateMinimize", true ); animateMinimizeSpeed = config->readNumEntry("AnimateMinimizeSpeed", 5 ); if( focusPolicy == ClickToFocus ) @@ -112,21 +112,21 @@ unsigned long Options::updateSettings() } else { - autoRaise = config->readBoolEntry("AutoRaise", FALSE ); + autoRaise = config->readBoolEntry("AutoRaise", false ); autoRaiseInterval = config->readNumEntry("AutoRaiseInterval", 0 ); - delayFocus = config->readBoolEntry("DelayFocus", FALSE ); + delayFocus = config->readBoolEntry("DelayFocus", false ); delayFocusInterval = config->readNumEntry("DelayFocusInterval", 0 ); } - shadeHover = config->readBoolEntry("ShadeHover", FALSE ); + shadeHover = config->readBoolEntry("ShadeHover", false ); shadeHoverInterval = config->readNumEntry("ShadeHoverInterval", 250 ); // important: autoRaise implies ClickRaise - clickRaise = autoRaise || config->readBoolEntry("ClickRaise", TRUE ); + clickRaise = autoRaise || config->readBoolEntry("ClickRaise", true ); borderSnapZone = config->readNumEntry("BorderSnapZone", 10); windowSnapZone = config->readNumEntry("WindowSnapZone", 10); - snapOnlyWhenOverlapping=config->readBoolEntry("SnapOnlyWhenOverlapping",FALSE); + snapOnlyWhenOverlapping=config->readBoolEntry("SnapOnlyWhenOverlapping",false); // active borders: compatibility with old option names (Electric*) active_borders = config->readNumEntry("ActiveBorders", -1); @@ -205,7 +205,7 @@ unsigned long Options::updateSettings() onlyDecoTranslucent = config->readBoolEntry("OnlyDecoTranslucent",false); resetKompmgr = config->readBoolEntry("ResetKompmgr", false); if (resetKompmgr) - config->writeEntry("ResetKompmgr",FALSE); + config->writeEntry("ResetKompmgr",false); // window drop shadows config->setGroup("Style"); diff --git a/twin/pics/CMakeLists.txt b/twin/pics/CMakeLists.txt deleted file mode 100644 index e9068f5d9..000000000 --- a/twin/pics/CMakeLists.txt +++ /dev/null @@ -1,16 +0,0 @@ -################################################# -# -# (C) 2010-2011 Serghei Amelian -# serghei (DOT) amelian (AT) gmail.com -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -install( FILES - close.png maximize.png maximizedown.png menu.png - iconify.png pindown.png pinup.png unknown.png fog.png - fog-grey.png bluesun.png greenie.light.png greenie.dim.png - DESTINATION ${DATA_INSTALL_DIR}/twin/pics ) diff --git a/twin/pics/tile_bottom.png b/twin/pics/tile_bottom.png Binary files differnew file mode 100644 index 000000000..de6a89093 --- /dev/null +++ b/twin/pics/tile_bottom.png diff --git a/twin/pics/tile_bottomleft.png b/twin/pics/tile_bottomleft.png Binary files differnew file mode 100644 index 000000000..30ae6d94d --- /dev/null +++ b/twin/pics/tile_bottomleft.png diff --git a/twin/pics/tile_bottomright.png b/twin/pics/tile_bottomright.png Binary files differnew file mode 100644 index 000000000..34ef23211 --- /dev/null +++ b/twin/pics/tile_bottomright.png diff --git a/twin/pics/tile_left.png b/twin/pics/tile_left.png Binary files differnew file mode 100644 index 000000000..14a77d1a6 --- /dev/null +++ b/twin/pics/tile_left.png diff --git a/twin/pics/tile_right.png b/twin/pics/tile_right.png Binary files differnew file mode 100644 index 000000000..c04d5fc1b --- /dev/null +++ b/twin/pics/tile_right.png diff --git a/twin/pics/tile_top.png b/twin/pics/tile_top.png Binary files differnew file mode 100644 index 000000000..ca1e277e8 --- /dev/null +++ b/twin/pics/tile_top.png diff --git a/twin/pics/tile_topleft.png b/twin/pics/tile_topleft.png Binary files differnew file mode 100644 index 000000000..1e0cd5b9e --- /dev/null +++ b/twin/pics/tile_topleft.png diff --git a/twin/pics/tile_topright.png b/twin/pics/tile_topright.png Binary files differnew file mode 100644 index 000000000..c0316cfa2 --- /dev/null +++ b/twin/pics/tile_topright.png diff --git a/twin/popupinfo.cpp b/twin/popupinfo.cpp index c347991fe..324b8a782 100644 --- a/twin/popupinfo.cpp +++ b/twin/popupinfo.cpp @@ -39,10 +39,10 @@ PopupInfo::PopupInfo( Workspace* ws, const char *name ) m_shown = false; reset(); reconfigure(); - connect(&m_delayedHideTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(hide())); + connect(&m_delayedHideTimer, TQ_SIGNAL(timeout()), this, TQ_SLOT(hide())); TQFont f = font(); - f.setBold( TRUE ); + f.setBold( true ); f.setPointSize( 14 ); setFont( f ); diff --git a/twin/resumer/resumer.cpp b/twin/resumer/resumer.cpp index 3c915b8c8..91db4e341 100644 --- a/twin/resumer/resumer.cpp +++ b/twin/resumer/resumer.cpp @@ -25,7 +25,7 @@ DEALINGS IN THE SOFTWARE. #include <tdecmdlineargs.h> #include <tdeapplication.h> #include <tdemessagebox.h> -#include <kprocess.h> +#include <tdeprocess.h> #include <tdelocale.h> #include <unistd.h> #include <twin.h> diff --git a/twin/rules.cpp b/twin/rules.cpp index 63fc0e37b..aa4b7904a 100644 --- a/twin/rules.cpp +++ b/twin/rules.cpp @@ -14,7 +14,7 @@ License. See the file "COPYING" for the exact licensing terms. #include <tdeconfig.h> #include <tqregexp.h> #include <tdetempfile.h> -#include <ksimpleconfig.h> +#include <tdesimpleconfig.h> #include <tqfile.h> #ifndef KCMRULES @@ -75,7 +75,7 @@ Rules::Rules( const TQString& str, bool temporary ) f->writeBlock( s.data(), s.length()); } file.close(); - KSimpleConfig cfg( file.name()); + TDESimpleConfig cfg( file.name()); readFromCfg( cfg ); if( description.isEmpty()) description = "temporary"; @@ -1008,7 +1008,7 @@ void Workspace::gotTemporaryRulesMessage( const TQString& message ) Rules* rule = new Rules( message, true ); rules.prepend( rule ); // highest priority first if( !was_temporary ) - TQTimer::singleShot( 60000, this, TQT_SLOT( cleanupTemporaryRules())); + TQTimer::singleShot( 60000, this, TQ_SLOT( cleanupTemporaryRules())); } void Workspace::cleanupTemporaryRules() @@ -1028,7 +1028,7 @@ void Workspace::cleanupTemporaryRules() } } if( has_temporary ) - TQTimer::singleShot( 60000, this, TQT_SLOT( cleanupTemporaryRules())); + TQTimer::singleShot( 60000, this, TQ_SLOT( cleanupTemporaryRules())); } void Workspace::discardUsedWindowRules( Client* c, bool withdrawn ) diff --git a/twin/sm.cpp b/twin/sm.cpp index 316322edd..5ef97f62d 100644 --- a/twin/sm.cpp +++ b/twin/sm.cpp @@ -42,13 +42,13 @@ bool SessionManaged::saveState( TQSessionManager& sm ) { Workspace::self()->sessionSaveStarted(); if( ksmserver ) // save stacking order etc. before "save file?" etc. dialogs change it - Workspace::self()->storeSession( kapp->sessionConfig(), SMSavePhase0 ); + Workspace::self()->storeSession( tdeApp->sessionConfig(), SMSavePhase0 ); sm.release(); // Qt doesn't automatically release in this case (bug?) sm.requestPhase2(); return true; } - Workspace::self()->storeSession( kapp->sessionConfig(), ksmserver ? SMSavePhase2 : SMSavePhase2Full ); - kapp->sessionConfig()->sync(); + Workspace::self()->storeSession( tdeApp->sessionConfig(), ksmserver ? SMSavePhase2 : SMSavePhase2Full ); + tdeApp->sessionConfig()->sync(); return true; } @@ -94,7 +94,7 @@ void Workspace::storeSession( TDEConfig* config, SMSavePhase phase ) config->writeEntry( TQString("wmClientMachine")+n, c->wmClientMachine( true ).data() ); config->writeEntry( TQString("resourceName")+n, c->resourceName().data() ); config->writeEntry( TQString("resourceClass")+n, c->resourceClass().data() ); - config->writeEntry( TQString("geometry")+n, TQRect( c->calculateGravitation(TRUE), c->clientSize() ) ); // FRAME + config->writeEntry( TQString("geometry")+n, TQRect( c->calculateGravitation(true), c->clientSize() ) ); // FRAME config->writeEntry( TQString("restore")+n, c->geometryRestore() ); config->writeEntry( TQString("fsrestore")+n, c->geometryFSRestore() ); config->writeEntry( TQString("maximize")+n, (int) c->maximizeMode() ); @@ -149,7 +149,7 @@ void Workspace::storeSession( TDEConfig* config, SMSavePhase phase ) void Workspace::loadSessionInfo() { session.clear(); - TDEConfig* config = kapp->sessionConfig(); + TDEConfig* config = tdeApp->sessionConfig(); config->setGroup("Session" ); int count = config->readNumEntry( "count" ); int active_client = config->readNumEntry( "active" ); @@ -170,15 +170,15 @@ void Workspace::loadSessionInfo() info->maximized = config->readNumEntry( TQString("maximize")+n, 0 ); info->fullscreen = config->readNumEntry( TQString("fullscreen")+n, 0 ); info->desktop = config->readNumEntry( TQString("desktop")+n, 0 ); - info->minimized = config->readBoolEntry( TQString("iconified")+n, FALSE ); - info->onAllDesktops = config->readBoolEntry( TQString("sticky")+n, FALSE ); - info->shaded = config->readBoolEntry( TQString("shaded")+n, FALSE ); - info->shadowed = config->readBoolEntry( TQString("shadowed")+n, TRUE ); - info->keepAbove = config->readBoolEntry( TQString("staysOnTop")+n, FALSE ); - info->keepBelow = config->readBoolEntry( TQString("keepBelow")+n, FALSE ); - info->skipTaskbar = config->readBoolEntry( TQString("skipTaskbar")+n, FALSE ); - info->skipPager = config->readBoolEntry( TQString("skipPager")+n, FALSE ); - info->userNoBorder = config->readBoolEntry( TQString("userNoBorder")+n, FALSE ); + info->minimized = config->readBoolEntry( TQString("iconified")+n, false ); + info->onAllDesktops = config->readBoolEntry( TQString("sticky")+n, false ); + info->shaded = config->readBoolEntry( TQString("shaded")+n, false ); + info->shadowed = config->readBoolEntry( TQString("shadowed")+n, true ); + info->keepAbove = config->readBoolEntry( TQString("staysOnTop")+n, false ); + info->keepBelow = config->readBoolEntry( TQString("keepBelow")+n, false ); + info->skipTaskbar = config->readBoolEntry( TQString("skipTaskbar")+n, false ); + info->skipPager = config->readBoolEntry( TQString("skipPager")+n, false ); + info->userNoBorder = config->readBoolEntry( TQString("userNoBorder")+n, false ); info->windowType = txtToWindowType( config->readEntry( TQString("windowType")+n ).latin1()); info->shortcut = config->readEntry( TQString("shortcut")+n ); info->active = ( active_client == i ); @@ -417,7 +417,7 @@ SessionSaveDoneHelper::SessionSaveDoneHelper() SmcSetProperties( conn, 5, p ); notifier = new TQSocketNotifier( IceConnectionNumber( SmcGetIceConnection( conn )), TQSocketNotifier::Read, this ); - connect( notifier, TQT_SIGNAL( activated( int )), TQT_SLOT( processData())); + connect( notifier, TQ_SIGNAL( activated( int )), TQ_SLOT( processData())); } SessionSaveDoneHelper::~SessionSaveDoneHelper() diff --git a/twin/tabbox.cpp b/twin/tabbox.cpp index bec7cce97..f638d755e 100644 --- a/twin/tabbox.cpp +++ b/twin/tabbox.cpp @@ -25,7 +25,7 @@ License. See the file "COPYING" for the exact licensing terms. #include <kstringhandler.h> #include <stdarg.h> #include <kdebug.h> -#include <kglobalaccel.h> +#include <tdeglobalaccel.h> #include <kkeynative.h> #include <tdeglobalsettings.h> #include <kiconeffect.h> @@ -53,7 +53,7 @@ TabBox::TabBox( Workspace *ws, const char *name ) m = DesktopMode; // init variables reconfigure(); reset(); - connect(&delayedShowTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(show())); + connect(&delayedShowTimer, TQ_SIGNAL(timeout()), this, TQ_SLOT(show())); XSetWindowAttributes attr; attr.override_redirect = 1; @@ -203,7 +203,7 @@ void TabBox::reset() if ( clients.count() == 0 ) // height for the "not tasks" text { TQFont f = font(); - f.setBold( TRUE ); + f.setBold( true ); f.setPointSize( 14 ); h = TQFontMetrics(f).height()*4; @@ -401,7 +401,7 @@ void TabBox::drawContents( TQPainter * ) if ( !currentClient() ) { TQFont f = font(); - f.setBold( TRUE ); + f.setBold( true ); f.setPointSize( 14 ); p.setFont(f); @@ -993,26 +993,26 @@ bool Workspace::startKDEWalkThroughWindows() { if( !establishTabBoxGrab()) return false; - tab_grab = TRUE; + tab_grab = true; keys->suspend( true ); disable_shortcuts_keys->suspend( true ); client_keys->suspend( true ); tab_box->setMode( TabBox::WindowsMode ); tab_box->reset(); - return TRUE; + return true; } bool Workspace::startWalkThroughDesktops( int mode ) { if( !establishTabBoxGrab()) return false; - control_grab = TRUE; + control_grab = true; keys->suspend( true ); disable_shortcuts_keys->suspend( true ); client_keys->suspend( true ); tab_box->setMode( (TabBox::Mode) mode ); tab_box->reset(); - return TRUE; + return true; } bool Workspace::startWalkThroughDesktops() @@ -1195,8 +1195,8 @@ void Workspace::closeTabBox() keys->suspend( false ); disable_shortcuts_keys->suspend( false ); client_keys->suspend( false ); - tab_grab = FALSE; - control_grab = FALSE; + tab_grab = false; + control_grab = false; } /*! diff --git a/twin/tabbox.h b/twin/tabbox.h index 3fd419ad7..0f07b019c 100644 --- a/twin/tabbox.h +++ b/twin/tabbox.h @@ -46,7 +46,7 @@ class TabBox : public TQFrame bool isAppsOnly() const; void reset(); - void nextPrev( bool next = TRUE); + void nextPrev( bool next = true); void delayedShow(); void hide(); diff --git a/twin/tools/decobenchmark/main.cpp b/twin/tools/decobenchmark/main.cpp index c4efddace..d4930ee84 100644 --- a/twin/tools/decobenchmark/main.cpp +++ b/twin/tools/decobenchmark/main.cpp @@ -130,7 +130,7 @@ int main(int argc, char** argv) DecoBenchApplication app(library, test, count); - TQTimer::singleShot(0, &app, TQT_SLOT(executeTest())); + TQTimer::singleShot(0, &app, TQ_SLOT(executeTest())); app.exec(); } #include "main.moc" diff --git a/twin/tools/decobenchmark/preview.cpp b/twin/tools/decobenchmark/preview.cpp index c706eb5df..33ee8fd3e 100644 --- a/twin/tools/decobenchmark/preview.cpp +++ b/twin/tools/decobenchmark/preview.cpp @@ -67,7 +67,7 @@ void KDecorationPreview::performRepaintTest(int n) positionPreviews(0); for (int i = 0; i < n; ++i) { deco->widget()->repaint(); - kapp->processEvents(); + tdeApp->processEvents(); } } @@ -80,7 +80,7 @@ void KDecorationPreview::performCaptionTest(int n) bridge->setCaption(caption.arg(i) ); deco->captionChange(); deco->widget()->repaint(); - kapp->processEvents(); + tdeApp->processEvents(); } } @@ -91,7 +91,7 @@ void KDecorationPreview::performResizeTest(int n) deco->captionChange(); for (int i = 0; i < n; ++i) { positionPreviews(i % 200); - kapp->processEvents(); + tdeApp->processEvents(); } } @@ -103,7 +103,7 @@ void KDecorationPreview::performRecreationTest(int n) positionPreviews(0); for (int i = 0; i < n; ++i) { recreateDecoration(); - kapp->processEvents(); + tdeApp->processEvents(); } } diff --git a/twin/twinbindings.cpp b/twin/twinbindings.cpp index 08d6bf0d1..7e918f49f 100644 --- a/twin/twinbindings.cpp +++ b/twin/twinbindings.cpp @@ -1,8 +1,8 @@ #ifndef NOSLOTS # define DEF2( name, descr, key3, key4, fnSlot ) \ - keys->insert( name, i18n(descr), TQString::null, key3, key4, this, TQT_SLOT(fnSlot) ) + keys->insert( name, i18n(descr), TQString::null, key3, key4, this, TQ_SLOT(fnSlot) ) # define DEF( name, key3, key4, fnSlot ) \ - keys->insert( name, i18n(name), TQString::null, key3, key4, this, TQT_SLOT(fnSlot) ) + keys->insert( name, i18n(name), TQString::null, key3, key4, this, TQ_SLOT(fnSlot) ) #else # define DEF2( name, descr, key3, key4, fnSlot ) \ keys->insert( name, i18n(descr), TQString::null, key3, key4 ) diff --git a/twin/useractions.cpp b/twin/useractions.cpp index dd29025db..fe60c4d04 100644 --- a/twin/useractions.cpp +++ b/twin/useractions.cpp @@ -26,7 +26,7 @@ License. See the file "COPYING" for the exact licensing terms. #include <kiconloader.h> #include <tdelocale.h> #include <tdeconfig.h> -#include <kglobalaccel.h> +#include <tdeglobalaccel.h> #include <tdeapplication.h> #include <tqregexp.h> @@ -44,20 +44,47 @@ namespace KWinInternal // Workspace //**************************************** +TQPopupMenu* Workspace::makeTileMenu() +{ + TQPopupMenu *m = new TQPopupMenu; + + // Tile to side (the menu id matched the ActiveBorder index used for tiling) + int id = m->insertItem( SmallIconSet("tile_left"), i18n("&Left"), this, TQ_SLOT( tileCurrentWindowToBorder(int) ) ); + m->setItemParameter( id, 6 ); + id = m->insertItem( SmallIconSet("tile_right"), i18n("&Right"), this, TQ_SLOT( tileCurrentWindowToBorder(int) ) ); + m->setItemParameter( id, 2 ); + id = m->insertItem( SmallIconSet("tile_top"), i18n("&Top"), this, TQ_SLOT( tileCurrentWindowToBorder(int) ) ); + m->setItemParameter( id, 0 ); + id = m->insertItem( SmallIconSet("tile_bottom"), i18n("&Bottom"), this, TQ_SLOT( tileCurrentWindowToBorder(int) ) ); + m->setItemParameter( id, 4 ); + + // Tile to corner (the menu id matched the ActiveBorder index used for tiling) + id = m->insertItem( SmallIconSet("tile_topleft"), i18n("Top &Left"), this, TQ_SLOT( tileCurrentWindowToBorder(int) ) ); + m->setItemParameter( id, 7 ); + id = m->insertItem( SmallIconSet("tile_topright"), i18n("Top &Right"), this, TQ_SLOT( tileCurrentWindowToBorder(int) ) ); + m->setItemParameter( id, 1 ); + id = m->insertItem( SmallIconSet("tile_bottomleft"), i18n("Bottom L&eft"), this, TQ_SLOT( tileCurrentWindowToBorder(int) ) ); + m->setItemParameter( id, 5 ); + id = m->insertItem( SmallIconSet("tile_bottomright"), i18n("&Bottom R&ight"), this, TQ_SLOT( tileCurrentWindowToBorder(int) ) ); + m->setItemParameter( id, 3 ); + + return m; +} + TQPopupMenu* Workspace::clientPopup() { if ( !popup ) { popup = new TQPopupMenu; - popup->setCheckable( TRUE ); + popup->setCheckable( true ); popup->setFont(TDEGlobalSettings::menuFont()); - connect( popup, TQT_SIGNAL( aboutToShow() ), this, TQT_SLOT( clientPopupAboutToShow() ) ); - connect( popup, TQT_SIGNAL( activated(int) ), this, TQT_SLOT( clientPopupActivated(int) ) ); + connect( popup, TQ_SIGNAL( aboutToShow() ), this, TQ_SLOT( clientPopupAboutToShow() ) ); + connect( popup, TQ_SIGNAL( activated(int) ), this, TQ_SLOT( clientPopupActivated(int) ) ); advanced_popup = new TQPopupMenu( popup ); - advanced_popup->setCheckable( TRUE ); + advanced_popup->setCheckable( true ); advanced_popup->setFont(TDEGlobalSettings::menuFont()); - connect( advanced_popup, TQT_SIGNAL( activated(int) ), this, TQT_SLOT( clientPopupActivated(int) ) ); + connect( advanced_popup, TQ_SIGNAL( activated(int) ), this, TQ_SLOT( clientPopupActivated(int) ) ); advanced_popup->insertItem( SmallIconSet( "go-up" ), i18n("Keep &Above Others")+'\t'+keys->shortcut("Window Above Other Windows").seq(0).toString(), Options::KeepAboveOp ); advanced_popup->insertItem( SmallIconSet( "go-down" ), @@ -76,6 +103,7 @@ TQPopupMenu* Workspace::clientPopup() advanced_popup->insertItem( SmallIconSet( "wizard" ), i18n("&Special Application Settings…"), Options::ApplicationRulesOp ); popup->insertItem(i18n("Ad&vanced"), advanced_popup ); + tile_popup_index = popup->insertItem(i18n("T&ile"), makeTileMenu()); desk_popup_index = popup->count(); if (options->useTranslucency){ @@ -85,11 +113,11 @@ TQPopupMenu* Workspace::clientPopup() TQToolTip::add(transButton, i18n("Reset opacity to default value")); transSlider = new TQSlider(0, 100, 1, 100, TQt::Horizontal, transBox, "transSlider"); TQToolTip::add(transSlider, i18n("Slide this to set the window's opacity")); - connect(transButton, TQT_SIGNAL(clicked()), TQT_SLOT(resetClientOpacity())); - connect(transButton, TQT_SIGNAL(clicked()), trans_popup, TQT_SLOT(hide())); - connect(transSlider, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(setTransButtonText(int))); - connect(transSlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(setPopupClientOpacity(int))); -// connect(transSlider, TQT_SIGNAL(sliderReleased()), trans_popup, TQT_SLOT(hide())); + connect(transButton, TQ_SIGNAL(clicked()), TQ_SLOT(resetClientOpacity())); + connect(transButton, TQ_SIGNAL(clicked()), trans_popup, TQ_SLOT(hide())); + connect(transSlider, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(setTransButtonText(int))); + connect(transSlider, TQ_SIGNAL(valueChanged(int)), this, TQ_SLOT(setPopupClientOpacity(int))); +// connect(transSlider, TQ_SIGNAL(sliderReleased()), trans_popup, TQ_SLOT(hide())); trans_popup->insertItem(transBox); popup->insertItem(i18n("&Opacity"), trans_popup ); } @@ -103,9 +131,9 @@ TQPopupMenu* Workspace::clientPopup() popup->insertSeparator(); if (!TDEGlobal::config()->isImmutable() && - !kapp->authorizeControlModules(Workspace::configModules(true)).isEmpty()) + !tdeApp->authorizeControlModules(Workspace::configModules(true)).isEmpty()) { - popup->insertItem(SmallIconSet( "configure" ), i18n("Configur&e Window Behavior…"), this, TQT_SLOT( configureWM() )); + popup->insertItem(SmallIconSet( "configure" ), i18n("Configur&e Window Behavior…"), this, TQ_SLOT( configureWM() )); popup->insertSeparator(); } @@ -179,10 +207,11 @@ void Workspace::clientPopupAboutToShow() advanced_popup->setItemEnabled( Options::ResumeWindowOp, active_popup_client->isResumeable() ); advanced_popup->setItemChecked( Options::NoBorderOp, active_popup_client->noBorder() ); advanced_popup->setItemEnabled( Options::NoBorderOp, active_popup_client->userCanSetNoBorder() ); - advanced_popup->setItemEnabled( Options::ShadowOp, (options->shadowWindowType(active_popup_client->windowType()) && options->shadowEnabled(active_popup_client->isActive())) ); advanced_popup->setItemChecked( Options::ShadowOp, active_popup_client->isShadowed() ); + popup->setItemEnabled( tile_popup_index, active_popup_client->isMovable() && active_popup_client->isResizable()); + popup->setItemEnabled( Options::MinimizeOp, active_popup_client->isMinimizable() ); popup->setItemEnabled( Options::CloseOp, active_popup_client->isCloseable() ); if (options->useTranslucency) @@ -199,12 +228,12 @@ void Workspace::initDesktopPopup() return; desk_popup = new TQPopupMenu( popup ); - desk_popup->setCheckable( TRUE ); + desk_popup->setCheckable( true ); desk_popup->setFont(TDEGlobalSettings::menuFont()); - connect( desk_popup, TQT_SIGNAL( activated(int) ), - this, TQT_SLOT( slotSendToDesktop(int) ) ); - connect( desk_popup, TQT_SIGNAL( aboutToShow() ), - this, TQT_SLOT( desktopPopupAboutToShow() ) ); + connect( desk_popup, TQ_SIGNAL( activated(int) ), + this, TQ_SLOT( slotSendToDesktop(int) ) ); + connect( desk_popup, TQ_SIGNAL( aboutToShow() ), + this, TQ_SLOT( desktopPopupAboutToShow() ) ); popup->insertItem(i18n("To &Desktop"), desk_popup, -1, desk_popup_index ); } @@ -221,7 +250,7 @@ void Workspace::desktopPopupAboutToShow() desk_popup->clear(); desk_popup->insertItem( i18n("&All Desktops"), 0 ); if ( active_popup_client && active_popup_client->isOnAllDesktops() ) - desk_popup->setItemChecked( 0, TRUE ); + desk_popup->setItemChecked( 0, true ); desk_popup->insertSeparator( -1 ); int id; const int BASE = 10; @@ -239,7 +268,7 @@ void Workspace::desktopPopupAboutToShow() i ); if ( active_popup_client && !active_popup_client->isOnAllDesktops() && active_popup_client->desktop() == i ) - desk_popup->setItemChecked( id, TRUE ); + desk_popup->setItemChecked( id, true ); } } @@ -299,7 +328,7 @@ void Workspace::setupWindowShortcut( Client* c ) client_keys->suspend( true ); client_keys_dialog = new ShortcutDialog( c->shortcut()); client_keys_client = c; - connect( client_keys_dialog, TQT_SIGNAL( dialogDone( bool )), TQT_SLOT( setupWindowShortcutDone( bool ))); + connect( client_keys_dialog, TQ_SIGNAL( dialogDone( bool )), TQ_SLOT( setupWindowShortcutDone( bool ))); TQRect r = clientArea( ScreenArea, c ); TQSize size = client_keys_dialog->sizeHint(); TQPoint pos = c->pos() + c->clientPos(); @@ -336,7 +365,7 @@ void Workspace::clientShortcutUpdated( Client* c ) { client_keys->insert( key, key ); client_keys->setShortcut( key, c->shortcut()); - client_keys->setSlot( key, c, TQT_SLOT( shortcutActivated())); + client_keys->setSlot( key, c, TQ_SLOT( shortcutActivated())); client_keys->setActionEnabled( key, true ); } client_keys->updateConnections(); @@ -472,7 +501,7 @@ void Workspace::performWindowOperation( Client* c, Options::WindowOperation op ) */ bool Client::performMouseCommand( Options::MouseCommand command, TQPoint globalPos, bool handled ) { - bool replay = FALSE; + bool replay = false; switch (command) { case Options::MouseRaise: @@ -519,12 +548,12 @@ bool Client::performMouseCommand( Options::MouseCommand command, TQPoint globalP case Options::MouseActivateRaiseAndPassClick: workspace()->takeActivity( this, ActivityFocus | ActivityRaise, handled ); workspace()->setActiveScreenMouse( globalPos ); - replay = TRUE; + replay = true; break; case Options::MouseActivateAndPassClick: workspace()->takeActivity( this, ActivityFocus, handled ); workspace()->setActiveScreenMouse( globalPos ); - replay = TRUE; + replay = true; break; case Options::MouseActivateRaiseAndMove: case Options::MouseActivateRaiseAndUnrestrictedMove: @@ -542,7 +571,7 @@ bool Client::performMouseCommand( Options::MouseCommand command, TQPoint globalP if( moveResizeMode ) finishMoveResize( false ); mode = PositionCenter; - buttonDown = TRUE; + buttonDown = true; moveOffset = TQPoint( globalPos.x() - x(), globalPos.y() - y()); // map from global invertedMoveOffset = rect().bottomRight() - moveOffset; unrestrictedMoveResize = ( command == Options::MouseActivateRaiseAndUnrestrictedMove @@ -562,7 +591,7 @@ bool Client::performMouseCommand( Options::MouseCommand command, TQPoint globalP break; if( moveResizeMode ) finishMoveResize( false ); - buttonDown = TRUE; + buttonDown = true; moveOffset = TQPoint( globalPos.x() - x(), globalPos.y() - y()); // map from global int x = moveOffset.x(), y = moveOffset.y(); bool left = x < width() / 3; @@ -623,12 +652,12 @@ bool Client::performMouseCommand( Options::MouseCommand command, TQPoint globalP { if (opacity_ < 0xF3333333) { - setOpacity(TRUE, opacity_ + 0xCCCCCCC); + setOpacity(true, opacity_ + 0xCCCCCCC); custom_opacity = true; } else { - setOpacity(FALSE, 0xFFFFFFFF); + setOpacity(false, 0xFFFFFFFF); custom_opacity = false; } } @@ -636,12 +665,12 @@ bool Client::performMouseCommand( Options::MouseCommand command, TQPoint globalP case Options::MouseOpacityLess: if (opacity_ > 0) { - setOpacity(TRUE, (opacity_ > 0xCCCCCCC) ? opacity_ - 0xCCCCCCC : 0); + setOpacity(true, (opacity_ > 0xCCCCCCC) ? opacity_ - 0xCCCCCCC : 0); custom_opacity = true; } break; case Options::MouseNothing: - replay = TRUE; + replay = true; break; } return replay; @@ -664,6 +693,61 @@ void Workspace::showWindowMenu( unsigned long window ) } } +void Workspace::tileCurrentWindowToBorder(int position) +{ + Client *c = active_popup_client ? active_popup_client : active_client; + if (!c) return; + + c->tileToBorder((ActiveBorder)position); +} + +void Workspace::tileWindowToBorder(unsigned long w1, int location) { + if (location < ActiveTop || location >= ACTIVE_BORDER_COUNT) return; + + Client *c1 = findClient(WindowMatchPredicate((WId)w1)); + if (!c1) return; + + c1->tileToBorder((ActiveBorder)location); +} + +void Workspace::tileTwoWindowsHorizontally(unsigned long w1, unsigned long w2) { + if (w1 == w2) return; + + Client *c1 = findClient(WindowMatchPredicate((WId)w1)); + Client *c2 = findClient(WindowMatchPredicate((WId)w2)); + if (!c1 || !c2) return; + + c1->tileToBorder(ActiveTop); + c2->tileToBorder(ActiveBottom); +} + +void Workspace::tileTwoWindowsVertically(unsigned long w1, unsigned long w2) { + if (w1 == w2) return; + + Client *c1 = findClient(WindowMatchPredicate((WId)w1)); + Client *c2 = findClient(WindowMatchPredicate((WId)w2)); + if (!c1 || !c2) return; + + c1->tileToBorder(ActiveLeft); + c2->tileToBorder(ActiveRight); +} + +void Workspace::tileFourWindowsInGrid(unsigned long w1, unsigned long w2, unsigned long w3, unsigned long w4) { + if (w1 == w2 || w1 == w3 || w1 == w4 || w2 == w3 || w2 == w4 || w3 == w4) + return; + + Client *c1 = findClient(WindowMatchPredicate((WId)w1)); + Client *c2 = findClient(WindowMatchPredicate((WId)w2)); + Client *c3 = findClient(WindowMatchPredicate((WId)w3)); + Client *c4 = findClient(WindowMatchPredicate((WId)w4)); + if (!c1 || !c2 || !c3 || !c4) return; + + c1->tileToBorder(ActiveTopLeft); + c2->tileToBorder(ActiveTopRight); + c3->tileToBorder(ActiveBottomLeft); + c4->tileToBorder(ActiveBottomRight); +} + void Workspace::slotActivateAttentionWindow() { if( attention_chain.count() > 0 ) @@ -1064,7 +1148,7 @@ void Workspace::slotWindowOperations() void Workspace::showWindowMenu( const TQRect &pos, Client* cl ) { - if (!kapp->authorizeTDEAction("twin_rmb")) + if (!tdeApp->authorizeTDEAction("twin_rmb")) return; if( !cl ) return; diff --git a/twin/utils.cpp b/twin/utils.cpp index bc44eee56..d21393d2e 100644 --- a/twin/utils.cpp +++ b/twin/utils.cpp @@ -57,7 +57,7 @@ bool Shape::hasShape( WId w) unsigned int wws, hws, wbs, hbs; int boundingShaped = 0, clipShaped = 0; if (!available()) - return FALSE; + return false; XShapeQueryExtents(tqt_xdisplay(), w, &boundingShaped, &xws, &yws, &wws, &hws, &clipShaped, &xbs, &ybs, &wbs, &hbs); diff --git a/twin/utils.h b/twin/utils.h index 36e9879a5..da2f9c2e3 100644 --- a/twin/utils.h +++ b/twin/utils.h @@ -110,19 +110,16 @@ enum ShadeMode enum ActiveBorder { - ActiveNone = 0, - - ActiveLeft = 1, - ActiveRight = 2, - ActiveTop = 4, - ActiveBottom = 8, - - ActiveTopLeft = ActiveTop | ActiveLeft, - ActiveTopRight = ActiveTop | ActiveRight, - ActiveBottomLeft = ActiveBottom | ActiveLeft, - ActiveBottomRight = ActiveBottom | ActiveRight, - - ACTIVE_BORDER_COUNT + ActiveTop = 0, + ActiveTopRight, + ActiveRight, + ActiveBottomRight, + ActiveBottom, + ActiveBottomLeft, + ActiveLeft, + ActiveTopLeft, + ACTIVE_BORDER_COUNT, + ActiveNone }; enum ActiveMaximizingMode diff --git a/twin/workspace.cpp b/twin/workspace.cpp index 5f75edd90..2d95e9226 100644 --- a/twin/workspace.cpp +++ b/twin/workspace.cpp @@ -23,8 +23,8 @@ License. See the file "COPYING" for the exact licensing terms. #include <tqbitmap.h> #include <tqclipboard.h> #include <tdemenubar.h> -#include <kprocess.h> -#include <kglobalaccel.h> +#include <tdeprocess.h> +#include <tdeglobalaccel.h> #include <dcopclient.h> #include <kipc.h> @@ -58,7 +58,7 @@ Workspace *Workspace::_self = 0; TDEProcess* kompmgr = 0; TDESelectionOwner* kompmgr_selection; -bool allowKompmgrRestart = TRUE; +bool allowKompmgrRestart = true; extern bool disable_twin_composition_manager; bool supportsCompMgr() @@ -187,7 +187,7 @@ Workspace::Workspace( bool restore ) root = tqt_xrootwin(); default_colormap = DefaultColormap(tqt_xdisplay(), tqt_xscreen() ); installed_colormap = default_colormap; - session.setAutoDelete( TRUE ); + session.setAutoDelete( true ); for (int i = 0; i < ACTIVE_BORDER_COUNT; ++i) { @@ -195,9 +195,9 @@ Workspace::Workspace( bool restore ) active_windows[i] = None; } - connect( &temporaryRulesMessages, TQT_SIGNAL( gotMessage( const TQString& )), - this, TQT_SLOT( gotTemporaryRulesMessage( const TQString& ))); - connect( &rulesUpdatedTimer, TQT_SIGNAL( timeout()), this, TQT_SLOT( writeWindowRules())); + connect( &temporaryRulesMessages, TQ_SIGNAL( gotMessage( const TQString& )), + this, TQ_SLOT( gotTemporaryRulesMessage( const TQString& ))); + connect( &rulesUpdatedTimer, TQ_SIGNAL( timeout()), this, TQ_SLOT( writeWindowRules())); updateXTime(); // needed for proper initialization of user_time in Client ctor @@ -220,7 +220,7 @@ Workspace::Workspace( bool restore ) (WFlags)(TQt::WType_Desktop | TQt::WPaintUnclipped) ); - kapp->setGlobalMouseTracking( true ); // so that this doesn't mess eventmask on root window later + tdeApp->setGlobalMouseTracking( true ); // so that this doesn't mess eventmask on root window later // call this before XSelectInput() on the root window startup = new TDEStartupInfo( TDEStartupInfo::DisableKWinModule | TDEStartupInfo::AnnounceSilenceChanges, this ); @@ -259,7 +259,7 @@ Workspace::Workspace( bool restore ) init(); #if (TQT_VERSION-0 >= 0x030200) // XRANDR support - connect( kapp->desktop(), TQT_SIGNAL( resized( int )), TQT_SLOT( desktopResized())); + connect( tdeApp->desktop(), TQ_SIGNAL( resized( int )), TQ_SLOT( desktopResized())); #endif if (!supportsCompMgr()) { @@ -274,7 +274,7 @@ Workspace::Workspace( bool restore ) if (options->useTranslucency) { kompmgr = new TDEProcess; - connect(kompmgr, TQT_SIGNAL(receivedStderr(TDEProcess*, char*, int)), TQT_SLOT(handleKompmgrOutput(TDEProcess*, char*, int))); + connect(kompmgr, TQ_SIGNAL(receivedStderr(TDEProcess*, char*, int)), TQ_SLOT(handleKompmgrOutput(TDEProcess*, char*, int))); *kompmgr << TDE_COMPOSITOR_BINARY; if (kompmgrpid) { @@ -414,12 +414,12 @@ void Workspace::init() // extra NETRootInfo instance in Client mode is needed to get the values of the properties NETRootInfo client_info( tqt_xdisplay(), NET::ActiveWindow | NET::CurrentDesktop ); int initial_desktop; - if( !kapp->isSessionRestored()) + if( !tdeApp->isSessionRestored()) initial_desktop = client_info.currentDesktop(); else { - TDEConfigGroupSaver saver( kapp->sessionConfig(), "Session" ); - initial_desktop = kapp->sessionConfig()->readNumEntry( "desktop", 1 ); + TDEConfigGroupSaver saver( tdeApp->sessionConfig(), "Session" ); + initial_desktop = tdeApp->sessionConfig()->readNumEntry( "desktop", 1 ); } if( !setCurrentDesktop( initial_desktop )) setCurrentDesktop( 1 ); @@ -427,20 +427,20 @@ void Workspace::init() // now we know how many desktops we'll, thus, we initialise the positioning object initPositioning = new Placement(this); - connect(&reconfigureTimer, TQT_SIGNAL(timeout()), this, - TQT_SLOT(slotReconfigure())); - connect( &updateToolWindowsTimer, TQT_SIGNAL( timeout()), this, TQT_SLOT( slotUpdateToolWindows())); + connect(&reconfigureTimer, TQ_SIGNAL(timeout()), this, + TQ_SLOT(slotReconfigure())); + connect( &updateToolWindowsTimer, TQ_SIGNAL( timeout()), this, TQ_SLOT( slotUpdateToolWindows())); - connect(kapp, TQT_SIGNAL(appearanceChanged()), this, - TQT_SLOT(slotReconfigure())); - connect(kapp, TQT_SIGNAL(settingsChanged(int)), this, - TQT_SLOT(slotSettingsChanged(int))); - connect(kapp, TQT_SIGNAL( kipcMessage( int, int )), this, TQT_SLOT( kipcMessage( int, int ))); + connect(tdeApp, TQ_SIGNAL(appearanceChanged()), this, + TQ_SLOT(slotReconfigure())); + connect(tdeApp, TQ_SIGNAL(settingsChanged(int)), this, + TQ_SLOT(slotSettingsChanged(int))); + connect(tdeApp, TQ_SIGNAL( kipcMessage( int, int )), this, TQ_SLOT( kipcMessage( int, int ))); active_client = NULL; rootInfo->setActiveWindow( None ); focusToNull(); - if( !kapp->isSessionRestored()) + if( !tdeApp->isSessionRestored()) ++block_focus; // because it will be set below char nm[ 100 ]; @@ -503,7 +503,7 @@ void Workspace::init() } // end updates blocker block Client* new_active_client = NULL; - if( !kapp->isSessionRestored()) + if( !tdeApp->isSessionRestored()) { --block_focus; new_active_client = findClient( WindowMatchPredicate( client_info.activeWindow())); @@ -1188,10 +1188,10 @@ void Workspace::slotReconfigure() if (!kompmgr) { kompmgr = new TDEProcess; - connect(kompmgr, TQT_SIGNAL(receivedStderr(TDEProcess*, char*, int)), TQT_SLOT(handleKompmgrOutput(TDEProcess*, char*, int))); + connect(kompmgr, TQ_SIGNAL(receivedStderr(TDEProcess*, char*, int)), TQ_SLOT(handleKompmgrOutput(TDEProcess*, char*, int))); *kompmgr << TDE_COMPOSITOR_BINARY; } - TQTimer::singleShot( 200, this, TQT_SLOT(startKompmgr()) ); // wait some time to ensure system's ready for restart + TQTimer::singleShot( 200, this, TQ_SLOT(startKompmgr()) ); // wait some time to ensure system's ready for restart } } else @@ -1277,7 +1277,7 @@ TQStringList Workspace::configModules(bool controlCenter) args << "tde-twindecoration.desktop"; if (controlCenter) args << "tde-twinoptions.desktop"; - else if (kapp->authorizeControlModule("tde-twinoptions.desktop")) + else if (tdeApp->authorizeControlModule("tde-twinoptions.desktop")) args << "twinactions" << "twinfocus" << "twinmoving" << "twinadvanced" << "twinrules" << "twintranslucency"; return args; } @@ -1306,10 +1306,10 @@ bool Workspace::isNotManaged( const TQString& title ) if (r.search(title) != -1) { doNotManageList.remove( it ); - return TRUE; + return true; } } - return FALSE; + return false; } /*! @@ -1423,7 +1423,7 @@ bool Workspace::setCurrentDesktop( int new_desktop ) current_desktop = new_desktop; // change the desktop (so that Client::updateVisibility() works) - bool desktopHasCompositing = kapp->isCompositionManagerAvailable(); // Technically I should call isX11CompositionAvailable(), but it isn't initialized via my kapp constructir, and in this case it doesn't really matter anyway.... + bool desktopHasCompositing = tdeApp->isCompositionManagerAvailable(); // Technically I should call isX11CompositionAvailable(), but it isn't initialized via my tdeApp constructir, and in this case it doesn't really matter anyway.... if (!desktopHasCompositing) { // If composition is not in use then we can hide the old windows before showing the new ones for ( ClientList::ConstIterator it = stacking_order.begin(); it != stacking_order.end(); ++it) { @@ -1806,7 +1806,7 @@ void Workspace::setActiveScreenMouse( TQPoint mousepos ) TQRect Workspace::screenGeometry( int screen ) const { - if (( !options->xineramaEnabled ) || (kapp->desktop()->numScreens() < 2)) + if (( !options->xineramaEnabled ) || (tdeApp->desktop()->numScreens() < 2)) return tqApp->desktop()->geometry(); return tqApp->desktop()->screenGeometry( screen ); } @@ -1875,19 +1875,19 @@ void Workspace::calcDesktopLayout(int &x, int &y) const bool Workspace::addSystemTrayWin( WId w ) { if ( systemTrayWins.contains( w ) ) - return TRUE; + return true; NETWinInfo ni( tqt_xdisplay(), w, root, NET::WMKDESystemTrayWinFor ); WId trayWinFor = ni.kdeSystemTrayWinFor(); if ( !trayWinFor ) - return FALSE; + return false; systemTrayWins.append( SystemTrayWindow( w, trayWinFor ) ); XSelectInput( tqt_xdisplay(), w, StructureNotifyMask ); XAddToSaveSet( tqt_xdisplay(), w ); propagateSystemTrayWins(); - return TRUE; + return true; } /*! @@ -1897,7 +1897,7 @@ bool Workspace::addSystemTrayWin( WId w ) bool Workspace::removeSystemTrayWin( WId w, bool check ) { if ( !systemTrayWins.contains( w ) ) - return FALSE; + return false; if( check ) { // When getting UnmapNotify, it's not clear if it's the systray @@ -1925,7 +1925,7 @@ bool Workspace::removeSystemTrayWin( WId w, bool check ) systemTrayWins.remove( w ); XRemoveFromSaveSet (tqt_xdisplay (), w); propagateSystemTrayWins(); - return TRUE; + return true; } @@ -2155,16 +2155,16 @@ void Workspace::slotMouseEmulation() if ( mouse_emulation ) { XUngrabKeyboard(tqt_xdisplay(), get_tqt_x_time()); - mouse_emulation = FALSE; + mouse_emulation = false; return; } if ( XGrabKeyboard(tqt_xdisplay(), - root, FALSE, + root, false, GrabModeAsync, GrabModeAsync, get_tqt_x_time()) == GrabSuccess ) { - mouse_emulation = TRUE; + mouse_emulation = true; mouse_emulation_state = 0; mouse_emulation_window = 0; } @@ -2284,7 +2284,7 @@ unsigned int Workspace::sendFakedMouseEvent( TQPoint pos, WId w, MouseEmulation bool Workspace::keyPressMouseEmulation( XKeyEvent& ev ) { if ( root != tqt_xrootwin() ) - return FALSE; + return false; int kc = XkbKeycodeToKeysym(tqt_xdisplay(), ev.keycode, 0, 0); int km = ev.state & (ControlMask | Mod1Mask | ShiftMask); @@ -2361,16 +2361,16 @@ bool Workspace::keyPressMouseEmulation( XKeyEvent& ev ) // fall through case XK_Escape: XUngrabKeyboard(tqt_xdisplay(), get_tqt_x_time()); - mouse_emulation = FALSE; - return TRUE; + mouse_emulation = false; + return true; default: - return FALSE; + return false; } TQCursor::setPos( pos ); if ( mouse_emulation_state ) mouse_emulation_state = sendFakedMouseEvent( pos, mouse_emulation_window, EmuMove, 0, mouse_emulation_state ); - return TRUE; + return true; } @@ -2396,8 +2396,8 @@ void Workspace::requestDelayFocus( Client* c ) delayfocus_client = c; delete delayFocusTimer; delayFocusTimer = new TQTimer( this ); - connect( delayFocusTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( delayFocus() ) ); - delayFocusTimer->start( options->delayFocusInterval, TRUE ); + connect( delayFocusTimer, TQ_SIGNAL( timeout() ), this, TQ_SLOT( delayFocus() ) ); + delayFocusTimer->start( options->delayFocusInterval, true ); } void Workspace::cancelDelayFocus() @@ -2506,7 +2506,7 @@ void Workspace::reserveActiveBorder( ActiveBorder border ) return; if (active_reserved[border]++ == 0) - TQTimer::singleShot(0, this, TQT_SLOT(updateActiveBorders())); + TQTimer::singleShot(0, this, TQ_SLOT(updateActiveBorders())); } void Workspace::unreserveActiveBorder( ActiveBorder border ) @@ -2516,7 +2516,7 @@ void Workspace::unreserveActiveBorder( ActiveBorder border ) assert(active_reserved[ border ] > 0); if (--active_reserved[ border ] == 0) - TQTimer::singleShot(0, this, TQT_SLOT(updateActiveBorders())); + TQTimer::singleShot(0, this, TQ_SLOT(updateActiveBorders())); } void Workspace::checkActiveBorder(const TQPoint &pos, Time now) @@ -2542,15 +2542,21 @@ void Workspace::checkActiveBorder(const TQPoint &pos, Time now) int distance_reset = activation_distance + 10; // Leave active maximizing mode when window moved away - if (active_current_border != ActiveNone && - (pos.x() > activeLeft + distance_reset) && - (pos.x() < activeRight - distance_reset) && - (pos.y() > activeTop + distance_reset) && - (pos.y() < activeBottom - distance_reset)) - { - if (movingClient && - (options->activeBorders() == Options::ActiveTileMaximize || - options->activeBorders() == Options::ActiveTileOnly)) + if (movingClient && + (options->activeBorders() == Options::ActiveTileMaximize || + options->activeBorders() == Options::ActiveTileOnly)) + { + TQRect r = TQApplication::desktop()->screenGeometry(pos); + activeTop = r.top(); + activeBottom = r.bottom(); + activeLeft = r.left(); + activeRight = r.right(); + + if (active_current_border != ActiveNone && + (pos.x() > activeLeft + distance_reset) && + (pos.x() < activeRight - distance_reset) && + (pos.y() > activeTop + distance_reset) && + (pos.y() < activeBottom - distance_reset)) { movingClient->cancelActiveBorderMaximizing(); return; @@ -2559,53 +2565,77 @@ void Workspace::checkActiveBorder(const TQPoint &pos, Time now) // These checks take activation distance into account, creating a // virtual "activation band" for easier border/corner activation. - bool active_left = pos.x() < activeLeft + activation_distance, - active_right = pos.x() > activeRight - activation_distance, - active_top = pos.y() < activeTop + activation_distance, - active_bottom = pos.y() > activeBottom - activation_distance; + bool active_left = pos.x() < activeLeft + activation_distance; + bool active_right = pos.x() > activeRight - activation_distance; + bool active_top = pos.y() < activeTop + activation_distance; + bool active_bottom = pos.y() > activeBottom - activation_distance; + + if (!active_left && !active_right && !active_top && !active_bottom) + return; // These checks are used to make corner activation easier: we assume // a 25% zone on the edge of each border where instead of half size // tiling we perform quarter size tiling. The rest 50% is left for // normal half size tiling. - uint active_width_quart = activeRight / 4, - active_height_quart = activeBottom / 4; + // These options make sense only for the tiling mode. + int active_width_quart = (activeRight - activeLeft) / 4; + int active_height_quart = (activeBottom - activeTop) / 4; - bool active_qleft = pos.x() < activeLeft + active_width_quart, - active_qright = pos.x() > activeRight - active_width_quart, - active_qtop = pos.y() < activeTop + active_height_quart, - active_qbottom = pos.y() > activeBottom - active_height_quart; - - int border = ActiveNone; - - if (active_left) border |= ActiveLeft; - if (active_right) border |= ActiveRight; - if (active_top) border |= ActiveTop; - if (active_bottom) border |= ActiveBottom; - - if (border == ActiveLeft || border == ActiveRight) { - if (active_qtop) border |= ActiveTop; - if (active_qbottom) border |= ActiveBottom; + bool active_qleft = false; + bool active_qright = false; + bool active_qtop = false; + bool active_qbottom = false; + if (options->activeBorders() == Options::ActiveTileMaximize || + options->activeBorders() == Options::ActiveTileOnly) + { + active_qleft = pos.x() < activeLeft + active_width_quart; + active_qright = pos.x() > activeRight - active_width_quart; + active_qtop = pos.y() < activeTop + active_height_quart; + active_qbottom = pos.y() > activeBottom - active_height_quart; } - else if (border == ActiveTop || border == ActiveBottom) { - if (active_qleft) border |= ActiveLeft; - if (active_qright) border |= ActiveRight; + ActiveBorder border = ActiveNone; + if ((active_left && active_qtop) || (active_top && active_qleft)) + { + border = ActiveTopLeft; } - - bool border_valid = false; - for (int i = 0; i < ACTIVE_BORDER_COUNT; ++i) { - if (border == (ActiveBorder)i) { - border_valid = true; - } + else if ((active_right && active_qtop) || (active_top && active_qright)) + { + border = ActiveTopRight; } - - if (!border_valid) { - abort(); + else if ((active_left && active_qbottom) || (active_bottom && active_qleft)) + { + border = ActiveBottomLeft; + } + else if ((active_right && active_qbottom) || (active_bottom && active_qright)) + { + border = ActiveBottomRight; + } + else if (active_left) + { + border = ActiveLeft; + } + else if (active_right) + { + border = ActiveRight; + } + else if (active_top) + { + border = ActiveTop; + } + else if (active_bottom) + { + border = ActiveBottom; + } + else + { + // Should never happen + abort(); } - if (border == ActiveNone || active_windows[border] == None) { - return; + if( active_windows[border] == None ) + { + return; } if ((active_current_border == border) && @@ -2627,7 +2657,7 @@ void Workspace::checkActiveBorder(const TQPoint &pos, Time now) if (options->activeBorders() == Options::ActiveSwitchAlways || options->activeBorders() == Options::ActiveSwitchOnMove) { - activeBorderSwitchDesktop((ActiveBorder)border, pos); + activeBorderSwitchDesktop(border, pos); return; // Don't reset cursor position } @@ -2637,6 +2667,7 @@ void Workspace::checkActiveBorder(const TQPoint &pos, Time now) { if (!movingClient->isResizable()) return; movingClient->setActiveBorderMode(ActiveMaximizeMode); + movingClient->setActiveBorderPos(pos); movingClient->setActiveBorder(ActiveNone); movingClient->setActiveBorderMaximizing(true); } @@ -2647,7 +2678,8 @@ void Workspace::checkActiveBorder(const TQPoint &pos, Time now) { if (!movingClient->isResizable()) return; movingClient->setActiveBorderMode(ActiveTilingMode); - movingClient->setActiveBorder((ActiveBorder)border); + movingClient->setActiveBorderPos(pos); + movingClient->setActiveBorder(border); movingClient->setActiveBorderMaximizing(true); } @@ -2661,7 +2693,7 @@ void Workspace::checkActiveBorder(const TQPoint &pos, Time now) // Desktop switching if (options->activeBorders() == Options::ActiveSwitchAlways && isSide) { - activeBorderSwitchDesktop((ActiveBorder)border, pos); + activeBorderSwitchDesktop(border, pos); return; // Don't reset cursor position } } @@ -2669,7 +2701,7 @@ void Workspace::checkActiveBorder(const TQPoint &pos, Time now) } else { - active_current_border = (ActiveBorder)border; + active_current_border = border; active_time_first = now; active_time_last = now; active_push_point = pos; @@ -2680,9 +2712,9 @@ void Workspace::checkActiveBorder(const TQPoint &pos, Time now) { // Reset the pointer to find out whether the user is really pushing // (ordered according to enum ActiveBorder minus ActiveNone) - const int xdiff[ACTIVE_BORDER_COUNT] = {1, -1, 0, 0, 1, -1, 1, -1}; - const int ydiff[ACTIVE_BORDER_COUNT] = {0, 0, 1, -1, 1, 1, -1, -1}; - TQCursor::setPos(pos.x() + xdiff[border - 1], pos.y() + ydiff[border - 1]); + const int xdiff[ ACTIVE_BORDER_COUNT ] = { 0, -1, -1, -1, 0, 1, 1, 1 }; + const int ydiff[ ACTIVE_BORDER_COUNT ] = { 1, 1, 0, -1, -1, -1, 0, 1 }; + TQCursor::setPos(pos.x() + xdiff[border], pos.y() + ydiff[border]); } } @@ -2788,12 +2820,12 @@ void Workspace::lostTopMenuSelection() { // kdDebug() << "lost TopMenu selection" << endl; // make sure this signal is always set when not owning the selection - disconnect( topmenu_watcher, TQT_SIGNAL( lostOwner()), this, TQT_SLOT( lostTopMenuOwner())); - connect( topmenu_watcher, TQT_SIGNAL( lostOwner()), this, TQT_SLOT( lostTopMenuOwner())); + disconnect( topmenu_watcher, TQ_SIGNAL( lostOwner()), this, TQ_SLOT( lostTopMenuOwner())); + connect( topmenu_watcher, TQ_SIGNAL( lostOwner()), this, TQ_SLOT( lostTopMenuOwner())); if( !managing_topmenus ) return; - connect( topmenu_watcher, TQT_SIGNAL( lostOwner()), this, TQT_SLOT( lostTopMenuOwner())); - disconnect( topmenu_selection, TQT_SIGNAL( lostOwnership()), this, TQT_SLOT( lostTopMenuSelection())); + connect( topmenu_watcher, TQ_SIGNAL( lostOwner()), this, TQ_SLOT( lostTopMenuOwner())); + disconnect( topmenu_selection, TQ_SIGNAL( lostOwnership()), this, TQ_SLOT( lostTopMenuSelection())); managing_topmenus = false; delete topmenu_space; topmenu_space = NULL; @@ -2822,8 +2854,8 @@ void Workspace::setupTopMenuHandling() { if( managing_topmenus ) return; - connect( topmenu_selection, TQT_SIGNAL( lostOwnership()), this, TQT_SLOT( lostTopMenuSelection())); - disconnect( topmenu_watcher, TQT_SIGNAL( lostOwner()), this, TQT_SLOT( lostTopMenuOwner())); + connect( topmenu_selection, TQ_SIGNAL( lostOwnership()), this, TQ_SLOT( lostTopMenuSelection())); + disconnect( topmenu_watcher, TQ_SIGNAL( lostOwner()), this, TQ_SLOT( lostTopMenuOwner())); managing_topmenus = true; topmenu_space = new TQWidget; Window stack[ 2 ]; @@ -2934,7 +2966,7 @@ void Workspace::startKompmgr() } else { // Try again a bit later! - TQTimer::singleShot( 200, this, TQT_SLOT(startKompmgr()) ); + TQTimer::singleShot( 200, this, TQ_SLOT(startKompmgr()) ); return; } pid_t kompmgrpid = getCompositorPID(); @@ -2949,7 +2981,7 @@ void Workspace::startKompmgr() } if (!kompmgr->start(TDEProcess::OwnGroup, TDEProcess::Stderr)) { - options->useTranslucency = FALSE; + options->useTranslucency = false; TDEProcess proc; proc << "kdialog" << "--error" << i18n("The Composite Manager could not be started.\\nMake sure you have \"" TDE_COMPOSITOR_BINARY "\" in a $PATH directory.") @@ -2962,16 +2994,16 @@ void Workspace::startKompmgr() char selection_name[ 100 ]; sprintf( selection_name, "_NET_WM_CM_S%d", DefaultScreen( tqt_xdisplay())); kompmgr_selection = new TDESelectionOwner( selection_name ); - connect( kompmgr_selection, TQT_SIGNAL( lostOwnership()), TQT_SLOT( stopKompmgr())); + connect( kompmgr_selection, TQ_SIGNAL( lostOwnership()), TQ_SLOT( stopKompmgr())); kompmgr_selection->claim( true ); - connect(kompmgr, TQT_SIGNAL(processExited(TDEProcess*)), TQT_SLOT(restartKompmgr(TDEProcess*))); - options->useTranslucency = TRUE; - //allowKompmgrRestart = FALSE; - //TQTimer::singleShot( 60000, this, TQT_SLOT(unblockKompmgrRestart()) ); + connect(kompmgr, TQ_SIGNAL(processExited(TDEProcess*)), TQ_SLOT(restartKompmgr(TDEProcess*))); + options->useTranslucency = true; + //allowKompmgrRestart = false; + //TQTimer::singleShot( 60000, this, TQ_SLOT(unblockKompmgrRestart()) ); TQByteArray ba; TQDataStream arg(ba, IO_WriteOnly); arg << ""; - kapp->dcopClient()->emitDCOPSignal("default", "kompmgrStarted()", ba); + tdeApp->dcopClient()->emitDCOPSignal("default", "kompmgrStarted()", ba); } if (popup){ delete popup; popup = 0L; } // to add/remove opacity slider } @@ -2983,14 +3015,14 @@ void Workspace::stopKompmgr() } delete kompmgr_selection; kompmgr_selection = NULL; - kompmgr->disconnect(this, TQT_SLOT(restartKompmgr(TDEProcess*))); - options->useTranslucency = FALSE; + kompmgr->disconnect(this, TQ_SLOT(restartKompmgr(TDEProcess*))); + options->useTranslucency = false; if (popup){ delete popup; popup = 0L; } // to add/remove opacity slider kompmgr->kill(SIGKILL); TQByteArray ba; TQDataStream arg(ba, IO_WriteOnly); arg << ""; - kapp->dcopClient()->emitDCOPSignal("default", "kompmgrStopped()", ba); + tdeApp->dcopClient()->emitDCOPSignal("default", "kompmgrStopped()", ba); } void Workspace::kompmgrReloadSettings() @@ -3008,11 +3040,11 @@ bool Workspace::kompmgrIsRunning() void Workspace::unblockKompmgrRestart() { - allowKompmgrRestart = TRUE; + allowKompmgrRestart = true; } void Workspace::restartKompmgr( TDEProcess *proc ) -// this is for inernal purpose (crashhandling) only, usually you want to use workspace->stopKompmgr(); TQTimer::singleShot(200, workspace, TQT_SLOT(startKompmgr())); +// this is for inernal purpose (crashhandling) only, usually you want to use workspace->stopKompmgr(); TQTimer::singleShot(200, workspace, TQ_SLOT(startKompmgr())); { bool crashed; if (proc->signalled()) { // looks like kompmgr may have crashed @@ -3027,7 +3059,7 @@ void Workspace::restartKompmgr( TDEProcess *proc ) { delete kompmgr_selection; kompmgr_selection = NULL; - options->useTranslucency = FALSE; + options->useTranslucency = false; if (crashed) { TDEProcess proc; proc << "kdialog" << "--error" @@ -3051,7 +3083,7 @@ void Workspace::restartKompmgr( TDEProcess *proc ) { delete kompmgr_selection; kompmgr_selection = NULL; - options->useTranslucency = FALSE; + options->useTranslucency = false; TDEProcess proc; proc << "kdialog" << "--error" << i18n("The Composite Manager could not be started.\\nMake sure you have \"" TDE_COMPOSITOR_BINARY "\" in a $PATH directory.") @@ -3060,8 +3092,8 @@ void Workspace::restartKompmgr( TDEProcess *proc ) } else { - allowKompmgrRestart = FALSE; - TQTimer::singleShot( 60000, this, TQT_SLOT(unblockKompmgrRestart()) ); + allowKompmgrRestart = false; + TQTimer::singleShot( 60000, this, TQ_SLOT(unblockKompmgrRestart()) ); } } } @@ -3088,7 +3120,7 @@ void Workspace::handleKompmgrOutput( TDEProcess* , char *buffer, int buflen) else return; //skip others // kompmgr startup failed or succeeded, release connection kompmgr->closeStderr(); - disconnect(kompmgr, TQT_SIGNAL(receivedStderr(TDEProcess*, char*, int)), this, TQT_SLOT(handleKompmgrOutput(TDEProcess*, char*, int))); + disconnect(kompmgr, TQ_SIGNAL(receivedStderr(TDEProcess*, char*, int)), this, TQ_SLOT(handleKompmgrOutput(TDEProcess*, char*, int))); if( !message.isEmpty()) { TDEProcess proc; @@ -3099,7 +3131,6 @@ void Workspace::handleKompmgrOutput( TDEProcess* , char *buffer, int buflen) } } - void Workspace::setOpacity(unsigned long winId, unsigned int opacityPercent) { if (opacityPercent > 100) opacityPercent = 100; diff --git a/twin/workspace.h b/twin/workspace.h index 954ea5191..17ef0c0b3 100644 --- a/twin/workspace.h +++ b/twin/workspace.h @@ -74,7 +74,7 @@ class Workspace : public TQObject, public KWinInterface, public KDecorationDefin { TQ_OBJECT public: - Workspace( bool restore = FALSE ); + Workspace( bool restore = false ); virtual ~Workspace(); static Workspace * self() { return _self; } @@ -119,8 +119,8 @@ class Workspace : public TQObject, public KWinInterface, public KDecorationDefin // stealing prevention code. Client* mostRecentlyActivatedClient() const; - void activateClient( Client*, bool force = FALSE ); - void requestFocus( Client* c, bool force = FALSE ); + void activateClient( Client*, bool force = false ); + void requestFocus( Client* c, bool force = false ); void takeActivity( Client* c, int flags, bool handled ); // flags are ActivityFlags void handleTakeActivity( Client* c, Time timestamp, int flags ); // flags are ActivityFlags bool allowClientActivation( const Client* c, Time time = -1U, bool focus_in = false ); @@ -206,6 +206,11 @@ class Workspace : public TQObject, public KWinInterface, public KDecorationDefin void showWindowMenuAt( unsigned long id, int x, int y ); void showWindowMenu( unsigned long id ); + + void tileWindowToBorder(unsigned long w1, int location); + void tileTwoWindowsHorizontally(unsigned long w1, unsigned long w2); + void tileTwoWindowsVertically(unsigned long w1, unsigned long w2); + void tileFourWindowsInGrid(unsigned long w1, unsigned long w2, unsigned long w3, unsigned long w4); void kDestopResized(); /** @@ -410,6 +415,7 @@ class Workspace : public TQObject, public KWinInterface, public KDecorationDefin void writeWindowRules(); void kipcMessage( int id, int data ); void updateActiveBorders(); + void tileCurrentWindowToBorder(int position); // kompmgr void setPopupClientOpacity(int v); void resetClientOpacity(); @@ -501,6 +507,7 @@ class Workspace : public TQObject, public KWinInterface, public KDecorationDefin void calcDesktopLayout(int &x, int &y) const; + TQPopupMenu* makeTileMenu(); TQPopupMenu* clientPopup(); void closeActivePopup(); @@ -585,6 +592,7 @@ class Workspace : public TQObject, public KWinInterface, public KDecorationDefin TQPopupMenu *advanced_popup; TQPopupMenu *desk_popup; int desk_popup_index; + int tile_popup_index; TDEGlobalAccel *keys; TDEGlobalAccel *client_keys; |