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
@@ -1,1074 +1,1074 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. Allrights reserved. 2** Copyright (C) 2000 Trolltech AS. Allrights reserved.
3** 3**
4** This file is part of Qt Palmtop Environment. 4** This file is part of Qt Palmtop Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20 20
21#include <qregexp.h> 21#include <qregexp.h>
22#include <qclipboard.h> 22#include <qclipboard.h>
23#include <qwidgetstack.h> 23#include <qwidgetstack.h>
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>
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"
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 */
171 int cnt = 0; 171 int cnt = 0;
172 DIR *d; 172 DIR *d;
173 d = opendir((const char *)Global::applicationFileName(APPDIR,"")); 173 d = opendir((const char *)Global::applicationFileName(APPDIR,""));
174 174
175 while(1) 175 while(1)
176 { 176 {
177 struct dirent* de; 177 struct dirent* de;
178 struct stat buf; 178 struct stat buf;
179 de = readdir(d); 179 de = readdir(d);
180 if (de == NULL) break; 180 if (de == NULL) break;
181 181
182 if (lstat((const char *)Global::applicationFileName(APPDIR,de->d_name),&buf) == 0 && S_ISREG(buf.st_mode)) 182 if (lstat((const char *)Global::applicationFileName(APPDIR,de->d_name),&buf) == 0 && S_ISREG(buf.st_mode))
183 { 183 {
184 bkmkselector->insertItem(de->d_name, cnt++); 184 bkmkselector->insertItem(de->d_name, cnt++);
185 } 185 }
186 } 186 }
187 187
188 closedir(d); 188 closedir(d);
189#endif 189#endif
190 if (cnt > 0) 190 if (cnt > 0)
191 { 191 {
192//tjw menu->hide(); 192//tjw menu->hide();
193 193
194 194
195 editorStack->raiseWidget( bkmkselector ); 195 editorStack->raiseWidget( bkmkselector );
196 hidetoolbars(); 196 hidetoolbars();
197 m_nBkmkAction = cRmBkmkFile; 197 m_nBkmkAction = cRmBkmkFile;
198 } 198 }
199 else 199 else
200 QMessageBox::information(this, PROGNAME, "No bookmark files"); 200 QMessageBox::information(this, PROGNAME, "No bookmark files");
201} 201}
202 202
203void QTReaderApp::hidetoolbars() 203void QTReaderApp::hidetoolbars()
204{ 204{
205 if (m_scrollbar != NULL) m_scrollbar->hide(); 205 if (m_scrollbar != NULL) m_scrollbar->hide();
206 if (m_prog != NULL) m_prog->hide(); 206 if (m_prog != NULL) m_prog->hide();
207 207
208#if defined(USEQPE) 208#if defined(USEQPE)
209 menubar->hide(); 209 menubar->hide();
210#endif 210#endif
211 211
212 if (m_scrollbar != NULL) m_scrollbar->hide(); 212 if (m_scrollbar != NULL) m_scrollbar->hide();
213 213
214 if (fileBar != NULL) fileBar->hide(); 214 if (fileBar != NULL) fileBar->hide();
215 if (viewBar != NULL) viewBar->hide(); 215 if (viewBar != NULL) viewBar->hide();
216 if (navBar != NULL) navBar->hide(); 216 if (navBar != NULL) navBar->hide();
217 if (markBar != NULL) markBar->hide(); 217 if (markBar != NULL) markBar->hide();
218 if (m_fontVisible) m_fontBar->hide(); 218 if (m_fontVisible) m_fontBar->hide();
219 if (regVisible) 219 if (regVisible)
220 { 220 {
221#ifdef USEQPE 221#ifdef USEQPE
222 Global::hideInputMethod(); 222 Global::hideInputMethod();
223#endif 223#endif
224 regBar->hide(); 224 regBar->hide();
225 } 225 }
226 if (searchVisible) 226 if (searchVisible)
227 { 227 {
228#ifdef USEQPE 228#ifdef USEQPE
229 Global::hideInputMethod(); 229 Global::hideInputMethod();
230#endif 230#endif
231 searchBar->hide(); 231 searchBar->hide();
232 } 232 }
233} 233}
234 234
235QTReaderApp::QTReaderApp( QWidget *parent, const char *name, WFlags f ) 235QTReaderApp::QTReaderApp( QWidget *parent, const char *name, WFlags f )
236 : QMainWindow( parent, name, f ), m_dontSave(false), 236 : QMainWindow( parent, name, f ), m_dontSave(false),
237 fileBar(NULL), navBar(NULL), viewBar(NULL), markBar(NULL), m_scrollbar(NULL), m_localscroll(2), m_hidebars(false), m_kmapchanged(false) 237 fileBar(NULL), navBar(NULL), viewBar(NULL), markBar(NULL), m_scrollbar(NULL), m_localscroll(2), m_hidebars(false), m_kmapchanged(false)
238{ 238{
239 { 239 {
240 setKeyCompression ( true ); 240 setKeyCompression ( true );
241#ifndef USEQPE 241#ifndef USEQPE
242 QDir d = QDir::home(); // "/" 242 QDir d = QDir::home(); // "/"
243 d.cd(APPDIR); 243 d.cd(APPDIR);
244 QFileInfo fi(d, ".keymap"); 244 QFileInfo fi(d, ".keymap");
245 FILE* f = fopen((const char *)fi.absFilePath(), "r"); 245 FILE* f = fopen((const char *)fi.absFilePath(), "r");
246#else /* USEQPE */ 246#else /* USEQPE */
247 FILE* f = fopen((const char *)Global::applicationFileName(APPDIR,".keymap"), "r"); 247 FILE* f = fopen((const char *)Global::applicationFileName(APPDIR,".keymap"), "r");
248#endif /* USEQPE */ 248#endif /* USEQPE */
249 if (f != NULL) 249 if (f != NULL)
250 { 250 {
251 uint cnt; 251 uint cnt;
252 if ((fread(&cnt, sizeof(cnt), 1, f) != 0) && (cnt == KEYMAPVERSION)) 252 if ((fread(&cnt, sizeof(cnt), 1, f) != 0) && (cnt == KEYMAPVERSION))
253 { 253 {
254 if (fread(&cnt, sizeof(cnt), 1, f) == 0) cnt = 0; 254 if (fread(&cnt, sizeof(cnt), 1, f) == 0) cnt = 0;
255 for (uint i = 0; i != cnt; i++) 255 for (uint i = 0; i != cnt; i++)
256 { 256 {
257 orKey key; 257 orKey key;
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 );
355 355
356 QPopupMenu *navigation = new QPopupMenu(mb); 356 QPopupMenu *navigation = new QPopupMenu(mb);
357 tmp->insertItem( tr( "Navigation" ), navigation ); 357 tmp->insertItem( tr( "Navigation" ), navigation );
358 358
359 QPopupMenu *view = new QPopupMenu( mb ); 359 QPopupMenu *view = new QPopupMenu( mb );
360 tmp->insertItem( tr( "View" ), view ); 360 tmp->insertItem( tr( "View" ), view );
361 361
362 QPopupMenu *marks = new QPopupMenu( this ); 362 QPopupMenu *marks = new QPopupMenu( this );
363 tmp->insertItem( tr( "Marks" ), marks ); 363 tmp->insertItem( tr( "Marks" ), marks );
364 364
365 QPopupMenu *settings = new QPopupMenu( this ); 365 QPopupMenu *settings = new QPopupMenu( this );
366 tmp->insertItem( tr( "Settings" ), settings ); 366 tmp->insertItem( tr( "Settings" ), settings );
367 367
368// addToolBar(menubar, "Menus",QMainWindow::Top); 368// addToolBar(menubar, "Menus",QMainWindow::Top);
369// addToolBar(fileBar, "Toolbar",QMainWindow::Top); 369// addToolBar(fileBar, "Toolbar",QMainWindow::Top);
370 370
371 // QPopupMenu *edit = new QPopupMenu( this ); 371 // QPopupMenu *edit = new QPopupMenu( this );
372 372
373 /* 373 /*
374 QAction *a = new QAction( tr( "New" ), Resource::loadPixmap( "new" ), QString::null, 0, this, 0 ); 374 QAction *a = new QAction( tr( "New" ), Resource::loadPixmap( "new" ), QString::null, 0, this, 0 );
375 connect( a, SIGNAL( activated() ), this, SLOT( fileNew() ) ); 375 connect( a, SIGNAL( activated() ), this, SLOT( fileNew() ) );
376 a->addTo( bar ); 376 a->addTo( bar );
377 a->addTo( file ); 377 a->addTo( file );
378 */ 378 */
379 QWidget* widge = new QWidget(this); 379 QWidget* widge = new QWidget(this);
380 setCentralWidget( widge ); 380 setCentralWidget( widge );
381 QVBoxLayout* vlayout = new QVBoxLayout(widge); 381 QVBoxLayout* vlayout = new QVBoxLayout(widge);
382 m_layout = new QBoxLayout(QBoxLayout::LeftToRight); 382 m_layout = new QBoxLayout(QBoxLayout::LeftToRight);
383 m_prog = new QLabel(widge); 383 m_prog = new QLabel(widge);
384 vlayout->addLayout(m_layout, 1); 384 vlayout->addLayout(m_layout, 1);
385 vlayout->addWidget(m_prog); 385 vlayout->addWidget(m_prog);
386 386
387 editorStack = new QWidgetStack( widge ); 387 editorStack = new QWidgetStack( widge );
388 // setCentralWidget( editorStack ); 388 // setCentralWidget( editorStack );
389 389
390 searchVisible = FALSE; 390 searchVisible = FALSE;
391 regVisible = FALSE; 391 regVisible = FALSE;
392 m_fontVisible = false; 392 m_fontVisible = false;
393 393
394 m_buttonprefs = new CButtonPrefs(&kmap, this); 394 m_buttonprefs = new CButtonPrefs(&kmap, this);
395 editorStack->addWidget(m_buttonprefs, get_unique_id()); 395 editorStack->addWidget(m_buttonprefs, get_unique_id());
396 connect( m_buttonprefs, SIGNAL( Closed() ), this, SLOT( infoClose() ) ); 396 connect( m_buttonprefs, SIGNAL( Closed() ), this, SLOT( infoClose() ) );
397 397
398 398
399 m_annoWin = new CAnnoEdit(editorStack); 399 m_annoWin = new CAnnoEdit(editorStack);
400 editorStack->addWidget(m_annoWin, get_unique_id()); 400 editorStack->addWidget(m_annoWin, get_unique_id());
401 connect( m_annoWin, SIGNAL( finished(const QString&, const QString&) ), this, SLOT( addAnno(const QString&, const QString&) ) ); 401 connect( m_annoWin, SIGNAL( finished(const QString&, const QString&) ), this, SLOT( addAnno(const QString&, const QString&) ) );
402 connect( m_annoWin, SIGNAL( cancelled() ), this, SLOT( infoClose() ) ); 402 connect( m_annoWin, SIGNAL( cancelled() ), this, SLOT( infoClose() ) );
403 403
404 m_infoWin = new infowin(editorStack); 404 m_infoWin = new infowin(editorStack);
405 editorStack->addWidget(m_infoWin, get_unique_id()); 405 editorStack->addWidget(m_infoWin, get_unique_id());
406 connect( m_infoWin, SIGNAL( Close() ), this, SLOT( infoClose() ) ); 406 connect( m_infoWin, SIGNAL( Close() ), this, SLOT( infoClose() ) );
407 407
408 m_graphicwin = new GraphicWin(editorStack); 408 m_graphicwin = new GraphicWin(editorStack);
409 editorStack->addWidget(m_graphicwin, get_unique_id()); 409 editorStack->addWidget(m_graphicwin, get_unique_id());
410 connect( m_graphicwin, SIGNAL( Closed() ), this, SLOT( infoClose() ) ); 410 connect( m_graphicwin, SIGNAL( Closed() ), this, SLOT( infoClose() ) );
411 411
412// bkmkselector = new QListBox(editorStack, "Bookmarks"); 412// bkmkselector = new QListBox(editorStack, "Bookmarks");
413 bkmkselector = new CBkmkSelector(editorStack, "Bookmarks"); 413 bkmkselector = new CBkmkSelector(editorStack, "Bookmarks");
414 // connect(bkmkselector, SIGNAL( selected(const QString&) ), this, SLOT( gotobkmk(const QString&) ) ); 414 // connect(bkmkselector, SIGNAL( selected(const QString&) ), this, SLOT( gotobkmk(const QString&) ) );
415 connect(bkmkselector, SIGNAL( selected(int) ), this, SLOT( gotobkmk(int) ) ); 415 connect(bkmkselector, SIGNAL( selected(int) ), this, SLOT( gotobkmk(int) ) );
416 connect(bkmkselector, SIGNAL( cancelled() ), this, SLOT( cancelbkmk() ) ); 416 connect(bkmkselector, SIGNAL( cancelled() ), this, SLOT( cancelbkmk() ) );
417 editorStack->addWidget( bkmkselector, get_unique_id() ); 417 editorStack->addWidget( bkmkselector, get_unique_id() );
418 418
419/* 419/*
420 importSelector = new FileSelector( "*", editorStack, "importselector", false ); 420 importSelector = new FileSelector( "*", editorStack, "importselector", false );
421 connect( importSelector, SIGNAL( fileSelected( const DocLnk &) ), this, SLOT( importFile( const DocLnk & ) ) ); 421 connect( importSelector, SIGNAL( fileSelected( const DocLnk &) ), this, SLOT( importFile( const DocLnk & ) ) );
422 422
423 editorStack->addWidget( importSelector, get_unique_id() ); 423 editorStack->addWidget( importSelector, get_unique_id() );
424 424
425 // don't need the close visible, it is redundant... 425 // don't need the close visible, it is redundant...
426 importSelector->setCloseVisible( FALSE ); 426 importSelector->setCloseVisible( FALSE );
427*/ 427*/
428// qDebug("Reading file list"); 428// qDebug("Reading file list");
429 readfilelist(); 429 readfilelist();
430 430
431 reader = new QTReader( editorStack ); 431 reader = new QTReader( editorStack );
432 432
433 reader->setDoUpdates(false); 433 reader->setDoUpdates(false);
434 434
435#ifdef USEQPE 435#ifdef USEQPE
436 ((QPEApplication*)qApp)->setStylusOperation(reader, QPEApplication::RightOnHold); 436 ((QPEApplication*)qApp)->setStylusOperation(reader, QPEApplication::RightOnHold);
437#endif 437#endif
438 438
439// qDebug("Reading config"); 439// qDebug("Reading config");
440// Config config( APPDIR ); 440// Config config( APPDIR );
441 config.setGroup( "View" ); 441 config.setGroup( "View" );
442#if defined(USEQPE) && defined(USENEWFULLSCREEN) 442#if defined(USEQPE) && defined(USENEWFULLSCREEN)
443 m_usenewfullscreen = config.readBoolEntry("NewFullScreen", false); 443 m_usenewfullscreen = config.readBoolEntry("NewFullScreen", false);
444#endif 444#endif
445 m_debounce = config.readNumEntry("Debounce", 0); 445 m_debounce = config.readNumEntry("Debounce", 0);
446 m_buttonprefs->Debounce(m_debounce); 446 m_buttonprefs->Debounce(m_debounce);
447#ifdef USEQPE 447#ifdef USEQPE
448 m_bFloatingDialog = config.readBoolEntry("FloatDialogs", false); 448 m_bFloatingDialog = config.readBoolEntry("FloatDialogs", false);
449#else 449#else
450 m_bFloatingDialog = config.readBoolEntry("FloatDialogs", true); 450 m_bFloatingDialog = config.readBoolEntry("FloatDialogs", true);
451#endif 451#endif
452 reader->setStripCR(config.readBoolEntry( "StripCr", true )); 452 reader->setStripCR(config.readBoolEntry( "StripCr", true ));
453 reader->bfulljust = config.readBoolEntry( "FullJust", false ); 453 reader->bfulljust = config.readBoolEntry( "FullJust", false );
454 /* 454 /*
455 bool btmp = config.readBoolEntry("Negative", false); 455 bool btmp = config.readBoolEntry("Negative", false);
456 if (btmp) reader->setNegative(); 456 if (btmp) reader->setNegative();
457 */ 457 */
458 reader->bInverse = config.readBoolEntry("Inverse", false); 458 reader->bInverse = config.readBoolEntry("Inverse", false);
459 reader->m_fontControl.FixGraphics(config.readBoolEntry( "FixGraphics", false )); 459 reader->m_fontControl.FixGraphics(config.readBoolEntry( "FixGraphics", false ));
460 reader->setextraspace(config.readNumEntry( "ExtraSpace", 0 )); 460 reader->setextraspace(config.readNumEntry( "ExtraSpace", 0 ));
461 reader->setlead(config.readNumEntry( "ExtraLead", 0 )); 461 reader->setlead(config.readNumEntry( "ExtraLead", 0 ));
462 reader->btextfmt = config.readBoolEntry( "TextFmt", false ); 462 reader->btextfmt = config.readBoolEntry( "TextFmt", false );
463 reader->bautofmt = config.readBoolEntry( "AutoFmt", true ); 463 reader->bautofmt = config.readBoolEntry( "AutoFmt", true );
464 reader->bstriphtml = config.readBoolEntry( "StripHtml", false ); 464 reader->bstriphtml = config.readBoolEntry( "StripHtml", false );
465 reader->bNoInlineTables = config.readBoolEntry( "NoInlineTables", false ); 465 reader->bNoInlineTables = config.readBoolEntry( "NoInlineTables", false );
466 reader->bpeanut = config.readBoolEntry( "Peanut", false ); 466 reader->bpeanut = config.readBoolEntry( "Peanut", false );
467 reader->bdehyphen = config.readBoolEntry( "Dehyphen", false ); 467 reader->bdehyphen = config.readBoolEntry( "Dehyphen", false );
468 reader->bdepluck = config.readBoolEntry( "Depluck", false ); 468 reader->bdepluck = config.readBoolEntry( "Depluck", false );
469 reader->bdejpluck = config.readBoolEntry( "Dejpluck", false ); 469 reader->bdejpluck = config.readBoolEntry( "Dejpluck", false );
470 reader->bonespace = config.readBoolEntry( "OneSpace", false ); 470 reader->bonespace = config.readBoolEntry( "OneSpace", false );
471 reader->bunindent = config.readBoolEntry( "Unindent", false ); 471 reader->bunindent = config.readBoolEntry( "Unindent", false );
472 reader->brepara = config.readBoolEntry( "Repara", false ); 472 reader->brepara = config.readBoolEntry( "Repara", false );
473 reader->m_reparastring = config.readEntry( "ReparaString", "\\n{[\\n \\t]}"); 473 reader->m_reparastring = config.readEntry( "ReparaString", "\\n{[\\n \\t]}");
474 m_bgtype = (bground)config.readNumEntry( "BackgroundType" , 0 ); 474 m_bgtype = (bground)config.readNumEntry( "BackgroundType" , 0 );
475 m_themename = config.readEntry("Theme", QString::null ); 475 m_themename = config.readEntry("Theme", QString::null );
476 reader->bdblspce = config.readBoolEntry( "DoubleSpace", false ); 476 reader->bdblspce = config.readBoolEntry( "DoubleSpace", false );
477 reader->bindenter = config.readNumEntry( "Indent", 0 ); 477 reader->bindenter = config.readNumEntry( "Indent", 0 );
478 reader->m_textsize = config.readNumEntry( "FontSize", 12 ); 478 reader->m_textsize = config.readNumEntry( "FontSize", 12 );
479 reader->m_delay = config.readNumEntry( "ScrollDelay", 5184); 479 reader->m_delay = config.readNumEntry( "ScrollDelay", 5184);
480 reader->m_scrollstep = config.readNumEntry( "ScrollStep", 1); 480 reader->m_scrollstep = config.readNumEntry( "ScrollStep", 1);
481 reader->m_outputName = config.readEntry( "OutputCodec", ""); 481 reader->m_outputName = config.readEntry( "OutputCodec", "");
482 482
483 483
484 reader->m_lastfile = config.readEntry( "LastFile", QString::null ); 484 reader->m_lastfile = config.readEntry( "LastFile", QString::null );
485 reader->m_lastposn = config.readNumEntry( "LastPosn", 0 ); 485 reader->m_lastposn = config.readNumEntry( "LastPosn", 0 );
486 reader->m_bpagemode = config.readBoolEntry( "PageMode", true ); 486 reader->m_bpagemode = config.readBoolEntry( "PageMode", true );
487 reader->m_bMonoSpaced = config.readBoolEntry( "MonoSpaced", false); 487 reader->m_bMonoSpaced = config.readBoolEntry( "MonoSpaced", false);
488 reader->m_rotated = config.readBoolEntry( "IsRotated", false ); 488 reader->m_rotated = config.readBoolEntry( "IsRotated", false );
489 reader->m_scrolltype = config.readNumEntry( "ScrollType", 0 ); 489 reader->m_scrolltype = config.readNumEntry( "ScrollType", 0 );
490 m_statusstring = config.readEntry("StatusContent", "%P%% Doc:%d/%D %p%% %z%%"); 490 m_statusstring = config.readEntry("StatusContent", "%P%% Doc:%d/%D %p%% %z%%");
491 m_statusishidden = config.readBoolEntry("StatusHidden", false); 491 m_statusishidden = config.readBoolEntry("StatusHidden", false);
492 m_background = config.readNumEntry( "Background", 0 ); 492 m_background = config.readNumEntry( "Background", 0 );
493 reader->setBackground(getcolour(m_background)); 493 reader->setBackground(getcolour(m_background));
494 m_foreground = config.readNumEntry( "Foreground", 1 ); 494 m_foreground = config.readNumEntry( "Foreground", 1 );
495 reader->setForeground(getcolour(m_foreground)); 495 reader->setForeground(getcolour(m_foreground));
496 m_scrollcolor = config.readNumEntry( "ScrollColour", 5 ); 496 m_scrollcolor = config.readNumEntry( "ScrollColour", 5 );
497 setscrollcolour(); 497 setscrollcolour();
498 m_scrollbarcolor = config.readNumEntry( "ScrollBarColour", 5 ); 498 m_scrollbarcolor = config.readNumEntry( "ScrollBarColour", 5 );
499 setscrollbarcolour(); 499 setscrollbarcolour();
500 reader->hyphenate = config.readBoolEntry( "Hyphenate", false ); 500 reader->hyphenate = config.readBoolEntry( "Hyphenate", false );
501 reader->m_swapmouse = config.readBoolEntry( "SwapMouse", false); 501 reader->m_swapmouse = config.readBoolEntry( "SwapMouse", false);
502 reader->m_fontname = config.readEntry( "Fontname", "helvetica" ); 502 reader->m_fontname = config.readEntry( "Fontname", "helvetica" );
503 reader->m_encd = config.readNumEntry( "Encoding", 0 ); 503 reader->m_encd = config.readNumEntry( "Encoding", 0 );
504 reader->m_charpc = config.readNumEntry( "CharSpacing", 100 ); 504 reader->m_charpc = config.readNumEntry( "CharSpacing", 100 );
505 reader->m_overlap = config.readNumEntry( "Overlap", 0 ); 505 reader->m_overlap = config.readNumEntry( "Overlap", 0 );
506 reader->m_abstopmargin = config.readNumEntry( "Top Margin", 100 ); 506 reader->m_abstopmargin = config.readNumEntry( "Top Margin", 100 );
507 reader->m_absbottommargin = config.readNumEntry( "Bottom Margin", 100 ); 507 reader->m_absbottommargin = config.readNumEntry( "Bottom Margin", 100 );
508 reader->m_absleft_border = config.readNumEntry( "Left Margin", 100 ); 508 reader->m_absleft_border = config.readNumEntry( "Left Margin", 100 );
509 reader->m_absright_border = config.readNumEntry( "Right Margin", 100 ); 509 reader->m_absright_border = config.readNumEntry( "Right Margin", 100 );
510 510
511 m_scrollishidden = config.readBoolEntry( "HideScrollBar", false ); 511 m_scrollishidden = config.readBoolEntry( "HideScrollBar", false );
512 m_hidebars = config.readBoolEntry( "HideToolBar", false ); 512 m_hidebars = config.readBoolEntry( "HideToolBar", false );
513 513
514 reader->brepalm = config.readBoolEntry( "Repalm", false ); 514 reader->brepalm = config.readBoolEntry( "Repalm", false );
515 reader->bunderlineLink = config.readBoolEntry( "UnderlineLink", true ); 515 reader->bunderlineLink = config.readBoolEntry( "UnderlineLink", true );
516 reader->bkern = config.readBoolEntry( "Kern", false ); 516 reader->bkern = config.readBoolEntry( "Kern", false );
517 reader->bremap = config.readBoolEntry( "Remap", true ); 517 reader->bremap = config.readBoolEntry( "Remap", true );
518 reader->bmakebold = config.readBoolEntry( "MakeBold", false ); 518 reader->bmakebold = config.readBoolEntry( "MakeBold", false );
519 reader->setContinuous(config.readBoolEntry( "Continuous", true )); 519 reader->setContinuous(config.readBoolEntry( "Continuous", true ));
520 reader->setDoubleBuffer(config.readBoolEntry("DoubleBuffer", true)); 520 reader->setDoubleBuffer(config.readBoolEntry("DoubleBuffer", true));
521 m_targetapp = config.readEntry( "TargetApp", QString::null ); 521 m_targetapp = config.readEntry( "TargetApp", QString::null );
522 m_targetmsg = config.readEntry( "TargetMsg", QString::null ); 522 m_targetmsg = config.readEntry( "TargetMsg", QString::null );
523#ifdef _SCROLLPIPE 523#ifdef _SCROLLPIPE
524 reader->m_pipetarget = config.readEntry( "PipeTarget", QString::null ); 524 reader->m_pipetarget = config.readEntry( "PipeTarget", QString::null );
525 reader->m_pauseAfterEachPara = config.readBoolEntry( "PauseAfterPara", true ); 525 reader->m_pauseAfterEachPara = config.readBoolEntry( "PauseAfterPara", true );
526#endif 526#endif
527 m_twoTouch = config.readBoolEntry( "TwoTouch", false); 527 m_twoTouch = config.readBoolEntry( "TwoTouch", false);
528 m_doAnnotation = config.readBoolEntry( "Annotation", false); 528 m_doAnnotation = config.readBoolEntry( "Annotation", false);
529 m_doDictionary = config.readBoolEntry( "Dictionary", false); 529 m_doDictionary = config.readBoolEntry( "Dictionary", false);
530 m_doClipboard = config.readBoolEntry( "Clipboard", false); 530 m_doClipboard = config.readBoolEntry( "Clipboard", false);
531 m_doOutput = config.readBoolEntry( "OutputTgt", false); 531 m_doOutput = config.readBoolEntry( "OutputTgt", false);
532 /* 532 /*
533 m_spaceTarget = (ActionTypes)config.readNumEntry("SpaceTarget", cesAutoScroll); 533 m_spaceTarget = (ActionTypes)config.readNumEntry("SpaceTarget", cesAutoScroll);
534 m_escapeTarget = (ActionTypes)config.readNumEntry("EscapeTarget", cesNone); 534 m_escapeTarget = (ActionTypes)config.readNumEntry("EscapeTarget", cesNone);
535 m_returnTarget = (ActionTypes)config.readNumEntry("ReturnTarget", cesFullScreen); 535 m_returnTarget = (ActionTypes)config.readNumEntry("ReturnTarget", cesFullScreen);
536 m_leftTarget = (ActionTypes)config.readNumEntry("LeftTarget", cesZoomOut); 536 m_leftTarget = (ActionTypes)config.readNumEntry("LeftTarget", cesZoomOut);
537 m_rightTarget = (ActionTypes)config.readNumEntry("RightTarget", cesZoomIn); 537 m_rightTarget = (ActionTypes)config.readNumEntry("RightTarget", cesZoomIn);
538 m_upTarget = (ActionTypes)config.readNumEntry("UpTarget", cesPageUp); 538 m_upTarget = (ActionTypes)config.readNumEntry("UpTarget", cesPageUp);
539 m_downTarget = (ActionTypes)config.readNumEntry("DownTarget", cesPageDown); 539 m_downTarget = (ActionTypes)config.readNumEntry("DownTarget", cesPageDown);
540 540
541 m_leftScroll = config.readBoolEntry("LeftScroll", false); 541 m_leftScroll = config.readBoolEntry("LeftScroll", false);
542 m_rightScroll = config.readBoolEntry("RightScroll", false); 542 m_rightScroll = config.readBoolEntry("RightScroll", false);
543 m_upScroll = config.readBoolEntry("UpScroll", true); 543 m_upScroll = config.readBoolEntry("UpScroll", true);
544 m_downScroll = config.readBoolEntry("DownScroll", true); 544 m_downScroll = config.readBoolEntry("DownScroll", true);
545 */ 545 */
546 m_propogatefontchange = config.readBoolEntry( "RequestorFontChange", false); 546 m_propogatefontchange = config.readBoolEntry( "RequestorFontChange", false);
547 reader->setBaseSize(config.readNumEntry( "Basesize", 10 )); 547 reader->setBaseSize(config.readNumEntry( "Basesize", 10 ));
548 reader->setHyphenThreshold(config.readNumEntry( "HyphenThreshold", 50 )); 548 reader->setHyphenThreshold(config.readNumEntry( "HyphenThreshold", 50 ));
549 // reader->buffdoc.setCustomHyphen(config.readBoolEntry( "CustomHyphen", false )); 549 // reader->buffdoc.setCustomHyphen(config.readBoolEntry( "CustomHyphen", false ));
550#ifndef USEQPE 550#ifndef USEQPE
551 config.setGroup( "Geometry" ); 551 config.setGroup( "Geometry" );
552 setGeometry(0,0, 552 setGeometry(0,0,
553 config.readNumEntry( "width", QApplication::desktop()->width()/2 ), 553 config.readNumEntry( "width", QApplication::desktop()->width()/2 ),
554 config.readNumEntry( "height", QApplication::desktop()->height()/2 )); 554 config.readNumEntry( "height", QApplication::desktop()->height()/2 ));
555 move( 555 move(
556 config.readNumEntry( "x", 20 ), 556 config.readNumEntry( "x", 20 ),
557 config.readNumEntry( "y", 20 )); 557 config.readNumEntry( "y", 20 ));
558#else 558#else
559 m_grabkeyboard = config.readBoolEntry( "GrabKeyboard", false); 559 m_grabkeyboard = config.readBoolEntry( "GrabKeyboard", false);
560#endif 560#endif
561 561
562 562
563 563
564 setTwoTouch(m_twoTouch); 564 setTwoTouch(m_twoTouch);
565 565
566 connect( reader, SIGNAL( OnShowPicture(QImage&) ), this, SLOT( showgraphic(QImage&) ) ); 566 connect( reader, SIGNAL( OnShowPicture(QImage&) ), this, SLOT( showgraphic(QImage&) ) );
567 567
568 connect( reader, SIGNAL( OnRedraw() ), this, SLOT( OnRedraw() ) ); 568 connect( reader, SIGNAL( OnRedraw() ), this, SLOT( OnRedraw() ) );
569 connect( reader, SIGNAL( OnWordSelected(const QString&, size_t, size_t, const QString&) ), this, SLOT( OnWordSelected(const QString&, size_t, size_t, const QString&) ) ); 569 connect( reader, SIGNAL( OnWordSelected(const QString&, size_t, size_t, const QString&) ), this, SLOT( OnWordSelected(const QString&, size_t, size_t, const QString&) ) );
570 connect( reader, SIGNAL( OnURLSelected(const QString&, const size_t) ), this, SLOT( OnURLSelected(const QString&, const size_t) ) ); 570 connect( reader, SIGNAL( OnURLSelected(const QString&, const size_t) ), this, SLOT( OnURLSelected(const QString&, const size_t) ) );
571 connect( reader, SIGNAL( NewFileRequest(const QString&) ), this, SLOT( forceopen(const QString&) ) ); 571 connect( reader, SIGNAL( NewFileRequest(const QString&) ), this, SLOT( forceopen(const QString&) ) );
572 connect( reader, SIGNAL( HandleKeyRequest(QKeyEvent*) ), this, SLOT( handlekey(QKeyEvent*) ) ); 572 connect( reader, SIGNAL( HandleKeyRequest(QKeyEvent*) ), this, SLOT( handlekey(QKeyEvent*) ) );
573 connect( reader, SIGNAL( SetScrollState(bool) ), this, SLOT( setScrollState(bool) ) ); 573 connect( reader, SIGNAL( SetScrollState(bool) ), this, SLOT( setScrollState(bool) ) );
574 connect( reader, SIGNAL(RefreshBitmap()), this, SLOT(setBackgroundBitmap())); 574 connect( reader, SIGNAL(RefreshBitmap()), this, SLOT(setBackgroundBitmap()));
575 editorStack->addWidget( reader, get_unique_id() ); 575 editorStack->addWidget( reader, get_unique_id() );
576 576
577 m_preferences_action = new QAction( tr( "Configuration" ), geticon( "SettingsIcon" ), QString::null, 0, this, NULL); 577 m_preferences_action = new QAction( tr( "Configuration" ), geticon( "SettingsIcon" ), QString::null, 0, this, NULL);
578 connect( m_preferences_action, SIGNAL( activated() ), this, SLOT( showprefs() ) ); 578 connect( m_preferences_action, SIGNAL( activated() ), this, SLOT( showprefs() ) );
579 m_preferences_action->addTo( settings ); 579 m_preferences_action->addTo( settings );
580 580
581 m_saveconfig_action = new QAction( tr( "Save Config" ), QString::null, 0, this, NULL); 581 m_saveconfig_action = new QAction( tr( "Save Config" ), QString::null, 0, this, NULL);
582 connect( m_saveconfig_action, SIGNAL( activated() ), this, SLOT( SaveConfig() ) ); 582 connect( m_saveconfig_action, SIGNAL( activated() ), this, SLOT( SaveConfig() ) );
583 m_saveconfig_action->addTo( settings ); 583 m_saveconfig_action->addTo( settings );
584 584
585 m_loadconfig_action = new QAction( tr( "Load Config" ), QString::null, 0, this, NULL); 585 m_loadconfig_action = new QAction( tr( "Load Config" ), QString::null, 0, this, NULL);
586 connect( m_loadconfig_action, SIGNAL( activated() ), this, SLOT( LoadConfig() ) ); 586 connect( m_loadconfig_action, SIGNAL( activated() ), this, SLOT( LoadConfig() ) );
587 m_loadconfig_action->addTo( settings ); 587 m_loadconfig_action->addTo( settings );
588 588
589 m_tidyconfig_action = new QAction( tr( "Delete Config" ), QString::null, 0, this, NULL); 589 m_tidyconfig_action = new QAction( tr( "Delete Config" ), QString::null, 0, this, NULL);
590 connect( m_tidyconfig_action, SIGNAL( activated() ), this, SLOT( TidyConfig() ) ); 590 connect( m_tidyconfig_action, SIGNAL( activated() ), this, SLOT( TidyConfig() ) );
591 m_tidyconfig_action->addTo( settings ); 591 m_tidyconfig_action->addTo( settings );
592 592
593 settings->insertSeparator(); 593 settings->insertSeparator();
594 m_toolbarprefs_action = new QAction( tr( "Toolbars" ), QString::null, 0, this, NULL); 594 m_toolbarprefs_action = new QAction( tr( "Toolbars" ), QString::null, 0, this, NULL);
595 connect( m_toolbarprefs_action, SIGNAL( activated() ), this, SLOT( showtoolbarprefs() ) ); 595 connect( m_toolbarprefs_action, SIGNAL( activated() ), this, SLOT( showtoolbarprefs() ) );
596 m_toolbarprefs_action->addTo( settings ); 596 m_toolbarprefs_action->addTo( settings );
597 597
598 m_buttonprefs_action = new QAction( tr( "Buttons" ), QString::null, 0, this, NULL); 598 m_buttonprefs_action = new QAction( tr( "Buttons" ), QString::null, 0, this, NULL);
599 connect( m_buttonprefs_action, SIGNAL( activated() ), this, SLOT( showbuttonprefs() ) ); 599 connect( m_buttonprefs_action, SIGNAL( activated() ), this, SLOT( showbuttonprefs() ) );
600 m_buttonprefs_action->addTo( settings ); 600 m_buttonprefs_action->addTo( settings );
601 601
602 m_loadtheme_action = new QAction( tr( "Load Theme" ), QString::null, 0, this, NULL); 602 m_loadtheme_action = new QAction( tr( "Load Theme" ), QString::null, 0, this, NULL);
603 connect( m_loadtheme_action, SIGNAL( activated() ), this, SLOT( LoadTheme() ) ); 603 connect( m_loadtheme_action, SIGNAL( activated() ), this, SLOT( LoadTheme() ) );
604 m_loadtheme_action->addTo( settings ); 604 m_loadtheme_action->addTo( settings );
605 605
606 m_repara_action = new QAction( tr( "EOP Marker" ), QString::null, 0, this, NULL); 606 m_repara_action = new QAction( tr( "EOP Marker" ), QString::null, 0, this, NULL);
607 connect( m_repara_action, SIGNAL( activated() ), this, SLOT( reparastring() ) ); 607 connect( m_repara_action, SIGNAL( activated() ), this, SLOT( reparastring() ) );
608 m_repara_action->addTo(settings); 608 m_repara_action->addTo(settings);
609 609
610#ifdef USEQPE 610#ifdef USEQPE
611 m_grab_action = new QAction( tr( "Grab Buttons" ), QString::null, 0, this, NULL, true ); 611 m_grab_action = new QAction( tr( "Grab Buttons" ), QString::null, 0, this, NULL, true );
612 connect( m_grab_action, SIGNAL( toggled(bool) ), this, SLOT( setgrab(bool) ) ); 612 connect( m_grab_action, SIGNAL( toggled(bool) ), this, SLOT( setgrab(bool) ) );
613 m_grab_action->setOn(m_grabkeyboard); 613 m_grab_action->setOn(m_grabkeyboard);
614 m_grab_action->addTo( settings ); 614 m_grab_action->addTo( settings );
615#endif 615#endif
616 616
617 m_open_action = new QAction( tr( "Open" ), geticon( "fileopen" ), QString::null, 0, this, 0 ); 617 m_open_action = new QAction( tr( "Open" ), geticon( "fileopen" ), QString::null, 0, this, 0 );
618 connect( m_open_action, SIGNAL( activated() ), this, SLOT( fileOpen() ) ); 618 connect( m_open_action, SIGNAL( activated() ), this, SLOT( fileOpen() ) );
619 m_open_action->addTo( file ); 619 m_open_action->addTo( file );
620 620
621 m_close_action = new QAction( tr( "Close" ), geticon( "close" ), QString::null, 0, this, 0 ); 621 m_close_action = new QAction( tr( "Close" ), geticon( "close" ), QString::null, 0, this, 0 );
622 connect( m_close_action, SIGNAL( activated() ), this, SLOT( fileClose() ) ); 622 connect( m_close_action, SIGNAL( activated() ), this, SLOT( fileClose() ) );
623 m_close_action->addTo( file ); 623 m_close_action->addTo( file );
624 624
625#ifdef _SCRIPT 625#ifdef _SCRIPT
626 a = new QAction( tr( "Run Script" ), QString::null, 0, this, NULL); 626 a = new QAction( tr( "Run Script" ), QString::null, 0, this, NULL);
627 connect( a, SIGNAL( activated() ), this, SLOT( RunScript() ) ); 627 connect( a, SIGNAL( activated() ), this, SLOT( RunScript() ) );
628 a->addTo( file ); 628 a->addTo( file );
629#endif 629#endif
630 /* 630 /*
631 a = new QAction( tr( "Revert" ), geticon( "close" ), QString::null, 0, this, 0 ); 631 a = new QAction( tr( "Revert" ), geticon( "close" ), QString::null, 0, this, 0 );
632 connect( a, SIGNAL( activated() ), this, SLOT( fileRevert() ) ); 632 connect( a, SIGNAL( activated() ), this, SLOT( fileRevert() ) );
633 a->addTo( file ); 633 a->addTo( file );
634 634
635 a = new QAction( tr( "Cut" ), geticon( "cut" ), QString::null, 0, this, 0 ); 635 a = new QAction( tr( "Cut" ), geticon( "cut" ), QString::null, 0, this, 0 );
636 connect( a, SIGNAL( activated() ), this, SLOT( editCut() ) ); 636 connect( a, SIGNAL( activated() ), this, SLOT( editCut() ) );
637 a->addTo( filebar() ); 637 a->addTo( filebar() );
638 a->addTo( edit ); 638 a->addTo( edit );
639 */ 639 */
640 640
641 m_info_action = new QAction( tr( "Info" ), geticon( "UtilsIcon" ), QString::null, 0, this, NULL); 641 m_info_action = new QAction( tr( "Info" ), geticon( "UtilsIcon" ), QString::null, 0, this, NULL);
642 connect( m_info_action, SIGNAL( activated() ), this, SLOT( showinfo() ) ); 642 connect( m_info_action, SIGNAL( activated() ), this, SLOT( showinfo() ) );
643 m_info_action->addTo( file ); 643 m_info_action->addTo( file );
644 644
645 m_touch_action = new QAction( tr( "Two/One Touch" ), geticon( "1to1" ), QString::null, 0, this, NULL, true ); 645 m_touch_action = new QAction( tr( "Two/One Touch" ), geticon( "1to1" ), QString::null, 0, this, NULL, true );
646 connect( m_touch_action, SIGNAL( toggled(bool) ), this, SLOT( setTwoTouch(bool) ) ); 646 connect( m_touch_action, SIGNAL( toggled(bool) ), this, SLOT( setTwoTouch(bool) ) );
647 m_touch_action->setOn(m_twoTouch); 647 m_touch_action->setOn(m_twoTouch);
648 m_touch_action->addTo( file ); 648 m_touch_action->addTo( file );
649 649
650 m_find_action = new QAction( tr( "Find..." ), geticon( "find" ), QString::null, 0, this, NULL); 650 m_find_action = new QAction( tr( "Find..." ), geticon( "find" ), QString::null, 0, this, NULL);
651 connect( m_find_action, SIGNAL( activated() ), this, SLOT( editFind() ) ); 651 connect( m_find_action, SIGNAL( activated() ), this, SLOT( editFind() ) );
652 file->insertSeparator(); 652 file->insertSeparator();
653// a->addTo( bar ); 653// a->addTo( bar );
654 m_find_action->addTo( file ); 654 m_find_action->addTo( file );
655 655
656 m_exportlinks_action = new QAction( tr( "Export Links" ), QString::null, 0, this, NULL); 656 m_exportlinks_action = new QAction( tr( "Export Links" ), QString::null, 0, this, NULL);
657 connect( m_exportlinks_action, SIGNAL( activated() ), this, SLOT( ExportLinks() ) ); 657 connect( m_exportlinks_action, SIGNAL( activated() ), this, SLOT( ExportLinks() ) );
658 m_exportlinks_action->addTo( file ); 658 m_exportlinks_action->addTo( file );
659 659
660 m_scrollButton = new QAction( tr( "Scroll" ), getmyicon( "panel-arrow-down" ), QString::null, 0, this, 0, true ); 660 m_scrollButton = new QAction( tr( "Scroll" ), getmyicon( "panel-arrow-down" ), QString::null, 0, this, 0, true );
661 connect( m_scrollButton, SIGNAL( toggled(bool) ), this, SLOT( autoScroll(bool) ) ); 661 connect( m_scrollButton, SIGNAL( toggled(bool) ), this, SLOT( autoScroll(bool) ) );
662 m_scrollButton->addTo(navigation); 662 m_scrollButton->addTo(navigation);
663 m_scrollButton->setOn(false); 663 m_scrollButton->setOn(false);
664 664
665 m_start_action = new QAction( tr( "Goto Start" ), geticon( "start" ), QString::null, 0, this, NULL); 665 m_start_action = new QAction( tr( "Goto Start" ), geticon( "start" ), QString::null, 0, this, NULL);
666 connect( m_start_action, SIGNAL( activated() ), this, SLOT( gotoStart() ) ); 666 connect( m_start_action, SIGNAL( activated() ), this, SLOT( gotoStart() ) );
667 m_start_action->addTo(navigation); 667 m_start_action->addTo(navigation);
668 668
669 m_end_action = new QAction( tr( "Goto End" ), geticon( "finish" ), QString::null, 0, this, NULL); 669 m_end_action = new QAction( tr( "Goto End" ), geticon( "finish" ), QString::null, 0, this, NULL);
670 connect( m_end_action, SIGNAL( activated() ), this, SLOT( gotoEnd() ) ); 670 connect( m_end_action, SIGNAL( activated() ), this, SLOT( gotoEnd() ) );
671 m_end_action->addTo(navigation); 671 m_end_action->addTo(navigation);
672 672
673 m_jump_action = new QAction( tr( "Jump" ), geticon( "rotate" ), QString::null, 0, this, NULL); 673 m_jump_action = new QAction( tr( "Jump" ), geticon( "rotate" ), QString::null, 0, this, NULL);
674 connect( m_jump_action, SIGNAL( activated() ), this, SLOT( jump() ) ); 674 connect( m_jump_action, SIGNAL( activated() ), this, SLOT( jump() ) );
675 m_jump_action->addTo(navigation); 675 m_jump_action->addTo(navigation);
676 676
677 m_pageline_action = new QAction( tr( "Page/Line Scroll" ), geticon( "pass" ), QString::null, 0, this, NULL, true ); 677 m_pageline_action = new QAction( tr( "Page/Line Scroll" ), geticon( "pass" ), QString::null, 0, this, NULL, true );
678 connect( m_pageline_action, SIGNAL( toggled(bool) ), this, SLOT( pagemode(bool) ) ); 678 connect( m_pageline_action, SIGNAL( toggled(bool) ), this, SLOT( pagemode(bool) ) );
679 m_pageline_action->addTo(navigation); 679 m_pageline_action->addTo(navigation);
680 m_pageline_action->setOn(reader->m_bpagemode); 680 m_pageline_action->setOn(reader->m_bpagemode);
681 681
682 m_pageup_action = new QAction( tr( "Up" ), geticon( "up" ), QString::null, 0, this, 0 ); 682 m_pageup_action = new QAction( tr( "Up" ), geticon( "up" ), QString::null, 0, this, 0 );
683 connect( m_pageup_action, SIGNAL( activated() ), this, SLOT( pageup() ) ); 683 connect( m_pageup_action, SIGNAL( activated() ), this, SLOT( pageup() ) );
684 m_pageup_action->addTo( navigation ); 684 m_pageup_action->addTo( navigation );
685 685
686 m_pagedn_action = new QAction( tr( "Down" ), geticon( "down" ), QString::null, 0, this, 0 ); 686 m_pagedn_action = new QAction( tr( "Down" ), geticon( "down" ), QString::null, 0, this, 0 );
687 connect( m_pagedn_action, SIGNAL( activated() ), this, SLOT( pagedn() ) ); 687 connect( m_pagedn_action, SIGNAL( activated() ), this, SLOT( pagedn() ) );
688 m_pagedn_action->addTo( navigation ); 688 m_pagedn_action->addTo( navigation );
689 689
690 m_back_action = new QAction( tr( "Back" ), geticon( "back" ), QString::null, 0, this, 0 ); 690 m_back_action = new QAction( tr( "Back" ), geticon( "back" ), QString::null, 0, this, 0 );
691 connect( m_back_action, SIGNAL( activated() ), reader, SLOT( goBack() ) ); 691 connect( m_back_action, SIGNAL( activated() ), reader, SLOT( goBack() ) );
692 m_back_action->addTo( navigation ); 692 m_back_action->addTo( navigation );
693 693
694 m_home_action = new QAction( tr( "Home" ), geticon( "home" ), QString::null, 0, this, 0 ); 694 m_home_action = new QAction( tr( "Home" ), geticon( "home" ), QString::null, 0, this, 0 );
695 connect( m_home_action, SIGNAL( activated() ), reader, SLOT( goHome() ) ); 695 connect( m_home_action, SIGNAL( activated() ), reader, SLOT( goHome() ) );
696 m_home_action->addTo( navigation ); 696 m_home_action->addTo( navigation );
697 697
698 m_forward_action = new QAction( tr( "Forward" ), geticon( "forward" ), QString::null, 0, this, 0 ); 698 m_forward_action = new QAction( tr( "Forward" ), geticon( "forward" ), QString::null, 0, this, 0 );
699 connect( m_forward_action, SIGNAL( activated() ), reader, SLOT( goForward() ) ); 699 connect( m_forward_action, SIGNAL( activated() ), reader, SLOT( goForward() ) );
700 m_forward_action->addTo( navigation ); 700 m_forward_action->addTo( navigation );
701 701
702 /* 702 /*
703 a = new QAction( tr( "Find" ), QString::null, 0, this, NULL, true ); 703 a = new QAction( tr( "Find" ), QString::null, 0, this, NULL, true );
704 // connect( a, SIGNAL( activated() ), this, SLOT( pagedn() ) ); 704 // connect( a, SIGNAL( activated() ), this, SLOT( pagedn() ) );
705 a->addTo( file ); 705 a->addTo( file );
706 706
707 a = new QAction( tr( "Find Again" ), QString::null, 0, this, NULL, true ); 707 a = new QAction( tr( "Find Again" ), QString::null, 0, this, NULL, true );
708 // connect( a, SIGNAL( activated() ), this, SLOT( pagedn() ) ); 708 // connect( a, SIGNAL( activated() ), this, SLOT( pagedn() ) );
709 a->addTo( file ); 709 a->addTo( file );
710 */ 710 */
711 711
712// file->insertSeparator(); 712// file->insertSeparator();
713 713
714#ifdef _SCROLLPIPE 714#ifdef _SCROLLPIPE
715 715
716 QActionGroup* ag = new QActionGroup(this); 716 QActionGroup* ag = new QActionGroup(this);
717 ag->setExclusive(false); 717 ag->setExclusive(false);
718 spacemenu = new QPopupMenu(this); 718 spacemenu = new QPopupMenu(this);
719 file->insertItem( tr( "Scrolling" ), spacemenu ); 719 file->insertItem( tr( "Scrolling" ), spacemenu );
720 720
721 a = new QAction( tr( "Set Target" ), QString::null, 0, ag, NULL); 721 a = new QAction( tr( "Set Target" ), QString::null, 0, ag, NULL);
722 connect( a, SIGNAL( activated() ), this, SLOT( setpipetarget() ) ); 722 connect( a, SIGNAL( activated() ), this, SLOT( setpipetarget() ) );
723 723
724 a = new QAction( tr( "Pause Paras" ), QString::null, 0, ag, NULL, true ); 724 a = new QAction( tr( "Pause Paras" ), QString::null, 0, ag, NULL, true );
725 connect( a, SIGNAL( toggled(bool) ), this, SLOT( setpause(bool) ) ); 725 connect( a, SIGNAL( toggled(bool) ), this, SLOT( setpause(bool) ) );
726 a->setOn(reader->m_pauseAfterEachPara); 726 a->setOn(reader->m_pauseAfterEachPara);
727 727
728 ag->addTo(spacemenu); 728 ag->addTo(spacemenu);
729// file->insertSeparator(); 729// file->insertSeparator();
730 730
731#endif 731#endif
732 732
733/* 733/*
734 a = new QAction( tr( "Import" ), QString::null, 0, this, NULL ); 734 a = new QAction( tr( "Import" ), QString::null, 0, this, NULL );
735 connect( a, SIGNAL( activated() ), this, SLOT( importFiles() ) ); 735 connect( a, SIGNAL( activated() ), this, SLOT( importFiles() ) );
736 a->addTo( file ); 736 a->addTo( file );
737*/ 737*/
738 738
739 /* 739 /*
740 a = new QAction( tr( "Paste" ), geticon( "paste" ), QString::null, 0, this, 0 ); 740 a = new QAction( tr( "Paste" ), geticon( "paste" ), QString::null, 0, this, 0 );
741 connect( a, SIGNAL( activated() ), this, SLOT( editPaste() ) ); 741 connect( a, SIGNAL( activated() ), this, SLOT( editPaste() ) );
742 a->addTo( fileBar ); 742 a->addTo( fileBar );
743 a->addTo( edit ); 743 a->addTo( edit );
744 */ 744 */
745 745
746// a = new QAction( tr( "Find..." ), geticon( "find" ), QString::null, 0, this, 0 ); 746// a = new QAction( tr( "Find..." ), geticon( "find" ), QString::null, 0, this, 0 );
747 747
748 m_fullscreen = false; 748 m_fullscreen = false;
749 m_actFullscreen = new QAction( tr( "Fullscreen" ), geticon( "fullscreen" ), QString::null, 0, this, NULL, true ); 749 m_actFullscreen = new QAction( tr( "Fullscreen" ), geticon( "fullscreen" ), QString::null, 0, this, NULL, true );
750 connect( m_actFullscreen, SIGNAL( toggled(bool) ), this, SLOT( setfullscreen(bool) ) ); 750 connect( m_actFullscreen, SIGNAL( toggled(bool) ), this, SLOT( setfullscreen(bool) ) );
751 m_actFullscreen->setOn(m_fullscreen); 751 m_actFullscreen->setOn(m_fullscreen);
752 m_actFullscreen->addTo( view ); 752 m_actFullscreen->addTo( view );
753 753
754 m_rotate_action = new QAction( tr( "Rotate" ), geticon( "repeat" ), QString::null, 0, this, NULL, true ); 754 m_rotate_action = new QAction( tr( "Rotate" ), geticon( "repeat" ), QString::null, 0, this, NULL, true );
755 connect( m_rotate_action, SIGNAL( toggled(bool) ), this, SLOT( setrotated(bool) ) ); 755 connect( m_rotate_action, SIGNAL( toggled(bool) ), this, SLOT( setrotated(bool) ) );
756 m_rotate_action->setOn(reader->m_rotated); 756 m_rotate_action->setOn(reader->m_rotated);
757 m_rotate_action->addTo( view ); 757 m_rotate_action->addTo( view );
758 758
759 m_inverse_action = new QAction( tr( "Invert" ), getmyicon( "invert" ), QString::null, 0, this, NULL, true ); 759 m_inverse_action = new QAction( tr( "Invert" ), getmyicon( "invert" ), QString::null, 0, this, NULL, true );
760 connect( m_inverse_action, SIGNAL( toggled(bool) ), this, SLOT( setinverted(bool) ) ); 760 connect( m_inverse_action, SIGNAL( toggled(bool) ), this, SLOT( setinverted(bool) ) );
761 m_inverse_action->setOn(reader->bInverse); 761 m_inverse_action->setOn(reader->bInverse);
762 m_inverse_action->addTo( view ); 762 m_inverse_action->addTo( view );
763 763
764 view->insertSeparator(); 764 view->insertSeparator();
765 765
766 m_zoomin_action = new QAction( tr( "Zoom In" ), geticon( "zoom" ), QString::null, 0, this); 766 m_zoomin_action = new QAction( tr( "Zoom In" ), geticon( "zoom" ), QString::null, 0, this);
767 connect( m_zoomin_action, SIGNAL( activated() ), this, SLOT( zoomin() ) ); 767 connect( m_zoomin_action, SIGNAL( activated() ), this, SLOT( zoomin() ) );
768 m_zoomin_action->addTo( view ); 768 m_zoomin_action->addTo( view );
769 769
770 m_zoomout_action = new QAction( tr( "Zoom Out" ), geticon( "mag" ), QString::null, 0, this); 770 m_zoomout_action = new QAction( tr( "Zoom Out" ), geticon( "mag" ), QString::null, 0, this);
771 connect( m_zoomout_action, SIGNAL( activated() ), this, SLOT( zoomout() ) ); 771 connect( m_zoomout_action, SIGNAL( activated() ), this, SLOT( zoomout() ) );
772 m_zoomout_action->addTo( view ); 772 m_zoomout_action->addTo( view );
773 773
774 view->insertSeparator(); 774 view->insertSeparator();
775 m_setfont_action = new QAction( tr( "Set Font" ), getmyicon( "font" ), QString::null, 0, this); 775 m_setfont_action = new QAction( tr( "Set Font" ), getmyicon( "font" ), QString::null, 0, this);
776 connect( m_setfont_action, SIGNAL( activated() ), this, SLOT( setfont() ) ); 776 connect( m_setfont_action, SIGNAL( activated() ), this, SLOT( setfont() ) );
777 m_setfont_action->addTo( view ); 777 m_setfont_action->addTo( view );
778 778
779 view->insertSeparator(); 779 view->insertSeparator();
780 m_setenc_action = new QAction( tr( "Set Encoding" ), getmyicon( "charset" ), QString::null, 0, this); 780 m_setenc_action = new QAction( tr( "Set Encoding" ), getmyicon( "charset" ), QString::null, 0, this);
781 connect( m_setenc_action, SIGNAL( activated() ), this, SLOT( chooseencoding() ) ); 781 connect( m_setenc_action, SIGNAL( activated() ), this, SLOT( chooseencoding() ) );
782 m_setenc_action->addTo( view ); 782 m_setenc_action->addTo( view );
783 783
784 m_setmono_action = new QAction( tr( "Ideogram" ), getmyicon( "ideogram" ), QString::null, 0, this, NULL, true); 784 m_setmono_action = new QAction( tr( "Ideogram" ), getmyicon( "ideogram" ), QString::null, 0, this, NULL, true);
785 connect( m_setmono_action, SIGNAL( toggled(bool) ), this, SLOT( monospace(bool) ) ); 785 connect( m_setmono_action, SIGNAL( toggled(bool) ), this, SLOT( monospace(bool) ) );
786 m_setmono_action->addTo( view ); 786 m_setmono_action->addTo( view );
787 m_setmono_action->setOn(reader->m_bMonoSpaced); 787 m_setmono_action->setOn(reader->m_bMonoSpaced);
788 788
789 789
790 // a = new QAction( tr( "Zoom" ), QString::null, 0, this, NULL, true ); 790 // a = new QAction( tr( "Zoom" ), QString::null, 0, this, NULL, true );
791 // a = new QAction( tr( "Zoom" ), geticon( "mag" ), QString::null, 0, this, 0 ); 791 // a = new QAction( tr( "Zoom" ), geticon( "mag" ), QString::null, 0, this, 0 );
792 792
793 793
794 794
795 // a->addTo( filebar() ); 795 // a->addTo( filebar() );
796// view->insertSeparator(); 796// view->insertSeparator();
797 797
798/* 798/*
799 a = new QAction( tr( "Ideogram/Word" ), QString::null, 0, this, NULL, true ); 799 a = new QAction( tr( "Ideogram/Word" ), QString::null, 0, this, NULL, true );
800 connect( a, SIGNAL( toggled(bool) ), this, SLOT( monospace(bool) ) ); 800 connect( a, SIGNAL( toggled(bool) ), this, SLOT( monospace(bool) ) );
801 a->setOn(reader->m_bMonoSpaced); 801 a->setOn(reader->m_bMonoSpaced);
802 a->addTo( view ); 802 a->addTo( view );
803*/ 803*/
804/* 804/*
805 a = new QAction( tr( "Set Width" ), QString::null, 0, this, NULL); 805 a = new QAction( tr( "Set Width" ), QString::null, 0, this, NULL);
806 connect( a, SIGNAL( activated() ), this, SLOT( setspacing() ) ); 806 connect( a, SIGNAL( activated() ), this, SLOT( setspacing() ) );
807 a->addTo( view ); 807 a->addTo( view );
808*/ 808*/
809 809
810 m_mark_action = new QAction( tr( "Bookmark" ), getmyicon( "bookmark" ), QString::null, 0, this, NULL); 810 m_mark_action = new QAction( tr( "Bookmark" ), getmyicon( "bookmark" ), QString::null, 0, this, NULL);
811 connect( m_mark_action, SIGNAL( activated() ), this, SLOT( addbkmk() ) ); 811 connect( m_mark_action, SIGNAL( activated() ), this, SLOT( addbkmk() ) );
812 m_mark_action->addTo( marks ); 812 m_mark_action->addTo( marks );
813 813
814 m_annotate_action = new QAction( tr( "Annotate" ), getmyicon( "annotate" ), QString::null, 0, this, NULL); 814 m_annotate_action = new QAction( tr( "Annotate" ), getmyicon( "annotate" ), QString::null, 0, this, NULL);
815 connect( m_annotate_action, SIGNAL( activated() ), this, SLOT( addanno() ) ); 815 connect( m_annotate_action, SIGNAL( activated() ), this, SLOT( addanno() ) );
816 m_annotate_action->addTo( marks ); 816 m_annotate_action->addTo( marks );
817 817
818 m_goto_action = new QAction( tr( "Goto" ), getmyicon( "bookmark_goto" ), QString::null, 0, this, NULL, false ); 818 m_goto_action = new QAction( tr( "Goto" ), getmyicon( "bookmark_goto" ), QString::null, 0, this, NULL, false );
819 connect( m_goto_action, SIGNAL( activated() ), this, SLOT( do_gotomark() ) ); 819 connect( m_goto_action, SIGNAL( activated() ), this, SLOT( do_gotomark() ) );
820 m_goto_action->addTo( marks ); 820 m_goto_action->addTo( marks );
821 821
822 m_delete_action = new QAction( tr( "Delete" ), getmyicon( "bookmark_delete" ), QString::null, 0, this, NULL); 822 m_delete_action = new QAction( tr( "Delete" ), getmyicon( "bookmark_delete" ), QString::null, 0, this, NULL);
823 connect( m_delete_action, SIGNAL( activated() ), this, SLOT( do_delmark() ) ); 823 connect( m_delete_action, SIGNAL( activated() ), this, SLOT( do_delmark() ) );
824 m_delete_action->addTo( marks ); 824 m_delete_action->addTo( marks );
825 825
826 m_autogen_action = new QAction( tr( "Autogen" ), geticon( "exec" ), QString::null, 0, this, NULL, false ); 826 m_autogen_action = new QAction( tr( "Autogen" ), geticon( "exec" ), QString::null, 0, this, NULL, false );
827 connect( m_autogen_action, SIGNAL( activated() ), this, SLOT( do_autogen() ) ); 827 connect( m_autogen_action, SIGNAL( activated() ), this, SLOT( do_autogen() ) );
828 marks->insertSeparator(); 828 marks->insertSeparator();
829 m_autogen_action->addTo( marks ); 829 m_autogen_action->addTo( marks );
830 830
831 m_clear_action = new QAction( tr( "Clear" ), getmyicon( "bookmark_clear" ), QString::null, 0, this, NULL); 831 m_clear_action = new QAction( tr( "Clear" ), getmyicon( "bookmark_clear" ), QString::null, 0, this, NULL);
832 connect( m_clear_action, SIGNAL( activated() ), this, SLOT( clearBkmkList() ) ); 832 connect( m_clear_action, SIGNAL( activated() ), this, SLOT( clearBkmkList() ) );
833 m_clear_action->addTo( marks ); 833 m_clear_action->addTo( marks );
834 834
835 m_save_action = new QAction( tr( "Save" ), getmyicon( "bookmark_save" ), QString::null, 0, this, NULL ); 835 m_save_action = new QAction( tr( "Save" ), getmyicon( "bookmark_save" ), QString::null, 0, this, NULL );
836 connect( m_save_action, SIGNAL( activated() ), this, SLOT( savebkmks() ) ); 836 connect( m_save_action, SIGNAL( activated() ), this, SLOT( savebkmks() ) );
837 m_save_action->addTo( marks ); 837 m_save_action->addTo( marks );
838 838
839 m_tidy_action = new QAction( tr( "Tidy" ), getmyicon( "bookmark_tidy" ), QString::null, 0, this, NULL); 839 m_tidy_action = new QAction( tr( "Tidy" ), getmyicon( "bookmark_tidy" ), QString::null, 0, this, NULL);
840 connect( m_tidy_action, SIGNAL( activated() ), this, SLOT( listBkmkFiles() ) ); 840 connect( m_tidy_action, SIGNAL( activated() ), this, SLOT( listBkmkFiles() ) );
841 marks->insertSeparator(); 841 marks->insertSeparator();
842 m_tidy_action->addTo( marks ); 842 m_tidy_action->addTo( marks );
843 843
844 m_startBlock_action = new QAction( tr( "Start Block" ), geticon( "new" ), QString::null, 0, this, NULL); 844 m_startBlock_action = new QAction( tr( "Start Block" ), geticon( "new" ), QString::null, 0, this, NULL);
845 connect( m_startBlock_action, SIGNAL( activated() ), this, SLOT( editMark() ) ); 845 connect( m_startBlock_action, SIGNAL( activated() ), this, SLOT( editMark() ) );
846 marks->insertSeparator(); 846 marks->insertSeparator();
847 m_startBlock_action->addTo( marks ); 847 m_startBlock_action->addTo( marks );
848 848
849 m_endBlock_action = new QAction( tr( "Copy Block" ), geticon( "copy" ), QString::null, 0, this, NULL); 849 m_endBlock_action = new QAction( tr( "Copy Block" ), geticon( "copy" ), QString::null, 0, this, NULL);
850 connect( m_endBlock_action, SIGNAL( activated() ), this, SLOT( editCopy() ) ); 850 connect( m_endBlock_action, SIGNAL( activated() ), this, SLOT( editCopy() ) );
851 m_endBlock_action->addTo( marks ); 851 m_endBlock_action->addTo( marks );
852 852
853 m_bkmkAvail = NULL; 853 m_bkmkAvail = NULL;
854 854
855 855
856 setToolBarsMovable(m_tbmove); 856 setToolBarsMovable(m_tbmove);
857 addtoolbars(&config); 857 addtoolbars(&config);
858 if (m_hidebars) 858 if (m_hidebars)
859 { 859 {
860#if defined(USEQPE) 860#if defined(USEQPE)
861 menubar->hide(); 861 menubar->hide();
862#endif 862#endif
863 if (fileBar != NULL) fileBar->hide(); 863 if (fileBar != NULL) fileBar->hide();
864 if (viewBar != NULL) viewBar->hide(); 864 if (viewBar != NULL) viewBar->hide();
865 if (navBar != NULL) navBar->hide(); 865 if (navBar != NULL) navBar->hide();
866 if (markBar != NULL) markBar->hide(); 866 if (markBar != NULL) markBar->hide();
867 mb->hide(); 867 mb->hide();
868 } 868 }
869 869
870 870
871 pbar = new QProgressBar(this); 871 pbar = new QProgressBar(this);
872 pbar->hide(); 872 pbar->hide();
873 873
874 searchBar = new QFloatBar( "Search", this, QMainWindow::Top, TRUE ); 874 searchBar = new QFloatBar( "Search", this, QMainWindow::Top, TRUE );
875 875
876 searchBar->setHorizontalStretchable( TRUE ); 876 searchBar->setHorizontalStretchable( TRUE );
877 877
878 connect(searchBar, SIGNAL( OnHide() ), this, SLOT( restoreFocus() )); 878 connect(searchBar, SIGNAL( OnHide() ), this, SLOT( restoreFocus() ));
879 879
880 searchEdit = new QLineEdit( searchBar, "searchEdit" ); 880 searchEdit = new QLineEdit( searchBar, "searchEdit" );
881// QFont f("unifont", 16 /*, QFont::Bold*/); 881// QFont f("unifont", 16 /*, QFont::Bold*/);
882// searchEdit->setFont( f ); 882// searchEdit->setFont( f );
883 searchBar->setStretchableWidget( searchEdit ); 883 searchBar->setStretchableWidget( searchEdit );
884 884
885 885
886#ifdef __ISEARCH 886#ifdef __ISEARCH
887 connect( searchEdit, SIGNAL( textChanged( const QString & ) ), 887 connect( searchEdit, SIGNAL( textChanged( const QString & ) ),
888 this, SLOT( search( const QString& ) ) ); 888 this, SLOT( search( const QString& ) ) );
889#else 889#else
890 connect( searchEdit, SIGNAL( returnPressed( ) ), 890 connect( searchEdit, SIGNAL( returnPressed( ) ),
891 this, SLOT( search( ) ) ); 891 this, SLOT( search( ) ) );
892#endif 892#endif
893 QAction*a = new QAction( tr( "Find Next" ), geticon( "next" ), QString::null, 0, this, 0 ); 893 QAction*a = new QAction( tr( "Find Next" ), geticon( "next" ), QString::null, 0, this, 0 );
894 connect( a, SIGNAL( activated() ), this, SLOT( findNext() ) ); 894 connect( a, SIGNAL( activated() ), this, SLOT( findNext() ) );
895 a->addTo( searchBar ); 895 a->addTo( searchBar );
896 896
897 a = new QAction( tr( "Close Find" ), geticon( "close" ), QString::null, 0, this, 0 ); 897 a = new QAction( tr( "Close Find" ), geticon( "close" ), QString::null, 0, this, 0 );
898 connect( a, SIGNAL( activated() ), this, SLOT( findClose() ) ); 898 connect( a, SIGNAL( activated() ), this, SLOT( findClose() ) );
899 a->addTo( searchBar ); 899 a->addTo( searchBar );
900 900
901 searchBar->hide(); 901 searchBar->hide();
902 902
903 regBar = new QFloatBar( "Autogen", this, QMainWindow::Top, TRUE ); 903 regBar = new QFloatBar( "Autogen", this, QMainWindow::Top, TRUE );
904 connect(regBar, SIGNAL( OnHide() ), this, SLOT( restoreFocus() )); 904 connect(regBar, SIGNAL( OnHide() ), this, SLOT( restoreFocus() ));
905 905
906 regBar->setHorizontalStretchable( TRUE ); 906 regBar->setHorizontalStretchable( TRUE );
907 907
908 regEdit = new QLineEdit( regBar, "regEdit" ); 908 regEdit = new QLineEdit( regBar, "regEdit" );
909// regEdit->setFont( f ); 909// regEdit->setFont( f );
910 910
911 regBar->setStretchableWidget( regEdit ); 911 regBar->setStretchableWidget( regEdit );
912 912
913 connect( regEdit, SIGNAL( returnPressed( ) ), 913 connect( regEdit, SIGNAL( returnPressed( ) ),
914 this, SLOT( do_regaction() ) ); 914 this, SLOT( do_regaction() ) );
915 915
916 a = new QAction( tr( "Do Reg" ), geticon( "enter" ), QString::null, 0, this, 0 ); 916 a = new QAction( tr( "Do Reg" ), geticon( "enter" ), QString::null, 0, this, 0 );
917 connect( a, SIGNAL( activated() ), this, SLOT( do_regaction() ) ); 917 connect( a, SIGNAL( activated() ), this, SLOT( do_regaction() ) );
918 a->addTo( regBar ); 918 a->addTo( regBar );
919 919
920 a = new QAction( tr( "Close Edit" ), geticon( "close" ), QString::null, 0, this, 0 ); 920 a = new QAction( tr( "Close Edit" ), geticon( "close" ), QString::null, 0, this, 0 );
921 connect( a, SIGNAL( activated() ), this, SLOT( regClose() ) ); 921 connect( a, SIGNAL( activated() ), this, SLOT( regClose() ) );
922 a->addTo( regBar ); 922 a->addTo( regBar );
923 923
924 regBar->hide(); 924 regBar->hide();
925 925
926 m_fontBar = new QToolBar( "Autogen", this, QMainWindow::Top, TRUE ); 926 m_fontBar = new QToolBar( "Autogen", this, QMainWindow::Top, TRUE );
927 927
928 m_fontBar->setHorizontalStretchable( TRUE ); 928 m_fontBar->setHorizontalStretchable( TRUE );
929 929
930// qDebug("Font selector"); 930// qDebug("Font selector");
931 m_fontSelector = new QComboBox(false, m_fontBar); 931 m_fontSelector = new QComboBox(false, m_fontBar);
932 m_fontBar->setStretchableWidget( m_fontSelector ); 932 m_fontBar->setStretchableWidget( m_fontSelector );
933 { 933 {
934 QFontDatabase f; 934 QFontDatabase f;
935 QStringList flist = f.families(); 935 QStringList flist = f.families();
936 bool realfont = false; 936 bool realfont = false;
937 for (QStringList::Iterator nm = flist.begin(); nm != flist.end(); nm++) 937 for (QStringList::Iterator nm = flist.begin(); nm != flist.end(); nm++)
938 { 938 {
939 if (reader->m_fontname == *nm) 939 if (reader->m_fontname == *nm)
940 { 940 {
941 realfont = true; 941 realfont = true;
942 } 942 }
943 if ((*nm).contains(FIXEDFONT,false)) reader->m_fontControl.hasCourier(true, *nm); 943 if ((*nm).contains(FIXEDFONT,false)) reader->m_fontControl.hasCourier(true, *nm);
944 } 944 }
945 if (!realfont) reader->m_fontname = flist[0]; 945 if (!realfont) reader->m_fontname = flist[0];
946 } // delete the FontDatabase!!! 946 } // delete the FontDatabase!!!
947 connect( m_fontSelector, SIGNAL( activated(const QString& ) ), 947 connect( m_fontSelector, SIGNAL( activated(const QString& ) ),
948 this, SLOT( do_setfont(const QString&) ) ); 948 this, SLOT( do_setfont(const QString&) ) );
949 connect( m_fontSelector, SIGNAL( activated(int ) ), 949 connect( m_fontSelector, SIGNAL( activated(int ) ),
950 this, SLOT( do_setencoding(int) ) ); 950 this, SLOT( do_setencoding(int) ) );
951 951
952 m_fontBar->hide(); 952 m_fontBar->hide();
953 m_fontVisible = false; 953 m_fontVisible = false;
954#ifdef USEMSGS 954#ifdef USEMSGS
955 connect(qApp, SIGNAL( appMessage(const QCString&, const QByteArray& ) ), 955 connect(qApp, SIGNAL( appMessage(const QCString&, const QByteArray& ) ),
956 this, SLOT( msgHandler(const QCString&, const QByteArray&) ) ); 956 this, SLOT( msgHandler(const QCString&, const QByteArray&) ) );
957#endif 957#endif
958// qDebug("Initing"); 958// qDebug("Initing");
959 959
960 m_layout->addWidget(editorStack); 960 m_layout->addWidget(editorStack);
961 if (m_qtscroll != 0) 961 if (m_qtscroll != 0)
962 { 962 {
963 /* 963 /*
964 m_scrollbar = new QToolBar( "Autogen", this, (m_localscrollbar) ? QMainWindow::Left : QMainWindow::Right, TRUE ); 964 m_scrollbar = new QToolBar( "Autogen", this, (m_localscrollbar) ? QMainWindow::Left : QMainWindow::Right, TRUE );
965 965
966 m_scrollbar->setVerticalStretchable( TRUE ); 966 m_scrollbar->setVerticalStretchable( TRUE );
967 */ 967 */
968 scrollbar = m_scrollbar = new QScrollBar(QScrollBar::Vertical, widge); 968 scrollbar = m_scrollbar = new QScrollBar(QScrollBar::Vertical, widge);
969 m_layout->addWidget(scrollbar); 969 m_layout->addWidget(scrollbar);
970 scrollbar->setTracking(false); 970 scrollbar->setTracking(false);
971 //connect(scrollbar, SIGNAL(sliderMoved(int)), this, SLOT(actionscroll(int)) ); 971 //connect(scrollbar, SIGNAL(sliderMoved(int)), this, SLOT(actionscroll(int)) );
972 //m_scrollbar->setStretchableWidget( scrollbar ); 972 //m_scrollbar->setStretchableWidget( scrollbar );
973 if (m_scrollishidden) 973 if (m_scrollishidden)
974 { 974 {
975 m_scrollbar->hide(); 975 m_scrollbar->hide();
976 } 976 }
977 else 977 else
978 { 978 {
979 m_scrollbar->show(); 979 m_scrollbar->show();
980 } 980 }
981 981
982 setrotated(reader->m_rotated); 982 setrotated(reader->m_rotated);
983 } 983 }
984 else 984 else
985 { 985 {
986 m_scrollbar = NULL; 986 m_scrollbar = NULL;
987 } 987 }
988 setBackgroundBitmap(); 988 setBackgroundBitmap();
989 m_inverse_action->setOn(reader->bInverse); 989 m_inverse_action->setOn(reader->bInverse);
990 reader->init(); 990 reader->init();
991 991
992// qDebug("Inited"); 992// qDebug("Inited");
993// m_buttonAction[m_spaceTarget]->setOn(true); 993// m_buttonAction[m_spaceTarget]->setOn(true);
994// qDebug("fonting"); 994// qDebug("fonting");
995 do_setfont(reader->m_fontname); 995 do_setfont(reader->m_fontname);
996 // qDebug("fonted"); 996 // qDebug("fonted");
997 QFont progfont(reader->m_fontname, reader->m_fontControl.getsize(0)); 997 QFont progfont(reader->m_fontname, reader->m_fontControl.getsize(0));
998 m_prog->setFont( progfont ); 998 m_prog->setFont( progfont );
999 if (m_statusishidden) m_prog->hide(); 999 if (m_statusishidden) m_prog->hide();
1000 showEditTools(); 1000 showEditTools();
1001 if (!reader->m_lastfile.isEmpty()) 1001 if (!reader->m_lastfile.isEmpty())
1002 { 1002 {
1003 //qDebug("doclnk"); 1003 //qDebug("doclnk");
1004 //doc = new DocLnk(reader->m_lastfile); 1004 //doc = new DocLnk(reader->m_lastfile);
1005 //qDebug("doclnk done"); 1005 //qDebug("doclnk done");
1006 if (pOpenlist != NULL) 1006 if (pOpenlist != NULL)
1007 { 1007 {
1008 1008
1009/* 1009/*
1010 int ind = 0; 1010 int ind = 0;
1011 Bkmk* p = (*pOpenlist)[ind]; 1011 Bkmk* p = (*pOpenlist)[ind];
1012 while (p != NULL && toQString(CFiledata(p->anno()).name()) != reader->m_lastfile) 1012 while (p != NULL && toQString(CFiledata(p->anno()).name()) != reader->m_lastfile)
1013 { 1013 {
1014 p = (*pOpenlist)[++ind]; 1014 p = (*pOpenlist)[++ind];
1015 } 1015 }
1016*/ 1016*/
1017 Bkmk* p = NULL; 1017 Bkmk* p = NULL;
1018 for (CList<Bkmk>::iterator iter = pOpenlist->begin(); iter != pOpenlist->end(); iter++) 1018 for (CList<Bkmk>::iterator iter = pOpenlist->begin(); iter != pOpenlist->end(); iter++)
1019 { 1019 {
1020 p = iter.pContent(); 1020 p = iter.pContent();
1021 if (toQString(CFiledata(p->anno()).name()) == reader->m_lastfile) 1021 if (toQString(CFiledata(p->anno()).name()) == reader->m_lastfile)
1022 { 1022 {
1023 break; 1023 break;
1024 } 1024 }
1025 // qDebug("Item:%s", (const char*)toQString(CFiledata(p->anno()).name())); 1025 // qDebug("Item:%s", (const char*)toQString(CFiledata(p->anno()).name()));
1026 p = NULL; 1026 p = NULL;
1027 } 1027 }
1028 if (p != NULL) 1028 if (p != NULL)
1029 { 1029 {
1030 if (!openfrombkmk(p)) 1030 if (!openfrombkmk(p))
1031 { 1031 {
1032 showEditTools(); 1032 showEditTools();
1033 } 1033 }
1034 } 1034 }
1035 else 1035 else
1036 { 1036 {
1037 openFile( reader->m_lastfile ); 1037 openFile( reader->m_lastfile );
1038 } 1038 }
1039 } 1039 }
1040 else 1040 else
1041 { 1041 {
1042 if (!reader->m_lastfile.isEmpty()) 1042 if (!reader->m_lastfile.isEmpty())
1043 { 1043 {
1044 openFile( reader->m_lastfile ); 1044 openFile( reader->m_lastfile );
1045 } 1045 }
1046 } 1046 }
1047 } 1047 }
1048 else 1048 else
1049 { 1049 {
1050 showEditTools(); 1050 showEditTools();
1051 } 1051 }
1052// qApp->processEvents(); 1052// qApp->processEvents();
1053 if (m_scrollbar == NULL || m_scrollbar->isHidden()) 1053 if (m_scrollbar == NULL || m_scrollbar->isHidden())
1054 { 1054 {
1055 reader->m_scrollpos = m_localscroll; 1055 reader->m_scrollpos = m_localscroll;
1056 } 1056 }
1057 else 1057 else
1058 { 1058 {
1059 reader->m_scrollpos = (m_qtscroll == 0) ? m_localscroll : 0; 1059 reader->m_scrollpos = (m_qtscroll == 0) ? m_localscroll : 0;
1060 } 1060 }
1061 // reader->bDoUpdates = true; 1061 // reader->bDoUpdates = true;
1062 // reader->update(); 1062 // reader->update();
1063 config.setGroup("Version"); 1063 config.setGroup("Version");
1064 int major = config.readNumEntry("Major", 0); 1064 int major = config.readNumEntry("Major", 0);
1065 int bkmktype = config.readNumEntry("BkmkType", 0); 1065 int bkmktype = config.readNumEntry("BkmkType", 0);
1066 char minor = config.readNumEntry("Minor", 0); 1066 char minor = config.readNumEntry("Minor", 0);
1067 if (CheckVersion(major, bkmktype, minor, this)) 1067 if (CheckVersion(major, bkmktype, minor, this))
1068 { 1068 {
1069 config.writeEntry("Major", major); 1069 config.writeEntry("Major", major);
1070 config.writeEntry("BkmkType", bkmktype); 1070 config.writeEntry("BkmkType", bkmktype);
1071 config.writeEntry("Minor", (int)minor); 1071 config.writeEntry("Minor", (int)minor);
1072 } 1072 }
1073// qDebug("finished update"); 1073// qDebug("finished update");
1074 if (kmap.isEmpty()) 1074 if (kmap.isEmpty())
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