mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 08:17:45 +00:00
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:
parent
9f571e0dae
commit
7456a84e68
5 changed files with 11 additions and 11 deletions
|
@ -52,8 +52,8 @@ private:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
TaskbarWindow::TaskbarWindow(NonnullRefPtr<GUI::Menu> start_menu)
|
TaskbarWindow::TaskbarWindow(NonnullRefPtr<GUI::Menu> system_menu)
|
||||||
: m_start_menu(move(start_menu))
|
: m_system_menu(move(system_menu))
|
||||||
{
|
{
|
||||||
set_window_type(GUI::WindowType::Taskbar);
|
set_window_type(GUI::WindowType::Taskbar);
|
||||||
set_title("Taskbar");
|
set_title("Taskbar");
|
||||||
|
@ -69,7 +69,7 @@ TaskbarWindow::TaskbarWindow(NonnullRefPtr<GUI::Menu> start_menu)
|
||||||
m_start_button->set_icon_spacing(0);
|
m_start_button->set_icon_spacing(0);
|
||||||
auto app_icon = GUI::Icon::default_icon("ladyball"sv);
|
auto app_icon = GUI::Icon::default_icon("ladyball"sv);
|
||||||
m_start_button->set_icon(app_icon.bitmap_for_size(16));
|
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_child(*m_start_button);
|
||||||
main_widget.add<Taskbar::QuickLaunchWidget>();
|
main_widget.add<Taskbar::QuickLaunchWidget>();
|
||||||
|
@ -296,10 +296,10 @@ void TaskbarWindow::wm_event(GUI::WMEvent& event)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case GUI::Event::WM_SuperKeyPressed: {
|
case GUI::Event::WM_SuperKeyPressed: {
|
||||||
if (m_start_menu->is_visible()) {
|
if (m_system_menu->is_visible()) {
|
||||||
m_start_menu->dismiss();
|
m_system_menu->dismiss();
|
||||||
} else {
|
} 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;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,7 +28,7 @@ public:
|
||||||
virtual void config_string_did_change(String const&, String const&, String const&, String const&) override;
|
virtual void config_string_did_change(String const&, String const&, String const&, String const&) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
explicit TaskbarWindow(NonnullRefPtr<GUI::Menu> start_menu);
|
explicit TaskbarWindow(NonnullRefPtr<GUI::Menu> system_menu);
|
||||||
static void show_desktop_button_clicked(unsigned);
|
static void show_desktop_button_clicked(unsigned);
|
||||||
static void toggle_show_desktop();
|
static void toggle_show_desktop();
|
||||||
void set_quick_launch_button_data(GUI::Button&, String const&, NonnullRefPtr<Desktop::AppFile>);
|
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&);
|
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<GUI::Widget> m_task_button_container;
|
||||||
RefPtr<Gfx::Bitmap> m_default_icon;
|
RefPtr<Gfx::Bitmap> m_default_icon;
|
||||||
|
|
||||||
|
|
|
@ -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
|
// this click, and when we receive the MouseUp event check if
|
||||||
// it would have been considered a double click, if it weren't
|
// 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
|
// 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);
|
m_window.popup_window_menu(titlebar_rect().bottom_left().translated(rect().location()), WindowMenuDefaultAction::Close);
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -1084,7 +1084,7 @@ bool WindowManager::is_considered_doubleclick(MouseEvent const& event, DoubleCli
|
||||||
return false;
|
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
|
// This is a special case. Basically, we're trying to determine whether
|
||||||
// double clicking on the window menu icon happened. In this case, the
|
// double clicking on the window menu icon happened. In this case, the
|
||||||
|
|
|
@ -210,7 +210,7 @@ public:
|
||||||
|
|
||||||
void did_popup_a_menu(Badge<Menu>);
|
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;
|
bool is_menu_doubleclick(Window& window, MouseEvent const& event) const;
|
||||||
|
|
||||||
void minimize_windows(Window&, bool);
|
void minimize_windows(Window&, bool);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue