summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-reader/QTReaderApp.cpp8
-rw-r--r--noncore/apps/opie-reader/opie-reader.control2
-rw-r--r--noncore/apps/opie-reader/opie-reader.pro1
3 files changed, 6 insertions, 5 deletions
diff --git a/noncore/apps/opie-reader/QTReaderApp.cpp b/noncore/apps/opie-reader/QTReaderApp.cpp
index 8ef0674..b985094 100644
--- a/noncore/apps/opie-reader/QTReaderApp.cpp
+++ b/noncore/apps/opie-reader/QTReaderApp.cpp
@@ -48,99 +48,99 @@
48#include <qprogressbar.h> 48#include <qprogressbar.h>
49#ifdef USEQPE 49#ifdef USEQPE
50#include <qpe/config.h> 50#include <qpe/config.h>
51#endif 51#endif
52#include <qbuttongroup.h> 52#include <qbuttongroup.h>
53#include <qradiobutton.h> 53#include <qradiobutton.h>
54#ifdef USEQPE 54#ifdef USEQPE
55#include <qpe/qcopenvelope_qws.h> 55#include <qpe/qcopenvelope_qws.h>
56#endif 56#endif
57#include "QTReader.h" 57#include "QTReader.h"
58#include "GraphicWin.h" 58#include "GraphicWin.h"
59#include "Bkmks.h" 59#include "Bkmks.h"
60#include "cbkmkselector.h" 60#include "cbkmkselector.h"
61#include "infowin.h" 61#include "infowin.h"
62#include "ToolbarPrefs.h" 62#include "ToolbarPrefs.h"
63#include "Prefs.h" 63#include "Prefs.h"
64#include "CAnnoEdit.h" 64#include "CAnnoEdit.h"
65#include "QFloatBar.h" 65#include "QFloatBar.h"
66#include "FixedFont.h" 66#include "FixedFont.h"
67#include "URLDialog.h" 67#include "URLDialog.h"
68#include "util.h" 68#include "util.h"
69#include <qfontdatabase.h> 69#include <qfontdatabase.h>
70 70
71#ifdef USEQPE 71#ifdef USEQPE
72#include <qpe/resource.h> 72#include <opie2/oresource.h>
73#ifdef OPIE 73#ifdef OPIE
74#if defined(OPIEFILEDIALOG) 74#if defined(OPIEFILEDIALOG)
75#include <qpe/applnk.h> 75#include <qpe/applnk.h>
76#include <opie2/ofiledialog.h> 76#include <opie2/ofiledialog.h>
77using namespace Opie::Ui; 77using namespace Opie::Ui;
78#else 78#else
79#include "fileBrowser.h" 79#include "fileBrowser.h"
80#endif 80#endif
81#else 81#else
82#include "fileBrowser.h" 82#include "fileBrowser.h"
83#endif 83#endif
84#else 84#else
85#include "qfiledialog.h" 85#include "qfiledialog.h"
86#endif 86#endif
87 87
88#include "QTReaderApp.h" 88#include "QTReaderApp.h"
89#include "CDrawBuffer.h" 89#include "CDrawBuffer.h"
90#include "Filedata.h" 90#include "Filedata.h"
91#include "names.h" 91#include "names.h"
92#include "CEncoding_tables.h" 92#include "CEncoding_tables.h"
93#include "CloseDialog.h" 93#include "CloseDialog.h"
94 94
95#include "ButtonPrefs.h" 95#include "ButtonPrefs.h"
96 96
97bool CheckVersion(int&, int&, char&, QWidget*); 97bool CheckVersion(int&, int&, char&, QWidget*);
98 98
99#ifdef _WINDOWS 99#ifdef _WINDOWS
100#define PICDIR "c:\\uqtreader\\pics\\" 100#define PICDIR "c:\\uqtreader\\pics\\"
101#else 101#else
102#ifdef USEQPE 102#ifdef USEQPE
103#define USEMSGS 103#define USEMSGS
104#define PICDIR "opie-reader/" 104#define PICDIR "opie-reader/"
105#else 105#else
106//#define PICDIR "/home/tim/uqtreader/pics/" 106//#define PICDIR "/home/tim/uqtreader/pics/"
107QString picdir() 107QString picdir()
108{ 108{
109 QString hd(getenv("READERDIR")); 109 QString hd(getenv("READERDIR"));
110 return hd + "/pics"; 110 return hd + "/pics";
111} 111}
112#define PICDIR picdir() 112#define PICDIR picdir()
113#endif 113#endif
114#endif 114#endif
115 115
116unsigned long QTReaderApp::m_uid = 0; 116unsigned long QTReaderApp::m_uid = 0;
117 117
118void QTReaderApp::setScrollState(bool _b) { m_scrollButton->setOn(_b); } 118void QTReaderApp::setScrollState(bool _b) { m_scrollButton->setOn(_b); }
119 119
120#ifdef USEQPE 120#ifdef USEQPE
121#define geticon(iconname) Resource::loadPixmap( iconname ) 121#define geticon(iconname) Opie::Core::OResource::loadPixmap( iconname, Opie::Core::OResource::SmallIcon )
122#define getmyicon(iconname) Resource::loadPixmap( PICDIR iconname ) 122#define getmyicon(iconname) Opie::Core::OResource::loadPixmap( PICDIR iconname, Opie::Core::OResource::SmallIcon )
123#else 123#else
124//#define geticon(iconname) QPixmap(PICDIR iconname ".png") 124//#define geticon(iconname) QPixmap(PICDIR iconname ".png")
125#define geticon(iconname) QPixmap(PICDIR +"/"+iconname+".png") 125#define geticon(iconname) QPixmap(PICDIR +"/"+iconname+".png")
126#define getmyicon(iconname) geticon(iconname) 126#define getmyicon(iconname) geticon(iconname)
127//#define geticon(iconname) QIconSet( QPixmap(PICDIR iconname) ) 127//#define geticon(iconname) QIconSet( QPixmap(PICDIR iconname) )
128#endif 128#endif
129 129
130#ifndef _WINDOWS 130#ifndef _WINDOWS
131#include <unistd.h> 131#include <unistd.h>
132#endif 132#endif
133#include <stddef.h> 133#include <stddef.h>
134#ifndef _WINDOWS 134#ifndef _WINDOWS
135#include <dirent.h> 135#include <dirent.h>
136#endif 136#endif
137 137
138void QTReaderApp::listBkmkFiles() 138void QTReaderApp::listBkmkFiles()
139{ 139{
140 bkmkselector->clear(); 140 bkmkselector->clear();
141 bkmkselector->setText("Cancel"); 141 bkmkselector->setText("Cancel");
142#ifndef USEQPE 142#ifndef USEQPE
143 int cnt = 0; 143 int cnt = 0;
144 144
145 QDir d = QDir::home(); // "/" 145 QDir d = QDir::home(); // "/"
146 if ( !d.cd(APPDIR) ) { // "/tmp" 146 if ( !d.cd(APPDIR) ) { // "/tmp"
@@ -282,49 +282,49 @@ QTReaderApp::QTReaderApp( QWidget *parent, const char *name, WFlags f )
282 282
283 QString lang = getenv( "LANG" ); 283 QString lang = getenv( "LANG" );
284 QString rot = getenv( "QWS_DISPLAY" ); 284 QString rot = getenv( "QWS_DISPLAY" );
285 285
286/* 286/*
287 int m_rot = 0; 287 int m_rot = 0;
288 if (rot.contains("Rot90")) 288 if (rot.contains("Rot90"))
289 { 289 {
290 m_rot = 90; 290 m_rot = 90;
291 } 291 }
292 else if (rot.contains("Rot180")) 292 else if (rot.contains("Rot180"))
293 { 293 {
294 m_rot = 180; 294 m_rot = 180;
295 } 295 }
296 else if (rot.contains("Rot270")) 296 else if (rot.contains("Rot270"))
297 { 297 {
298 m_rot = 270; 298 m_rot = 270;
299 } 299 }
300 300
301// qDebug("Initial Rotation(%d):%s", m_rot, (const char*)rot); 301// qDebug("Initial Rotation(%d):%s", m_rot, (const char*)rot);
302*/ 302*/
303 m_autogenstr = "^ *[A-Z].*[a-z] *$"; 303 m_autogenstr = "^ *[A-Z].*[a-z] *$";
304 304
305#ifdef USEQPE 305#ifdef USEQPE
306 setIcon( Resource::loadPixmap( PICDIR "uqtreader") ); 306 setIcon( Opie::Core::OResource::loadPixmap( PICDIR "uqtreader", Opie::Core::OResource::SmallIcon ) );
307#else 307#else
308 setIcon( QPixmap (PICDIR + "/uqtreader.png") ); 308 setIcon( QPixmap (PICDIR + "/uqtreader.png") );
309#endif /* USEQPE */ 309#endif /* USEQPE */
310 310
311// QPEToolBar *bar = new QPEToolBar( this ); 311// QPEToolBar *bar = new QPEToolBar( this );
312// menubar = new QPEToolBar( this ); 312// menubar = new QPEToolBar( this );
313#ifdef USEQPE 313#ifdef USEQPE
314 Config config( APPDIR ); 314 Config config( APPDIR );
315#else 315#else
316 QDir d = QDir::home(); // "/" 316 QDir d = QDir::home(); // "/"
317 if ( !d.cd(APPDIR) ) { // "/tmp" 317 if ( !d.cd(APPDIR) ) { // "/tmp"
318 qWarning( "Cannot find the \"~/" APPDIR "\" directory" ); 318 qWarning( "Cannot find the \"~/" APPDIR "\" directory" );
319 d = QDir::home(); 319 d = QDir::home();
320 d.mkdir(APPDIR); 320 d.mkdir(APPDIR);
321 d.cd(APPDIR); 321 d.cd(APPDIR);
322 } 322 }
323 QFileInfo fi(d, INIFILE); 323 QFileInfo fi(d, INIFILE);
324// qDebug("Path:%s", (const char*)fi.absFilePath()); 324// qDebug("Path:%s", (const char*)fi.absFilePath());
325 Config config(fi.absFilePath()); 325 Config config(fi.absFilePath());
326#endif 326#endif
327 config.setGroup("Toolbar"); 327 config.setGroup("Toolbar");
328 m_tbmovesave = m_tbmove = config.readBoolEntry("Movable", false); 328 m_tbmovesave = m_tbmove = config.readBoolEntry("Movable", false);
329 m_tbpolsave = m_tbpol = (ToolbarPolicy)config.readNumEntry("Policy", 1); 329 m_tbpolsave = m_tbpol = (ToolbarPolicy)config.readNumEntry("Policy", 1);
330 m_tbposition = (ToolBarDock)config.readNumEntry("Position", 2); 330 m_tbposition = (ToolBarDock)config.readNumEntry("Position", 2);
diff --git a/noncore/apps/opie-reader/opie-reader.control b/noncore/apps/opie-reader/opie-reader.control
index 60976b2..d53f70d 100644
--- a/noncore/apps/opie-reader/opie-reader.control
+++ b/noncore/apps/opie-reader/opie-reader.control
@@ -1,10 +1,10 @@
1Package: opie-reader 1Package: opie-reader
2Files: bin/reader lib/libreader* plugins/reader/* apps/Applications/opie-reader.desktop pics/opie-reader/* 2Files: bin/reader lib/libreader* plugins/reader/* apps/Applications/opie-reader.desktop pics/opie-reader/*
3Priority: optional 3Priority: optional
4Section: opie/applications 4Section: opie/applications
5Maintainer: Tim Wentford <timwentford@hotmail.com> 5Maintainer: Tim Wentford <timwentford@hotmail.com>
6Architecture: arm 6Architecture: arm
7Depends: task-opie-minimal 7Depends: task-opie-minimal, libopiecore2
8License: GPL 8License: GPL
9Description: E-Book reader 9Description: E-Book reader
10Version: $QPE_VERSION$EXTRAVERSION 10Version: $QPE_VERSION$EXTRAVERSION
diff --git a/noncore/apps/opie-reader/opie-reader.pro b/noncore/apps/opie-reader/opie-reader.pro
index 47980e1..da39154 100644
--- a/noncore/apps/opie-reader/opie-reader.pro
+++ b/noncore/apps/opie-reader/opie-reader.pro
@@ -1,24 +1,25 @@
1TEMPLATE = subdirs 1TEMPLATE = subdirs
2SUBDIRS = pluckerbaselib \ 2SUBDIRS = pluckerbaselib \
3 codeclib \ 3 codeclib \
4 pdblib \ 4 pdblib \
5 PluckerCodec \ 5 PluckerCodec \
6 AportisCodec \ 6 AportisCodec \
7 CHM \ 7 CHM \
8 HTMLFilter \ 8 HTMLFilter \
9 WeaselCodec \ 9 WeaselCodec \
10 iSiloCodec \ 10 iSiloCodec \
11 ppmsCodec \ 11 ppmsCodec \
12 FliteCmd \ 12 FliteCmd \
13 pluckerdecompress \ 13 pluckerdecompress \
14 ArriereCodec \ 14 ArriereCodec \
15 RebCodec \ 15 RebCodec \
16 reader 16 reader
17LIBS += -lopiecore2
17 18
18# these are added only built if enabled in "make menuconfig" 19# these are added only built if enabled in "make menuconfig"
19# FliteDyn 20# FliteDyn
20# FliteDyn16 21# FliteDyn16
21 22
22include( $(OPIEDIR)/include.pro ) 23include( $(OPIEDIR)/include.pro )
23 24
24 25