Git commit 4eb6e40cb85155bed1191936e68237c98f8c0d0f by David Rosca. Committed on 30/04/2015 at 08:40. Pushed by drosca into branch 'master'. sendfile: Improve text in window title Show only "Bluetooth Send Files Wizard" instead of "Bluetooth Send Files - Bluetooth Send File Helper" in window title. Also show "Send to DEVICE_NAME" in window title on select files page (when the wizard is started with pre-selected device). M +2 -2 src/sendfile/main.cpp M +2 -2 src/sendfile/pages/connectingpage.cpp M +10 -0 src/sendfile/pages/selectfilespage.cpp M +1 -1 src/sendfile/pages/selectfilespage.h M +0 -1 src/sendfile/sendfilewizard.cpp http://commits.kde.org/bluedevil/4eb6e40cb85155bed1191936e68237c98f8c0d0f diff --git a/src/sendfile/main.cpp b/src/sendfile/main.cpp index 6adac67..4b7ac8f 100644 --- a/src/sendfile/main.cpp +++ b/src/sendfile/main.cpp @@ -31,9 +31,9 @@ int main(int argc, char *argv[]) { KAboutData aboutData(QStringLiteral("bluedevilsendfile"), - i18n("Bluetooth Send File Helper"), + i18n("Bluetooth Send File Wizard"), BLUEDEVIL_VERSION, - i18n("Bluetooth Send File Helper"), + i18n("Bluetooth Send File Wizard"), KAboutLicense::GPL, i18n("(c) 2010, UFO Coders")); = diff --git a/src/sendfile/pages/connectingpage.cpp b/src/sendfile/pages/con= nectingpage.cpp index d0a980d..34de20c 100644 --- a/src/sendfile/pages/connectingpage.cpp +++ b/src/sendfile/pages/connectingpage.cpp @@ -39,8 +39,8 @@ void ConnectingPage::initializePage() { SendFileWizard *w =3D static_cast(wizard()); = - BluezQt::DevicePtr device =3D w->device(); - connLabel->setText(i18nc("Connecting to a Bluetooth device", "Connecti= ng to %1...", device->name())); + connLabel->setText(i18nc("Connecting to a Bluetooth device", "Connecti= ng to %1...", w->device()->name())); + w->setWindowTitle(QString()); = QTimer::singleShot(1000, this, [w]() { w->startTransfer(); diff --git a/src/sendfile/pages/selectfilespage.cpp b/src/sendfile/pages/se= lectfilespage.cpp index 7ccde46..214c90a 100644 --- a/src/sendfile/pages/selectfilespage.cpp +++ b/src/sendfile/pages/selectfilespage.cpp @@ -26,10 +26,13 @@ #include #include #include +#include = #include #include = +#include + SelectFilesPage::SelectFilesPage(QWidget *parent) : QWizardPage(parent) { @@ -44,6 +47,13 @@ SelectFilesPage::SelectFilesPage(QWidget *parent) layout->addWidget(m_files); } = +void SelectFilesPage::initializePage() +{ + SendFileWizard *w =3D static_cast(wizard()); + + w->setWindowTitle(i18nc("Send files to a Bluetooth device", "Send to %= 1", w->device()->name())); +} + void SelectFilesPage::selectionChanged() { QStringList fileList; diff --git a/src/sendfile/pages/selectfilespage.h b/src/sendfile/pages/sele= ctfilespage.h index 623a216..db83416 100644 --- a/src/sendfile/pages/selectfilespage.h +++ b/src/sendfile/pages/selectfilespage.h @@ -25,7 +25,6 @@ = #include = -class QWizard; class KFileWidget; = class SelectFilesPage : public QWizardPage @@ -35,6 +34,7 @@ class SelectFilesPage : public QWizardPage public: explicit SelectFilesPage(QWidget *parent =3D 0); = + void initializePage() Q_DECL_OVERRIDE; bool isComplete() const Q_DECL_OVERRIDE; = private Q_SLOTS: diff --git a/src/sendfile/sendfilewizard.cpp b/src/sendfile/sendfilewizard.= cpp index 37b78dd..cb9b716 100644 --- a/src/sendfile/sendfilewizard.cpp +++ b/src/sendfile/sendfilewizard.cpp @@ -49,7 +49,6 @@ SendFileWizard::SendFileWizard(const QString &device, con= st QStringList &files) , m_files(files) , m_job(0) { - setWindowTitle(i18n("Bluetooth Send Files")); setOption(NoCancelButton, false); setButton(QWizard::NextButton, new QPushButton(QIcon::fromTheme(QStrin= gLiteral("document-export")), i18n("Send Files"))); setButton(QWizard::CancelButton, new QPushButton(QIcon::fromTheme(QStr= ingLiteral("dialog-cancel")), i18n("Cancel")));