Часть переменных вынесены в отдельный файл

pull/35/head
Igor Belitskiy 3 years ago
parent a0a690a928
commit abbf4c1e68

@ -29,7 +29,7 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wall -Wextra -Werror -Wmissin
-fstack-clash-protection -fcf-protection -g") -fstack-clash-protection -fcf-protection -g")
set(SOURCE_FILES set(SOURCE_FILES
my_cmd.h my_cmd_and_path.h
ublexec-cm.h ublexec-cm.h
main.cc main.cc
ublexec.cc ublexec.cc

@ -9,7 +9,7 @@ int main(int argc, char** argv) {
setlocale(LC_ALL, ""); setlocale(LC_ALL, "");
bindtextdomain("ublexec", "/usr/share/locale/"); bindtextdomain("ublexec", "/usr/share/locale/");
bind_textdomain_codeset("ublexec", "UTF-8"); bind_textdomain_codeset("ublexec", "UTF-8");
textdomain(app_name.c_str()); textdomain(app_name);
if (argc > 1){ if (argc > 1){
str_argv = argv[1]; str_argv = argv[1];
} }

@ -4,4 +4,10 @@
#define link_doc "https://wiki.ublinux.com/ru/Программное_обеспечениерограммы_и_утилиты/Все/ublexec" #define link_doc "https://wiki.ublinux.com/ru/Программное_обеспечениерограммы_и_утилиты/Все/ublexec"
#define cmd_xdg "xdg-open " #define cmd_xdg "xdg-open "
#define cmd_execute "su -l %s -c \" DISPLAY=$DISPLAY %s \"" #define cmd_execute "su -l %s -c \" DISPLAY=$DISPLAY %s \""
#endif #define path_app "/usr/bin/"
#define path_glade "/usr/share/ublexec/ui/ublexec.glade"
#define path_css "/usr/share/ublexec/css/ublexec.css"
#define app_name "ublexec"
#define path_img_head_background "/usr/share/ublexec/images/logo-background.png"
#endif

@ -1,14 +1,10 @@
#include "ublexec.h" #include "ublexec.h"
using namespace std; using namespace std;
const string path_app = "/usr/bin/";
const string path_glade = "/usr/share/ublexec/ui/ublexec.glade";
const string path_css = "/usr/share/ublexec/css/ublexec.css";
const string app_name = "ublexec";
int flag_prog_file = 0; int flag_prog_file = 0;
string name_app_cmd = ""; string name_app_cmd = "";
string version_application = "2.24"; string version_application = "2.24";
const string path_img_head_background = "/usr/share/ublexec/images/logo-background.png";
int socket_ext_id_I = 0; int socket_ext_id_I = 0;
int socket_trd_id_I = 0; int socket_trd_id_I = 0;
@ -379,6 +375,7 @@ void MainWindow::open_browser() {
this->template_open_browser(); this->template_open_browser();
#endif #endif
} }
void MainWindow::template_open_browser() { void MainWindow::template_open_browser() {
string cmd = cmd_xdg + string(_(link_doc)) + " &"; string cmd = cmd_xdg + string(_(link_doc)) + " &";
string buf = ""; string buf = "";
@ -392,6 +389,7 @@ void MainWindow::template_open_browser() {
} }
index_error = system(cmd.c_str()); index_error = system(cmd.c_str());
} }
void MainWindow::icon_clear() { void MainWindow::icon_clear() {
list_Graphics->clear(); list_Graphics->clear();
list_Tools->clear(); list_Tools->clear();

@ -19,7 +19,7 @@
#include <dlfcn.h> #include <dlfcn.h>
#include "ubl-util-standard.c" #include "ubl-util-standard.c"
#include "ublexec-cm.h" #include "ublexec-cm.h"
#include "my_cmd.h" #include "my_cmd_and_path.h"
#include "my_localization.h" #include "my_localization.h"
#include <stdbool.h> #include <stdbool.h>
#ifdef WEBKIT_FOUND #ifdef WEBKIT_FOUND
@ -28,13 +28,7 @@
#endif #endif
using namespace std; using namespace std;
extern const string path_app;
extern const string app_name;
extern const string path_glade;
extern const string path_css;
extern string name_app_cmd; extern string name_app_cmd;
extern const string path_img_head_background;
extern int socket_ext_id_I; extern int socket_ext_id_I;
extern int socket_trd_id_I; extern int socket_trd_id_I;
extern int flag_prog_file; extern int flag_prog_file;

Loading…
Cancel
Save