Index: D:/msys/home/yns/lyx/trunk/src/frontends/qt4/ChangeLog
===================================================================
--- D:/msys/home/yns/lyx/trunk/src/frontends/qt4/ChangeLog      (revision 13369)
+++ D:/msys/home/yns/lyx/trunk/src/frontends/qt4/ChangeLog      (working copy)
@@ -1,8 +1,23 @@
-2006-03-01  Jürgen Spitzmüller  <[EMAIL PROTECTED]>
+2006-03-14  Abdelrazak Younes  <[EMAIL PROTECTED]>
+
+       * QWorkArea.[Ch]: Wheel one-liner mouse fix
+       * QWorkArea.C: Reverted to Q_WS_X11 and Q_WS_MACX instead of Q_OS_*
+       * QWorkArea.h: Added comments
+
+2006-03-12  Lars Gullik Bjønnes  <[EMAIL PROTECTED]>
+
+       * ui/pch.h: new file
+
+2006-03-11  Abdelrazak Younes  <[EMAIL PROTECTED]>
+
+       * Various Compilation fixes for MacOSX. There is still a problem
+         with Dialog.C:275 which does not recognize 
+
+2006-03-10  Jürgen Spitzmüller  <[EMAIL PROTECTED]>
 
        * QLMenubar.h: compile fix for gcc-4.1.
 
-2006-03-01  Abdelrazak Younes  <[EMAIL PROTECTED]>
+2006-03-10  Abdelrazak Younes  <[EMAIL PROTECTED]>
 
        * QWorkArea.[Ch] cleanup:
        - Added private members workWidth_ and workHeight_ in order to
@@ -14,10 +29,6 @@
          separate place at the end of QWorkArea.C.
        - initial support for Wheel mouse (still does not work).
 
-2006-03-12  Lars Gullik Bjønnes  <[EMAIL PROTECTED]>
-
-       * ui/pch.h: new file
-
 2006-03-10  Georg Baum  <[EMAIL PROTECTED]>
 
        * QWorkArea.C (getClipboard): convert MAC to UNIX line endings on OSX
