|
|
|
|
@ -110,6 +110,7 @@ void yon_load_proceed(YON_CONFIG_TYPE type){
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void yon_config_local_load(GtkWidget *self, main_window *widgets){
|
|
|
|
|
g_signal_handlers_block_by_func(G_OBJECT(widgets->IDEntry),G_CALLBACK(on_id_changed),widgets);
|
|
|
|
|
gtk_entry_set_text(GTK_ENTRY(widgets->HostnameEntry),"");
|
|
|
|
|
gtk_entry_set_text(GTK_ENTRY(widgets->IDEntry),"");
|
|
|
|
|
gtk_entry_set_text(GTK_ENTRY(widgets->LocaleEntry),DEFAULT_LABEL);
|
|
|
|
|
@ -166,10 +167,13 @@ void yon_config_local_load(GtkWidget *self, main_window *widgets){
|
|
|
|
|
}
|
|
|
|
|
if (strcmp(locale_string,"")) gtk_entry_set_text(GTK_ENTRY(widgets->LocaleEntry),locale_string);
|
|
|
|
|
}
|
|
|
|
|
g_signal_handlers_unblock_by_func(G_OBJECT(widgets->IDEntry),G_CALLBACK(on_id_changed),widgets);
|
|
|
|
|
if (getuid()==0)
|
|
|
|
|
yon_ubl_status_box_render(LOCAL_LOAD_SUCCESS_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void yon_config_global_load(GtkWidget *self, main_window *widgets){
|
|
|
|
|
g_signal_handlers_block_by_func(G_OBJECT(widgets->IDEntry),G_CALLBACK(on_id_changed),widgets);
|
|
|
|
|
gtk_entry_set_text(GTK_ENTRY(widgets->HostnameEntry),"");
|
|
|
|
|
gtk_entry_set_text(GTK_ENTRY(widgets->IDEntry),"");
|
|
|
|
|
gtk_entry_set_text(GTK_ENTRY(widgets->LocaleEntry),DEFAULT_LABEL);
|
|
|
|
|
@ -226,6 +230,8 @@ void yon_config_global_load(GtkWidget *self, main_window *widgets){
|
|
|
|
|
}
|
|
|
|
|
if (strcmp(locale_string,"")) gtk_entry_set_text(GTK_ENTRY(widgets->LocaleEntry),locale_string);
|
|
|
|
|
}
|
|
|
|
|
g_signal_handlers_unblock_by_func(G_OBJECT(widgets->IDEntry),G_CALLBACK(on_id_changed),widgets);
|
|
|
|
|
if (getuid()==0)
|
|
|
|
|
yon_ubl_status_box_render(GLOBAL_LOAD_SUCCESS_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -597,8 +603,6 @@ int main(int argc, char *argv[]){
|
|
|
|
|
yon_ubl_status_box_setup(widgets->StatusIcon,widgets->StatusBox,widgets->StatusLabel);
|
|
|
|
|
if (getuid()!=0)
|
|
|
|
|
yon_ubl_status_box_render(ROOT_WARNING_LABEL,BACKGROUND_IMAGE_FAIL_TYPE);
|
|
|
|
|
else
|
|
|
|
|
yon_ubl_status_box_render(TITLE_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE);
|
|
|
|
|
yon_ubl_setup_sockets(widgets->PlugBox,widgets->LeftBox,widgets->RightBox,main_config.socket_id,main_config.load_socket_id,main_config.save_socket_id);
|
|
|
|
|
yon_window_config_setup(GTK_WINDOW(widgets->Window));
|
|
|
|
|
yon_window_config_load(config_path);
|
|
|
|
|
|