! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Support Gtk 3.20
Status:
RESOLVED: FIXED
Product:
Xfce4-mount-plugin
Component:
General

Comments

Description poma 2017-02-20 15:41:52 CET
Created attachment 7011 
Support Gtk 3.20

$ PANEL_DEBUG=1 xfce4-panel
...
Add New Items - Mount devices
...
xfce4-panel(module): new item (type=external-wrapper, name=xfce4-mount-plugin, id=32)
xfce4-panel(external): xfce4-mount-plugin-32: child spawned; pid=28727, argc=8
xfce4-panel(application): saving /panels/panel-1: ids=true, providers=false

(process:28727): GLib-WARNING **: (gerror.c:405):g_error_new_valist: runtime check failed: (domain != 0)

(process:28727): xfce4-panel-wrapper-CRITICAL **: Wrapper xfce4-mount-plugin-32: Failed to open plugin module "/usr/lib64/xfce4/panel/plugins/libmount.so": /usr/lib64/xfce4/panel/plugins/libmount.so: undefined symbol: gtk_menu_popup_at_widget.
xfce4-panel(external): xfce4-mount-plugin-32: child exited with status 256
xfce4-panel-Message: Plugin xfce4-mount-plugin-32 has been automatically restarted after crash.
xfce4-panel(external): xfce4-mount-plugin-32: scheduled a respawn of the child
xfce4-panel(external): xfce4-mount-plugin-32: child spawned; pid=28728, argc=8

(process:28728): GLib-WARNING **: (gerror.c:405):g_error_new_valist: runtime check failed: (domain != 0)

(process:28728): xfce4-panel-wrapper-CRITICAL **: Wrapper xfce4-mount-plugin-32: Failed to open plugin module "/usr/lib64/xfce4/panel/plugins/libmount.so": /usr/lib64/xfce4/panel/plugins/libmount.so: undefined symbol: gtk_menu_popup_at_widget.
xfce4-panel(external): xfce4-mount-plugin-32: child exited with status 256
...
Comment 1 Fabian Nowak editbugs 2017-02-20 22:29:17 CET
On Debian 9, GTK 3.22.7, everything compiled, linked and ran very fine; now with your patch:

gcc ... -c mount-plugin.c  -fPIC -DPIC -o .libs/libmount_la-mount-plugin.o
mount-plugin.c: In function ‘on_button_press’:
mount-plugin.c:363:9: warning: ‘gtk_menu_popup’ is deprecated: Use '(gtk_menu_popup_at_widget, gtk_menu_popup_at_pointer, gtk_menu_popup_at_rect)' instead [-Wdeprecated-declarations]
         gtk_menu_popup (GTK_MENU(mounter->menu), NULL, NULL,
         ^~~~~~~~~~~~~~
In file included from /usr/include/gtk-3.0/gtk/gtklabel.h:34:0,
                 from /usr/include/gtk-3.0/gtk/gtkaccellabel.h:35,
                 from /usr/include/gtk-3.0/gtk/gtk.h:33,
                 from mount-plugin.h:30,
                 from mount-plugin.c:26:
/usr/include/gtk-3.0/gtk/gtkmenu.h:138:9: note: declared here
 void    gtk_menu_popup    (GtkMenu        *menu,
         ^~~~~~~~~~~~~~

So this is not the solution. What kind of system are you using, which versions do you have, what would you want to achieve exactly? Gtk 3.20 is supported as of now; your patch does not work with newer systems. Maybe the panel plugin does not work with older versions now. There was a discussion on the mailing list on the supported GTK 3 versions recently, will have to find that and see whether some more work towards older GTK3 versions than 3.22 is required.
Comment 2 poma 2017-02-21 10:45:09 CET
Created attachment 7015 
Disperse on_button_press() amongst GTK+ 3 versions - adds support for lower than 3.22.

Tested on:
Fedora 24 (Twenty Four)
&
Fedora 26 (Rawhide)

gtk3-3.20.9-2.fc24.x86_64
xfce4-mount-plugin-1.1.1-4.20170219gitc111c7d.fc24.x86_64
&
gtk3-3.22.8-1.fc26.x86_64
xfce4-mount-plugin-1.1.1-4.20170219gitc111c7d.fc26.x86_64
Comment 3 Fabian Nowak editbugs 2017-02-21 20:15:26 CET
OK
Comment 4 Fabian Nowak editbugs 2017-02-21 20:50:11 CET
Release v1.1.2

Bug #13369

Reported by:
poma
Reported on: 2017-02-20
Last modified on: 2017-02-21

People

Assignee:
Fabian Nowak
CC List:
0 users

Version

Version:
unspecified

Attachments

Additional information