Index: src/tools.cpp =================================================================== RCS file: /cvsroot/arson/arson/src/tools.cpp,v retrieving revision 1.1 diff -u -3 -p -r1.1 tools.cpp --- src/tools.cpp 18 Sep 2002 23:20:56 -0000 1.1 +++ src/tools.cpp 2 Nov 2002 06:41:01 -0000 @@ -310,7 +310,8 @@ const QString ArsonCdImageFile::exts[Ars }; ArsonCdImageFile::ArsonCdImageFile (const QString &filename) - : m_file(filename), m_type(Unknown) { } + : m_file(filename), m_type(Unknown) +{ } int ArsonCdImageFile::imgFormat (void) { @@ -365,7 +366,18 @@ bool ArsonCdImageFile::write (void) void arsonWriteImg (const char *fn) { - ArsonCdImageFile img (fn); + QString file (fn); + + if (!fn) + { + ArsonFileFilter filter (ArsonCdImageFile::exts, ArsonCdImageFile::Max); + file = KFileDialog::getOpenFileName(QString::null, filter.toString()); + + if (file.isEmpty()) + return; + } + + ArsonCdImageFile img (file); if (img.imgFormat() == ArsonCdImageFile::Unknown) arsonErrorMsg( Index: src/tools.h =================================================================== RCS file: /cvsroot/arson/arson/src/tools.h,v retrieving revision 1.1 diff -u -3 -p -r1.1 tools.h --- src/tools.h 18 Sep 2002 23:20:56 -0000 1.1 +++ src/tools.h 2 Nov 2002 06:41:01 -0000 @@ -51,16 +51,17 @@ public: Dir, }; - ArsonCdImageFile (const QString &filename = QString::null); + ArsonCdImageFile (const QString &filename); const QString &filename (void) const { return m_file; } + void setFilename (const char *name) { m_file = name; } int imgFormat (void); bool write (void); -private: const static QString exts[Max]; - + +private: QString m_file; int m_type; };