v1cont / yad

Yet Another Dialog
GNU General Public License v3.0
687 stars 57 forks source link

yad notification menu right click doesn't work anymore #52

Closed terminologie-x closed 5 years ago

terminologie-x commented 5 years ago

yad --version 3.0 (GTK+ 3.24.10)

hi Victor,

I recently switch from version yad 0.41 to 3.0-1 and thanks to you the icons are displayed correctly with the option --keep-icon-size. Now I have a problem with the notification icon in the taskbar. The Left-Click option works fine, but the Right-Click option for the menu doesn't work with the version 3.0-1. Maybe you could give me a hint, how to fix that.

this code works with version 0.41 yad --notification --listen --image='security-high' --menu=menulist

with the version 3.0-1 the Right Click does nothing, it just throws errors in the console when you right click the notification icon

(yad:3013): GLib-GObject-WARNING **: 18:20:10.979: invalid cast from 'GtkStatusIcon' to 'GtkWidget'

(yad:3013): Gtk-CRITICAL **: 18:20:10.979: gtk_menu_popup_at_widget: assertion 'GTK_IS_WIDGET (widget)' failed

(yad:3013): GLib-GObject-WARNING **: 18:20:11.045: invalid cast from 'GtkStatusIcon' to 'GtkWidget'

(yad:3013): Gtk-CRITICAL **: 18:20:11.045: gtk_menu_popup_at_widget: assertion 'GTK_IS_WIDGET (widget)' failed

any Idea ?

v1cont commented 5 years ago

fixed in 06de51c

terminologie-x commented 5 years ago

excellent Victor!

I can confirm that it works again with your changes in https://github.com/v1cont/yad/commit/06de51cff3ff4c98039161745f20c2c16a516cb3 , but I had to manually edit the src file in the version 4.1 and compile it on archlinux. Maybe I got the wrong src files ? https://github.com/v1cont/yad/archive/4.1.tar.gz

terminologie-x commented 5 years ago

just a quick info about https://github.com/v1cont/yad/commit/06de51cff3ff4c98039161745f20c2c16a516cb3

I left the line 207 as it is, because of a compile error (too few arguments) and made only the change in the line 257.

dshoreman commented 5 years ago

@terminologie-x The fix was made after 4.1's release; you'd need to install yad-git from AUR to get all the latest changes on the master branch.

Can confirm that building/installing the Git version (currently d25476efce7846164847b35f23f64cff7a01bf3a) fixes the context menu for me.

terminologie-x commented 5 years ago

that makes sense. Sorry, I overlooked this part YAD 4.1 Latest Release -> 2 commits to master since this release

many thanks Dave ! :+1: