mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-20 13:46:30 +01:00
minor mootcher fixes; change "Analyze .." to "Spectral Analysis" where applicable; make separate actions be appropriately sensitive to the edit point
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@3198 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
0d266d57eb
commit
4c7b6e1b1b
10 changed files with 56 additions and 15 deletions
|
|
@ -52,6 +52,7 @@ vector<RefPtr<Gtk::Action> > ActionManager::point_selection_sensitive_actions;
|
|||
vector<RefPtr<Gtk::Action> > ActionManager::time_selection_sensitive_actions;
|
||||
vector<RefPtr<Gtk::Action> > ActionManager::line_selection_sensitive_actions;
|
||||
vector<RefPtr<Gtk::Action> > ActionManager::playlist_selection_sensitive_actions;
|
||||
vector<RefPtr<Gtk::Action> > ActionManager::mouse_edit_point_requires_canvas_actions;
|
||||
|
||||
vector<RefPtr<Gtk::Action> > ActionManager::range_sensitive_actions;
|
||||
vector<RefPtr<Gtk::Action> > ActionManager::jack_sensitive_actions;
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@ class ActionManager
|
|||
static std::vector<Glib::RefPtr<Gtk::Action> > time_selection_sensitive_actions;
|
||||
static std::vector<Glib::RefPtr<Gtk::Action> > line_selection_sensitive_actions;
|
||||
static std::vector<Glib::RefPtr<Gtk::Action> > playlist_selection_sensitive_actions;
|
||||
static std::vector<Glib::RefPtr<Gtk::Action> > mouse_edit_point_requires_canvas_actions;
|
||||
|
||||
static std::vector<Glib::RefPtr<Gtk::Action> > range_sensitive_actions;
|
||||
static std::vector<Glib::RefPtr<Gtk::Action> > transport_sensitive_actions;
|
||||
|
|
|
|||
|
|
@ -1776,7 +1776,7 @@ Editor::add_region_context_items (AudioStreamView* sv, boost::shared_ptr<Region>
|
|||
items.push_back (MenuElem (_("Bounce"), mem_fun(*this, &Editor::bounce_region_selection)));
|
||||
|
||||
#ifdef FFT_ANALYSIS
|
||||
items.push_back (MenuElem (_("Analyze region"), mem_fun(*this, &Editor::analyze_region_selection)));
|
||||
items.push_back (MenuElem (_("Spectral Analysis"), mem_fun(*this, &Editor::analyze_region_selection)));
|
||||
#endif
|
||||
|
||||
items.push_back (SeparatorElem());
|
||||
|
|
@ -1945,7 +1945,7 @@ Editor::add_selection_context_items (Menu_Helpers::MenuList& items)
|
|||
|
||||
#ifdef FFT_ANALYSIS
|
||||
items.push_back (SeparatorElem());
|
||||
items.push_back (MenuElem (_("Analyze range"), mem_fun(*this, &Editor::analyze_range_selection)));
|
||||
items.push_back (MenuElem (_("Spectral Analysis"), mem_fun(*this, &Editor::analyze_range_selection)));
|
||||
#endif
|
||||
|
||||
items.push_back (SeparatorElem());
|
||||
|
|
@ -2228,6 +2228,15 @@ Editor::set_edit_point_preference (EditPoint ep, bool force)
|
|||
Glib::RefPtr<RadioAction>::cast_dynamic(act)->set_active (true);
|
||||
}
|
||||
|
||||
nframes64_t foo;
|
||||
bool in_track_canvas;
|
||||
|
||||
if (!mouse_frame (foo, in_track_canvas)) {
|
||||
in_track_canvas = false;
|
||||
}
|
||||
|
||||
reset_canvas_action_sensitivity (in_track_canvas);
|
||||
|
||||
instant_save ();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2051,13 +2051,15 @@ public:
|
|||
|
||||
void ensure_entered_track_selected (bool op_acts_on_objects = false);
|
||||
bool clear_entered_track;
|
||||
gint left_track_canvas (GdkEventCrossing*);
|
||||
bool left_track_canvas (GdkEventCrossing*);
|
||||
bool entered_track_canvas (GdkEventCrossing*);
|
||||
void set_entered_track (TimeAxisView*);
|
||||
void set_entered_regionview (RegionView*);
|
||||
gint left_automation_track ();
|
||||
|
||||
bool _new_regionviews_show_envelope;
|
||||
|
||||
void reset_canvas_action_sensitivity (bool);
|
||||
void toggle_gain_envelope_visibility ();
|
||||
void toggle_gain_envelope_active ();
|
||||
void reset_region_gain_envelopes ();
|
||||
|
|
|
|||
|
|
@ -440,16 +440,16 @@ Editor::register_actions ()
|
|||
|
||||
act = ActionManager::register_action (editor_actions, "editor-separate", _("Separate"), mem_fun(*this, &Editor::separate_region_from_selection));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
ActionManager::region_selection_sensitive_actions.push_back (act);
|
||||
ActionManager::mouse_edit_point_requires_canvas_actions.push_back (act);
|
||||
act = ActionManager::register_action (editor_actions, "separate-from-punch", _("Separate Using Punch Range"), mem_fun(*this, &Editor::separate_region_from_punch));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
ActionManager::region_selection_sensitive_actions.push_back (act);
|
||||
ActionManager::mouse_edit_point_requires_canvas_actions.push_back (act);
|
||||
act = ActionManager::register_action (editor_actions, "separate-from-loop", _("Separate Using Loop Range"), mem_fun(*this, &Editor::separate_region_from_loop));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
ActionManager::region_selection_sensitive_actions.push_back (act);
|
||||
ActionManager::mouse_edit_point_requires_canvas_actions.push_back (act);
|
||||
act = ActionManager::register_action (editor_actions, "editor-crop", _("Crop"), mem_fun(*this, &Editor::crop_region_to_selection));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
ActionManager::region_selection_sensitive_actions.push_back (act);
|
||||
ActionManager::mouse_edit_point_requires_canvas_actions.push_back (act);
|
||||
act = ActionManager::register_action (editor_actions, "editor-cut", _("Cut"), mem_fun(*this, &Editor::cut));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
/* Note: for now, editor-delete does the exact same thing as editor-cut */
|
||||
|
|
@ -1656,3 +1656,16 @@ Editor::reset_focus ()
|
|||
{
|
||||
track_canvas->grab_focus();
|
||||
}
|
||||
|
||||
void
|
||||
Editor::reset_canvas_action_sensitivity (bool onoff)
|
||||
{
|
||||
if (_edit_point != EditAtMouse) {
|
||||
onoff = true;
|
||||
}
|
||||
|
||||
for (vector<Glib::RefPtr<Action> >::iterator x = ActionManager::mouse_edit_point_requires_canvas_actions.begin();
|
||||
x != ActionManager::mouse_edit_point_requires_canvas_actions.end(); ++x) {
|
||||
(*x)->set_sensitive (onoff);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -116,6 +116,7 @@ Editor::initialize_canvas ()
|
|||
track_canvas->set_name ("EditorMainCanvas");
|
||||
track_canvas->add_events (Gdk::POINTER_MOTION_HINT_MASK|Gdk::SCROLL_MASK);
|
||||
track_canvas->signal_leave_notify_event().connect (mem_fun(*this, &Editor::left_track_canvas));
|
||||
track_canvas->signal_enter_notify_event().connect (mem_fun(*this, &Editor::entered_track_canvas));
|
||||
track_canvas->set_flags (CAN_FOCUS);
|
||||
|
||||
/* set up drag-n-drop */
|
||||
|
|
@ -779,11 +780,19 @@ Editor::stop_canvas_autoscroll ()
|
|||
autoscroll_active = false;
|
||||
}
|
||||
|
||||
gint
|
||||
bool
|
||||
Editor::left_track_canvas (GdkEventCrossing *ev)
|
||||
{
|
||||
set_entered_track (0);
|
||||
set_entered_regionview (0);
|
||||
reset_canvas_action_sensitivity (false);
|
||||
return false;
|
||||
}
|
||||
|
||||
bool
|
||||
Editor::entered_track_canvas (GdkEventCrossing *ev)
|
||||
{
|
||||
reset_canvas_action_sensitivity (true);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -78,6 +78,10 @@ Editor::mouse_frame (nframes64_t& where, bool& in_track_canvas) const
|
|||
Glib::RefPtr<Gdk::Window> canvas_window = const_cast<Editor*>(this)->track_canvas->get_window();
|
||||
Glib::RefPtr<const Gdk::Window> pointer_window;
|
||||
|
||||
if (!canvas_window) {
|
||||
return false;
|
||||
}
|
||||
|
||||
pointer_window = canvas_window->get_pointer (x, y, mask);
|
||||
|
||||
if (pointer_window == track_canvas->get_bin_window()) {
|
||||
|
|
|
|||
|
|
@ -2768,6 +2768,7 @@ Editor::separate_region_from_selection ()
|
|||
to allow discontiguous operation, since get_edit_op_range() currently
|
||||
returns a single range.
|
||||
*/
|
||||
|
||||
if (mouse_mode == MouseRange && !selection->time.empty()) {
|
||||
|
||||
separate_regions_between (selection->time);
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@
|
|||
//------------------------------------------------------------------------
|
||||
Mootcher:: Mootcher(const char *saveLocation)
|
||||
: curl( NULL )
|
||||
, connection( NULL )
|
||||
, connection( 0 )
|
||||
{
|
||||
changeWorkingDir(saveLocation);
|
||||
};
|
||||
|
|
@ -108,7 +108,7 @@ size_t Mootcher::WriteMemoryCallback(void *ptr, size_t size, size_t nmemb, void
|
|||
//------------------------------------------------------------------------
|
||||
void Mootcher::toLog(std::string input)
|
||||
{
|
||||
//printf("%s\n", input.c_str());// for debugging
|
||||
printf("%s\n", input.c_str());// for debugging
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -135,7 +135,7 @@ int Mootcher::doLogin(std::string login, std::string password)
|
|||
|
||||
struct MemoryStruct xml_page;
|
||||
xml_page.memory = NULL;
|
||||
xml_page.size = NULL;
|
||||
xml_page.size = 0;
|
||||
|
||||
// create the post message from the login and password
|
||||
std::string postMessage;
|
||||
|
|
@ -191,9 +191,10 @@ int Mootcher::doLogin(std::string login, std::string password)
|
|||
if(xml_page.memory){
|
||||
free( xml_page.memory );
|
||||
xml_page.memory = NULL;
|
||||
xml_page.size = NULL;
|
||||
xml_page.size = 0;
|
||||
}
|
||||
|
||||
std::cerr << "Login was cool, connection = " << connection << std::endl;
|
||||
return connection;
|
||||
}
|
||||
else return 3; // will be returned if a curl related problem ocurrs
|
||||
|
|
@ -203,7 +204,7 @@ std::string Mootcher::searchText(std::string word)
|
|||
{
|
||||
struct MemoryStruct xml_page;
|
||||
xml_page.memory = NULL;
|
||||
xml_page.size = NULL;
|
||||
xml_page.size = 0;
|
||||
|
||||
std::string result;
|
||||
|
||||
|
|
@ -252,7 +253,7 @@ std::string Mootcher::searchText(std::string word)
|
|||
if(xml_page.memory){
|
||||
free( xml_page.memory );
|
||||
xml_page.memory = NULL;
|
||||
xml_page.size = NULL;
|
||||
xml_page.size = 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __ardour_svn_revision_h__
|
||||
#define __ardour_svn_revision_h__
|
||||
static const char* ardour_svn_revision = "3186";
|
||||
static const char* ardour_svn_revision = "3187";
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue