1 /*
2 
3     Copyright (C) 2013  Hong Jen Yee (PCMan) <pcman.tw@gmail.com>
4 
5     This program is free software; you can redistribute it and/or modify
6     it under the terms of the GNU General Public License as published by
7     the Free Software Foundation; either version 2 of the License, or
8     (at your option) any later version.
9 
10     This program is distributed in the hope that it will be useful,
11     but WITHOUT ANY WARRANTY; without even the implied warranty of
12     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13     GNU General Public License for more details.
14 
15     You should have received a copy of the GNU General Public License along
16     with this program; if not, write to the Free Software Foundation, Inc.,
17     51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 */
19 
20 
21 #ifndef PCMANFM_AUTORUNDIALOG_H
22 #define PCMANFM_AUTORUNDIALOG_H
23 
24 #include <QDialog>
25 #include "ui_autorun.h"
26 #include <gio/gio.h>
27 
28 namespace PCManFM {
29 
30 class AutoRunDialog : public QDialog {
31 Q_OBJECT
32 
33 public:
34   explicit AutoRunDialog(GVolume* volume, GMount* mount, QWidget* parent = 0, Qt::WindowFlags f = Qt::WindowFlags());
35   virtual ~AutoRunDialog();
36 
37   virtual void accept();
38 
39 private Q_SLOTS:
40 
41 private:
42 
43   static void onContentTypeFinished(GMount* mount, GAsyncResult* res, AutoRunDialog* pThis);
44 
45 private:
46   Ui::AutoRunDialog ui;
47   GCancellable* cancellable;
48   GList* applications;
49   GMount* mount_;
50 };
51 
52 }
53 
54 #endif // PCMANFM_AUTORUNDIALOG_H
55