{
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())
{