Hello community,
here is the log from the commit of package kdebase4-workspace
checked in at Mon Feb 4 00:43:16 CET 2008.
--------
--- KDE/kdebase4-workspace/kdebase4-wallpapers.changes 2008-01-30 02:44:01.000000000 +0100
+++ /mounts/work_src_done/STABLE/kdebase4-workspace/kdebase4-wallpapers.changes 2008-02-04 00:40:40.565692000 +0100
@@ -1,0 +2,9 @@
+Sun Feb 3 17:03:23 CET 2008 - stbinner@suse.de
+
+- update to 4.0.1 release
+- backport of panel size configuration dialog
+- backport of display configuration for traditional launcher menu
+- start Kickoff application browser always at top-level
+- add "install all public kwin headers" patch
+
+-------------------------------------------------------------------
kdebase4-workspace.changes: same change
Old:
----
kdebase-workspace-4.0.0.tar.bz2
panel-height.diff
startkde-gtk2.diff
New:
----
kdebase-workspace-4.0.1.tar.bz2
kickoff-app-reset.diff
panel-resize.diff
r769466.diff
simpleapplet.diff
startkde.diff
systemtray.diff
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ kdebase4-wallpapers.spec ++++++
--- /var/tmp/diff_new_pack.p29567/_old 2008-02-04 00:40:51.000000000 +0100
+++ /var/tmp/diff_new_pack.p29567/_new 2008-02-04 00:40:51.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package kdebase4-wallpapers (Version 4.0)
+# spec file for package kdebase4-wallpapers (Version 4.0.1)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -20,9 +20,9 @@
Group: System/GUI/KDE
Summary: KDE 4 Wallpapers
Url: http://www.kde.org/
-Version: 4.0
-Release: 13
-%define rversion 4.0.0
+Version: 4.0.1
+Release: 1
+%define rversion 4.0.1
Source0: kdebase-workspace-%rversion.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
@@ -59,6 +59,12 @@
/usr/share/wallpapers
%changelog
+* Sun Feb 03 2008 stbinner@suse.de
+- update to 4.0.1 release
+- backport of panel size configuration dialog
+- backport of display configuration for traditional launcher menu
+- start Kickoff application browser always at top-level
+- add "install all public kwin headers" patch
* Tue Jan 29 2008 stbinner@suse.de
- fix app menu starting and system tray icons regressions
* Sun Jan 27 2008 stbinner@suse.de
++++++ kdebase4-workspace.spec ++++++
--- /var/tmp/diff_new_pack.p29567/_old 2008-02-04 00:40:51.000000000 +0100
+++ /var/tmp/diff_new_pack.p29567/_new 2008-02-04 00:40:51.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package kdebase4-workspace (Version 4.0)
+# spec file for package kdebase4-workspace (Version 4.0.1)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -21,9 +21,9 @@
Group: System/GUI/KDE
Summary: The KDE Workspace Components
Url: http://www.kde.org/
-Version: 4.0
-Release: 13
-%define rversion 4.0.0
+Version: 4.0.1
+Release: 1
+%define rversion 4.0.1
Source0: kdebase-workspace-%rversion.tar.bz2
Source1: opensuse.png
Source2: titlebar_decor.png
@@ -42,19 +42,25 @@
Patch10: kwin-two-desktops.diff
Patch11: showdesktop-plasmoid.diff
Patch12: lock_logout.diff
-Patch13: panel-height.diff
+Patch13: panel-resize.diff
Patch14: tasks.diff
Patch15: dashboard-toolbox.diff
Patch16: plasma-iconloader.diff
Patch17: trash-plasmoid.diff
-Patch18: startkde-gtk2.diff
+Patch18: startkde.diff
Patch19: short-menus.diff
+Patch20: kickoff-app-reset.diff
+Patch21: simpleapplet.diff
+Patch22: systemtray.diff
+Patch23: r769466.diff
%kde4_runtime_requires
Conflicts: yast2-theme-NLD
+Recommends: kdebase4-SuSE
+Recommends: kde4-kwin
+Recommends: extragear-plasma
Suggests: kdebase4-ksysguardd
Suggests: kde4-kdm
Suggests: kdebase4-wallpapers
-Suggests: kde4-kwin
%description
This package contains the basic packages for a K Desktop Environment
@@ -68,7 +74,7 @@
%prep
%setup -q -n kdebase-workspace-%rversion
-%patch
+#%patch
%patch1
%patch3
%patch4
@@ -80,13 +86,17 @@
%patch10
%patch11
%patch12
-#%patch13
%patch14
+%patch13
%patch15
%patch16
%patch17
%patch18
%patch19
+%patch20
+%patch21
+%patch22
+%patch23
%build
%cmake_kde4 -d build
@@ -601,6 +611,12 @@
/usr/%_lib/kde4/kgreet_*.so
%changelog
+* Sun Feb 03 2008 stbinner@suse.de
+- update to 4.0.1 release
+- backport of panel size configuration dialog
+- backport of display configuration for traditional launcher menu
+- start Kickoff application browser always at top-level
+- add "install all public kwin headers" patch
* Tue Jan 29 2008 stbinner@suse.de
- fix app menu starting and system tray icons regressions
* Sun Jan 27 2008 stbinner@suse.de
++++++ 4_0_BRANCH.diff ++++++
++++ 16426 lines (skipped)
++++ between KDE/kdebase4-workspace/4_0_BRANCH.diff
++++ and /mounts/work_src_done/STABLE/kdebase4-workspace/4_0_BRANCH.diff
++++++ kdebase-workspace-4.0.0.tar.bz2 -> kdebase-workspace-4.0.1.tar.bz2 ++++++
KDE/kdebase4-workspace/kdebase-workspace-4.0.0.tar.bz2 /mounts/work_src_done/STABLE/kdebase4-workspace/kdebase-workspace-4.0.1.tar.bz2 differ: byte 11, line 1
++++++ kickoff-app-reset.diff ++++++
Index: plasma/applets/kickoff/ui/launcher.h
===================================================================
--- plasma/applets/kickoff/ui/launcher.h (revision 769443)
+++ plasma/applets/kickoff/ui/launcher.h (working copy)
@@ -75,7 +75,8 @@
private Q_SLOTS:
void focusSearchView(const QString& query);
void showViewContextMenu(const QPoint& pos);
void openHomepage();
+ void slotCurrentChanged(int);
public Q_SLOTS:
void focusFavoritesView();
Index: plasma/applets/kickoff/ui/launcher.cpp
===================================================================
--- plasma/applets/kickoff/ui/launcher.cpp (revision 769443)
+++ plasma/applets/kickoff/ui/launcher.cpp (working copy)
@@ -150,7 +157,7 @@
void setupAllProgramsView()
{
- ApplicationModel *applicationModel = new ApplicationModel(q);
+ applicationModel = new ApplicationModel(q);
applicationModel->setDuplicatePolicy(ApplicationModel::ShowLatestOnlyPolicy);
QAbstractItemView *applicationView = new FlipScrollView;
@@ -240,6 +248,7 @@
ContextMenuFactory *contextMenuFactory;
bool autoHide;
int visibleItemCount;
+ ApplicationModel *applicationModel;
};
Launcher::Launcher(QWidget *parent)
@@ -258,6 +267,8 @@
d->contentSwitcher->setIconSize(QSize(48,48));
d->contentSwitcher->setShape(QTabBar::RoundedSouth);
connect(d->contentSwitcher, SIGNAL(currentChanged(int)),
+ SLOT(slotCurrentChanged(int)) );
+ connect(d->contentSwitcher, SIGNAL(currentChanged(int)),
d->contentArea, SLOT(setCurrentIndex(int)) );
d->contextMenuFactory = new ContextMenuFactory(this);
@@ -435,6 +475,12 @@
#endif
}
+void Launcher::slotCurrentChanged(int index)
+{
+ if (index==1)
+ d->applicationModel->setDuplicatePolicy(ApplicationModel::ShowLatestOnlyPolicy);
+}
+
void Launcher::moveEvent(QMoveEvent *e)
{
// focus the search bar ready for typing
++++++ panel-resize.diff ++++++
Index: plasma/containments/panel/panel.cpp
===================================================================
--- plasma/containments/panel/panel.cpp (revision 769215)
+++ plasma/containments/panel/panel.cpp (revision 769216)
@@ -21,8 +21,14 @@
#include <QApplication>
#include <QPainter>
#include <QDesktopWidget>
+#include <QGridLayout>
+#include <QLabel>
+#include <QComboBox>
+#include <QAction>
#include <KDebug>
+#include <KIcon>
+#include <KDialog>
#include
#include
@@ -33,10 +39,13 @@
Panel::Panel(QObject *parent, const QVariantList &args)
: Containment(parent, args),
m_cachedBackground(0),
+ m_dialog(0),
+ m_configureAction(0),
m_drawTop(true),
m_drawLeft(true),
m_drawRight(true),
- m_drawBottom(true)
+ m_drawBottom(true),
+ m_size(40)
{
m_background = new Plasma::Svg("widgets/panel-background", this);
setZValue(150);
@@ -45,9 +54,28 @@
Panel::~Panel()
{
+ delete m_dialog;
delete m_background;
}
+void Panel::init()
+{
+ KConfigGroup cg = config();
+ m_size = cg.readEntry("size", m_size);
+
+ Containment::init();
+}
+
+QList Panel::contextActions()
+{
+ if (! m_configureAction) {
+ m_configureAction = new QAction(i18n("Configure Panel..."), this);
+ m_configureAction->setIcon(KIcon("configure"));
+ connect(m_configureAction, SIGNAL(triggered()), this, SLOT(configure()));
+ }
+ return QList() << m_configureAction;
+}
+
void Panel::constraintsUpdated(Plasma::Constraints constraints)
{
//kDebug() << "constraints updated with" << constraints << "!!!!!!!!!!!!!!!!!";
@@ -79,8 +107,7 @@
if (loc == BottomEdge || loc == TopEdge) {
setFormFactor(Plasma::Horizontal);
- //FIXME: don't hardcode 48px
- height = 48;
+ height = m_size;
//FIXME: don't hardcode full width
width = r.width();
@@ -108,8 +135,7 @@
} else if (loc == LeftEdge || loc == RightEdge) {
setFormFactor(Plasma::Vertical);
- //FIXME: don't hardcode 48px
- width = 48;
+ width = m_size;
//FIXME: don't hardcode full height
height = r.height();
@@ -334,6 +360,54 @@
painter->drawPixmap(contentsRect, *m_cachedBackground, contentsRect);
}
+void Panel::configure()
+{
+ if (! m_dialog) {
+ m_dialog = new KDialog();
+ m_dialog->setCaption( i18nc("@title:window","Configure Panel") );
+ m_dialog->setButtons( KDialog::Ok | KDialog::Cancel | KDialog::Apply );
+ connect(m_dialog, SIGNAL(applyClicked()), this, SLOT(applyConfig()));
+ connect(m_dialog, SIGNAL(okClicked()), this, SLOT(applyConfig()));
+
+ QWidget *p = m_dialog->mainWidget();
+ QGridLayout *l = new QGridLayout(p);
+ p->setLayout(l);
+
+ QLabel *sizeLabel = new QLabel(i18n("Size:"), p);
+ l->addWidget(sizeLabel, 0, 0);
+ m_sizeCombo = new QComboBox(p);
+ sizeLabel->setBuddy(m_sizeCombo);
+ l->addWidget(m_sizeCombo, 0, 1);
+ m_sizeCombo->addItem(i18n("Tiny"), QVariant(24));
+ m_sizeCombo->addItem(i18n("Small"), QVariant(32));
+ m_sizeCombo->addItem(i18n("Normal"), QVariant(48));
+ m_sizeCombo->addItem(i18n("Large"), QVariant(64));
+ l->setColumnStretch(1,1);
+
+ bool found = false;
+ for (int i = 0; i < m_sizeCombo->count(); ++i) {
+ if (m_sizeCombo->itemData(i).toInt() == m_size) {
+ m_sizeCombo->setCurrentIndex(i);
+ found = true;
+ break;
+ }
+ }
+ if (! found) {
+ m_sizeCombo->setCurrentIndex(m_sizeCombo->count() - 1);
+ }
+ }
+ m_dialog->show();
+}
+
+void Panel::applyConfig()
+{
+ KConfigGroup cg = config();
+ m_size = m_sizeCombo->itemData(m_sizeCombo->currentIndex()).toInt();
+ cg.writeEntry("size", m_size);
+
+ updateConstraints();
+}
+
K_EXPORT_PLASMA_APPLET(panel, Panel)
#include "panel.moc"
Index: plasma/containments/panel/panel.h
===================================================================
--- plasma/containments/panel/panel.h (revision 769215)
+++ plasma/containments/panel/panel.h (revision 769216)
@@ -21,6 +21,10 @@
#include
+class KDialog;
+class QComboBox;
+class QAction;
+
namespace Plasma
{
class Svg;
@@ -32,6 +36,8 @@
public:
Panel(QObject *parent, const QVariantList &args);
~Panel();
+ void init();
+ QList contextActions();
void constraintsUpdated(Plasma::Constraints constraints);
Qt::Orientations expandingDirections() const;
@@ -40,13 +46,20 @@
const QStyleOptionGraphicsItem *option,
const QRect &contentsRect);
void paintBackground(QPainter *painter, const QRect &contentsRect);
+private slots:
+ void configure();
+ void applyConfig();
private:
Plasma::Svg *m_background;
QPixmap* m_cachedBackground;
+ KDialog* m_dialog;
+ QComboBox* m_sizeCombo;
+ QAction* m_configureAction;
bool m_drawTop : 1;
bool m_drawLeft : 1;
bool m_drawRight : 1;
bool m_drawBottom : 1;
+ int m_size;
};
Index: plasma/containments/panel/panel.cpp
===================================================================
--- plasma/containments/panel/panel.cpp (revision 769218)
+++ plasma/containments/panel/panel.cpp (revision 769219)
@@ -382,6 +382,7 @@
m_sizeCombo->addItem(i18n("Small"), QVariant(32));
m_sizeCombo->addItem(i18n("Normal"), QVariant(48));
m_sizeCombo->addItem(i18n("Large"), QVariant(64));
+ //TODO add also "custom" like at KDE3?
l->setColumnStretch(1,1);
bool found = false;
@@ -393,7 +394,7 @@
}
}
if (! found) {
- m_sizeCombo->setCurrentIndex(m_sizeCombo->count() - 1);
+ m_sizeCombo->setCurrentIndex(m_sizeCombo->count() - 2); //TODO dont hard-code
}
}
m_dialog->show();
Index: plasma/containments/panel/panel.cpp
===================================================================
--- plasma/containments/panel/panel.cpp (revision 769230)
+++ plasma/containments/panel/panel.cpp (revision 769231)
@@ -29,6 +29,7 @@
#include <KDebug>
#include <KIcon>
#include <KDialog>
+#include <KIntNumInput>
#include
#include
@@ -382,11 +383,15 @@
m_sizeCombo->addItem(i18n("Small"), QVariant(32));
m_sizeCombo->addItem(i18n("Normal"), QVariant(48));
m_sizeCombo->addItem(i18n("Large"), QVariant(64));
- //TODO add also "custom" like at KDE3?
+ m_sizeCombo->addItem(i18n("Custom"));
+ m_sizeEdit = new KIntNumInput(p);
+ m_sizeEdit->setRange(16, 256);
+ m_sizeEdit->setValue(m_size);
+ l->addWidget(m_sizeEdit, 1, 1);
l->setColumnStretch(1,1);
bool found = false;
- for (int i = 0; i < m_sizeCombo->count(); ++i) {
+ for (int i = 0; i < m_sizeCombo->count() - 1; ++i) {
if (m_sizeCombo->itemData(i).toInt() == m_size) {
m_sizeCombo->setCurrentIndex(i);
found = true;
@@ -394,8 +399,10 @@
}
}
if (! found) {
- m_sizeCombo->setCurrentIndex(m_sizeCombo->count() - 2); //TODO dont hard-code
+ m_sizeCombo->setCurrentIndex(m_sizeCombo->count() - 1);
}
+ connect(m_sizeCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(sizeComboChanged()));
+ sizeComboChanged();
}
m_dialog->show();
}
@@ -403,12 +410,19 @@
void Panel::applyConfig()
{
KConfigGroup cg = config();
- m_size = m_sizeCombo->itemData(m_sizeCombo->currentIndex()).toInt();
+ const int size = m_sizeCombo->itemData(m_sizeCombo->currentIndex()).toInt();
+ m_size = size > 0 ? size : m_sizeEdit->value();
cg.writeEntry("size", m_size);
updateConstraints();
}
+void Panel::sizeComboChanged()
+{
+ QVariant v = m_sizeCombo->itemData(m_sizeCombo->currentIndex());
+ m_sizeEdit->setEnabled(v.isNull());
+}
+
K_EXPORT_PLASMA_APPLET(panel, Panel)
#include "panel.moc"
Index: plasma/containments/panel/panel.h
===================================================================
--- plasma/containments/panel/panel.h (revision 769230)
+++ plasma/containments/panel/panel.h (revision 769231)
@@ -21,9 +21,10 @@
#include
-class KDialog;
class QComboBox;
class QAction;
+class KDialog;
+class KIntNumInput;
namespace Plasma
{
@@ -49,11 +50,13 @@
private slots:
void configure();
void applyConfig();
+ void sizeComboChanged();
private:
Plasma::Svg *m_background;
QPixmap* m_cachedBackground;
KDialog* m_dialog;
QComboBox* m_sizeCombo;
+ KIntNumInput* m_sizeEdit;
QAction* m_configureAction;
bool m_drawTop : 1;
bool m_drawLeft : 1;
Index: plasma/containments/panel/panel.cpp
===================================================================
--- plasma/containments/panel/panel.cpp (revision 769231)
+++ plasma/containments/panel/panel.cpp (revision 769232)
@@ -62,7 +62,7 @@
void Panel::init()
{
KConfigGroup cg = config();
- m_size = cg.readEntry("size", m_size);
+ m_size = qMax(16, cg.readEntry("size", m_size));
Containment::init();
}
Index: plasma/containments/panel/panel.cpp
===================================================================
--- plasma/containments/panel/panel.cpp (revision 769235)
+++ plasma/containments/panel/panel.cpp (revision 769236)
@@ -391,7 +391,7 @@
l->setColumnStretch(1,1);
bool found = false;
- for (int i = 0; i < m_sizeCombo->count() - 1; ++i) {
+ for (int i = 0; i <= m_sizeCombo->count() - 2; ++i) {
if (m_sizeCombo->itemData(i).toInt() == m_size) {
m_sizeCombo->setCurrentIndex(i);
found = true;
Index: plasma/applets/tasks/tasks.cpp
===================================================================
--- plasma/applets/tasks/tasks.cpp (revision 769242)
+++ plasma/applets/tasks/tasks.cpp (revision 769243)
@@ -32,6 +32,7 @@
#include <QTimeLine>
// Plasma
+#include
#include
#include
@@ -108,6 +109,11 @@
m_rootTaskGroup->layout()->setAnimator(animator);
}
+QList Tasks::contextActions()
+{
+ return containment() ? containment()->contextActions() : QList();
+}
+
void Tasks::registerStartingTasks()
{
}
Index: plasma/applets/tasks/tasks.h
===================================================================
--- plasma/applets/tasks/tasks.h (revision 769242)
+++ plasma/applets/tasks/tasks.h (revision 769243)
@@ -56,6 +56,8 @@
void init();
+ QList contextActions();
+
/**
* TODO: Sets the strategy used to automatically group tasks
* together.
Index: plasma/applets/tasks/tasks.cpp
===================================================================
--- plasma/applets/tasks/tasks.cpp (revision 769260)
+++ plasma/applets/tasks/tasks.cpp (revision 769261)
@@ -115,7 +115,14 @@
QList Tasks::contextActions()
{
- return containment() ? containment()->contextActions() : QList();
+
+ //TODO we don't like to display e.g. the desktop's context-menu. This ugly hack
+ // does only show the context-actions if we are really inside a panel.
+ if (containment() && strcmp(containment()->metaObject()->className(),"Panel") == 0) {
+ return containment() ? containment()->contextActions() : QList();
+ }
+
+ return QList();
}
void Tasks::registerStartingTasks()
Index: plasma/applets/tasks/tasks.cpp
===================================================================
--- plasma/applets/tasks/tasks.cpp (revision 769262)
+++ plasma/applets/tasks/tasks.cpp (revision 769263)
@@ -118,8 +118,9 @@
//TODO we don't like to display e.g. the desktop's context-menu. This ugly hack
// does only show the context-actions if we are really inside a panel.
+ //FIXME replace that ugly hack with something designed for such logic.
if (containment() && strcmp(containment()->metaObject()->className(),"Panel") == 0) {
- return containment() ? containment()->contextActions() : QList();
+ return containment()->contextActions();
}
return QList();
Index: plasma/applets/digital-clock/clock.cpp
===================================================================
--- plasma/applets/digital-clock/clock.cpp (revision 769275)
+++ plasma/applets/digital-clock/clock.cpp (revision 769276)
@@ -347,7 +347,7 @@
m_plainClockFont.setItalic(m_plainClockFontItalic);
// Choose a relatively big font size to start with
- m_plainClockFont.setPointSize(qMax((int)(contentsRect.height()/1.5), 1));
+ m_plainClockFont.setPointSize(qMax((int)(contentsRect.height()/1.5), KGlobalSettings::smallestReadableFont().pointSize()));
preparePainter(p, timeRect, m_plainClockFont, timeString);
p->drawText(timeRect,
@@ -366,9 +366,10 @@
// given rect allowing wrapping where possible
do {
p->setFont(tmpFont);
- tmpFont.setPointSize(tmpFont.pointSize() - 1);
+ tmpFont.setPointSize(qMax(KGlobalSettings::smallestReadableFont().pointSize(), tmpFont.pointSize() - 1));
tmpRect = p->boundingRect(rect, Qt::TextWordWrap, text);
- } while (tmpFont.pointSize() >= 1 && (tmpRect.width() > rect.width() ||
+ kDebug() << tmpFont.pointSize() << " POINTSIZE";
+ } while (tmpFont.pointSize() > KGlobalSettings::smallestReadableFont().pointSize() && (tmpRect.width() > rect.width() ||
tmpRect.height() > rect.height()));
return tmpRect;
Index: plasma/containments/panel/panel.cpp
===================================================================
--- plasma/containments/panel/panel.cpp (revision 769493)
+++ plasma/containments/panel/panel.cpp (revision 769494)
@@ -386,24 +386,22 @@
m_sizeCombo->addItem(i18n("Custom"));
m_sizeEdit = new KIntNumInput(p);
m_sizeEdit->setRange(16, 256);
- m_sizeEdit->setValue(m_size);
l->addWidget(m_sizeEdit, 1, 1);
l->setColumnStretch(1,1);
+ connect(m_sizeCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(sizeComboChanged()));
+ }
- bool found = false;
- for (int i = 0; i <= m_sizeCombo->count() - 2; ++i) {
- if (m_sizeCombo->itemData(i).toInt() == m_size) {
- m_sizeCombo->setCurrentIndex(i);
- found = true;
- break;
- }
+ int idx = m_sizeCombo->count() - 1;
+ for (int i = 0; i <= m_sizeCombo->count() - 2; ++i) {
+ if (m_sizeCombo->itemData(i).toInt() == m_size) {
+ idx = i;
+ break;
}
- if (! found) {
- m_sizeCombo->setCurrentIndex(m_sizeCombo->count() - 1);
- }
- connect(m_sizeCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(sizeComboChanged()));
- sizeComboChanged();
}
+ m_sizeCombo->setCurrentIndex(idx);
+ m_sizeEdit->setValue(m_size);
+ sizeComboChanged();
+
m_dialog->show();
}
++++++ r769466.diff ++++++
Index: kwin/lib/CMakeLists.txt
===================================================================
--- kwin/lib/CMakeLists.txt (revision 769465)
+++ kwin/lib/CMakeLists.txt (revision 769466)
@@ -19,7 +19,12 @@
########### install files ###############
-install( FILES kdecoration.h kdecorationfactory.h kcommondecoration.h DESTINATION ${INCLUDE_INSTALL_DIR})
+install( FILES
+ kdecoration.h
+ kdecorationfactory.h
+ kcommondecoration.h
+ kdecorationbridge.h
+ DESTINATION ${INCLUDE_INSTALL_DIR})
### effects lib ###
set(kwin_EFFECTSLIB_SRCS
@@ -59,5 +64,11 @@
endif (X11_Xfixes_FOUND)
-install( FILES kwinglobals.h kwineffects.h ${CMAKE_CURRENT_BINARY_DIR}/kwinconfig.h DESTINATION ${INCLUDE_INSTALL_DIR})
-
+install( FILES
+ kwinglobals.h
+ kwineffects.h
+ kwinglutils.h
+ kwinglutils_funcs.h
+ kwinshadereffect.h
+ ${CMAKE_CURRENT_BINARY_DIR}/kwinconfig.h
+ DESTINATION ${INCLUDE_INSTALL_DIR})
++++++ simpleapplet.diff ++++++
Index: plasma/applets/kickoff/simpleapplet/menuview.cpp
===================================================================
--- plasma/applets/kickoff/simpleapplet/menuview.cpp (revision 769443)
+++ plasma/applets/kickoff/simpleapplet/menuview.cpp (working copy)
@@ -35,14 +35,14 @@
class MenuView::Private
{
public:
- Private(MenuView *parent) : q(parent) , model(0) , column(0), launcher(new UrlItemLauncher(parent)) {}
+ Private(MenuView *parent) : q(parent) , model(0) , column(0), launcher(new UrlItemLauncher(parent)), formattype(MenuView::DescriptionName) {}
QAction *createActionForIndex(const QModelIndex& index,QWidget *parent)
{
Q_ASSERT(index.isValid());
QAction *action = 0;
-
+
if (model->hasChildren(index)) {
QMenu *childMenu = new QMenu(parent);
QObject::connect(childMenu,SIGNAL(aboutToShow()),q,SLOT(fillSubMenu()));
@@ -55,20 +55,21 @@
return action;
}
-
+
void buildBranch(QMenu *menu,const QModelIndex& parent)
{
int rowCount = model->rowCount(parent);
for (int i=0;iindex(i,column,parent),menu);
menu->addAction(action);
- }
+ }
}
MenuView * const q;
QAbstractItemModel *model;
int column;
UrlItemLauncher *launcher;
+ MenuView::FormatType formattype;
};
MenuView::MenuView(QWidget *parent)
@@ -86,12 +87,48 @@
}
void MenuView::updateAction(QAction *action,const QModelIndex& index)
{
- QString text = index.data(Qt::DisplayRole).value<QString>();
- const QString name = index.data(Kickoff::SubTitleRole).value<QString>();
- if (action->menu()==0 && name.contains(text,Qt::CaseInsensitive))
- text = name;
- action->setText(text.replace("&","&&"));
-
+ QString text = index.data(Qt::DisplayRole).value<QString>(); // describing text, e.g. "Spreadsheet" or "Rekall" (right, sometimes the text is also used for the generic app-name)
+ QString name = index.data(Kickoff::SubTitleRole).value<QString>(); // the generic name, e.g. "kspread" or "OpenOffice.org Spreadsheet" or just "" (right, it's a mess too)
+ if( action->menu()!=0 ) { // if its an item with sub-menuitems, we probably like to thread them another way...
+ action->setText(text.replace("&","&&"));
+ }
+ else {
+ switch( d->formattype ) {
+ case Name: {
+ if( name.isEmpty() ) {
+ action->setText(text.replace("&","&&"));
+ }
+ else {
+ action->setText(name.replace("&","&&"));
+ }
+ } break;
+ case Description: {
+ if( name.contains(text,Qt::CaseInsensitive) ) {
+ text = name;
+ }
+ action->setText(text.replace("&","&&"));
+ } break;
+ case NameDescription: // fall through
+ case DescriptionName: {
+ if( ! name.isEmpty() ) { // seems we have a program, but some of them dont define a name at all
+ if( name.contains(text,Qt::CaseInsensitive) ) {
+ action->setText(name.replace("&","&&"));
+ }
+ else {
+ if( d->formattype == NameDescription ) {
+ action->setText(QString("%1 (%2)").arg(name).arg(text).replace("&","&&"));
+ }
+ else {
+ action->setText(QString("%1 (%2)").arg(text).arg(name).replace("&","&&"));
+ }
+ }
+ }
+ else { // if there is no name, let's just use the describing text
+ action->setText(text.replace("&","&&"));
+ }
+ } break;
+ }
+ }
action->setIcon(index.data(Qt::DecorationRole).value<QIcon>());
}
void MenuView::setModel(QAbstractItemModel *model)
@@ -261,6 +298,14 @@
{
return d->column;
}
+MenuView::FormatType MenuView::formatType() const
+{
+ return d->formattype;
+}
+void MenuView::setFormatType(MenuView::FormatType formattype)
+{
+ d->formattype = formattype;
+}
void MenuView::actionTriggered(QAction *action)
{
QModelIndex index = indexForAction(action);
Index: plasma/applets/kickoff/simpleapplet/simpleapplet.cpp
===================================================================
--- plasma/applets/kickoff/simpleapplet/simpleapplet.cpp (revision 769443)
+++ plasma/applets/kickoff/simpleapplet/simpleapplet.cpp (working copy)
@@ -22,14 +22,19 @@
#include "simpleapplet/menuview.h"
// Qt
-#include <QCheckBox>
-#include <QVBoxLayout>
+#include <QLabel>
+#include <QComboBox>
+#include <QGridLayout>
#include <QGraphicsView>
#include <QtDebug>
+#include <QMetaObject>
+#include <QMetaEnum>
+#include <QPointer>
// KDE
#include <KIcon>
#include <KDialog>
+#include <KMenu>
// Plasma
#include
@@ -41,29 +46,67 @@
#include "core/models.h"
#include "core/applicationmodel.h"
#include "core/favoritesmodel.h"
+#include "core/systemmodel.h"
+#include "core/recentlyusedmodel.h"
#include "core/leavemodel.h"
+#include "core/urlitemlauncher.h"
class MenuLauncherApplet::Private
{
public:
- QMenu *menuview;
+ KMenu *menuview;
Plasma::Icon *icon;
- Kickoff::MenuView *appview;
- Kickoff::MenuView* favview;
+ QPointerKickoff::UrlItemLauncher launcher;
- bool showFavorites;
- bool showLeaveSwitchUser;
- bool showLeaveLock;
- bool showLeaveLogout;
+ MenuLauncherApplet::ViewType viewtype;
+ MenuLauncherApplet::FormatType formattype;
KDialog *dialog;
- QCheckBox *showFavCheckBox;
- QCheckBox *showSwitchUserCheckBox;
- QCheckBox *showLockCheckBox;
- QCheckBox *showLogoutCheckBox;
+ QComboBox *viewComboBox, *formatComboBox;
- Private() : menuview(0), appview(0), favview(0), dialog(0) {}
- ~Private() { delete dialog; delete menuview; delete appview; delete favview; }
+ Private() : menuview(0), launcher(0), dialog(0) {}
+ ~Private() { delete dialog; delete menuview; }
+
+ void addItem(QComboBox* combo, const QString& caption, int index) {
+ combo->addItem(caption, index);
+ }
+
+ void setCurrentItem(QComboBox* combo, int currentIndex) {
+ for(int i = combo->count() - 1; i >= 0; --i) {
+ if( combo->itemData(i).toInt() == currentIndex ) {
+ combo->setCurrentIndex(i);
+ return;
+ }
+ }
+ if( combo->count() > 0 )
+ combo->setCurrentIndex(0);
+ }
+
+ Kickoff::MenuView *createMenuView(QAbstractItemModel *model = 0) {
+ Kickoff::MenuView *view = new Kickoff::MenuView(menuview);
+ view->setFormatType( (Kickoff::MenuView::FormatType) formattype );
+ if( model ) {
+ model->setParent(view); //re-parent
+ view->setModel(model);
+ }
+ return view;
+ }
+
+ void addMenu(Kickoff::MenuView *view, bool mergeFirstLevel) {
+ QList actions = view->actions();
+ foreach(QAction *action, actions) {
+ if( action->menu() && mergeFirstLevel ) {
+ QMetaObject::invokeMethod(action->menu(),"aboutToShow"); //fetch the children
+ if( actions.count() > 1 )
+ menuview->addTitle(action->text());
+ foreach(QAction *a, action->menu()->actions())
+ menuview->addAction(a);
+ }
+ else {
+ menuview->addAction(action);
+ }
+ }
+ }
};
MenuLauncherApplet::MenuLauncherApplet(QObject *parent, const QVariantList &args)
@@ -76,10 +119,8 @@
d->icon->setFlag(ItemIsMovable, false);
connect(d->icon, SIGNAL(pressed(bool)), this, SLOT(toggleMenu(bool)));
- d->showFavorites = true;
- d->showLeaveSwitchUser = true;
- d->showLeaveLock = true;
- d->showLeaveLogout = true;
+ d->viewtype = Combined;
+ d->formattype = NameDescription;
}
MenuLauncherApplet::~MenuLauncherApplet()
@@ -94,10 +135,16 @@
d->icon->setIcon(KIcon(cg.readEntry("icon","start-here-kde")));
//setMinimumContentSize(d->icon->iconSize()); //setSize(d->icon->iconSize())
- d->showFavorites = cg.readEntry("showFavorites",d->showFavorites);
- d->showLeaveSwitchUser = cg.readEntry("showLeaveSwitchUser",d->showLeaveSwitchUser);
- d->showLeaveLock = cg.readEntry("showLeaveLock",d->showLeaveLock);
- d->showLeaveLogout = cg.readEntry("showLeaveLogout",d->showLeaveLogout);
+ {
+ QMetaEnum e = metaObject()->enumerator(metaObject()->indexOfEnumerator("ViewType"));
+ QByteArray ba = cg.readEntry("view", QByteArray(e.valueToKey(d->viewtype)));
+ d->viewtype = (MenuLauncherApplet::ViewType) e.keyToValue(ba);
+ }
+ {
+ QMetaEnum e = metaObject()->enumerator(metaObject()->indexOfEnumerator("FormatType"));
+ QByteArray ba = cg.readEntry("format", QByteArray(e.valueToKey(d->formattype)));
+ d->formattype = (MenuLauncherApplet::FormatType) e.keyToValue(ba);
+ }
Kickoff::UrlItemLauncher::addGlobalHandler(Kickoff::UrlItemLauncher::ExtensionHandler,"desktop",new Kickoff::ServiceItemHandler);
Kickoff::UrlItemLauncher::addGlobalHandler(Kickoff::UrlItemLauncher::ProtocolHandler, "leave", new Kickoff::LeaveItemHandler);
@@ -139,44 +186,65 @@
connect(d->dialog, SIGNAL(applyClicked()), this, SLOT(configAccepted()));
connect(d->dialog, SIGNAL(okClicked()), this, SLOT(configAccepted()));
- QVBoxLayout *layout = new QVBoxLayout(d->dialog->mainWidget());
- d->dialog->mainWidget()->setLayout(layout);
+ QWidget *p = d->dialog->mainWidget();
+ QGridLayout *l = new QGridLayout(p);
+ p->setLayout(l);
- d->showFavCheckBox = new QCheckBox(i18n("Favorites"), d->dialog->mainWidget());
- layout->addWidget(d->showFavCheckBox);
+ l->addWidget(new QLabel(i18n("View:"), p), 0, 0);
+ d->viewComboBox = new QComboBox(p);
+ d->addItem(d->viewComboBox, i18n("Combined"), MenuLauncherApplet::Combined);
+ d->addItem(d->viewComboBox, i18n("Favorites"), MenuLauncherApplet::Favorites);
+ d->addItem(d->viewComboBox, i18n("Applications"), MenuLauncherApplet::Applications);
+ d->addItem(d->viewComboBox, i18n("Computer"), MenuLauncherApplet::Computer);
+ d->addItem(d->viewComboBox, i18n("Recently Used"), MenuLauncherApplet::RecentlyUsed);
+ d->addItem(d->viewComboBox, i18n("Leave"), MenuLauncherApplet::Leave);
+ l->addWidget(d->viewComboBox, 0, 1);
- d->showSwitchUserCheckBox = new QCheckBox(i18n("Switch user"), d->dialog->mainWidget());
- layout->addWidget(d->showSwitchUserCheckBox);
+ l->addWidget(new QLabel(i18n("Format:"), p), 1, 0);
+ d->formatComboBox = new QComboBox(p);
+ d->addItem(d->formatComboBox, i18n("Name Only"), MenuLauncherApplet::Name);
+ d->addItem(d->formatComboBox, i18n("Description Only"), MenuLauncherApplet::Description);
+ d->addItem(d->formatComboBox, i18n("Name (Description)"), MenuLauncherApplet::NameDescription);
+ d->addItem(d->formatComboBox, i18n("Description (Name)"), MenuLauncherApplet::DescriptionName);
+ l->addWidget(d->formatComboBox, 1, 1);
- d->showLockCheckBox = new QCheckBox(i18n("Lock"), d->dialog->mainWidget());
- layout->addWidget(d->showLockCheckBox);
+ l->setColumnStretch(1,1);
+ }
- d->showLogoutCheckBox = new QCheckBox(i18n("Logout"), d->dialog->mainWidget());
- layout->addWidget(d->showLogoutCheckBox);
- }
- d->showFavCheckBox->setChecked(d->showFavorites);
- d->showSwitchUserCheckBox->setChecked(d->showLeaveSwitchUser);
- d->showLockCheckBox->setChecked(d->showLeaveLock);
- d->showLogoutCheckBox->setChecked(d->showLeaveLogout);
+ d->setCurrentItem(d->viewComboBox, d->viewtype);
+ d->setCurrentItem(d->formatComboBox, d->formattype);
d->dialog->show();
}
void MenuLauncherApplet::configAccepted()
{
- d->showFavorites = d->showFavCheckBox->isChecked();
- d->showLeaveSwitchUser = d->showSwitchUserCheckBox->isChecked();
- d->showLeaveLock = d->showLockCheckBox->isChecked();
- d->showLeaveLogout = d->showLogoutCheckBox->isChecked();
-
+ bool needssaving = false;
KConfigGroup cg = config();
- cg.writeEntry("showFavorites", d->showFavorites);
- cg.writeEntry("showLeaveSwitchUser", d->showLeaveSwitchUser);
- cg.writeEntry("showLeaveLock", d->showLeaveLock);
- cg.writeEntry("showLeaveLogout", d->showLeaveLogout);
- emit configNeedsSaving();
- delete d->menuview;
- d->menuview = 0;
+ int vt = d->viewComboBox->itemData(d->viewComboBox->currentIndex()).toInt();
+ if( vt != d->viewtype ) {
+ d->viewtype = (MenuLauncherApplet::ViewType) vt;
+ needssaving = true;
+
+ QMetaEnum e = metaObject()->enumerator(metaObject()->indexOfEnumerator("ViewType"));
+ cg.writeEntry("view", QByteArray(e.valueToKey(d->viewtype)));
+ }
+
+ int ft = d->formatComboBox->itemData(d->formatComboBox->currentIndex()).toInt();
+ if( ft != d->formattype ) {
+ d->formattype = (MenuLauncherApplet::FormatType) ft;
+ needssaving = true;
+
+ QMetaEnum e = metaObject()->enumerator(metaObject()->indexOfEnumerator("FormatType"));
+ cg.writeEntry("format", QByteArray(e.valueToKey(d->formattype)));
+ }
+
+ if( needssaving ) {
+ emit configNeedsSaving();
+
+ delete d->menuview;
+ d->menuview = 0;
+ }
}
void MenuLauncherApplet::toggleMenu(bool pressed)
@@ -186,44 +254,51 @@
}
if (!d->menuview) {
- d->menuview = new QMenu();
+ d->menuview = new KMenu();
connect(d->menuview,SIGNAL(triggered(QAction*)),this,SLOT(actionTriggered(QAction*)));
connect(d->menuview,SIGNAL(aboutToHide()),d->icon,SLOT(setUnpressed()));
- if(!d->appview) {
- d->appview = new Kickoff::MenuView();
- ApplicationModel *appModel = new ApplicationModel(d->appview);
- appModel->setDuplicatePolicy(ApplicationModel::ShowLatestOnlyPolicy);
- d->appview->setModel(appModel);
- }
- foreach (QAction *action, d->appview->actions())
- d->menuview->addAction(action);
+ switch( d->viewtype ) {
+ case Combined: {
+ ApplicationModel *appModel = new ApplicationModel();
+ appModel->setDuplicatePolicy(ApplicationModel::ShowLatestOnlyPolicy);
+ Kickoff::MenuView *appview = d->createMenuView(appModel);
+ d->addMenu(appview, false);
- if (d->showFavorites) {
- if (!d->favview) {
- d->favview = new Kickoff::MenuView();
- Kickoff::FavoritesModel* favmodel = new Kickoff::FavoritesModel(d->favview);
- d->favview->setModel(favmodel);
- }
- d->menuview->addSeparator();
- foreach (QAction *action, d->favview->actions())
- d->menuview->addAction(action);
- }
+ d->menuview->addSeparator();
+ Kickoff::MenuView *favview = d->createMenuView(new Kickoff::FavoritesModel(d->menuview));
+ d->addMenu(favview, false);
- if (d->showLeaveSwitchUser || d->showLeaveLock || d->showLeaveLogout) {
- d->menuview->addSeparator();
- if (d->showLeaveSwitchUser) {
- QAction *lockaction = d->menuview->addAction(KIcon("system-switch-user"),i18n("Switch User"));
- lockaction->setData(QUrl("leave:/switch"));
- }
- if (d->showLeaveLock) {
+ d->menuview->addSeparator();
+ QAction *switchaction = d->menuview->addAction(KIcon("system-switch-user"),i18n("Switch User"));
+ switchaction->setData(QUrl("leave:/switch"));
QAction *lockaction = d->menuview->addAction(KIcon("system-lock-screen"),i18n("Lock"));
lockaction->setData(QUrl("leave:/lock"));
- }
- if (d->showLeaveLogout) {
QAction *logoutaction = d->menuview->addAction(KIcon("system-log-out"),i18n("Logout"));
logoutaction->setData(QUrl("leave:/logout"));
- }
+ } break;
+ case Favorites: {
+ Kickoff::MenuView *favview = d->createMenuView(new Kickoff::FavoritesModel(d->menuview));
+ d->addMenu(favview, true);
+ } break;
+ case Applications: {
+ ApplicationModel *appModel = new ApplicationModel();
+ appModel->setDuplicatePolicy(ApplicationModel::ShowLatestOnlyPolicy);
+ Kickoff::MenuView *appview = d->createMenuView(appModel);
+ d->addMenu(appview, false);
+ } break;
+ case Computer: {
+ Kickoff::MenuView *systemview = d->createMenuView(new Kickoff::SystemModel());
+ d->addMenu(systemview, true);
+ } break;
+ case RecentlyUsed: {
+ Kickoff::MenuView *recentlyview = d->createMenuView(new Kickoff::RecentlyUsedModel());
+ d->addMenu(recentlyview, true);
+ } break;
+ case Leave: {
+ Kickoff::MenuView *leaveview = d->createMenuView(new Kickoff::LeaveModel(d->menuview));
+ d->addMenu(leaveview, true);
+ } break;
}
}
@@ -250,9 +325,10 @@
if (action->data().type() == QVariant::Url) {
QUrl url = action->data().toUrl();
if (url.scheme() == "leave") {
- Kickoff::UrlItemLauncher *launcher = d->appview ? d->appview->launcher() : 0;
- if (launcher)
- launcher->openUrl(url.toString());
+ if ( ! d->launcher ) {
+ d->launcher = new Kickoff::UrlItemLauncher(d->menuview);
+ }
+ d->launcher->openUrl(url.toString());
}
}
else {
Index: plasma/applets/kickoff/simpleapplet/menuview.h
===================================================================
--- plasma/applets/kickoff/simpleapplet/menuview.h (revision 769443)
+++ plasma/applets/kickoff/simpleapplet/menuview.h (working copy)
@@ -50,8 +50,8 @@
class MenuView : public KMenu
{
Q_OBJECT
+public:
-public:
/** Constructs a new menu with the specified @p parent */
MenuView(QWidget *parent = 0);
virtual ~MenuView();
@@ -80,6 +80,18 @@
/** See setColumn() */
int column() const;
+ /** The format type enumeration. */
+ enum FormatType {
+ Name = 0, ///< Name only
+ Description, ///< Description only
+ NameDescription, ///< Name (Description)
+ DescriptionName ///< Description (Name)
+ };
+ /** \return the format type. */
+ FormatType formatType() const;
+ /** Set the format type. */
+ void setFormatType(FormatType formattype);
+
protected:
/**
* Creates a new action to represent a leaf index in the tree. A leaf index
Index: plasma/applets/kickoff/simpleapplet/simpleapplet.h
===================================================================
--- plasma/applets/kickoff/simpleapplet/simpleapplet.h (revision 769443)
+++ plasma/applets/kickoff/simpleapplet/simpleapplet.h (working copy)
@@ -28,8 +28,26 @@
class MenuLauncherApplet : public Plasma::Applet
{
Q_OBJECT
+Q_ENUMS(ViewType)
+Q_ENUMS(FormatType)
+public:
-public:
+ enum ViewType {
+ Combined = 0,
+ Favorites,
+ Applications,
+ Computer,
+ RecentlyUsed,
+ Leave
+ };
+
+ enum FormatType {
+ Name = 0,
+ Description,
+ NameDescription,
+ DescriptionName
+ };
+
MenuLauncherApplet(QObject *parent, const QVariantList &args);
virtual ~MenuLauncherApplet();
++++++ startkde-gtk2.diff -> startkde.diff ++++++
--- KDE/kdebase4-workspace/startkde-gtk2.diff 2008-01-29 20:22:38.000000000 +0100
+++ /mounts/work_src_done/STABLE/kdebase4-workspace/startkde.diff 2008-02-03 17:00:53.000000000 +0100
@@ -1,41 +1,14 @@
Index: startkde.cmake
===================================================================
---- startkde.cmake (revision 764726)
+--- startkde.cmake (revision 768604)
+++ startkde.cmake (working copy)
-@@ -189,6 +189,36 @@
+@@ -183,9 +183,9 @@
+
+ libpath=`kde4-config --path lib | tr : '\n'`
+
+-for prefix in `echo "$libpath" | sed -n -e 's,/lib[^/]*/,/env/,p'`; do
++for prefix in `echo "$libpath" | sed -n -e 's,/lib[^/]*/,/env/,p'` /usr/share/kde4/env/; do
+ for file in "$prefix"*.sh; do
+ test -r "$file" && . "$file"
done
done
-
-+#
-+# Do we have a special Gtk theming for our Qt widget theme ?
-+#
-+if [ ! -e $HOME/.no-qtrc-to-gtkrc-mapping ]; then
-+
-+ # Defaults for openSUSE 10.3
-+ GTK2_SYSCONFDIR=/etc
-+ GTK2_DATADIR=/usr/share/themes/
-+
-+ # use general gtk-qt-engine
-+ if [ -e "$GTK2_DATADIR/Qt/gtk-2.0/gtkrc" ] ; then
-+ GTK2_THEME_RC="$GTK2_DATADIR/Qt/gtk-2.0/gtkrc"
-+ else
-+ # use QtCurve engine
-+ if [ -e "$GTK2_DATADIR/QtCurve/gtk-2.0/gtkrc" ] ; then
-+ GTK2_THEME_RC="$GTK2_DATADIR/QtCurve/gtk-2.0/gtkrc"
-+ fi
-+ fi
-+
-+ # GTK2
-+ # NOTE: ~/.gtkrc-2.0-kde is added later (in latest KDE only)
-+ if [ "$GTK2_RC_FILES" ]; then
-+ export GTK2_RC_FILES="$GTK2_RC_FILES:$GTK2_THEME_RC:$HOME/.gtkrc-2.0-qtengine:$HOME/.gtkrc-2.0"
-+ else
-+ export GTK2_RC_FILES="$GTK2_SYSCONFDIR/gtk-2.0/gtkrc:$GTK2_THEME_RC:$HOME/.gtkrc-2.0-qtengine:$HOME/.gtkrc-2.0"
-+ fi
-+
-+fi
-+
-+
- # Set the path for Qt plugins provided by KDE
- if test -n "$QT_PLUGIN_PATH"; then
- QT_PLUGIN_PATH="$QT_PLUGIN_PATH:`kde4-config --path qtplugins`"
++++++ systemtray.diff ++++++
Index: workspace/plasma/applets/systemtray/systemtray.cpp
===================================================================
--- plasma/applets/systemtray/systemtray.cpp (revision 769482)
+++ plasma/applets/systemtray/systemtray.cpp (revision 769483)
@@ -91,9 +91,11 @@
}
if (!m_systemTrayWidget || m_systemTrayWidget->parentWidget() != parentView) {
- if (m_systemTrayWidget) {
- m_systemTrayWidget->setParent(parentView);
- } else {
+ if (m_systemTrayWidget && m_systemTrayWidget->parent() != parentView) {
+ delete m_systemTrayWidget;
+ m_systemTrayWidget = 0;
+ }
+ if (! m_systemTrayWidget) {
m_systemTrayWidget = new SystemTrayWidget(parentView);
connect(m_systemTrayWidget, SIGNAL(sizeShouldChange()),
this, SLOT(updateSize()));
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org