Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for tooltips #17

Closed
wants to merge 3 commits into from
Closed

Conversation

gber
Copy link

@gber gber commented Mar 5, 2021

This also adds version checking macros in order to allow consumers to write backwards-compatible code. Note that this does not update the bindings since I'm unfamiliar with that.

@sunweaver sunweaver mentioned this pull request Jun 7, 2021
@sunweaver
Copy link
Member

@gber: We did a hell of a change for libayatana-appindicator recently (autoconf -> cmake). Can you rebase your PR branch please, please? Thanks

@gber
Copy link
Author

gber commented Jun 12, 2021

I'm already on it, the only remaining issue is making g-ir-scanner work with the out of tree build, where one part of the header is inside the tree and the other one generated in the build directory. Needs some investigation/experiments.

@gber gber force-pushed the master branch 5 times, most recently from 39ac33b to fc6f9f1 Compare June 13, 2021 19:39
@gber
Copy link
Author

gber commented Jun 14, 2021

Something goes wrong with the GTK# bindings code generation, but I have zero experience with GTK# or C#.

@gber
Copy link
Author

gber commented Jun 15, 2021

@sunweaver
Building ayatana-appindicator3-sharp.dll fails with the following errors:

/home/gber/libayatana-appindicator/build/bindings/mono/AyatanaAppIndicator/ApplicationIndicator.cs(612,16): error CS1001: Unexpected symbol `=', expecting identifier
/home/gber/libayatana-appindicator/build/bindings/mono/AyatanaAppIndicator/ApplicationIndicator.cs(637,93): error CS1001: Unexpected symbol `;', expecting identifier
/home/gber/libayatana-appindicator/build/bindings/mono/AyatanaAppIndicator/ApplicationIndicator.cs(847,26): error CS1519: Unexpected symbol `;' in class, struct, or interface member declaration

Apparently the code generator fails to generate some method names, but I'm not sure what causes it.

@Betterbird
Copy link

Betterbird commented Dec 27, 2021

I've used this patch in a test program with this code:

    app_indicator_set_status (ci, APP_INDICATOR_STATUS_ACTIVE);
    app_indicator_set_icon_full(ci, LOCAL_ICON, "Local Icon");
    app_indicator_set_title (ci, "Test Icon Title");
    app_indicator_set_tooltip_full (ci, NULL /* icon */, "New Mail", "Inbox: 2, Github: 1");

The result on Mint with an XFCE is that the tooltip is displayed underneath the icon, if the panel is horizontal, one can only see a light line at the bottom of the screen, no tooltip is visible. For a vertical panel, you see this:
image
The body of the tooltip is also missing. BTW, if you don't supply a tooltip title, the title is taken from the "set title" call.

EDIT: Full code and sample program here: Betterbird/thunderbird-patches#20 (comment)

@Betterbird
Copy link

I gave my test program to a few people to play with. So far, I haven't seen an installation where it worked. KDE seems to display the app indicator title, not the tooltip:
https://www.thunderbird-mail.de/forum/thread/88737-hilfe-beim-testen-des-systray-panel-indicators-auf-linux/?postID=489690#post489690
Also here: Betterbird/thunderbird-patches#20 (comment), that was with the current API ... and the tipo from here:

app_indicator_set_title (ci, "Test Inidcator");

@gber : On which platform did you test this?

@Betterbird
Copy link

We've integrated the application indicator into Betterbird now, see Betterbird/thunderbird-patches#20 (comment).

@sunweaver @gber - Any chance to get the tooltips?

@Betterbird
Copy link

We've decided to take the tooltip patch (fc6f9f1) to Betterbird:
https://github.com/Betterbird/thunderbird-patches/blob/main/102/features/12-feature-linux-systray-tooltip.patch

It works well enough. We had no luck with the tooltip body, but the title works well enough. On our installations, if the dock/panel/taskbar was at the bottom of the screen, the tooltip was drawn beneath it, that is off-screen (already mentioned in #17 (comment)) and hence invisible.

Guido Berhoerster and others added 3 commits March 24, 2023 14:52
Make includes work though a symlink rather than modifying the generated
sources.  This is necessary so that headers included from the main header work.
An icon, title and text body may be set independently or at once resulting in a
single signal.  Markup in the text body is not supported for simplicity.
@gber
Copy link
Author

gber commented Mar 24, 2023

On which platform did you test this?

IIRC I tested this with Xfce back then, need to check current platforms (KDE, Xfce, Gnome Shell extension) again.

@sunweaver @gber - Any chance to get the tooltips?

I've rebased this against master, just the C# binding problem remains. I'll work on this as time permits.

@Betterbird
Copy link

IIRC I tested this with Xfce back then, need to check current platforms (KDE, Xfce, Gnome Shell extension) again.

As I wrote earlier, we've deployed the tooltips for a few months now. Mileage varies, it works best on KDE and Xfce and explicitly doesn't work on Gnome.

Of course there is also issue #62 which we had to fix.

@tari01
Copy link
Member

tari01 commented Mar 24, 2023

@gber: We should wait with this until #63 goes in first to take care of the type signature/documentation/binding mess.

@Betterbird
Copy link

@sunweaver
Copy link
Member

Superceded finally by #82

@sunweaver sunweaver closed this Oct 18, 2024
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.

4 participants