mirror of
https://bitbucket.org/smil3y/kde-extraapps.git
synced 2025-02-24 02:42:52 +00:00
kdeplasma-addons: call the base class init() method in applets
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
15cec03ff6
commit
5a47c9280a
6 changed files with 21 additions and 9 deletions
|
@ -35,7 +35,7 @@
|
||||||
#include <KIcon>
|
#include <KIcon>
|
||||||
#include <KBookmarkMenu>
|
#include <KBookmarkMenu>
|
||||||
#include <KBookmarkGroup>
|
#include <KBookmarkGroup>
|
||||||
// Qt
|
// Katie
|
||||||
#include <QtGui/QPainter>
|
#include <QtGui/QPainter>
|
||||||
#include <QtGui/QGraphicsLinearLayout>
|
#include <QtGui/QGraphicsLinearLayout>
|
||||||
|
|
||||||
|
@ -58,6 +58,8 @@ BookmarksPlasmoid::BookmarksPlasmoid(QObject* parent, const QVariantList& args)
|
||||||
|
|
||||||
void BookmarksPlasmoid::init()
|
void BookmarksPlasmoid::init()
|
||||||
{
|
{
|
||||||
|
Applet::init();
|
||||||
|
|
||||||
mBookmarkManager = KBookmarkManager::userBookmarksManager();
|
mBookmarkManager = KBookmarkManager::userBookmarksManager();
|
||||||
mBookmarkManager->setEditorOptions(name(), true);
|
mBookmarkManager->setEditorOptions(name(), true);
|
||||||
connect(mBookmarkManager, SIGNAL(changed(QString,QString)), SLOT(onBookmarksChanged(QString)));
|
connect(mBookmarkManager, SIGNAL(changed(QString,QString)), SLOT(onBookmarksChanged(QString)));
|
||||||
|
|
|
@ -118,6 +118,8 @@ Frame::~Frame()
|
||||||
|
|
||||||
void Frame::init()
|
void Frame::init()
|
||||||
{
|
{
|
||||||
|
Applet::init();
|
||||||
|
|
||||||
bool frameReceivedUrlArgs = false;
|
bool frameReceivedUrlArgs = false;
|
||||||
if (!m_currentUrl.isEmpty()) {
|
if (!m_currentUrl.isEmpty()) {
|
||||||
frameReceivedUrlArgs = true;
|
frameReceivedUrlArgs = true;
|
||||||
|
|
|
@ -274,6 +274,8 @@ Kolourpicker::~Kolourpicker()
|
||||||
|
|
||||||
void Kolourpicker::init()
|
void Kolourpicker::init()
|
||||||
{
|
{
|
||||||
|
Plasma::Applet::init();
|
||||||
|
|
||||||
configChanged();
|
configChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -187,6 +187,8 @@ KonsoleProfilesApplet::~KonsoleProfilesApplet()
|
||||||
|
|
||||||
void KonsoleProfilesApplet::init()
|
void KonsoleProfilesApplet::init()
|
||||||
{
|
{
|
||||||
|
Plasma::PopupApplet::init();
|
||||||
|
|
||||||
QTimer::singleShot(500, m_konsoleprofileswidget, SLOT(slotUpdateLayout()));
|
QTimer::singleShot(500, m_konsoleprofileswidget, SLOT(slotUpdateLayout()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -42,10 +42,10 @@ K_EXPORT_PLASMA_APPLET(spellcheck, SpellCheck)
|
||||||
|
|
||||||
SpellCheck::SpellCheck(QObject *parent, const QVariantList &args)
|
SpellCheck::SpellCheck(QObject *parent, const QVariantList &args)
|
||||||
: Plasma::Applet(parent, args),
|
: Plasma::Applet(parent, args),
|
||||||
m_textEdit(NULL),
|
m_textEdit(nullptr),
|
||||||
m_spellingDialog(NULL),
|
m_spellingDialog(nullptr),
|
||||||
m_dictionaryComboBox(NULL),
|
m_dictionaryComboBox(nullptr),
|
||||||
m_dragTimer(0)
|
m_dragTimer(0)
|
||||||
{
|
{
|
||||||
KGlobal::locale()->insertCatalog("spellcheck");
|
KGlobal::locale()->insertCatalog("spellcheck");
|
||||||
setAspectRatioMode(Plasma::ConstrainedSquare);
|
setAspectRatioMode(Plasma::ConstrainedSquare);
|
||||||
|
@ -62,6 +62,8 @@ SpellCheck::~SpellCheck()
|
||||||
|
|
||||||
void SpellCheck::init()
|
void SpellCheck::init()
|
||||||
{
|
{
|
||||||
|
Plasma::Applet::init();
|
||||||
|
|
||||||
Plasma::IconWidget *icon = new Plasma::IconWidget(KIcon("tools-check-spelling"), QString(), this);
|
Plasma::IconWidget *icon = new Plasma::IconWidget(KIcon("tools-check-spelling"), QString(), this);
|
||||||
|
|
||||||
registerAsDragHandle(icon);
|
registerAsDragHandle(icon);
|
||||||
|
|
|
@ -39,10 +39,10 @@
|
||||||
|
|
||||||
Timer::Timer(QObject *parent, const QVariantList &args)
|
Timer::Timer(QObject *parent, const QVariantList &args)
|
||||||
: Plasma::Applet(parent, args),
|
: Plasma::Applet(parent, args),
|
||||||
m_seconds(0),
|
m_seconds(0),
|
||||||
m_startingSeconds(0),
|
m_startingSeconds(0),
|
||||||
m_running(false),
|
m_running(false),
|
||||||
m_blinkAnim(0)
|
m_blinkAnim(0)
|
||||||
{
|
{
|
||||||
resize(315, 125);
|
resize(315, 125);
|
||||||
setHasConfigurationInterface(true);
|
setHasConfigurationInterface(true);
|
||||||
|
@ -56,6 +56,8 @@ Timer::~Timer()
|
||||||
|
|
||||||
void Timer::init()
|
void Timer::init()
|
||||||
{
|
{
|
||||||
|
Plasma::Applet::init();
|
||||||
|
|
||||||
m_svg = new Plasma::Svg(this);
|
m_svg = new Plasma::Svg(this);
|
||||||
m_svg->setImagePath("widgets/timer");
|
m_svg->setImagePath("widgets/timer");
|
||||||
m_svg->setContainsMultipleImages(true);
|
m_svg->setContainsMultipleImages(true);
|
||||||
|
|
Loading…
Add table
Reference in a new issue