author | zautrix <zautrix> | 2005-07-28 10:38:58 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-07-28 10:38:58 (UTC) |
commit | fee4c893fe8fd01af1b55c1ccd40213fc18a36b4 (patch) (unidiff) | |
tree | 83a3018d54d60e880d441a6f91ef8fe54254aaff /korganizer | |
parent | 27ffa2e08ebb38e71f613af3a214750442418e2c (diff) | |
download | kdepimpi-fee4c893fe8fd01af1b55c1ccd40213fc18a36b4.zip kdepimpi-fee4c893fe8fd01af1b55c1ccd40213fc18a36b4.tar.gz kdepimpi-fee4c893fe8fd01af1b55c1ccd40213fc18a36b4.tar.bz2 |
fixxxx
-rw-r--r-- | korganizer/koeditorgeneraltodo.cpp | 21 | ||||
-rw-r--r-- | korganizer/kolistview.cpp | 71 | ||||
-rw-r--r-- | korganizer/mainwindow.cpp | 5 |
3 files changed, 47 insertions, 50 deletions
diff --git a/korganizer/koeditorgeneraltodo.cpp b/korganizer/koeditorgeneraltodo.cpp index 965cf47..10d9a8c 100644 --- a/korganizer/koeditorgeneraltodo.cpp +++ b/korganizer/koeditorgeneraltodo.cpp | |||
@@ -52,120 +52,119 @@ | |||
52 | #include "kolocationbox.h" | 52 | #include "kolocationbox.h" |
53 | 53 | ||
54 | KOEditorGeneralTodo::KOEditorGeneralTodo(QObject* parent, | 54 | KOEditorGeneralTodo::KOEditorGeneralTodo(QObject* parent, |
55 | const char* name) | 55 | const char* name) |
56 | : KOEditorGeneral( parent, name) | 56 | : KOEditorGeneral( parent, name) |
57 | { | 57 | { |
58 | } | 58 | } |
59 | 59 | ||
60 | KOEditorGeneralTodo::~KOEditorGeneralTodo() | 60 | KOEditorGeneralTodo::~KOEditorGeneralTodo() |
61 | { | 61 | { |
62 | } | 62 | } |
63 | 63 | ||
64 | void KOEditorGeneralTodo::finishSetup() | 64 | void KOEditorGeneralTodo::finishSetup() |
65 | { | 65 | { |
66 | 66 | ||
67 | // QWidget::setTabOrder(mSummaryEdit, mLocationEdit); | 67 | // QWidget::setTabOrder(mSummaryEdit, mLocationEdit); |
68 | // QWidget::setTabOrder(mLocationEdit, mDueCheck); | 68 | // QWidget::setTabOrder(mLocationEdit, mDueCheck); |
69 | // QWidget::setTabOrder(mDueCheck, mDueDateEdit); | 69 | // QWidget::setTabOrder(mDueCheck, mDueDateEdit); |
70 | // QWidget::setTabOrder(mDueDateEdit, mDueTimeEdit); | 70 | // QWidget::setTabOrder(mDueDateEdit, mDueTimeEdit); |
71 | // QWidget::setTabOrder(mDueTimeEdit, mStartCheck); | 71 | // QWidget::setTabOrder(mDueTimeEdit, mStartCheck); |
72 | // QWidget::setTabOrder(mStartCheck, mStartDateEdit); | 72 | // QWidget::setTabOrder(mStartCheck, mStartDateEdit); |
73 | // QWidget::setTabOrder(mStartDateEdit, mStartTimeEdit); | 73 | // QWidget::setTabOrder(mStartDateEdit, mStartTimeEdit); |
74 | // QWidget::setTabOrder(mStartTimeEdit, mTimeButton); | 74 | // QWidget::setTabOrder(mStartTimeEdit, mTimeButton); |
75 | // QWidget::setTabOrder(mTimeButton, mCompletedCombo); | 75 | // QWidget::setTabOrder(mTimeButton, mCompletedCombo); |
76 | // QWidget::setTabOrder(mCompletedCombo, mPriorityCombo); | 76 | // QWidget::setTabOrder(mCompletedCombo, mPriorityCombo); |
77 | // QWidget::setTabOrder(mPriorityCombo, mAlarmButton); | 77 | // QWidget::setTabOrder(mPriorityCombo, mAlarmButton); |
78 | // QWidget::setTabOrder(mAlarmButton, mCategoriesButton); | 78 | // QWidget::setTabOrder(mAlarmButton, mCategoriesButton); |
79 | // QWidget::setTabOrder(mCategoriesButton, mSecrecyCombo); | 79 | // QWidget::setTabOrder(mCategoriesButton, mSecrecyCombo); |
80 | // QWidget::setTabOrder(mSecrecyCombo, mDescriptionEdit); | 80 | // QWidget::setTabOrder(mSecrecyCombo, mDescriptionEdit); |
81 | mSummaryEdit->load(KOLocationBox::SUMMARYTODO); | 81 | mSummaryEdit->load(KOLocationBox::SUMMARYTODO); |
82 | mSummaryEdit->setFocus(); | 82 | mSummaryEdit->setFocus(); |
83 | } | 83 | } |
84 | 84 | ||
85 | void KOEditorGeneralTodo::initTime(QWidget *parent,QBoxLayout *topLayout) | 85 | void KOEditorGeneralTodo::initTime(QWidget *parent,QBoxLayout *topLayout) |
86 | { | 86 | { |
87 | QBoxLayout *timeLayout = new QVBoxLayout(topLayout); | 87 | QBoxLayout *timeLayout = new QVBoxLayout(topLayout); |
88 | 88 | ||
89 | QGroupBox *timeGroupBox = new QGroupBox(1,QGroupBox::Horizontal, | 89 | QGroupBox *timeGroupBox = new QGroupBox(1,QGroupBox::Horizontal, |
90 | i18n("Date && Time"),parent); | 90 | i18n("Date && Time"),parent); |
91 | timeLayout->addWidget(timeGroupBox); | 91 | timeLayout->addWidget(timeGroupBox); |
92 | timeGroupBox->layout()->setSpacing( KDialog::spacingHint()-2 ); | 92 | timeGroupBox->layout()->setSpacing( KDialog::spacingHint()-2 ); |
93 | timeGroupBox->layout()->setMargin( KDialog::marginHint() ); | 93 | timeGroupBox->layout()->setMargin( KDialog::marginHint() ); |
94 | QFrame *timeBoxFrame = new QFrame(timeGroupBox); | 94 | QFrame *timeBoxFrame = new QFrame(timeGroupBox); |
95 | 95 | ||
96 | QGridLayout *layoutTimeBox = new QGridLayout(timeBoxFrame,3,3); | 96 | QGridLayout *layoutTimeBox = new QGridLayout(timeBoxFrame,3,3); |
97 | layoutTimeBox->setSpacing(KDialog::spacingHintSmall()); | 97 | layoutTimeBox->setSpacing(KDialog::spacingHintSmall()); |
98 | layoutTimeBox->setColStretch( 1, 1 ); | 98 | layoutTimeBox->setColStretch( 1, 1 ); |
99 | 99 | ||
100 | mStartCheck = new QCheckBox(i18n("Start:"),timeBoxFrame); | ||
101 | layoutTimeBox->addWidget(mStartCheck,0,0); | ||
102 | connect(mStartCheck,SIGNAL(toggled(bool)),SLOT(enableStartEdit(bool))); | ||
103 | |||
104 | mStartDateEdit = new KDateEdit(timeBoxFrame); | ||
105 | layoutTimeBox->addWidget(mStartDateEdit,0,1); | ||
106 | |||
107 | mStartTimeEdit = new KOTimeEdit(timeBoxFrame); | ||
108 | layoutTimeBox->addWidget(mStartTimeEdit,0,2); | ||
109 | |||
100 | mDueCheck = new QCheckBox(i18n("Due:"),timeBoxFrame); | 110 | mDueCheck = new QCheckBox(i18n("Due:"),timeBoxFrame); |
101 | layoutTimeBox->addWidget(mDueCheck,1,0); | 111 | layoutTimeBox->addWidget(mDueCheck,1,0); |
102 | connect(mDueCheck,SIGNAL(toggled(bool)),SLOT(enableDueEdit(bool))); | 112 | connect(mDueCheck,SIGNAL(toggled(bool)),SLOT(enableDueEdit(bool))); |
103 | connect(mDueCheck,SIGNAL(toggled(bool)),SLOT(showAlarm())); | 113 | connect(mDueCheck,SIGNAL(toggled(bool)),SLOT(showAlarm())); |
104 | 114 | ||
105 | 115 | ||
106 | mDueDateEdit = new KDateEdit(timeBoxFrame); | 116 | mDueDateEdit = new KDateEdit(timeBoxFrame); |
107 | layoutTimeBox->addWidget(mDueDateEdit,1,1); | 117 | layoutTimeBox->addWidget(mDueDateEdit,1,1); |
108 | 118 | ||
109 | mDueTimeEdit = new KOTimeEdit(timeBoxFrame); | 119 | mDueTimeEdit = new KOTimeEdit(timeBoxFrame); |
110 | layoutTimeBox->addWidget(mDueTimeEdit,1,2); | 120 | layoutTimeBox->addWidget(mDueTimeEdit,1,2); |
111 | 121 | ||
112 | 122 | ||
113 | mStartCheck = new QCheckBox(i18n("Start:"),timeBoxFrame); | ||
114 | layoutTimeBox->addWidget(mStartCheck,0,0); | ||
115 | connect(mStartCheck,SIGNAL(toggled(bool)),SLOT(enableStartEdit(bool))); | ||
116 | |||
117 | mStartDateEdit = new KDateEdit(timeBoxFrame); | ||
118 | layoutTimeBox->addWidget(mStartDateEdit,0,1); | ||
119 | |||
120 | mStartTimeEdit = new KOTimeEdit(timeBoxFrame); | ||
121 | layoutTimeBox->addWidget(mStartTimeEdit,0,2); | ||
122 | |||
123 | |||
124 | mTimeButton = new QCheckBox(i18n("Time associated"),timeBoxFrame); | 123 | mTimeButton = new QCheckBox(i18n("Time associated"),timeBoxFrame); |
125 | layoutTimeBox->addMultiCellWidget(mTimeButton,2,2,0,1); | 124 | layoutTimeBox->addMultiCellWidget(mTimeButton,2,2,0,1); |
126 | 125 | ||
127 | connect(mTimeButton,SIGNAL(toggled(bool)),SLOT(enableTimeEdits(bool))); | 126 | connect(mTimeButton,SIGNAL(toggled(bool)),SLOT(enableTimeEdits(bool))); |
128 | connect(mDueDateEdit,SIGNAL(setTimeTo(QTime)),mDueTimeEdit,SLOT(setTime(QTime))); | 127 | connect(mDueDateEdit,SIGNAL(setTimeTo(QTime)),mDueTimeEdit,SLOT(setTime(QTime))); |
129 | connect(mStartDateEdit,SIGNAL(setTimeTo(QTime)),mStartTimeEdit,SLOT(setTime(QTime))); | 128 | connect(mStartDateEdit,SIGNAL(setTimeTo(QTime)),mStartTimeEdit,SLOT(setTime(QTime))); |
130 | connect(mStartDateEdit, SIGNAL(dateChanged(QDate)), | 129 | connect(mStartDateEdit, SIGNAL(dateChanged(QDate)), |
131 | this, SLOT(startDateChanged(QDate))); | 130 | this, SLOT(startDateChanged(QDate))); |
132 | // some more layouting | 131 | // some more layouting |
133 | //layoutTimeBox->setColStretch(3,1); | 132 | //layoutTimeBox->setColStretch(3,1); |
134 | } | 133 | } |
135 | 134 | ||
136 | 135 | ||
137 | void KOEditorGeneralTodo::initCompletion(QWidget *parent, QBoxLayout *topLayout) | 136 | void KOEditorGeneralTodo::initCompletion(QWidget *parent, QBoxLayout *topLayout) |
138 | { | 137 | { |
139 | mCompletedCombo = new QComboBox(parent); | 138 | mCompletedCombo = new QComboBox(parent); |
140 | // xgettext:no-c-format | 139 | // xgettext:no-c-format |
141 | mCompletedCombo->insertItem(i18n(" 0 %")); | 140 | mCompletedCombo->insertItem(i18n(" 0 %")); |
142 | // xgettext:no-c-format | 141 | // xgettext:no-c-format |
143 | mCompletedCombo->insertItem(i18n(" 20 %")); | 142 | mCompletedCombo->insertItem(i18n(" 20 %")); |
144 | // xgettext:no-c-format | 143 | // xgettext:no-c-format |
145 | mCompletedCombo->insertItem(i18n(" 40 %")); | 144 | mCompletedCombo->insertItem(i18n(" 40 %")); |
146 | // xgettext:no-c-format | 145 | // xgettext:no-c-format |
147 | mCompletedCombo->insertItem(i18n(" 60 %")); | 146 | mCompletedCombo->insertItem(i18n(" 60 %")); |
148 | // xgettext:no-c-format | 147 | // xgettext:no-c-format |
149 | mCompletedCombo->insertItem(i18n(" 80 %")); | 148 | mCompletedCombo->insertItem(i18n(" 80 %")); |
150 | // xgettext:no-c-format | 149 | // xgettext:no-c-format |
151 | mCompletedCombo->insertItem(i18n("100 %")); | 150 | mCompletedCombo->insertItem(i18n("100 %")); |
152 | connect(mCompletedCombo,SIGNAL(activated(int)),SLOT(completedChanged(int))); | 151 | connect(mCompletedCombo,SIGNAL(activated(int)),SLOT(completedChanged(int))); |
153 | topLayout->addWidget(mCompletedCombo); | 152 | topLayout->addWidget(mCompletedCombo); |
154 | 153 | ||
155 | mCompletedLabel = new QLabel(i18n("completed"),parent); | 154 | mCompletedLabel = new QLabel(i18n("completed"),parent); |
156 | topLayout->addWidget(mCompletedLabel); | 155 | topLayout->addWidget(mCompletedLabel); |
157 | 156 | ||
158 | mCompleteDateEdit = new KDateEdit(parent); | 157 | mCompleteDateEdit = new KDateEdit(parent); |
159 | topLayout->addWidget(mCompleteDateEdit ); | 158 | topLayout->addWidget(mCompleteDateEdit ); |
160 | 159 | ||
161 | mCompleteTimeEdit = new KOTimeEdit(parent); | 160 | mCompleteTimeEdit = new KOTimeEdit(parent); |
162 | topLayout->addWidget( mCompleteTimeEdit); | 161 | topLayout->addWidget( mCompleteTimeEdit); |
163 | 162 | ||
164 | mCompletedCombo->setSizePolicy( QSizePolicy( QSizePolicy::Preferred,QSizePolicy::Preferred) ); | 163 | mCompletedCombo->setSizePolicy( QSizePolicy( QSizePolicy::Preferred,QSizePolicy::Preferred) ); |
165 | mCompletedLabel->setSizePolicy( QSizePolicy( QSizePolicy::Expanding,QSizePolicy::Preferred) ); | 164 | mCompletedLabel->setSizePolicy( QSizePolicy( QSizePolicy::Expanding,QSizePolicy::Preferred) ); |
166 | connect(mCompleteDateEdit,SIGNAL(setTimeTo(QTime)),mCompleteTimeEdit,SLOT(setTime(QTime))); | 165 | connect(mCompleteDateEdit,SIGNAL(setTimeTo(QTime)),mCompleteTimeEdit,SLOT(setTime(QTime))); |
167 | 166 | ||
168 | if ( QApplication::desktop()->width() <= 480 ) { | 167 | if ( QApplication::desktop()->width() <= 480 ) { |
169 | if ( QApplication::desktop()->width() < 320 ) | 168 | if ( QApplication::desktop()->width() < 320 ) |
170 | mCompleteDateEdit->setMaximumWidth( 85 ); | 169 | mCompleteDateEdit->setMaximumWidth( 85 ); |
171 | else | 170 | else |
diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp index e7a5e0e..e560ce4 100644 --- a/korganizer/kolistview.cpp +++ b/korganizer/kolistview.cpp | |||
@@ -83,270 +83,265 @@ protected: | |||
83 | private: | 83 | private: |
84 | QWidget* _wid; | 84 | QWidget* _wid; |
85 | KOListView * _view; | 85 | KOListView * _view; |
86 | }; | 86 | }; |
87 | 87 | ||
88 | 88 | ||
89 | ListItemVisitor::ListItemVisitor(KOListViewItem *item, QDate date ) | 89 | ListItemVisitor::ListItemVisitor(KOListViewItem *item, QDate date ) |
90 | { | 90 | { |
91 | mItem = item; | 91 | mItem = item; |
92 | mDate = date; | 92 | mDate = date; |
93 | } | 93 | } |
94 | 94 | ||
95 | ListItemVisitor::~ListItemVisitor() | 95 | ListItemVisitor::~ListItemVisitor() |
96 | { | 96 | { |
97 | } | 97 | } |
98 | 98 | ||
99 | bool ListItemVisitor::visit(Event *e) | 99 | bool ListItemVisitor::visit(Event *e) |
100 | { | 100 | { |
101 | bool ok = false; | 101 | bool ok = false; |
102 | QString start, end; | 102 | QString start, end; |
103 | QDate ds, de; | 103 | QDate ds, de; |
104 | if ( e->doesRecur() ) { | 104 | if ( e->doesRecur() ) { |
105 | ds = e->getNextOccurence( QDateTime( mDate, QTime(0,0,0)), &ok ).date(); | 105 | ds = e->getNextOccurence( QDateTime( mDate, QTime(0,0,0)), &ok ).date(); |
106 | if ( ok ) { | 106 | if ( ok ) { |
107 | int days = e->dtStart().date().daysTo(e->dtEnd().date() ); | 107 | int days = e->dtStart().date().daysTo(e->dtEnd().date() ); |
108 | start = KGlobal::locale()->formatDate(ds,true); | 108 | start = KGlobal::locale()->formatDate(ds,true); |
109 | de = ds.addDays( days); | 109 | de = ds.addDays( days); |
110 | end = KGlobal::locale()->formatDate(de,true); | 110 | end = KGlobal::locale()->formatDate(de,true); |
111 | } | 111 | } |
112 | 112 | ||
113 | } | 113 | } |
114 | if ( ! ok ) { | 114 | if ( ! ok ) { |
115 | start =e->dtStartDateStr(); | 115 | start =e->dtStartDateStr(); |
116 | end = e->dtEndDateStr(); | 116 | end = e->dtEndDateStr(); |
117 | ds = e->dtStart().date(); | 117 | ds = e->dtStart().date(); |
118 | de = e->dtEnd().date(); | 118 | de = e->dtEnd().date(); |
119 | } | 119 | } |
120 | mItem->setText(0,e->summary()); | 120 | mItem->setText(0,e->summary()); |
121 | mItem->setText(1,start); | 121 | mItem->setText(1,start); |
122 | if ( e->doesFloat() ) | 122 | if ( e->doesFloat() ) |
123 | mItem->setText(2,"---"); | 123 | mItem->setText(2,"---"); |
124 | else | 124 | else |
125 | mItem->setText(2,e->dtStartTimeStr()); | 125 | mItem->setText(2,e->dtStartTimeStr()); |
126 | mItem->setText(3,end); | 126 | mItem->setText(3,end); |
127 | if ( e->doesFloat() ) | 127 | if ( e->doesFloat() ) |
128 | mItem->setText(4,"---"); | 128 | mItem->setText(4,"---"); |
129 | else | 129 | else |
130 | mItem->setText(4,e->dtEndTimeStr()); | 130 | mItem->setText(4,e->dtEndTimeStr()); |
131 | mItem->setText(5, e->durationText()); | ||
131 | if ( e->isAlarmEnabled() ) { | 132 | if ( e->isAlarmEnabled() ) { |
132 | mItem->setText(5,e->alarms().first()->offsetText() ); | 133 | mItem->setText(6,e->alarms().first()->offsetText() ); |
133 | } else { | 134 | } else { |
134 | mItem->setText(5, i18n("No")); | 135 | mItem->setText(6, i18n("No")); |
135 | } | 136 | } |
136 | mItem->setText(6, e->recurrenceText()); | 137 | mItem->setText(7, e->recurrenceText()); |
137 | if( ! e->doesRecur() ) | 138 | if( ! e->doesRecur() ) |
138 | mItem->setSortKey( 6, "-" ); | 139 | mItem->setSortKey( 7, "-" ); |
139 | mItem->setText(7,"---"); | 140 | mItem->setText(8, e->cancelled() ? i18n("Yes") : i18n("No")); |
140 | mItem->setText(8,"---"); | 141 | mItem->setText(9,e->categoriesStr()); |
141 | mItem->setText(9, e->cancelled() ? i18n("Yes") : i18n("No")); | 142 | mItem->setText(10, KOPrefs::instance()->calName( e->calID() )); |
142 | mItem->setText(10,e->categoriesStr()); | 143 | mItem->setText(11, KGlobal::locale()->formatDateTime( e->lastModified(), true, true )); |
143 | mItem->setText(11, KOPrefs::instance()->calName( e->calID() )); | ||
144 | mItem->setText(12, KGlobal::locale()->formatDateTime( e->lastModified(), true, true )); | ||
145 | 144 | ||
146 | QString key; | 145 | QString key; |
147 | QDate d = e->lastModified().date(); | 146 | QDate d = e->lastModified().date(); |
148 | QTime t = e->lastModified().time(); | 147 | QTime t = e->lastModified().time(); |
149 | key.sprintf("%04d%02d%02d%02d%02d%02d",d.year(),d.month(),d.day(),t.hour(),t.minute(),t.second() ); | 148 | key.sprintf("%04d%02d%02d%02d%02d%02d",d.year(),d.month(),d.day(),t.hour(),t.minute(),t.second() ); |
150 | mItem->setSortKey(12,key); | 149 | mItem->setSortKey(12,key); |
151 | t = e->doesFloat() ? QTime(0,0) : e->dtStart().time(); | 150 | t = e->doesFloat() ? QTime(0,0) : e->dtStart().time(); |
152 | key.sprintf("%04d%02d%02d%02d%02d",ds.year(),ds.month(),ds.day(),t.hour(),t.minute()); | 151 | key.sprintf("%04d%02d%02d%02d%02d",ds.year(),ds.month(),ds.day(),t.hour(),t.minute()); |
153 | mItem->setSortKey(1,key); | 152 | mItem->setSortKey(1,key); |
154 | 153 | ||
155 | t = e->doesFloat() ? QTime(0,0) : e->dtEnd().time(); | 154 | t = e->doesFloat() ? QTime(0,0) : e->dtEnd().time(); |
156 | key.sprintf("%04d%02d%02d%02d%02d",de.year(),de.month(),de.day(),t.hour(),t.minute()); | 155 | key.sprintf("%04d%02d%02d%02d%02d",de.year(),de.month(),de.day(),t.hour(),t.minute()); |
157 | mItem->setSortKey(3,key); | 156 | mItem->setSortKey(3,key); |
158 | return true; | 157 | return true; |
159 | } | 158 | } |
160 | 159 | ||
161 | bool ListItemVisitor::visit(Todo *t) | 160 | bool ListItemVisitor::visit(Todo *t) |
162 | { | 161 | { |
163 | mItem->setText(0,t->summary()); | 162 | mItem->setText(0,t->summary()); |
164 | if ( t->isCompleted() ) { | 163 | if ( t->isCompleted() ) { |
165 | mItem->setSortKey(0,"99"+ t->summary().left(10)); | 164 | mItem->setSortKey(0,"99"+ t->summary().left(10)); |
166 | } else | 165 | } else |
167 | mItem->setSortKey(0,QString::number( t->percentComplete()+1 )+ t->summary().left(10)); | 166 | mItem->setSortKey(0,QString::number( t->percentComplete()+1 )+ t->summary().left(10)); |
168 | mItem->setPixmap( 0, *(sgListViewCompletedPix[t->percentComplete()/20])); | 167 | mItem->setPixmap( 0, *(sgListViewCompletedPix[t->percentComplete()/20])); |
169 | if (t->hasStartDate()) { | 168 | if (t->hasStartDate()) { |
170 | mItem->setText(1,t->dtStartDateStr()); | 169 | mItem->setText(1,t->dtStartDateStr()); |
171 | if (t->doesFloat()) { | 170 | if (t->doesFloat()) { |
172 | mItem->setText(2,"---"); | 171 | mItem->setText(2,"---"); |
173 | } else { | 172 | } else { |
174 | mItem->setText(2,t->dtStartTimeStr()); | 173 | mItem->setText(2,t->dtStartTimeStr()); |
175 | } | 174 | } |
176 | } else { | 175 | } else { |
177 | mItem->setText(1,"---"); | 176 | mItem->setText(1,"---"); |
178 | mItem->setText(2,"---"); | 177 | mItem->setText(2,"---"); |
179 | } | 178 | } |
180 | mItem->setText(3,"---"); | ||
181 | mItem->setText(4,"---"); | ||
182 | if ( t->isAlarmEnabled() ) { | 179 | if ( t->isAlarmEnabled() ) { |
183 | mItem->setText(5,t->alarms().first()->offsetText() ); | 180 | mItem->setText(6,t->alarms().first()->offsetText() ); |
184 | } else { | 181 | } else { |
185 | mItem->setText(5, i18n("No")); | 182 | mItem->setText(6, i18n("No")); |
186 | } | 183 | } |
187 | mItem->setText(6, t->recurrenceText()); | 184 | mItem->setText(7, t->recurrenceText()); |
188 | if( ! t->doesRecur() ) | 185 | if( ! t->doesRecur() ) |
189 | mItem->setSortKey( 6, "-" ); | 186 | mItem->setSortKey( 7, "-" ); |
190 | if (t->hasDueDate()) { | 187 | if (t->hasDueDate()) { |
191 | mItem->setText(7,t->dtDueDateStr()); | 188 | mItem->setText(3,t->dtDueDateStr()); |
192 | if (t->doesFloat()) { | 189 | if (t->doesFloat()) { |
193 | mItem->setText(8,"---"); | 190 | mItem->setText(4,"---"); |
194 | } else { | 191 | } else { |
195 | mItem->setText(8,t->dtDueTimeStr()); | 192 | mItem->setText(4,t->dtDueTimeStr()); |
196 | } | 193 | } |
197 | } else { | 194 | } else { |
198 | mItem->setText(7,"---"); | 195 | mItem->setText(3,"---"); |
199 | mItem->setText(8,"---"); | 196 | mItem->setText(4,"---"); |
200 | } | 197 | } |
201 | mItem->setText(9, t->cancelled() ? i18n("Yes") : i18n("No")); | 198 | mItem->setText(5, t->durationText()); |
202 | mItem->setText(10,t->categoriesStr()); | 199 | mItem->setText(8, t->cancelled() ? i18n("Yes") : i18n("No")); |
203 | mItem->setText(11, KOPrefs::instance()->calName( t->calID() )); | 200 | mItem->setText(9,t->categoriesStr()); |
204 | mItem->setText(12, KGlobal::locale()->formatDateTime( t->lastModified(), true, true )); | 201 | mItem->setText(10, KOPrefs::instance()->calName( t->calID() )); |
202 | mItem->setText(11, KGlobal::locale()->formatDateTime( t->lastModified(), true, true )); | ||
205 | QString key; | 203 | QString key; |
206 | QDate d = t->lastModified().date(); | 204 | QDate d = t->lastModified().date(); |
207 | QTime tm = t->lastModified().time(); | 205 | QTime tm = t->lastModified().time(); |
208 | key.sprintf("%04d%02d%02d%02d%02d%02d",d.year(),d.month(),d.day(),tm.hour(),tm.minute(),tm.second() ); | 206 | key.sprintf("%04d%02d%02d%02d%02d%02d",d.year(),d.month(),d.day(),tm.hour(),tm.minute(),tm.second() ); |
209 | mItem->setSortKey(12,key); | 207 | mItem->setSortKey(11,key); |
210 | if (t->hasDueDate()) { | 208 | if (t->hasDueDate()) { |
211 | d = t->dtDue().date(); | 209 | d = t->dtDue().date(); |
212 | tm = t->doesFloat() ? QTime(0,0) : t->dtDue().time(); | 210 | tm = t->doesFloat() ? QTime(0,0) : t->dtDue().time(); |
213 | key.sprintf("%04d%02d%02d%02d%02d",d.year(),d.month(),d.day(),tm.hour(),tm.minute()); | 211 | key.sprintf("%04d%02d%02d%02d%02d",d.year(),d.month(),d.day(),tm.hour(),tm.minute()); |
214 | mItem->setSortKey(7,key); | 212 | mItem->setSortKey(3,key); |
215 | } | 213 | } |
216 | if ( t->hasStartDate() ) { | 214 | if ( t->hasStartDate() ) { |
217 | d = t->dtStart().date(); | 215 | d = t->dtStart().date(); |
218 | tm = t->doesFloat() ? QTime(0,0) : t->dtStart().time(); | 216 | tm = t->doesFloat() ? QTime(0,0) : t->dtStart().time(); |
219 | key.sprintf("%04d%02d%02d%02d%02d",d.year(),d.month(),d.day(),tm.hour(),tm.minute()); | 217 | key.sprintf("%04d%02d%02d%02d%02d",d.year(),d.month(),d.day(),tm.hour(),tm.minute()); |
220 | mItem->setSortKey(1,key); | 218 | mItem->setSortKey(1,key); |
221 | } | 219 | } |
222 | return true; | 220 | return true; |
223 | } | 221 | } |
224 | 222 | ||
225 | bool ListItemVisitor::visit(Journal * j) | 223 | bool ListItemVisitor::visit(Journal * j) |
226 | { | 224 | { |
227 | 225 | ||
228 | QString des; | 226 | QString des; |
229 | mItem->setPixmap( 0, *sgListViewJournalPix); | 227 | mItem->setPixmap( 0, *sgListViewJournalPix); |
230 | if ( !j->summary().isEmpty() ) { | 228 | if ( !j->summary().isEmpty() ) { |
231 | des = j->summary(); | 229 | des = j->summary(); |
232 | } else { | 230 | } else { |
233 | des = j->description().left(30); | 231 | des = j->description().left(30); |
234 | des = des.simplifyWhiteSpace (); | 232 | des = des.simplifyWhiteSpace (); |
235 | des.replace (QRegExp ("\\n"),"" ); | 233 | des.replace (QRegExp ("\\n"),"" ); |
236 | des.replace (QRegExp ("\\r"),"" ); | 234 | des.replace (QRegExp ("\\r"),"" ); |
237 | } | 235 | } |
238 | mItem->setText(0,des.left(25)); | 236 | mItem->setText(0,des.left(25)); |
239 | mItem->setSortKey(0,"0"+ des.left(25)); | 237 | mItem->setSortKey(0,"0"+ des.left(25)); |
240 | mItem->setText(1,j->dtStartDateStr()); | 238 | mItem->setText(1,j->dtStartDateStr()); |
241 | mItem->setText(2,"---"); | 239 | mItem->setText(2,"---"); |
242 | mItem->setText(3,"---"); | 240 | mItem->setText(3,"---"); |
243 | mItem->setText(4,"---"); | 241 | mItem->setText(4,"---"); |
244 | mItem->setText(5,"---"); | 242 | mItem->setText(5,"---"); |
245 | mItem->setText(6,"---"); | 243 | mItem->setText(6,"---"); |
246 | mItem->setText(7,j->dtStartDateStr()); | 244 | mItem->setText(7,"---"); |
247 | mItem->setText(8,"---"); | 245 | mItem->setText(8,"---"); |
248 | mItem->setText(9,"---"); | 246 | mItem->setText(9,j->categoriesStr()); |
249 | mItem->setText(10,j->categoriesStr()); | 247 | mItem->setText(10, KOPrefs::instance()->calName( j->calID() )); |
250 | mItem->setText(11, KOPrefs::instance()->calName( j->calID() )); | 248 | mItem->setText(11, KGlobal::locale()->formatDateTime( j->lastModified(), true, true )); |
251 | mItem->setText(12, KGlobal::locale()->formatDateTime( j->lastModified(), true, true )); | ||
252 | 249 | ||
253 | QString key; | 250 | QString key; |
254 | QDate d = j->lastModified().date(); | 251 | QDate d = j->lastModified().date(); |
255 | QTime tm = j->lastModified().time(); | 252 | QTime tm = j->lastModified().time(); |
256 | key.sprintf("%04d%02d%02d%02d%02d%02d",d.year(),d.month(),d.day(),tm.hour(),tm.minute(),tm.second() ); | 253 | key.sprintf("%04d%02d%02d%02d%02d%02d",d.year(),d.month(),d.day(),tm.hour(),tm.minute(),tm.second() ); |
257 | mItem->setSortKey(12,key); | 254 | mItem->setSortKey(12,key); |
258 | d = j->dtStart().date(); | 255 | d = j->dtStart().date(); |
259 | key.sprintf("%04d%02d%02d",d.year(),d.month(),d.day()); | 256 | key.sprintf("%04d%02d%02d",d.year(),d.month(),d.day()); |
260 | mItem->setSortKey(1,key); | 257 | mItem->setSortKey(1,key); |
261 | mItem->setSortKey(7,key); | 258 | mItem->setSortKey(7,key); |
262 | 259 | ||
263 | return true; | 260 | return true; |
264 | } | 261 | } |
265 | 262 | ||
266 | KOListView::KOListView(Calendar *calendar, QWidget *parent, | 263 | KOListView::KOListView(Calendar *calendar, QWidget *parent, |
267 | const char *name) | 264 | const char *name) |
268 | : KOEventView(calendar, parent, name) | 265 | : KOEventView(calendar, parent, name) |
269 | { | 266 | { |
270 | 267 | ||
271 | mActiveItem = 0; | 268 | mActiveItem = 0; |
272 | mForceShowCompletedTodos = false; | 269 | mForceShowCompletedTodos = false; |
273 | mListView = new KOListViewListView(this); | 270 | mListView = new KOListViewListView(this); |
274 | mListView->addColumn(i18n("Summary")); | 271 | mListView->addColumn(i18n("Summary")); |
275 | mListView->addColumn(i18n("Start Date")); | 272 | mListView->addColumn(i18n("Start Date")); |
276 | mListView->addColumn(i18n("Start Time")); | 273 | mListView->addColumn(i18n("Start Time")); |
277 | mListView->addColumn(i18n("End Date")); | 274 | mListView->addColumn(i18n("End/Due Date")); |
278 | mListView->addColumn(i18n("End Time")); | 275 | mListView->addColumn(i18n("End/Due Time")); |
276 | mListView->addColumn(i18n("Duration")); | ||
279 | mListView->addColumn(i18n("Alarm")); // alarm set? | 277 | mListView->addColumn(i18n("Alarm")); // alarm set? |
280 | mListView->addColumn(i18n("Recurs")); // recurs? | 278 | mListView->addColumn(i18n("Recurs")); // recurs? |
281 | mListView->addColumn(i18n("Due Date")); | ||
282 | mListView->addColumn(i18n("Due Time")); | ||
283 | mListView->addColumn(i18n("Cancelled")); | 279 | mListView->addColumn(i18n("Cancelled")); |
284 | mListView->addColumn(i18n("Categories")); | 280 | mListView->addColumn(i18n("Categories")); |
285 | mListView->addColumn(i18n("Calendar")); | 281 | mListView->addColumn(i18n("Calendar")); |
286 | mListView->addColumn(i18n("Last Modified")); | 282 | mListView->addColumn(i18n("Last Modified")); |
287 | 283 | ||
288 | mListView->setColumnAlignment(0,AlignLeft); | 284 | mListView->setColumnAlignment(0,AlignLeft); |
289 | mListView->setColumnAlignment(1,AlignLeft); | 285 | mListView->setColumnAlignment(1,AlignLeft); |
290 | mListView->setColumnAlignment(2,AlignHCenter); | 286 | mListView->setColumnAlignment(2,AlignHCenter); |
291 | mListView->setColumnAlignment(3,AlignLeft); | 287 | mListView->setColumnAlignment(3,AlignLeft); |
292 | mListView->setColumnAlignment(4,AlignHCenter); | 288 | mListView->setColumnAlignment(4,AlignHCenter); |
293 | mListView->setColumnAlignment(5,AlignLeft); | 289 | mListView->setColumnAlignment(5,AlignLeft); |
294 | mListView->setColumnAlignment(6,AlignLeft); | 290 | mListView->setColumnAlignment(6,AlignLeft); |
295 | mListView->setColumnAlignment(7,AlignLeft); | 291 | mListView->setColumnAlignment(7,AlignLeft); |
296 | mListView->setColumnAlignment(8,AlignLeft); | 292 | mListView->setColumnAlignment(8,AlignLeft); |
297 | mListView->setColumnAlignment(9,AlignLeft); | 293 | mListView->setColumnAlignment(9,AlignLeft); |
298 | mListView->setColumnAlignment(10,AlignLeft); | 294 | mListView->setColumnAlignment(10,AlignLeft); |
299 | mListView->setColumnAlignment(11,AlignLeft); | 295 | mListView->setColumnAlignment(11,AlignLeft); |
300 | mListView->setColumnAlignment(12,AlignLeft); | ||
301 | mKOListViewWhatsThis = new KOListViewWhatsThis(mListView->viewport(),this); | 296 | mKOListViewWhatsThis = new KOListViewWhatsThis(mListView->viewport(),this); |
302 | 297 | ||
303 | int iii = 0; | 298 | int iii = 0; |
304 | for ( iii = 0; iii< 13 ; ++iii ) | 299 | for ( iii = 0; iii< 12 ; ++iii ) |
305 | mListView->setColumnWidthMode( iii, QListView::Manual ); | 300 | mListView->setColumnWidthMode( iii, QListView::Manual ); |
306 | 301 | ||
307 | QBoxLayout *layoutTop = new QVBoxLayout(this); | 302 | QBoxLayout *layoutTop = new QVBoxLayout(this); |
308 | layoutTop->addWidget(mListView); | 303 | layoutTop->addWidget(mListView); |
309 | mListView->setFont ( KOPrefs::instance()->mListViewFont ); | 304 | mListView->setFont ( KOPrefs::instance()->mListViewFont ); |
310 | mPopupMenu = eventPopup(); | 305 | mPopupMenu = eventPopup(); |
311 | QPopupMenu* selPopup = new QPopupMenu ( this ); | 306 | QPopupMenu* selPopup = new QPopupMenu ( this ); |
312 | mPopupMenu->insertSeparator(); | 307 | mPopupMenu->insertSeparator(); |
313 | 308 | ||
314 | selPopup->insertItem(i18n("All"),this, | 309 | selPopup->insertItem(i18n("All"),this, |
315 | SLOT(allSelection())); | 310 | SLOT(allSelection())); |
316 | selPopup->insertItem(i18n("None"),this, | 311 | selPopup->insertItem(i18n("None"),this, |
317 | SLOT(clearSelection())); | 312 | SLOT(clearSelection())); |
318 | selPopup->insertItem(i18n("Delete selected..."),this, | 313 | selPopup->insertItem(i18n("Delete selected..."),this, |
319 | SLOT(deleteAll())); | 314 | SLOT(deleteAll())); |
320 | mPopupMenu->insertItem(i18n("Selection"), selPopup ); | 315 | mPopupMenu->insertItem(i18n("Selection"), selPopup ); |
321 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), | 316 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), |
322 | i18n("Hide all selected"),this, | 317 | i18n("Hide all selected"),this, |
323 | SLOT(hideAll()),true); | 318 | SLOT(hideAll()),true); |
324 | 319 | ||
325 | selPopup->insertSeparator(); | 320 | selPopup->insertSeparator(); |
326 | QPopupMenu * exportPO = new QPopupMenu ( this ); | 321 | QPopupMenu * exportPO = new QPopupMenu ( this ); |
327 | selPopup->insertItem( i18n("Export"), exportPO ); | 322 | selPopup->insertItem( i18n("Export"), exportPO ); |
328 | #ifdef DESKTOP_VERSION | 323 | #ifdef DESKTOP_VERSION |
329 | mPopupMenu->insertSeparator(); | 324 | mPopupMenu->insertSeparator(); |
330 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), | 325 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), |
331 | i18n("Print complete list..."),this, | 326 | i18n("Print complete list..."),this, |
332 | SLOT(printList()),true); | 327 | SLOT(printList()),true); |
333 | #endif | 328 | #endif |
334 | mCalPopup = new QPopupMenu ( this ); | 329 | mCalPopup = new QPopupMenu ( this ); |
335 | selPopup->insertItem( i18n("Set Calendar"), mCalPopup ); | 330 | selPopup->insertItem( i18n("Set Calendar"), mCalPopup ); |
336 | 331 | ||
337 | selPopup->insertItem(i18n("Set categories")+"...",this, | 332 | selPopup->insertItem(i18n("Set categories")+"...",this, |
338 | SLOT(setCat()) ); | 333 | SLOT(setCat()) ); |
339 | selPopup->insertItem( i18n("Set alarm..."),this, | 334 | selPopup->insertItem( i18n("Set alarm..."),this, |
340 | SLOT(setAlarm())); | 335 | SLOT(setAlarm())); |
341 | #if 0 | 336 | #if 0 |
342 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), | 337 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), |
343 | i18n("Set categories")+"...",this, | 338 | i18n("Set categories")+"...",this, |
344 | SLOT(setCat()),true); | 339 | SLOT(setCat()),true); |
345 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), | 340 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), |
346 | i18n("Set alarm..."),this, | 341 | i18n("Set alarm..."),this, |
347 | SLOT(setAlarm()),true); | 342 | SLOT(setAlarm()),true); |
348 | #endif | 343 | #endif |
349 | QObject::connect(mCalPopup,SIGNAL(aboutToShow()),this, | 344 | QObject::connect(mCalPopup,SIGNAL(aboutToShow()),this, |
350 | SLOT( populateCalPopup() )); | 345 | SLOT( populateCalPopup() )); |
351 | QObject::connect(mCalPopup,SIGNAL(activated( int )),this, | 346 | QObject::connect(mCalPopup,SIGNAL(activated( int )),this, |
352 | SLOT( setCalendar( int ) )); | 347 | SLOT( setCalendar( int ) )); |
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index 77d0ac8..98a820d 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp | |||
@@ -180,97 +180,100 @@ MainWindow::MainWindow( QWidget *parent, const char *name ) : | |||
180 | mFlagKeyPressed = false; | 180 | mFlagKeyPressed = false; |
181 | setCaption("KO/Pi"); | 181 | setCaption("KO/Pi"); |
182 | KOPrefs *p = KOPrefs::instance(); | 182 | KOPrefs *p = KOPrefs::instance(); |
183 | //KPimGlobalPrefs::instance()->setGlobalConfig(); | 183 | //KPimGlobalPrefs::instance()->setGlobalConfig(); |
184 | p->mCurrentDisplayedView = 0; | 184 | p->mCurrentDisplayedView = 0; |
185 | if ( p->mHourSize > 22 ) | 185 | if ( p->mHourSize > 22 ) |
186 | p->mHourSize = 22; | 186 | p->mHourSize = 22; |
187 | QMainWindow::ToolBarDock tbd; | 187 | QMainWindow::ToolBarDock tbd; |
188 | if ( p->mToolBarHor ) { | 188 | if ( p->mToolBarHor ) { |
189 | if ( p->mToolBarUp ) | 189 | if ( p->mToolBarUp ) |
190 | tbd = Bottom; | 190 | tbd = Bottom; |
191 | else | 191 | else |
192 | tbd = Top; | 192 | tbd = Top; |
193 | } | 193 | } |
194 | else { | 194 | else { |
195 | if ( p->mToolBarUp ) | 195 | if ( p->mToolBarUp ) |
196 | tbd = Right; | 196 | tbd = Right; |
197 | else | 197 | else |
198 | tbd = Left; | 198 | tbd = Left; |
199 | } | 199 | } |
200 | if ( KOPrefs::instance()->mUseAppColors ) | 200 | if ( KOPrefs::instance()->mUseAppColors ) |
201 | QApplication::setPalette( QPalette (KOPrefs::instance()->mAppColor1, KOPrefs::instance()->mAppColor2), true ); | 201 | QApplication::setPalette( QPalette (KOPrefs::instance()->mAppColor1, KOPrefs::instance()->mAppColor2), true ); |
202 | globalFlagBlockStartup = 1; | 202 | globalFlagBlockStartup = 1; |
203 | iconToolBar = new QPEToolBar( this ); | 203 | iconToolBar = new QPEToolBar( this ); |
204 | addToolBar (iconToolBar , tbd ); | 204 | addToolBar (iconToolBar , tbd ); |
205 | 205 | ||
206 | #ifdef DESKTOP_VERSION | 206 | #ifdef DESKTOP_VERSION |
207 | if ( KOPrefs::instance()->mShowIconFilter ) | 207 | if ( KOPrefs::instance()->mShowIconFilter ) |
208 | #else | 208 | #else |
209 | if ( KOPrefs::instance()->mShowIconFilter || !p->mShowIconOnetoolbar ) | 209 | if ( KOPrefs::instance()->mShowIconFilter || !p->mShowIconOnetoolbar ) |
210 | #endif | 210 | #endif |
211 | 211 | ||
212 | { | 212 | { |
213 | if ( p->mToolBarHorF ) { | 213 | if ( p->mToolBarHorF ) { |
214 | if ( p->mToolBarUpF ) | 214 | if ( p->mToolBarUpF ) |
215 | tbd = Bottom; | 215 | tbd = Bottom; |
216 | else | 216 | else |
217 | tbd = Top; | 217 | tbd = Top; |
218 | } | 218 | } |
219 | else { | 219 | else { |
220 | if ( p->mToolBarUpF ) | 220 | if ( p->mToolBarUpF ) |
221 | tbd = Right; | 221 | tbd = Right; |
222 | else | 222 | else |
223 | tbd = Left; | 223 | tbd = Left; |
224 | } | 224 | } |
225 | filterToolBar = new QPEToolBar ( this ); | 225 | filterToolBar = new QPEToolBar ( this ); |
226 | filterMenubar = new KMenuBar( 0 ); | 226 | filterMenubar = new KMenuBar( 0 ); |
227 | QFontMetrics fm ( filterMenubar->font() ); | 227 | QFontMetrics fm ( filterMenubar->font() ); |
228 | 228 | #ifndef DESKTOP_VERSION | |
229 | filterToolBar->setFocusPolicy( NoFocus ); | ||
230 | filterMenubar->setFocusPolicy( NoFocus ); | ||
231 | #endif | ||
229 | filterPopupMenu = new QPopupMenu( this ); | 232 | filterPopupMenu = new QPopupMenu( this ); |
230 | filterMenubar->insertItem( i18n("No Filter"), filterPopupMenu,0 ); | 233 | filterMenubar->insertItem( i18n("No Filter"), filterPopupMenu,0 ); |
231 | QString addTest = "A"; | 234 | QString addTest = "A"; |
232 | filterMenubar->setMinimumWidth( fm.width( i18n("No Filter")+addTest ) ); | 235 | filterMenubar->setMinimumWidth( fm.width( i18n("No Filter")+addTest ) ); |
233 | #ifdef DESKTOP_VERSION | 236 | #ifdef DESKTOP_VERSION |
234 | addTest = "AAABBBCCCx"; | 237 | addTest = "AAABBBCCCx"; |
235 | #else | 238 | #else |
236 | addTest = "AAx"; | 239 | addTest = "AAx"; |
237 | #endif | 240 | #endif |
238 | filterMenubar->setMaximumWidth( fm.width( i18n("No Filter")+addTest ) ); | 241 | filterMenubar->setMaximumWidth( fm.width( i18n("No Filter")+addTest ) ); |
239 | addToolBar (filterToolBar , tbd ); | 242 | addToolBar (filterToolBar , tbd ); |
240 | connect ( filterPopupMenu , SIGNAL( activated ( int ) ), this, SLOT (selectFilterPopup( int ) ) ); | 243 | connect ( filterPopupMenu , SIGNAL( activated ( int ) ), this, SLOT (selectFilterPopup( int ) ) ); |
241 | connect ( filterPopupMenu , SIGNAL( aboutToShow() ), this, SLOT (fillFilterMenuPopup() ) ); | 244 | connect ( filterPopupMenu , SIGNAL( aboutToShow() ), this, SLOT (fillFilterMenuPopup() ) ); |
242 | if ( !KOPrefs::instance()->mShowIconFilter && !p->mShowIconOnetoolbar ) | 245 | if ( !KOPrefs::instance()->mShowIconFilter && !p->mShowIconOnetoolbar ) |
243 | filterToolBar->hide(); | 246 | filterToolBar->hide(); |
244 | } else { | 247 | } else { |
245 | filterToolBar = 0; | 248 | filterToolBar = 0; |
246 | filterMenubar = 0; | 249 | filterMenubar = 0; |
247 | filterPopupMenu = 0; | 250 | filterPopupMenu = 0; |
248 | } | 251 | } |
249 | if ( p->mShowIconOnetoolbar ) { | 252 | if ( p->mShowIconOnetoolbar ) { |
250 | viewToolBar = iconToolBar ; | 253 | viewToolBar = iconToolBar ; |
251 | navigatorToolBar = iconToolBar ; | 254 | navigatorToolBar = iconToolBar ; |
252 | } else { | 255 | } else { |
253 | #ifndef DESKTOP_VERSION | 256 | #ifndef DESKTOP_VERSION |
254 | setToolBarsMovable( false ); | 257 | setToolBarsMovable( false ); |
255 | #endif | 258 | #endif |
256 | if ( p->mToolBarHorV ) { | 259 | if ( p->mToolBarHorV ) { |
257 | if ( p->mToolBarUpV ) | 260 | if ( p->mToolBarUpV ) |
258 | tbd = Bottom; | 261 | tbd = Bottom; |
259 | else | 262 | else |
260 | tbd = Top; | 263 | tbd = Top; |
261 | } | 264 | } |
262 | else { | 265 | else { |
263 | if ( p->mToolBarUpV ) | 266 | if ( p->mToolBarUpV ) |
264 | tbd = Right; | 267 | tbd = Right; |
265 | else | 268 | else |
266 | tbd = Left; | 269 | tbd = Left; |
267 | } | 270 | } |
268 | viewToolBar = new QPEToolBar( this ); | 271 | viewToolBar = new QPEToolBar( this ); |
269 | addToolBar (viewToolBar , tbd ); | 272 | addToolBar (viewToolBar , tbd ); |
270 | if ( p->mToolBarHorN ) { | 273 | if ( p->mToolBarHorN ) { |
271 | if ( p->mToolBarUpN ) | 274 | if ( p->mToolBarUpN ) |
272 | tbd = Bottom; | 275 | tbd = Bottom; |
273 | else | 276 | else |
274 | tbd = Top; | 277 | tbd = Top; |
275 | } | 278 | } |
276 | else { | 279 | else { |