[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdeplasma-addons/applets/rememberthemilk
From: Aaron J. Seigo <aseigo () kde ! org>
Date: 2010-09-13 23:55:07
Message-ID: 20100913235507.61D31AC888 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1175034 by aseigo:
configChanged()
M +26 -21 rememberthemilk-plasmoid.cpp
M +1 -0 rememberthemilk-plasmoid.h
--- trunk/KDE/kdeplasma-addons/applets/rememberthemilk/rememberthemilk-plasmoid.cpp #1175033:1175034
@@ -95,24 +95,8 @@
m_authService->setParent(this);
connect(m_authService, SIGNAL(finished(Plasma::ServiceJob*)), SLOT(jobFinished(Plasma::ServiceJob*)));
- if (m_token.isNull())
- setConfigurationRequired(true, i18n("Authentication to Remember The Milk needed"));
- else {
- KConfigGroup cg = m_authService->operationDescription("AuthWithToken");
- cg.writeEntry("token", m_token);
- busyUntil(m_authService->startOperationCall(cg));
- busyUntil(0); // Sets busy until we manually call jobFinished(0). Busy until first tasks refresh
- }
+ configChanged();
- QString sortBy = config().readEntry("SortBy").toLower();
- kDebug() << "Config says sort by " << sortBy;
- if (sortBy == "date" || sortBy == "due")
- setSortBy(SortDue);
- else if (sortBy == "priority")
- setSortBy(SortPriority);
- else
- setSortBy(SortDue); // Default
-
Plasma::Applet::init();
setAssociatedApplicationUrls(KUrl("http://rememberthemilk.com"));
}
@@ -377,10 +361,6 @@
m_graphicsWidget->setMinimumSize(250, 300);
m_graphicsWidget->setPreferredSize(300, 500);
- KConfigGroup cg = config();
- m_token = cg.readEntry("token");
- kDebug() << "Token from config: " << m_token;
-
m_taskEditor = new TaskEditor(m_engine, m_tasksView);
m_taskEditor->hide();
connect(m_taskEditor, SIGNAL(requestDiscardChanges()), this, SLOT(onTaskEditorHide()));
@@ -391,4 +371,29 @@
return m_graphicsWidget;
}
+void RememberTheMilkPlasmoid::configChanged()
+{
+ KConfigGroup cg = config();
+ m_token = cg.readEntry("token");
+ kDebug() << "Token from config: " << m_token;
+
+ if (m_token.isNull())
+ setConfigurationRequired(true, i18n("Authentication to Remember The Milk needed"));
+ else {
+ KConfigGroup cg = m_authService->operationDescription("AuthWithToken");
+ cg.writeEntry("token", m_token);
+ busyUntil(m_authService->startOperationCall(cg));
+ busyUntil(0); // Sets busy until we manually call jobFinished(0). Busy until first tasks refresh
+ }
+
+ QString sortBy = config().readEntry("SortBy").toLower();
+ kDebug() << "Config says sort by " << sortBy;
+ if (sortBy == "date" || sortBy == "due")
+ setSortBy(SortDue);
+ else if (sortBy == "priority")
+ setSortBy(SortPriority);
+ else
+ setSortBy(SortDue); // Default
+}
+
#include "rememberthemilk-plasmoid.moc"
--- trunk/KDE/kdeplasma-addons/applets/rememberthemilk/rememberthemilk-plasmoid.h #1175033:1175034
@@ -69,6 +69,7 @@
void createConfigurationInterface(KConfigDialog *parent);
void configAccepted();
void configFinished();
+ void configChanged();
void startAuth();
void setSortBy(SortBy sortBy);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic