mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-11 02:13:56 +09:00
Userland: Rename QuickShow => Image Viewer
The old name was a bit too ambiguous. This one is crystal clear. :^)
This commit is contained in:
parent
d039542c7c
commit
58d73ea36c
Notes:
sideshowbarker
2024-07-18 18:09:24 +09:00
Author: https://github.com/awesomekling
Commit: 58d73ea36c
11 changed files with 50 additions and 50 deletions
|
@ -11,7 +11,7 @@ alias wg=WidgetGallery
|
||||||
alias te=TextEditor
|
alias te=TextEditor
|
||||||
alias he=HexEditor
|
alias he=HexEditor
|
||||||
alias pp=PixelPaint
|
alias pp=PixelPaint
|
||||||
alias qs=QuickShow
|
alias iv=ImageViewer
|
||||||
alias pi=Piano
|
alias pi=Piano
|
||||||
alias calc=Calculator
|
alias calc=Calculator
|
||||||
alias calendar=Calendar
|
alias calendar=Calendar
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
[FileType]
|
[FileType]
|
||||||
pbm=/bin/QuickShow
|
pbm=/bin/ImageViewer
|
||||||
pgm=/bin/QuickShow
|
pgm=/bin/ImageViewer
|
||||||
png=/bin/QuickShow
|
png=/bin/ImageViewer
|
||||||
ppm=/bin/QuickShow
|
ppm=/bin/ImageViewer
|
||||||
gif=/bin/QuickShow
|
gif=/bin/ImageViewer
|
||||||
bmp=/bin/QuickShow
|
bmp=/bin/ImageViewer
|
||||||
jpg=/bin/QuickShow
|
jpg=/bin/ImageViewer
|
||||||
jpeg=/bin/QuickShow
|
jpeg=/bin/ImageViewer
|
||||||
html=/bin/Browser
|
html=/bin/Browser
|
||||||
wav=/bin/SoundPlayer
|
wav=/bin/SoundPlayer
|
||||||
m3u=/bin/SoundPlayer
|
m3u=/bin/SoundPlayer
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[App]
|
[App]
|
||||||
Name=QuickShow
|
Name=Image Viewer
|
||||||
Executable=/bin/QuickShow
|
Executable=/bin/ImageViewer
|
||||||
Category=Graphics
|
Category=Graphics
|
||||||
|
|
||||||
[Launcher]
|
[Launcher]
|
23
Base/usr/share/man/man1/ImageViewer.md
Normal file
23
Base/usr/share/man/man1/ImageViewer.md
Normal file
|
@ -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
|
||||||
|
```
|
|
@ -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
|
|
||||||
```
|
|
|
@ -11,13 +11,13 @@ add_subdirectory(FontEditor)
|
||||||
add_subdirectory(Help)
|
add_subdirectory(Help)
|
||||||
add_subdirectory(HexEditor)
|
add_subdirectory(HexEditor)
|
||||||
add_subdirectory(IRCClient)
|
add_subdirectory(IRCClient)
|
||||||
|
add_subdirectory(ImageViewer)
|
||||||
add_subdirectory(KeyboardMapper)
|
add_subdirectory(KeyboardMapper)
|
||||||
add_subdirectory(KeyboardSettings)
|
add_subdirectory(KeyboardSettings)
|
||||||
add_subdirectory(Magnifier)
|
add_subdirectory(Magnifier)
|
||||||
add_subdirectory(MouseSettings)
|
add_subdirectory(MouseSettings)
|
||||||
add_subdirectory(Piano)
|
add_subdirectory(Piano)
|
||||||
add_subdirectory(PixelPaint)
|
add_subdirectory(PixelPaint)
|
||||||
add_subdirectory(QuickShow)
|
|
||||||
add_subdirectory(Run)
|
add_subdirectory(Run)
|
||||||
add_subdirectory(SoundPlayer)
|
add_subdirectory(SoundPlayer)
|
||||||
add_subdirectory(SpaceAnalyzer)
|
add_subdirectory(SpaceAnalyzer)
|
||||||
|
|
7
Userland/Applications/ImageViewer/CMakeLists.txt
Normal file
7
Userland/Applications/ImageViewer/CMakeLists.txt
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
set(SOURCES
|
||||||
|
main.cpp
|
||||||
|
QSWidget.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
serenity_app(ImageViewer ICON filetype-image)
|
||||||
|
target_link_libraries(ImageViewer LibDesktop LibGUI LibGfx)
|
|
@ -38,13 +38,13 @@ int main(int argc, char** argv)
|
||||||
|
|
||||||
auto app = GUI::Application::construct(argc, 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");
|
warnln("Failed to set up allowed launch URLs");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!Desktop::Launcher::add_allowed_handler_with_only_specific_urls(
|
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");
|
warnln("Failed to set up allowed launch URLs");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -65,7 +65,7 @@ int main(int argc, char** argv)
|
||||||
window->set_double_buffering_enabled(true);
|
window->set_double_buffering_enabled(true);
|
||||||
window->resize(300, 200);
|
window->resize(300, 200);
|
||||||
window->set_icon(app_icon.bitmap_for_size(16));
|
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<GUI::Widget>();
|
auto& root_widget = window->set_main_widget<GUI::Widget>();
|
||||||
root_widget.set_fill_with_background_color(true);
|
root_widget.set_fill_with_background_color(true);
|
||||||
|
@ -78,11 +78,11 @@ int main(int argc, char** argv)
|
||||||
auto& widget = root_widget.add<QSWidget>();
|
auto& widget = root_widget.add<QSWidget>();
|
||||||
widget.on_scale_change = [&](int scale, Gfx::IntRect rect) {
|
widget.on_scale_change = [&](int scale, Gfx::IntRect rect) {
|
||||||
if (!widget.bitmap()) {
|
if (!widget.bitmap()) {
|
||||||
window->set_title("QuickShow");
|
window->set_title("Image Viewer");
|
||||||
return;
|
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())
|
if (window->is_fullscreen())
|
||||||
return;
|
return;
|
||||||
|
@ -108,7 +108,7 @@ int main(int argc, char** argv)
|
||||||
widget.load_from_file(urls.first().path());
|
widget.load_from_file(urls.first().path());
|
||||||
|
|
||||||
for (size_t i = 1; i < urls.size(); ++i) {
|
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 = [&] {
|
widget.on_doubleclick = [&] {
|
||||||
|
@ -278,9 +278,9 @@ int main(int argc, char** argv)
|
||||||
|
|
||||||
auto& help_menu = menubar->add_menu("&Help");
|
auto& help_menu = menubar->add_menu("&Help");
|
||||||
help_menu.add_action(GUI::CommonActions::make_help_action([](auto&) {
|
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));
|
window->set_menubar(move(menubar));
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
set(SOURCES
|
|
||||||
main.cpp
|
|
||||||
QSWidget.cpp
|
|
||||||
)
|
|
||||||
|
|
||||||
serenity_app(QuickShow ICON filetype-image)
|
|
||||||
target_link_libraries(QuickShow LibDesktop LibGUI LibGfx)
|
|
Loading…
Add table
Add a link
Reference in a new issue