Merge pull request 'master' (#51) from YanTheKaller/ublexec:master into master

Reviewed-on: #51
master v2.30
Dmitry Razumov 2 years ago
commit 6a68a8f9df

9
.gitignore vendored

@ -1,7 +1,12 @@
ublexec.glade~ *~*
#ublexec.glade# *#*
test.cpp test.cpp
.vscode .vscode
ublexec ublexec
nohup.out nohup.out
ublexec_ru.po~ ublexec_ru.po~
compile/
.BUILD.md
.install.sh
terminal-commands/
.updatebuild.sh

@ -2,6 +2,7 @@
<gresources> <gresources>
<gresource prefix="/com/ublinux/ui"> <gresource prefix="/com/ublinux/ui">
<file>ublexec.glade</file> <file>ublexec.glade</file>
<file>ublexec-application.glade</file>
</gresource> </gresource>
<gresource prefix="/com/ublinux/css"> <gresource prefix="/com/ublinux/css">
<file>ublexec.css</file> <file>ublexec.css</file>

@ -3,20 +3,15 @@ project(ublexec)
find_package(PkgConfig REQUIRED) find_package(PkgConfig REQUIRED)
pkg_check_modules(GTK3 REQUIRED gtk+-3.0) pkg_check_modules(GTK REQUIRED gtk+-3.0)
include_directories(${GTK3_INCLUDE_DIRS}) include_directories(${GTK_INCLUDE_DIRS})
link_directories(${GTK3_LIBRARY_DIRS}) link_directories(${GTK_LIBRARY_DIRS})
add_definitions(${GTK3_CFLAGS_OTHER}) add_definitions(${GTK_CFLAGS_OTHER})
pkg_check_modules(GTKMM30 REQUIRED gtkmm-3.0) pkg_check_modules(VTE291 REQUIRED vte-2.91)
include_directories(${GTKMM30_INCLUDE_DIRS}) include_directories(${VTE291_INCLUDE_DIRS})
link_directories(${GTKMM30_LIBRARY_DIRS}) link_directories(${VTE291_LIBRARY_DIRS})
add_definitions(${GTKMM30_CFLAGS_OTHER}) add_definitions(${VTE291_CFLAGS_OTHER})
#pkg_check_modules(VTE291 REQUIRED vte-2.91)
#include_directories(${VTE291_INCLUDE_DIRS})
#link_directories(${VTE291_LIBRARY_DIRS})
#add_definitions(${VTE291_CFLAGS_OTHER})
find_library(WEBKIT_LIBRARIES_FOUND webkit2gtk-4.0 webkit2gtk-web-extension-4.0) find_library(WEBKIT_LIBRARIES_FOUND webkit2gtk-4.0 webkit2gtk-web-extension-4.0)
@ -41,6 +36,7 @@ add_custom_target(GLADE ublexec.glade)
set(DEPENDFILES set(DEPENDFILES
../ublexec.glade ../ublexec.glade
../ublexec-application.glade
../gresource.xml ../gresource.xml
../ublexec-banner.png ../ublexec-banner.png
../ublexec.css ../ublexec.css
@ -74,20 +70,19 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wall -Wextra -Werror -Wmissin
-fstack-clash-protection -fcf-protection") -fstack-clash-protection -fcf-protection")
set(SOURCE_FILES set(SOURCE_FILES
main.cc ublexec.c
ublexec.cc
ublexec.h ublexec.h
ubl-util-standard.h ubl-strings.h
ubl-util-standard.c ubl-utils.h
${CMAKE_CURRENT_BINARY_DIR}/ubl-cmake.h) ubl-utils.c
${CMAKE_CURRENT_BINARY_DIR}/ubl-cmake.h
)
set(LIBRARIES set(LIBRARIES
${GTK3_LIBRARIES} ${GTK_LIBRARIES}
${GTKMM30_LIBRARIES}
${WEBKIT_LIBRARIES} ${WEBKIT_LIBRARIES}
# ${VTE291_LIBRARIES} ${VTE291_LIBRARIES}
pthread) pthread)

@ -1,51 +0,0 @@
#include "ublexec.h"
void pars_flag(int index_start, int argc, char* argv[]);
int main(int argc, char** argv) {
string str_argv= "";
string str_cmd_argv = "";
setlocale(LC_ALL, "");
bindtextdomain(app_name, "/usr/share/locale/");
bind_textdomain_codeset(app_name, "UTF-8");
textdomain(app_name);
if (argc > 1){
str_argv = argv[1];
}
if (argc == 3) {
name_app_cmd = argv[2];
string str_flag = argv[1];
if (str_flag == "-x") {
flag_prog_file = 1;
}
else if (str_flag == "-e") {
flag_prog_file = 2;
}
}
pars_flag(1,argc, argv);
int local_argc = 1;
auto app = Gtk::Application::create(local_argc, argv, "org.gtkmm.example.plug");
auto builder = Gtk::Builder::create_from_resource(path_glade);
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);
}
}
}

@ -0,0 +1,51 @@
#define VERSION_LABEL yon_char_unite(_("Version:")," ",version_application,"\n",NULL)
#define HELP_LABEL yon_char_unite(_("ublexec version:")," ", version_application,"\n",_("Run as..."),"\n",_("Usage:"), " ublexec ",_("[OPTIONS]"),"\n",_("Options:"),"\n\t--help, -h\t\t\t",_("Show this help"),"\n\t--version, -V\t\t\t",_("Show package version"),"\n\t--lock-help\t\t\t",_("Lock this help menu"),"\n",NULL)
#define TITLE_LABEL _("Run as...")
#define TITLE_INFO_LABEL _("Run the application as a user with a changed priority")
#define SUCCESS_LABEL _("Operation succeeded")
#define ABOUT_LABEL _("About")
#define DOCUMENTATION_LABEL _("Documentation")
#define CANCEL_LABEL _("Cancel")
#define OPEN_LABEL _("Open")
#define HELP_TITLE_LABEL _("Would you like to read documentation in the Web?")
#define HELP_INFO_LABEL _("You will be redirected to documentation website, where documentation is\ntranslated and supported by community.")
#define HELP_ALWAYS_OPEN_LABEL _("Always redirect to online documentation")
#define OPEN_HELP_LABEL _("Open documentation")
#define PROJECT_HOME_LABEL _("Project homepage")
#define GRAPHICS_LABEL _("Graphics")
#define TOOLS_LABEL _("Tools")
#define INTERNET_LABEL _("Internet")
#define MULTIMEDIA_LABEL _("Multimedia")
#define SETTINGS_LABEL _("Settings")
#define EDUCATION_LABEL _("Education")
#define OFFICE_LABEL _("Office")
#define OTHER_LABEL _("Other")
#define DEVELOPMENT_LABEL _("Development")
#define SYSTEM_LABEL _("System")
#define PRIORITY_ROOT_LABEL _("-20 (High)")
#define PRIORITY_USER_LABEL _("0 (High)")
#define PRIORITY_LOW_LABEL _("19 (Low)")
#define CHOOSE_APP_OR_FILE_LABEL _("Choose application or file for running")
#define TERMINAL_LABEL _("Run in the terminal emulator")
#define APP_LABEL _("File or app for running")
#define RUN_AS_USER_LABEL _("Run as another user:")
#define USER_NAME_LABEL _("Username:")
#define PRIORITY_LABEL _("Priority")
#define PRIORITY_CHECK_LABEL _("Change startup priority")
#define PRIORITY_SCALE_LABEL _("Priority:")
#define COMMAND_LABEL _("Command line")
#define RUN_LABEL _("Run")
#define EDIT_LABEL _("Edit")
#define USER_LABEL _("User")
#define FILE_VIEW_LABEL _("File view")
#define APP_VIEW_LABEL _("Applications view")

@ -1,91 +0,0 @@
#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

@ -1,20 +0,0 @@
#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

File diff suppressed because it is too large Load Diff

