comparison src/gui/window.cpp @ 62:4c6dd5999b39

*: update 1. updated animia 2. use widestrings for filesystem on Windows
author Paper <mrpapersonic@gmail.com>
date Sun, 01 Oct 2023 06:16:06 -0400
parents b7a1c0010ffd
children 3d2decf093bb
comparison
equal deleted inserted replaced
61:327568ad9be9 62:4c6dd5999b39
1 #include "gui/window.h" 1 #include "gui/window.h"
2 #include "core/config.h" 2 #include "core/config.h"
3 #include "core/session.h" 3 #include "core/session.h"
4 #include "gui/dark_theme.h" 4 #include "gui/dark_theme.h"
5 #include "gui/dialog/about.h"
5 #include "gui/dialog/settings.h" 6 #include "gui/dialog/settings.h"
6 #include "gui/dialog/about.h"
7 #include "gui/pages/anime_list.h" 7 #include "gui/pages/anime_list.h"
8 #include "gui/pages/history.h"
8 #include "gui/pages/now_playing.h" 9 #include "gui/pages/now_playing.h"
10 #include "gui/pages/search.h"
11 #include "gui/pages/seasons.h"
9 #include "gui/pages/statistics.h" 12 #include "gui/pages/statistics.h"
10 #include "gui/pages/seasons.h"
11 #include "gui/pages/search.h"
12 #include "gui/pages/torrents.h" 13 #include "gui/pages/torrents.h"
13 #include "gui/pages/history.h"
14 #include "gui/widgets/sidebar.h" 14 #include "gui/widgets/sidebar.h"
15 #include "services/services.h" 15 #include "services/services.h"
16 #include <QApplication> 16 #include <QApplication>
17 #include <QFile> 17 #include <QFile>
18 #include <QMainWindow> 18 #include <QMainWindow>
19 #include <QMenuBar> 19 #include <QMenuBar>
20 #include <QPlainTextEdit> 20 #include <QPlainTextEdit>
21 #include <QStackedWidget> 21 #include <QStackedWidget>
22 #include <QTimer>
23 #include <QActionGroup>
24 #include <QMessageBox>
22 #include <QTextStream> 25 #include <QTextStream>
23 #if MACOSX 26 #if MACOSX
24 # include "sys/osx/dark_theme.h" 27 # include "sys/osx/dark_theme.h"
25 #elif defined(WIN32) 28 #elif defined(WIN32)
26 # include "sys/win32/dark_theme.h" 29 # include "sys/win32/dark_theme.h"
77 action = menu->addAction(tr("&Scan available episodes")); 80 action = menu->addAction(tr("&Scan available episodes"));
78 81
79 menu->addSeparator(); 82 menu->addSeparator();
80 83
81 action = menu->addAction(tr("Play &next episode")); 84 action = menu->addAction(tr("Play &next episode"));
82 action->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_N)); 85 action->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_N));
83 action = menu->addAction(tr("Play &random episode")); 86 action = menu->addAction(tr("Play &random episode"));
84 action->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_R)); 87 action->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_R));
85 88
86 menu->addSeparator(); 89 menu->addSeparator();
87 90
88 action = menu->addAction(tr("E&xit"), qApp, &QApplication::quit); 91 action = menu->addAction(tr("E&xit"), qApp, &QApplication::quit);
89 92
90 menu = menubar->addMenu(tr("&Services")); 93 menu = menubar->addMenu(tr("&Services"));
91 action = menu->addAction(tr("Synchronize &list"), [this, stack] { 94 action = menu->addAction(tr("Synchronize &list"), [this, stack] {
92 Services::Synchronize(); 95 Services::Synchronize();
93 ((AnimeListWidget*)stack->widget((int)Pages::ANIME_LIST))->Refresh(); 96 ((AnimeListWidget*)stack->widget((int)Pages::ANIME_LIST))->Refresh();
94 }); 97 });
95 action->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_S)); 98 action->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_S));
96 99
97 menu->addSeparator(); 100 menu->addSeparator();
98 101
99 submenu = menu->addMenu(tr("&AniList")); 102 submenu = menu->addMenu(tr("&AniList"));
100 action = submenu->addAction(tr("Go to my &profile")); 103 action = submenu->addAction(tr("Go to my &profile"));