summaryrefslogtreecommitdiff
authoralwin <alwin>2004-02-24 02:15:14 (UTC)
committer alwin <alwin>2004-02-24 02:15:14 (UTC)
commit4baf741237a4c4575b3efe0bff6c4e143902b7ec (patch) (unidiff)
tree8a57cc0071bb57bd94f1d3a456336bd792baff2e
parent99bcf9b87929dfba62449f6e365eff561ed3fab9 (diff)
downloadopie-4baf741237a4c4575b3efe0bff6c4e143902b7ec.zip
opie-4baf741237a4c4575b3efe0bff6c4e143902b7ec.tar.gz
opie-4baf741237a4c4575b3efe0bff6c4e143902b7ec.tar.bz2
user gets a message why this dialog appears
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/mediadlg.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/core/launcher/mediadlg.cpp b/core/launcher/mediadlg.cpp
index 6448863..db950fc 100644
--- a/core/launcher/mediadlg.cpp
+++ b/core/launcher/mediadlg.cpp
@@ -1,31 +1,39 @@
1#include "mediadlg.h" 1#include "mediadlg.h"
2#include "mediumwidget.h" 2#include "mediumwidget.h"
3#include <qtopia/storage.h> 3#include <qtopia/storage.h>
4#include <qpixmap.h> 4#include <qpixmap.h>
5#include <qlayout.h> 5#include <qlayout.h>
6#include <qlabel.h>
6 7
7Mediadlg::Mediadlg(FileSystem*fs,QWidget *parent, const char *name, bool modal, WFlags fl) 8Mediadlg::Mediadlg(FileSystem*fs,QWidget *parent, const char *name, bool modal, WFlags fl)
8 : QDialog(parent,name,modal,fl) 9 : QDialog(parent,name,modal,fl)
9{ 10{
10 m_fs = fs; 11 m_fs = fs;
11 m_widget = 0; 12 m_widget = 0;
12 init(); 13 init();
13} 14}
14 15
15Mediadlg::~Mediadlg() 16Mediadlg::~Mediadlg()
16{ 17{
17} 18}
18 19
19void Mediadlg::init() 20void Mediadlg::init()
20{ 21{
21 if (!m_fs) return; 22 if (!m_fs) return;
22 m_lay = new QVBoxLayout( this ); 23 m_lay = new QVBoxLayout( this);
24 m_lay->setSpacing(0);
25 m_lay->setMargin(0);
26 QLabel*tLabel = new QLabel(this);
27 tLabel->setText("<center>"+tr("A new storage media detected:")+"<br>"+m_fs->name()+"<br>"+tr("What should I do with it?")+"</center>");
28 m_lay->addWidget(tLabel);
23 m_widget = new MediumMountSetting::MediumMountWidget(m_fs->path(),QPixmap(),this); 29 m_widget = new MediumMountSetting::MediumMountWidget(m_fs->path(),QPixmap(),this);
24 m_lay->addWidget(m_widget); 30 m_lay->addWidget(m_widget);
31 QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding);
32 m_lay->addItem(spacer);
25} 33}
26 34
27void Mediadlg::accept() 35void Mediadlg::accept()
28{ 36{
29 if (m_widget) m_widget->writeConfig(); 37 if (m_widget) m_widget->writeConfig();
30 QDialog::accept(); 38 QDialog::accept();
31} 39}