Skip to content

Commit

Permalink
Create new shortcuts + new panel in settings (#205)
Browse files Browse the repository at this point in the history
  • Loading branch information
pakerwreah authored Jul 21, 2024
1 parent 2aa131f commit 82baf2f
Show file tree
Hide file tree
Showing 23 changed files with 590 additions and 96 deletions.
16 changes: 14 additions & 2 deletions Calendr.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
344A59DB29AEBBBF004F0452 /* EventUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 344A59DA29AEBBBF004F0452 /* EventUtils.swift */; };
3453E6FD28386A84002DCC3C /* Bool.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3453E6FC28386A84002DCC3C /* Bool.swift */; };
3453E6FF28393943002DCC3C /* ContextMenu.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3453E6FE28393943002DCC3C /* ContextMenu.swift */; };
345A34972C4DADD000AF0002 /* NSMenu.swift in Sources */ = {isa = PBXBuildFile; fileRef = 345A34962C4DADD000AF0002 /* NSMenu.swift */; };
345DD97326920D1B00294D90 /* CalendarViewPreview.swift in Sources */ = {isa = PBXBuildFile; fileRef = 345DD97226920D1B00294D90 /* CalendarViewPreview.swift */; };
345FBD99293EA476005DD6DF /* Keyboard.swift in Sources */ = {isa = PBXBuildFile; fileRef = 345FBD98293EA476005DD6DF /* Keyboard.swift */; };
34651F1525E1BB8400518C5A /* Strings.generated.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34651F1425E1BB8400518C5A /* Strings.generated.swift */; };
Expand Down Expand Up @@ -139,6 +140,8 @@
34D25E4A292F9E2100557E70 /* ImageButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34D25E49292F9E2100557E70 /* ImageButton.swift */; };
34D3655829402D5700849457 /* NSColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34D3655729402D5700849457 /* NSColor.swift */; };
34D55FE325F06669007F5C81 /* Sequence.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34D55FE225F06669007F5C81 /* Sequence.swift */; };
34D88DC82C4C66F80047D636 /* KeyboardViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34D88DC72C4C66F80047D636 /* KeyboardViewController.swift */; };
34D88DCA2C4C687B0047D636 /* SettingsUI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34D88DC92C4C687B0047D636 /* SettingsUI.swift */; };
34E004A725B61D5200241419 /* StatusItemViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34E004A625B61D5200241419 /* StatusItemViewModel.swift */; };
34E1902325B76CFE00E9491B /* CalendarPickerViewModelTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34E1902225B76CFE00E9491B /* CalendarPickerViewModelTests.swift */; };
34E259832B659B5600074D3A /* KeyboardShortcuts in Frameworks */ = {isa = PBXBuildFile; productRef = 34E259822B659B5600074D3A /* KeyboardShortcuts */; };
Expand Down Expand Up @@ -214,6 +217,7 @@
344A59DA29AEBBBF004F0452 /* EventUtils.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EventUtils.swift; sourceTree = "<group>"; };
3453E6FC28386A84002DCC3C /* Bool.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Bool.swift; sourceTree = "<group>"; };
3453E6FE28393943002DCC3C /* ContextMenu.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContextMenu.swift; sourceTree = "<group>"; };
345A34962C4DADD000AF0002 /* NSMenu.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NSMenu.swift; sourceTree = "<group>"; };
345DD97226920D1B00294D90 /* CalendarViewPreview.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CalendarViewPreview.swift; sourceTree = "<group>"; };
345FBD98293EA476005DD6DF /* Keyboard.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Keyboard.swift; sourceTree = "<group>"; };
34651EFB25E1B26800518C5A /* swiftgen.yml */ = {isa = PBXFileReference; lastKnownFileType = text.yaml; path = swiftgen.yml; sourceTree = "<group>"; };
Expand Down Expand Up @@ -321,6 +325,8 @@
34D3655729402D5700849457 /* NSColor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NSColor.swift; sourceTree = "<group>"; };
34D55FE225F06669007F5C81 /* Sequence.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Sequence.swift; sourceTree = "<group>"; };
34D88DC62C4C3D1A0047D636 /* sv */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = sv; path = sv.lproj/Localizable.strings; sourceTree = "<group>"; };
34D88DC72C4C66F80047D636 /* KeyboardViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KeyboardViewController.swift; sourceTree = "<group>"; };
34D88DC92C4C687B0047D636 /* SettingsUI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsUI.swift; sourceTree = "<group>"; };
34E004A625B61D5200241419 /* StatusItemViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StatusItemViewModel.swift; sourceTree = "<group>"; };
34E1902225B76CFE00E9491B /* CalendarPickerViewModelTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CalendarPickerViewModelTests.swift; sourceTree = "<group>"; };
34E60D6026A0D6D6004DA082 /* NSAccessibilityProtocol+Rx.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NSAccessibilityProtocol+Rx.swift"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -596,6 +602,7 @@
34D55FE225F06669007F5C81 /* Sequence.swift */,
34651F5925E2F08500518C5A /* String.swift */,
34F2F7352BB739A500666507 /* Range.swift */,
345A34962C4DADD000AF0002 /* NSMenu.swift */,
);
path = Extensions;
sourceTree = "<group>";
Expand Down Expand Up @@ -741,9 +748,11 @@
3449403125C348C70020E664 /* CalendarPickerViewController.swift */,
34B5A09C25B118EC00F7F7ED /* CalendarPickerViewModel.swift */,
3449402D25C348B20020E664 /* GeneralSettingsViewController.swift */,
34D88DC72C4C66F80047D636 /* KeyboardViewController.swift */,
34934CD528E69520009635D4 /* Prefs+UserDefaults.swift */,
34B5A09225B0CE6F00F7F7ED /* SettingsViewController.swift */,
348B8D0325B2925100E518FE /* SettingsViewModel.swift */,
34D88DC92C4C687B0047D636 /* SettingsUI.swift */,
);
path = Settings;
sourceTree = "<group>";
Expand Down Expand Up @@ -937,6 +946,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
345A34972C4DADD000AF0002 /* NSMenu.swift in Sources */,
347D0FDF259533C3002451EC /* CalendarView.swift in Sources */,
3421DA1F2693F12400056837 /* CalendarModel+Factory.swift in Sources */,
34B5A09D25B118EC00F7F7ED /* CalendarPickerViewModel.swift in Sources */,
Expand Down Expand Up @@ -1036,8 +1046,10 @@
34D3655829402D5700849457 /* NSColor.swift in Sources */,
34A591E42C175BBD00DE419D /* AppEditShortcuts.swift in Sources */,
3453E6FF28393943002DCC3C /* ContextMenu.swift in Sources */,
34D88DCA2C4C687B0047D636 /* SettingsUI.swift in Sources */,
34924CEE259FD064009C3450 /* DateFormatter.swift in Sources */,
3468E651284BD3D600B21EC8 /* EventLink.swift in Sources */,
34D88DC82C4C66F80047D636 /* KeyboardViewController.swift in Sources */,
34A591E62C175C0F00DE419D /* AppResignFocus.swift in Sources */,
3470214A259DFF3000827AE7 /* CalendarServiceProvider.swift in Sources */,
3408D13E25982DB400CF1425 /* DateSelector.swift in Sources */,
Expand Down Expand Up @@ -1296,7 +1308,7 @@
"$(inherited)",
"@executable_path/../Frameworks",
);
MARKETING_VERSION = 1.11.3;
MARKETING_VERSION = 1.11.4;
PRODUCT_BUNDLE_IDENTIFIER = br.paker.Calendr;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Calendr/Config/Calendr-Bridging-Header.h";
Expand All @@ -1322,7 +1334,7 @@
"$(inherited)",
"@executable_path/../Frameworks",
);
MARKETING_VERSION = 1.11.3;
MARKETING_VERSION = 1.11.4;
PRODUCT_BUNDLE_IDENTIFIER = br.paker.Calendr;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Calendr/Config/Calendr-Bridging-Header.h";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"originHash" : "7977df563fd34a0f681f62cd21147d02105dfc02903205b35488d05c20b8a357",
"pins" : [
{
"identity" : "keyboardshortcuts",
Expand All @@ -14,10 +15,10 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/ReactiveX/RxSwift",
"state" : {
"revision" : "9dcaa4b333db437b0fbfaf453fad29069044a8b4",
"version" : "6.6.0"
"revision" : "b06a8c8596e4c3e8e7788e08e720e3248563ce6a",
"version" : "6.7.1"
}
}
],
"version" : 2
"version" : 3
}
40 changes: 40 additions & 0 deletions Calendr/Assets/Generated/Strings.generated.swift
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,44 @@ internal enum Strings {
internal static let hide = Strings.tr("Localizable", "settings.events.finished.hide", fallback: "Hide")
}
}
internal enum Keyboard {
internal enum GlobalShortcuts {
/// Open calendar
internal static let openCalendar = Strings.tr("Localizable", "settings.keyboard.global_shortcuts.open_calendar", fallback: "Open calendar")
/// Open next event
internal static let openNextEvent = Strings.tr("Localizable", "settings.keyboard.global_shortcuts.open_next_event", fallback: "Open next event")
/// Next event options
internal static let openNextEventOptions = Strings.tr("Localizable", "settings.keyboard.global_shortcuts.open_next_event_options", fallback: "Next event options")
/// Open next reminder
internal static let openNextReminder = Strings.tr("Localizable", "settings.keyboard.global_shortcuts.open_next_reminder", fallback: "Open next reminder")
/// Next reminder options
internal static let openNextReminderOptions = Strings.tr("Localizable", "settings.keyboard.global_shortcuts.open_next_reminder_options", fallback: "Next reminder options")
/// Global shortcuts
internal static let title = Strings.tr("Localizable", "settings.keyboard.global_shortcuts.title", fallback: "Global shortcuts")
}
internal enum LocalShortcuts {
/// Current date
internal static let currDate = Strings.tr("Localizable", "settings.keyboard.local_shortcuts.curr_date", fallback: "Current date")
/// Next date
internal static let nextDate = Strings.tr("Localizable", "settings.keyboard.local_shortcuts.next_date", fallback: "Next date")
/// Next month
internal static let nextMonth = Strings.tr("Localizable", "settings.keyboard.local_shortcuts.next_month", fallback: "Next month")
/// Next week
internal static let nextWeek = Strings.tr("Localizable", "settings.keyboard.local_shortcuts.next_week", fallback: "Next week")
/// Open selected date
internal static let openDate = Strings.tr("Localizable", "settings.keyboard.local_shortcuts.open_date", fallback: "Open selected date")
/// Pin calendar
internal static let pinCalendar = Strings.tr("Localizable", "settings.keyboard.local_shortcuts.pin_calendar", fallback: "Pin calendar")
/// Previous date
internal static let prevDate = Strings.tr("Localizable", "settings.keyboard.local_shortcuts.prev_date", fallback: "Previous date")
/// Previous month
internal static let prevMonth = Strings.tr("Localizable", "settings.keyboard.local_shortcuts.prev_month", fallback: "Previous month")
/// Previous week
internal static let prevWeek = Strings.tr("Localizable", "settings.keyboard.local_shortcuts.prev_week", fallback: "Previous week")
/// Local shortcuts
internal static let title = Strings.tr("Localizable", "settings.keyboard.local_shortcuts.title", fallback: "Local shortcuts")
}
}
internal enum MenuBar {
/// Launch at login
internal static let autoLaunch = Strings.tr("Localizable", "settings.menu_bar.auto_launch", fallback: "Launch at login")
Expand Down Expand Up @@ -147,6 +185,8 @@ internal enum Strings {
internal static let calendars = Strings.tr("Localizable", "settings.tab.calendars", fallback: "Calendars")
/// General
internal static let general = Strings.tr("Localizable", "settings.tab.general", fallback: "General")
/// Shortcuts
internal static let keyboard = Strings.tr("Localizable", "settings.tab.keyboard", fallback: "Shortcuts")
}
}
}
Expand Down
1 change: 1 addition & 0 deletions Calendr/Assets/Icons.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ enum Icons {
enum Settings {
static let general = NSImage(systemName: "gear")
static let calendars = NSImage(systemName: "calendar.badge.plus")
static let keyboard = NSImage(systemName: "keyboard")
static let about = NSImage(systemName: "book")
static let tooltip = NSImage(systemName: "info.circle")
static let ruler = NSImage(systemName: "ruler")
Expand Down
19 changes: 19 additions & 0 deletions Calendr/Assets/cs.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"settings.title" = "Předvolby";
"settings.tab.general" = "Obecné";
"settings.tab.calendars" = "Kalendáře";
"settings.tab.keyboard" = "Zkratky";
"settings.tab.about" = "O aplikaci";

"settings.menu_bar" = "Řádek nabídek";
Expand Down Expand Up @@ -39,6 +40,24 @@

"settings.transparency" = "Průhlednost";

"settings.keyboard.local_shortcuts.title" = "Místní zkratky";
"settings.keyboard.local_shortcuts.prev_date" = "Předchozí datum";
"settings.keyboard.local_shortcuts.next_date" = "Následující datum";
"settings.keyboard.local_shortcuts.prev_week" = "Předchozí týden";
"settings.keyboard.local_shortcuts.next_week" = "Následující týden";
"settings.keyboard.local_shortcuts.prev_month" = "Předchozí měsíc";
"settings.keyboard.local_shortcuts.next_month" = "Následující měsíc";
"settings.keyboard.local_shortcuts.curr_date" = "Aktuální datum";
"settings.keyboard.local_shortcuts.open_date" = "Otevřít vybrané datum";
"settings.keyboard.local_shortcuts.pin_calendar" = "Připnout kalendář";

"settings.keyboard.global_shortcuts.title" = "Globální zkratky";
"settings.keyboard.global_shortcuts.open_calendar" = "Otevřít kalendář";
"settings.keyboard.global_shortcuts.open_next_event" = "Otevřít další událost";
"settings.keyboard.global_shortcuts.open_next_event_options" = "Možnosti další události";
"settings.keyboard.global_shortcuts.open_next_reminder" = "Otevřít další připomínku";
"settings.keyboard.global_shortcuts.open_next_reminder_options" = "Možnosti další připomínky";

"formatter.date.all_day" = "Celý den";
"formatter.date.today" = "Dnes";
"formatter.date.relative.in" = "za %@";
Expand Down
19 changes: 19 additions & 0 deletions Calendr/Assets/de.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"settings.title" = "Einstellungen";
"settings.tab.general" = "Allgemein";
"settings.tab.calendars" = "Kalender";
"settings.tab.keyboard" = "Verknüpfungen";
"settings.tab.about" = "Über";

"settings.menu_bar" = "Menüleiste";
Expand Down Expand Up @@ -39,6 +40,24 @@

"settings.transparency" = "Transparent";

"settings.keyboard.local_shortcuts.title" = "Lokale Tastenkombinationen";
"settings.keyboard.local_shortcuts.prev_date" = "Vorheriges Datum";
"settings.keyboard.local_shortcuts.next_date" = "Nächstes Datum";
"settings.keyboard.local_shortcuts.prev_week" = "Vorherige Woche";
"settings.keyboard.local_shortcuts.next_week" = "Nächste Woche";
"settings.keyboard.local_shortcuts.prev_month" = "Vorheriger Monat";
"settings.keyboard.local_shortcuts.next_month" = "Nächster Monat";
"settings.keyboard.local_shortcuts.curr_date" = "Aktuelles Datum";
"settings.keyboard.local_shortcuts.open_date" = "Ausgewähltes Datum öffnen";
"settings.keyboard.local_shortcuts.pin_calendar" = "Kalender anheften";

"settings.keyboard.global_shortcuts.title" = "Globale Tastenkombinationen";
"settings.keyboard.global_shortcuts.open_calendar" = "Kalender öffnen";
"settings.keyboard.global_shortcuts.open_next_event" = "Nächstes Ereignis öffnen";
"settings.keyboard.global_shortcuts.open_next_event_options" = "Optionen für nächstes Ereignis";
"settings.keyboard.global_shortcuts.open_next_reminder" = "Nächste Erinnerung öffnen";
"settings.keyboard.global_shortcuts.open_next_reminder_options" = "Optionen für nächste Erinnerung";

"formatter.date.all_day" = "Ganztägige Ereignisse";
"formatter.date.today" = "Heute";
"formatter.date.relative.in" = "in %@";
Expand Down
19 changes: 19 additions & 0 deletions Calendr/Assets/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"settings.title" = "Preferences";
"settings.tab.general" = "General";
"settings.tab.calendars" = "Calendars";
"settings.tab.keyboard" = "Shortcuts";
"settings.tab.about" = "About";

"settings.menu_bar" = "Menu Bar";
Expand Down Expand Up @@ -39,6 +40,24 @@

"settings.transparency" = "Transparency";

"settings.keyboard.local_shortcuts.title" = "Local shortcuts";
"settings.keyboard.local_shortcuts.prev_date" = "Previous date";
"settings.keyboard.local_shortcuts.next_date" = "Next date";
"settings.keyboard.local_shortcuts.prev_week" = "Previous week";
"settings.keyboard.local_shortcuts.next_week" = "Next week";
"settings.keyboard.local_shortcuts.prev_month" = "Previous month";
"settings.keyboard.local_shortcuts.next_month" = "Next month";
"settings.keyboard.local_shortcuts.curr_date" = "Current date";
"settings.keyboard.local_shortcuts.open_date" = "Open selected date";
"settings.keyboard.local_shortcuts.pin_calendar" = "Pin calendar";

"settings.keyboard.global_shortcuts.title" = "Global shortcuts";
"settings.keyboard.global_shortcuts.open_calendar" = "Open calendar";
"settings.keyboard.global_shortcuts.open_next_event" = "Open next event";
"settings.keyboard.global_shortcuts.open_next_event_options" = "Next event options";
"settings.keyboard.global_shortcuts.open_next_reminder" = "Open next reminder";
"settings.keyboard.global_shortcuts.open_next_reminder_options" = "Next reminder options";

"formatter.date.all_day" = "All day";
"formatter.date.today" = "Today";
"formatter.date.relative.in" = "in %@";
Expand Down
19 changes: 19 additions & 0 deletions Calendr/Assets/es.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"settings.title" = "Preferencias";
"settings.tab.general" = "General";
"settings.tab.calendars" = "Calendarios";
"settings.tab.keyboard" = "Atajos";
"settings.tab.about" = "Acerca de";

"settings.menu_bar" = "Barra de menús";
Expand Down Expand Up @@ -39,6 +40,24 @@

"settings.transparency" = "Transparencia";

"settings.keyboard.local_shortcuts.title" = "Atajos locales";
"settings.keyboard.local_shortcuts.prev_date" = "Fecha anterior";
"settings.keyboard.local_shortcuts.next_date" = "Próxima fecha";
"settings.keyboard.local_shortcuts.prev_week" = "Semana anterior";
"settings.keyboard.local_shortcuts.next_week" = "Próxima semana";
"settings.keyboard.local_shortcuts.prev_month" = "Mes anterior";
"settings.keyboard.local_shortcuts.next_month" = "Próximo mes";
"settings.keyboard.local_shortcuts.curr_date" = "Fecha actual";
"settings.keyboard.local_shortcuts.open_date" = "Abrir fecha seleccionada";
"settings.keyboard.local_shortcuts.pin_calendar" = "Fijar calendario";

"settings.keyboard.global_shortcuts.title" = "Atajos globales";
"settings.keyboard.global_shortcuts.open_calendar" = "Abrir calendario";
"settings.keyboard.global_shortcuts.open_next_event" = "Abrir próximo evento";
"settings.keyboard.global_shortcuts.open_next_event_options" = "Opciones del próximo evento";
"settings.keyboard.global_shortcuts.open_next_reminder" = "Abrir próximo recordatorio";
"settings.keyboard.global_shortcuts.open_next_reminder_options" = "Opciones del próximo recordatorio";

"formatter.date.all_day" = "Todo el día";
"formatter.date.today" = "Hoy";
"formatter.date.relative.in" = "en %@";
Expand Down
Loading

0 comments on commit 82baf2f

Please sign in to comment.