//------------------------------------------------------------------------------
/** Initialize static memeber data */
-std::string TimeAxisViewItem::NAME_FONT;
+Pango::FontDescription TimeAxisViewItem::NAME_FONT;
+bool TimeAxisViewItem::have_name_font = false;
const double TimeAxisViewItem::NAME_X_OFFSET = 15.0;
const double TimeAxisViewItem::NAME_Y_OFFSET = 15.0 ; /* XXX depends a lot on the font size, sigh. */
const double TimeAxisViewItem::NAME_HIGHLIGHT_SIZE = 15.0 ; /* ditto */
* @param start the start point of this item
* @param duration the duration of this item
*/
-TimeAxisViewItem::TimeAxisViewItem(std::string it_name, GnomeCanvasGroup* parent, TimeAxisView& tv, double spu, GdkColor& base_color,
+TimeAxisViewItem::TimeAxisViewItem(std::string it_name, GnomeCanvasGroup* parent, TimeAxisView& tv, double spu, Gdk::Color& base_color,
jack_nframes_t start, jack_nframes_t duration,
Visibility visibility)
: trackview (tv)
{
- if (NAME_FONT.empty()) {
+ if (!have_name_font) {
NAME_FONT = get_font_for_style (N_("TimeAxisViewItemName"));
+ have_name_font = true;
}
item_name = it_name ;
TimeAxisViewItem::set_duration (jack_nframes_t dur, void* src)
{
if ((dur > max_item_duration) || (dur < min_item_duration)) {
- warning << compose (_("new duration %1 frames is out of bounds for %2"), get_item_name(), dur)
+ warning << string_compose (_("new duration %1 frames is out of bounds for %2"), get_item_name(), dur)
<< endmsg;
return false;
}
*
*/
void
-TimeAxisViewItem::set_color(GdkColor& base_color)
+TimeAxisViewItem::set_color(Gdk::Color& base_color)
{
compute_colors (base_color);
set_colors ();
defer to idle loop, otherwise we'll delete this object
while we're still inside this function ...
*/
- Gtk::Main::idle.connect(bind(mem_fun(&TimeAxisViewItem::idle_remove_this_item), this, src));
+ Glib::signal_idle().connect(bind (sigc::ptr_fun (&TimeAxisViewItem::idle_remove_this_item), this, src));
}
/**