Skip to content
Permalink
Browse files

Improve interaction on first run dialog. Show dev message for dev use…

…rs. Fix link to changelog
  • Loading branch information
timlinux authored and nyalldawson committed Dec 16, 2020
1 parent 8a7b918 commit c33e8bab95f21044263591c712dab67d9714d098
Showing with 67 additions and 45 deletions.
  1. +15 −0 src/app/qgsfirstrundialog.cpp
  2. +52 −45 src/ui/qgsfirstrundialog.ui
@@ -25,6 +25,21 @@ QgsFirstRunDialog::QgsFirstRunDialog( QWidget *parent ) : QDialog( parent )
{
mWelcomeDevLabel->show();
}
QStringList versionParts = Qgis::version().split( '.' );
QString major = versionParts.at( 0 );
QString minor = versionParts.at( 1 );
if ( minor.toInt() % 2 == 1 )
{
// Development version doesn't show the link to the changelog
mWelcomeProdLabel->hide();
}
else
{
// Production version shows link.
mWelcomeProdLabel->setText( mWelcomeProdLabel->text().replace( QString( "VERSION_TOKEN" ), major.append( minor ) ) );
mWelcomeDevLabel->hide();
}

}

bool QgsFirstRunDialog::migrateSettings()
@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>742</width>
<height>320</height>
<width>738</width>
<height>365</height>
</rect>
</property>
<property name="windowTitle">
@@ -17,48 +17,7 @@
<property name="horizontalSpacing">
<number>50</number>
</property>
<item row="0" column="0" rowspan="3">
<widget class="QLabel" name="label_3">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap resource="../../images/images.qrc">:/images/icons/qgis_icon.svg</pixmap>
</property>
<property name="scaledContents">
<bool>false</bool>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="mWelcomeLabel">
<property name="font">
<font>
<pointsize>23</pointsize>
</font>
</property>
<property name="text">
<string>Welcome to QGIS 3</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="mWelcomeDevLabel">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-style:italic;&quot;&gt;You are running a dev version. We would love your feedback and testing.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://changelog.qgis.org/en/qgis/version/3.4-LTR/&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#2a76c6;&quot;&gt;Check out &lt;/span&gt;&lt;/a&gt;the change log for all the great new features introduced with this release!&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="1">
<item row="3" column="1">
<widget class="QWidget" name="mMigrationWidget" native="true">
<layout class="QGridLayout" name="gridLayout_2">
<property name="leftMargin">
@@ -101,13 +60,61 @@
</layout>
</widget>
</item>
<item row="3" column="0" colspan="2">
<item row="0" column="1">
<widget class="QLabel" name="mWelcomeLabel">
<property name="font">
<font>
<pointsize>23</pointsize>
</font>
</property>
<property name="text">
<string>Welcome to QGIS 3</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLabel" name="mWelcomeProdLabel">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;a href=&quot;https://www.qgis.org/en/site/forusers/visualchangelogVERSION_TOKEN/index.html&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#2a76c6;&quot;&gt;Check out &lt;/span&gt;&lt;/a&gt;the change log for all the great new features introduced with this release!&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="4" column="0" colspan="2">
<widget class="QPushButton" name="pushButton">
<property name="text">
<string>Let's get started!</string>
</property>
</widget>
</item>
<item row="0" column="0" rowspan="4">
<widget class="QLabel" name="label_3">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap resource="../../images/images.qrc">:/images/icons/qgis_icon.svg</pixmap>
</property>
<property name="scaledContents">
<bool>false</bool>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="mWelcomeDevLabel">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-style:italic;&quot;&gt;You are running a dev version. We would love your feedback and testing!&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
</layout>
</widget>
<resources>

0 comments on commit c33e8ba

Please sign in to comment.
You can’t perform that action at this time.