Removed welcome dialog. It is junk.
This commit is contained in:
parent
9537653be9
commit
31cfa8fefa
@ -275,7 +275,6 @@ set(APP_SOURCES
|
|||||||
src/gui/iconthemefactory.cpp
|
src/gui/iconthemefactory.cpp
|
||||||
src/gui/skinfactory.cpp
|
src/gui/skinfactory.cpp
|
||||||
src/gui/formsettings.cpp
|
src/gui/formsettings.cpp
|
||||||
src/gui/formwelcome.cpp
|
|
||||||
src/gui/formabout.cpp
|
src/gui/formabout.cpp
|
||||||
src/gui/shortcutcatcher.cpp
|
src/gui/shortcutcatcher.cpp
|
||||||
src/gui/shortcutbutton.cpp
|
src/gui/shortcutbutton.cpp
|
||||||
@ -346,7 +345,6 @@ set(APP_HEADERS
|
|||||||
src/gui/iconthemefactory.h
|
src/gui/iconthemefactory.h
|
||||||
src/gui/skinfactory.h
|
src/gui/skinfactory.h
|
||||||
src/gui/formsettings.h
|
src/gui/formsettings.h
|
||||||
src/gui/formwelcome.h
|
|
||||||
src/gui/formabout.h
|
src/gui/formabout.h
|
||||||
src/gui/shortcutcatcher.h
|
src/gui/shortcutcatcher.h
|
||||||
src/gui/shortcutbutton.h
|
src/gui/shortcutbutton.h
|
||||||
@ -394,7 +392,6 @@ set(APP_FORMS
|
|||||||
src/gui/formupdate.ui
|
src/gui/formupdate.ui
|
||||||
src/gui/formmain.ui
|
src/gui/formmain.ui
|
||||||
src/gui/formsettings.ui
|
src/gui/formsettings.ui
|
||||||
src/gui/formwelcome.ui
|
|
||||||
src/gui/formabout.ui
|
src/gui/formabout.ui
|
||||||
src/gui/formstandardcategorydetails.ui
|
src/gui/formstandardcategorydetails.ui
|
||||||
src/gui/formstandardfeeddetails.ui
|
src/gui/formstandardfeeddetails.ui
|
||||||
|
@ -1,80 +0,0 @@
|
|||||||
// This file is part of RSS Guard.
|
|
||||||
//
|
|
||||||
// Copyright (C) 2011-2014 by Martin Rotter <rotter.martinos@gmail.com>
|
|
||||||
//
|
|
||||||
// RSS Guard is free software: you can redistribute it and/or modify
|
|
||||||
// it under the terms of the GNU General Public License as published by
|
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
|
||||||
// (at your option) any later version.
|
|
||||||
//
|
|
||||||
// RSS Guard is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
// GNU General Public License for more details.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the GNU General Public License
|
|
||||||
// along with RSS Guard. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
#include "gui/formwelcome.h"
|
|
||||||
|
|
||||||
#include "core/defs.h"
|
|
||||||
|
|
||||||
#if !defined(Q_OS_WIN)
|
|
||||||
#include "gui/messagebox.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <QDesktopServices>
|
|
||||||
#include <QUrl>
|
|
||||||
#include <QLabel>
|
|
||||||
#include <QDesktopWidget>
|
|
||||||
|
|
||||||
|
|
||||||
FormWelcome::FormWelcome(QWidget *parent) : QDialog(parent), m_ui(new Ui::FormWelcome) {
|
|
||||||
m_ui->setupUi(this);
|
|
||||||
|
|
||||||
// Set flags.
|
|
||||||
setWindowFlags(Qt::MSWindowsFixedSizeDialogHint | Qt::Dialog);
|
|
||||||
|
|
||||||
#if !defined(Q_OS_WIN)
|
|
||||||
MessageBox::iconify(m_ui->m_buttonBox);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Set icon.
|
|
||||||
setWindowIcon(QIcon(APP_ICON_PATH));
|
|
||||||
m_ui->m_lblLogo->setPixmap(QPixmap(APP_ICON_PATH));
|
|
||||||
|
|
||||||
// Move the dialog into the middle of the screen.
|
|
||||||
QRect screen = qApp->desktop()->screenGeometry();
|
|
||||||
move(screen.center() - rect().center());
|
|
||||||
|
|
||||||
// Make sure that clicked hyperlinks are opened in defult web browser.
|
|
||||||
connect(m_ui->m_lblInfo, SIGNAL(linkActivated(QString)),
|
|
||||||
this, SLOT(openLink(QString)));
|
|
||||||
|
|
||||||
// Setup the text.
|
|
||||||
m_ui->m_lblCaption->setText(tr("Welcome to %1").arg(APP_NAME));
|
|
||||||
m_ui->m_lblInfo->setText(
|
|
||||||
tr("<p>%3 is a (very) easy-to-use feed reader. "
|
|
||||||
"It supports all major feed formats, including RSS, "
|
|
||||||
"ATOM and RDF.</p>"
|
|
||||||
"<p>Make sure you explore all available features. "
|
|
||||||
"If you find a bug or if you want to propose new "
|
|
||||||
"feature, then create new "
|
|
||||||
"<a href=\"%1\"><span "
|
|
||||||
"style=\"text-decoration: underline; color:#0000ff;\">issue "
|
|
||||||
"report</span></a>.</p>"
|
|
||||||
"<p>%3 can be translated to any language. "
|
|
||||||
"Contact its <a href=\"mailto:%2\"><span "
|
|
||||||
"style=\"text-decoration: underline; color:#0000ff;\">author</span></a> "
|
|
||||||
"in case of your interest.</p><p><br/></p>").arg(APP_URL_ISSUES,
|
|
||||||
APP_EMAIL,
|
|
||||||
APP_NAME));
|
|
||||||
}
|
|
||||||
|
|
||||||
void FormWelcome::openLink(const QString &link) {
|
|
||||||
QDesktopServices::openUrl(QUrl(link));
|
|
||||||
}
|
|
||||||
|
|
||||||
FormWelcome::~FormWelcome() {
|
|
||||||
delete m_ui;
|
|
||||||
}
|
|
@ -1,46 +0,0 @@
|
|||||||
// This file is part of RSS Guard.
|
|
||||||
//
|
|
||||||
// Copyright (C) 2011-2014 by Martin Rotter <rotter.martinos@gmail.com>
|
|
||||||
//
|
|
||||||
// RSS Guard is free software: you can redistribute it and/or modify
|
|
||||||
// it under the terms of the GNU General Public License as published by
|
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
|
||||||
// (at your option) any later version.
|
|
||||||
//
|
|
||||||
// RSS Guard is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
// GNU General Public License for more details.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the GNU General Public License
|
|
||||||
// along with RSS Guard. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
#ifndef FORMWELCOME_H
|
|
||||||
#define FORMWELCOME_H
|
|
||||||
|
|
||||||
#include "ui_formwelcome.h"
|
|
||||||
|
|
||||||
#include <QDialog>
|
|
||||||
|
|
||||||
|
|
||||||
namespace Ui {
|
|
||||||
class FormWelcome;
|
|
||||||
}
|
|
||||||
|
|
||||||
class FormWelcome : public QDialog {
|
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
|
||||||
// Constructors and destructors.
|
|
||||||
explicit FormWelcome(QWidget *parent = 0);
|
|
||||||
virtual ~FormWelcome();
|
|
||||||
|
|
||||||
private slots:
|
|
||||||
// Opens given link in a default web browser.
|
|
||||||
void openLink(const QString &link);
|
|
||||||
|
|
||||||
private:
|
|
||||||
Ui::FormWelcome *m_ui;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // FORMWELCOME_H
|
|
@ -1,124 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<ui version="4.0">
|
|
||||||
<class>FormWelcome</class>
|
|
||||||
<widget class="QDialog" name="FormWelcome">
|
|
||||||
<property name="windowModality">
|
|
||||||
<enum>Qt::ApplicationModal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>435</width>
|
|
||||||
<height>237</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="windowTitle">
|
|
||||||
<string>Welcome</string>
|
|
||||||
</property>
|
|
||||||
<property name="modal">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
|
||||||
<item row="0" column="0" rowspan="2">
|
|
||||||
<widget class="QLabel" name="m_lblLogo">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>110</width>
|
|
||||||
<height>110</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>110</width>
|
|
||||||
<height>110</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string notr="true"/>
|
|
||||||
</property>
|
|
||||||
<property name="scaledContents">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="wordWrap">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="textInteractionFlags">
|
|
||||||
<set>Qt::NoTextInteraction</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QLabel" name="m_lblCaption">
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>16777215</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<pointsize>11</pointsize>
|
|
||||||
<weight>50</weight>
|
|
||||||
<bold>false</bold>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string notr="true"/>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="QLabel" name="m_lblInfo">
|
|
||||||
<property name="text">
|
|
||||||
<string notr="true"/>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
|
||||||
</property>
|
|
||||||
<property name="wordWrap">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0" colspan="2">
|
|
||||||
<widget class="QDialogButtonBox" name="m_buttonBox">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="standardButtons">
|
|
||||||
<set>QDialogButtonBox::Ok</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<resources/>
|
|
||||||
<connections>
|
|
||||||
<connection>
|
|
||||||
<sender>m_buttonBox</sender>
|
|
||||||
<signal>accepted()</signal>
|
|
||||||
<receiver>FormWelcome</receiver>
|
|
||||||
<slot>accept()</slot>
|
|
||||||
<hints>
|
|
||||||
<hint type="sourcelabel">
|
|
||||||
<x>248</x>
|
|
||||||
<y>254</y>
|
|
||||||
</hint>
|
|
||||||
<hint type="destinationlabel">
|
|
||||||
<x>157</x>
|
|
||||||
<y>274</y>
|
|
||||||
</hint>
|
|
||||||
</hints>
|
|
||||||
</connection>
|
|
||||||
</connections>
|
|
||||||
</ui>
|
|
@ -24,7 +24,6 @@
|
|||||||
#include "gui/iconthemefactory.h"
|
#include "gui/iconthemefactory.h"
|
||||||
#include "gui/skinfactory.h"
|
#include "gui/skinfactory.h"
|
||||||
#include "gui/formmain.h"
|
#include "gui/formmain.h"
|
||||||
#include "gui/formwelcome.h"
|
|
||||||
#include "gui/systemtrayicon.h"
|
#include "gui/systemtrayicon.h"
|
||||||
#include "gui/feedmessageviewer.h"
|
#include "gui/feedmessageviewer.h"
|
||||||
#include "gui/feedsview.h"
|
#include "gui/feedsview.h"
|
||||||
@ -104,12 +103,6 @@ int main(int argc, char *argv[]) {
|
|||||||
// Now is a good time to initialize dynamic keyboard shortcuts.
|
// Now is a good time to initialize dynamic keyboard shortcuts.
|
||||||
DynamicShortcuts::load(main_window.allActions());
|
DynamicShortcuts::load(main_window.allActions());
|
||||||
|
|
||||||
// Display welcome dialog if application is launched for the first time.
|
|
||||||
if (Settings::instance()->value(APP_CFG_GEN, "first_start", true).toBool()) {
|
|
||||||
Settings::instance()->setValue(APP_CFG_GEN, "first_start", false);
|
|
||||||
FormWelcome(&main_window).exec();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Display main window.
|
// Display main window.
|
||||||
if (Settings::instance()->value(APP_CFG_GUI, "start_hidden",
|
if (Settings::instance()->value(APP_CFG_GUI, "start_hidden",
|
||||||
false).toBool() &&
|
false).toBool() &&
|
||||||
|
Loading…
x
Reference in New Issue
Block a user