summaryrefslogtreecommitdiff
path: root/core
authorwaspe <waspe>2003-11-03 18:28:50 (UTC)
committer waspe <waspe>2003-11-03 18:28:50 (UTC)
commit87a9d6badcf518ffd14559ef886ff7729b63b73b (patch) (side-by-side diff)
tree05af57bcebb8a124c2561336e4ff3dfdd52aeccb /core
parent9ce566fd5b280622670cf7b0e158f9d9c54e6e9a (diff)
downloadopie-87a9d6badcf518ffd14559ef886ff7729b63b73b.zip
opie-87a9d6badcf518ffd14559ef886ff7729b63b73b.tar.gz
opie-87a9d6badcf518ffd14559ef886ff7729b63b73b.tar.bz2
resolved merge conflict
Diffstat (limited to 'core') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/datebook/datebook.cpp24
-rw-r--r--core/pim/datebook/datebookweekheaderimpl.cpp11
-rw-r--r--core/pim/datebook/datebookweeklst.cpp43
-rw-r--r--core/pim/datebook/datebookweeklst.h1
-rw-r--r--core/pim/osearch/datebooksearch.cpp2
-rw-r--r--core/pim/osearch/mainwindow.cpp10
-rw-r--r--core/pim/osearch/mainwindow.h14
-rw-r--r--core/pim/today/plugins/addressbook/addresspluginconfig.cpp10
-rw-r--r--core/pim/today/plugins/addressbook/addresspluginwidget.cpp12
-rw-r--r--core/pim/today/plugins/datebook/datebookpluginconfig.h12
-rw-r--r--core/pim/today/plugins/todolist/todopluginconfig.h9
-rw-r--r--core/settings/security/security.cpp27
12 files changed, 107 insertions, 68 deletions
diff --git a/core/pim/datebook/datebook.cpp b/core/pim/datebook/datebook.cpp
index 10a9b59..07d7164 100644
--- a/core/pim/datebook/datebook.cpp
+++ b/core/pim/datebook/datebook.cpp
@@ -194,2 +194,4 @@ DateBook::DateBook( QWidget *parent, const char *, WFlags f )
+ connect( qApp, SIGNAL( flush() ), this, SLOT( flush() ) );
+ connect( qApp, SIGNAL( reload()), this, SLOT( reload() ) );
/*
@@ -404,2 +406,4 @@ void DateBook::insertEvent( const Event &e )
Event dupEvent=e;
+ if(!dupEvent.isValidUid() ) // tkcRom seems to be different
+ dupEvent.assignUid();
dupEvent.setLocation(defaultLocation);
@@ -445,11 +449,13 @@ void DateBook::duplicateEvent( const Event &e )
}
- /*
- * The problem:
- * DateBookDB does remove repeating events not by uid but by the time
- * the recurrence was created
- * so we need to update that time as well
- */
- Event::RepeatPattern rp = newEv.repeatPattern();
- rp.createTime = ::time( NULL );
- newEv.setRepeat( TRUE, rp ); // has repeat and repeatPattern...
+ /*
+ * The problem:
+ * DateBookDB does remove repeating events not by uid but by the time
+ * the recurrence was created
+ * so we need to update that time as well
+ */
+ Event::RepeatPattern rp = newEv.repeatPattern();
+ rp.createTime = ::time( NULL );
+ newEv.setRepeat( TRUE, rp ); // has repeat and repeatPattern...
+ if( newEv.uid() == e.uid() || !newEv.isValidUid() )
+ newEv.assignUid();
diff --git a/core/pim/datebook/datebookweekheaderimpl.cpp b/core/pim/datebook/datebookweekheaderimpl.cpp
index 770410e..84b4f1b 100644
--- a/core/pim/datebook/datebookweekheaderimpl.cpp
+++ b/core/pim/datebook/datebookweekheaderimpl.cpp
@@ -100,8 +100,8 @@ void DateBookWeekHeader::setDate(const QDate &d) {
dayofweek=d.dayOfWeek();
- if(bStartOnMonday)
+ if(bStartOnMonday)
dayofweek--;
else if( dayofweek == 7 )
- /* we already have the right day -7 would lead to the current week..*/
+ // we already have the right day -7 would lead to the current week..
dayofweek = 0;
-
+
date=date.addDays(-dayofweek);
@@ -111,6 +111,7 @@ void DateBookWeekHeader::setDate(const QDate &d) {
labelDate->setText( QString::number(start.day()) + "." +
- start.monthName(start.month()) + "-" +
+ Calendar::nameOfMonth( start.month()) + "-" +
QString::number(stop.day()) + "." +
- start.monthName(stop.month()) +" ("+
+ Calendar::nameOfMonth( stop.month()) +" ("+
tr("w")+":"+QString::number( week ) +")");
+ date = d; // bugfix: 0001126 - date has to be the selected date, not monday!
emit dateChanged(date);
diff --git a/core/pim/datebook/datebookweeklst.cpp b/core/pim/datebook/datebookweeklst.cpp
index aad1f3a..24fb0ba 100644
--- a/core/pim/datebook/datebookweeklst.cpp
+++ b/core/pim/datebook/datebookweeklst.cpp
@@ -2,3 +2,2 @@
-#include "datebookweekheaderimpl.h"
@@ -6,7 +5,2 @@
-#include <qpe/calendar.h>
-#include <qpe/datebookdb.h>
-#include <qpe/event.h>
-#include <qpe/qpeapplication.h>
-#include <qpe/timestring.h>
#include <qpe/datebookmonth.h>
@@ -14,15 +8,6 @@
#include <qpe/resource.h>
+#include <qpe/calendar.h>
-#include <qdatetime.h>
-#include <qheader.h>
-#include <qlabel.h>
#include <qlayout.h>
-#include <qpainter.h>
-#include <qpopupmenu.h>
-#include <qtimer.h>
-#include <qstyle.h>
#include <qtoolbutton.h>
-#include <qvbox.h>
-#include <qsizepolicy.h>
-#include <qabstractlayout.h>
#include <qtl.h>
@@ -75,6 +60,7 @@ void DateBookWeekLstHeader::setDate(const QDate &d) {
labelDate->setText( QString::number(start.day()) + "." +
- start.monthName(start.month()) + "-" +
+ Calendar::nameOfMonth( start.month() ) + "-" +
QString::number(stop.day()) + "." +
- start.monthName(stop.month()) +" ("+
+ Calendar::nameOfMonth( stop.month()) +" ("+
tr("w")+":"+QString::number( week ) +")");
+ date = d; // bugfix: 0001126 - date has to be the selected date, not monday!
emit dateChanged(date);
@@ -127,4 +113,6 @@ DateBookWeekLstDayHdr::DateBookWeekLstDayHdr(const QDate &d, bool /* onM */,
+ //dont use dayOfWeek() to save space !
label->setText( QString(QObject::tr(QString(QChar(day)))) + " " +QString::number(d.day()) );
- add->setText("+");
+
+ add->setText("+");
@@ -343,4 +331,19 @@ QDate DateBookWeekLst::date() {
+// return the date at the beginning of the week...
+// copied from DateBookWeek
+QDate DateBookWeekLst::weekDate() const
+{
+ QDate d=bdate;
+
+ // Calculate offset to first day of week.
+ int dayoffset=d.dayOfWeek();
+ if(bStartOnMonday) dayoffset--;
+ else if( dayoffset == 7 )
+ dayoffset = 0;
+
+ return d.addDays(-dayoffset);
+}
+
void DateBookWeekLst::getEvents() {
- QDate start = date();
+ QDate start = weekDate(); //date();
QDate stop = start.addDays(6);
diff --git a/core/pim/datebook/datebookweeklst.h b/core/pim/datebook/datebookweeklst.h
index 0bfbcda..f683ce7 100644
--- a/core/pim/datebook/datebookweeklst.h
+++ b/core/pim/datebook/datebookweeklst.h
@@ -122,2 +122,3 @@ public:
QDate date();
+ QDate weekDate() const;
diff --git a/core/pim/osearch/datebooksearch.cpp b/core/pim/osearch/datebooksearch.cpp
index be2bf25..5da7ae9 100644
--- a/core/pim/osearch/datebooksearch.cpp
+++ b/core/pim/osearch/datebooksearch.cpp
@@ -78,3 +78,3 @@ void DatebookSearch::insertItem( void *rec )
) return;
- (void)new EventItem( this, ev );
+ new EventItem( this, ev );
_resultCount++;
diff --git a/core/pim/osearch/mainwindow.cpp b/core/pim/osearch/mainwindow.cpp
index aa52061..f768d81 100644
--- a/core/pim/osearch/mainwindow.cpp
+++ b/core/pim/osearch/mainwindow.cpp
@@ -84,7 +84,7 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags f ) :
- searches.append( new AppLnkSearch( resultsList, tr("applications") ) );
- searches.append( new DocLnkSearch( resultsList, tr("documents") ) );
- searches.append( new TodoSearch( resultsList, tr("todo") ) );
- searches.append( new DatebookSearch( resultsList, tr("datebook") ) );
- searches.append( new AdressSearch( resultsList, tr("adressbook") ) );
+ searches.append( new AppLnkSearch( resultsList, tr("Applications") ) );
+ searches.append( new DocLnkSearch( resultsList, tr("Documents") ) );
+ searches.append( new TodoSearch( resultsList, tr("Todo List") ) );
+ searches.append( new DatebookSearch( resultsList, tr("Calendar") ) );
+ searches.append( new AdressSearch( resultsList, tr("Contacts") ) );
diff --git a/core/pim/osearch/mainwindow.h b/core/pim/osearch/mainwindow.h
index 1f5c4bb..75054f0 100644
--- a/core/pim/osearch/mainwindow.h
+++ b/core/pim/osearch/mainwindow.h
@@ -9,3 +9,3 @@
-// (c) 2002 Patrick S. Vogt <tille@handhelds.org>
+// (c) 2002-2003 Patrick S. Vogt <tille@handhelds.org>
@@ -15,4 +15,9 @@
#include <qmainwindow.h>
+#include <qdialog.h>
+#include <qaction.h>
#include <qlist.h>
+
#include <qmap.h>
+#include <qtimer.h>
+#include <qpopupmenu.h>
@@ -28,4 +33,7 @@ class QListViewItem;
class QPopupMenu;
-class QSignalMapper;
class QTimer;
+
+class QSignalMapper;
+class QButton;
+
class SearchGroup;
@@ -40,3 +48,3 @@ public:
~MainWindow();
-
+ static QString appName() { return QString::fromLatin1("osearch"); }
diff --git a/core/pim/today/plugins/addressbook/addresspluginconfig.cpp b/core/pim/today/plugins/addressbook/addresspluginconfig.cpp
index b79c679..8863192 100644
--- a/core/pim/today/plugins/addressbook/addresspluginconfig.cpp
+++ b/core/pim/today/plugins/addressbook/addresspluginconfig.cpp
@@ -80,2 +80,8 @@ AddressBookPluginConfig::AddressBookPluginConfig( QWidget *parent, const char*
+// QHBox *box4 = new QHBox( this );
+
+// QLabel* colorLabel = new QLabel( box4, "" );
+// colorLabel->setText( tr( "To activate settings: Restart application !" ) );
+
+
QHBox *box5 = new QHBox( this );
@@ -106,5 +112,5 @@ AddressBookPluginConfig::AddressBookPluginConfig( QWidget *parent, const char*
- layout->addWidget( b_group );
+ //layout->addWidget( box4 );
layout->addWidget( box1 );
- // layout->addWidget( box2 );
+ //layout->addWidget( box2 );
layout->addWidget( box3 );
diff --git a/core/pim/today/plugins/addressbook/addresspluginwidget.cpp b/core/pim/today/plugins/addressbook/addresspluginwidget.cpp
index dad09db..d47bc0b 100644
--- a/core/pim/today/plugins/addressbook/addresspluginwidget.cpp
+++ b/core/pim/today/plugins/addressbook/addresspluginwidget.cpp
@@ -104,3 +104,3 @@ void AddressBookPluginWidget::getAddress() {
// Check whether the database provide the search option..
- if ( !m_contactdb->hasQuerySettings( OContactAccess::DateDiff ) ){
+ if ( !m_contactdb->hasQuerySettings( OContactAccess::DateDiff ) ){
// Libopie seems to be old..
@@ -110,3 +110,3 @@ void AddressBookPluginWidget::getAddress() {
}
-
+
// Define the query for birthdays and start search..
@@ -115,5 +115,9 @@ void AddressBookPluginWidget::getAddress() {
if ( m_showBirthdays ){
- qWarning("Searching from now (%s) until %s ! ",
- QDate::currentDate().toString().latin1(),
+ qWarning("Searching from now (%s) until %s ! ",
+ QDate::currentDate().toString().latin1(),
lookAheadDate.toString().latin1() );
+ }
+
+ if ( m_contactdb->hasQuerySettings( OContactAccess::DateDiff ) ){
+
diff --git a/core/pim/today/plugins/datebook/datebookpluginconfig.h b/core/pim/today/plugins/datebook/datebookpluginconfig.h
index bc412dd..2d303fc 100644
--- a/core/pim/today/plugins/datebook/datebookpluginconfig.h
+++ b/core/pim/today/plugins/datebook/datebookpluginconfig.h
@@ -25,3 +25,5 @@
-class DatebookPluginConfig : public TodayConfigWidget {
+#include "datebookpluginconfigbase.h"
+
+class DatebookPluginConfig : public TodayConfigWidget {
@@ -29,2 +31,3 @@ class DatebookPluginConfig : public TodayConfigWidget {
+
public:
@@ -41,9 +44,4 @@ private:
- QCheckBox* CheckBox2;
- QCheckBox* CheckBox1;
- QCheckBox* CheckBox3;
- QSpinBox* SpinBox1;
- QSpinBox* SpinBox2;
-
+ DatebookPluginConfigBase *m_gui;
// how many lines should be showed in the datebook section
diff --git a/core/pim/today/plugins/todolist/todopluginconfig.h b/core/pim/today/plugins/todolist/todopluginconfig.h
index e09251c..54d35cf 100644
--- a/core/pim/today/plugins/todolist/todopluginconfig.h
+++ b/core/pim/today/plugins/todolist/todopluginconfig.h
@@ -19,3 +19,2 @@
-//#include <qwidget.h>
#include <qspinbox.h>
@@ -24,5 +23,7 @@
+#include "todopluginconfigbase.h"
+
class TodolistPluginConfig : public TodayConfigWidget {
-Q_OBJECT
+ Q_OBJECT
@@ -40,5 +41,5 @@ private:
void writeConfig();
+
+ TodoPluginConfigBase *m_gui;
- QSpinBox* SpinBox2;
- QSpinBox* SpinBoxClip;
diff --git a/core/settings/security/security.cpp b/core/settings/security/security.cpp
index c4726b3..00ea105 100644
--- a/core/settings/security/security.cpp
+++ b/core/settings/security/security.cpp
@@ -113,3 +113,3 @@ void Security::show()
{
- valid=FALSE;
+ //valid=FALSE;
setEnabled(FALSE);
@@ -122,9 +122,13 @@ void Security::show()
} else {
- QString pc = enterPassCode(tr("Enter passcode"));
- if ( pc != passcode ) {
- QMessageBox::critical(this, tr("Passcode incorrect"),
- tr("The passcode entered is incorrect.\nAccess denied"));
- reject();
- return;
- }
+
+ if (!valid) // security passcode was not asked yet, so ask now
+ {
+ QString pc = enterPassCode(tr("Enter passcode"));
+ if ( pc != passcode ) {
+ QMessageBox::critical(this, tr("Passcode incorrect"),
+ tr("The passcode entered is incorrect.\nAccess denied"));
+ reject();
+ return;
+ }
+ }
}
@@ -215,2 +219,3 @@ void Security::loadUsers ( void )
}
+
void Security::toggleAutoLogin(bool val)
@@ -222,2 +227,6 @@ void Security::toggleAutoLogin(bool val)
}
+
+
+
+
void Security::setSyncNet(const QString& sn)
@@ -232,2 +241,3 @@ void Security::applySecurity()
if ( valid ) {
+<<<<<<< security.cpp
Config cfg("Security");
@@ -264,2 +274,3 @@ void Security::applySecurity()
cfg.writeEntry("Mode", syncModeCombo->currentItem()+1 );
+
}