-rw-r--r-- | bin/kdepim/korganizer/germantranslation.txt | 4 | ||||
-rw-r--r-- | korganizer/koagendaview.cpp | 25 | ||||
-rw-r--r-- | korganizer/navigatorbar.cpp | 22 |
3 files changed, 34 insertions, 17 deletions
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt index 00f5c28..ec08321 100644 --- a/bin/kdepim/korganizer/germantranslation.txt +++ b/bin/kdepim/korganizer/germantranslation.txt | |||
@@ -1205,8 +1205,8 @@ | |||
1205 | { "Display all flat","Zeige alle flach" }, | 1205 | { "Display all flat","Zeige alle flach" }, |
1206 | { "<p><i>Completed on %1</i></p>","<p><i>Erledigt am %1</i></p>" }, | 1206 | { "<p><i>Completed on %1</i></p>","<p><i>Erledigt am %1</i></p>" }, |
1207 | { "Default todo done color:","Standard Todo erledigt Farbe" }, | 1207 | { "Default todo done color:","Standard Todo erledigt Farbe" }, |
1208 | { "","" }, | 1208 | { "Select week %1-%2","Selektiere Woche %1-%2" }, |
1209 | { "","" }, | 1209 | { "Select Week","Selektiere Woche" }, |
1210 | { "","" }, | 1210 | { "","" }, |
1211 | { "","" }, | 1211 | { "","" }, |
1212 | { "","" }, | 1212 | { "","" }, |
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp index 918931a..1908b1c 100644 --- a/korganizer/koagendaview.cpp +++ b/korganizer/koagendaview.cpp | |||
@@ -433,17 +433,26 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) : | |||
433 | dummyAllDayRightB->setFlat( true ); | 433 | dummyAllDayRightB->setFlat( true ); |
434 | dummyAllDayRightB->setFocusPolicy(NoFocus); | 434 | dummyAllDayRightB->setFocusPolicy(NoFocus); |
435 | dummyAllDayRightB->setFixedHeight( (dummyAllDayRightB->sizeHint().height()/4)*3 ); | 435 | dummyAllDayRightB->setFixedHeight( (dummyAllDayRightB->sizeHint().height()/4)*3 ); |
436 | |||
436 | QPopupMenu * wpo = new QPopupMenu (this); | 437 | QPopupMenu * wpo = new QPopupMenu (this); |
437 | wpo->insertItem( i18n("W#"), 0 ); | 438 | QPopupMenu * all = new QPopupMenu (this); |
439 | //wpo->insertItem( i18n("W#"), 0 ); | ||
440 | int first = 1; | ||
438 | int i; | 441 | int i; |
439 | for ( i = 1; i < 53; i++ ) | 442 | for ( i = 1; i < 50; ++i ) { |
443 | if ( !(i%10) ) { | ||
444 | all->insertItem( i18n("Select week %1-%2" ).arg(first).arg( i-1) ,wpo ); | ||
445 | connect( wpo, SIGNAL( activated(int) ), SIGNAL( selectWeekNum ( int ) ) ); | ||
446 | first = i; | ||
447 | wpo = new QPopupMenu (this); | ||
448 | } | ||
440 | wpo->insertItem( QString::number( i ),i ); | 449 | wpo->insertItem( QString::number( i ),i ); |
441 | //Qt bug - we must add some empty fields... | ||
442 | for ( i = 53; i < 54; ++i ) { | ||
443 | wpo->insertItem( "", 52 ); | ||
444 | } | 450 | } |
445 | dummyAllDayRightB->setPopup( wpo ); | 451 | for ( i = 50; i < 53; ++i ) { |
446 | 452 | wpo->insertItem( QString::number(i), i); | |
453 | } | ||
454 | all->insertItem( i18n("Select week %1-%2" ).arg(first).arg( i-1) ,wpo ); | ||
455 | dummyAllDayRightB->setPopup( all ); | ||
447 | connect( wpo, SIGNAL( activated(int) ), SIGNAL( selectWeekNum ( int ) ) ); | 456 | connect( wpo, SIGNAL( activated(int) ), SIGNAL( selectWeekNum ( int ) ) ); |
448 | 457 | ||
449 | // Create event context menu for all day agenda | 458 | // Create event context menu for all day agenda |
@@ -581,7 +590,7 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) : | |||
581 | QFontMetrics fm ( dlf ); | 590 | QFontMetrics fm ( dlf ); |
582 | QString dayTest = "30"; | 591 | QString dayTest = "30"; |
583 | int wid = fm.width( dayTest ); | 592 | int wid = fm.width( dayTest ); |
584 | int maxWid = dummyAllDayRight->width(); | 593 | int maxWid = dummyAllDayRight->width()-2; |
585 | int fontPoint = dlf.pointSize(); | 594 | int fontPoint = dlf.pointSize(); |
586 | while ( wid > maxWid ) { | 595 | while ( wid > maxWid ) { |
587 | --fontPoint; | 596 | --fontPoint; |
diff --git a/korganizer/navigatorbar.cpp b/korganizer/navigatorbar.cpp index 2406bb5..24de01f 100644 --- a/korganizer/navigatorbar.cpp +++ b/korganizer/navigatorbar.cpp | |||
@@ -136,17 +136,25 @@ NavigatorBar::NavigatorBar( const QDate & date, QWidget *parent, const char *nam | |||
136 | } | 136 | } |
137 | 137 | ||
138 | if ( insertWeek ) { | 138 | if ( insertWeek ) { |
139 | //shit : bug in Qt. after inserting 53 item, only 51 are shown... | ||
140 | QPopupMenu * wpo = new QPopupMenu (this); | 139 | QPopupMenu * wpo = new QPopupMenu (this); |
141 | wpo->insertItem( i18n("W#"), 0 ); | 140 | QPopupMenu * all = new QPopupMenu (this); |
142 | for ( i = 1; i < 53; ++i ) { | 141 | //wpo->insertItem( i18n("W#"), 0 ); |
142 | int first = 1; | ||
143 | for ( i = 1; i < 50; ++i ) { | ||
144 | if ( !(i%10) ) { | ||
145 | all->insertItem( i18n("Select week %1-%2" ).arg(first).arg( i-1) ,wpo ); | ||
146 | connect( wpo, SIGNAL( activated(int) ), SIGNAL( selectWeek ( int ) ) ); | ||
147 | first = i; | ||
148 | wpo = new QPopupMenu (this); | ||
149 | } | ||
143 | wpo->insertItem( QString::number(i), i ); | 150 | wpo->insertItem( QString::number(i), i ); |
144 | } | 151 | } |
145 | for ( i = 53; i < 54; ++i ) { | 152 | for ( i = 50; i < 53; ++i ) { |
146 | wpo->insertItem( "", 52 ); | 153 | wpo->insertItem( QString::number(i), i); |
147 | } | 154 | } |
148 | selWeek->setPopup( wpo ); | 155 | all->insertItem( i18n("Select week %1-%2" ).arg(first).arg( i-1) ,wpo ); |
149 | selWeek->setFixedWidth( (size/4)*3 ); | 156 | selWeek->setPopup( all ); |
157 | selWeek->setFixedWidth( (size/5)*4 ); | ||
150 | selWeek->setFixedHeight( size ); | 158 | selWeek->setFixedHeight( size ); |
151 | connect( wpo, SIGNAL( activated(int) ), SIGNAL( selectWeek ( int ) ) ); | 159 | connect( wpo, SIGNAL( activated(int) ), SIGNAL( selectWeek ( int ) ) ); |
152 | } | 160 | } |