diff --git a/locale/services-list_ru.po b/locale/services-list_ru.po index 1a78456..6341228 100644 --- a/locale/services-list_ru.po +++ b/locale/services-list_ru.po @@ -23,20 +23,20 @@ msgstr "Посредник обмена сообщениями D-Bus в Linux" msgid "Operating system monitoring and management manager service" msgstr "Служба мониторинга и управления операционной системой" -msgid "Is a program for providing detection and configuration for systems to automatically connect to networks" -msgstr "Это программа для обнаружения и настройки систем для автоматического подключения к сетям" +msgid "A program for providing detection and configuration for systems to automatically connect to networks" +msgstr "Программа для обнаружения и настройки систем для автоматического подключения к сетям" msgid "The daemon that listens for connections from clients on port 22" msgstr "Демон, который прослушивает подключения от клиентов на порту 22" -msgid "Is a system service that may be used to synchronize the local system clock with a remote Network Time Protocol (NTP) server" -msgstr "Это системная служба, которая может использоваться для синхронизации локальных системных часов с удалённым сервером Network Time Protocol (NTP)" +msgid "A system service that may be used to synchronize the local system clock with a remote Network Time Protocol (NTP) server" +msgstr "Системная служба, которая может использоваться для синхронизации локальных системных часов с удалённым сервером Network Time Protocol (NTP)" -msgid "Is a free zero-configuration networking (zeroconf) implementation, including a system for multicast DNS and DNS Service Discovery" -msgstr "Это бесплатная реализация нуль-конфигурационной сети (zeroconf), включающая систему для multicast DNS и DNS Service Discovery" +msgid "A free zero-configuration networking (zeroconf) implementation, including a system for multicast DNS and DNS Service Discovery" +msgstr "Бесплатная реализация нуль-конфигурационной сети (zeroconf), включающая систему для multicast DNS и DNS Service Discovery" -msgid "Is a modular printing system for Unix-like computer operating systems which allows a computer to act as a print server" -msgstr "Это модульная система печати для Unix-подобных операционных систем, которая позволяет компьютеру выступать в роли сервера печати" +msgid "A modular printing system for Unix-like computer operating systems which allows a computer to act as a print server" +msgstr "Модульная система печати для Unix-подобных операционных систем, которая позволяет компьютеру выступать в роли сервера печати" msgid "Provides network shares for folders and printers using the SMB/CIFS protocol commonly used on Windows. SMB and NMB Daemon" msgstr "Обеспечивает общий доступ к папкам и принтерам по протоколу SMB/CIFS, который обычно используется в Windows. Демон SMB и NMB" diff --git a/locale/ubinstall-gtk_ru.po b/locale/ubinstall-gtk_ru.po index 02ac4d2..8b3c854 100644 --- a/locale/ubinstall-gtk_ru.po +++ b/locale/ubinstall-gtk_ru.po @@ -1561,7 +1561,7 @@ msgstr "Настройка пользователей системы" #: source/ubl-strings.h:422 msgid "Configuring startup services" -msgstr "Настройка служб автозагрузки" +msgstr "Настройка автозапуска служб" #: source/ubl-strings.h:423 msgid "Starting the system" diff --git a/services-list.csv b/services-list.csv index db0a4ab..730ae03 100644 --- a/services-list.csv +++ b/services-list.csv @@ -1,11 +1,11 @@ GROUP;UNIT;DESCRIPTION DBUS;dbus-broker;Linux D-Bus Message Broker UBManager WebPanel;cockpit.socket;Operating system monitoring and management manager service -Network Manager;NetworkManager;Is a program for providing detection and configuration for systems to automatically connect to networks +Network Manager;NetworkManager;A program for providing detection and configuration for systems to automatically connect to networks SSH;sshd;The daemon that listens for connections from clients on port 22 -NTP Client;systemd-timesyncd;Is a system service that may be used to synchronize the local system clock with a remote Network Time Protocol (NTP) server -Avahi;avahi-daemon,avahi-dnsconfd;Is a free zero-configuration networking (zeroconf) implementation, including a system for multicast DNS and DNS Service Discovery -CUPS;cups;Is a modular printing system for Unix-like computer operating systems which allows a computer to act as a print server +NTP Client;systemd-timesyncd;A system service that may be used to synchronize the local system clock with a remote Network Time Protocol (NTP) server +Avahi;avahi-daemon,avahi-dnsconfd;A free zero-configuration networking (zeroconf) implementation, including a system for multicast DNS and DNS Service Discovery +CUPS;cups;A modular printing system for Unix-like computer operating systems which allows a computer to act as a print server Samba;smb,nmb;Provides network shares for folders and printers using the SMB/CIFS protocol commonly used on Windows. SMB and NMB Daemon Samba winbind;winbind;Provides network shares for folders and printers using the SMB/CIFS protocol commonly used on Windows. Winbind Daemon SwapSpace;swapspace;Operating system dynamic swap file management service diff --git a/source/ubinstall-gtk-components.c b/source/ubinstall-gtk-components.c index 0407c06..413b5f5 100644 --- a/source/ubinstall-gtk-components.c +++ b/source/ubinstall-gtk-components.c @@ -191,7 +191,7 @@ os_row *yon_os_row_new(){ row->RowBox = yon_gtk_builder_get_widget(builder,"TableRow"); row->InstallCheck = yon_gtk_builder_get_widget(builder,"InstallCheck"); row->NameLabel = yon_gtk_builder_get_widget(builder,"NameLabel"); - row->NameEvent = yon_gtk_builder_get_widget(builder,"NameEvent"); + row->RowOverlay = yon_gtk_builder_get_widget(builder,"RowOverlay"); row->TagsBox = yon_gtk_builder_get_widget(builder,"TagsBox"); row->VersionLabel = yon_gtk_builder_get_widget(builder,"VersionLabel"); row->DescriptionLabel = yon_gtk_builder_get_widget(builder,"DescriptionLabel"); @@ -201,7 +201,8 @@ os_row *yon_os_row_new(){ row->modules=NULL; row->version=NULL; - g_signal_connect(G_OBJECT(row->NameEvent),"button-press-event",G_CALLBACK(on_os_components_info),row); + gtk_overlay_add_overlay(GTK_OVERLAY(row->RowOverlay),row->NameLabel); + g_signal_connect(G_OBJECT(row->NameLabel),"activate-link",G_CALLBACK(on_os_components_info),row); row->row = yon_gtk_builder_get_widget(builder,"MainRow"); gtk_widget_show(row->row); g_object_set_data(G_OBJECT(row->InstallCheck),"kernel_row",row); diff --git a/source/ubinstall-gtk-users.c b/source/ubinstall-gtk-users.c index 9459e1e..e3470ac 100644 --- a/source/ubinstall-gtk-users.c +++ b/source/ubinstall-gtk-users.c @@ -108,14 +108,42 @@ gboolean on_user_autoloin_switch(GtkWidget *, int status, main_window *){ } void on_user_add(GtkWidget *,main_window *widgets){ + int admin=1; + { + GList *list = gtk_container_get_children(GTK_CONTAINER(widgets->UserAddBox)); + GList *iter; + for(iter=list;iter;iter=iter->next){ + yon_user_struct *cur_user = g_object_get_data(G_OBJECT(iter->data),"yon_user_struct"); + if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(cur_user->AdminCheck))){ + admin=0; + } + } + } yon_user_struct *user = yon_user_struct_new(); g_signal_connect(G_OBJECT(user->AdminCheck),"clicked",G_CALLBACK(yon_user_admin_check),widgets); g_object_set_data(G_OBJECT(user->MainBox),"widgets",widgets); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(user->AdminCheck),admin); gtk_box_pack_start(GTK_BOX(widgets->UserAddBox),user->MainBox,0,0,0); user->changed=1; } void on_user_remove_clicked(GtkWidget *,yon_user_struct *user){ + if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(user->AdminCheck))){ + main_window *widgets = g_object_get_data(G_OBJECT(user->MainBox),"widgets"); + GList *list = gtk_container_get_children(GTK_CONTAINER(widgets->UserAddBox)); + GList *iter; + for(iter=list;iter;iter=iter->next){ + if (iter->data == user->MainBox){ + if (iter->next){ + yon_user_struct *cur_user = g_object_get_data(G_OBJECT(iter->next->data),"yon_user_struct"); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(cur_user->AdminCheck),1); + } else if (iter->prev){ + yon_user_struct *cur_user = g_object_get_data(G_OBJECT(iter->prev->data),"yon_user_struct"); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(cur_user->AdminCheck),1); + } + } + } + } gtk_widget_destroy(user->MainBox); free(user); } diff --git a/source/ubinstall-gtk.c b/source/ubinstall-gtk.c index bb6fdc0..c8705de 100644 --- a/source/ubinstall-gtk.c +++ b/source/ubinstall-gtk.c @@ -1029,10 +1029,6 @@ main_window *yon_main_window_complete(){ } int main(int argc, char *argv[]){ - GApplication *app = (GApplication*)gtk_application_new("com.ublinux.ubinstall-gtk",G_APPLICATION_DEFAULT_FLAGS); - GError *err = NULL; - int reg = g_application_register(app,NULL,&err); - int remote = g_application_get_is_remote(app); main_config.argv=argv; main_config.argc = argc; config_str unfound = NULL; @@ -1042,25 +1038,6 @@ int main(int argc, char *argv[]){ textdomain(LocaleName); config_init(); gtk_init(&argc,&argv); - - if (!reg||remote){ - yon_window *window = yon_window_new(); - gtk_widget_set_size_request(window->Window,300,125); - yon_gtk_window_setup(GTK_WINDOW(window->Window),NULL,WARNING_TITLE_LABEL,icon_path,NULL); - GtkWidget *box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL,5); - GtkWidget *image = gtk_image_new(); - GtkWidget *label = gtk_label_new(ALREADY_RUNNING_LABEL); - gtk_image_set_from_icon_name(GTK_IMAGE(image),warning_icon_path,0); - gtk_image_set_pixel_size(GTK_IMAGE(image),48); - gtk_box_pack_start(GTK_BOX(box),image,1,1,0); - gtk_box_pack_start(GTK_BOX(box),label,1,1,0); - gtk_box_pack_start(GTK_BOX(window->MainBox),box,1,1,0); - gtk_widget_show_all(box); - g_signal_connect(G_OBJECT(window->Window),"destroy",G_CALLBACK(gtk_main_quit),NULL); - gtk_widget_show(window->Window); - gtk_main(); - exit(1); - } yon_ubl_window_init(TITLE_LABEL,"",LocaleName,CssPath,LocaleName,version_application,WIKI_LINK); yon_ubl_setup_arguments(argc,argv,&unfound,&size,ADDITIONAL_ARGS); if (size) { diff --git a/source/ubinstall-gtk.h b/source/ubinstall-gtk.h index fae96a2..7d9a6e4 100755 --- a/source/ubinstall-gtk.h +++ b/source/ubinstall-gtk.h @@ -128,6 +128,8 @@ #define network_value(ip, mask, gateway, dns) g_strdup_printf("ipv4.method manual ipv4.addr %s/%s ipv4.gateway %s ipv4.dns %s", ip, mask, gateway, dns) #define network_value_auto "ipv4.method auto" +#define check_open_command "command -v wmctrl &>/dev/null && command -v xdotool &>/dev/null && UBLPID=$(pidof ubinstall-gtk) && wmctrl -i -a $(xdotool search --pid ${UBLPID} | tail -1)" + #define get_layouts_command "xkbcli list --load-exotic | awk \"\ layout && /description:/ {\ match(\\$0, /: *(.*)/, matches);\ @@ -1062,7 +1064,7 @@ typedef struct char *version; char *tags; char *description; - GtkWidget *NameEvent; + GtkWidget *RowOverlay; } os_row; typedef struct diff --git a/ubinstall-gtk-os-row.glade b/ubinstall-gtk-os-row.glade index 6234eee..a706300 100644 --- a/ubinstall-gtk-os-row.glade +++ b/ubinstall-gtk-os-row.glade @@ -16,51 +16,60 @@ 1 5 - + True - True - False + False 5 10 3 5 - True - + True - False - 5 - 5 + True + False + True True False - 1 - vertical + 5 5 True False - 7 + 1 + vertical + 5 - + True False - True + 7 - + True - True - Name - 0 - False - 0 - - - + False + center + start + 3 + 5 + 2 + + + + + False + True + end + 2 + + False @@ -69,69 +78,58 @@ - + True False - center - start - 3 - 5 - 2 - - - False True - end - 2 + 1 - - - - False - True - 0 - - - - - True - False - - - False - True - 1 - - - - - True - False - 5 True False - start - vertical 5 True False + start + vertical 5 - + True False - Source: - 0 + 5 + + + True + False + Source: + 0 + + + False + True + 0 + + + + + True + False + 0 + + + False + True + 1 + + False @@ -140,79 +138,105 @@ - - True - False - 0 - - - False - True - 1 - - - - - False - True - 0 - - - - - True - False - start - 5 - - + True False - Version: - 0 + start + 5 + + + True + False + Version: + 0 + + + True + True + 0 + + + + + True + False + start + True + False + 0 + + + False + True + 1 + + True True - 0 + 1 - + True False start - True - False - 0 + 5 + + + True + False + Description + True + 0 + 0 + + + False + True + 0 + + + + + True + False + + + False + True + 1 + + - False + True True - 1 + 2 - True + False True - 1 + 0 True False - start + start 5 - + True False - Description - True + start + Size: 0 - 0 False @@ -221,9 +245,10 @@ - + True False + 0 False @@ -232,48 +257,10 @@ - - True - True - 2 - - - - - False - True - 0 - - - - - True - False - start - 5 - - - True - False - start - Size: - 0 - - - False - True - 0 - - - - - True - False - 0 - False True + end 1 @@ -281,25 +268,22 @@ False True - end - 1 + 2 - False + True True - 2 + 0 - - True - True - 0 - + + -1 + @@ -315,4 +299,18 @@ + + True + True + start + start + 20 + Name + 0 + False + 0 + + + +