summaryrefslogtreecommitdiff
authorumopapisdn <umopapisdn>2003-03-23 22:48:20 (UTC)
committer umopapisdn <umopapisdn>2003-03-23 22:48:20 (UTC)
commitaff270316219558bd00cbcc3ffc275213080fcd3 (patch) (side-by-side diff)
tree00db2515fbf81a44dda904dc9b4b2e769b3fb49b
parent90772042f0d726149093675cede488676a94562b (diff)
downloadopie-aff270316219558bd00cbcc3ffc275213080fcd3.zip
opie-aff270316219558bd00cbcc3ffc275213080fcd3.tar.gz
opie-aff270316219558bd00cbcc3ffc275213080fcd3.tar.bz2
Bugfix: (bug #0000735) New events added in WeekListView are no longer defaulting to 01-01-1970.
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/datebook/datebook.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/core/pim/datebook/datebook.cpp b/core/pim/datebook/datebook.cpp
index 7dcf156..db2058b 100644
--- a/core/pim/datebook/datebook.cpp
+++ b/core/pim/datebook/datebook.cpp
@@ -795,33 +795,38 @@ void DateBook::slotNewEventFromKey( const QString &str )
// We get to here from a key pressed in the Day View
// So we can assume some things. We want the string
// passed in to be part of the description.
QDateTime start, end;
if ( views->visibleWidget() == dayView ) {
dayView->selectedDates( start, end );
} else if ( views->visibleWidget() == monthView ) {
QDate d = monthView->selectedDate();
start = end = d;
start.setTime( QTime( 10, 0 ) );
end.setTime( QTime( 12, 0 ) );
} else if ( views->visibleWidget() == weekView ) {
QDate d = weekView->date();
start = end = d;
start.setTime( QTime( 10, 0 ) );
end.setTime( QTime( 12, 0 ) );
- }
+ } else if ( views->visibleWidget() == weekLstView ) {
+ QDate d = weekLstView->date();
+ start = end = d;
+ start.setTime( QTime( 10, 0 ) );
+ end.setTime( QTime( 12, 0 ) );
+ }
slotNewEntry(start, end, str);
}
void DateBook::slotNewEntry(const QDateTime &start, const QDateTime &end, const QString &str) {
// argh! This really needs to be encapsulated in a class
// or function.
QDialog newDlg( this, 0, TRUE );
newDlg.setCaption( DateEntryBase::tr("New Event") );
DateEntry *e;
QVBoxLayout *vb = new QVBoxLayout( &newDlg );
QScrollView *sv = new QScrollView( &newDlg );
sv->setResizePolicy( QScrollView::AutoOneFit );
sv->setFrameStyle( QFrame::NoFrame );
sv->setHScrollBarMode( QScrollView::AlwaysOff );
vb->addWidget( sv );
Event ev;