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
This commit is contained in:
Arda Cinar 2022-11-22 09:39:25 +03:00 committed by Andreas Kling
parent 9f571e0dae
commit 7456a84e68
Notes: sideshowbarker 2024-07-17 06:24:08 +09:00
5 changed files with 11 additions and 11 deletions

View file

@ -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;
}

View file

@ -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;

View file

@ -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;

View file

@ -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

View file

@ -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);