@ -0,0 +1,5 @@
|
||||
ubl-settings-bootloader.glade~
|
||||
test.cpp
|
||||
.vscode
|
||||
ubl-settings-bootloader
|
||||
ubl-settings-bootloader_ru.po~
|
||||
@ -0,0 +1,162 @@
|
||||
#!/usr/bin/make -f
|
||||
|
||||
#SHELL := /bin/bash
|
||||
MAKEFILE_FILEPATH := $(abspath $(lastword $(MAKEFILE_LIST)))
|
||||
MAKEFILE_DIR := $(notdir $(patsubst %/,%,$(dir $(MAKEFILE_FILEPATH))))
|
||||
MAKEFILE_PATH := $(dir $(MAKEFILE_FILEPATH))
|
||||
|
||||
CMAKE_COMMAND = cmake
|
||||
CMAKE_SOURCE_DIR = $(MAKEFILE_PATH)source
|
||||
CMAKE_BUILD_DIR = $(MAKEFILE_PATH)compile
|
||||
#CMAKE_SOURCE_DIR = ./source
|
||||
#CMAKE_BUILD_DIR = ./compile
|
||||
FILE_VERSION = VERSION.md
|
||||
DEPENDS = /bin/cmake
|
||||
PREFIX ?= /usr
|
||||
PKGNAME = $(MAKEFILE_DIR)
|
||||
#PKGNAME = ubl-settings-bootloader
|
||||
|
||||
default_target: all
|
||||
|
||||
.PHONY: all init depend debug prepare check build uninstall install clean up_ver help
|
||||
|
||||
all: init build
|
||||
|
||||
init:
|
||||
@echo "Initialize ..."; \
|
||||
sed -r "s/(version_application = ).*/\1\"$$(grep 'VERSION' ${FILE_VERSION} | cut -d" " -f2)\";/" -i source/ubl-settings-bootloader.cc; \
|
||||
echo "-- Build path: ${CMAKE_BUILD_DIR}"
|
||||
|
||||
depend:
|
||||
@echo "Check depends ..."
|
||||
@for FILE_DEPEND in $(DEPENDS); do \
|
||||
if [ ! -f $${FILE_DEPEND} ]; then \
|
||||
echo "ERROR: Depend '$${FILE_DEPEND}' not found !"; \
|
||||
exit 1; \
|
||||
fi; \
|
||||
done; \
|
||||
echo "Check depends: OK"
|
||||
# $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1
|
||||
|
||||
debug:
|
||||
@echo "Debug ..."
|
||||
if [ ! -d ${CMAKE_BUILD_DIR} ]; then \
|
||||
$(CMAKE_COMMAND) -S${CMAKE_SOURCE_DIR} -B${CMAKE_BUILD_DIR} -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX="${PREFIX}"; \
|
||||
fi; \
|
||||
echo "Debug: OK"
|
||||
|
||||
prepare:
|
||||
@echo "Prepare ..."; \
|
||||
if [ ! -d ${CMAKE_BUILD_DIR} ]; then \
|
||||
$(CMAKE_COMMAND) -S${CMAKE_SOURCE_DIR} -B${CMAKE_BUILD_DIR} -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="${PREFIX}"; \
|
||||
fi; \
|
||||
echo "Prepare: OK"
|
||||
|
||||
check:
|
||||
@echo "Check ..."; \
|
||||
if [ -f ${CMAKE_BUILD_DIR}/${PKGNAME} ]; then \
|
||||
echo "Check: OK"; \
|
||||
else \
|
||||
echo "Check: ${CMAKE_BUILD_DIR}/${PKGNAME} not found !"; \
|
||||
exit 1; \
|
||||
fi
|
||||
|
||||
build: depend prepare
|
||||
@echo "Build ..."; \
|
||||
make --directory=${CMAKE_BUILD_DIR}; \
|
||||
echo "Build: OK"
|
||||
|
||||
uninstall:
|
||||
@echo "Uninstall ..."
|
||||
@for FILE_PO in $(wildcard *.po); do \
|
||||
LANG=$${FILE_PO##*_};LANG=$${LANG%.*}; \
|
||||
FILE_MO=$${FILE_PO##*/}; FILE_MO="$${FILE_MO%_*.po}.mo"; \
|
||||
PATH_FILE_MO="${DESTDIR}${PREFIX}/share/locale/$${LANG}/LC_MESSAGES/$${FILE_MO}"; \
|
||||
$(RM) "$${PATH_FILE_MO}"; \
|
||||
done
|
||||
@for SIZE in 16x16 32x32 48x48 scalable; do \
|
||||
$(RM) "${DESTDIR}${PREFIX}/share/icons/hicolor/$${SIZE}/apps/com.ublinux.${PKGNAME}.svg"; \
|
||||
$(RM) "${DESTDIR}${PREFIX}/share/icons/hicolor/$${SIZE}/apps/com.ublinux.${PKGNAME}.png"; \
|
||||
done
|
||||
@for FILE_SVG in $(wildcard *.svg); do \
|
||||
for SIZE in 16x16 32x32 48x48 scalable; do \
|
||||
$(RM) "${DESTDIR}${PREFIX}/share/icons/hicolor/$${SIZE}/status/$${FILE_SVG%.*}".{svg,png,jpg}; \
|
||||
done; \
|
||||
done
|
||||
@$(RM) "${DESTDIR}${PREFIX}/bin/${PKGNAME}"
|
||||
@$(RM) "${DESTDIR}${PREFIX}/share/applications/${PKGNAME}.desktop"
|
||||
@$(RM) "${DESTDIR}${PREFIX}/share/${PKGNAME}/images/logo-background.png"
|
||||
@$(RM) "${DESTDIR}${PREFIX}/share/polkit-1/actions/com.ublinux.pkexec.${PKGNAME}.exec.policy"
|
||||
@$(RM) "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/apps/com.ublinux.${PKGNAME}.svg"
|
||||
@$(RM) -rd "${DESTDIR}${PREFIX}/share/${PKGNAME}"
|
||||
@if [ -z ${DESTDIR} ]; then \
|
||||
[ -d "${DESTDIR}${PREFIX}/share/icons/hicolor/" ] && gtk-update-icon-cache -fiq "${DESTDIR}${PREFIX}/share/icons/hicolor/" &>/dev/null || true; \
|
||||
update-desktop-database --quiet &>/dev/null || true; \
|
||||
[ -d "${DESTDIR}${PREFIX}/share/applications" ] && touch "${DESTDIR}${PREFIX}/share/applications" &>/dev/null || true; \
|
||||
fi
|
||||
@echo "Uninstall: OK"
|
||||
|
||||
install: check uninstall
|
||||
@echo "Install ..."
|
||||
@for FILE_PO in $(wildcard *.po); do \
|
||||
LANG=$${FILE_PO##*_};LANG=$${LANG%.*}; \
|
||||
install -dm755 "${DESTDIR}${PREFIX}/share/locale/$${LANG}/LC_MESSAGES"; \
|
||||
FILE_MO=$${FILE_PO##*/}; FILE_MO="$${FILE_MO%_*.po}.mo"; \
|
||||
PATH_FILE_MO="${DESTDIR}${PREFIX}/share/locale/$${LANG}/LC_MESSAGES/$${FILE_MO}"; \
|
||||
echo "$${FILE_PO}"; \
|
||||
msgfmt "$${FILE_PO}" -v -f -o "$${PATH_FILE_MO}"; \
|
||||
done
|
||||
@for SIZE in 16 32 48; do \
|
||||
install -dm755 "${DESTDIR}${PREFIX}/share/icons/hicolor/$${SIZE}x$${SIZE}/apps"; \
|
||||
rsvg-convert -w $${SIZE} -h $${SIZE} -f png --keep-image-data "com.ublinux.${PKGNAME}.svg" -o "${DESTDIR}${PREFIX}/share/icons/hicolor/$${SIZE}x$${SIZE}/apps/com.ublinux.${PKGNAME}.png"; \
|
||||
done
|
||||
@install -dm755 "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/apps"
|
||||
@install -Dm644 -t "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/apps/" "com.ublinux.${PKGNAME}.svg"
|
||||
@install -Dm755 -t "${DESTDIR}${PREFIX}/bin/" "${CMAKE_BUILD_DIR}/${PKGNAME}"
|
||||
@install -dm755 "${DESTDIR}${PREFIX}/share/applications"
|
||||
@install -Dm644 -t "${DESTDIR}${PREFIX}/share/applications/" "${PKGNAME}.desktop"
|
||||
@install -dm755 "${DESTDIR}${PREFIX}/share/polkit-1/actions"
|
||||
@install -Dm644 -t "${DESTDIR}${PREFIX}/share/polkit-1/actions/" "com.ublinux.pkexec.${PKGNAME}.exec.policy"
|
||||
@install -dm755 "${DESTDIR}${PREFIX}/share/${PKGNAME}"/{ui,css,images}
|
||||
@install -Dm644 -t "${DESTDIR}${PREFIX}/share/${PKGNAME}/ui/" "${PKGNAME}.glade"
|
||||
@install -Dm644 -t "${DESTDIR}${PREFIX}/share/${PKGNAME}/css/" "${PKGNAME}.css"
|
||||
@install -Dm644 -t "${DESTDIR}${PREFIX}/share/${PKGNAME}/images/" "logo-background.png"
|
||||
@install -Dm644 -t "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/status/" "com.ublinux.${PKGNAME}.checked.svg"
|
||||
@install -Dm644 -t "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/status/" "com.ublinux.${PKGNAME}.warning.svg"
|
||||
@install -Dm644 -t /usr/share/${PKGNAME}/ cmdline-linux.csv
|
||||
@install -Dm644 -t /usr/share/${PKGNAME}/ grub-terminal-input.csv
|
||||
@install -Dm644 -t /usr/share/${PKGNAME}/ grub-terminal-output.csv
|
||||
@if [ -z ${DESTDIR} ]; then \
|
||||
[ -d "${DESTDIR}${PREFIX}/share/icons/hicolor/" ] && gtk-update-icon-cache -fiq "${DESTDIR}${PREFIX}/share/icons/hicolor/" &>/dev/null || true; \
|
||||
update-desktop-database --quiet &>/dev/null || true; \
|
||||
[ -d "${DESTDIR}${PREFIX}/share/applications" ] && touch "${DESTDIR}${PREFIX}/share/applications" &>/dev/null || true; \
|
||||
fi
|
||||
@echo "Install: OK"
|
||||
|
||||
clean:
|
||||
@echo "Clean ..."
|
||||
@$(RM) -rd ${CMAKE_BUILD_DIR}
|
||||
@if [ -d ${CMAKE_BUILD_DIR} ]; then \
|
||||
echo "Clean: error, compile directory exist ${CMAKE_BUILD_DIR}"; \
|
||||
else \
|
||||
echo "Clean: OK"; \
|
||||
fi
|
||||
|
||||
up_ver:
|
||||
@CURRENT=$$(grep 'VERSION' ${FILE_VERSION} | cut -d" " -f2); \
|
||||
MAJOR=$$(cut -d. -f1 <<< $${CURRENT}); \
|
||||
MINOR=$$(cut -d. -f2 <<< $${CURRENT}); \
|
||||
VER="$${MAJOR}.$$(($${MINOR}+1))"; \
|
||||
sed "s/VERSION *[[:digit:]]*.*/VERSION $${VER}/" -i ${FILE_VERSION}; \
|
||||
echo "Updated version to VERSION.md: $${CURRENT} to $${VER}"
|
||||
|
||||
help:
|
||||
@echo "The following are some of the valid targets for this Makefile:"
|
||||
@echo "... all (the default if no target is provided)"
|
||||
@echo "... init"
|
||||
@echo "... debug"
|
||||
@echo "... prepare"
|
||||
@echo "... compile"
|
||||
@echo "... install"
|
||||
@echo "... uninstall"
|
||||
@echo "... clean"
|
||||
@ -1,2 +1,44 @@
|
||||
# ubl-settings-bootloader
|
||||
# Настройка загрузчика
|
||||
[RU] Утилита для настройки загрузчика
|
||||
|
||||
Utility for setting the bootloader
|
||||
|
||||

|
||||
|
||||
# Build
|
||||
In order to build ubl-settings-bootloader you will need:
|
||||
|
||||
- CMake
|
||||
- C compiler
|
||||
- GTK+ 3 & dependencies
|
||||
|
||||
Once you have all the necessary dependencies, you can use:
|
||||
```sh
|
||||
$ make
|
||||
```
|
||||
|
||||
# Installation
|
||||
After a successful build, just use:
|
||||
```sh
|
||||
$ sudo make install clean
|
||||
```
|
||||
|
||||
# Uninstallation
|
||||
After a successful build, just use:
|
||||
```sh
|
||||
$ sudo make uninstall
|
||||
```
|
||||
# Usage
|
||||
```sh
|
||||
$ ubl-settings-bootloader --help
|
||||
GTK settings bootloader for UBLinux
|
||||
|
||||
Usage: ubl-settings-bootloader [OPTIONS...]
|
||||
Options:
|
||||
-h, --help Show this help
|
||||
-V, --version Show package version
|
||||
|
||||
$ ubl-settings-bootloader --version
|
||||
ubl-settings-bootloader version: x.xx
|
||||
```
|
||||
@ -0,0 +1 @@
|
||||
VERSION 1.0
|
||||
|
|
After Width: | Height: | Size: 7.4 KiB |
|
After Width: | Height: | Size: 107 KiB |
|
After Width: | Height: | Size: 2.1 KiB |
|
|
|
After Width: | Height: | Size: 33 KiB |
|
After Width: | Height: | Size: 123 KiB |
@ -0,0 +1,59 @@
|
||||
cmake_minimum_required(VERSION 3.7)
|
||||
project(ubl-settings-bootloader)
|
||||
|
||||
find_package(PkgConfig REQUIRED)
|
||||
|
||||
pkg_check_modules(GTK REQUIRED gtkmm-3.0)
|
||||
include_directories(${GTK_INCLUDE_DIRS})
|
||||
link_directories(${GTK_LIBRARY_DIRS})
|
||||
add_definitions(${GTK_CFLAGS_OTHER})
|
||||
|
||||
find_library(WEBKIT_LIBRARIES_FOUND webkit2gtk-4.0 webkit2gtk-web-extension-4.0)
|
||||
|
||||
option(WEBKIT_FOUND "No" OFF)
|
||||
|
||||
find_library(WEBKIT_LIBRARIES_FOUND webkit2gtk-4.0 webkit2gtk-web-extension-4.0)
|
||||
if(WEBKIT_LIBRARIES_FOUND)
|
||||
option(WEBKIT_FOUND "Yes" ON)
|
||||
PKG_CHECK_MODULES(WEBKIT REQUIRED webkit2gtk-4.0 webkit2gtk-web-extension-4.0)
|
||||
include_directories(${WEBKIT_INCLUDE_DIRS})
|
||||
link_directories(${WEBKIT_LIBRARY_DIRS})
|
||||
add_definitions(${WEBKIT_CFLAGS_OTHER})
|
||||
endif()
|
||||
configure_file(ubl-settings-bootloader.h.in ubl-settings-bootloader-cm.h)
|
||||
|
||||
|
||||
|
||||
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wall -Wextra -Werror -Wmissing-declarations -fdiagnostics-color=always -std=c++2a -g")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wall -Wextra -Werror -Wmissing-declarations -fdiagnostics-color=always \
|
||||
-O2 -pipe -fno-plt -fexceptions \
|
||||
-Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security \
|
||||
-fstack-clash-protection -fcf-protection")
|
||||
|
||||
set(SOURCE_FILES
|
||||
ubl-settings-bootloader-cm.h
|
||||
ubl-settings-bootloader.h
|
||||
ubl-settings-bootloader.cc
|
||||
save.h
|
||||
save.cc
|
||||
load.h
|
||||
load.cc
|
||||
my_process.h
|
||||
my_process.cc
|
||||
util.h
|
||||
util.cc
|
||||
ubl-util-standard.h
|
||||
ubl-util-standard.c
|
||||
main.cc)
|
||||
|
||||
set(LIBRARIES
|
||||
${GTK_LIBRARIES}
|
||||
pthread)
|
||||
|
||||
add_executable(ubl-settings-bootloader ${SOURCE_FILES})
|
||||
target_link_libraries(ubl-settings-bootloader PUBLIC ${WEBKIT_LIBRARIES} ${LIBRARIES})
|
||||
target_include_directories(ubl-settings-bootloader PUBLIC
|
||||
"${PROJECT_BINARY_DIR}"
|
||||
${WEBKIT_INCLUDE_DIRS}
|
||||
)
|
||||
install(TARGETS ubl-settings-bootloader DESTINATION bin)
|
||||
@ -0,0 +1,34 @@
|
||||
#include "load.h"
|
||||
|
||||
namespace Lib_Load{
|
||||
void Load::set_count_error(int count_error) {
|
||||
process.set_count_error(count_error);
|
||||
}
|
||||
string Load::get_cmd_error() {
|
||||
return process.get_cmd_error();
|
||||
}
|
||||
map<string, string>& Load::get_load_data(std::map <string, string> &map_temp, string cmd) {
|
||||
string response = "";
|
||||
string key = "";
|
||||
string value = "";
|
||||
response = process.call_all_sections(cmd);
|
||||
vector<string> vec_str_key_value = Utils::split(response, '\n');
|
||||
for (const string ¶m: vec_str_key_value) {
|
||||
if ((param.find("(null)") == std::string::npos) && (param.length() != 0 )) {
|
||||
if (param.find("=") != std::string::npos) {
|
||||
size_t index = param.find("=");
|
||||
key = param.substr(0, index);
|
||||
value = param.substr(index + 1, param.length());
|
||||
Utils::str_replace_all(value, " \"","");
|
||||
Utils::str_replace_all(value, "\"","");
|
||||
map_temp[key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return map_temp;
|
||||
}
|
||||
int Load::get_count_error() {
|
||||
return process.get_count_error();
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,20 @@
|
||||
#ifndef LOAD_H
|
||||
#define LOAD_H
|
||||
|
||||
#include "my_process.h"
|
||||
namespace Lib_Load{
|
||||
class Load {
|
||||
|
||||
private:
|
||||
string sections;
|
||||
My_Process::My_Process_call process = My_Process::My_Process_call();
|
||||
public:
|
||||
int get_count_error();
|
||||
void set_count_error(int count_error);
|
||||
string get_cmd_error();
|
||||
map<string, string>& get_load_data(std::map <string, string> &map_temp, string str_flag_load);
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
#endif
|
||||
@ -0,0 +1,94 @@
|
||||
#include "ubl-settings-bootloader.h"
|
||||
|
||||
|
||||
void pars_flag(int index_start, int argc, char* argv[]);
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
string str_argv= "";
|
||||
string str_cmd_argv = "";
|
||||
for (int i=1; i<argc; i++){
|
||||
str_cmd_argv+= to_string(*argv[i]) + " ";
|
||||
}
|
||||
if (argc > 1){
|
||||
str_argv = argv[1];
|
||||
}
|
||||
bindtextdomain("ubl-settings-bootloader", "/usr/share/locale/");
|
||||
bind_textdomain_codeset("ubl-settings-bootloader", "UTF-8");
|
||||
textdomain("ubl-settings-bootloader");
|
||||
if (str_argv.find("--socket-id") != std::string::npos) {
|
||||
auto app = Gtk::Application::create(argc, argv, "org.gtkmm.example.plug");
|
||||
auto builder = Gtk::Builder::create_from_file(path_glade);
|
||||
Glib::init();
|
||||
setlocale(LC_ALL, "");
|
||||
Glib::OptionContext context;
|
||||
|
||||
CmdArgParser parser{
|
||||
"Socket ID",
|
||||
"Command line argument for socket ID communication.",
|
||||
"No help available, sorry"
|
||||
};
|
||||
|
||||
context.set_main_group(parser);
|
||||
context.parse(argc, argv);
|
||||
|
||||
::Window socketID = parser.GetSocketID();
|
||||
|
||||
// Handle plug:
|
||||
SettingsPlug plug{socketID, builder};
|
||||
plug.show();
|
||||
|
||||
app->run(plug);
|
||||
return 0;
|
||||
}
|
||||
else if (str_argv.find("-") != std::string::npos || argc == 1) {
|
||||
int len_argv = 1;
|
||||
auto app = Gtk::Application::create(len_argv, argv, "org.gtkmm.example.plug");
|
||||
auto builder = Gtk::Builder::create_from_file(path_glade);
|
||||
pars_flag(1, argc, argv);
|
||||
MainWindow* wnd = nullptr;
|
||||
builder->get_widget_derived("window", wnd);
|
||||
auto r = app->run(*wnd);
|
||||
delete wnd;
|
||||
return r;
|
||||
}
|
||||
|
||||
}
|
||||
void pars_flag(int index_start, int argc, char* argv[]) {
|
||||
string str_argv = "";
|
||||
for (int i = index_start; i<argc; i++){
|
||||
str_argv = argv[i];
|
||||
if (str_argv == "--help" || str_argv == "-h"){
|
||||
help();
|
||||
exit(1);
|
||||
}
|
||||
else if (str_argv == "--version" || str_argv == "-v"){
|
||||
string version = string(str_version) + version_application + "\n";
|
||||
cout << version.c_str();
|
||||
exit(1);
|
||||
}
|
||||
else if (str_argv == "--lock-help") {
|
||||
flag_lock_help = true;
|
||||
}
|
||||
else if (str_argv == "--lock-save") {
|
||||
flag_save = true;
|
||||
flag_save_local = true;
|
||||
flag_save_global = true;
|
||||
}
|
||||
else if (str_argv == "--lock-save-local"){
|
||||
flag_save_local = true;
|
||||
}
|
||||
else if (str_argv == "--lock-save-global"){
|
||||
flag_save_global = true;
|
||||
}
|
||||
else if (str_argv == "--lock-load-global"){
|
||||
flag_load_global = true;
|
||||
}
|
||||
else{
|
||||
if (index_start == 1){
|
||||
g_print(_(no_recognized));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,84 @@
|
||||
#include "my_process.h"
|
||||
#include "util.h"
|
||||
|
||||
namespace My_Process {
|
||||
#define debug false
|
||||
struct Utils::Result<string> My_Process_call::call(string cmd) {
|
||||
this->i_error_old = this->i_error;
|
||||
struct Utils::Result<string> obj_result;
|
||||
string response = Utils::call(cmd);
|
||||
obj_result.response = response;
|
||||
if ((response.find("(null)") == std::string::npos) && (response.length() != 0 )) {
|
||||
if (response.find("=") != std::string::npos) {
|
||||
if (response.find("\n") != std::string::npos) {
|
||||
response = response.substr(response.find("=")+1,response.length());
|
||||
response = response.substr(0,response.find("\n"));
|
||||
obj_result.response = response;
|
||||
obj_result.error = 0;
|
||||
}
|
||||
else {
|
||||
obj_result.error = 1;
|
||||
this->i_error += 1;
|
||||
this->log_mess_error(cmd);
|
||||
}
|
||||
}
|
||||
else {
|
||||
obj_result.error = 2;
|
||||
this->i_error += 1;
|
||||
str_cmd_error = cmd;
|
||||
this->log_mess_error(cmd);
|
||||
}
|
||||
}
|
||||
else {
|
||||
obj_result.error = 3;
|
||||
this->i_error += 1;
|
||||
str_cmd_error = cmd;
|
||||
this->log_mess_error(cmd);
|
||||
}
|
||||
return obj_result;
|
||||
}
|
||||
|
||||
int My_Process::get_count_error() {
|
||||
return this->i_error;
|
||||
}
|
||||
|
||||
void My_Process::set_back_count_error() {
|
||||
this->i_error = this->i_error_old;
|
||||
}
|
||||
|
||||
void My_Process_system::call(string cmd, string thread_str = "") {
|
||||
string cmd_new = cmd + " " + thread_str;
|
||||
int response_cmd = system(cmd_new.c_str());
|
||||
if (response_cmd != 0) {
|
||||
this->i_error += 1;
|
||||
}
|
||||
}
|
||||
|
||||
void My_Process::set_count_error(int count_error) {
|
||||
this->i_error = count_error;
|
||||
this->str_cmd_error = "";
|
||||
}
|
||||
|
||||
void My_Process::log_mess_error(string) {
|
||||
}
|
||||
|
||||
string My_Process::get_cmd_error() {
|
||||
return this->str_cmd_error;
|
||||
}
|
||||
string My_Process_call::call_all_sections(string cmd) {
|
||||
char buffer[PATH_MAX] = {0};
|
||||
std::string result = "";
|
||||
FILE* pipe = popen(cmd.c_str(), "r");
|
||||
if (!pipe) throw std::runtime_error("popen() failed!");
|
||||
try {
|
||||
while (fgets(buffer, sizeof buffer, pipe) != NULL) {
|
||||
result += buffer;
|
||||
}
|
||||
} catch (...) {
|
||||
pclose(pipe);
|
||||
throw;
|
||||
}
|
||||
pclose(pipe);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,32 @@
|
||||
#ifndef SAVE_H
|
||||
#define SAVE_H
|
||||
|
||||
#include "util.h"
|
||||
namespace My_Process{
|
||||
class My_Process {
|
||||
public:
|
||||
int i_error = 0;
|
||||
int i_error_old = 0;
|
||||
string str_cmd_error = "";
|
||||
int get_count_error();
|
||||
void set_count_error(int count_error);
|
||||
void set_back_count_error();
|
||||
void log_mess_error(string);
|
||||
string get_cmd_error();
|
||||
};
|
||||
|
||||
|
||||
class My_Process_call: public My_Process {
|
||||
public:
|
||||
struct Utils::Result<string> call(string cmd);
|
||||
string call_all_sections(string cmd);
|
||||
|
||||
};
|
||||
|
||||
class My_Process_system: public My_Process {
|
||||
public:
|
||||
void call(string cmd, string thread_str);
|
||||
|
||||
};
|
||||
}
|
||||
#endif
|
||||
@ -0,0 +1,151 @@
|
||||
#include "save.h"
|
||||
|
||||
namespace Lib_save {
|
||||
|
||||
vector<string> Save::get_error() {
|
||||
return this->vec_errors;
|
||||
}
|
||||
|
||||
bool Save::get_state_save() {
|
||||
return this->flag_no_save;
|
||||
}
|
||||
|
||||
void Save::set_data_global(std::map <string, string> &map_global) {
|
||||
this->map_global = &map_global;
|
||||
}
|
||||
|
||||
void Save::set_data_local(std::map <string, string> &map_local) {
|
||||
this->map_local = &map_local;
|
||||
}
|
||||
|
||||
void Save::set_data_gui(std::map <string, string> &map_gui) {
|
||||
this->map_gui = &map_gui;
|
||||
}
|
||||
|
||||
bool Save::check_save(string flag_save, string key_name) {
|
||||
std::map <string, string>:: iterator iter_map_data;
|
||||
std::map <string, string>:: iterator iter_map_data_old;
|
||||
std::map <string, string> *map_data_old;
|
||||
if (flag_save == "system") {
|
||||
map_data_old = map_local;
|
||||
}
|
||||
else if (flag_save == "global") {
|
||||
map_data_old = map_global;
|
||||
}
|
||||
iter_map_data = (*map_gui).find(key_name);
|
||||
iter_map_data_old = (*map_data_old).find(key_name);
|
||||
if ((*map_local).find(key_name) != (*map_local).end() && (*map_global).find(key_name) != (*map_global).end()) {
|
||||
if ((*map_local)[key_name] != (*map_global)[key_name]) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (iter_map_data_old == (*map_data_old).end() && iter_map_data != (*map_gui).end()) {
|
||||
return true;
|
||||
}
|
||||
else if (iter_map_data->second != iter_map_data_old->second) {
|
||||
return true;
|
||||
}
|
||||
else if (iter_map_data->second.length() == 0 && iter_map_data_old->second.length() == 0) {
|
||||
return false;
|
||||
}
|
||||
else if (iter_map_data->second == iter_map_data_old->second) {
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
int Save::get_count_error() {
|
||||
return process.get_count_error();
|
||||
}
|
||||
|
||||
string Save::get_cmd_error() {
|
||||
return process.get_cmd_error();
|
||||
}
|
||||
|
||||
void Save::set_count_error(int count_error) {
|
||||
process.set_count_error(count_error);
|
||||
}
|
||||
|
||||
void Save::set_vec_params(vector<string>& vec_param_names) {
|
||||
this->vec_param_names = &vec_param_names;
|
||||
}
|
||||
|
||||
void Save::save(string sections, string str_flag_save) {
|
||||
string key = "";
|
||||
string value = "";
|
||||
string cmd = "";
|
||||
string str_error = "";
|
||||
this->flag_no_save = true;
|
||||
for (const auto &key: *vec_param_names) {
|
||||
if (map_gui->find(key) != map_gui->end()) {
|
||||
value = (*map_gui)[key];
|
||||
if (this->check_save(str_flag_save, key)) {
|
||||
if (value.length() != 0) {
|
||||
cmd = "ubconfig --target " + str_flag_save + " set " + sections + " " +
|
||||
key + "=\"" + value + "\"";
|
||||
}
|
||||
else if (value.length() == 0) {
|
||||
cmd = "ubconfig --target " + str_flag_save + " remove " + sections + " " + key;
|
||||
}
|
||||
else {
|
||||
cmd = "";
|
||||
}
|
||||
if (cmd.length() != 0) {
|
||||
process.call(cmd, "");
|
||||
this->flag_no_save = false;
|
||||
str_error = process.get_cmd_error();
|
||||
if (str_error.length() != 0) {
|
||||
this->vec_errors.push_back(str_error);
|
||||
str_error = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
void Save::save_one_cmd(string cmd1, string cmd_remove, string str_flag_save) {
|
||||
string key = "";
|
||||
string value = "";
|
||||
string cmd = "";
|
||||
this->flag_no_save = true;
|
||||
cmd = cmd1;
|
||||
string remove = cmd_remove;
|
||||
for (const auto &key: *vec_param_names) {
|
||||
if (map_gui->find(key) != map_gui->end()) {
|
||||
value = (*map_gui)[key];
|
||||
if (this->check_save(str_flag_save, key)) {
|
||||
if (value.length() != 0) {
|
||||
cmd = cmd + key + "=\"" + value + "\" ";
|
||||
}
|
||||
else if (value.length() == 0) {
|
||||
remove = remove + key + " ";
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
if (cmd.length() != cmd1.length()) {
|
||||
this->template_save(cmd);
|
||||
}
|
||||
if (cmd_remove.length() != remove.length()) {
|
||||
this->template_save(remove);
|
||||
}
|
||||
}
|
||||
|
||||
void Save::template_save(string cmd) {
|
||||
string str_error = "";
|
||||
process.call(cmd, "");
|
||||
this->flag_no_save = false;
|
||||
str_error = process.get_cmd_error();
|
||||
if (str_error.length() != 0) {
|
||||
this->vec_errors.push_back(str_error);
|
||||
str_error = "";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,33 @@
|
||||
#ifndef MY_PROCESS_H
|
||||
#define MY_PROCESS_H
|
||||
|
||||
#include "my_process.h"
|
||||
namespace Lib_save {
|
||||
|
||||
class Save {
|
||||
private:
|
||||
std::map <string, string> *map_global;
|
||||
std::map <string, string> *map_local;
|
||||
std::map <string, string> *map_gui;
|
||||
vector<string> vec_errors;
|
||||
vector<string>* vec_param_names;
|
||||
My_Process::My_Process_system process = My_Process::My_Process_system();
|
||||
bool flag_no_save;
|
||||
void template_save(string cmd);
|
||||
public:
|
||||
void set_data_global(std::map <string, string> &map_global);
|
||||
void set_data_local(std::map <string, string> &map_local);
|
||||
void set_data_gui(std::map <string, string> &map_gui);
|
||||
bool check_save(string flag_save, string key_name);
|
||||
bool get_state_save();
|
||||
|
||||
void save_one_cmd(string cmd1, string cmd_remove, string str_flag_save);
|
||||
int get_count_error();
|
||||
string get_cmd_error();
|
||||
void set_count_error(int count_error);
|
||||
void set_vec_params(vector<string>& vec_param_names);
|
||||
void save(string sections, string str_flag_save) ;
|
||||
vector<string> get_error();
|
||||
};
|
||||
}
|
||||
#endif
|
||||
@ -0,0 +1 @@
|
||||
#cmakedefine WEBKIT_FOUND
|
||||
@ -0,0 +1,91 @@
|
||||
#include "ubl-util-standard.h"
|
||||
#ifndef __cplusplus
|
||||
#ifndef UBL_GET_STANDARD_UI
|
||||
#define UBL_GET_STANDARD_UI
|
||||
|
||||
|
||||
inline returnstruct *ubl_make_plugs(GtkWidget *LeftWidget, GtkWidget *RightWidget, int left_plug_id, int right_plug_id){
|
||||
returnstruct *ret=(returnstruct*)malloc(sizeof(returnstruct*));
|
||||
if (left_plug_id>0&&LeftWidget){
|
||||
GtkWidget *plug=gtk_plug_new(left_plug_id);
|
||||
GtkWidget *toplug=LeftWidget;
|
||||
if (gtk_widget_get_parent(GTK_WIDGET(toplug))){
|
||||
g_object_ref(G_OBJECT(toplug));
|
||||
GtkWidget *parent=gtk_widget_get_parent(toplug);
|
||||
gtk_container_remove(GTK_CONTAINER(parent),toplug);
|
||||
gtk_container_add(GTK_CONTAINER(plug),GTK_WIDGET(toplug));
|
||||
} else
|
||||
gtk_container_add(GTK_CONTAINER(plug),GTK_WIDGET(toplug));
|
||||
gtk_widget_show(GTK_WIDGET(plug));
|
||||
ret->plugLeft=plug;
|
||||
}
|
||||
if (right_plug_id>0&&RightWidget){
|
||||
GtkWidget *plug=gtk_plug_new(right_plug_id);
|
||||
GtkWidget *toplug=RightWidget;
|
||||
if (gtk_widget_get_parent(GTK_WIDGET(toplug))){
|
||||
g_object_ref(G_OBJECT(toplug));
|
||||
GtkWidget *parent=gtk_widget_get_parent(toplug);
|
||||
gtk_container_remove(GTK_CONTAINER(parent),toplug);
|
||||
gtk_container_add(GTK_CONTAINER(plug),GTK_WIDGET(toplug));
|
||||
} else
|
||||
gtk_container_add(GTK_CONTAINER(plug),GTK_WIDGET(toplug));
|
||||
gtk_widget_show(GTK_WIDGET(plug));
|
||||
ret->plugRight=plug;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
|
||||
inline void ubl_make_plugs(Gtk::Widget *LeftWidget, Gtk::Widget *RightWidget, int left_plug_id, int right_plug_id){
|
||||
if (left_plug_id>0&&LeftWidget){
|
||||
GtkWidget *plug=gtk_plug_new(left_plug_id);
|
||||
GtkWidget *toplug=GTK_WIDGET(LeftWidget->gobj());
|
||||
{GdkScreen *screen = gtk_widget_get_screen(plug);
|
||||
gtk_widget_set_app_paintable(plug,TRUE);
|
||||
GdkVisual *colormap = gdk_screen_get_rgba_visual(screen);
|
||||
gtk_widget_set_visual(plug, colormap);}
|
||||
{GdkScreen *screen = gtk_widget_get_screen(toplug);
|
||||
gtk_widget_set_app_paintable(toplug,TRUE);
|
||||
GdkVisual *colormap = gdk_screen_get_rgba_visual(screen);
|
||||
gtk_widget_set_visual(toplug, colormap);}
|
||||
if (gtk_widget_get_parent(GTK_WIDGET(toplug))){
|
||||
g_object_ref(G_OBJECT(toplug));
|
||||
GtkWidget *parent=gtk_widget_get_parent(toplug);
|
||||
gtk_container_remove(GTK_CONTAINER(parent),toplug);
|
||||
gtk_container_add(GTK_CONTAINER(plug),GTK_WIDGET(toplug));
|
||||
} else
|
||||
gtk_container_add(GTK_CONTAINER(plug),GTK_WIDGET(toplug));
|
||||
gtk_widget_show(GTK_WIDGET(plug));
|
||||
gtk_style_context_add_class(gtk_widget_get_style_context(plug),"bkim");
|
||||
gtk_style_context_add_class(gtk_widget_get_style_context(toplug),"bkim");
|
||||
gtk_style_context_add_class(gtk_widget_get_style_context(plug),"primary-toolbar");
|
||||
}
|
||||
if (right_plug_id>0&&RightWidget){
|
||||
GtkWidget *plug=gtk_plug_new(right_plug_id);
|
||||
GtkWidget *toplug=GTK_WIDGET(RightWidget->gobj());
|
||||
{GdkScreen *screen = gtk_widget_get_screen(plug);
|
||||
gtk_widget_set_app_paintable(plug,TRUE);
|
||||
GdkVisual *colormap = gdk_screen_get_rgba_visual(screen);
|
||||
gtk_widget_set_visual(plug, colormap);}
|
||||
{GdkScreen *screen = gtk_widget_get_screen(toplug);
|
||||
gtk_widget_set_app_paintable(toplug,TRUE);
|
||||
GdkVisual *colormap = gdk_screen_get_rgba_visual(screen);
|
||||
gtk_widget_set_visual(toplug, colormap);}
|
||||
if (gtk_widget_get_parent(GTK_WIDGET(toplug))){
|
||||
g_object_ref(G_OBJECT(toplug));
|
||||
GtkWidget *parent=gtk_widget_get_parent(toplug);
|
||||
gtk_container_remove(GTK_CONTAINER(parent),toplug);
|
||||
gtk_container_add(GTK_CONTAINER(plug),GTK_WIDGET(toplug));
|
||||
} else
|
||||
gtk_container_add(GTK_CONTAINER(plug),GTK_WIDGET(toplug));
|
||||
gtk_widget_show(GTK_WIDGET(plug));
|
||||
gtk_style_context_add_class(gtk_widget_get_style_context(plug),"bkim");
|
||||
gtk_style_context_add_class(gtk_widget_get_style_context(toplug),"bkim");
|
||||
gtk_style_context_add_class(gtk_widget_get_style_context(plug),"primary-toolbar");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@ -0,0 +1,20 @@
|
||||
#ifndef __cplusplus
|
||||
#include <gtk/gtk.h>
|
||||
#include <gtk/gtkx.h>
|
||||
|
||||
typedef struct {
|
||||
GtkWidget *plugLeft;
|
||||
GtkWidget *plugRight;
|
||||
|
||||
|
||||
} returnstruct;
|
||||
static returnstruct *ubl_make_plugs(GtkWidget *LeftWidget, GtkWidget *RightWidget, int left_plug_id, int right_plug_id);
|
||||
#else
|
||||
#include <gtkmm.h>
|
||||
#include <gtkmm/stock.h>
|
||||
#include <gtkmm/window.h>
|
||||
#include <gtkmm/plug.h>
|
||||
|
||||
|
||||
static void ubl_make_plugs(Gtk::Widget *LeftWidget, Gtk::Widget *RightWidget, int left_plug_id, int right_plug_id);
|
||||
#endif
|
||||
@ -0,0 +1,169 @@
|
|||||||
#include "util.h"
|
|||||||
|
|||||||
namespace Utils {
|
|||||||
|
|||||||
array<vector<string>, 5> read_csv(const string& filename) {
|
|||||||
array<vector<string>, 5> array_vectors;
|
|||||||
vector<string> vec_option;
|
|||||||
vector<string> vec_opcision;
|
|||||||
ifstream file(filename);
|
|||||||
string line;
|
|||||||
char delimiter = ',';
|
|||||||
getline(file, line);
|
|||||||
while (getline(file, line)) {
|
|||||||
stringstream stream(line);
|
|||||||
string option;
|
|||||||
string opcision;
|
|||||||
getline(stream, option, delimiter);
|
|||||||
string line_local = stream.str();
|
|||||||
if (line_local.find("\"") != string::npos) {
|
|||||||
string str_delimiter = "\"";
|
|||||||
vector<int> point = find_all(line_local, str_delimiter);
|
|||||||
size_t len = point.size();
|
|||||||
if (len >= 2) {
|
|||||||
int index_start = point[len-2];
|
|||||||
int index_end = point[len-1];
|
|||||||
opcision = line_local.substr(index_start, index_end);
|
|||||||
index_end = opcision.find("\"");
|
|||||||
if (opcision.find("\"") != string::npos) {
|
|||||||
opcision.replace(index_end, opcision.length(), "");
|
|||||||
}
|
|||||||
|
|||||||
}
|
|||||||
else {
|
|||||||
opcision = "error";
|
|||||||
}
|
|||||||
|
|||||||
|
|||||||
}
|
|||||||
else{
|
|||||||
getline(stream, opcision, delimiter);
|
|||||||
}
|
|||||||
|
|||||||
|
|||||||
vec_option.push_back(option);
|
|||||||
vec_opcision.push_back(opcision);
|
|||||||
}
|
|||||||
|
|||||||
array_vectors[0] = vec_option;
|
|||||||
array_vectors[1] = vec_opcision;
|
|||||||
return array_vectors;
|
|||||||
}
|
|||||||
|
|||||||
string call(string cmd) {
|
|||||||
FILE *fp;
|
|||||||
int status;
|
|||||||
char path[PATH_MAX] = {0};
|
|||||||
fp = popen(cmd.c_str(), "r");
|
|||||||
if (fp == NULL) {
|
|||||||
exit(1);
|
|||||||
}
|
|||||||
while (fgets(path, PATH_MAX, fp) != NULL) {
|
|||||||
break;
|
|||||||
}
|
|||||||
status = pclose(fp);
|
|||||||
if (status == -1) {
|
|||||||
exit(1);
|
|||||||
}
|
|||||||
return path;
|
|||||||
}
|
|||||||
|
|||||||
vector<int> find_all(string &str_ntp, string substr) {
|
|||||||
size_t index = 0;
|
|||||||
vector<int> sub_index;
|
|||||||
while ((index = str_ntp.find(substr, index)) != std::string::npos) {
|
|||||||
index += substr.length();
|
|||||||
sub_index.push_back(index);
|
|||||||
}
|
|||||||
return sub_index;
|
|||||||
}
|
|||||||
|
|||||||
void str_remove(std::string& source, std::string to_remove) {
|
|||||||
string::size_type n = to_remove.length();
|
|||||||
for (string::size_type i = source.find(to_remove);
|
|||||||
i != string::npos;
|
|||||||
i = source.find(to_remove))
|
|||||||
source.erase(i, n);
|
|||||||
}
|
|||||||
|
|||||||
void str_replace_all(std::string& str_base, string str_find, string sReplacement)
|
|||||||
{
|
|||||||
size_t pos = 0, fpos;
|
|||||||
while ((fpos = str_base.find(str_find, pos)) != std::string::npos)
|
|||||||
{
|
|||||||
str_base.replace(fpos, str_find.size(), sReplacement);
|
|||||||
pos = fpos + sReplacement.size();
|
|||||||
}
|
|||||||
}
|
|||||||
std::vector<std::string> split(std::string text, char delim) {
|
|||||||
std::string line;
|
|||||||
std::vector<std::string> vec;
|
|||||||
std::stringstream ss(text);
|
|||||||
while(std::getline(ss, line, delim)) {
|
|||||||
vec.push_back(line);
|
|||||||
}
|
|||||||
return vec;
|
|||||||
}
|
|||||||
unsigned short read_uid_min_max(string filename, string search) {
|
|||||||
|
|
|||||||
std::string line;
|
|||||||
int uid = 0;
|
|||||||
string remove_tab = "\t";
|
|||||||
string remove_space = " ";
|
|||||||
std::ifstream in(filename); // окрываем файл для чтения
|
|||||||
if (in.is_open()){
|
|||||||
while (getline(in, line)){
|
|||||||
try{
|
|||||||
if (line.find(search) != string::npos && (line.find("SYS_"+search) == string::npos)) {
|
|||||||
str_remove(line, search);
|
|||||||
str_remove(line, remove_space);
|
|||||||
str_remove(line, remove_tab);
|
|||||||
uid = atoi(line.c_str());
|
|||||||
}
|
|||||||
}
|
|||||||
catch (int x) {
|
|||||||
if (search == "UID_MIN"){
|
|||||||
uid = 1000;
|
|||||||
}
|
|||||||
else{
|
|||||||
uid = 65534;
|
|||||||
}
|
|||||||
|
|||||||
}
|
|||||||
|
|||||||
}
|
|||||||
}
|
|||||||
else{
|
|||||||
if (search == "UID_MIN") {
|
|||||||
uid = 1000;
|
|||||||
}
|
|||||||
else{
|
|||||||
uid = 65534;
|
|||||||
}
|
|||||||
}
|
|||||||
in.close();
|
|||||||
return uid;
|
|||||||
|
|||||||
}
|
|||||||
|
|||||||
vector <string> pars_users() {
|
|||||||
|
asmeron
commented 3 years ago
Review
Зачем здесь это ?
Igor1
commented 3 years ago
Review
Убрал. |
|||||||
vector <string> vec_users;
|
|||||||
unsigned short uid_min = read_uid_min_max("/etc/login.defs", "UID_MIN");
|
|||||||
unsigned short uid_max =read_uid_min_max("/etc/login.defs", "UID_MAX");
|
|||||||
while (true) {
|
|||||||
errno = 0;
|
|||||||
passwd* entry = getpwent();
|
|||||||
if (!entry) {
|
|||||||
if (errno) {
|
|||||||
break;
|
|||||||
}
|
|||||||
break;
|
|||||||
}
|
|||||||
if ((entry->pw_uid >= uid_min && entry->pw_uid < uid_max) || entry->pw_uid == 0) {
|
|||||||
vec_users.push_back(string(entry->pw_name));
|
|||||||
}
|
|||||||
}
|
|||||||
endpwent();
|
|||||||
return vec_users;
|
|||||||
}
|
|||||||
|
|||||||
}
|
|||||||
@ -0,0 +1,51 @@
|
||||
#ifndef UTIL_H
|
||||
#define UTIL_H
|
||||
#include <stdio.h>
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
#include <array>
|
||||
#include <vector>
|
||||
#include <linux/limits.h>
|
||||
#include <sys/types.h>
|
||||
#include <pwd.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
#include <iostream>
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <array>
|
||||
#include <vector>
|
||||
#include <fstream>
|
||||
#include <filesystem>
|
||||
#include <stdio.h>
|
||||
#include <map>
|
||||
#include <pwd.h>
|
||||
|
||||
using namespace std;
|
||||
|
||||
namespace Utils {
|
||||
template<typename Type>
|
||||
struct Result{
|
||||
Type response;
|
||||
int error;
|
||||
};
|
||||
|
||||
struct Passwd {
|
||||
string user;
|
||||
int uid;
|
||||
};
|
||||
|
||||
std::array<std::vector<std::string>, 5> read_csv(const std::string& filename);
|
||||
std::string call(std::string cmd);
|
||||
vector<int> find_all(string &str_ntp, string substr);
|
||||
void str_remove(std::string& source, std::string to_remove);
|
||||
void str_replace_all(string &str_base, string str_find, string str_replace);
|
||||
std::vector<std::string> split(std::string text, char delim);
|
||||
unsigned short read_uid_min_max(string filename, string search);
|
||||
vector <string> pars_users();
|
||||
string read_passwd(string username);
|
||||
int synopsis_show(string str_link);
|
||||
}
|
||||
#endif
|
||||
@ -0,0 +1,149 @@
|
||||
.textHead{
|
||||
text-shadow: 2px 2px @theme_bg_color;
|
||||
color: @theme_text_color;
|
||||
}
|
||||
.boxInfoMessError{
|
||||
background-color: #ea9999;
|
||||
}
|
||||
.boxInfoMessOK{
|
||||
background-color: #f3f0ac;
|
||||
}
|
||||
.bannerbackground {
|
||||
background-color: #404040;
|
||||
}
|
||||
.textHead{
|
||||
text-shadow: 1px 1px #ffffff;
|
||||
}
|
||||
.view_app {
|
||||
background-color: @theme_bg_color;
|
||||
}
|
||||
.view_app.view.cell:selected {
|
||||
background-color:@theme_selected_bg_color;
|
||||
color:@theme_selected_text_color;
|
||||
transition: 10ms ease-out;
|
||||
border-radius: 3px;
|
||||
}
|
||||
#GnomeIcon{
|
||||
border-style:solid;
|
||||
border-bottom-width: 1px;
|
||||
border-image: linear-gradient(90deg, alpha(@theme_text_color,0.4) 55%, alpha(@theme_bg_color, 0) 100%);
|
||||
border-image-slice: 1;
|
||||
}
|
||||
|
||||
#SepIcon{
|
||||
background-color: alpha(@theme_text_color, 0.6);
|
||||
}
|
||||
|
||||
#iconlabel {
|
||||
font-size:14px;
|
||||
font-weight: bold;
|
||||
|
||||
}
|
||||
.roundborder * {
|
||||
border-width:0px;
|
||||
border-radius:5px;
|
||||
}
|
||||
.noborder {
|
||||
border: none;
|
||||
}
|
||||
.menu:hover {
|
||||
border-color:alpha(@theme_text_color, 0.01);
|
||||
}
|
||||
.menu {
|
||||
border-color:alpha(@theme_text_color, 0.01);
|
||||
}
|
||||
.menu:hover >* {
|
||||
border-color:alpha(@theme_text_color, 0.01);
|
||||
}
|
||||
.menuitembottom{
|
||||
margin-top:0px;
|
||||
margin-bottom:3px;
|
||||
}
|
||||
.menuitemmiddle{
|
||||
margin-top:0px;
|
||||
margin-bottom:0px;
|
||||
}
|
||||
|
||||
.menuitemtop{
|
||||
margin-bottom:0px;
|
||||
}
|
||||
.menuitemtop *{
|
||||
margin:2px 2px 0 2px;
|
||||
padding: 5px 10px 3px 5px;
|
||||
}
|
||||
.menuitemmiddle *{
|
||||
margin:0 2px 0 2px;
|
||||
padding: 3px 10px 3px 5px;
|
||||
}
|
||||
.menuitembottom *{
|
||||
margin:0 2px 2px 2px;
|
||||
padding: 3px 10px 5px 5px;
|
||||
}
|
||||
.menuitemtop:hover {
|
||||
background:@theme_bg_color;
|
||||
border-color:inherit;
|
||||
border-left-width:inherit;
|
||||
border-right-width:inherit;
|
||||
}
|
||||
.menuitemmiddle:hover {
|
||||
background:@theme_bg_color;
|
||||
border-color:inherit;
|
||||
border-left-width:inherit;
|
||||
border-right-width:inherit;
|
||||
}
|
||||
.menuitembottom:hover {
|
||||
background:@theme_bg_color;
|
||||
border-color:inherit;
|
||||
border-left-width:inherit;
|
||||
border-right-width:inherit;
|
||||
|
||||
}
|
||||
.menuitemtop:hover* {
|
||||
margin:2px 2px 0 2px;
|
||||
padding: 5px 10px 3px 5px;
|
||||
background:@theme_selected_bg_color;
|
||||
border-radius:2px;
|
||||
}
|
||||
.menuitemmiddle:hover* {
|
||||
margin:0 2px 0 2px;
|
||||
padding: 3px 10px 3px 5px;
|
||||
background:@theme_selected_bg_color;
|
||||
border-radius:2px;
|
||||
}
|
||||
.menuitembottom:hover* {
|
||||
margin:0 2px 2px 2px;
|
||||
padding: 3px 10px 5px 5px;
|
||||
background:@theme_selected_bg_color;
|
||||
border-radius:2px;
|
||||
}
|
||||
|
||||
.workingbg, #workingbg {
|
||||
background-color:@theme_base_color;
|
||||
}
|
||||
.workingbg.view.cell:selected {
|
||||
background-color:@theme_selected_bg_color;
|
||||
}
|
||||
.workingbg.view.cell:hover {
|
||||
background-color:darker(@theme_selected_bg_color);
|
||||
color:@theme_selected_text_color;
|
||||
border-radius:3px;
|
||||
}
|
||||
.bkim {
|
||||
transition: 200ms ease-out;
|
||||
background-image: none;
|
||||
}
|
||||
.noborder{
|
||||
border:none;
|
||||
}
|
||||
|
||||
.bkim{
|
||||
opacity:0.99;
|
||||
border:none;
|
||||
}
|
||||
|
||||
.bkim_no_plug{
|
||||
background-color: transparent;
|
||||
opacity:0.99;
|
||||
}
|
||||
|
||||
|
||||
@ -0,0 +1,15 @@
|
|||||||
[Desktop Entry]
|
|||||||
Encoding=UTF-8
|
|||||||
Name=ubl-settings-bootloader
|
|||||||
Name[ru]=Настройка загрузчика
|
|||||||
|
user-166
commented 3 years ago
Review
Igor1
commented 3 years ago
Review
Исправил. |
|||||||
GenericName=Настройка загрузчика
|
|||||||
|
user-166
commented 3 years ago
Review
Сменить на "Настройка загрузки системы"
Igor1
commented 3 years ago
Review
Исправил. |
|||||||
GenericName[ru]=Настройка загрузчика
|
|||||||
Comment=Bootloader setup application
|
|||||||
Comment[ru]=Приложение для настройки загрузчика
|
|||||||
|
user-166
commented 3 years ago
Review
Сменить на "Приложение для настройки параметров загрузки системы"
Igor1
commented 3 years ago
Review
Исправил. |
|||||||
Type=Application
|
|||||||
Exec=pkexec ubl-settings-bootloader
|
|||||||
Icon=com.ublinux.ubl-settings-bootloader
|
|||||||
Terminal=false
|
|||||||
X-XfcePluggable=true
|
|||||||
X-UBLPluggable=true
|
|||||||
Categories=XFCE;GTK;Settings;DesktopSettings;X-UBL-SettingsManager;X-UBL-SystemSettings;
|
|||||||
@ -0,0 +1,561 @@
|
|||||||
# Russian translations for ubl-settings-bootloader package.
|
|||||||
# Copyright (C) 2022, UBTech LLC
|
|||||||
# This file is distributed under the same license as the ubl-settings-bootloader package.
|
|||||||
# UBLinux Team <info@ublinux.com>, 2022
|
|||||||
#
|
|||||||
#, fuzzy
|
|||||||
msgid ""
|
|||||||
msgstr ""
|
|||||||
"Project-Id-Version: ubl-settings-bootloader 1.0\n"
|
|||||||
"Report-Msgid-Bugs-To: info@ublinux.com\n"
|
|||||||
"POT-Creation-Date: 2023-04-25 15:27+0600\n"
|
|||||||
"PO-Revision-Date: 2020-02-22 23:28+0600\n"
|
|||||||
"Last-Translator: ublinux <info@ublinux.ru>\n"
|
|||||||
"Language-Team: Russian - UBLinux Team <info@ublinux.ru>\n"
|
|||||||
"Language: Russian\n"
|
|||||||
"MIME-Version: 1.0\n"
|
|||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
|||||||
"Content-Transfer-Encoding: 8bit\n"
|
|||||||
|
|||||||
#: source/ubl-settings-bootloader.h:53 source/ubl-settings-bootloader.h:52
|
|||||||
#: source/ubl-settings-bootloader.cc:431 source/ubl-settings-bootloader.cc:301
|
|||||||
msgid "About"
|
|||||||
msgstr "О программе"
|
|||||||
|
|||||||
#: source/ubl-settings-bootloader.h:44 source/ubl-settings-bootloader.h:43
|
|||||||
msgid "About ubl-settings-bootloader"
|
|||||||
msgstr "О программе Загрузка системы"
|
|||||||
|
user-166
commented 3 years ago
Review
"Загрузка системы" сменить на "Настройка загрузки системы"
Igor1
commented 3 years ago
Review
Исправил. |
|||||||
|
|||||||
#: source/ubl-settings-bootloader.h:92 source/ubl-settings-bootloader.h:91
|
|||||||
#: source/ubl-settings-bootloader.cc:337 source/ubl-settings-bootloader.cc:199
|
|||||||
msgid "Active"
|
|||||||
msgstr "Активно"
|
|||||||
|
|||||||
#: source/ubl-settings-bootloader.h:63 source/ubl-settings-bootloader.h:62
|
|||||||
msgid "Always redirect"
|
|||||||
msgstr "Всегда перенаправлять"
|
|||||||
|
|||||||
#: source/ubl-settings-bootloader.h:96 source/ubl-settings-bootloader.h:95
|
|||||||
msgid "Argument not recognized\n"
|
|||||||
msgstr ""
|
|||||||
|
|||||||
#: source/ubl-settings-bootloader.h:66 source/ubl-settings-bootloader.h:65
|
|||||||
msgid "Boot menu user name:"
|
|||||||
msgstr "Имя пользователя меню загрузки:"
|
|||||||
|
|||||||
#: source/ubl-settings-bootloader.h:67 source/ubl-settings-bootloader.h:66
|
|||||||
msgid "Boot menu user password:"
|
|||||||
msgstr "Пароль пользователя меню загрузки:"
|
|||||||
|
|||||||
#: source/ubl-settings-bootloader.h:64 source/ubl-settings-bootloader.h:63
|
|||||||
msgid "Boot screen display mode:"
|
|||||||
msgstr "Режим отображения экрана загрузки:"
|
|||||||
|
|||||||
#: source/ubl-settings-bootloader.h:51 source/ubl-settings-bootloader.h:50
|
|||||||
msgid "Boot selection menu timer"
|
|||||||
msgstr "Таймер меню выбора варианта загрузки"
|
|||||||
|
|||||||
#: source/ubl-settings-bootloader.h:62 source/ubl-settings-bootloader.h:61
|
|||||||
msgid "Cancel"
|
|||||||
msgstr "Отменить"
|
|||||||
|
|||||||
#: source/ubl-settings-bootloader.h:45 source/ubl-settings-bootloader.h:44
|
|||||||
#: source/ubl-settings-bootloader.cc:421 source/ubl-settings-bootloader.cc:422
|
|||||||
#: source/ubl-settings-bootloader.cc:423 source/ubl-settings-bootloader.cc:289
|
|||||||
#: source/ubl-settings-bootloader.cc:290 source/ubl-settings-bootloader.cc:291
|
|||||||
msgid "Command line parameters:"
|
|||||||
msgstr "Параметры командной строки:"
|
|||||||
|
|||||||
#: source/ubl-settings-bootloader.h:42 source/ubl-settings-bootloader.h:41
|
|||||||
#: source/ubl-settings-bootloader.cc:417 source/ubl-settings-bootloader.cc:285
|
|||||||
msgid "Configuring system boot parameters"
|
|||||||
msgstr "Настройка параметров загрузки системы"
|
|||||||
|
|||||||
msgid "Configuring the boot loader settings"
|
|||||||
msgstr "Настройка параметров загрузчика системы"
|
|||||||
|
|||||||
#: source/ubl-settings-bootloader.h:38 source/ubl-settings-bootloader.h:37
|
|||||||
#: source/ubl-settings-bootloader.cc:411 source/ubl-settings-bootloader.cc:279
|
|||||||
msgid "Copyright © UBSoft LLC, 2022 - "
|
|||||||
msgstr ""
|
|||||||
|
|||||||
#: source/ubl-settings-bootloader.cc:292
|
|||||||
#, fuzzy
|
|||||||
msgid "Default download"
|
|||||||
msgstr "По умолчанию"
|
|||||||
|
|||||||
#: source/ubl-settings-bootloader.h:94 source/ubl-settings-bootloader.h:93
|
|||||||
#: source/ubl-settings-bootloader.cc:339 source/ubl-settings-bootloader.cc:201
|
|||||||
msgid "Description"
|
|||||||
msgstr "Описание"
|
|||||||
|
|||||||
msgid "Disable ACPI"
|
|||||||
msgstr "Отключить ACPI"
|
|||||||
|
|||||||
msgid "Disable APIC"
|
|||||||
msgstr "Отключить APIC"
|
|||||||
|
|||||||
msgid "Disable GPU power management"
|
|||||||
msgstr "Отключить управление питанием графического процессора"
|
|||||||
|
|||||||
msgid "Disable Plymouth"
|
|||||||
msgstr "Отключить Plymouth"
|
|||||||
|
|||||||
msgid "Disable kernel selection and loading of video drivers"
|
|||||||
msgstr "Отключить выбор и загрузку ядром драйверов видео"
|
|||||||
|
|||||||
msgid "Disable local APIC"
|
|||||||
msgstr "Отключить локальный APIC"
|
|||||||
|
|||||||
#: source/ubl-settings-bootloader.h:48 source/ubl-settings-bootloader.h:47
|
|||||||
#: source/ubl-settings-bootloader.cc:426 source/ubl-settings-bootloader.cc:294
|
|||||||
msgid "Download menu"
|
|||||||
msgstr "Меню загрузки"
|
|||||||
|
|||||||
msgid "Downloading without text messages"
|
|||||||
msgstr "Загрузка без текстовых сообщений"
|
|||||||
|
|||||||
msgid "Eliminates flickering laptop display on Ultra Voltage processors"
|
|||||||
msgstr "Устраняет мерцание дисплея ноутбука на процессорах Ultra Voltage"
|
|||||||
|
|||||||
#: source/ubl-settings-bootloader.h:78 source/ubl-settings-bootloader.h:77
|
|||||||
#: source/ubl-settings-bootloader.cc:496
|
|||||||
msgid "Enter login"
|
|||||||
msgstr "Введите логин"
|
|||||||
|
|||||||
#: source/ubl-settings-bootloader.h:77 source/ubl-settings-bootloader.h:76
|
|||||||
#: source/ubl-settings-bootloader.cc:476
|
|||||||
msgid "Enter your password"
|
|||||||
msgstr "Введите пароль"
|
|||||||
|
|||||||
#: source/ubl-settings-bootloader.h:84 source/ubl-settings-bootloader.h:83
|
|||||||
#: source/ubl-settings-bootloader.cc:897 source/ubl-settings-bootloader.cc:443
|
|||||||
#, fuzzy
|
|||||||
msgid "Error saved local and global configuration"
|
|||||||
msgstr "Успешно записаны локальная и глобальная конфигурация"
|
|||||||
|
|||||||
msgid "Forced selection of an Intel sound device driver"
|
|||||||
msgstr "Принудительный выбор драйвера звукового устройства от Intel"
|
|||||||
|
|||||||
msgid ""
|
|||||||
"GTK settings bootloader for UBLinux\n"
|
|||||||
"\n"
|
|||||||
"Usage: ubl-settings-bootloader [OPTIONS...]\n"
|
|||||||
"Options:\n"
|
|||||||
" -h, --help\t Show this help\n"
|
|||||||
" -V, --version\t Show package version\n"
|
|||||||
msgstr ""
|
|||||||
|
|||||||
#: source/ubl-settings-bootloader.h:95 source/ubl-settings-bootloader.h:94
|
|||||||
msgid ""
|
|||||||
"GTK settings bootloader for UBLinux\n"
|
|||||||
"\n"
|
|||||||
"Usage: ubl-settings-bootloader [OPTIONS...]\n"
|
|||||||
"Options:\n"
|
|||||||
" -h, --help\t Show this help\n"
|
|||||||
" -V, --version\t Show package version\n"
|
|||||||
" --lock-help Lock utility help\n"
|
|||||||
" --lock-save Lock saving local and global configuration\n"
|
|||||||
" --lock-save-local Lock save global configuration\n"
|
|||||||
" --lock-save-global Lock load global configuration\n"
|
|||||||
" --lock-load-global Lock load global configuration\n"
|
|||||||
msgstr ""
|
|||||||
"GTK-утилита настройки загрузчика для UBLinux\n"
|
|||||||
"\n"
|
|||||||
"Использование: ubl-settings-bootloader [Параметры приложения...]\n"
|
|||||||
"Параметры приложения:\n"
|
|||||||
" -h, --help\t Показать параметры справки\n"
|
|||||||
" -V, --version\t Показать версию пакета\n"
|
|||||||
" --lock-help Блокировка вызова справки\n"
|
|||||||
" --lock-save Блокировка сохранения локальной и глобальной "
|
|||||||
"конфигурации\n"
|
|||||||
" --lock-save-local Блокировка сохранения локальной конфигурации\n"
|
|||||||
" --lock-save-global Блокировка сохранения глобальной конфигурации\n"
|
|||||||
" --lock-load-global Блокировка загрузки глобальной конфигурации\n"
|
|||||||
|
|||||||
#: source/ubl-settings-bootloader.h:86 source/ubl-settings-bootloader.h:85
|
|||||||
#: source/ubl-settings-bootloader.cc:911 source/ubl-settings-bootloader.cc:455
|
|||||||
msgid "Global configuration downloaded successfully"
|
|||||||
msgstr "Успешно загружена глобальная конфигурация"
|
|||||||
|
|||||||
#: source/ubl-settings-bootloader.h:81 source/ubl-settings-bootloader.h:80
|
|||||||
#: source/ubl-settings-bootloader.cc:885 source/ubl-settings-bootloader.cc:431
|
|||||||
msgid "Global configuration read error"
|
|||||||
msgstr "Ошибка чтения глобальной конфигурации"
|
|||||||
|
|||||||
#: source/ubl-settings-bootloader.h:88 source/ubl-settings-bootloader.h:87
|
|||||||
#: source/ubl-settings-bootloader.cc:917 source/ubl-settings-bootloader.cc:461
|
|||||||
msgid "Global configuration successfully written"
|
|||||||
msgstr "Успешно записана глобальная конфигурация"
|
|||||||
|
|||||||
#: source/ubl-settings-bootloader.h:83 source/ubl-settings-bootloader.h:82
|
|||||||
#: source/ubl-settings-bootloader.cc:893 source/ubl-settings-bootloader.cc:439
|
|||||||
msgid "Global configuration write error"
|
|||||||
msgstr "Ошибка записи глобальной конфигурации"
|
|||||||
|
|||||||
#: source/ubl-settings-bootloader.h:52 source/ubl-settings-bootloader.h:51
|
|||||||
#: source/ubl-settings-bootloader.cc:430 source/ubl-settings-bootloader.cc:300
|
|||||||
msgid "Help"
|
|||||||
msgstr "Справка"
|
|||||||
|
|||||||
#: source/ubl-settings-bootloader.cc:295
|
|||||||
#, fuzzy
|
|||||||
msgid "Input terminal"
|
|||||||
msgstr "Терминал для вывода"
|
|||||||
|
|||||||
#: source/ubl-settings-bootloader.h:75 source/ubl-settings-bootloader.h:74
|
|||||||
#: source/ubl-settings-bootloader.cc:451
|
|||||||
msgid "Lack of loading animation with the output of the abbreviated log"
|
|||||||
msgstr "Отсутствие анимации загрузки с выводом сокращенного журнала"
|
|||||||
|
|||||||
#, fuzzy
|
|||||||
msgid "Last Successful Download"
|
|||||||
msgstr "Последняя удачная загрузка"
|
|||||||
|
|||||||
#: source/ubl-settings-bootloader.h:68 source/ubl-settings-bootloader.h:67
|
|||||||
#: source/ubl-settings-bootloader.cc:452
|
|||||||
msgid "Last successful upload"
|
|||||||
msgstr "Последняя удачная загрузка"
|
|||||||
|
|||||||
#: source/ubl-settings-bootloader.h:55 source/ubl-settings-bootloader.h:54
|
|||||||
#: source/ubl-settings-bootloader.cc:438 source/ubl-settings-bootloader.cc:308
|
|||||||
msgid "Load"
|
|||||||
msgstr "Загрузить"
|
|||||||
|
|||||||
#: source/ubl-settings-bootloader.h:46 source/ubl-settings-bootloader.h:45
|
|||||||
#: source/ubl-settings-bootloader.cc:424
|
|||||||
msgid "Load default:"
|
|||||||
msgstr "Загрузка по умолчанию:"
|
|||||||
|
|||||||
#: source/ubl-settings-bootloader.h:59 source/ubl-settings-bootloader.h:58
|
|||||||
#: source/ubl-settings-bootloader.cc:435 source/ubl-settings-bootloader.cc:305
|
|||||||
msgid "Load global configuration"
|
|||||||
msgstr "Загрузить глобальную конфигурацию"
|
|||||||
|
|||||||
#: source/ubl-settings-bootloader.h:60 source/ubl-settings-bootloader.h:59
|
|||||||
#: source/ubl-settings-bootloader.cc:436 source/ubl-settings-bootloader.cc:306
|
|||||||
msgid "Load local configuration"
|
|||||||
msgstr "Загрузить локальную конфигурацию"
|
|||||||
|
|||||||
#: source/ubl-settings-bootloader.cc:442
|
|||||||
#, fuzzy
|
|||||||
msgid "Load menu user name:"
|
|||||||
msgstr "Имя пользователя меню загрузки:"
|
|||||||
|
|||||||
#: source/ubl-settings-bootloader.cc:443
|
|||||||
#, fuzzy
|
|||||||
msgid "Load menu user password:"
|
|||||||
msgstr "Пароль пользователя меню загрузки:"
|
|||||||
|
|||||||
#: source/ubl-settings-bootloader.cc:429 source/ubl-settings-bootloader.cc:298
|
|||||||
msgid "Load option timer"
|
|||||||
msgstr ""
|
|||||||
|
|||||||
#: source/ubl-settings-bootloader.cc:441
|
|||||||
#, fuzzy
|
|||||||
msgid "Load screen display mode:"
|
|||||||
msgstr "Режим отображения экрана загрузки:"
|
|||||||
|
|||||||
#: source/ubl-settings-bootloader.h:73 source/ubl-settings-bootloader.h:72
|
|||||||
#: source/ubl-settings-bootloader.cc:448
|
|||||||
msgid "Loading animation with the magazine"
|
|||||||
msgstr "Анимация загрузки с журналом"
|
|||||||
|
|||||||
#: source/ubl-settings-bootloader.h:74 source/ubl-settings-bootloader.h:73
|
|||||||
#: source/ubl-settings-bootloader.cc:449
|
|||||||
msgid "Loading animation without a magazine"
|
|||||||
msgstr "Анимация загрузки без журнала"
|
|||||||
|
|||||||
#: source/ubl-settings-bootloader.h:85 source/ubl-settings-bootloader.h:84
|
|||||||
#: source/ubl-settings-bootloader.cc:908 source/ubl-settings-bootloader.cc:452
|
|||||||
msgid "Local configuration downloaded successfully"
|
|||||||
msgstr "Успешно загружена локальная конфигурация"
|
|||||||
|
|||||||
#: source/ubl-settings-bootloader.h:80 source/ubl-settings-bootloader.h:79
|
|||||||
#: source/ubl-settings-bootloader.cc:881 source/ubl-settings-bootloader.cc:427
|
|||||||
msgid "Local configuration reading error"
|
|||||||
msgstr "Ошибка чтения локальной конфигурации"
|
|||||||
|
|||||||
#: source/ubl-settings-bootloader.h:87 source/ubl-settings-bootloader.h:86
|
|||||||
#: source/ubl-settings-bootloader.cc:914 source/ubl-settings-bootloader.cc:458
|
|||||||
msgid "Local configuration successfully written"
|
|||||||
msgstr "Успешно записана локальная конфигурация"
|
|||||||
|
|||||||
#: source/ubl-settings-bootloader.h:82 source/ubl-settings-bootloader.h:81
|
|||||||
#: source/ubl-settings-bootloader.cc:889 source/ubl-settings-bootloader.cc:435
|
|||||||
msgid "Local configuration write error"
|
|||||||
msgstr "Ошибка записи локальной конфигурации"
|
|||||||
|
|||||||
#: source/ubl-settings-bootloader.cc:445 source/ubl-settings-bootloader.cc:447
|
|||||||
msgid "Manually"
|
|||||||
msgstr "Вручную"
|
|||||||
|
|||||||
msgid "Maximum performance, power management"
|
|||||||
msgstr "Максимальная производительность, управление питанием"
|
|||||||
|
|||||||
#: source/ubl-settings-bootloader.h:65 source/ubl-settings-bootloader.h:64
|
|||||||
msgid "No loading animation, full log"
|
|||||||
msgstr "Отсутствие анимации загрузки с выводом журнала"
|
|||||||
|
|||||||
#: source/ubl-settings-bootloader.cc:444 source/ubl-settings-bootloader.cc:446
|
|||||||
msgid "Not available"
|
|||||||
msgstr "Отсутствует"
|
|||||||
|
|||||||
#: source/ubl-settings-bootloader.h:90 source/ubl-settings-bootloader.h:89
|
|||||||
#: source/ubl-settings-bootloader.cc:923 source/ubl-settings-bootloader.cc:341
|
|||||||
#: source/ubl-settings-bootloader.cc:354 source/ubl-settings-bootloader.cc:367
|
|||||||
msgid "Nothing to save!"
|
|||||||
msgstr "Нечего сохранять!"
|
|||||||
|
|||||||
msgid "Open Firmware Console"
|
|||||||
msgstr "Консоль Open Firmware"
|
|||||||
|
|||||||
#: source/ubl-settings-bootloader.h:93 source/ubl-settings-bootloader.h:92
|
|||||||
#: source/ubl-settings-bootloader.cc:338 source/ubl-settings-bootloader.cc:200
|
|||||||
msgid "Option"
|
|||||||
msgstr "Опция"
|
|||||||
|
|||||||
msgid "Output in graphical mode"
|
|||||||
msgstr "Вывод в графическом режиме"
|
|||||||
|
|||||||
#: source/ubl-settings-bootloader.cc:296
|
|||||||
msgid "Output terminal"
|
|||||||
msgstr "Терминал для вывода"
|
|||||||
|
|||||||
msgid "PC AT Keyboard (Coreboot)"
|
|||||||
msgstr "Клавиатура PC AT (Coreboot)"
|
|||||||
|
|||||||
msgid "PC BIOS & EFI console"
|
|||||||
msgstr "PC BIOS & консоль EFI"
|
|||||||
|
|||||||
msgid "Parameters passed to the kernel"
|
|||||||
msgstr "Параметры, передаваемые ядру"
|
|||||||
|
|||||||
msgid "Prevents the processor from going into a deep sleep state"
|
|||||||
msgstr "Предотвращает переход процессора в состояние глубокого сна"
|
|||||||
|
|||||||
#: source/ubl-settings-bootloader.h:41 source/ubl-settings-bootloader.h:40
|
|||||||
#: source/ubl-settings-bootloader.cc:416 source/ubl-settings-bootloader.cc:420
|
|||||||
#: source/ubl-settings-bootloader.cc:284 source/ubl-settings-bootloader.cc:288
|
|||||||
msgid "Project Home Page"
|
|||||||
msgstr "Домашняя страница проекта"
|
|||||||
|
|||||||
#: source/ubl-settings-bootloader.h:61 source/ubl-settings-bootloader.h:60
|
|||||||
msgid "Read online"
|
|||||||
msgstr "Прочитать онлайн"
|
|||||||
|
|||||||
#: source/ubl-settings-bootloader.h:54 source/ubl-settings-bootloader.h:53
|
|||||||
#: source/ubl-settings-bootloader.cc:437 source/ubl-settings-bootloader.cc:307
|
|||||||
msgid "Save"
|
|||||||
msgstr "Сохранить"
|
|||||||
|
|||||||
#: source/ubl-settings-bootloader.h:58 source/ubl-settings-bootloader.h:57
|
|||||||
#: source/ubl-settings-bootloader.cc:434 source/ubl-settings-bootloader.cc:304
|
|||||||
msgid "Save in global configuration"
|
|||||||
msgstr "Сохранить в глобальную конфигурацию"
|
|||||||
|
|||||||
#: source/ubl-settings-bootloader.h:57 source/ubl-settings-bootloader.h:56
|
|||||||
#: source/ubl-settings-bootloader.cc:433 source/ubl-settings-bootloader.cc:303
|
|||||||
msgid "Save in local configuration"
|
|||||||
msgstr "Сохранить в локальную конфигурацию"
|
|||||||
|
|||||||
#: source/ubl-settings-bootloader.h:56 source/ubl-settings-bootloader.h:55
|
|||||||
#: source/ubl-settings-bootloader.cc:432 source/ubl-settings-bootloader.cc:302
|
|||||||
msgid "Save in global and local configuration"
|
|||||||
msgstr "Сохранить в глобальную и локальную конфигурацию"
|
|||||||
|
|||||||
#: source/ubl-settings-bootloader.cc:293
|
|||||||
#, fuzzy
|
|||||||
msgid "Seconds"
|
|||||||
msgstr "секунд"
|
|||||||
|
|||||||
msgid "Serial terminal"
|
|||||||
msgstr "Последовательный терминал"
|
|||||||
|
|||||||
#: source/ubl-settings-bootloader.cc:287
|
|||||||
msgid "Setting bootloader"
|
|||||||
msgstr "Настройка загрузчика"
|
|||||||
|
|||||||
msgid "Show welcome window"
|
|||||||
msgstr "Показывать окно приветствия"
|
|||||||
|
|||||||
msgid "Single User Mode"
|
|||||||
msgstr "Режим одного пользователя"
|
|||||||
|
|||||||
#: source/ubl-settings-bootloader.h:89 source/ubl-settings-bootloader.h:88
|
|||||||
#: source/ubl-settings-bootloader.cc:920 source/ubl-settings-bootloader.cc:464
|
|||||||
msgid "Successfully saved local and global configuration"
|
|||||||
msgstr "Успешно записаны локальная и глобальная конфигурация"
|
|||||||
|
|||||||
#: source/ubl-settings-bootloader.h:43 source/ubl-settings-bootloader.h:42
|
|||||||
#: source/ubl-settings-bootloader.cc:419
|
|||||||
msgid "System boot"
|
|||||||
|
user-166
commented 3 years ago
Review
"System boot" заменить на "System boot setup"
Igor1
commented 3 years ago
Review
Исправил. |
|||||||
msgstr "Загрузка системы"
|
|||||||
|
user-166
commented 3 years ago
Review
"Загрузка системы" сменить на "Настройка загрузки системы"
Igor1
commented 3 years ago
Review
Исправил. |
|||||||
|
|||||||
#: source/ubl-settings-bootloader.h:49 source/ubl-settings-bootloader.h:48
|
|||||||
#: source/ubl-settings-bootloader.cc:427
|
|||||||
#, fuzzy
|
|||||||
msgid "Terminal for input"
|
|||||||
msgstr "Терминал для ввода"
|
|||||||
|
|||||||
#: source/ubl-settings-bootloader.h:50 source/ubl-settings-bootloader.h:49
|
|||||||
#: source/ubl-settings-bootloader.cc:428
|
|||||||
#, fuzzy
|
|||||||
msgid "Terminal for output"
|
|||||||
msgstr "Терминал для вывода"
|
|||||||
|
|||||||
#: source/ubl-settings-bootloader.cc:299
|
|||||||
msgid "The last selection will become the default boot choice"
|
|||||||
msgstr "Последний выбор станет выбором загрузки по умолчанию"
|
|||||||
|
|||||||
#: source/ubl-settings-bootloader.h:91 source/ubl-settings-bootloader.h:90
|
|||||||
#: source/ubl-settings-bootloader.cc:107 source/ubl-settings-bootloader.cc:94
|
|||||||
msgid "The program must be run as root"
|
|||||||
msgstr "Программа должна быть запущена с правами суперпользователя!"
|
|||||||
|
|||||||
msgid "UBConfig - Loading"
|
|||||||
msgstr "UBConfig - Загрузка"
|
|||||||
|
|||||||
msgid "USB Keyboard (HID Boot protocol)"
|
|||||||
msgstr "Клавиатура USB Keyboard (протокол HID Boot)"
|
|||||||
|
|||||||
#: source/ubl-settings-bootloader.h:71 source/ubl-settings-bootloader.h:70
|
|||||||
#: source/ubl-settings-bootloader.cc:440
|
|||||||
msgid "User name to enter boot configuration editing mode"
|
|||||||
msgstr ""
|
|||||||
"Имя пользователя для входа в режим редактирования конфигурации загрузки"
|
|||||||
|
|||||||
#: source/ubl-settings-bootloader.h:72 source/ubl-settings-bootloader.h:71
|
|||||||
msgid "User password to enter boot configuration edit mode"
|
|||||||
msgstr ""
|
|||||||
"Пароль пользователя для входа в режим редактирования конфигурации загрузки"
|
|||||||
|
|||||||
msgid "VGA text output (Coreboot)"
|
|||||||
msgstr "Текстовый вывод VGA (Coreboot)"
|
|||||||
|
|||||||
#: source/ubl-settings-bootloader.h:69 source/ubl-settings-bootloader.h:68
|
|||||||
msgid "Would you like to read documentation in the Web?"
|
|||||||
msgstr "Вы хотите прочитать справку в Сети?"
|
|||||||
|
|||||||
#: source/ubl-settings-bootloader.h:70 source/ubl-settings-bootloader.h:69
|
|||||||
msgid ""
|
|||||||
"You will be redirected to documentation site, where user help pages are "
|
|||||||
"translated and supported by community."
|
|||||||
msgstr ""
|
|||||||
"Вы будете перенаправлены на сайт с документацией где страницы помощи "
|
|||||||
"переводятся и поддерживаются сообществом."
|
|||||||
|
|||||||
msgid "acpi=off (Disable ACPI)"
|
|||||||
msgstr "acpi=off (Отключить ACPI)"
|
|||||||
|
|||||||
msgid "ahci.mobile_jpm_policy=1 (Maximum performance, power management)"
|
|||||||
msgstr ""
|
|||||||
"ahci.mobile_jpm_policy=1 (Максимальная производительность, управление "
|
|||||||
"питанием)"
|
|||||||
|
|||||||
msgid "apic (Disable APIC)"
|
|||||||
msgstr "apic (Отключить APIC)"
|
|||||||
|
|||||||
msgid "at_keyboard (Keyboard PC AT (Coreboot))"
|
|||||||
msgstr "at_keyboard (Клавиатура PC AT (Coreboot))"
|
|||||||
|
|||||||
msgid "console (PC BIOS & console EFI)"
|
|||||||
msgstr "Консоль (PC BIOS & console EFI)"
|
|||||||
|
|||||||
msgid "gfxterm (Output in graphical mode)"
|
|||||||
msgstr "gfxterm (Вывод в графическом режиме)"
|
|||||||
|
|||||||
#: source/ubl-settings-bootloader.h:40 source/ubl-settings-bootloader.h:76
|
|||||||
#: source/ubl-settings-bootloader.h:39 source/ubl-settings-bootloader.h:75
|
|||||||
#: source/ubl-settings-bootloader.cc:414 source/ubl-settings-bootloader.cc:282
|
|||||||
msgid "https://wiki.ublinux.com"
|
|||||||
msgstr ""
|
|||||||
|
|||||||
#: source/ubl-settings-bootloader.cc:860 source/ubl-settings-bootloader.cc:400
|
|||||||
#, fuzzy
|
|||||||
msgid ""
|
|||||||
"https://wiki.ublinux.com/ru/Программное_обеспечение/Программы_и_утилиты/Все/"
|
|||||||
msgstr ""
|
|||||||
"https://wiki.ublinux.ru/ru/Программное_обеспечение/Программы_и_утилиты/Все/"
|
|||||||
"ubl-settings-bootloader"
|
|||||||
|
|||||||
msgid "i915.enable_dc=0 (Disable GPU power management)"
|
|||||||
msgstr "i915.enable_dc=0 (Отключите управление питанием GPU)"
|
|||||||
|
|||||||
msgid ""
|
|||||||
"intel_idle max_cstate=1 (Prevents the processor from going into a deep sleep "
|
|||||||
"state)"
|
|||||||
msgstr ""
|
|||||||
"intel_idle max_cstate=1 (Предотвращает переход процессора в состояние "
|
|||||||
"глубокого сна)"
|
|||||||
|
|||||||
msgid ""
|
|||||||
"intel_idle.max_cstate=4 (Eliminates flickering laptop display on processors "
|
|||||||
"Ultra Voltage)"
|
|||||||
msgstr ""
|
|||||||
"intel_idle.max_cstate=4 (Устраняет мерцание дисплея ноутбука на процессорах "
|
|||||||
"Ultra Voltage)"
|
|||||||
|
|||||||
msgid "no plymouth (Disable Plymouth)"
|
|||||||
msgstr "no plymouth (Отключить Plymouth"
|
|||||||
|
|||||||
msgid "nolapic (Disable local APIC)"
|
|||||||
msgstr "nolapic (Отключить локальный APIC)"
|
|||||||
|
|||||||
msgid "nomodeset (Disable kernel selection and loading of video drivers)"
|
|||||||
msgstr "nomodeset (Отключите выбор ядра и загрузку видеодрайверов)"
|
|||||||
|
|||||||
msgid "ofconsole (Console Open Firmware)"
|
|||||||
msgstr "ofconsole (Консоль Open Firmware)"
|
|||||||
|
|||||||
msgid "quiet (Downloading without text messages)"
|
|||||||
msgstr "quiet (Загрузка без текстовых сообщений)"
|
|||||||
|
|||||||
#: source/ubl-settings-bootloader.h:47 source/ubl-settings-bootloader.h:46
|
|||||||
#: source/ubl-settings-bootloader.cc:425
|
|||||||
msgid "seconds"
|
|||||||
msgstr "секунд"
|
|||||||
|
|||||||
msgid "serial (Serial terminal)"
|
|||||||
msgstr "serial (Последовательный терминал)"
|
|||||||
|
|||||||
msgid "single (Single User Mode)"
|
|||||||
msgstr "single (Однопользовательский режим)"
|
|||||||
|
|||||||
msgid ""
|
|||||||
"snd-intel-dspcfg.dsp_driver=1 (Forced selection of a sound device driver "
|
|||||||
"from Intel)"
|
|||||||
msgstr ""
|
|||||||
"snd-intel-dspcfg.dsp_driver=1 (Принудительный выбор драйвера звукового "
|
|||||||
"устройства от Intel)"
|
|||||||
|
|||||||
msgid "splash (Show welcome window)"
|
|||||||
msgstr "splash (Показать окно приветствия)"
|
|||||||
|
|||||||
#: source/ubl-settings-bootloader.h:39 source/ubl-settings-bootloader.h:38
|
|||||||
#: source/ubl-settings-bootloader.cc:413 source/ubl-settings-bootloader.cc:418
|
|||||||
#: source/ubl-settings-bootloader.cc:439 source/ubl-settings-bootloader.cc:281
|
|||||||
#: source/ubl-settings-bootloader.cc:286 source/ubl-settings-bootloader.cc:309
|
|||||||
msgid "ubl-settings-bootloader"
|
|||||||
msgstr "Загрузка системы"
|
|||||||
|
user-166
commented 3 years ago
Review
"Загрузка системы" сменить на "Настройка загрузки системы"
Igor1
commented 3 years ago
Review
Исправил. |
|||||||
|
|||||||
#: source/ubl-settings-bootloader.h:79 source/ubl-settings-bootloader.h:78
|
|||||||
#: source/ubl-settings-bootloader.cc:947 source/ubl-settings-bootloader.cc:547
|
|||||||
msgid "ubl-settings-bootloader version: "
|
|||||||
msgstr "ubl-settings-bootloader версия: "
|
|||||||
|
|||||||
msgid "usb_keyboard (Keyboard USB Keyboard (protocol HID Boot))"
|
|||||||
msgstr "usb_keyboard (Клавиатура USB Keyboard (protocol HID Boot))"
|
|||||||
|
|||||||
msgid "vga_text (Text output VGA (Coreboot))"
|
|||||||
msgstr "vga_text (Текстовый вывод VGA (Coreboot))"
|
|||||||
|
|||||||
#: source/ubl-settings-bootloader.cc:450
|
|||||||
msgid "Нет анимации загрузки, полный журнал"
|
|||||||
msgstr ""
|
|||||||
|
|||||||
#~ msgid "Mine"
|
|||||||
#~ msgstr "Свой"
|
|||||||
|
|||||||
#~ msgid "Disabled"
|
|||||||
#~ msgstr "Отключён"
|
|||||||
Зачем здесь это ?
Да и другие функции в source/util.cc проверить и не нужные удалить !
Убрал.
340ff99908