|
|
|
@ -185,6 +185,25 @@ void yon_interface_update(main_window *widgets){
|
|
|
|
gtk_list_store_clear(widgets->WebPublicationList);
|
|
|
|
gtk_list_store_clear(widgets->WebPublicationList);
|
|
|
|
int size;
|
|
|
|
int size;
|
|
|
|
GtkTreeIter iter;
|
|
|
|
GtkTreeIter iter;
|
|
|
|
|
|
|
|
char *last_update_time = config(AUTOUPDATE_timestamp);
|
|
|
|
|
|
|
|
if (!yon_char_is_empty(last_update_time)){
|
|
|
|
|
|
|
|
int datetime_size;
|
|
|
|
|
|
|
|
config_str datetime_parsed = yon_char_parse(last_update_time,&datetime_size," ");
|
|
|
|
|
|
|
|
int year, month, day, hour, minute;
|
|
|
|
|
|
|
|
int date_parsed_size, time_parsed_size;
|
|
|
|
|
|
|
|
config_str date_parsed = yon_char_parse(datetime_parsed[0],&date_parsed_size,"-");
|
|
|
|
|
|
|
|
config_str time_parsed = yon_char_parse(datetime_parsed[1],&time_parsed_size,":");
|
|
|
|
|
|
|
|
year = atoi(date_parsed[0]);
|
|
|
|
|
|
|
|
month = atoi(date_parsed[1]);
|
|
|
|
|
|
|
|
day = atoi(date_parsed[2]);
|
|
|
|
|
|
|
|
hour = atoi(time_parsed[0]);
|
|
|
|
|
|
|
|
minute = atoi(time_parsed[1]);
|
|
|
|
|
|
|
|
GDateTime *datetime = g_date_time_new_utc(year,month,day,hour,minute,0.0);
|
|
|
|
|
|
|
|
char *time_label = g_date_time_format(datetime,main_config.date_format);
|
|
|
|
|
|
|
|
gtk_entry_set_text(GTK_ENTRY(widgets->DateEntry),time_label);
|
|
|
|
|
|
|
|
g_date_time_unref(datetime);
|
|
|
|
|
|
|
|
free(time_label);
|
|
|
|
|
|
|
|
}
|
|
|
|
{
|
|
|
|
{
|
|
|
|
char *repo_config = config(REPOSITORY_parameter);
|
|
|
|
char *repo_config = config(REPOSITORY_parameter);
|
|
|
|
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->RepositoriesRepoListConfigurationCheck),0);
|
|
|
|
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->RepositoriesRepoListConfigurationCheck),0);
|
|
|
|
@ -497,6 +516,11 @@ void config_init(){
|
|
|
|
main_config.lock_save_global=0;
|
|
|
|
main_config.lock_save_global=0;
|
|
|
|
main_config.lock_save_local=0;
|
|
|
|
main_config.lock_save_local=0;
|
|
|
|
main_config.load_mode=1;
|
|
|
|
main_config.load_mode=1;
|
|
|
|
|
|
|
|
main_config.date_format=NULL;
|
|
|
|
|
|
|
|
if (!yon_window_config_get_parameter("usage","date_format",&main_config.date_format,YON_TYPE_STRING)){
|
|
|
|
|
|
|
|
main_config.date_format="%d.%m.%Y %H:%M";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void on_selection_changed(GtkWidget *self, main_window *widgets){
|
|
|
|
void on_selection_changed(GtkWidget *self, main_window *widgets){
|
|
|
|
@ -1463,6 +1487,7 @@ void yon_main_window_complete(main_window *widgets){
|
|
|
|
widgets->MirrorRemoveButton = yon_gtk_builder_get_widget(builder,"MirrorRemoveButton");
|
|
|
|
widgets->MirrorRemoveButton = yon_gtk_builder_get_widget(builder,"MirrorRemoveButton");
|
|
|
|
widgets->MirrorConfigureButton = yon_gtk_builder_get_widget(builder,"MirrorConfigureButton");
|
|
|
|
widgets->MirrorConfigureButton = yon_gtk_builder_get_widget(builder,"MirrorConfigureButton");
|
|
|
|
widgets->BootCheck = yon_gtk_builder_get_widget(builder,"BootCheck");
|
|
|
|
widgets->BootCheck = yon_gtk_builder_get_widget(builder,"BootCheck");
|
|
|
|
|
|
|
|
widgets->DateEntry = yon_gtk_builder_get_widget(builder,"DateEntry");
|
|
|
|
widgets->WebPublicationUpperTree = yon_gtk_builder_get_widget(builder,"WebPublicationUpperTree");
|
|
|
|
widgets->WebPublicationUpperTree = yon_gtk_builder_get_widget(builder,"WebPublicationUpperTree");
|
|
|
|
widgets->UpdateRepoList = GTK_LIST_STORE(gtk_builder_get_object(builder,"UpdateRepoList"));
|
|
|
|
widgets->UpdateRepoList = GTK_LIST_STORE(gtk_builder_get_object(builder,"UpdateRepoList"));
|
|
|
|
widgets->ReposList = GTK_LIST_STORE(gtk_builder_get_object(builder,"ReposList"));
|
|
|
|
widgets->ReposList = GTK_LIST_STORE(gtk_builder_get_object(builder,"ReposList"));
|
|
|
|
@ -1531,6 +1556,7 @@ int main(int argc, char *argv[]){
|
|
|
|
yon_ubl_setup_arguments(argc,argv,&unfound,&size,NULL);
|
|
|
|
yon_ubl_setup_arguments(argc,argv,&unfound,&size,NULL);
|
|
|
|
gtk_init(&argc,&argv);
|
|
|
|
gtk_init(&argc,&argv);
|
|
|
|
template_main_window *widgets = yon_ubl_window_setup();
|
|
|
|
template_main_window *widgets = yon_ubl_window_setup();
|
|
|
|
|
|
|
|
yon_root_button_setup(widgets,argv,argc);
|
|
|
|
yon_main_window_complete((main_window*)widgets);
|
|
|
|
yon_main_window_complete((main_window*)widgets);
|
|
|
|
char *path = yon_char_unite(yon_ubl_user_get_home_directory(),"/.config/",LocaleName,"/",LocaleName,".conf",NULL);
|
|
|
|
char *path = yon_char_unite(yon_ubl_user_get_home_directory(),"/.config/",LocaleName,"/",LocaleName,".conf",NULL);
|
|
|
|
yon_window_config_load(path);
|
|
|
|
yon_window_config_load(path);
|
|
|
|
|