From 9f4e37e3427561670d486cdbdd702738b461c572 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Thu, 15 Apr 2021 17:00:22 +0200 Subject: [PATCH] Applications: Rename Serendipity => Welcome Let's stick to the theme of "the most obvious name possible" --- Base/etc/shellrc | 1 - .../{app-serendipity.png => app-welcome.png} | Bin .../{app-serendipity.png => app-welcome.png} | Bin Userland/Applications/CMakeLists.txt | 2 +- .../Applications/Serendipity/CMakeLists.txt | 11 --------- Userland/Applications/Welcome/CMakeLists.txt | 11 +++++++++ .../WelcomeWidget.cpp} | 21 +++++++++--------- .../WelcomeWidget.h} | 9 ++++---- .../WelcomeWindow.gml} | 0 .../{Serendipity => Welcome}/main.cpp | 6 ++--- 10 files changed, 30 insertions(+), 31 deletions(-) rename Base/res/icons/16x16/{app-serendipity.png => app-welcome.png} (100%) rename Base/res/icons/32x32/{app-serendipity.png => app-welcome.png} (100%) delete mode 100644 Userland/Applications/Serendipity/CMakeLists.txt create mode 100644 Userland/Applications/Welcome/CMakeLists.txt rename Userland/Applications/{Serendipity/SerendipityWidget.cpp => Welcome/WelcomeWidget.cpp} (92%) rename Userland/Applications/{Serendipity/SerendipityWidget.h => Welcome/WelcomeWidget.h} (92%) rename Userland/Applications/{Serendipity/SerendipityWindow.gml => Welcome/WelcomeWindow.gml} (100%) rename Userland/Applications/{Serendipity => Welcome}/main.cpp (94%) diff --git a/Base/etc/shellrc b/Base/etc/shellrc index 405417b34a..92d8fd10db 100644 --- a/Base/etc/shellrc +++ b/Base/etc/shellrc @@ -25,7 +25,6 @@ alias pv=Profiler alias ws=WebServer alias sl=Solitaire alias ue=UserspaceEmulator -alias welcome=Serendipity alias rgrep="grep -r" alias egrep="grep -E" diff --git a/Base/res/icons/16x16/app-serendipity.png b/Base/res/icons/16x16/app-welcome.png similarity index 100% rename from Base/res/icons/16x16/app-serendipity.png rename to Base/res/icons/16x16/app-welcome.png diff --git a/Base/res/icons/32x32/app-serendipity.png b/Base/res/icons/32x32/app-welcome.png similarity index 100% rename from Base/res/icons/32x32/app-serendipity.png rename to Base/res/icons/32x32/app-welcome.png diff --git a/Userland/Applications/CMakeLists.txt b/Userland/Applications/CMakeLists.txt index 56b7e0ba85..c89932e292 100644 --- a/Userland/Applications/CMakeLists.txt +++ b/Userland/Applications/CMakeLists.txt @@ -17,7 +17,6 @@ add_subdirectory(Piano) add_subdirectory(PixelPaint) add_subdirectory(QuickShow) add_subdirectory(Run) -add_subdirectory(Serendipity) add_subdirectory(SoundPlayer) add_subdirectory(SpaceAnalyzer) add_subdirectory(Spreadsheet) @@ -25,3 +24,4 @@ add_subdirectory(SystemMonitor) add_subdirectory(ThemeEditor) add_subdirectory(Terminal) add_subdirectory(TextEditor) +add_subdirectory(Welcome) diff --git a/Userland/Applications/Serendipity/CMakeLists.txt b/Userland/Applications/Serendipity/CMakeLists.txt deleted file mode 100644 index 62df8900a0..0000000000 --- a/Userland/Applications/Serendipity/CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ -compile_gml(SerendipityWindow.gml SerendipityWindowGML.h serendipity_window_gml) - -set(SOURCES - SerendipityWindowGML.h - SerendipityWidget.cpp - SerendipityWidget.h - main.cpp -) - -serenity_app(Serendipity ICON app-serendipity) -target_link_libraries(Serendipity LibGUI LibWeb) diff --git a/Userland/Applications/Welcome/CMakeLists.txt b/Userland/Applications/Welcome/CMakeLists.txt new file mode 100644 index 0000000000..8adb2729bf --- /dev/null +++ b/Userland/Applications/Welcome/CMakeLists.txt @@ -0,0 +1,11 @@ +compile_gml(WelcomeWindow.gml WelcomeWindowGML.h welcome_window_gml) + +set(SOURCES + WelcomeWindowGML.h + WelcomeWidget.cpp + WelcomeWidget.h + main.cpp +) + +serenity_app(Welcome ICON app-welcome) +target_link_libraries(Welcome LibGUI LibWeb) diff --git a/Userland/Applications/Serendipity/SerendipityWidget.cpp b/Userland/Applications/Welcome/WelcomeWidget.cpp similarity index 92% rename from Userland/Applications/Serendipity/SerendipityWidget.cpp rename to Userland/Applications/Welcome/WelcomeWidget.cpp index 27ff445b3b..f3868e9c1f 100644 --- a/Userland/Applications/Serendipity/SerendipityWidget.cpp +++ b/Userland/Applications/Welcome/WelcomeWidget.cpp @@ -24,12 +24,11 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "SerendipityWidget.h" -#include +#include "WelcomeWidget.h" +#include #include #include #include -#include #include #include #include @@ -40,16 +39,16 @@ #include #include -SerendipityWidget::SerendipityWidget() +WelcomeWidget::WelcomeWidget() { - load_from_gml(serendipity_window_gml); + load_from_gml(tips_window_gml); auto& tip_frame = *find_descendant_of_type_named("tip_frame"); tip_frame.set_background_role(Gfx::ColorRole::Base); tip_frame.set_fill_with_background_color(true); auto& light_bulb_label = *find_descendant_of_type_named("light_bulb_label"); - light_bulb_label.set_icon(Gfx::Bitmap::load_from_file("/res/icons/32x32/app-serendipity.png")); + light_bulb_label.set_icon(Gfx::Bitmap::load_from_file("/res/icons/32x32/app-welcome.png")); m_web_view = *find_descendant_of_type_named("web_view"); @@ -100,11 +99,11 @@ SerendipityWidget::SerendipityWidget() set_random_tip(); } -SerendipityWidget::~SerendipityWidget() +WelcomeWidget::~WelcomeWidget() { } -void SerendipityWidget::open_and_parse_tips_file() +void WelcomeWidget::open_and_parse_tips_file() { auto file = Core::File::construct("/home/anon/Documents/tips.txt"); if (!file->open(Core::IODevice::ReadOnly)) { @@ -126,7 +125,7 @@ void SerendipityWidget::open_and_parse_tips_file() } } -void SerendipityWidget::open_and_parse_readme_file() +void WelcomeWidget::open_and_parse_readme_file() { auto file = Core::File::construct("/home/anon/README.md"); if (!file->open(Core::IODevice::ReadOnly)) @@ -139,7 +138,7 @@ void SerendipityWidget::open_and_parse_readme_file() } } -void SerendipityWidget::set_random_tip() +void WelcomeWidget::set_random_tip() { if (m_tips.is_empty()) return; @@ -152,7 +151,7 @@ void SerendipityWidget::set_random_tip() m_tip_label->set_text(m_tips[n]); } -void SerendipityWidget::paint_event(GUI::PaintEvent& event) +void WelcomeWidget::paint_event(GUI::PaintEvent& event) { GUI::Painter painter(*this); painter.add_clip_rect(event.rect()); diff --git a/Userland/Applications/Serendipity/SerendipityWidget.h b/Userland/Applications/Welcome/WelcomeWidget.h similarity index 92% rename from Userland/Applications/Serendipity/SerendipityWidget.h rename to Userland/Applications/Welcome/WelcomeWidget.h index ba70202ea7..ab5eb36009 100644 --- a/Userland/Applications/Serendipity/SerendipityWidget.h +++ b/Userland/Applications/Welcome/WelcomeWidget.h @@ -29,13 +29,14 @@ #include #include -class SerendipityWidget final : public GUI::Widget { - C_OBJECT(SerendipityWidget) +class WelcomeWidget final : public GUI::Widget { + C_OBJECT(WelcomeWidget); + public: - virtual ~SerendipityWidget() override; + virtual ~WelcomeWidget() override; private: - SerendipityWidget(); + WelcomeWidget(); virtual void paint_event(GUI::PaintEvent&) override; diff --git a/Userland/Applications/Serendipity/SerendipityWindow.gml b/Userland/Applications/Welcome/WelcomeWindow.gml similarity index 100% rename from Userland/Applications/Serendipity/SerendipityWindow.gml rename to Userland/Applications/Welcome/WelcomeWindow.gml diff --git a/Userland/Applications/Serendipity/main.cpp b/Userland/Applications/Welcome/main.cpp similarity index 94% rename from Userland/Applications/Serendipity/main.cpp rename to Userland/Applications/Welcome/main.cpp index db5c187575..f567ea62ee 100644 --- a/Userland/Applications/Serendipity/main.cpp +++ b/Userland/Applications/Welcome/main.cpp @@ -24,7 +24,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "SerendipityWidget.h" +#include "WelcomeWidget.h" #include #include #include @@ -69,7 +69,7 @@ int main(int argc, char** argv) return 1; } - auto app_icon = GUI::Icon::default_icon("app-serendipity"); + auto app_icon = GUI::Icon::default_icon("app-welcome"); auto window = GUI::Window::construct(); window->resize(480, 250); @@ -78,7 +78,7 @@ int main(int argc, char** argv) window->set_title("Welcome"); window->set_minimum_size(480, 250); window->set_icon(app_icon.bitmap_for_size(16)); - window->set_main_widget(); + window->set_main_widget(); window->show();