-rw-r--r-- | kaddressbook/kabcore.cpp | 3 | ||||
-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 | 4 | ||||
-rw-r--r-- | korganizer/koagenda.cpp | 51 | ||||
-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 | 35 | ||||
-rw-r--r-- | microkde/kcolordialog.cpp | 1 | ||||
-rw-r--r-- | microkde/kdeui/ktoolbar.cpp | 2 |
13 files changed, 108 insertions, 28 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index 5ef61b1..e34951a 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp @@ -399,7 +399,7 @@ KABCore::KABCore( KXMLGUIClient *client, bool readWrite, QWidget *parent, const infrared = 0; #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())); } @@ -2173,6 +2173,7 @@ void KABCore::addActionsManually() } } #endif + mIncSearchWidget->setSize(); // mActionQuit->plug ( mMainWindow->toolBar()); diff --git a/kaddressbook/viewmanager.cpp b/kaddressbook/viewmanager.cpp index 86f0f3d..0614d06 100644 --- a/kaddressbook/viewmanager.cpp +++ b/kaddressbook/viewmanager.cpp @@ -704,7 +704,7 @@ void ViewManager::initActions() SLOT( refreshView()), mCore->actionCollection(), "view_refresh" ); action->plug(viewmenu); - viewmenu->insertSeparator(); + //viewmenu->insertSeparator(); #endif //KAB_EMBEDDED action = new KAction( i18n( "Edit &Filters..." ), "filter", 0, this, 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 @@ -32,6 +32,7 @@ ColorListBox::ColorListBox( QWidget *parent, const char *name, WFlags f ) :KListBox( parent, name, f ), mCurrentOnDragEnter(-1) { connect( this, SIGNAL(selected(int)), this, SLOT(newColor(int)) ); + connect( this, SIGNAL(clicked(QListBoxItem *)), this, SLOT(slotNewColor(QListBoxItem *)) ); setAcceptDrops( true); } @@ -74,7 +75,11 @@ QColor ColorListBox::color( uint index ) const return( black ); } } - +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 @@ -48,6 +48,7 @@ class ColorListBox : public KListBox private slots: void newColor( int index ); + void slotNewColor(QListBoxItem * i); private: int mCurrentOnDragEnter; 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 @@ -215,11 +215,15 @@ void CardViewLookNFeelPage::setHeaderFont() void CardViewLookNFeelPage::enableFonts() { vbFonts->setEnabled( cbEnableCustomFonts->isChecked() ); + if ( cbEnableCustomFonts->isChecked() ) + vbFonts->setFocus(); } void CardViewLookNFeelPage::enableColors() { lbColors->setEnabled( cbEnableCustomColors->isChecked() ); + if ( cbEnableCustomColors->isChecked() ) + lbColors->setFocus(); } void CardViewLookNFeelPage::initGUI() 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 @@ -210,11 +210,15 @@ void LookAndFeelPage::setHeaderFont() void LookAndFeelPage::enableFonts() { vbFonts->setEnabled( cbEnableCustomFonts->isChecked() ); + if ( cbEnableCustomFonts->isChecked() ) + vbFonts->setFocus(); } void LookAndFeelPage::enableColors() { lbColors->setEnabled( cbEnableCustomColors->isChecked() ); + if ( cbEnableCustomColors->isChecked() ) + lbColors->setFocus(); } void LookAndFeelPage::initGUI() diff --git a/korganizer/koagenda.cpp b/korganizer/koagenda.cpp index deadfc9..de964da 100644 --- a/korganizer/koagenda.cpp +++ b/korganizer/koagenda.cpp @@ -168,7 +168,7 @@ KOAgenda::KOAgenda(int columns,int rows,int rowSize,QWidget *parent, QScrollView(parent,name,f) { - + mAllAgendaPopup = 0; mColumns = columns; mRows = rows; mGridSpacingY = rowSize; @@ -187,6 +187,7 @@ KOAgenda::KOAgenda(int columns,int rows,int rowSize,QWidget *parent, KOAgenda::KOAgenda(int columns,QWidget *parent,const char *name,WFlags f) : QScrollView(parent,name,f) { + mAllAgendaPopup = 0; blockResize = false; mColumns = columns; mRows = 1; @@ -387,6 +388,8 @@ void KOAgenda::popupMenu() mLeftMouseDown = false; // no more leftMouse computation if (mPopupItem) { selectItem(mPopupItem); + if ( mAllAgendaPopup ) + mAllAgendaPopup->installEventFilter( this ); emit showIncidencePopupSignal(mPopupItem->incidence()); } @@ -395,7 +398,9 @@ void KOAgenda::popupMenu() endSelectAction( false ); // do not emit new event signal mLeftMouseDown = false; // no more leftMouse computation } + mNewItemPopup->installEventFilter( this ); mNewItemPopup->popup( mPopupPos); + } mLeftMouseDown = false; mPopupItem = 0; @@ -404,17 +409,51 @@ void KOAgenda::popupMenu() bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me) { + 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()) { viewportPos = ((QWidget *)object)->mapToParent(me->pos()); } else { 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: if (me->button() == LeftButton) { @@ -424,6 +463,7 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me) blockMoving = true; startX = viewportPos.x(); startY = viewportPos.y(); + mPopupPos = me->globalPos(); if (object != viewport()) { mPopupItem = (KOAgendaItem *)object; mPopupKind = 1; @@ -455,7 +495,6 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me) mPopupKind = 2; selectItem(0); mActionItem = 0; - mPopupPos = viewport()->mapToGlobal( me->pos() ); if (me->button() == RightButton) { int x,y; viewportToContents(viewportPos.x(),viewportPos.y(),x,y); diff --git a/korganizer/koagenda.h b/korganizer/koagenda.h index 35c08b6..4f1fdb9 100644 --- a/korganizer/koagenda.h +++ b/korganizer/koagenda.h @@ -31,6 +31,7 @@ #include <qguardedptr.h> #include "koagendaitem.h" +#include "koeventview.h" class QPopupMenu; class QTime; @@ -123,7 +124,7 @@ class KOAgenda : public QScrollView void printSelection(); void storePosition(); void restorePosition(); - + void setPopup( KOEventPopupMenu * p ) { mAllAgendaPopup = p; } public slots: void popupMenu(); @@ -168,6 +169,7 @@ class KOAgenda : public QScrollView void resizedSignal(); protected: + KOEventPopupMenu * mAllAgendaPopup; QPainter mPixPainter; QPixmap mPaintPixmap; QPixmap mHighlightPixmap; diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp index 8d32152..95388ef 100644 --- a/korganizer/koagendaview.cpp +++ b/korganizer/koagendaview.cpp @@ -505,9 +505,7 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) : QLabel *dummyAllDayRight = new QLabel (mAllDayFrame); // Create event context menu for all day agenda - mAllDayAgendaPopup = eventPopup(); - connect(mAllDayAgenda,SIGNAL(showIncidencePopupSignal(Incidence *)), - mAllDayAgendaPopup,SLOT(showIncidencePopup(Incidence *))); + //mAllDayAgendaPopup = eventPopup(); // Create agenda frame QGridLayout *agendaLayout = new QGridLayout(agendaFrame,4,3); @@ -544,16 +542,20 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) : agendaLayout->setColStretch(1,1); 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); 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); @@ -667,8 +669,8 @@ 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 @@ -271,8 +271,8 @@ class KOAgendaView : public KOEventView { bool mWeekStartsMonday; int mStartHour; - KOEventPopupMenu *mAgendaPopup; - KOEventPopupMenu *mAllDayAgendaPopup; + KOEventPopupMenu *mAllAgendaPopup; + //KOEventPopupMenu *mAllDayAgendaPopup; EventIndicator *mEventIndicatorTop; EventIndicator *mEventIndicatorBottom; diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp index ccc4b01..0a315cb 100644 --- a/korganizer/kotodoview.cpp +++ b/korganizer/kotodoview.cpp @@ -207,25 +207,36 @@ void KOTodoListView::contentsDropEvent(QDropEvent *e) void KOTodoListView::contentsMousePressEvent(QMouseEvent* e) { -#ifndef KORG_NODND + QPoint p(contentsToViewport(e->pos())); QListViewItem *i = itemAt(p); - mMousePressed = false; + bool rootClicked = true; 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)) + + 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() || - p.x() < header()->sectionPos(header()->mapToIndex(0))) { - if (e->button()==Qt::LeftButton) { - mPressPos = e->pos(); - mMousePressed = true; + X < header()->sectionPos(0)) { + rootClicked = false; } } +#ifndef KORG_NODND + mMousePressed = false; + if (! rootClicked ) { + mPressPos = e->pos(); + mMousePressed = true; } #endif + //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) { @@ -1063,9 +1074,17 @@ void KOTodoView::itemDoubleClicked(QListViewItem *item) topLevelWidget()->setCaption(i18n("Reparenting aborted!")); } 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 ) editItem( item ); @@ -1074,7 +1093,7 @@ void KOTodoView::itemDoubleClicked(QListViewItem *item) } void KOTodoView::itemClicked(QListViewItem *item) { - + //qDebug("KOTodoView::itemClicked %d", item); if (!item) { if ( pendingSubtodo != 0 ) { topLevelWidget()->setCaption(i18n("Reparenting aborted!")); diff --git a/microkde/kcolordialog.cpp b/microkde/kcolordialog.cpp index 9a76e5e..a3d8973 100644 --- a/microkde/kcolordialog.cpp +++ b/microkde/kcolordialog.cpp @@ -75,6 +75,7 @@ KColorDialog::KColorDialog( QWidget *p ):QDialog( p, "input-dialog", true ) old_color->setPalette( QPalette( d.dark() , d ) ); // 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 ); lay->addWidget(ok ,5,0 ); 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 @@ -1161,6 +1161,7 @@ QString KToolBar::settingsGroup() void KToolBar::saveSettings(KConfig *config, const QString &_configGroup) { + return; QString configGroup = _configGroup; if (configGroup.isEmpty()) configGroup = settingsGroup(); @@ -1604,6 +1605,7 @@ 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; // We have application-specific settings in the XML file, |