Merge pull request 'master' (#368) from YanTheKaller/ubinstall-gtk:master into master

Reviewed-on: #368
pull/373/head^2
Dmitry Razumov 3 weeks ago
commit af2b880d41

@ -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"

@ -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"

@ -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

1 GROUP UNIT DESCRIPTION
2 DBUS dbus-broker Linux D-Bus Message Broker
3 UBManager WebPanel cockpit.socket Operating system monitoring and management manager service
4 Network Manager NetworkManager Is a program for providing detection and configuration for systems to automatically connect to networks A program for providing detection and configuration for systems to automatically connect to networks
5 SSH sshd The daemon that listens for connections from clients on port 22
6 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 A system service that may be used to synchronize the local system clock with a remote Network Time Protocol (NTP) server
7 Avahi avahi-daemon,avahi-dnsconfd Is a free zero-configuration networking (zeroconf) implementation, including a system for multicast DNS and DNS Service Discovery A free zero-configuration networking (zeroconf) implementation, including a system for multicast DNS and DNS Service Discovery
8 CUPS cups Is a modular printing system for Unix-like computer operating systems which allows a computer to act as a print server A modular printing system for Unix-like computer operating systems which allows a computer to act as a print server
9 Samba smb,nmb Provides network shares for folders and printers using the SMB/CIFS protocol commonly used on Windows. SMB and NMB Daemon
10 Samba winbind winbind Provides network shares for folders and printers using the SMB/CIFS protocol commonly used on Windows. Winbind Daemon
11 SwapSpace swapspace Operating system dynamic swap file management service

@ -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);

@ -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);
}

@ -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) {

@ -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

@ -16,51 +16,60 @@
<property name="margin-bottom">1</property>
<property name="spacing">5</property>
<child>
<object class="GtkCheckButton" id="InstallCheck">
<object class="GtkOverlay" id="RowOverlay">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="can-focus">False</property>
<property name="margin-start">5</property>
<property name="margin-end">10</property>
<property name="margin-top">3</property>
<property name="margin-bottom">5</property>
<property name="draw-indicator">True</property>
<child>
<object class="GtkBox">
<object class="GtkCheckButton" id="InstallCheck">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-start">5</property>
<property name="spacing">5</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="draw-indicator">True</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-top">1</property>
<property name="orientation">vertical</property>
<property name="margin-start">5</property>
<property name="spacing">5</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="spacing">7</property>
<property name="margin-top">1</property>
<property name="orientation">vertical</property>
<property name="spacing">5</property>
<child>
<object class="GtkEventBox" id="NameEvent">
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="above-child">True</property>
<property name="spacing">7</property>
<child>
<object class="GtkLabel" id="NameLabel">
<object class="GtkBox" id="TagsBox">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="label" translatable="yes">Name</property>
<property name="width-chars">0</property>
<property name="track-visited-links">False</property>
<property name="xalign">0</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
<property name="can-focus">False</property>
<property name="halign">center</property>
<property name="valign">start</property>
<property name="margin-top">3</property>
<property name="margin-bottom">5</property>
<property name="spacing">2</property>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack-type">end</property>
<property name="position">2</property>
</packing>
</child>
<style>
<class name="selection"/>
</style>
</object>
<packing>
<property name="expand">False</property>
@ -69,69 +78,58 @@
</packing>
</child>
<child>
<object class="GtkBox" id="TagsBox">
<object class="GtkSeparator">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="halign">center</property>
<property name="valign">start</property>
<property name="margin-top">3</property>
<property name="margin-bottom">5</property>
<property name="spacing">2</property>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack-type">end</property>
<property name="position">2</property>
<property name="position">1</property>
</packing>
</child>
<style>
<class name="selection"/>
</style>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkSeparator">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<packing>
<property name="expand">False</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="spacing">5</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="halign">start</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>
<property name="halign">start</property>
<property name="orientation">vertical</property>
<property name="spacing">5</property>
<child>
<object class="GtkLabel">
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Source:</property>
<property name="xalign">0</property>
<property name="spacing">5</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Source:</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="SourceLabel">
<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>
@ -140,79 +138,105 @@
</packing>
</child>
<child>
<object class="GtkLabel" id="SourceLabel">
<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="halign">start</property>
<property name="spacing">5</property>
<child>
<object class="GtkLabel">
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Version:</property>
<property name="xalign">0</property>
<property name="halign">start</property>
<property name="spacing">5</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Version:</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="VersionLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="halign">start</property>
<property name="use-markup">True</property>
<property name="track-visited-links">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">True</property>
<property name="fill">True</property>
<property name="position">0</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="VersionLabel">
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="halign">start</property>
<property name="use-markup">True</property>
<property name="track-visited-links">False</property>
<property name="xalign">0</property>
<property name="spacing">5</property>
<child>
<object class="GtkLabel" id="DescriptionLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Description</property>
<property name="wrap">True</property>
<property name="xalign">0</property>
<property name="yalign">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">
<property name="visible">True</property>
<property name="can-focus">False</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="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</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="halign">start</property>
<property name="valign">start</property>
<property name="spacing">5</property>
<child>
<object class="GtkLabel" id="DescriptionLabel">
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Description</property>
<property name="wrap">True</property>
<property name="valign">start</property>
<property name="label" translatable="yes">Size:</property>
<property name="xalign">0</property>
<property name="yalign">0</property>
</object>
<packing>
<property name="expand">False</property>
@ -221,9 +245,10 @@
</packing>
</child>
<child>
<object class="GtkLabel">
<object class="GtkLabel" id="SizeLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="expand">False</property>
@ -232,48 +257,10 @@
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</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="valign">start</property>
<property name="spacing">5</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="valign">start</property>
<property name="label" translatable="yes">Size:</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="SizeLabel">
<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="pack-type">end</property>
<property name="position">1</property>
</packing>
</child>
@ -281,25 +268,22 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack-type">end</property>
<property name="position">1</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">2</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>
</object>
<packing>
<property name="index">-1</property>
</packing>
</child>
</object>
<packing>
@ -315,4 +299,18 @@
</object>
</child>
</object>
<object class="GtkLabel" id="NameLabel">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="halign">start</property>
<property name="valign">start</property>
<property name="margin-start">20</property>
<property name="label" translatable="yes">Name</property>
<property name="width-chars">0</property>
<property name="track-visited-links">False</property>
<property name="xalign">0</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
</interface>

Loading…
Cancel
Save