[kazehakase-svn] [3341] * macros/gecko.m4: checked nsIPrintSettings:: SetPapserSize availability.

Back to archive index

svnno****@sourc***** svnno****@sourc*****
Sat Jan 5 15:48:55 JST 2008


Revision: 3341
          http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=kazehakase&view=rev&rev=3341
Author:   kous
Date:     2008-01-05 15:48:54 +0900 (Sat, 05 Jan 2008)

Log Message:
-----------
* macros/gecko.m4: checked nsIPrintSettings::SetPapserSize availability.

Modified Paths:
--------------
    kazehakase/trunk/ChangeLog
    kazehakase/trunk/macros/gecko.m4
    kazehakase/trunk/module/embed/gecko/kz-mozprintingpromptservice.cpp

Modified: kazehakase/trunk/ChangeLog
===================================================================
--- kazehakase/trunk/ChangeLog	2008-01-05 06:41:26 UTC (rev 3340)
+++ kazehakase/trunk/ChangeLog	2008-01-05 06:48:54 UTC (rev 3341)
@@ -1,5 +1,7 @@
 2008-01-05  Kouhei Sutou  <kou****@cozmi*****>
 
+	* macros/gecko.m4: checked nsIPrintSettings::SetPapserSize availability.
+
 	* module/embed/gecko/kz-mozeventlistener.h: defined MOZILLA_CLIENT.
 
 	* module/embed/gecko/kz-mozselectionlistener.cpp: removed needless

Modified: kazehakase/trunk/macros/gecko.m4
===================================================================
--- kazehakase/trunk/macros/gecko.m4	2008-01-05 06:41:26 UTC (rev 3340)
+++ kazehakase/trunk/macros/gecko.m4	2008-01-05 06:48:54 UTC (rev 3341)
@@ -171,6 +171,21 @@
 
 AC_MSG_RESULT([$result])
 
+AC_MSG_CHECKING([whether nsIPrintSettings has SetPaperSize method])
+
+AC_COMPILE_IFELSE(
+	[AC_LANG_PROGRAM(
+		[[#include <nsIPrintSettings.h>]],
+		[[nsIPrintSettings *printSettings;
+		  printSettings->SetPaperSize;]]
+	)],
+	[AC_DEFINE([HAVE_NSIPRINTSETTINGS_SETPAPERSIZE],[1],
+                   [Define if nsIPrintSettings has SetPaperSize method])
+         result=yes],
+	[result=no])
+
+AC_MSG_RESULT([$result])
+
 AC_CHECK_FILE([$MOZILLA_INCLUDE_ROOT/content/nsICanvasRenderingContextInternal.h],
 	[AC_DEFINE([HAVE_NSICANVASRENDERINGCONTEXTINTERNAL_H],[1],[Define if nsICanvasRenderingContextInternal.h exists])])
 

Modified: kazehakase/trunk/module/embed/gecko/kz-mozprintingpromptservice.cpp
===================================================================
--- kazehakase/trunk/module/embed/gecko/kz-mozprintingpromptservice.cpp	2008-01-05 06:41:26 UTC (rev 3340)
+++ kazehakase/trunk/module/embed/gecko/kz-mozprintingpromptservice.cpp	2008-01-05 06:48:54 UTC (rev 3341)
@@ -128,8 +128,10 @@
 		break;
 	}
 
-	printSettings->SetPaperSize(nsIPrintSettings::kPaperSizeNativeData);
-	
+#if HAVE_NSIPRINTSETTINGS_SETPAPERSIZE
+        printSettings->SetPaperSize(nsIPrintSettings::kPaperSizeNativeData);
+#endif
+
 	nsEmbedString paper;
 	NS_CStringToUTF16(nsEmbedCString("A4"),
 			  NS_CSTRING_ENCODING_UTF8, paper);




More information about the Kazehakase-cvs mailing list
Back to archive index