author | zautrix <zautrix> | 2005-02-06 13:44:49 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-02-06 13:44:49 (UTC) |
commit | 26b0c69fb3b11c29475ec02b2cfe52e33eb24e5f (patch) (unidiff) | |
tree | 34c4f5e6b2d77dc1210822e1539d9516842b5691 /korganizer | |
parent | 118f5aab05c9ace5612d5c4fd69e7c5a59bed67b (diff) | |
download | kdepimpi-26b0c69fb3b11c29475ec02b2cfe52e33eb24e5f.zip kdepimpi-26b0c69fb3b11c29475ec02b2cfe52e33eb24e5f.tar.gz kdepimpi-26b0c69fb3b11c29475ec02b2cfe52e33eb24e5f.tar.bz2 |
many small fixes
-rw-r--r-- | korganizer/koeditorgeneraltodo.cpp | 7 | ||||
-rw-r--r-- | korganizer/koeventviewer.cpp | 10 | ||||
-rw-r--r-- | korganizer/komonthview.cpp | 61 | ||||
-rw-r--r-- | korganizer/komonthview.h | 6 | ||||
-rw-r--r-- | korganizer/koviewmanager.cpp | 5 |
5 files changed, 46 insertions, 43 deletions
diff --git a/korganizer/koeditorgeneraltodo.cpp b/korganizer/koeditorgeneraltodo.cpp index cd78f54..ce66863 100644 --- a/korganizer/koeditorgeneraltodo.cpp +++ b/korganizer/koeditorgeneraltodo.cpp | |||
@@ -162,4 +162,7 @@ void KOEditorGeneralTodo::initCompletion(QWidget *parent, QBoxLayout *topLayout) | |||
162 | 162 | ||
163 | if ( QApplication::desktop()->width() < 320 ) { | 163 | if ( QApplication::desktop()->width() <= 480 ) { |
164 | mCompleteDateEdit->setMaximumWidth( 85 ); | 164 | if ( QApplication::desktop()->width() < 320 ) |
165 | mCompleteDateEdit->setMaximumWidth( 85 ); | ||
166 | else | ||
167 | mCompleteDateEdit->setMaximumWidth( 130 ); | ||
165 | topLayout->setSpacing( 0 ); | 168 | topLayout->setSpacing( 0 ); |
diff --git a/korganizer/koeventviewer.cpp b/korganizer/koeventviewer.cpp index 2faf18f..de11c13 100644 --- a/korganizer/koeventviewer.cpp +++ b/korganizer/koeventviewer.cpp | |||
@@ -423,3 +423,3 @@ void KOEventViewer::appendTodo(Todo *event, int mode ) | |||
423 | if ( event->relatedTo() ) { | 423 | if ( event->relatedTo() ) { |
424 | addTag("b",i18n("Parent todo: ")); | 424 | addTag("b",i18n("Parent todo:<br>")); |
425 | mText.append(event->relatedTo()->summary()+" [" +QString::number(event->relatedTo()->priority()) + "/" + QString::number(((Todo*)event->relatedTo())->percentComplete())+"%] <br>"); | 425 | mText.append(event->relatedTo()->summary()+" [" +QString::number(event->relatedTo()->priority()) + "/" + QString::number(((Todo*)event->relatedTo())->percentComplete())+"%] <br>"); |
@@ -536,3 +536,3 @@ void KOEventViewer::formatAttendees(Incidence *event) | |||
536 | if ( a->RSVP() ) { | 536 | if ( a->RSVP() ) { |
537 | ++a_count; | 537 | ++a_count_nr; |
538 | mText += "<IMG src=\"" + iconPath + "\">"; | 538 | mText += "<IMG src=\"" + iconPath + "\">"; |
@@ -540,3 +540,3 @@ void KOEventViewer::formatAttendees(Incidence *event) | |||
540 | else { | 540 | else { |
541 | ++a_count_nr; | 541 | ++a_count; |
542 | mText += "<IMG src=\"" + NOiconPath + "\">"; | 542 | mText += "<IMG src=\"" + NOiconPath + "\">"; |
@@ -552,3 +552,3 @@ void KOEventViewer::formatAttendees(Incidence *event) | |||
552 | mText.append("</li></ul>"); | 552 | mText.append("</li></ul>"); |
553 | if ( a_count > 1 ) { | 553 | if ( (a_count+a_count_nr) > 1 ) { |
554 | mText += "<a href=\"mailto:ALL\">"; | 554 | mText += "<a href=\"mailto:ALL\">"; |
@@ -568,3 +568,3 @@ void KOEventViewer::formatAttendees(Incidence *event) | |||
568 | mText += i18n( "<IMG src=\"%1\"> only )").arg ( iconPath ); | 568 | mText += i18n( "<IMG src=\"%1\"> only )").arg ( iconPath ); |
569 | mText += "\n"; | 569 | mText += "<br>\n"; |
570 | } | 570 | } |
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp index 65accdc..5926abe 100644 --- a/korganizer/komonthview.cpp +++ b/korganizer/komonthview.cpp | |||
@@ -797,5 +797,7 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name) | |||
797 | mDaysPerWeek( 7 ), mNumWeeks( 6 ), mNumCells( mDaysPerWeek * mNumWeeks ), | 797 | mDaysPerWeek( 7 ), mNumWeeks( 6 ), mNumCells( mDaysPerWeek * mNumWeeks ), |
798 | mShortDayLabels( false ), mWidthLongDayLabel( 0 ), mSelectedCell( 0 ) | 798 | mWidthLongDayLabel( 0 ), mSelectedCell( 0 ) |
799 | { | 799 | { |
800 | 800 | ignoreResizeEvent = 0; | |
801 | mShortDayLabelsW = false; | ||
802 | mShortDayLabelsM = false; | ||
801 | clPending = true; | 803 | clPending = true; |
@@ -819,3 +821,2 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name) | |||
819 | mCells.setAutoDelete( true ); | 821 | mCells.setAutoDelete( true ); |
820 | mShowSatSunComp = KOPrefs::instance()->mMonthViewSatSunTog ; | ||
821 | mDayLabels.resize( mDaysPerWeek ); | 822 | mDayLabels.resize( mDaysPerWeek ); |
@@ -908,10 +909,6 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name) | |||
908 | mContextMenu = eventPopup(); | 909 | mContextMenu = eventPopup(); |
909 | // updateConfig(); //useless here | 910 | updateConfig(); //useless here |
910 | 911 | ||
911 | //mWeekLabels[mNumWeeks]->setText( i18n("W")); | 912 | //mWeekLabels[mNumWeeks]->setText( i18n("W")); |
912 | #if 0 | 913 | |
913 | mWidStack = new QWidgetStack( this ); | ||
914 | mMonthView = new QWidget( mWidStack ); | ||
915 | mWeekView = new QWidget( mWidStack ); | ||
916 | #endif | ||
917 | if ( mShowWeekView ) | 914 | if ( mShowWeekView ) |
@@ -1012,3 +1009,3 @@ void KOMonthView::updateConfig() | |||
1012 | mWidthLongDayLabel = 0; | 1009 | mWidthLongDayLabel = 0; |
1013 | 1010 | qDebug("KOMonthView::updateConfig() "); | |
1014 | for (int i = 0; i < 7; i++) { | 1011 | for (int i = 0; i < 7; i++) { |
@@ -1017,6 +1014,3 @@ void KOMonthView::updateConfig() | |||
1017 | } | 1014 | } |
1018 | bool temp = mShowSatSunComp ; | ||
1019 | mShowSatSunComp = KOPrefs::instance()->mMonthViewSatSunTog ; | ||
1020 | if ( ! mShowWeekView ) { | 1015 | if ( ! mShowWeekView ) { |
1021 | if ( temp != KOPrefs::instance()->mMonthViewSatSunTog ) | ||
1022 | computeLayout(); | 1016 | computeLayout(); |
@@ -1050,3 +1044,3 @@ void KOMonthView::updateDayLabels() | |||
1050 | #endif | 1044 | #endif |
1051 | 1045 | qDebug("updateDayLabels W %d M %d ",mShortDayLabelsW ,mShortDayLabelsM); | |
1052 | mDayLabelsT = &mDayLabelsW; | 1046 | mDayLabelsT = &mDayLabelsW; |
@@ -1054,4 +1048,4 @@ void KOMonthView::updateDayLabels() | |||
1054 | if (mWeekStartsMonday) { | 1048 | if (mWeekStartsMonday) { |
1055 | bool show = mShortDayLabels; | 1049 | bool show = mShortDayLabelsW; |
1056 | if ( i > 4 && mShowSatSunComp && mWidthLongDayLabel > (*mDayLabelsT)[i]->width() ) | 1050 | if ( i > 4 && mWidthLongDayLabel > (*mDayLabelsT)[i]->width() ) |
1057 | show = true; | 1051 | show = true; |
@@ -1059,4 +1053,4 @@ void KOMonthView::updateDayLabels() | |||
1059 | } else { | 1053 | } else { |
1060 | if (i==0) (*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(7,mShortDayLabels)); | 1054 | if (i==0) (*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(7,mShortDayLabelsW)); |
1061 | else (*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(i,mShortDayLabels)); | 1055 | else (*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(i,mShortDayLabelsW)); |
1062 | 1056 | ||
@@ -1067,4 +1061,4 @@ void KOMonthView::updateDayLabels() | |||
1067 | if (mWeekStartsMonday) { | 1061 | if (mWeekStartsMonday) { |
1068 | bool show = mShortDayLabels; | 1062 | bool show = mShortDayLabelsM; |
1069 | if ( i > 4 && mShowSatSunComp && mWidthLongDayLabel > (*mDayLabelsT)[i]->width() ) | 1063 | if ( i > 4 && KOPrefs::instance()->mMonthViewSatSunTog && mWidthLongDayLabel > (*mDayLabelsT)[i]->width() ) |
1070 | show = true; | 1064 | show = true; |
@@ -1072,4 +1066,4 @@ void KOMonthView::updateDayLabels() | |||
1072 | } else { | 1066 | } else { |
1073 | if (i==0) (*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(7,mShortDayLabels)); | 1067 | if (i==0) (*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(7,mShortDayLabelsM)); |
1074 | else (*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(i,mShortDayLabels)); | 1068 | else (*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(i,mShortDayLabelsM)); |
1075 | 1069 | ||
@@ -1271,2 +1265,10 @@ void KOMonthView::resizeEvent(QResizeEvent * e) | |||
1271 | { | 1265 | { |
1266 | qDebug("KOMonthView::resizeEvent %d %d -- %d %d ", e->size().width(), e->size().height(), e->oldSize().width(), e->oldSize().height()); | ||
1267 | if ( ignoreResizeEvent ) { | ||
1268 | qDebug("KOMonthView::resizeEvent ignored "); | ||
1269 | --ignoreResizeEvent; | ||
1270 | return; | ||
1271 | } | ||
1272 | if ( e->size().width()+ e->size().height() < 240 ) | ||
1273 | return; | ||
1272 | computeLayout(); | 1274 | computeLayout(); |
@@ -1282,7 +1284,2 @@ void KOMonthView::computeLayoutWeek() | |||
1282 | int daysToShow; | 1284 | int daysToShow; |
1283 | bool combinedSatSun = false; | ||
1284 | if (mShowSatSunComp = KOPrefs::instance()->mMonthViewSatSunTog ) { | ||
1285 | daysToShow = 6; | ||
1286 | combinedSatSun = true; | ||
1287 | } | ||
1288 | int tWid = topLevelWidget()->size().width(); | 1285 | int tWid = topLevelWidget()->size().width(); |
@@ -1300,4 +1297,3 @@ void KOMonthView::computeLayoutWeek() | |||
1300 | daysToShow = 3; | 1297 | daysToShow = 3; |
1301 | mShowSatSunComp = true; | 1298 | bool combinedSatSun = true; |
1302 | combinedSatSun = true; | ||
1303 | 1299 | ||
@@ -1382,3 +1378,3 @@ void KOMonthView::computeLayoutWeek() | |||
1382 | //qDebug("parent %d %d ", topLevelWidget()->size().width(), topLevelWidget()->size().height()); | 1378 | //qDebug("parent %d %d ", topLevelWidget()->size().width(), topLevelWidget()->size().height()); |
1383 | mShortDayLabels = mDayLabelsW[0]->width() < mWidthLongDayLabel ; | 1379 | mShortDayLabelsW = mDayLabelsW[0]->width() < mWidthLongDayLabel ; |
1384 | updateDayLabels(); | 1380 | updateDayLabels(); |
@@ -1402,3 +1398,3 @@ void KOMonthView::computeLayout() | |||
1402 | bool combinedSatSun = false; | 1398 | bool combinedSatSun = false; |
1403 | if (mShowSatSunComp = KOPrefs::instance()->mMonthViewSatSunTog ) { | 1399 | if (KOPrefs::instance()->mMonthViewSatSunTog ) { |
1404 | daysToShow = 6; | 1400 | daysToShow = 6; |
@@ -1489,3 +1485,4 @@ void KOMonthView::computeLayout() | |||
1489 | //qDebug("parent %d %d ", topLevelWidget()->size().width(), topLevelWidget()->size().height()); | 1485 | //qDebug("parent %d %d ", topLevelWidget()->size().width(), topLevelWidget()->size().height()); |
1490 | mShortDayLabels = mDayLabels[0]->width() < mWidthLongDayLabel ; | 1486 | mShortDayLabelsM = mDayLabels[0]->width() < mWidthLongDayLabel ; |
1487 | qDebug("dlwid %d %d ",mDayLabels[0]->width() , mWidthLongDayLabel); | ||
1491 | updateDayLabels(); | 1488 | updateDayLabels(); |
diff --git a/korganizer/komonthview.h b/korganizer/komonthview.h index 51eb9e6..9dbe319 100644 --- a/korganizer/komonthview.h +++ b/korganizer/komonthview.h | |||
@@ -228,2 +228,3 @@ class KOMonthView: public KOEventView | |||
228 | bool isUpdatePossible() { return updatePossible; } | 228 | bool isUpdatePossible() { return updatePossible; } |
229 | void setIgnoreResizeEvent( int c ) { ignoreResizeEvent = c ;} | ||
229 | 230 | ||
@@ -260,2 +261,3 @@ class KOMonthView: public KOEventView | |||
260 | private: | 261 | private: |
262 | int ignoreResizeEvent; | ||
261 | int currentWeek(); | 263 | int currentWeek(); |
@@ -271,3 +273,2 @@ class KOMonthView: public KOEventView | |||
271 | bool mWeekStartsMonday; | 273 | bool mWeekStartsMonday; |
272 | bool mShowSatSunComp; | ||
273 | void computeLayout(); | 274 | void computeLayout(); |
@@ -282,3 +283,4 @@ class KOMonthView: public KOEventView | |||
282 | 283 | ||
283 | bool mShortDayLabels; | 284 | bool mShortDayLabelsM; |
285 | bool mShortDayLabelsW; | ||
284 | int mWidthLongDayLabel; | 286 | int mWidthLongDayLabel; |
diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp index a74c5fe..dcb51dc 100644 --- a/korganizer/koviewmanager.cpp +++ b/korganizer/koviewmanager.cpp | |||
@@ -124,3 +124,3 @@ void KOViewManager::showDateView( int view, QDate date) | |||
124 | } else if (view == 6 ) { | 124 | } else if (view == 6 ) { |
125 | mMainView->dateNavigator()->selectDates( date, 7 ); | 125 | //mMainView->dateNavigator()->selectDates( date, 7 ); |
126 | showMonthView(); | 126 | showMonthView(); |
@@ -225,2 +225,3 @@ void KOViewManager::raiseCurrentView( bool fullScreen, bool callUpdateView ) | |||
225 | if ( true /* !KOPrefs::instance()->mMonthViewWeek*/ ) { | 225 | if ( true /* !KOPrefs::instance()->mMonthViewWeek*/ ) { |
226 | mMonthView->setIgnoreResizeEvent( 2 ); | ||
226 | mMainView->navigatorBar()->show(); | 227 | mMainView->navigatorBar()->show(); |
@@ -493,3 +494,3 @@ bool KOViewManager::showsNextDays() | |||
493 | void KOViewManager::showMonthView() | 494 | void KOViewManager::showMonthView() |
494 | { | 495 | { |
495 | if (!mMonthView) { | 496 | if (!mMonthView) { |