Добавлен фон

pull/1/head
Igor Belitskiy 3 years ago
parent e912ffe356
commit 1b8e13e3f3

@ -95,19 +95,20 @@ install: check uninstall
echo $${FILE_PO}; \ echo $${FILE_PO}; \
msgfmt "$${FILE_PO}" -v -f -o "$${PATH_FILE_MO}"; \ msgfmt "$${FILE_PO}" -v -f -o "$${PATH_FILE_MO}"; \
done done
# @for SIZE in 16 32 48; do \ @for SIZE in 16 32 48; do \
install -dm755 /usr/share/icons/hicolor/$${SIZE}x$${SIZE}/apps; \ install -dm755 /usr/share/icons/hicolor/$${SIZE}x$${SIZE}/apps; \
rsvg-convert -w $${SIZE} -h $${SIZE} -f svg --keep-image-data ${PKGNAME}.svg -o "/usr/share/icons/hicolor/$${SIZE}x$${SIZE}/apps/${PKGNAME}.svg"; \ rsvg-convert -w $${SIZE} -h $${SIZE} -f svg --keep-image-data ${PKGNAME}.svg -o "/usr/share/icons/hicolor/$${SIZE}x$${SIZE}/apps/${PKGNAME}.svg"; \
done done
@install -dm755 /usr/share/icons/hicolor/scalable/apps @install -dm755 /usr/share/icons/hicolor/scalable/apps
# @install -Dm644 -t /usr/share/icons/hicolor/scalable/apps/ ${PKGNAME}.svg @install -Dm644 -t /usr/share/icons/hicolor/scalable/apps/ ${PKGNAME}.svg
@install -Dm755 -t /usr/bin/ ${CMAKE_BUILD_DIR}/${PKGNAME} @install -Dm755 -t /usr/bin/ ${CMAKE_BUILD_DIR}/${PKGNAME}
@install -Dm644 -t /usr/share/applications/ ${PKGNAME}.desktop @install -Dm644 -t /usr/share/applications/ ${PKGNAME}.desktop
@install -Dm644 -t /usr/share/polkit-1/actions/ org.ublinux.pkexec.${PKGNAME}.exec.policy @install -Dm644 -t /usr/share/polkit-1/actions/ org.ublinux.pkexec.${PKGNAME}.exec.policy
@install -dm755 /usr/share/${PKGNAME}/{ui,css,images} @install -dm755 /usr/share/${PKGNAME}/{ui,css,images}
@install -Dm644 -t /usr/share/${PKGNAME}/ui/ ${PKGNAME}.glade @install -Dm644 -t /usr/share/${PKGNAME}/ui/ ${PKGNAME}.glade
@install -Dm644 -t /usr/share/${PKGNAME}/css/ style.css @install -Dm644 -t /usr/share/${PKGNAME}/css/ style.css
# @install -Dm644 -t /usr/share/${PKGNAME}/images/ ${PKGNAME}.svg @install -Dm644 -t /usr/share/${PKGNAME}/images/ bg_top.png
@install -Dm644 -t /usr/share/${PKGNAME}/images/ ${PKGNAME}.svg
# @install -Dm644 -t /usr/share/${PKGNAME}/images/ ${PKGNAME}.png # @install -Dm644 -t /usr/share/${PKGNAME}/images/ ${PKGNAME}.png
@gtk-update-icon-cache -fiq /usr/share/icons/hicolor/ @gtk-update-icon-cache -fiq /usr/share/icons/hicolor/
@update-desktop-database --quiet 2>/dev/null @update-desktop-database --quiet 2>/dev/null

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

@ -43,7 +43,7 @@ int main(int argc, char** argv)
str_cmd_argv+= to_string(*argv[i]) + " "; str_cmd_argv+= to_string(*argv[i]) + " ";
} }
if (geteuid()!=0){ if (geteuid()!=0){
string cmd = "pkexec " + app_name + " " + str_cmd_argv ; string cmd = "pkexec " + app_name + " " + str_cmd_argv;
system(cmd.c_str()); system(cmd.c_str());
return 0; return 0;
} }

