summaryrefslogtreecommitdiff
path: root/libopie
authorzecke <zecke>2002-04-12 13:07:35 (UTC)
committer zecke <zecke>2002-04-12 13:07:35 (UTC)
commit3973cf42c778055ab81a9ee254eaf8829464f936 (patch) (side-by-side diff)
tree4ae4fc512c9e37657ea9f4e05f28d1ea57a855d3 /libopie
parentc1c9ac64f7f4871642d645ac1da1a2f36853ccb2 (diff)
downloadopie-3973cf42c778055ab81a9ee254eaf8829464f936.zip
opie-3973cf42c778055ab81a9ee254eaf8829464f936.tar.gz
opie-3973cf42c778055ab81a9ee254eaf8829464f936.tar.bz2
Add OFileDialog to the .pro
OFileDialog is now working resize it when not used by the static methods OFileSelector some bugfixes. Some bugs are not yet fixed (the switching from views can segfault )
Diffstat (limited to 'libopie') (more/less context) (show whitespace changes)
-rw-r--r--libopie/libopie.pro4
-rw-r--r--libopie/ofiledialog.cc12
-rw-r--r--libopie/ofileselector.cc34
3 files changed, 16 insertions, 34 deletions
diff --git a/libopie/libopie.pro b/libopie/libopie.pro
index 4ba2836..3c8da78 100644
--- a/libopie/libopie.pro
+++ b/libopie/libopie.pro
@@ -2,4 +2,4 @@ TEMPLATE = lib
CONFIG += qte warn_on release
-HEADERS = ofileselector.h tododb.h todoevent.h todoresource.h todovcalresource.h xmltree.h oconfig.h
-SOURCES = ofileselector.cc xmltree.cc tododb.cpp todoevent.cpp todovcalresource.cpp oconfig.cpp
+HEADERS = ofileselector.h ofiledialog.h tododb.h todoevent.h todoresource.h todovcalresource.h xmltree.h oconfig.h
+SOURCES = ofileselector.cc ofiledialog.cc xmltree.cc tododb.cpp todoevent.cpp todovcalresource.cpp oconfig.cpp
TARGET = opie
diff --git a/libopie/ofiledialog.cc b/libopie/ofiledialog.cc
index 92b0d0a..164fadd 100644
--- a/libopie/ofiledialog.cc
+++ b/libopie/ofiledialog.cc
@@ -42,5 +42,6 @@ OFileDialog::OFileDialog(const QString &caption,
{
+ // QVBoxLayout *lay = new QVBoxLayout(this);
+ //showMaximized();
QVBoxLayout *lay = new QVBoxLayout(this);
-
- file = new OFileSelector(0 , mode, selector,
+ file = new OFileSelector(this , mode, selector,
dirName, fileName,
@@ -48,2 +49,4 @@ OFileDialog::OFileDialog(const QString &caption,
lay->addWidget( file );
+
+ //lay->addWidget( file );
//showFullScreen();
@@ -55,3 +58,4 @@ OFileDialog::OFileDialog(const QString &caption,
this, SLOT(slotDirSelected(const QString &) ) );
- showMaximized();
+
+
file->setYesCancelVisible( false ); // relayout
@@ -80,2 +84,3 @@ QString OFileDialog::getOpenFileName(int selector,
wid, OFileSelector::OPEN, selector, startDir, file, mimes);
+ dlg.showMaximized();
if( dlg.exec() )
@@ -95,2 +100,3 @@ QString OFileDialog::getSaveFileName(int selector,
wid, OFileSelector::SAVE, selector, startDir, file, mimes);
+ dlg.showMaximized();
if( dlg.exec() )
diff --git a/libopie/ofileselector.cc b/libopie/ofileselector.cc
index c3a3514..7451c1b 100644
--- a/libopie/ofileselector.cc
+++ b/libopie/ofileselector.cc
@@ -81,3 +81,3 @@ OFileSelector::OFileSelector(QWidget *wid, int mode, int selector, const QString
{
-
+ if(wid!=0)
resize(wid->width(),wid->height());
@@ -196,2 +196,3 @@ void OFileSelector::init()
connect(m_select, SIGNAL(fileSelected( const DocLnk &) ), this, SLOT(slotFileBridgeSelected(const DocLnk &) ) );
+ m_pseudoLayout = 0l;
}else {
@@ -597,2 +598,3 @@ void OFileSelector::slotViewCheck(const QString &view ){
delete m_pseudo;
+ if(m_pseudoLayout!=0 )
delete m_pseudoLayout;
@@ -626,16 +628,3 @@ void OFileSelector::slotViewCheck(const QString &view ){
- delete m_boxToolbar;
- delete m_homeButton;
- delete m_docButton;
- delete m_location;
- delete m_up;
- delete m_pseudo;
- delete m_pseudoLayout;
- m_boxToolbar = 0;
- m_homeButton = 0;
- m_docButton = 0;
- m_location = 0;
- m_up = 0;
- m_pseudo = 0;
- m_pseudoLayout = 0;
+
@@ -652,16 +641,2 @@ void OFileSelector::slotViewCheck(const QString &view ){
m_View = 0;
- delete m_boxToolbar;
- delete m_homeButton;
- delete m_docButton;
- delete m_location;
- delete m_up;
- delete m_pseudo;
- delete m_pseudoLayout;
- m_boxToolbar = 0;
- m_homeButton = 0;
- m_docButton = 0;
- m_location = 0;
- m_up = 0;
- m_pseudo = 0;
- m_pseudoLayout = 0;
@@ -703,2 +678,3 @@ void OFileSelector::initializeListView()
delete m_pseudo;
+ if(m_pseudoLayout!=0 ) // why did you overload malloc
delete m_pseudoLayout;