-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 @@ -400,5 +400,5 @@ KABCore::KABCore( KXMLGUIClient *client, bool readWrite, QWidget *parent, const #endif //toggleBeamReceive( ); - //mMainWindow->toolBar()->show(); + mMainWindow->toolBar()->show(); // we have a toolbar repainting error on the Zaurus when starting KA/Pi QTimer::singleShot( 10, this , SLOT ( updateToolBar())); @@ -2174,4 +2174,5 @@ void KABCore::addActionsManually() } #endif + mIncSearchWidget->setSize(); // mActionQuit->plug ( mMainWindow->toolBar()); @@ -2296,5 +2297,5 @@ void KABCore::addActionsManually() } //mActionQuit->plug ( tb ); - // tb->insertWidget(-1, 0, mIncSearchWidget, 6); + //tb->insertWidget(-1, 0, mIncSearchWidget, 6); //US link the searchwidget first to this. diff --git a/kaddressbook/viewmanager.cpp b/kaddressbook/viewmanager.cpp index 86f0f3d..0614d06 100644 --- a/kaddressbook/viewmanager.cpp +++ b/kaddressbook/viewmanager.cpp @@ -705,5 +705,5 @@ void ViewManager::initActions() "view_refresh" ); action->plug(viewmenu); - viewmenu->insertSeparator(); + //viewmenu->insertSeparator(); #endif //KAB_EMBEDDED 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 @@ -33,4 +33,5 @@ ColorListBox::ColorListBox( QWidget *parent, const char *name, WFlags f ) { connect( this, SIGNAL(selected(int)), this, SLOT(newColor(int)) ); + connect( this, SIGNAL(clicked(QListBoxItem *)), this, SLOT(slotNewColor(QListBoxItem *)) ); setAcceptDrops( true); } @@ -75,5 +76,9 @@ QColor ColorListBox::color( uint index ) const } } - +void ColorListBox::slotNewColor(QListBoxItem * i) +{ + if ( i ) + newColor( index( i ) ); +} void ColorListBox::newColor( int index ) 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 @@ -49,4 +49,5 @@ class ColorListBox : public KListBox private slots: void newColor( int index ); + void slotNewColor(QListBoxItem * i); private: 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 @@ -216,4 +216,6 @@ void CardViewLookNFeelPage::enableFonts() { vbFonts->setEnabled( cbEnableCustomFonts->isChecked() ); + if ( cbEnableCustomFonts->isChecked() ) + vbFonts->setFocus(); } @@ -221,4 +223,6 @@ void CardViewLookNFeelPage::enableColors() { lbColors->setEnabled( cbEnableCustomColors->isChecked() ); + if ( cbEnableCustomColors->isChecked() ) + lbColors->setFocus(); } 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 @@ -211,9 +211,13 @@ void LookAndFeelPage::enableFonts() { vbFonts->setEnabled( cbEnableCustomFonts->isChecked() ); + if ( cbEnableCustomFonts->isChecked() ) + vbFonts->setFocus(); } void LookAndFeelPage::enableColors() { - lbColors->setEnabled( cbEnableCustomColors->isChecked() ); + lbColors->setEnabled( cbEnableCustomColors->isChecked() ); + if ( cbEnableCustomColors->isChecked() ) + lbColors->setFocus(); } diff --git a/korganizer/koagenda.cpp b/korganizer/koagenda.cpp index deadfc9..de964da 100644 --- a/korganizer/koagenda.cpp +++ b/korganizer/koagenda.cpp @@ -169,5 +169,5 @@ KOAgenda::KOAgenda(int columns,int rows,int rowSize,QWidget *parent, { - + mAllAgendaPopup = 0; mColumns = columns; mRows = rows; @@ -188,4 +188,5 @@ KOAgenda::KOAgenda(int columns,QWidget *parent,const char *name,WFlags f) : QScrollView(parent,name,f) { + mAllAgendaPopup = 0; blockResize = false; mColumns = columns; @@ -233,5 +234,5 @@ void KOAgenda::init() } else pathString += "iconsmini/"; - + mNewItemPopup->insertItem ( SmallIcon( pathString +"newevent" ), i18n("New Event..."), 1 ); mNewItemPopup->insertItem ( SmallIcon( pathString +"newtodo" ), i18n("New Todo..."),2 ); @@ -388,4 +389,6 @@ void KOAgenda::popupMenu() if (mPopupItem) { selectItem(mPopupItem); + if ( mAllAgendaPopup ) + mAllAgendaPopup->installEventFilter( this ); emit showIncidencePopupSignal(mPopupItem->incidence()); @@ -396,5 +399,7 @@ void KOAgenda::popupMenu() mLeftMouseDown = false; // no more leftMouse computation } + mNewItemPopup->installEventFilter( this ); mNewItemPopup->popup( mPopupPos); + } mLeftMouseDown = false; @@ -405,5 +410,42 @@ void KOAgenda::popupMenu() bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me) { - //qDebug("KOAgenda::eventFilter_mous "); + static int startX = 0; + static int startY = 0; + static int blockmoveDist = ( QApplication::desktop()->width() < 480 ? 15 : 20 ); + static bool blockMoving = true; + + //qDebug("KOAgenda::eventFilter_mous "); + if ( object == mNewItemPopup ) { + //qDebug("mNewItemPopup "); + if ( me->type() == QEvent::MouseButtonRelease ) { + mNewItemPopup->removeEventFilter( this ); + int dX = me->globalPos().x() - mPopupPos.x();; + if ( dX < 0 ) + dX = -dX; + int dY = me->globalPos().y() - mPopupPos.y(); + if ( dY < 0 ) + dY = -dY; + if ( dX > blockmoveDist || dY > blockmoveDist ) { + mNewItemPopup->hide(); + } + } + return true; + } + if ( object == mAllAgendaPopup ) { + //qDebug(" mAllAgendaPopup "); + if ( me->type() == QEvent::MouseButtonRelease ) { + mAllAgendaPopup->removeEventFilter( this ); + int dX = me->globalPos().x() - mPopupPos.x();; + if ( dX < 0 ) + dX = -dX; + int dY = me->globalPos().y() - mPopupPos.y(); + if ( dY < 0 ) + dY = -dY; + if ( dX > blockmoveDist || dY > blockmoveDist ) { + mAllAgendaPopup->hide(); + } + } + return true; + } QPoint viewportPos; if (object != viewport()) { @@ -412,8 +454,5 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me) viewportPos = me->pos(); } - static int startX = 0; - static int startY = 0; - static int blockmoveDist = ( QApplication::desktop()->width() < 480 ? 15 : 20 ); - static bool blockMoving = true; + switch (me->type()) { case QEvent::MouseButtonPress: @@ -424,5 +463,6 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me) blockMoving = true; startX = viewportPos.x(); - startY = viewportPos.y(); + startY = viewportPos.y(); + mPopupPos = me->globalPos(); if (object != viewport()) { mPopupItem = (KOAgendaItem *)object; @@ -456,5 +496,4 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me) selectItem(0); mActionItem = 0; - mPopupPos = viewport()->mapToGlobal( me->pos() ); if (me->button() == RightButton) { int x,y; diff --git a/korganizer/koagenda.h b/korganizer/koagenda.h index 35c08b6..4f1fdb9 100644 --- a/korganizer/koagenda.h +++ b/korganizer/koagenda.h @@ -32,4 +32,5 @@ #include "koagendaitem.h" +#include "koeventview.h" class QPopupMenu; @@ -124,5 +125,5 @@ class KOAgenda : public QScrollView void storePosition(); void restorePosition(); - + void setPopup( KOEventPopupMenu * p ) { mAllAgendaPopup = p; } public slots: @@ -169,4 +170,5 @@ class KOAgenda : public QScrollView protected: + KOEventPopupMenu * mAllAgendaPopup; QPainter mPixPainter; QPixmap mPaintPixmap; diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp index 8d32152..95388ef 100644 --- a/korganizer/koagendaview.cpp +++ b/korganizer/koagendaview.cpp @@ -506,7 +506,5 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) : // Create event context menu for all day agenda - mAllDayAgendaPopup = eventPopup(); - connect(mAllDayAgenda,SIGNAL(showIncidencePopupSignal(Incidence *)), - mAllDayAgendaPopup,SLOT(showIncidencePopup(Incidence *))); + //mAllDayAgendaPopup = eventPopup(); // Create agenda frame @@ -545,7 +543,7 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) : mAgenda->setFocusPolicy(NoFocus); // Create event context menu for agenda - mAgendaPopup = eventPopup(); + mAllAgendaPopup = eventPopup(); - mAgendaPopup->addAdditionalItem(QIconSet(SmallIcon("bell")), + mAllAgendaPopup->addAdditionalItem(QIconSet(SmallIcon("bell")), i18n("Toggle Alarm"),mAgenda, SLOT(popupAlarm()),true); @@ -553,6 +551,10 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) : connect(mAgenda,SIGNAL(showIncidencePopupSignal(Incidence *)), - mAgendaPopup,SLOT(showIncidencePopup(Incidence *))); + mAllAgendaPopup,SLOT(showIncidencePopup(Incidence *))); + connect(mAllDayAgenda,SIGNAL(showIncidencePopupSignal(Incidence *)), + mAllAgendaPopup,SLOT(showIncidencePopup(Incidence *))); + mAgenda->setPopup( mAllAgendaPopup ); + mAllDayAgenda->setPopup( mAllAgendaPopup ); // make connections between dependent widgets mTimeLabels->setAgenda(mAgenda); @@ -668,6 +670,6 @@ void KOAgendaView::addToCalSlot(Incidence * inc, Incidence * incOld ) KOAgendaView::~KOAgendaView() { - delete mAgendaPopup; - delete mAllDayAgendaPopup; + delete mAllAgendaPopup; + //delete mAllDayAgendaPopup; delete KOAgendaItem::paintPix(); delete KOAgendaItem::paintPixSel(); diff --git a/korganizer/koagendaview.h b/korganizer/koagendaview.h index 30c9b05..c6e6602 100644 --- a/korganizer/koagendaview.h +++ b/korganizer/koagendaview.h @@ -272,6 +272,6 @@ class KOAgendaView : public KOEventView { int mStartHour; - KOEventPopupMenu *mAgendaPopup; - KOEventPopupMenu *mAllDayAgendaPopup; + KOEventPopupMenu *mAllAgendaPopup; + //KOEventPopupMenu *mAllDayAgendaPopup; EventIndicator *mEventIndicatorTop; diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp index ccc4b01..0a315cb 100644 --- a/korganizer/kotodoview.cpp +++ b/korganizer/kotodoview.cpp @@ -208,23 +208,34 @@ void KOTodoListView::contentsDropEvent(QDropEvent *e) void KOTodoListView::contentsMousePressEvent(QMouseEvent* e) { + + QPoint p(contentsToViewport(e->pos())); + QListViewItem *i = itemAt(p); + bool rootClicked = true; + if (i) { + // if the user clicked into the root decoration of the item, don't + // try to start a drag! + int X = p.x(); + //qDebug("%d %d %d", X, header()->sectionPos(0), treeStepSize() ); + if (X > header()->sectionPos(0) + + treeStepSize() * (i->depth() + (rootIsDecorated() ? 1 : 0)) + + itemMargin() || + X < header()->sectionPos(0)) { + rootClicked = false; + } + } #ifndef KORG_NODND - QPoint p(contentsToViewport(e->pos())); - QListViewItem *i = itemAt(p); - mMousePressed = false; - if (i) { - // if the user clicked into the root decoration of the item, don't - // try to start a drag! - if (p.x() > header()->sectionPos(header()->mapToIndex(0)) + - treeStepSize() * (i->depth() + (rootIsDecorated() ? 1 : 0)) + - itemMargin() || - p.x() < header()->sectionPos(header()->mapToIndex(0))) { - if (e->button()==Qt::LeftButton) { + mMousePressed = false; + if (! rootClicked ) { mPressPos = e->pos(); mMousePressed = true; - } } - } #endif - QListView::contentsMousePressEvent(e); + //qDebug("KOTodoListView::contentsMousePressEvent %d", rootClicked); +#ifndef DESKTOP_VERSION + if (!( e->button() == RightButton && rootClicked) ) + QListView::contentsMousePressEvent(e); +#else + QListView::contentsMousePressEvent(e); +#endif } void KOTodoListView::paintEvent(QPaintEvent* e) @@ -1064,7 +1075,15 @@ void KOTodoView::itemDoubleClicked(QListViewItem *item) } pendingSubtodo = 0; + int row = mTodoListView->header()->sectionAt ( mTodoListView->header()->mapFromGlobal( QCursor::pos()).x() ); + //qDebug("ROW %d ", row); if (!item) { newTodo(); return; + } else { + if ( row == 1 ) { + mActiveItem = (KOTodoViewItem *) item; + newSubTodo(); + return; + } } if ( KOPrefs::instance()->mEditOnDoubleClick ) @@ -1075,5 +1094,5 @@ void KOTodoView::itemDoubleClicked(QListViewItem *item) void KOTodoView::itemClicked(QListViewItem *item) { - + //qDebug("KOTodoView::itemClicked %d", item); if (!item) { if ( pendingSubtodo != 0 ) { diff --git a/microkde/kcolordialog.cpp b/microkde/kcolordialog.cpp index 9a76e5e..a3d8973 100644 --- a/microkde/kcolordialog.cpp +++ b/microkde/kcolordialog.cpp @@ -76,4 +76,5 @@ KColorDialog::KColorDialog( QWidget *p ):QDialog( p, "input-dialog", true ) // kannst du wieder reinnehmen, aber es geht auch so. QPushButton * ok = new QPushButton (i18n(" OK "), this ); + ok->setDefault( true ); QPushButton * cancel = new QPushButton (i18n(" Cancel "), this ); 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 @@ -1162,4 +1162,5 @@ QString KToolBar::settingsGroup() void KToolBar::saveSettings(KConfig *config, const QString &_configGroup) { + return; QString configGroup = _configGroup; if (configGroup.isEmpty()) @@ -1605,4 +1606,5 @@ KToolBar::IconText KToolBar::iconTextSetting() void KToolBar::applyAppearanceSettings(KConfig *config, const QString &_configGroup, bool forceGlobal) { + return; QString configGroup = _configGroup.isEmpty() ? settingsGroup() : _configGroup; //kdDebug(220) << "KToolBar::applyAppearanceSettings: configGroup=" << configGroup << endl; |