[Feature Request] Ubuntu integration: Application Indicator, Messaging menu, Launcher shortcuts #135
Labels
No Label
bug
build
dependencies
developers
documentation
duplicate
enhancement
formatting
invalid
legal
mobile
obsolete
packaging
performance
protocol
question
refactoring
regression
security
test
translation
usability
wontfix
No Milestone
No project
No Assignees
1 Participants
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: Bitmessage/PyBitmessage-2024-12-10#135
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This provides access to key features of Bitmessage.
The entry could look like this:
This is very easy to implement when the application supports command line options.
This informs the user about new messages and connection loss.
Creating a Debian package is simple. There's a script called debian.sh which can be run. If someone nominates a location to upload to I can create a deb if necessary.
On PPAs I think this requires a project in Launchpad, but that wouldn't be a problem because you can set Launchpad projects to automatically import code from Github.
The "executable" exists in the current Debian packaging. It's called "pybm" and gets installed to /usr/bin. Appropriate menu items/icons also get installed.
I think the Ubuntu integration is a good idea, and I might also have a go at making a KDE Bitmessage widget.
Thanks for your comment. All these issues combined may even justify creating a new client/interface for Bitmessage as I don't know if Atheros has any interest in adding these features.
IMHO naming the executable "pybitmessage" instead of "pybm" would be more intuitive.
No. A PPA does not necessarily need a project, just a registered launchpad user who signed the Ubuntu code of conduct.
The current .deb packaging instructions in debian/rules are not good yet as they copy all .py, .ui and image files into /usr/share/applications. This directory is reserved for .desktop files.
I could rename it to pybitmessage. My thinking was that if you're going to be launching it from the console then to keep the typing to a minimum.
I am a registered Launchpad user who has accepted the CoC, so I could probably set up a PPA if nobody else does.
Could you advise on where the standard location for installed applications is in Ubuntu (I assumed it was applications).
To be Debian compliant I should also create a manpage, although that could be quite minimal and maybe just point to the wiki.
Thanks for your effort! I would suggest /usr/share/pybitmessage for those files.
I noticed that /usr/bin/pybm currently is just a two-liner bash script. I don't know the best practice for python applications, but /usr/bin/pyrenamer could serve as a better template for /usr/bin/pybitmessage.
59211053dc
If there is to be an application indicator then what should be on it?
Maybe send message, add address, block address, subscribe to broadcast.
Possibly the indicator icon could change colour depending upon the network status.
I don't know if we want redundancy for the app indicator vs. messaging menu (see entries below that are prefixed with #). So the main purpose of the app indicator will be to be able to show/hide Pybitmessage so it does not sit in the launcher the whole time (see screenshots below).
Here we can also show the status of the current message(s) being sent: Sending message ...
Send message
Subscribe to broadcast
Address book (instead of "add address")
I hope "block address" won't be needed as often so i wouldn't include it here.
That sounds ok. I think that the recent PyBitmessage-Daemon could be modified such that it uses the API to update the indicator. That would mean that the indicator stuff could be separate from the main program. If the API wasn't configured then either some defaults could be created automatically by the indicator, or upon install it would prompt the user to enter an API password.
It looks like all that is needed is to create a QSystemTrayIcon. sni-qt will then automatically "render that tray icon as a KDE Status Notifier Item, which the Application Indicator service will pick up and show in the Ubuntu menu bar." (source)
Ok, since that's just Qt then no separate program or API calls would be needed.
Application indicator is now operational in pull request #133
The way that the connection status is indicated could be changed. Currently it's just text. Another way to do it might be to have red, yellow and green versions of the bitmessage icon and switch between them. What would the Ubuntu "designers" do? Ideally the appearance and functionality should be as slick as possible so that using encrypted mail becomes a no-brainer.
Moving along to the messaging menu this looks fairly Unity specific. Is there a Qt way of accessing this?
The app indicator works for me. Great work! In the future, the first entry could also show when a message is being sent. Ideally, the entry "Connection ..." would also be non-clickable, but I don't know if sni-qt supports this (or if there's a bug ...).
EDIT:
The Wiki states that dynamic objects should have icons, so the traffic light symbol would be fine.
Regarding the messaging menu:
Python API documentation is here.
First we can just create the file $HOME/.config/indicators/messages/applications/pybitmessage which contains nothing but the path to the .desktop file in it:
/usr/share/applications/pybitmessage.desktop
Ideally we want the user to be able to disable the messaging menu entry in the pybitmessage settings.
Qt way: I found a launchpad project that provides Qt bindings for the new messaging menu. It wraps the libmessaging-menu API into the Qt object system. I hope this will help you somehow. We can bundle the package in the PPA. Here's how to get it:
It looks like libmessaging-menu-dev is Ubuntu specific and so would cause problems for anyone trying to install the package on a Debian system.
True, it's just relevant to Ubuntu (and elementary OS ...) . This means the PPA will need a different dependency list and include messaging-menu-qt.
I wonder if there's a way that I could have the packaging detect the operating system and include the appropriate dependencies. It might be possible with some editing of debian.sh
After making enquiries in Ubuntuland it seems that the Python code examples are out of date and no longer work. The True workings of the messaging menu are currently known only to the Inner Circle and I'll have to wait for the wiki to be updated.
https://bugs.launchpad.net/ubuntudeveloperportal/+bug/1178700
So despite non-existent or very poor documentation I've managed to implement most of this. Unfortunately the links provided in this issue were referring to out of date information which the Ubuntumeisters havn't gotten around to updating (despite it being core API information for their flagship product), so I ended up chasing shadows for a while. This suggests to me that almost nobody outside of Canonical's internal development team is really doing anything at all with the messaging menu in Ubuntu.
There is an issue with the possibility of opening multiple instances of the application from the messaging menu, but I've created a separate issue for that. It needs something like a mutex or single instance application.
On the launcher shortcut should the actions be the same as those on the application indicator?
Thanks for pointing these problems out. I had no idea those code examples were outdated and had expected Canonical to put more effort into encouraging developers to easily integrate their apps in Ubuntu. Sorry that I didn't provide you with some more valuable information.
You are right, there are not so many applications which use the messaging menu. I know of Gajim, Thunderbird, Evolution, Pidgin, XChat, Skype, Smuxi and some other mail programs to have messaging menu integration. Not all of them transitioned to the new API since quantal though.
Just tested your messaging menu integration and it works like a charm (aside from opening multiple instances as you already mentioned)! I think you also did a great job on adding the unobtrusive color to the indicator icon. Hopefully you don't mind me nit-picking and I don't even know if that's possible without much more work: Clicking on an unread message in the messaging menu should directly select the unread message in PyBitmesage itself, so the body of the message will be shown. For me it only opened the tab.
As for the launcher shortcut: I had a look into what some other applications offer here. If you don't see any better options I'm fine with the same as those in the app indicator.
According to the design guide the messaging menu should only contain mailboxes and on selecting an item direct you to that mailbox (and remove it from the messaging menu). Individual messages aren't intended to be shown in the messaging menu. The messaging menu should also only show things which have changed rather than general status information.
I know that's somewhat non-intuitive, but that's what the guide says and was also confirmed by the Ubuntu desktop developers in IRC.
Unofficial PPA:
ppa:fuzzgun/pybitmessage
deb http://ppa.launchpad.net/fuzzgun/pybitmessage/ubuntu raring main
deb-src http://ppa.launchpad.net/fuzzgun/pybitmessage/ubuntu raring main
I tried the PPA and it works as expected. You are really driving Bitmessage's usability forward and open it to a much wider audience! I am really excited that you managed to solve all the issues in this bug report (and in just a few days!).
I guess i did not express myself well. What i meant to say was when the entry for an unread message in the messaging menu is clicked, pybitmessage opens and should there automatically select the unread mail so the user can see the content. That's also the way Thunderbird handles it.
Currently PyBitmessage just opens the Inbox and I have to manually click on the new message in the client.
Another small detail: When Pybitmessage is open and a new message is clicked on, the unread entry in the messaging menu should disappear. That is also how it is done in Thunderbird and seems like intuitive behavior.
I created a first version of mono icons so the indicator icon fits the default theme Ambiance/"ubuntu-mono-dark". They would belong in /usr/share/icons/ubuntu-mono-dark/24 It's not perfect yet because they are just converted from an SVG file. I guess a good icon should be created directly as a bitmap graphics. So if anyone knows how to create a nice icon in Gimp ... (the color code is always dfd8c8ff)
EDIT: The SVG files are available here
Ok that makes sense. Compared to the core protocols these are all "paper cuts", but I think that getting the Unity integration looking nice and behaving like other applications will certainly help adoption. The vanilla version of Ubuntu probably covers maybe 75% of the Linux user base.
There is also an inconsistency. On the application indicator it says "quit" but in the main application window file menu it says "exit". Both do the same thing. Is there any preferred term?
Yes, we should use "Quit". Most applications use it and for example the GNOME HIG recommends not to use "Exit". There's also no keyboard shortcut to quit Pybitmessage yet. This should be set to Ctrl+Q (Command+Q on OS X).