size-based scrolling and right-click pages for editor notebook
[ardour.git] / gtk2_ardour / utils.cc
index 9d1966b10ef4279dfbbfa98cbf6876a618607c7c..290339cad86e93bc0309e01a8b18104bb5f6baae 100644 (file)
@@ -105,7 +105,7 @@ short_version (string orig, string::size_type target_length)
 }
 
 string
-fit_to_pixels (string str, int pixel_width, string font)
+fit_to_pixels (ARDOUR::stringcr_t str, int pixel_width, ARDOUR::stringcr_t font)
 {
        Label foo;
        int width;
@@ -409,9 +409,11 @@ url_decode (string& url)
 Pango::FontDescription
 get_font_for_style (string widgetname)
 {
+       Gtk::Window window (WINDOW_TOPLEVEL);
        Gtk::Label foobar;
        Glib::RefPtr<Style> style;
 
+       window.add (foobar);
        foobar.set_name (widgetname);
        foobar.ensure_style();