summaryrefslogtreecommitdiff
path: root/graphics/kphotools/patches/patch-aa
blob: 6d234f12fcf6ab0069bac24ff0ae43062d83d0b8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
$NetBSD: patch-aa,v 1.2 2005/03/16 20:03:57 rillig Exp $

c++-2.95.3 does not know vector::at().

--- src/GalleryThrd.cpp.orig	Sat Jun 12 17:14:01 2004
+++ src/GalleryThrd.cpp	Wed Mar 16 20:11:05 2005
@@ -19,7 +19,7 @@
  ***************************************************************************/
 #include <qdir.h> 
 #include "GalleryThrd.h"
-
+#include <pkgsrc_fixes.h>
  
 void GalleryThrd::run()
 {
@@ -105,14 +105,14 @@ void GalleryThrd::begin()
 	for(uint i = 0; i<files;i++)
 	{
 		//try loading image
-		image = imlib_load_image_without_cache(m_pvecFileList->at(i)->fileName);
+		image = imlib_load_image_without_cache(at_replacement(*m_pvecFileList, i)->fileName);
 		//if files was loaded:
 		if (image)
 		{   
 			//set the context to this image
 			imlib_context_set_image(image);
 			//rotate it as needed
-			imlib_image_orientate(m_pvecFileList->at(i)->rotation);
+			imlib_image_orientate(at_replacement(*m_pvecFileList, i)->rotation);
 			//load sizes of the current image
 			orig_height = imlib_image_get_height();
 			orig_width = imlib_image_get_width();
@@ -305,7 +305,7 @@ void GalleryThrd::doCreateWebsite(uint f
 		if(strFiles[i][0] == 'f')//if is file copy it
 		{
 			strFiles[i].remove(0,1);
-			system("cp /usr/share/kphotools/styles/"+m_strStyle+"/"+strFiles[i]+"  "+m_strLocation+"/"+strFiles[i]);
+			system("cp @kphotoolsdir@/styles/"+m_strStyle+"/"+strFiles[i]+"  "+m_strLocation+"/"+strFiles[i]);
 		}else if(strFiles[i][0] == 'd')//if is dir create it
 		{
 			strFiles[i].remove(0,1);
@@ -319,7 +319,7 @@ void GalleryThrd::doCreateWebsite(uint f
 QStringList GalleryThrd::readConfig()
 {
 	//load configuration for style
-	QFile* pFile = new QFile("/usr/share/kphotools/styles/"+m_strStyle+"/config");
+	QFile* pFile = new QFile("@kphotoolsdir@/styles/"+m_strStyle+"/config");
 	pFile->open(IO_ReadOnly);
 	QStringList strList;
 	QString strLine = "";