Skip to content

[Feature Request] Ubuntu integration: Application Indicator, Messaging menu, Launcher shortcuts #135

Closed

Description

@omyno
  • Application Indicator
    This provides access to key features of Bitmessage.
    • mono icon (compare /usr/share/icons/ubuntu-mono-dark/status/24)
  • Messaging menu
    The entry could look like this:
    • Pybitmessage
      • New message
      • Contacts
      • 1 new message (from John Doe)
  • Launcher shortcut
    This is very easy to implement when the application supports command line options.
  • Notify OSD
    This informs the user about new messages and connection loss.
  • Most importantly, Ubuntu users have no easy way to install Pybitmessage. Even though it may be too early to get Pybitmessage into the Debian repositories, there are several options to make it more convenient to install this application:
    • Provide a single official .deb file
    • Provide a portable statically linked executable
    • Provide a PPA

Activity

  1. omyno commented on May 6, 2013

    @omyno
    Author

    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.

    On PPAs I think this requires a project in Launchpad,

    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.

  2. omyno commented on May 6, 2013

    @omyno
    Author

    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.

  3. omyno commented on May 7, 2013

    @omyno
    Author

    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).
    5077233316_1404ecb52e_b
    bildschirmfoto vom 2013-05-07 13 42 06

    1. Unclickable entry that shows information about connectivity. Most users won't care about the number of connections, they just want to know if the program works or not, so i suggest showing "Connected", "Connected (behind Firewall), "Not connected".
      Here we can also show the status of the current message(s) being sent: Sending message ...
    2. Show Bitmessage (This entry only makes sense when closing the Pybitmessage window hides it into tray/indicator which does not seem to be implemented for Linux yet)
    3. Send message

    4. Subscribe to broadcast

    5. Address book (instead of "add address")

    6. Quit

    I hope "block address" won't be needed as often so i wouldn't include it here.

  4. omyno commented on May 7, 2013

    @omyno
    Author

    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)

  5. omyno commented on May 8, 2013

    @omyno
    Author
    • 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:

      What would the Ubuntu "designers" do?

      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:

        sudo apt-get install libmessaging-menu-dev
        bzr branch lp:messaging-menu-qt && cd messaging-menu-qt
        cmake .
        make
        sudo make install
        
      __EDIT__: messaging-menu-qt is [being used](https://github.com/euroelessar/qutim/tree/master/plugins/indicator/src) in Qutim.
    
    * One last note: The directory /usr/share/applications/pybitmessage isn't needed anymore. Here's a [patch for Makefile](http://sebsauvage.net/paste/?2f1e6072f163c8ae#dJZjgqCWLL1T930kXD9tIgZFdDnuS3evtuGGtsBsIew=).
    
  6. omyno commented on May 9, 2013

    @omyno
    Author

    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.

  7. omyno commented on May 12, 2013

    @omyno
    Author

    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.

  8. omyno commented on May 13, 2013

    @omyno
    Author

    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!).

    1. Individual messages aren't intended to be shown in the messaging menu.

      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.

    2. 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.

    3. 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)
      can-icon-24px can-icon-24px-green can-icon-24px-yellow can-icon-24px-red

    EDIT: The SVG files are available here

  9. omyno commented on May 13, 2013

    @omyno
    Author

    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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions