Skip to content

Ricochet's icon in tray - #260

Open
kolodziej wants to merge 16 commits into
ricochet-im:masterfrom
kolodziej:247-tray-icon
Open

kolodziej wants to merge 16 commits into
ricochet-im:masterfrom
kolodziej:247-tray-icon

Conversation

@kolodziej

Copy link
Copy Markdown
Contributor

Features:

  • Icon changes when user has unread messages.
  • Left click on tray icon shows and hides main window
  • Right click gives context menu with four options:
    • preferences
    • add contact
    • copy my id [to clipboard]
    • quit
  • User can activate option which will change behavior of close ('X') button to make it hides window, not closes application.

This PR is related to issue #247

Comment thread src/ui/MainWindow.cpp Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

trayIcon is leaked on destruction

@special

special commented Sep 17, 2015

Copy link
Copy Markdown
Member

I think the tray icon should only be visible when close-to-tray is enabled. We could also make a separate option, but I like that less. What do you think?

Looking good - I think this can be ready to merge after the above comments.

@special special mentioned this pull request Sep 17, 2015
1. Destruction of TrayIcon object in MainWindow's destructor
2. Forward declaration of TrayIcon in src/ui/MainWindow.h
3. QIcon objects for TrayIcon's constructor as const references
4. New names for TrayIcon's signals, removes unnecessary slots
	 and connects signals from TrayIcon's context menu to another
	 signals
5. Fixes braces style: brace in the same line as if/else in QML
6. Title case in TrayIcon's context menu
@kolodziej

Copy link
Copy Markdown
Contributor Author

Ok. I think everything's done.

Comment thread src/ui/TrayIcon.h Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

these are unused?

1. Removes unused TrayIcon::setStdIcon and TrayIcon::setUnreadIcon
2. Removes code formatting issues
@kolodziej

Copy link
Copy Markdown
Contributor Author

I hope now it's ok :)

@rburchell

Copy link
Copy Markdown
Contributor

thanks :)

@qsodev

qsodev commented Sep 21, 2015

Copy link
Copy Markdown
Contributor

looks good :)

@kolodziej

Copy link
Copy Markdown
Contributor Author

It's about time to merge :)

@puzanov

puzanov commented Dec 17, 2015

Copy link
Copy Markdown

Is it in master?

@kolodziej

Copy link
Copy Markdown
Contributor Author

Not yet, but it's ready since end of September.

@kolodziej kolodziej mentioned this pull request Dec 23, 2015
@special

special commented Jan 2, 2016

Copy link
Copy Markdown
Member

Toggling the window when the tray icon is clicked doesn't behave well. On some platforms, the window is hiding every time you click to open the context menu on the tray. How do most messaging-type applications behave here?

It's less important, but the unread icon is too subtle, also. Maybe recoloring the entire icon to orange would be better. We could merge without that.

We should disable tray icons entirely on OS X. Adding a #ifndef Q_OS_MAC in the right place would do. I can do this after merge if needed.

@qsodev

qsodev commented Jan 3, 2016

Copy link
Copy Markdown
Contributor

For example Pidgin and Psi open and close the main window on single click. Right click opens the context menu.

@ZimTester

Copy link
Copy Markdown

Single click is the best Windows practice, agree

@kolodziej

Copy link
Copy Markdown
Contributor Author

The only think that could be done is new 'unread icon'. After merging this branch into master we can make an issue. Maybe we have anybody who is better in graphics than me ;)

@qsodev

qsodev commented Feb 25, 2016

Copy link
Copy Markdown
Contributor

what about simply flashing the already existing tray icon when there are unread messages?

@kolodziej

Copy link
Copy Markdown
Contributor Author

I think it could be done. What do you think, should it be default behaviour or just an option?

@ZimTester

Copy link
Copy Markdown

I still think the best way is using a special icon for unread incoming messages, and here is why:
Flashing should be switchable on/off by option, because not everybody likes it. But it's ok to make it on by default. But when it's off we should see that we have unread messages, that's why we need a special icon. (Also if we have it then we should see the same special icon when flashing is on too).
Maybe you can choose something from any free icon packs? Hm...
That's just my humble opinion after using another messengers.

@kolodziej

Copy link
Copy Markdown
Contributor Author

We have special icon with dot. It's not very effective and I wanted to change it. I didn't know if it is enough to set new, more different icon or make it flash.

@kolodziej

kolodziej commented Mar 5, 2016

Copy link
Copy Markdown
Contributor Author

I've changed unread icon and add blinking when we have unread messages.

We need someone who will make this feature available on os x.

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.

6 participants