WIP keyboard remake

pull/14/head
parent 8771b15072
commit 1f46007544
No known key found for this signature in database
GPG Key ID: FF1D842BF4DDE92B

@ -106,15 +106,14 @@ void yon_load_proceed(YON_CONFIG_TYPE type){
} }
gboolean yon_interface_update(main_window *widgets){ gboolean yon_interface_update(main_window *widgets){
g_signal_handlers_block_by_func(G_OBJECT(widgets->SystemKeyboardModelCombo),G_CALLBACK(on_model_changed),widgets); g_signal_handlers_block_by_func(G_OBJECT(widgets->KeyboardModelCombo),G_CALLBACK(on_model_changed),widgets);
// g_signal_handlers_block_by_func(G_OBJECT(widgets->SystemKeyboardOptionsCombo),G_CALLBACK(on_options_open),widgets); // g_signal_handlers_block_by_func(G_OBJECT(widgets->SystemKeyboardOptionsCombo),G_CALLBACK(on_options_open),widgets);
g_signal_handlers_block_by_func(G_OBJECT(widgets->NumlockCombo),G_CALLBACK(on_num_lock_changed),widgets); g_signal_handlers_block_by_func(G_OBJECT(widgets->NumlockCombo),G_CALLBACK(on_num_lock_changed),widgets);
gtk_list_store_clear(main_config.layouts_list);
gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->SystemKeyboardModelCombo),0); gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->KeyboardModelCombo),0);
gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->NumlockCombo),0); gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->NumlockCombo),0);
// gtk_entry_set_text(GTK_ENTRY(widgets->SystemKeyboardOptionsCombo),DEFAULT_LABEL);
GtkTreeIter iter; GtkTreeIter iter;
gtk_entry_set_text(GTK_ENTRY(widgets->SystemKeyboardOptionsCombo),DEFAULT_LABEL);
{ {
char *name = yon_config_get_by_key(model_parameter); char *name = yon_config_get_by_key(model_parameter);
char *id; char *id;
@ -123,60 +122,44 @@ gboolean yon_interface_update(main_window *widgets){
for (;valid;valid=gtk_tree_model_iter_next(GTK_TREE_MODEL(main_config.models_list),&iter)){ for (;valid;valid=gtk_tree_model_iter_next(GTK_TREE_MODEL(main_config.models_list),&iter)){
gtk_tree_model_get(GTK_TREE_MODEL(main_config.models_list),&iter,1,&id,-1); gtk_tree_model_get(GTK_TREE_MODEL(main_config.models_list),&iter,1,&id,-1);
if (!strcmp(name,id)){ if (!strcmp(name,id)){
gtk_combo_box_set_active_iter(GTK_COMBO_BOX(widgets->SystemKeyboardModelCombo),&iter); gtk_combo_box_set_active_iter(GTK_COMBO_BOX(widgets->KeyboardModelCombo),&iter);
break; break;
} }
} }
} else gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->SystemKeyboardModelCombo),0); } else gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->KeyboardModelCombo),0);
} }
{ {
char *name = yon_config_get_by_key(options_parameter); // if (main_config.layouts_store){
if (name) { // for_iter(main_config.layouts_store,&iter){
char *id, *rname; // gtk_tree_store_set(main_config.layouts_store,&iter,2,0,-1);
gtk_entry_set_text(GTK_ENTRY(widgets->SystemKeyboardOptionsCombo),name); // }
int valid = gtk_tree_model_get_iter_first(GTK_TREE_MODEL(main_config.options_list),&iter); // }
for (;valid;valid=gtk_tree_model_iter_next(GTK_TREE_MODEL(main_config.options_list),&iter)){
gtk_tree_model_get(GTK_TREE_MODEL(main_config.options_list),&iter,0,&id,1,&rname,-1);
if (!strcmp(id,name)){
gtk_list_store_set(main_config.options_list,&iter,2,1,-1);
gtk_entry_set_text(GTK_ENTRY(widgets->SystemKeyboardOptionsCombo),rname);
break;
}
}
}
}
{
if (main_config.layouts_list){
for_iter(main_config.layouts_list,&iter){
gtk_list_store_set(main_config.layouts_list,&iter,2,0,-1);
}
}
char *name = yon_config_get_by_key(num_lock_boot_parameter); char *name = yon_config_get_by_key(num_lock_boot_parameter);
if (name) { if (name) {
if (!strcmp(name,"yes")) gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->NumlockCombo),1); if (!strcmp(name,"yes")) gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->NumlockCombo),1);
else if (!strcmp(name,"no")) gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->NumlockCombo),2); else if (!strcmp(name,"no")) gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->NumlockCombo),2);
} }
else gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->NumlockCombo),0); else gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->NumlockCombo),0);
if (main_config.layouts_list){ // if (main_config.layouts_store){
int size=0; // int size=0;
name = yon_config_get_by_key(keyboard_layout_parameter); // name = yon_config_get_by_key(keyboard_layout_parameter);
config_str layouts = yon_char_parse(name,&size,","); // config_str layouts = yon_char_parse(name,&size,",");
GtkTreeIter iter, itar; // GtkTreeIter iter, itar;
char *rid,*rname; // char *rid,*rname;
gtk_list_store_clear(main_config.layouts_list); // gtk_tree_store_clear(main_config.layouts_store);
for (int i=0;i<size;i++){ // for (int i=0;i<size;i++){
for_iter(main_config.layouts_list,&iter){ // for_iter(main_config.layouts_store,&iter){
gtk_tree_model_get(GTK_TREE_MODEL(main_config.layouts_list),&iter,0,&rid,1,&rname,-1); // gtk_tree_model_get(GTK_TREE_MODEL(main_config.layouts_store),&iter,0,&rid,1,&rname,-1);
if (!strcmp(layouts[i],rid)){ // if (!strcmp(layouts[i],rid)){
gtk_list_store_append(main_config.layouts_list,&itar); // gtk_tree_store_append(main_config.layouts_store,&itar,NULL);
gtk_list_store_set(main_config.layouts_list,&itar,0,rname,1,rid,2,1,-1); // gtk_tree_store_set(main_config.layouts_store,&itar,0,rname,1,rid,2,1,-1);
} // }
} // }
} // }
} // }
} }
g_signal_handlers_unblock_by_func(G_OBJECT(widgets->SystemKeyboardModelCombo),G_CALLBACK(on_model_changed),widgets); g_signal_handlers_unblock_by_func(G_OBJECT(widgets->KeyboardModelCombo),G_CALLBACK(on_model_changed),widgets);
// g_signal_handlers_unblock_by_func(G_OBJECT(widgets->OptionsButton),G_CALLBACK(on_options_open),widgets); // g_signal_handlers_unblock_by_func(G_OBJECT(widgets->OptionsButton),G_CALLBACK(on_options_open),widgets);
g_signal_handlers_unblock_by_func(G_OBJECT(widgets->NumlockCombo),G_CALLBACK(on_num_lock_changed),widgets); g_signal_handlers_unblock_by_func(G_OBJECT(widgets->NumlockCombo),G_CALLBACK(on_num_lock_changed),widgets);
return G_SOURCE_REMOVE; return G_SOURCE_REMOVE;
@ -202,9 +185,10 @@ void on_model_changed(GtkComboBoxText *self, main_window *widgets){
default: default:
char *id; char *id;
GtkTreeIter iter; GtkTreeIter iter;
gtk_combo_box_get_active_iter(GTK_COMBO_BOX(widgets->SystemKeyboardModelCombo),&iter); if (gtk_combo_box_get_active_iter(GTK_COMBO_BOX(widgets->KeyboardModelCombo),&iter)){
gtk_tree_model_get(GTK_TREE_MODEL(main_config.models_list),&iter,1,&id,-1); gtk_tree_model_get(GTK_TREE_MODEL(main_config.models_list),&iter,1,&id,-1);
yon_config_register(model_parameter,model_parameter_command,id); yon_config_register(model_parameter,model_parameter_command,id);
}
break; break;
} }
@ -218,7 +202,7 @@ void on_options_accept(GtkWidget *self, dictionary *dict){
char *name, *id; char *name, *id;
if (gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(window->MainTree)),&model,&iter)){ if (gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(window->MainTree)),&model,&iter)){
gtk_tree_model_get(model,&iter,0,&id,1,&name,-1); gtk_tree_model_get(model,&iter,0,&id,1,&name,-1);
gtk_entry_set_text(GTK_ENTRY(widgets->SystemKeyboardOptionsCombo),name); gtk_entry_set_text(GTK_ENTRY(widgets->OptionsTree),name);
yon_config_register(options_parameter,options_parameter_command,id); yon_config_register(options_parameter,options_parameter_command,id);
} }
@ -233,7 +217,7 @@ void yon_layouts_save(main_window *widgets){
for_iter(widgets->layoutsFilter,&iter){ for_iter(widgets->layoutsFilter,&iter){
char *name, *id; char *name, *id;
gtk_tree_model_filter_convert_iter_to_child_iter(GTK_TREE_MODEL_FILTER(widgets->layoutsFilter),&child_iter,&iter); gtk_tree_model_filter_convert_iter_to_child_iter(GTK_TREE_MODEL_FILTER(widgets->layoutsFilter),&child_iter,&iter);
gtk_tree_model_get(GTK_TREE_MODEL(main_config.layouts_list),&child_iter,0,&name,1,&id,-1); gtk_tree_model_get(GTK_TREE_MODEL(main_config.layouts_store),&child_iter,0,&name,1,&id,-1);
yon_char_parsed_add_or_create_if_exists(parsed,&size,id); yon_char_parsed_add_or_create_if_exists(parsed,&size,id);
} }
if (parsed&&size>0){ if (parsed&&size>0){
@ -279,21 +263,28 @@ GList *yon_get_all_selected(GtkTreeView *tree, int column){
void on_layouts_accept(GtkWidget *self, dictionary *dict){ void on_layouts_accept(GtkWidget *self, dictionary *dict){
main_window *widgets = yon_dictionary_get_data(dict->first,main_window*); main_window *widgets = yon_dictionary_get_data(dict->first,main_window*);
layouts_window *window = yon_dictionary_get_data(dict->first->next,layouts_window*); layouts_window *window = yon_dictionary_get_data(dict->first->next,layouts_window*);
gtk_list_store_clear(main_config.layouts_list); gtk_list_store_clear(widgets->LayoutsList);
GtkTreeModel *model = GTK_TREE_MODEL(window->list); GtkTreeModel *model = GTK_TREE_MODEL(window->list);
GList *list = yon_get_all_selected(GTK_TREE_VIEW(window->MainTree),2); GtkTreeIter main_iter, window_iter;
char *name; for_iter(window->list,&window_iter){
char *id; char *id, *name;
GtkTreeIter iter, lwiter; int status;
GtkTreePath *pth; gtk_tree_model_get(model,&window_iter,0,&id,1,&name,2,&status,-1);
for (guint i=0;i<g_list_length(list);i++){ if (status){
pth = (GtkTreePath*)g_list_nth_data(list,i); gtk_list_store_append(widgets->LayoutsList,&main_iter);
gtk_tree_model_get_iter(model,&lwiter,pth); gtk_list_store_set(widgets->LayoutsList,&main_iter,0,id,1,name,-1);
gtk_list_store_append(main_config.layouts_list,&iter); }
gtk_tree_model_get(model,&lwiter,0,&name,1,&id,-1); GtkTreeIter child_iter;
gtk_list_store_set(main_config.layouts_list,&iter,1,name,0,id,2,1,-1); if (gtk_tree_model_iter_children(model,&child_iter,&window_iter)){
} for (int valid2=1;valid2;valid2=gtk_tree_model_iter_next(model,&child_iter)){
yon_layouts_save(widgets); gtk_tree_model_get(model,&child_iter,0,&id,1,&name,2,&status,-1);
if (status){
gtk_list_store_append(widgets->LayoutsList,&main_iter);
gtk_list_store_set(widgets->LayoutsList,&main_iter,0,id,1,name,-1);
}
}
}
}
on_subwindow_close(self); on_subwindow_close(self);
} }
@ -302,11 +293,11 @@ void on_layouts_chosen(GtkCellRenderer *, gchar *path, layouts_window *window){
gtk_tree_model_get_iter_from_string(GTK_TREE_MODEL(window->list),&iter,path); gtk_tree_model_get_iter_from_string(GTK_TREE_MODEL(window->list),&iter,path);
int chosen; int chosen;
gtk_tree_model_get(GTK_TREE_MODEL(window->list),&iter,2,&chosen,-1); gtk_tree_model_get(GTK_TREE_MODEL(window->list),&iter,2,&chosen,-1);
gtk_list_store_set(window->list,&iter,2,!chosen,-1); gtk_tree_store_set(GTK_TREE_STORE(window->list),&iter,2,!chosen,-1);
} }
void on_system_layouts_add(GtkWidget *, main_window *widgets){ void on_system_layouts_add(GtkWidget *, main_window *widgets){
yon_layouts_add(GTK_TREE_VIEW(widgets->SystemLayoutTree),widgets->SystemList,widgets); yon_layouts_add(GTK_TREE_VIEW(widgets->LayoutTree),widgets->LayoutsList,widgets);
} }
void yon_layouts_add(GtkTreeView *, GtkListStore *, main_window *widgets){ void yon_layouts_add(GtkTreeView *, GtkListStore *, main_window *widgets){
@ -317,12 +308,14 @@ void yon_layouts_add(GtkTreeView *, GtkListStore *, main_window *widgets){
window->CancelButton = yon_gtk_builder_get_widget(builder,"CancelButton"); window->CancelButton = yon_gtk_builder_get_widget(builder,"CancelButton");
window->ChosenCell = GTK_CELL_RENDERER(gtk_builder_get_object(builder,"ChosenCell")); window->ChosenCell = GTK_CELL_RENDERER(gtk_builder_get_object(builder,"ChosenCell"));
window->MainTree = yon_gtk_builder_get_widget(builder,"LayoutsTree"); window->MainTree = yon_gtk_builder_get_widget(builder,"LayoutsTree");
window->list = main_config.layouts_list; window->list = (GtkListStore*)main_config.layouts_store;
gtk_tree_view_set_model(GTK_TREE_VIEW(window->MainTree), GTK_TREE_MODEL(window->list)); gtk_tree_view_set_model(GTK_TREE_VIEW(window->MainTree), GTK_TREE_MODEL(main_config.layouts_store));
gtk_tree_selection_set_mode(gtk_tree_view_get_selection(GTK_TREE_VIEW(window->MainTree)),GTK_SELECTION_MULTIPLE); gtk_tree_selection_set_mode(gtk_tree_view_get_selection(GTK_TREE_VIEW(window->MainTree)),GTK_SELECTION_MULTIPLE);
yon_gtk_window_setup(GTK_WINDOW(window->Window),GTK_WINDOW(widgets->Window),TITLE_LABEL,icon_path,"layout_window"); yon_gtk_window_setup(GTK_WINDOW(window->Window),GTK_WINDOW(widgets->Window),TITLE_LABEL,icon_path,"layout_window");
gtk_tree_view_column_clicked(GTK_TREE_VIEW_COLUMN(gtk_tree_view_get_column(GTK_TREE_VIEW(window->MainTree),0)));
dictionary *dict = NULL; dictionary *dict = NULL;
yon_dictionary_add_or_create_if_exists_with_data(dict,"widgets",widgets); yon_dictionary_add_or_create_if_exists_with_data(dict,"widgets",widgets);
yon_dictionary_add_or_create_if_exists_with_data(dict,"window",window); yon_dictionary_add_or_create_if_exists_with_data(dict,"window",window);
@ -340,13 +333,13 @@ void yon_layouts_add(GtkTreeView *, GtkListStore *, main_window *widgets){
gtk_tree_model_get(GTK_TREE_MODEL(window->list),&iter,0,&id,-1); gtk_tree_model_get(GTK_TREE_MODEL(window->list),&iter,0,&id,-1);
for (int i=0;i<size;i++){ for (int i=0;i<size;i++){
if (!strcmp(id,parsed[i])){ if (!strcmp(id,parsed[i])){
gtk_list_store_set(window->list,&iter,2,1,-1); gtk_tree_store_set(GTK_TREE_STORE(window->list),&iter,2,1,-1);
found=1; found=1;
break; break;
} }
} }
if (!found) { if (!found) {
gtk_list_store_set(window->list,&iter,2,0,-1); gtk_tree_store_set(GTK_TREE_STORE(window->list),&iter,2,0,-1);
} }
} }
} }
@ -365,11 +358,25 @@ void yon_layouts_remove(GtkTreeView *tree, GtkListStore *cur_list, main_window *
} }
void on_system_layouts_remove(GtkWidget *, main_window *widgets){ void on_system_layouts_remove(GtkWidget *, main_window *widgets){
yon_layouts_add(GTK_TREE_VIEW(widgets->ConsoleLayoutTree),widgets->ConsoleList,widgets); yon_layouts_remove(GTK_TREE_VIEW(widgets->LayoutTree),widgets->LayoutsList,widgets);
} }
// standard functions // standard functions
void yon_layout_build(char *key, dictionary *value, main_window *){
GtkTreeIter parent;
GtkTreeIter iter;
gtk_tree_store_append(main_config.layouts_store,&parent,NULL);
gtk_tree_store_set(main_config.layouts_store,&parent,0,key,1,"",2,(char*)value->first->data,-1);
dictionary *dict;
for_dictionaries(dict,value){
if (yon_char_is_empty(dict->key)) continue;
gtk_tree_store_append(main_config.layouts_store,&iter,&parent);
char *key_full = yon_char_unite(key,"_",dict->key,NULL);
gtk_tree_store_set(main_config.layouts_store,&iter,0,key_full,1,dict->key,2,(char*)dict->data,-1);
}
}
void yon_config_init(){ void yon_config_init(){
int size; int size;
main_config.models_list = gtk_list_store_new(3,G_TYPE_STRING,G_TYPE_STRING,G_TYPE_BOOLEAN); main_config.models_list = gtk_list_store_new(3,G_TYPE_STRING,G_TYPE_STRING,G_TYPE_BOOLEAN);
@ -381,17 +388,29 @@ void yon_config_init(){
gtk_list_store_append(main_config.models_list,&iter); gtk_list_store_append(main_config.models_list,&iter);
gtk_list_store_set(main_config.models_list,&iter,1,models[i],0,_(models[i+1]),-1); gtk_list_store_set(main_config.models_list,&iter,1,models[i],0,_(models[i+1]),-1);
} }
main_config.layouts_list = gtk_list_store_new(3,G_TYPE_STRING,G_TYPE_STRING,G_TYPE_BOOLEAN); yon_char_parsed_free(models,size);
int laysize;
config_str rtn = yon_resource_open_file(layouts_path,&size); main_config.layouts_store = gtk_tree_store_new(4,G_TYPE_STRING,G_TYPE_STRING,G_TYPE_STRING,G_TYPE_BOOLEAN);
for (int i=0; i<size; i++){ main_config.layouts_list = yon_config_load(layouts_command,&main_config.layouts_size);
yon_char_remove_last_symbol(rtn[i],'\n'); main_config.layouts = g_hash_table_new(g_str_hash,g_str_equal);
config_str layout = yon_char_parse(rtn[i],&laysize,";"); for (int i=0; i<main_config.layouts_size; i++){
gtk_list_store_append(main_config.layouts_list,&iter); yon_char_remove_last_symbol(main_config.layouts_list[i],'\n');
gtk_list_store_set(main_config.layouts_list,&iter,0,layout[0],1,_(layout[1]),-1); int parsed_size;
config_str parsed = yon_char_parse(main_config.layouts_list[i],&parsed_size,"|");
if (!g_hash_table_contains(main_config.layouts,parsed[0])){
dictionary *dict = NULL;
yon_dictionary_add_or_create_if_exists_with_data(dict,parsed[1],yon_char_new(parsed[2]));
g_hash_table_insert(main_config.layouts,yon_char_new(parsed[0]),dict);
} else {
dictionary *dict = (dictionary*)g_hash_table_lookup(main_config.layouts,parsed[0]);
yon_dictionary_add_or_create_if_exists_with_data(dict,parsed[1],yon_char_new(parsed[2]));
}
yon_char_parsed_free(parsed,parsed_size);
} }
main_config.options_list = gtk_list_store_new(3,G_TYPE_STRING,G_TYPE_STRING,G_TYPE_BOOLEAN); main_config.options_list = gtk_list_store_new(3,G_TYPE_STRING,G_TYPE_STRING,G_TYPE_BOOLEAN);
rtn = yon_config_load(get_options_command,&size); config_str rtn = yon_config_load(get_options_command,&size);
for (int i=0; i<size;i++){ for (int i=0; i<size;i++){
int option_size; int option_size;
rtn[i] = yon_char_divide_search(rtn[i],"\n",-1); rtn[i] = yon_char_divide_search(rtn[i],"\n",-1);
@ -399,6 +418,7 @@ void yon_config_init(){
gtk_list_store_append(main_config.options_list,&iter); gtk_list_store_append(main_config.options_list,&iter);
gtk_list_store_set(main_config.options_list,&iter,0,option[0],1,_(option[1]),-1); gtk_list_store_set(main_config.options_list,&iter,0,option[0],1,_(option[1]),-1);
} }
yon_char_parsed_free(rtn,size);
} }
void yon_main_window_complete(main_window *widgets){ void yon_main_window_complete(main_window *widgets){
@ -408,27 +428,21 @@ void yon_main_window_complete(main_window *widgets){
// Custom widgets configuration // Custom widgets configuration
{ {
widgets->ConsoleNumlockCombo = yon_gtk_builder_get_widget(builder,"ConsoleNumlockCombo"); widgets->KeyboardModelCombo = yon_gtk_builder_get_widget(builder,"KeyboardModelCombo");
widgets->ConsoleDefaultLayoutRadio = yon_gtk_builder_get_widget(builder,"ConsoleDefaultLayoutRadio"); widgets->DefaultLayoutRadio = yon_gtk_builder_get_widget(builder,"DefaultLayoutRadio");
widgets->ConsoleManualLayoutRadio = yon_gtk_builder_get_widget(builder,"ConsoleManualLayoutRadio"); widgets->ManualLayoutRadio = yon_gtk_builder_get_widget(builder,"ManualLayoutRadio");
widgets->ConsoleLayoutTree = yon_gtk_builder_get_widget(builder,"ConsoleLayoutTree"); widgets->LayoutTree = yon_gtk_builder_get_widget(builder,"LayoutTree");
widgets->ConsoleLayoutAddButton = yon_gtk_builder_get_widget(builder,"ConsoleLayoutAddButton"); widgets->LayoutAddButton = yon_gtk_builder_get_widget(builder,"LayoutAddButton");
widgets->ConsoleLayoutRemoveButton = yon_gtk_builder_get_widget(builder,"ConsoleLayoutRemoveButton"); widgets->LayoutRemoveButton = yon_gtk_builder_get_widget(builder,"LayoutRemoveButton");
widgets->ConsoleScrollLockCheck = yon_gtk_builder_get_widget(builder,"ConsoleScrollLockCheck"); widgets->LayoutChangingCombo = yon_gtk_builder_get_widget(builder,"LayoutChangingCombo");
widgets->ConsoleManualEntry = yon_gtk_builder_get_widget(builder,"ConsoleManualEntry"); widgets->OptionsTree = yon_gtk_builder_get_widget(builder,"OptionsTree");
widgets->SystemKeyboardModelCombo = yon_gtk_builder_get_widget(builder,"SystemKeyboardModelCombo"); widgets->OptionsEditButton = yon_gtk_builder_get_widget(builder,"OptionsEditButton");
widgets->SystemKeyboardOptionsCombo = yon_gtk_builder_get_widget(builder,"SystemKeyboardOptionsCombo"); widgets->ScrollLockCheck = yon_gtk_builder_get_widget(builder,"ScrollLockCheck");
widgets->SystemDefaultLayoutRadio = yon_gtk_builder_get_widget(builder,"SystemDefaultLayoutRadio"); widgets->ComposeCheck = yon_gtk_builder_get_widget(builder,"ComposeCheck");
widgets->SystemManualLayoutRadio = yon_gtk_builder_get_widget(builder,"SystemManualLayoutRadio"); widgets->ManualEntry = yon_gtk_builder_get_widget(builder,"ManualEntry");
widgets->SystemLayoutTree = yon_gtk_builder_get_widget(builder,"SystemLayoutTree");
widgets->SystemLayoutAddButton = yon_gtk_builder_get_widget(builder,"SystemLayoutAddButton");
widgets->SystemLayoutRemoveButton = yon_gtk_builder_get_widget(builder,"SystemLayoutRemoveButton");
widgets->SystemScrollLockCheck = yon_gtk_builder_get_widget(builder,"SystemScrollLockCheck");
widgets->SystemComposeCheck = yon_gtk_builder_get_widget(builder,"SystemComposeCheck");
widgets->SystemManualEntry = yon_gtk_builder_get_widget(builder,"SystemManualEntry");
widgets->NumlockCombo = yon_gtk_builder_get_widget(builder,"NumlockCombo"); widgets->NumlockCombo = yon_gtk_builder_get_widget(builder,"NumlockCombo");
widgets->ConsoleList = GTK_LIST_STORE(gtk_builder_get_object(builder,"ConsoleList")); widgets->TTYLayoutCombo = yon_gtk_builder_get_widget(builder,"TTYLayoutCombo");
widgets->SystemList = GTK_LIST_STORE(gtk_builder_get_object(builder,"SystemList")); widgets->LayoutsList = GTK_LIST_STORE(gtk_builder_get_object(builder,"LayoutsList"));
/* Widget registration for config monitoring | Регистрация виджетов для мониторинга конфига */ /* Widget registration for config monitoring | Регистрация виджетов для мониторинга конфига */
@ -436,9 +450,9 @@ void yon_main_window_complete(main_window *widgets){
/* Signal connection | Присоединение сигналов */ /* Signal connection | Присоединение сигналов */
g_signal_connect(G_OBJECT(widgets->SystemLayoutAddButton),"clicked",G_CALLBACK(on_system_layouts_add),widgets); g_signal_connect(G_OBJECT(widgets->LayoutAddButton),"clicked",G_CALLBACK(on_system_layouts_add),widgets);
g_signal_connect(G_OBJECT(widgets->SystemLayoutRemoveButton),"clicked",G_CALLBACK(on_system_layouts_remove),widgets); g_signal_connect(G_OBJECT(widgets->LayoutRemoveButton),"clicked",G_CALLBACK(on_system_layouts_remove),widgets);
g_signal_connect(G_OBJECT(widgets->SystemKeyboardModelCombo),"changed",G_CALLBACK(on_model_changed),widgets); g_signal_connect(G_OBJECT(widgets->KeyboardModelCombo),"changed",G_CALLBACK(on_model_changed),widgets);
// g_signal_connect(G_OBJECT(widgets->SystemKeyboardOptionsCombo),"clicked",G_CALLBACK(on_options_open),widgets); // g_signal_connect(G_OBJECT(widgets->SystemKeyboardOptionsCombo),"clicked",G_CALLBACK(on_options_open),widgets);
g_signal_connect(G_OBJECT(widgets->NumlockCombo),"changed",G_CALLBACK(on_num_lock_changed),widgets); g_signal_connect(G_OBJECT(widgets->NumlockCombo),"changed",G_CALLBACK(on_num_lock_changed),widgets);
} }
@ -454,6 +468,8 @@ void yon_main_window_complete(main_window *widgets){
yon_root_button_setup((template_main_window*)widgets,main_config.launch_arguments,main_config.launch_size); yon_root_button_setup((template_main_window*)widgets,main_config.launch_arguments,main_config.launch_size);
yon_save_window_set_postsave_function(on_save_done,widgets); yon_save_window_set_postsave_function(on_save_done,widgets);
gtk_tree_view_column_clicked(GTK_TREE_VIEW_COLUMN(gtk_tree_view_get_column(GTK_TREE_VIEW(widgets->LayoutTree),0)));
g_hash_table_foreach(main_config.layouts,(GHFunc)yon_layout_build,widgets);
on_config_local_load(NULL,widgets); on_config_local_load(NULL,widgets);
} }

@ -50,6 +50,25 @@
#define get_models_command "sed '/<\\/modelList>/q' /usr/share/X11/xkb/rules/base.xml | grep -E '^ {8,8}<name>|^ {8,8}<description>'|sed -e 's/ *<name>//g' -e 's,</name>,,g' -e 's/ *<description>//g' -e 's,</description>,,g'" #define get_models_command "sed '/<\\/modelList>/q' /usr/share/X11/xkb/rules/base.xml | grep -E '^ {8,8}<name>|^ {8,8}<description>'|sed -e 's/ *<name>//g' -e 's,</name>,,g' -e 's/ *<description>//g' -e 's,</description>,,g'"
#define layouts_path "resource:///com/ublinux/csv/layouts.csv" #define layouts_path "resource:///com/ublinux/csv/layouts.csv"
#define layouts_command "xkbcli list --load-exotic | awk \"\
layout && /description:/ {\
match(\\$0, /: *(.*)/, matches);\
description = matches[1];\
printf \\\"%s|%s|%s\\\\n\\\", layout, variant, description;\
layout = \\\"\\\"; variant = \\\"\\\";\
}\
/layout:/ {\
match(\\$0, /: *'([^']+)'/, matches);\
l = matches[1];\
layout = layouts[l] = l;\
}\
/variant:/ {\
match(\\$0, /: *'([^']+)'/, matches);\
variant = matches[1];\
}\
\" | sort -u\
"
typedef char* string; typedef char* string;
__attribute__((unused)) static \ __attribute__((unused)) static \
@ -61,36 +80,33 @@ typedef struct {
config_str launch_arguments; config_str launch_arguments;
int launch_size; int launch_size;
char *options; char *options;
GtkListStore *layouts_list; GtkTreeStore *layouts_store;
GtkListStore *options_list; GtkListStore *options_list;
GtkListStore *models_list; GtkListStore *models_list;
GHashTable *layouts;
int layouts_size;
config_str layouts_list;
} config; } config;
typedef struct { typedef struct {
template_window_fields template_window_fields
GtkWidget *ConsoleNumlockCombo; GtkWidget *KeyboardModelCombo;
GtkWidget *ConsoleDefaultLayoutRadio; GtkWidget *DefaultLayoutRadio;
GtkWidget *ConsoleManualLayoutRadio; GtkWidget *ManualLayoutRadio;
GtkWidget *ConsoleLayoutTree; GtkWidget *LayoutTree;
GtkWidget *ConsoleLayoutAddButton; GtkWidget *LayoutAddButton;
GtkWidget *ConsoleLayoutRemoveButton; GtkWidget *LayoutRemoveButton;
GtkWidget *ConsoleScrollLockCheck; GtkWidget *LayoutChangingCombo;
GtkWidget *ConsoleManualEntry; GtkWidget *OptionsTree;
GtkWidget *SystemKeyboardModelCombo; GtkWidget *OptionsEditButton;
GtkWidget *SystemKeyboardOptionsCombo; GtkWidget *ScrollLockCheck;
GtkWidget *SystemDefaultLayoutRadio; GtkWidget *ComposeCheck;
GtkWidget *SystemManualLayoutRadio; GtkWidget *ManualEntry;
GtkWidget *SystemLayoutTree;
GtkWidget *SystemLayoutAddButton;
GtkWidget *SystemLayoutRemoveButton;
GtkWidget *SystemScrollLockCheck;
GtkWidget *SystemComposeCheck;
GtkWidget *SystemManualEntry;
GtkWidget *NumlockCombo; GtkWidget *NumlockCombo;
GtkWidget *TTYLayoutCombo;
GtkTreeModelFilter *layoutsFilter; GtkTreeModelFilter *layoutsFilter;
GtkListStore *ConsoleList; GtkListStore *LayoutsList;
GtkListStore *SystemList;
} main_window; } main_window;
@ -154,3 +170,4 @@ void yon_layouts_add(GtkTreeView *tree, GtkListStore *cur_list, main_window *wid
void yon_layouts_remove(GtkTreeView *tree, GtkListStore *cur_list, main_window *widgets); void yon_layouts_remove(GtkTreeView *tree, GtkListStore *cur_list, main_window *widgets);
void on_system_layouts_remove(GtkWidget *, main_window *widgets); void on_system_layouts_remove(GtkWidget *, main_window *widgets);
void yon_config_init(); void yon_config_init();
void yon_layout_build(char *key, dictionary *value, main_window *widgets);

@ -12,16 +12,6 @@
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="icon-name">process-stop-symbolic</property> <property name="icon-name">process-stop-symbolic</property>
</object> </object>
<object class="GtkListStore" id="liststore1">
<columns>
<!-- column-name Name -->
<column type="gchararray"/>
<!-- column-name Id -->
<column type="gchararray"/>
<!-- column-name Chosen -->
<column type="gboolean"/>
</columns>
</object>
<object class="GtkDialog" id="Window"> <object class="GtkDialog" id="Window">
<property name="width-request">450</property> <property name="width-request">450</property>
<property name="height-request">550</property> <property name="height-request">550</property>
@ -85,7 +75,6 @@
<object class="GtkTreeView" id="LayoutsTree"> <object class="GtkTreeView" id="LayoutsTree">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">True</property> <property name="can-focus">True</property>
<property name="model">liststore1</property>
<property name="headers-visible">False</property> <property name="headers-visible">False</property>
<property name="search-column">1</property> <property name="search-column">1</property>
<child internal-child="selection"> <child internal-child="selection">
@ -94,6 +83,7 @@
<child> <child>
<object class="GtkTreeViewColumn"> <object class="GtkTreeViewColumn">
<property name="title" translatable="yes">column</property> <property name="title" translatable="yes">column</property>
<property name="sort-column-id">0</property>
<child> <child>
<object class="GtkCellRendererToggle" id="ChosenCell"/> <object class="GtkCellRendererToggle" id="ChosenCell"/>
<attributes> <attributes>

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.38.2 <!-- Generated with glade 3.40.0
ubl-settings-keyboard - ubl-settings-keyboard -
Copyright (C) UBGroup Copyright (C) UBGroup
@ -25,18 +25,22 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<!-- interface-license-type gplv2 --> <!-- interface-license-type gplv2 -->
<!-- interface-name ubl-settings-keyboard --> <!-- interface-name ubl-settings-keyboard -->
<!-- interface-copyright UBGroup --> <!-- interface-copyright UBGroup -->
<object class="GtkSizeGroup"/> <object class="GtkListStore" id="LayoutsList">
<object class="GtkImage" id="image2"> <columns>
<property name="visible">True</property> <!-- column-name Id -->
<property name="can-focus">False</property> <column type="gchararray"/>
<property name="icon-name">com.ublinux.libublsettingsui-gtk3.increase-symbolic</property> <!-- column-name Variant -->
<column type="gchararray"/>
<!-- column-name Name -->
<column type="gchararray"/>
</columns>
</object> </object>
<object class="GtkImage" id="image4"> <object class="GtkImage" id="image1">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="icon-name">com.ublinux.libublsettingsui-gtk3.trash-symbolic</property> <property name="icon-name">com.ublinux.libublsettingsui-gtk3.edit-symbolic</property>
</object> </object>
<object class="GtkImage" id="image5"> <object class="GtkImage" id="image2">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="icon-name">com.ublinux.libublsettingsui-gtk3.increase-symbolic</property> <property name="icon-name">com.ublinux.libublsettingsui-gtk3.increase-symbolic</property>
@ -46,33 +50,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="icon-name">com.ublinux.libublsettingsui-gtk3.trash-symbolic</property> <property name="icon-name">com.ublinux.libublsettingsui-gtk3.trash-symbolic</property>
</object> </object>
<object class="GtkListStore" id="liststore1">
<columns>
<!-- column-name gchararray1 -->
<column type="gchararray"/>
<!-- column-name gchararray2 -->
<column type="gchararray"/>
<!-- column-name gboolean1 -->
<column type="gboolean"/>
</columns>
</object>
<object class="GtkTreeModelFilter" id="LayoutsFilter">
<property name="child-model">liststore1</property>
</object>
<object class="GtkListStore" id="liststore2">
<columns>
<!-- column-name gchararray1 -->
<column type="gchararray"/>
<!-- column-name gchararray2 -->
<column type="gchararray"/>
</columns>
<data>
<row>
<col id="0" translatable="yes">Default</col>
<col id="1" translatable="yes"> </col>
</row>
</data>
</object>
<object class="GtkBox" id="BoxMain"> <object class="GtkBox" id="BoxMain">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
@ -81,6 +58,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<object class="GtkScrolledWindow"> <object class="GtkScrolledWindow">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">True</property> <property name="can-focus">True</property>
<property name="hscrollbar-policy">never</property>
<property name="shadow-type">in</property> <property name="shadow-type">in</property>
<child> <child>
<object class="GtkViewport"> <object class="GtkViewport">
@ -118,18 +96,18 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="orientation">vertical</property> <property name="orientation">vertical</property>
<property name="spacing">5</property> <property name="spacing">6</property>
<child> <child>
<object class="GtkBox"> <object class="GtkBox">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="spacing">5</property> <property name="spacing">5</property>
<child> <child>
<object class="GtkLabel" id="label6"> <object class="GtkLabel" id="label5">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="label" translatable="yes">Num Lock on boot:</property> <property name="label" translatable="yes">Keyboard model:</property>
<property name="xalign">0</property> <property name="xalign">1</property>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
@ -138,15 +116,18 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkComboBoxText" id="ConsoleNumlockCombo"> <object class="GtkComboBox" id="KeyboardModelCombo">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="model">LayoutsList</property>
<property name="active">0</property> <property name="active">0</property>
<items> <property name="id-column">1</property>
<item translatable="yes">Default</item> <child>
<item translatable="yes">On</item> <object class="GtkCellRendererText"/>
<item translatable="yes">Off</item> <attributes>
</items> <attribute name="text">0</attribute>
</attributes>
</child>
</object> </object>
<packing> <packing>
<property name="expand">True</property> <property name="expand">True</property>
@ -166,6 +147,20 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="spacing">5</property> <property name="spacing">5</property>
<child>
<object class="GtkLabel" id="label7">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="valign">start</property>
<property name="label" translatable="yes">Keyboard model:</property>
<property name="xalign">1</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child> <child>
<object class="GtkBox"> <object class="GtkBox">
<property name="visible">True</property> <property name="visible">True</property>
@ -173,7 +168,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<property name="orientation">vertical</property> <property name="orientation">vertical</property>
<property name="spacing">5</property> <property name="spacing">5</property>
<child> <child>
<object class="GtkRadioButton" id="ConsoleDefaultLayoutRadio"> <object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="spacing">10</property>
<child>
<object class="GtkRadioButton" id="DefaultLayoutRadio">
<property name="label" translatable="yes">Default layout</property> <property name="label" translatable="yes">Default layout</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">True</property> <property name="can-focus">True</property>
@ -188,14 +188,13 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkRadioButton" id="ConsoleManualLayoutRadio"> <object class="GtkRadioButton" id="ManualLayoutRadio">
<property name="label" translatable="yes">Manual</property> <property name="label" translatable="yes">Manual</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">True</property> <property name="can-focus">True</property>
<property name="receives-default">False</property> <property name="receives-default">False</property>
<property name="active">True</property>
<property name="draw-indicator">True</property> <property name="draw-indicator">True</property>
<property name="group">ConsoleDefaultLayoutRadio</property> <property name="group">DefaultLayoutRadio</property>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
@ -210,6 +209,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<property name="position">0</property> <property name="position">0</property>
</packing> </packing>
</child> </child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="spacing">5</property>
<child> <child>
<object class="GtkScrolledWindow"> <object class="GtkScrolledWindow">
<property name="visible">True</property> <property name="visible">True</property>
@ -218,16 +222,52 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<property name="min-content-height">100</property> <property name="min-content-height">100</property>
<property name="max-content-height">150</property> <property name="max-content-height">150</property>
<child> <child>
<object class="GtkTreeView" id="ConsoleLayoutTree"> <object class="GtkTreeView" id="LayoutTree">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">True</property> <property name="can-focus">True</property>
<property name="model">LayoutsList</property>
<property name="headers-visible">False</property>
<child internal-child="selection">
<object class="GtkTreeSelection"/>
</child>
<child>
<object class="GtkTreeViewColumn">
<property name="title" translatable="yes">column</property>
<property name="sort-column-id">0</property>
<child>
<object class="GtkCellRendererText"/>
<attributes>
<attribute name="text">0</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn">
<property name="title" translatable="yes">column</property>
<child>
<object class="GtkCellRendererText"/>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn">
<property name="title" translatable="yes">column</property>
<child>
<object class="GtkCellRendererText"/>
<attributes>
<attribute name="text">1</attribute>
</attributes>
</child>
</object>
</child>
</object> </object>
</child> </child>
</object> </object>
<packing> <packing>
<property name="expand">True</property> <property name="expand">True</property>
<property name="fill">True</property> <property name="fill">True</property>
<property name="position">1</property> <property name="position">0</property>
</packing> </packing>
</child> </child>
<child> <child>
@ -237,11 +277,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<property name="orientation">vertical</property> <property name="orientation">vertical</property>
<property name="spacing">5</property> <property name="spacing">5</property>
<child> <child>
<object class="GtkButton" id="ConsoleLayoutAddButton"> <object class="GtkButton" id="LayoutAddButton">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">True</property> <property name="can-focus">True</property>
<property name="receives-default">True</property> <property name="receives-default">True</property>
<property name="image">image5</property> <property name="image">image2</property>
<style> <style>
<class name="thin"/> <class name="thin"/>
</style> </style>
@ -253,11 +293,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkButton" id="ConsoleLayoutRemoveButton"> <object class="GtkButton" id="LayoutRemoveButton">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">True</property> <property name="can-focus">True</property>
<property name="receives-default">True</property> <property name="receives-default">True</property>
<property name="image">image4</property> <property name="image">image6</property>
<style> <style>
<class name="thin"/> <class name="thin"/>
</style> </style>
@ -272,7 +312,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
<property name="fill">True</property> <property name="fill">True</property>
<property name="position">2</property> <property name="position">1</property>
</packing> </packing>
</child> </child>
</object> </object>
@ -282,18 +322,18 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<property name="position">1</property> <property name="position">1</property>
</packing> </packing>
</child> </child>
<child> </object>
<object class="GtkCheckButton" id="ConsoleScrollLockCheck"> <packing>
<property name="label" translatable="yes">Scroll Lock indication when switching layouts</property> <property name="expand">True</property>
<property name="visible">True</property> <property name="fill">True</property>
<property name="can-focus">True</property> <property name="position">1</property>
<property name="receives-default">False</property> </packing>
<property name="draw-indicator">True</property> </child>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
<property name="fill">True</property> <property name="fill">True</property>
<property name="position">2</property> <property name="position">1</property>
</packing> </packing>
</child> </child>
<child> <child>
@ -302,10 +342,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="spacing">5</property> <property name="spacing">5</property>
<child> <child>
<object class="GtkLabel"> <object class="GtkLabel" id="label6">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="label" translatable="yes">Manual input:</property> <property name="label" translatable="yes">Changing the layout:</property>
<property name="xalign">1</property>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
@ -314,9 +355,13 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkEntry" id="ConsoleManualEntry"> <object class="GtkComboBoxText" id="LayoutChangingCombo">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">True</property> <property name="can-focus">False</property>
<property name="active">0</property>
<items>
<item translatable="yes">Default</item>
</items>
</object> </object>
<packing> <packing>
<property name="expand">True</property> <property name="expand">True</property>
@ -328,57 +373,26 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
<property name="fill">True</property> <property name="fill">True</property>
<property name="position">3</property> <property name="position">2</property>
</packing>
</child>
</object>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Console</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing> </packing>
</child> </child>
<child>
<object class="GtkFrame">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label-xalign">0.019999999552965164</property>
<property name="shadow-type">in</property>
<child>
<object class="GtkAlignment">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="bottom-padding">5</property>
<property name="left-padding">5</property>
<property name="right-padding">5</property>
<child> <child>
<object class="GtkBox"> <object class="GtkBox">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="orientation">vertical</property> <property name="spacing">5</property>
<property name="spacing">6</property>
<child> <child>
<object class="GtkBox"> <object class="GtkBox">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">5</property> <property name="spacing">5</property>
<child> <child>
<object class="GtkLabel" id="label5"> <object class="GtkLabel" id="label4">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="label" translatable="yes">Keyboard model:</property> <property name="label" translatable="yes">Additional options:</property>
<property name="xalign">0</property> <property name="xalign">1</property>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
@ -386,26 +400,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<property name="position">0</property> <property name="position">0</property>
</packing> </packing>
</child> </child>
<child>
<object class="GtkComboBox" id="SystemKeyboardModelCombo">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="model">liststore2</property>
<property name="active">0</property>
<property name="id-column">1</property>
<child>
<object class="GtkCellRendererText"/>
<attributes>
<attribute name="text">0</attribute>
</attributes>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
@ -414,49 +408,26 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkBox"> <object class="GtkScrolledWindow">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">True</property>
<property name="spacing">5</property> <property name="shadow-type">in</property>
<child> <child>
<object class="GtkLabel"> <object class="GtkTreeView" id="OptionsTree">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">True</property>
<property name="label" translatable="yes">Keyboard options:</property> <child internal-child="selection">
</object> <object class="GtkTreeSelection"/>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child> </child>
<child>
<object class="GtkComboBoxText" id="SystemKeyboardOptionsCombo">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="active">0</property>
<items>
<item translatable="yes">Default</item>
</items>
</object> </object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child> </child>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">True</property>
<property name="fill">True</property> <property name="fill">True</property>
<property name="position">1</property> <property name="position">1</property>
</packing> </packing>
</child> </child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="spacing">5</property>
<child> <child>
<object class="GtkBox"> <object class="GtkBox">
<property name="visible">True</property> <property name="visible">True</property>
@ -464,13 +435,14 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<property name="orientation">vertical</property> <property name="orientation">vertical</property>
<property name="spacing">5</property> <property name="spacing">5</property>
<child> <child>
<object class="GtkRadioButton" id="SystemDefaultLayoutRadio"> <object class="GtkButton" id="OptionsEditButton">
<property name="label" translatable="yes">Default layout</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">True</property> <property name="can-focus">True</property>
<property name="receives-default">False</property> <property name="receives-default">True</property>
<property name="active">True</property> <property name="image">image1</property>
<property name="draw-indicator">True</property> <style>
<class name="thin"/>
</style>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
@ -478,46 +450,36 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<property name="position">0</property> <property name="position">0</property>
</packing> </packing>
</child> </child>
<child>
<object class="GtkRadioButton" id="SystemManualLayoutRadio">
<property name="label" translatable="yes">Manual</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="draw-indicator">True</property>
<property name="group">ConsoleDefaultLayoutRadio</property>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
<property name="fill">True</property> <property name="fill">True</property>
<property name="position">1</property> <property name="position">2</property>
</packing> </packing>
</child> </child>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
<property name="fill">True</property> <property name="fill">True</property>
<property name="position">0</property> <property name="position">3</property>
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkScrolledWindow"> <object class="GtkBox">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">True</property> <property name="can-focus">False</property>
<property name="shadow-type">in</property> <property name="spacing">5</property>
<property name="min-content-height">100</property>
<property name="max-content-height">150</property>
<child> <child>
<object class="GtkTreeView" id="SystemLayoutTree"> <object class="GtkLabel" id="label8">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">True</property> <property name="can-focus">False</property>
</object> <property name="valign">start</property>
</child> <property name="xalign">1</property>
</object> </object>
<packing> <packing>
<property name="expand">True</property> <property name="expand">False</property>
<property name="fill">True</property> <property name="fill">True</property>
<property name="position">1</property> <property name="position">0</property>
</packing> </packing>
</child> </child>
<child> <child>
@ -527,14 +489,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<property name="orientation">vertical</property> <property name="orientation">vertical</property>
<property name="spacing">5</property> <property name="spacing">5</property>
<child> <child>
<object class="GtkButton" id="SystemLayoutAddButton"> <object class="GtkCheckButton" id="ScrollLockCheck">
<property name="label" translatable="yes">Scroll Lock indication when switching layouts</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">True</property> <property name="can-focus">True</property>
<property name="receives-default">True</property> <property name="receives-default">False</property>
<property name="image">image2</property> <property name="draw-indicator">True</property>
<style>
<class name="thin"/>
</style>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
@ -543,14 +503,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkButton" id="SystemLayoutRemoveButton"> <object class="GtkCheckButton" id="ComposeCheck">
<property name="label" translatable="yes">Set Compose (Multi_Key) to the right Win key</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">True</property> <property name="can-focus">True</property>
<property name="receives-default">True</property> <property name="receives-default">False</property>
<property name="image">image6</property> <property name="draw-indicator">True</property>
<style>
<class name="thin"/>
</style>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
@ -562,14 +520,14 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
<property name="fill">True</property> <property name="fill">True</property>
<property name="position">2</property> <property name="position">1</property>
</packing> </packing>
</child> </child>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
<property name="fill">True</property> <property name="fill">True</property>
<property name="position">2</property> <property name="position">4</property>
</packing> </packing>
</child> </child>
<child> <child>
@ -578,12 +536,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="spacing">5</property> <property name="spacing">5</property>
<child> <child>
<object class="GtkCheckButton" id="SystemScrollLockCheck"> <object class="GtkLabel" id="label3">
<property name="label" translatable="yes">Scroll Lock indication when switching layouts</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">True</property> <property name="can-focus">False</property>
<property name="receives-default">False</property> <property name="label" translatable="yes">Manual input:</property>
<property name="draw-indicator">True</property> <property name="xalign">1</property>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
@ -592,15 +549,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkCheckButton" id="SystemComposeCheck"> <object class="GtkEntry" id="ManualEntry">
<property name="label" translatable="yes">Set Compose (Multi_Key) to the right Win key</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">True</property> <property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="draw-indicator">True</property>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">True</property>
<property name="fill">True</property> <property name="fill">True</property>
<property name="position">1</property> <property name="position">1</property>
</packing> </packing>
@ -609,7 +563,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
<property name="fill">True</property> <property name="fill">True</property>
<property name="position">3</property> <property name="position">5</property>
</packing> </packing>
</child> </child>
<child> <child>
@ -618,10 +572,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="spacing">5</property> <property name="spacing">5</property>
<child> <child>
<object class="GtkLabel"> <object class="GtkLabel" id="label2">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="label" translatable="yes">Manual input:</property> <property name="label" translatable="yes">Numlock:</property>
<property name="xalign">1</property>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
@ -630,9 +585,13 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkEntry" id="SystemManualEntry"> <object class="GtkComboBoxText" id="NumlockCombo">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">True</property> <property name="can-focus">False</property>
<property name="active">0</property>
<items>
<item translatable="yes">Default</item>
</items>
</object> </object>
<packing> <packing>
<property name="expand">True</property> <property name="expand">True</property>
@ -644,7 +603,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
<property name="fill">True</property> <property name="fill">True</property>
<property name="position">4</property> <property name="position">6</property>
</packing> </packing>
</child> </child>
</object> </object>
@ -662,7 +621,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<packing> <packing>
<property name="expand">True</property> <property name="expand">True</property>
<property name="fill">True</property> <property name="fill">True</property>
<property name="position">1</property> <property name="position">0</property>
</packing> </packing>
</child> </child>
<child> <child>
@ -684,10 +643,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="spacing">5</property> <property name="spacing">5</property>
<child> <child>
<object class="GtkLabel"> <object class="GtkLabel" id="label1">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="label" translatable="yes">Numlock:</property> <property name="label" translatable="yes">Secondary layout:</property>
<property name="xalign">1</property>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
@ -696,13 +656,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkComboBoxText" id="NumlockCombo"> <object class="GtkComboBoxText" id="TTYLayoutCombo">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="active">0</property>
<items>
<item translatable="yes">Default</item>
</items>
</object> </object>
<packing> <packing>
<property name="expand">True</property> <property name="expand">True</property>
@ -718,7 +674,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<object class="GtkLabel"> <object class="GtkLabel">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="label" translatable="yes">Additional</property> <property name="label" translatable="yes">TTY layout</property>
</object> </object>
</child> </child>
</object> </object>
@ -740,6 +696,31 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
</packing> </packing>
</child> </child>
</object> </object>
<object class="GtkSizeGroup">
<widgets>
<widget name="label1"/>
<widget name="label2"/>
<widget name="label3"/>
<widget name="label4"/>
<widget name="label6"/>
<widget name="label5"/>
<widget name="label7"/>
<widget name="label8"/>
</widgets>
</object>
<object class="GtkListStore" id="liststore1">
<columns>
<!-- column-name gchararray1 -->
<column type="gchararray"/>
<!-- column-name gchararray2 -->
<column type="gchararray"/>
<!-- column-name gboolean1 -->
<column type="gboolean"/>
</columns>
</object>
<object class="GtkTreeModelFilter" id="LayoutsFilter">
<property name="child-model">liststore1</property>
</object>
<object class="GtkMenu" id="menu1"> <object class="GtkMenu" id="menu1">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>

Loading…
Cancel
Save