[dasher] Win32: Fix windows build. Win32: Clean up Uxtheme compilation.



commit 483fcde2f43bdfabf0ac3e513d99fc23ad92a03d
Author: Patrick Welche <prlw1 cam ac uk>
Date:   Sat Mar 13 15:41:09 2010 +0000

    Win32: Fix windows build.
    Win32: Clean up Uxtheme compilation.

 ChangeLog                             |    5 +++++
 Makefile.am                           |    2 +-
 README                                |    8 ++++----
 Src/DasherCore/DasherCore_vc80.vcproj |    8 ++++++++
 Src/Installer/Dasher.wxs              |    4 ++--
 Src/Win32/Widgets/Canvas.cpp          |   14 ++++++++------
 Src/Win32/Widgets/Canvas.h            |   14 +++++++++-----
 7 files changed, 37 insertions(+), 18 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 0e80fc6..50e2222 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-03-13  Patrick Welche <prlw1 cam ac uk>
+
+	* Win32: Fix windows build.
+	* Win32: Clean up Uxtheme compilation.
+
 2010-03-11  Patrick Welche <prlw1 cam ac uk>
 
 	* Prepare for 4.11
diff --git a/Makefile.am b/Makefile.am
index 6d617e0..84ceda7 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -67,5 +67,5 @@ maemo-install: all
 	cp Data/training/training_english_GB.txt Data/alphabets/alphabet.english.xml Data/colours/colour.xml tmp_build/usr/share/dasher
 	ln -sf /usr/share/applications/hildon/dasher.desktop tmp_build/etc/others-menu/extra_applications/0301_dasher.desktop
 	- find tmp_build -name .git -exec rm -rf \{\} \;
-	dpkg-deb -b tmp_build dasher_4.10.1.0inferencemaemo1_armel.deb 
+	dpkg-deb -b tmp_build dasher_4.11.0.0inferencemaemo1_armel.deb
 	rm -rf tmp_build
diff --git a/README b/README
index 3e76586..be23684 100644
--- a/README
+++ b/README
@@ -1,5 +1,5 @@
-Dasher Version 4.10.1
----------------------
+Dasher Version 4.11
+-------------------
 Dasher is a zooming predictive text entry system, designed for situations
 where keyboard input is impractical (for instance, accessibility or PDAs). It
 is usable with highly limited amounts of physical input while still allowing
@@ -18,7 +18,7 @@ General:
  * The Expat XML parser (required)
 
 Linux (see INSTALL.Linux for build time requirements):
- * GTK+ (2.2 or greated) (required)
+ * GTK+ (2.6 or greated) (required)
  * GNOME (optional, but highly recommended)
  * GNOME Speech (optional)
  * Libcanna (optional, for Hiragana to Kanji conversion)
@@ -42,7 +42,7 @@ including compiler flags which are not understood by the compiler. You
 may need to shadow this file in another directory with these flags
 removed.
 
-Currently GNU make (gmake) must be used.
+GNU make (gmake) must be used if building gnome documentation.
 
 * Darwin / OS-X: The native UI in the macos directory is badly out of
 date and will almost definitely require considerable effort to
diff --git a/Src/DasherCore/DasherCore_vc80.vcproj b/Src/DasherCore/DasherCore_vc80.vcproj
index 1d65cfa..3a33147 100644
--- a/Src/DasherCore/DasherCore_vc80.vcproj
+++ b/Src/DasherCore/DasherCore_vc80.vcproj
@@ -2003,6 +2003,14 @@
 			>
 		</File>
 		<File
+			RelativePath=".\ExpansionPolicy.cpp"
+			>
+		</File>
+		<File
+			RelativePath=".\ExpansionPolicy.h"
+			>
+		</File>
+		<File
 			RelativePath=".\EyetrackerFilter.cpp"
 			>
 		</File>
diff --git a/Src/Installer/Dasher.wxs b/Src/Installer/Dasher.wxs
index 3479b6d..44d1a14 100644
--- a/Src/Installer/Dasher.wxs
+++ b/Src/Installer/Dasher.wxs
@@ -226,7 +226,7 @@
       </Directory>
 
      <Directory Id="ProgramMenuFolder" Name="Programs">
-       <Directory Id="ProgramMenuDir" Name="Dasher 4.10">
+       <Directory Id="ProgramMenuDir" Name="Dasher 4.11">
          <Component  Id="Random" Guid="D28C2189-5E40-4f93-B42E-0CD76D8B5B37" KeyPath="no">
            <Registry Id='DummyReg' Root='HKCU' Key='Software\Inference Group\Dasher3' Name='Dummy'
               Action='write' Type='string' Value='Dummy Key' KeyPath='yes'/>
@@ -390,7 +390,7 @@
 
 
 
-    <Feature Id='Complete' Title='Dasher 4.10.1' Description='The full Dasher installation.' Display='expand' Level='1' ConfigurableDirectory='INSTALLDIR'>
+    <Feature Id='Complete' Title='Dasher 4.11' Description='The full Dasher installation.' Display='expand' Level='1' ConfigurableDirectory='INSTALLDIR'>
       <Feature Id="Core" Title="Core" Description="Core programs and data files." Level="1">
        
         <ComponentRef Id='MainExecutable' />
