|
|
|
|
@ -402,11 +402,11 @@ void yon_all_resolutions_update(){
|
|
|
|
|
main_config.resolutions_sorted = yon_resource_open_file(get_resolutions_supportable_command,&main_config.resolutions_size);
|
|
|
|
|
char *table_str = yon_char_parsed_to_string(main_config.resolutions_sorted,main_config.resolutions_size,"\n");
|
|
|
|
|
int format_size;
|
|
|
|
|
config_str resolutions_formatted = yon_config_load(table_format_command(table_str),&format_size);
|
|
|
|
|
config_str resolutions_formatted = yon_config_load(yon_debug_output("%s\n",table_format_command(table_str)),&format_size);
|
|
|
|
|
for (int i=0;i<format_size;i++){
|
|
|
|
|
yon_char_remove_last_symbol(resolutions_formatted[i],'\n');
|
|
|
|
|
int parsed_size;
|
|
|
|
|
config_str parsed = yon_char_parse(main_config.resolutions_sorted[i],&parsed_size,";");
|
|
|
|
|
config_str parsed = yon_char_parse(main_config.resolutions_sorted[i+1],&parsed_size,";");
|
|
|
|
|
g_hash_table_insert(main_config.resolutions,yon_char_new(parsed[0]),yon_char_new(resolutions_formatted[i]));
|
|
|
|
|
yon_char_parsed_free(parsed,parsed_size);
|
|
|
|
|
}
|
|
|
|
|
@ -734,6 +734,12 @@ char *yon_primusrun_default(char *target){
|
|
|
|
|
return final;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void on_paned_position_changed(GtkWidget *, GdkEvent*,main_window *widgets){
|
|
|
|
|
int size = (int)(gtk_widget_get_allocated_height(widgets->InterfaceBox)*0.4);
|
|
|
|
|
if (gtk_paned_get_position(GTK_PANED(widgets->TerminalPaned))>size-40)
|
|
|
|
|
gtk_paned_set_position(GTK_PANED(widgets->TerminalPaned),size-40);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** void yon_setup_widgets(main_window *widgets)
|
|
|
|
|
* [EN]
|
|
|
|
|
* Sets up every element on main window
|
|
|
|
|
@ -869,6 +875,8 @@ template_main_window *yon_main_window_complete(main_window *widgets){
|
|
|
|
|
g_signal_connect(G_OBJECT(widgets->MoreButton),"clicked",G_CALLBACK(on_terminal_revealer_open),widgets);
|
|
|
|
|
g_signal_connect(G_OBJECT(widgets->TerminalCancelButton),"clicked",G_CALLBACK(on_command_cancel),widgets);
|
|
|
|
|
g_signal_connect(G_OBJECT(widgets->UnlockPacmanButton),"clicked",G_CALLBACK(on_pacman_db_unlock),NULL);
|
|
|
|
|
g_signal_connect(G_OBJECT(widgets->TerminalPaned),"notify::position",G_CALLBACK(on_paned_position_changed),widgets);
|
|
|
|
|
g_signal_connect(G_OBJECT(widgets->TerminalPaned),"notify::max-position",G_CALLBACK(on_paned_position_changed),widgets);
|
|
|
|
|
// g_signal_connect(G_OBJECT(widgets->InstallTerminal),"child-ready",G_CALLBACK(on_driver_child_ready),NULL);
|
|
|
|
|
char *path = yon_char_unite(yon_ubl_user_get_home_directory(),"/.config/",LocaleName,"/",LocaleName,".conf",NULL);
|
|
|
|
|
yon_window_config_load(path);
|
|
|
|
|
@ -928,7 +936,6 @@ void config_init(){
|
|
|
|
|
int main(int argc, char *argv[]){
|
|
|
|
|
setlocale(LC_ALL, "");
|
|
|
|
|
textdomain (LocaleName);
|
|
|
|
|
config_init();
|
|
|
|
|
|
|
|
|
|
yon_ubl_connect_config((_template_config*)&main_config);
|
|
|
|
|
yon_ubl_window_init(TITLE_LABEL,TITLE_INFO_LABEL,LocaleName,CssPath,LocaleName,version_application,WIKI_LINK);
|
|
|
|
|
@ -937,6 +944,7 @@ int main(int argc, char *argv[]){
|
|
|
|
|
yon_ubl_setup_arguments(argc,argv,&unfound,&size,NULL);
|
|
|
|
|
gtk_init(&argc, &argv);
|
|
|
|
|
template_main_window *widgets = yon_ubl_window_setup();
|
|
|
|
|
config_init();
|
|
|
|
|
widgets = yon_main_window_complete((main_window*)widgets);
|
|
|
|
|
yon_root_button_setup(widgets,argv,argc);
|
|
|
|
|
|
|
|
|
|
|