Improved wording on the unknown version prompt, replaced the command link buttons with a more regular button box

Sun, 07 Jun 2015 18:48:06 +0300

author
Teemu Piippo <tsapii@utu.fi>
date
Sun, 07 Jun 2015 18:48:06 +0300
changeset 52
7dcfac8a9f17
parent 51
5e4bd3b212ce
child 53
a5b53cc10436

Improved wording on the unknown version prompt, replaced the command link buttons with a more regular button box

launcher/prompts.cpp file | annotate | diff | comparison | revisions
ui/unknownversion.ui file | annotate | diff | comparison | revisions
--- a/launcher/prompts.cpp	Sun Jun 07 18:31:19 2015 +0300
+++ b/launcher/prompts.cpp	Sun Jun 07 18:48:06 2015 +0300
@@ -44,11 +44,12 @@
 
 	// Replace the placeholders
 	QString text = ui->m_description->text();
-	text.replace ("<DEMO>", basename (fileName));
-	text.replace ("<VERSION>", binaryName);
+	text.replace ("{{DEMO}}", basename (fileName));
+	text.replace ("{{VERSION}}", binaryName);
 	ui->m_description->setText (text);
 
-	connect (ui->m_addVersion, SIGNAL (clicked (bool)), this, SLOT (addBinary()));
+	connect (ui->buttonBox, SIGNAL (accepted()), this, SLOT (addBinary()));
+	connect (ui->buttonBox, SIGNAL (rejected()), this, SLOT (reject()));
 	connect (ui->m_findBinary, SIGNAL (clicked (bool)), this, SLOT (findBinary()));
 	setWindowTitle (versionSignature());
 }
--- a/ui/unknownversion.ui	Sun Jun 07 18:31:19 2015 +0300
+++ b/ui/unknownversion.ui	Sun Jun 07 18:48:06 2015 +0300
@@ -7,21 +7,21 @@
     <x>0</x>
     <y>0</y>
     <width>400</width>
-    <height>246</height>
+    <height>159</height>
    </rect>
   </property>
   <property name="windowTitle">
    <string>Unknown Zandronum Version</string>
   </property>
   <property name="windowIcon">
-   <iconset resource="../../zcinema.qrc">
+   <iconset>
     <normaloff>:/icons/zcinema.ico</normaloff>:/icons/zcinema.ico</iconset>
   </property>
   <layout class="QVBoxLayout" name="verticalLayout">
    <item>
     <widget class="QLabel" name="m_description">
      <property name="text">
-      <string>The demo &lt;DEMO&gt; has been recorded with unknown version &lt;VERSION&gt;. You can add this to the list of known Zandronum versions and specify a binary for it here.</string>
+      <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;The demo {{DEMO}} has been recorded with Zandronum {{VERSION}}, which is unknown to ZCinema. You must provide an executable path in order to launch this demo.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
      </property>
      <property name="wordWrap">
       <bool>true</bool>
@@ -61,50 +61,14 @@
     </layout>
    </item>
    <item>
-    <widget class="Line" name="line_2">
-     <property name="orientation">
-      <enum>Qt::Horizontal</enum>
-     </property>
-    </widget>
-   </item>
-   <item>
-    <widget class="QCommandLinkButton" name="m_addVersion">
-     <property name="text">
-      <string>Add Zandronum version and launch the demo</string>
-     </property>
-    </widget>
-   </item>
-   <item>
-    <widget class="QCommandLinkButton" name="m_cancel">
-     <property name="text">
-      <string>Cancel and exit</string>
-     </property>
-     <property name="description">
-      <string/>
+    <widget class="QDialogButtonBox" name="buttonBox">
+     <property name="standardButtons">
+      <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
      </property>
     </widget>
    </item>
   </layout>
  </widget>
- <resources>
-  <include location="../../zcinema.qrc"/>
- </resources>
- <connections>
-  <connection>
-   <sender>m_cancel</sender>
-   <signal>clicked()</signal>
-   <receiver>UnknownVersion</receiver>
-   <slot>reject()</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>118</x>
-     <y>210</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>394</x>
-     <y>73</y>
-    </hint>
-   </hints>
-  </connection>
- </connections>
+ <resources/>
+ <connections/>
 </ui>

mercurial