summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-04-04 17:55:50 +0200
committerAndreas Kling <kling@serenityos.org>2021-04-04 17:55:50 +0200
commit0069020e6c40be02416f9ee4333fc752172113ea (patch)
tree95a4bf03a6630439a5043b483c3c31209e8aafc0
parentdabfeb6dd80ec0cb053b9c087fe249c88b1a48c6 (diff)
downloadserenity-0069020e6c40be02416f9ee4333fc752172113ea.zip
WindowServer+LibGUI: Rename WindowType::MenuApplet => Applet
-rw-r--r--Userland/Applets/Audio/main.cpp2
-rw-r--r--Userland/Applets/ClipboardHistory/main.cpp2
-rw-r--r--Userland/Applets/Network/main.cpp2
-rw-r--r--Userland/Applets/ResourceGraph/main.cpp2
-rw-r--r--Userland/Applets/UserName/main.cpp2
-rw-r--r--Userland/Libraries/LibGUI/Widget.cpp2
-rw-r--r--Userland/Libraries/LibGUI/Window.cpp2
-rw-r--r--Userland/Libraries/LibJS/Runtime/Date.h2
-rw-r--r--Userland/Services/WindowServer/ClientConnection.cpp6
-rw-r--r--Userland/Services/WindowServer/Window.cpp2
-rw-r--r--Userland/Services/WindowServer/Window.h2
-rw-r--r--Userland/Services/WindowServer/WindowManager.cpp6
-rw-r--r--Userland/Services/WindowServer/WindowType.h2
13 files changed, 17 insertions, 17 deletions
diff --git a/Userland/Applets/Audio/main.cpp b/Userland/Applets/Audio/main.cpp
index 414f40bef2..2f17f2eb49 100644
--- a/Userland/Applets/Audio/main.cpp
+++ b/Userland/Applets/Audio/main.cpp
@@ -230,7 +230,7 @@ int main(int argc, char** argv)
auto window = GUI::Window::construct();
window->set_has_alpha_channel(true);
window->set_title("Audio");
- window->set_window_type(GUI::WindowType::MenuApplet);
+ window->set_window_type(GUI::WindowType::Applet);
window->resize(16, 16);
window->set_main_widget<AudioWidget>();
diff --git a/Userland/Applets/ClipboardHistory/main.cpp b/Userland/Applets/ClipboardHistory/main.cpp
index de27815b95..82eac5c584 100644
--- a/Userland/Applets/ClipboardHistory/main.cpp
+++ b/Userland/Applets/ClipboardHistory/main.cpp
@@ -92,7 +92,7 @@ int main(int argc, char* argv[])
auto applet_window = GUI::Window::construct();
applet_window->set_title("ClipboardHistory");
- applet_window->set_window_type(GUI::WindowType::MenuApplet);
+ applet_window->set_window_type(GUI::WindowType::Applet);
auto& icon = applet_window->set_main_widget<GUI::ImageWidget>();
icon.load_from_file("/res/icons/16x16/edit-copy.png");
icon.set_fill_with_background_color(true);
diff --git a/Userland/Applets/Network/main.cpp b/Userland/Applets/Network/main.cpp
index f250b3170e..0d6815ea61 100644
--- a/Userland/Applets/Network/main.cpp
+++ b/Userland/Applets/Network/main.cpp
@@ -218,7 +218,7 @@ int main(int argc, char* argv[])
auto window = GUI::Window::construct();
window->set_title(name);
- window->set_window_type(GUI::WindowType::MenuApplet);
+ window->set_window_type(GUI::WindowType::Applet);
window->resize(16, 16);
auto& icon = window->set_main_widget<NetworkWidget>(display_notifications);
icon.set_fill_with_background_color(true);
diff --git a/Userland/Applets/ResourceGraph/main.cpp b/Userland/Applets/ResourceGraph/main.cpp
index 94166da964..2983aaad37 100644
--- a/Userland/Applets/ResourceGraph/main.cpp
+++ b/Userland/Applets/ResourceGraph/main.cpp
@@ -253,7 +253,7 @@ int main(int argc, char** argv)
auto window = GUI::Window::construct();
window->set_title(name);
- window->set_window_type(GUI::WindowType::MenuApplet);
+ window->set_window_type(GUI::WindowType::Applet);
window->resize(GraphWidget::history_size + 2, 15);
window->set_main_widget<GraphWidget>(graph_type, graph_color, graph_error_color);
diff --git a/Userland/Applets/UserName/main.cpp b/Userland/Applets/UserName/main.cpp
index 138d2bbc92..e24aea8f33 100644
--- a/Userland/Applets/UserName/main.cpp
+++ b/Userland/Applets/UserName/main.cpp
@@ -91,7 +91,7 @@ int main(int argc, char** argv)
auto window = GUI::Window::construct();
window->set_title("UserName");
- window->set_window_type(GUI::WindowType::MenuApplet);
+ window->set_window_type(GUI::WindowType::Applet);
auto& widget = window->set_main_widget<UserNameWidget>();
window->resize(widget.get_width(), 16);
diff --git a/Userland/Libraries/LibGUI/Widget.cpp b/Userland/Libraries/LibGUI/Widget.cpp
index 2097d828ef..e201fb7f3b 100644
--- a/Userland/Libraries/LibGUI/Widget.cpp
+++ b/Userland/Libraries/LibGUI/Widget.cpp
@@ -602,7 +602,7 @@ Gfx::IntRect Widget::window_relative_rect() const
Gfx::IntRect Widget::screen_relative_rect() const
{
- auto window_position = window()->window_type() == WindowType::MenuApplet
+ auto window_position = window()->window_type() == WindowType::Applet
? window()->applet_rect_on_screen().location()
: window()->rect().location();
return window_relative_rect().translated(window_position);
diff --git a/Userland/Libraries/LibGUI/Window.cpp b/Userland/Libraries/LibGUI/Window.cpp
index a67effb791..b05c03ad36 100644
--- a/Userland/Libraries/LibGUI/Window.cpp
+++ b/Userland/Libraries/LibGUI/Window.cpp
@@ -237,7 +237,7 @@ String Window::title() const
Gfx::IntRect Window::applet_rect_on_screen() const
{
- VERIFY(m_window_type == WindowType::MenuApplet);
+ VERIFY(m_window_type == WindowType::Applet);
return WindowServerConnection::the().send_sync<Messages::WindowServer::GetAppletRectOnScreen>(m_window_id)->rect();
}
diff --git a/Userland/Libraries/LibJS/Runtime/Date.h b/Userland/Libraries/LibJS/Runtime/Date.h
index ffc68faa75..1b2b0c3abc 100644
--- a/Userland/Libraries/LibJS/Runtime/Date.h
+++ b/Userland/Libraries/LibJS/Runtime/Date.h
@@ -85,7 +85,7 @@ public:
String gmt_date_string() const;
String iso_date_string() const;
- // FIXME: One day, implement real locale support. Until then, everyone gets what the Clock MenuApplet displays.
+ // FIXME: One day, implement real locale support. Until then, everyone gets what the Clock Applet displays.
String locale_date_string() const { return m_datetime.to_string("%Y-%m-%d"); }
String locale_string() const { return m_datetime.to_string(); }
String locale_time_string() const { return m_datetime.to_string("%H:%M:%S"); }
diff --git a/Userland/Services/WindowServer/ClientConnection.cpp b/Userland/Services/WindowServer/ClientConnection.cpp
index c49f8ad26d..19a758e081 100644
--- a/Userland/Services/WindowServer/ClientConnection.cpp
+++ b/Userland/Services/WindowServer/ClientConnection.cpp
@@ -84,7 +84,7 @@ ClientConnection::~ClientConnection()
auto windows = move(m_windows);
for (auto& window : windows) {
window.value->detach_client({});
- if (window.value->type() == WindowType::MenuApplet)
+ if (window.value->type() == WindowType::Applet)
AppletManager::the().remove_applet(window.value);
}
}
@@ -539,7 +539,7 @@ OwnPtr<Messages::WindowServer::CreateWindowResponse> ClientConnection::handle(co
window->set_base_size(message.base_size());
window->set_resize_aspect_ratio(message.resize_aspect_ratio());
window->invalidate(true, true);
- if (window->type() == WindowType::MenuApplet)
+ if (window->type() == WindowType::Applet)
AppletManager::the().add_applet(*window);
m_windows.set(window_id, move(window));
return make<Messages::WindowServer::CreateWindowResponse>(window_id);
@@ -563,7 +563,7 @@ void ClientConnection::destroy_window(Window& window, Vector<i32>& destroyed_win
destroyed_window_ids.append(window.window_id());
- if (window.type() == WindowType::MenuApplet)
+ if (window.type() == WindowType::Applet)
AppletManager::the().remove_applet(window);
window.destroy();
diff --git a/Userland/Services/WindowServer/Window.cpp b/Userland/Services/WindowServer/Window.cpp
index 371aa477ef..e0ce5afa1d 100644
--- a/Userland/Services/WindowServer/Window.cpp
+++ b/Userland/Services/WindowServer/Window.cpp
@@ -529,7 +529,7 @@ void Window::invalidate(bool invalidate_frame, bool re_render_frame)
void Window::invalidate(const Gfx::IntRect& rect, bool with_frame)
{
- if (type() == WindowType::MenuApplet) {
+ if (type() == WindowType::Applet) {
AppletManager::the().invalidate_applet(*this, rect);
return;
}
diff --git a/Userland/Services/WindowServer/Window.h b/Userland/Services/WindowServer/Window.h
index 69553cb5af..ed8677cc8a 100644
--- a/Userland/Services/WindowServer/Window.h
+++ b/Userland/Services/WindowServer/Window.h
@@ -206,7 +206,7 @@ public:
void clear_dirty_rects();
Gfx::DisjointRectSet& dirty_rects() { return m_dirty_rects; }
- // Only used by WindowType::MenuApplet. Perhaps it could be a Window subclass? I don't know.
+ // Only used by WindowType::Applet. Perhaps it could be a Window subclass? I don't know.
void set_rect_in_applet_area(const Gfx::IntRect& rect) { m_rect_in_applet_area = rect; }
const Gfx::IntRect& rect_in_applet_area() const { return m_rect_in_applet_area; }
diff --git a/Userland/Services/WindowServer/WindowManager.cpp b/Userland/Services/WindowServer/WindowManager.cpp
index 6af3600a33..bdc4a1478d 100644
--- a/Userland/Services/WindowServer/WindowManager.cpp
+++ b/Userland/Services/WindowServer/WindowManager.cpp
@@ -404,7 +404,7 @@ void WindowManager::notify_rect_changed(Window& window, const Gfx::IntRect& old_
tell_wm_listeners_window_rect_changed(window);
- if (window.type() == WindowType::MenuApplet)
+ if (window.type() == WindowType::Applet)
AppletManager::the().relayout();
MenuManager::the().refresh();
@@ -953,7 +953,7 @@ void WindowManager::process_mouse_event(MouseEvent& event, Window*& hovered_wind
if (MenuManager::the().has_open_menu()
|| hitting_menu_in_window_with_active_menu) {
- for_each_visible_window_of_type_from_front_to_back(WindowType::MenuApplet, [&](auto& window) {
+ for_each_visible_window_of_type_from_front_to_back(WindowType::Applet, [&](auto& window) {
if (!window.rect_in_applet_area().contains(event.position()))
return IterationDecision::Continue;
hovered_window = &window;
@@ -1158,7 +1158,7 @@ Gfx::IntRect WindowManager::arena_rect_for_type(WindowType type) const
case WindowType::WindowSwitcher:
case WindowType::Taskbar:
case WindowType::Tooltip:
- case WindowType::MenuApplet:
+ case WindowType::Applet:
case WindowType::Notification:
return Screen::the().rect();
default:
diff --git a/Userland/Services/WindowServer/WindowType.h b/Userland/Services/WindowServer/WindowType.h
index f561bbd8c0..2a9f3640ad 100644
--- a/Userland/Services/WindowServer/WindowType.h
+++ b/Userland/Services/WindowServer/WindowType.h
@@ -35,7 +35,7 @@ enum class WindowType {
WindowSwitcher,
Taskbar,
Tooltip,
- MenuApplet,
+ Applet,
Notification,
Desktop,
ToolWindow,