Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
nlogozzo committed Jan 28, 2024
1 parent 155d457 commit 29214f3
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 8 deletions.
5 changes: 1 addition & 4 deletions docs/notifications.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ Path: `Nickvision::Notifications::NotifyIcon`
```
- Constructs a NotifyIcon.
- Accepts: The `HWND` handle for the main application window, hwnd, the context menu model for the icon, contextMenu, and whether or not to hide the icon by default, hidden.
- Throws: std::logic_error if Aura::init() was not called yet.
- Throws: std::runtime_error if unable to create the NotifyIcon.
- ```cpp
~NotifyIcon()
Expand Down Expand Up @@ -224,15 +223,13 @@ Path: `Nickvision::Notifications::ShellNotification`
- Accepts: The `ShellNotificationSentEventArgs` containing the information to show, e, and the `HWND` handle for the main application window, hwnd. The hwnd parameter is only used once on the initial creation of the static `NotifyIcon` and then is ignored on future calls.
- Note: This function is only available on the Windows platform. It uses `Nickvision::Notifications::NotifyIcon`.
- Note: This function supports the action "open" with action param being a path of a file or folder to open.
- Throws: std::logic_error if Aura::init() was not called yet
- ```cpp
void send(const ShellNotificationSentEventArgs& e, const std::string& openText)
```
- Accepts: The `ShellNotificationSentEventArgs` containing the information to show, e, and the localized text of "Open", openText.
- Note: This function is only available on the Linux platform.
- Note: This function supports the action "open" with action param being a path of a file or folder to open. The app must define an "app.open" action to handle this event.
- Throws: std::logic_error if Aura::init() was not called yet


## ShellNotificationSentEventArgs
Description: Event args for when a shell notification is sent.

Expand Down
1 change: 0 additions & 1 deletion include/notifications/notifyicon.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ namespace Nickvision::Notifications
* @param hwnd The HWND handle of the main application window
* @param menu The model for the context menu of the NotifyIcon
* @param hidden Whether or not the NotifyIcon should be hidden by default
* @throw std::logic_error Thrown if Aura::init() was not called yet
* @throw std::runtime_error Thrown if unable to create the NotifyIcon
*/
NotifyIcon(HWND hwnd, const NotifyIconMenu& contextMenu = { }, bool hidden = false);
Expand Down
2 changes: 0 additions & 2 deletions include/notifications/shellnotification.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ namespace Nickvision::Notifications::ShellNotification
* @brief Supports the action "open" with action param being a path of a file or folder to open.
* @param e ShellNotificationSentEventArgs
* @param hwnd The HWND handle of the main application window. This parameter is only used once on the initial creation of the static NotifyIcon and then is ignored on future calls
* @throw std::logic_error Thrown if Aura::init() was not yet called
*/
void send(const ShellNotificationSentEventArgs& e, HWND hwnd);
#elif defined(__linux__)
Expand All @@ -26,7 +25,6 @@ namespace Nickvision::Notifications::ShellNotification
* @brief Supports the action "open" with action param being a path of a file or folder to open. The app must define an "app.open" action to handle this event.
* @param e ShellNotificationSentEventArgs
* @param openText Localized text of "Open"
* @throw std::logic_error Thrown if Aura::init() was not yet called
*/
void send(const ShellNotificationSentEventArgs& e, const std::string& openText);
#endif
Expand Down
2 changes: 1 addition & 1 deletion src/keyring/passwordgenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ namespace Nickvision::Keyring
std::string PasswordGenerator::next(size_t length)
{
std::string pass;
for(int i = 0; i < length; i++)
for(size_t i = 0; i < length; i++)
{
pass += m_chars[rand() % m_chars.size()];
}
Expand Down

0 comments on commit 29214f3

Please sign in to comment.