Interface handlers

pull/6/head
parent 5b85dbaea3
commit baa73d6cf1

4
.gitignore vendored

@ -1,9 +1,11 @@
.vscode/
ubl-settings-services
ubl-settings-TEMPLATE
*~
build/
compile/
*#
terminal-commands/
source/ubl-cmake.h
vgcore*
vgcore*
.install.sh

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 210 KiB

After

Width:  |  Height:  |  Size: 219 KiB

@ -2,6 +2,7 @@
<gresources>
<gresource prefix="/com/ublinux/ui">
<file>ubl-settings-services.glade</file>
<file>ubl-settings-services-terminal.glade</file>
</gresource>
<gresource prefix="/com/ublinux/css">
<file>ubl-settings-services.css</file>

@ -8,10 +8,10 @@ include_directories(${GTK_INCLUDE_DIRS})
link_directories(${GTK_LIBRARY_DIRS})
add_definitions(${GTK_CFLAGS_OTHER})
#pkg_check_modules(VTE291 REQUIRED vte-2.91)
#include_directories(${VTE291_INCLUDE_DIRS})
#link_directories(${VTE291_LIBRARY_DIRS})
#add_definitions(${VTE291_CFLAGS_OTHER})
pkg_check_modules(VTE291 REQUIRED vte-2.91)
include_directories(${VTE291_INCLUDE_DIRS})
link_directories(${VTE291_LIBRARY_DIRS})
add_definitions(${VTE291_CFLAGS_OTHER})
find_library(WEBKIT_LIBRARIES_FOUND webkit2gtk-4.0 webkit2gtk-web-extension-4.0)
@ -36,6 +36,7 @@ add_custom_target(GLADE ubl-settings-services.glade)
set(DEPENDFILES
../ubl-settings-services.glade
../ubl-settings-services-terminal.glade
../gresource.xml
../ubl-settings-services-banner.png
../ubl-settings-services.css
@ -81,7 +82,7 @@ set(SOURCE_FILES
set(LIBRARIES
${GTK_LIBRARIES}
${WEBKIT_LIBRARIES}
# ${VTE291_LIBRARIES}
${VTE291_LIBRARIES}
pthread)

@ -102,25 +102,267 @@ void on_about(){
//functions
void yon_load_proceed(char *command){
if (yon_config_load_register(command))
void on_activate(GtkTreeView *self, main_window *widgets){
GtkTreeIter iter;
GtkTreeModel *model = GTK_TREE_MODEL(main_config.list);
char *name=NULL;
char *description=NULL;
if (gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->MainTree)),&model,&iter)){
gtk_tree_model_get(GTK_TREE_MODEL(main_config.list),&iter,5,&name,6,&description,-1);
gtk_label_set_text(GTK_LABEL(widgets->ChosenNameLabel),name);
gtk_label_set_text(GTK_LABEL(widgets->ChosenDescriptionLabel),description);
menu_obj *menu=widgets->menu;
if (main_config.rmb_clicked){
gboolean CAutostart,CAutostop,CBlock,SAutostart,SLaunched;
gtk_tree_model_get(GTK_TREE_MODEL(main_config.list),&iter,0,&CAutostart,1,&CAutostop,2,&CBlock,3,&SAutostart,4,&SLaunched,-1);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(g_list_nth_data(gtk_container_get_children(GTK_CONTAINER(g_list_nth_data(gtk_container_get_children(GTK_CONTAINER(menu->MenuConfigAutostart)),0))),2)),CAutostart);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(g_list_nth_data(gtk_container_get_children(GTK_CONTAINER(g_list_nth_data(gtk_container_get_children(GTK_CONTAINER(menu->MenuConfigAutostop)),0))),2)),CAutostop);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(g_list_nth_data(gtk_container_get_children(GTK_CONTAINER(g_list_nth_data(gtk_container_get_children(GTK_CONTAINER(menu->MenuConfigBlock)),0))),2)),CBlock);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(g_list_nth_data(gtk_container_get_children(GTK_CONTAINER(g_list_nth_data(gtk_container_get_children(GTK_CONTAINER(menu->MenuSystemAutostart)),0))),2)),SAutostart);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(g_list_nth_data(gtk_container_get_children(GTK_CONTAINER(g_list_nth_data(gtk_container_get_children(GTK_CONTAINER(menu->MenuSystemLaunched)),0))),2)),SLaunched);
gtk_menu_popup_at_pointer(GTK_MENU(menu->Menu),NULL);
}
}
main_config.rmb_clicked=0;
}
void yon_config_load_proceed(char *command){
yon_config_clean();
// yon_config_main_clean();
gtk_list_store_clear(main_config.list);
int services_len=0;
int sockets_len=0;
int config_size=0;
config_str services = yon_config_load(load_services_command,&services_len);
config_str config = yon_config_load(command,&config_size);
for (int i=0; i<services_len;i++){
int current_size=0;
gboolean syslaunched=0;
gboolean conf_autolaunch=0;
gboolean conf_autostop=0;
gboolean conf_block=0;
services[i]=yon_char_divide_search(services[i],"\n",-1);
config_str current_service = yon_char_parse(services[i],&current_size,";");
GtkTreeIter iter;
if (strcmp(current_service[2],"active")==0) syslaunched=1;
if (config){
main_config.loaded_config = config;
if (strstr(config[0],yon_char_append(current_service[0],","))) conf_autolaunch = 1;
if (strstr(config[1],yon_char_append(current_service[0],","))) conf_autostop = 1;
if (strstr(config[2],yon_char_append(current_service[0],","))) conf_block = 1;
}
gtk_list_store_append(main_config.list, &iter);
gtk_list_store_set(main_config.list,&iter,4,syslaunched,5,current_service[0],6,current_service[4],-1);
}
if (config){
main_config.loaded_config = config;
yon_ubl_status_box_render(LOCAL_SAVE_SUCCESS_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE);
else
}else
yon_ubl_status_box_render(LOAD_FAILED_LABEL,BACKGROUND_IMAGE_FAIL_TYPE);
}
void yon_config_load_local(GtkWidget *self, main_window *widgets){
gtk_tree_view_set_model(GTK_TREE_VIEW(widgets->MainTree),NULL);
yon_config_load_proceed(load_config_local_command);
gtk_tree_view_set_model(GTK_TREE_VIEW(widgets->MainTree),GTK_TREE_MODEL(main_config.list));
int size = 0;
dictionary *dict=NULL;
config_str config = yon_config_load(load_services_command,&size);
printf("%s\n",config[0]);
for (int i=0;i<size;i++){
int servsize=0;
config_str service = yon_char_parse(config[i],&servsize,";");
service_info *info = new(service_info);
info->name = yon_char_divide(service[0],strlen(service[0])-strlen(".service"));
info->loaded=strcmp(service[1],"loaded")==0;
info->active=strcmp(service[2],"active")==0;
info->description=yon_char_divide_search(service[4],"\n",-1);
yon_dictionary_add_or_create_if_exists_with_data(dict,info->name,info);
}
// if (main_config.loaded_config){
// for (int i=0;main_config.loaded_config[i];i++){
// dictionary *dct=NULL;
// for_dictionaries (dct,dict){
// if (strcmp(main_config.loaded_config[i],dict->key)==0){
// service_info *serv = yon_dictionary_get_data(dct,service_info*);
// GtkTreeIter iter;
// gtk_list_store_append(main_config.list,&iter);
// gtk_list_store_set(main_config.list,&iter,3,serv->loaded,4,serv->active,-1);
// }
// }
// }
// }
}
void yon_config_load_global(){
}
void on_config_autostart_switch(GtkMenuItem *self,main_window *widgets){
GtkTreeModel *model = GTK_TREE_MODEL(main_config.list);
GtkTreeIter iter;
if (gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->MainTree)),&model,&iter)){
gboolean autostart=0;
gtk_tree_model_get(model,&iter,0,&autostart,-1);
gtk_list_store_set(main_config.list,&iter,0,!autostart,-1);
}
}
void on_config_autostop_switch(GtkMenuItem *self,main_window *widgets){
GtkTreeModel *model = GTK_TREE_MODEL(main_config.list);
GtkTreeIter iter;
if (gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->MainTree)),&model,&iter)){
gboolean autostop=0;
gtk_tree_model_get(model,&iter,1,&autostop,-1);
gtk_list_store_set(main_config.list,&iter,1,!autostop,-1);
}
}
void on_config_block_switch(GtkMenuItem *self,main_window *widgets){
GtkTreeModel *model = GTK_TREE_MODEL(main_config.list);
GtkTreeIter iter;
if (gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->MainTree)),&model,&iter)){
gboolean block=0;
gtk_tree_model_get(model,&iter,2,&block,-1);
gtk_list_store_set(main_config.list,&iter,2,!block,-1);
}
}
void on_system_autostart_switch(GtkMenuItem *self,main_window *widgets){
GtkTreeModel *model = GTK_TREE_MODEL(main_config.list);
GtkTreeIter iter;
if (gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->MainTree)),&model,&iter)){
gboolean autostart=0;
gtk_tree_model_get(model,&iter,3,&autostart,-1);
gtk_list_store_set(main_config.list,&iter,3,!autostart,-1);
}
}
void on_system_launched(GtkMenuItem *self,main_window *widgets){
GtkTreeModel *model = GTK_TREE_MODEL(main_config.list);
GtkTreeIter iter;
if (gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->MainTree)),&model,&iter)){
gboolean launched=0;
gtk_tree_model_get(model,&iter,4,&launched,-1);
gtk_list_store_set(main_config.list,&iter,4,!launched,-1);
}
}
void on_context_menu_open(GtkTreeView *self,GtkTreePath* path, GtkTreeViewColumn* column, main_window *widgets){
printf("ghserth\n");
GtkWidget *menu = widgets->RMBMenu;
gtk_menu_popup_at_pointer(GTK_MENU(menu),NULL);
// gdk_window_get_device_position(gtk_widget_get_window(widgets->MainTree),mouse,&x,&y,NULL);
// gtk_popover_popup(GTK_POPOVER(widgets->ActionsPopover));
// gtk_widget_show(widgets->ActionsPopover);
// GdkRectangle rect;
// rect.x=x;
// rect.y=y;
// gtk_popover_set_pointing_to(GTK_POPOVER(widgets->ActionsPopover),&rect);
void on_config_reload(GtkMenuItem *self,main_window *widgets){
}
void on_status_show(GtkMenuItem *self,main_window *widgets){
GtkBuilder *builder = gtk_builder_new_from_resource(terminal_window_path);
GtkWidget *Window = yon_gtk_builder_get_widget(builder,"TerminalWindow");
GtkWidget *box = yon_gtk_builder_get_widget(builder,"TerminalHolder");
GtkWidget *updateButton = yon_gtk_builder_get_widget(builder,"UpdateButton");
GtkWidget *closeButton = yon_gtk_builder_get_widget(builder,"CancelButton");
GtkTreeModel *model = GTK_TREE_MODEL(main_config.list);
GtkTreeIter iter;
char *name = NULL;
gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->MainTree)),&model,&iter);
gtk_tree_model_get(model,&iter,5,&name,-1);
yon_terminal_integrated_launch(box,yon_char_append(status_command,name),NULL,NULL);
g_signal_connect(G_OBJECT(closeButton),"clicked",G_CALLBACK(on_close_subwindow),NULL);
gtk_widget_show_all(Window);
}
GtkWidget *yon_menu_button_create(char *icon_name, char *text) {
GtkWidget *menu_item = gtk_menu_item_new();
GtkWidget *box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL,0);
GtkWidget *icon;
GtkWidget *check;
if(icon_name){
icon = gtk_image_new_from_icon_name(icon_name,GTK_ICON_SIZE_BUTTON);
check = gtk_check_button_new();
gtk_box_pack_start(GTK_BOX(box),icon,0,0,5);
gtk_box_pack_end(GTK_BOX(box),check,0,0,5);
}
GtkWidget *label = gtk_label_new(text);
gtk_box_pack_start(GTK_BOX(box),label,0,0,5);
gtk_container_add(GTK_CONTAINER(menu_item),box);
gtk_widget_show_all(menu_item);
return menu_item;
}
GtkWidget *yon_menu_separator_create() {
GtkWidget *menu_item = gtk_menu_item_new();
GtkWidget *box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL,0);
GtkWidget *separator = gtk_separator_new(GTK_ORIENTATION_HORIZONTAL);
gtk_box_pack_start(GTK_BOX(box),separator,1,1,0);
gtk_container_add(GTK_CONTAINER(menu_item),box);
gtk_widget_show_all(menu_item);
gtk_widget_set_sensitive(menu_item,0);
return menu_item;
}
gboolean on_context_menu_open(GtkWidget *self,GdkEventButton *event, main_window *widgets){
if (event->button==3){
main_config.rmb_clicked=1;
menu_obj *menu_object = g_malloc0(sizeof(menu_obj));
GtkWidget *menu = gtk_menu_new();
gtk_menu_set_reserve_toggle_size(GTK_MENU(menu),0);
GtkWidget *menu_item_configuration_in_config = yon_menu_button_create(NULL,CONFIG_CONFIGURATION_LABEL);
gtk_widget_set_sensitive(menu_item_configuration_in_config,0);
GtkWidget *menu_item_autostart_config = yon_menu_button_create("media-playback-start-symbolic",AUTOSTART_LABEL);
GtkWidget *menu_item_autostop = yon_menu_button_create("media-playback-stop-symbolic",AUTOSTOP_LABEL);
GtkWidget *menu_item_block = yon_menu_button_create("process-stop-symbolic",BLOCK_LABEL);
GtkWidget *menu_item_separator1 = yon_menu_separator_create();
GtkWidget *menu_item_configuration_in_system = yon_menu_button_create(NULL,SYSTEM_CONFIGURATION_LABEL);
gtk_widget_set_sensitive(menu_item_configuration_in_system,0);
GtkWidget *menu_item_autostart_system = yon_menu_button_create("media-playback-start-symbolic",AUTOSTART_LABEL);
GtkWidget *menu_item_launched = yon_menu_button_create("emoji-flags-symbolic",LAUNCHED_LABEL);
GtkWidget *menu_item_separator2 = yon_menu_separator_create();
GtkWidget *menu_item_reload = yon_menu_button_create("emblem-synchronizing-symbolic",SERVICE_RELOAD_LABEL);
GtkWidget *menu_item_status = yon_menu_button_create("dialog-information-symbolic",STATUS_LABEL);
menu_object->Menu = menu;
menu_object->MenuConfigAutostart = menu_item_autostart_config;
menu_object->MenuConfigAutostop = menu_item_autostop;
menu_object->MenuConfigBlock = menu_item_block;
menu_object->MenuSystemAutostart = menu_item_autostart_system;
menu_object->MenuSystemLaunched = menu_item_launched;
menu_object->MenuReloadConfig = menu_item_reload;
menu_object->MenuStatus = menu_item_status;
g_signal_connect(G_OBJECT(menu_item_autostart_config),"activate",G_CALLBACK(on_config_autostart_switch),widgets);
g_signal_connect(G_OBJECT(menu_item_autostop),"activate",G_CALLBACK(on_config_autostop_switch),widgets);
g_signal_connect(G_OBJECT(menu_item_block),"activate",G_CALLBACK(on_config_block_switch),widgets);
g_signal_connect(G_OBJECT(menu_item_autostart_system),"activate",G_CALLBACK(on_system_autostart_switch),widgets);
g_signal_connect(G_OBJECT(menu_item_launched),"activate",G_CALLBACK(on_system_launched),widgets);
g_signal_connect(G_OBJECT(menu_item_reload),"activate",G_CALLBACK(on_config_reload),widgets);
g_signal_connect(G_OBJECT(menu_item_status),"activate",G_CALLBACK(on_status_show),widgets);
gtk_menu_shell_append(GTK_MENU_SHELL(menu),menu_item_configuration_in_config);
gtk_menu_shell_append(GTK_MENU_SHELL(menu),menu_item_autostart_config);
gtk_menu_shell_append(GTK_MENU_SHELL(menu),menu_item_autostop);
gtk_menu_shell_append(GTK_MENU_SHELL(menu),menu_item_block);
gtk_menu_shell_append(GTK_MENU_SHELL(menu),menu_item_separator1);
gtk_menu_shell_append(GTK_MENU_SHELL(menu),menu_item_configuration_in_system);
gtk_menu_shell_append(GTK_MENU_SHELL(menu),menu_item_autostart_system);
gtk_menu_shell_append(GTK_MENU_SHELL(menu),menu_item_launched);
gtk_menu_shell_append(GTK_MENU_SHELL(menu),menu_item_separator2);
gtk_menu_shell_append(GTK_MENU_SHELL(menu),menu_item_reload);
gtk_menu_shell_append(GTK_MENU_SHELL(menu),menu_item_status);
widgets->RMBMenu=menu;
widgets->menu=menu_object;
// gtk_menu_popup_at_pointer(GTK_MENU(menu),NULL);
return 0;
}
return 0;
}
@ -128,10 +370,6 @@ void on_context_menu_open(GtkTreeView *self,GtkTreePath* path, GtkTreeViewColumn
void config_init(){
main_config.always_open_documentation=0;
main_config.win_height=0;
main_config.win_width=0;
main_config.win_pos_x=0;
main_config.win_pos_y=0;
main_config.socket_id=-1;
main_config.save_socket_id=-1;
main_config.load_socket_id=-1;
@ -140,6 +378,17 @@ void config_init(){
main_config.lock_load_global=0;
main_config.lock_save_global=0;
main_config.lock_save_local=0;
main_config.rmb_clicked=0;
main_config.loaded_config=NULL;
}
void yon_config_main_clean(){
if (main_config.loaded_config){
for (char *str = main_config.loaded_config[0];str;str+=8)
free(str);
}
main_config.loaded_config=NULL;
}
main_window *setup_window(){
@ -166,6 +415,9 @@ main_window *setup_window(){
widgets->SaveLocalMenuItem = yon_gtk_builder_get_widget(builder,"SaveLocalConfigurationMenuItem");
widgets->RightBox = yon_gtk_builder_get_widget(builder,"HeaderRightBox");
widgets->ChosenNameLabel = yon_gtk_builder_get_widget(builder,"MainChosenNameLabel");
widgets->ChosenDescriptionLabel = yon_gtk_builder_get_widget(builder,"MainChosenDescriptionLabel");
widgets->LoadLabel = yon_gtk_builder_get_widget(builder,"headerLoadConfigLabel");
widgets->LoadGlobalMenuItem = yon_gtk_builder_get_widget(builder,"LoadGlobalConfigurationMenuItem");
widgets->LoadLocalMenuItem = yon_gtk_builder_get_widget(builder,"LoadLocalConfigurationMenuItem");
@ -182,7 +434,12 @@ main_window *setup_window(){
widgets->ServiceTreeColumn = GTK_TREE_VIEW_COLUMN(gtk_builder_get_object(builder,"ServiceTreeColumn"));
widgets->RMBMenu = yon_gtk_builder_get_widget(builder,"RMBMenu");
GtkWidget *menu = yon_gtk_builder_get_widget(builder,"menu2");
main_config.list = GTK_LIST_STORE(gtk_builder_get_object(builder,"mainList"));
gtk_menu_shell_append(GTK_MENU_SHELL(menu),widgets->DocumentationMenuItem);
gtk_menu_shell_append(GTK_MENU_SHELL(menu),widgets->AboutMenuItem);
gtk_menu_attach_to_widget(GTK_MENU(widgets->RMBMenu),widgets->MainTree,NULL);
@ -200,9 +457,18 @@ main_window *setup_window(){
/* Signal connection | Присоединение сигналов */
g_signal_connect(G_OBJECT(widgets->Window), "destroy", G_CALLBACK(gtk_main_quit), NULL);
g_signal_connect(G_OBJECT(widgets->MainTree),"row-activated",G_CALLBACK(on_context_menu_open),widgets);
g_signal_connect(G_OBJECT(widgets->MainTree),"button-press-event",G_CALLBACK(on_context_menu_open),widgets);
g_signal_connect(G_OBJECT(widgets->DocumentationMenuItem),"activate",G_CALLBACK(on_open_documentation_confirmation),WIKI_LINK);
g_signal_connect(G_OBJECT(widgets->AboutMenuItem),"activate",G_CALLBACK(on_about),NULL);
g_signal_connect(G_OBJECT(widgets->MainTree),"cursor-changed",G_CALLBACK(on_activate),widgets);
g_signal_connect(G_OBJECT(widgets->LoadGlobalMenuItem), "activate", G_CALLBACK(yon_config_load_global), widgets);
g_signal_connect(G_OBJECT(widgets->LoadLocalMenuItem), "activate", G_CALLBACK(yon_config_load_local), widgets);
// g_signal_connect(G_OBJECT(widgets->SaveMenuItem), "activate", G_CALLBACK(yon_config_save), widgets);
// g_signal_connect(G_OBJECT(widgets->SaveGlobalMenuItem), "activate", G_CALLBACK(yon_config_save_global), widgets);
// g_signal_connect(G_OBJECT(widgets->SaveLocalMenuItem), "activate", G_CALLBACK(yon_config_save_local), widgets);
gtk_widget_show(widgets->Window);
@ -277,6 +543,7 @@ int main(int argc, char *argv[]){
exit(0);
}
}
if (getuid()!=0){
main_config.lock_load_global=1;
main_config.lock_save_global=1;
@ -296,6 +563,7 @@ int main(int argc, char *argv[]){
yon_ubl_setup_sockets(widgets->PlugBox,widgets->LeftBox,widgets->RightBox,main_config.socket_id,main_config.load_socket_id,main_config.save_socket_id);
yon_window_config_setup(GTK_WINDOW(widgets->Window));
yon_window_config_load(config_path);
yon_config_load_local(NULL,widgets);
GtkCssProvider *css=gtk_css_provider_new();
gtk_css_provider_load_from_resource(css,CssPath);
gtk_style_context_add_provider_for_screen(gdk_screen_get_default(),

@ -8,7 +8,8 @@
#include <libintl.h>
#include <getopt.h>
#include <libintl.h>
#include "ubl-cmake.h"
#include "../compile/ubl-cmake.h"
#include <vte-2.91/vte/vte.h>
#ifdef WEBKIT_FOUND
#include <webkit2/webkit2.h>
#endif
@ -22,9 +23,19 @@
#define banner_path "/com/ublinux/images/ubl-settings-services-banner.png"
#define CssPath "/com/ublinux/css/ubl-settings-services.css"
#define config_path yon_char_unite("/home/",yon_ubl_root_user_get(),"/.config/",LocaleName,"/",LocaleName,".conf",NULL)
#define terminal_window_path "/com/ublinux/ui/ubl-settings-services-terminal.glade"
#define LocalePath "/usr/share/locale"
#define LocaleName "ubl-settings-services"
#define load_config_local_command "ubconfig --source system get config SERVICESSTART SERVICESNOSTART SERVICESMASK"
#define load_services_command "systemctl list-units --type=service --type=socket --no-pager --all |grep -E \"^ \" |grep -v \"UNIT\" |sed -e 's/ */;/g' -e 's/^;//g' -e 's/running /running;/g' -e 's/inactive /inactive;/g'"
#define load_sockets_command "systemctl list-sockets -all |grep -vE \"LISTEN|sockets listed\"| sed -e 's/ */:/g'"
#define status_command "systemctl status --no-pager "
typedef char* string;
string version_application;
@ -45,8 +56,23 @@ typedef struct {
int lock_save_local;
int lock_save_global;
int lock_load_global;
config_str loaded_config;
GtkListStore *list;
gboolean rmb_clicked;
} config;
typedef struct {
GtkWidget *Menu;
GtkWidget *MenuConfigAutostart;
GtkWidget *MenuConfigAutostop;
GtkWidget *MenuConfigBlock;
GtkWidget *MenuSystemAutostart;
GtkWidget *MenuSystemLaunched;
GtkWidget *MenuReloadConfig;
GtkWidget *MenuStatus;
} menu_obj;
typedef struct {
GtkWidget *Window;
GtkWidget *HatLabel;
@ -73,6 +99,9 @@ typedef struct {
GtkWidget *LoadLocalMenuItem;
GtkWidget *LeftBox;
GtkWidget *ChosenNameLabel;
GtkWidget *ChosenDescriptionLabel;
GtkWidget *DocumentationMenuItem;
GtkWidget *AboutMenuItem;
@ -83,8 +112,15 @@ typedef struct {
GtkTreeViewColumn *ServiceTreeColumn;
GtkWidget *RMBMenu;
menu_obj *menu;
} main_window;
typedef struct {
char *name;
int loaded;
int active;
char *description;
} service_info;
typedef struct {
GtkWidget *Window;
@ -99,4 +135,5 @@ typedef struct {
} documentation_confirmation_window;
void yon_config_main_clean();
main_window *setup_window();

@ -20,7 +20,7 @@ dictionary *yon_dictionary_new()
return dict;
}
/**yon_dictionary_copy_deep(dictionary *dict)
/**yon_dictionary_copy(dictionary *dict)
* [EN]
*
* [RU]
@ -47,19 +47,43 @@ dictionary *yon_dictionary_copy_deep(dictionary *dict){
return newone->first;
}
/**int yon_dictionary_set_data(dictionary *dict, void *data)
* [EN]
*
* [RU]
* Установить элементу словаря [dict] значение [data]
*/
int yon_dictionary_set_data(dictionary *dict, void *data){
dict->data=data;
}
/**int yon_dictionary_set_key(dictionary *dict, char *key)
* [EN]
*
* [RU]
* Изменяет ключ элемента словаря [dict] на [key]
*/
int yon_dictionary_set_key(dictionary *dict, char *key){
dict->key=key;
}
/** int yon_dictionary_set(dictionary *dict, char *key, void *data)
* [EN]
*
* [RU]
* Устанавливает значение ключа элемента словаря [dict] на [key] и его данные на [data]
*/
int yon_dictionary_set(dictionary *dict, char *key, void *data){
dict->key=key;
dict->data=data;
}
/**int yon_dictionary_empty(dictionary *dict)
* [EN]
*
* [RU]
* Очищает элемент словаря [dict] от данных
*/
int yon_dictionary_empty(dictionary *dict){
dict->data=NULL;
dict->data_type=DICTIONARY_OTHER_TYPE;
@ -445,8 +469,12 @@ char *yon_char_new(char *chr)
return NULL;
}
// char *yon_char_unite(char *source, ...)
/**yon_char_unite(char *source, ...)
* [En]
*
* [RU]
* Объединяет строку [source] со всеми строками, написанными в [...]
*/
char *yon_char_unite(char *source, ...){
va_list arglist;
char *new_char=NULL;
@ -494,6 +522,12 @@ char *yon_char_divide(char *source, int dividepos)
return cut;
}
/**yon_char_find_count(char *source, char *find)
* [EN]
*
* [RU]
* Считает количество символов [find] в строке [source]
*/
int yon_char_find_count(char *source, char *find){
char *working_string=yon_char_new(source);
int i=0;
@ -584,8 +618,8 @@ char *yon_char_replace(char *source, char *find, char*replace){
}
}
/**[EN]
* char **yon_char_parse(char *parameters, int *size, char *divider)
/**yon_char_parse(char *parameters, int *size, char *divider)
* [EN]
* Parses string [parameters], divided by [divider],
* then returns parsed string array and sets [size] to
* size of returned array
@ -702,6 +736,12 @@ config_str yon_char_parsed_new (int *size, ...){
return new_parsed;
}
/**yon_char_parsed_copy(config_str *source, config_str *to_copy)
* [EN]
*
* [RU]
* Копирует массив строк [to_copy] в [source]
*/
void yon_char_parsed_copy(config_str *source, config_str *to_copy){
if (source&&!*source&&to_copy&&*to_copy){
int size=0;
@ -726,12 +766,24 @@ config_str yon_char_parsed_append(config_str parsed, int *size, char *string){
return new_parsed;
}
/**yon_ubl_check_root()
* [EN]
*
* [RU]
* Возвращает 1 если приложение было запущено от root
*/
int yon_ubl_check_root(){
if (getuid()==0) return 1;
else return 0;
}
/**yon_ubl_root_user_get()
* [EN]
*
* [RU]
* Возвращает имя пользователя.
* Если пользователь запустил приложение через root, выводится имя пользователя, запустившего приложение через root
*/
char *yon_ubl_root_user_get(){
char *user=NULL;
if (yon_ubl_check_root()){
@ -1085,7 +1137,7 @@ config_str yon_config_load(char *command, int *str_len){
* Выполняет команду [command], добавляя в конец все записи конфига в таком виде:
* [ПАРАМЕТР1]="[значения1]" [ПАРАМЕТР2]="[значения2]"
*/
int yon_config_save(char *command){
int yon_config_save_registered(char *command){
check_config{
dictionary *dict = NULL;
for_dictionaries(dict,__yon__config__strings){
@ -1119,18 +1171,6 @@ config_str yon_config_get_all(int *size){
} else return NULL;
}
/**[EN]
* int yon_config_save(char *command)
* Saves config with [command]
* [RU]
* Выполняет команду [command]
*/
// int yon_config_save(char *command)
// {
// FILE *output = popen(command, "r");
// return 1;
// }
/**char *yon_config_get_parameter(config parameters, int size, char *param)
* [EN]
* Gets parameter [param] from parameter list [parameters] of size [size];
@ -1234,7 +1274,10 @@ void yon_terminal_integrated_launch(GtkWidget *place_to_show, char* command, voi
vte_terminal_set_size(VTE_TERMINAL(terminal),10,15);
VtePty *pty = vte_pty_new_sync(VTE_PTY_DEFAULT,NULL,NULL);
vte_terminal_set_pty(VTE_TERMINAL(terminal),pty);
gtk_container_add(GTK_CONTAINER(place_to_show),terminal);
if (GTK_IS_BOX(place_to_show))
gtk_box_pack_start(GTK_BOX(place_to_show),terminal,1,1,5);
else
gtk_container_add(GTK_CONTAINER(place_to_show),terminal);
char *install_command=yon_char_unite("tput cup 0 0 && tput ed; ",command," ; sleep 5;exit 0","\n",NULL);
printf("%s\n",install_command);
if(endwork_function)
@ -1315,14 +1358,17 @@ void yon_terminal_integrated_start(GtkWidget *terminal, char* command, void *end
NULL,
NULL,
NULL);
vte_terminal_set_scrollback_lines(VTE_TERMINAL(terminal), 100);
vte_terminal_set_scrollback_lines(VTE_TERMINAL(terminal), -1);
vte_terminal_set_scroll_on_output(VTE_TERMINAL(terminal), TRUE);
vte_terminal_set_scroll_on_keystroke(VTE_TERMINAL(terminal), TRUE);
gtk_widget_show_all(terminal);
}
#endif
// Window config functions
#define check_window_config_setup if(__yon_window_config_target_window)
struct {
int x;
int y;
@ -1330,6 +1376,7 @@ void yon_terminal_integrated_start(GtkWidget *terminal, char* command, void *end
int height;
int fullscreen;
} __yon_main_window_config;
static GtkWindow *__yon_window_config_target_window = NULL;
static GKeyFile *__yon_window_config_file = NULL;
static char *__yon_window_config_path = NULL;
@ -1346,11 +1393,14 @@ void yon_terminal_integrated_start(GtkWidget *terminal, char* command, void *end
void yon_get_is_fullscreen(){
gtk_window_is_maximized(__yon_window_config_target_window);
__yon_main_window_config.fullscreen = gtk_window_is_maximized(__yon_window_config_target_window);
if (__yon_main_window_config.fullscreen==0)
gtk_window_get_position(__yon_window_config_target_window,&__yon_main_window_config.x,&__yon_main_window_config.y);
}
/**yon_on_configured_window_destroy(GtkWidget* self,GdkEvent* event)
* [EN]
*
* [RU]
* Сохраняет настройки основного окна. Вызывается когда основное окно уничтожается.
*/
void yon_on_configured_window_destroy(GtkWidget* self,GdkEvent* event){
check_window_config_setup{
yon_get_is_fullscreen();
@ -1368,11 +1418,16 @@ void yon_terminal_integrated_start(GtkWidget *terminal, char* command, void *end
}
}
/**yon_window_config_setup(GtkWindow *window)
* [EN]
*
* [RU]
* Устанавливает указатель на окно для отслеживания его положения и размера
*/
void yon_window_config_setup(GtkWindow *window){
__yon_window_config_target_window = window;
g_signal_connect(G_OBJECT(__yon_window_config_target_window),"delete-event",G_CALLBACK(yon_on_configured_window_destroy),NULL);
g_signal_connect(G_OBJECT(__yon_window_config_target_window),"check-resize"/*"configure-event"*/,G_CALLBACK(__yon_window_config_on_resize),NULL);
// g_signal_connect(G_OBJECT(__yon_window_config_target_window),"configure_event",G_CALLBACK(__yon_window_config_on_resize),NULL);
g_signal_connect(G_OBJECT(window),"delete-event",G_CALLBACK(yon_on_configured_window_destroy),NULL);
g_signal_connect(G_OBJECT(window),"check-resize"/*"configure-event"*/,G_CALLBACK(__yon_window_config_on_resize),NULL);
}
void _yon_maximize(void *data){
@ -1380,6 +1435,12 @@ void yon_terminal_integrated_start(GtkWidget *terminal, char* command, void *end
if(__yon_main_window_config.fullscreen ==1) gtk_window_maximize(__yon_window_config_target_window);
}
/**yon_window_config_load(char *path)
* [EN]
*
* [RU]
* Загружает конфиг окна и инициализирует отслеживание его параметров
*/
int yon_window_config_load(char *path){
__yon_window_config_file = g_key_file_new();
__yon_window_config_path=yon_char_new(path);
@ -1416,6 +1477,43 @@ void yon_terminal_integrated_start(GtkWidget *terminal, char* command, void *end
gtk_window_resize(__yon_window_config_target_window,__yon_main_window_config.width,__yon_main_window_config.height);
}
GtkWidget *yon_ubl_menu_item_about_new(char *buttonname){
GtkWidget *menu_item = gtk_menu_item_new();
gtk_style_context_add_class(gtk_widget_get_style_context(menu_item),"menuitembottom");
GtkWidget *box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL,0);
GtkWidget *label = gtk_label_new(buttonname);
GtkWidget *image = gtk_image_new_from_icon_name("dialog-information-symbolic",GTK_ICON_SIZE_BUTTON);
gtk_label_set_xalign(GTK_LABEL(label),0.0);
gtk_box_pack_start(GTK_BOX(box),image,0,0,5);
gtk_box_pack_start(GTK_BOX(box),label,0,0,5);
gtk_container_add(GTK_CONTAINER(menu_item),box);
gtk_widget_show_all(menu_item);
return menu_item;
}
GtkWidget *yon_ubl_menu_item_documentation_new(char *buttonname){
GtkWidget *menu_item = gtk_menu_item_new();
gtk_style_context_add_class(gtk_widget_get_style_context(menu_item),"menuitemtop");
GtkWidget *box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL,0);
GtkWidget *label = gtk_label_new(buttonname);
GtkWidget *image = gtk_image_new_from_icon_name("dialog-question-symbolic",GTK_ICON_SIZE_BUTTON);
gtk_label_set_xalign(GTK_LABEL(label),0.0);
gtk_box_pack_start(GTK_BOX(box),image,0,0,5);
gtk_box_pack_start(GTK_BOX(box),label,0,0,5);
gtk_container_add(GTK_CONTAINER(menu_item),box);
gtk_widget_show_all(menu_item);
return menu_item;
}
// other Gtk functions
/**yon_gtk_combo_box_text_fill(GtkWidget *combo, config_str parameters,int size)
* [EN]
*
* [RU]
* Добавляет в Комбобокс [combo] все строки из массива строк [parameters] размера [size]
*/
int yon_gtk_combo_box_text_fill(GtkWidget *combo, config_str parameters,int size){
if (combo&&parameters){
for (int i=0;i<size;i++){
@ -1426,6 +1524,13 @@ int yon_gtk_combo_box_text_fill(GtkWidget *combo, config_str parameters,int size
return 0;
}
/**yon_gtk_combo_box_text_find(GtkWidget *combo_box, char *text_to_find)
* [EN]
*
* [RU]
* Проивзодит поиск по GtkComboBoxText [combo_box]
* возвращает 1 если элемент [text_to_find] найден, иначе возвращает 0
*/
int yon_gtk_combo_box_text_find(GtkWidget *combo_box, char *text_to_find){
if (combo_box&&text_to_find){
int active=gtk_combo_box_get_active(GTK_COMBO_BOX(combo_box));
@ -1443,7 +1548,7 @@ int yon_gtk_combo_box_text_find(GtkWidget *combo_box, char *text_to_find){
* [EN]
*
* [RU]
* Добвляет в [destination] все виджеты, прописанные после [padding]
* Добвляет [destination] все виджеты, прописанные после [padding]. Добавление происходит с начала контейнера.
* [expand] - расширяемость выделенного для виджетов места
* [fill] - заполнять ли виджетом всё ему выделенное место
* [padding] - отступ од других элементов
@ -1459,6 +1564,15 @@ int yon_dictionary_gtk_pack_start_multiple_widgets(GtkBox *destination, gboolean
return 1;
}
/**yon_dictionary_gtk_pack_end_multiple_widgets(GtkBox *destination, gboolean expand, gboolean fill, int padding, ...)
* [EN]
*
* [RU]
* Добвляет в [destination] все виджеты, прописанные после [padding]. Добавление происходит с конца контейнера.
* [expand] - расширяемость выделенного для виджетов места
* [fill] - заполнять ли виджетом всё ему выделенное место
* [padding] - отступ од других элементов
*/
int yon_dictionary_gtk_pack_end_multiple_widgets(GtkBox *destination, gboolean expand, gboolean fill, int padding, ...){
va_list args;
va_start(args,padding);

@ -12,10 +12,9 @@
#include <locale.h>
#include <gtk/gtk.h>
#include <gtk/gtkx.h>
#include <fcntl.h>
#include <sys/types.h>
#include <vte-2.91/vte/vte.h>
#include "ubl-cmake.h"
#include "../compile/ubl-cmake.h"
#ifdef WEBKIT_FOUND
#include <webkit2/webkit2.h>
#endif
@ -171,7 +170,7 @@ apps *yon_apps_get_by_name(apps *applist, char *name, int size);
config_str yon_config_load(char *command, int *str_len);
int yon_config_save(char *command);
int yon_config_save_registered(char *command);
char *yon_config_get_parameter(config_str parameters, int size, char *param);
@ -211,6 +210,9 @@ void yon_terminal_integrated_start(GtkWidget *terminal, char* command, void *end
#endif
GtkWidget *yon_ubl_menu_item_about_new(char *buttonname);
GtkWidget *yon_ubl_menu_item_documentation_new(char *buttonname);
/**yon_gtk_builder_get_widget(builder, widget_name)
* [EN]
* Returns GtkWidget from GtkBuilder *[builder].

@ -0,0 +1,106 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.38.2 -->
<interface domain="ubl-settings-services">
<requires lib="gtk+" version="3.24"/>
<!-- interface-css-provider-path ubl-settings-services.css -->
<object class="GtkImage" id="image8">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="icon-name">emblem-synchronizing-symbolic</property>
</object>
<object class="GtkImage" id="image9">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="icon-name">process-stop-symbolic</property>
</object>
<object class="GtkApplicationWindow" id="TerminalWindow">
<property name="width-request">500</property>
<property name="height-request">350</property>
<property name="can-focus">False</property>
<property name="modal">True</property>
<property name="default-width">450</property>
<property name="default-height">-1</property>
<property name="icon-name">dialog-question-symbolic</property>
<child>
<object class="GtkBox" id="TerminalHolder">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-left">5</property>
<property name="margin-right">5</property>
<property name="margin-start">5</property>
<property name="margin-end">5</property>
<property name="margin-top">5</property>
<property name="margin-bottom">5</property>
<property name="orientation">vertical</property>
<property name="spacing">10</property>
<child>
<placeholder/>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="spacing">30</property>
<child>
<object class="GtkButton" id="UpdateButton">
<property name="label" translatable="yes">Update service status</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image">image8</property>
<style>
<class name="button"/>
</style>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="CancelButton">
<property name="label" translatable="yes">Close</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image">image9</property>
<style>
<class name="button"/>
</style>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack-type">end</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
<child type="titlebar">
<object class="GtkHeaderBar" id="SettingsBar">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="show-close-button">True</property>
<child type="title">
<object class="GtkLabel" id="webHeaderNameLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Services and processes systemd</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
</child>
</object>
</child>
</object>
</interface>

@ -48,17 +48,23 @@ background:transparent;
}
.menuitemtop *{
margin:2px 2px 0 2px;
padding: 5px 10px 3px 5px;
padding-top:2px;
padding-bottom:2px;
/* padding: 5px 0px 3px 5px; */
border:transparent;
}
.menuitemmiddle *{
margin:0 2px 0 2px;
padding: 3px 10px 3px 5px;
padding-top:2px;
padding-bottom:2px;
/* padding: 3px 0px 3px 5px; */
border:transparent;
}
.menuitembottom *{
margin:0 2px 2px 2px;
padding: 3px 10px 5px 5px;
padding-top:2px;
padding-bottom:2px;
/* padding: 3px 0px 5px 5px; */
}
.menuitemtop:hover {
background:@theme_bg_color;
@ -83,19 +89,25 @@ background:transparent;
}
.menuitemtop:hover* {
margin:2px 2px 0 2px;
padding: 5px 10px 3px 5px;
padding-top:2px;
padding-bottom:2px;
/* padding: 5px 0 3px 5px; */
background:@theme_selected_bg_color;
border-radius:2px;
}
.menuitemmiddle:hover* {
margin:0 2px 0 2px;
padding: 3px 10px 3px 5px;
margin:0 2px 0px 2px;
padding-top:2px;
padding-bottom:2px;
/* padding: 3px 0px 3px 5px; */
background:@theme_selected_bg_color;
border-radius:2px;
}
.menuitembottom:hover* {
margin:0 2px 2px 2px;
padding: 3px 10px 5px 5px;
padding-top:2px;
padding-bottom:2px;
/* padding: 3px 0px 5px 5px; */
background:@theme_selected_bg_color;
border-radius:2px;
}
@ -105,30 +117,4 @@ background:transparent;
.boxInfoMessOK{
background-color: #f3f0ac;
}
.sharpBorders *{
border-radius: 0px;
}
.lowborder{
border-top:none;
border-left: none;
border-right:none;
}
.lowborder {
border-bottom: 1px;
border-style: solid;
border-color: inherit;
}
.nohover:hover {
background-color: transparent;
color:inherit;
border-right:inherit;
border-left:inherit;
padding-left: 4px;
/* border-top:inherit; */
}
.colortest{
-gtk-icon-palette:name @theme_base_color;
}

@ -554,139 +554,19 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
</packing>
</child>
</object>
<object class="GtkImage" id="image1">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="icon-name">emblem-synchronizing-symbolic</property>
</object>
<object class="GtkImage" id="image10">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="icon-name">emblem-synchronizing-symbolic</property>
</object>
<object class="GtkImage" id="image11">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="icon-name">dialog-information-symbolic</property>
</object>
<object class="GtkImage" id="image2">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="icon-name">media-playback-start-symbolic</property>
</object>
<object class="GtkImage" id="image3">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="icon-name">media-playback-stop-symbolic</property>
</object>
<object class="GtkImage" id="image4">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="icon-name">process-stop-symbolic</property>
</object>
<object class="GtkImage" id="image6">
<object class="GtkMenu" id="RMBMenu">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="icon-name">media-playback-start-symbolic</property>
</object>
<object class="GtkImage" id="image7">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="icon-name">emoji-flags-symbolic</property>
<object class="GtkAdjustment" id="adjustment1">
<property name="upper">100</property>
<property name="step-increment">1</property>
<property name="page-increment">10</property>
</object>
<object class="GtkMenu" id="RMBMenu">
<object class="GtkImage" id="image1">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<object class="GtkMenuItem">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Configuration in config file</property>
<property name="use-underline">True</property>
<style>
<class name="nohover"/>
</style>
</object>
</child>
<child>
<object class="GtkImageMenuItem">
<property name="label" translatable="yes">Autostart</property>
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="image">image2</property>
<property name="use-stock">False</property>
</object>
</child>
<child>
<object class="GtkImageMenuItem">
<property name="label" translatable="yes">Autostop</property>
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="image">image3</property>
<property name="use-stock">False</property>
</object>
</child>
<child>
<object class="GtkImageMenuItem">
<property name="label" translatable="yes">Block</property>
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="image">image4</property>
<property name="use-stock">False</property>
<style>
<class name="lowborder"/>
</style>
</object>
</child>
<child>
<object class="GtkMenuItem">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Configuration in system</property>
<style>
<class name="nohover"/>
</style>
</object>
</child>
<child>
<object class="GtkImageMenuItem">
<property name="label" translatable="yes">Autostart</property>
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="image">image6</property>
<property name="use-stock">False</property>
</object>
</child>
<child>
<object class="GtkImageMenuItem">
<property name="label" translatable="yes">Launched</property>
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="image">image7</property>
<property name="use-stock">False</property>
<style>
<class name="lowborder"/>
</style>
</object>
</child>
<child>
<object class="GtkImageMenuItem">
<property name="label" translatable="yes">Service configuration reload</property>
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="image">image10</property>
<property name="use-stock">False</property>
</object>
</child>
<child>
<object class="GtkImageMenuItem">
<property name="label" translatable="yes">Status</property>
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="image">image11</property>
<property name="use-stock">False</property>
</object>
</child>
<property name="icon-name">emblem-synchronizing-symbolic</property>
</object>
<object class="GtkImage" id="image8">
<property name="visible">True</property>
@ -889,33 +769,25 @@ translated and supported by community.</property>
</object>
</child>
</object>
<object class="GtkListStore" id="liststore1">
<object class="GtkListStore" id="liststore2"/>
<object class="GtkListStore" id="mainList">
<columns>
<!-- column-name gboolean1 -->
<!-- column-name CAutostart -->
<column type="gboolean"/>
<!-- column-name gboolean2 -->
<!-- column-name CAutostop -->
<column type="gboolean"/>
<!-- column-name gboolean3 -->
<!-- column-name CBlock -->
<column type="gboolean"/>
<!-- column-name gboolean4 -->
<!-- column-name SAutostart -->
<column type="gboolean"/>
<!-- column-name gboolean5 -->
<!-- column-name SLaunched -->
<column type="gboolean"/>
<!-- column-name gchararray1 -->
<!-- column-name Name -->
<column type="gchararray"/>
<!-- column-name Description -->
<column type="gchararray"/>
</columns>
<data>
<row>
<col id="0">False</col>
<col id="1">False</col>
<col id="2">False</col>
<col id="3">False</col>
<col id="4">False</col>
<col id="5" translatable="yes">gzsdrgasdrg</col>
</row>
</data>
</object>
<object class="GtkListStore" id="liststore2"/>
<object class="GtkMenu" id="menu1">
<property name="visible">True</property>
<property name="can-focus">False</property>
@ -946,28 +818,6 @@ translated and supported by community.</property>
<property name="can-focus">False</property>
<property name="take-focus">False</property>
<property name="reserve-toggle-size">False</property>
<child>
<object class="GtkMenuItem" id="DocumentationMenuItem">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Documentation</property>
<property name="use-underline">True</property>
<style>
<class name="menuitemtop"/>
</style>
</object>
</child>
<child>
<object class="GtkMenuItem" id="AboutMenuItem">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">About</property>
<style>
<class name="menuitemsolo"/>
<class name="menuitembottom"/>
</style>
</object>
</child>
</object>
<object class="GtkMenu" id="menu3">
<property name="visible">True</property>
@ -1121,242 +971,100 @@ translated and supported by community.</property>
<property name="vexpand">True</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkBox">
<object class="GtkFrame">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">5</property>
<property name="label-xalign">0</property>
<property name="shadow-type">in</property>
<child>
<object class="GtkBox">
<object class="GtkAlignment">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="spacing">5</property>
<child>
<object class="GtkComboBoxText">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="active">0</property>
<items>
<item translatable="yes">All services</item>
<item translatable="yes">System services only</item>
<item translatable="yes">User services only</item>
</items>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<property name="top-padding">5</property>
<property name="bottom-padding">5</property>
<property name="left-padding">5</property>
<property name="right-padding">5</property>
<child>
<object class="GtkComboBoxText">
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="active">0</property>
<items>
<item translatable="yes">All</item>
<item translatable="yes">Services</item>
<item translatable="yes">Sockets</item>
<item translatable="yes">Automatic launch</item>
<item translatable="yes">Stopped in configuration</item>
<item translatable="yes">Blocked in configuration</item>
</items>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkSearchEntry">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="max-length">40</property>
<property name="primary-icon-name">edit-find-symbolic</property>
<property name="primary-icon-activatable">False</property>
<property name="primary-icon-sensitive">False</property>
<property name="input-purpose">name</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkButton">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image">image1</property>
<style>
<class name="thin"/>
</style>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">4</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkTreeView" id="FirstRowNamesTree">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="halign">start</property>
<property name="valign">start</property>
<property name="model">liststore2</property>
<child internal-child="selection">
<object class="GtkTreeSelection"/>
</child>
<child>
<object class="GtkTreeViewColumn">
<property name="fixed-width">270</property>
<property name="title" translatable="yes">Configuration in config file</property>
</object>
</child>
<child>
<object class="GtkTreeViewColumn">
<property name="fixed-width">180</property>
<property name="title" translatable="yes">Configuration in system</property>
</object>
</child>
<style>
<class name="thin"/>
<class name="noborder"/>
</style>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkTreeView" id="MainTree">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="has-tooltip">True</property>
<property name="model">liststore1</property>
<property name="search-column">5</property>
<property name="fixed-height-mode">True</property>
<property name="enable-grid-lines">vertical</property>
<property name="activate-on-single-click">True</property>
<child internal-child="selection">
<object class="GtkTreeSelection"/>
</child>
<child>
<object class="GtkTreeViewColumn">
<property name="sizing">fixed</property>
<property name="fixed-width">90</property>
<property name="title" translatable="yes">Autostart</property>
<child>
<object class="GtkCellRendererToggle"/>
<attributes>
<attribute name="active">0</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn">
<property name="sizing">fixed</property>
<property name="fixed-width">90</property>
<property name="title" translatable="yes">Autostop</property>
<child>
<object class="GtkCellRendererToggle"/>
<attributes>
<attribute name="active">1</attribute>
</attributes>
</child>
</object>
</child>
<property name="orientation">vertical</property>
<property name="spacing">5</property>
<child>
<object class="GtkTreeViewColumn">
<property name="sizing">fixed</property>
<property name="fixed-width">90</property>
<property name="title" translatable="yes">Block</property>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="spacing">5</property>
<child>
<object class="GtkCellRendererToggle"/>
<attributes>
<attribute name="active">2</attribute>
</attributes>
<object class="GtkComboBoxText">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="active">0</property>
<items>
<item translatable="yes">All services</item>
<item translatable="yes">System services only</item>
<item translatable="yes">User services only</item>
</items>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn">
<property name="sizing">fixed</property>
<property name="fixed-width">90</property>
<property name="title" translatable="yes">Autostart</property>
<child>
<object class="GtkCellRendererToggle"/>
<attributes>
<attribute name="active">3</attribute>
</attributes>
<object class="GtkComboBoxText">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="active">0</property>
<items>
<item translatable="yes">All</item>
<item translatable="yes">Services</item>
<item translatable="yes">Sockets</item>
<item translatable="yes">Automatic launch</item>
<item translatable="yes">Stopped in configuration</item>
<item translatable="yes">Blocked in configuration</item>
</items>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn">
<property name="sizing">fixed</property>
<property name="fixed-width">90</property>
<property name="title" translatable="yes">Launched</property>
<child>
<object class="GtkCellRendererToggle"/>
<attributes>
<attribute name="active">4</attribute>
</attributes>
<object class="GtkSearchEntry">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="max-length">40</property>
<property name="primary-icon-name">edit-find-symbolic</property>
<property name="primary-icon-activatable">False</property>
<property name="primary-icon-sensitive">False</property>
<property name="input-purpose">name</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn" id="ServiceTreeColumn">
<property name="sizing">fixed</property>
<property name="title" translatable="yes">Service</property>
<property name="sort-column-id">5</property>
<child>
<object class="GtkCellRendererText"/>
<attributes>
<attribute name="text">5</attribute>
</attributes>
<object class="GtkButton">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image">image1</property>
<style>
<class name="thin"/>
</style>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">4</property>
</packing>
</child>
</object>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-top">5</property>
<property name="margin-bottom">5</property>
<property name="orientation">vertical</property>
<property name="spacing">10</property>
<child>
<object class="GtkLabel" id="MainChosenNameLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
@ -1364,33 +1072,390 @@ translated and supported by community.</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="MainChosenDescriptionLabel">
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="xalign">0</property>
<property name="orientation">vertical</property>
<property name="spacing">5</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkTreeView" id="FirstRowNamesTree">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="halign">start</property>
<property name="valign">start</property>
<property name="model">liststore2</property>
<child internal-child="selection">
<object class="GtkTreeSelection"/>
</child>
<child>
<object class="GtkTreeViewColumn">
<property name="fixed-width">270</property>
<property name="title" translatable="yes">Configuration in config file</property>
</object>
</child>
<child>
<object class="GtkTreeViewColumn">
<property name="fixed-width">180</property>
<property name="title" translatable="yes">Configuration in system</property>
</object>
</child>
<style>
<class name="thin"/>
<class name="noborder"/>
</style>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkTreeView" id="MainTree1">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="has-tooltip">True</property>
<property name="vadjustment">adjustment1</property>
<property name="model">liststore2</property>
<property name="search-column">5</property>
<property name="fixed-height-mode">True</property>
<property name="enable-grid-lines">vertical</property>
<property name="activate-on-single-click">True</property>
<child internal-child="selection">
<object class="GtkTreeSelection"/>
</child>
<child>
<object class="GtkTreeViewColumn">
<property name="sizing">fixed</property>
<property name="fixed-width">90</property>
<property name="title" translatable="yes">Autostart</property>
<child>
<object class="GtkCellRendererToggle"/>
<attributes>
<attribute name="active">0</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn">
<property name="sizing">fixed</property>
<property name="fixed-width">90</property>
<property name="title" translatable="yes">Autostop</property>
<child>
<object class="GtkCellRendererToggle"/>
<attributes>
<attribute name="active">1</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn">
<property name="sizing">fixed</property>
<property name="fixed-width">90</property>
<property name="title" translatable="yes">Block</property>
<child>
<object class="GtkCellRendererToggle"/>
<attributes>
<attribute name="active">2</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn">
<property name="sizing">fixed</property>
<property name="fixed-width">90</property>
<property name="title" translatable="yes">Autostart</property>
<child>
<object class="GtkCellRendererToggle"/>
<attributes>
<attribute name="active">3</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn">
<property name="sizing">fixed</property>
<property name="fixed-width">90</property>
<property name="title" translatable="yes">Launched</property>
<child>
<object class="GtkCellRendererToggle"/>
<attributes>
<attribute name="active">4</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn" id="ServiceTreeColumn1">
<property name="sizing">fixed</property>
<property name="title" translatable="yes">Service</property>
<property name="clickable">True</property>
<property name="sort-column-id">5</property>
<child>
<object class="GtkCellRendererText"/>
<attributes>
<attribute name="text">5</attribute>
</attributes>
</child>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkScrolledWindow">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="shadow-type">in</property>
<child>
<object class="GtkViewport">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<object class="GtkTreeView" id="MainTree">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="has-tooltip">True</property>
<property name="vadjustment">adjustment1</property>
<property name="model">mainList</property>
<property name="headers-visible">False</property>
<property name="search-column">5</property>
<property name="fixed-height-mode">True</property>
<property name="enable-grid-lines">vertical</property>
<property name="activate-on-single-click">True</property>
<child internal-child="selection">
<object class="GtkTreeSelection"/>
</child>
<child>
<object class="GtkTreeViewColumn">
<property name="sizing">fixed</property>
<property name="fixed-width">90</property>
<property name="title" translatable="yes">Autostart</property>
<child>
<object class="GtkCellRendererToggle"/>
<attributes>
<attribute name="active">0</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn">
<property name="sizing">fixed</property>
<property name="fixed-width">90</property>
<property name="title" translatable="yes">Autostop</property>
<child>
<object class="GtkCellRendererToggle"/>
<attributes>
<attribute name="active">1</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn">
<property name="sizing">fixed</property>
<property name="fixed-width">90</property>
<property name="title" translatable="yes">Block</property>
<child>
<object class="GtkCellRendererToggle"/>
<attributes>
<attribute name="active">2</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn">
<property name="sizing">fixed</property>
<property name="fixed-width">90</property>
<property name="title" translatable="yes">Autostart</property>
<child>
<object class="GtkCellRendererToggle"/>
<attributes>
<attribute name="active">3</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn">
<property name="sizing">fixed</property>
<property name="fixed-width">90</property>
<property name="title" translatable="yes">Launched</property>
<child>
<object class="GtkCellRendererToggle"/>
<attributes>
<attribute name="active">4</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn" id="ServiceTreeColumn">
<property name="sizing">fixed</property>
<property name="title" translatable="yes">Service</property>
<property name="clickable">True</property>
<property name="sort-column-id">5</property>
<child>
<object class="GtkCellRendererText"/>
<attributes>
<attribute name="text">5</attribute>
</attributes>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
<style>
<class name="workingbg"/>
</style>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-top">5</property>
<property name="margin-bottom">5</property>
<property name="orientation">vertical</property>
<property name="spacing">10</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="spacing">5</property>
<child>
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Service:</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="MainChosenNameLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="spacing">5</property>
<child>
<object class="GtkLabel" id="label2">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Description:</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="MainChosenDescriptionLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<style>
<class name="workingbg"/>
</style>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child type="label">
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Services</property>
</object>
</child>
</object>
<packing>
@ -1585,4 +1650,10 @@ translated and supported by community.</property>
</object>
</child>
</object>
<object class="GtkSizeGroup">
<widgets>
<widget name="label1"/>
<widget name="label2"/>
</widgets>
</object>
</interface>

Loading…
Cancel
Save