summaryrefslogtreecommitdiff
path: root/Userland/Applications
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-04-10 16:11:48 +0200
committerAndreas Kling <kling@serenityos.org>2021-04-10 16:11:48 +0200
commit6f5f9e6567da2c5c170e6d5049324cf902cfdbc5 (patch)
treeb5af2a485b86fbc78ff616a60c05acbf2648ee1d /Userland/Applications
parent5d609e408ba2f863abadcbd9338fece0ac39e9d4 (diff)
downloadserenity-6f5f9e6567da2c5c170e6d5049324cf902cfdbc5.zip
Calendar: Alt shortcuts and book title capitalization in menus
Diffstat (limited to 'Userland/Applications')
-rw-r--r--Userland/Applications/Calendar/main.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/Userland/Applications/Calendar/main.cpp b/Userland/Applications/Calendar/main.cpp
index 2843b6de2b..08b645288b 100644
--- a/Userland/Applications/Calendar/main.cpp
+++ b/Userland/Applications/Calendar/main.cpp
@@ -104,22 +104,22 @@ int main(int argc, char** argv)
calendar->update_tiles(view_year, view_month);
});
- auto add_event_action = GUI::Action::create("Add event", {}, Gfx::Bitmap::load_from_file("/res/icons/16x16/add-event.png"), [&](const GUI::Action&) {
+ auto add_event_action = GUI::Action::create("&Add Event", {}, Gfx::Bitmap::load_from_file("/res/icons/16x16/add-event.png"), [&](const GUI::Action&) {
AddEventDialog::show(calendar->selected_date(), window);
});
- auto jump_to_action = GUI::Action::create("Jump to today", {}, Gfx::Bitmap::load_from_file("/res/icons/16x16/calendar-date.png"), [&](const GUI::Action&) {
+ auto jump_to_action = GUI::Action::create("Jump to &Today", {}, Gfx::Bitmap::load_from_file("/res/icons/16x16/calendar-date.png"), [&](const GUI::Action&) {
calendar->set_selected_date(Core::DateTime::now());
calendar->update_tiles(Core::DateTime::now().year(), Core::DateTime::now().month());
});
- auto view_month_action = GUI::Action::create_checkable("Month view", { Mod_Ctrl, KeyCode::Key_1 }, Gfx::Bitmap::load_from_file("/res/icons/16x16/calendar-month-view.png"), [&](const GUI::Action&) {
+ auto view_month_action = GUI::Action::create_checkable("&Month View", { Mod_Ctrl, KeyCode::Key_1 }, Gfx::Bitmap::load_from_file("/res/icons/16x16/calendar-month-view.png"), [&](const GUI::Action&) {
if (calendar->mode() == GUI::Calendar::Year)
calendar->toggle_mode();
});
view_month_action->set_checked(true);
- auto view_year_action = GUI::Action::create_checkable("Year view", { Mod_Ctrl, KeyCode::Key_2 }, Gfx::Bitmap::load_from_file("/res/icons/16x16/icon-view.png"), [&](const GUI::Action&) {
+ auto view_year_action = GUI::Action::create_checkable("&Year View", { Mod_Ctrl, KeyCode::Key_2 }, Gfx::Bitmap::load_from_file("/res/icons/16x16/icon-view.png"), [&](const GUI::Action&) {
if (calendar->mode() == GUI::Calendar::Month)
calendar->toggle_mode();
});
@@ -147,8 +147,8 @@ int main(int argc, char** argv)
};
auto menubar = GUI::MenuBar::construct();
- auto& app_menu = menubar->add_menu("File");
- app_menu.add_action(GUI::Action::create("Add Event", { Mod_Ctrl | Mod_Shift, Key_E }, Gfx::Bitmap::load_from_file("/res/icons/16x16/add-event.png"),
+ auto& app_menu = menubar->add_menu("&File");
+ app_menu.add_action(GUI::Action::create("&Add Event", { Mod_Ctrl | Mod_Shift, Key_E }, Gfx::Bitmap::load_from_file("/res/icons/16x16/add-event.png"),
[&](const GUI::Action&) {
AddEventDialog::show(calendar->selected_date(), window);
return;
@@ -158,14 +158,13 @@ int main(int argc, char** argv)
app_menu.add_action(GUI::CommonActions::make_quit_action([](auto&) {
GUI::Application::the()->quit();
- return;
}));
- auto& view_menu = menubar->add_menu("View");
+ auto& view_menu = menubar->add_menu("&View");
view_menu.add_action(*view_month_action);
view_menu.add_action(*view_year_action);
- auto& help_menu = menubar->add_menu("Help");
+ auto& help_menu = menubar->add_menu("&Help");
help_menu.add_action(GUI::CommonActions::make_about_action("Calendar", app_icon, window));
window->set_menubar(move(menubar));