From 0e5e43aa9d84b2a38db99c469de91e4de8017fc7 Mon Sep 17 00:00:00 2001 From: Elvis Angelaccio Date: Tue, 4 Oct 2016 17:30:51 +0200 Subject: Hide message widgets only when reloading the view Otherwise an error message might be hidden before it's even shown. BUG: 357651 FIXED-IN: 16.08.2 REVIEW: 129061 --- src/dolphinmainwindow.cpp | 2 +- src/dolphinviewcontainer.cpp | 8 ++++++-- src/dolphinviewcontainer.h | 5 +++++ 3 files changed, 12 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index 34008b5eb..e729ce972 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -526,7 +526,7 @@ void DolphinMainWindow::toggleSplitView() void DolphinMainWindow::reloadView() { clearStatusBar(); - m_activeViewContainer->view()->reload(); + m_activeViewContainer->reload(); } void DolphinMainWindow::stopLoading() diff --git a/src/dolphinviewcontainer.cpp b/src/dolphinviewcontainer.cpp index 1c43fc977..4e625c7d8 100644 --- a/src/dolphinviewcontainer.cpp +++ b/src/dolphinviewcontainer.cpp @@ -98,8 +98,6 @@ DolphinViewContainer::DolphinViewContainer(const QUrl& url, QWidget* parent) : m_urlNavigator, &KUrlNavigator::setLocationUrl); connect(m_view, &DolphinView::urlChanged, m_messageWidget, &KMessageWidget::hide); - connect(m_view, &DolphinView::directoryLoadingCompleted, - m_messageWidget, &KMessageWidget::hide); connect(m_view, &DolphinView::writeStateChanged, this, &DolphinViewContainer::writeStateChanged); connect(m_view, &DolphinView::requestItemInfo, @@ -368,6 +366,12 @@ QString DolphinViewContainer::placesText() const return text; } +void DolphinViewContainer::reload() +{ + view()->reload(); + m_messageWidget->hide(); +} + void DolphinViewContainer::setUrl(const QUrl& newUrl) { if (newUrl != m_urlNavigator->locationUrl()) { diff --git a/src/dolphinviewcontainer.h b/src/dolphinviewcontainer.h index 62f91100e..0b6a76d5e 100644 --- a/src/dolphinviewcontainer.h +++ b/src/dolphinviewcontainer.h @@ -129,6 +129,11 @@ public: */ QString placesText() const; + /** + * Reload the view of this container. This will also hide messages in a messagewidget. + */ + void reload(); + public slots: /** * Sets the current active URL, where all actions are applied. The -- cgit v1.3 From 8828e686e94056af17e0c13b7550451c881af060 Mon Sep 17 00:00:00 2001 From: l10n daemon script Date: Mon, 10 Oct 2016 12:24:39 +0000 Subject: SVN_SILENT made messages (.desktop file) - always resolve ours In case of conflict in i18n, keep the version of the branch "ours" To resolve a particular conflict, "git checkout --ours path/to/file.desktop" --- src/dolphinpart.desktop | 1 + src/settings/kcm/kcmdolphingeneral.desktop | 1 + src/settings/kcm/kcmdolphinnavigation.desktop | 1 + src/settings/kcm/kcmdolphinservices.desktop | 1 + src/settings/kcm/kcmdolphinviewmodes.desktop | 1 + 5 files changed, 5 insertions(+) (limited to 'src') diff --git a/src/dolphinpart.desktop b/src/dolphinpart.desktop index a4bac816f..6b9398da8 100644 --- a/src/dolphinpart.desktop +++ b/src/dolphinpart.desktop @@ -124,6 +124,7 @@ Name[hu]=Kompakt Name[ia]=Compacte Name[id]=Sederhana Name[it]=Compatta +Name[ja]=コンパクト Name[ko]=축소됨 Name[lt]=Kompaktiškas Name[nb]=Kompakt diff --git a/src/settings/kcm/kcmdolphingeneral.desktop b/src/settings/kcm/kcmdolphingeneral.desktop index a6e3b6345..962fb7778 100644 --- a/src/settings/kcm/kcmdolphingeneral.desktop +++ b/src/settings/kcm/kcmdolphingeneral.desktop @@ -198,6 +198,7 @@ X-KDE-Keywords[hu]=fájlkezelő X-KDE-Keywords[ia]=gerente de file X-KDE-Keywords[id]=manajer berkas X-KDE-Keywords[it]=gestore dei file +X-KDE-Keywords[ja]=ファイルマネージャ X-KDE-Keywords[ko]=파일 관리자 X-KDE-Keywords[lt]=Failų tvarkyklė X-KDE-Keywords[nb]=filbehandler diff --git a/src/settings/kcm/kcmdolphinnavigation.desktop b/src/settings/kcm/kcmdolphinnavigation.desktop index b49d6a266..eaca4f141 100644 --- a/src/settings/kcm/kcmdolphinnavigation.desktop +++ b/src/settings/kcm/kcmdolphinnavigation.desktop @@ -199,6 +199,7 @@ X-KDE-Keywords[hu]=fájlkezelő X-KDE-Keywords[ia]=gerente de file X-KDE-Keywords[id]=manajer berkas X-KDE-Keywords[it]=gestore dei file +X-KDE-Keywords[ja]=ファイルマネージャ X-KDE-Keywords[ko]=파일 관리자 X-KDE-Keywords[lt]=Failų tvarkyklė X-KDE-Keywords[nb]=filbehandler diff --git a/src/settings/kcm/kcmdolphinservices.desktop b/src/settings/kcm/kcmdolphinservices.desktop index 3b27f9540..1775f7eff 100644 --- a/src/settings/kcm/kcmdolphinservices.desktop +++ b/src/settings/kcm/kcmdolphinservices.desktop @@ -154,6 +154,7 @@ X-KDE-Keywords[hu]=fájlkezelő X-KDE-Keywords[ia]=gerente de file X-KDE-Keywords[id]=manajer berkas X-KDE-Keywords[it]=gestore dei file +X-KDE-Keywords[ja]=ファイルマネージャ X-KDE-Keywords[ko]=파일 관리자 X-KDE-Keywords[lt]=Failų tvarkyklė X-KDE-Keywords[nb]=filbehandler diff --git a/src/settings/kcm/kcmdolphinviewmodes.desktop b/src/settings/kcm/kcmdolphinviewmodes.desktop index 568df4148..d1b5abe49 100644 --- a/src/settings/kcm/kcmdolphinviewmodes.desktop +++ b/src/settings/kcm/kcmdolphinviewmodes.desktop @@ -199,6 +199,7 @@ X-KDE-Keywords[hu]=fájlkezelő X-KDE-Keywords[ia]=gerente de file X-KDE-Keywords[id]=manajer berkas X-KDE-Keywords[it]=gestore dei file +X-KDE-Keywords[ja]=ファイルマネージャ X-KDE-Keywords[ko]=파일 관리자 X-KDE-Keywords[lt]=Failų tvarkyklė X-KDE-Keywords[nb]=filbehandler -- cgit v1.3 From 95e1505c9f01bdae2c1157be1bb6fa5b991c8fd4 Mon Sep 17 00:00:00 2001 From: Kai Uwe Broulik Date: Fri, 28 Oct 2016 13:40:50 +0200 Subject: [Places Item Edit Dialog] Fix accepting dialog with Return By setting a parent for the QDialogButtonBox we let QDialog handle everything by itself. Also, store the dialog button box as a member rather than just the OK button. This removes the need to set the OK button as default manually (which didn't work anyway) and fixes pressing Return while the input is focused erroneously opening the folder browser rather than accepting the dialog. REVIEW: 129213 --- src/panels/places/placesitemeditdialog.cpp | 17 +++++++---------- src/panels/places/placesitemeditdialog.h | 4 ++-- 2 files changed, 9 insertions(+), 12 deletions(-) (limited to 'src') diff --git a/src/panels/places/placesitemeditdialog.cpp b/src/panels/places/placesitemeditdialog.cpp index 7d365310f..ffcac4c8f 100644 --- a/src/panels/places/placesitemeditdialog.cpp +++ b/src/panels/places/placesitemeditdialog.cpp @@ -47,7 +47,8 @@ PlacesItemEditDialog::PlacesItemEditDialog(QWidget* parent) : m_urlEdit(0), m_textEdit(0), m_iconButton(0), - m_appLocal(0) + m_appLocal(0), + m_buttonBox(nullptr) { } @@ -106,7 +107,7 @@ bool PlacesItemEditDialog::event(QEvent* event) void PlacesItemEditDialog::slotUrlChanged(const QString& text) { - m_okButton->setEnabled(!text.isEmpty()); + m_buttonBox->button(QDialogButtonBox::Ok)->setEnabled(!text.isEmpty()); } PlacesItemEditDialog::~PlacesItemEditDialog() @@ -115,20 +116,16 @@ PlacesItemEditDialog::~PlacesItemEditDialog() void PlacesItemEditDialog::initialize() { - QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok|QDialogButtonBox::Cancel); - m_okButton = buttonBox->button(QDialogButtonBox::Ok); - m_okButton->setDefault(true); - m_okButton->setShortcut(Qt::CTRL | Qt::Key_Return); - connect(buttonBox, &QDialogButtonBox::accepted, this, &PlacesItemEditDialog::accept); - connect(buttonBox, &QDialogButtonBox::rejected, this, &PlacesItemEditDialog::reject); + m_buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok|QDialogButtonBox::Cancel, this); + connect(m_buttonBox, &QDialogButtonBox::accepted, this, &PlacesItemEditDialog::accept); + connect(m_buttonBox, &QDialogButtonBox::rejected, this, &PlacesItemEditDialog::reject); setModal(true); - m_okButton->setDefault(true); QVBoxLayout *mainLayout = new QVBoxLayout; setLayout(mainLayout); QWidget* mainWidget = new QWidget(this); mainLayout->addWidget(mainWidget); - mainLayout->addWidget(buttonBox); + mainLayout->addWidget(m_buttonBox); QVBoxLayout* vBox = new QVBoxLayout(mainWidget); diff --git a/src/panels/places/placesitemeditdialog.h b/src/panels/places/placesitemeditdialog.h index 8a0dc0471..f2d69781a 100644 --- a/src/panels/places/placesitemeditdialog.h +++ b/src/panels/places/placesitemeditdialog.h @@ -31,7 +31,7 @@ class KIconButton; class KUrlRequester; class QLineEdit; class QCheckBox; -class QPushButton; +class QDialogButtonBox; class PlacesItemEditDialog: public QDialog { @@ -72,7 +72,7 @@ private: QLineEdit* m_textEdit; KIconButton* m_iconButton; QCheckBox* m_appLocal; - QPushButton *m_okButton; + QDialogButtonBox *m_buttonBox; }; #endif -- cgit v1.3