Bug 264070 - deskutils/xpad: Systray icon no longer appears
Summary: deskutils/xpad: Systray icon no longer appears
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Jason Helfman
URL: https://bugs.launchpad.net/xpad/+bug/...
Keywords: patch
Depends on:
Blocks:
 
Reported: 2022-05-18 12:56 UTC by Tomoaki AOKI
Modified: 2022-05-22 21:12 UTC (History)
0 users

See Also:
jgh: maintainer-feedback+


Attachments
Patch for deskutils/xpad/Makefile (372 bytes, patch)
2022-05-20 12:07 UTC, Tomoaki AOKI
jgh: maintainer-approval-
Details | Diff
Patch to place into deskutils/xpad/files #1 (1.10 KB, patch)
2022-05-20 12:11 UTC, Tomoaki AOKI
jgh: maintainer-approval-
Details | Diff
Patch to place into deskutils/xpad/files #2 of 2 (820 bytes, patch)
2022-05-20 12:14 UTC, Tomoaki AOKI
jgh: maintainer-approval-
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tomoaki AOKI 2022-05-18 12:56:41 UTC
After updating deskutils/xpad from 5.4.0_2 to 5.7.0, systray icon is no longer appears and cannot open single, wanted note from right-click menu on systray icon.
My desktop environment is x11/mate, with x11-wm/compiz.

Rebuilding all direct dependencies did not help.

5.4.0_2 worked just fine, except some Japanese titles are not shown properly on right-click menu.

