|
@@ -58,17 +58,15 @@ DirectoryView::DirectoryView(GWidget* parent)
|
|
|
|
|
|
m_item_view->set_model_column(GDirectoryModel::Column::Name);
|
|
|
|
|
|
- m_item_view->on_model_notification = [this](const GModelNotification& notification) {
|
|
|
- if (notification.type() == GModelNotification::Type::ModelUpdated) {
|
|
|
- set_status_message(String::format("%d item%s (%u byte%s)",
|
|
|
- model().row_count(),
|
|
|
- model().row_count() != 1 ? "s" : "",
|
|
|
- model().bytes_in_files(),
|
|
|
- model().bytes_in_files() != 1 ? "s" : ""));
|
|
|
-
|
|
|
- if (on_path_change)
|
|
|
- on_path_change(model().path());
|
|
|
- }
|
|
|
+ m_table_view->model()->on_model_update = [this](auto&) {
|
|
|
+ set_status_message(String::format("%d item%s (%u byte%s)",
|
|
|
+ model().row_count(),
|
|
|
+ model().row_count() != 1 ? "s" : "",
|
|
|
+ model().bytes_in_files(),
|
|
|
+ model().bytes_in_files() != 1 ? "s" : ""));
|
|
|
+
|
|
|
+ if (on_path_change)
|
|
|
+ on_path_change(model().path());
|
|
|
};
|
|
|
|
|
|
m_model->on_thumbnail_progress = [this](int done, int total) {
|