summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSimon Rettberg2019-05-14 17:10:14 +0200
committerSimon Rettberg2019-05-14 17:10:14 +0200
commit5f93cb6aa4fc433d37ee251146a426da57dffa83 (patch)
tree1424fbe6be4c33ebea7fa971cf32a62a288ab977 /src
parentintroduce '--insecure' option ... (diff)
downloadvmchooser2-5f93cb6aa4fc433d37ee251146a426da57dffa83.tar.gz
vmchooser2-5f93cb6aa4fc433d37ee251146a426da57dffa83.tar.xz
vmchooser2-5f93cb6aa4fc433d37ee251146a426da57dffa83.zip
Add 'disable screensaver' checkbox
Diffstat (limited to 'src')
-rw-r--r--src/dialog.cpp8
-rw-r--r--src/i18n/de.ts15
-rwxr-xr-xsrc/i18n/pt.ts104
-rw-r--r--src/ui/dialog.ui71
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
@@ -12,14 +12,6 @@
<translation>vmchooser: ungültige Sitzungsdatei</translation>
</message>
<message>
- <source>vmchooser: no URL given</source>
- <translation>Fehlende URL</translation>
- </message>
- <message>
- <source>vmchooser: invalid URL</source>
- <translation>Ungültige URL</translation>
- </message>
- <message>
<source>vmchooser: invalid size argument</source>
<translation>Ungültige Größe</translation>
</message>
@@ -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&apos; list as .xml file
+ --url-news url of the news to display
+ --url-help url of the help to display
-s, --size window size &lt;width&gt;x&lt;height&gt;
-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
<source>Screen and projector setup</source>
<translation>Bildschirm und Beamer konfigurieren</translation>
</message>
+ <message>
+ <source>Disable ScreenSaver and Standby</source>
+ <translation>Bildschirmschoner deaktivieren</translation>
+ </message>
</context>
<context>
<name>QObject</name>
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 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
-<TS version="2.0" language="pt">
+<TS version="2.1" language="pt">
<context>
<name>Console</name>
<message>
- <location filename="../main.cpp" line="36"/>
+ <location filename="../main.cpp" line="33"/>
<source>Usage: vmchooser [ OPTIONS ]
--allow-vm-edit show the &apos;edit this vm&apos; 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&apos; list as .xml file
+ --url-news url of the news to display
+ --url-help url of the help to display
-s, --size window size &lt;width&gt;x&lt;height&gt;
-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
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../main.cpp" line="90"/>
+ <location filename="../main.cpp" line="91"/>
<source>vmchooser: failed to run session</source>
<translation>vmchooser: falhou ao executar a sessão</translation>
</message>
<message>
- <location filename="../main.cpp" line="96"/>
+ <location filename="../main.cpp" line="97"/>
<source>vmchooser: invalid session file</source>
<translation>vmchooser: arquivo de sessão inválido</translation>
</message>
<message>
- <location filename="../main.cpp" line="111"/>
+ <location filename="../main.cpp" line="117"/>
<source>Requested --config not found: </source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../main.cpp" line="116"/>
+ <location filename="../main.cpp" line="122"/>
<source>Using user specific config: </source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../main.cpp" line="120"/>
+ <location filename="../main.cpp" line="126"/>
<source>Using global config: </source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../main.cpp" line="123"/>
+ <location filename="../main.cpp" line="129"/>
<source>No config file found or given</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../main.cpp" line="152"/>
- <source>vmchooser: no URL given</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../main.cpp" line="167"/>
- <source>vmchooser: invalid URL</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../main.cpp" line="196"/>
+ <location filename="../main.cpp" line="211"/>
<source>vmchooser: invalid size argument</source>
<translation type="unfinished"></translation>
</message>
@@ -85,7 +79,7 @@ FILE can be a vmware .xml or an X .desktop file
<name>Dialog</name>
<message>
<location filename="../ui/dialog.ui" line="14"/>
- <location filename="../dialog.cpp" line="184"/>
+ <location filename="../dialog.cpp" line="203"/>
<source>vmchooser</source>
<translation>seletor</translation>
</message>
@@ -95,142 +89,152 @@ FILE can be a vmware .xml or an X .desktop file
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../ui/dialog.ui" line="158"/>
+ <location filename="../ui/dialog.ui" line="161"/>
<source>News</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../ui/dialog.ui" line="207"/>
+ <location filename="../ui/dialog.ui" line="213"/>
<source>Local</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../ui/dialog.ui" line="233"/>
+ <location filename="../ui/dialog.ui" line="239"/>
<source>My Classes</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../ui/dialog.ui" line="249"/>
+ <location filename="../ui/dialog.ui" line="255"/>
<source>All Classes</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../ui/dialog.ui" line="325"/>
+ <location filename="../ui/dialog.ui" line="331"/>
<source>Filter:</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../ui/dialog.ui" line="357"/>
+ <location filename="../ui/dialog.ui" line="363"/>
<source>Details</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../ui/dialog.ui" line="369"/>
+ <location filename="../ui/dialog.ui" line="375"/>
<source>Description</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../ui/dialog.ui" line="389"/>
+ <location filename="../ui/dialog.ui" line="395"/>
<source>Name</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../ui/dialog.ui" line="402"/>
+ <location filename="../ui/dialog.ui" line="408"/>
<source>Creator</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../ui/dialog.ui" line="415"/>
+ <location filename="../ui/dialog.ui" line="421"/>
<source>Operating System</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../ui/dialog.ui" line="422"/>
+ <location filename="../ui/dialog.ui" line="428"/>
<source>Platform</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../ui/dialog.ui" line="533"/>
+ <location filename="../ui/dialog.ui" line="544"/>
<source>Edit VM</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../ui/dialog.ui" line="543"/>
+ <location filename="../ui/dialog.ui" line="551"/>
+ <source>Disable ScreenSaver and Standby</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../ui/dialog.ui" line="561"/>
<source>Join PVS</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../ui/dialog.ui" line="573"/>
+ <location filename="../ui/dialog.ui" line="593"/>
<source>Report Bug</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../ui/dialog.ui" line="580"/>
+ <location filename="../ui/dialog.ui" line="600"/>
<source>Help/News</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../ui/dialog.ui" line="600"/>
+ <location filename="../ui/dialog.ui" line="627"/>
+ <source>Screen and projector setup</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../ui/dialog.ui" line="647"/>
<source>Abort</source>
<translation>Interromper</translation>
</message>
<message>
- <location filename="../ui/dialog.ui" line="607"/>
+ <location filename="../ui/dialog.ui" line="654"/>
<source>Start</source>
<translation>Iniciar</translation>
</message>
<message>
- <location filename="../dialog.cpp" line="41"/>
+ <location filename="../dialog.cpp" line="46"/>
<source>Loading...</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../dialog.cpp" line="42"/>
+ <location filename="../dialog.cpp" line="47"/>
<source>URL Error</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../dialog.cpp" line="43"/>
+ <location filename="../dialog.cpp" line="48"/>
<source>No Items</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../dialog.cpp" line="73"/>
+ <location filename="../dialog.cpp" line="82"/>
<source>join PVS(limited)</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../dialog.cpp" line="400"/>
+ <location filename="../dialog.cpp" line="428"/>
<source>Auto logout in %1</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../dialog.cpp" line="497"/>
+ <location filename="../dialog.cpp" line="687"/>
<source>Native Linux</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../dialog.cpp" line="630"/>
+ <location filename="../dialog.cpp" line="525"/>
<source>Could not get news.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../dialog.cpp" line="652"/>
+ <location filename="../dialog.cpp" line="546"/>
<source>Could not get news. (//news/date or //news/info missing)</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../dialog.cpp" line="701"/>
+ <location filename="../dialog.cpp" line="596"/>
<source>Could not get help.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../dialog.cpp" line="723"/>
+ <location filename="../dialog.cpp" line="615"/>
<source>Could not get help (XML has no //news/info)</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../dialog.cpp" line="185"/>
+ <location filename="../dialog.cpp" line="204"/>
<source>Vmchooser failed to run the selected session!</source>
<translation>O seletor da VM falhou ao executar a sessão selecionada!</translation>
</message>
@@ -258,12 +262,12 @@ FILE can be a vmware .xml or an X .desktop file
<context>
<name>QObject</name>
<message>
- <location filename="../vsession.cpp" line="317"/>
+ <location filename="../vsession.cpp" line="264"/>
<source>Warning</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../vsession.cpp" line="317"/>
+ <location filename="../vsession.cpp" line="265"/>
<source>The selected session is based on a 64 bit operating system, but this computer doesn&apos;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.</source>
<translation type="unfinished"></translation>
</message>
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;}</string>
<layout class="QHBoxLayout" name="horizontalLayout_9">
<item>
<widget class="QTextEdit" name="helpTextBrowser">
+ <property name="readOnly">
+ <bool>true</bool>
+ </property>
<property name="html">
<string notr="true">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
@@ -135,9 +138,6 @@ p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Sans';&quot;&gt;Loading...&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
- <property name="readOnly">
- <bool>true</bool>
- </property>
</widget>
</item>
</layout>
@@ -163,6 +163,9 @@ p, li { white-space: pre-wrap; }
<layout class="QHBoxLayout" name="horizontalLayout_10">
<item>
<widget class="QTextEdit" name="newsTextBrowser">
+ <property name="readOnly">
+ <bool>true</bool>
+ </property>
<property name="html">
<string notr="true">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
@@ -170,9 +173,6 @@ p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Sans';&quot;&gt;Loading...&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
- <property name="readOnly">
- <bool>true</bool>
- </property>
</widget>
</item>
</layout>
@@ -494,6 +494,9 @@ border:1px solid #999;
</item>
<item row="3" column="0">
<widget class="QTextEdit" name="textBrowser">
+ <property name="readOnly">
+ <bool>true</bool>
+ </property>
<property name="html">
<string notr="true">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
@@ -501,9 +504,6 @@ p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Sans';&quot;&gt;Click on an item on the left side for more information&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
- <property name="readOnly">
- <bool>true</bool>
- </property>
</widget>
</item>
</layout>
@@ -537,27 +537,38 @@ p, li { white-space: pre-wrap; }
</spacer>
</item>
<item>
- <widget class="QCheckBox" name="chkAdminMode">
- <property name="text">
- <string>Edit VM</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QCheckBox" name="PVS_checkbox">
- <property name="layoutDirection">
- <enum>Qt::RightToLeft</enum>
- </property>
- <property name="text">
- <string>Join PVS</string>
- </property>
- <property name="checked">
- <bool>false</bool>
- </property>
- <property name="tristate">
- <bool>false</bool>
- </property>
- </widget>
+ <layout class="QVBoxLayout" name="verticalLayout_5">
+ <item>
+ <widget class="QCheckBox" name="chkAdminMode">
+ <property name="text">
+ <string>Edit VM</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QCheckBox" name="chkNoScreenSaver">
+ <property name="text">
+ <string>Disable ScreenSaver and Standby</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QCheckBox" name="PVS_checkbox">
+ <property name="layoutDirection">
+ <enum>Qt::LeftToRight</enum>
+ </property>
+ <property name="text">
+ <string>Join PVS</string>
+ </property>
+ <property name="checked">
+ <bool>false</bool>
+ </property>
+ <property name="tristate">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
</item>
</layout>
</item>