mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 12:17:44 +00:00
Applications: Rename Serendipity => Welcome
Let's stick to the theme of "the most obvious name possible"
This commit is contained in:
parent
ff312d8aa6
commit
9f4e37e342
10 changed files with 30 additions and 31 deletions
|
@ -25,7 +25,6 @@ alias pv=Profiler
|
||||||
alias ws=WebServer
|
alias ws=WebServer
|
||||||
alias sl=Solitaire
|
alias sl=Solitaire
|
||||||
alias ue=UserspaceEmulator
|
alias ue=UserspaceEmulator
|
||||||
alias welcome=Serendipity
|
|
||||||
|
|
||||||
alias rgrep="grep -r"
|
alias rgrep="grep -r"
|
||||||
alias egrep="grep -E"
|
alias egrep="grep -E"
|
||||||
|
|
Before Width: | Height: | Size: 229 B After Width: | Height: | Size: 229 B |
Before Width: | Height: | Size: 678 B After Width: | Height: | Size: 678 B |
|
@ -17,7 +17,6 @@ add_subdirectory(Piano)
|
||||||
add_subdirectory(PixelPaint)
|
add_subdirectory(PixelPaint)
|
||||||
add_subdirectory(QuickShow)
|
add_subdirectory(QuickShow)
|
||||||
add_subdirectory(Run)
|
add_subdirectory(Run)
|
||||||
add_subdirectory(Serendipity)
|
|
||||||
add_subdirectory(SoundPlayer)
|
add_subdirectory(SoundPlayer)
|
||||||
add_subdirectory(SpaceAnalyzer)
|
add_subdirectory(SpaceAnalyzer)
|
||||||
add_subdirectory(Spreadsheet)
|
add_subdirectory(Spreadsheet)
|
||||||
|
@ -25,3 +24,4 @@ add_subdirectory(SystemMonitor)
|
||||||
add_subdirectory(ThemeEditor)
|
add_subdirectory(ThemeEditor)
|
||||||
add_subdirectory(Terminal)
|
add_subdirectory(Terminal)
|
||||||
add_subdirectory(TextEditor)
|
add_subdirectory(TextEditor)
|
||||||
|
add_subdirectory(Welcome)
|
||||||
|
|
|
@ -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)
|
|
11
Userland/Applications/Welcome/CMakeLists.txt
Normal file
11
Userland/Applications/Welcome/CMakeLists.txt
Normal file
|
@ -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)
|
|
@ -24,12 +24,11 @@
|
||||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "SerendipityWidget.h"
|
#include "WelcomeWidget.h"
|
||||||
#include <Applications/Serendipity/SerendipityWindowGML.h>
|
#include <Applications/Tips/TipsWindowGML.h>
|
||||||
#include <LibCore/File.h>
|
#include <LibCore/File.h>
|
||||||
#include <LibGUI/Application.h>
|
#include <LibGUI/Application.h>
|
||||||
#include <LibGUI/Button.h>
|
#include <LibGUI/Button.h>
|
||||||
#include <LibGUI/CheckBox.h>
|
|
||||||
#include <LibGUI/Label.h>
|
#include <LibGUI/Label.h>
|
||||||
#include <LibGUI/Painter.h>
|
#include <LibGUI/Painter.h>
|
||||||
#include <LibGfx/BitmapFont.h>
|
#include <LibGfx/BitmapFont.h>
|
||||||
|
@ -40,16 +39,16 @@
|
||||||
#include <spawn.h>
|
#include <spawn.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
SerendipityWidget::SerendipityWidget()
|
WelcomeWidget::WelcomeWidget()
|
||||||
{
|
{
|
||||||
load_from_gml(serendipity_window_gml);
|
load_from_gml(tips_window_gml);
|
||||||
|
|
||||||
auto& tip_frame = *find_descendant_of_type_named<GUI::Frame>("tip_frame");
|
auto& tip_frame = *find_descendant_of_type_named<GUI::Frame>("tip_frame");
|
||||||
tip_frame.set_background_role(Gfx::ColorRole::Base);
|
tip_frame.set_background_role(Gfx::ColorRole::Base);
|
||||||
tip_frame.set_fill_with_background_color(true);
|
tip_frame.set_fill_with_background_color(true);
|
||||||
|
|
||||||
auto& light_bulb_label = *find_descendant_of_type_named<GUI::Label>("light_bulb_label");
|
auto& light_bulb_label = *find_descendant_of_type_named<GUI::Label>("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::OutOfProcessWebView>("web_view");
|
m_web_view = *find_descendant_of_type_named<Web::OutOfProcessWebView>("web_view");
|
||||||
|
|
||||||
|
@ -100,11 +99,11 @@ SerendipityWidget::SerendipityWidget()
|
||||||
set_random_tip();
|
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");
|
auto file = Core::File::construct("/home/anon/Documents/tips.txt");
|
||||||
if (!file->open(Core::IODevice::ReadOnly)) {
|
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");
|
auto file = Core::File::construct("/home/anon/README.md");
|
||||||
if (!file->open(Core::IODevice::ReadOnly))
|
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())
|
if (m_tips.is_empty())
|
||||||
return;
|
return;
|
||||||
|
@ -152,7 +151,7 @@ void SerendipityWidget::set_random_tip()
|
||||||
m_tip_label->set_text(m_tips[n]);
|
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);
|
GUI::Painter painter(*this);
|
||||||
painter.add_clip_rect(event.rect());
|
painter.add_clip_rect(event.rect());
|
|
@ -29,13 +29,14 @@
|
||||||
#include <LibGUI/Widget.h>
|
#include <LibGUI/Widget.h>
|
||||||
#include <LibWeb/OutOfProcessWebView.h>
|
#include <LibWeb/OutOfProcessWebView.h>
|
||||||
|
|
||||||
class SerendipityWidget final : public GUI::Widget {
|
class WelcomeWidget final : public GUI::Widget {
|
||||||
C_OBJECT(SerendipityWidget)
|
C_OBJECT(WelcomeWidget);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual ~SerendipityWidget() override;
|
virtual ~WelcomeWidget() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
SerendipityWidget();
|
WelcomeWidget();
|
||||||
|
|
||||||
virtual void paint_event(GUI::PaintEvent&) override;
|
virtual void paint_event(GUI::PaintEvent&) override;
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "SerendipityWidget.h"
|
#include "WelcomeWidget.h"
|
||||||
#include <LibGUI/Application.h>
|
#include <LibGUI/Application.h>
|
||||||
#include <LibGUI/Icon.h>
|
#include <LibGUI/Icon.h>
|
||||||
#include <LibGUI/Window.h>
|
#include <LibGUI/Window.h>
|
||||||
|
@ -69,7 +69,7 @@ int main(int argc, char** argv)
|
||||||
return 1;
|
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();
|
auto window = GUI::Window::construct();
|
||||||
window->resize(480, 250);
|
window->resize(480, 250);
|
||||||
|
@ -78,7 +78,7 @@ int main(int argc, char** argv)
|
||||||
window->set_title("Welcome");
|
window->set_title("Welcome");
|
||||||
window->set_minimum_size(480, 250);
|
window->set_minimum_size(480, 250);
|
||||||
window->set_icon(app_icon.bitmap_for_size(16));
|
window->set_icon(app_icon.bitmap_for_size(16));
|
||||||
window->set_main_widget<SerendipityWidget>();
|
window->set_main_widget<WelcomeWidget>();
|
||||||
|
|
||||||
window->show();
|
window->show();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue