summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/datebook/datebook.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/core/pim/datebook/datebook.cpp b/core/pim/datebook/datebook.cpp
index 6ec6cc2..e8d808f 100644
--- a/core/pim/datebook/datebook.cpp
+++ b/core/pim/datebook/datebook.cpp
@@ -15,16 +15,18 @@
**
** Contact info@trolltech.com if any conditions of this licensing are
** not clear to you.
**
** $Id$
**
**********************************************************************/
+#define QTOPIA_INTERNAL_FD
+
#include "datebook.h"
#include "datebookday.h"
#include "datebooksettings.h"
#include "datebookweek.h"
#include "dateentryimpl.h"
#include <qpe/datebookmonth.h>
#include <qpe/qpeapplication.h>
@@ -105,16 +107,21 @@ DateBook::DateBook( QWidget *parent, const char *, WFlags f )
QActionGroup *g = new QActionGroup( this );
g->setExclusive( TRUE );
QAction *a = new QAction( tr( "New" ), Resource::loadPixmap( "new" ),
QString::null, 0, this, 0 );
connect( a, SIGNAL( activated() ), this, SLOT( fileNew() ) );
a->addTo( sub_bar );
+ a = new QAction( tr( "Today" ), Resource::loadPixmap( "to_day" ), QString::null, 0, g, 0 );
+ connect( a, SIGNAL( activated() ), this, SLOT( slotToday() ) );
+ a->addTo( sub_bar );
+ a->addTo( view );
+
a = new QAction( tr( "Day" ), Resource::loadPixmap( "day" ), QString::null, 0, g, 0 );
connect( a, SIGNAL( activated() ), this, SLOT( viewDay() ) );
a->addTo( sub_bar );
a->addTo( view );
a->setToggleAction( TRUE );
a->setOn( TRUE );
dayAction = a;
a = new QAction( tr( "Week" ), Resource::loadPixmap( "week" ), QString::null, 0, g, 0 );
@@ -129,20 +136,16 @@ DateBook::DateBook( QWidget *parent, const char *, WFlags f )
a->addTo( view );
a->setToggleAction( TRUE );
monthAction = a;
a = new QAction( tr( "Find" ), Resource::loadPixmap( "mag" ), QString::null, 0, g, 0 );
connect( a, SIGNAL(activated()), this, SLOT(slotFind()) );
a->addTo( sub_bar );
- a = new QAction( tr( "Today" ), QString::null, 0, 0 );
- connect( a, SIGNAL( activated() ), this, SLOT( slotToday() ) );
- a->addTo( view );
-
a = new QAction( tr( "Alarm and Start Time..." ), QString::null, 0, 0 );
connect( a, SIGNAL( activated() ), this, SLOT( slotSettings() ) );
a->addTo( settings );
views = new QWidgetStack( this );
setCentralWidget( views );
dayView = 0;
@@ -251,17 +254,17 @@ QString DateBook::checkEvent(const Event &e)
"than interval between repeats.");
return QString::null;
}
QDate DateBook::currentDate()
{
QDate d = QDate::currentDate();
-
+
if ( dayView && views->visibleWidget() == dayView ) {
d = dayView->date();
} else if ( weekView && views->visibleWidget() == weekView ) {
d = weekView->date();
} else if ( monthView && views->visibleWidget() == monthView ) {
d = monthView->selectedDate();
}