[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdenetwork/kget/plasma
From:       Javier Goday <jgoday () gmail ! com>
Date:       2007-12-01 0:27:45
Message-ID: 1196468865.985669.15572.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 743462 by jgoday:

- Fixed applet size problem


 M  +2 -0      applet/barchart.cpp  
 M  +9 -2      applet/errorgraph.cpp  
 M  +10 -7     applet/plasma-kget.cpp  
 M  +2 -0      applet/plasma-kget.h  
 M  +2 -2      engine/plasma-engine-kget.desktop  


--- trunk/KDE/kdenetwork/kget/plasma/applet/barchart.cpp #743461:743462
@@ -53,6 +53,8 @@
     m_titleLabel->setPen(QPen(Qt::white));
     m_titleLabel->setAlignment(Qt::AlignLeft);
 
+    m_layout->addItem(m_titleLabel);
+
     // Total size
     m_totalSizeLabel = new Plasma::Label(m_applet);
     m_totalSizeLabel->setPen(QPen(Qt::white));
--- trunk/KDE/kdenetwork/kget/plasma/applet/errorgraph.cpp #743461:743462
@@ -34,22 +34,29 @@
 {
     m_layout = mainlayout;
 
+    m_icon = new Plasma::Icon(KIcon("dialog-warning"), "", m_applet);
+    m_icon->setAlignment(Qt::AlignCenter);
+
+
     m_errorLabel = new Plasma::Label(m_applet);
     m_errorLabel->setText(message);
     m_errorLabel->setPen(QPen(Qt::white));
-    m_errorLabel->setAlignment(Qt::AlignLeft);
+    m_errorLabel->setAlignment(Qt::AlignCenter);
+
     m_launchButton = new Plasma::PushButton(KIcon("kget"), "Launch KGet", m_applet);
 
+    m_layout->addItem(m_icon);
     m_layout->addItem(m_errorLabel);
     m_layout->addItem(m_launchButton);
 
-    m_applet->resize(QSize(500, 700));
+    m_applet->updateGeometry();
 
     connect(m_launchButton, SIGNAL(clicked()), SLOT(launchKGet()));
 }
 
 ErrorGraph::~ErrorGraph()
 {
+    delete m_icon;
     delete m_errorLabel;
     delete m_launchButton;
 }
--- trunk/KDE/kdenetwork/kget/plasma/applet/plasma-kget.cpp #743461:743462
@@ -46,11 +46,19 @@
 {
     setHasConfigurationInterface(true);
     setDrawStandardBackground(true);
+}
 
+PlasmaKGet::~PlasmaKGet()
+{
+    delete m_transferGraph;
+}
+
+void PlasmaKGet::init()
+{
     m_layout = new Plasma::VBoxLayout(this);
-    // setGeometry(QRectF(0, 0, 400, 500));
-    //resize(QSizeF(400, 600));
 
+    setMinimumSize(QSize(330, 100));
+
     m_transferGraph = 0;
     KConfigGroup cg = config();
 
@@ -64,11 +72,6 @@
     }
 }
 
-PlasmaKGet::~PlasmaKGet()
-{
-    delete m_transferGraph;
-}
-
 void PlasmaKGet::dataUpdated(const QString &source, const Plasma::DataEngine::Data &data)
 {
     Q_UNUSED(source)
--- trunk/KDE/kdenetwork/kget/plasma/applet/plasma-kget.h #743461:743462
@@ -47,6 +47,8 @@
     PlasmaKGet(QObject *parent, const QVariantList &args);
     ~PlasmaKGet();
 
+    void init();
+
 public slots:
     void dataUpdated(const QString &name, const Plasma::DataEngine::Data &data);
     void showConfigurationInterface();
--- trunk/KDE/kdenetwork/kget/plasma/engine/plasma-engine-kget.desktop #743461:743462
@@ -16,8 +16,8 @@
 Name[x-test]=xxKGet Data Enginexx
 Name[zh_CN]=KGet 数据引擎
 Name[zh_TW]=KGet 資料引擎
-X-KDE-ServiceTypes=Plasma/DataEngine
+ServiceTypes=Plasma/DataEngine
 Type=Service
 Icon=kget
 X-KDE-Library=plasma_engine_kget
-X-EngineName=kget
+X-Plasma-EngineName=kget
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic