author | llornkcor <llornkcor> | 2002-11-05 13:51:30 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-11-05 13:51:30 (UTC) |
commit | 86d934b18fb8878b80f6c5e7d66453adb90b08a0 (patch) (side-by-side diff) | |
tree | 56d807f1155dbf9b4f5a828b6ab5ba43e7e532e4 | |
parent | 320c8020a112dff1bc1d43bee9b103a423e0ac35 (diff) | |
download | opie-86d934b18fb8878b80f6c5e7d66453adb90b08a0.zip opie-86d934b18fb8878b80f6c5e7d66453adb90b08a0.tar.gz opie-86d934b18fb8878b80f6c5e7d66453adb90b08a0.tar.bz2 |
remove commentedout code
-rw-r--r-- | noncore/todayplugins/stockticker/stocktickerlib/stocktickerpluginwidget.cpp | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/noncore/todayplugins/stockticker/stocktickerlib/stocktickerpluginwidget.cpp b/noncore/todayplugins/stockticker/stocktickerlib/stocktickerpluginwidget.cpp index 2f35f7f..18c9e51 100644 --- a/noncore/todayplugins/stockticker/stocktickerlib/stocktickerpluginwidget.cpp +++ b/noncore/todayplugins/stockticker/stocktickerlib/stocktickerpluginwidget.cpp @@ -201,107 +201,86 @@ void getStocks( const QString *blah) { tempString.sprintf("| Volume %-9d ", stocks_tmp->Volume); if(dovolumeCheck) output +=tempString; // printf("----------------------------------------\n\n"); tempString.sprintf("||==++==|"); output +=tempString; /* Simple function which help to browse in the stocks list */ stocks_tmp = next_stock(stocks_tmp); } /* frees stocks */ free_stocks(stocks_quotes); stocktickerTicker->setText( output ); } StockTickerPluginWidget::StockTickerPluginWidget( QWidget *parent, const char* name) : QWidget(parent, name ) { init(); startTimer(1000); // checkConnection(); } StockTickerPluginWidget::~StockTickerPluginWidget() { } void StockTickerPluginWidget::init() { QHBoxLayout* layout = new QHBoxLayout( this ); stocktickerTicker = new OTicker(this); - stocktickerTicker->setMinimumHeight(15); +// stocktickerTicker->setMinimumHeight(15); connect( stocktickerTicker, SIGNAL( mousePressed()), this, SLOT( checkConnection() )); layout->addWidget( stocktickerTicker); wasError = true; } void StockTickerPluginWidget::doStocks() { Config cfg( "stockticker"); cfg.setGroup( "Symbols" ); 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) { -// 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); qDebug("timer set for %d",(timerDelay*60000)/60000); |