mirror of
https://github.com/RGBCube/serenity
synced 2025-05-30 22:48:11 +00:00
FileManager: Use FileIconProvider in the properties dialog
This removes the need for the properties dialog to access the internal data model used by the directory view.
This commit is contained in:
parent
3dd15da7b1
commit
aae296ef08
3 changed files with 10 additions and 12 deletions
|
@ -480,7 +480,6 @@ int run_in_windowed_mode(RefPtr<Core::ConfigFile> config, String initial_locatio
|
|||
auto properties_action
|
||||
= GUI::Action::create(
|
||||
"Properties...", { Mod_Alt, Key_Return }, Gfx::Bitmap::load_from_file("/res/icons/16x16/properties.png"), [&](const GUI::Action& action) {
|
||||
auto& model = directory_view.model();
|
||||
String container_dir_path;
|
||||
String path;
|
||||
Vector<String> selected;
|
||||
|
@ -496,9 +495,9 @@ int run_in_windowed_mode(RefPtr<Core::ConfigFile> config, String initial_locatio
|
|||
|
||||
RefPtr<PropertiesDialog> properties;
|
||||
if (selected.is_empty()) {
|
||||
properties = window->add<PropertiesDialog>(model, path, true);
|
||||
properties = window->add<PropertiesDialog>(path, true);
|
||||
} else {
|
||||
properties = window->add<PropertiesDialog>(model, selected.first(), access(container_dir_path.characters(), W_OK) != 0);
|
||||
properties = window->add<PropertiesDialog>(selected.first(), access(container_dir_path.characters(), W_OK) != 0);
|
||||
}
|
||||
|
||||
properties->exec();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue