]> git.lyx.org Git - lyx.git/blob - src/frontends/qt2/FileDialog_private.C
remove extraneous line
[lyx.git] / src / frontends / qt2 / FileDialog_private.C
1 /**
2  * \file FileDialog_private.C
3  * Copyright 2001 the LyX Team
4  * Read the file COPYING
5  *
6  * \author John Levon
7  */
8
9 #include <config.h>
10
11 #include "LString.h"
12
13 #include <qapplication.h>
14 #include <qfiledialog.h>
15
16 #include "QtLyXView.h"
17 #include "debug.h"
18
19 #include "FileDialog_private.h"
20
21 LyXFileDialog::LyXFileDialog(LyXView * lv, kb_action a, string const & p, string const & m, string const & t)
22         : QFileDialog(p.c_str(), m.c_str(), qApp->mainWidget(), t.c_str(), a == LFUN_SELECT_FILE_SYNC),
23         lv_(lv), action_(a)
24 {
25         setCaption(t.c_str());
26 }
27
28
29 void LyXFileDialog::done(int what)
30 {
31         lyxerr[Debug::GUI] << "Done FileDialog, value " << what << std::endl;
32
33         if (action_ == LFUN_SELECT_FILE_SYNC) {
34                 QDialog::done(what);
35                 return;
36         } else if (what == QDialog::Accepted)
37                 lv_->getLyXFunc()->dispatch(action_, selectedFile().data());
38         delete this;
39 }