summaryrefslogtreecommitdiffstats
path: root/tdeui/tdemenubar.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tdeui/tdemenubar.cpp')
-rw-r--r--tdeui/tdemenubar.cpp64
1 files changed, 32 insertions, 32 deletions
diff --git a/tdeui/tdemenubar.cpp b/tdeui/tdemenubar.cpp
index 0a5fe0188..c64e2c188 100644
--- a/tdeui/tdemenubar.cpp
+++ b/tdeui/tdemenubar.cpp
@@ -40,7 +40,7 @@
#include <kdebug.h>
#include <kmanagerselection.h>
-#ifdef Q_WS_X11
+#ifdef TQ_WS_X11
#include <twin.h>
#include <twinmodule.h>
#include <qxembed.h>
@@ -74,7 +74,7 @@ public:
: forcedTopLevel( false ),
topLevel( false ),
wasTopLevel( false ),
-#ifdef Q_WS_X11
+#ifdef TQ_WS_X11
selection( NULL ),
#endif
min_size( 0, 0 )
@@ -82,7 +82,7 @@ public:
}
~KMenuBarPrivate()
{
-#ifdef Q_WS_X11
+#ifdef TQ_WS_X11
delete selection;
#endif
}
@@ -93,7 +93,7 @@ public:
int lineWidth; // dtto
int margin; // dtto
bool fallback_mode; // dtto
-#ifdef Q_WS_X11
+#ifdef TQ_WS_X11
TDESelectionWatcher* selection;
#endif
TQTimer selection_timer;
@@ -101,7 +101,7 @@ public:
static Atom makeSelectionAtom();
};
-#ifdef Q_WS_X11
+#ifdef TQ_WS_X11
static Atom selection_atom = None;
static Atom msg_type_atom = None;
@@ -121,7 +121,7 @@ void initAtoms()
Atom KMenuBar::KMenuBarPrivate::makeSelectionAtom()
{
-#ifdef Q_WS_X11
+#ifdef TQ_WS_X11
if( selection_atom == None )
initAtoms();
return selection_atom;
@@ -133,19 +133,19 @@ Atom KMenuBar::KMenuBarPrivate::makeSelectionAtom()
KMenuBar::KMenuBar(TQWidget *parent, const char *name)
: TQMenuBar(parent, name)
{
-#ifdef Q_WS_X11
+#ifdef TQ_WS_X11
QXEmbed::initialize();
#endif
d = new KMenuBarPrivate;
- connect( &d->selection_timer, TQT_SIGNAL( timeout()),
- this, TQT_SLOT( selectionTimeout()));
+ connect( &d->selection_timer, TQ_SIGNAL( timeout()),
+ this, TQ_SLOT( selectionTimeout()));
- connect( tqApp->desktop(), TQT_SIGNAL( resized( int )), TQT_SLOT( updateFallbackSize()));
+ connect( tqApp->desktop(), TQ_SIGNAL( resized( int )), TQ_SLOT( updateFallbackSize()));
- if ( kapp )
+ if ( tdeApp )
// toolbarAppearanceChanged(int) is sent when changing macstyle
- connect( kapp, TQT_SIGNAL(toolbarAppearanceChanged(int)),
- this, TQT_SLOT(slotReadConfig()));
+ connect( tdeApp, TQ_SIGNAL(toolbarAppearanceChanged(int)),
+ this, TQ_SLOT(slotReadConfig()));
slotReadConfig();
}
@@ -176,13 +176,13 @@ void KMenuBar::setTopLevelMenuInternal(bool top_level)
d->topLevel = top_level;
if ( isTopLevelMenu() )
{
-#ifdef Q_WS_X11
+#ifdef TQ_WS_X11
d->selection = new TDESelectionWatcher( KMenuBarPrivate::makeSelectionAtom(),
DefaultScreen( tqt_xdisplay()));
- connect( d->selection, TQT_SIGNAL( newOwner( Window )),
- this, TQT_SLOT( updateFallbackSize()));
- connect( d->selection, TQT_SIGNAL( lostOwner()),
- this, TQT_SLOT( updateFallbackSize()));
+ connect( d->selection, TQ_SIGNAL( newOwner( Window )),
+ this, TQ_SLOT( updateFallbackSize()));
+ connect( d->selection, TQ_SIGNAL( lostOwner()),
+ this, TQ_SLOT( updateFallbackSize()));
#endif
d->frameStyle = frameStyle();
d->lineWidth = lineWidth();
@@ -190,7 +190,7 @@ void KMenuBar::setTopLevelMenuInternal(bool top_level)
d->fallback_mode = false;
bool wasShown = !isHidden();
reparent( parentWidget(), (WFlags)(WType_TopLevel | WStyle_Tool | WStyle_Customize | WStyle_NoBorder), TQPoint(0,0), false );
-#ifdef Q_WS_X11
+#ifdef TQ_WS_X11
KWin::setType( winId(), NET::TopMenu );
if( parentWidget())
XSetTransientForHint( tqt_xdisplay(), winId(), parentWidget()->topLevelWidget()->winId());
@@ -206,7 +206,7 @@ void KMenuBar::setTopLevelMenuInternal(bool top_level)
show();
} else
{
-#ifdef Q_WS_X11
+#ifdef TQ_WS_X11
delete d->selection;
d->selection = NULL;
#endif
@@ -244,7 +244,7 @@ bool KMenuBar::eventFilter(TQObject *obj, TQEvent *ev)
{
if ( d->topLevel )
{
- if ( parentWidget() && TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(parentWidget()->topLevelWidget()) )
+ if ( parentWidget() && obj == parentWidget()->topLevelWidget() )
{
if( ev->type() == TQEvent::Resize )
return false; // ignore resizing of parent, TQMenuBar would try to adjust size
@@ -257,20 +257,20 @@ bool KMenuBar::eventFilter(TQObject *obj, TQEvent *ev)
// will update the state properly
setTopLevelMenuInternal( d->topLevel );
}
- if( parentWidget() && TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(parentWidget()) && ev->type() == TQEvent::Reparent )
+ if( parentWidget() && obj == parentWidget() && ev->type() == TQEvent::Reparent )
{
-#ifdef Q_WS_X11
+#ifdef TQ_WS_X11
XSetTransientForHint( tqt_xdisplay(), winId(), parentWidget()->topLevelWidget()->winId());
#else
//TODO: WIN32?
#endif
setShown( parentWidget()->isTopLevel() || parentWidget()->isVisible());
}
- if( parentWidget() && !parentWidget()->isTopLevel() && TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(parentWidget()))
+ if( parentWidget() && !parentWidget()->isTopLevel() && obj == parentWidget())
{ // if the parent is not toplevel, KMenuBar needs to match its visibility status
if( ev->type() == TQEvent::Show )
{
-#ifdef Q_WS_X11
+#ifdef TQ_WS_X11
XSetTransientForHint( tqt_xdisplay(), winId(), parentWidget()->topLevelWidget()->winId());
#else
//TODO: WIN32?
@@ -283,7 +283,7 @@ bool KMenuBar::eventFilter(TQObject *obj, TQEvent *ev)
}
else
{
- if( parentWidget() && TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(parentWidget()->topLevelWidget()))
+ if( parentWidget() && obj == parentWidget()->topLevelWidget())
{
if( ev->type() == TQEvent::WindowStateChange
&& !parentWidget()->topLevelWidget()->isFullScreen() )
@@ -303,7 +303,7 @@ void KMenuBar::updateFallbackSize()
{
if( !d->topLevel )
return;
-#ifdef Q_WS_X11
+#ifdef TQ_WS_X11
if( d->selection->owner() != None )
#endif
{ // somebody is managing us, don't mess anything, undo changes
@@ -333,14 +333,14 @@ void KMenuBar::selectionTimeout()
int screen = xineramaConfig.readNumEntry("MenubarScreen",
TQApplication::desktop()->screenNumber(TQPoint(0,0)) );
TQRect area;
- if (kapp->desktop()->numScreens() < 2)
- area = kapp->desktop()->geometry();
+ if (tdeApp->desktop()->numScreens() < 2)
+ area = tdeApp->desktop()->geometry();
else
- area = kapp->desktop()->screenGeometry(screen);
+ area = tdeApp->desktop()->screenGeometry(screen);
int margin = 0;
move(area.left() - margin, area.top() - margin);
setFixedSize(area.width() + 2* margin , heightForWidth( area.width() + 2 * margin ) );
-#ifdef Q_WS_X11
+#ifdef TQ_WS_X11
int strut_height = height() - margin;
if( strut_height < 0 )
strut_height = 0;
@@ -426,7 +426,7 @@ TQSize KMenuBar::sizeHint() const
return TQSize( w, h );
}
-#ifdef Q_WS_X11
+#ifdef TQ_WS_X11
bool KMenuBar::x11Event( XEvent* ev )
{
if( ev->type == ClientMessage && ev->xclient.message_type == msg_type_atom