|
|
|
|
@ -28,6 +28,7 @@
|
|
|
|
|
#include <sys/types.h>
|
|
|
|
|
#include <pwd.h>
|
|
|
|
|
#include <set>
|
|
|
|
|
#include <regex>
|
|
|
|
|
#include "ublexec.h"
|
|
|
|
|
using namespace std;
|
|
|
|
|
|
|
|
|
|
@ -268,6 +269,18 @@ void MainWindow::tempate_icon_select(Gtk::IconView *icon, Glib::RefPtr<Gtk::List
|
|
|
|
|
const Glib::ustring description = row[m_Columns.m_col_description];
|
|
|
|
|
txtCmd->set_text(app_name_exec);
|
|
|
|
|
name_app = txtCmd->get_text();
|
|
|
|
|
int len_name_app = name_app.length();
|
|
|
|
|
string array_del[] = {"%f","%F","%d","%D","%n","%N"};
|
|
|
|
|
for (auto &del_sim: array_del){
|
|
|
|
|
cout << del_sim << endl;
|
|
|
|
|
str_remove(name_app, del_sim);
|
|
|
|
|
if (name_app.length()!=len_name_app){
|
|
|
|
|
txtCmd->set_text(name_app);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@ -372,7 +385,7 @@ void MainWindow::open_list_app(){
|
|
|
|
|
else if (str_categor=="Network"){
|
|
|
|
|
this->tempalte_row(st_app.Name,st_app.Exec, path,list_Internet);
|
|
|
|
|
}
|
|
|
|
|
else if (str_categor=="Multimedia" || str_categor== "Video" || str_categor== "Player" || str_categor== "AudioVideo"){
|
|
|
|
|
else if (str_categor== "AudioVideo"){
|
|
|
|
|
this->tempalte_row(st_app.Name,st_app.Exec, path, list_Multimedia);
|
|
|
|
|
}
|
|
|
|
|
else if (str_categor=="Settings"){
|
|
|
|
|
@ -580,6 +593,15 @@ vector<std::string> MainWindow::split(const std::string &s, char delim) {
|
|
|
|
|
return elems;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
string MainWindow::str_remove(std::string& source, const std::string& to_remove){
|
|
|
|
|
auto begin = source.find(to_remove);
|
|
|
|
|
if (begin!=std::string::npos){
|
|
|
|
|
int len_to_remove = to_remove.length();
|
|
|
|
|
source.erase(begin, begin+len_to_remove);
|
|
|
|
|
}
|
|
|
|
|
return source;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void MainWindow::pars_apps(){
|
|
|
|
|
if (list_app.size()!=0){return;}
|
|
|
|
|
namespace fs = std::filesystem;
|
|
|
|
|
|