[kazehakase-svn] [3090] * module/embed/gecko/kz-mozthumbnailcreator.cpp

Back to archive index

svnno****@sourc***** svnno****@sourc*****
Wed Mar 28 19:45:12 JST 2007


Revision: 3090
          http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=kazehakase&view=rev&rev=3090
Author:   kous
Date:     2007-03-28 19:45:12 +0900 (Wed, 28 Mar 2007)

Log Message:
-----------
* module/embed/gecko/kz-mozthumbnailcreator.cpp
(kz_moz_thumbnail_creator_create_thumbnail): lazy progress creation.

Modified Paths:
--------------
    kazehakase/trunk/ChangeLog
    kazehakase/trunk/module/embed/gecko/kz-mozthumbnailcreator.cpp

Modified: kazehakase/trunk/ChangeLog
===================================================================
--- kazehakase/trunk/ChangeLog	2007-03-28 08:16:44 UTC (rev 3089)
+++ kazehakase/trunk/ChangeLog	2007-03-28 10:45:12 UTC (rev 3090)
@@ -1,5 +1,8 @@
 2007-03-28  Kouhei Sutou  <kou****@cozmi*****>
 
+	* module/embed/gecko/kz-mozthumbnailcreator.cpp
+	(kz_moz_thumbnail_creator_create_thumbnail): lazy progress creation.
+
 	* module/search/Makefile.am:
 	- removed EST_VERSION.
 	- added $(AM_CPPFLAGS) to *_la_CPPFLAGS.

Modified: kazehakase/trunk/module/embed/gecko/kz-mozthumbnailcreator.cpp
===================================================================
--- kazehakase/trunk/module/embed/gecko/kz-mozthumbnailcreator.cpp	2007-03-28 08:16:44 UTC (rev 3089)
+++ kazehakase/trunk/module/embed/gecko/kz-mozthumbnailcreator.cpp	2007-03-28 10:45:12 UTC (rev 3090)
@@ -341,23 +341,25 @@
 	options->SetNumCopies(1);
 	options->SetPrintSilent(PR_TRUE);
 
-	GTimeVal now;
-	g_get_current_time(&now);
-	KzMozThumbnailProgressListener *aProgress =
-		new KzMozThumbnailProgressListener(ps_name, uri,
-						   (time_t)now.tv_sec,
-						   EGG_PIXBUF_THUMB_LARGE,
-						   creator);
-	g_free(ps_name);
-
 	PRBool printing = PR_TRUE;
 //	print->ExitPrintPreview();
 	/* it is dangerous. */
 	while (printing)
 	{
-		print->GetDoingPrintPreview(&printing);
+		if (print->GetDoingPrintPreview(&printing) != NS_OK)
+			break;
+
 		if (!printing)
 		{
+			GTimeVal now;
+			g_get_current_time(&now);
+			KzMozThumbnailProgressListener *aProgress =
+				new KzMozThumbnailProgressListener(ps_name,
+								   uri,
+								   (time_t)now.tv_sec,
+								   EGG_PIXBUF_THUMB_LARGE,
+								   creator);
+
 			print->Print(options, aProgress);
 			break;
 		}
@@ -365,6 +367,8 @@
 		while (gtk_events_pending())
 			gtk_main_iteration();
 	}
+
+	g_free(ps_name);
 }
 
 void




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