@ -0,0 +1,380 @@
#ifndef UBL_UTILS
#define UBL_UTILS
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <pthread.h>
#include <string.h>
#include <dirent.h>
#include <unistd.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <pwd.h>
#include <locale.h>
#include <libintl.h>
#include <gtk/gtk.h>
#include <gtk/gtkx.h>
#include <pwd.h>
#include <vte/vte.h>
#include "ubl-cmake.h"
#ifdef WEBKIT_FOUND
#include <webkit2/webkit2.h>
#endif
#define _(String) gettext(String)
#define DesktopPath "/usr/share/applications/"
#define try bool __HadError=false;
#define catch(x) ExitJmp:if(__HadError)
#define throw(x) {__HadError=true;goto ExitJmp;}
static char** array_size_pow;
#define for_dictionaries(obj, obj1) for (obj = obj1->first; obj != NULL; obj = obj->next)
#define new(type) malloc(sizeof(type))
#define new_arr(type,size) malloc(sizeof(type)*size)
#define get_home_dir_command yon_char_unite("getent passwd \"",yon_ubl_root_user_get(),"\" | cut -d: -f6",NULL)
#define get_processes_command "systemd-cgls --no-pager |grep -oE \"[-0-9A-Za-z.:]{1,}.service\""
#define get_slices_command "systemd-cgls --no-pager |grep -oE \"[-0-9A-Za-z.:]{1,}.slice\""
typedef enum
{
#ifdef __GTK_H__
DICTIONARY_GTK_WIDGETS_TYPE,
#endif
DICTIONARY_OTHER_TYPE=0,
DICTIONARY_CHAR_TYPE,
DICTIONARY_INT_TYPE,
DICTIONARY_BOOL_TYPE,
} DICT_TYPE;
typedef struct dictionary
{
char *key;
void *data;
struct dictionary *next;
struct dictionary *prev;
struct dictionary *first;
DICT_TYPE data_type;
int flag1;
} dictionary;
typedef struct apps
{
char *filename;
char *Name;
int Type;
char *Categories;
char *Exec;
char *Icon;
int Pluggable;
int DualPluggable;
} apps;
typedef char** config_str;
static dictionary *__yon__config__strings = NULL;
#define check_config if(__yon__config__strings&&__yon__config__strings->data_type==DICTIONARY_CHAR_TYPE)
#define config(key) yon_config_get_by_key(key)
#define for_config dictionary temp = NULL; for_dictionary(temp,__yon__config__strings)
#define yon_remalloc(pointer, size) (!pointer) ? malloc(size) : realloc(pointer, size)
// dictionary functions
/**yon_dictionary_get_data(dictionary, type)
* [EN]
* Gets data from dictionary.
* [dictionary] is dictionary, from which data should be extracted;
* [type] is type of data, [dictionary] contains.
* [RU]
* Возвращает данные из словаря.
* [dictionary] - словарь из которого достаются данные.
* [type] - тип данных, хранящихся в словаре [dictionary].
*/
#define yon_dictionary_get_data(dictionary, type) ((type)dictionary->data)
/**yon_dictionary_add_or_create_if_exists_with_data(dict,key,data)
* [EN]
*
* [RU]
* Добавляет элемент словаря в конец словаря [dict] c ключом [key] и данными [data].
* Если словарь не существует, создаёт его
*/
#define yon_dictionary_add_or_create_if_exists_with_data(dict,key,data) {if (!dict) dict=yon_dictionary_new_with_data(key,data); \
else dict=yon_dictionary_append_with_data(dict,key,data);}
dictionary *yon_dictionary_new();
dictionary *yon_dictionary_append(dictionary *targetdict);
dictionary *yon_dictionary_get_last(dictionary *dict);
dictionary *yon_dictionary_swap(dictionary *dict, int aim);
void yon_dictionary_make_first(dictionary *dict);
void yon_dictionary_make_nth(dictionary *dict, int nth);
dictionary *yon_dictionary_new_with_data(char *key, void *data);
dictionary *yon_dictionary_append_with_data(dictionary *dict, char *key, void *data);
dictionary *yon_dictionary_connect(dictionary *old, dictionary *toconnect);
dictionary *yon_dictionary_get(dictionary **dict, char *key);
dictionary *yon_dictionary_rip(dictionary *dict);
dictionary *yon_dictionary_get_nth(dictionary *dict, int place);
void *yon_dictionary_free_all(dictionary *dictionary,void (data_manipulation)(void*));
// char functions
int yon_char_find_last(char *source, char find);
char *yon_char_append(char *source, char *append);
char *yon_char_new(char *chr);
char *yon_char_unite(char *source, ...);
char *yon_cut(char *source, int size, int startpos);
char *yon_char_divide(char *source, int dividepos);
char *yon_char_divide_search(char *source, char *dividepos, int delete_divider);
char *yon_char_from_int(int int_to_convert);
char *yon_char_from_long(long int_to_convert);
char *yon_char_replace(char *source, char *find, char*replace);
char **yon_char_parse(char *parameters, int *size, char *divider);
char **yon_char_parsed_rip(char **char_string, int *size, int item_to_delete);
int yon_char_parsed_check_exist(char **parameters, int size, char *param);
int yon_char_find_count(char *source, char *find);
int yon_char_parsed_includes_char_parsed (config_str source, config_str to_check, int source_size, int check_size);
config_str yon_char_parsed_new (int *size, ...);
void yon_char_parsed_copy(config_str *source, config_str *to_copy);
config_str yon_char_parsed_append(config_str parsed, int *size, char *string);
int yon_char_parsed_remove_newline_symbols(config_str parsed, int *size);
int yon_ubl_check_root();
char *yon_ubl_root_user_get();
char *yon_ubl_user_get_home_directory();
config_str yon_ubl_get_all_users(int *user_size);
config_str yon_ubl_get_all_processes(int *processes_size);
config_str yon_ubl_get_all_slices(int *slices_size);
// parsing functions
config_str philos_list_user(int* size);
apps *yon_apps_scan_and_parse_desktops(int *sizef);
void yon_apps_sort(apps *applist, int size);
apps *yon_apps_get_by_name(apps *applist, char *name, int size);
char *yon_app_chooser_open_with_sections(char *section_name, char *section_filter, char *section_icon, ...);
config_str yon_config_load(char *command, int *str_len);
int yon_config_save_registered(char *path, char *section);
char *yon_config_get_parameter(config_str parameters, int size, char *param);
int yon_config_load_register(char *command);
int yon_config_remove_by_key(char *key);
int yon_config_remove_by_data(void *data);
int yon_config_remove_element(char *key, char *deleted);
void *yon_config_get_by_key(char *key);
char *yon_config_get_key_by_data(char *data);
int yon_config_set(char *key, void *data);
int yon_config_clean();
void yon_config_register(char *key, void *data);
config_str yon_config_get_all();
// terminal-using functions
int yon_launch_app_with_arguments(char *name, char *args);
void yon_launch(char *command);
void yon_launch_thread(char *command);
// Gtk functions
#ifdef __GTK_H__
#ifdef VTE_TERMINAL
void yon_terminal_integrated_launch(GtkWidget *place_to_show, char* command, void *endwork_function, void* endwork_function_argument);
void yon_terminal_integrated_start(GtkWidget *terminal, char* command, void *endwork_function, void* endwork_function_argument);
#endif
enum YON_TYPE{
YON_TYPE_STRING,
YON_TYPE_STRING_LIST,
YON_TYPE_INT,
YON_TYPE_DOUBLE,
YON_TYPE_BOOLEAN,
YON_TYPE_OTHER
};
GtkWidget *yon_ubl_menu_item_about_new(char *buttonname);
GtkWidget *yon_ubl_menu_item_documentation_new(char *buttonname);
/**yon_gtk_builder_get_widget(builder, widget_name)
* [EN]
* Returns GtkWidget from GtkBuilder *[builder].
* [builder] is GtkBuilder*;
* [widget_name] is id of widget;
*/
#define yon_gtk_builder_get_widget(builder, widget_name) GTK_WIDGET(gtk_builder_get_object(builder, widget_name))
typedef struct
{
GtkWidget *Icon;
GtkWidget *Label;
GtkWidget *IconView;
GtkListStore *List;
} expander_icon_view;
void yon_window_config_setup(GtkWindow *window);
int yon_window_config_load(char *path);
config_str yon_window_config_get_section(char *section, gsize *size);
void yon_window_config_add_listener(GtkWidget *widget, char *param_name, char *widget_property, enum YON_TYPE val_type);
void yon_window_config_add_custom_parameter(char *param_name, char *section, void *tracked_value, enum YON_TYPE val_type);
void yon_window_config_erase_custom_parameter(char *param_name, char *section);
int yon_window_config_get_parameter(char *section, char *config_parameter, void *return_value, enum YON_TYPE type);
int yon_gtk_combo_box_fill(GtkWidget *combo, char **parameters,int size);
int yon_gtk_combo_box_text_find(GtkWidget *combo_box, char *text_to_find);
void yon_gtk_column_minimal_fixed_size_set(GtkTreeViewColumn *column);
int yon_gtk_icon_view_hide_empty(dictionary *icon_view_segment);
void yon_subwindow_close(GtkWidget *self);
int yon_dictionary_gtk_pack_start_multiple_widgets(GtkBox *destination, gboolean expand, gboolean fill, int padding, ...);
int yon_dictionary_gtk_pack_end_multiple_widgets(GtkBox *destination, gboolean expand, gboolean fill, int padding, ...);
void yon_gtk_widget_set_sensitive_from_toggle_button(GtkToggleButton *toggle, GtkWidget *target);
void yon_gtk_widget_set_sensitive_from_toggle_button_inversed(GtkToggleButton *toggle, GtkWidget *target);
void yon_gtk_widget_set_sensitive_from_combo_box(GtkComboBox *toggle, GtkWidget *target);
void yon_gtk_widget_set_sensitive_from_combo_box_inversed(GtkComboBox *toggle, GtkWidget *target);
typedef enum
{
BACKGROUND_IMAGE_SUCCESS_TYPE,
BACKGROUND_IMAGE_FAIL_TYPE
} BACKGROUND_IMAGE_TYPE;
typedef struct {
BACKGROUND_IMAGE_TYPE type;
GtkWidget *icon;
GtkWidget *box;
GtkWidget *label;
char* text_to_render;
} render_data;
/**yon_ubl_status_box_setup(render,icon,box,label)
* [EN]
* Sets up [render] structure of type render_data.
* [icon] is GtkImage widget of status box for showing status icons;
* [box] is GtkBox widget of status box for showing status color;
* [label] is GtkLabel widget of status box for showing status text;
* [RU]
* Настраивает структуру [render] типа render_data.
* [icon] - виджет типа GtkIcon в котором будут отображаться статусные иконки;
* [box] - виджет типа GtkBox в котором будет отображаться цвет статуса;
* [label] - виджет типа GtkLabel в котором будет отображаться текст статусного сообщения;
*/
int yon_ubl_status_box_setup(GtkWidget *icon, GtkWidget *box, GtkWidget *label);
/**yon_ubl_status_box_render(render,text,type)
* [EN]
* Renders message in status box;
* [render] is render_data structure of status box;
* [text] is text to be shown in status box;
* [type] if type of message. Can be BACKGROUND_IMAGE_FAIL_TYPE or BACKGROUND_IMAGE_SUCCESS_TYPE
* [RU]
* Отображает сообщение в статусном окне.
* [render] - структура типа render_data для нужного статусного окна;
* [text] - текст, отображаемый в статусном окне;
* [type] - тип сообщения. Может быть:
* BACKGROUND_IMAGE_FAIL_TYPE (красный фон,иконка - восклицательный знак)
* или
* BACKGROUND_IMAGE_SUCCESS_TYPE (Жёлтный фон, иконка - галка)
*/
void yon_ubl_status_box_render(char *text, BACKGROUND_IMAGE_TYPE type);
/**yon_ubl_header_setup(overlay, head, image, imag_path)
* [EN]
* Sets up header of app.
* [overlay] is overlay for app header;
* [head] is box of header, which connects to [overlay]
* [image] is header background image;
* [imag_path] is path of image, shown in [image]
* [RU]
* Настраивает заголовок приложения.
* [overlay] - оверлей заголовка приложения;
* [head] - шапка заголовка, присоединяемая к [overlay]
* [image] - виджет картинки для заднего фона;
* [imag_path] - путь до картинки, загружаемой в [image]
*/
#define yon_ubl_header_setup(overlay, head, image, imag_path) _yon_ubl_header_setup(GTK_WIDGET(overlay), GTK_WIDGET(head), GTK_WIDGET(image), (char *)imag_path)
#define yon_ubl_header_setup_resource(overlay, head, image, imag_path) _yon_ubl_header_setup_resource(GTK_WIDGET(overlay), GTK_WIDGET(head), GTK_WIDGET(image), (char *)imag_path)
#endif
void _yon_ubl_header_setup(GtkWidget *Overlay, GtkWidget *Head, GtkWidget *Image, char *image_path);
void _yon_ubl_header_setup_resource(GtkWidget *Overlay, GtkWidget *Head, GtkWidget *Image, char *image_path);
void yon_ubl_setup_sockets(GtkWidget *main_window, GtkWidget *left_window, GtkWidget *right_window, int socket_main_id, int socket_left_id, int socket_right_id);
#ifdef WEBKIT_FOUND
void yon_ubl_browser_window_open(char *link, char *browser_window_name);
#else
void yon_ubl_browser_window_open(char *link, char *browser_window_name);
#endif
#endif

