diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2009-10-02 01:49:57 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2009-10-02 01:49:57 +0000 |
commit | adeef356b239a25804c182b25e815f50f9d8fbab (patch) | |
tree | 0e5fabb306f130f4cb0d153d13280cb635f85a81 /gtk2_ardour | |
parent | 8aa1dfca0527f788404ab9807b9b35cda7e34061 (diff) |
add processor-same-as-route-name fix, modified from 2.X version; clean up CMT stuff so that it will compile, but continue to not compile it
git-svn-id: svn://localhost/ardour2/branches/3.0@5714 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/editor_imageframe.cc | 36 | ||||
-rw-r--r-- | gtk2_ardour/imageframe_socket_handler.h | 28 | ||||
-rw-r--r-- | gtk2_ardour/imageframe_time_axis.h | 6 | ||||
-rw-r--r-- | gtk2_ardour/imageframe_time_axis_group.h | 12 | ||||
-rw-r--r-- | gtk2_ardour/marker_time_axis.h | 2 | ||||
-rw-r--r-- | gtk2_ardour/processor_box.cc | 8 | ||||
-rw-r--r-- | gtk2_ardour/public_editor.h | 4 | ||||
-rw-r--r-- | gtk2_ardour/visual_time_axis.h | 12 |
8 files changed, 57 insertions, 51 deletions
diff --git a/gtk2_ardour/editor_imageframe.cc b/gtk2_ardour/editor_imageframe.cc index 5ff1fc6459..a0a400d715 100644 --- a/gtk2_ardour/editor_imageframe.cc +++ b/gtk2_ardour/editor_imageframe.cc @@ -44,8 +44,26 @@ using namespace Gtk; using namespace PBD; +using namespace std; + +TimeAxisView* +Editor::get_named_time_axis(const string & name) +{ + TimeAxisView* tav = 0 ; + + for (TrackViewList::const_iterator i = track_views.begin(); i != track_views.end(); ++i) + { + if (((TimeAxisView*)*i)->name() == name) + { + tav = ((TimeAxisView*)*i) ; + break ; + } + } + return(tav) ; +} /* <CMT Additions file="editor.cc"> */ +#ifdef HAVE_CMT void Editor::add_imageframe_time_axis(const string & track_name, void* src) @@ -149,23 +167,6 @@ Editor::popup_marker_time_axis_edit_menu(int button, int32_t time, ArdourCanvas: } } } - -TimeAxisView* -Editor::get_named_time_axis(const string & name) -{ - TimeAxisView* tav = 0 ; - - for (TrackViewList::const_iterator i = track_views.begin(); i != track_views.end(); ++i) - { - if (((TimeAxisView*)*i)->name() == name) - { - tav = ((TimeAxisView*)*i) ; - break ; - } - } - return(tav) ; -} - /* </CMT Additions file="editor.cc"> */ @@ -1114,3 +1115,4 @@ Editor::handle_new_imageframe_marker_time_axis_view(const string & track_name, T /* </CMT Additions file="editor_route_list.cc"> */ +#endif /* HAVE_CMT */ diff --git a/gtk2_ardour/imageframe_socket_handler.h b/gtk2_ardour/imageframe_socket_handler.h index b945bb65a2..739a718c86 100644 --- a/gtk2_ardour/imageframe_socket_handler.h +++ b/gtk2_ardour/imageframe_socket_handler.h @@ -127,7 +127,7 @@ class ImageFrameSocketHandler : public sigc::trackable * @param track_id the unique id of the removed image frame time axis * @param src the identity of the object that initiated the change */ - void send_imageframe_time_axis_removed(const string & track_id, void* src) ; + void send_imageframe_time_axis_removed(const std::string & track_id, void* src) ; /** * Sends a message indicating that an ImageFrameTimeAxis has been renamed @@ -137,7 +137,7 @@ class ImageFrameSocketHandler : public sigc::trackable * @param src the identity of the object that initiated the change * @param time_axis the time axis that has changed */ - void send_imageframe_time_axis_renamed(const string & new_id, const string & old_id, void* src, ImageFrameTimeAxis* time_axis) ; + void send_imageframe_time_axis_renamed(const std::string & new_id, const std::string & old_id, void* src, ImageFrameTimeAxis* time_axis) ; //------------------------ // MarkerTimeAxis Messages @@ -148,7 +148,7 @@ class ImageFrameSocketHandler : public sigc::trackable * @param track_id the unique id of the removed image frame time axis * @param src the identity of the object that initiated the change */ - void send_marker_time_axis_removed(const string & track_id, void* src) ; + void send_marker_time_axis_removed(const std::string & track_id, void* src) ; /** * Sends a message indicating that an MarkerTimeAxis has been renamed @@ -158,7 +158,7 @@ class ImageFrameSocketHandler : public sigc::trackable * @param src the identity of the object that initiated the change * @param time_axis the time axis that has changed */ - void send_marker_time_axis_renamed(const string & new_id, const string & old_id, void* src, MarkerTimeAxis* time_axis) ; + void send_marker_time_axis_renamed(const std::string & new_id, const std::string & old_id, void* src, MarkerTimeAxis* time_axis) ; //--------------------------------- @@ -171,7 +171,7 @@ class ImageFrameSocketHandler : public sigc::trackable * @param src the identity of the object that initiated the change * @param group the group that has changed */ - void send_imageframe_time_axis_group_removed(const string & group_id, void* src, ImageFrameTimeAxisGroup* group) ; + void send_imageframe_time_axis_group_removed(const std::string & group_id, void* src, ImageFrameTimeAxisGroup* group) ; /** * Send a message indicating that an ImageFrameTimeAxisGroup has been renamed @@ -181,7 +181,7 @@ class ImageFrameSocketHandler : public sigc::trackable * @param src the identity of the object that initiated the change * @param group the group that has changed */ - void send_imageframe_time_axis_group_renamed(const string & new_id, const string & old_id, void* src, ImageFrameTimeAxisGroup* group) ; + void send_imageframe_time_axis_group_renamed(const std::string & new_id, const std::string & old_id, void* src, ImageFrameTimeAxisGroup* group) ; //--------------------------------- @@ -212,7 +212,7 @@ class ImageFrameSocketHandler : public sigc::trackable * @param src the identity of the object that initiated the change * @param item the renamed item */ - void send_imageframe_view_renamed(const string & new_id, const string & old_id, void* src, ImageFrameView* item) ; + void send_imageframe_view_renamed(const std::string & new_id, const std::string & old_id, void* src, ImageFrameView* item) ; /** * Send a message indicating that an ImageFrameView item has been removed message @@ -221,7 +221,7 @@ class ImageFrameSocketHandler : public sigc::trackable * @param src the identity of the object that initiated the change * @param item the removed item */ - void send_imageframe_view_removed(const string & item_id, void* src, ImageFrameView* item) ; + void send_imageframe_view_removed(const std::string & item_id, void* src, ImageFrameView* item) ; //--------------------------------- // MarkerView Messages @@ -252,7 +252,7 @@ class ImageFrameSocketHandler : public sigc::trackable * @param src the identity of the object that initiated the change * @param item the MarkerView which has been renamed */ - void send_marker_view_renamed(const string & new_id, const string & old_id, void* src, MarkerView* item) ; + void send_marker_view_renamed(const std::string & new_id, const std::string & old_id, void* src, MarkerView* item) ; /** * Send a message indicating that a MarkerView item has been removed message @@ -261,7 +261,7 @@ class ImageFrameSocketHandler : public sigc::trackable * @param src the identity of the object that initiated the change * @param item the MarkerView which has been removed */ - void send_marker_view_removed(const string & item_id, void* src, MarkerView* item) ; + void send_marker_view_removed(const std::string & item_id, void* src, MarkerView* item) ; //---------------------------------------------------------------------------------------// @@ -593,7 +593,7 @@ class ImageFrameSocketHandler : public sigc::trackable * @param start the start character * @param num_chars the number of characters to read * @param the message to break apart - * @return the sub string of the message + * @return the sub std::string of the message */ std::string get_message_part(int start, int32_t num_chars, const char* msg) ; @@ -649,7 +649,7 @@ class ImageFrameSocketHandler : public sigc::trackable * @param errmsg populated with a description of the error on failure * @return the described item on success, 0 otherwise */ - ImageFrameView* get_imageframe_view_from_desc(const string & track_id, const string & group_ud, const string & item_id, int& errcode, std::string& errmsg) ; + ImageFrameView* get_imageframe_view_from_desc(const std::string & track_id, const std::string & group_ud, const std::string & item_id, int& errcode, std::string& errmsg) ; //---------------------------------------------------------------------------------------// // Convenince Message Send Methods @@ -660,12 +660,12 @@ class ImageFrameSocketHandler : public sigc::trackable * @param msg the message to send * @return the return value of the socket call */ - int send_message(const string & msg) ; + int send_message(const std::string & msg) ; /** * Reads a message from the Socket * - * @param msg a string to populate with the received message + * @param msg a std::string to populate with the received message * @return the return value from the socket call */ int read_message(std::string& msg) ; diff --git a/gtk2_ardour/imageframe_time_axis.h b/gtk2_ardour/imageframe_time_axis.h index 7cbed6a394..f34472a295 100644 --- a/gtk2_ardour/imageframe_time_axis.h +++ b/gtk2_ardour/imageframe_time_axis.h @@ -62,7 +62,7 @@ class ImageFrameTimeAxis : public VisualTimeAxis * @param sess the current session * @param canvas the parent canvas item */ - ImageFrameTimeAxis(const string & track_id, PublicEditor& ed, ARDOUR::Session& sess, ArdourCanvas::Canvas& canvas) ; + ImageFrameTimeAxis(const std::string & track_id, PublicEditor& ed, ARDOUR::Session& sess, ArdourCanvas::Canvas& canvas) ; /** * Destructor @@ -126,7 +126,7 @@ class ImageFrameTimeAxis : public VisualTimeAxis * @param track_id the track_id of the MarkerTimeAxis to search for * @return the named markerTimeAxis, or 0 if the named MarkerTimeAxis is not associated with this ImageFrameTimeAxis */ - MarkerTimeAxis* get_named_marker_time_axis(const string & track_id) ; + MarkerTimeAxis* get_named_marker_time_axis(const std::string & track_id) ; /** * Removes the named markerTimeAxis from those associated with this ImageFrameTimeAxis @@ -135,7 +135,7 @@ class ImageFrameTimeAxis : public VisualTimeAxis * @param src the identity of the object that initiated the change * @return the removed MarkerTimeAxis */ - MarkerTimeAxis* remove_named_marker_time_axis(const string & track_id, void* src) ; + MarkerTimeAxis* remove_named_marker_time_axis(const std::string & track_id, void* src) ; /** * Removes tav from the list of MarkerTimaAxis associated with this ImageFrameTimeAxis diff --git a/gtk2_ardour/imageframe_time_axis_group.h b/gtk2_ardour/imageframe_time_axis_group.h index 147e6b5295..e189b71e0b 100644 --- a/gtk2_ardour/imageframe_time_axis_group.h +++ b/gtk2_ardour/imageframe_time_axis_group.h @@ -53,7 +53,7 @@ class ImageFrameTimeAxisGroup : public sigc::trackable * @param iftav the parent ImageFrameTimeAxis of this view helper * @param group_id the unique name/id of this group */ - ImageFrameTimeAxisGroup(ImageFrameTimeAxisView& iftav, const string & group_id) ; + ImageFrameTimeAxisGroup(ImageFrameTimeAxisView& iftav, const std::string & group_id) ; /** * Destructor @@ -72,7 +72,7 @@ class ImageFrameTimeAxisGroup : public sigc::trackable * @param new_name the new name of this group * @param src the identity of the object that initiated the change */ - void set_group_name(const string & new_name, void* src) ; + void set_group_name(const std::string & new_name, void* src) ; /** * Returns the id of this group @@ -138,7 +138,7 @@ class ImageFrameTimeAxisGroup : public sigc::trackable * @param num_channels the number of channles within the rgb_data * @param src the identity of the object that initiated the change */ - ImageFrameView* add_imageframe_item(const string & item_id, nframes_t start, nframes_t duration, unsigned char* rgb_data, uint32_t width, uint32_t height, uint32_t num_channels, void* src) ; + ImageFrameView* add_imageframe_item(const std::string & item_id, nframes_t start, nframes_t duration, unsigned char* rgb_data, uint32_t width, uint32_t height, uint32_t num_channels, void* src) ; /** * Returns the named ImageFrameView or 0 if the named view does not exist on this view helper @@ -146,7 +146,7 @@ class ImageFrameTimeAxisGroup : public sigc::trackable * @param item_id the unique id of the item to search for * @return the named ImageFrameView, or 0 if it is not held upon this view */ - ImageFrameView* get_named_imageframe_item(const string & item_id) ; + ImageFrameView* get_named_imageframe_item(const std::string & item_id) ; /** * Removes the currently selected ImageFrameView @@ -163,7 +163,7 @@ class ImageFrameTimeAxisGroup : public sigc::trackable * @param src the identity of the object that initiated the change * @see add_imageframe_view */ - ImageFrameView* remove_named_imageframe_item(const string & item_id, void* src) ; + ImageFrameView* remove_named_imageframe_item(const std::string & item_id, void* src) ; /** * Removes ifv from the list of ImageFrameViews upon this TimeAxis. @@ -253,7 +253,7 @@ class ImageFrameTimeAxisGroup : public sigc::trackable sigc::signal<void, ImageFrameView*, void*> ImageFrameAdded ; /** Emitted when an ImageFrameView is removed from this group */ - sigc::signal<void, const string &, const string &, const string &, void*> ImageFrameRemoved ; + sigc::signal<void, const std::string &, const std::string &, const std::string &, void*> ImageFrameRemoved ; protected: diff --git a/gtk2_ardour/marker_time_axis.h b/gtk2_ardour/marker_time_axis.h index 56856d3bd3..5c66b56c16 100644 --- a/gtk2_ardour/marker_time_axis.h +++ b/gtk2_ardour/marker_time_axis.h @@ -65,7 +65,7 @@ class MarkerTimeAxis : public VisualTimeAxis * @param name the name/id of this time axis * @param tav the associated track view that this MarkerTimeAxis is marking up */ - MarkerTimeAxis(PublicEditor& ed, ARDOUR::Session& sess, ArdourCanvas::Canvas& canvas, const string & name, TimeAxisView* tav) ; + MarkerTimeAxis(PublicEditor& ed, ARDOUR::Session& sess, ArdourCanvas::Canvas& canvas, const std::string & name, TimeAxisView* tav) ; /** * Destructor diff --git a/gtk2_ardour/processor_box.cc b/gtk2_ardour/processor_box.cc index ac60653c17..b36a97b875 100644 --- a/gtk2_ardour/processor_box.cc +++ b/gtk2_ardour/processor_box.cc @@ -1162,8 +1162,12 @@ ProcessorBox::rename_processor (boost::shared_ptr<Processor> processor) switch (name_prompter.run ()) { case Gtk::RESPONSE_ACCEPT: - name_prompter.get_result (result); - if (result.length()) { + name_prompter.get_result (result); + if (result.length()) { + if (_session.route_by_name (result)) { + ARDOUR_UI::instance()->popup_error (_("A track already exists with that name")); + return; + } processor->set_name (result); } break; diff --git a/gtk2_ardour/public_editor.h b/gtk2_ardour/public_editor.h index 880ebc6c15..c396131108 100644 --- a/gtk2_ardour/public_editor.h +++ b/gtk2_ardour/public_editor.h @@ -265,13 +265,13 @@ class PublicEditor : public Gtk::Window, public PBD::StatefulThingWithGoingAway virtual Evoral::MusicalTime get_grid_type_as_beats (bool& success, nframes64_t position) = 0; #ifdef WITH_CMT + virtual void connect_to_image_compositor() = 0; virtual void add_imageframe_time_axis(const std::string & track_name, void*) = 0; virtual void add_imageframe_marker_time_axis(const std::string & track_name, TimeAxisView* marked_track, void*) = 0; - virtual void connect_to_image_compositor() = 0; virtual void scroll_timeaxis_to_imageframe_item(const TimeAxisViewItem* item) = 0; - virtual TimeAxisView* get_named_time_axis(const std::string & name) = 0; #endif + virtual TimeAxisView* get_named_time_axis(const std::string & name) = 0; virtual RouteTimeAxisView* get_route_view_by_id (PBD::ID& id) = 0; virtual void get_equivalent_regions (RegionView* rv, std::vector<RegionView*>&, ARDOUR::RouteGroup::Property) const = 0; diff --git a/gtk2_ardour/visual_time_axis.h b/gtk2_ardour/visual_time_axis.h index a0dfe654de..bce02c9bae 100644 --- a/gtk2_ardour/visual_time_axis.h +++ b/gtk2_ardour/visual_time_axis.h @@ -84,7 +84,7 @@ class VisualTimeAxis : public TimeAxisView * @param name the new name of this TimeAxis * @param src the identity of the object that initiated the change */ - virtual void set_time_axis_name(const string & name, void* src) ; + virtual void set_time_axis_name(const std::string & name, void* src) ; //---------------------------------------------------------------------------------------// @@ -113,7 +113,7 @@ class VisualTimeAxis : public TimeAxisView /** * Emitted when we have changed the gui, and what we have shanged */ - sigc::signal<void,const string &,void*> gui_changed ; + sigc::signal<void,const std::string &,void*> gui_changed ; /** * Emitted when this Visual Time Axis has been removed @@ -122,17 +122,17 @@ class VisualTimeAxis : public TimeAxisView * the destructor, this allows us to capture the source of the deletion * event */ - sigc::signal<void,const string &,void*> VisualTimeAxisRemoved ; + sigc::signal<void,const std::string &,void*> VisualTimeAxisRemoved ; /** * Emitted when we have changed the name of this TimeAxis */ - sigc::signal<void,const string &,const string &,void*> NameChanged ; + sigc::signal<void,const std::string &,const std::string &,void*> NameChanged ; /** * Emitted when this time axis has been selected for removal */ - //sigc::signal<void,std::string,void*> VisualTimeAxisRemoved ; + //sigc::signal<void,std::std::string,void*> VisualTimeAxisRemoved ; //---------------------------------------------------------------------------------------// // Constructor / Desctructor @@ -145,7 +145,7 @@ class VisualTimeAxis : public TimeAxisView * @param sess the current session * @param canvas the parent canvas object */ - VisualTimeAxis(const string & name, PublicEditor& ed, ARDOUR::Session& sess, ArdourCanvas::Canvas& canvas) ; + VisualTimeAxis(const std::string & name, PublicEditor& ed, ARDOUR::Session& sess, ArdourCanvas::Canvas& canvas) ; //---------------------------------------------------------------------------------------// |