c1e8dfff4c
KuickShow is an image browser/viewer with a nice filebrowser to select images to be shown, slideshow support and the ability to display the following image formats: jpg, gif, tiff, png, bmp, psd, xpm, xbm, pbm and eim.
38 lines
1.2 KiB
Plaintext
38 lines
1.2 KiB
Plaintext
--- src/imagewindow.cpp.orig Fri May 4 13:12:14 2001
|
|
+++ src/imagewindow.cpp Wed Jun 27 09:51:55 2001
|
|
@@ -42,6 +42,7 @@
|
|
#include <klocale.h>
|
|
#include <kstdaccel.h>
|
|
#include <kstddirs.h>
|
|
+#include <ktempfile.h>
|
|
#include <kwin.h>
|
|
#include <netwm.h>
|
|
|
|
@@ -779,13 +780,15 @@
|
|
info.xjustification = 512; // center
|
|
info.yjustification = 512; // center
|
|
|
|
+ KTempFile tmpFile;
|
|
+ tmpFile.setAutoDelete( true );
|
|
QString tmpName;
|
|
if ( ofile ) // user just wants to print to file
|
|
tmpName = p.outputFileName();
|
|
else
|
|
- tmpName = QString::fromLocal8Bit( tmpnam( NULL ));
|
|
+ tmpName = tmpFile.name();
|
|
|
|
- char *file = (char *) tmpName.data();
|
|
+ char *file = (char *) QFile::encodeName( tmpName ).data();
|
|
if ( Imlib_save_image( id, kuim->imlibImage(), file, &info ) == 0 )
|
|
{
|
|
debug(i18n("KuickShow: Couldn't print image.")); // FIXME, show messagebox
|
|
@@ -799,7 +802,7 @@
|
|
QString cmdline = printCmd + " -P\"" + printerName + "\" " + tmpName;
|
|
debug("KuickShow: print commandline: %s", cmdline.data() );
|
|
for ( int i=0; i < copies; i++ ) // FIXME: better use a switch in lpr...
|
|
- system( cmdline.data() );
|
|
+ system( QFile::encodeName( cmdline).data() );
|
|
}
|
|
|
|
|