Merge branch 'devel'

pull/3/head
Igor Belitskiy 3 years ago
commit 30dfaee8d6

@ -20,6 +20,11 @@ all: init build
init: init:
@echo "Initialize ..."; \ @echo "Initialize ..."; \
version="$$(cat VERSION.md)"; \
version=$${version:8}; \
search="s/string version_application.*$&"; \
replace="string version_application = \"$${version}\";"; \
sed -i -e "$$search/$$replace/gi" source/ublexec.h; \
echo "-- Build path: ${CMAKE_BUILD_DIR}" echo "-- Build path: ${CMAKE_BUILD_DIR}"
depend: depend:

@ -0,0 +1 @@
VERSION 1.0

@ -10,7 +10,7 @@ add_definitions(${GTK_CFLAGS_OTHER})
find_package(Threads REQUIRED) find_package(Threads REQUIRED)
#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 -std=c++2a -g")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wmissing-declarations -fdiagnostics-color=always -g") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wmissing-declarations -fdiagnostics-color=always")
set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_STANDARD_REQUIRED ON)

@ -141,10 +141,12 @@ void MainWindow::add_CSS(){
} }
void MainWindow::localization(){ void MainWindow::localization(){
btnSynopsis->set_label(_("Synopsis")); aboutWindows->set_website(_("https://wiki.ublinux.com"));
btnSynopsis->set_label(_("Help"));
btnAbout->set_label(_("About the program")); btnAbout->set_label(_("About the program"));
aboutWindows->set_comments(_("ublexec")); aboutWindows->set_comments(_("ublexec"));
aboutWindows->set_website_label(_("Project Home Page")); aboutWindows->set_website_label(_("Project Home Page"));
aboutWindows->set_version(_(version_application.c_str()));
lblHeaderName->set_text(_("ublexec")); lblHeaderName->set_text(_("ublexec"));
this->set_title(_("ublexec")); this->set_title(_("ublexec"));
btnStart->set_label(_("Run")); btnStart->set_label(_("Run"));
@ -217,7 +219,7 @@ void MainWindow::delete_cmd(const int &x,const int &y){
bool MainWindow::focus_in_txt_cmd(GdkEventFocus* event){ bool MainWindow::focus_in_txt_cmd(GdkEventFocus* event){
if (user_cmd.length() != 0){ if (user_cmd.length() != 0){
//user_cmd_old = user_cmd; //user_cmd_old = user_cmd;gi
} }
else if (name_app.length() != 0){ else if (name_app.length() != 0){
//name_app_old = name_app; //name_app_old = name_app;
@ -323,7 +325,6 @@ void MainWindow::unselect_icon(Gtk::IconView *icon_entry){
} }
void MainWindow::settings(){ void MainWindow::settings(){
system("nohup xhost + local: > /dev/null 2>&1 &");
this->pars_apps(); this->pars_apps();
this->get_builder(); this->get_builder();
this->event(); this->event();
@ -399,13 +400,7 @@ void MainWindow::tempalte_row(string Name, string Exec, string path , Glib::Ref
Gtk::TreeModel::Row row = *(dtk_list->append()); Gtk::TreeModel::Row row = *(dtk_list->append());
row[m_Columns.m_col_filename] = path; row[m_Columns.m_col_filename] = path;
row[m_Columns.m_col_description] = Name; row[m_Columns.m_col_description] = Name;
if (std::ifstream(path)){ row[m_Columns.icon_name] = path;
row[m_Columns.m_col_pixbuf] = Gdk::Pixbuf::create_from_file(path);
}
else{
path = "/usr/share/icons/Faenza/emblems/16/emblem-danger.png";
row[m_Columns.m_col_pixbuf] = Gdk::Pixbuf::create_from_file(path);
}
row[m_Columns.app_name_exec] = Exec; row[m_Columns.app_name_exec] = Exec;
row[m_Columns.float_h_align] = 0.5; row[m_Columns.float_h_align] = 0.5;
row[m_Columns.float_w_align] = 0.5; row[m_Columns.float_w_align] = 0.5;
@ -425,7 +420,7 @@ void MainWindow::open_list_app(){
string path = ""; string path = "";
for ( const auto &st_app : list_app){ for ( const auto &st_app : list_app){
for ( const auto &str_categor : st_app.Categories){ for ( const auto &str_categor : st_app.Categories){
path = "/usr/share/icons/hicolor/16x16/apps/" + st_app.Icon + ".png"; path = st_app.Icon;
if (str_categor=="Graphics"){ if (str_categor=="Graphics"){
this->tempalte_row(st_app.Name,st_app.Exec, path, list_Graphics); this->tempalte_row(st_app.Name,st_app.Exec, path, list_Graphics);
} }
@ -505,6 +500,11 @@ string MainWindow::start_cmd(string user_cmd){
} }
} }
} }
if (cmbUser->get_active_text().length()!=0){
string user_cmd_X = "xhost +SI:localuser:";
user_cmd_X += cmbUser->get_active_text();
system(user_cmd_X.c_str());
}
if ((cbxExecuteEpriority->get_active()) && (chbAnotherUser->get_active()==false)){ if ((cbxExecuteEpriority->get_active()) && (chbAnotherUser->get_active()==false)){
str_nice_cmd = " nice -n " + to_string(spinPriority->get_value_as_int()) + " "; str_nice_cmd = " nice -n " + to_string(spinPriority->get_value_as_int()) + " ";
} }

@ -88,7 +88,6 @@ public:
void denamic_cmd(); void denamic_cmd();
bool focus_out_txt_cmd(GdkEventFocus* event); bool focus_out_txt_cmd(GdkEventFocus* event);
bool focus_in_txt_cmd(GdkEventFocus* event); bool focus_in_txt_cmd(GdkEventFocus* event);
//static void me_thread(string cmd);
void unselect_icon(Gtk::IconView *icon_entry); void unselect_icon(Gtk::IconView *icon_entry);
void str_remove(std::string& source, std::string & to_remove); void str_remove(std::string& source, std::string & to_remove);
vector<std::string> split(const std::string &s, char delim); vector<std::string> split(const std::string &s, char delim);
@ -104,9 +103,11 @@ public:
add(app_name_exec); add(app_name_exec);
add(float_h_align); add(float_h_align);
add(float_w_align); add(float_w_align);
add(icon_name);
} }
Gtk::TreeModelColumn<std::string> m_col_filename; Gtk::TreeModelColumn<std::string> m_col_filename;
Gtk::TreeModelColumn<std::string> icon_name;
Gtk::TreeModelColumn<Glib::ustring> m_col_description; Gtk::TreeModelColumn<Glib::ustring> m_col_description;
Gtk::TreeModelColumn<Glib::ustring> app_name_exec; Gtk::TreeModelColumn<Glib::ustring> app_name_exec;
Gtk::TreeModelColumn<Glib::RefPtr<Gdk::Pixbuf> > m_col_pixbuf; Gtk::TreeModelColumn<Glib::RefPtr<Gdk::Pixbuf> > m_col_pixbuf;
@ -194,6 +195,7 @@ public:
Glib::RefPtr<Gtk::ListStore> list_Development; Glib::RefPtr<Gtk::ListStore> list_Development;
Glib::RefPtr<Gtk::ListStore> list_System; Glib::RefPtr<Gtk::ListStore> list_System;
public: public:
string version_application = "1.0";
string cmd_old = ""; string cmd_old = "";
string user_cmd=""; string user_cmd="";
string user_cmd_old=""; string user_cmd_old="";

@ -5,39 +5,46 @@
text-shadow: 1px 1px #ffffff; text-shadow: 1px 1px #ffffff;
} }
.menuitemtop *{ .menuitemtop *{
margin:2px 2px 0 2px; margin:2px 2px 0 2px;
padding: 5px 10px 3px 5px; padding: 5px 10px 3px 5px;
} }
.menuitemmiddle *{ .menuitemmiddle *{
margin:0 2px 0 2px; margin:0 2px 0 2px;
padding: 3px 10px 3px 5px; padding: 3px 10px 3px 5px;
} }
.menuitembottom *{ .menuitembottom *{
margin:0 2px 2px 2px; margin:0 2px 2px 2px;
padding: 3px 10px 5px 5px; padding: 3px 10px 5px 5px;
} }
.menuitemtop:hover { .menuitemtop:hover {
background:@theme_bg_color; border-radius:3px;
background:@theme_bg_color;
} }
.menuitemmiddle:hover { .menuitemmiddle:hover {
border-radius:3px;
background:@theme_bg_color; background:@theme_bg_color;
} }
.menuitembottom:hover { .menuitembottom:hover {
border-radius:3px;
background:@theme_bg_color; background:@theme_bg_color;
} }
.menuitemtop:hover* { .menuitemtop:hover* {
border-radius:3px;
margin:2px 2px 0 2px; margin:2px 2px 0 2px;
padding: 5px 10px 3px 5px; padding: 5px 10px 3px 5px;
background:@theme_selected_bg_color; background:@theme_selected_bg_color;
border-color:transparent; border-color:transparent;
} }
.menuitemmiddle:hover* { .menuitemmiddle:hover* {
border-radius:3px;
margin:0 2px 0 2px; margin:0 2px 0 2px;
padding: 3px 10px 3px 5px; padding: 3px 10px 3px 5px;
background:@theme_selected_bg_color; background:@theme_selected_bg_color;
border-color:transparent; border-color:transparent;
} }
.menuitembottom:hover* { .menuitembottom:hover* {
border-radius:3px;
margin:0 2px 2px 2px; margin:0 2px 2px 2px;
padding: 3px 10px 5px 5px; padding: 3px 10px 5px 5px;
background:@theme_selected_bg_color; background:@theme_selected_bg_color;
@ -45,26 +52,21 @@
} }
.menuitembottom{ .menuitembottom{
margin-top:0px; margin-top:0px;
border-color:alpha(@theme_text_color, 0.4);
border-style:solid;
border-left-width:1px;
border-bottom-width:1px;
border-right-width:1px;
} }
.menuitemmiddle{ .menuitemmiddle{
margin-top:0px; margin-top:0px;
margin-bottom:0px; margin-bottom:0px;
border-color:alpha(@theme_text_color, 0.4);
border-style:solid;
border-left-width:1px;
border-right-width:1px;
} }
.menuitemtop{ .menuitemtop{
margin-bottom:0px; margin-bottom:0px;
border-color:alpha(@theme_text_color, 0.4); }
border-style:solid;
border-left-width:1px; .bkim{
border-top-width:1px; background-image: -gtk-gradient(linear,
border-right-width:1px; left top, left bottom,
from(@entry_background_a),
color-stop(0.20, @entry_background_b),
color-stop(0.85, @entry_background_c),
to(@entry_background_d));
} }

@ -142,6 +142,7 @@
<attributes> <attributes>
<attribute name="xalign">5</attribute> <attribute name="xalign">5</attribute>
<attribute name="yalign">5</attribute> <attribute name="yalign">5</attribute>
<attribute name="icon-name">6</attribute>
<attribute name="pixbuf">2</attribute> <attribute name="pixbuf">2</attribute>
</attributes> </attributes>
</child> </child>
@ -215,6 +216,7 @@
<attributes> <attributes>
<attribute name="xalign">5</attribute> <attribute name="xalign">5</attribute>
<attribute name="yalign">5</attribute> <attribute name="yalign">5</attribute>
<attribute name="icon-name">6</attribute>
<attribute name="pixbuf">2</attribute> <attribute name="pixbuf">2</attribute>
</attributes> </attributes>
</child> </child>
@ -292,6 +294,7 @@
<attributes> <attributes>
<attribute name="xalign">5</attribute> <attribute name="xalign">5</attribute>
<attribute name="yalign">5</attribute> <attribute name="yalign">5</attribute>
<attribute name="icon-name">6</attribute>
<attribute name="pixbuf">2</attribute> <attribute name="pixbuf">2</attribute>
</attributes> </attributes>
</child> </child>
@ -368,6 +371,7 @@
<attributes> <attributes>
<attribute name="xalign">5</attribute> <attribute name="xalign">5</attribute>
<attribute name="yalign">5</attribute> <attribute name="yalign">5</attribute>
<attribute name="icon-name">6</attribute>
<attribute name="pixbuf">2</attribute> <attribute name="pixbuf">2</attribute>
</attributes> </attributes>
</child> </child>
@ -444,6 +448,7 @@
<attributes> <attributes>
<attribute name="xalign">5</attribute> <attribute name="xalign">5</attribute>
<attribute name="yalign">5</attribute> <attribute name="yalign">5</attribute>
<attribute name="icon-name">6</attribute>
<attribute name="pixbuf">2</attribute> <attribute name="pixbuf">2</attribute>
</attributes> </attributes>
</child> </child>
@ -520,6 +525,7 @@
<attributes> <attributes>
<attribute name="xalign">5</attribute> <attribute name="xalign">5</attribute>
<attribute name="yalign">5</attribute> <attribute name="yalign">5</attribute>
<attribute name="icon-name">6</attribute>
<attribute name="pixbuf">2</attribute> <attribute name="pixbuf">2</attribute>
</attributes> </attributes>
</child> </child>
@ -596,6 +602,7 @@
<attributes> <attributes>
<attribute name="xalign">5</attribute> <attribute name="xalign">5</attribute>
<attribute name="yalign">5</attribute> <attribute name="yalign">5</attribute>
<attribute name="icon-name">6</attribute>
<attribute name="pixbuf">2</attribute> <attribute name="pixbuf">2</attribute>
</attributes> </attributes>
</child> </child>
@ -672,6 +679,7 @@
<attributes> <attributes>
<attribute name="xalign">5</attribute> <attribute name="xalign">5</attribute>
<attribute name="yalign">5</attribute> <attribute name="yalign">5</attribute>
<attribute name="icon-name">6</attribute>
<attribute name="pixbuf">2</attribute> <attribute name="pixbuf">2</attribute>
</attributes> </attributes>
</child> </child>
@ -748,6 +756,7 @@
<attributes> <attributes>
<attribute name="xalign">5</attribute> <attribute name="xalign">5</attribute>
<attribute name="yalign">5</attribute> <attribute name="yalign">5</attribute>
<attribute name="icon-name">6</attribute>
<attribute name="pixbuf">2</attribute> <attribute name="pixbuf">2</attribute>
</attributes> </attributes>
</child> </child>
@ -824,6 +833,7 @@
<attributes> <attributes>
<attribute name="xalign">5</attribute> <attribute name="xalign">5</attribute>
<attribute name="yalign">5</attribute> <attribute name="yalign">5</attribute>
<attribute name="icon-name">6</attribute>
<attribute name="pixbuf">2</attribute> <attribute name="pixbuf">2</attribute>
</attributes> </attributes>
</child> </child>
@ -1158,8 +1168,8 @@ specified priority</property>
<property name="margin-right">5</property> <property name="margin-right">5</property>
<property name="margin-start">5</property> <property name="margin-start">5</property>
<property name="margin-end">5</property> <property name="margin-end">5</property>
<property name="margin-top">6</property> <property name="margin-top">3</property>
<property name="margin-bottom">6</property> <property name="margin-bottom">3</property>
<property name="stock">gtk-directory</property> <property name="stock">gtk-directory</property>
</object> </object>
</child> </child>
@ -1192,8 +1202,6 @@ specified priority</property>
<property name="margin-right">5</property> <property name="margin-right">5</property>
<property name="margin-start">5</property> <property name="margin-start">5</property>
<property name="margin-end">5</property> <property name="margin-end">5</property>
<property name="margin-top">6</property>
<property name="margin-bottom">6</property>
<property name="icon-name">edit-select-all</property> <property name="icon-name">edit-select-all</property>
</object> </object>
</child> </child>

@ -6,10 +6,13 @@
msgid "" msgid ""
msgstr "" msgstr ""
msgid "https://wiki.ublinux.com"
msgstr "https://wiki.ublinux.ru"
msgid "About the program" msgid "About the program"
msgstr "О программе" msgstr "О программе"
msgid "Synopsis" msgid "Help"
msgstr "Справка" msgstr "Справка"
msgid "Project Home Page" msgid "Project Home Page"

Loading…
Cancel
Save