-rw-r--r-- | kaddressbook/kabcore.cpp | 5 | ||||
-rw-r--r-- | kaddressbook/viewmanager.cpp | 2 | ||||
-rw-r--r-- | kaddressbook/views/colorlistbox.cpp | 7 | ||||
-rw-r--r-- | kaddressbook/views/colorlistbox.h | 1 | ||||
-rw-r--r-- | kaddressbook/views/configurecardviewdialog.cpp | 4 | ||||
-rw-r--r-- | kaddressbook/views/configuretableviewdialog.cpp | 6 | ||||
-rw-r--r-- | korganizer/koagenda.cpp | 57 | ||||
-rw-r--r-- | korganizer/koagenda.h | 4 | ||||
-rw-r--r-- | korganizer/koagendaview.cpp | 18 | ||||
-rw-r--r-- | korganizer/koagendaview.h | 4 | ||||
-rw-r--r-- | korganizer/kotodoview.cpp | 49 | ||||
-rw-r--r-- | microkde/kcolordialog.cpp | 1 | ||||
-rw-r--r-- | microkde/kdeui/ktoolbar.cpp | 2 |
13 files changed, 120 insertions, 40 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index 5ef61b1..e34951a 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp | |||
@@ -398,9 +398,9 @@ KABCore::KABCore( KXMLGUIClient *client, bool readWrite, QWidget *parent, const | |||
398 | #ifndef DESKTOP_VERSION | 398 | #ifndef DESKTOP_VERSION |
399 | infrared = 0; | 399 | infrared = 0; |
400 | #endif | 400 | #endif |
401 | //toggleBeamReceive( ); | 401 | //toggleBeamReceive( ); |
402 | //mMainWindow->toolBar()->show(); | 402 | mMainWindow->toolBar()->show(); |
403 | // we have a toolbar repainting error on the Zaurus when starting KA/Pi | 403 | // we have a toolbar repainting error on the Zaurus when starting KA/Pi |
404 | QTimer::singleShot( 10, this , SLOT ( updateToolBar())); | 404 | QTimer::singleShot( 10, this , SLOT ( updateToolBar())); |
405 | } | 405 | } |
406 | 406 | ||
@@ -2172,8 +2172,9 @@ void KABCore::addActionsManually() | |||
2172 | // mViewManager->getFilterAction()->plug ( tb); | 2172 | // mViewManager->getFilterAction()->plug ( tb); |
2173 | } | 2173 | } |
2174 | } | 2174 | } |
2175 | #endif | 2175 | #endif |
2176 | mIncSearchWidget->setSize(); | ||
2176 | // mActionQuit->plug ( mMainWindow->toolBar()); | 2177 | // mActionQuit->plug ( mMainWindow->toolBar()); |
2177 | 2178 | ||
2178 | 2179 | ||
2179 | 2180 | ||
@@ -2294,9 +2295,9 @@ void KABCore::addActionsManually() | |||
2294 | mActionSave->plug( tb ); | 2295 | mActionSave->plug( tb ); |
2295 | tb->enableMoving(false); | 2296 | tb->enableMoving(false); |
2296 | } | 2297 | } |
2297 | //mActionQuit->plug ( tb ); | 2298 | //mActionQuit->plug ( tb ); |
2298 | // tb->insertWidget(-1, 0, mIncSearchWidget, 6); | 2299 | //tb->insertWidget(-1, 0, mIncSearchWidget, 6); |
2299 | 2300 | ||
2300 | //US link the searchwidget first to this. | 2301 | //US link the searchwidget first to this. |
2301 | // The real linkage to the toolbar happens later. | 2302 | // The real linkage to the toolbar happens later. |
2302 | //US mIncSearchWidget->reparent(tb, 0, QPoint(50,0), TRUE); | 2303 | //US mIncSearchWidget->reparent(tb, 0, QPoint(50,0), TRUE); |
diff --git a/kaddressbook/viewmanager.cpp b/kaddressbook/viewmanager.cpp index 86f0f3d..0614d06 100644 --- a/kaddressbook/viewmanager.cpp +++ b/kaddressbook/viewmanager.cpp | |||
@@ -703,9 +703,9 @@ void ViewManager::initActions() | |||
703 | action = new KAction( i18n( "Refresh View" ), "reload", 0, this, | 703 | action = new KAction( i18n( "Refresh View" ), "reload", 0, this, |
704 | SLOT( refreshView()), mCore->actionCollection(), | 704 | SLOT( refreshView()), mCore->actionCollection(), |
705 | "view_refresh" ); | 705 | "view_refresh" ); |
706 | action->plug(viewmenu); | 706 | action->plug(viewmenu); |
707 | viewmenu->insertSeparator(); | 707 | //viewmenu->insertSeparator(); |
708 | #endif //KAB_EMBEDDED | 708 | #endif //KAB_EMBEDDED |
709 | 709 | ||
710 | action = new KAction( i18n( "Edit &Filters..." ), "filter", 0, this, | 710 | action = new KAction( i18n( "Edit &Filters..." ), "filter", 0, this, |
711 | SLOT( configureFilters() ), mCore->actionCollection(), | 711 | SLOT( configureFilters() ), mCore->actionCollection(), |
diff --git a/kaddressbook/views/colorlistbox.cpp b/kaddressbook/views/colorlistbox.cpp index c243fa0..7386207 100644 --- a/kaddressbook/views/colorlistbox.cpp +++ b/kaddressbook/views/colorlistbox.cpp | |||
@@ -31,8 +31,9 @@ | |||
31 | ColorListBox::ColorListBox( QWidget *parent, const char *name, WFlags f ) | 31 | ColorListBox::ColorListBox( QWidget *parent, const char *name, WFlags f ) |
32 | :KListBox( parent, name, f ), mCurrentOnDragEnter(-1) | 32 | :KListBox( parent, name, f ), mCurrentOnDragEnter(-1) |
33 | { | 33 | { |
34 | connect( this, SIGNAL(selected(int)), this, SLOT(newColor(int)) ); | 34 | connect( this, SIGNAL(selected(int)), this, SLOT(newColor(int)) ); |
35 | connect( this, SIGNAL(clicked(QListBoxItem *)), this, SLOT(slotNewColor(QListBoxItem *)) ); | ||
35 | setAcceptDrops( true); | 36 | setAcceptDrops( true); |
36 | } | 37 | } |
37 | 38 | ||
38 | 39 | ||
@@ -73,9 +74,13 @@ QColor ColorListBox::color( uint index ) const | |||
73 | { | 74 | { |
74 | return( black ); | 75 | return( black ); |
75 | } | 76 | } |
76 | } | 77 | } |
77 | 78 | void ColorListBox::slotNewColor(QListBoxItem * i) | |
79 | { | ||
80 | if ( i ) | ||
81 | newColor( index( i ) ); | ||
82 | } | ||
78 | 83 | ||
79 | void ColorListBox::newColor( int index ) | 84 | void ColorListBox::newColor( int index ) |
80 | { | 85 | { |
81 | if( isEnabled() == false ) | 86 | if( isEnabled() == false ) |
diff --git a/kaddressbook/views/colorlistbox.h b/kaddressbook/views/colorlistbox.h index 4a0e705..bb91484 100644 --- a/kaddressbook/views/colorlistbox.h +++ b/kaddressbook/views/colorlistbox.h | |||
@@ -47,8 +47,9 @@ class ColorListBox : public KListBox | |||
47 | void dropEvent( QDropEvent *e ); | 47 | void dropEvent( QDropEvent *e ); |
48 | 48 | ||
49 | private slots: | 49 | private slots: |
50 | void newColor( int index ); | 50 | void newColor( int index ); |
51 | void slotNewColor(QListBoxItem * i); | ||
51 | 52 | ||
52 | private: | 53 | private: |
53 | int mCurrentOnDragEnter; | 54 | int mCurrentOnDragEnter; |
54 | 55 | ||
diff --git a/kaddressbook/views/configurecardviewdialog.cpp b/kaddressbook/views/configurecardviewdialog.cpp index 366e54c..e0fbd21 100644 --- a/kaddressbook/views/configurecardviewdialog.cpp +++ b/kaddressbook/views/configurecardviewdialog.cpp | |||
@@ -214,13 +214,17 @@ void CardViewLookNFeelPage::setHeaderFont() | |||
214 | 214 | ||
215 | void CardViewLookNFeelPage::enableFonts() | 215 | void CardViewLookNFeelPage::enableFonts() |
216 | { | 216 | { |
217 | vbFonts->setEnabled( cbEnableCustomFonts->isChecked() ); | 217 | vbFonts->setEnabled( cbEnableCustomFonts->isChecked() ); |
218 | if ( cbEnableCustomFonts->isChecked() ) | ||
219 | vbFonts->setFocus(); | ||
218 | } | 220 | } |
219 | 221 | ||
220 | void CardViewLookNFeelPage::enableColors() | 222 | void CardViewLookNFeelPage::enableColors() |
221 | { | 223 | { |
222 | lbColors->setEnabled( cbEnableCustomColors->isChecked() ); | 224 | lbColors->setEnabled( cbEnableCustomColors->isChecked() ); |
225 | if ( cbEnableCustomColors->isChecked() ) | ||
226 | lbColors->setFocus(); | ||
223 | } | 227 | } |
224 | 228 | ||
225 | void CardViewLookNFeelPage::initGUI() | 229 | void CardViewLookNFeelPage::initGUI() |
226 | { | 230 | { |
diff --git a/kaddressbook/views/configuretableviewdialog.cpp b/kaddressbook/views/configuretableviewdialog.cpp index 8bcceb2..0e36abd 100644 --- a/kaddressbook/views/configuretableviewdialog.cpp +++ b/kaddressbook/views/configuretableviewdialog.cpp | |||
@@ -209,13 +209,17 @@ void LookAndFeelPage::setHeaderFont() | |||
209 | 209 | ||
210 | void LookAndFeelPage::enableFonts() | 210 | void LookAndFeelPage::enableFonts() |
211 | { | 211 | { |
212 | vbFonts->setEnabled( cbEnableCustomFonts->isChecked() ); | 212 | vbFonts->setEnabled( cbEnableCustomFonts->isChecked() ); |
213 | if ( cbEnableCustomFonts->isChecked() ) | ||
214 | vbFonts->setFocus(); | ||
213 | } | 215 | } |
214 | 216 | ||
215 | void LookAndFeelPage::enableColors() | 217 | void LookAndFeelPage::enableColors() |
216 | { | 218 | { |
217 | lbColors->setEnabled( cbEnableCustomColors->isChecked() ); | 219 | lbColors->setEnabled( cbEnableCustomColors->isChecked() ); |
220 | if ( cbEnableCustomColors->isChecked() ) | ||
221 | lbColors->setFocus(); | ||
218 | } | 222 | } |
219 | 223 | ||
220 | void LookAndFeelPage::initGUI() | 224 | void LookAndFeelPage::initGUI() |
221 | { | 225 | { |
diff --git a/korganizer/koagenda.cpp b/korganizer/koagenda.cpp index deadfc9..de964da 100644 --- a/korganizer/koagenda.cpp +++ b/korganizer/koagenda.cpp | |||
@@ -167,9 +167,9 @@ KOAgenda::KOAgenda(int columns,int rows,int rowSize,QWidget *parent, | |||
167 | const char *name,WFlags f) : | 167 | const char *name,WFlags f) : |
168 | QScrollView(parent,name,f) | 168 | QScrollView(parent,name,f) |
169 | { | 169 | { |
170 | 170 | ||
171 | 171 | mAllAgendaPopup = 0; | |
172 | mColumns = columns; | 172 | mColumns = columns; |
173 | mRows = rows; | 173 | mRows = rows; |
174 | mGridSpacingY = rowSize; | 174 | mGridSpacingY = rowSize; |
175 | mAllDayMode = false; | 175 | mAllDayMode = false; |
@@ -186,8 +186,9 @@ KOAgenda::KOAgenda(int columns,int rows,int rowSize,QWidget *parent, | |||
186 | */ | 186 | */ |
187 | KOAgenda::KOAgenda(int columns,QWidget *parent,const char *name,WFlags f) : | 187 | KOAgenda::KOAgenda(int columns,QWidget *parent,const char *name,WFlags f) : |
188 | QScrollView(parent,name,f) | 188 | QScrollView(parent,name,f) |
189 | { | 189 | { |
190 | mAllAgendaPopup = 0; | ||
190 | blockResize = false; | 191 | blockResize = false; |
191 | mColumns = columns; | 192 | mColumns = columns; |
192 | mRows = 1; | 193 | mRows = 1; |
193 | //qDebug("aaaaaaaaaaaaaaaaaaldays %d ", KOPrefs::instance()->mAllDaySize); | 194 | //qDebug("aaaaaaaaaaaaaaaaaaldays %d ", KOPrefs::instance()->mAllDaySize); |
@@ -231,9 +232,9 @@ void KOAgenda::init() | |||
231 | if ( QApplication::desktop()->width() < 480 ) | 232 | if ( QApplication::desktop()->width() < 480 ) |
232 | pathString += "icons16/"; | 233 | pathString += "icons16/"; |
233 | } else | 234 | } else |
234 | pathString += "iconsmini/"; | 235 | pathString += "iconsmini/"; |
235 | 236 | ||
236 | mNewItemPopup->insertItem ( SmallIcon( pathString +"newevent" ), i18n("New Event..."), 1 ); | 237 | mNewItemPopup->insertItem ( SmallIcon( pathString +"newevent" ), i18n("New Event..."), 1 ); |
237 | mNewItemPopup->insertItem ( SmallIcon( pathString +"newtodo" ), i18n("New Todo..."),2 ); | 238 | mNewItemPopup->insertItem ( SmallIcon( pathString +"newtodo" ), i18n("New Todo..."),2 ); |
238 | mNewItemPopup->insertSeparator ( ); | 239 | mNewItemPopup->insertSeparator ( ); |
239 | mNewItemPopup->insertItem ( SmallIcon( pathString +"day" ), i18n("Day view"),3 ); | 240 | mNewItemPopup->insertItem ( SmallIcon( pathString +"day" ), i18n("Day view"),3 ); |
@@ -386,45 +387,84 @@ void KOAgenda::popupMenu() | |||
386 | } | 387 | } |
387 | mLeftMouseDown = false; // no more leftMouse computation | 388 | mLeftMouseDown = false; // no more leftMouse computation |
388 | if (mPopupItem) { | 389 | if (mPopupItem) { |
389 | selectItem(mPopupItem); | 390 | selectItem(mPopupItem); |
391 | if ( mAllAgendaPopup ) | ||
392 | mAllAgendaPopup->installEventFilter( this ); | ||
390 | emit showIncidencePopupSignal(mPopupItem->incidence()); | 393 | emit showIncidencePopupSignal(mPopupItem->incidence()); |
391 | 394 | ||
392 | } | 395 | } |
393 | } else if ( mPopupKind == 2 ) { | 396 | } else if ( mPopupKind == 2 ) { |
394 | if ( mLeftMouseDown ) { // we have a simulated right click - clear left mouse action | 397 | if ( mLeftMouseDown ) { // we have a simulated right click - clear left mouse action |
395 | endSelectAction( false ); // do not emit new event signal | 398 | endSelectAction( false ); // do not emit new event signal |
396 | mLeftMouseDown = false; // no more leftMouse computation | 399 | mLeftMouseDown = false; // no more leftMouse computation |
397 | } | 400 | } |
401 | mNewItemPopup->installEventFilter( this ); | ||
398 | mNewItemPopup->popup( mPopupPos); | 402 | mNewItemPopup->popup( mPopupPos); |
403 | |||
399 | } | 404 | } |
400 | mLeftMouseDown = false; | 405 | mLeftMouseDown = false; |
401 | mPopupItem = 0; | 406 | mPopupItem = 0; |
402 | mPopupKind = 0; | 407 | mPopupKind = 0; |
403 | } | 408 | } |
404 | 409 | ||
405 | bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me) | 410 | bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me) |
406 | { | 411 | { |
407 | //qDebug("KOAgenda::eventFilter_mous "); | 412 | static int startX = 0; |
413 | static int startY = 0; | ||
414 | static int blockmoveDist = ( QApplication::desktop()->width() < 480 ? 15 : 20 ); | ||
415 | static bool blockMoving = true; | ||
416 | |||
417 | //qDebug("KOAgenda::eventFilter_mous "); | ||
418 | if ( object == mNewItemPopup ) { | ||
419 | //qDebug("mNewItemPopup "); | ||
420 | if ( me->type() == QEvent::MouseButtonRelease ) { | ||
421 | mNewItemPopup->removeEventFilter( this ); | ||
422 | int dX = me->globalPos().x() - mPopupPos.x();; | ||
423 | if ( dX < 0 ) | ||
424 | dX = -dX; | ||
425 | int dY = me->globalPos().y() - mPopupPos.y(); | ||
426 | if ( dY < 0 ) | ||
427 | dY = -dY; | ||
428 | if ( dX > blockmoveDist || dY > blockmoveDist ) { | ||
429 | mNewItemPopup->hide(); | ||
430 | } | ||
431 | } | ||
432 | return true; | ||
433 | } | ||
434 | if ( object == mAllAgendaPopup ) { | ||
435 | //qDebug(" mAllAgendaPopup "); | ||
436 | if ( me->type() == QEvent::MouseButtonRelease ) { | ||
437 | mAllAgendaPopup->removeEventFilter( this ); | ||
438 | int dX = me->globalPos().x() - mPopupPos.x();; | ||
439 | if ( dX < 0 ) | ||
440 | dX = -dX; | ||
441 | int dY = me->globalPos().y() - mPopupPos.y(); | ||
442 | if ( dY < 0 ) | ||
443 | dY = -dY; | ||
444 | if ( dX > blockmoveDist || dY > blockmoveDist ) { | ||
445 | mAllAgendaPopup->hide(); | ||
446 | } | ||
447 | } | ||
448 | return true; | ||
449 | } | ||
408 | QPoint viewportPos; | 450 | QPoint viewportPos; |
409 | if (object != viewport()) { | 451 | if (object != viewport()) { |
410 | viewportPos = ((QWidget *)object)->mapToParent(me->pos()); | 452 | viewportPos = ((QWidget *)object)->mapToParent(me->pos()); |
411 | } else { | 453 | } else { |
412 | viewportPos = me->pos(); | 454 | viewportPos = me->pos(); |
413 | } | 455 | } |
414 | static int startX = 0; | 456 | |
415 | static int startY = 0; | ||
416 | static int blockmoveDist = ( QApplication::desktop()->width() < 480 ? 15 : 20 ); | ||
417 | static bool blockMoving = true; | ||
418 | switch (me->type()) { | 457 | switch (me->type()) { |
419 | case QEvent::MouseButtonPress: | 458 | case QEvent::MouseButtonPress: |
420 | if (me->button() == LeftButton) { | 459 | if (me->button() == LeftButton) { |
421 | mPopupTimer->start( 600 ); | 460 | mPopupTimer->start( 600 ); |
422 | mLeftMouseDown = true; | 461 | mLeftMouseDown = true; |
423 | } | 462 | } |
424 | blockMoving = true; | 463 | blockMoving = true; |
425 | startX = viewportPos.x(); | 464 | startX = viewportPos.x(); |
426 | startY = viewportPos.y(); | 465 | startY = viewportPos.y(); |
466 | mPopupPos = me->globalPos(); | ||
427 | if (object != viewport()) { | 467 | if (object != viewport()) { |
428 | mPopupItem = (KOAgendaItem *)object; | 468 | mPopupItem = (KOAgendaItem *)object; |
429 | mPopupKind = 1; | 469 | mPopupKind = 1; |
430 | if (me->button() == RightButton) { | 470 | if (me->button() == RightButton) { |
@@ -454,9 +494,8 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me) | |||
454 | mPopupItem = 0; | 494 | mPopupItem = 0; |
455 | mPopupKind = 2; | 495 | mPopupKind = 2; |
456 | selectItem(0); | 496 | selectItem(0); |
457 | mActionItem = 0; | 497 | mActionItem = 0; |
458 | mPopupPos = viewport()->mapToGlobal( me->pos() ); | ||
459 | if (me->button() == RightButton) { | 498 | if (me->button() == RightButton) { |
460 | int x,y; | 499 | int x,y; |
461 | viewportToContents(viewportPos.x(),viewportPos.y(),x,y); | 500 | viewportToContents(viewportPos.x(),viewportPos.y(),x,y); |
462 | int gx,gy; | 501 | int gx,gy; |
diff --git a/korganizer/koagenda.h b/korganizer/koagenda.h index 35c08b6..4f1fdb9 100644 --- a/korganizer/koagenda.h +++ b/korganizer/koagenda.h | |||
@@ -30,8 +30,9 @@ | |||
30 | #include <qpixmap.h> | 30 | #include <qpixmap.h> |
31 | #include <qguardedptr.h> | 31 | #include <qguardedptr.h> |
32 | 32 | ||
33 | #include "koagendaitem.h" | 33 | #include "koagendaitem.h" |
34 | #include "koeventview.h" | ||
34 | 35 | ||
35 | class QPopupMenu; | 36 | class QPopupMenu; |
36 | class QTime; | 37 | class QTime; |
37 | class KConfig; | 38 | class KConfig; |
@@ -122,9 +123,9 @@ class KOAgenda : public QScrollView | |||
122 | void finishUpdate(); | 123 | void finishUpdate(); |
123 | void printSelection(); | 124 | void printSelection(); |
124 | void storePosition(); | 125 | void storePosition(); |
125 | void restorePosition(); | 126 | void restorePosition(); |
126 | 127 | void setPopup( KOEventPopupMenu * p ) { mAllAgendaPopup = p; } | |
127 | 128 | ||
128 | public slots: | 129 | public slots: |
129 | void popupMenu(); | 130 | void popupMenu(); |
130 | void newItem( int ); | 131 | void newItem( int ); |
@@ -167,8 +168,9 @@ class KOAgenda : public QScrollView | |||
167 | void addToCalSignal(Incidence *, Incidence *); | 168 | void addToCalSignal(Incidence *, Incidence *); |
168 | void resizedSignal(); | 169 | void resizedSignal(); |
169 | 170 | ||
170 | protected: | 171 | protected: |
172 | KOEventPopupMenu * mAllAgendaPopup; | ||
171 | QPainter mPixPainter; | 173 | QPainter mPixPainter; |
172 | QPixmap mPaintPixmap; | 174 | QPixmap mPaintPixmap; |
173 | QPixmap mHighlightPixmap; | 175 | QPixmap mHighlightPixmap; |
174 | void drawContents(QPainter *p,int cx, int cy, int cw, int ch); | 176 | void drawContents(QPainter *p,int cx, int cy, int cw, int ch); |
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp index 8d32152..95388ef 100644 --- a/korganizer/koagendaview.cpp +++ b/korganizer/koagendaview.cpp | |||
@@ -504,11 +504,9 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) : | |||
504 | mAllDayAgenda->setFocusPolicy(NoFocus); | 504 | mAllDayAgenda->setFocusPolicy(NoFocus); |
505 | QLabel *dummyAllDayRight = new QLabel (mAllDayFrame); | 505 | QLabel *dummyAllDayRight = new QLabel (mAllDayFrame); |
506 | 506 | ||
507 | // Create event context menu for all day agenda | 507 | // Create event context menu for all day agenda |
508 | mAllDayAgendaPopup = eventPopup(); | 508 | //mAllDayAgendaPopup = eventPopup(); |
509 | connect(mAllDayAgenda,SIGNAL(showIncidencePopupSignal(Incidence *)), | ||
510 | mAllDayAgendaPopup,SLOT(showIncidencePopup(Incidence *))); | ||
511 | 509 | ||
512 | // Create agenda frame | 510 | // Create agenda frame |
513 | QGridLayout *agendaLayout = new QGridLayout(agendaFrame,4,3); | 511 | QGridLayout *agendaLayout = new QGridLayout(agendaFrame,4,3); |
514 | // QHBox *agendaFrame = new QHBox(splitterAgenda); | 512 | // QHBox *agendaFrame = new QHBox(splitterAgenda); |
@@ -543,18 +541,22 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) : | |||
543 | agendaLayout->addMultiCellWidget(mAgenda,2,2,1,2); | 541 | agendaLayout->addMultiCellWidget(mAgenda,2,2,1,2); |
544 | agendaLayout->setColStretch(1,1); | 542 | agendaLayout->setColStretch(1,1); |
545 | mAgenda->setFocusPolicy(NoFocus); | 543 | mAgenda->setFocusPolicy(NoFocus); |
546 | // Create event context menu for agenda | 544 | // Create event context menu for agenda |
547 | mAgendaPopup = eventPopup(); | 545 | mAllAgendaPopup = eventPopup(); |
548 | 546 | ||
549 | mAgendaPopup->addAdditionalItem(QIconSet(SmallIcon("bell")), | 547 | mAllAgendaPopup->addAdditionalItem(QIconSet(SmallIcon("bell")), |
550 | i18n("Toggle Alarm"),mAgenda, | 548 | i18n("Toggle Alarm"),mAgenda, |
551 | SLOT(popupAlarm()),true); | 549 | SLOT(popupAlarm()),true); |
552 | 550 | ||
553 | 551 | ||
554 | connect(mAgenda,SIGNAL(showIncidencePopupSignal(Incidence *)), | 552 | connect(mAgenda,SIGNAL(showIncidencePopupSignal(Incidence *)), |
555 | mAgendaPopup,SLOT(showIncidencePopup(Incidence *))); | 553 | mAllAgendaPopup,SLOT(showIncidencePopup(Incidence *))); |
556 | 554 | ||
555 | connect(mAllDayAgenda,SIGNAL(showIncidencePopupSignal(Incidence *)), | ||
556 | mAllAgendaPopup,SLOT(showIncidencePopup(Incidence *))); | ||
557 | mAgenda->setPopup( mAllAgendaPopup ); | ||
558 | mAllDayAgenda->setPopup( mAllAgendaPopup ); | ||
557 | // make connections between dependent widgets | 559 | // make connections between dependent widgets |
558 | mTimeLabels->setAgenda(mAgenda); | 560 | mTimeLabels->setAgenda(mAgenda); |
559 | 561 | ||
560 | // Update widgets to reflect user preferences | 562 | // Update widgets to reflect user preferences |
@@ -666,10 +668,10 @@ void KOAgendaView::addToCalSlot(Incidence * inc, Incidence * incOld ) | |||
666 | } | 668 | } |
667 | 669 | ||
668 | KOAgendaView::~KOAgendaView() | 670 | KOAgendaView::~KOAgendaView() |
669 | { | 671 | { |
670 | delete mAgendaPopup; | 672 | delete mAllAgendaPopup; |
671 | delete mAllDayAgendaPopup; | 673 | //delete mAllDayAgendaPopup; |
672 | delete KOAgendaItem::paintPix(); | 674 | delete KOAgendaItem::paintPix(); |
673 | delete KOAgendaItem::paintPixSel(); | 675 | delete KOAgendaItem::paintPixSel(); |
674 | } | 676 | } |
675 | void KOAgendaView::resizeEvent( QResizeEvent* e ) | 677 | void KOAgendaView::resizeEvent( QResizeEvent* e ) |
diff --git a/korganizer/koagendaview.h b/korganizer/koagendaview.h index 30c9b05..c6e6602 100644 --- a/korganizer/koagendaview.h +++ b/korganizer/koagendaview.h | |||
@@ -270,10 +270,10 @@ class KOAgendaView : public KOEventView { | |||
270 | 270 | ||
271 | bool mWeekStartsMonday; | 271 | bool mWeekStartsMonday; |
272 | int mStartHour; | 272 | int mStartHour; |
273 | 273 | ||
274 | KOEventPopupMenu *mAgendaPopup; | 274 | KOEventPopupMenu *mAllAgendaPopup; |
275 | KOEventPopupMenu *mAllDayAgendaPopup; | 275 | //KOEventPopupMenu *mAllDayAgendaPopup; |
276 | 276 | ||
277 | EventIndicator *mEventIndicatorTop; | 277 | EventIndicator *mEventIndicatorTop; |
278 | EventIndicator *mEventIndicatorBottom; | 278 | EventIndicator *mEventIndicatorBottom; |
279 | 279 | ||
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp index ccc4b01..0a315cb 100644 --- a/korganizer/kotodoview.cpp +++ b/korganizer/kotodoview.cpp | |||
@@ -206,27 +206,38 @@ void KOTodoListView::contentsDropEvent(QDropEvent *e) | |||
206 | } | 206 | } |
207 | 207 | ||
208 | void KOTodoListView::contentsMousePressEvent(QMouseEvent* e) | 208 | void KOTodoListView::contentsMousePressEvent(QMouseEvent* e) |
209 | { | 209 | { |
210 | |||
211 | QPoint p(contentsToViewport(e->pos())); | ||
212 | QListViewItem *i = itemAt(p); | ||
213 | bool rootClicked = true; | ||
214 | if (i) { | ||
215 | // if the user clicked into the root decoration of the item, don't | ||
216 | // try to start a drag! | ||
217 | int X = p.x(); | ||
218 | //qDebug("%d %d %d", X, header()->sectionPos(0), treeStepSize() ); | ||
219 | if (X > header()->sectionPos(0) + | ||
220 | treeStepSize() * (i->depth() + (rootIsDecorated() ? 1 : 0)) + | ||
221 | itemMargin() || | ||
222 | X < header()->sectionPos(0)) { | ||
223 | rootClicked = false; | ||
224 | } | ||
225 | } | ||
210 | #ifndef KORG_NODND | 226 | #ifndef KORG_NODND |
211 | QPoint p(contentsToViewport(e->pos())); | 227 | mMousePressed = false; |
212 | QListViewItem *i = itemAt(p); | 228 | if (! rootClicked ) { |
213 | mMousePressed = false; | ||
214 | if (i) { | ||
215 | // if the user clicked into the root decoration of the item, don't | ||
216 | // try to start a drag! | ||
217 | if (p.x() > header()->sectionPos(header()->mapToIndex(0)) + | ||
218 | treeStepSize() * (i->depth() + (rootIsDecorated() ? 1 : 0)) + | ||
219 | itemMargin() || | ||
220 | p.x() < header()->sectionPos(header()->mapToIndex(0))) { | ||
221 | if (e->button()==Qt::LeftButton) { | ||
222 | mPressPos = e->pos(); | 229 | mPressPos = e->pos(); |
223 | mMousePressed = true; | 230 | mMousePressed = true; |
224 | } | ||
225 | } | 231 | } |
226 | } | ||
227 | #endif | 232 | #endif |
228 | QListView::contentsMousePressEvent(e); | 233 | //qDebug("KOTodoListView::contentsMousePressEvent %d", rootClicked); |
234 | #ifndef DESKTOP_VERSION | ||
235 | if (!( e->button() == RightButton && rootClicked) ) | ||
236 | QListView::contentsMousePressEvent(e); | ||
237 | #else | ||
238 | QListView::contentsMousePressEvent(e); | ||
239 | #endif | ||
229 | } | 240 | } |
230 | void KOTodoListView::paintEvent(QPaintEvent* e) | 241 | void KOTodoListView::paintEvent(QPaintEvent* e) |
231 | { | 242 | { |
232 | emit paintNeeded(); | 243 | emit paintNeeded(); |
@@ -1062,20 +1073,28 @@ void KOTodoView::itemDoubleClicked(QListViewItem *item) | |||
1062 | if ( pendingSubtodo != 0 ) { | 1073 | if ( pendingSubtodo != 0 ) { |
1063 | topLevelWidget()->setCaption(i18n("Reparenting aborted!")); | 1074 | topLevelWidget()->setCaption(i18n("Reparenting aborted!")); |
1064 | } | 1075 | } |
1065 | pendingSubtodo = 0; | 1076 | pendingSubtodo = 0; |
1077 | int row = mTodoListView->header()->sectionAt ( mTodoListView->header()->mapFromGlobal( QCursor::pos()).x() ); | ||
1078 | //qDebug("ROW %d ", row); | ||
1066 | if (!item) { | 1079 | if (!item) { |
1067 | newTodo(); | 1080 | newTodo(); |
1068 | return; | 1081 | return; |
1082 | } else { | ||
1083 | if ( row == 1 ) { | ||
1084 | mActiveItem = (KOTodoViewItem *) item; | ||
1085 | newSubTodo(); | ||
1086 | return; | ||
1087 | } | ||
1069 | } | 1088 | } |
1070 | if ( KOPrefs::instance()->mEditOnDoubleClick ) | 1089 | if ( KOPrefs::instance()->mEditOnDoubleClick ) |
1071 | editItem( item ); | 1090 | editItem( item ); |
1072 | else | 1091 | else |
1073 | showItem( item , QPoint(), 0 ); | 1092 | showItem( item , QPoint(), 0 ); |
1074 | } | 1093 | } |
1075 | void KOTodoView::itemClicked(QListViewItem *item) | 1094 | void KOTodoView::itemClicked(QListViewItem *item) |
1076 | { | 1095 | { |
1077 | 1096 | //qDebug("KOTodoView::itemClicked %d", item); | |
1078 | if (!item) { | 1097 | if (!item) { |
1079 | if ( pendingSubtodo != 0 ) { | 1098 | if ( pendingSubtodo != 0 ) { |
1080 | topLevelWidget()->setCaption(i18n("Reparenting aborted!")); | 1099 | topLevelWidget()->setCaption(i18n("Reparenting aborted!")); |
1081 | } | 1100 | } |
diff --git a/microkde/kcolordialog.cpp b/microkde/kcolordialog.cpp index 9a76e5e..a3d8973 100644 --- a/microkde/kcolordialog.cpp +++ b/microkde/kcolordialog.cpp | |||
@@ -74,8 +74,9 @@ KColorDialog::KColorDialog( QWidget *p ):QDialog( p, "input-dialog", true ) | |||
74 | b->setValue(d.blue() ); | 74 | b->setValue(d.blue() ); |
75 | old_color->setPalette( QPalette( d.dark() , d ) ); | 75 | old_color->setPalette( QPalette( d.dark() , d ) ); |
76 | // kannst du wieder reinnehmen, aber es geht auch so. | 76 | // kannst du wieder reinnehmen, aber es geht auch so. |
77 | QPushButton * ok = new QPushButton (i18n(" OK "), this ); | 77 | QPushButton * ok = new QPushButton (i18n(" OK "), this ); |
78 | ok->setDefault( true ); | ||
78 | QPushButton * cancel = new QPushButton (i18n(" Cancel "), this ); | 79 | QPushButton * cancel = new QPushButton (i18n(" Cancel "), this ); |
79 | 80 | ||
80 | lay->addWidget(ok ,5,0 ); | 81 | lay->addWidget(ok ,5,0 ); |
81 | lay->addWidget(cancel ,5,1 ); | 82 | lay->addWidget(cancel ,5,1 ); |
diff --git a/microkde/kdeui/ktoolbar.cpp b/microkde/kdeui/ktoolbar.cpp index 35d4916..36ede81 100644 --- a/microkde/kdeui/ktoolbar.cpp +++ b/microkde/kdeui/ktoolbar.cpp | |||
@@ -1160,8 +1160,9 @@ QString KToolBar::settingsGroup() | |||
1160 | } | 1160 | } |
1161 | 1161 | ||
1162 | void KToolBar::saveSettings(KConfig *config, const QString &_configGroup) | 1162 | void KToolBar::saveSettings(KConfig *config, const QString &_configGroup) |
1163 | { | 1163 | { |
1164 | return; | ||
1164 | QString configGroup = _configGroup; | 1165 | QString configGroup = _configGroup; |
1165 | if (configGroup.isEmpty()) | 1166 | if (configGroup.isEmpty()) |
1166 | configGroup = settingsGroup(); | 1167 | configGroup = settingsGroup(); |
1167 | //kdDebug(220) << "KToolBar::saveSettings group=" << _configGroup << " -> " << configGroup << endl; | 1168 | //kdDebug(220) << "KToolBar::saveSettings group=" << _configGroup << " -> " << configGroup << endl; |
@@ -1603,8 +1604,9 @@ KToolBar::IconText KToolBar::iconTextSetting() | |||
1603 | } | 1604 | } |
1604 | 1605 | ||
1605 | void KToolBar::applyAppearanceSettings(KConfig *config, const QString &_configGroup, bool forceGlobal) | 1606 | void KToolBar::applyAppearanceSettings(KConfig *config, const QString &_configGroup, bool forceGlobal) |
1606 | { | 1607 | { |
1608 | return; | ||
1607 | QString configGroup = _configGroup.isEmpty() ? settingsGroup() : _configGroup; | 1609 | QString configGroup = _configGroup.isEmpty() ? settingsGroup() : _configGroup; |
1608 | //kdDebug(220) << "KToolBar::applyAppearanceSettings: configGroup=" << configGroup << endl; | 1610 | //kdDebug(220) << "KToolBar::applyAppearanceSettings: configGroup=" << configGroup << endl; |
1609 | // We have application-specific settings in the XML file, | 1611 | // We have application-specific settings in the XML file, |
1610 | // and nothing in the application's config file | 1612 | // and nothing in the application's config file |