[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdebase/workspace/plasma/containments/panel
From: Aaron J. Seigo <aseigo () kde ! org>
Date: 2009-09-10 18:13:45
Message-ID: 1252606425.226223.4382.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 1022077 by aseigo:
remove a bunch of dead code in the wake of chani's gsoc project
M +0 -77 panel.cpp
M +0 -4 panel.h
--- trunk/KDE/kdebase/workspace/plasma/containments/panel/panel.cpp #1022076:1022077
@@ -96,9 +96,7 @@
Panel::Panel(QObject *parent, const QVariantList &args)
: Containment(parent, args),
- m_addPanelsMenu(0),
m_configureAction(0),
- m_addPanelAction(0),
m_currentSize(QSize(Kephal::ScreenUtils::screenSize(screen()).width(), 35)),
m_maskDirty(true),
m_canResize(true),
@@ -124,7 +122,6 @@
Panel::~Panel()
{
- delete m_addPanelsMenu;
}
void Panel::init()
@@ -353,73 +350,6 @@
}
}
-void Panel::addPanel()
-{
- KPluginInfo::List panelPlugins = listContainmentsOfType("panel");
-
- if (!panelPlugins.isEmpty()) {
- addPanel(panelPlugins.first().pluginName());
- }
-}
-
-void Panel::addPanel(const QString &plugin)
-{
- if (corona()) {
- Containment* panel = corona()->addContainment(plugin);
- panel->showConfigurationInterface();
- panel->setScreen(screen());
-
- QList<Plasma::Location> freeEdges = corona()->freeEdges(screen());
- //kDebug() << freeEdges;
- Plasma::Location destination;
- if (freeEdges.contains(Plasma::TopEdge)) {
- destination = Plasma::TopEdge;
- } else if (freeEdges.contains(Plasma::BottomEdge)) {
- destination = Plasma::BottomEdge;
- } else if (freeEdges.contains(Plasma::LeftEdge)) {
- destination = Plasma::LeftEdge;
- } else if (freeEdges.contains(Plasma::RightEdge)) {
- destination = Plasma::RightEdge;
- } else destination = Plasma::TopEdge;
-
- panel->setLocation(destination);
-
- // trigger an instant layout so we immediately have a proper geometry
- // rather than waiting around for the event loop
- panel->updateConstraints(Plasma::StartupCompletedConstraint);
- panel->flushPendingConstraintsEvents();
-
- const QRect screenGeom = corona()->screenGeometry(screen());
- const QRegion availGeom = corona()->availableScreenRegion(screen());
- int minH = 10;
- int minW = 10;
- int w = 35;
- int h = 35;
-
- if (destination == Plasma::LeftEdge) {
- QRect r = availGeom.intersected(QRect(0, 0, w, \
screenGeom.height())).boundingRect();
- h = r.height();
- minW = 35;
- } else if (destination == Plasma::RightEdge) {
- QRect r = availGeom.intersected(QRect(screenGeom.width() - w, 0, w, \
screenGeom.height())).boundingRect();
- h = r.height();
- minW = 35;
- } else if (destination == Plasma::TopEdge) {
- QRect r = availGeom.intersected(QRect(0, 0, screenGeom.width(), \
h)).boundingRect();
- w = r.width();
- minH = 35;
- } else if (destination == Plasma::BottomEdge) {
- QRect r = availGeom.intersected(QRect(0, screenGeom.height() - h, \
screenGeom.width(), h)).boundingRect();
- w = r.width();
- minH = 35;
- }
-
- panel->setMinimumSize(minW, minH);
- panel->setMaximumSize(w, h);
- panel->resize(w, h);
- }
-}
-
void Panel::updateBorders(const QRect &geom, bool themeChange)
{
Plasma::Location loc = location();
@@ -538,8 +468,6 @@
void Panel::constraintsEvent(Plasma::Constraints constraints)
{
- //kDebug() << "constraints updated with" << constraints << "!!!!!!";
-
m_maskDirty = true;
if (constraints & Plasma::FormFactorConstraint) {
@@ -598,11 +526,6 @@
if (constraints & Plasma::ImmutableConstraint) {
bool unlocked = immutability() == Plasma::Mutable;
- if (m_addPanelAction) {
- m_addPanelAction->setEnabled(unlocked);
- m_addPanelAction->setVisible(unlocked);
- }
-
if (m_configureAction) {
m_configureAction->setEnabled(unlocked);
m_configureAction->setVisible(unlocked);
--- trunk/KDE/kdebase/workspace/plasma/containments/panel/panel.h #1022076:1022077
@@ -58,8 +58,6 @@
void layoutApplet(Plasma::Applet* applet, const QPointF &pos);
void appletRemoved(Plasma::Applet* applet);
void updateSize();
- void addPanel();
- void addPanel(const QString &plugin);
void adjustLastSpace();
void enableUpdateSize();
@@ -75,9 +73,7 @@
void updateBorders(const QRect &geom, bool themeChange = false);
Plasma::FrameSvg *m_background;
- QMenu *m_addPanelsMenu;
QAction* m_configureAction;
- QAction* m_addPanelAction;
//cached values
QSize m_currentSize;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic