|
|
@ -45,9 +45,18 @@ LMSensorsDock::LMSensorsDock(bool fNoDock, TQObject *parent, const char *name):
|
|
|
|
LMSensorsDock::~LMSensorsDock()
|
|
|
|
LMSensorsDock::~LMSensorsDock()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
saveConfig();
|
|
|
|
saveConfig();
|
|
|
|
if(sensorsWidget) delete sensorsWidget;
|
|
|
|
if(sensorsWidget)
|
|
|
|
if(sensorsCfg) delete sensorsCfg;
|
|
|
|
delete sensorsWidget;
|
|
|
|
if(sensorsAlarm) delete sensorsAlarm;
|
|
|
|
if(sensorsCfg)
|
|
|
|
|
|
|
|
delete sensorsCfg;
|
|
|
|
|
|
|
|
if(sensorsAlarm)
|
|
|
|
|
|
|
|
delete sensorsAlarm;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (helpmenu)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
menu->removeItem(helpmenu_id);
|
|
|
|
|
|
|
|
delete helpmenu;
|
|
|
|
|
|
|
|
}
|
|
|
|
delete menu;
|
|
|
|
delete menu;
|
|
|
|
if(sensors) delete sensors;
|
|
|
|
if(sensors) delete sensors;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -55,11 +64,15 @@ LMSensorsDock::~LMSensorsDock()
|
|
|
|
|
|
|
|
|
|
|
|
void LMSensorsDock::createMenu()
|
|
|
|
void LMSensorsDock::createMenu()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
helpmenu=new TDEPopupMenu;
|
|
|
|
|
|
|
|
helpmenu->insertItem(SmallIcon("help"), i18n("&KSensors Handbook"), this, SLOT(showHandbook()));
|
|
|
|
|
|
|
|
helpmenu->insertItem(kapp->miniIcon(), i18n("&About KSensors"), this, SLOT(showAbout()));
|
|
|
|
|
|
|
|
|
|
|
|
menu= new TDEPopupMenu;
|
|
|
|
menu= new TDEPopupMenu;
|
|
|
|
menu->insertTitle(kapp->miniIcon(),"KSensors");
|
|
|
|
menu->insertTitle(kapp->miniIcon(),"KSensors");
|
|
|
|
menu->insertItem(SmallIcon("configure"),i18n("&Configure"), this, SLOT(createConfigWidget() ) ,0,101 );
|
|
|
|
menu->insertItem(SmallIcon("configure"),i18n("&Configure"), this, SLOT(createConfigWidget() ) ,0,101 );
|
|
|
|
menu->insertSeparator();
|
|
|
|
menu->insertSeparator();
|
|
|
|
menu->insertItem(kapp->miniIcon() ,i18n("&About KSensors"), this, SLOT(showAbout() ) ,0,103 );
|
|
|
|
helpmenu_id=menu->insertItem(SmallIcon("help"), i18n("&Help"), helpmenu);
|
|
|
|
menu->insertSeparator();
|
|
|
|
menu->insertSeparator();
|
|
|
|
if(!noDock) menu->insertItem(sensorsWidget ? i18n("&Minimize"):i18n("&Restore"), this, SLOT(minimizeRestoreWidget() ) ,0,100 );
|
|
|
|
if(!noDock) menu->insertItem(sensorsWidget ? i18n("&Minimize"):i18n("&Restore"), this, SLOT(minimizeRestoreWidget() ) ,0,100 );
|
|
|
|
menu->insertItem(SmallIcon("exit"),i18n("&Exit"), this, SLOT(close()),0,102);
|
|
|
|
menu->insertItem(SmallIcon("exit"),i18n("&Exit"), this, SLOT(close()),0,102);
|
|
|
@ -199,7 +212,6 @@ void LMSensorsDock::updateItemDock(const char *name)
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void LMSensorsDock::showAbout()
|
|
|
|
void LMSensorsDock::showAbout()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
TDEAboutApplication *dialog;
|
|
|
|
TDEAboutApplication *dialog;
|
|
|
@ -209,3 +221,8 @@ TDEAboutApplication *dialog;
|
|
|
|
delete dialog;
|
|
|
|
delete dialog;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void LMSensorsDock::showHandbook()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
kapp->invokeHelp();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|