summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gtk2_ardour/about.cc2
-rw-r--r--gtk2_ardour/mixer_strip.cc65
-rw-r--r--gtk2_ardour/mixer_strip.h1
-rw-r--r--gtk2_ardour/plugin_ui.cc1
-rw-r--r--gtk2_ardour/po/SConscript51
-rw-r--r--gtk2_ardour/redirect_box.cc52
-rw-r--r--gtk2_ardour/redirect_box.h14
-rw-r--r--libs/ardour/SConscript2
-rw-r--r--libs/ardour/ardour/audio_unit.h2
-rw-r--r--libs/ardour/coreaudiosource.cc4
10 files changed, 82 insertions, 112 deletions
diff --git a/gtk2_ardour/about.cc b/gtk2_ardour/about.cc
index 4be3a61947..ee03721e84 100644
--- a/gtk2_ardour/about.cc
+++ b/gtk2_ardour/about.cc
@@ -189,7 +189,7 @@ About::About ()
"under certain conditions; see the file COPYING for details.\n"));
set_name (X_("ardour"));
set_website (X_("http://ardour.org/"));
- set_website_label (X_("visit http://www.ardour.org/"));
+ set_website_label (_("visit http://www.ardour.org/"));
set_version ((string_compose(_("%1\n(built from revision %2)"),
VERSIONSTRING,
gtk_ardour_revision)));
diff --git a/gtk2_ardour/mixer_strip.cc b/gtk2_ardour/mixer_strip.cc
index b089883c80..236e89f992 100644
--- a/gtk2_ardour/mixer_strip.cc
+++ b/gtk2_ardour/mixer_strip.cc
@@ -759,6 +759,36 @@ MixerStrip::output_changed (IOChange change, void *src)
Gtkmm2ext::UI::instance()->call_slot (mem_fun(*this, &MixerStrip::update_output_display));
}
+void
+MixerStrip::comment_editor_done_editing() {
+ string str = comment_area->get_buffer()->get_text();
+ if (_route->comment() != str) {
+ _route->set_comment (str, this);
+
+ switch (_width) {
+
+ case Wide:
+ if (! str.empty()) {
+ comment_button.set_label (_("*Comments*"));
+ } else {
+ comment_button.set_label (_("Comments"));
+ }
+ break;
+
+ case Narrow:
+ if (! str.empty()) {
+ comment_button.set_label (_("*Cmt*"));
+ } else {
+ comment_button.set_label (_("Cmt"));
+ }
+ break;
+ }
+
+ ARDOUR_UI::instance()->tooltips().set_tip (comment_button,
+ str.empty() ? _("Click to Add/Edit Comments") : str);
+ }
+}
+
void
MixerStrip::comment_button_clicked ()
{
@@ -766,38 +796,13 @@ MixerStrip::comment_button_clicked ()
setup_comment_editor ();
}
- int x, y, cw_width, cw_height;
+ int x, y, cw_width, cw_height;
if (comment_window->is_visible()) {
- string str = comment_area->get_buffer()->get_text();
- if (_route->comment() != str) {
- _route->set_comment (str, this);
+ comment_window->hide ();
+ return;
+ }
- switch (_width) {
-
- case Wide:
- if (! str.empty()) {
- comment_button.set_label (_("*Comments*"));
- } else {
- comment_button.set_label (_("Comments"));
- }
- break;
-
- case Narrow:
- if (! str.empty()) {
- comment_button.set_label (_("*Cmt*"));
- } else {
- comment_button.set_label (_("Cmt"));
- }
- break;
- }
-
- ARDOUR_UI::instance()->tooltips().set_tip (comment_button,
- str.empty() ? _("Click to Add/Edit Comments") : str);
- }
- comment_window->hide ();
- return;
- }
comment_window->get_size (cw_width, cw_height);
comment_window->get_position(x, y);
comment_window->move(x, y - (cw_height / 2) - 45);
@@ -808,7 +813,6 @@ MixerStrip::comment_button_clicked ()
comment_window->show();
comment_window->present();
-
}
void
@@ -821,6 +825,7 @@ MixerStrip::setup_comment_editor ()
comment_window = new ArdourDialog (title, false);
comment_window->set_position (Gtk::WIN_POS_MOUSE);
comment_window->set_skip_taskbar_hint (true);
+ comment_window->signal_hide().connect (mem_fun(*this, &MixerStrip::comment_editor_done_editing));
comment_area = manage (new TextView());
comment_area->set_name ("MixerTrackCommentArea");
diff --git a/gtk2_ardour/mixer_strip.h b/gtk2_ardour/mixer_strip.h
index 21db0d14ca..5472778c17 100644
--- a/gtk2_ardour/mixer_strip.h
+++ b/gtk2_ardour/mixer_strip.h
@@ -153,6 +153,7 @@ class MixerStrip : public RouteUI, public Gtk::EventBox
Gtk::TextView* comment_area;
Gtk::Button comment_button;
+ void comment_editor_done_editing();
void setup_comment_editor ();
void comment_button_clicked ();
diff --git a/gtk2_ardour/plugin_ui.cc b/gtk2_ardour/plugin_ui.cc
index 9cf054fbe2..4ed2639b78 100644
--- a/gtk2_ardour/plugin_ui.cc
+++ b/gtk2_ardour/plugin_ui.cc
@@ -118,6 +118,7 @@ PluginUIWindow::PluginUIWindow (boost::shared_ptr<PluginInsert> insert, bool scr
PluginUIWindow::~PluginUIWindow ()
{
}
+
bool
PluginUIWindow::on_key_press_event (GdkEventKey* event)
{
diff --git a/gtk2_ardour/po/SConscript b/gtk2_ardour/po/SConscript
deleted file mode 100644
index d7e957b3eb..0000000000
--- a/gtk2_ardour/po/SConscript
+++ /dev/null
@@ -1,51 +0,0 @@
-# -*- python -*-
-import os
-import os.path
-import glob
-
-Import ('env gtkardour install_prefix intl_files')
-
-potfiles_in = open('POTFILES.in', 'w')
-
-intl_files.sort()
-
-print "Generating POTFILES.in in gtk_ardour/po"
-
-potfiles_in.write("""# This file was automatically generated by a configuration script.
-# Contains a list of source files containing translatable
-# strings sorted alphabetically.
-[encoding: UTF-8]
-""")
-
-for f in intl_files[:]:
- potfiles_in.write(f + '\n')
-
-potfiles_in.close()
-
-print "Updating pot file: "
-
-domain = gtkardour['DOMAIN']
-potfile = gtkardour['POTFILE']
-
-poaction = env.Action('intltool-update -p -g=' + domain)
-
-Execute(poaction)
-
-# this should probably be merged with the i18n builder somehow
-
-p_oze = [ os.path.basename (po) for po in glob.glob ('*.po') ]
-languages = [ po.replace ('.po', '') for po in p_oze ]
-m_oze = [ po.replace (".po", ".mo") for po in p_oze ]
-
-for mo in m_oze[:]:
- po = mo.replace (".mo", ".po")
- env.Alias ('install', gtkardour.MoBuild (mo, [ po, potfile ]))
-
-for lang in languages[:]:
- modir = (os.path.join (install_prefix, 'share/locale/' + lang + '/LC_MESSAGES/'))
- moname = domain + '.mo'
- env.Alias('install', env.InstallAs (os.path.join (modir, moname), lang + '.mo'))
-
-env.Alias ('tarball', env.Distribute (env['DISTTREE'],
- [ 'SConscript', 'gtk_ardour.pot' ] +
- glob.glob('*.po')))
diff --git a/gtk2_ardour/redirect_box.cc b/gtk2_ardour/redirect_box.cc
index fcd04c9bd7..f6b56d2f49 100644
--- a/gtk2_ardour/redirect_box.cc
+++ b/gtk2_ardour/redirect_box.cc
@@ -922,7 +922,7 @@ RedirectBox::edit_redirect (boost::shared_ptr<Redirect> redirect)
if ((insert = boost::dynamic_pointer_cast<Insert> (redirect)) == 0) {
- /* its a send */
+ /* it's a send */
if (!_session.engine().connected()) {
return;
@@ -953,7 +953,7 @@ RedirectBox::edit_redirect (boost::shared_ptr<Redirect> redirect)
} else {
- /* its an insert */
+ /* it's an insert */
boost::shared_ptr<PluginInsert> plugin_insert;
boost::shared_ptr<PortInsert> port_insert;
@@ -966,30 +966,19 @@ RedirectBox::edit_redirect (boost::shared_ptr<Redirect> redirect)
PluginUIWindow *plugin_ui;
if (plugin_insert->get_gui() == 0) {
-
- string title;
- string maker = plugin_insert->plugin()->maker();
- string::size_type email_pos;
-
- if ((email_pos = maker.find_first_of ('<')) != string::npos) {
- maker = maker.substr (0, email_pos - 1);
- }
-
- if (maker.length() > 32) {
- maker = maker.substr (0, 32);
- maker += " ...";
- }
-
- title = string_compose(_("ardour: %1: %2 (by %3)"), _route->name(), plugin_insert->name(), maker);
-
+
plugin_ui = new PluginUIWindow (plugin_insert);
if (_owner_is_mixer) {
ARDOUR_UI::instance()->the_mixer()->ensure_float (*plugin_ui);
} else {
ARDOUR_UI::instance()->the_editor().ensure_float (*plugin_ui);
}
- plugin_ui->set_title (title);
+ plugin_ui->set_title (RedirectBox::generate_redirect_title (plugin_insert));
plugin_insert->set_gui (plugin_ui);
+
+ // change window title when route name is changed
+ _route->name_changed.connect (bind (mem_fun(*this, &RedirectBox::route_name_changed), plugin_ui, plugin_insert));
+
} else {
plugin_ui = reinterpret_cast<PluginUIWindow *> (plugin_insert->get_gui());
@@ -1240,3 +1229,28 @@ RedirectBox::rb_edit ()
_current_redirect_box->for_selected_redirects (&RedirectBox::edit_redirect);
}
+void
+RedirectBox::route_name_changed (void* src, PluginUIWindow* plugin_ui, boost::shared_ptr<PluginInsert> pi)
+{
+ ENSURE_GUI_THREAD(bind (mem_fun (*this, &RedirectBox::route_name_changed), src, plugin_ui, pi));
+
+ plugin_ui->set_title (RedirectBox::generate_redirect_title (pi));
+}
+
+string
+RedirectBox::generate_redirect_title (boost::shared_ptr<PluginInsert> pi)
+{
+ string maker = pi->plugin()->maker();
+ string::size_type email_pos;
+
+ if ((email_pos = maker.find_first_of ('<')) != string::npos) {
+ maker = maker.substr (0, email_pos - 1);
+ }
+
+ if (maker.length() > 32) {
+ maker = maker.substr (0, 32);
+ maker += " ...";
+ }
+
+ return string_compose(_("ardour: %1: %2 (by %3)"), _route->name(), pi->name(), maker);
+}
diff --git a/gtk2_ardour/redirect_box.h b/gtk2_ardour/redirect_box.h
index ead3b0dfb8..27ba950899 100644
--- a/gtk2_ardour/redirect_box.h
+++ b/gtk2_ardour/redirect_box.h
@@ -49,19 +49,20 @@
class MotionController;
class PluginSelector;
+class PluginUIWindow;
class RouteRedirectSelection;
namespace ARDOUR {
+ class Connection;
+ class Insert;
+ class Plugin;
+ class PluginInsert;
+ class PortInsert;
class Route;
class Send;
- class Insert;
class Session;
- class PortInsert;
- class Connection;
- class Plugin;
}
-
class RedirectBox : public Gtk::HBox
{
public:
@@ -217,6 +218,9 @@ class RedirectBox : public Gtk::HBox
static void rb_activate_all ();
static void rb_deactivate_all ();
static void rb_edit ();
+
+ void route_name_changed (void* src, PluginUIWindow* plugin_ui, boost::shared_ptr<ARDOUR::PluginInsert> pi);
+ std::string generate_redirect_title (boost::shared_ptr<ARDOUR::PluginInsert> pi);
};
#endif /* __ardour_gtk_redirect_box__ */
diff --git a/libs/ardour/SConscript b/libs/ardour/SConscript
index 25109d660d..06d53ac060 100644
--- a/libs/ardour/SConscript
+++ b/libs/ardour/SConscript
@@ -14,7 +14,7 @@ ardour = env.Copy()
domain = 'libardour'
-ardour.Append(DOMAIN = domain, MAJOR = 1, MINOR = 0, MICRO = 0)
+ardour.Append(DOMAIN = domain, MAJOR = 2, MINOR = 0, MICRO = 0)
ardour.Append(CXXFLAGS = "-DPACKAGE=\\\"" + domain + "\\\"")
ardour.Append(CXXFLAGS="-DLIBSIGC_DISABLE_DEPRECATED")
ardour.Append(PACKAGE = domain)
diff --git a/libs/ardour/ardour/audio_unit.h b/libs/ardour/ardour/audio_unit.h
index d82425765d..a3d6074722 100644
--- a/libs/ardour/ardour/audio_unit.h
+++ b/libs/ardour/ardour/audio_unit.h
@@ -1,6 +1,6 @@
/*
Copyright (C) 2006 Paul Davis
- Written by Taybin Rutkin
+ Written by Taybin Rutkin
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/libs/ardour/coreaudiosource.cc b/libs/ardour/coreaudiosource.cc
index a5d195172c..83103a6bd4 100644
--- a/libs/ardour/coreaudiosource.cc
+++ b/libs/ardour/coreaudiosource.cc
@@ -84,10 +84,6 @@ CoreAudioSource::init (string idstr)
error << string_compose ("CoreAudioSource: %1 (%2)", cax.mOperation, name()) << endmsg;
throw failed_constructor ();
}
-
- if (_build_peakfiles) {
- _need_peakfile = true;
- }
}
CoreAudioSource::~CoreAudioSource ()