summaryrefslogtreecommitdiff
path: root/Userland/Services
diff options
context:
space:
mode:
authorArda Cinar <kuzux92@gmail.com>2022-11-22 09:39:25 +0300
committerAndreas Kling <kling@serenityos.org>2022-11-26 09:51:11 +0100
commit7456a84e688909a40c009f73bfc0d3305e5f0a30 (patch)
tree9b57f4d155d78d18e2097c6a12638877b20d0257 /Userland/Services
parent9f571e0dae0b98cd4b365a88a8bc03295645f045 (diff)
downloadserenity-7456a84e688909a40c009f73bfc0d3305e5f0a30.zip
Taskbar: Rename start_menu to system_menu
The main menu in GUI (the one in the lower left side of screen by default) was called start_menu in some parts of the code and system_menu in others. In the documentation, it was referred to as "system menu". So, in order to be consistent, these variables are all renamed to system_menu
Diffstat (limited to 'Userland/Services')
-rw-r--r--Userland/Services/Taskbar/TaskbarWindow.cpp12
-rw-r--r--Userland/Services/Taskbar/TaskbarWindow.h4
-rw-r--r--Userland/Services/WindowServer/WindowFrame.cpp2
-rw-r--r--Userland/Services/WindowServer/WindowManager.cpp2
-rw-r--r--Userland/Services/WindowServer/WindowManager.h2
5 files changed, 11 insertions, 11 deletions
diff --git a/Userland/Services/Taskbar/TaskbarWindow.cpp b/Userland/Services/Taskbar/TaskbarWindow.cpp
index 851ba3889c..7b5d52378d 100644
--- a/Userland/Services/Taskbar/TaskbarWindow.cpp
+++ b/Userland/Services/Taskbar/TaskbarWindow.cpp
@@ -52,8 +52,8 @@ private:
}
};
-TaskbarWindow::TaskbarWindow(NonnullRefPtr<GUI::Menu> start_menu)
- : m_start_menu(move(start_menu))
+TaskbarWindow::TaskbarWindow(NonnullRefPtr<GUI::Menu> system_menu)
+ : m_system_menu(move(system_menu))
{
set_window_type(GUI::WindowType::Taskbar);
set_title("Taskbar");
@@ -69,7 +69,7 @@ TaskbarWindow::TaskbarWindow(NonnullRefPtr<GUI::Menu> start_menu)
m_start_button->set_icon_spacing(0);
auto app_icon = GUI::Icon::default_icon("ladyball"sv);
m_start_button->set_icon(app_icon.bitmap_for_size(16));
- m_start_button->set_menu(m_start_menu);
+ m_start_button->set_menu(m_system_menu);
main_widget.add_child(*m_start_button);
main_widget.add<Taskbar::QuickLaunchWidget>();
@@ -296,10 +296,10 @@ void TaskbarWindow::wm_event(GUI::WMEvent& event)
break;
}
case GUI::Event::WM_SuperKeyPressed: {
- if (m_start_menu->is_visible()) {
- m_start_menu->dismiss();
+ if (m_system_menu->is_visible()) {
+ m_system_menu->dismiss();
} else {
- m_start_menu->popup(m_start_button->screen_relative_rect().top_left());
+ m_system_menu->popup(m_start_button->screen_relative_rect().top_left());
}
break;
}
diff --git a/Userland/Services/Taskbar/TaskbarWindow.h b/Userland/Services/Taskbar/TaskbarWindow.h
index 10c0a2fa47..0e62403c61 100644
--- a/Userland/Services/Taskbar/TaskbarWindow.h
+++ b/Userland/Services/Taskbar/TaskbarWindow.h
@@ -28,7 +28,7 @@ public:
virtual void config_string_did_change(String const&, String const&, String const&, String const&) override;
private:
- explicit TaskbarWindow(NonnullRefPtr<GUI::Menu> start_menu);
+ explicit TaskbarWindow(NonnullRefPtr<GUI::Menu> system_menu);
static void show_desktop_button_clicked(unsigned);
static void toggle_show_desktop();
void set_quick_launch_button_data(GUI::Button&, String const&, NonnullRefPtr<Desktop::AppFile>);
@@ -49,7 +49,7 @@ private:
void set_start_button_font(Gfx::Font const&);
- NonnullRefPtr<GUI::Menu> m_start_menu;
+ NonnullRefPtr<GUI::Menu> m_system_menu;
RefPtr<GUI::Widget> m_task_button_container;
RefPtr<Gfx::Bitmap> m_default_icon;
diff --git a/Userland/Services/WindowServer/WindowFrame.cpp b/Userland/Services/WindowServer/WindowFrame.cpp
index 8ea1f4be6c..7a20a78b0d 100644
--- a/Userland/Services/WindowServer/WindowFrame.cpp
+++ b/Userland/Services/WindowServer/WindowFrame.cpp
@@ -767,7 +767,7 @@ bool WindowFrame::handle_titlebar_icon_mouse_event(MouseEvent const& event)
// this click, and when we receive the MouseUp event check if
// it would have been considered a double click, if it weren't
// for the fact that we opened and closed a window in the meanwhile
- wm.start_menu_doubleclick(m_window, event);
+ wm.system_menu_doubleclick(m_window, event);
m_window.popup_window_menu(titlebar_rect().bottom_left().translated(rect().location()), WindowMenuDefaultAction::Close);
return true;
diff --git a/Userland/Services/WindowServer/WindowManager.cpp b/Userland/Services/WindowServer/WindowManager.cpp
index bae6c6c10a..5175c35e72 100644
--- a/Userland/Services/WindowServer/WindowManager.cpp
+++ b/Userland/Services/WindowServer/WindowManager.cpp
@@ -1084,7 +1084,7 @@ bool WindowManager::is_considered_doubleclick(MouseEvent const& event, DoubleCli
return false;
}
-void WindowManager::start_menu_doubleclick(Window& window, MouseEvent const& event)
+void WindowManager::system_menu_doubleclick(Window& window, MouseEvent const& event)
{
// This is a special case. Basically, we're trying to determine whether
// double clicking on the window menu icon happened. In this case, the
diff --git a/Userland/Services/WindowServer/WindowManager.h b/Userland/Services/WindowServer/WindowManager.h
index efad2a6529..feb4e10e00 100644
--- a/Userland/Services/WindowServer/WindowManager.h
+++ b/Userland/Services/WindowServer/WindowManager.h
@@ -210,7 +210,7 @@ public:
void did_popup_a_menu(Badge<Menu>);
- void start_menu_doubleclick(Window& window, MouseEvent const& event);
+ void system_menu_doubleclick(Window& window, MouseEvent const& event);
bool is_menu_doubleclick(Window& window, MouseEvent const& event) const;
void minimize_windows(Window&, bool);