Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added tray icon support #262

Closed
wants to merge 1 commit into from
Closed

Conversation

qsodev
Copy link
Contributor

@qsodev qsodev commented Sep 8, 2015

support for a trayicon:
minimal context menu ( hide/ show and quit )
message icon when message received
support for trayicon text popup messages ( currently not enabled )

@special
Copy link
Member

special commented Sep 17, 2015

Thanks for doing this, but it looks like there was a collision of effort. I think we'll take #260 instead; it's simpler, and I like that it keeps more of the UI logic within QML. Could you take a look at that PR and see if you have any comments?

One notable difference is that you also have tray notification support. That's something we should do, but it needs to be a separate pull request, because it has a few complications: in particular, we have to make sure that the operating system doesn't end up recording anything we don't want to disk. I think it will also need to be behind an option.

@special special closed this Sep 17, 2015
@@ -39,16 +39,21 @@ ApplicationWindow {
if (unreadCount > 0) {
if (audioNotifications !== null)
audioNotifications.message.play()
trayIcon.notifyMessage()
if (trayIcon.messagesEnabled) trayIcon.showText(qsTr("Event"), qsTr("New Message from")+" "+user.nickname)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For future reference: you can't append/prepend text to translated strings, because it might not translate in the same order in all languages. Qt supports placeholders for this, like:

qsTr("New message from %1").arg(user.nickname)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants