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) (unidiff)
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) (show whitespace changes)
-rw-r--r--core/pim/datebook/datebook.cpp6
-rw-r--r--core/pim/datebook/datebookweekheaderimpl.cpp7
-rw-r--r--core/pim/datebook/datebookweeklst.cpp41
-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.cpp8
-rw-r--r--core/pim/today/plugins/addressbook/addresspluginwidget.cpp4
-rw-r--r--core/pim/today/plugins/datebook/datebookpluginconfig.h10
-rw-r--r--core/pim/today/plugins/todolist/todopluginconfig.h7
-rw-r--r--core/settings/security/security.cpp13
12 files changed, 81 insertions, 42 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
@@ -191,8 +191,10 @@ DateBook::DateBook( QWidget *parent, const char *, WFlags f )
191#endif 191#endif
192 192
193 qDebug("done t=%d", t.elapsed() ); 193 qDebug("done t=%d", t.elapsed() );
194 194
195 connect( qApp, SIGNAL( flush() ), this, SLOT( flush() ) );
196 connect( qApp, SIGNAL( reload()), this, SLOT( reload() ) );
195 /* 197 /*
196 * Here is a problem description: 198 * Here is a problem description:
197 * When Weekview is the default view 199 * When Weekview is the default view
198 * a DateBookWeekView get's created 200 * a DateBookWeekView get's created
@@ -401,8 +403,10 @@ void DateBook::viewMonth() {
401 403
402void DateBook::insertEvent( const Event &e ) 404void DateBook::insertEvent( const Event &e )
403{ 405{
404 Event dupEvent=e; 406 Event dupEvent=e;
407 if(!dupEvent.isValidUid() ) // tkcRom seems to be different
408 dupEvent.assignUid();
405 dupEvent.setLocation(defaultLocation); 409 dupEvent.setLocation(defaultLocation);
406 dupEvent.setCategories(defaultCategories); 410 dupEvent.setCategories(defaultCategories);
407 db->addEvent(dupEvent); 411 db->addEvent(dupEvent);
408 emit newEvent(); 412 emit newEvent();
@@ -451,8 +455,10 @@ void DateBook::duplicateEvent( const Event &e )
451 */ 455 */
452 Event::RepeatPattern rp = newEv.repeatPattern(); 456 Event::RepeatPattern rp = newEv.repeatPattern();
453 rp.createTime = ::time( NULL ); 457 rp.createTime = ::time( NULL );
454 newEv.setRepeat( TRUE, rp ); // has repeat and repeatPattern... 458 newEv.setRepeat( TRUE, rp ); // has repeat and repeatPattern...
459 if( newEv.uid() == e.uid() || !newEv.isValidUid() )
460 newEv.assignUid();
455 461
456 db->addEvent(newEv); 462 db->addEvent(newEv);
457 emit newEvent(); 463 emit newEvent();
458 break; 464 break;
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,20 +100,21 @@ void DateBookWeekHeader::setDate(const QDate &d) {
100 dayofweek=d.dayOfWeek(); 100 dayofweek=d.dayOfWeek();
101 if(bStartOnMonday) 101 if(bStartOnMonday)
102 dayofweek--; 102 dayofweek--;
103 else if( dayofweek == 7 ) 103 else if( dayofweek == 7 )
104 /* we already have the right day -7 would lead to the current week..*/ 104 // we already have the right day -7 would lead to the current week..
105 dayofweek = 0; 105 dayofweek = 0;
106 106
107 date=date.addDays(-dayofweek); 107 date=date.addDays(-dayofweek);
108 calcWeek(date,week,year,bStartOnMonday); 108 calcWeek(date,week,year,bStartOnMonday);
109 QDate start=date; 109 QDate start=date;
110 QDate stop=start.addDays(6); 110 QDate stop=start.addDays(6);
111 labelDate->setText( QString::number(start.day()) + "." + 111 labelDate->setText( QString::number(start.day()) + "." +
112 start.monthName(start.month()) + "-" + 112 Calendar::nameOfMonth( start.month()) + "-" +
113 QString::number(stop.day()) + "." + 113 QString::number(stop.day()) + "." +
114 start.monthName(stop.month()) +" ("+ 114 Calendar::nameOfMonth( stop.month()) +" ("+
115 tr("w")+":"+QString::number( week ) +")"); 115 tr("w")+":"+QString::number( week ) +")");
116 date = d; // bugfix: 0001126 - date has to be the selected date, not monday!
116 emit dateChanged(date); 117 emit dateChanged(date);
117} 118}
118 119
119void DateBookWeekHeader::setStartOfWeek( bool onMonday ) 120void DateBookWeekHeader::setStartOfWeek( bool onMonday )
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
@@ -1,31 +1,16 @@
1#include "datebookweeklst.h" 1#include "datebookweeklst.h"
2 2
3#include "datebookweekheaderimpl.h"
4 3
5#include "datebook.h" 4#include "datebook.h"
6 5
7#include <qpe/calendar.h>
8#include <qpe/datebookdb.h>
9#include <qpe/event.h>
10#include <qpe/qpeapplication.h>
11#include <qpe/timestring.h>
12#include <qpe/datebookmonth.h> 6#include <qpe/datebookmonth.h>
13#include <qpe/config.h> 7#include <qpe/config.h>
14#include <qpe/resource.h> 8#include <qpe/resource.h>
9#include <qpe/calendar.h>
15 10
16#include <qdatetime.h>
17#include <qheader.h>
18#include <qlabel.h>
19#include <qlayout.h> 11#include <qlayout.h>
20#include <qpainter.h>
21#include <qpopupmenu.h>
22#include <qtimer.h>
23#include <qstyle.h>
24#include <qtoolbutton.h> 12#include <qtoolbutton.h>
25#include <qvbox.h>
26#include <qsizepolicy.h>
27#include <qabstractlayout.h>
28#include <qtl.h> 13#include <qtl.h>
29 14
30bool calcWeek(const QDate &d, int &week, int &year,bool startOnMonday = false); 15bool calcWeek(const QDate &d, int &week, int &year,bool startOnMonday = false);
31 16
@@ -72,12 +57,13 @@ void DateBookWeekLstHeader::setDate(const QDate &d) {
72 calcWeek(date,week,year,bStartOnMonday); 57 calcWeek(date,week,year,bStartOnMonday);
73 QDate start=date; 58 QDate start=date;
74 QDate stop=start.addDays(6); 59 QDate stop=start.addDays(6);
75 labelDate->setText( QString::number(start.day()) + "." + 60 labelDate->setText( QString::number(start.day()) + "." +
76 start.monthName(start.month()) + "-" + 61 Calendar::nameOfMonth( start.month() ) + "-" +
77 QString::number(stop.day()) + "." + 62 QString::number(stop.day()) + "." +
78 start.monthName(stop.month()) +" ("+ 63 Calendar::nameOfMonth( stop.month()) +" ("+
79 tr("w")+":"+QString::number( week ) +")"); 64 tr("w")+":"+QString::number( week ) +")");
65 date = d; // bugfix: 0001126 - date has to be the selected date, not monday!
80 emit dateChanged(date); 66 emit dateChanged(date);
81} 67}
82 68
83void DateBookWeekLstHeader::pickDate() { 69void DateBookWeekLstHeader::pickDate() {
@@ -124,9 +110,11 @@ DateBookWeekLstDayHdr::DateBookWeekLstDayHdr(const QDate &d, bool /* onM */,
124 110
125 static const QString wdays=tr("MTWTFSSM", "Week days"); 111 static const QString wdays=tr("MTWTFSSM", "Week days");
126 char day=wdays[d.dayOfWeek()-1]; 112 char day=wdays[d.dayOfWeek()-1];
127 113
114 //dont use dayOfWeek() to save space !
128 label->setText( QString(QObject::tr(QString(QChar(day)))) + " " +QString::number(d.day()) ); 115 label->setText( QString(QObject::tr(QString(QChar(day)))) + " " +QString::number(d.day()) );
116
129 add->setText("+"); 117 add->setText("+");
130 118
131 if (d == QDate::currentDate()) { 119 if (d == QDate::currentDate()) {
132 QPalette pal=label->palette(); 120 QPalette pal=label->palette();
@@ -340,10 +328,25 @@ void DateBookWeekLst::redraw() {getEvents();}
340QDate DateBookWeekLst::date() { 328QDate DateBookWeekLst::date() {
341 return bdate; 329 return bdate;
342} 330}
343 331
332// return the date at the beginning of the week...
333// copied from DateBookWeek
334QDate DateBookWeekLst::weekDate() const
335{
336 QDate d=bdate;
337
338 // Calculate offset to first day of week.
339 int dayoffset=d.dayOfWeek();
340 if(bStartOnMonday) dayoffset--;
341 else if( dayoffset == 7 )
342 dayoffset = 0;
343
344 return d.addDays(-dayoffset);
345}
346
344void DateBookWeekLst::getEvents() { 347void DateBookWeekLst::getEvents() {
345 QDate start = date(); 348 QDate start = weekDate(); //date();
346 QDate stop = start.addDays(6); 349 QDate stop = start.addDays(6);
347 QValueList<EffectiveEvent> el = db->getEffectiveEvents(start, stop); 350 QValueList<EffectiveEvent> el = db->getEffectiveEvents(start, stop);
348 351
349 if (view) delete view; 352 if (view) delete view;
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
@@ -119,8 +119,9 @@ public:
119 void setDate( int y, int w ); 119 void setDate( int y, int w );
120 void setDate(const QDate &d ); 120 void setDate(const QDate &d );
121 int week() const { return _week; }; 121 int week() const { return _week; };
122 QDate date(); 122 QDate date();
123 QDate weekDate() const;
123 124
124public slots: 125public slots:
125 void redraw(); 126 void redraw();
126 void dateChanged(QDate &date); 127 void dateChanged(QDate &date);
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
@@ -75,9 +75,9 @@ void DatebookSearch::insertItem( void *rec )
75 if ( !actionSearchInDates->isOn() && ( 75 if ( !actionSearchInDates->isOn() && (
76 ev->lastHitField() == Qtopia::StartDateTime || 76 ev->lastHitField() == Qtopia::StartDateTime ||
77 ev->lastHitField() == Qtopia::EndDateTime ) 77 ev->lastHitField() == Qtopia::EndDateTime )
78 ) return; 78 ) return;
79 (void)new EventItem( this, ev ); 79 new EventItem( this, ev );
80 _resultCount++; 80 _resultCount++;
81} 81}
82 82
83QPopupMenu* DatebookSearch::popupMenu() 83QPopupMenu* DatebookSearch::popupMenu()
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
@@ -81,13 +81,13 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags f ) :
81 mainLayout->addWidget( buttonBox ); 81 mainLayout->addWidget( buttonBox );
82 detailsFrame->hide(); 82 detailsFrame->hide();
83 buttonBox->hide(); 83 buttonBox->hide();
84 84
85 searches.append( new AppLnkSearch( resultsList, tr("applications") ) ); 85 searches.append( new AppLnkSearch( resultsList, tr("Applications") ) );
86 searches.append( new DocLnkSearch( resultsList, tr("documents") ) ); 86 searches.append( new DocLnkSearch( resultsList, tr("Documents") ) );
87 searches.append( new TodoSearch( resultsList, tr("todo") ) ); 87 searches.append( new TodoSearch( resultsList, tr("Todo List") ) );
88 searches.append( new DatebookSearch( resultsList, tr("datebook") ) ); 88 searches.append( new DatebookSearch( resultsList, tr("Calendar") ) );
89 searches.append( new AdressSearch( resultsList, tr("adressbook") ) ); 89 searches.append( new AdressSearch( resultsList, tr("Contacts") ) );
90 90
91 setCentralWidget( mainFrame ); 91 setCentralWidget( mainFrame );
92 92
93 popupTimer = new QTimer(); 93 popupTimer = new QTimer();
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
@@ -6,16 +6,21 @@
6 * (at your option) any later version. * 6 * (at your option) any later version. *
7 * * 7 * *
8 ***************************************************************************/ 8 ***************************************************************************/
9 9
10// (c) 2002 Patrick S. Vogt <tille@handhelds.org> 10// (c) 2002-2003 Patrick S. Vogt <tille@handhelds.org>
11 11
12#ifndef MAINWINDOW_H 12#ifndef MAINWINDOW_H
13#define MAINWINDOW_H 13#define MAINWINDOW_H
14 14
15#include <qmainwindow.h> 15#include <qmainwindow.h>
16#include <qdialog.h>
17#include <qaction.h>
16#include <qlist.h> 18#include <qlist.h>
19
17#include <qmap.h> 20#include <qmap.h>
21#include <qtimer.h>
22#include <qpopupmenu.h>
18 23
19class QAction; 24class QAction;
20class QPEToolBar; 25class QPEToolBar;
21class QHBox; 26class QHBox;
@@ -25,10 +30,13 @@ class QFrame;
25class OListView; 30class OListView;
26class OListViewItem; 31class OListViewItem;
27class QListViewItem; 32class QListViewItem;
28class QPopupMenu; 33class QPopupMenu;
29class QSignalMapper;
30class QTimer; 34class QTimer;
35
36class QSignalMapper;
37class QButton;
38
31class SearchGroup; 39class SearchGroup;
32 40
33class MainWindow : public QMainWindow 41class MainWindow : public QMainWindow
34{ 42{
@@ -37,9 +45,9 @@ class MainWindow : public QMainWindow
37 45
38public: 46public:
39 MainWindow( QWidget *parent = 0, const char *name = 0, WFlags f = 0 ); 47 MainWindow( QWidget *parent = 0, const char *name = 0, WFlags f = 0 );
40 ~MainWindow(); 48 ~MainWindow();
41 49 static QString appName() { return QString::fromLatin1("osearch"); }
42 50
43public slots: 51public slots:
44 void setCurrent(QListViewItem*); 52 void setCurrent(QListViewItem*);
45 void setSearch( const QString& ); 53 void setSearch( const QString& );
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
@@ -77,8 +77,14 @@ AddressBookPluginConfig::AddressBookPluginConfig( QWidget *parent, const char*
77 SpinDaysClip = new QSpinBox( box3, "SpinDays" ); 77 SpinDaysClip = new QSpinBox( box3, "SpinDays" );
78 SpinDaysClip->setMaxValue( 200 ); 78 SpinDaysClip->setMaxValue( 200 );
79 QWhatsThis::add( SpinDaysClip , tr( "How many days we should search forward" ) ); 79 QWhatsThis::add( SpinDaysClip , tr( "How many days we should search forward" ) );
80 80
81// QHBox *box4 = new QHBox( this );
82
83// QLabel* colorLabel = new QLabel( box4, "" );
84// colorLabel->setText( tr( "To activate settings: Restart application !" ) );
85
86
81 QHBox *box5 = new QHBox( this ); 87 QHBox *box5 = new QHBox( this );
82 QLabel* colorLabel2 = new QLabel( box5, "" ); 88 QLabel* colorLabel2 = new QLabel( box5, "" );
83 colorLabel2->setText( tr( "Set Headline Color: " ) ); 89 colorLabel2->setText( tr( "Set Headline Color: " ) );
84 headlineColor = new OColorButton( box5, black , "headlineColor" ); 90 headlineColor = new OColorButton( box5, black , "headlineColor" );
@@ -103,9 +109,9 @@ AddressBookPluginConfig::AddressBookPluginConfig( QWidget *parent, const char*
103 QWhatsThis::add( urgentColor , tr( "This urgent color will be used if we are close to the event !" ) ); 109 QWhatsThis::add( urgentColor , tr( "This urgent color will be used if we are close to the event !" ) );
104 QWhatsThis::add( SpinUrgentClip , tr( "The urgent color will be used if the birthday/anniversary is closer than given days !" ) ); 110 QWhatsThis::add( SpinUrgentClip , tr( "The urgent color will be used if the birthday/anniversary is closer than given days !" ) );
105 111
106 112
107 layout->addWidget( b_group ); 113 //layout->addWidget( box4 );
108 layout->addWidget( box1 ); 114 layout->addWidget( box1 );
109 // layout->addWidget( box2 ); 115 // layout->addWidget( box2 );
110 layout->addWidget( box3 ); 116 layout->addWidget( box3 );
111 layout->addWidget( box5 ); 117 layout->addWidget( box5 );
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
@@ -115,8 +115,12 @@ void AddressBookPluginWidget::getAddress() {
115 if ( m_showBirthdays ){ 115 if ( m_showBirthdays ){
116 qWarning("Searching from now (%s) until %s ! ", 116 qWarning("Searching from now (%s) until %s ! ",
117 QDate::currentDate().toString().latin1(), 117 QDate::currentDate().toString().latin1(),
118 lookAheadDate.toString().latin1() ); 118 lookAheadDate.toString().latin1() );
119 }
120
121 if ( m_contactdb->hasQuerySettings( OContactAccess::DateDiff ) ){
122
119 123
120 OContact querybirthdays; 124 OContact querybirthdays;
121 querybirthdays.setBirthday( lookAheadDate ); 125 querybirthdays.setBirthday( lookAheadDate );
122 126
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
@@ -22,12 +22,15 @@
22#include <qspinbox.h> 22#include <qspinbox.h>
23 23
24#include <opie/todayconfigwidget.h> 24#include <opie/todayconfigwidget.h>
25 25
26#include "datebookpluginconfigbase.h"
27
26class DatebookPluginConfig : public TodayConfigWidget { 28class DatebookPluginConfig : public TodayConfigWidget {
27 29
28 Q_OBJECT 30 Q_OBJECT
29 31
32
30public: 33public:
31 DatebookPluginConfig( QWidget *parent, const char *name ); 34 DatebookPluginConfig( QWidget *parent, const char *name );
32 ~DatebookPluginConfig(); 35 ~DatebookPluginConfig();
33 36
@@ -38,15 +41,10 @@ private:
38 */ 41 */
39 bool changed(); 42 bool changed();
40 void readConfig(); 43 void readConfig();
41 44
42 QCheckBox* CheckBox2;
43 QCheckBox* CheckBox1;
44 QCheckBox* CheckBox3;
45 QSpinBox* SpinBox1;
46 QSpinBox* SpinBox2;
47
48 45
46 DatebookPluginConfigBase *m_gui;
49 // how many lines should be showed in the datebook section 47 // how many lines should be showed in the datebook section
50 int m_max_lines_meet; 48 int m_max_lines_meet;
51 // If location is to be showed too, 1 to activate it. 49 // If location is to be showed too, 1 to activate it.
52 int m_show_location; 50 int m_show_location;
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
@@ -16,13 +16,14 @@
16 16
17#ifndef TODOLIST_PLUGIN_CONFIG_H 17#ifndef TODOLIST_PLUGIN_CONFIG_H
18#define TODOLIST_PLUGIN_CONFIG_H 18#define TODOLIST_PLUGIN_CONFIG_H
19 19
20//#include <qwidget.h>
21#include <qspinbox.h> 20#include <qspinbox.h>
22 21
23#include <opie/todayconfigwidget.h> 22#include <opie/todayconfigwidget.h>
24 23
24#include "todopluginconfigbase.h"
25
25class TodolistPluginConfig : public TodayConfigWidget { 26class TodolistPluginConfig : public TodayConfigWidget {
26 27
27Q_OBJECT 28Q_OBJECT
28 29
@@ -38,10 +39,10 @@ private:
38 bool changed(); 39 bool changed();
39 void readConfig(); 40 void readConfig();
40 void writeConfig(); 41 void writeConfig();
41 42
42 QSpinBox* SpinBox2; 43 TodoPluginConfigBase *m_gui;
43 QSpinBox* SpinBoxClip; 44
44 45
45 // how many lines should be showed in the todolist section 46 // how many lines should be showed in the todolist section
46 int m_max_lines_task; 47 int m_max_lines_task;
47 // clip the lines after X chars 48 // clip the lines after X chars
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
@@ -110,25 +110,29 @@ void Security::updateGUI()
110 110
111 111
112void Security::show() 112void Security::show()
113{ 113{
114 valid=FALSE; 114 //valid=FALSE;
115 setEnabled(FALSE); 115 setEnabled(FALSE);
116 SecurityBase::show(); 116 SecurityBase::show();
117 if ( passcode.isEmpty() ) { 117 if ( passcode.isEmpty() ) {
118 // could insist... 118 // could insist...
119 //changePassCode(); 119 //changePassCode();
120 //if ( passcode.isEmpty() ) 120 //if ( passcode.isEmpty() )
121 //reject(); 121 //reject();
122 } else { 122 } else {
123
124 if (!valid) // security passcode was not asked yet, so ask now
125 {
123 QString pc = enterPassCode(tr("Enter passcode")); 126 QString pc = enterPassCode(tr("Enter passcode"));
124 if ( pc != passcode ) { 127 if ( pc != passcode ) {
125 QMessageBox::critical(this, tr("Passcode incorrect"), 128 QMessageBox::critical(this, tr("Passcode incorrect"),
126 tr("The passcode entered is incorrect.\nAccess denied")); 129 tr("The passcode entered is incorrect.\nAccess denied"));
127 reject(); 130 reject();
128 return; 131 return;
129 } 132 }
130 } 133 }
134 }
131 setEnabled(TRUE); 135 setEnabled(TRUE);
132 valid=TRUE; 136 valid=TRUE;
133} 137}
134 138
@@ -212,15 +216,20 @@ void Security::loadUsers ( void )
212 passwd.close(); 216 passwd.close();
213 } 217 }
214 218
215} 219}
220
216void Security::toggleAutoLogin(bool val) 221void Security::toggleAutoLogin(bool val)
217{ 222{
218 autoLogin=val; 223 autoLogin=val;
219 userlist->setEnabled(val); 224 userlist->setEnabled(val);
220 if (!autoLogin) 225 if (!autoLogin)
221 autoLoginName=userlist->currentText(); 226 autoLoginName=userlist->currentText();
222} 227}
228
229
230
231
223void Security::setSyncNet(const QString& sn) 232void Security::setSyncNet(const QString& sn)
224{ 233{
225 int auth_peer,auth_peer_bits; 234 int auth_peer,auth_peer_bits;
226 parseNet(sn,auth_peer,auth_peer_bits); 235 parseNet(sn,auth_peer,auth_peer_bits);
@@ -229,8 +238,9 @@ void Security::setSyncNet(const QString& sn)
229 238
230void Security::applySecurity() 239void Security::applySecurity()
231{ 240{
232 if ( valid ) { 241 if ( valid ) {
242<<<<<<< security.cpp
233 Config cfg("Security"); 243 Config cfg("Security");
234 cfg.setGroup("Passcode"); 244 cfg.setGroup("Passcode");
235 cfg.writeEntry("passcode",passcode); 245 cfg.writeEntry("passcode",passcode);
236 cfg.writeEntry("passcode_poweron",passcode_poweron->isChecked()); 246 cfg.writeEntry("passcode_poweron",passcode_poweron->isChecked());
@@ -261,8 +271,9 @@ void Security::applySecurity()
261 } 271 }
262 272
263 cfg.setGroup("SyncMode"); 273 cfg.setGroup("SyncMode");
264 cfg.writeEntry("Mode", syncModeCombo->currentItem()+1 ); 274 cfg.writeEntry("Mode", syncModeCombo->currentItem()+1 );
275
265 } 276 }
266} 277}
267 278
268void Security::changeLoginName( int idx ) 279void Security::changeLoginName( int idx )