summaryrefslogtreecommitdiff
path: root/Userland/Applications
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Applications')
-rw-r--r--Userland/Applications/PixelPaint/MainWidget.cpp12
-rw-r--r--Userland/Applications/PixelPaint/MainWidget.h1
-rw-r--r--Userland/Applications/PixelPaint/ProjectLoader.cpp8
-rw-r--r--Userland/Applications/PixelPaint/ProjectLoader.h1
4 files changed, 0 insertions, 22 deletions
diff --git a/Userland/Applications/PixelPaint/MainWidget.cpp b/Userland/Applications/PixelPaint/MainWidget.cpp
index b24c121f63..fe2f1c44ec 100644
--- a/Userland/Applications/PixelPaint/MainWidget.cpp
+++ b/Userland/Applications/PixelPaint/MainWidget.cpp
@@ -719,18 +719,6 @@ void MainWidget::open_image_fd(int fd, String const& path)
m_layer_list_widget->set_image(&image);
}
-void MainWidget::open_image_file(String const& path)
-{
- auto try_load = m_loader.try_load_from_path(path);
- if (try_load.is_error()) {
- GUI::MessageBox::show_error(window(), String::formatted("Unable to open file: {}", path));
- return;
- }
- auto& image = *m_loader.release_image();
- create_new_editor(image);
- m_layer_list_widget->set_image(&image);
-}
-
void MainWidget::create_default_image()
{
auto image = Image::try_create_with_size({ 480, 360 });
diff --git a/Userland/Applications/PixelPaint/MainWidget.h b/Userland/Applications/PixelPaint/MainWidget.h
index 018a2a4535..d1a955086a 100644
--- a/Userland/Applications/PixelPaint/MainWidget.h
+++ b/Userland/Applications/PixelPaint/MainWidget.h
@@ -34,7 +34,6 @@ public:
void initialize_menubar(GUI::Window&);
void open_image_fd(int fd, String const& path);
- void open_image_file(String const& path);
void create_default_image();
private:
diff --git a/Userland/Applications/PixelPaint/ProjectLoader.cpp b/Userland/Applications/PixelPaint/ProjectLoader.cpp
index 51c83736a2..a6c703fe7e 100644
--- a/Userland/Applications/PixelPaint/ProjectLoader.cpp
+++ b/Userland/Applications/PixelPaint/ProjectLoader.cpp
@@ -63,13 +63,5 @@ Result<void, String> ProjectLoader::try_load_from_fd_and_close(int fd, StringVie
m_image = image;
return {};
}
-Result<void, String> ProjectLoader::try_load_from_path(StringView path)
-{
- auto file_or_error = Core::File::open(path, Core::OpenMode::ReadOnly);
- if (file_or_error.is_error())
- return String::formatted("Unable to open file because: {}", file_or_error.release_error());
-
- return try_load_from_fd_and_close(file_or_error.release_value()->leak_fd(), path);
-}
}
diff --git a/Userland/Applications/PixelPaint/ProjectLoader.h b/Userland/Applications/PixelPaint/ProjectLoader.h
index eaed4eabbe..f7609b911b 100644
--- a/Userland/Applications/PixelPaint/ProjectLoader.h
+++ b/Userland/Applications/PixelPaint/ProjectLoader.h
@@ -19,7 +19,6 @@ public:
~ProjectLoader() = default;
Result<void, String> try_load_from_fd_and_close(int fd, StringView path);
- Result<void, String> try_load_from_path(StringView path);
bool is_raw_image() const { return m_is_raw_image; }
bool has_image() const { return !m_image.is_null(); }