X-Git-Url: http://git.maemo.org/git/?p=qtrapids;a=blobdiff_plain;f=src%2Fclient%2FMainWindow.cpp;fp=src%2Fclient%2FMainWindow.cpp;h=bf046503b07e64157b8895cbc50d31bc568b9de9;hp=36d3081c86c6c5b6fdf1eaabbef7c48aa8dccad9;hb=093dca5acff7b2b046ac90bffab9f15bbe6c4714;hpb=5e2c71d43ef7d91dbde62ee5a507e570d7619d1b diff --git a/src/client/MainWindow.cpp b/src/client/MainWindow.cpp index 36d3081..bf04650 100644 --- a/src/client/MainWindow.cpp +++ b/src/client/MainWindow.cpp @@ -131,7 +131,7 @@ MainWindow::MainWindow() : toolBar->addAction(tr("Open")); removeAction = toolBar->addAction(tr("Remove")); removeAction->setEnabled(false); - addToolBar(Qt::TopToolBarArea, toolBar); + addToolBar(Qt::BottomToolBarArea, toolBar); connect(this, SIGNAL(itemSelected(bool)), removeAction, SLOT(setEnabled(bool))); @@ -330,11 +330,14 @@ void MainWindow::StartTorrentFromBufferData(char const* data, int size) // =========================== PRIVATE SLOTS ================================= void MainWindow::on_openAction_clicked() { + QString filename = QFileDialog::getOpenFileName( this, tr("Open torrent file"), QString(), tr("Torrent files (*.torrent)") ); + on_torrentFileSelected(filename); + /* QFileDialog *dialog = new QFileDialog( this, "Open torrent file", QString(), tr("Torrent files (*.torrent)")); dialog->setFileMode(QFileDialog::ExistingFile); connect(dialog, SIGNAL(fileSelected(const QString&)), this, SLOT(on_torrentFileSelected(const QString&))); dialog->show(); - + */ } void MainWindow::on_removeAction_clicked() @@ -468,7 +471,7 @@ void MainWindow::handleToolBarAction(QAction* action) } -void MainWindow::on_torrentFileSelected(const QString& file) +void MainWindow::on_torrentFileSelected(QString file) { #ifdef QTRAPIDS_DEBUG qDebug() << " MainWindow::on_torrentFileSelected(): " << file;