Conditionally compile out the 'single threaded' stuff. It doesn't work very well...
[synfig.git] / synfig-studio / trunk / src / gtkmm / canvasview.cpp
index 8436ec9..84b0f45 100644 (file)
@@ -2004,6 +2004,7 @@ static bool _close_instance(etl::handle<Instance> instance)
 bool
 CanvasView::close_instance()
 {
+#ifdef SINGLE_THREADED
        if (get_work_area()->get_updating())
        {
                get_work_area()->stop_updating(true); // stop and mark as cancelled
@@ -2014,6 +2015,7 @@ CanvasView::close_instance()
                        250);
        }
        else
+#endif
                Glib::signal_timeout().connect(
                        sigc::bind(sigc::ptr_fun(_close_instance),
                                           (etl::handle<Instance>)get_instance()),
@@ -2035,14 +2037,20 @@ CanvasView::update_title()
 {
        string title;
 
-       if(get_instance()->synfigapp::Instance::get_action_count())
-               title="*";
-       title+=etl::basename(get_instance()->get_file_name())
-               +" : ";
-       if(get_canvas()->get_name().empty())
-               title+='"'+get_canvas()->get_id()+'"';
-       else
-               title+='"'+get_canvas()->get_name()+'"';
+       title = strprintf("%s%s\"%s\"",
+                                         (
+                                                 get_instance()->get_action_count()
+                                                 ? "*"
+                                                 : ""
+                                         ), (
+                                                 get_instance()->has_real_filename()
+                                                 ? (etl::basename(get_instance()->get_file_name()) + " : ").c_str()
+                                                 : ""
+                                         ), (
+                                                 get_canvas()->get_name().empty()
+                                                 ? get_canvas()->get_id().c_str()
+                                                 : get_canvas()->get_name().c_str()
+                                         ));
 
        if(get_instance()->synfigapp::Instance::in_repository())
        {