From 6ee00e79141d48edf306514822f480b6e8012321 Mon Sep 17 00:00:00 2001 From: Igor Belitskiy Date: Tue, 7 Mar 2023 11:39:44 +0600 Subject: [PATCH 1/6] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B0=20=D0=BB=D0=BE=D0=BA=D0=B0=D0=BB=D0=B8=D0=B7?= =?UTF-8?q?=D0=B0=D1=86=D0=B8=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/ublexec.cc | 2 +- ublexec.glade | 2 -- ublexec_ru.po | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/source/ublexec.cc b/source/ublexec.cc index 76ab60a..380aec3 100644 --- a/source/ublexec.cc +++ b/source/ublexec.cc @@ -141,7 +141,7 @@ void MainWindow::add_CSS(){ } void MainWindow::localization(){ - btnSynopsis->set_label(_("Synopsis")); + btnSynopsis->set_label(_("Help")); btnAbout->set_label(_("About the program")); aboutWindows->set_comments(_("ublexec")); aboutWindows->set_website_label(_("Project Home Page")); diff --git a/ublexec.glade b/ublexec.glade index ca9d7b6..d50abd3 100644 --- a/ublexec.glade +++ b/ublexec.glade @@ -1124,8 +1124,6 @@ specified priority 5 5 5 - 6 - 6 True diff --git a/ublexec_ru.po b/ublexec_ru.po index 7eb916b..6b36fe4 100644 --- a/ublexec_ru.po +++ b/ublexec_ru.po @@ -9,7 +9,7 @@ msgstr "" msgid "About the program" msgstr "О программе" -msgid "Synopsis" +msgid "Help" msgstr "Справка" msgid "Project Home Page" From 4675320092c99eaffb327351c8cf99eb67f6b71f Mon Sep 17 00:00:00 2001 From: Igor Belitskiy Date: Tue, 7 Mar 2023 11:56:15 +0600 Subject: [PATCH 2/6] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B0=20=D0=BB=D0=BE=D0=BA=D0=B0=D0=BB=D0=B8=D0=B7=D0=B0?= =?UTF-8?q?=D1=86=D0=B8=D1=8F=20url?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/ublexec.cc | 1 + ublexec_ru.po | 3 +++ 2 files changed, 4 insertions(+) diff --git a/source/ublexec.cc b/source/ublexec.cc index 380aec3..fb7837c 100644 --- a/source/ublexec.cc +++ b/source/ublexec.cc @@ -141,6 +141,7 @@ void MainWindow::add_CSS(){ } void MainWindow::localization(){ + aboutWindows->set_website(_("https://wiki.ublinux.com")); btnSynopsis->set_label(_("Help")); btnAbout->set_label(_("About the program")); aboutWindows->set_comments(_("ublexec")); diff --git a/ublexec_ru.po b/ublexec_ru.po index 6b36fe4..5f16e42 100644 --- a/ublexec_ru.po +++ b/ublexec_ru.po @@ -6,6 +6,9 @@ msgid "" msgstr "" +msgid "https://wiki.ublinux.com" +msgstr "https://wiki.ublinux.ru" + msgid "About the program" msgstr "О программе" From e936a3b2219685c7343ed753fa875358d3ef8a37 Mon Sep 17 00:00:00 2001 From: Igor Belitskiy Date: Tue, 7 Mar 2023 12:08:21 +0600 Subject: [PATCH 3/6] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B0=20=D0=B4=D1=8B=D1=80=D0=B0=20=D0=B2=20=D0=B1?= =?UTF-8?q?=D0=B5=D0=B7=D0=BE=D0=BF=D0=B0=D1=81=D0=BD=D0=BE=D1=81=D1=82?= =?UTF-8?q?=D0=B8=20=E2=84=968?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/ublexec.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source/ublexec.cc b/source/ublexec.cc index fb7837c..fcdd503 100644 --- a/source/ublexec.cc +++ b/source/ublexec.cc @@ -324,7 +324,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(); @@ -506,6 +505,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()) + " "; } From 6e47023aac4c2d8dace38efa91912840694c2709 Mon Sep 17 00:00:00 2001 From: Igor Belitskiy Date: Tue, 7 Mar 2023 12:14:10 +0600 Subject: [PATCH 4/6] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=20=D0=BF=D0=B0=D1=80=D1=81=D0=B8=D0=BD=D0=B3=20=D0=B2?= =?UTF-8?q?=D0=B5=D1=80=D1=81=D0=B8=D0=B9=20=D0=BF=D1=80=D0=BE=D0=B3=D1=80?= =?UTF-8?q?=D0=B0=D0=BC=D0=BC=D1=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Makefile | 5 +++++ VERSION.md | 1 + source/ublexec.cc | 1 + source/ublexec.h | 1 + 4 files changed, 8 insertions(+) create mode 100644 VERSION.md diff --git a/Makefile b/Makefile index 69aebbf..178739f 100644 --- a/Makefile +++ b/Makefile @@ -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: diff --git a/VERSION.md b/VERSION.md new file mode 100644 index 0000000..12ebd01 --- /dev/null +++ b/VERSION.md @@ -0,0 +1 @@ +VERSION 1.0 diff --git a/source/ublexec.cc b/source/ublexec.cc index fcdd503..6f320eb 100644 --- a/source/ublexec.cc +++ b/source/ublexec.cc @@ -146,6 +146,7 @@ void MainWindow::localization(){ 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")); diff --git a/source/ublexec.h b/source/ublexec.h index f15e8f3..fd32684 100644 --- a/source/ublexec.h +++ b/source/ublexec.h @@ -194,6 +194,7 @@ public: Glib::RefPtr list_Development; Glib::RefPtr list_System; public: + string version_application = "1.0"; string cmd_old = ""; string user_cmd=""; string user_cmd_old=""; From 61316147210feca8e539232f76be5edfabf6a986 Mon Sep 17 00:00:00 2001 From: Igor Belitskiy Date: Tue, 7 Mar 2023 17:06:37 +0600 Subject: [PATCH 5/6] =?UTF-8?q?=D0=98=D0=B7=D0=BC=D0=B5=D0=BD=D0=B5=D0=BD?= =?UTF-8?q?=20=D0=BC=D0=B5=D1=82=D0=BE=D0=B4=20=D0=B7=D0=B0=D0=B3=D1=80?= =?UTF-8?q?=D1=83=D0=B7=D0=BA=D0=B8=20=D0=B8=D0=BA=D0=BE=D0=BD=D0=BE=D0=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/CMakeLists.txt | 2 +- source/ublexec.cc | 11 +++-------- source/ublexec.h | 2 ++ style.css | 2 +- ublexec.glade | 10 ++++++++++ 5 files changed, 17 insertions(+), 10 deletions(-) diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt index 8883823..543d234 100644 --- a/source/CMakeLists.txt +++ b/source/CMakeLists.txt @@ -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) diff --git a/source/ublexec.cc b/source/ublexec.cc index 6f320eb..eb988b1 100644 --- a/source/ublexec.cc +++ b/source/ublexec.cc @@ -400,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; @@ -426,7 +420,8 @@ 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; + //path = "/usr/share/icons/hicolor/16x16/apps/" + st_app.Icon + ".png"; if (str_categor=="Graphics"){ this->tempalte_row(st_app.Name,st_app.Exec, path, list_Graphics); } diff --git a/source/ublexec.h b/source/ublexec.h index fd32684..d5c27ff 100644 --- a/source/ublexec.h +++ b/source/ublexec.h @@ -104,9 +104,11 @@ public: add(app_name_exec); add(float_h_align); add(float_w_align); + add(icon_name); } Gtk::TreeModelColumn m_col_filename; + Gtk::TreeModelColumn icon_name; Gtk::TreeModelColumn m_col_description; Gtk::TreeModelColumn app_name_exec; Gtk::TreeModelColumn > m_col_pixbuf; diff --git a/style.css b/style.css index 5b6b638..751f019 100644 --- a/style.css +++ b/style.css @@ -67,4 +67,4 @@ border-left-width:1px; border-top-width:1px; border-right-width:1px; -} \ No newline at end of file +} diff --git a/ublexec.glade b/ublexec.glade index d50abd3..aced788 100644 --- a/ublexec.glade +++ b/ublexec.glade @@ -142,6 +142,7 @@ 5 5 + 6 2 @@ -215,6 +216,7 @@ 5 5 + 6 2 @@ -292,6 +294,7 @@ 5 5 + 6 2 @@ -368,6 +371,7 @@ 5 5 + 6 2 @@ -444,6 +448,7 @@ 5 5 + 6 2 @@ -520,6 +525,7 @@ 5 5 + 6 2 @@ -596,6 +602,7 @@ 5 5 + 6 2 @@ -672,6 +679,7 @@ 5 5 + 6 2 @@ -748,6 +756,7 @@ 5 5 + 6 2 @@ -824,6 +833,7 @@ 5 5 + 6 2 From 42e104243c2afa3b5cc3fcc0c5a72d419630a908 Mon Sep 17 00:00:00 2001 From: Igor Belitskiy Date: Tue, 7 Mar 2023 17:30:07 +0600 Subject: [PATCH 6/6] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=20css?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/ublexec.cc | 3 +-- source/ublexec.h | 1 - style.css | 44 +++++++++++++++++++++++--------------------- ublexec.glade | 8 ++++---- 4 files changed, 28 insertions(+), 28 deletions(-) diff --git a/source/ublexec.cc b/source/ublexec.cc index eb988b1..11fa404 100644 --- a/source/ublexec.cc +++ b/source/ublexec.cc @@ -219,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; @@ -421,7 +421,6 @@ void MainWindow::open_list_app(){ for ( const auto &st_app : list_app){ for ( const auto &str_categor : st_app.Categories){ path = st_app.Icon; - //path = "/usr/share/icons/hicolor/16x16/apps/" + st_app.Icon + ".png"; if (str_categor=="Graphics"){ this->tempalte_row(st_app.Name,st_app.Exec, path, list_Graphics); } diff --git a/source/ublexec.h b/source/ublexec.h index d5c27ff..5f34098 100644 --- a/source/ublexec.h +++ b/source/ublexec.h @@ -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 split(const std::string &s, char delim); diff --git a/style.css b/style.css index 751f019..0ea8eb1 100644 --- a/style.css +++ b/style.css @@ -5,39 +5,46 @@ text-shadow: 1px 1px #ffffff; } .menuitemtop *{ - margin:2px 2px 0 2px; - padding: 5px 10px 3px 5px; + margin:2px 2px 0 2px; + padding: 5px 10px 3px 5px; } .menuitemmiddle *{ - margin:0 2px 0 2px; - padding: 3px 10px 3px 5px; + margin:0 2px 0 2px; + padding: 3px 10px 3px 5px; } .menuitembottom *{ - margin:0 2px 2px 2px; - padding: 3px 10px 5px 5px; + margin:0 2px 2px 2px; + padding: 3px 10px 5px 5px; } .menuitemtop:hover { - background:@theme_bg_color; + 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)); +} \ No newline at end of file diff --git a/ublexec.glade b/ublexec.glade index aced788..c432490 100644 --- a/ublexec.glade +++ b/ublexec.glade @@ -1134,6 +1134,8 @@ specified priority 5 5 5 + 6 + 6 True @@ -1163,8 +1165,8 @@ specified priority 5 5 5 - 6 - 6 + 3 + 3 gtk-directory @@ -1197,8 +1199,6 @@ specified priority 5 5 5 - 6 - 6 edit-select-all