diff options
Diffstat (limited to 'kicker/applets/naughty/NaughtyApplet.cpp')
-rw-r--r-- | kicker/applets/naughty/NaughtyApplet.cpp | 35 |
1 files changed, 12 insertions, 23 deletions
diff --git a/kicker/applets/naughty/NaughtyApplet.cpp b/kicker/applets/naughty/NaughtyApplet.cpp index 1da45a350..83db26d12 100644 --- a/kicker/applets/naughty/NaughtyApplet.cpp +++ b/kicker/applets/naughty/NaughtyApplet.cpp @@ -67,29 +67,28 @@ NaughtyApplet::NaughtyApplet setBackgroundOrigin( AncestorOrigin ); button_ = new SimpleButton(this); - button_->setFixedSize(20, 20); TQVBoxLayout * layout = new TQVBoxLayout(this); layout->addWidget(button_); - monitor_ = new NaughtyProcessMonitor(2, 20, TQT_TQOBJECT(this)); + monitor_ = new NaughtyProcessMonitor(2, 20, this); connect ( - button_, TQT_SIGNAL(clicked()), - this, TQT_SLOT(slotPreferences()) + button_, TQ_SIGNAL(clicked()), + this, TQ_SLOT(slotPreferences()) ); connect ( - monitor_, TQT_SIGNAL(runawayProcess(ulong, const TQString &)), - this, TQT_SLOT(slotWarn(ulong, const TQString &)) + monitor_, TQ_SIGNAL(runawayProcess(ulong, const TQString &)), + this, TQ_SLOT(slotWarn(ulong, const TQString &)) ); connect ( - monitor_, TQT_SIGNAL(load(uint)), - this, TQT_SLOT(slotLoad(uint)) + monitor_, TQ_SIGNAL(load(uint)), + this, TQ_SLOT(slotLoad(uint)) ); loadSettings(); @@ -132,25 +131,15 @@ NaughtyApplet::slotWarn(ulong pid, const TQString & name) } } - int -NaughtyApplet::widthForHeight(int) const -{ - return 20; -} - - int -NaughtyApplet::heightForWidth(int) const -{ - return 20; -} void NaughtyApplet::slotLoad(uint l) { - if (l > monitor_->triggerLevel()) - button_->setPixmap(BarIcon("naughty-sad")); - else - button_->setPixmap(BarIcon("naughty-happy")); + button_->setPixmap(TDEGlobal::iconLoader()->loadIcon( + (l > monitor_->triggerLevel() ? "naughty-sad" : "naughty-happy"), + TDEIcon::Panel, + TQMIN(size().width(),size().height())-2 + )); } void |