Changeset 16169 for titan/plugins/lcdpearl1
- Timestamp:
- 05/31/12 18:42:37 (12 years ago)
- Location:
- titan/plugins/lcdpearl1
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
titan/plugins/lcdpearl1/lcd_weather.h
r15624 r16169 225 225 struct weather* node = NULL; 226 226 227 location = ostrcat(location, getconfig("lcd_pearl1_plugin_wetter_ort", NULL), 0, 0); 227 location = ostrcat(location, getconfig("lcd_pearl1_plugin_wetterplz", NULL), 0, 0); 228 location = ostrcat(location, "-", 1, 0); 229 location = ostrcat(location, getconfig("lcd_pearl1_plugin_wetterland", NULL), 1, 0); 228 230 229 231 node = getweather(location); -
titan/plugins/lcdpearl1/lcdpearl1.c
r15624 r16169 405 405 struct skin* allmenu = getscreennode(pearl1_main, "allmenu"); 406 406 struct skin* wettervor = getscreennode(pearl1_main, "wettervor"); 407 struct skin* wettervorplz = getscreennode(pearl1_main, "wettervorplz"); 408 struct skin* wettervorland = getscreennode(pearl1_main, "wettervorland"); 407 409 struct skin* b3 = getscreennode(pearl1_main, "b3"); 408 410 struct skin* tmp = NULL; … … 412 414 int restart = 0; 413 415 416 if(getconfig("lcd_pearl1_plugin_wetter", NULL) == NULL || ostrcmp(getconfig("lcd_pearl1_plugin_wetter", NULL), "no") == 0) 417 { 418 wettervorplz->hidden = YES; 419 wettervorland->hidden = YES; 420 } 421 414 422 addchoicebox(allmenu, "no", _("nein")); 415 423 addchoicebox(allmenu, "yes", _("ja")); … … 419 427 addchoicebox(wettervor, "yes", _("ja")); 420 428 setchoiceboxselection(wettervor, getconfig("lcd_pearl1_plugin_wetter", NULL)); 429 430 changemask(wettervorplz, "0000"); 431 if(getconfig("lcd_pearl1_plugin_wetterplz", NULL) == NULL) 432 changeinput(wettervorplz, "10407"); 433 else 434 changeinput(wettervorplz, getconfig("lcd_pearl1_plugin_wetterplz", NULL)); 435 436 changemask(wettervorland, "abcdefghijklmnopqrstuvwxyz"); 437 if(getconfig("lcd_pearl1_plugin_wetterland", NULL) == NULL) 438 changeinput(wettervorland, "Germany"); 439 else 440 changeinput(wettervorland, getconfig("lcd_pearl1_plugin_wetterland", NULL)); 441 421 442 422 443 if(LCD_Pearl1thread != NULL) … … 435 456 tmp = listbox->select; 436 457 458 if((rcret == getrcconfigint("rcleft", NULL) || rcret == getrcconfigint("rcright", NULL)) && listbox->select != NULL && ostrcmp(listbox->select->name, "wettervor") == 0) 459 { 460 if(ostrcmp(wettervor->ret, "yes") == 0) 461 { 462 wettervorplz->hidden = NO; 463 wettervorland->hidden = NO; 464 } else { 465 wettervorplz->hidden = YES; 466 wettervorland->hidden = YES; 467 } 468 469 drawscreen(pearl1_main, 0); 470 } 471 437 472 if(rcret == getrcconfigint("rcexit", NULL)) 438 473 break; … … 441 476 addconfig("write_fb_to_png", allmenu->ret); 442 477 addconfig("lcd_pearl1_plugin_wetter", wettervor->ret); 443 addconfig("lcd_pearl1_plugin_wetter_ort", "Berlin"); 478 addconfig("lcd_pearl1_plugin_wetterplz", wettervorplz->ret); 479 addconfig("lcd_pearl1_plugin_wetterland", wettervorland->ret); 444 480 restart = 1; 445 481 break; … … 476 512 else { 477 513 addconfig("lcd_pearl1_plugin_running", "yes"); 478 LCD_Pearl1thread = addtimer(&LCD_Pearl1_thread, START, 10000, 1, NULL, NULL, NULL); 479 addtimer(&LCD_start_lcd4linux, START, 10000, 1, NULL, NULL, NULL); 480 sleep(1); 514 firststart = 1; 515 LCD_Pearl1_main(); 516 //LCD_Pearl1thread = addtimer(&LCD_Pearl1_thread, START, 10000, 1, NULL, NULL, NULL); 517 //addtimer(&LCD_start_lcd4linux, START, 10000, 1, NULL, NULL, NULL); 518 //sleep(1); 481 519 } 482 520 }
Note: See TracChangeset
for help on using the changeset viewer.