--------------Boundary-00=_2ZWP54I81HGA7S05ACLH Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit On Friday 08 March 2002 11:07 am, John Firebaugh wrote: > On Friday 08 March 2002 10:00 am, Richard Moore wrote: > > Does this/should this affect extensions as well? > > It probably should. The attached patches for kdelibs and kicker implement notification of changes in alignment for applets and extensions. This is a prerequisite for fixing bugs with the publishing of icon geometries in taskbars. It requires binary incompatible changes. Therefore I consider it to be a critical fix for 3.0 -- if it doesn't go in now, the bug can't be fixed until the next time BIC changes are allowed. May I commit? -John --------------Boundary-00=_2ZWP54I81HGA7S05ACLH Content-Type: text/x-diff; charset="iso-8859-1"; name="kdelibs.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="kdelibs.diff" ? kdelibs.diff ? kpanelapplet.diff ? kdecore/kapplication.loT ? kdewidgets/pics/Makefile Index: kdeui/kpanelapplet.cpp =================================================================== RCS file: /home/kde/kdelibs/kdeui/kpanelapplet.cpp,v retrieving revision 1.20 diff -u -3 -p -r1.20 kpanelapplet.cpp --- kdeui/kpanelapplet.cpp 2002/03/04 00:51:50 1.20 +++ kdeui/kpanelapplet.cpp 2002/03/09 17:13:18 @@ -30,8 +30,8 @@ KPanelApplet::KPanelApplet(const QString int actions, QWidget *parent, const char *name, WFlags f) : QFrame(parent, name, f) , _type(type) - , _orient( Horizontal ) - , _dir(Up) + , _position( pBottom ) + , _alignment( LeftTop ) , _config(0) , _actions(actions) { @@ -50,20 +50,49 @@ KPanelApplet::~KPanelApplet() delete _config; } -void KPanelApplet::slotSetOrientation(Orientation o) +void KPanelApplet::setPosition( Position p ) { - _orient = o; - orientationChange( o ); + if( _position == p ) return; + _position = p; + positionChange( p ); +} + +void KPanelApplet::setAlignment( Alignment a ) +{ + if( _alignment == a ) return; + _alignment = a; + alignmentChange( a ); +} + +// FIXME: Remove implementation for KDE 4 +void KPanelApplet::positionChange( Position ) +{ + orientationChange( orientation() ); QResizeEvent e( size(), size() ); resizeEvent( &e ); + popupDirectionChange( popupDirection() ); } -void KPanelApplet::slotSetPopupDirection(Direction d) +Qt::Orientation KPanelApplet::orientation() const { - _dir = d; - popupDirectionChange( d ); + if( _position == pTop || _position == pBottom ) { + return Horizontal; + } else { + return Vertical; + } } +// FIXME: Remove for KDE 4 +KPanelApplet::Direction KPanelApplet::popupDirection() +{ + switch( _position ) { + case pTop: return Down; + case pRight: return Left; + case pLeft: return Right; + default: + case pBottom: return Up; + } +} void KPanelApplet::action( Action a ) { Index: kdeui/kpanelapplet.h =================================================================== RCS file: /home/kde/kdelibs/kdeui/kpanelapplet.h,v retrieving revision 1.25 diff -u -3 -p -r1.25 kpanelapplet.h --- kdeui/kpanelapplet.h 2002/03/04 00:51:51 1.25 +++ kdeui/kpanelapplet.h 2002/03/09 17:13:18 @@ -108,6 +108,10 @@ public: * which items the context menu over the applet handle contains. */ enum Action { About = 1, Help = 2, Preferences = 4, ReportBug = 8 }; + // FIXME: Remove 'p' from element names for KDE 4. + enum Position { pLeft = 0, pRight, pTop, pBottom }; + enum Alignment { LeftTop = 0, Center, RightBottom }; + // FIXME: Remove for KDE 4. enum Direction { Up = 0, Down, Left, Right }; /** @@ -205,6 +209,15 @@ public: **/ virtual void action( Action a ); + /** + * @internal + **/ + void setPosition( Position p ); + /** + * @internal + **/ + void setAlignment( Alignment a ); + signals: /** * Emit this signal to make the panel relayout all applets, when @@ -227,18 +240,6 @@ signals: **/ void requestFocus(); - -public slots: - /** - * Don't reimplement, this is used internally - **/ - void slotSetOrientation(Orientation o); - - /** - * Don't reimplement, this is used internally - **/ - void slotSetPopupDirection(Direction d); - protected: /** @@ -280,36 +281,63 @@ protected: /** * @return the applet's orientation. (horizontal or vertical) + **/ + Orientation orientation() const; + /** + * @return the applet's position. (top, left, bottom, or right) **/ - Orientation orientation() const { return _orient; } + Position position() const { return _position; } + /** + * @return the applet's alignment. (top/left, center, or bottom/right) + **/ + Alignment alignment() const { return _alignment; } + /** + * The panel on which this applet resides has changed its position. + * Reimplement this change handler in order to adjust the look of your + * applet. + **/ + virtual void positionChange( Position p ); + + /** + * The panel on which this applet resides has changed its alignment. + * Reimplement this change handler in order to adjust the look of your + * applet. + **/ + virtual void alignmentChange( Alignment a ) {}; /** * The orientation changed to @p orientation. Reimplement this * change handler in order to adjust the look of your applet. + * + * @deprecated Reimplement arrangementChanged instead. **/ + // FIXME: Remove for KDE 4 virtual void orientationChange( Orientation /* orientation*/) {} /** * You may need this if you want to popup menus at the right position. * * See @ref popupDirectionChange() + * + * @deprecated Use position() instead. **/ - Direction popupDirection() const { return _dir; } - + // FIXME: Remove for KDE 4 + Direction popupDirection(); /** * The popup direction changed to @p direction. Reimplement this * change handler in order to adjust the look of your applet. + * + * @deprecated Reimplement arrangementChanged instead. **/ + // FIXME: Remove for KDE 4 virtual void popupDirectionChange( Direction /*direction*/ ) {} - - private: Type _type; - Orientation _orient; - Direction _dir; + Position _position; + Alignment _alignment; KConfig* _config; int _actions; protected: Index: kdeui/kpanelextension.cpp =================================================================== RCS file: /home/kde/kdelibs/kdeui/kpanelextension.cpp,v retrieving revision 1.4 diff -u -3 -p -r1.4 kpanelextension.cpp --- kdeui/kpanelextension.cpp 2002/03/04 00:51:51 1.4 +++ kdeui/kpanelextension.cpp 2002/03/09 17:13:18 @@ -30,7 +30,8 @@ KPanelExtension::KPanelExtension(const Q int actions, QWidget *parent, const char *name) : QFrame(parent, name) , _type(type) - , _pos( Top ) + , _position( Top ) + , _alignment( LeftTop ) , _config(0) , _actions(actions) { @@ -43,14 +44,20 @@ KPanelExtension::~KPanelExtension() delete _config; } -void KPanelExtension::slotSetPosition(Position p) +void KPanelExtension::setPosition( Position p ) { - _pos = p; - positionChange(p); - QResizeEvent e(size(), size()); - resizeEvent(&e); + if( _position == p ) return; + _position = p; + positionChange( p ); } +void KPanelExtension::setAlignment( Alignment a ) +{ + if( _alignment == a ) return; + _alignment = a; + alignmentChange( a ); +} + void KPanelExtension::action( Action a ) { if ( (a & About) != 0 ) @@ -65,7 +72,7 @@ void KPanelExtension::action( Action a ) Qt::Orientation KPanelExtension::orientation() { - if (_pos == Left || _pos == Right) + if (_position == Left || _position == Right) return Vertical; else return Horizontal; Index: kdeui/kpanelextension.h =================================================================== RCS file: /home/kde/kdelibs/kdeui/kpanelextension.h,v retrieving revision 1.8 diff -u -3 -p -r1.8 kpanelextension.h --- kdeui/kpanelextension.h 2002/03/04 00:51:51 1.8 +++ kdeui/kpanelextension.h 2002/03/09 17:13:18 @@ -102,6 +102,7 @@ public: enum Type { Normal = 0, Stretch }; enum Action { About = 1, Help = 2, Preferences = 4, ReportBug = 8 }; enum Position { Left = 0, Right, Top, Bottom }; + enum Alignment { LeftTop = 0, Center, RightBottom }; /** * Constructs a KPanelExtension just like any other widget. @@ -175,6 +176,15 @@ public: **/ virtual Position preferedPosition() const { return Bottom; } + /** + * @internal + **/ + void setPosition( Position p ); + /** + * @internal + **/ + void setAlignment( Alignment a ); + signals: /** * Emit this signal to make the panel relayout all extensions in the dock, when you want @@ -183,12 +193,6 @@ signals: **/ void updateLayout(); -public slots: - /** - * Don't reimplement, this is used internally - **/ - void slotSetPosition(Position p); - protected: /** @@ -230,23 +234,37 @@ protected: /** * @return the extension's position. (left, right, top, bottom) + **/ + Position position() const { return _position; } + + /** + * @return the extension's alignment. (left/top, center, or right/bottom) **/ - Position position() const { return _pos; } + Alignment alignment() const { return _alignment; } /** * @return the extensions orientation. (horizontal or vertical) **/ Orientation orientation(); + /** + * This extension has changed its position. + * Reimplement this change handler in order to adjust the look of your + * applet. + **/ + virtual void positionChange( Position ) {}; + /** - * The position changed to @p position. Reimplement this - * change handler in order to adjust the look of your extension. + * This extension has changed its alignment. + * Reimplement this change handler in order to adjust the look of your + * applet. **/ - virtual void positionChange( Position /* position */) {} + virtual void alignmentChange( Alignment ) {}; private: Type _type; - Position _pos; + Position _position; + Alignment _alignment; KConfig* _config; int _actions; protected: Index: kdewidgets/pics/Makefile.in =================================================================== RCS file: /home/kde/kdelibs/kdewidgets/pics/Makefile.in,v retrieving revision 1.1 diff -u -3 -p -r1.1 Makefile.in --- kdewidgets/pics/Makefile.in 2002/03/09 00:12:36 1.1 +++ kdewidgets/pics/Makefile.in 2002/03/09 17:13:20 @@ -1,5 +1,5 @@ -# KDE tags expanded automatically by am_edit - $Revision: 1.1 $ -# Makefile.in generated automatically by automake 1.4 from Makefile.am +# KDE tags expanded automatically by am_edit - $Revision: 1.303 $ +# Makefile.in generated automatically by automake 1.4-p4 from Makefile.am # Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation @@ -85,6 +85,7 @@ DLLTOOL = @DLLTOOL@ DOJAVA = @DOJAVA@ DPMSINC = @DPMSINC@ DPMSLIB = @DPMSLIB@ +ECHO = @ECHO@ EXEEXT = @EXEEXT@ EXTRA_SUBDIRS = @EXTRA_SUBDIRS@ GCJ = @GCJ@ @@ -204,6 +205,7 @@ QTOPIA_INCLUDES = @QTOPIA_INCLUDES@ QT_INCLUDES = @QT_INCLUDES@ QT_LDFLAGS = @QT_LDFLAGS@ RANLIB = @RANLIB@ +RC = @RC@ REPO = @REPO@ SETUIDFLAGS = @SETUIDFLAGS@ SMARTCARDDIR = @SMARTCARDDIR@ @@ -274,7 +276,7 @@ DIST_COMMON = Makefile.am Makefile.in #>- DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) #>+ 4 -KDE_DIST=kled.png kcolorbutton.png kdualcolorbutton.png kgradientselector.png khsselector.png +KDE_DIST=kgradientselector.png khsselector.png kled.png kdualcolorbutton.png kcolorbutton.png DISTFILES= $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) $(KDE_DIST) --------------Boundary-00=_2ZWP54I81HGA7S05ACLH Content-Type: text/x-diff; charset="iso-8859-1"; name="kicker.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="kicker.diff" ? kicker.kdevprj Index: core/container_applet.cpp =================================================================== RCS file: /home/kde/kdebase/kicker/core/container_applet.cpp,v retrieving revision 1.34 diff -u -3 -p -r1.34 container_applet.cpp --- core/container_applet.cpp 2002/03/01 14:50:45 1.34 +++ core/container_applet.cpp 2002/03/09 18:02:35 @@ -216,12 +216,18 @@ InternalAppletContainer::InternalAppletC if (!_applet) return; - _applet->slotSetOrientation(_orient); + // FIXME: Do we really want to do this here? + _applet->setPosition( (KPanelApplet::Position)directionToPosition( popupDirection() ) ); + _applet->setAlignment( (KPanelApplet::Alignment)alignment() ); + _actions = _applet->actions(); _type = _applet->type(); connect(_applet, SIGNAL(updateLayout()), SIGNAL(updateLayout())); connect(_applet, SIGNAL(requestFocus()), SLOT(activateWindow())); + + connect( this, SIGNAL(alignmentChange(Alignment)), + this, SLOT(slotAlignmentChange(Alignment)) ); } @@ -236,17 +242,12 @@ void InternalAppletContainer::slotSetPop AppletContainer::slotSetPopupDirection(d); if ( !_applet ) return; - _applet->slotSetPopupDirection((KPanelApplet::Direction)(d)); + _applet->setPosition( (KPanelApplet::Position)directionToPosition(d) ); } -void InternalAppletContainer::slotSetOrientation(Orientation o) +void InternalAppletContainer::slotAlignmentChange( Alignment a ) { - if (_orient == o) return; - - AppletContainer::slotSetOrientation(o); - - if (!_applet) return; - _applet->slotSetOrientation(o); + _applet->setAlignment( (KPanelApplet::Alignment)a ); } int InternalAppletContainer::widthForHeight(int h) const @@ -316,6 +317,9 @@ ExternalAppletContainer::ExternalAppletC << objId() << info.desktopFile(); process.start(KProcess::DontCare); + + connect( this, SIGNAL(alignmentChange(Alignment)), + this, SLOT(slotAlignmentChange(Alignment)) ); } ExternalAppletContainer::~ExternalAppletContainer() @@ -339,19 +343,15 @@ void ExternalAppletContainer::slotSetPop kapp->dcopClient()->send( _app, "AppletProxy", "setDirection(int)", data); } -void ExternalAppletContainer::slotSetOrientation(Orientation o) +void ExternalAppletContainer::slotAlignmentChange( Alignment a ) { - if (_orient == o) return; - - AppletContainer::slotSetOrientation(o); - if (!_isdocked) return; QByteArray data; QDataStream dataStream( data, IO_WriteOnly ); - dataStream << static_cast(o); + dataStream << static_cast(a); - kapp->dcopClient()->send( _app, "AppletProxy", "setOrientation(int)", data ); + kapp->dcopClient()->send( _app, "AppletProxy", "setAlignment(int)", data ); } void ExternalAppletContainer::about() Index: core/container_applet.h =================================================================== RCS file: /home/kde/kdebase/kicker/core/container_applet.h,v retrieving revision 1.15 diff -u -3 -p -r1.15 container_applet.h --- core/container_applet.h 2002/03/01 14:50:45 1.15 +++ core/container_applet.h 2002/03/09 18:02:35 @@ -102,8 +102,10 @@ public: public slots: void slotSetPopupDirection(Direction d); - void slotSetOrientation(Orientation o); +private slots: + void slotAlignmentChange( Alignment a ); + private: QCString _id; KPanelApplet *_applet; @@ -132,7 +134,6 @@ public: QCString& replyType, QByteArray &replyData); public slots: void slotSetPopupDirection(Direction d); - void slotSetOrientation(Orientation o); signals: void embeddedWindowDestroyed(); @@ -140,6 +141,9 @@ signals: protected: void dockRequest(QCString app, int actions, int type); + +private slots: + void slotAlignmentChange( Alignment a ); private: QXEmbed *_embed; Index: core/container_base.cpp =================================================================== RCS file: /home/kde/kdebase/kicker/core/container_base.cpp,v retrieving revision 1.11 diff -u -3 -p -r1.11 container_base.cpp --- core/container_base.cpp 2002/03/01 14:50:45 1.11 +++ core/container_base.cpp 2002/03/09 18:02:36 @@ -72,6 +72,13 @@ void BaseContainer::slotRemoved() config->sync(); } +void BaseContainer::setAlignment( Alignment a ) +{ + if( _alignment == a ) return; + _alignment = a; + emit alignmentChange( a ); +} + QPopupMenu *BaseContainer::reduceMenu(QPopupMenu *menu) { if (menu->count() != 1) Index: core/container_base.h =================================================================== RCS file: /home/kde/kdebase/kicker/core/container_base.h,v retrieving revision 1.15 diff -u -3 -p -r1.15 container_base.h --- core/container_base.h 2002/03/01 14:50:45 1.15 +++ core/container_base.h 2002/03/09 18:02:36 @@ -59,6 +59,7 @@ public: Direction popupDirection() const { return _dir; } Orientation orientation() const { return _orient; } + Alignment alignment() const { return _alignment; } void loadConfiguration( KConfigGroup& ); void saveConfiguration( KConfigGroup&, bool layoutOnly = false ) const; @@ -85,11 +86,15 @@ public slots: virtual void slotSetPopupDirection(Direction d) { _dir = d; } virtual void slotSetOrientation(Orientation o) { _orient = o; } + void setAlignment( Alignment a ); + signals: void removeme(BaseContainer*); void moveme(BaseContainer*); void requestSave(); + void alignmentChange( Alignment a ); + protected: virtual void doLoadConfiguration( KConfigGroup& ) {} virtual void doSaveConfiguration( KConfigGroup&, @@ -97,6 +102,7 @@ protected: Direction _dir; Orientation _orient; + Alignment _alignment; float _fspace; QPoint _moveOffset; QString _aid; Index: core/container_extension.cpp =================================================================== RCS file: /home/kde/kdebase/kicker/core/container_extension.cpp,v retrieving revision 1.41 diff -u -3 -p -r1.41 container_extension.cpp --- core/container_extension.cpp 2002/03/02 19:59:45 1.41 +++ core/container_extension.cpp 2002/03/09 18:02:36 @@ -164,7 +164,10 @@ InternalExtensionContainer::InternalExte connect(_extension, SIGNAL(updateLayout()), SLOT(updateLayout())); - connect(this, SIGNAL(positionChange(Position)), _extension, SLOT(slotSetPosition(Position))); + connect( this, SIGNAL(positionChange(Position)), + this, SLOT(slotPositionChange(Position)) ); + connect( this, SIGNAL(alignmentChange(Alignment)), + this, SLOT(slotAlignmentChange(Alignment)) ); } InternalExtensionContainer::~InternalExtensionContainer() @@ -195,12 +198,18 @@ QSize InternalExtensionContainer::sizeHi return size.boundedTo( maxSize ); } -void InternalExtensionContainer::slotSetPosition(Position p) +void InternalExtensionContainer::slotPositionChange(Position p) { if (!_extension) return; - _extension->slotSetPosition((KPanelExtension::Position)(p)); + _extension->setPosition( (KPanelExtension::Position)p ); } +void InternalExtensionContainer::slotAlignmentChange( Alignment a ) +{ + if (!_extension) return; + _extension->setAlignment( (KPanelExtension::Alignment)a ); +} + void InternalExtensionContainer::about() { if (!_extension) return; @@ -250,6 +259,8 @@ ExternalExtensionContainer::ExternalExte process.start(KProcess::DontCare); connect(this, SIGNAL(positionChange(Position)), SLOT(slotSetPosition(Position))); + connect( this, SIGNAL(alignmentChange(Alignment)), + this, SLOT(slotAlignmentChange(Alignment)) ); } ExternalExtensionContainer::~ExternalExtensionContainer() @@ -267,6 +278,17 @@ void ExternalExtensionContainer::slotSet dataStream << static_cast(p); kapp->dcopClient()->send( _app, "ExtensionProxy", "setPosition(int)", data ); +} + +void ExternalExtensionContainer::slotAlignmentChange( Alignment a ) +{ + if (!_isdocked) return; + + QByteArray data; + QDataStream dataStream( data, IO_WriteOnly ); + dataStream << static_cast(a); + + kapp->dcopClient()->send( _app, "ExtensionProxy", "setAlignment(int)", data ); } void ExternalExtensionContainer::about() Index: core/container_extension.h =================================================================== RCS file: /home/kde/kdebase/kicker/core/container_extension.h,v retrieving revision 1.18 diff -u -3 -p -r1.18 container_extension.h --- core/container_extension.h 2002/02/27 20:35:51 1.18 +++ core/container_extension.h 2002/03/09 18:02:36 @@ -96,8 +96,9 @@ public: protected: PanelSettings defaultSettings(); -protected slots: - void slotSetPosition(Position p); +private slots: + void slotPositionChange( Position p ); + void slotAlignmentChange( Alignment a ); private: KPanelExtension *_extension; @@ -130,6 +131,9 @@ protected: protected slots: void slotSetPosition(Position p); + +private slots: + void slotAlignmentChange( Alignment a ); private: QXEmbed *_embed; Index: core/container_panel.cpp =================================================================== RCS file: /home/kde/kdebase/kicker/core/container_panel.cpp,v retrieving revision 1.48 diff -u -3 -p -r1.48 container_panel.cpp --- core/container_panel.cpp 2002/03/02 19:59:45 1.48 +++ core/container_panel.cpp 2002/03/09 18:02:37 @@ -210,6 +210,7 @@ void PanelContainer::readConfig( KConfig _settings.readConfig( config ); emit positionChange( position() ); + emit alignmentChange( alignment() ); updateLayout(); if( !_settings._autoHide ) @@ -236,6 +237,7 @@ void PanelContainer::arrange( Position p if ( a != _settings._alignment ) { _settings._alignment = a; + emit alignmentChange( a ); } updateLayout(); Index: core/container_panel.h =================================================================== RCS file: /home/kde/kdebase/kicker/core/container_panel.h,v retrieving revision 1.20 diff -u -3 -p -r1.20 container_panel.h --- core/container_panel.h 2002/03/02 19:59:45 1.20 +++ core/container_panel.h 2002/03/09 18:02:37 @@ -94,6 +94,7 @@ public: signals: void positionChange( Position pos ); + void alignmentChange( Alignment a ); protected: void arrange( Position p, Alignment a ); Index: core/containerarea.cpp =================================================================== RCS file: /home/kde/kdebase/kicker/core/containerarea.cpp,v retrieving revision 1.114 diff -u -3 -p -r1.114 containerarea.cpp --- core/containerarea.cpp 2002/03/03 14:26:40 1.114 +++ core/containerarea.cpp 2002/03/09 18:02:38 @@ -1787,6 +1787,13 @@ void ContainerArea::setPosition(Position (*it)->slotSetPopupDirection( popupDirection() ); } +void ContainerArea::setAlignment(Alignment a) +{ + BaseContainerListIterator it(_containers); + for ( ; it.current(); ++it ) + (*it)->setAlignment( a ); +} + void ContainerArea::autoScroll() { if(!_moveAC) return; Index: core/containerarea.h =================================================================== RCS file: /home/kde/kdebase/kicker/core/containerarea.h,v retrieving revision 1.45 diff -u -3 -p -r1.45 containerarea.h --- core/containerarea.h 2002/03/02 19:59:45 1.45 +++ core/containerarea.h 2002/03/09 18:02:38 @@ -79,6 +79,7 @@ public: public slots: void setOrientation(Orientation o); void setPosition(Position p); + void setAlignment(Alignment a); void slotLayoutChildren(); void slotSaveContainerConfig(); Index: core/panel.cpp =================================================================== RCS file: /home/kde/kdebase/kicker/core/panel.cpp,v retrieving revision 1.95 diff -u -3 -p -r1.95 panel.cpp --- core/panel.cpp 2002/03/03 23:12:23 1.95 +++ core/panel.cpp 2002/03/09 18:02:38 @@ -82,6 +82,8 @@ Panel::Panel() connect(_containerArea, SIGNAL(sizeHintChanged()), SLOT(updateLayout())); connect(this, SIGNAL(positionChange(Position)), SLOT(slotSetPosition(Position))); + connect( this, SIGNAL(alignmentChange(Alignment)), + this, SLOT(slotAlignmentChange(Alignment)) ); _opMnu = new PanelOpMenu( this, this ); } @@ -200,6 +202,11 @@ void Panel::slotSetPosition( Position p } _containerArea->setOrientation(orientation()); _containerArea->setPosition(position()); +} + +void Panel::slotAlignmentChange( Alignment a ) +{ + _containerArea->setAlignment( a ); } void Panel::showPanelMenu( QPoint globalPos ) Index: core/panel.h =================================================================== RCS file: /home/kde/kdebase/kicker/core/panel.h,v retrieving revision 1.38 diff -u -3 -p -r1.38 panel.h --- core/panel.h 2002/03/03 14:44:53 1.38 +++ core/panel.h 2002/03/09 18:02:39 @@ -86,6 +86,7 @@ protected: protected slots: void slotSetPosition( Position p ); + void slotAlignmentChange( Alignment a ); void slotResizeRequest( int dx, int dy ); private: Index: proxy/appletproxy.cpp =================================================================== RCS file: /home/kde/kdebase/kicker/proxy/appletproxy.cpp,v retrieving revision 1.18 diff -u -3 -p -r1.18 appletproxy.cpp --- proxy/appletproxy.cpp 2001/12/29 17:19:14 1.18 +++ proxy/appletproxy.cpp 2002/03/09 18:02:39 @@ -47,6 +47,17 @@ CONNECTION WITH THE SOFTWARE OR THE USE #include +// FIXME: Ugly, remove when cleaning up +KPanelApplet::Position directionToPosition( int d ) +{ + switch( d ) { + case 1: return KPanelApplet::pTop; + case 2: return KPanelApplet::pRight; + case 3: return KPanelApplet::pLeft; + default: + case 0: return KPanelApplet::pBottom; + } +} static KCmdLineOptions options[] = { @@ -270,18 +281,18 @@ bool AppletProxy::process(const QCString dataStream >> dir; if(_applet) { - _applet->slotSetPopupDirection(static_cast(dir)); + _applet->setPosition( (KPanelApplet::Position)directionToPosition(dir) ); } return true; } - else if ( fun == "setOrientation(int)" ) + else if ( fun == "setAlignment(int)" ) { QDataStream dataStream( data, IO_ReadOnly ); - int orient; - dataStream >> orient; + int alignment; + dataStream >> alignment; if(_applet) { - _applet->slotSetOrientation(static_cast(orient)); + _applet->setAlignment( (KPanelApplet::Alignment)alignment ); } return true; } Index: proxy/extensionproxy.cpp =================================================================== RCS file: /home/kde/kdebase/kicker/proxy/extensionproxy.cpp,v retrieving revision 1.14 diff -u -3 -p -r1.14 extensionproxy.cpp --- proxy/extensionproxy.cpp 2001/12/29 17:19:14 1.14 +++ proxy/extensionproxy.cpp 2002/03/09 18:02:40 @@ -256,7 +256,18 @@ bool ExtensionProxy::process(const QCStr dataStream >> pos; if(_extension) { - _extension->slotSetPosition(static_cast(pos)); + _extension->setPosition( (KPanelExtension::Position)pos ); + } + return true; + } + else if ( fun == "setAlignment(int)" ) + { + QDataStream dataStream( data, IO_ReadOnly ); + int alignment; + dataStream >> alignment; + + if(_extension) { + _extension->setAlignment( (KPanelExtension::Alignment)alignment ); } return true; } --------------Boundary-00=_2ZWP54I81HGA7S05ACLH--