From 5f93cb6aa4fc433d37ee251146a426da57dffa83 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Tue, 14 May 2019 17:10:14 +0200 Subject: Add 'disable screensaver' checkbox --- src/dialog.cpp | 8 ++++- src/i18n/de.ts | 15 ++++---- src/i18n/pt.ts | 104 +++++++++++++++++++++++++++++-------------------------- src/ui/dialog.ui | 71 +++++++++++++++++++++---------------- 4 files changed, 109 insertions(+), 89 deletions(-) diff --git a/src/dialog.cpp b/src/dialog.cpp index fb6b95e..10ebe22 100644 --- a/src/dialog.cpp +++ b/src/dialog.cpp @@ -145,6 +145,12 @@ void Dialog::on_treeView_doubleClicked(const QModelIndex& index) setenv("VMCHOOSER_ADMIN_MODE", "FALSE", 1); } + if (ui->chkNoScreenSaver->isChecked()) { + setenv("VMCHOOSER_DISABLE_SCREENSAVER", "TRUE", 1); + } else { + setenv("VMCHOOSER_DISABLE_SCREENSAVER", "FALSE", 1); + } + // Run session if (s->run()) { // Run session start script if the session could be initialized successfully @@ -419,7 +425,7 @@ void Dialog::onCenterTimer() { if (autoQuit_ == 0) { QCoreApplication::instance()->exit(0); } else if (autoQuit_ < 60) { - ui->lblAutoQuit->setText(this->trUtf8("Auto logout in %1").arg(autoQuit_)); + ui->lblAutoQuit->setText(trUtf8("Auto logout in %1").arg(autoQuit_)); ui->lblAutoQuit->show(); } else if (ui->lblAutoQuit->isVisible()) { ui->lblAutoQuit->hide(); diff --git a/src/i18n/de.ts b/src/i18n/de.ts index a8e0ba0..3a9965b 100644 --- a/src/i18n/de.ts +++ b/src/i18n/de.ts @@ -11,14 +11,6 @@ vmchooser: invalid session file vmchooser: ungültige Sitzungsdatei - - vmchooser: no URL given - Fehlende URL - - - vmchooser: invalid URL - Ungültige URL - vmchooser: invalid size argument Ungültige Größe @@ -54,6 +46,9 @@ -f, --file direct boot .desktop file -x, --xpath path of X Session .desktop files -u, --url url of vmware .xml file + --url-list url of vms' list as .xml file + --url-news url of the news to display + --url-help url of the help to display -s, --size window size <width>x<height> -t, --theme theme --template-mode how to treat template entries (IGNORE or BUMP) @@ -214,6 +209,10 @@ FILE can be a vmware .xml or an X .desktop file Screen and projector setup Bildschirm und Beamer konfigurieren + + Disable ScreenSaver and Standby + Bildschirmschoner deaktivieren + QObject diff --git a/src/i18n/pt.ts b/src/i18n/pt.ts index f873fe8..3260fb3 100755 --- a/src/i18n/pt.ts +++ b/src/i18n/pt.ts @@ -1,10 +1,10 @@ - + Console - + Usage: vmchooser [ OPTIONS ] --allow-vm-edit show the 'edit this vm' checkbox @@ -19,10 +19,14 @@ -f, --file direct boot .desktop file -x, --xpath path of X Session .desktop files -u, --url url of vmware .xml file + --url-list url of vms' list as .xml file + --url-news url of the news to display + --url-help url of the help to display -s, --size window size <width>x<height> -t, --theme theme --template-mode how to treat template entries (IGNORE or BUMP) -p, --pvs show pvs options + --pvs-checked check pvs box by default -D, --debug print debug information -v, --version print version and exit -h, --help print usage information and exit @@ -36,47 +40,37 @@ FILE can be a vmware .xml or an X .desktop file - + vmchooser: failed to run session vmchooser: falhou ao executar a sessão - + vmchooser: invalid session file vmchooser: arquivo de sessão inválido - + Requested --config not found: - + Using user specific config: - + Using global config: - + No config file found or given - - vmchooser: no URL given - - - - - vmchooser: invalid URL - - - - + vmchooser: invalid size argument @@ -85,7 +79,7 @@ FILE can be a vmware .xml or an X .desktop file Dialog - + vmchooser seletor @@ -95,142 +89,152 @@ FILE can be a vmware .xml or an X .desktop file - + News - + Local - + My Classes - + All Classes - + Filter: - + Details - + Description - + Name - + Creator - + Operating System - + Platform - + Edit VM - + + Disable ScreenSaver and Standby + + + + Join PVS - + Report Bug - + Help/News - + + Screen and projector setup + + + + Abort Interromper - + Start Iniciar - + Loading... - + URL Error - + No Items - + join PVS(limited) - + Auto logout in %1 - + Native Linux - + Could not get news. - + Could not get news. (//news/date or //news/info missing) - + Could not get help. - + Could not get help (XML has no //news/info) - + Vmchooser failed to run the selected session! O seletor da VM falhou ao executar a sessão selecionada! @@ -258,12 +262,12 @@ FILE can be a vmware .xml or an X .desktop file QObject - + Warning - + The selected session is based on a 64 bit operating system, but this computer doesn't seem to support this (VT-x/AMD-V not supported by CPU, or disabled in BIOS). You will probably get an error message while the virtualizer is initializing. diff --git a/src/ui/dialog.ui b/src/ui/dialog.ui index b278b9e..e4c4e41 100644 --- a/src/ui/dialog.ui +++ b/src/ui/dialog.ui @@ -128,6 +128,9 @@ margin-bottom:0px;} + + true + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> @@ -135,9 +138,6 @@ p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans';">Loading...</span></p></body></html> - - true - @@ -163,6 +163,9 @@ p, li { white-space: pre-wrap; } + + true + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> @@ -170,9 +173,6 @@ p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans';">Loading...</span></p></body></html> - - true - @@ -494,6 +494,9 @@ border:1px solid #999; + + true + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> @@ -501,9 +504,6 @@ p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans';">Click on an item on the left side for more information</span></p></body></html> - - true - @@ -537,27 +537,38 @@ p, li { white-space: pre-wrap; } - - - Edit VM - - - - - - - Qt::RightToLeft - - - Join PVS - - - false - - - false - - + + + + + Edit VM + + + + + + + Disable ScreenSaver and Standby + + + + + + + Qt::LeftToRight + + + Join PVS + + + false + + + false + + + + -- cgit v1.2.3-55-g7522