@ -191,6 +191,7 @@ void MainWindow::get_path_filemaneg(){
path_file_name = wndChooseFileWallpaper->get_filename(); path_file_name = wndChooseFileWallpaper->get_filename();
if (path_file_name.length()==0){} if (path_file_name.length()==0){}
else{ else{
txtCmd->set_text(path_file_name);
this->close_filemaneg(); this->close_filemaneg();
} }
} }
@ -204,7 +205,7 @@ void MainWindow::open_list_app(){
} }
} }
void MainWindow::start_cmd(){ void MainWindow::start_cmd(){
txtCmd->set_text(""); //txtCmd->set_text("");
string str_cmd_terminal=""; string str_cmd_terminal="";
string str_variants_root = ""; string str_variants_root = "";
string str_nice_cmd = ""; string str_nice_cmd = "";
@ -268,17 +269,24 @@ void MainWindow::start_cmd(){
str_nice_cmd = "nice -n " + to_string(spinPriority->get_value_as_int()) + " "; str_nice_cmd = "nice -n " + to_string(spinPriority->get_value_as_int()) + " ";
} }
//========================================= //=========================================
string user_cmd = txtCmd->get_text();
//=========================================
if (user_cmd.length()==0){
messageError->show();
}
if (chbTerminal->get_active()){ if (chbTerminal->get_active()){
str_cmd_terminal=" xterm -e "; str_cmd_terminal=" xterm -e ";
} }
else{ else{
str_cmd_terminal=""; str_cmd_terminal="";
} }
//========================================= string cmd = "";
if (path_file_name.length()==0){ cmd = "" + str_cmd_terminal + str_variants_root + str_nice_cmd + user_cmd + " &";
messageError->show(); cout << cmd << endl;
} txtCmd->set_text(cmd);
txtCmd->set_text(str_cmd_terminal + str_variants_root + str_nice_cmd); system(cmd.c_str());
path_file_name=""; path_file_name="";
} }
@ -345,18 +353,21 @@ void MainWindow::pars_dir_bin(){
} }
void MainWindow::pars_users(){ void MainWindow::pars_users(){
while (true) { while (true) {
errno = 0; // so we can distinguish errors from no more entries errno = 0; // so we can distinguish errors from no more entries
passwd* entry = getpwent(); passwd* entry = getpwent();
if (!entry) { if (!entry) {
if (errno) { if (errno) {
break;
}
break; break;
} }
break;
} if (entry->pw_uid>=1000 && entry->pw_uid!=65534){
if (entry->pw_uid>=1000 && entry->pw_uid!=65534){ cmbUser->append(entry->pw_name);
cmbUser->append(entry->pw_name); }
}
} }
cmbUser->append("root");
endpwent(); endpwent();
} }
void MainWindow::pars_apps(){ void MainWindow::pars_apps(){

@ -1,4 +1,3 @@
.cssboxColor1{ .cssboxColor1{
background-color: rgb(255, 255, 255); background: url("/usr/share/ublexec/images/bg_top.png") no-repeat;
background-size: 100% auto;
} }

@ -152,8 +152,8 @@
<property name="margin-end">5</property> <property name="margin-end">5</property>
<property name="margin-top">6</property> <property name="margin-top">6</property>
<property name="margin-bottom">6</property> <property name="margin-bottom">6</property>
<property name="pixel-size">80</property> <property name="pixel-size">69</property>
<property name="icon-name">application-x-executable</property> <property name="icon-name">ublexec</property>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
@ -173,6 +173,8 @@
<property name="margin-bottom">6</property> <property name="margin-bottom">6</property>
<property name="label" translatable="yes">Запуск приложений от имени пользователя с указанным приоритетом</property> <property name="label" translatable="yes">Запуск приложений от имени пользователя с указанным приоритетом</property>
<attributes> <attributes>
<attribute name="weight" value="bold"/>
<attribute name="foreground" value="#000023233232"/>
<attribute name="size" value="12288"/> <attribute name="size" value="12288"/>
</attributes> </attributes>
</object> </object>

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 212 KiB

Loading…
Cancel
Save