Index: D:/msys/home/yns/lyx/trunk/src/frontends/qt4/QLMenubar.C
===================================================================
--- D:/msys/home/yns/lyx/trunk/src/frontends/qt4/QLMenubar.C    (revision 13369)
+++ D:/msys/home/yns/lyx/trunk/src/frontends/qt4/QLMenubar.C    (working copy)
@@ -149,7 +149,7 @@
 */
 QMenuBar * QLMenubar::menuBar() const
 {
-#ifdef Q_OS_MACX
+#ifdef Q_WS_MACX
        return mac_menubar_.get();
 #else
        return owner_->menuBar();
@@ -158,7 +158,7 @@
 
 void QLMenubar::macxMenuBarInit()
 {
-#ifdef Q_OS_MACX
+#ifdef Q_WS_MACX
        mac_menubar_.reset(new QMenuBar);
 
        // this is the name of the menu that contains our special entries
Index: D:/msys/home/yns/lyx/trunk/src/frontends/qt4/QLPopupMenu.C
===================================================================
--- D:/msys/home/yns/lyx/trunk/src/frontends/qt4/QLPopupMenu.C  (revision 13369)
+++ D:/msys/home/yns/lyx/trunk/src/frontends/qt4/QLPopupMenu.C  (working copy)
@@ -28,7 +28,7 @@
 #include "debug.h"
 
 
-#ifdef Q_OS_MACX
+#ifdef Q_WS_MACX
 #include "kbmap.h"
 #include "QLyXKeySym.h"
 extern boost::scoped_ptr<kb_keymap> toplevel_keymap;
@@ -147,7 +147,7 @@
 /// \todo Mac specific binding handling.
 void QLPopupMenu::addBinding(string & label, MenuItem const & mi)
 {
-#ifndef Q_OS_MACX
+#ifndef Q_WS_MACX
 
                string const binding(mi.binding());
                if (!binding.empty()) {
@@ -177,7 +177,7 @@
 /// \todo Fix Mac specific menu hack
 void QLPopupMenu::specialMacXmenuHack()
 {
-#ifdef Q_OS_MACX
+#ifdef Q_WS_MACX
        /* The qt/mac menu code has a very silly hack that
           moves some menu entries that it recognizes by name
           (e.g. "Preferences...") to the "LyX" menu. This
Index: D:/msys/home/yns/lyx/trunk/src/frontends/qt4/QWorkArea.C
===================================================================
--- D:/msys/home/yns/lyx/trunk/src/frontends/qt4/QWorkArea.C    (revision 13369)
+++ D:/msys/home/yns/lyx/trunk/src/frontends/qt4/QWorkArea.C    (working copy)
@@ -43,7 +43,7 @@
 #include <X11/Xlib.h>
 #endif
 
-#ifdef Q_OS_MACX
+#ifdef Q_WS_MACX
 #include <Carbon/Carbon.h>
 #include <support/lstrings.h>
 using lyx::support::subst;
@@ -185,7 +185,7 @@
        setInputMethodEnabled(true);
 #endif
 
-#ifdef Q_OS_X11
+#ifdef Q_WS_X11
        // doubleClickInterval() is 400 ms on X11 witch is just too long.
        // On Windows and Mac OS X, the operating system's value is used.
        // On Microsoft Windows, calling this function sets the double
@@ -193,7 +193,7 @@
        QApplication::setDoubleClickInterval(300);
 #endif
 
-#ifdef Q_OS_MACX
+#ifdef Q_WS_MACX
        wa_ptr = this;
 #endif
 }
@@ -249,7 +249,7 @@
        lyxerr[Debug::ACTION] << "getClipboard: " << (const char*) str << endl;
        if (str.isNull())
                return string();
-#ifdef Q_OS_MACX
+#ifdef Q_WS_MACX
        // The MAC clipboard uses \r for lineendings, and we use \n
        return subst(fromqstr(str), '\r', '\n');
 #else
@@ -260,7 +260,7 @@
 
 void QWorkArea::putClipboard(string const & str) const
 {
-#ifdef Q_OS_MACX
+#ifdef Q_WS_MACX
        // The MAC clipboard uses \r for lineendings, and we use \n
        QApplication::clipboard()->setText(toqstr(subst(str, '\n', '\r')),
                                           QClipboard::Selection);
@@ -390,6 +390,7 @@
 void QWorkArea::wheelEvent(QWheelEvent * e)
 {
        verticalScrollBar()->setValue(verticalScrollBar()->value() - 
e->delta());
+       adjustViewWithScrollBar();
 }
 
 void QWorkArea::generateSyntheticMouseEvent()
@@ -573,7 +574,7 @@
 ////////////////////////////////////////////////////////////////////////
 // Mac OSX specific stuff goes here...
 
-#ifdef Q_OS_MACX
+#ifdef Q_WS_MACX
 namespace{
 OSErr checkAppleEventForMissingParams(const AppleEvent& theAppleEvent)
  {
@@ -637,4 +638,4 @@
        AEDisposeDesc(&documentList);
        return err;
 }
-#endif  // Q_OS_MACX
+#endif  // Q_WS_MACX
Index: D:/msys/home/yns/lyx/trunk/src/frontends/qt4/QWorkArea.h
===================================================================
--- D:/msys/home/yns/lyx/trunk/src/frontends/qt4/QWorkArea.h    (revision 13369)
+++ D:/msys/home/yns/lyx/trunk/src/frontends/qt4/QWorkArea.h    (working copy)
@@ -168,35 +168,46 @@
 #endif
 
 public slots:
+
+       /// Timeout event Slot for keyboard bufferring.
+       /// \todo This is not used currently in the code, remove?
+       void keyeventTimeout();
+
+       /// Adjust the LyX buffer view with the position of the scrollbar.
+       /**
+       * The action argument is not used in the the code, it is there
+       * only for the connection to the vertical srollbar signal which 
+       * emits an 'int' action.
+       */
+       void adjustViewWithScrollBar(int action = 0);
 
-       void keyeventTimeout();
-       void adjustViewWithScrollBar(int action);
-
 private:
 
-       /// 
+       /// Buffer view width.
        int workWidth_;
-       ///
+
+       /// Buffer view height.
        int workHeight_;
 
-       /// our painter
+       /// Our painter.
        QLPainter painter_;
 
        /// The slot connected to SyntheticMouseEvent::timeout.
        void generateSyntheticMouseEvent();
 
+       ///
        SyntheticMouseEvent synthetic_mouse_event_;
 
        /// the double buffered pixmap
        boost::scoped_ptr<QPixmap> pixmap_;
 
+       /// \todo remove
        QTimer step_timer_;
+
+       /// \todo remove
        std::queue<boost::shared_ptr<QKeyEvent> > keyeventQueue_;
 
        double_click dc_event_;
-
-       bool scrolled_with_mouse_;
-       bool scrolled_with_keyboard_;
 };
 
 #endif // QWORKAREA_H

Reply via email to