diff --git a/SConstruct b/SConstruct index 069136d427..93be1e9b47 100644 --- a/SConstruct +++ b/SConstruct @@ -743,7 +743,7 @@ libraries['flac'].Append(CCFLAGS="-I/usr/local/include", LINKFLAGS="-L/usr/local # conf = Configure (libraries['flac']) -if conf.CheckLib ('FLAC', 'FLAC__seekable_stream_decoder_init', language='CXX'): +if conf.CheckLib ('FLAC', 'FLAC__seekable_stream_decoder_set_read_callback', language='CXX'): conf.env.Append(CCFLAGS='-DHAVE_FLAC') use_flac = True else: diff --git a/gtk2_ardour/automation_time_axis.cc b/gtk2_ardour/automation_time_axis.cc index 855b34ffc6..8170c42cd5 100644 --- a/gtk2_ardour/automation_time_axis.cc +++ b/gtk2_ardour/automation_time_axis.cc @@ -44,7 +44,7 @@ using namespace Gtk; using namespace Gtkmm2ext; using namespace Editing; -Pango::FontDescription AutomationTimeAxisView::name_font; +Pango::FontDescription* AutomationTimeAxisView::name_font = 0; bool AutomationTimeAxisView::have_name_font = false; AutomationTimeAxisView::AutomationTimeAxisView (Session& s, boost::shared_ptr r, @@ -124,7 +124,7 @@ AutomationTimeAxisView::AutomationTimeAxisView (Session& s, boost::shared_ptrproperty_font_desc() = font; + verbose_canvas_cursor->property_font_desc() = *font; verbose_canvas_cursor->property_anchor() = ANCHOR_NW; + delete font; + verbose_cursor_visible = false; /* a group to hold time (measure) lines */ diff --git a/gtk2_ardour/marker.cc b/gtk2_ardour/marker.cc index a177821b96..a0f91d2a2a 100644 --- a/gtk2_ardour/marker.cc +++ b/gtk2_ardour/marker.cc @@ -243,11 +243,14 @@ Marker::Marker (PublicEditor& ed, ArdourCanvas::Group& parent, guint32 rgba, con mark->property_fill_color_rgba() = rgba; mark->property_outline_color_rgba() = rgba; mark->property_width_pixels() = 1; - Pango::FontDescription font = get_font_for_style (N_("MarkerText")); + Pango::FontDescription* font = get_font_for_style (N_("MarkerText")); text = new Text (*group); text->property_text() = annotation.c_str(); - text->property_font_desc() = font; + text->property_font_desc() = *font; + + delete font; + if (annotate_left) { text->property_x() = -(text->property_text_width()); } else { diff --git a/gtk2_ardour/time_axis_view_item.cc b/gtk2_ardour/time_axis_view_item.cc index 289686c7ce..79dcdc2e3e 100644 --- a/gtk2_ardour/time_axis_view_item.cc +++ b/gtk2_ardour/time_axis_view_item.cc @@ -45,7 +45,7 @@ using namespace ARDOUR; //------------------------------------------------------------------------------ /** Initialize const static memeber data */ -Pango::FontDescription TimeAxisViewItem::NAME_FONT; +Pango::FontDescription* TimeAxisViewItem::NAME_FONT = 0; bool TimeAxisViewItem::have_name_font = false; const double TimeAxisViewItem::NAME_X_OFFSET = 15.0; const double TimeAxisViewItem::GRAB_HANDLE_LENGTH = 6 ; @@ -88,7 +88,7 @@ TimeAxisViewItem::TimeAxisViewItem(const string & it_name, ArdourCanvas::Group& int width; int height; - layout->set_font_description (NAME_FONT); + layout->set_font_description (*NAME_FONT); Gtkmm2ext::get_ink_pixel_size (layout, width, height); NAME_Y_OFFSET = height + 6; @@ -128,7 +128,7 @@ void TimeAxisViewItem::init (const string& it_name, double spu, Gdk::Color& base_color, nframes_t start, nframes_t duration, Visibility vis) { item_name = it_name ; - name_text_width = ::pixel_width (it_name, NAME_FONT); + name_text_width = ::pixel_width (it_name, *NAME_FONT); last_name_text_width = 0; samples_per_unit = spu ; should_show_selection = true; @@ -214,7 +214,7 @@ TimeAxisViewItem::init (const string& it_name, double spu, Gdk::Color& base_colo then NAME_Y_OFFSET to position the text in the vertical center of the highlight */ name_text->property_y() = (double) trackview.height - 1.0 - TimeAxisViewItem::NAME_Y_OFFSET; - name_text->property_font_desc() = NAME_FONT; + name_text->property_font_desc() = *NAME_FONT; name_text->property_anchor() = Gtk::ANCHOR_NW; name_text->set_data ("timeaxisviewitem", this); @@ -493,7 +493,7 @@ TimeAxisViewItem::set_item_name(std::string new_name, void* src) if (new_name != item_name) { std::string temp_name = item_name ; item_name = new_name ; - name_text_width = ::pixel_width (new_name, NAME_FONT); + name_text_width = ::pixel_width (new_name, *NAME_FONT); NameChanged (item_name, temp_name, src) ; /* EMIT_SIGNAL */ } } @@ -563,7 +563,7 @@ TimeAxisViewItem::set_name_text(const ustring& new_name) { if (name_text) { name_text->property_text() = new_name; - name_text_width = pixel_width (new_name, NAME_FONT); + name_text_width = pixel_width (new_name, *NAME_FONT); name_text_size_cache.clear (); } } diff --git a/gtk2_ardour/time_axis_view_item.h b/gtk2_ardour/time_axis_view_item.h index 118a042920..4be3d4eabb 100644 --- a/gtk2_ardour/time_axis_view_item.h +++ b/gtk2_ardour/time_axis_view_item.h @@ -261,7 +261,7 @@ class TimeAxisViewItem : public Selectable bool name_active() const { return name_connected; } // Default sizes, font and spacing - static Pango::FontDescription NAME_FONT ; + static Pango::FontDescription* NAME_FONT ; static bool have_name_font; static const double NAME_X_OFFSET ; static const double GRAB_HANDLE_LENGTH ; diff --git a/gtk2_ardour/utils.cc b/gtk2_ardour/utils.cc index c20b56f6f4..9747c3bcbb 100644 --- a/gtk2_ardour/utils.cc +++ b/gtk2_ardour/utils.cc @@ -237,7 +237,7 @@ get_canvas_points (string who, uint32_t npoints) return new ArdourCanvas::Points (npoints); } -Pango::FontDescription +Pango::FontDescription* get_font_for_style (string widgetname) { Gtk::Window window (WINDOW_TOPLEVEL); @@ -260,10 +260,10 @@ get_font_for_style (string widgetname) PangoContext* ctxt = (PangoContext*) pango_layout_get_context ((PangoLayout*) layout->gobj()); pfd = pango_context_get_font_description (ctxt); - return Pango::FontDescription (pfd, true); /* make a copy */ + return new Pango::FontDescription (pfd, true); /* make a copy */ } - return Pango::FontDescription (pfd, true); /* make a copy */ + return new Pango::FontDescription (pfd, true); /* make a copy */ } uint32_t diff --git a/gtk2_ardour/utils.h b/gtk2_ardour/utils.h index 7e26ba066c..cae78f3d0a 100644 --- a/gtk2_ardour/utils.h +++ b/gtk2_ardour/utils.h @@ -63,7 +63,7 @@ unsigned char* xpm2rgba (const char** xpm, uint32_t& w, uint32_t& h); ArdourCanvas::Points* get_canvas_points (std::string who, uint32_t npoints); -Pango::FontDescription get_font_for_style (std::string widgetname); +Pango::FontDescription* get_font_for_style (std::string widgetname); uint32_t rgba_from_style (std::string, uint32_t, uint32_t, uint32_t, uint32_t, std::string = "fg", int = Gtk::STATE_NORMAL, bool = true);