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 | |
parent | 118f5aab05c9ace5612d5c4fd69e7c5a59bed67b (diff) | |
download | kdepimpi-26b0c69fb3b11c29475ec02b2cfe52e33eb24e5f.zip kdepimpi-26b0c69fb3b11c29475ec02b2cfe52e33eb24e5f.tar.gz kdepimpi-26b0c69fb3b11c29475ec02b2cfe52e33eb24e5f.tar.bz2 |
many small fixes
-rw-r--r-- | bin/kdepim/korganizer/germantranslation.txt | 4 | ||||
-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 |
6 files changed, 48 insertions, 45 deletions
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt index e9ba8db..523c054 100644 --- a/bin/kdepim/korganizer/germantranslation.txt +++ b/bin/kdepim/korganizer/germantranslation.txt | |||
@@ -1221,10 +1221,10 @@ | |||
1221 | { "Save as Event template","Speichere als Vorlage" }, | 1221 | { "Save as Event template","Speichere als Vorlage" }, |
1222 | { "Load Event template","Lade Termin Vorlage" }, | 1222 | { "Load Event template","Lade Termin Vorlage" }, |
1223 | { "Save as Journal template","Speichere als Journal Vorlage" }, | 1223 | { "Save as Journal template","Speichere als Journal Vorlage" }, |
1224 | { "Insert Journal template","Füge Journal Vorlage ein" }, | 1224 | { "Insert Journal template","Füge Journal Vorlage ein" }, |
1225 | { "","" }, | 1225 | { "Sub todos:<br>","Unter Todos:<br>" }, |
1226 | { "","" }, | 1226 | { "Parent todo:<br>","Über Todo:<br>" }, |
1227 | { "","" }, | 1227 | { "","" }, |
1228 | { "","" }, | 1228 | { "","" }, |
1229 | { "","" }, | 1229 | { "","" }, |
1230 | { "","" }, | 1230 | { "","" }, |
diff --git a/korganizer/koeditorgeneraltodo.cpp b/korganizer/koeditorgeneraltodo.cpp index cd78f54..ce66863 100644 --- a/korganizer/koeditorgeneraltodo.cpp +++ b/korganizer/koeditorgeneraltodo.cpp | |||
@@ -159,10 +159,13 @@ void KOEditorGeneralTodo::initCompletion(QWidget *parent, QBoxLayout *topLayout) | |||
159 | 159 | ||
160 | mCompletedCombo->setSizePolicy( QSizePolicy( QSizePolicy::Preferred,QSizePolicy::Preferred) ); | 160 | mCompletedCombo->setSizePolicy( QSizePolicy( QSizePolicy::Preferred,QSizePolicy::Preferred) ); |
161 | mCompletedLabel->setSizePolicy( QSizePolicy( QSizePolicy::Expanding,QSizePolicy::Preferred) ); | 161 | mCompletedLabel->setSizePolicy( QSizePolicy( QSizePolicy::Expanding,QSizePolicy::Preferred) ); |
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 ); |
166 | } | 169 | } |
167 | } | 170 | } |
168 | 171 | ||
diff --git a/korganizer/koeventviewer.cpp b/korganizer/koeventviewer.cpp index 2faf18f..de11c13 100644 --- a/korganizer/koeventviewer.cpp +++ b/korganizer/koeventviewer.cpp | |||
@@ -420,9 +420,9 @@ void KOEventViewer::appendTodo(Todo *event, int mode ) | |||
420 | 420 | ||
421 | formatReadOnly(event); | 421 | formatReadOnly(event); |
422 | formatAttendees(event); | 422 | formatAttendees(event); |
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>"); |
426 | } | 426 | } |
427 | QPtrList<Incidence> Relations = event->relations(); | 427 | QPtrList<Incidence> Relations = event->relations(); |
428 | Incidence *to; | 428 | Incidence *to; |
@@ -533,13 +533,13 @@ void KOEventViewer::formatAttendees(Incidence *event) | |||
533 | if (!a->email().isEmpty()) { | 533 | if (!a->email().isEmpty()) { |
534 | if (iconPath) { | 534 | if (iconPath) { |
535 | mText += "<a href=\"mailto:" + a->name() +" <" + a->email() + ">:" + mMailSubject + "\">"; | 535 | mText += "<a href=\"mailto:" + a->name() +" <" + a->email() + ">:" + mMailSubject + "\">"; |
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 + "\">"; |
539 | } | 539 | } |
540 | else { | 540 | else { |
541 | ++a_count_nr; | 541 | ++a_count; |
542 | mText += "<IMG src=\"" + NOiconPath + "\">"; | 542 | mText += "<IMG src=\"" + NOiconPath + "\">"; |
543 | } | 543 | } |
544 | mText += "</a>\n"; | 544 | mText += "</a>\n"; |
545 | } | 545 | } |
@@ -549,9 +549,9 @@ void KOEventViewer::formatAttendees(Incidence *event) | |||
549 | if (a->role() == Attendee::Chair ) | 549 | if (a->role() == Attendee::Chair ) |
550 | mText +="(" + a->roleStr().left(1) + ".)"; | 550 | mText +="(" + a->roleStr().left(1) + ".)"; |
551 | } | 551 | } |
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\">"; |
555 | mText += i18n( "Mail to all" ); | 555 | mText += i18n( "Mail to all" ); |
556 | mText += "</a> ( "; | 556 | mText += "</a> ( "; |
557 | mText += "<IMG src=\"" + iconPath + "\">"; | 557 | mText += "<IMG src=\"" + iconPath + "\">"; |
@@ -565,9 +565,9 @@ void KOEventViewer::formatAttendees(Incidence *event) | |||
565 | mText += "<a href=\"mailto:RSVP\">"; | 565 | mText += "<a href=\"mailto:RSVP\">"; |
566 | mText += i18n( "Mail to selected" ); | 566 | mText += i18n( "Mail to selected" ); |
567 | mText += "</a> ( "; | 567 | mText += "</a> ( "; |
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 | } |
571 | } | 571 | } |
572 | 572 | ||
573 | } | 573 | } |
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp index 65accdc..5926abe 100644 --- a/korganizer/komonthview.cpp +++ b/korganizer/komonthview.cpp | |||
@@ -794,11 +794,13 @@ void MonthViewCell::selection( QListBoxItem *item ) | |||
794 | 794 | ||
795 | KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name) | 795 | KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name) |
796 | : KOEventView( calendar, parent, name ), | 796 | : KOEventView( calendar, parent, 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; |
802 | mWidStack = new QWidgetStack( this ); | 804 | mWidStack = new QWidgetStack( this ); |
803 | QHBoxLayout* hb = new QHBoxLayout( this ); | 805 | QHBoxLayout* hb = new QHBoxLayout( this ); |
804 | mMonthView = new QWidget( mWidStack ); | 806 | mMonthView = new QWidget( mWidStack ); |
@@ -816,9 +818,8 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name) | |||
816 | if ( mShowWeekView ) | 818 | if ( mShowWeekView ) |
817 | mWeekStartsMonday = true; | 819 | mWeekStartsMonday = true; |
818 | updatePossible = false; | 820 | updatePossible = false; |
819 | mCells.setAutoDelete( true ); | 821 | mCells.setAutoDelete( true ); |
820 | mShowSatSunComp = KOPrefs::instance()->mMonthViewSatSunTog ; | ||
821 | mDayLabels.resize( mDaysPerWeek ); | 822 | mDayLabels.resize( mDaysPerWeek ); |
822 | mDayLabelsW.resize( mDaysPerWeek ); | 823 | mDayLabelsW.resize( mDaysPerWeek ); |
823 | QFont bfont = font(); | 824 | QFont bfont = font(); |
824 | if ( QApplication::desktop()->width() < 650 ) { | 825 | if ( QApplication::desktop()->width() < 650 ) { |
@@ -905,16 +906,12 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name) | |||
905 | } | 906 | } |
906 | 907 | ||
907 | //connect( mWeekLabels[mNumWeeks], SIGNAL( clicked() ), SLOT( switchView() ) ); | 908 | //connect( mWeekLabels[mNumWeeks], SIGNAL( clicked() ), SLOT( switchView() ) ); |
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 ) |
918 | mWidStack->raiseWidget( mWeekView ); | 915 | mWidStack->raiseWidget( mWeekView ); |
919 | else | 916 | else |
920 | mWidStack->raiseWidget( mMonthView ); | 917 | mWidStack->raiseWidget( mMonthView ); |
@@ -1009,17 +1006,14 @@ void KOMonthView::updateConfig() | |||
1009 | mWeekStartsMonday = true; | 1006 | mWeekStartsMonday = true; |
1010 | } | 1007 | } |
1011 | QFontMetrics fontmetric(mDayLabels[0]->font()); | 1008 | QFontMetrics fontmetric(mDayLabels[0]->font()); |
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++) { |
1015 | int width = fontmetric.width(KOGlobals::self()->calendarSystem()->weekDayName(i+1)); | 1012 | int width = fontmetric.width(KOGlobals::self()->calendarSystem()->weekDayName(i+1)); |
1016 | if ( width > mWidthLongDayLabel ) mWidthLongDayLabel = width; | 1013 | if ( width > mWidthLongDayLabel ) mWidthLongDayLabel = width; |
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(); |
1023 | } | 1017 | } |
1024 | updateDayLabels(); | 1018 | updateDayLabels(); |
1025 | //qDebug("KOMonthView::updateConfig() %d %d %d ",height(), mDayLabels[0]->sizeHint().height() ,mNumWeeks); | 1019 | //qDebug("KOMonthView::updateConfig() %d %d %d ",height(), mDayLabels[0]->sizeHint().height() ,mNumWeeks); |
@@ -1047,32 +1041,32 @@ void KOMonthView::updateDayLabels() | |||
1047 | mDayLabelsT = &mDayLabelsW; | 1041 | mDayLabelsT = &mDayLabelsW; |
1048 | else | 1042 | else |
1049 | mDayLabelsT = &mDayLabels; | 1043 | mDayLabelsT = &mDayLabels; |
1050 | #endif | 1044 | #endif |
1051 | 1045 | qDebug("updateDayLabels W %d M %d ",mShortDayLabelsW ,mShortDayLabelsM); | |
1052 | mDayLabelsT = &mDayLabelsW; | 1046 | mDayLabelsT = &mDayLabelsW; |
1053 | for (int i = 0; i < 7; i++) { | 1047 | for (int i = 0; i < 7; i++) { |
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; |
1058 | (*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(i+1,show)); | 1052 | (*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(i+1,show)); |
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 | ||
1063 | } | 1057 | } |
1064 | } | 1058 | } |
1065 | mDayLabelsT = &mDayLabels; | 1059 | mDayLabelsT = &mDayLabels; |
1066 | for (int i = 0; i < 7; i++) { | 1060 | for (int i = 0; i < 7; i++) { |
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; |
1071 | (*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(i+1,show)); | 1065 | (*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(i+1,show)); |
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 | ||
1076 | } | 1070 | } |
1077 | } | 1071 | } |
1078 | 1072 | ||
@@ -1268,8 +1262,16 @@ void KOMonthView::updateView() | |||
1268 | } | 1262 | } |
1269 | 1263 | ||
1270 | void KOMonthView::resizeEvent(QResizeEvent * e) | 1264 | 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(); |
1273 | clPending = true; | 1275 | clPending = true; |
1274 | if ( mShowWeekView ) | 1276 | if ( mShowWeekView ) |
1275 | mCellsW[0]->setFocus(); | 1277 | mCellsW[0]->setFocus(); |
@@ -1279,13 +1281,8 @@ void KOMonthView::resizeEvent(QResizeEvent * e) | |||
1279 | void KOMonthView::computeLayoutWeek() | 1281 | void KOMonthView::computeLayoutWeek() |
1280 | { | 1282 | { |
1281 | 1283 | ||
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(); |
1289 | int tHei = topLevelWidget()->size().height(); | 1286 | int tHei = topLevelWidget()->size().height(); |
1290 | 1287 | ||
1291 | int wid = size().width();//e | 1288 | int wid = size().width();//e |
@@ -1297,10 +1294,9 @@ void KOMonthView::computeLayoutWeek() | |||
1297 | if ( wid < hei ) | 1294 | if ( wid < hei ) |
1298 | daysToShow = 2; | 1295 | daysToShow = 2; |
1299 | else | 1296 | else |
1300 | daysToShow = 3; | 1297 | daysToShow = 3; |
1301 | mShowSatSunComp = true; | 1298 | bool combinedSatSun = true; |
1302 | combinedSatSun = true; | ||
1303 | 1299 | ||
1304 | //qDebug("KOMonthView::computeLayout()------------------------------------ "); | 1300 | //qDebug("KOMonthView::computeLayout()------------------------------------ "); |
1305 | QFontMetrics fm ( mWeekLabels[0]->font() ); | 1301 | QFontMetrics fm ( mWeekLabels[0]->font() ); |
1306 | int weeklabelwid = fm.width( "888" ); | 1302 | int weeklabelwid = fm.width( "888" ); |
@@ -1379,9 +1375,9 @@ void KOMonthView::computeLayoutWeek() | |||
1379 | mWeekLabelsW[0]->setGeometry( 0,y,weeklabelwid,hei-dayLabelHei); | 1375 | mWeekLabelsW[0]->setGeometry( 0,y,weeklabelwid,hei-dayLabelHei); |
1380 | mWeekLabelsW[1]->setGeometry( 0,0,weeklabelwid,dayLabelHei); | 1376 | mWeekLabelsW[1]->setGeometry( 0,0,weeklabelwid,dayLabelHei); |
1381 | // qDebug("RRRRRRRRRRRRR %d %d old %d %d", e->size().width(),e->size().height() , e->oldSize().width(),e->oldSize().height()); | 1377 | // qDebug("RRRRRRRRRRRRR %d %d old %d %d", e->size().width(),e->size().height() , e->oldSize().width(),e->oldSize().height()); |
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(); |
1385 | bool forceUpdate = !updatePossible; | 1381 | bool forceUpdate = !updatePossible; |
1386 | updatePossible = true; | 1382 | updatePossible = true; |
1387 | //mWeekLabels[mNumWeeks]->setText( i18n("M")); | 1383 | //mWeekLabels[mNumWeeks]->setText( i18n("M")); |
@@ -1399,9 +1395,9 @@ void KOMonthView::computeLayout() | |||
1399 | return; | 1395 | return; |
1400 | } | 1396 | } |
1401 | int daysToShow = 7; | 1397 | int daysToShow = 7; |
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; |
1405 | combinedSatSun = true; | 1401 | combinedSatSun = true; |
1406 | } | 1402 | } |
1407 | int tWid = topLevelWidget()->size().width(); | 1403 | int tWid = topLevelWidget()->size().width(); |
@@ -1486,9 +1482,10 @@ void KOMonthView::computeLayout() | |||
1486 | } | 1482 | } |
1487 | mWeekLabels[6]->setGeometry( 0,0,weeklabelwid,dayLabelHei); | 1483 | mWeekLabels[6]->setGeometry( 0,0,weeklabelwid,dayLabelHei); |
1488 | // qDebug("RRRRRRRRRRRRR %d %d old %d %d", e->size().width(),e->size().height() , e->oldSize().width(),e->oldSize().height()); | 1484 | // qDebug("RRRRRRRRRRRRR %d %d old %d %d", e->size().width(),e->size().height() , e->oldSize().width(),e->oldSize().height()); |
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(); |
1492 | bool forceUpdate = !updatePossible; | 1489 | bool forceUpdate = !updatePossible; |
1493 | updatePossible = true; | 1490 | updatePossible = true; |
1494 | //mWeekLabels[mNumWeeks]->setText( i18n("W")); | 1491 | //mWeekLabels[mNumWeeks]->setText( i18n("W")); |
diff --git a/korganizer/komonthview.h b/korganizer/komonthview.h index 51eb9e6..9dbe319 100644 --- a/korganizer/komonthview.h +++ b/korganizer/komonthview.h | |||
@@ -225,8 +225,9 @@ class KOMonthView: public KOEventView | |||
225 | virtual void printPreview(CalPrinter *calPrinter, | 225 | virtual void printPreview(CalPrinter *calPrinter, |
226 | const QDate &, const QDate &); | 226 | const QDate &, const QDate &); |
227 | bool isMonthView() { return true; } | 227 | bool isMonthView() { return true; } |
228 | bool isUpdatePossible() { return updatePossible; } | 228 | bool isUpdatePossible() { return updatePossible; } |
229 | void setIgnoreResizeEvent( int c ) { ignoreResizeEvent = c ;} | ||
229 | 230 | ||
230 | MonthViewCell * selectedCell(); | 231 | MonthViewCell * selectedCell(); |
231 | public slots: | 232 | public slots: |
232 | virtual void updateView(); | 233 | virtual void updateView(); |
@@ -257,8 +258,9 @@ class KOMonthView: public KOEventView | |||
257 | void viewChanged(); | 258 | void viewChanged(); |
258 | void updateDayLabels(); | 259 | void updateDayLabels(); |
259 | 260 | ||
260 | private: | 261 | private: |
262 | int ignoreResizeEvent; | ||
261 | int currentWeek(); | 263 | int currentWeek(); |
262 | bool clPending; | 264 | bool clPending; |
263 | QWidgetStack * mWidStack; | 265 | QWidgetStack * mWidStack; |
264 | QWidget* mMonthView; | 266 | QWidget* mMonthView; |
@@ -268,9 +270,8 @@ class KOMonthView: public KOEventView | |||
268 | int mDaysPerWeek; | 270 | int mDaysPerWeek; |
269 | int mNumWeeks; | 271 | int mNumWeeks; |
270 | int mNumCells; | 272 | int mNumCells; |
271 | bool mWeekStartsMonday; | 273 | bool mWeekStartsMonday; |
272 | bool mShowSatSunComp; | ||
273 | void computeLayout(); | 274 | void computeLayout(); |
274 | void computeLayoutWeek(); | 275 | void computeLayoutWeek(); |
275 | 276 | ||
276 | QPtrVector<MonthViewCell> mCells; | 277 | QPtrVector<MonthViewCell> mCells; |
@@ -279,9 +280,10 @@ class KOMonthView: public KOEventView | |||
279 | QPtrVector<MonthViewCell> mCellsW; | 280 | QPtrVector<MonthViewCell> mCellsW; |
280 | QPtrVector<QLabel> mDayLabelsW; | 281 | QPtrVector<QLabel> mDayLabelsW; |
281 | QPtrVector<KOWeekButton> mWeekLabelsW; | 282 | QPtrVector<KOWeekButton> mWeekLabelsW; |
282 | 283 | ||
283 | bool mShortDayLabels; | 284 | bool mShortDayLabelsM; |
285 | bool mShortDayLabelsW; | ||
284 | int mWidthLongDayLabel; | 286 | int mWidthLongDayLabel; |
285 | 287 | ||
286 | QDate mStartDate; | 288 | QDate mStartDate; |
287 | 289 | ||
diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp index a74c5fe..dcb51dc 100644 --- a/korganizer/koviewmanager.cpp +++ b/korganizer/koviewmanager.cpp | |||
@@ -121,9 +121,9 @@ void KOViewManager::showDateView( int view, QDate date) | |||
121 | } else if (view == 5 ) { | 121 | } else if (view == 5 ) { |
122 | mCurrentAgendaView = 14 ; | 122 | mCurrentAgendaView = 14 ; |
123 | mMainView->dateNavigator()->selectDates( date, 14); | 123 | mMainView->dateNavigator()->selectDates( date, 14); |
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(); |
127 | } else if (view == 7 ) { | 127 | } else if (view == 7 ) { |
128 | mMainView->dateNavigator()->selectDate( date ); | 128 | mMainView->dateNavigator()->selectDate( date ); |
129 | showJournalView(); | 129 | showJournalView(); |
@@ -222,8 +222,9 @@ void KOViewManager::raiseCurrentView( bool fullScreen, bool callUpdateView ) | |||
222 | int wid = mMainView->width() ; | 222 | int wid = mMainView->width() ; |
223 | int hei = mMainView->height(); | 223 | int hei = mMainView->height(); |
224 | if ( mCurrentView == mMonthView ) { | 224 | if ( mCurrentView == mMonthView ) { |
225 | if ( true /* !KOPrefs::instance()->mMonthViewWeek*/ ) { | 225 | if ( true /* !KOPrefs::instance()->mMonthViewWeek*/ ) { |
226 | mMonthView->setIgnoreResizeEvent( 2 ); | ||
226 | mMainView->navigatorBar()->show(); | 227 | mMainView->navigatorBar()->show(); |
227 | hei -= mMainView->navigatorBar()->sizeHint().height(); | 228 | hei -= mMainView->navigatorBar()->sizeHint().height(); |
228 | } | 229 | } |
229 | //mMainView->navigatorBar()->hide(); | 230 | //mMainView->navigatorBar()->hide(); |
@@ -490,9 +491,9 @@ bool KOViewManager::showsNextDays() | |||
490 | { | 491 | { |
491 | return mFlagShowNextxDays; | 492 | return mFlagShowNextxDays; |
492 | } | 493 | } |
493 | void KOViewManager::showMonthView() | 494 | void KOViewManager::showMonthView() |
494 | { | 495 | { |
495 | if (!mMonthView) { | 496 | if (!mMonthView) { |
496 | mMonthView = new KOMonthView(mMainView->calendar(), mMainView->viewStack(), "KOViewManager::MonthView"); | 497 | mMonthView = new KOMonthView(mMainView->calendar(), mMainView->viewStack(), "KOViewManager::MonthView"); |
497 | 498 | ||
498 | addView(mMonthView); | 499 | addView(mMonthView); |