author | drw <drw> | 2005-05-17 22:48:25 (UTC) |
---|---|---|
committer | drw <drw> | 2005-05-17 22:48:25 (UTC) |
commit | 0892a9d473bfeacc921d586266e6889153654737 (patch) (unidiff) | |
tree | d3ea1c3b08ac642b999db357a3ccbff691ce8bce | |
parent | 58c3aa9b498e43665511fbe8f32995e0a4cb29d6 (diff) | |
download | opie-0892a9d473bfeacc921d586266e6889153654737.zip opie-0892a9d473bfeacc921d586266e6889153654737.tar.gz opie-0892a9d473bfeacc921d586266e6889153654737.tar.bz2 |
Resource -> OResource
-rw-r--r-- | noncore/apps/opie-reader/QTReaderApp.cpp | 8 | ||||
-rw-r--r-- | noncore/apps/opie-reader/opie-reader.control | 2 | ||||
-rw-r--r-- | noncore/apps/opie-reader/opie-reader.pro | 1 |
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 | |||
@@ -24,147 +24,147 @@ | |||
24 | #ifdef USEQPE | 24 | #ifdef USEQPE |
25 | #include <qpe/qpemenubar.h> | 25 | #include <qpe/qpemenubar.h> |
26 | #include <qpe/qpetoolbar.h> | 26 | #include <qpe/qpetoolbar.h> |
27 | #endif | 27 | #endif |
28 | #include <qmenubar.h> | 28 | #include <qmenubar.h> |
29 | #include <qtoolbar.h> | 29 | #include <qtoolbar.h> |
30 | #ifdef USEQPE | 30 | #ifdef USEQPE |
31 | #include <qpe/menubutton.h> | 31 | #include <qpe/menubutton.h> |
32 | #endif | 32 | #endif |
33 | #include <qcombobox.h> | 33 | #include <qcombobox.h> |
34 | #include <qpopupmenu.h> | 34 | #include <qpopupmenu.h> |
35 | #include <qaction.h> | 35 | #include <qaction.h> |
36 | #include <qapplication.h> | 36 | #include <qapplication.h> |
37 | #include <qlineedit.h> | 37 | #include <qlineedit.h> |
38 | #include <qtoolbutton.h> | 38 | #include <qtoolbutton.h> |
39 | #include <qspinbox.h> | 39 | #include <qspinbox.h> |
40 | #include <qobjectlist.h> | 40 | #include <qobjectlist.h> |
41 | #include <qstatusbar.h> | 41 | #include <qstatusbar.h> |
42 | #ifdef USEQPE | 42 | #ifdef USEQPE |
43 | #include <qpe/global.h> | 43 | #include <qpe/global.h> |
44 | #include <qpe/applnk.h> | 44 | #include <qpe/applnk.h> |
45 | #endif | 45 | #endif |
46 | #include <qfileinfo.h> | 46 | #include <qfileinfo.h> |
47 | #include <stdlib.h> //getenv | 47 | #include <stdlib.h> //getenv |
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> |
77 | using namespace Opie::Ui; | 77 | using 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 | ||
97 | bool CheckVersion(int&, int&, char&, QWidget*); | 97 | bool 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/" |
107 | QString picdir() | 107 | QString 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 | ||
116 | unsigned long QTReaderApp::m_uid = 0; | 116 | unsigned long QTReaderApp::m_uid = 0; |
117 | 117 | ||
118 | void QTReaderApp::setScrollState(bool _b) { m_scrollButton->setOn(_b); } | 118 | void 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 | ||
138 | void QTReaderApp::listBkmkFiles() | 138 | void 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" |
147 | qWarning( "Cannot find the \"~/" APPDIR "\" directory" ); | 147 | qWarning( "Cannot find the \"~/" APPDIR "\" directory" ); |
148 | d = QDir::home(); | 148 | d = QDir::home(); |
149 | d.mkdir(APPDIR); | 149 | d.mkdir(APPDIR); |
150 | d.cd(APPDIR); | 150 | d.cd(APPDIR); |
151 | } | 151 | } |
152 | 152 | ||
153 | 153 | ||
154 | 154 | ||
155 | 155 | ||
156 | d.setFilter( QDir::Files | QDir::NoSymLinks ); | 156 | d.setFilter( QDir::Files | QDir::NoSymLinks ); |
157 | // d.setSorting( QDir::Size | QDir::Reversed ); | 157 | // d.setSorting( QDir::Size | QDir::Reversed ); |
158 | 158 | ||
159 | const QFileInfoList *list = d.entryInfoList(); | 159 | const QFileInfoList *list = d.entryInfoList(); |
160 | QFileInfoListIterator it( *list ); // create list iterator | 160 | QFileInfoListIterator it( *list ); // create list iterator |
161 | QFileInfo *fi; // pointer for traversing | 161 | QFileInfo *fi; // pointer for traversing |
162 | while ( (fi=it.current()) ) { // for each file... | 162 | while ( (fi=it.current()) ) { // for each file... |
163 | 163 | ||
164 | bkmkselector->insertItem(fi->fileName(), cnt++); | 164 | bkmkselector->insertItem(fi->fileName(), cnt++); |
165 | 165 | ||
166 | //qDebug( "%10li %s", fi->size(), fi->fileName().data() ); | 166 | //qDebug( "%10li %s", fi->size(), fi->fileName().data() ); |
167 | ++it; // goto next list element | 167 | ++it; // goto next list element |
168 | } | 168 | } |
169 | 169 | ||
170 | #else /* USEQPE */ | 170 | #else /* USEQPE */ |
@@ -258,97 +258,97 @@ QTReaderApp::QTReaderApp( QWidget *parent, const char *name, WFlags f ) | |||
258 | int data; | 258 | int data; |
259 | fread(&key, sizeof(key), 1, f); | 259 | fread(&key, sizeof(key), 1, f); |
260 | fread(&data, sizeof(data), 1, f); | 260 | fread(&data, sizeof(data), 1, f); |
261 | kmap[key] = data; | 261 | kmap[key] = data; |
262 | } | 262 | } |
263 | } | 263 | } |
264 | fclose(f); | 264 | fclose(f); |
265 | } | 265 | } |
266 | } | 266 | } |
267 | 267 | ||
268 | m_url_clipboard = false; | 268 | m_url_clipboard = false; |
269 | m_url_localfile = false; | 269 | m_url_localfile = false; |
270 | m_url_globalfile = false; | 270 | m_url_globalfile = false; |
271 | ftime(&m_lastkeytime); | 271 | ftime(&m_lastkeytime); |
272 | //// qDebug("Application directory = %s", (const tchar *)QPEApplication::documentDir()); | 272 | //// qDebug("Application directory = %s", (const tchar *)QPEApplication::documentDir()); |
273 | //// qDebug("Application directory = %s", (const tchar *)Global::applicationFileName("uqtreader","bkmks.xml")); | 273 | //// qDebug("Application directory = %s", (const tchar *)Global::applicationFileName("uqtreader","bkmks.xml")); |
274 | 274 | ||
275 | m_bcloseDisabled = true; | 275 | m_bcloseDisabled = true; |
276 | m_disableesckey = false; | 276 | m_disableesckey = false; |
277 | pBkmklist = NULL; | 277 | pBkmklist = NULL; |
278 | pOpenlist = NULL; | 278 | pOpenlist = NULL; |
279 | // doc = 0; | 279 | // doc = 0; |
280 | 280 | ||
281 | m_fBkmksChanged = false; | 281 | m_fBkmksChanged = false; |
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); |
331 | m_qtscroll = config.readNumEntry("QTScrollBar", false); | 331 | m_qtscroll = config.readNumEntry("QTScrollBar", false); |
332 | m_localscroll = config.readNumEntry("LocalScrollBar", false); | 332 | m_localscroll = config.readNumEntry("LocalScrollBar", false); |
333 | 333 | ||
334 | // fileBar = new QToolBar("File", this); | 334 | // fileBar = new QToolBar("File", this); |
335 | // QToolBar* viewBar = new QToolBar("File", this); | 335 | // QToolBar* viewBar = new QToolBar("File", this); |
336 | // QToolBar* navBar = new QToolBar("File", this); | 336 | // QToolBar* navBar = new QToolBar("File", this); |
337 | // QToolBar* markBar = new QToolBar("File", this); | 337 | // QToolBar* markBar = new QToolBar("File", this); |
338 | 338 | ||
339 | #if defined(USEQPE) | 339 | #if defined(USEQPE) |
340 | menubar = new QToolBar("Menus", this, m_tbposition); | 340 | menubar = new QToolBar("Menus", this, m_tbposition); |
341 | mb = new QPEMenuBar( menubar ); | 341 | mb = new QPEMenuBar( menubar ); |
342 | #else | 342 | #else |
343 | mb = new QMenuBar( this ); | 343 | mb = new QMenuBar( this ); |
344 | #endif | 344 | #endif |
345 | 345 | ||
346 | #if defined(USEQPE) | 346 | #if defined(USEQPE) |
347 | QPopupMenu* tmp = new QPopupMenu(mb); | 347 | QPopupMenu* tmp = new QPopupMenu(mb); |
348 | mb->insertItem( geticon( "AppsIcon" ), tmp ); | 348 | mb->insertItem( geticon( "AppsIcon" ), tmp ); |
349 | #else | 349 | #else |
350 | QMenuBar* tmp = mb; | 350 | QMenuBar* tmp = mb; |
351 | #endif | 351 | #endif |
352 | 352 | ||
353 | QPopupMenu *file = new QPopupMenu( mb ); | 353 | QPopupMenu *file = new QPopupMenu( mb ); |
354 | tmp->insertItem( tr( "File" ), file ); | 354 | tmp->insertItem( tr( "File" ), file ); |
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 @@ | |||
1 | Package: opie-reader | 1 | Package: opie-reader |
2 | Files: bin/reader lib/libreader* plugins/reader/* apps/Applications/opie-reader.desktop pics/opie-reader/* | 2 | Files: bin/reader lib/libreader* plugins/reader/* apps/Applications/opie-reader.desktop pics/opie-reader/* |
3 | Priority: optional | 3 | Priority: optional |
4 | Section: opie/applications | 4 | Section: opie/applications |
5 | Maintainer: Tim Wentford <timwentford@hotmail.com> | 5 | Maintainer: Tim Wentford <timwentford@hotmail.com> |
6 | Architecture: arm | 6 | Architecture: arm |
7 | Depends: task-opie-minimal | 7 | Depends: task-opie-minimal, libopiecore2 |
8 | License: GPL | 8 | License: GPL |
9 | Description: E-Book reader | 9 | Description: E-Book reader |
10 | Version: $QPE_VERSION$EXTRAVERSION | 10 | Version: $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 @@ | |||
1 | TEMPLATE = subdirs | 1 | TEMPLATE = subdirs |
2 | SUBDIRS = pluckerbaselib \ | 2 | SUBDIRS = 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 |
17 | LIBS += -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 | ||
22 | include( $(OPIEDIR)/include.pro ) | 23 | include( $(OPIEDIR)/include.pro ) |
23 | 24 | ||
24 | 25 | ||