summaryrefslogtreecommitdiff
path: root/noncore/todayplugins
Unidiff
Diffstat (limited to 'noncore/todayplugins') (more/less context) (show whitespace changes)
-rw-r--r--noncore/todayplugins/stockticker/stockticker/inputDialog.cpp1
-rw-r--r--noncore/todayplugins/stockticker/stocktickerlib/stocktickerconfig.cpp2
-rw-r--r--noncore/todayplugins/stockticker/stocktickerlib/stocktickerconfig.h2
-rw-r--r--noncore/todayplugins/stockticker/stocktickerlib/stocktickerpluginwidget.cpp88
-rw-r--r--noncore/todayplugins/weather/weatherconfig.h1
5 files changed, 61 insertions, 33 deletions
diff --git a/noncore/todayplugins/stockticker/stockticker/inputDialog.cpp b/noncore/todayplugins/stockticker/stockticker/inputDialog.cpp
index 71dd7eb..73f8bb3 100644
--- a/noncore/todayplugins/stockticker/stockticker/inputDialog.cpp
+++ b/noncore/todayplugins/stockticker/stockticker/inputDialog.cpp
@@ -10,4 +10,5 @@
10#include <qwhatsthis.h> 10#include <qwhatsthis.h>
11#include <qlabel.h> 11#include <qlabel.h>
12#include <qlayout.h>
12#include <qpe/config.h> 13#include <qpe/config.h>
13#include <qstringlist.h> 14#include <qstringlist.h>
diff --git a/noncore/todayplugins/stockticker/stocktickerlib/stocktickerconfig.cpp b/noncore/todayplugins/stockticker/stocktickerlib/stocktickerconfig.cpp
index d740b6f..915233a 100644
--- a/noncore/todayplugins/stockticker/stocktickerlib/stocktickerconfig.cpp
+++ b/noncore/todayplugins/stockticker/stocktickerlib/stocktickerconfig.cpp
@@ -122,5 +122,5 @@ StocktickerPluginConfig::StocktickerPluginConfig( QWidget *parent, const char*
122 122
123 cfg.setGroup("Timer"); 123 cfg.setGroup("Timer");
124 timerDelaySpin->setValue( cfg.readNumEntry("Delay",0)); 124 timerDelaySpin->setValue( cfg.readNumEntry("Delay",15));
125 layout->addMultiCellWidget( timerDelaySpin , 6, 6, 0, 0); 125 layout->addMultiCellWidget( timerDelaySpin , 6, 6, 0, 0);
126 126
diff --git a/noncore/todayplugins/stockticker/stocktickerlib/stocktickerconfig.h b/noncore/todayplugins/stockticker/stocktickerlib/stocktickerconfig.h
index 2b67a8b..10f9678 100644
--- a/noncore/todayplugins/stockticker/stocktickerlib/stocktickerconfig.h
+++ b/noncore/todayplugins/stockticker/stocktickerlib/stocktickerconfig.h
@@ -29,5 +29,5 @@ class QSpinBox;
29 29
30class StocktickerPluginConfig : public TodayConfigWidget { 30class StocktickerPluginConfig : public TodayConfigWidget {
31//Q_OBJECT 31 Q_OBJECT
32public: 32public:
33 StocktickerPluginConfig( QWidget *parent, const char *name ); 33 StocktickerPluginConfig( QWidget *parent, const char *name );
diff --git a/noncore/todayplugins/stockticker/stocktickerlib/stocktickerpluginwidget.cpp b/noncore/todayplugins/stockticker/stocktickerlib/stocktickerpluginwidget.cpp
index c3ca52d..fedc79c 100644
--- a/noncore/todayplugins/stockticker/stocktickerlib/stocktickerpluginwidget.cpp
+++ b/noncore/todayplugins/stockticker/stocktickerlib/stocktickerpluginwidget.cpp
@@ -31,4 +31,8 @@ extern "C" {
31QString output; 31QString output;
32OTicker *stocktickerTicker; 32OTicker *stocktickerTicker;
33 QCString stock_liste;
34 bool dotimeCheck, dodateCheck, dosymbolCheck, donameCheck;
35 bool docurrentPriceCheck, dolastPriceCheck, doopenPriceCheck;
36 bool dominPriceCheck, domaxPriceCheck, dovariationCheck, dovolumeCheck;
33 37
34void getStocks(char *blah) { 38void getStocks(char *blah) {
@@ -37,37 +41,48 @@ void getStocks(char *blah) {
37 stock *stocks_quotes=NULL; 41 stock *stocks_quotes=NULL;
38 stock *stocks_tmp; 42 stock *stocks_tmp;
39 QCString stock_liste = blah; 43 stock_liste = blah;
40 ::free ( blah ); 44 ::free ( blah );
41 // char *stock_liste = (char *)blah->latin1(); 45 // char *stock_liste = (char *)blah->latin1();
42 qDebug("%s", stock_liste.data() ); 46 // qDebug("%s", stock_liste.data() );
43 QString tempString;
44 output = ""; 47 output = "";
45 48 QString tempString;
46 libstocks_return_code error; 49 libstocks_return_code error;
47 50
48 Config cfg( "stockticker"); 51// Config cfg( "stockticker");
49 cfg.setGroup( "Fields" ); 52// cfg.setGroup( "Fields" );
50 bool dotimeCheck, dodateCheck, dosymbolCheck, donameCheck; 53// bool dotimeCheck, dodateCheck, dosymbolCheck, donameCheck;
51 bool docurrentPriceCheck, dolastPriceCheck, doopenPriceCheck; 54// bool docurrentPriceCheck, dolastPriceCheck, doopenPriceCheck;
52 bool dominPriceCheck, domaxPriceCheck, dovariationCheck, dovolumeCheck; 55// bool dominPriceCheck, domaxPriceCheck, dovariationCheck, dovolumeCheck;
53 56
54 dotimeCheck=dodateCheck=dosymbolCheck=donameCheck= docurrentPriceCheck=dolastPriceCheck=doopenPriceCheck=dominPriceCheck=domaxPriceCheck=dovariationCheck=dovolumeCheck=false; 57 dotimeCheck=dodateCheck=dosymbolCheck=donameCheck= docurrentPriceCheck=dolastPriceCheck=doopenPriceCheck=dominPriceCheck=domaxPriceCheck=dovariationCheck=dovolumeCheck=false;
55 58
56 dotimeCheck=cfg.readBoolEntry("timeCheck",1); 59 dotimeCheck=1;
57 dodateCheck=cfg.readBoolEntry("dateCheck",1); 60 dodateCheck=1;
58 dosymbolCheck=cfg.readBoolEntry("symbolCheck",1); 61 dosymbolCheck=1;
59 donameCheck=cfg.readBoolEntry("nameCheck",1); 62 donameCheck=1;
60 docurrentPriceCheck=cfg.readBoolEntry("currentPriceCheck",1); 63 docurrentPriceCheck=1;
61 dolastPriceCheck=cfg.readBoolEntry("lastPriceCheck",1); 64 dolastPriceCheck=1;
62 doopenPriceCheck=cfg.readBoolEntry("openPriceCheck",1); 65 doopenPriceCheck=1;
63 dominPriceCheck=cfg.readBoolEntry("minPriceCheck",1); 66 dominPriceCheck=1;
64 domaxPriceCheck=cfg.readBoolEntry("maxPriceCheck",1); 67 domaxPriceCheck=1;
65 dovariationCheck=cfg.readBoolEntry("variationCheck",1); 68 dovariationCheck=1;
66 dovolumeCheck=cfg.readBoolEntry("volumeCheck",1); 69 dovolumeCheck=1;
70
71// dotimeCheck=cfg.readBoolEntry("timeCheck",1);
72// dodateCheck=cfg.readBoolEntry("dateCheck",1);
73// dosymbolCheck=cfg.readBoolEntry("symbolCheck",1);
74// donameCheck=cfg.readBoolEntry("nameCheck",1);
75// docurrentPriceCheck=cfg.readBoolEntry("currentPriceCheck",1);
76// dolastPriceCheck=cfg.readBoolEntry("lastPriceCheck",1);
77// doopenPriceCheck=cfg.readBoolEntry("openPriceCheck",1);
78// dominPriceCheck=cfg.readBoolEntry("minPriceCheck",1);
79// domaxPriceCheck=cfg.readBoolEntry("maxPriceCheck",1);
80// dovariationCheck=cfg.readBoolEntry("variationCheck",1);
81// dovolumeCheck=cfg.readBoolEntry("volumeCheck",1);
67 82
68// DefProxy(); 83// DefProxy();
69 { 84 // {
70 char *proxy; 85 char *proxy;
71 libstocks_return_code error; 86 // libstocks_return_code error;
72 87
73 /* Proxy support */ 88 /* Proxy support */
@@ -78,14 +93,15 @@ void getStocks(char *blah) {
78 error = set_proxy(proxy); 93 error = set_proxy(proxy);
79 if (error) { 94 if (error) {
80 printf("Proxy error (%d)\n", error); 95// printf("Proxy error (%d)\n", error);
81 QString tempString; 96// QString tempString2;
82 tempString.sprintf("Proxy error (%d)\n", error); 97// tempString2.sprintf("Proxy error (%d)\n", error);
83 output = tempString; 98// output = tempString2;
99 // delete tempString2;
84 return; 100 return;
85// exit(1); 101// exit(1);
86 } 102 }
87 } 103 }
88 } 104 ::free(proxy);
89// char *stock_liste = (char *)blah; 105 // }
90 /* Get the stocks and process errors */ 106 /* Get the stocks and process errors */
91 error = get_stocks( stock_liste.data(), &stocks_quotes); 107 error = get_stocks( stock_liste.data(), &stocks_quotes);
@@ -96,5 +112,4 @@ void getStocks(char *blah) {
96 output =tempString; 112 output =tempString;
97 return; 113 return;
98// exit(1);
99 } 114 }
100 115
@@ -200,8 +215,14 @@ void getStocks(char *blah) {
200 } 215 }
201 216
217 stocktickerTicker->setText( output.latin1() );
218
202 /* frees stocks */ 219 /* frees stocks */
203 free_stocks(stocks_quotes); 220 free_stocks(stocks_quotes);
204 stocktickerTicker->setText( output.latin1() ); 221 free_stocks(stocks_tmp);
205 222
223 stock_liste="";
224 //delete stock_liste;
225 tempString="";
226 output="";
206} 227}
207 228
@@ -243,4 +264,8 @@ void StockTickerPluginWidget::doStocks() {
243 char *blah = ::strdup(symbollist.latin1()); 264 char *blah = ::strdup(symbollist.latin1());
244 pthread_create(&thread1,NULL, (void * (*)(void *))getStocks, (void *) blah); 265 pthread_create(&thread1,NULL, (void * (*)(void *))getStocks, (void *) blah);
266 pthread_detach( thread1);
267
268 //::free((void*)thread1);
269 //getStocks(blah);
245 } 270 }
246} 271}
@@ -270,4 +295,5 @@ void StockTickerPluginWidget::checkConnection() {
270void StockTickerPluginWidget::isConnected() { 295void StockTickerPluginWidget::isConnected() {
271// qDebug("We connect, so ok to grab stocks"); 296// qDebug("We connect, so ok to grab stocks");
297 if(this->isVisible())
272 doStocks(); 298 doStocks();
273 299
@@ -277,5 +303,5 @@ void StockTickerPluginWidget::isConnected() {
277 if(timerDelay > 0) 303 if(timerDelay > 0)
278 startTimer(timerDelay*60000); 304 startTimer(timerDelay*60000);
279 qDebug("timer set for %d",(timerDelay*60000)/60000); 305 // qDebug("timer set for %d",(timerDelay*60000)/60000);
280 wasError = false; 306 wasError = false;
281 307
diff --git a/noncore/todayplugins/weather/weatherconfig.h b/noncore/todayplugins/weather/weatherconfig.h
index 3877818..d9ffec2 100644
--- a/noncore/todayplugins/weather/weatherconfig.h
+++ b/noncore/todayplugins/weather/weatherconfig.h
@@ -42,4 +42,5 @@ class QSpinBox;
42class WeatherPluginConfig : public TodayConfigWidget 42class WeatherPluginConfig : public TodayConfigWidget
43{ 43{
44 Q_OBJECT
44 public: 45 public:
45 WeatherPluginConfig( QWidget *parent, const char *name ); 46 WeatherPluginConfig( QWidget *parent, const char *name );