Merge branch 'devel'

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

@ -20,6 +20,11 @@ all: init build
init:
@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}"
depend:

@ -0,0 +1 @@
VERSION 1.0

@ -10,7 +10,7 @@ add_definitions(${GTK_CFLAGS_OTHER})
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 -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_REQUIRED ON)

@ -141,10 +141,12 @@ void MainWindow::add_CSS(){
}
void MainWindow::localization(){
btnSynopsis->set_label(_("Synopsis"));
aboutWindows->set_website(_("https://wiki.ublinux.com"));
btnSynopsis->set_label(_("Help"));
btnAbout->set_label(_("About the program"));
aboutWindows->set_comments(_("ublexec"));
aboutWindows->set_website_label(_("Project Home Page"));
aboutWindows->set_version(_(version_application.c_str()));
lblHeaderName->set_text(_("ublexec"));
this->set_title(_("ublexec"));
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){
if (user_cmd.length() != 0){
//user_cmd_old = user_cmd;
//user_cmd_old = user_cmd;gi
}
else if (name_app.length() != 0){
//name_app_old = name_app;
@ -323,7 +325,6 @@ void MainWindow::unselect_icon(Gtk::IconView *icon_entry){
}
void MainWindow::settings(){
system("nohup xhost + local: > /dev/null 2>&1 &");
this->pars_apps();
this->get_builder();
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());
row[m_Columns.m_col_filename] = path;
row[m_Columns.m_col_description] = Name;
if (std::ifstream(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.icon_name] = path;
row[m_Columns.app_name_exec] = Exec;
row[m_Columns.float_h_align] = 0.5;
row[m_Columns.float_w_align] = 0.5;
@ -425,7 +420,7 @@ void MainWindow::open_list_app(){
string path = "";
for ( const auto &st_app : list_app){
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"){
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)){
str_nice_cmd = " nice -n " + to_string(spinPriority->get_value_as_int()) + " ";
}

@ -88,7 +88,6 @@ public:
void denamic_cmd();
bool focus_out_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 str_remove(std::string& source, std::string & to_remove);
vector<std::string> split(const std::string &s, char delim);
@ -104,9 +103,11 @@ public:
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;
@ -194,6 +195,7 @@ public:
Glib::RefPtr<Gtk::ListStore> list_Development;
Glib::RefPtr<Gtk::ListStore> list_System;
public:
string version_application = "1.0";
string cmd_old = "";
string user_cmd="";
string user_cmd_old="";

@ -17,27 +17,34 @@
padding: 3px 10px 5px 5px;
}
.menuitemtop:hover {
border-radius:3px;
background:@theme_bg_color;
}
.menuitemmiddle:hover {
border-radius:3px;
background:@theme_bg_color;
}
.menuitembottom:hover {
border-radius:3px;
background:@theme_bg_color;
}
.menuitemtop:hover* {
border-radius:3px;
margin:2px 2px 0 2px;
padding: 5px 10px 3px 5px;
background:@theme_selected_bg_color;
border-color:transparent;
}
.menuitemmiddle:hover* {
border-radius:3px;
margin:0 2px 0 2px;
padding: 3px 10px 3px 5px;
background:@theme_selected_bg_color;
border-color:transparent;
}
.menuitembottom:hover* {
border-radius:3px;
margin:0 2px 2px 2px;
padding: 3px 10px 5px 5px;
background:@theme_selected_bg_color;
@ -45,26 +52,21 @@
}
.menuitembottom{
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{
margin-top:0px;
margin-bottom:0px;
border-color:alpha(@theme_text_color, 0.4);
border-style:solid;
border-left-width:1px;
border-right-width:1px;
}
.menuitemtop{
margin-bottom:0px;
border-color:alpha(@theme_text_color, 0.4);
border-style:solid;
border-left-width:1px;
border-top-width:1px;
border-right-width:1px;
}
.bkim{
background-image: -gtk-gradient(linear,
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>
<attribute name="xalign">5</attribute>
<attribute name="yalign">5</attribute>
<attribute name="icon-name">6</attribute>
<attribute name="pixbuf">2</attribute>
</attributes>
</child>
@ -215,6 +216,7 @@
<attributes>
<attribute name="xalign">5</attribute>
<attribute name="yalign">5</attribute>
<attribute name="icon-name">6</attribute>
<attribute name="pixbuf">2</attribute>
</attributes>
</child>
@ -292,6 +294,7 @@
<attributes>
<attribute name="xalign">5</attribute>
<attribute name="yalign">5</attribute>
<attribute name="icon-name">6</attribute>
<attribute name="pixbuf">2</attribute>
</attributes>
</child>
@ -368,6 +371,7 @@
<attributes>
<attribute name="xalign">5</attribute>
<attribute name="yalign">5</attribute>
<attribute name="icon-name">6</attribute>
<attribute name="pixbuf">2</attribute>
</attributes>
</child>
@ -444,6 +448,7 @@
<attributes>
<attribute name="xalign">5</attribute>
<attribute name="yalign">5</attribute>
<attribute name="icon-name">6</attribute>
<attribute name="pixbuf">2</attribute>
</attributes>
</child>
@ -520,6 +525,7 @@
<attributes>
<attribute name="xalign">5</attribute>
<attribute name="yalign">5</attribute>
<attribute name="icon-name">6</attribute>
<attribute name="pixbuf">2</attribute>
</attributes>
</child>
@ -596,6 +602,7 @@
<attributes>
<attribute name="xalign">5</attribute>
<attribute name="yalign">5</attribute>
<attribute name="icon-name">6</attribute>
<attribute name="pixbuf">2</attribute>
</attributes>
</child>
@ -672,6 +679,7 @@
<attributes>
<attribute name="xalign">5</attribute>
<attribute name="yalign">5</attribute>
<attribute name="icon-name">6</attribute>
<attribute name="pixbuf">2</attribute>
</attributes>
</child>
@ -748,6 +756,7 @@
<attributes>
<attribute name="xalign">5</attribute>
<attribute name="yalign">5</attribute>
<attribute name="icon-name">6</attribute>
<attribute name="pixbuf">2</attribute>
</attributes>
</child>
@ -824,6 +833,7 @@
<attributes>
<attribute name="xalign">5</attribute>
<attribute name="yalign">5</attribute>
<attribute name="icon-name">6</attribute>
<attribute name="pixbuf">2</attribute>
</attributes>
</child>
@ -1158,8 +1168,8 @@ specified priority</property>
<property name="margin-right">5</property>
<property name="margin-start">5</property>
<property name="margin-end">5</property>
<property name="margin-top">6</property>
<property name="margin-bottom">6</property>
<property name="margin-top">3</property>
<property name="margin-bottom">3</property>
<property name="stock">gtk-directory</property>
</object>
</child>
@ -1192,8 +1202,6 @@ specified priority</property>
<property name="margin-right">5</property>
<property name="margin-start">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>
</object>
</child>

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

Loading…
Cancel
Save