diff --git a/source/ubl-settings-keyboard.c b/source/ubl-settings-keyboard.c index e160240..e787546 100644 --- a/source/ubl-settings-keyboard.c +++ b/source/ubl-settings-keyboard.c @@ -106,42 +106,40 @@ void yon_load_proceed(YON_CONFIG_TYPE type){ } gboolean yon_interface_update(main_window *widgets){ - g_signal_handlers_block_by_func(G_OBJECT(widgets->ModelCombo),G_CALLBACK(on_model_changed),widgets); - g_signal_handlers_block_by_func(G_OBJECT(widgets->MoveDownButton),G_CALLBACK(on_move_down),widgets); - g_signal_handlers_block_by_func(G_OBJECT(widgets->MoveUpButton),G_CALLBACK(on_move_up),widgets); - g_signal_handlers_block_by_func(G_OBJECT(widgets->OptionsButton),G_CALLBACK(on_options_open),widgets); - g_signal_handlers_block_by_func(G_OBJECT(widgets->NumLockCombo),G_CALLBACK(on_num_lock_changed),widgets); - gtk_list_store_clear(widgets->layoutsList); - - gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->ModelCombo),0); - gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->NumLockCombo),0); + 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->SystemKeyboardOptionsCombo),G_CALLBACK(on_options_open),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->NumlockCombo),0); GtkTreeIter iter; - gtk_entry_set_text(GTK_ENTRY(widgets->OptionsEntry),DEFAULT_LABEL); + gtk_entry_set_text(GTK_ENTRY(widgets->SystemKeyboardOptionsCombo),DEFAULT_LABEL); { char *name = yon_config_get_by_key(model_parameter); char *id; if (name) { - int valid = gtk_tree_model_get_iter_first(GTK_TREE_MODEL(widgets->modelsList),&iter); - for (;valid;valid=gtk_tree_model_iter_next(GTK_TREE_MODEL(widgets->modelsList),&iter)){ - gtk_tree_model_get(GTK_TREE_MODEL(widgets->modelsList),&iter,1,&id,-1); + int valid = gtk_tree_model_get_iter_first(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); if (!strcmp(name,id)){ - gtk_combo_box_set_active_iter(GTK_COMBO_BOX(widgets->ModelCombo),&iter); + gtk_combo_box_set_active_iter(GTK_COMBO_BOX(widgets->SystemKeyboardModelCombo),&iter); break; } } - } else gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->ModelCombo),0); + } else gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->SystemKeyboardModelCombo),0); } { char *name = yon_config_get_by_key(options_parameter); if (name) { char *id, *rname; - gtk_entry_set_text(GTK_ENTRY(widgets->OptionsEntry),name); + 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->OptionsEntry),rname); + gtk_entry_set_text(GTK_ENTRY(widgets->SystemKeyboardOptionsCombo),rname); break; } } @@ -155,34 +153,32 @@ gboolean yon_interface_update(main_window *widgets){ } char *name = yon_config_get_by_key(num_lock_boot_parameter); if (name) { - 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); + 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 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){ int size=0; name = yon_config_get_by_key(keyboard_layout_parameter); config_str layouts = yon_char_parse(name,&size,","); GtkTreeIter iter, itar; char *rid,*rname; - gtk_list_store_clear(widgets->layoutsList); + gtk_list_store_clear(main_config.layouts_list); for (int i=0;ilayoutsList,&itar); - gtk_list_store_set(widgets->layoutsList,&itar,0,rname,1,rid,2,1,-1); + gtk_list_store_append(main_config.layouts_list,&itar); + gtk_list_store_set(main_config.layouts_list,&itar,0,rname,1,rid,2,1,-1); } } } } } - g_signal_handlers_unblock_by_func(G_OBJECT(widgets->ModelCombo),G_CALLBACK(on_model_changed),widgets); - g_signal_handlers_unblock_by_func(G_OBJECT(widgets->MoveDownButton),G_CALLBACK(on_move_down),widgets); - g_signal_handlers_unblock_by_func(G_OBJECT(widgets->MoveUpButton),G_CALLBACK(on_move_up),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->SystemKeyboardModelCombo),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->NumlockCombo),G_CALLBACK(on_num_lock_changed),widgets); return G_SOURCE_REMOVE; } @@ -206,8 +202,8 @@ void on_model_changed(GtkComboBoxText *self, main_window *widgets){ default: char *id; GtkTreeIter iter; - gtk_combo_box_get_active_iter(GTK_COMBO_BOX(widgets->ModelCombo),&iter); - gtk_tree_model_get(GTK_TREE_MODEL(widgets->modelsList),&iter,1,&id,-1); + gtk_combo_box_get_active_iter(GTK_COMBO_BOX(widgets->SystemKeyboardModelCombo),&iter); + gtk_tree_model_get(GTK_TREE_MODEL(main_config.models_list),&iter,1,&id,-1); yon_config_register(model_parameter,model_parameter_command,id); break; } @@ -222,7 +218,7 @@ void on_options_accept(GtkWidget *self, dictionary *dict){ char *name, *id; 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_entry_set_text(GTK_ENTRY(widgets->OptionsEntry),name); + gtk_entry_set_text(GTK_ENTRY(widgets->SystemKeyboardOptionsCombo),name); yon_config_register(options_parameter,options_parameter_command,id); } @@ -237,7 +233,7 @@ void yon_layouts_save(main_window *widgets){ for_iter(widgets->layoutsFilter,&iter){ char *name, *id; 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(widgets->layoutsList),&child_iter,0,&name,1,&id,-1); + gtk_tree_model_get(GTK_TREE_MODEL(main_config.layouts_list),&child_iter,0,&name,1,&id,-1); yon_char_parsed_add_or_create_if_exists(parsed,&size,id); } if (parsed&&size>0){ @@ -283,7 +279,7 @@ GList *yon_get_all_selected(GtkTreeView *tree, int column){ void on_layouts_accept(GtkWidget *self, dictionary *dict){ main_window *widgets = yon_dictionary_get_data(dict->first,main_window*); layouts_window *window = yon_dictionary_get_data(dict->first->next,layouts_window*); - gtk_list_store_clear(widgets->layoutsList); + gtk_list_store_clear(main_config.layouts_list); GtkTreeModel *model = GTK_TREE_MODEL(window->list); GList *list = yon_get_all_selected(GTK_TREE_VIEW(window->MainTree),2); char *name; @@ -293,9 +289,9 @@ void on_layouts_accept(GtkWidget *self, dictionary *dict){ for (guint i=0;ilayoutsList,&iter); + gtk_list_store_append(main_config.layouts_list,&iter); gtk_tree_model_get(model,&lwiter,0,&name,1,&id,-1); - gtk_list_store_set(widgets->layoutsList,&iter,1,name,0,id,2,1,-1); + gtk_list_store_set(main_config.layouts_list,&iter,1,name,0,id,2,1,-1); } yon_layouts_save(widgets); on_subwindow_close(self); @@ -309,7 +305,11 @@ void on_layouts_chosen(GtkCellRenderer *, gchar *path, layouts_window *window){ gtk_list_store_set(window->list,&iter,2,!chosen,-1); } -void on_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); +} + +void yon_layouts_add(GtkTreeView *, GtkListStore *, main_window *widgets){ GtkBuilder *builder = gtk_builder_new_from_resource(glade_layouts_path); layouts_window *window = malloc(sizeof(layouts_window)); window->Window = yon_gtk_builder_get_widget(builder,"Window"); @@ -351,87 +351,35 @@ void on_layouts_add(GtkWidget *, main_window *widgets){ } } -void on_layouts_remove(GtkWidget *, main_window *widgets){ - GtkTreeModel *model = GTK_TREE_MODEL(widgets->layoutsList); +void yon_layouts_remove(GtkTreeView *tree, GtkListStore *cur_list, main_window *widgets){ + GtkTreeModel *model = GTK_TREE_MODEL(cur_list); GtkTreeIter iter; - if (gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->LayoutsTree)),&model,&iter)){ + if (gtk_tree_selection_get_selected(gtk_tree_view_get_selection(tree),&model,&iter)){ GtkTreeIter iter_converted; char *target; gtk_tree_model_get(model,&iter,1,&target,-1); gtk_tree_model_filter_convert_iter_to_child_iter(widgets->layoutsFilter,&iter_converted,&iter); - gtk_list_store_remove(widgets->layoutsList,&iter_converted); + gtk_list_store_remove(cur_list,&iter_converted); yon_config_remove_element(keyboard_layout_parameter,target,","); } } -void on_move_up(GtkWidget *, main_window *widgets){ - GtkTreeModel *model = GTK_TREE_MODEL(widgets->layoutsFilter); - GtkTreeIter iter,*previter; - if (gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->LayoutsTree)),&model,&iter)){ - previter = gtk_tree_iter_copy(&iter); - if (gtk_tree_model_iter_previous(model,previter)) - { - GtkTreeIter iter_converted, previter_converted; - gtk_tree_model_filter_convert_iter_to_child_iter(widgets->layoutsFilter,&iter_converted,&iter); - gtk_tree_model_filter_convert_iter_to_child_iter(widgets->layoutsFilter,&previter_converted,previter); - gtk_list_store_move_before(widgets->layoutsList,&iter_converted,&previter_converted); - yon_layouts_save(widgets); - } - } +void on_system_layouts_remove(GtkWidget *, main_window *widgets){ + yon_layouts_add(GTK_TREE_VIEW(widgets->ConsoleLayoutTree),widgets->ConsoleList,widgets); } -void on_move_down(GtkWidget *, main_window *widgets){ - GtkTreeModel *model = GTK_TREE_MODEL(widgets->layoutsFilter); - GtkTreeIter iter,*nextiter; - if (gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->LayoutsTree)),&model,&iter)){ - nextiter = gtk_tree_iter_copy(&iter); - if (gtk_tree_model_iter_next(model,nextiter)){ - GtkTreeIter iter_converted, nextiter_converted; - gtk_tree_model_filter_convert_iter_to_child_iter(widgets->layoutsFilter,&iter_converted,&iter); - gtk_tree_model_filter_convert_iter_to_child_iter(widgets->layoutsFilter,&nextiter_converted,nextiter); - gtk_list_store_move_after(widgets->layoutsList,&iter_converted,&nextiter_converted); - yon_layouts_save(widgets); - } - } - -} - - - // standard functions - -void yon_main_window_complete(main_window *widgets){ - widgets = yon_remalloc(widgets,sizeof(main_window)); - GtkBuilder *builder = gtk_builder_new_from_resource(glade_path); - gtk_box_pack_start(GTK_BOX(widgets->InterfaceBox),yon_gtk_builder_get_widget(builder,"BoxMain"),1,1,0); - // Custom widgets configuration - { - - widgets->NumLockCombo = yon_gtk_builder_get_widget(builder,"NumlockCombo"); - widgets->ModelCombo = yon_gtk_builder_get_widget(builder,"ModelCombo"); - widgets->keyboard = yon_gtk_builder_get_widget(builder,"keyboard"); - widgets->keytable = yon_gtk_builder_get_widget(builder,"keytable"); - widgets->grp_toggle = yon_gtk_builder_get_widget(builder,"grp_toggle"); - widgets->OptionsEntry = yon_gtk_builder_get_widget(builder,"OptionsEntry"); - widgets->OptionsButton = yon_gtk_builder_get_widget(builder,"OptionsButton"); - widgets->LayoutsTree = yon_gtk_builder_get_widget(builder,"LayoutsTree"); - widgets->MoveUpButton = yon_gtk_builder_get_widget(builder,"MoveUpButton"); - widgets->MoveDownButton = yon_gtk_builder_get_widget(builder,"MoveDownButton"); - widgets->AddButton = yon_gtk_builder_get_widget(builder,"AddButton"); - widgets->RemoveButton = yon_gtk_builder_get_widget(builder,"RemoveButton"); - widgets->layoutsList = GTK_LIST_STORE(gtk_builder_get_object(builder,"liststore1")); - widgets->layoutsFilter = GTK_TREE_MODEL_FILTER(gtk_builder_get_object(builder,"LayoutsFilter")); - widgets->modelsList = GTK_LIST_STORE(gtk_builder_get_object(builder,"liststore2")); - +void yon_config_init(){ int size; + main_config.models_list = gtk_list_store_new(3,G_TYPE_STRING,G_TYPE_STRING,G_TYPE_BOOLEAN); GtkTreeIter iter; config_str models = yon_config_load(get_models_command,&size); for (int i=0;imodelsList,&iter); - gtk_list_store_set(widgets->modelsList,&iter,1,models[i],0,_(models[i+1]),-1); + 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); } main_config.layouts_list = gtk_list_store_new(3,G_TYPE_STRING,G_TYPE_STRING,G_TYPE_BOOLEAN); int laysize; @@ -451,19 +399,48 @@ void yon_main_window_complete(main_window *widgets){ 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); } +} + +void yon_main_window_complete(main_window *widgets){ + widgets = yon_remalloc(widgets,sizeof(main_window)); + GtkBuilder *builder = gtk_builder_new_from_resource(glade_path); + gtk_box_pack_start(GTK_BOX(widgets->InterfaceBox),yon_gtk_builder_get_widget(builder,"BoxMain"),1,1,0); + // Custom widgets configuration + { + + widgets->ConsoleNumlockCombo = yon_gtk_builder_get_widget(builder,"ConsoleNumlockCombo"); + widgets->ConsoleDefaultLayoutRadio = yon_gtk_builder_get_widget(builder,"ConsoleDefaultLayoutRadio"); + widgets->ConsoleManualLayoutRadio = yon_gtk_builder_get_widget(builder,"ConsoleManualLayoutRadio"); + widgets->ConsoleLayoutTree = yon_gtk_builder_get_widget(builder,"ConsoleLayoutTree"); + widgets->ConsoleLayoutAddButton = yon_gtk_builder_get_widget(builder,"ConsoleLayoutAddButton"); + widgets->ConsoleLayoutRemoveButton = yon_gtk_builder_get_widget(builder,"ConsoleLayoutRemoveButton"); + widgets->ConsoleScrollLockCheck = yon_gtk_builder_get_widget(builder,"ConsoleScrollLockCheck"); + widgets->ConsoleManualEntry = yon_gtk_builder_get_widget(builder,"ConsoleManualEntry"); + widgets->SystemKeyboardModelCombo = yon_gtk_builder_get_widget(builder,"SystemKeyboardModelCombo"); + widgets->SystemKeyboardOptionsCombo = yon_gtk_builder_get_widget(builder,"SystemKeyboardOptionsCombo"); + widgets->SystemDefaultLayoutRadio = yon_gtk_builder_get_widget(builder,"SystemDefaultLayoutRadio"); + widgets->SystemManualLayoutRadio = yon_gtk_builder_get_widget(builder,"SystemManualLayoutRadio"); + 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->ConsoleList = GTK_LIST_STORE(gtk_builder_get_object(builder,"ConsoleList")); + widgets->SystemList = GTK_LIST_STORE(gtk_builder_get_object(builder,"SystemList")); + /* Widget registration for config monitoring | Регистрация виджетов для мониторинга конфига */ // yon_window_config_add_custom_parameter(widgets->HeadInfoLabel,"head-text","label",YON_TYPE_STRING); /* Signal connection | Присоединение сигналов */ - g_signal_connect(G_OBJECT(widgets->AddButton),"clicked",G_CALLBACK(on_layouts_add),widgets); - g_signal_connect(G_OBJECT(widgets->RemoveButton),"clicked",G_CALLBACK(on_layouts_remove),widgets); - g_signal_connect(G_OBJECT(widgets->ModelCombo),"changed",G_CALLBACK(on_model_changed),widgets); - g_signal_connect(G_OBJECT(widgets->MoveDownButton),"clicked",G_CALLBACK(on_move_down),widgets); - g_signal_connect(G_OBJECT(widgets->MoveUpButton),"clicked",G_CALLBACK(on_move_up),widgets); - g_signal_connect(G_OBJECT(widgets->OptionsButton),"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->SystemLayoutAddButton),"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->SystemKeyboardModelCombo),"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->NumlockCombo),"changed",G_CALLBACK(on_num_lock_changed),widgets); } g_signal_connect(G_OBJECT(widgets->LoadLocalMenuItem),"activate",G_CALLBACK(on_config_local_load),widgets); @@ -484,7 +461,7 @@ void yon_main_window_complete(main_window *widgets){ int main(int argc, char *argv[]){ setlocale(LC_ALL, ""); textdomain (LocaleName); - + yon_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); config_str unfound = NULL; diff --git a/source/ubl-settings-keyboard.h b/source/ubl-settings-keyboard.h index e6a5eaf..77791a8 100644 --- a/source/ubl-settings-keyboard.h +++ b/source/ubl-settings-keyboard.h @@ -63,26 +63,34 @@ typedef struct { char *options; GtkListStore *layouts_list; GtkListStore *options_list; + GtkListStore *models_list; } config; typedef struct { template_window_fields - GtkWidget *NumLockCombo; - GtkWidget *ModelCombo; - GtkWidget *keyboard; - GtkWidget *keytable; - GtkWidget *grp_toggle; - GtkWidget *OptionsEntry; - GtkWidget *OptionsButton; - GtkWidget *LayoutsTree; - GtkWidget *MoveUpButton; - GtkWidget *MoveDownButton; - GtkWidget *AddButton; - GtkWidget *RemoveButton; + GtkWidget *ConsoleNumlockCombo; + GtkWidget *ConsoleDefaultLayoutRadio; + GtkWidget *ConsoleManualLayoutRadio; + GtkWidget *ConsoleLayoutTree; + GtkWidget *ConsoleLayoutAddButton; + GtkWidget *ConsoleLayoutRemoveButton; + GtkWidget *ConsoleScrollLockCheck; + GtkWidget *ConsoleManualEntry; + GtkWidget *SystemKeyboardModelCombo; + GtkWidget *SystemKeyboardOptionsCombo; + GtkWidget *SystemDefaultLayoutRadio; + GtkWidget *SystemManualLayoutRadio; + GtkWidget *SystemLayoutTree; + GtkWidget *SystemLayoutAddButton; + GtkWidget *SystemLayoutRemoveButton; + GtkWidget *SystemScrollLockCheck; + GtkWidget *SystemComposeCheck; + GtkWidget *SystemManualEntry; + GtkWidget *NumlockCombo; GtkTreeModelFilter *layoutsFilter; - GtkListStore *layoutsList; - GtkListStore *modelsList; + GtkListStore *ConsoleList; + GtkListStore *SystemList; } main_window; @@ -133,13 +141,16 @@ void config_init(); void yon_main_window_complete(main_window *widgets); void on_move_down(GtkWidget *self, main_window *widgets); void on_move_up(GtkWidget *self, main_window *widgets); -void on_layouts_add(GtkWidget *self, main_window *widgets); void on_layouts_accept(GtkWidget *self, dictionary *dict); void on_options_open(GtkWidget *self, main_window *widgets); void on_options_accept(GtkWidget *self, dictionary *dict); void on_model_changed(GtkComboBoxText *self, main_window *widgets); void on_num_lock_changed(GtkComboBox *self, main_window *widgets); -void on_layouts_remove(GtkWidget *, main_window *widgets); void yon_layouts_save(main_window *widgets); void on_layouts_chosen(GtkCellRenderer *self, gchar *path, layouts_window *window); -GList *yon_get_all_selected(GtkTreeView *tree, int column); \ No newline at end of file +GList *yon_get_all_selected(GtkTreeView *tree, int column); +void on_system_layouts_add(GtkWidget *, main_window *widgets); +void yon_layouts_add(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 yon_config_init(); \ No newline at end of file diff --git a/ubl-settings-keyboard.glade b/ubl-settings-keyboard.glade index 3445b85..bad50e4 100644 --- a/ubl-settings-keyboard.glade +++ b/ubl-settings-keyboard.glade @@ -25,20 +25,26 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - + + True False - user-trash-symbolic + com.ublinux.libublsettingsui-gtk3.increase-symbolic - + True False - value-increase-symbolic + com.ublinux.libublsettingsui-gtk3.trash-symbolic - + + True + False + com.ublinux.libublsettingsui-gtk3.increase-symbolic + + True False - document-edit-symbolic + com.ublinux.libublsettingsui-gtk3.trash-symbolic @@ -67,215 +73,274 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - - True - False - False - - - True - False - Load global configuration - - - - - - True - False - Load local configuration - - - - - - True - False - False - False - - - True - False - False - - - True - False - Save configuration - - - - - - True - False - Save to global configuration - - - - - - True - False - Save to local configuration - - - - - - True - False - - - True - False - True False - 5 - 5 - 5 - 5 - 5 - 5 - True - True vertical - 5 - - - True - False - 0.019999999552965164 - in - - - True - False - 5 - 5 - 5 - - - True - False - 5 - - - True - False - Num Lock on boot: - 0 - - - False - True - 0 - - - - - True - False - 0 - - Default - On - Off - - - - True - True - 1 - - - - - - - - - True - False - Console - - - - - False - True - 0 - - - + True - False - 0.019999999552965164 + True in - + True False - 5 - 5 - 5 True False + 5 + 5 + 5 + 5 + 5 + 5 + True + True vertical - 6 + 5 - + True False - 5 + 0.019999999552965164 + in - + True False - Keyboard model: - 0 + 5 + 5 + 5 + + + True + False + vertical + 5 + + + True + False + 5 + + + True + False + Num Lock on boot: + 0 + + + False + True + 0 + + + + + True + False + 0 + + Default + On + Off + + + + True + True + 1 + + + + + False + True + 0 + + + + + True + False + 5 + + + True + False + vertical + 5 + + + Default layout + True + True + False + True + True + + + False + True + 0 + + + + + Manual + True + True + False + True + True + ConsoleDefaultLayoutRadio + + + False + True + 1 + + + + + False + True + 0 + + + + + True + True + in + 100 + 150 + + + True + True + + + + + True + True + 1 + + + + + True + False + vertical + 5 + + + True + True + True + image5 + + + + False + True + 0 + + + + + True + True + True + image4 + + + + False + True + 1 + + + + + False + True + 2 + + + + + False + True + 1 + + + + + Scroll Lock indication when switching layouts + True + True + False + True + + + False + True + 2 + + + + + True + False + 5 + + + True + False + Manual input: + + + False + True + 0 + + + + + True + True + + + True + True + 1 + + + + + False + True + 3 + + + + - - False - True - 0 - - - + + True False - liststore2 - 0 - 1 - - - - 0 - - + Console - - True - True - 1 - @@ -285,30 +350,49 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - + True False - 5 + 0.019999999552965164 + in - + True False - vertical - 5 + 5 + 5 + 5 - + True - True - in + False + vertical + 6 - + True - True - LayoutsFilter - False + False + 5 + + + True + False + Keyboard model: + 0 + + + False + True + 0 + + - - column + + True + False + liststore2 + 0 + 1 @@ -316,272 +400,418 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + True + True + 1 + + + False + True + 0 + - - - True - True - 0 - - - - - True - True - 0 - - - - - True - False - vertical - 5 - - - True - True - True - Move layout up - + True - True - False - True - menu4 - up + False + 5 - + + True + False + Keyboard options: + + + False + True + 0 + + + + + True + False + 0 + + Default + + + + True + True + 1 + - + + False + True + 1 + - - - - False - True - 0 - - - - - True - True - True - Move layout down - + True - True - False - True - menu5 + False + 5 + + + True + False + vertical + 5 + + + Default layout + True + True + False + True + True + + + False + True + 0 + + + + + Manual + True + True + False + True + ConsoleDefaultLayoutRadio + + + False + True + 1 + + + + + False + True + 0 + + - + + True + True + in + 100 + 150 + + + True + True + + + + + True + True + 1 + + + + + True + False + vertical + 5 + + + True + True + True + image2 + + + + False + True + 0 + + + + + True + True + True + image6 + + + + False + True + 1 + + + + + False + True + 2 + - + + False + True + 2 + + + + + True + False + 5 + + + Scroll Lock indication when switching layouts + True + True + False + True + + + False + True + 0 + + + + + Set Compose (Multi_Key) to the right Win key + True + True + False + True + + + False + True + 1 + + + + + False + True + 3 + + + + + True + False + 5 + + + True + False + Manual input: + + + False + True + 0 + + + + + True + True + + + True + True + 1 + + + + + False + True + 4 + - - - - False - True - 1 - - - - - True - True - True - Добавить раскладку - image3 - - - - False - True - 2 - - - - - True - True - True - Удалить раскладку - image1 - - - False - True - 4 - - - False - True - 1 - - - - True - True - end - 2 - - - - - True - False - Keyboard layouts: - 0 - - - False - True - end - 4 - - - - - False - 5 - - + + True False - KEYBOARD: - 0 - - - False - True - 0 - - - - - True - True + System - - True - True - 1 - - False + True True - 4 + 1 - + True False - 5 + 0.019999999552965164 + in - + True False - Keyboard options: - 0 + 5 + 5 + 5 + + + True + False + 5 + + + True + False + Numlock: + + + False + True + 0 + + + + + True + False + 0 + + Default + + + + True + True + 1 + + + + - - False - True - 0 - - - + + True False + Additional - - True - True - 1 - - - - - True - True - True - Pick an option - image4 - - - - False - True - 2 - False True - 7 + 3 - - - True - False - Keyboard - - True True - 3 + 1 - - - - - - - + + True + False + False + + + True + False + Load global configuration + + + + + + True + False + Load local configuration + + + + + + True + False + False + False + + + True + False + False + + + True + False + Save configuration + + + + + + True + False + Save to global configuration + + + + + + True + False + Save to local configuration + + + + + + True + False + + + True + False