From e0946701e10074f51dca50191fed201f1b922477 Mon Sep 17 00:00:00 2001 From: Taybin Rutkin Date: Sat, 22 Oct 2005 17:33:14 +0000 Subject: [PATCH] More compliation fixes. add_with_viewport() -> add(). track_gnome_canvas -> track_canvas. etc. git-svn-id: svn://localhost/trunk/ardour2@66 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/SConscript | 2 +- gtk2_ardour/connection_editor.cc | 12 +++++------- gtk2_ardour/connection_editor.h | 2 +- gtk2_ardour/editor.cc | 20 ++++++++++---------- gtk2_ardour/editor_keyboard.cc | 2 +- gtk2_ardour/editor_mixer.cc | 1 - gtk2_ardour/editor_mouse.cc | 6 +++--- gtk2_ardour/editor_ops.cc | 4 ++-- gtk2_ardour/editor_rulers.cc | 4 ++-- gtk2_ardour/io_selector.cc | 4 ++-- gtk2_ardour/location_ui.cc | 4 ++-- 11 files changed, 29 insertions(+), 32 deletions(-) diff --git a/gtk2_ardour/SConscript b/gtk2_ardour/SConscript index b53cfb224f..79259421e8 100644 --- a/gtk2_ardour/SConscript +++ b/gtk2_ardour/SConscript @@ -68,7 +68,7 @@ automation_pan_line.cc automation_time_axis.cc axis_view.cc canvas-imageframe.c -imagegrame.cc +imageframe.cc canvas-simpleline.c simpleline.cc canvas-simplerect.c diff --git a/gtk2_ardour/connection_editor.cc b/gtk2_ardour/connection_editor.cc index 1859b17493..56c7435cc3 100644 --- a/gtk2_ardour/connection_editor.cc +++ b/gtk2_ardour/connection_editor.cc @@ -134,17 +134,15 @@ ConnectionEditor::ConnectionEditor () right_vbox.set_border_width (5); right_vbox.pack_start (port_and_selector_box); - input_connection_display.set_shadow_type (Gtk::SHADOW_IN); - input_connection_display.set_selection_mode (GTK_SELECTION_SINGLE); + input_connection_display.get_selection()->set_mode(Gtk::SELECTION_SINGLE); input_connection_display.set_size_request (80, -1); input_connection_display.set_name ("ConnectionEditorConnectionList"); - input_connection_display.signal_selection_changed().connect (bind (mem_fun(*this, &ConnectionEditor::connection_selection_changed), input_connection_display)); + input_connection_display.get_selection()->signal_changed().connect (bind (mem_fun(*this, &ConnectionEditor::connection_selection_changed), input_connection_display)); - output_connection_display.set_shadow_type (Gtk::SHADOW_IN); - output_connection_display.set_selection_mode (GTK_SELECTION_SINGLE); + output_connection_display.get_selection()->set_mode(Gtk::SELECTION_SINGLE); output_connection_display.set_size_request (80, -1); output_connection_display.set_name ("ConnectionEditorConnectionList"); - output_connection_display.signal_selection_changed().connect (bind (mem_fun(*this, &ConnectionEditor::connection_selected), output_connection_display)); + output_connection_display.get_selection()->signal_changed().connect (bind (mem_fun(*this, &ConnectionEditor::connection_selection_changed), output_connection_display)); input_scroller.set_policy (Gtk::POLICY_NEVER, Gtk::POLICY_AUTOMATIC); output_scroller.set_policy (Gtk::POLICY_NEVER, Gtk::POLICY_AUTOMATIC); @@ -451,7 +449,7 @@ ConnectionEditor::display_ports () Gtk::CList *client_port_display = manage (new Gtk::CList (1)); ScrolledWindow *scroller = manage (new ScrolledWindow); - scroller->add_with_viewport (*client_port_display); + scroller->add (*client_port_display); scroller->set_policy (Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC); client_box->pack_start (*scroller); diff --git a/gtk2_ardour/connection_editor.h b/gtk2_ardour/connection_editor.h index becc852638..69b6b83577 100644 --- a/gtk2_ardour/connection_editor.h +++ b/gtk2_ardour/connection_editor.h @@ -153,7 +153,7 @@ class ConnectionEditor : public ArdourDialog { void port_column_click (gint col, Gtk::TreeView* ); gint port_button_event (GdkEventButton *, Gtk::TreeView*); gint connection_click (GdkEventButton *ev, Gtk::TreeView*); - void connection_selected (gint, gint, GdkEvent *, bool); + void connection_selection_changed (Gtk::TreeView&, Glib::RefPtr&); sigc::connection config_connection; sigc::connection connect_connection; diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index 6df5895c90..215fbcaf64 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -802,7 +802,7 @@ Editor::initialize_canvas () /* adjust sensitivity for "picking" items */ - // GNOME_CANVAS(track_gnome_canvas)->close_enough = 2; + // GNOME_CANVAS(track_canvas)->close_enough = 2; track_canvas.signal_event().connect (slot (*this, &Editor::track_canvas_event)); track_canvas.set_name ("EditorMainCanvas"); @@ -916,7 +916,7 @@ Editor::initialize_canvas () transport_punchout_line->hide(); // used to show zoom mode active zooming - zoom_rect = new Canvas::Simplerect (track_gnome_canvas.root(), 0.0, 0.0, 0.0, 0.0); + zoom_rect = new Canvas::Simplerect (track_canvas.root(), 0.0, 0.0, 0.0, 0.0); zoom_rect->property_fill_color_rgba() << color_map[cZoomRectFill]; zoom_rect->property_outline_color_rgba() << color_map[cZoomRect]; zoom_rect->property_outline_pixels() << 1; @@ -925,7 +925,7 @@ Editor::initialize_canvas () zoom_rect.signal_event().connect (slot (*this, &PublicEditor::canvas_zoom_rect_event)); // used as rubberband rect - rubberband_rect = new Canvas::Simplerect (track_gnome_canvas.root(), 0.0, 0.0, 0.0, 0.0); + rubberband_rect = new Canvas::Simplerect (track_canvas.root(), 0.0, 0.0, 0.0, 0.0); rubberband_rect->property_outline_color_rgba() << color_map[cRubberBandRect]; rubberband_rect->property_fill_color_rgba() << (guint32) color_map[cRubberBandRectFill]; rubberband_rect->property_outline_pixels() << 1; @@ -982,7 +982,7 @@ Editor::initialize_canvas () double time_height = timebar_height * 5; double time_width = FLT_MAX/frames_per_unit; - gnome_canvas_set_scroll_region (GNOME_CANVAS(time_gnome_canvas), 0.0, 0.0, time_width, time_height); + gnome_canvas_set_scroll_region (GNOME_CANVAS(time_canvas), 0.0, 0.0, time_width, time_height); edit_cursor = new Cursor (*this, "blue", (GtkSignalFunc) _canvas_edit_cursor_event); playhead_cursor = new Cursor (*this, "red", (GtkSignalFunc) _canvas_playhead_cursor_event); @@ -1256,7 +1256,7 @@ Editor::track_canvas_allocate (GtkAllocation *alloc) strcpy (txt, _(txt1)); strcat (txt, _(txt2)); - first_action_message = gnome_canvas_item_new (gnome_canvas_root(GNOME_CANVAS(track_gnome_canvas)), + first_action_message = gnome_canvas_item_new (gnome_canvas_root(GNOME_CANVAS(track_canvas)), gnome_canvas_text_get_type(), "fontdesc", font, "fill_color_rgba", color_map[cFirstActionMessage], @@ -1332,13 +1332,13 @@ Editor::reset_scrolling_region (GtkAllocation *alloc) canvas_alloc_height = alloc->height; canvas_alloc_width = alloc->width; } else { - canvas_alloc_height = track_gnome_canvas->allocation.height; - canvas_alloc_width = track_gnome_canvas->allocation.width; + canvas_alloc_height = track_canvas->allocation.height; + canvas_alloc_width = track_canvas->allocation.width; } canvas_height = max (canvas_height, canvas_alloc_height); - gnome_canvas_set_scroll_region (GNOME_CANVAS(track_gnome_canvas), 0.0, 0.0, + gnome_canvas_set_scroll_region (GNOME_CANVAS(track_canvas), 0.0, 0.0, max (last_canvas_unit, canvas_alloc_width), canvas_height); @@ -3286,7 +3286,7 @@ Editor::track_canvas_drag_data_received (GdkDragContext *context, double wx; double wy; - gnome_canvas_window_to_world (GNOME_CANVAS(track_gnome_canvas), (double) x, (double) y, &wx, &wy); + gnome_canvas_window_to_world (GNOME_CANVAS(track_canvas), (double) x, (double) y, &wx, &wy); ev.type = GDK_BUTTON_RELEASE; ev.button.x = wx; @@ -3404,7 +3404,7 @@ Editor::flush_track_canvas () out this method entirely */ - //gnome_canvas_update_now (GNOME_CANVAS(track_gnome_canvas)); + //gnome_canvas_update_now (GNOME_CANVAS(track_canvas)); //gtk_main_iteration (); } diff --git a/gtk2_ardour/editor_keyboard.cc b/gtk2_ardour/editor_keyboard.cc index 782ddb6b85..32a1a20285 100644 --- a/gtk2_ardour/editor_keyboard.cc +++ b/gtk2_ardour/editor_keyboard.cc @@ -49,7 +49,7 @@ Editor::kbd_driver (sigc::slot theslot, bool use_track_canvas, b selection->set (entered_regionview); } - gnome_canvas_window_to_world (GNOME_CANVAS(track_gnome_canvas), x, y, &dx, &dy); + gnome_canvas_window_to_world (GNOME_CANVAS(track_canvas), x, y, &dx, &dy); ev.type = GDK_BUTTON_PRESS; ev.button.x = dx; diff --git a/gtk2_ardour/editor_mixer.cc b/gtk2_ardour/editor_mixer.cc index 283db9f862..402c9d263a 100644 --- a/gtk2_ardour/editor_mixer.cc +++ b/gtk2_ardour/editor_mixer.cc @@ -253,7 +253,6 @@ Editor::session_going_away () entered_regionview = 0; entered_track = 0; latest_regionview = 0; - region_list_display_drag_region = 0; last_update_frame = 0; drag_info.item = 0; last_audition_region = 0; diff --git a/gtk2_ardour/editor_mouse.cc b/gtk2_ardour/editor_mouse.cc index ac2fd3921a..8614a5f426 100644 --- a/gtk2_ardour/editor_mouse.cc +++ b/gtk2_ardour/editor_mouse.cc @@ -85,14 +85,14 @@ Editor::event_frame (GdkEvent* event, double* pcx, double* pcy) case GDK_BUTTON_PRESS: case GDK_2BUTTON_PRESS: case GDK_3BUTTON_PRESS: - gnome_canvas_w2c_d (GNOME_CANVAS(track_gnome_canvas), event->button.x, event->button.y, pcx, pcy); + gnome_canvas_w2c_d (GNOME_CANVAS(track_canvas), event->button.x, event->button.y, pcx, pcy); break; case GDK_MOTION_NOTIFY: - gnome_canvas_w2c_d (GNOME_CANVAS(track_gnome_canvas), event->motion.x, event->motion.y, pcx, pcy); + gnome_canvas_w2c_d (GNOME_CANVAS(track_canvas), event->motion.x, event->motion.y, pcx, pcy); break; case GDK_ENTER_NOTIFY: case GDK_LEAVE_NOTIFY: - gnome_canvas_w2c_d (GNOME_CANVAS(track_gnome_canvas), event->crossing.x, event->crossing.y, pcx, pcy); + gnome_canvas_w2c_d (GNOME_CANVAS(track_canvas), event->crossing.x, event->crossing.y, pcx, pcy); break; default: warning << string_compose (_("Editor::event_frame() used on unhandled event type %1"), event->type) << endmsg; diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc index e7c81e694e..b3d18f476b 100644 --- a/gtk2_ardour/editor_ops.cc +++ b/gtk2_ardour/editor_ops.cc @@ -1471,7 +1471,7 @@ Editor::insert_region_list_drag (AudioRegion& region) track_canvas->get_pointer (x, y); - gnome_canvas_window_to_world (GNOME_CANVAS(track_gnome_canvas), x, y, &wx, &wy); + gnome_canvas_window_to_world (GNOME_CANVAS(track_canvas), x, y, &wx, &wy); GdkEvent event; event.type = GDK_BUTTON_RELEASE; @@ -3168,7 +3168,7 @@ Editor::mouse_paste () double wx, wy; track_canvas->get_pointer (x, y); - gnome_canvas_window_to_world (GNOME_CANVAS(track_gnome_canvas), x, y, &wx, &wy); + gnome_canvas_window_to_world (GNOME_CANVAS(track_canvas), x, y, &wx, &wy); GdkEvent event; event.type = GDK_BUTTON_RELEASE; diff --git a/gtk2_ardour/editor_rulers.cc b/gtk2_ardour/editor_rulers.cc index 275019e6eb..1a4ba1a579 100644 --- a/gtk2_ardour/editor_rulers.cc +++ b/gtk2_ardour/editor_rulers.cc @@ -225,8 +225,8 @@ Editor::ruler_mouse_motion (GdkEventMotion* ev) time_canvas_event_box.get_window()->get_pointer (x, y, state); - gnome_canvas_window_to_world (GNOME_CANVAS(track_gnome_canvas), x, y, &wcx, &wcy); - gnome_canvas_w2c_d (GNOME_CANVAS(track_gnome_canvas), wcx, wcy, &cx, &cy); + gnome_canvas_window_to_world (GNOME_CANVAS(track_canvas), x, y, &wcx, &wcy); + gnome_canvas_w2c_d (GNOME_CANVAS(track_canvas), wcx, wcy, &cx, &cy); jack_nframes_t where = leftmost_frame + pixel_to_frame (x); diff --git a/gtk2_ardour/io_selector.cc b/gtk2_ardour/io_selector.cc index b32d6c90be..ae2a63e202 100644 --- a/gtk2_ardour/io_selector.cc +++ b/gtk2_ardour/io_selector.cc @@ -172,7 +172,7 @@ IOSelector::IOSelector (Session& sess, IO& ior, bool input) port_display_scroller.set_name ("IOSelectorNotebook"); port_display_scroller.set_border_width (0); port_display_scroller.set_size_request (-1, 170); - port_display_scroller.add_with_viewport (port_box); + port_display_scroller.add (port_box); port_display_scroller.set_policy (Gtk::POLICY_NEVER, Gtk::POLICY_AUTOMATIC); @@ -332,7 +332,7 @@ IOSelector::rescan () Gtk::CList *client_port_display = manage (new Gtk::CList (1)); ScrolledWindow *scroller = manage (new ScrolledWindow); - scroller->add_with_viewport (*client_port_display); + scroller->add (*client_port_display); scroller->set_policy (Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC); client_box->pack_start (*scroller); diff --git a/gtk2_ardour/location_ui.cc b/gtk2_ardour/location_ui.cc index 3e5275aeb0..a6957a9017 100644 --- a/gtk2_ardour/location_ui.cc +++ b/gtk2_ardour/location_ui.cc @@ -611,7 +611,7 @@ LocationUI::LocationUI () location_vpacker.pack_start (punch_edit_row, false, false); location_rows.set_name("LocationLocRows"); - location_rows_scroller.add_with_viewport (location_rows); + location_rows_scroller.add (location_rows); location_rows_scroller.set_name ("LocationLocRowsScroller"); location_rows_scroller.set_policy (Gtk::POLICY_NEVER, Gtk::POLICY_AUTOMATIC); location_rows_scroller.set_size_request (-1, 130); @@ -632,7 +632,7 @@ LocationUI::LocationUI () range_rows.set_name("LocationRangeRows"); - range_rows_scroller.add_with_viewport (range_rows); + range_rows_scroller.add (range_rows); range_rows_scroller.set_name ("LocationRangeRowsScroller"); range_rows_scroller.set_policy (Gtk::POLICY_NEVER, Gtk::POLICY_AUTOMATIC); range_rows_scroller.set_size_request (-1, 130); -- 2.30.2