diff --git a/Src/Win32/Widgets/Canvas.cpp b/Src/Win32/Widgets/Canvas.cpp
index 4747e78..951530a 100644
--- a/Src/Win32/Widgets/Canvas.cpp
+++ b/Src/Win32/Widgets/Canvas.cpp
@@ -47,7 +47,7 @@ CCanvas::CCanvas(CDasher *DI, Dasher::CEventHandler *pEventHandler, CSettingsSto
   m_dwTicksLastEvent = 0;
   m_bButtonDown = false;
   m_pScreen = 0;
-#ifndef _WIN32_WCE
+#ifndef HAVE_NO_THEME
   m_hTheme = NULL;
 #endif
 
@@ -117,9 +117,11 @@ LRESULT CCanvas::OnCreate(UINT message, WPARAM wParam, LPARAM lParam, BOOL& bHan
   bHandled = TRUE;
 
   
-#ifndef _WIN32_WCE
+#ifndef HAVE_NO_THEME
   m_hTheme = OpenThemeData(m_hWnd, L"Edit");
+#endif
 
+#ifndef _WIN32_WCE
   // If we're a tablet, initialize the event-generator
   if(IsTabletPC()) {
     HRESULT h = m_CursorInRange.Initialize(m_hWnd);
@@ -159,7 +161,7 @@ LRESULT CCanvas::OnDestroy(UINT message, WPARAM wParam, LPARAM lParam, BOOL& bHa
 /////////////////////////////////////////////////////////////////////////////
 
 CCanvas::~CCanvas() {
-#ifndef _WIN32_WCE
+#ifndef HAVE_NO_THEME
   if(m_hTheme)
     CloseThemeData(m_hTheme);
 #endif
@@ -201,7 +203,7 @@ LRESULT CCanvas::OnPaint(UINT message, WPARAM wParam, LPARAM lParam, BOOL& bHand
 
   RECT rcContent;
 
-#ifndef _WIN32_WCE
+#ifndef HAVE_NO_THEME
   if(m_hTheme) {
     DTBGOPTS oOpts;
     oOpts.dwSize = sizeof(DTBGOPTS);
@@ -224,7 +226,7 @@ LRESULT CCanvas::OnPaint(UINT message, WPARAM wParam, LPARAM lParam, BOOL& bHand
     //rcContent.left = rc.left + 1;
     //rcContent.right = rc.right - 1;
     rcContent = rc;
-#ifndef _WIN32_WCE
+#ifndef HAVE_NO_THEME
   }
 #endif
 
@@ -481,7 +483,7 @@ LRESULT CCanvas::OnSize(UINT message, WPARAM wParam, LPARAM lParam, BOOL& bHandl
 	return 0;
 }
 
-#ifndef _WIN32_WCE
+#ifndef HAVE_NO_THEME
 LRESULT CCanvas::OnThemeChanged(UINT message, WPARAM wParam, LPARAM lParam, BOOL& bHandled) {
   if(m_hTheme)
     CloseThemeData(m_hTheme);
diff --git a/Src/Win32/Widgets/Canvas.h b/Src/Win32/Widgets/Canvas.h
index b6ce879..1bdd7da 100644
--- a/Src/Win32/Widgets/Canvas.h
+++ b/Src/Win32/Widgets/Canvas.h
@@ -23,11 +23,15 @@
 
 // XXX why lie? #define _WIN32_WINNT 0x0501
 
+// aiming for _WIN32_WINNT < 0x501 => HAVE_NO_THEME
+#ifdef _WIN32_WCE
+#define HAVE_NO_THEME
+#endif
 
 #include <windows.h>
 #include <winuser.h>
-#ifndef _WIN32_WCE
-#include <Uxtheme.h>
+#ifndef HAVE_NO_THEME
+#include <uxtheme.h>
 #define WM_THEMECHANGED                 0x031A
 #endif
 
@@ -88,7 +92,7 @@ class CCanvas : public ATL::CWindowImpl<CCanvas>, public Dasher::CDasherComponen
     MESSAGE_HANDLER(WM_RBUTTONUP, OnRButtonUp)
     MESSAGE_HANDLER(WM_MOUSEMOVE, OnMouseMove)
     MESSAGE_HANDLER(WM_SIZE, OnSize)
-#ifndef _WIN32_WCE
+#ifndef HAVE_NO_THEME
     MESSAGE_HANDLER(WM_THEMECHANGED , OnThemeChanged)
 #endif
   END_MSG_MAP()
@@ -101,7 +105,7 @@ class CCanvas : public ATL::CWindowImpl<CCanvas>, public Dasher::CDasherComponen
   void DoFrame();
   
   LRESULT OnSize(UINT message, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
-#ifndef _WIN32_WCE
+#ifndef HAVE_NO_THEME
   LRESULT OnThemeChanged(UINT message, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
 #endif
   LRESULT OnMouseMove(UINT message, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
@@ -191,7 +195,7 @@ private:
   CScreen *m_pScreen;
   Dasher::CDasher * m_pDasherInterface;
 
-#ifndef _WIN32_WCE
+#ifndef HAVE_NO_THEME
   HTHEME m_hTheme;
 #endif
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]