From 58d73ea36c84c397d51286df0139c9840639c8cf Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Fri, 14 May 2021 18:34:44 +0200 Subject: [PATCH] Userland: Rename QuickShow => Image Viewer The old name was a bit too ambiguous. This one is crystal clear. :^) --- Base/etc/shellrc | 2 +- Base/home/anon/.config/LaunchServer.ini | 16 ++++++------- .../res/apps/{QuickShow.af => ImageViewer.af} | 4 ++-- Base/usr/share/man/man1/ImageViewer.md | 23 +++++++++++++++++++ Base/usr/share/man/man1/QuickShow.md | 23 ------------------- Userland/Applications/CMakeLists.txt | 2 +- .../Applications/ImageViewer/CMakeLists.txt | 7 ++++++ .../{QuickShow => ImageViewer}/QSWidget.cpp | 0 .../{QuickShow => ImageViewer}/QSWidget.h | 0 .../{QuickShow => ImageViewer}/main.cpp | 16 ++++++------- .../Applications/QuickShow/CMakeLists.txt | 7 ------ 11 files changed, 50 insertions(+), 50 deletions(-) rename Base/res/apps/{QuickShow.af => ImageViewer.af} (61%) create mode 100644 Base/usr/share/man/man1/ImageViewer.md delete mode 100644 Base/usr/share/man/man1/QuickShow.md create mode 100644 Userland/Applications/ImageViewer/CMakeLists.txt rename Userland/Applications/{QuickShow => ImageViewer}/QSWidget.cpp (100%) rename Userland/Applications/{QuickShow => ImageViewer}/QSWidget.h (100%) rename Userland/Applications/{QuickShow => ImageViewer}/main.cpp (95%) delete mode 100644 Userland/Applications/QuickShow/CMakeLists.txt diff --git a/Base/etc/shellrc b/Base/etc/shellrc index 2db638e0b5e..f5e830b2517 100644 --- a/Base/etc/shellrc +++ b/Base/etc/shellrc @@ -11,7 +11,7 @@ alias wg=WidgetGallery alias te=TextEditor alias he=HexEditor alias pp=PixelPaint -alias qs=QuickShow +alias iv=ImageViewer alias pi=Piano alias calc=Calculator alias calendar=Calendar diff --git a/Base/home/anon/.config/LaunchServer.ini b/Base/home/anon/.config/LaunchServer.ini index 45636346c78..9d9d0adc7e4 100644 --- a/Base/home/anon/.config/LaunchServer.ini +++ b/Base/home/anon/.config/LaunchServer.ini @@ -1,12 +1,12 @@ [FileType] -pbm=/bin/QuickShow -pgm=/bin/QuickShow -png=/bin/QuickShow -ppm=/bin/QuickShow -gif=/bin/QuickShow -bmp=/bin/QuickShow -jpg=/bin/QuickShow -jpeg=/bin/QuickShow +pbm=/bin/ImageViewer +pgm=/bin/ImageViewer +png=/bin/ImageViewer +ppm=/bin/ImageViewer +gif=/bin/ImageViewer +bmp=/bin/ImageViewer +jpg=/bin/ImageViewer +jpeg=/bin/ImageViewer html=/bin/Browser wav=/bin/SoundPlayer m3u=/bin/SoundPlayer diff --git a/Base/res/apps/QuickShow.af b/Base/res/apps/ImageViewer.af similarity index 61% rename from Base/res/apps/QuickShow.af rename to Base/res/apps/ImageViewer.af index fbc18f3b974..d86708d1b2d 100644 --- a/Base/res/apps/QuickShow.af +++ b/Base/res/apps/ImageViewer.af @@ -1,6 +1,6 @@ [App] -Name=QuickShow -Executable=/bin/QuickShow +Name=Image Viewer +Executable=/bin/ImageViewer Category=Graphics [Launcher] diff --git a/Base/usr/share/man/man1/ImageViewer.md b/Base/usr/share/man/man1/ImageViewer.md new file mode 100644 index 00000000000..697de348f7e --- /dev/null +++ b/Base/usr/share/man/man1/ImageViewer.md @@ -0,0 +1,23 @@ +## Name + +Image Viewer - SerenityOS image viewer + +## Synopsis + +```**sh +$ ImageViewer [file] +``` + +## Description + +ImageViewer is an image viewing application for SerenityOS. + +## Arguments + +* `file`: The image file to be displayed. + +## Examples + +```sh +$ ImageViewer /res/graphics/buggie.png +``` diff --git a/Base/usr/share/man/man1/QuickShow.md b/Base/usr/share/man/man1/QuickShow.md deleted file mode 100644 index ae1b0b49591..00000000000 --- a/Base/usr/share/man/man1/QuickShow.md +++ /dev/null @@ -1,23 +0,0 @@ -## Name - -QuickShow - Serenity image viewer - -## Synopsis - -```**sh -$ QuickShow [file] -``` - -## Description - -QuickShow is an image viewing application for Serenity. - -## Arguments - -* `file`: The image file to be displayed. - -## Examples - -```sh -$ QuickShow /res/graphics/buggie.png -``` diff --git a/Userland/Applications/CMakeLists.txt b/Userland/Applications/CMakeLists.txt index c3c07f5abda..8e4af34454b 100644 --- a/Userland/Applications/CMakeLists.txt +++ b/Userland/Applications/CMakeLists.txt @@ -11,13 +11,13 @@ add_subdirectory(FontEditor) add_subdirectory(Help) add_subdirectory(HexEditor) add_subdirectory(IRCClient) +add_subdirectory(ImageViewer) add_subdirectory(KeyboardMapper) add_subdirectory(KeyboardSettings) add_subdirectory(Magnifier) add_subdirectory(MouseSettings) add_subdirectory(Piano) add_subdirectory(PixelPaint) -add_subdirectory(QuickShow) add_subdirectory(Run) add_subdirectory(SoundPlayer) add_subdirectory(SpaceAnalyzer) diff --git a/Userland/Applications/ImageViewer/CMakeLists.txt b/Userland/Applications/ImageViewer/CMakeLists.txt new file mode 100644 index 00000000000..75112aca7d5 --- /dev/null +++ b/Userland/Applications/ImageViewer/CMakeLists.txt @@ -0,0 +1,7 @@ +set(SOURCES + main.cpp + QSWidget.cpp +) + +serenity_app(ImageViewer ICON filetype-image) +target_link_libraries(ImageViewer LibDesktop LibGUI LibGfx) diff --git a/Userland/Applications/QuickShow/QSWidget.cpp b/Userland/Applications/ImageViewer/QSWidget.cpp similarity index 100% rename from Userland/Applications/QuickShow/QSWidget.cpp rename to Userland/Applications/ImageViewer/QSWidget.cpp diff --git a/Userland/Applications/QuickShow/QSWidget.h b/Userland/Applications/ImageViewer/QSWidget.h similarity index 100% rename from Userland/Applications/QuickShow/QSWidget.h rename to Userland/Applications/ImageViewer/QSWidget.h diff --git a/Userland/Applications/QuickShow/main.cpp b/Userland/Applications/ImageViewer/main.cpp similarity index 95% rename from Userland/Applications/QuickShow/main.cpp rename to Userland/Applications/ImageViewer/main.cpp index 0532d2c980f..8a30dda706b 100644 --- a/Userland/Applications/QuickShow/main.cpp +++ b/Userland/Applications/ImageViewer/main.cpp @@ -38,13 +38,13 @@ int main(int argc, char** argv) auto app = GUI::Application::construct(argc, argv); - if (!Desktop::Launcher::add_allowed_handler_with_any_url("/bin/QuickShow")) { + if (!Desktop::Launcher::add_allowed_handler_with_any_url("/bin/ImageViewer")) { warnln("Failed to set up allowed launch URLs"); return 1; } if (!Desktop::Launcher::add_allowed_handler_with_only_specific_urls( - "/bin/Help", { URL::create_with_file_protocol("/usr/share/man/man1/QuickShow.md") })) { + "/bin/Help", { URL::create_with_file_protocol("/usr/share/man/man1/ImageViewer.md") })) { warnln("Failed to set up allowed launch URLs"); return 1; } @@ -65,7 +65,7 @@ int main(int argc, char** argv) window->set_double_buffering_enabled(true); window->resize(300, 200); window->set_icon(app_icon.bitmap_for_size(16)); - window->set_title("QuickShow"); + window->set_title("Image Viewer"); auto& root_widget = window->set_main_widget(); root_widget.set_fill_with_background_color(true); @@ -78,11 +78,11 @@ int main(int argc, char** argv) auto& widget = root_widget.add(); widget.on_scale_change = [&](int scale, Gfx::IntRect rect) { if (!widget.bitmap()) { - window->set_title("QuickShow"); + window->set_title("Image Viewer"); return; } - window->set_title(String::formatted("{} {} {}% - QuickShow", widget.path(), widget.bitmap()->size().to_string(), scale)); + window->set_title(String::formatted("{} {} {}% - Image Viewer", widget.path(), widget.bitmap()->size().to_string(), scale)); if (window->is_fullscreen()) return; @@ -108,7 +108,7 @@ int main(int argc, char** argv) widget.load_from_file(urls.first().path()); for (size_t i = 1; i < urls.size(); ++i) { - Desktop::Launcher::open(URL::create_with_file_protocol(urls[i].path().characters()), "/bin/QuickShow"); + Desktop::Launcher::open(URL::create_with_file_protocol(urls[i].path().characters()), "/bin/ImageViewer"); } }; widget.on_doubleclick = [&] { @@ -278,9 +278,9 @@ int main(int argc, char** argv) auto& help_menu = menubar->add_menu("&Help"); help_menu.add_action(GUI::CommonActions::make_help_action([](auto&) { - Desktop::Launcher::open(URL::create_with_file_protocol("/usr/share/man/man1/QuickShow.md"), "/bin/Help"); + Desktop::Launcher::open(URL::create_with_file_protocol("/usr/share/man/man1/ImageViewer.md"), "/bin/Help"); })); - help_menu.add_action(GUI::CommonActions::make_about_action("QuickShow", app_icon, window)); + help_menu.add_action(GUI::CommonActions::make_about_action("Image Viewer", app_icon, window)); window->set_menubar(move(menubar)); diff --git a/Userland/Applications/QuickShow/CMakeLists.txt b/Userland/Applications/QuickShow/CMakeLists.txt deleted file mode 100644 index 7fa51f67d8d..00000000000 --- a/Userland/Applications/QuickShow/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -set(SOURCES - main.cpp - QSWidget.cpp -) - -serenity_app(QuickShow ICON filetype-image) -target_link_libraries(QuickShow LibDesktop LibGUI LibGfx)