4 files changed, 6 insertions, 6 deletions
diff --git a/noncore/todayplugins/stockticker/opie-today-stocktickerplugin.control b/noncore/todayplugins/stockticker/opie-today-stocktickerplugin.control index ddfe9b0..128b7cd 100644 --- a/noncore/todayplugins/stockticker/opie-today-stocktickerplugin.control +++ b/noncore/todayplugins/stockticker/opie-today-stocktickerplugin.control @@ -1,8 +1,8 @@ -Files: plugins/today/libtodaystocktickerplugin.so* bin/stockticker +Files: plugins/today/libtodaystocktickerplugin.so* bin/stockticker pics/stockticker/stockticker.png Priority: optional Section: opie/applications Maintainer: ljp <llornkcor@handhelds.org> Architecture: arm Version: $QPE_VERSION-$SUB_VERSION Depends: qt-embedded (>=$QTE_VERSION), opie-today Description: stockticker plugin for today diff --git a/noncore/todayplugins/stockticker/stocktickerlib/stocktickerplugin.cpp b/noncore/todayplugins/stockticker/stocktickerlib/stocktickerplugin.cpp index 2eb1697..628431c 100644 --- a/noncore/todayplugins/stockticker/stocktickerlib/stocktickerplugin.cpp +++ b/noncore/todayplugins/stockticker/stocktickerlib/stocktickerplugin.cpp @@ -5,56 +5,56 @@ * email : llornkcor@handhelds.org * */ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include "stocktickerplugin.h" #include "stocktickerpluginwidget.h" #include "stocktickerconfig.h" StockTickerPlugin::StockTickerPlugin() { } StockTickerPlugin::~StockTickerPlugin() { } QString StockTickerPlugin::pluginName() const { return QObject::tr( "StockTicker plugin" ); } double StockTickerPlugin::versionNumber() const { return 0.6; } QString StockTickerPlugin::pixmapNameWidget() const { - return "pass"; + return "stockticker/stockticker"; } QWidget* StockTickerPlugin::widget( QWidget * wid ) { return new StockTickerPluginWidget( wid, "StockTicker " ); } QString StockTickerPlugin::pixmapNameConfig() const { - return 0l; + return "stockticker/stockticker"; } TodayConfigWidget* StockTickerPlugin::configWidget( QWidget* wid ) { return new StocktickerPluginConfig( wid , "Stockticker" ); } QString StockTickerPlugin::appName() const { return "stockticker"; } bool StockTickerPlugin::excludeFromRefresh() const { return true; } diff --git a/noncore/todayplugins/stockticker/stocktickerlib/stocktickerpluginwidget.cpp b/noncore/todayplugins/stockticker/stocktickerlib/stocktickerpluginwidget.cpp index 572a720..1d53344 100644 --- a/noncore/todayplugins/stockticker/stocktickerlib/stocktickerpluginwidget.cpp +++ b/noncore/todayplugins/stockticker/stocktickerlib/stocktickerpluginwidget.cpp @@ -223,84 +223,84 @@ StockTickerPluginWidget::StockTickerPluginWidget( QWidget *parent, const char* // checkConnection(); } StockTickerPluginWidget::~StockTickerPluginWidget() { } void StockTickerPluginWidget::init() { QHBoxLayout* layout = new QHBoxLayout( this ); stocktickerTicker = new OTicker(this); stocktickerTicker->setMinimumHeight(15); connect( stocktickerTicker, SIGNAL( mousePressed()), this, SLOT( checkConnection() )); layout->addWidget( stocktickerTicker); wasError = true; } void StockTickerPluginWidget::doStocks() { Config cfg( "stockticker"); cfg.setGroup( "Symbols" ); QString symbollist; symbollist = cfg.readEntry("Symbols", ""); symbollist.replace(QRegExp(" "),"+");//seperated by + // qDebug(symbollist); if (!symbollist.isEmpty()) { pthread_t thread1; pthread_create(&thread1,NULL, (void * (*)(void *))getStocks, &symbollist); } // pthread_join(thread1,NULL); // getStocks( symbollist.latin1() ); } -void StockTickerPluginWidget::DefProxy(void) { +//void StockTickerPluginWidget::DefProxy(void) { // char *proxy; // libstocks_return_code error; // /* Proxy support */ // /* Checks for "http_proxy" environment variable */ // proxy = getenv("http_proxy"); // if(proxy) { // /* printf("proxy set\n"); */ // error = set_proxy(proxy); // if (error) { // // printf("Proxy error (%d)\n", error); // QString tempString; // tempString.sprintf("Proxy error (%d)\n", error); // output = tempString; // return; // // exit(1); // } // } -} +//} void StockTickerPluginWidget::timerEvent( QTimerEvent *e ) { killTimer(e->timerId()); checkConnection(); } void StockTickerPluginWidget::checkConnection() { // qDebug("checking connection"); // Sock = new QSocket( this ); // if( wasError) // stocktickerTicker->setText("Checking connection"); // if(Sock->state() == QSocket::Idle) { // Sock->connectToHost("finance.yahoo.com", 80); // connect( Sock, SIGNAL( error(int) ), SLOT(socketError(int)) ); // connect( Sock, SIGNAL( hostFound() ), SLOT(isConnected()) ); // } else { // qDebug("State is not Idle"); isConnected(); // } } void StockTickerPluginWidget::isConnected() { // qDebug("We connect, so ok to grab stocks"); doStocks(); Config cfg( "stockticker"); cfg.setGroup("Timer"); timerDelay= cfg.readNumEntry("Delay",0); if(timerDelay > 0) startTimer(timerDelay*60000); diff --git a/noncore/todayplugins/stockticker/stocktickerlib/stocktickerpluginwidget.h b/noncore/todayplugins/stockticker/stocktickerlib/stocktickerpluginwidget.h index c8de806..970a561 100644 --- a/noncore/todayplugins/stockticker/stocktickerlib/stocktickerpluginwidget.h +++ b/noncore/todayplugins/stockticker/stocktickerlib/stocktickerpluginwidget.h @@ -25,37 +25,37 @@ #include <opie/tododb.h> #include <opie/oclickablelabel.h> #include <opie/oticker.h> #include <sys/types.h> #include <sys/uio.h> #include <unistd.h> #include <stdio.h> #include <stdlib.h> #include <string.h> class QTimer; class StockTickerPluginWidget : public QWidget { Q_OBJECT public: StockTickerPluginWidget( QWidget *parent, const char *name ); ~StockTickerPluginWidget(); protected slots: void doStocks(); void isConnected(); void socketError(int); void checkConnection(); private: bool wasError; QSocket *Sock; void timerEvent( QTimerEvent * ); void init(); - void DefProxy(void); +// void DefProxy(void); int timerDelay; }; #endif |