@ -0,0 +1,431 @@
#include "ublexec.h"
config main_config;
//signal emmit handlers - no header initialization
/**on_close_subwindow(GtkWidget *self)
* [EN]
* Closes window in which [self] is contained.
* [RU]
* Закрывает окно, в котором расположен виджет [self].
*/
void on_close_subwindow(GtkWidget *self){
gtk_widget_destroy(gtk_widget_get_toplevel(self));
}
/**yon_open_browser(GtkWidget *self, char *link)
* [EN]
* Opens browser with [link] link.
* [RU]
* Открывает браузер с [link] ссылкой.
*/
void yon_open_browser(GtkWidget *self, char *link){
yon_ubl_browser_window_open(link,TITLE_LABEL);
}
/**on_open_documentation_confirmation(GtkWidget *self, char *link)
* [EN]
* Opens confirmation window for [link] link.
* [RU]
* Открывает окно подтверждение перехода по ссылке [link].
*/
void on_open_documentation_confirmation(GtkWidget *self, char *link){
if (main_config.always_open_documentation==0){
GtkBuilder *builder = gtk_builder_new_from_resource(glade_path);
documentation_confirmation_window *widgets = malloc(sizeof(documentation_confirmation_window));
widgets->Window = yon_gtk_builder_get_widget(builder,"helpConfirmationWindow");
widgets->AcceptButton = yon_gtk_builder_get_widget(builder,"ReadHelpButton");
widgets->CloseButton = yon_gtk_builder_get_widget(builder,"CancelHelpButton");
widgets->AlwaysOpenCheck = yon_gtk_builder_get_widget(builder,"AlwaysOpenDocumentationCheckbox");
gtk_widget_show_all(widgets->Window);
g_signal_connect(G_OBJECT(widgets->CloseButton),"clicked",G_CALLBACK(on_close_subwindow),NULL);
g_signal_connect(G_OBJECT(widgets->AcceptButton),"clicked",G_CALLBACK(yon_open_browser),yon_char_new(link));
g_signal_connect(G_OBJECT(widgets->AcceptButton),"clicked",G_CALLBACK(on_close_subwindow),NULL);
} else {
yon_open_browser(self,link);
}
}
/**on_link(GtkWidget *self, char* uri, gpointer user_data)
* [EN]
* Signal for hadnling AboutDialog links.
* Connect to "activate-link" signal.
* [self] is AboutDialog window;
* [uri] is activated link;
* [user_data] is pointer for user data, hasn't used in standard handler;
* [RU]
* Функция для обработки сигнала нажатия на ссылку окна AboutDialog.
* Присоединять к сигналу "activate-link".
* [self] - окно AboutDialog;
* [uri] - ссылка, по которой совершается переход;
* [user_data] - указатель на любые другие данные, не используется в стандартном обработчике;
*/
void on_link(GtkWidget *self, char* uri, gpointer user_data){
gtk_widget_destroy(self);
on_open_documentation_confirmation(self,uri);
}
/**on_about()
* [EN]
* Function for setting up and showing AboutDialog.
* Connect it to "activate" signal of Documentation MenuItem.
* [RU]
* Функиця для настройки и показа окна AboutDialog.
* Присоединять к сигналу "activate" кнопки справки типа MenuItem.
*/
void on_about(){
GtkBuilder *builder=gtk_builder_new_from_resource(glade_path);
GtkWidget *window=yon_gtk_builder_get_widget(builder,"AboutWindow");
GtkWidget *title=yon_gtk_builder_get_widget(builder,"headerAboutTopic");
GtkWidget *hideButtonBox=yon_gtk_builder_get_widget(builder,"buttonBoxHide");
gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(window),version_application);
gtk_about_dialog_set_website_label(GTK_ABOUT_DIALOG(window),PROJECT_HOME_LABEL);
gtk_about_dialog_set_comments(GTK_ABOUT_DIALOG(window),TITLE_LABEL);
gtk_label_set_text(GTK_LABEL(title),TITLE_LABEL);
g_signal_connect(G_OBJECT(window),"activate-link",G_CALLBACK(on_link),NULL);
gtk_widget_set_visible(hideButtonBox,0);
gtk_widget_destroy(hideButtonBox);
gtk_widget_show(window);
}
//functions
void on_file_chooser_open(GtkWidget *self, main_window *widgets){
GtkWidget *dialog = gtk_file_chooser_dialog_new(TITLE_LABEL,NULL,GTK_FILE_CHOOSER_ACTION_OPEN,CANCEL_LABEL,GTK_RESPONSE_CANCEL,OPEN_LABEL,GTK_RESPONSE_ACCEPT,NULL);
gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(dialog),"/usr/bin/");
gtk_window_set_icon_name(GTK_WINDOW(dialog),icon_path);
int res = gtk_dialog_run(GTK_DIALOG(dialog));
if (res==GTK_RESPONSE_ACCEPT){
char *filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog));
gtk_entry_set_text(GTK_ENTRY(widgets->TargetNameEntry),filename);
}
on_close_subwindow(dialog);
}
void on_application_chooser_open(GtkWidget *self, main_window *widgets){
char *app = yon_app_chooser_open_with_sections(GRAPHICS_LABEL,"Graphics","",
TOOLS_LABEL,"Utility","",
INTERNET_LABEL,"Network","",
MULTIMEDIA_LABEL,"AudioVideo","",
SETTINGS_LABEL,"Settings","",
EDUCATION_LABEL,"Education","",
OFFICE_LABEL,"Office","",
DEVELOPMENT_LABEL,"Development","",
SYSTEM_LABEL,"System","",NULL);
if (app){
gtk_entry_set_text(GTK_ENTRY(widgets->TargetNameEntry),app);
}
}
void on_user_changed(GtkWidget *self, main_window *widgets){
GtkAdjustment *adj = gtk_spin_button_get_adjustment(GTK_SPIN_BUTTON(widgets->prioritySpin));
if (gtk_combo_box_get_active(GTK_COMBO_BOX(self))==0){
gtk_adjustment_set_lower(adj,-20);
gtk_label_set_text(GTK_LABEL(widgets->highestPriorityLabel),PRIORITY_ROOT_LABEL);
}
else {
gtk_adjustment_set_lower(adj,0);
gtk_label_set_text(GTK_LABEL(widgets->highestPriorityLabel),PRIORITY_USER_LABEL);
}
if (gtk_adjustment_get_value(adj)<gtk_adjustment_get_lower(adj)) gtk_adjustment_set_value(adj,gtk_adjustment_get_lower(adj));
}
void on_su_sudo_activate(GtkWidget *self, main_window *widgets){
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(self))){
gtk_widget_set_sensitive(widgets->runWithTerminalCheck,0);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->runWithTerminalCheck),1);
} else {
gtk_widget_set_sensitive(widgets->runWithTerminalCheck,1);
}
}
void on_user_activate(GtkToggleButton *self, main_window *widgets){
if (!gtk_toggle_button_get_active(self)) gtk_widget_set_sensitive((widgets->runWithTerminalCheck),1);
if (gtk_toggle_button_get_active(self)&&(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->runWithUserSuCheck))||gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->runWithUserSudoCheck))))
gtk_widget_set_sensitive((widgets->runWithTerminalCheck),0);
}
void on_user_switching(GtkToggleButton *self, main_window *widgets){
GtkAdjustment *adj = gtk_spin_button_get_adjustment(GTK_SPIN_BUTTON(widgets->prioritySpin));
if (gtk_toggle_button_get_active(self)){
if (!gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->runWithUserCombo))){
gtk_adjustment_set_lower(adj,-20);
gtk_label_set_text(GTK_LABEL(widgets->highestPriorityLabel),PRIORITY_ROOT_LABEL);
} else {
gtk_adjustment_set_lower(adj,0);
gtk_label_set_text(GTK_LABEL(widgets->highestPriorityLabel),PRIORITY_USER_LABEL);
}
} else {
gtk_adjustment_set_lower(adj,0);
gtk_label_set_text(GTK_LABEL(widgets->highestPriorityLabel),PRIORITY_USER_LABEL);
}
if (gtk_adjustment_get_value(adj)<gtk_adjustment_get_lower(adj)) gtk_adjustment_set_value(adj,gtk_adjustment_get_lower(adj));
}
void on_setup_command(GtkWidget *self, main_window *widgets){
char *target = (char*)gtk_entry_get_text(GTK_ENTRY(widgets->TargetNameEntry));
if (target&&strcmp(target,"")){
char *final_command;
int terminal_check = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->runWithTerminalCheck));
int chosen_terminal = gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->runWithTerminalCombo));
terminal_info *terminal = yon_dictionary_get_data(yon_dictionary_get_nth(main_config.terminals,chosen_terminal),terminal_info*);
int user_check = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->runWithUserCheck));
char *user = (char*)gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(widgets->runWithUserCombo));
int pkexec_check = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->runWithUserPkexecCheck));
int su_check = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->runWithUserSuCheck));
int sudo_check = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->runWithUserSudoCheck));
int priority_check = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->priorityCheck));
char *priority = priority_check ? yon_char_append(" -p ",yon_char_from_long(gtk_spin_button_get_value(GTK_SPIN_BUTTON(widgets->prioritySpin)))) : "";
int size;
char *command = yon_char_unite(get_run_command_command,
terminal_check ? yon_char_append(" -t ", terminal->name_simple) : "",
user_check ? yon_char_append(" -u ", user) : "",
user_check&&pkexec_check ? " -e pkexec" : "",
user_check&&su_check ? " -e su" : "",
user_check&&sudo_check ? " -e sudo" : "",
priority_check ? priority : "",
yon_char_append(" ",target),
NULL);
config_str gotten_command = yon_config_load(command,&size);
final_command = yon_char_divide_search(*gotten_command,"\n",-1);
gtk_entry_set_text(GTK_ENTRY(widgets->commandEntry),final_command);
free(final_command);
}
}
void on_command_run(GtkWidget *self, main_window *widgets){
const char *command = gtk_entry_get_text(GTK_ENTRY(widgets->commandEntry));
yon_launch_thread((char*)command);
}
// standard functions
void config_init(){
main_config.always_open_documentation=0;
main_config.win_height=0;
main_config.win_width=0;
main_config.win_pos_x=0;
main_config.win_pos_y=0;
main_config.socket_id=-1;
main_config.save_socket_id=-1;
main_config.load_socket_id=-1;
main_config.lock_help=0;
main_config.lock_help=0;
main_config.lock_load_global=0;
main_config.lock_save_global=0;
main_config.lock_save_local=0;
}
main_window *setup_window(){
/* Widgets getting | Получение виджетов */
main_window *widgets = malloc(sizeof(main_window));
GtkBuilder *builder = gtk_builder_new_from_resource(glade_path);
widgets->Window = yon_gtk_builder_get_widget(builder,"window");
widgets->PlugBox = yon_gtk_builder_get_widget(builder,"plugBox");
widgets->TargetNameEntry = yon_gtk_builder_get_widget(builder,"targetNameEntry");
widgets->chooseFileButton = yon_gtk_builder_get_widget(builder,"chooseFileButton");
widgets->chooseDesktopButton = yon_gtk_builder_get_widget(builder,"chooseDesktopButton");
widgets->StatusBox = yon_gtk_builder_get_widget(builder,"mainStatusBox");
widgets->StatusIcon = yon_gtk_builder_get_widget(builder,"mainStatusIcon");
widgets->StatusLabel = yon_gtk_builder_get_widget(builder,"mainStatusLabel");
widgets->runWithTerminalCheck = yon_gtk_builder_get_widget(builder,"runWithTerminalCheck");
widgets->runWithTerminalCombo = yon_gtk_builder_get_widget(builder,"runWithTerminalCombo");
widgets->runWithUserCheck = yon_gtk_builder_get_widget(builder,"runWithUserCheck");
widgets->runWithUserPkexecCheck = yon_gtk_builder_get_widget(builder,"runWithUserPkexecCheck");
widgets->runWithUserSuCheck = yon_gtk_builder_get_widget(builder,"runWithUserSuCheck");
widgets->runWithUserSudoCheck = yon_gtk_builder_get_widget(builder,"runWithUserSudoCheck");
widgets->runWithUserCombo = yon_gtk_builder_get_widget(builder,"runWithUserCombo");
widgets->priorityCheck = yon_gtk_builder_get_widget(builder,"priorityCheck");
widgets->priorityScale = yon_gtk_builder_get_widget(builder,"priorityScale");
widgets->prioritySpin = yon_gtk_builder_get_widget(builder,"prioritySpin");
widgets->highestPriorityLabel = yon_gtk_builder_get_widget(builder,"highestPriorityLabel");
widgets->commandCheck = yon_gtk_builder_get_widget(builder,"commandCheck");
widgets->commandEntry = yon_gtk_builder_get_widget(builder,"commandEntry");
widgets->runButton = yon_gtk_builder_get_widget(builder,"runButton");
widgets->HeadOverlay = yon_gtk_builder_get_widget(builder,"overHead");
widgets->HeadImage = yon_gtk_builder_get_widget(builder,"imgHeadBackground");
widgets->HeadBox = yon_gtk_builder_get_widget(builder,"boxColor");
widgets->DocumentationMenuItem = yon_ubl_menu_item_documentation_new(DOCUMENTATION_LABEL);
widgets->AboutMenuItem = yon_ubl_menu_item_about_new(ABOUT_LABEL);
gtk_window_set_title(GTK_WINDOW(widgets->Window),TITLE_LABEL);
GtkWidget *menu = yon_gtk_builder_get_widget(builder,"menu2");
gtk_menu_shell_append(GTK_MENU_SHELL(menu),widgets->DocumentationMenuItem);
gtk_menu_shell_append(GTK_MENU_SHELL(menu),widgets->AboutMenuItem);
/* Widget registration for config monitoring | Регистрация виджетов для мониторинга конфига */
// yon_window_config_add_custom_parameter(widgets->HeadInfoLabel,"head-text","label",YON_TYPE_STRING);
/* Signal connection | Присоединение сигналов */
g_signal_connect(G_OBJECT(widgets->Window), "destroy", G_CALLBACK(gtk_main_quit), NULL);
g_signal_connect(G_OBJECT(widgets->DocumentationMenuItem),"activate",G_CALLBACK(on_open_documentation_confirmation),WIKI_LINK);
g_signal_connect(G_OBJECT(widgets->AboutMenuItem),"activate",G_CALLBACK(on_about),NULL);
g_signal_connect(G_OBJECT(widgets->chooseFileButton),"clicked",G_CALLBACK(on_file_chooser_open),widgets);
g_signal_connect(G_OBJECT(widgets->chooseDesktopButton),"clicked",G_CALLBACK(on_application_chooser_open),widgets);
g_signal_connect(G_OBJECT(widgets->priorityCheck),"toggled",G_CALLBACK(yon_gtk_widget_set_sensitive_from_toggle_button),widgets->priorityScale);
g_signal_connect(G_OBJECT(widgets->priorityCheck),"toggled",G_CALLBACK(yon_gtk_widget_set_sensitive_from_toggle_button),widgets->prioritySpin);
g_signal_connect(G_OBJECT(widgets->runWithUserCheck),"toggled",G_CALLBACK(yon_gtk_widget_set_sensitive_from_toggle_button),widgets->runWithUserPkexecCheck);
g_signal_connect(G_OBJECT(widgets->runWithUserCheck),"toggled",G_CALLBACK(yon_gtk_widget_set_sensitive_from_toggle_button),widgets->runWithUserSuCheck);
g_signal_connect(G_OBJECT(widgets->runWithUserCheck),"toggled",G_CALLBACK(yon_gtk_widget_set_sensitive_from_toggle_button),widgets->runWithUserSudoCheck);
g_signal_connect(G_OBJECT(widgets->runWithUserCheck),"toggled",G_CALLBACK(yon_gtk_widget_set_sensitive_from_toggle_button),widgets->runWithUserCombo);
g_signal_connect(G_OBJECT(widgets->runWithUserCheck),"toggled",G_CALLBACK(on_user_switching),widgets);
g_signal_connect(G_OBJECT(widgets->runWithTerminalCheck),"toggled",G_CALLBACK(yon_gtk_widget_set_sensitive_from_toggle_button),widgets->runWithTerminalCombo);
g_signal_connect(G_OBJECT(widgets->commandCheck),"toggled",G_CALLBACK(yon_gtk_widget_set_sensitive_from_toggle_button),widgets->commandEntry);
g_signal_connect(G_OBJECT(widgets->runWithUserCombo),"changed",G_CALLBACK(on_user_changed),widgets);
g_signal_connect(G_OBJECT(widgets->runWithUserSuCheck),"toggled",G_CALLBACK(on_su_sudo_activate),widgets);
g_signal_connect(G_OBJECT(widgets->runWithUserSudoCheck),"toggled",G_CALLBACK(on_su_sudo_activate),widgets);
g_signal_connect(G_OBJECT(widgets->runWithUserCheck),"toggled",G_CALLBACK(on_user_activate),widgets);
g_signal_connect(G_OBJECT(widgets->TargetNameEntry),"changed",G_CALLBACK(on_setup_command),widgets);
g_signal_connect(G_OBJECT(widgets->runWithTerminalCheck),"toggled",G_CALLBACK(on_setup_command),widgets);
g_signal_connect(G_OBJECT(widgets->runWithTerminalCombo),"changed",G_CALLBACK(on_setup_command),widgets);
g_signal_connect(G_OBJECT(widgets->runWithUserCheck),"toggled",G_CALLBACK(on_setup_command),widgets);
g_signal_connect(G_OBJECT(widgets->runWithUserPkexecCheck),"toggled",G_CALLBACK(on_setup_command),widgets);
g_signal_connect(G_OBJECT(widgets->runWithUserSuCheck),"toggled",G_CALLBACK(on_setup_command),widgets);
g_signal_connect(G_OBJECT(widgets->runWithUserSudoCheck),"toggled",G_CALLBACK(on_setup_command),widgets);
g_signal_connect(G_OBJECT(widgets->runWithUserCombo),"changed",G_CALLBACK(on_setup_command),widgets);
g_signal_connect(G_OBJECT(widgets->priorityCheck),"toggled",G_CALLBACK(on_setup_command),widgets);
g_signal_connect(G_OBJECT(widgets->priorityScale),"value-changed",G_CALLBACK(on_setup_command),widgets);
g_signal_connect(G_OBJECT(widgets->runButton),"clicked",G_CALLBACK(on_command_run),widgets);
int size;
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(widgets->runWithUserCombo),"root");
gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->runWithUserCombo),0);
main_config.user_id_min = atoi(yon_config_load(get_user_id_min_command,&size)[0]);
main_config.user_id_max = atoi(yon_config_load(get_user_id_max_command,&size)[0]);
config_str users = yon_config_load(get_users_command,&size);
for (int i=0;i<size;i++){
users[i]=yon_char_divide_search(users[i],"\n",-1);
if (strstr(users[i],":")&&atoi(strstr(users[i],":")+1)>=main_config.user_id_min&&atoi(strstr(users[i],":")+1)<=main_config.user_id_max)
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(widgets->runWithUserCombo),yon_char_divide_search(users[i],":",-1));
}
config_str terminals = yon_config_load(get_terminals_info_command,&size);
for (int i=1;i<size;i++){
int parsed_size;
terminals[i] = yon_char_divide_search(terminals[i],"\n",-1);
config_str terminal_parsed = yon_char_parse(terminals[i], &parsed_size,":");
terminal_info *term = g_malloc0(sizeof(terminal_info));
term->exec = terminal_parsed[0];
term->name_simple = terminal_parsed[1];
term->name = terminal_parsed[2];
if (!access(term->exec,F_OK)) {gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(widgets->runWithTerminalCombo),term->name);
yon_dictionary_add_or_create_if_exists_with_data(main_config.terminals,term->name,term);
}
}
gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->runWithTerminalCombo),0);
gtk_widget_show(widgets->Window);
return widgets;
}
int main(int argc, char *argv[]){
local=setlocale(LC_ALL, "");
textdomain (LocaleName);
config_init();
int option_index=0;
int show_help=0;
int debug_mode=0;
{
struct option long_options[] = {
{"help", 0, 0, 'h'},
{"version", 0, 0, 'V'},
{"lock-help", 0,0, 1},
{"lock-save", 0,0, 2},
{"lock-save-local", 0,0, 3},
{"lock-save-global", 0,0, 4},
{"lock-load-global", 0,0, 5},
{"socket-id", 1, 0, 's'},
{"socket-ext-id", 1,0, 'e'},
{"socket-trd-id", 1,0, 't'},
{"debug", 0,0, 'd'},
{ NULL, 0, NULL, 0 }
};
for (int i=0;i<argc;i++){
int argument=getopt_long(argc,argv,"hVvs:e:t:d",long_options,&option_index);
switch(argument){
case 'h':
show_help=1;
break;
case 'v':
case 'V':
printf("%s\n",VERSION_LABEL);
exit(0);
break;
case 's':
if(optarg)
main_config.socket_id=atoi(optarg);
break;
case 'e':
if(optarg)
main_config.save_socket_id=atoi(optarg);
break;
case 't':
if(optarg)
main_config.load_socket_id=atoi(optarg);
break;
case 1:
main_config.lock_help=1;
break;
case 2:
main_config.lock_save_local=1;
main_config.lock_save_global=1;
break;
case 3:
main_config.lock_save_local=1;
break;
case 4:
main_config.lock_save_global=1;
break;
case 5:
main_config.lock_load_global=1;
break;
}
}
if (show_help==1&&main_config.lock_help!=1){
printf("%s\n",HELP_LABEL);
exit(0);
}
}
if (getuid()!=0){
main_config.lock_load_global=1;
main_config.lock_save_global=1;
main_config.lock_save_local=1;
}
gtk_init(&argc,&argv);
main_window *widgets = setup_window();
yon_ubl_status_box_setup(widgets->StatusIcon,widgets->StatusBox,widgets->StatusLabel);
yon_ubl_header_setup_resource(widgets->HeadOverlay,widgets->HeadBox,widgets->HeadImage,banner_path);
yon_ubl_status_box_render(CHOOSE_APP_OR_FILE_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE);
yon_window_config_setup(GTK_WINDOW(widgets->Window));
yon_window_config_load(config_path);
GtkCssProvider *css=gtk_css_provider_new();
gtk_css_provider_load_from_resource(css,CssPath);
gtk_style_context_add_provider_for_screen(gdk_screen_get_default(),
GTK_STYLE_PROVIDER(css),
-1);
gtk_main();
}

