diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2007-07-03 20:56:33 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2007-07-03 20:56:33 +0000 |
commit | 3e70b965971ca2b08dad5f76c58f5d13ebc20a2c (patch) | |
tree | c9775d3ca39acadb28daaa39156a3b15c2230591 /gtk2_ardour/time_axis_view_item.cc | |
parent | 3239d42bdfa5278bce3b9eeab3cb3f20426cd685 (diff) |
remove static Pango::FontDescriptions, they cause glib errors because of initialization before Glib::thread_init() has been called
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@2099 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/time_axis_view_item.cc')
-rw-r--r-- | gtk2_ardour/time_axis_view_item.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/gtk2_ardour/time_axis_view_item.cc b/gtk2_ardour/time_axis_view_item.cc index 7830e8f437..b178d1c0f4 100644 --- a/gtk2_ardour/time_axis_view_item.cc +++ b/gtk2_ardour/time_axis_view_item.cc @@ -43,7 +43,7 @@ using namespace PBD; //------------------------------------------------------------------------------ /** 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 ; @@ -86,7 +86,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; @@ -126,7 +126,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; @@ -212,7 +212,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); @@ -491,7 +491,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 */ } } @@ -561,7 +561,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 (); } } |