mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-21 08:07:59 -05:00
yuzu qt: Create shortcuts on Linux
This creates a Desktop Entry file and a PNG icon for the entry when the user right-clicks a game and selects "Create Shortcut -> Create {Application,Desktop} Shortcut". This uses the current executable's path to create the shortcut. yuzu qt: Add more error checking and OS gating for shortcuts main: Remove FreeBSD gating for shortcuts I'm not going to test FreeBSD, so I don't know if they follow Freedesktop.org or not. I just have to let someone else verify that it works there and let them enable it. main: Move shortcut function to its own function This function should really be in a common library, at least among frontends. main: Remove image manip references main: Fix difference in MinGW and native GCC versions main: Fix negation in creat shortcut Addresses review comment Co-authored-by: Jan Beich <jbeich@FreeBSD.org> main: Re-enable freedesktop shorcuts for FreeBSD
This commit is contained in:
@ -38,6 +38,7 @@ class QProgressDialog;
|
||||
class WaitTreeWidget;
|
||||
enum class GameListOpenTarget;
|
||||
enum class GameListRemoveTarget;
|
||||
enum class GameListShortcutTarget;
|
||||
enum class DumpRomFSTarget;
|
||||
enum class InstalledEntryType;
|
||||
class GameListPlaceholder;
|
||||
@ -293,6 +294,8 @@ private slots:
|
||||
void OnGameListCopyTID(u64 program_id);
|
||||
void OnGameListNavigateToGamedbEntry(u64 program_id,
|
||||
const CompatibilityList& compatibility_list);
|
||||
void OnGameListCreateShortcut(u64 program_id, const std::string& game_path,
|
||||
GameListShortcutTarget target);
|
||||
void OnGameListOpenDirectory(const QString& directory);
|
||||
void OnGameListAddDirectory();
|
||||
void OnGameListShowList(bool show);
|
||||
@ -365,6 +368,10 @@ private:
|
||||
bool CheckDarkMode();
|
||||
|
||||
QString GetTasStateDescription() const;
|
||||
bool CreateShortcut(const std::string& shortcut_path, const std::string& title,
|
||||
const std::string& comment, const std::string& icon_path,
|
||||
const std::string& command, const std::string& arguments,
|
||||
const std::string& categories, const std::string& keywords);
|
||||
|
||||
std::unique_ptr<Ui::MainWindow> ui;
|
||||
|
||||
|
Reference in New Issue
Block a user