diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-02-22 10:42:29 +0100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-02-22 10:42:29 +0100 |
commit | afa6f88039b7466151d56650c528dc95009c14aa (patch) | |
tree | acd15687e8cf0b0440f3ede14f2911df67d23261 | |
parent | aaa11e3c2506ea2d5c99521d3d8275a06b0eb5b2 (diff) | |
download | serenity-afa6f88039b7466151d56650c528dc95009c14aa.zip |
Throw away the Clock app since we now have a clock in the menubar. :^)
-rw-r--r-- | Applications/Clock/.gitignore | 3 | ||||
-rw-r--r-- | Applications/Clock/ClockWidget.cpp | 37 | ||||
-rw-r--r-- | Applications/Clock/ClockWidget.h | 16 | ||||
-rw-r--r-- | Applications/Clock/Makefile | 35 | ||||
-rw-r--r-- | Applications/Clock/main.cpp | 22 | ||||
-rwxr-xr-x | Kernel/makeuserland.sh | 22 | ||||
-rwxr-xr-x | Kernel/mkf.sh | 8 | ||||
-rwxr-xr-x | Kernel/sync.sh | 1 |
8 files changed, 0 insertions, 144 deletions
diff --git a/Applications/Clock/.gitignore b/Applications/Clock/.gitignore deleted file mode 100644 index 6710497633..0000000000 --- a/Applications/Clock/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.o -*.d -Clock diff --git a/Applications/Clock/ClockWidget.cpp b/Applications/Clock/ClockWidget.cpp deleted file mode 100644 index 97001edbb5..0000000000 --- a/Applications/Clock/ClockWidget.cpp +++ /dev/null @@ -1,37 +0,0 @@ -#include <stdio.h> -#include <time.h> -#include <SharedGraphics/Painter.h> -#include "ClockWidget.h" - -ClockWidget::ClockWidget(GWidget* parent) - : GWidget(parent) -{ - set_relative_rect({ 0, 0, 100, 40 }); - start_timer(300); -} - -ClockWidget::~ClockWidget() -{ -} - -void ClockWidget::paint_event(GPaintEvent&) -{ - auto now = time(nullptr); - auto& tm = *localtime(&now); - - char timeBuf[128]; - sprintf(timeBuf, "%02u:%02u:%02u", tm.tm_hour, tm.tm_min, tm.tm_sec); - - Painter painter(*this); - painter.fill_rect(rect(), Color::LightGray); - painter.draw_text(rect(), timeBuf, TextAlignment::Center, Color::Black); -} - -void ClockWidget::timer_event(GTimerEvent&) -{ - auto now = time(nullptr); - if (now == m_last_time) - return; - m_last_time = now; - update(); -} diff --git a/Applications/Clock/ClockWidget.h b/Applications/Clock/ClockWidget.h deleted file mode 100644 index d9702a575f..0000000000 --- a/Applications/Clock/ClockWidget.h +++ /dev/null @@ -1,16 +0,0 @@ -#pragma once - -#include <LibGUI/GWidget.h> - -class ClockWidget final : public GWidget { -public: - explicit ClockWidget(GWidget* parent = nullptr); - virtual ~ClockWidget() override; - -private: - virtual void paint_event(GPaintEvent&) override; - virtual void timer_event(GTimerEvent&) override; - - time_t m_last_time { 0 }; -}; - diff --git a/Applications/Clock/Makefile b/Applications/Clock/Makefile deleted file mode 100644 index 8e12d768c9..0000000000 --- a/Applications/Clock/Makefile +++ /dev/null @@ -1,35 +0,0 @@ -OBJS = \ - ClockWidget.o \ - main.o - -APP = Clock - -ARCH_FLAGS = -STANDARD_FLAGS = -std=c++17 -nostdinc++ -nostdlib -nostdinc -USERLAND_FLAGS = -ffreestanding -fno-stack-protector -WARNING_FLAGS = -Wextra -Wall -Wundef -Wcast-qual -Wwrite-strings -Wimplicit-fallthrough -FLAVOR_FLAGS = -march=i686 -m32 -fno-exceptions -fno-rtti -OPTIMIZATION_FLAGS = -Os -INCLUDE_FLAGS = -I../.. -I. -I../../LibC - -DEFINES = -DSERENITY -DSANITIZE_PTRS -DUSERLAND - -CXXFLAGS = -MMD -MP $(WARNING_FLAGS) $(OPTIMIZATION_FLAGS) $(USERLAND_FLAGS) $(FLAVOR_FLAGS) $(ARCH_FLAGS) $(STANDARD_FLAGS) $(INCLUDE_FLAGS) $(DEFINES) -CXX = clang -LD = ld -AR = ar -LDFLAGS = -static --strip-debug -melf_i386 -e _start --gc-sections - -all: $(APP) - -$(APP): $(OBJS) - $(LD) -o $(APP) $(LDFLAGS) $(OBJS) ../../LibGUI/LibGUI.a ../../LibC/LibC.a - -.cpp.o: - @echo "CXX $<"; $(CXX) $(CXXFLAGS) -o $@ -c $< - --include $(OBJS:%.o=%.d) - -clean: - @echo "CLEAN"; rm -f $(APPS) $(OBJS) *.d - diff --git a/Applications/Clock/main.cpp b/Applications/Clock/main.cpp deleted file mode 100644 index 49f25a892c..0000000000 --- a/Applications/Clock/main.cpp +++ /dev/null @@ -1,22 +0,0 @@ -#include <LibGUI/GApplication.h> -#include <LibGUI/GWindow.h> -#include "ClockWidget.h" - -int main(int argc, char** argv) -{ - GApplication app(argc, argv); - - auto* window = new GWindow; - window->set_title("Clock"); - window->set_rect({ 600, 100, 100, 40 }); - window->set_should_exit_app_on_close(true); - - auto* clock_widget = new ClockWidget; - clock_widget->set_relative_rect({ 0, 0, 100, 40 }); - window->set_main_widget(clock_widget); - - window->show(); - return app.exec(); -} - - diff --git a/Kernel/makeuserland.sh b/Kernel/makeuserland.sh deleted file mode 100755 index 7d030dccb7..0000000000 --- a/Kernel/makeuserland.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash - -sudo id - -make -C ../LibC clean && \ -make -C ../LibC && \ -make -C ../LibGUI clean && \ -make -C ../LibGUI && \ -make -C ../Applications/Terminal clean && \ -make -C ../Applications/Terminal && \ -make -C ../Applications/Clock clean && \ -make -C ../Applications/Clock && \ -make -C ../Applications/Launcher clean && \ -make -C ../Applications/Launcher && \ -make -C ../Applications/FileManager clean && \ -make -C ../Applications/FileManager && \ -make -C ../Applications/FontEditor clean && \ -make -C ../Applications/FontEditor && \ -make -C ../Userland clean && \ -make -C ../Userland && \ -sudo ./sync.sh - diff --git a/Kernel/mkf.sh b/Kernel/mkf.sh deleted file mode 100755 index 2303fd7158..0000000000 --- a/Kernel/mkf.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -sudo id - -make -C ../FontEditor clean && \ -make -C ../FontEditor && \ -sudo ./sync.sh - diff --git a/Kernel/sync.sh b/Kernel/sync.sh index f7e05744fc..c6373007e5 100755 --- a/Kernel/sync.sh +++ b/Kernel/sync.sh @@ -74,7 +74,6 @@ chmod 4755 mnt/bin/su cp -v ../Applications/Terminal/Terminal mnt/bin/Terminal cp -v ../Applications/FontEditor/FontEditor mnt/bin/FontEditor cp -v ../Applications/Launcher/Launcher mnt/bin/Launcher -cp -v ../Applications/Clock/Clock mnt/bin/Clock cp -v ../Applications/FileManager/FileManager mnt/bin/FileManager cp -v ../Applications/About/About mnt/bin/About cp -v ../WindowServer/WindowServer mnt/bin/WindowServer |