Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#2873 closed Enhancement (fixed)

AppIndicator support for Transmission

Reported by: qense Owned by: charles
Priority: Normal Milestone: 1.90
Component: GTK+ Client Version: 1.83
Severity: Normal Keywords:
Cc:

Description

Ubuntu is pushing an effort to unify the notification area with Indicator Application, often referred to as AppIndicator?.

Indicator Application uses the KNotify standard that the KDE project proposed to make a FreeDesktop? standard. The icons are created over DBus, which means that the tray icons will look consistent and native in both GNOME and KDE environments.

I'm attaching a patch that adds support for AppIndicator?. However, if libappindicator isn't detected it will use the regular GtkStatusIcon?.

Because AppIndicator? doesn't support tooltips yet, I've left tr_icon_refresh() an empty function that does nothing.

The 'transmission-tray-icon', which is defined by TRAY_ICON in ./gtk/actions.h doesn't exist and therefore you'll see a broken icon in the tray.

The project website of Indicator Application is at <https://launchpad.net/indicator-application> and contains links to more information about the implementation of and the rationale behind it.

Attachments (2)

appindicator-support.patch (3.5 KB) - added by qense 12 years ago.
appindicator-diff-ur.patch (5.0 KB) - added by qense 12 years ago.
AppIndicator? support patch, generated with 'diff -ur'

Download all attachments as: .zip

Change History (13)

Changed 12 years ago by qense

comment:1 Changed 12 years ago by charles

  • Component changed from Transmission to GTK+ Client
  • Milestone changed from None Set to 1.90
  • Owner set to charles
  • Status changed from new to assigned

comment:2 Changed 12 years ago by charles

qense: the patch looks good but when I try to apply it, patch tells me only garbage was found. Could you re-generate the patch using "diff -u"?

Changed 12 years ago by qense

AppIndicator? support patch, generated with 'diff -ur'

comment:3 follow-up: Changed 12 years ago by qense

Attached a patch generated with 'diff -ur'. I hope that'll do it.

Are there also plans to include all icons that are referred to in gtk/actions.h? Currently none of those are, causing the tray icon to be the default icon that's used when the chosen icon cannot be found.

comment:4 Changed 12 years ago by charles

  • Resolution set to fixed
  • Status changed from assigned to closed

I removed these two lines from the patch because I think they're redundant when using PKG_CHECK_MODULES. If my meddling breaks the diff please let me know.

AC_SUBST(LIBAPPINDICATOR_LIBS)  
AC_SUBST(LIBAPPINDICATOR_CFLAGS)  

Committed to trunk for 1.90 by r10133

comment:5 in reply to: ↑ 3 Changed 12 years ago by charles

Replying to qense:

Are there also plans to include all icons that are referred to in gtk/actions.h?

I don't know what "include" means in this context. These symbolic names currently all point t the same icon... the distinction's been made so that Ubuntu can add a monochrome icon for the system tray. Xref: https://bugs.launchpad.net/ubuntu/+source/transmission/+bug/510570

comment:6 Changed 12 years ago by qense

That's fine with me, I'm not even close to being an autotools expert, so you probably know a lot better than me what I'm doing. Those flags weren't used in the code, so I wouldn't expect it to hurt.

Thank you for including the patch!

Regarding the icons: OK, I think that it should be working in that case.

comment:7 Changed 12 years ago by qense

  • Resolution fixed deleted
  • Status changed from closed to reopened

Apologises, it turns out there is a bug in the patch: the stock menu entries are used, rather than the adapted actions as defined in gtk/actions.c. I'm working on it.

comment:8 Changed 12 years ago by charles

Okay. When you attach a new patch, please do it in "diff -u" form again -- patch liked that format fine -- against svn trunk. Thanks!

comment:9 Changed 12 years ago by qense

  • Resolution set to fixed
  • Status changed from reopened to closed

I'm sorry, it turns out that this is caused by <https://launchpad.net/bugs/520048>, a bug in Indicator Application. However, AppInd? also doesn't support the fallback system for the icons, so I am working on a patch that passes 'transmission' as the icon name when there is no icon with the name TRAY_ICON.

comment:10 Changed 12 years ago by qense

A fix for the issues with custom labels for actions with stock icons will arrive in Indicator Applications 0.0.14, maybe LIBAPPINDICATOR_MINUMUM should be set to that version as soon as that is released to prevent it from malfunctioning in environments with older releases?

Note: See TracTickets for help on using tickets.