File diff suppressed because it is too large Load Diff

@ -1,346 +1,124 @@
#include <gtkmm/window.h> #include <gtk/gtk.h>
#include <glibmm/i18n.h> #include <gtk/gtkx.h>
#include <gtkmm/plug.h> #include "ubl-utils.h"
#include <gtkmm/stock.h> #include <locale.h>
#include <gtkmm.h>
#include <iostream>
#include <map>
#include <string>
#include <array>
#include <vector>
#include <fstream>
#include <filesystem>
#include <stdio.h> #include <stdio.h>
#include <pwd.h> #include <unistd.h>
#include <ostream> #include <stdlib.h>
#include <thread> #include <libintl.h>
#include <algorithm> #include <getopt.h>
#include <fstream>
#include <dlfcn.h>
#include "ubl-util-standard.c"
#include <stdbool.h>
#include "../compile/ubl-cmake.h" #include "../compile/ubl-cmake.h"
#ifdef WEBKIT_FOUND #ifdef WEBKIT_FOUND
#include <webkit2/webkit2.h> #include <webkit2/webkit2.h>
#endif #endif
#include "ubl-strings.h"
#define str_tooltip_filemanager _("Program view")
#define str_tooltip_list_app _("File view") #define WIKI_LINK "https://wiki.ublinux.ru/ru/Программное_обеспечениерограммы_и_утилиты/Все/ublexec"
#define copyright _("Copyright © UBSoft LLC, 2022 - ")
#define define_name_app _("Run as...") #define _(String) gettext(String)
#define name_app_1 _("ublexec")
#define website _("https://wiki.ublinux.com") #define glade_path "/com/ublinux/ui/ublexec.glade"
#define home_page _("Project Home Page") #define banner_path "/com/ublinux/images/ublexec-banner.png"
#define space_name_app _(" Run as...") #define CssPath "/com/ublinux/css/ublexec.css"
#define str_about_1 _("About") #define icon_path "com.ublinux.ublexec"
#define str_about _("About ubl-settings-datetime") #define config_path yon_char_unite(yon_ubl_user_get_home_directory(),"/.config/",LocaleName,"/",LocaleName,".conf",NULL)
#define str_help _("Help")
#define str_save _("Save") #define get_user_id_min_command "grep \"^UID_MIN\" /etc/login.defs |grep -vE '(nologin|false)$' | sed -e 's/\t/ /g' -e 's/ */ /g'|grep -oE \"[0-9]{1,}\""
#define str_load _("Load") #define get_user_id_max_command "grep \"^UID_MAX\" /etc/login.defs | sed -e 's/\t/ /g' -e 's/ */ /g'|grep -oE \"[0-9]{1,}\""
#define save_all _("Save to global and local configuration") #define get_users_command "getent passwd |cut -d: -f1,3"
#define save_local _("Save local configuration") #define get_terminals_info_command "ublexec-cli -l|sed -e 's/\t/ /g' -e 's/^ *//g' -e 's/ */:/g'|cut -d':' -f1,2,3"
#define save_global _("Save global configuration") #define get_run_command_command "ublexec-cli -q -o"
#define load_global _("Load global configuration")
#define load_local _("Load local configuration") #define LocalePath "/usr/share/locale"
#define read_online _("Read online") #define LocaleName "ublexec"
#define cancel _("Cancel") typedef char* string;
#define always_redirect _("Always redirect") string version_application;
#define nothing_save _("Nothing to save!")
#define read_documentation_web _("Would you like to read documentation in the Web?") char *local;
#define redirected_documentation _("You will be redirected to documentation website where documentation is\ntranslated and supported by community.")
#define str_help_h _("GTK \"Run applications as another user with the specified priority\" for ""UBLinux\n""\n""Usage: ublexec [OPTIONS...]\n""Options:\n"" -h, --help\t Show this help\n"" -V, --version\t Show package version\n"" -x APP_NAME Running the program\n"" -e FILE_NAME Running the file\n") typedef struct {
#define str_version _("ublexec version: ") int always_open_documentation;
#define nice_19 _("19 (Low)") int win_pos_x;
#define nice_0 _("0 (High)") int win_pos_y;
#define nice__20 _("-20 (High)") int win_width;
#define str_close _("Close") int win_height;
#define str_localization_system _("System")
#define str_localization_development _("Development") int socket_id;
#define str_localization_other _("Other") int load_socket_id;
#define str_localization_office _("Office") int save_socket_id;
#define str_localization_education _("Education")
#define str_localization_settings _("Settings") int lock_help;
#define str_localization_multimedia _("Multimedia") int lock_save_local;
#define str_localization_internet _("Internet") int lock_save_global;
#define str_localization_tools _("Tools") int lock_load_global;
#define str_localization_graphics _("Graphics")
#define str_localization_attention _("Attention") int user_id_min;
#define str_localization_priority _("Priority") int user_id_max;
#define str_run_of_user _("Run as another user:") dictionary *terminals;
#define str_select_app_program _("Select an executable file or program") } config;
#define str_change_priority _("Change startup priority")
#define str_run_terminal _("Run in the terminal emulator") typedef struct {
#define str_file_overview _("File Overview") char *name;
#define str_application_overview _("Application Overview") char *name_simple;
#define str_run_applications_as_another _("Run applications as another user\nwith the specified priority") char *exec;
#define str_localization_username _("User Name:") } terminal_info;
#define str_selecting_programs _("Selecting Programs")
#define str_please_select_file _("Please select File") typedef struct {
#define str_localization_cmd_line _("Command Line") //Standard
#define str_localization_user _("User") GtkWidget *Window;
#define str_localization_team _("Team:") GtkWidget *HatLabel;
#define str_run _("Run") GtkWidget *PlugBox;
#define const_link_doc "https://wiki.ublinux.com/ru/Программное_обеспечениерограммы_и_утилиты/Все/ublexec" GtkWidget *HeadOverlay;
#define cmd_xdg "xdg-open " GtkWidget *HeadImage;
#define cmd_execute "su -l %s -c \" DISPLAY=$DISPLAY %s \"" GtkWidget *HeadBox;
#define path_app "/usr/bin/" GtkWidget *HeadTitleLabel;
#define path_glade "/com/ublinux/ui/ublexec.glade" GtkWidget *HeadInfoLabel;
#define path_css "/com/ublinux/css/ublexec.css"
#define app_name "ublexec" GtkWidget *StatusBox;
#define path_img_head_background "/com/ublinux/images/ublexec-banner.png" GtkWidget *StatusIcon;
#define path_all_applications "/usr/share/applications/" GtkWidget *StatusLabel;
#define file_source_login_min_max "/etc/login.defs"
#define no_print_cmd "nohup %s > /dev/null 2>&1" GtkWidget *TargetNameEntry;
GtkWidget *AboutMenuItem;
using namespace std; GtkWidget *DocumentationMenuItem;
extern string name_app_cmd; GtkWidget *targetNameEntry;
extern int socket_ext_id_I; GtkWidget *chooseFileButton;
extern int socket_trd_id_I; GtkWidget *chooseDesktopButton;
extern int flag_prog_file; GtkWidget *runWithTerminalCheck;
extern string version_application; GtkWidget *runWithTerminalCombo;
void me_thread(string cmd);
class CmdArgParser : public Glib::OptionGroup GtkWidget *runWithUserCheck;
{ GtkWidget *runWithUserPkexecCheck;
public: GtkWidget *runWithUserSuCheck;
CmdArgParser(const std::string& p_name, const std::string& p_description, const std::string& p_help); GtkWidget *runWithUserSudoCheck;
::Window GetSocketID() const;
GtkWidget *runWithUserCombo;
private: GtkWidget *priorityCheck;
int m_socketID = 0; GtkWidget *priorityScale;
GtkWidget *prioritySpin;
}; GtkWidget *highestPriorityLabel;
class MainWindow : public Gtk::ApplicationWindow { GtkWidget *commandCheck;
public: GtkWidget *commandEntry;
MainWindow(BaseObjectType* obj, Glib::RefPtr<Gtk::Builder> const& builder);
MainWindow(Glib::RefPtr<Gtk::Builder> const& builder); GtkWidget *runButton;
~MainWindow(); // Custom
void template_apps_obj(Gtk::IconView *icon, Glib::RefPtr<Gtk::ListStore> &gtk_list_app); } main_window;
void get_builder();
void add_CSS();
void localization(); typedef struct {
void event(); GtkWidget *Window;
void settings();
void close_entry_app(); GtkWidget *HatText;
void start_menu_entry_app(); GtkWidget *HeaderText;
void message_gui_close(); GtkWidget *InfoText;
void activ_or_block_execute_epriority(); GtkWidget *AlwaysOpenCheck;
void open_filemaneg();
void close_filemaneg(); GtkWidget *CloseButton;
void get_path_filemaneg(); GtkWidget *AcceptButton;
void open_list_app(); } documentation_confirmation_window;
string start_cmd(string user_cmd);
void call_app(string &cmd);
void changed_user(); main_window *setup_window();
void entry_app();
void execute_another_User(){}
void activ_or_block_other_user();
void change_scale_priority();
void change_spin_priority();
void pars_dir_bin();
void pars_users();
void pars_apps();
void select_Graphics();
void tmp_desktop(string cmd_name);
void on_item_activated(const Gtk::TreeModel::Path& path);
void tempalte_row(string Name, string Exec, string path , Glib::RefPtr<Gtk::ListStore> &dtk_list);
void tempate_icon_select(Gtk::IconView *icon, Glib::RefPtr<Gtk::ListStore> &gtk_list);
void ok_close_entry_app();
void select_Tools();
void select_Internet();
void select_Multimedia();
void select_Settings();
void select_Education();
void select_Office();
void select_Other();
void select_Development();
void select_System();
void icon_clear();
void set_icon_array();
void delete_cmd(const int &x,const int &y);
void help_show();
void denamic_cmd();
void temp_help_show();
void open_help();
void is_user_wheel();
void sudo_nice();
void template_open_browser(string link_doc);
void open_browser();
vector <size_t> find_all(string &text, string &word);
bool focus_out_txt_cmd(GdkEventFocus* event);
bool focus_in_txt_cmd(GdkEventFocus* event);
void unselect_icon(Gtk::IconView *icon_entry);
void pars_dir_terminal();
unsigned short read_uid_min_max(string filename, string search);
void str_remove(std::string& source, std::string to_remove);
string call(string cmd);
vector<std::string> split(const std::string &s, char delim);
public:
class ModelColumns : public Gtk::TreeModel::ColumnRecord {
public:
ModelColumns()
{
add(m_col_filename);
add(m_col_description);
add(m_col_pixbuf);
add(app_name_exec);
add(float_h_align);
add(float_w_align);
add(icon_name);
}
Gtk::TreeModelColumn<std::string> m_col_filename;
Gtk::TreeModelColumn<std::string> icon_name;
Gtk::TreeModelColumn<Glib::ustring> m_col_description;
Gtk::TreeModelColumn<Glib::ustring> app_name_exec;
Gtk::TreeModelColumn<Glib::RefPtr<Gdk::Pixbuf> > m_col_pixbuf;
Gtk::TreeModelColumn<float> float_h_align;
Gtk::TreeModelColumn<float> float_w_align;
};
ModelColumns m_Columns;
public:
Glib::RefPtr<Gtk::Builder> builder;
Gtk::Button *btnFilemaneg;
Gtk::Button *btnListApp;
Gtk::Button *btnStart;
Gtk::CheckButton *chbTerminal;
Gtk::CheckButton *chbAnotherUser;
Gtk::CheckButton *cbxExecuteEpriority;
Gtk::ComboBoxText *cmbUser;
Gtk::SpinButton *spinPriority;
Gtk::Scale *scalePriority;
Gtk::RadioButton *rbPkexec;
Gtk::RadioButton *rbSu;
Gtk::RadioButton *rbSudo;
Gtk::Entry *txtCmd;
Gtk::FileChooserDialog *wndChooseFileWallpaper;
Gtk::Button *btnFilemangerExit;
Gtk::Button *btnFilemangerOk;
Gtk::Label *lblTimeEpriority;
Gtk::Label *lblTimeEpriorityLow;
Gtk::Label *lblTime4EpriorityHigh;
Gtk::Label *lblUserName;
Gtk::Window *messageError;
Gtk::Button *btnMessageErrorOk;
Gtk::Label *lblMessageError;
Gtk::Button *btnStartMenuOK;
Gtk::Button *btnStartMenuExit;
Gtk::Window *dialogStartMenu;
Gtk::Box *boxColor;
Gtk::Label *lblInfoHead;
Gtk::Label *lblinfoCmd;
Gtk::Label *lblInfoTime;
Gtk::Label *labInfoExecutTerm;
Gtk::Label *lblInfoUser;
Gtk::Label *lblInfoUserOther;
Gtk::Label *lblInfoUserName;
Gtk::Label *lblInfoNooPriority;
Gtk::Label *lblInfoExec;
Gtk::Label *lblInfoPriority;
Gtk::Label *lblGraphics;
Gtk::Label *lblTools;
Gtk::Label *lblInternet;
Gtk::Label *lblMultimedia;
Gtk::Label *lblSettings;
Gtk::Label *lblEducation;
Gtk::Label *lblOffice;
Gtk::Label *lblOther;
Gtk::Label *lblDevelopment;
Gtk::Label *lblSystem;
Gtk::Label *lblHeaderName;
Gtk::IconView *iconGraphics;
Gtk::IconView *iconTools;
Gtk::IconView *iconInternet;
Gtk::IconView *iconMultimedia;
Gtk::IconView *iconSettings;
Gtk::IconView *iconEducation;
Gtk::IconView *iconOffice;
Gtk::IconView *iconOther;
Gtk::IconView *iconDevelopment;
Gtk::IconView *iconSystem;
Gtk::IconView *iconEntry;
Gtk::MenuItem *btnAbout;
Gtk::MenuItem *btnhelp;
Gtk::AboutDialog *aboutWindows;
Gtk::MenuButton *btnSettings;
Gtk::ButtonBox *btnBoxAboutDialog;
Gtk::ComboBoxText *cmbTerminal;
Glib::RefPtr<Gtk::ListStore> list_Graphics;
Glib::RefPtr<Gtk::ListStore> list_Tools;
Glib::RefPtr<Gtk::ListStore> list_Internet;
Glib::RefPtr<Gtk::ListStore> list_Multimedia;
Glib::RefPtr<Gtk::ListStore> list_Settings;
Glib::RefPtr<Gtk::ListStore> list_Education;
Glib::RefPtr<Gtk::ListStore> list_Office;
Glib::RefPtr<Gtk::ListStore> list_Other;
Glib::RefPtr<Gtk::ListStore> list_Development;
Glib::RefPtr<Gtk::ListStore> list_System;
Gtk::Image *imgHeadBackground;
Gtk::Overlay *overHead;
Gtk::Widget *boxAbout;
Gtk::Label *lblHeaderAboutTopic;
Gtk::Label *lblHeadeWndWeb;
Gtk::Label *lblwebHeaderName;
Gtk::Label *lblhelpText;
Gtk::Label *lblhelpHeader;
Gtk::CheckButton *chkAlwaysOpenHelp;
Gtk::Button *btnReadHelp;
Gtk::Button *btnCancelHelp;
Gtk::Window *wndShowWeb;
#ifdef WEBKIT_FOUND
Gtk::Window *wndWeb;
Gtk::Widget *three;
WebKitWebView *my_web_kit = NULL;
#endif
public:
string termunal_cmd[3] = {"konsole -e ", "xfce4-terminal -x ", "xterm -e "};
string cmd_old = "";
string user_exec_app = "";
string user_cmd = "";
string user_cmd_old = "";
string name_app_old = "";
string path_file_old = "";
string execute_cmd = "";
string path_file = "";
string name_app = "";
int index_error = 0;
bool flag_pkexec = false;
bool flag_su = false;
bool flag_sudo = false;
bool flag_open_browser = false;
string path_file_name;
string global_lick_doc;
struct struct_App {
string Name_desktop;
string Name;
string Exec;
string Icon;
string MimeType;
string Type;
vector<std::string> Categories;
};
list <struct_App> list_app;
set <string> set_categories;
int index_exec_gui_apps = 0;
Gtk::IconView* array_icon[10];
};
class SettingsPlug : public Gtk::Plug{
public:
Gtk::Window *window;
SettingsPlug(::Window p_socketID, Glib::RefPtr<Gtk::Builder> builder);
private:
Gtk::Widget *plugBox;
Gtk::Widget *parent;
};
void help();
void wrapper_help_show(GtkWidget *self, char* link, gpointer user_data);