Looking into ChanegLog prompted on commit message, I suspect

 * Fix: Replace libappindicator with libayatana-appindicator, since
   libappindicator is not maintained. (#1964116)
 * Fix: App indicator (systray): make [Show All] / [Close All] menu
   items clickable

of Version 5.7 broke fallback mechanism from appindicator to systray.

libayatana-appindicator is not on ports collection, and 5.4.0_2 worked fine without devel/libappindicator installed. (Even not depended upon.)
Comment 1 Jason Helfman freebsd_committer freebsd_triage 2022-05-19 02:25:22 UTC
I communicated with upstream the other day, and will file a bug report. If you run xpad as an application, it should bring bring all your notes up.

Feel free to submit here, as well: https://launchpad.net/xpad/trunk
Comment 2 Jason Helfman freebsd_committer freebsd_triage 2022-05-19 03:09:02 UTC
Filed report upstream.
Comment 3 Tomoaki AOKI 2022-05-20 12:01:58 UTC
(In reply to Jason Helfman from comment #2)

Thanks. Visited the PR.
Reading Arthur's comment there, unfortunately, we would need libayatana-appindicator [1] [2], which is not yet ported to FreeBSD.

But fortnately, we have devel/libappindicator, which is former dependency before 5.7.

Looking into xpad's changes, revision 1867 [3] switched libappindicator to libayatana-appindicator.

So I tried installing devel/libappindicator, created partial reverse patch for 1867 and it restored systray icon!

 *"Partial" means that...
   ChangeLog is untouched.
   Do not move #include "xpad-settings.h" line in src/xpad-tray.c to previous 
   place Because if some definitions on other headers are moved to the above-
   mentioned header after rev 1867, it can cause build error, and I couldn't
   take enough time to validate.

Yes, I know it's just a temporary workaround. But would be better waiting someone
porting libayatana-appindicator to FreeBSD.

I'll upload patches shortly. 1 file for Makefile, and 2 files for placing files/ directory.

  *Sometimes, not sure why, patch hesitates to reverse newly added files / 
   directories.

[1] https://ayatanaindicators.github.io/

[2] https://github.com/AyatanaIndicators/

[3] https://bazaar.launchpad.net/~xpad-team/xpad/trunk/revision/1867
Comment 4 Tomoaki AOKI 2022-05-20 12:07:04 UTC
Created attachment 234055 [details]
Patch for deskutils/xpad/Makefile

Patch #1. For deskutils/xpad/Makefile.
Add devel/libappindicator as LIB_DEPENDS.

Apply with -p1 option, on top of /usr/ports.
Comment 5 Tomoaki AOKI 2022-05-20 12:11:07 UTC
Created attachment 234056 [details]
Patch to place into deskutils/xpad/files #1

Patch to simply place into deskutils/xpad/files #1 of 2.
Reverts upstream revision 1867, configure.ac file.
Comment 6 Tomoaki AOKI 2022-05-20 12:14:26 UTC
Created attachment 234057 [details]
Patch to place into deskutils/xpad/files #2 of 2

Patch to simply place into deskutils/xpad/files #2 of 2.
Partially reverts upstream rev.1867, src/xpad-tray.c.
Comment 7 Jason Helfman freebsd_committer freebsd_triage 2022-05-21 01:07:57 UTC
(In reply to Tomoaki AOKI from comment #3)
I'm working on porting it now. I've completed two of the three dependencies.
Comment 8 Jason Helfman freebsd_committer freebsd_triage 2022-05-21 04:33:38 UTC
I've been able to get all dependencies to build on my instance. As soon as I clean up the ports and bit, I will put them through a build cycle. If all goes well, I should be able to push an update in short order.

-jgh
Comment 9 Tomoaki AOKI 2022-05-21 12:00:34 UTC
(In reply to Jason Helfman from comment #8)

Thanks in advance!
I'm looking forward to it.

BTW, ayatana-indicators is consisted with 6 subprojects.
IIUC, what we need would be libayanata-appindicator, and it maybe require
at least libayanata-indicator, and libayatana-indicator require ayatana-ido by default (but optional). Not sure for other 3 subprojects, but maybe at least ayatana-webmail would not be needed for us.

If so, there would be 2 options.
 *Create single port, build needed subprojects controlled by flavors.

 *Create multiple ports by subprojects, setting proper dependency tree
  and each dependant controlls dependencies with OPTIONS framework.

In both cases, build all subproject that are needed for keep compatibility
with existing devel/libappindicator. (As ayatana-appindicator is used as
the successor of it by xpad.)
Comment 10 Jason Helfman freebsd_committer freebsd_triage 2022-05-22 01:00:02 UTC
(In reply to Tomoaki AOKI from comment #9)

The ports I intend on introducing to tree are:

devel/ayatana-ido
devel/libayatana-appindicator
devel/libayatana-indicator

OPTIONS will be introduced as software, or ports, are updated and as time permits, however patches are welcome!

These software dependencies are all that I've found are necessary to have xpad display in systray.
Comment 11 commit-hook freebsd_committer freebsd_triage 2022-05-22 03:05:43 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=cd7f8b3b8135bdd20bc9a69c290e7318d6d9d11d

commit cd7f8b3b8135bdd20bc9a69c290e7318d6d9d11d
Author:     Jason Helfman <jgh@FreeBSD.org>
AuthorDate: 2022-05-22 03:03:25 +0000
Commit:     Jason Helfman <jgh@FreeBSD.org>
CommitDate: 2022-05-22 03:03:25 +0000

    deskutils/xpad: chase 568b38a4280ac24d3a24eea285c694422cf684c4

    - adjust dependencies for systray support

    PR:     264070
    Reported by:    junchoon@dec.sakura.ne.jp

 deskutils/xpad/Makefile | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
Comment 12 Tomoaki AOKI 2022-05-22 09:49:38 UTC
(In reply to commit-hook from comment #11)

Confirmed working OK on both stable/13 and main.
Thanks a lot!
Comment 13 Jason Helfman freebsd_committer freebsd_triage 2022-05-22 21:10:16 UTC
Comment on attachment 234055 [details]
Patch for deskutils/xpad/Makefile

Rejecting patch for accounting purposes. Fixed by adding required dependencies.
Comment 14 Jason Helfman freebsd_committer freebsd_triage 2022-05-22 21:10:34 UTC
Comment on attachment 234056 [details]
Patch to place into deskutils/xpad/files #1

Rejecting patch for accounting purposes. Fixed by adding required dependencies.
Comment 15 Jason Helfman freebsd_committer freebsd_triage 2022-05-22 21:10:50 UTC
Comment on attachment 234057 [details]
Patch to place into deskutils/xpad/files #2 of 2

Rejecting patch for accounting purposes. Fixed by adding required dependencies.
Comment 16 Jason Helfman freebsd_committer freebsd_triage 2022-05-22 21:12:01 UTC
(In reply to Tomoaki AOKI from comment #12)
So happy this is fixed! There is a new version out, but I put a bug in for it, so maybe that would be addressed soon-ish. If not, I have a patch in place to address it potentially.

-jgh