summaryrefslogtreecommitdiffabout
path: root/korganizer
Side-by-side diff
Diffstat (limited to 'korganizer') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/calendarview.cpp7
-rw-r--r--korganizer/calendarview.h1
-rw-r--r--korganizer/koagenda.cpp5
-rw-r--r--korganizer/mainwindow.cpp12
-rw-r--r--korganizer/mainwindow.h5
5 files changed, 19 insertions, 11 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 5a2482e..17f1659 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -655,6 +655,13 @@ CalendarView::~CalendarView()
delete mEventViewerDialog;
//kdDebug() << "~CalendarView() done" << endl;
}
+
+void CalendarView::slotResetFocus()
+{
+ qDebug(" CalendarView::slotResetFocus() %x", qApp->focusWidget());
+
+}
+
void CalendarView::nextConflict( bool all, bool allday )
{
diff --git a/korganizer/calendarview.h b/korganizer/calendarview.h
index 799c297..456c2d7 100644
--- a/korganizer/calendarview.h
+++ b/korganizer/calendarview.h
@@ -201,6 +201,7 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser
public slots:
+ void slotResetFocus();
void nextConflict( bool all, bool allday );
void conflictAll();
void conflictAllday();
diff --git a/korganizer/koagenda.cpp b/korganizer/koagenda.cpp
index 779f12e..0dd5ef5 100644
--- a/korganizer/koagenda.cpp
+++ b/korganizer/koagenda.cpp
@@ -1635,7 +1635,10 @@ void KOAgenda::setStartHour(int startHour)
}
QTime KOAgenda::getEndTime()
{
- return QTime ( (contentsY ()+viewport()->height())*24/contentsHeight ()+1,0,0);
+ int tim = (contentsY ()+viewport()->height())*24/contentsHeight ();
+ if ( tim > 23 )
+ return QTime ( 23,59,59);
+ return QTime ( tim,0,0);
}
void KOAgenda::hideUnused()
{
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 4bedb61..21d5a35 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -21,7 +21,6 @@
#include <qtextstream.h>
#ifndef DESKTOP_VERSION
#include <qpe/global.h>
-#include <qpe/qpemenubar.h>
#include <qpe/qpetoolbar.h>
#include <qpe/resource.h>
#include <qpe/qpeapplication.h>
@@ -29,7 +28,6 @@
#include <qtopia/qcopenvelope_qws.h>
#include <unistd.h> // for sleep
#else
-#include <qmenubar.h>
#include <qtoolbar.h>
#include <qapplication.h>
//#include <resource.h>
@@ -225,7 +223,7 @@ MainWindow::MainWindow( QWidget *parent, const char *name ) :
tbd = Left;
}
filterToolBar = new QPEToolBar ( this );
- filterMenubar = new QMenuBar( 0 );
+ filterMenubar = new KMenuBar( 0 );
QFontMetrics fm ( filterMenubar->font() );
filterPopupMenu = new QPopupMenu( this );
@@ -682,9 +680,9 @@ void MainWindow::initActions()
pathString += "iconsmini/";
pixWid = 18; pixHei = 16;
}
+ KMenuBar *menuBar1;
if ( KOPrefs::instance()->mShowFullMenu ) {
- QMenuBar *menuBar1;
- menuBar1 = menuBar();
+ menuBar1 = new KMenuBar( this );//menuBar();
menuBar1->insertItem( i18n("File"), importMenu );
menuBar1->insertItem( i18n("View"), viewMenu );
menuBar1->insertItem( i18n("Edit"), mCurrentItemMenu );
@@ -700,8 +698,7 @@ void MainWindow::initActions()
menuBar1->insertItem( i18n("Filter"),selectFilterMenu );
menuBar1->insertItem( i18n("Help"), helpMenu );
} else {
- QPEMenuBar *menuBar1;
- menuBar1 = new QPEMenuBar( iconToolBar );
+ menuBar1 = new KMenuBar( iconToolBar );
QPopupMenu *menuBar = new QPopupMenu( this );
icon = loadPixmap( pathString + "z_menu" );
menuBar1->insertItem( icon.pixmap(), menuBar);
@@ -718,6 +715,7 @@ void MainWindow::initActions()
//menuBar1->setMaximumWidth( menuBar1->sizeHint().width() );
menuBar1->setMaximumSize( menuBar1->sizeHint( ));
}
+ connect ( menuBar1, SIGNAL( lostFocus () ), mView, SLOT ( slotResetFocus() ) );
connect ( selectFilterMenu, SIGNAL( activated ( int ) ), this, SLOT (selectFilter( int ) ) );
connect ( selectFilterMenu, SIGNAL( aboutToShow() ), this, SLOT (fillFilterMenu() ) );
diff --git a/korganizer/mainwindow.h b/korganizer/mainwindow.h
index d648f14..e2de3ba 100644
--- a/korganizer/mainwindow.h
+++ b/korganizer/mainwindow.h
@@ -11,6 +11,7 @@
#include <libkcal/incidence.h>
#include <ksyncmanager.h>
+#include <kpopupmenu.h>
#ifndef DESKTOP_VERSION
#include <qcopchannel_qws.h>
#endif
@@ -20,10 +21,8 @@ class KSyncProfile;
#ifdef DESKTOP_VERSION
#define QPEToolBar QToolBar
-#define QPEMenuBar QMenuBar
#endif
class QPEToolBar;
-class QPEMenuBar;
namespace KCal {
@@ -128,7 +127,7 @@ class MainWindow : public QMainWindow
QPEToolBar *viewToolBar;
QPEToolBar *navigatorToolBar;
QPEToolBar *filterToolBar;
- QMenuBar *filterMenubar;
+ KMenuBar *filterMenubar;
QPopupMenu * filterPopupMenu;
QPopupMenu * mCurrentItemMenu;
void initActions();