@ -0,0 +1,95 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.38.2 -->
<interface>
<requires lib="gtk+" version="3.24"/>
<object class="GtkTreeStore" id="treestore1">
<columns>
<!-- column-name IconName -->
<column type="gchararray"/>
<!-- column-name Name -->
<column type="gchararray"/>
<!-- column-name Sections -->
<column type="gchararray"/>
</columns>
</object>
<object class="GtkWindow" id="ApplicationsWindow">
<property name="width-request">500</property>
<property name="height-request">600</property>
<property name="can-focus">False</property>
<property name="icon-name">com.ublinux.ublexec</property>
<child>
<object class="GtkBox" id="box">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">5</property>
<child>
<object class="GtkScrolledWindow">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="shadow-type">in</property>
<child>
<object class="GtkTreeView" id="MainTree">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="model">treestore1</property>
<property name="headers-visible">False</property>
<property name="expander-column">treeviewcolumn1</property>
<child>
<object class="GtkTreeViewColumn" id="treeviewcolumn1">
<property name="title" translatable="yes">column</property>
<child>
<object class="GtkCellRendererPixbuf">
<property name="stock_size">4</property>
</object>
<attributes>
<attribute name="icon-name">0</attribute>
</attributes>
</child>
<child>
<object class="GtkCellRendererText"/>
<attributes>
<attribute name="text">1</attribute>
</attributes>
</child>
</object>
</child>
</object>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
</object>
</child>
<child type="titlebar">
<object class="GtkHeaderBar" id="headerBar1">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="show-close-button">True</property>
<child type="title">
<object class="GtkLabel" id="lblHeaderName1">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="halign">center</property>
<property name="label" translatable="yes">Applications</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
</child>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="pixel-size">32</property>
<property name="icon-name">com.ublinux.ublexec</property>
</object>
</child>
</object>
</child>
</object>
</interface>

@ -2,6 +2,10 @@
text-shadow: 2px 2px @theme_bg_color; text-shadow: 2px 2px @theme_bg_color;
color: @theme_text_color; color: @theme_text_color;
} }
.thin {
margin:0px;
padding:0px;
}
.bannerbackground { .bannerbackground {
background-color: #404040; background-color: #404040;
} }
@ -14,6 +18,13 @@
transition: 10ms ease-out; transition: 10ms ease-out;
border-radius: 3px; border-radius: 3px;
} }
.boxInfoMessError{
background-color: #ea9999;
}
.boxInfoMessOK{
background-color: #f3f0ac;
}
#GnomeIcon{ #GnomeIcon{
border-style:solid; border-style:solid;
border-bottom-width: 1px; border-bottom-width: 1px;
@ -138,3 +149,29 @@ opacity:0.99;
} }
.aaa{
margin-top:0px;
margin-bottom:0px;
border-color:inherit;
border-left-width:inherit;
border-right-width:inherit;
}
.aaa *{
margin:0 2px 0 2px;
padding-top: 3px;
padding-bottom:3px;
border:transparent;
}
.aaa:hover {
background:@theme_bg_color;
border-color:inherit;
border-left-width:inherit;
border-right-width:inherit;
}
.aaa:hover * {
margin:0 2px 0 2px;
padding-top: 3px;
padding-bottom:3px;
background:@theme_selected_bg_color;
border-radius:2px;
}

