summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--kaddressbook/kabcore.cpp3
-rw-r--r--kaddressbook/viewmanager.cpp2
-rw-r--r--kaddressbook/views/colorlistbox.cpp7
-rw-r--r--kaddressbook/views/colorlistbox.h1
-rw-r--r--kaddressbook/views/configurecardviewdialog.cpp4
-rw-r--r--kaddressbook/views/configuretableviewdialog.cpp4
-rw-r--r--korganizer/koagenda.cpp51
-rw-r--r--korganizer/koagenda.h4
-rw-r--r--korganizer/koagendaview.cpp18
-rw-r--r--korganizer/koagendaview.h4
-rw-r--r--korganizer/kotodoview.cpp35
-rw-r--r--microkde/kcolordialog.cpp1
-rw-r--r--microkde/kdeui/ktoolbar.cpp2
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
@@ -398,9 +398,9 @@ KABCore::KABCore( KXMLGUIClient *client, bool readWrite, QWidget *parent, const
#ifndef DESKTOP_VERSION
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()));
}
@@ -2172,8 +2172,9 @@ void KABCore::addActionsManually()
// mViewManager->getFilterAction()->plug ( tb);
}
}
#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
@@ -703,9 +703,9 @@ void ViewManager::initActions()
action = new KAction( i18n( "Refresh View" ), "reload", 0, this,
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,
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 @@
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);
}
@@ -73,9 +74,13 @@ QColor ColorListBox::color( uint index ) const
{
return( black );
}
}
-
+void ColorListBox::slotNewColor(QListBoxItem * i)
+{
+ if ( i )
+ newColor( index( i ) );
+}
void ColorListBox::newColor( int index )
{
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
void dropEvent( QDropEvent *e );
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
@@ -214,13 +214,17 @@ 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
@@ -209,13 +209,17 @@ 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
@@ -167,9 +167,9 @@ KOAgenda::KOAgenda(int columns,int rows,int rowSize,QWidget *parent,
const char *name,WFlags f) :
QScrollView(parent,name,f)
{
-
+ mAllAgendaPopup = 0;
mColumns = columns;
mRows = rows;
mGridSpacingY = rowSize;
mAllDayMode = false;
@@ -186,8 +186,9 @@ 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;
//qDebug("aaaaaaaaaaaaaaaaaaldays %d ", KOPrefs::instance()->mAllDaySize);
@@ -386,36 +387,74 @@ void KOAgenda::popupMenu()
}
mLeftMouseDown = false; // no more leftMouse computation
if (mPopupItem) {
selectItem(mPopupItem);
+ if ( mAllAgendaPopup )
+ mAllAgendaPopup->installEventFilter( this );
emit showIncidencePopupSignal(mPopupItem->incidence());
}
} else if ( mPopupKind == 2 ) {
if ( mLeftMouseDown ) { // we have a simulated right click - clear left mouse action
endSelectAction( false ); // do not emit new event signal
mLeftMouseDown = false; // no more leftMouse computation
}
+ mNewItemPopup->installEventFilter( this );
mNewItemPopup->popup( mPopupPos);
+
}
mLeftMouseDown = false;
mPopupItem = 0;
mPopupKind = 0;
}
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) {
mPopupTimer->start( 600 );
@@ -423,8 +462,9 @@ 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;
if (me->button() == RightButton) {
@@ -454,9 +494,8 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me)
mPopupItem = 0;
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);
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 @@
#include <qpixmap.h>
#include <qguardedptr.h>
#include "koagendaitem.h"
+#include "koeventview.h"
class QPopupMenu;
class QTime;
class KConfig;
@@ -122,9 +123,9 @@ class KOAgenda : public QScrollView
void finishUpdate();
void printSelection();
void storePosition();
void restorePosition();
-
+ void setPopup( KOEventPopupMenu * p ) { mAllAgendaPopup = p; }
public slots:
void popupMenu();
void newItem( int );
@@ -167,8 +168,9 @@ class KOAgenda : public QScrollView
void addToCalSignal(Incidence *, Incidence *);
void resizedSignal();
protected:
+ KOEventPopupMenu * mAllAgendaPopup;
QPainter mPixPainter;
QPixmap mPaintPixmap;
QPixmap mHighlightPixmap;
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) :
mAllDayAgenda->setFocusPolicy(NoFocus);
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);
// QHBox *agendaFrame = new QHBox(splitterAgenda);
@@ -543,18 +541,22 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) :
agendaLayout->addMultiCellWidget(mAgenda,2,2,1,2);
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);
// Update widgets to reflect user preferences
@@ -666,10 +668,10 @@ void KOAgendaView::addToCalSlot(Incidence * inc, Incidence * incOld )
}
KOAgendaView::~KOAgendaView()
{
- delete mAgendaPopup;
- delete mAllDayAgendaPopup;
+ delete mAllAgendaPopup;
+ //delete mAllDayAgendaPopup;
delete KOAgendaItem::paintPix();
delete KOAgendaItem::paintPixSel();
}
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 {
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
@@ -206,27 +206,38 @@ 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)
{
emit paintNeeded();
@@ -1062,20 +1073,28 @@ void KOTodoView::itemDoubleClicked(QListViewItem *item)
if ( pendingSubtodo != 0 ) {
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 );
else
showItem( item , QPoint(), 0 );
}
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
@@ -74,8 +74,9 @@ KColorDialog::KColorDialog( QWidget *p ):QDialog( p, "input-dialog", true )
b->setValue(d.blue() );
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 );
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()
}
void KToolBar::saveSettings(KConfig *config, const QString &_configGroup)
{
+ return;
QString configGroup = _configGroup;
if (configGroup.isEmpty())
configGroup = settingsGroup();
//kdDebug(220) << "KToolBar::saveSettings group=" << _configGroup << " -> " << configGroup << endl;
@@ -1603,8 +1604,9 @@ 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,
// and nothing in the application's config file