Исправлен дизайн

pull/1/head
Igor Belitskiy 3 years ago
parent 7c4fcd48d1
commit 1526f870ae

@ -99,7 +99,7 @@ void MainWindow::get_builder(){
builder->get_widget("lblInfoNooPriority", lblInfoNooPriority);
builder->get_widget("lblInfoExec", lblInfoExec);
builder->get_widget("lblInfoPriority", lblInfoPriority);
builder->get_widget("lblInfoPriority", lblInfoEnterProg);
builder->get_widget("lblInfoEnterProg", lblInfoEnterProg);
builder->get_widget("boxColor", boxColor);
builder->get_widget("lblGraphics", lblGraphics);
builder->get_widget("lblTools", lblTools);
@ -121,6 +121,17 @@ void MainWindow::get_builder(){
builder->get_widget("iconDevelopment", iconDevelopment);
builder->get_widget("iconSystem", iconSystem);
builder->get_widget("lblSystem", lblSystem);
Gtk::IconView *array_icon[10];
array_icon[0]=this->iconGraphics;
array_icon[1]=this->iconTools;
array_icon[2]=this->iconInternet;
array_icon[3]=this->iconMultimedia;
array_icon[4]=this->iconSettings;
array_icon[5]=this->iconEducation;
array_icon[6]=this->iconOffice;
array_icon[7]=this->iconOther;
array_icon[8]=this->iconDevelopment;
array_icon[9]=this->iconSystem;
}
@ -133,7 +144,6 @@ void MainWindow::template_apps_obj(Gtk::IconView *icon, Glib::RefPtr<Gtk::ListSt
icon->set_model(gtk_list_app);
icon->set_markup_column(m_Columns.m_col_description);
icon->set_pixbuf_column(m_Columns.m_col_pixbuf);
//icon->set_tooltip_column(m_Columns.app_name_exec);
}
@ -153,17 +163,17 @@ void MainWindow::localization(){
this->set_title(gettext("ublexec"));
btnStart->set_label(gettext("Run"));
wndChooseFileWallpaper->set_title(gettext("Please select File"));
dialogStartMenu->set_title(gettext("Warning!"));
lblInfoHead->set_text(gettext("Running applications as a user with a\n specified priority"));
dialogStartMenu->set_title(gettext("Selecting Programs"));
lblInfoHead->set_text(gettext("Running applications as a user with a\nspecified priority"));
lblinfoCmd->set_text(gettext("Command Line"));
lblInfoTime->set_text(gettext("Team:"));
lblInfoTime->set_text(gettext("Team"));
labInfoExecutTerm->set_text(gettext("Run in the terminal emulator"));
lblInfoUser->set_text(gettext("User"));
lblInfoUserOther->set_text(gettext("Run as another user"));
lblInfoUserName->set_text(gettext("User Name:"));
lblInfoNooPriority->set_text(gettext("Priority:"));
lblInfoUserName->set_text(gettext("User Name"));
lblInfoNooPriority->set_text(gettext("Priority"));
lblInfoExec->set_text(gettext("Change startup priority"));
lblInfoPriority->set_text(gettext("Priority:"));
lblInfoPriority->set_text(gettext("Priority"));
lblMessageError->set_text(gettext("Select an executable file or program"));
lblInfoEnterProg->set_text(gettext("Selecting Programs"));
lblGraphics->set_text(gettext("Graphics"));
@ -228,73 +238,69 @@ void MainWindow::ok_close_entry_app(){
}
void MainWindow::select_Graphics(){
this->tempate_icon_select(iconGraphics,list_Graphics);
this->tempate_icon_select(this->iconGraphics,list_Graphics);
}
void MainWindow::select_Tools(){
this->tempate_icon_select(iconTools,list_Tools);
this->tempate_icon_select(this->iconTools,list_Tools);
}
void MainWindow::select_Internet(){
this->tempate_icon_select(iconInternet,list_Internet);
this->tempate_icon_select(this->iconInternet,list_Internet);
}
void MainWindow::select_Multimedia(){
this->tempate_icon_select(iconMultimedia,list_Multimedia);
this->tempate_icon_select(this->iconMultimedia,list_Multimedia);
}
void MainWindow::select_Settings(){
this->tempate_icon_select(iconSettings,list_Settings);
this->tempate_icon_select(this->iconSettings,list_Settings);
}
void MainWindow::select_Education(){
this->tempate_icon_select(iconEducation,list_Education);
this->tempate_icon_select(this->iconEducation,list_Education);
}
void MainWindow::select_Office(){
this->tempate_icon_select(iconOffice,list_Office);
this->tempate_icon_select(this->iconOffice,list_Office);
}
void MainWindow::select_Other(){
this->tempate_icon_select(iconOther,list_Other);
this->tempate_icon_select(this->iconOther,list_Other);
}
void MainWindow::select_Development(){
this->tempate_icon_select(iconDevelopment,list_Development);
this->tempate_icon_select(this->iconDevelopment,list_Development);
}
void MainWindow::select_System(){
this->tempate_icon_select(iconSystem,list_System);
this->tempate_icon_select(this->iconSystem,list_System);
}
void MainWindow::tempate_icon_select(Gtk::IconView *icon, Glib::RefPtr<Gtk::ListStore> &gtk_list){
auto selected = (*icon).get_selected_items();
if(!selected.empty())
{
this->unselect_icon(icon);
const Gtk::TreeModel::Path& path = *selected.begin();
Gtk::TreeModel::iterator iter = gtk_list->get_iter(path);
Gtk::TreeModel::Row row = *iter;
auto app_name_exec = row[m_Columns.app_name_exec];
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"};
string array_del[] = {"%f","%F","%d","%D","%n","%N","%U"};
for (auto &del_sim: array_del){
str_remove(name_app, del_sim);
if (name_app.length()!=len_name_app){
txtCmd->set_text(name_app);
break;
}
}
}
}
void MainWindow::unselect_icon(Gtk::IconView *icon_entry){
for (Gtk::IconView* &icon : array_icon) {
if (icon_entry!=icon){
cout << "22222" << endl;
for (int index=0; index<10; ++index){
Gtk::IconView *icon = this->array_icon[index];
printf("%p %p", icon, icon_entry);
if (&icon_entry!=&icon){
cout << "11111" << endl;
//icon->unselect_all();
}
else{
cout << "11111" << endl;
cout << "22222" << endl;
}
}
}
@ -509,21 +515,20 @@ void MainWindow::start_cmd(){
//cmd = format_cmd(str_cmd_terminal,str_variants_root,str_nice_cmd,path_file, cmd);
}
else{
user_cmd = this->str_remove(user_cmd,str_cmd_terminal);
user_cmd = this->str_remove(user_cmd,str_variants_root);
user_cmd = this->str_remove(user_cmd,str_nice_cmd);
user_cmd = this->str_remove(user_cmd, str_cmd_terminal);
user_cmd = this->str_remove(user_cmd, str_variants_root);
user_cmd = this->str_remove(user_cmd, str_nice_cmd);
string amp = " &";
user_cmd = this->str_remove(user_cmd, amp);
cmd = "" + str_cmd_terminal + str_variants_root + str_nice_cmd + user_cmd;
//cmd = format_cmd(str_cmd_terminal,str_variants_root,str_nice_cmd,path_file, cmd);
}
txtCmd->set_text(cmd);
cmd=cmd+ " &";
cmd = cmd + " &";
system(cmd.c_str());
path_file_name="";
path_file="";
name_app="";
path_file_name = "";
path_file = "";
name_app = "";
}

@ -190,6 +190,7 @@ public:
Gtk::IconView *iconOther;
Gtk::IconView *iconDevelopment;
Gtk::IconView *iconSystem;
Gtk::IconView *iconEntry;
Glib::RefPtr<Gtk::ListStore> list_Graphics;
Glib::RefPtr<Gtk::ListStore> list_Tools;
@ -225,18 +226,7 @@ public:
list <struct_App> list_app;
set <string> set_categories;
int index_exec_gui_apps = 0;
Gtk::IconView* array_icon[10] = {
iconGraphics,
iconTools,
iconInternet,
iconMultimedia,
iconSettings,
iconEducation,
iconOffice,
iconOther,
iconDevelopment,
iconSystem
};
Gtk::IconView* array_icon[10];
};

@ -21,7 +21,7 @@
<object class="GtkLabel" id="lblInfoEnterProg">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Выбор программ</property>
<property name="label" translatable="yes">Selecting Programs</property>
</object>
<packing>
<property name="expand">False</property>
@ -67,7 +67,7 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="halign">start</property>
<property name="label" translatable="yes">Графика</property>
<property name="label" translatable="yes">Graphics</property>
</object>
<packing>
<property name="expand">False</property>
@ -99,7 +99,7 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="halign">start</property>
<property name="label" translatable="yes">Инструменты</property>
<property name="label" translatable="yes">Tools</property>
</object>
<packing>
<property name="expand">False</property>
@ -131,7 +131,7 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="halign">start</property>
<property name="label" translatable="yes">Интернет</property>
<property name="label" translatable="yes">Internet</property>
</object>
<packing>
<property name="expand">False</property>
@ -163,7 +163,7 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="halign">start</property>
<property name="label" translatable="yes">Мультимедия</property>
<property name="label" translatable="yes">Multimedia</property>
</object>
<packing>
<property name="expand">False</property>
@ -195,7 +195,7 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="halign">start</property>
<property name="label" translatable="yes">Настройки</property>
<property name="label" translatable="yes">Settings</property>
</object>
<packing>
<property name="expand">False</property>
@ -227,7 +227,7 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="halign">start</property>
<property name="label" translatable="yes">Образование</property>
<property name="label" translatable="yes">Education</property>
</object>
<packing>
<property name="expand">False</property>
@ -259,7 +259,7 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="halign">start</property>
<property name="label" translatable="yes">Офис</property>
<property name="label" translatable="yes">Office</property>
</object>
<packing>
<property name="expand">False</property>
@ -291,7 +291,7 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="halign">start</property>
<property name="label" translatable="yes">Прочее</property>
<property name="label" translatable="yes">Other</property>
</object>
<packing>
<property name="expand">False</property>
@ -323,7 +323,7 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="halign">start</property>
<property name="label" translatable="yes">Разработка</property>
<property name="label" translatable="yes">Development</property>
</object>
<packing>
<property name="expand">False</property>
@ -355,7 +355,7 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="halign">start</property>
<property name="label" translatable="yes">Система</property>
<property name="label" translatable="yes">System</property>
</object>
<packing>
<property name="expand">False</property>
@ -522,8 +522,8 @@
<property name="margin-end">5</property>
<property name="margin-top">6</property>
<property name="margin-bottom">6</property>
<property name="label" translatable="yes">Запуск приложений от имени пользователя с
указанным приоритетом</property>
<property name="label" translatable="yes">Running applications as a user with a
specified priority</property>
<attributes>
<attribute name="font-desc" value="URW Gothic Semi-Bold 10"/>
<attribute name="foreground" value="#000023233232"/>
@ -582,7 +582,7 @@
<property name="margin-end">5</property>
<property name="margin-top">6</property>
<property name="margin-bottom">6</property>
<property name="label" translatable="yes" context="Time" comments="Time">Команда:</property>
<property name="label" translatable="yes" context="Time" comments="Time">Team</property>
<property name="wrap">True</property>
<property name="xalign">0</property>
</object>
@ -722,7 +722,7 @@
<object class="GtkLabel" id="labInfoExecutTerm">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Выполнить в эмуляторе терминале</property>
<property name="label" translatable="yes">Run in the terminal emulator</property>
</object>
</child>
</object>
@ -745,7 +745,7 @@
<object class="GtkLabel" id="lblinfoCmd">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes" context="Setting the date and time" comments="Setting the date and time">Командная строка</property>
<property name="label" translatable="yes" context="Setting the date and time" comments="Setting the date and time">Command Line</property>
</object>
</child>
</object>
@ -807,7 +807,7 @@
<object class="GtkLabel" id="lblInfoUserOther">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Выполнить от имени другого пользователя</property>
<property name="label" translatable="yes">Run as another user</property>
</object>
</child>
</object>
@ -901,7 +901,7 @@
<property name="margin-end">5</property>
<property name="margin-top">6</property>
<property name="margin-bottom">6</property>
<property name="label" translatable="yes" context="Time" comments="Time">Имя поьзователя:</property>
<property name="label" translatable="yes" context="Time" comments="Time">User Name</property>
<property name="wrap">True</property>
<property name="xalign">0</property>
</object>
@ -942,7 +942,7 @@
<object class="GtkLabel" id="lblInfoUser">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes" context="Setting the date and time" comments="Setting the date and time">Пользователь</property>
<property name="label" translatable="yes" context="Setting the date and time" comments="Setting the date and time">User</property>
</object>
</child>
</object>
@ -1000,7 +1000,7 @@
<object class="GtkLabel" id="lblInfoExec">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Изменить приоритет запуска</property>
<property name="label" translatable="yes">Change startup priority</property>
</object>
</child>
</object>
@ -1025,7 +1025,7 @@
<property name="margin-end">5</property>
<property name="margin-top">6</property>
<property name="margin-bottom">6</property>
<property name="label" translatable="yes" context="Time" comments="Time">Приоритет:</property>
<property name="label" translatable="yes" context="Time" comments="Time">Priority:</property>
<property name="wrap">True</property>
<property name="xalign">0</property>
</object>
@ -1113,7 +1113,7 @@
<property name="margin-end">5</property>
<property name="margin-top">6</property>
<property name="margin-bottom">6</property>
<property name="label" translatable="yes" context="Time" comments="Time">19 (Низкий)</property>
<property name="label" translatable="yes" context="Time" comments="Time">19 (Low)</property>
<property name="wrap">True</property>
<property name="xalign">0</property>
</object>
@ -1135,7 +1135,7 @@
<property name="margin-end">5</property>
<property name="margin-top">6</property>
<property name="margin-bottom">6</property>
<property name="label" translatable="yes" context="Time" comments="Time">-20 (Высокий)</property>
<property name="label" translatable="yes" context="Time" comments="Time">-20 (High)</property>
<property name="wrap">True</property>
<property name="xalign">0</property>
</object>
@ -1175,7 +1175,7 @@
<object class="GtkLabel" id="lblInfoNooPriority">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes" context="Setting the date and time" comments="Setting the date and time">Приоритет</property>
<property name="label" translatable="yes" context="Setting the date and time" comments="Setting the date and time">Priority</property>
</object>
</child>
</object>
@ -1194,7 +1194,7 @@
</child>
<child>
<object class="GtkButton" id="btnStart">
<property name="label" translatable="yes">Запустить</property>
<property name="label" translatable="yes">Run</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
@ -1274,7 +1274,7 @@
<property name="margin-left">10</property>
<property name="margin-right">10</property>
<property name="margin-bottom">15</property>
<property name="label" translatable="yes">Выберите исполняемый файл или программу</property>
<property name="label" translatable="yes">Select an executable file or program</property>
</object>
<packing>
<property name="expand">True</property>

@ -45,11 +45,11 @@ msgstr "Выход"
msgid "Selecting Programs"
msgstr "Выбор программ"
msgid "Running applications as a user with a\n specified priority"
msgstr "Запуск приложений от имени пользователя с\n указанным приоритетом"
msgid "Running applications as a user with a\nspecified priority"
msgstr "Запуск приложений от имени пользователя с\nуказанным приоритетом"
msgid "Team:"
msgstr "Команда:"
msgid "Team"
msgstr "Команда"
msgid "Run in the terminal emulator"
msgstr "Выполнить в эмуляторе терминале"
@ -69,8 +69,8 @@ msgstr "su"
msgid "sudo"
msgstr "sudo"
msgid "User Name:"
msgstr "Имя поьзователя:"
msgid "User Name"
msgstr "Имя поьзователя"
msgid "User"
msgstr "Пользователь"
@ -78,8 +78,8 @@ msgstr "Пользователь"
msgid "Change startup priority"
msgstr "Изменить приоритет запуска"
msgid "Priority:"
msgstr "Приоритет:"
msgid "Priority"
msgstr "Приоритет"
msgid "19 (Low)"
msgstr "19 (Низкий)"
@ -87,9 +87,6 @@ msgstr "19 (Низкий)"
msgid "-20 (High)"
msgstr "-20 (Высокий)"
msgid "Priority"
msgstr "Приоритет"
msgid "Run"
msgstr "Запустить"

Loading…
Cancel
Save