File diff suppressed because it is too large Load Diff

@ -17,355 +17,200 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
msgid "Run the application as a user with a changed priority" #: source/ubl-strings.h:1
msgid "Version:"
msgstr "" msgstr ""
msgid "File view" #: source/ubl-strings.h:2
msgid "ublexec version:"
msgstr "" msgstr ""
msgid "Program view" #: source/ubl-strings.h:2 source/ubl-strings.h:4
msgid "Run as..."
msgstr "" msgstr ""
#: source/ublexec.h:32 source/ublexec.cc:181 source/ublexec.cc:182 #: source/ubl-strings.h:2
#: source/ublexec.cc:180 source/ublexec.cc:163 msgid "Usage:"
msgid " Run as..."
msgstr "" msgstr ""
#: source/ublexec.h:53 source/ublexec.cc:274 source/ublexec.cc:282 #: source/ubl-strings.h:2
#: source/ublexec.cc:313 source/ublexec.cc:272 source/ublexec.cc:280 msgid "[OPTIONS]"
#: source/ublexec.cc:311 source/ublexec.cc:242 source/ublexec.cc:250
#: source/ublexec.cc:281 source/ublexec.cc:236 source/ublexec.cc:244
#: source/ublexec.cc:275
msgid "-20 (High)"
msgstr "" msgstr ""
#: source/ublexec.h:52 source/ublexec.cc:290 source/ublexec.cc:298 #: source/ubl-strings.h:2
#: source/ublexec.cc:321 source/ublexec.cc:487 source/ublexec.cc:288 msgid "Options:"
#: source/ublexec.cc:296 source/ublexec.cc:319 source/ublexec.cc:485
#: source/ublexec.cc:258 source/ublexec.cc:266 source/ublexec.cc:289
#: source/ublexec.cc:426 source/ublexec.cc:252 source/ublexec.cc:260
#: source/ublexec.cc:283 source/ublexec.cc:413
msgid "0 (High)"
msgstr "" msgstr ""
#: source/ublexec.h:51 source/ublexec.cc:273 source/ublexec.cc:281 #: source/ubl-strings.h:2
#: source/ublexec.cc:289 source/ublexec.cc:297 source/ublexec.cc:312 msgid "Show this help"
#: source/ublexec.cc:320 source/ublexec.cc:486 source/ublexec.cc:271
#: source/ublexec.cc:279 source/ublexec.cc:287 source/ublexec.cc:295
#: source/ublexec.cc:310 source/ublexec.cc:318 source/ublexec.cc:484
#: source/ublexec.cc:241 source/ublexec.cc:249 source/ublexec.cc:257
#: source/ublexec.cc:265 source/ublexec.cc:280 source/ublexec.cc:288
#: source/ublexec.cc:425 source/ublexec.cc:235 source/ublexec.cc:243
#: source/ublexec.cc:251 source/ublexec.cc:259 source/ublexec.cc:274
#: source/ublexec.cc:282 source/ublexec.cc:412
msgid "19 (Low)"
msgstr "" msgstr ""
#: source/ublexec.h:33 source/ublexec.cc:177 source/ublexec.cc:176 #: source/ubl-strings.h:2
#: source/ublexec.cc:159 source/ublexec.cc:156 msgid "Show package version"
msgid "About"
msgstr "" msgstr ""
#: source/ublexec.h:34 #: source/ubl-strings.h:2
msgid "About ubl-settings-datetime" msgid "Lock this help menu"
msgstr "" msgstr ""
#: source/ublexec.h:45 source/ublexec.cc:218 source/ublexec.cc:216 #: source/ubl-strings.h:5
msgid "Always redirect" msgid "Run the application as a user with a changed priority"
msgstr "" msgstr ""
#: source/ublexec.h:72 source/ublexec.cc:210 source/ublexec.cc:208 #: source/ubl-strings.h:7
#: source/ublexec.cc:191 source/ublexec.cc:186 msgid "Operation succeeded"
msgid "Application Overview"
msgstr "" msgstr ""
#: source/ublexec.h:65 source/ublexec.cc:199 source/ublexec.cc:696 #: source/ubl-strings.h:9
#: source/ublexec.cc:765 source/ublexec.cc:197 source/ublexec.cc:694 msgid "About"
#: source/ublexec.cc:763 source/ublexec.cc:180 source/ublexec.cc:631
#: source/ublexec.cc:700
msgid "Attention"
msgstr "" msgstr ""
#: source/ublexec.h:44 source/ublexec.cc:217 source/ublexec.cc:215 #: source/ubl-strings.h:10
msgid "Cancel" msgid "Documentation"
msgstr "" msgstr ""
#: source/ublexec.h:69 source/ublexec.cc:196 source/ublexec.cc:194 #: source/ubl-strings.h:12 source/ubl-utils.c:1023
#: source/ublexec.cc:177 source/ublexec.cc:173 msgid "Cancel"
msgid "Change startup priority"
msgstr "" msgstr ""
#: source/ublexec.h:54 source/ublexec.cc:212 source/ublexec.cc:210 #: source/ubl-strings.h:13
#: source/main.cc:197 msgid "Open"
msgid "Close"
msgstr "" msgstr ""
#: source/ublexec.h:77 source/ublexec.cc:189 source/ublexec.cc:187 #: source/ubl-strings.h:15
#: source/ublexec.cc:170 source/ublexec.cc:166 msgid "Would you like to read documentation in the Web?"
msgid "Command Line"
msgstr "" msgstr ""
#: source/ublexec.h:27 source/ublexec.cc:173 source/ublexec.cc:172 #: source/ubl-strings.h:16
#: source/ublexec.cc:155 source/ublexec.cc:152 msgid ""
msgid "Copyright © UBSoft LLC, 2022 - " "You will be redirected to documentation website, where documentation is\n"
"translated and supported by community."
msgstr "" msgstr ""
#: source/ublexec.h:56 source/ublexec.cc:208 source/ublexec.cc:206 #: source/ubl-strings.h:17
#: source/ublexec.cc:189 source/ublexec.cc:184 msgid "Always redirect to online documentation"
msgid "Development"
msgstr "" msgstr ""
#: source/ublexec.h:59 source/ublexec.cc:205 source/ublexec.cc:203 #: source/ubl-strings.h:18
#: source/ublexec.cc:186 source/ublexec.cc:181 msgid "Open documentation"
msgid "Education"
msgstr "" msgstr ""
#: source/ublexec.h:71 source/ublexec.cc:211 source/ublexec.cc:209 #: source/ubl-strings.h:19
#: source/ublexec.cc:192 source/ublexec.cc:187 msgid "Project homepage"
msgid "File Overview"
msgstr "" msgstr ""
#: source/ublexec.h:49 #: source/ubl-strings.h:21
msgid ""
"GTK \"Run applications as another user with the specified priority\" for "
"UBLinux\n"
"\n"
"Usage: ublexec [OPTIONS...]\n"
"Options:\n"
" -h, --help\t Show this help\n"
" -V, --version\t Show package version\n"
" -x APP_NAME Running the program\n"
" -e FILE_NAME Running the file\n"
msgstr ""
#: source/ublexec.h:49
msgid ""
"GTK settings datetime for UBLinux\n"
"\n"
"Usage: ubl-settings-datetime [OPTIONS...]\n"
"Options:\n"
" -h, --help\t Show this help\n"
" -V, --version\t Show package version\n"
" --lock-datetime Lock date and time changes\n"
" --lock-timezone Lock time zone changes\n"
" --lock-ntp-mode Lock NTP mode selection\n"
" --lock-ntp-edit Lock editing NTP servers\n"
" --lock-sync-hwclock Lock sync hwclock mode selection\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 ""
#: source/ublexec.h:64 source/ublexec.cc:200 source/ublexec.cc:198
#: source/ublexec.cc:181 source/ublexec.cc:176
msgid "Graphics" msgid "Graphics"
msgstr "" msgstr ""
#: source/ublexec.h:35 source/ublexec.cc:176 source/ublexec.cc:175 #: source/ubl-strings.h:22
#: source/ublexec.cc:158 source/ublexec.cc:155 msgid "Tools"
msgid "Help"
msgstr "" msgstr ""
#: source/ublexec.h:62 source/ublexec.cc:202 source/ublexec.cc:200 #: source/ubl-strings.h:23
#: source/ublexec.cc:183 source/ublexec.cc:178
msgid "Internet" msgid "Internet"
msgstr "" msgstr ""
#: source/ublexec.h:37 #: source/ubl-strings.h:24
msgid "Load" msgid "Multimedia"
msgstr ""
#: source/ublexec.h:41
msgid "Load global configuration"
msgstr ""
#: source/ublexec.h:42
msgid "Load local configuration"
msgstr "" msgstr ""
#: source/ublexec.h:61 source/ublexec.cc:203 source/ublexec.cc:201 #: source/ubl-strings.h:25
#: source/ublexec.cc:184 source/ublexec.cc:179 msgid "Settings"
msgid "Multimedia"
msgstr "" msgstr ""
#: source/ublexec.h:46 #: source/ubl-strings.h:26
msgid "Nothing to save!" msgid "Education"
msgstr "" msgstr ""
#: source/ublexec.h:58 source/ublexec.cc:206 source/ublexec.cc:204 #: source/ubl-strings.h:27
#: source/ublexec.cc:187 source/ublexec.cc:182
msgid "Office" msgid "Office"
msgstr "" msgstr ""
#: source/ublexec.h:57 source/ublexec.cc:207 source/ublexec.cc:205 #: source/ubl-strings.h:28
#: source/ublexec.cc:188 source/ublexec.cc:183
msgid "Other" msgid "Other"
msgstr "" msgstr ""
#: source/ublexec.h:76 source/ublexec.cc:186 source/ublexec.cc:184 #: source/ubl-strings.h:29
#: source/ublexec.cc:167 source/ublexec.cc:163 msgid "Development"
msgid "Please select File"
msgstr ""
#: source/ublexec.h:66 source/ublexec.cc:195 source/ublexec.cc:193
#: source/ublexec.cc:176 source/ublexec.cc:172
msgid "Priority"
msgstr ""
#: source/ublexec.cc:197 source/ublexec.cc:195 source/ublexec.cc:178
#: source/ublexec.cc:174
msgid "Priority:"
msgstr ""
#: source/ublexec.h:31 source/ublexec.cc:179 source/ublexec.cc:178
#: source/ublexec.cc:161 source/ublexec.cc:158
msgid "Project Home Page"
msgstr ""
#: source/ublexec.h:43 source/ublexec.cc:216 source/ublexec.cc:214
msgid "Read online"
msgstr "" msgstr ""
#: source/ublexec.h:80 source/ublexec.cc:185 source/ublexec.cc:183 #: source/ubl-strings.h:30
#: source/ublexec.cc:162 msgid "System"
msgid "Run"
msgstr "" msgstr ""
#: source/ublexec.h:73 source/ublexec.cc:188 source/ublexec.cc:186 #: source/ubl-strings.h:32
#: source/ublexec.cc:169 source/ublexec.cc:165 msgid "-20 (High)"
msgid ""
"Run applications as another user\n"
"with the specified priority"
msgstr "" msgstr ""
msgid "Run as another user" #: source/ubl-strings.h:33
msgid "0 (High)"
msgstr "" msgstr ""
#: source/ublexec.h:67 source/ublexec.cc:193 source/ublexec.cc:191 #: source/ubl-strings.h:34
#: source/ublexec.cc:174 source/ublexec.cc:170 msgid "19 (Low)"
msgid "Run as another user:"
msgstr "" msgstr ""
#: source/ublexec.h:28 source/ublexec.cc:178 source/ublexec.cc:183 #: source/ubl-strings.h:36
#: source/ublexec.cc:184 source/ublexec.cc:220 source/ublexec.cc:221 msgid "Choose application or file for running"
#: source/ublexec.cc:177 source/ublexec.cc:181 source/ublexec.cc:182
#: source/ublexec.cc:218 source/ublexec.cc:219 source/ublexec.cc:160
#: source/ublexec.cc:164 source/ublexec.cc:165 source/ublexec.cc:166
msgid "Run as..."
msgstr "" msgstr ""
#: source/ublexec.h:70 source/ublexec.cc:191 source/ublexec.cc:189 #: source/ubl-strings.h:38
#: source/ublexec.cc:172 source/ublexec.cc:168
msgid "Run in the terminal emulator" msgid "Run in the terminal emulator"
msgstr "" msgstr ""
#: source/ublexec.h:36 #: source/ubl-strings.h:39
msgid "Save" msgid "File or app for running"
msgstr "" msgstr ""
#: source/ublexec.h:40 #: source/ubl-strings.h:40
msgid "Save global configuration" msgid "Run as another user:"
msgstr ""
#: source/ublexec.h:39
msgid "Save local configuration"
msgstr ""
#: source/ublexec.h:38
msgid "Save to global and local configuration"
msgstr "" msgstr ""
#: source/ublexec.h:68 source/ublexec.cc:198 source/ublexec.cc:196 #: source/ubl-strings.h:41
#: source/ublexec.cc:179 source/ublexec.cc:175 msgid "Username:"
msgid "Select an executable file or program"
msgstr "" msgstr ""
#: source/ublexec.h:75 source/ublexec.cc:187 source/ublexec.cc:185 #: source/ubl-strings.h:42
#: source/ublexec.cc:168 source/ublexec.cc:164 msgid "Priority"
msgid "Selecting Programs"
msgstr "" msgstr ""
#: source/ublexec.h:60 source/ublexec.cc:204 source/ublexec.cc:202 #: source/ubl-strings.h:43
#: source/ublexec.cc:185 source/ublexec.cc:180 msgid "Change startup priority"
msgid "Settings"
msgstr "" msgstr ""
#: source/ublexec.h:55 source/ublexec.cc:209 source/ublexec.cc:207 #: source/ubl-strings.h:44
#: source/ublexec.cc:190 source/ublexec.cc:185 msgid "Priority:"
msgid "System"
msgstr "" msgstr ""
msgid "Team" #: source/ubl-strings.h:45
msgid "Command line"
msgstr "" msgstr ""
#: source/ublexec.h:79 source/ublexec.cc:190 source/ublexec.cc:188 #: source/ubl-strings.h:46
#: source/ublexec.cc:171 source/ublexec.cc:167 msgid "Run"
msgid "Team:"
msgstr "" msgstr ""
#: source/ublexec.h:63 source/ublexec.cc:201 source/ublexec.cc:199 #: source/ubl-strings.h:47
#: source/ublexec.cc:182 source/ublexec.cc:177 msgid "Edit"
msgid "Tools"
msgstr "" msgstr ""
#: source/ublexec.h:78 source/ublexec.cc:192 source/ublexec.cc:190 #: source/ubl-strings.h:48
#: source/ublexec.cc:173 source/ublexec.cc:169
msgid "User" msgid "User"
msgstr "" msgstr ""
msgid "User Name" #: source/ubl-strings.h:50
msgstr "" msgid "File view"
#: source/ublexec.h:74 source/ublexec.cc:194 source/ublexec.cc:192
#: source/ublexec.cc:175 source/ublexec.cc:171
msgid "User Name:"
msgstr ""
#: source/ublexec.h:47 source/ublexec.cc:213 source/ublexec.cc:211
msgid "Would you like to read documentation in the Web?"
msgstr ""
#: source/ublexec.h:48 source/ublexec.cc:214 source/ublexec.cc:212
"You will be redirected to documentation website where documentation is\n"
"translated and supported by community."
msgstr ""
#: source/ublexec.h:30 source/ublexec.cc:175 source/ublexec.cc:174
#: source/ublexec.cc:157 source/ublexec.cc:154
msgid "https://wiki.ublinux.com"
msgstr ""
#: source/ublexec.cc:321 source/ublexec.cc:313
msgid ""
"https://wiki.ublinux.com/ru/Программное_обеспечениерограммы_и_утилиты/Все/"
msgstr ""
msgid "pkexec"
msgstr ""
msgid "su"
msgstr ""
msgid "sudo"
msgstr ""
#: source/ublexec.cc:219 source/ublexec.cc:217
msgid "ubl-settings-bootloader"
msgstr ""
#: source/ublexec.h:29 source/ublexec.cc:157 source/ublexec.cc:160
#: source/ublexec.cc:161
msgid "ublexec"
msgstr "" msgstr ""
#: source/ublexec.h:50 source/main.cc:60 source/main.cc:970 #: source/ubl-strings.h:51
msgid "ublexec version: " msgid "Applications view"
msgstr "" msgstr ""
msgid "ОК" #: source/ubl-utils.c:1022
msgid "Applications"
msgstr "" msgstr ""
#: source/ublexec.cc:193 #: source/ubl-utils.c:1023
msgid "Сancel" msgid "Accept"
msgstr "" msgstr ""

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: ublexec 1.0\n" "Project-Id-Version: ublexec 1.0\n"
"Report-Msgid-Bugs-To: info@ublinux.com\n" "Report-Msgid-Bugs-To: info@ublinux.com\n"
"POT-Creation-Date: 2023-04-24 11:43+0600\n" "POT-Creation-Date: 2023-04-25 15:52+0600\n"
"PO-Revision-Date: 2023-01-01 00:00+0600\n" "PO-Revision-Date: 2023-01-01 00:00+0600\n"
"Last-Translator: UBLinux Team <info@ublinux.com>\n" "Last-Translator: UBLinux Team <info@ublinux.com>\n"
"Language-Team: Russian - UBLinux Team <info@ublinux.com>\n" "Language-Team: Russian - UBLinux Team <info@ublinux.com>\n"
@ -17,374 +17,203 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
msgid "Run the application as a user with a changed priority" #: source/ubl-strings.h:1
msgstr "Выполнить приложение от имени пользователя с изменённым приоритетом" msgid "Version:"
msgstr "Версия:"
msgid "File view"
msgstr "Обзор файлов"
msgid "Program view" #: source/ubl-strings.h:2
msgstr "Обзор программ" #, fuzzy
msgid "ublexec version:"
msgstr "ublexec версия: "
#: source/ublexec.h:32 source/ublexec.cc:181 source/ublexec.cc:182 #: source/ubl-strings.h:2 source/ubl-strings.h:4
#: source/ublexec.cc:180 source/ublexec.cc:163
msgid "Run as..." msgid "Run as..."
msgstr "О программе Выполнить как..." msgstr "Выполнить как..."
#: source/ublexec.h:53 source/ublexec.cc:274 source/ublexec.cc:282 #: source/ubl-strings.h:2
#: source/ublexec.cc:313 source/ublexec.cc:272 source/ublexec.cc:280 msgid "Usage:"
#: source/ublexec.cc:311 source/ublexec.cc:242 source/ublexec.cc:250 msgstr "Использование:"
#: source/ublexec.cc:281 source/ublexec.cc:236 source/ublexec.cc:244
#: source/ublexec.cc:275
msgid "-20 (High)"
msgstr "-20 (Высокий)"
#: source/ublexec.h:52 source/ublexec.cc:290 source/ublexec.cc:298 #: source/ubl-strings.h:2
#: source/ublexec.cc:321 source/ublexec.cc:487 source/ublexec.cc:288 msgid "[OPTIONS]"
#: source/ublexec.cc:296 source/ublexec.cc:319 source/ublexec.cc:485 msgstr "[АРГУМЕНТЫ]"
#: source/ublexec.cc:258 source/ublexec.cc:266 source/ublexec.cc:289
#: source/ublexec.cc:426 source/ublexec.cc:252 source/ublexec.cc:260
#: source/ublexec.cc:283 source/ublexec.cc:413
msgid "0 (High)"
msgstr "0 (Высокий)"
#: source/ublexec.h:51 source/ublexec.cc:273 source/ublexec.cc:281 #: source/ubl-strings.h:2
#: source/ublexec.cc:289 source/ublexec.cc:297 source/ublexec.cc:312 msgid "Options:"
#: source/ublexec.cc:320 source/ublexec.cc:486 source/ublexec.cc:271 msgstr "Аргументы:"
#: source/ublexec.cc:279 source/ublexec.cc:287 source/ublexec.cc:295
#: source/ublexec.cc:310 source/ublexec.cc:318 source/ublexec.cc:484
#: source/ublexec.cc:241 source/ublexec.cc:249 source/ublexec.cc:257
#: source/ublexec.cc:265 source/ublexec.cc:280 source/ublexec.cc:288
#: source/ublexec.cc:425 source/ublexec.cc:235 source/ublexec.cc:243
#: source/ublexec.cc:251 source/ublexec.cc:259 source/ublexec.cc:274
#: source/ublexec.cc:282 source/ublexec.cc:412
msgid "19 (Low)"
msgstr "19 (Низкий)"
#: source/ublexec.h:33 source/ublexec.cc:177 source/ublexec.cc:176 #: source/ubl-strings.h:2
#: source/ublexec.cc:159 source/ublexec.cc:156 msgid "Show this help"
msgid "About" msgstr "Показать эту подсказку"
msgstr "О программе"
#: source/ublexec.h:34 #: source/ubl-strings.h:2
msgid "About ubl-settings-datetime" msgid "Show package version"
msgstr "" msgstr "Показать версию пакета"
#: source/ublexec.h:45 source/ublexec.cc:218 source/ublexec.cc:216 #: source/ubl-strings.h:2
msgid "Always redirect" msgid "Lock this help menu"
msgstr "Всегда перенаправлять" msgstr "Заблокироват справку"
#: source/ublexec.h:72 source/ublexec.cc:210 source/ublexec.cc:208 #: source/ubl-strings.h:5
#: source/ublexec.cc:191 source/ublexec.cc:186 msgid "Run the application as a user with a changed priority"
msgid "Application Overview" msgstr "Выполнить приложение от имени пользователя с изменённым приоритетом"
msgstr "Обзор приложений"
#: source/ublexec.h:65 source/ublexec.cc:199 source/ublexec.cc:696 #: source/ubl-strings.h:7
#: source/ublexec.cc:765 source/ublexec.cc:197 source/ublexec.cc:694 msgid "Operation succeeded"
#: source/ublexec.cc:763 source/ublexec.cc:180 source/ublexec.cc:631 msgstr "Операция завершена"
#: source/ublexec.cc:700
msgid "Attention"
msgstr "Внимание"
#: source/ublexec.h:44 source/ublexec.cc:217 source/ublexec.cc:215 #: source/ubl-strings.h:9
msgid "Cancel" msgid "About"
msgstr "Отменить" msgstr "О программе"
#: source/ublexec.h:69 source/ublexec.cc:196 source/ublexec.cc:194 #: source/ubl-strings.h:10
#: source/ublexec.cc:177 source/ublexec.cc:173 msgid "Documentation"
msgid "Change startup priority" msgstr "Справка"
msgstr "Изменить приоритет запуска"
#: source/ublexec.h:54 source/ublexec.cc:212 source/ublexec.cc:210 #: source/ubl-strings.h:12 source/ubl-utils.c:1023
#: source/main.cc:197 msgid "Cancel"
msgid "Close" msgstr "Отменить"
msgstr "Закрыть"
#: source/ublexec.h:77 source/ublexec.cc:189 source/ublexec.cc:187 #: source/ubl-strings.h:13
#: source/ublexec.cc:170 source/ublexec.cc:166 msgid "Open"
msgid "Command Line" msgstr "Открыть"
msgstr "Командная строка"
#: source/ublexec.h:27 source/ublexec.cc:173 source/ublexec.cc:172 #: source/ubl-strings.h:15
#: source/ublexec.cc:155 source/ublexec.cc:152 msgid "Would you like to read documentation in the Web?"
msgid "Copyright © UBSoft LLC, 2022 - " msgstr "Вы хотите прочитать справку в Сети?"
msgstr "Авторские права © ООО \"Юбисофт\", 2022 - "
#: source/ublexec.h:56 source/ublexec.cc:208 source/ublexec.cc:206 #: source/ubl-strings.h:16
#: source/ublexec.cc:189 source/ublexec.cc:184 msgid ""
msgid "Development" "You will be redirected to documentation website, where documentation is\n"
msgstr "Разработка" "translated and supported by community."
msgstr ""
"Вы будете перенаправлены на сайт с документацией, где страницы помощи\n"
"переводятся и поддерживаются сообществом."
#: source/ublexec.h:59 source/ublexec.cc:205 source/ublexec.cc:203 #: source/ubl-strings.h:17
#: source/ublexec.cc:186 source/ublexec.cc:181 msgid "Always redirect to online documentation"
msgid "Education" msgstr "Всегда перенаправлять на онлайн документацию"
msgstr "Образование"
#: source/ublexec.h:71 source/ublexec.cc:211 source/ublexec.cc:209 #: source/ubl-strings.h:18
#: source/ublexec.cc:192 source/ublexec.cc:187 msgid "Open documentation"
msgid "File Overview" msgstr "Открыть документацию"
msgstr "Обзор файлов"
#: source/ublexec.h:49 #: source/ubl-strings.h:19
msgid "" msgid "Project homepage"
"GTK \"Run applications as another user with the specified priority\" for " msgstr "Домашняя страница проекта"
"UBLinux\n"
"\n"
"Usage: ublexec [OPTIONS...]\n"
"Options:\n"
" -h, --help\t Show this help\n"
" -V, --version\t Show package version\n"
" -x APP_NAME Running the program\n"
" -e FILE_NAME Running the file\n"
msgstr ""
"GTK-утилита \"Запускать приложения от имени другого пользователя с указанным "
"приоритетом\" для UBLinux\n"
"\n"
"Использование: ublexec [Параметры приложения...]\n"
"Параметры приложения:\n"
" -h, --help\t Показать параметры справки\n"
" -V, --version\t Показать версию пакета\n"
" -x APP_NAME Запуск программы\n"
" -e FILE_NAME Запуск файла\n"
#: source/ublexec.h:49
msgid ""
"GTK settings datetime for UBLinux\n"
"\n"
"Usage: ubl-settings-datetime [OPTIONS...]\n"
"Options:\n"
" -h, --help\t Show this help\n"
" -V, --version\t Show package version\n"
" --lock-datetime Lock date and time changes\n"
" --lock-timezone Lock time zone changes\n"
" --lock-ntp-mode Lock NTP mode selection\n"
" --lock-ntp-edit Lock editing NTP servers\n"
" --lock-sync-hwclock Lock sync hwclock mode selection\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 ""
#: source/ublexec.h:64 source/ublexec.cc:200 source/ublexec.cc:198 #: source/ubl-strings.h:21
#: source/ublexec.cc:181 source/ublexec.cc:176
msgid "Graphics" msgid "Graphics"
msgstr "Графика" msgstr "Графика"
#: source/ublexec.h:35 source/ublexec.cc:176 source/ublexec.cc:175 #: source/ubl-strings.h:22
#: source/ublexec.cc:158 source/ublexec.cc:155 msgid "Tools"
msgid "Help" msgstr "Инструменты"
msgstr "Справка"
#: source/ublexec.h:62 source/ublexec.cc:202 source/ublexec.cc:200 #: source/ubl-strings.h:23
#: source/ublexec.cc:183 source/ublexec.cc:178
msgid "Internet" msgid "Internet"
msgstr "Интернет" msgstr "Интернет"
#: source/ublexec.h:37 #: source/ubl-strings.h:24
msgid "Load"
msgstr ""
#: source/ublexec.h:41
msgid "Load global configuration"
msgstr ""
#: source/ublexec.h:42
msgid "Load local configuration"
msgstr ""
#: source/ublexec.h:61 source/ublexec.cc:203 source/ublexec.cc:201
#: source/ublexec.cc:184 source/ublexec.cc:179
msgid "Multimedia" msgid "Multimedia"
msgstr "Мультимедиа" msgstr "Мультимедиа"
#: source/ublexec.h:46 #: source/ubl-strings.h:25
msgid "Nothing to save!" msgid "Settings"
msgstr "" msgstr "Настройки"
#: source/ublexec.h:58 source/ublexec.cc:206 source/ublexec.cc:204 #: source/ubl-strings.h:26
#: source/ublexec.cc:187 source/ublexec.cc:182 msgid "Education"
msgstr "Образование"
#: source/ubl-strings.h:27
msgid "Office" msgid "Office"
msgstr "Офис" msgstr "Офис"
#: source/ublexec.h:57 source/ublexec.cc:207 source/ublexec.cc:205 #: source/ubl-strings.h:28
#: source/ublexec.cc:188 source/ublexec.cc:183
msgid "Other" msgid "Other"
msgstr "Прочие" msgstr "Прочие"
#: source/ublexec.h:76 source/ublexec.cc:186 source/ublexec.cc:184 #: source/ubl-strings.h:29
#: source/ublexec.cc:167 source/ublexec.cc:163 msgid "Development"
msgid "Please select File" msgstr "Разработка"
msgstr "Пожалуйста выберите Файл"
#: source/ublexec.h:66 source/ublexec.cc:195 source/ublexec.cc:193
#: source/ublexec.cc:176 source/ublexec.cc:172
msgid "Priority"
msgstr "Приоритет"
#: source/ublexec.cc:197 source/ublexec.cc:195 source/ublexec.cc:178
#: source/ublexec.cc:174
msgid "Priority:"
msgstr "Приоритет:"
#: source/ublexec.h:31 source/ublexec.cc:179 source/ublexec.cc:178
#: source/ublexec.cc:161 source/ublexec.cc:158
msgid "Project Home Page"
msgstr "Домашняя страница проекта"
#: source/ublexec.h:43 source/ublexec.cc:216 source/ublexec.cc:214
msgid "Read online"
msgstr "Прочитать онлайн"
#: source/ublexec.h:80 source/ublexec.cc:185 source/ublexec.cc:183 #: source/ubl-strings.h:30
#: source/ublexec.cc:162 msgid "System"
msgid "Run" msgstr "Система"
msgstr "Запустить"
#: source/ublexec.h:73 source/ublexec.cc:188 source/ublexec.cc:186 #: source/ubl-strings.h:32
#: source/ublexec.cc:169 source/ublexec.cc:165 msgid "-20 (High)"
msgid "" msgstr "-20 (Высокий)"
"Run applications as another user\n"
"with the specified priority"
msgstr ""
"Запускать приложения от имени другого пользователя\n"
"с указанным приоритетом"
#, fuzzy #: source/ubl-strings.h:33
msgid "Run as another user" msgid "0 (High)"
msgstr "Выполнить от имени другого пользователя:" msgstr "0 (Высокий)"
#: source/ublexec.h:67 source/ublexec.cc:193 source/ublexec.cc:191 #: source/ubl-strings.h:34
#: source/ublexec.cc:174 source/ublexec.cc:170 msgid "19 (Low)"
msgid "Run as another user:" msgstr "19 (Низкий)"
msgstr "Выполнить от имени другого пользователя:"
#: source/ublexec.h:28 source/ublexec.cc:178 source/ublexec.cc:183 #: source/ubl-strings.h:36
#: source/ublexec.cc:184 source/ublexec.cc:220 source/ublexec.cc:221 msgid "Choose application or file for running"
#: source/ublexec.cc:177 source/ublexec.cc:181 source/ublexec.cc:182 msgstr "Выберите приложение или файл для запуска"
#: source/ublexec.cc:218 source/ublexec.cc:219 source/ublexec.cc:160
#: source/ublexec.cc:164 source/ublexec.cc:165 source/ublexec.cc:166
msgid "Run as..."
msgstr "Выполнить как..."
#: source/ublexec.h:70 source/ublexec.cc:191 source/ublexec.cc:189 #: source/ubl-strings.h:38
#: source/ublexec.cc:172 source/ublexec.cc:168
msgid "Run in the terminal emulator" msgid "Run in the terminal emulator"
msgstr "Выполнить в эмуляторе терминала" msgstr "Запустить в эмуляторе терминала"
#: source/ublexec.h:36 #: source/ubl-strings.h:39
msgid "Save" msgid "File or app for running"
msgstr "" msgstr "Запуск приложения или файла"
#: source/ublexec.h:40
msgid "Save global configuration"
msgstr ""
#: source/ublexec.h:39
msgid "Save local configuration"
msgstr ""
#: source/ublexec.h:38 #: source/ubl-strings.h:40
msgid "Save to global and local configuration" msgid "Run as another user:"
msgstr "" msgstr "Выполнить от имени другого пользователя с помощью:"
#: source/ublexec.h:68 source/ublexec.cc:198 source/ublexec.cc:196 #: source/ubl-strings.h:41
#: source/ublexec.cc:179 source/ublexec.cc:175 msgid "Username:"
msgid "Select an executable file or program" msgstr "Имя пользователя:"
msgstr "Выберите исполняемый файл или программу"
#: source/ublexec.h:75 source/ublexec.cc:187 source/ublexec.cc:185 #: source/ubl-strings.h:42
#: source/ublexec.cc:168 source/ublexec.cc:164 msgid "Priority"
msgid "Selecting Programs" msgstr "Приоритет"
msgstr "Выбор программ"
#: source/ublexec.h:60 source/ublexec.cc:204 source/ublexec.cc:202 #: source/ubl-strings.h:43
#: source/ublexec.cc:185 source/ublexec.cc:180 msgid "Change startup priority"
msgid "Settings" msgstr "Изменить приоритет запуска"
msgstr "Настройки"
#: source/ublexec.h:55 source/ublexec.cc:209 source/ublexec.cc:207 #: source/ubl-strings.h:44
#: source/ublexec.cc:190 source/ublexec.cc:185 msgid "Priority:"
msgid "System" msgstr "Приоритет:"
msgstr "Система"
#, fuzzy #: source/ubl-strings.h:45
msgid "Team" msgid "Command line"
msgstr "Команда:" msgstr "Команда выполнения"
#: source/ublexec.h:79 source/ublexec.cc:190 source/ublexec.cc:188 #: source/ubl-strings.h:46
#: source/ublexec.cc:171 source/ublexec.cc:167 msgid "Run"
msgid "Team:" msgstr "Запустить"
msgstr "Команда:"
#: source/ublexec.h:63 source/ublexec.cc:201 source/ublexec.cc:199 #: source/ubl-strings.h:47
#: source/ublexec.cc:182 source/ublexec.cc:177 msgid "Edit"
msgid "Tools" msgstr "Редактировать"
msgstr "Инструменты"
#: source/ublexec.h:78 source/ublexec.cc:192 source/ublexec.cc:190 #: source/ubl-strings.h:48
#: source/ublexec.cc:173 source/ublexec.cc:169
msgid "User" msgid "User"
msgstr "Пользователь" msgstr "Пользователь"
#, fuzzy #: source/ubl-strings.h:50
msgid "User Name" msgid "File view"
msgstr "Имя пользователя:" msgstr "Обзор файлов"
#: source/ublexec.h:74 source/ublexec.cc:194 source/ublexec.cc:192
#: source/ublexec.cc:175 source/ublexec.cc:171
msgid "User Name:"
msgstr "Имя пользователя:"
#: source/ublexec.h:47 source/ublexec.cc:213 source/ublexec.cc:211
msgid "Would you like to read documentation in the Web?"
msgstr "Вы хотите прочитать справку в Сети?"
#: source/ublexec.h:48 source/ublexec.cc:214 source/ublexec.cc:212
msgid ""
"You will be redirected to documentation website where documentation is\n"
"translated and supported by community."
msgstr ""
"Вы будете перенаправлены на сайт с документацией где страницы помощи\n"
"переводятся и поддерживаются сообществом."
#: source/ublexec.h:30 source/ublexec.cc:175 source/ublexec.cc:174
#: source/ublexec.cc:157 source/ublexec.cc:154
msgid "https://wiki.ublinux.com"
msgstr "https://wiki.ublinux.ru"
#: source/ublexec.cc:321 source/ublexec.cc:313
msgid ""
"https://wiki.ublinux.com/ru/Программное_обеспечениерограммы_и_утилиты/Все/"
msgstr ""
"https://wiki.ublinux.ru/ru/Программное_обеспечениерограммы_и_утилиты/Все/"
msgid "pkexec"
msgstr "pkexec"
msgid "su"
msgstr "su"
msgid "sudo"
msgstr "sudo"
#: source/ublexec.cc:219 source/ublexec.cc:217
msgid "ubl-settings-bootloader"
msgstr ""
#: source/ublexec.h:29 source/ublexec.cc:157 source/ublexec.cc:160
#: source/ublexec.cc:161
#, fuzzy
msgid "ublexec"
msgstr "pkexec"
#: source/ublexec.h:50 source/main.cc:60 source/main.cc:970 #: source/ubl-strings.h:51
msgid "ublexec version: " msgid "Applications view"
msgstr "ublexec версия: " msgstr "Обзор приложений"
msgid "ОК" #: source/ubl-utils.c:1022
msgstr "ОК" msgid "Applications"
msgstr "Обзор приложений"
#: source/ublexec.cc:193 #: source/ubl-utils.c:1023
msgid "Сancel" msgid "Accept"
msgstr "Отмена" msgstr "Принять"

Loading…
Cancel
Save