summaryrefslogtreecommitdiff
authordrw <drw>2004-02-23 18:59:17 (UTC)
committer drw <drw>2004-02-23 18:59:17 (UTC)
commit4f8be1658bc82040bac404aa98fe70c24239f10c (patch) (side-by-side diff)
treeb502a5f03f488065d7b9868b79116fb0846d2994
parentd66f871dfeae78babeb1fa0b8a3e1c72dd10ea2b (diff)
downloadopie-4f8be1658bc82040bac404aa98fe70c24239f10c.zip
opie-4f8be1658bc82040bac404aa98fe70c24239f10c.tar.gz
opie-4f8be1658bc82040bac404aa98fe70c24239f10c.tar.bz2
Fixed control file so ipkg will build and commented out an unused include (but did convert to libopie2)
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-bartender/bartender.cpp36
-rw-r--r--noncore/apps/opie-bartender/opie-bartender.control4
2 files changed, 20 insertions, 20 deletions
diff --git a/noncore/apps/opie-bartender/bartender.cpp b/noncore/apps/opie-bartender/bartender.cpp
index cd0a364..740478f 100644
--- a/noncore/apps/opie-bartender/bartender.cpp
+++ b/noncore/apps/opie-bartender/bartender.cpp
@@ -16,13 +16,13 @@
#include "inputDialog.h"
#include "searchresults.h"
#include "bac.h"
#include <qpe/qpetoolbar.h>
#include <qmenubar.h>
-#include <opie/colorpopupmenu.h>
+//#include <opie2/colorpopupmenu.h>
#include <qpe/qpeapplication.h>
#include <qpe/resource.h>
#include <qcstring.h>
#include <qlineedit.h>
#include <qdir.h>
@@ -73,18 +73,18 @@ Bartender::Bartender( QWidget* parent, const char* name, WFlags fl )
menuBar->insertItem( tr("File"), fileMenu );
fileMenu->insertItem(tr("New Drink"));
fileMenu->insertItem(tr("Open Drink"));
fileMenu->insertItem(tr("Find by Drink Name"));
fileMenu->insertItem(tr("Find by Alcohol"));
-
+
QPopupMenu *editMenu;
editMenu = new QPopupMenu( this);
menuBar->insertItem( tr("Edit"), editMenu );
editMenu->insertItem(tr("edit"));
-
+
connect( fileMenu, SIGNAL( activated(int) ), this, SLOT( fileMenuActivated(int) ));
connect( editMenu, SIGNAL( activated(int) ), this, SLOT( editMenuActivated(int) ));
QAction *a = new QAction( tr( "New" ), Resource::loadPixmap( "new" ), "New", 0, this, 0 );
connect( a, SIGNAL( activated() ), this, SLOT( fileNew() ) );
@@ -102,16 +102,16 @@ Bartender::Bartender( QWidget* parent, const char* name, WFlags fl )
connect( a, SIGNAL( activated() ), this, SLOT( doEdit() ) );
a->addTo( ToolBar1 );
QPushButton *t;
t= new QPushButton( "BAC", ToolBar1, "bacButtin");
connect( t, SIGNAL( clicked() ), this, SLOT( doBac() ) );
-
+
DrinkView = new QListView( this, "DrinkView" );
DrinkView->addColumn( tr( "Name of Drink" ) );
-// DrinkView->setRootIsDecorated( TRUE );
+// DrinkView->setRootIsDecorated( TRUE );
DrinkView->header()->hide();
QPEApplication::setStylusOperation( DrinkView->viewport(),QPEApplication::RightOnHold);
connect(DrinkView, SIGNAL( doubleClicked(QListViewItem*)),this,SLOT(showDrink( QListViewItem*)));
connect(DrinkView, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint&, int)),
@@ -183,16 +183,16 @@ void Bartender::fileNew() {
QString newDrink="\n# "+newName+"\n";
newDrink.append(newIng+"\n");
qDebug("writing "+newDrink);
dbFile.writeBlock( newDrink.latin1(), newDrink.length());
clearList();
dbFile.close();
-
+
initDrinkDb();
}
- delete newDrinks;
+ delete newDrinks;
}
void Bartender::showDrink(int mouse, QListViewItem * item, const QPoint&, int) {
switch (mouse) {
case 1:
// showDrink(item);
@@ -207,13 +207,13 @@ void Bartender::showDrink( QListViewItem *item) {
if(item==NULL) return;
dbFile.at(0);
Show_Drink *showDrinks;
QString myDrink=item->text(0);
showDrinks = new Show_Drink(this, myDrink, TRUE);
QTextStream t( &dbFile);
-
+
QString s, s2;
while ( !t.eof()) {
s = t.readLine();
if(s.find( myDrink, 0, TRUE) != -1) {
for(int i=0;s2.find( "#", 0, TRUE) == -1;i++) {
s2 = t.readLine();
@@ -272,27 +272,27 @@ void Bartender::doSearchByName() {
}
void Bartender::doSearchByDrink() {
// if( DrinkView->currentItem() == NULL) return;
QStringList searchList;
QString searchForDrinkName, lastDrinkName, tempName;
-
+
InputDialog *fileDlg;
fileDlg = new InputDialog(this,tr("Find by Alcohol"),TRUE, 0);
fileDlg->exec();
if( fileDlg->result() == 1 ) {
searchForDrinkName = fileDlg->LineEdit1->text();
dbFile.at(0);
QTextStream t( &dbFile);
-
+
QString s, s2;
while ( !t.eof()) {
s = t.readLine();
if(s.find("#",0,TRUE) != -1) {
- lastDrinkName=s.right(s.length()-2);
+ lastDrinkName=s.right(s.length()-2);
// qDebug("last drink name "+lastDrinkName);
}
else if( s.find( searchForDrinkName ,0, FALSE) != -1 && lastDrinkName != tempName ) {
// qDebug("appending "+lastDrinkName);
searchList.append( lastDrinkName);
tempName=lastDrinkName;
@@ -310,13 +310,13 @@ void Bartender::doSearchByDrink() {
void Bartender::showSearchResult(QStringList &searchList) {
QString result;
Search_Results *searchDlg;
searchList.sort();
-
+
searchDlg = new Search_Results(this, "Search Results", TRUE);
searchDlg->ListBox1->insertStringList( searchList,-1);
QPEApplication::execDialog( searchDlg );
if( searchDlg->result() == 1 ) {
result= searchDlg->ListBox1->currentText();
@@ -372,24 +372,24 @@ void Bartender::doEdit() {
if ( !dbFile.open( IO_ReadWrite )) {
QMessageBox::message( (tr("Note")), (tr("Drink database not opened sucessfully.\n")) );
return;
}
int fd = dbFile.handle();
lseek( fd, foundAt, SEEK_SET);
-
+
// dbFile.at( foundAt);
#warning FIXME problems with editing drinks db
////////// FIXME write to user file
QString newDrink="# "+newName+"\n";
newDrink.append(newIng+"\n");
qDebug("writing "+newDrink);
dbFile.writeBlock( newDrink.latin1(), newDrink.length());
clearList();
-
+
dbFile.flush();
-
+
initDrinkDb();
}
}
void Bartender::clearList() {
DrinkView->clear();
@@ -421,23 +421,23 @@ void Bartender::fileMenuActivated( int item) {
break;
case -6:// alcohol -6
doSearchByDrink();
break;
-
+
}
}
void Bartender::editMenuActivated(int item) {
qDebug("Item %d", item);
/*
edit -8
*/
switch(item) {
case -8:
- doEdit() ;
+ doEdit() ;
break;
-
+
}
}
diff --git a/noncore/apps/opie-bartender/opie-bartender.control b/noncore/apps/opie-bartender/opie-bartender.control
index acd3304..a8bf860 100644
--- a/noncore/apps/opie-bartender/opie-bartender.control
+++ b/noncore/apps/opie-bartender/opie-bartender.control
@@ -2,9 +2,9 @@ Files: bin/bartender apps/Applications/bartender.desktop
Priority: optional
Package: opie-bartender
Section: opie/applications
Maintainer: L.J. Potter <lpotter@trolltech.com>
Architecture: arm
Version: $QPE_VERSION-$SUB_VERSION
-Depends: qpe-base ($QPE_VERSION)
+Depends: task-opie-minimal
Description: Bartender drink receipe database lookup, and
-blood alcohol estimator.
+ blood alcohol estimator.