|
|
@ -19,27 +19,14 @@
|
|
|
|
*
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
#include <assert.h>
|
|
|
|
#include <assert.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include <tqbitmap.h>
|
|
|
|
#include <tqbitmap.h>
|
|
|
|
#include <tqtooltip.h>
|
|
|
|
#include <tqtooltip.h>
|
|
|
|
#include <tqpainter.h>
|
|
|
|
#include <tqpainter.h>
|
|
|
|
#include <tqpopupmenu.h>
|
|
|
|
|
|
|
|
#include <tqcolor.h>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include <dcopclient.h>
|
|
|
|
|
|
|
|
#include <kdebug.h>
|
|
|
|
#include <kdebug.h>
|
|
|
|
#include <tdeapplication.h>
|
|
|
|
|
|
|
|
#include <twin.h>
|
|
|
|
|
|
|
|
#include <tdestartupinfo.h>
|
|
|
|
|
|
|
|
#include <tdemessagebox.h>
|
|
|
|
|
|
|
|
#include <tdeaboutdata.h>
|
|
|
|
|
|
|
|
#include <tdelocale.h>
|
|
|
|
#include <tdelocale.h>
|
|
|
|
#include <kstandarddirs.h>
|
|
|
|
#include <kstandarddirs.h>
|
|
|
|
#include <tdecmdlineargs.h>
|
|
|
|
|
|
|
|
#include <kiconloader.h>
|
|
|
|
|
|
|
|
#include <kiconeffect.h>
|
|
|
|
#include <kiconeffect.h>
|
|
|
|
#include <tdeconfig.h>
|
|
|
|
#include <tdeconfig.h>
|
|
|
|
|
|
|
|
|
|
|
@ -125,6 +112,8 @@ void MoonWidget::calcStatus( time_t time )
|
|
|
|
if ( fm.daysTo( now ) == 0 ) {
|
|
|
|
if ( fm.daysTo( now ) == 0 ) {
|
|
|
|
counter = 14;
|
|
|
|
counter = 14;
|
|
|
|
tooltip = i18n( "Full Moon" );
|
|
|
|
tooltip = i18n( "Full Moon" );
|
|
|
|
|
|
|
|
renderGraphic();
|
|
|
|
|
|
|
|
repaint();
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
} else if ( counter <= 15 && counter >= 13 ) {
|
|
|
|
} else if ( counter <= 15 && counter >= 13 ) {
|
|
|
|
counter = 14 + fm.daysTo( now );
|
|
|
|
counter = 14 + fm.daysTo( now );
|
|
|
@ -168,6 +157,8 @@ void MoonWidget::calcStatus( time_t time )
|
|
|
|
switch (counter) {
|
|
|
|
switch (counter) {
|
|
|
|
case 0:
|
|
|
|
case 0:
|
|
|
|
tooltip = i18n("New Moon");
|
|
|
|
tooltip = i18n("New Moon");
|
|
|
|
|
|
|
|
renderGraphic();
|
|
|
|
|
|
|
|
repaint();
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
case 1:
|
|
|
|
case 1:
|
|
|
|
case 2:
|
|
|
|
case 2:
|
|
|
@ -360,9 +351,12 @@ void MoonWidget::renderGraphic()
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
TQToolTip::remove(this);
|
|
|
|
TQString oldText = TQToolTip::textFor(this);
|
|
|
|
|
|
|
|
if (oldText != tooltip)
|
|
|
|
TQToolTip::add(this, tooltip);
|
|
|
|
{
|
|
|
|
|
|
|
|
TQToolTip::remove(this);
|
|
|
|
|
|
|
|
TQToolTip::add(this, tooltip);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|