From 18a8fb3b9e7cd016d8aa57db319f99f017244811 Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Tue, 11 Feb 2014 20:23:10 +0100 Subject: [PATCH] Well... --- src/gui/formsettings.cpp | 1 - src/gui/formsettings.ui | 23 ++--- src/gui/formstandardfeeddetails.cpp | 16 ++-- src/gui/formstandardfeeddetails.h | 1 - src/gui/formstandardfeeddetails.ui | 129 ++++++++++++++++++---------- 5 files changed, 106 insertions(+), 64 deletions(-) diff --git a/src/gui/formsettings.cpp b/src/gui/formsettings.cpp index 0d1d0851d..3bf7576ac 100755 --- a/src/gui/formsettings.cpp +++ b/src/gui/formsettings.cpp @@ -445,7 +445,6 @@ void FormSettings::loadDataStorage() { onMysqlUsernameChanged(QString()); onMysqlPasswordChanged(QString()); - m_ui->m_lblMysqlTestResult->setLayoutDirection(Qt::RightToLeft); m_ui->m_lblMysqlTestResult->setStatus(WidgetWithStatus::Information, tr("No connection test triggered so far.")); diff --git a/src/gui/formsettings.ui b/src/gui/formsettings.ui index 938a91966..e582dbb61 100644 --- a/src/gui/formsettings.ui +++ b/src/gui/formsettings.ui @@ -230,6 +230,9 @@ Authors of this application are NOT responsible for lost data. 0 + + Qt::RightToLeft + @@ -283,8 +286,8 @@ Authors of this application are NOT responsible for lost data. 0 0 - 564 - 363 + 100 + 30 @@ -361,8 +364,8 @@ Authors of this application are NOT responsible for lost data. 0 0 - 558 - 337 + 209 + 245 @@ -1109,12 +1112,6 @@ Authors of this application are NOT responsible for lost data. - - DynamicShortcutsWidget - QWidget -
dynamicshortcutswidget.h
- 1 -
LineEditWithStatus QWidget @@ -1127,6 +1124,12 @@ Authors of this application are NOT responsible for lost data.
labelwithstatus.h
1
+ + DynamicShortcutsWidget + QWidget +
dynamicshortcutswidget.h
+ 1 +
diff --git a/src/gui/formstandardfeeddetails.cpp b/src/gui/formstandardfeeddetails.cpp index a7209d978..ffcf51f7b 100644 --- a/src/gui/formstandardfeeddetails.cpp +++ b/src/gui/formstandardfeeddetails.cpp @@ -250,14 +250,18 @@ void FormStandardFeedDetails::guessFeed() { if (result.first != NULL) { // Icon was perhaps guessed. m_ui->m_btnIcon->setIcon(result.first->icon()); - m_ui->m_txtTitle->lineEdit()->setText(result.first->title()); m_ui->m_txtDescription->lineEdit()->setText(result.first->description()); m_ui->m_cmbType->setCurrentIndex(m_ui->m_cmbType->findData(QVariant::fromValue((int) result.first->type()))); m_ui->m_cmbEncoding->setCurrentIndex(m_ui->m_cmbEncoding->findData(result.first->encoding(), Qt::DisplayRole)); + + m_ui->m_lblFetchMetadata->setStatus(WidgetWithStatus::Ok, + tr("Feed metadata fetched successfully.")); } else { // No feed guessed, even no icon available. + m_ui->m_lblFetchMetadata->setStatus(WidgetWithStatus::Error, + tr("Error occurred.")); } } @@ -279,7 +283,7 @@ void FormStandardFeedDetails::createConnections() { this, SLOT(onAuthenticationSwitched())); connect(m_ui->m_cmbAutoUpdateType, SIGNAL(currentIndexChanged(int)), this, SLOT(onAutoUpdateTypeChanged(int))); - connect(m_btnLoadDataFromInternet, SIGNAL(clicked()), + connect(m_ui->m_btnFetchMetadata, SIGNAL(clicked()), this, SLOT(guessFeed())); // Icon connections. @@ -309,10 +313,6 @@ void FormStandardFeedDetails::initialize() { m_ui = new Ui::FormStandardFeedDetails(); m_ui->setupUi(this); - // Add button for fetching feed data from internet. - m_btnLoadDataFromInternet = m_ui->m_buttonBox->addButton(tr("Fetch feed metadata"), - QDialogButtonBox::HelpRole); - // Set flags and attributes. setWindowFlags(Qt::MSWindowsFixedSizeDialogHint | Qt::Dialog); setWindowIcon(IconThemeFactory::instance()->fromTheme("item-new")); @@ -374,6 +374,10 @@ void FormStandardFeedDetails::initialize() { m_iconMenu->addAction(m_actionNoIcon); m_ui->m_btnIcon->setMenu(m_iconMenu); + // Set feed metadata fetch label. + m_ui->m_lblFetchMetadata->setStatus(WidgetWithStatus::Information, + tr("No metadata fetched so far.")); + // Setup auto-update options. m_ui->m_spinAutoUpdateInterval->setValue(DEFAULT_AUTO_UPDATE_INTERVAL); m_ui->m_cmbAutoUpdateType->addItem(tr("Do not auto-update at all"), QVariant::fromValue((int) FeedsModelStandardFeed::DontAutoUpdate)); diff --git a/src/gui/formstandardfeeddetails.h b/src/gui/formstandardfeeddetails.h index 53700e607..67b6c006d 100644 --- a/src/gui/formstandardfeeddetails.h +++ b/src/gui/formstandardfeeddetails.h @@ -72,7 +72,6 @@ class FormStandardFeedDetails : public QDialog { QAction *m_actionLoadIconFromFile; QAction *m_actionUseDefaultIcon; QAction *m_actionNoIcon; - QPushButton *m_btnLoadDataFromInternet; }; #endif // FORMSTANDARDFEEDDETAILS_H diff --git a/src/gui/formstandardfeeddetails.ui b/src/gui/formstandardfeeddetails.ui index 21155981a..980103b88 100644 --- a/src/gui/formstandardfeeddetails.ui +++ b/src/gui/formstandardfeeddetails.ui @@ -6,8 +6,8 @@ 0 0 - 440 - 391 + 492 + 400 @@ -57,56 +57,27 @@ - - - Title - - - m_txtTitle - - - - - - - - - - Description - - - m_txtDescription - - - - - - - - - - URL - - - - - - - Encoding - + Select encoding of the standard feed. If you are unsure about the encoding, then select "UTF-8" encoding. - + + + + Auto-update + + + + @@ -142,7 +113,67 @@ - + + + + Title + + + m_txtTitle + + + + + + + + + + Description + + + m_txtDescription + + + + + + + + + + URL + + + + + + + + + + + + Fetch it now + + + + + + + + 0 + 0 + + + + Qt::RightToLeft + + + + + + Icon @@ -152,7 +183,7 @@ - + @@ -189,7 +220,7 @@ - + Some feeds require authentication, including GMail feeds. BASIC, NTLM-2 and DIGEST-MD5 authentication schemes are supported. @@ -236,10 +267,10 @@
- - + + - Auto-update + Fetch metadata @@ -267,6 +298,12 @@
lineeditwithstatus.h
1 + + LabelWithStatus + QWidget +
labelwithstatus.h
+ 1 +