-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Go to Emojipedia page with context menu
This patch makes it possible for the user to right-click an emoji, bringing up a context menu, and then click the "Go to Emojipedia page" action to perform the same action as when pressing F12 with a selected emoji. Because this is not configurable, I'm removing the emojiInfoRequested() signal to embed the URL opening action directly into the main window. jome::gotoEmojipediaPage(), declared in `jome/emojipedia.hpp`, does this job. Signed-off-by: Philippe Proulx <[email protected]>
- Loading branch information
Showing
9 changed files
with
76 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* | ||
* Copyright (C) 2021 Philippe Proulx <eepp.ca> | ||
* | ||
* This software may be modified and distributed under the terms | ||
* of the MIT license. See the LICENSE file for details. | ||
*/ | ||
|
||
#include <QDesktopServices> | ||
#include <QString> | ||
#include <QUrl> | ||
|
||
#include "emojipedia.hpp" | ||
#include "emoji-db.hpp" | ||
|
||
namespace jome { | ||
|
||
void gotoEmojipediaPage(const Emoji& emoji) | ||
{ | ||
QDesktopServices::openUrl(QUrl { | ||
QString {"https://emojipedia.org/"} + QString::fromStdString(emoji.str()) | ||
}); | ||
} | ||
|
||
} // namespace jome |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/* | ||
* Copyright (C) 2021 Philippe Proulx <eepp.ca> | ||
* | ||
* This software may be modified and distributed under the terms | ||
* of the MIT license. See the LICENSE file for details. | ||
*/ | ||
|
||
#ifndef _JOME_EMOJIPEDIA_HPP | ||
#define _JOME_EMOJIPEDIA_HPP | ||
|
||
#include "emoji-db.hpp" | ||
|
||
namespace jome { | ||
|
||
void gotoEmojipediaPage(const Emoji& emoji); | ||
|
||
} // namespace jome | ||
|
||
#endif // _JOME_EMOJIPEDIA_HPP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters