summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
authorTaybin Rutkin <taybin@taybin.com>2006-05-07 17:17:38 +0000
committerTaybin Rutkin <taybin@taybin.com>2006-05-07 17:17:38 +0000
commitc67a576d611759154976ee19b8faf78583474f97 (patch)
tree096af5a51658aba7ab3b42bf88466970c621ed7c /gtk2_ardour
parentc091b877cfe1937d138b47638e2dcf7f5cbf84e5 (diff)
Improved sfdb API.
Eliminated some warnings on Darwin. Added libxslt to scons. git-svn-id: svn://localhost/trunk/ardour2@494 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour')
-rw-r--r--gtk2_ardour/SConscript1
-rw-r--r--gtk2_ardour/ardour_ui_dialogs.cc3
-rw-r--r--gtk2_ardour/editor_audio_import.cc3
-rw-r--r--gtk2_ardour/option_editor.cc6
-rw-r--r--gtk2_ardour/panner_ui.cc4
-rw-r--r--gtk2_ardour/sfdb_ui.cc12
-rw-r--r--gtk2_ardour/sfdb_ui.h6
7 files changed, 19 insertions, 16 deletions
diff --git a/gtk2_ardour/SConscript b/gtk2_ardour/SConscript
index e490778476..32b94f2e4c 100644
--- a/gtk2_ardour/SConscript
+++ b/gtk2_ardour/SConscript
@@ -42,6 +42,7 @@ gtkardour.Merge ([
libraries['sigc2'],
libraries['gtk2'],
libraries['xml'],
+ libraries['xslt'],
libraries['soundtouch'],
libraries['samplerate'],
libraries['jack'],
diff --git a/gtk2_ardour/ardour_ui_dialogs.cc b/gtk2_ardour/ardour_ui_dialogs.cc
index 1c270ef38d..6b1d0224db 100644
--- a/gtk2_ardour/ardour_ui_dialogs.cc
+++ b/gtk2_ardour/ardour_ui_dialogs.cc
@@ -356,8 +356,7 @@ int
ARDOUR_UI::create_sound_file_browser ()
{
if (sfdb == 0) {
- sfdb = new SoundFileBrowser (_("Sound File Browser"));
- sfdb->set_session (session);
+ sfdb = new SoundFileBrowser (_("Sound File Browser"), session);
sfdb->signal_unmap().connect (sigc::bind(sigc::ptr_fun(&ActionManager::uncheck_toggleaction), X_("<Actions>/Common/ToggleSoundFileBrowser")));
}
return 0;
diff --git a/gtk2_ardour/editor_audio_import.cc b/gtk2_ardour/editor_audio_import.cc
index ddb3bedbb4..184c1757f2 100644
--- a/gtk2_ardour/editor_audio_import.cc
+++ b/gtk2_ardour/editor_audio_import.cc
@@ -74,8 +74,7 @@ Editor::bring_in_external_audio (ImportMode mode, AudioTrack* track, jack_nframe
return;
}
- SoundFileOmega sfdb (_("Add existing audio to session"));
- sfdb.set_session (session);
+ SoundFileOmega sfdb (_("Add existing audio to session"), session);
sfdb.set_mode (mode);
switch (sfdb.run()) {
diff --git a/gtk2_ardour/option_editor.cc b/gtk2_ardour/option_editor.cc
index b50b71f143..5ac4bf5a8d 100644
--- a/gtk2_ardour/option_editor.cc
+++ b/gtk2_ardour/option_editor.cc
@@ -666,8 +666,7 @@ OptionEditor::raid_path_changed ()
void
OptionEditor::click_browse_clicked ()
{
- SoundFileChooser sfdb (_("Choose Click"));
- sfdb.set_session (session);
+ SoundFileChooser sfdb (_("Choose Click"), session);
int result = sfdb.run ();
@@ -686,8 +685,7 @@ OptionEditor::click_chosen (const string & path)
void
OptionEditor::click_emphasis_browse_clicked ()
{
- SoundFileChooser sfdb (_("Choose Click Emphasis"));
- sfdb.set_session (session);
+ SoundFileChooser sfdb (_("Choose Click Emphasis"), session);
int result = sfdb.run ();
diff --git a/gtk2_ardour/panner_ui.cc b/gtk2_ardour/panner_ui.cc
index 64cf7782c1..4b954c0e62 100644
--- a/gtk2_ardour/panner_ui.cc
+++ b/gtk2_ardour/panner_ui.cc
@@ -293,7 +293,11 @@ PannerUI::setup_pan ()
bc->StopGesture.connect (bind (mem_fun (_io, &IO::end_pan_touch), (uint32_t) asz));
char buf[64];
+#ifdef __APPLE__
+ snprintf (buf, sizeof (buf), _("panner for channel %lu"), asz + 1);
+#else
snprintf (buf, sizeof (buf), _("panner for channel %u"), asz + 1);
+#endif
ARDOUR_UI::instance()->tooltips().set_tip (bc->event_widget(), buf);
bc->event_widget().signal_button_release_event().connect
diff --git a/gtk2_ardour/sfdb_ui.cc b/gtk2_ardour/sfdb_ui.cc
index 839f78598f..a8b2510cf5 100644
--- a/gtk2_ardour/sfdb_ui.cc
+++ b/gtk2_ardour/sfdb_ui.cc
@@ -287,7 +287,7 @@ SoundFileBox::field_selected ()
}
}
-SoundFileBrowser::SoundFileBrowser (string title)
+SoundFileBrowser::SoundFileBrowser (string title, ARDOUR::Session* s)
: ArdourDialog (title, false),
chooser (Gtk::FILE_CHOOSER_ACTION_OPEN)
{
@@ -296,6 +296,8 @@ SoundFileBrowser::SoundFileBrowser (string title)
chooser.set_select_multiple (true);
chooser.signal_update_preview().connect(mem_fun(*this, &SoundFileBrowser::update_preview));
+
+ set_session (s);
}
void
@@ -310,9 +312,9 @@ SoundFileBrowser::update_preview ()
chooser.set_preview_widget_active(preview.setup_labels(chooser.get_filename()));
}
-SoundFileChooser::SoundFileChooser (string title)
+SoundFileChooser::SoundFileChooser (string title, ARDOUR::Session* s)
:
- SoundFileBrowser(title)
+ SoundFileBrowser(title, s)
{
add_button (Gtk::Stock::OPEN, Gtk::RESPONSE_OK);
add_button (Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
@@ -328,8 +330,8 @@ static const char *import_mode_strings[] = {
vector<string> SoundFileOmega::mode_strings;
-SoundFileOmega::SoundFileOmega (string title)
- : SoundFileBrowser (title),
+SoundFileOmega::SoundFileOmega (string title, ARDOUR::Session* s)
+ : SoundFileBrowser (title, s),
split_check (_("Split Channels"))
{
if (mode_strings.empty()) {
diff --git a/gtk2_ardour/sfdb_ui.h b/gtk2_ardour/sfdb_ui.h
index 79537b2adb..769e4ff02d 100644
--- a/gtk2_ardour/sfdb_ui.h
+++ b/gtk2_ardour/sfdb_ui.h
@@ -109,7 +109,7 @@ class SoundFileBox : public Gtk::VBox
class SoundFileBrowser : public ArdourDialog
{
public:
- SoundFileBrowser (std::string title);
+ SoundFileBrowser (std::string title, ARDOUR::Session* _s = 0);
virtual ~SoundFileBrowser () {};
virtual void set_session (ARDOUR::Session*);
@@ -124,7 +124,7 @@ class SoundFileBrowser : public ArdourDialog
class SoundFileChooser : public SoundFileBrowser
{
public:
- SoundFileChooser (std::string title);
+ SoundFileChooser (std::string title, ARDOUR::Session* _s = 0);
virtual ~SoundFileChooser () {};
std::string get_filename () {return chooser.get_filename();};
@@ -133,7 +133,7 @@ class SoundFileChooser : public SoundFileBrowser
class SoundFileOmega : public SoundFileBrowser
{
public:
- SoundFileOmega (std::string title);
+ SoundFileOmega (std::string title, ARDOUR::Session* _s);
virtual ~SoundFileOmega () {};
/* these are returned by the Dialog::run() method. note