Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 9819 → Rev 9820

/data/Tupfile.lua
67,7 → 67,6
{"SETTINGS/NETWORK.INI", "common/settings/network.ini"},
{"SETTINGS/SYSTEM.INI", "common/settings/system.ini"},
{"SETTINGS/TASKBAR.INI", "common/settings/taskbar.ini"},
{"SETTINGS/weather.json", PROGS .. "/other/Weather/weather.json"},
}
 
-- For russian build, add russian-only files.
726,6 → 725,7
{"kolibrios/utils/kruler", PROGS .. "/other/kruler/kruler"},
{"kolibrios/media/qr_tool", PROGS .. "/media/qr_tool/qr_tool"},
{"kolibrios/utils/weather", PROGS .. "/other/Weather/weather"},
{"kolibrios/settings/weather.json", PROGS .. "/other/Weather/weather.json"},
{"kolibrios/utils/man2html", PROGS .."/other/man2html/man2html"},
})
end -- tup.getconfig('NO_TCC') ~= 'full'
/programs/other/Weather/weather.c
44,7 → 44,8
#define IMAGE_URL "openweathermap.org/img/w/%s.png"
Image *blend=NULL;
const char *config_name = "/sys/Settings/weather.json";
const char *config1_name = "/sys/Settings/weather.json";
const char *config2_name = "/kolibrios/Settings/weather.json";
 
unsigned char char_size=1;
uint64_t auto_update_time = 0;
227,11 → 228,15
 
void get_config(char **city, char **token, char **units) // Загружаем конфиг
{
ksys_ufile_t config_j = _ksys_load_file(config_name);
ksys_ufile_t config_j;
config_j = _ksys_load_file(config1_name);
if(!config_j.size){
config_j = _ksys_load_file(config2_name);
if(!config_j.size){
notify_show("'Configuration file not found!' -E");
exit(0);
}
}
 
json_value* value =json_parse (config_j.data, config_j.size); // Парсим конфиг
for(int i=0; i<value->u.object.length; i++){