Diffstat (limited to 'noncore/apps/opie-gutenbrowser/gutenbrowserData.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-gutenbrowser/gutenbrowserData.cpp | 38 |
1 files changed, 21 insertions, 17 deletions
diff --git a/noncore/apps/opie-gutenbrowser/gutenbrowserData.cpp b/noncore/apps/opie-gutenbrowser/gutenbrowserData.cpp index c9149ac..a226258 100644 --- a/noncore/apps/opie-gutenbrowser/gutenbrowserData.cpp +++ b/noncore/apps/opie-gutenbrowser/gutenbrowserData.cpp | |||
@@ -12,7 +12,10 @@ | |||
12 | * (at your option) any later version. * | 12 | * (at your option) any later version. * |
13 | ***************************************************************************/ | 13 | ***************************************************************************/ |
14 | |||
14 | //#include "gutenbrowserData.h" | 15 | //#include "gutenbrowserData.h" |
15 | #include "gutenbrowser.h" | 16 | #include "gutenbrowser.h" |
16 | 17 | ||
18 | /* OPIE */ | ||
19 | #include <opie2/odebug.h> | ||
17 | #include <qpe/config.h> | 20 | #include <qpe/config.h> |
18 | #include <qpe/fontdatabase.h> | 21 | #include <qpe/fontdatabase.h> |
@@ -21,4 +24,5 @@ | |||
21 | #include <qpe/qpeapplication.h> | 24 | #include <qpe/qpeapplication.h> |
22 | 25 | ||
26 | /* QT */ | ||
23 | #include <qfontinfo.h> | 27 | #include <qfontinfo.h> |
24 | #include <qtoolbutton.h> | 28 | #include <qtoolbutton.h> |
@@ -36,9 +40,9 @@ void Gutenbrowser::initSlots() { | |||
36 | connect(qApp,SIGNAL(aboutToQuit()),SLOT(cleanUp())); | 40 | connect(qApp,SIGNAL(aboutToQuit()),SLOT(cleanUp())); |
37 | connect(mainList,SIGNAL(clicked(QListBoxItem *)),SLOT(listClickedSlot(QListBoxItem *))); | 41 | connect(mainList,SIGNAL(clicked(QListBoxItem *)),SLOT(listClickedSlot(QListBoxItem *))); |
38 | connect(bookmarksMenu,SIGNAL(activated(int)),SLOT(Bookmark(int))); | 42 | connect(bookmarksMenu,SIGNAL(activated(int)),SLOT(Bookmark(int))); |
39 | } | 43 | } |
40 | 44 | ||
41 | void Gutenbrowser::initConfig() { | 45 | void Gutenbrowser::initConfig() { |
42 | //qDebug("Starting configuration."); | 46 | //odebug << "Starting configuration." << oendl; |
43 | QDir library(local_library); | 47 | QDir library(local_library); |
44 | if ( !library.exists()) { | 48 | if ( !library.exists()) { |
@@ -58,5 +62,5 @@ void Gutenbrowser::initConfig() { | |||
58 | 62 | ||
59 | } | 63 | } |
60 | // qDebug( "init file is %s",iniFile.latin1()); | 64 | // odebug << "init file is " << iniFile << "" << oendl; |
61 | 65 | ||
62 | #ifdef Q_WS_QWS | 66 | #ifdef Q_WS_QWS |
@@ -138,5 +142,5 @@ void Gutenbrowser::initConfig() { | |||
138 | ftp_base_dir= config.readEntry("base", "/pub/gutenberg"); | 142 | ftp_base_dir= config.readEntry("base", "/pub/gutenberg"); |
139 | 143 | ||
140 | //bool ok2; | 144 | //bool ok2; |
141 | QString temp; | 145 | QString temp; |
142 | QString copying; | 146 | QString copying; |
@@ -148,7 +152,7 @@ void Gutenbrowser::initConfig() { | |||
148 | if(qExit=="TRUE") { | 152 | if(qExit=="TRUE") { |
149 | b_queryExit=TRUE; | 153 | b_queryExit=TRUE; |
150 | // qDebug("Please query before leaving the library."); | 154 | // odebug << "Please query before leaving the library." << oendl; |
151 | } else { | 155 | } else { |
152 | // qDebug("Please DO NOT query before leaving the library."); | 156 | // odebug << "Please DO NOT query before leaving the library." << oendl; |
153 | b_queryExit=FALSE; | 157 | b_queryExit=FALSE; |
154 | } | 158 | } |
@@ -156,5 +160,5 @@ void Gutenbrowser::initConfig() { | |||
156 | // config.setGroup("Titles"); | 160 | // config.setGroup("Titles"); |
157 | // QString tmpTitle=config.readEntry(file_name,""); | 161 | // QString tmpTitle=config.readEntry(file_name,""); |
158 | 162 | ||
159 | 163 | ||
160 | }// end initConfig() | 164 | }// end initConfig() |
@@ -162,5 +166,5 @@ void Gutenbrowser::initConfig() { | |||
162 | void Gutenbrowser::initMenuBar() | 166 | void Gutenbrowser::initMenuBar() |
163 | { | 167 | { |
164 | // qDebug("Starting menu init."); | 168 | // odebug << "Starting menu init." << oendl; |
165 | // menuBar entry fileMenu | 169 | // menuBar entry fileMenu |
166 | menubar = new QPEMenuBar(this); | 170 | menubar = new QPEMenuBar(this); |
@@ -177,12 +181,12 @@ void Gutenbrowser::initMenuBar() | |||
177 | 181 | ||
178 | editMenu=new QPopupMenu(); | 182 | editMenu=new QPopupMenu(); |
179 | 183 | ||
180 | editMenu->insertItem(Resource::loadPixmap("up"), "Top", | 184 | editMenu->insertItem(Resource::loadPixmap("up"), "Top", |
181 | this, SLOT(TopBtn()) ); | 185 | this, SLOT(TopBtn()) ); |
182 | editMenu->insertItem( Resource::loadPixmap("back"), "Beginning", | 186 | editMenu->insertItem( Resource::loadPixmap("back"), "Beginning", |
183 | this, SLOT(doBeginBtn()) ); | 187 | this, SLOT(doBeginBtn()) ); |
184 | editMenu->insertItem( Resource::loadPixmap("gutenbrowser/search"), "Search", | 188 | editMenu->insertItem( Resource::loadPixmap("gutenbrowser/search"), "Search", |
185 | this, SLOT(SearchBtn()) ); | 189 | this, SLOT(SearchBtn()) ); |
186 | 190 | ||
187 | editMenu->insertItem("Clear", this, SLOT(ClearEdit()) ); | 191 | editMenu->insertItem("Clear", this, SLOT(ClearEdit()) ); |
188 | 192 | ||
@@ -208,5 +212,5 @@ void Gutenbrowser::initMenuBar() | |||
208 | void Gutenbrowser::initButtonBar() | 212 | void Gutenbrowser::initButtonBar() |
209 | { | 213 | { |
210 | //qDebug("Starting buttonbar init."); | 214 | //odebug << "Starting buttonbar init." << oendl; |
211 | 215 | ||
212 | OpenButton = new QPushButton( this, "OpenButton" ); | 216 | OpenButton = new QPushButton( this, "OpenButton" ); |
@@ -223,5 +227,5 @@ void Gutenbrowser::initButtonBar() | |||
223 | ForwardButton->setFocusPolicy( QWidget::TabFocus ); | 227 | ForwardButton->setFocusPolicy( QWidget::TabFocus ); |
224 | // ForwardButton->setAutoRepeat(TRUE); | 228 | // ForwardButton->setAutoRepeat(TRUE); |
225 | 229 | ||
226 | SearchButton = new QPushButton( this, "SearchButton" ); | 230 | SearchButton = new QPushButton( this, "SearchButton" ); |
227 | SearchButton->setFocusPolicy( QWidget::TabFocus ); | 231 | SearchButton->setFocusPolicy( QWidget::TabFocus ); |
@@ -235,5 +239,5 @@ void Gutenbrowser::initButtonBar() | |||
235 | bookmarksMenu = new QPopupMenu(); | 239 | bookmarksMenu = new QPopupMenu(); |
236 | bookmarksMenu->insertItem("Last Set", this, SLOT(Bookmark( int) )); | 240 | bookmarksMenu->insertItem("Last Set", this, SLOT(Bookmark( int) )); |
237 | 241 | ||
238 | lastBmkButton->setPopup(bookmarksMenu); | 242 | lastBmkButton->setPopup(bookmarksMenu); |
239 | 243 | ||
@@ -242,5 +246,5 @@ void Gutenbrowser::initButtonBar() | |||
242 | 246 | ||
243 | InfoBar = new QPushButton( this, "Info_Bar" ); | 247 | InfoBar = new QPushButton( this, "Info_Bar" ); |
244 | // qDebug("Infobar"); | 248 | // odebug << "Infobar" << oendl; |
245 | // if(!useSplitter) { | 249 | // if(!useSplitter) { |
246 | 250 | ||
@@ -277,5 +281,5 @@ void Gutenbrowser::initView() | |||
277 | // QFont defaultFont( "charter", 10, 50, 0 ); | 281 | // QFont defaultFont( "charter", 10, 50, 0 ); |
278 | Lview = new MultiLine_Ex(this); | 282 | Lview = new MultiLine_Ex(this); |
279 | 283 | ||
280 | Config cfg("Gutenbrowser"); | 284 | Config cfg("Gutenbrowser"); |
281 | cfg.setGroup("Font"); | 285 | cfg.setGroup("Font"); |
@@ -294,5 +298,5 @@ void Gutenbrowser::initView() | |||
294 | QString italic=cfg.readEntry("Italic","FALSE"); | 298 | QString italic=cfg.readEntry("Italic","FALSE"); |
295 | if(italic=="TRUE") { | 299 | if(italic=="TRUE") { |
296 | qDebug("Set Italic font"); | 300 | odebug << "Set Italic font" << oendl; |
297 | defaultFont = fdb.font(family,"Regular",i_size,charSet); //workaround | 301 | defaultFont = fdb.font(family,"Regular",i_size,charSet); //workaround |
298 | defaultFont.setItalic(TRUE); | 302 | defaultFont.setItalic(TRUE); |