ExportDialog compiles. Removed gtkmm.h's.
[ardour.git] / gtk2_ardour / sfdb_ui.cc
1 /*
2     Copyright (C) 2005 Paul Davis 
3     Written by Taybin Rutkin
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
16     along with this program; if not, write to the Free Software
17     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18
19
20 */
21
22 #include <gtkmm/box.h>
23 #include <gtkmm/stock.h>
24
25 #include <ardour/audio_library.h>
26
27 #include "sfdb_ui.h"
28
29 #include "i18n.h"
30
31 SoundFileBrowser::SoundFileBrowser (std::string title)
32         :
33         Gtk::Dialog(title, false),
34         chooser(Gtk::FILE_CHOOSER_ACTION_OPEN)
35 {
36         get_vbox()->pack_start(chooser);
37 }
38
39 SoundFileChooser::SoundFileChooser (std::string title)
40         :
41         SoundFileBrowser(title)
42 {
43         add_button (Gtk::Stock::OPEN, Gtk::RESPONSE_OK);
44         add_button (Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
45 }
46
47 SoundFileOmega::SoundFileOmega (std::string title)
48         :
49         SoundFileBrowser(title),
50         embed_btn (_("Embed")),
51         import_btn (_("Import")),
52         split_check (_("Split Channels"))
53 {
54         get_action_area()->pack_start(embed_btn);
55         get_action_area()->pack_start(import_btn);
56         add_button (Gtk::Stock::CLOSE, Gtk::RESPONSE_CLOSE);
57
58         chooser.set_extra_widget(split_check);
59
60         embed_btn.signal_clicked().connect (mem_fun (*this, &SoundFileOmega::embed_clicked));
61         import_btn.signal_clicked().connect (mem_fun (*this, &SoundFileOmega::import_clicked));
62 }
63
64 void
65 SoundFileOmega::embed_clicked ()
66 {
67         Embedded (chooser.get_filenames(), split_check.get_active());
68 }
69
70 void
71 SoundFileOmega::import_clicked ()
72 {
73         Imported (chooser.get_filenames(), split_check.get_active());
74 }
75