author | mickeyl <mickeyl> | 2004-04-04 13:54:40 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2004-04-04 13:54:40 (UTC) |
commit | 16cf79e90b5217f8d4bfce2a0fa817ae4b73db36 (patch) (unidiff) | |
tree | 0701eae15aa606a0211a2fccfde0eafdac69357c /noncore/apps/opie-bartender | |
parent | 8d2d2664e5f544b8292806e617deb7a0e4170dc0 (diff) | |
download | opie-16cf79e90b5217f8d4bfce2a0fa817ae4b73db36.zip opie-16cf79e90b5217f8d4bfce2a0fa817ae4b73db36.tar.gz opie-16cf79e90b5217f8d4bfce2a0fa817ae4b73db36.tar.bz2 |
convert to Opie Debugging Framework
-rw-r--r-- | noncore/apps/opie-bartender/bartender.cpp | 35 | ||||
-rw-r--r-- | noncore/apps/opie-bartender/bartender.pro | 3 | ||||
-rw-r--r-- | noncore/apps/opie-bartender/config.in | 3 |
3 files changed, 22 insertions, 19 deletions
diff --git a/noncore/apps/opie-bartender/bartender.cpp b/noncore/apps/opie-bartender/bartender.cpp index e6cb515..59fc242 100644 --- a/noncore/apps/opie-bartender/bartender.cpp +++ b/noncore/apps/opie-bartender/bartender.cpp | |||
@@ -7,49 +7,52 @@ | |||
7 | * This program is free software; you can redistribute it and/or modify * | 7 | * This program is free software; you can redistribute it and/or modify * |
8 | * it under the terms of the GNU General Public License as published by * | 8 | * it under the terms of the GNU General Public License as published by * |
9 | * the Free Software Foundation; either version 2 of the License, or * | 9 | * the Free Software Foundation; either version 2 of the License, or * |
10 | * (at your option) any later version. * | 10 | * (at your option) any later version. * |
11 | ***************************************************************************/ | 11 | ***************************************************************************/ |
12 | 12 | ||
13 | #include "bartender.h" | 13 | #include "bartender.h" |
14 | #include "showdrinks.h" | 14 | #include "showdrinks.h" |
15 | #include "inputDialog.h" | 15 | #include "inputDialog.h" |
16 | #include "searchresults.h" | 16 | #include "searchresults.h" |
17 | #include "bac.h" | 17 | #include "bac.h" |
18 | 18 | ||
19 | #include <qtoolbar.h> | 19 | /* OPIE */ |
20 | #include <qmenubar.h> | 20 | #include <opie2/odebug.h> |
21 | //#include <opie2/colorpopupmenu.h> | ||
22 | #include <qpe/qpeapplication.h> | 21 | #include <qpe/qpeapplication.h> |
23 | #include <qpe/resource.h> | 22 | #include <qpe/resource.h> |
23 | using namespace Opie::Core; | ||
24 | 24 | ||
25 | /* QT */ | ||
25 | #include <qlineedit.h> | 26 | #include <qlineedit.h> |
26 | #include <qdir.h> | 27 | #include <qdir.h> |
27 | #include <qpushbutton.h> | 28 | #include <qpushbutton.h> |
28 | #include <qlistbox.h> | 29 | #include <qlistbox.h> |
29 | #include <qmultilineedit.h> | 30 | #include <qmultilineedit.h> |
30 | #include <qmessagebox.h> | 31 | #include <qmessagebox.h> |
31 | #include <qtextstream.h> | 32 | #include <qtextstream.h> |
32 | #include <qaction.h> | 33 | #include <qaction.h> |
33 | #include <qheader.h> | 34 | #include <qheader.h> |
34 | #include <qlistview.h> | 35 | #include <qlistview.h> |
35 | #include <qlayout.h> | 36 | #include <qlayout.h> |
37 | #include <qtoolbar.h> | ||
38 | #include <qmenubar.h> | ||
36 | 39 | ||
40 | /* STD */ | ||
37 | #include <fcntl.h> | 41 | #include <fcntl.h> |
38 | #include <unistd.h> | 42 | #include <unistd.h> |
39 | #include <stdlib.h> | 43 | #include <stdlib.h> |
40 | #include <stdio.h> | 44 | #include <stdio.h> |
41 | #include <errno.h> | 45 | #include <errno.h> |
42 | 46 | ||
43 | |||
44 | Bartender::Bartender( QWidget* parent, const char* name, WFlags fl ) | 47 | Bartender::Bartender( QWidget* parent, const char* name, WFlags fl ) |
45 | : QMainWindow( parent, name, fl ) { | 48 | : QMainWindow( parent, name, fl ) { |
46 | if ( !name ) | 49 | if ( !name ) |
47 | setName( "Bartender" ); | 50 | setName( "Bartender" ); |
48 | QGridLayout *layout = new QGridLayout( this ); | 51 | QGridLayout *layout = new QGridLayout( this ); |
49 | layout->setSpacing( 2); | 52 | layout->setSpacing( 2); |
50 | layout->setMargin( 2); | 53 | layout->setMargin( 2); |
51 | connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); | 54 | connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); |
52 | 55 | ||
53 | setCaption( tr( "Bartender" ) ); | 56 | setCaption( tr( "Bartender" ) ); |
54 | 57 | ||
55 | ToolBar1 = new QToolBar( this, "ToolBar1" ); | 58 | ToolBar1 = new QToolBar( this, "ToolBar1" ); |
@@ -135,52 +138,52 @@ void Bartender::initDrinkDb() { | |||
135 | } | 138 | } |
136 | 139 | ||
137 | void Bartender::fillList() { | 140 | void Bartender::fillList() { |
138 | dbFile.at(1); | 141 | dbFile.at(1); |
139 | DrinkView->clear(); | 142 | DrinkView->clear(); |
140 | int i=0; | 143 | int i=0; |
141 | QListViewItem * item ; | 144 | QListViewItem * item ; |
142 | QTextStream t( &dbFile); | 145 | QTextStream t( &dbFile); |
143 | QString s; | 146 | QString s; |
144 | while ( !t.eof()) { | 147 | while ( !t.eof()) { |
145 | s = t.readLine(); | 148 | s = t.readLine(); |
146 | if(s.find("#",0,TRUE) != -1) { | 149 | if(s.find("#",0,TRUE) != -1) { |
147 | // qDebug(s.right(s.length()-2)); | 150 | // odebug << s.right(s.length()-2) << oendl; |
148 | item= new QListViewItem( DrinkView, 0 ); | 151 | item= new QListViewItem( DrinkView, 0 ); |
149 | item->setText( 0, s.right(s.length()-2)); | 152 | item->setText( 0, s.right(s.length()-2)); |
150 | i++; | 153 | i++; |
151 | } | 154 | } |
152 | } | 155 | } |
153 | qDebug("there are currently %d of drinks", i); | 156 | odebug << "there are currently " << i << " of drinks" << oendl; |
154 | } | 157 | } |
155 | 158 | ||
156 | void Bartender::fileNew() { | 159 | void Bartender::fileNew() { |
157 | 160 | ||
158 | New_Drink *newDrinks; | 161 | New_Drink *newDrinks; |
159 | newDrinks = new New_Drink(this,"New Drink....", TRUE); | 162 | newDrinks = new New_Drink(this,"New Drink....", TRUE); |
160 | QString newName, newIng; | 163 | QString newName, newIng; |
161 | QPEApplication::execDialog( newDrinks ); | 164 | QPEApplication::execDialog( newDrinks ); |
162 | newName = newDrinks->LineEdit1->text(); | 165 | newName = newDrinks->LineEdit1->text(); |
163 | newIng= newDrinks->MultiLineEdit1->text(); | 166 | newIng= newDrinks->MultiLineEdit1->text(); |
164 | 167 | ||
165 | if(dbFile.isOpen()) | 168 | if(dbFile.isOpen()) |
166 | dbFile.close(); | 169 | dbFile.close(); |
167 | if ( !dbFile.open( IO_WriteOnly| IO_Append)) { | 170 | if ( !dbFile.open( IO_WriteOnly| IO_Append)) { |
168 | QMessageBox::message( (tr("Note")), (tr("Drink database not opened sucessfully.\n")) ); | 171 | QMessageBox::message( (tr("Note")), (tr("Drink database not opened sucessfully.\n")) ); |
169 | return; | 172 | return; |
170 | } | 173 | } |
171 | if(newDrinks ->result() == 1 ) { | 174 | if(newDrinks ->result() == 1 ) { |
172 | QString newDrink="\n# "+newName+"\n"; | 175 | QString newDrink="\n# "+newName+"\n"; |
173 | newDrink.append(newIng+"\n"); | 176 | newDrink.append(newIng+"\n"); |
174 | qDebug("writing "+newDrink); | 177 | odebug << "writing "+newDrink << oendl; |
175 | dbFile.writeBlock( newDrink.latin1(), newDrink.length()); | 178 | dbFile.writeBlock( newDrink.latin1(), newDrink.length()); |
176 | clearList(); | 179 | clearList(); |
177 | dbFile.close(); | 180 | dbFile.close(); |
178 | 181 | ||
179 | initDrinkDb(); | 182 | initDrinkDb(); |
180 | } | 183 | } |
181 | delete newDrinks; | 184 | delete newDrinks; |
182 | } | 185 | } |
183 | 186 | ||
184 | void Bartender::showDrink(int mouse, QListViewItem * item, const QPoint&, int) { | 187 | void Bartender::showDrink(int mouse, QListViewItem * item, const QPoint&, int) { |
185 | switch (mouse) { | 188 | switch (mouse) { |
186 | case 1: | 189 | case 1: |
@@ -198,25 +201,25 @@ void Bartender::showDrink( QListViewItem *item) { | |||
198 | Show_Drink *showDrinks; | 201 | Show_Drink *showDrinks; |
199 | QString myDrink=item->text(0); | 202 | QString myDrink=item->text(0); |
200 | showDrinks = new Show_Drink(this, myDrink, TRUE); | 203 | showDrinks = new Show_Drink(this, myDrink, TRUE); |
201 | QTextStream t( &dbFile); | 204 | QTextStream t( &dbFile); |
202 | 205 | ||
203 | QString s, s2; | 206 | QString s, s2; |
204 | while ( !t.eof()) { | 207 | while ( !t.eof()) { |
205 | s = t.readLine(); | 208 | s = t.readLine(); |
206 | if(s.find( myDrink, 0, TRUE) != -1) { | 209 | if(s.find( myDrink, 0, TRUE) != -1) { |
207 | for(int i=0;s2.find( "#", 0, TRUE) == -1;i++) { | 210 | for(int i=0;s2.find( "#", 0, TRUE) == -1;i++) { |
208 | s2 = t.readLine(); | 211 | s2 = t.readLine(); |
209 | if(s2.find("#",0,TRUE) == -1 || dbFile.atEnd() ) { | 212 | if(s2.find("#",0,TRUE) == -1 || dbFile.atEnd() ) { |
210 | // qDebug(s2); | 213 | // odebug << s2 << oendl; |
211 | showDrinks->MultiLineEdit1->append(s2); | 214 | showDrinks->MultiLineEdit1->append(s2); |
212 | } | 215 | } |
213 | if( dbFile.atEnd() ) break; | 216 | if( dbFile.atEnd() ) break; |
214 | } | 217 | } |
215 | } | 218 | } |
216 | } | 219 | } |
217 | QPEApplication::execDialog( showDrinks ); | 220 | QPEApplication::execDialog( showDrinks ); |
218 | 221 | ||
219 | if(showDrinks ->result() ==0) { | 222 | if(showDrinks ->result() ==0) { |
220 | doEdit(); | 223 | doEdit(); |
221 | } | 224 | } |
222 | delete showDrinks; | 225 | delete showDrinks; |
@@ -239,25 +242,25 @@ void Bartender::askSearch() { | |||
239 | void Bartender::doSearchByName() { | 242 | void Bartender::doSearchByName() { |
240 | // if( DrinkView->currentItem() == NULL) return; | 243 | // if( DrinkView->currentItem() == NULL) return; |
241 | QStringList searchList; | 244 | QStringList searchList; |
242 | QString searchForDrinkName; | 245 | QString searchForDrinkName; |
243 | InputDialog *fileDlg; | 246 | InputDialog *fileDlg; |
244 | fileDlg = new InputDialog(this,tr("Find by Drink Name"),TRUE, 0); | 247 | fileDlg = new InputDialog(this,tr("Find by Drink Name"),TRUE, 0); |
245 | fileDlg->exec(); | 248 | fileDlg->exec(); |
246 | if( fileDlg->result() == 1 ) { | 249 | if( fileDlg->result() == 1 ) { |
247 | searchForDrinkName = fileDlg->LineEdit1->text(); | 250 | searchForDrinkName = fileDlg->LineEdit1->text(); |
248 | QListViewItemIterator it( DrinkView ); | 251 | QListViewItemIterator it( DrinkView ); |
249 | for ( ; it.current(); ++it ) { | 252 | for ( ; it.current(); ++it ) { |
250 | if ( it.current()->text(0).find( searchForDrinkName, 0, TRUE) != -1 ) { | 253 | if ( it.current()->text(0).find( searchForDrinkName, 0, TRUE) != -1 ) { |
251 | // qDebug( it.current()->text(0)); | 254 | // odebug << it.current()->text(0) << oendl; |
252 | searchList.append(it.current()->text(0)); | 255 | searchList.append(it.current()->text(0)); |
253 | } | 256 | } |
254 | } | 257 | } |
255 | if(searchList.count() >0) | 258 | if(searchList.count() >0) |
256 | showSearchResult(searchList); | 259 | showSearchResult(searchList); |
257 | else | 260 | else |
258 | QMessageBox::message(tr("Search"),tr("Sorry no results for\n")+searchForDrinkName); | 261 | QMessageBox::message(tr("Search"),tr("Sorry no results for\n")+searchForDrinkName); |
259 | }//end Inputdialog | 262 | }//end Inputdialog |
260 | delete fileDlg; | 263 | delete fileDlg; |
261 | } | 264 | } |
262 | 265 | ||
263 | void Bartender::doSearchByDrink() { | 266 | void Bartender::doSearchByDrink() { |
@@ -270,28 +273,28 @@ void Bartender::doSearchByDrink() { | |||
270 | fileDlg->exec(); | 273 | fileDlg->exec(); |
271 | if( fileDlg->result() == 1 ) { | 274 | if( fileDlg->result() == 1 ) { |
272 | searchForDrinkName = fileDlg->LineEdit1->text(); | 275 | searchForDrinkName = fileDlg->LineEdit1->text(); |
273 | 276 | ||
274 | dbFile.at(0); | 277 | dbFile.at(0); |
275 | QTextStream t( &dbFile); | 278 | QTextStream t( &dbFile); |
276 | 279 | ||
277 | QString s, s2; | 280 | QString s, s2; |
278 | while ( !t.eof()) { | 281 | while ( !t.eof()) { |
279 | s = t.readLine(); | 282 | s = t.readLine(); |
280 | if(s.find("#",0,TRUE) != -1) { | 283 | if(s.find("#",0,TRUE) != -1) { |
281 | lastDrinkName=s.right(s.length()-2); | 284 | lastDrinkName=s.right(s.length()-2); |
282 | // qDebug("last drink name "+lastDrinkName); | 285 | // odebug << "last drink name "+lastDrinkName << oendl; |
283 | } | 286 | } |
284 | else if( s.find( searchForDrinkName ,0, FALSE) != -1 && lastDrinkName != tempName ) { | 287 | else if( s.find( searchForDrinkName ,0, FALSE) != -1 && lastDrinkName != tempName ) { |
285 | // qDebug("appending "+lastDrinkName); | 288 | // odebug << "appending "+lastDrinkName << oendl; |
286 | searchList.append( lastDrinkName); | 289 | searchList.append( lastDrinkName); |
287 | tempName=lastDrinkName; | 290 | tempName=lastDrinkName; |
288 | } | 291 | } |
289 | // if( dbFile.atEnd() ) break; | 292 | // if( dbFile.atEnd() ) break; |
290 | 293 | ||
291 | } //oef | 294 | } //oef |
292 | if(searchList.count() >0) | 295 | if(searchList.count() >0) |
293 | showSearchResult(searchList); | 296 | showSearchResult(searchList); |
294 | else | 297 | else |
295 | QMessageBox::message(tr("Search"),tr("Sorry no results for\n")+ searchForDrinkName); | 298 | QMessageBox::message(tr("Search"),tr("Sorry no results for\n")+ searchForDrinkName); |
296 | } | 299 | } |
297 | delete fileDlg; | 300 | delete fileDlg; |
@@ -304,25 +307,25 @@ void Bartender::showSearchResult(QStringList &searchList) { | |||
304 | searchList.sort(); | 307 | searchList.sort(); |
305 | 308 | ||
306 | searchDlg = new Search_Results(this, "Search Results", TRUE); | 309 | searchDlg = new Search_Results(this, "Search Results", TRUE); |
307 | searchDlg->ListBox1->insertStringList( searchList,-1); | 310 | searchDlg->ListBox1->insertStringList( searchList,-1); |
308 | QPEApplication::execDialog( searchDlg ); | 311 | QPEApplication::execDialog( searchDlg ); |
309 | 312 | ||
310 | if( searchDlg->result() == 1 ) { | 313 | if( searchDlg->result() == 1 ) { |
311 | result= searchDlg->ListBox1->currentText(); | 314 | result= searchDlg->ListBox1->currentText(); |
312 | } | 315 | } |
313 | QListViewItemIterator it2( DrinkView ); | 316 | QListViewItemIterator it2( DrinkView ); |
314 | for ( ; it2.current(); ++it2 ) { | 317 | for ( ; it2.current(); ++it2 ) { |
315 | if ( it2.current()->text(0)== result ) { | 318 | if ( it2.current()->text(0)== result ) { |
316 | // qDebug( it2.current()->text(0)); | 319 | // odebug << it2.current()->text(0) << oendl; |
317 | showDrink(it2.current()); | 320 | showDrink(it2.current()); |
318 | } | 321 | } |
319 | } | 322 | } |
320 | delete searchDlg; | 323 | delete searchDlg; |
321 | } | 324 | } |
322 | 325 | ||
323 | void Bartender::doEdit() { | 326 | void Bartender::doEdit() { |
324 | if(DrinkView->currentItem() == NULL) { | 327 | if(DrinkView->currentItem() == NULL) { |
325 | fileNew(); | 328 | fileNew(); |
326 | } | 329 | } |
327 | 330 | ||
328 | QString myDrink; | 331 | QString myDrink; |
@@ -334,25 +337,25 @@ void Bartender::doEdit() { | |||
334 | QString newName, newIng; | 337 | QString newName, newIng; |
335 | QPEApplication::showDialog( newDrinks ); | 338 | QPEApplication::showDialog( newDrinks ); |
336 | QTextStream t( &dbFile); | 339 | QTextStream t( &dbFile); |
337 | 340 | ||
338 | QString s, s2; | 341 | QString s, s2; |
339 | while ( !t.eof()) { | 342 | while ( !t.eof()) { |
340 | s = t.readLine(); | 343 | s = t.readLine(); |
341 | if(s.find( myDrink, 0, TRUE) != -1) { | 344 | if(s.find( myDrink, 0, TRUE) != -1) { |
342 | foundAt = dbFile.at() - (s.length()+1); | 345 | foundAt = dbFile.at() - (s.length()+1); |
343 | for(int i=0;s2.find( "#", 0, TRUE) == -1;i++) { | 346 | for(int i=0;s2.find( "#", 0, TRUE) == -1;i++) { |
344 | s2 = t.readLine(); | 347 | s2 = t.readLine(); |
345 | if(s2.find("#",0,TRUE) == -1 || dbFile.atEnd() ) { | 348 | if(s2.find("#",0,TRUE) == -1 || dbFile.atEnd() ) { |
346 | // qDebug(s2); | 349 | // odebug << s2 << oendl; |
347 | newDrinks->MultiLineEdit1->append(s2); | 350 | newDrinks->MultiLineEdit1->append(s2); |
348 | newDrinks->LineEdit1->setText(myDrink); | 351 | newDrinks->LineEdit1->setText(myDrink); |
349 | } | 352 | } |
350 | if( dbFile.atEnd() ) break; | 353 | if( dbFile.atEnd() ) break; |
351 | } | 354 | } |
352 | } | 355 | } |
353 | } | 356 | } |
354 | newDrinks->exec(); | 357 | newDrinks->exec(); |
355 | newName = newDrinks->LineEdit1->text(); | 358 | newName = newDrinks->LineEdit1->text(); |
356 | newIng= newDrinks->MultiLineEdit1->text(); | 359 | newIng= newDrinks->MultiLineEdit1->text(); |
357 | 360 | ||
358 | if( newDrinks ->result() == 1 ) { | 361 | if( newDrinks ->result() == 1 ) { |
@@ -361,25 +364,25 @@ void Bartender::doEdit() { | |||
361 | if ( !dbFile.open( IO_ReadWrite )) { | 364 | if ( !dbFile.open( IO_ReadWrite )) { |
362 | QMessageBox::message( (tr("Note")), (tr("Drink database not opened sucessfully.\n")) ); | 365 | QMessageBox::message( (tr("Note")), (tr("Drink database not opened sucessfully.\n")) ); |
363 | return; | 366 | return; |
364 | } | 367 | } |
365 | int fd = dbFile.handle(); | 368 | int fd = dbFile.handle(); |
366 | lseek( fd, foundAt, SEEK_SET); | 369 | lseek( fd, foundAt, SEEK_SET); |
367 | 370 | ||
368 | // dbFile.at( foundAt); | 371 | // dbFile.at( foundAt); |
369 | #warning FIXME problems with editing drinks db | 372 | #warning FIXME problems with editing drinks db |
370 | ////////// FIXME write to user file | 373 | ////////// FIXME write to user file |
371 | QString newDrink="# "+newName+"\n"; | 374 | QString newDrink="# "+newName+"\n"; |
372 | newDrink.append(newIng+"\n"); | 375 | newDrink.append(newIng+"\n"); |
373 | qDebug("writing "+newDrink); | 376 | odebug << "writing "+newDrink << oendl; |
374 | dbFile.writeBlock( newDrink.latin1(), newDrink.length()); | 377 | dbFile.writeBlock( newDrink.latin1(), newDrink.length()); |
375 | clearList(); | 378 | clearList(); |
376 | 379 | ||
377 | dbFile.flush(); | 380 | dbFile.flush(); |
378 | 381 | ||
379 | initDrinkDb(); | 382 | initDrinkDb(); |
380 | } | 383 | } |
381 | } | 384 | } |
382 | 385 | ||
383 | void Bartender::clearList() { | 386 | void Bartender::clearList() { |
384 | DrinkView->clear(); | 387 | DrinkView->clear(); |
385 | } | 388 | } |
@@ -388,45 +391,45 @@ void Bartender::doBac() { | |||
388 | BacDialog *bacDlg; | 391 | BacDialog *bacDlg; |
389 | bacDlg = new BacDialog(this,"BAC",TRUE); | 392 | bacDlg = new BacDialog(this,"BAC",TRUE); |
390 | QPEApplication::execDialog( bacDlg ); | 393 | QPEApplication::execDialog( bacDlg ); |
391 | delete bacDlg; | 394 | delete bacDlg; |
392 | } | 395 | } |
393 | 396 | ||
394 | void Bartender::openCurrentDrink() { | 397 | void Bartender::openCurrentDrink() { |
395 | if(DrinkView->currentItem() == NULL) return; | 398 | if(DrinkView->currentItem() == NULL) return; |
396 | showDrink(DrinkView->currentItem()); | 399 | showDrink(DrinkView->currentItem()); |
397 | } | 400 | } |
398 | 401 | ||
399 | void Bartender::fileMenuActivated( int item) { | 402 | void Bartender::fileMenuActivated( int item) { |
400 | qDebug("Item %d", item); | 403 | odebug << "Item " << item << "" << oendl; |
401 | switch(item) { | 404 | switch(item) { |
402 | case -3: // new -3 | 405 | case -3: // new -3 |
403 | fileNew(); | 406 | fileNew(); |
404 | break; | 407 | break; |
405 | case -4:// open -4 | 408 | case -4:// open -4 |
406 | openCurrentDrink(); | 409 | openCurrentDrink(); |
407 | break; | 410 | break; |
408 | case -5:// drink -5 | 411 | case -5:// drink -5 |
409 | doSearchByName(); | 412 | doSearchByName(); |
410 | 413 | ||
411 | break; | 414 | break; |
412 | case -6:// alcohol -6 | 415 | case -6:// alcohol -6 |
413 | doSearchByDrink(); | 416 | doSearchByDrink(); |
414 | 417 | ||
415 | break; | 418 | break; |
416 | 419 | ||
417 | } | 420 | } |
418 | } | 421 | } |
419 | 422 | ||
420 | void Bartender::editMenuActivated(int item) { | 423 | void Bartender::editMenuActivated(int item) { |
421 | qDebug("Item %d", item); | 424 | odebug << "Item " << item << "" << oendl; |
422 | /* | 425 | /* |
423 | edit -8 | 426 | edit -8 |
424 | */ | 427 | */ |
425 | switch(item) { | 428 | switch(item) { |
426 | case -8: | 429 | case -8: |
427 | doEdit() ; | 430 | doEdit() ; |
428 | break; | 431 | break; |
429 | 432 | ||
430 | } | 433 | } |
431 | } | 434 | } |
432 | 435 | ||
diff --git a/noncore/apps/opie-bartender/bartender.pro b/noncore/apps/opie-bartender/bartender.pro index 4ad3c31..41fc0e5 100644 --- a/noncore/apps/opie-bartender/bartender.pro +++ b/noncore/apps/opie-bartender/bartender.pro | |||
@@ -1,12 +1,11 @@ | |||
1 | TEMPLATE = app | 1 | TEMPLATE = app |
2 | #CONFIG = qt warn_on | ||
3 | CONFIG = qt warn_on | 2 | CONFIG = qt warn_on |
4 | HEADERS = bartender.h newdrinks.h showdrinks.h inputDialog.h searchresults.h bac.h | 3 | HEADERS = bartender.h newdrinks.h showdrinks.h inputDialog.h searchresults.h bac.h |
5 | SOURCES = main.cpp bartender.cpp newdrinks.cpp showdrinks.cpp inputDialog.cpp searchresults.cpp bac.cpp | 4 | SOURCES = main.cpp bartender.cpp newdrinks.cpp showdrinks.cpp inputDialog.cpp searchresults.cpp bac.cpp |
6 | INCLUDEPATH += $(OPIEDIR)/include | 5 | INCLUDEPATH += $(OPIEDIR)/include |
7 | DEPENDPATH += $(OPIEDIR)/include | 6 | DEPENDPATH += $(OPIEDIR)/include |
8 | LIBS += -lqpe | 7 | LIBS += -lqpe -lopiecore2 |
9 | DESTDIR = $(OPIEDIR)/bin | 8 | DESTDIR = $(OPIEDIR)/bin |
10 | TARGET = bartender | 9 | TARGET = bartender |
11 | 10 | ||
12 | include ( $(OPIEDIR)/include.pro ) | 11 | include ( $(OPIEDIR)/include.pro ) |
diff --git a/noncore/apps/opie-bartender/config.in b/noncore/apps/opie-bartender/config.in index c6ca2e6..c39a7d6 100644 --- a/noncore/apps/opie-bartender/config.in +++ b/noncore/apps/opie-bartender/config.in | |||
@@ -1,4 +1,5 @@ | |||
1 | config BARTENDER | 1 | config BARTENDER |
2 | boolean "bartender - bar receipe and blood alcohol estimator" | 2 | boolean "bartender - bar receipe and blood alcohol estimator" |
3 | default "n" | 3 | default "n" |
4 | depends ( LIBQPE || LIBQPE-X11 ) | 4 | depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE |
5 | |||