|
|
|
@ -588,15 +588,20 @@ void Directories::add_or_update_path(const boost::filesystem::path &dir_path, co |
|
|
|
child->set_value(column_record.name, filename); |
|
|
|
child->set_value(column_record.name, filename); |
|
|
|
child->set_value(column_record.markup, Glib::Markup::escape_text(filename)); |
|
|
|
child->set_value(column_record.markup, Glib::Markup::escape_text(filename)); |
|
|
|
child->set_value(column_record.path, it->path()); |
|
|
|
child->set_value(column_record.path, it->path()); |
|
|
|
|
|
|
|
auto sortable_filename = filename; |
|
|
|
|
|
|
|
for(auto &e : sortable_filename) { |
|
|
|
|
|
|
|
if(e == '.') |
|
|
|
|
|
|
|
e = '$'; |
|
|
|
|
|
|
|
} |
|
|
|
if(boost::filesystem::is_directory(it->path())) { |
|
|
|
if(boost::filesystem::is_directory(it->path())) { |
|
|
|
child->set_value(column_record.id, '1' + filename); |
|
|
|
child->set_value(column_record.id, '1' + sortable_filename); |
|
|
|
auto grandchild = tree_store->append(child->children()); |
|
|
|
auto grandchild = tree_store->append(child->children()); |
|
|
|
grandchild->set_value(column_record.name, std::string("(empty)")); |
|
|
|
grandchild->set_value(column_record.name, std::string("(empty)")); |
|
|
|
grandchild->set_value(column_record.markup, Glib::Markup::escape_text("(empty)")); |
|
|
|
grandchild->set_value(column_record.markup, Glib::Markup::escape_text("(empty)")); |
|
|
|
grandchild->set_value(column_record.type, PathType::UNKNOWN); |
|
|
|
grandchild->set_value(column_record.type, PathType::UNKNOWN); |
|
|
|
} |
|
|
|
} |
|
|
|
else { |
|
|
|
else { |
|
|
|
child->set_value(column_record.id, '2' + filename); |
|
|
|
child->set_value(column_record.id, '2' + sortable_filename); |
|
|
|
|
|
|
|
|
|
|
|
auto language = Source::guess_language(it->path().filename()); |
|
|
|
auto language = Source::guess_language(it->path().filename()); |
|
|
|
if(!language) |
|
|
|
if(!language) |
|
|
|
|