Merge pull request 'master' (#11) from YanTheKaller/ubl-settings-services:master into master

Reviewed-on: #11
pull/128/head^2 v1.3
Dmitry Razumov 2 years ago
commit 455d6edaa4

@ -14,18 +14,20 @@ void yon_load_proceed(YON_CONFIG_TYPE type){
void on_config_local_load(GtkWidget *self,main_window *widgets){
if (self){};
yon_load_proceed(YON_CONFIG_LOCAL);
yon_interface_update(widgets);
yon_ubl_status_box_render(LIST_LOAD_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE);
g_thread_new("",(GThreadFunc)yon_interface_update,widgets);
main_config.load_mode=1;
textdomain(template_ui_LocaleName);
yon_ubl_status_box_render(LOCAL_LOAD_SUCCESS_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE);
textdomain(LocaleName);
}
void on_config_global_load(GtkWidget *self,main_window *widgets){
if (self){};
yon_load_proceed(YON_CONFIG_GLOBAL);
yon_interface_update(widgets);
yon_ubl_status_box_render(LIST_LOAD_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE);
g_thread_new("",(GThreadFunc)yon_interface_update,widgets);
main_config.load_mode=0;
textdomain(template_ui_LocaleName);
yon_ubl_status_box_render(GLOBAL_LOAD_SUCCESS_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE);
textdomain(LocaleName);
}
@ -378,7 +380,7 @@ void on_update(GtkWidget *self,main_window *widgets){
g_thread_new("",(GThreadFunc)yon_unthreaded_config_load,widgets);
}
void yon_interface_update(main_window *widgets){
void *yon_interface_update(main_window *widgets){
int size;
GtkTreeIter iter;
gtk_tree_view_set_model(GTK_TREE_VIEW(widgets->MainTree),NULL);
@ -449,7 +451,15 @@ void yon_interface_update(main_window *widgets){
}
free(name_parsed);
}
textdomain(template_ui_LocaleName);
if (main_config.load_mode){
yon_ubl_status_box_render(LOCAL_LOAD_SUCCESS_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE);
} else {
yon_ubl_status_box_render(GLOBAL_LOAD_SUCCESS_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE);
}
textdomain(LocaleName);
gtk_tree_view_set_model(GTK_TREE_VIEW(widgets->MainTree),GTK_TREE_MODEL(widgets->liststore2));
return NULL;
}
void on_column_resize(GtkTreeViewColumn *self,GParamSpec *pspec,main_window *widgets){
@ -564,6 +574,7 @@ void config_init(){
main_config.lock_load_global=0;
main_config.lock_save_global=0;
main_config.lock_save_local=0;
main_config.load_mode=1;
}
void on_activate(GtkTreeView *self, main_window *widgets){
@ -659,7 +670,8 @@ void yon_main_window_complete(main_window *widgets){
gtk_tree_model_filter_set_visible_func(GTK_TREE_MODEL_FILTER(main_config.BlockedFilter),(GtkTreeModelFilterVisibleFunc)on_blocked_filter,NULL,NULL);
gtk_tree_view_set_search_entry(GTK_TREE_VIEW(widgets->MainTree),GTK_ENTRY(widgets->SearchEntry));
yon_load_proceed(YON_CONFIG_LOCAL);
yon_interface_update(widgets);
yon_ubl_status_box_render(LIST_LOAD_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE);
g_thread_new("",(GThreadFunc)yon_interface_update,widgets);
}
int main(int argc, char *argv[]){

@ -181,7 +181,7 @@ void on_config_local_save();
void on_config_global_save();
void yon_interface_update(main_window *widgets);
void *yon_interface_update(main_window *widgets);
GtkWidget *yon_menu_button_create(char *icon_name, char *text);

@ -39,6 +39,10 @@ background:transparent;
border-right-width:inherit;
}
.menuitemmiddlemargin{
margin-top: 6px;
}
.menuitemtop{
margin-bottom:0px;
border-color:inherit;
@ -46,17 +50,17 @@ background:transparent;
border-left-width:inherit;
border-right-width:inherit;
}
.menuitemtop>*{
margin:2px 2px 0 2px;
.menuitemtop *{
margin:4px 2px 0 2px;
padding: 3px 10px 3px 5px;
border:transparent;
}
.menuitemmiddle>*{
.menuitemmiddle *{
margin:0 2px 0 2px;
padding: 3px 10px 3px 5px;
border:transparent;
}
.menuitembottom>*{
.menuitembottom *{
margin:0 2px 2px 2px;
padding: 3px 10px 3px 5px;
}
@ -81,19 +85,19 @@ background:transparent;
border-right-width:inherit;
}
.menuitemtop:hover>* {
margin:2px 2px 0 2px;
.menuitemtop:hover* {
margin:4px 2px 0 2px;
padding: 3px 10px 3px 5px;
background:@theme_selected_bg_color;
border-radius:2px;
}
.menuitemmiddle:hover>* {
margin:0 2px 0px 2px;
.menuitemmiddle:hover* {
margin:0 2px 0 2px;
padding: 3px 10px 3px 5px;
background:@theme_selected_bg_color;
border-radius:2px;
}
.menuitembottom:hover>* {
.menuitembottom:hover* {
margin:0 2px 2px 2px;
padding: 3px 10px 3px 5px;
background:@theme_selected_bg_color;
@ -106,3 +110,25 @@ background:transparent;
.boxInfoMessOK{
background-color: #f3f0ac;
}
.errorBox {
border-width: 2px;
border-color: #ea9999;
border-style:solid;
}
.chosenOutline{
transition: 0ms;
border-width: 1px;
border-color: #f3f0ac;
border-style:solid;
}
.debugborders *{
border-width: 2px;
border-color: #000000;
border-style: solid;
}
.marginright image{
margin-right: 2px;
}

@ -1,14 +1,14 @@
[Desktop Entry]
Encoding=UTF-8
Name=Службы и процесссы systemd
Name[ru]=Настройка процессов systemd
GenericName=ubl-settings-service
Name=Services and processes systemd
Name[ru]=Службы и процесссы systemd
GenericName=ubl-settings-services
GenericName[ru]=Службы и процесссы systemd
Comment=System vervices and processes configuration
Comment=System cervices and processes configuration
Comment[ru]=Настройка работы служб и процессов системы
Type=Application
Exec=pkexec ubl-settings-service
Icon=com.ublinux.libublsettingsui-gtk3
Exec=pkexec ubl-settings-services
Icon=com.ublinux.ubl-settings-services
Terminal=false
X-XfcePluggable=true
X-UBLPluggable=true

Loading…
Cancel
Save