2 Copyright (C) 2005 Paul Davis
3 Written by Taybin Rutkin
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.
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.
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.
22 #include <gtkmm/box.h>
23 #include <gtkmm/stock.h>
25 #include <ardour/audio_library.h>
31 SoundFileBrowser::SoundFileBrowser (std::string title)
33 Gtk::Dialog(title, false),
34 chooser(Gtk::FILE_CHOOSER_ACTION_OPEN)
36 get_vbox()->pack_start(chooser);
39 SoundFileChooser::SoundFileChooser (std::string title)
41 SoundFileBrowser(title)
43 add_button (Gtk::Stock::OPEN, Gtk::RESPONSE_OK);
44 add_button (Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
47 SoundFileOmega::SoundFileOmega (std::string title)
49 SoundFileBrowser(title),
50 embed_btn (_("Embed")),
51 import_btn (_("Import")),
52 split_check (_("Split Channels"))
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);
58 chooser.set_extra_widget(split_check);
60 embed_btn.signal_clicked().connect (mem_fun (*this, &SoundFileOmega::embed_clicked));
61 import_btn.signal_clicked().connect (mem_fun (*this, &SoundFileOmega::import_clicked));
65 SoundFileOmega::embed_clicked ()
67 Embedded (chooser.get_filenames(), split_check.get_active());
71 SoundFileOmega::import_clicked ()
73 Imported (chooser.get_filenames(), split_check.get_active());