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

gtk_status_icon_position_menu is deprecated #11

Open
tho068 opened this issue Sep 20, 2014 · 11 comments
Open

gtk_status_icon_position_menu is deprecated #11

tho068 opened this issue Sep 20, 2014 · 11 comments

Comments

@tho068
Copy link

tho068 commented Sep 20, 2014

This fails to build on GTK 3.13 due to the usage of a deprecated function.

test -f 'popup_menu.c' || echo './'popup_menu.c
popup_menu.c: In function ‘show_popup_menu’:
popup_menu.c:98:5: error: ‘gtk_status_icon_position_menu’ is deprecated (declared at /usr/include/gtk-3.0/gtk/deprecated/gtkstatusicon.h:160) [-Werror=deprecated-declarations]
gtk_menu_popup(GTK_MENU(menu), NULL, NULL, gtk_status_icon_position_menu,
^
cc1: all warnings being treated as errors
Makefile:465: recipe for target 'pa_applet-popup_menu.o' failed
make[2]: *** [pa_applet-popup_menu.o] Error 1
make[2]: Leaving directory '/tmp/yaourt-tmp-thomas/aur-pa-applet-git/src/pa-applet-git/src'
Makefile:357: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/tmp/yaourt-tmp-thomas/aur-pa-applet-git/src/pa-applet-git'
Makefile:297: recipe for target 'all' failed

Also, it seems like GTK is going to drop support for sys tray icons. Atleast I read that somewhere I thnik.

@fernandotcl
Copy link
Owner

Bummer. Any idea if there's a replacement? If the status icon API is going away without a simple replacement, I don't intend to fix this.

@tho068
Copy link
Author

tho068 commented Sep 22, 2014

I am not certain, sorry.

I totaly understand that. Lot of work going from one API to something else.

@JotaRandom
Copy link

you could remove the -Werror in the program, sure is anoying but when the time come sure someone could get a hack, but for now that message anoy users that want build the applet.

@fernandotcl
Copy link
Owner

Yeah, in hindsight leaving -Werror there wasn't a great idea. That said, I wouldn't take this warning lightly. It seems that core functionality pa-applet depends on is going to be removed soon with no drop in replacement.

@JotaRandom
Copy link

but leave it there prevent building in systems that have compatible
versions, so the best aproach I thing is warn the user but let build it
too.

2014-12-18 11:41 GMT-03:00 Fernando Lemos [email protected]:

Yeah, in hindsight leaving -Werror there wasn't a great idea. That said, I
wouldn't take this warning lightly. It seems that core functionality
pa-applet depends on is going to be removed soon with no drop in
replacement.


Reply to this email directly or view it on GitHub
#11 (comment)
.

Pablo Lezaeta

@Strubbl
Copy link

Strubbl commented Dec 23, 2014

In my fork, I just deactivated the error message. Builds successful on my system now.

@JotaRandom
Copy link

yes, that show that is building correctly.
Actually even if it weill going to be deprecated, they not say when, that
could happend in 2 releases or 20, you really want they users that want
build from upstream becom unable to build simply because this error?

2014-12-23 13:24 GMT-03:00 yes [email protected]:

In my fork, I just deactivated the error message. Builds successful on my
system now.


Reply to this email directly or view it on GitHub
#11 (comment)
.

Pablo Lezaeta

@fernandotcl
Copy link
Owner

The next release will, most likely, remove -Werror. What I wanted to point out is that this is a serious warning regardless. Don't read more into it.=

@LeoKSimon
Copy link

Hi, would somebody mind explaining in more detail exactly what file and lines are commented out in order to deactivate the error message to make this work? I'm surprised that 2 years later this is still an issue? I'm running Ubuntu 16.04. Thanks very much for any help: Here in detail is the output from make:

root@E5570:local/src/pa-applet-master#make
make all-recursive
make[1]: Entering directory '/usr/local/src/pa-applet-master'
Making all in man
make[2]: Entering directory '/usr/local/src/pa-applet-master/man'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/usr/local/src/pa-applet-master/man'
Making all in src
make[2]: Entering directory '/usr/local/src/pa-applet-master/src'
gcc -DHAVE_CONFIG_H -I. -I.. -std=c99 -D_GNU_SOURCE -Wall -Werror -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -pthread -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/gtk-3.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/mirclient -I/usr/include/mircommon -I/usr/include/mircookie -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng12 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -D_REENTRANT -D_REENTRANT -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -pthread -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng12 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -g -O2 -MT pa_applet-popup_menu.o -MD -MP -MF .deps/pa_applet-popup_menu.Tpo -c -o pa_applet-popup_menu.o test -f 'popup_menu.c' || echo './'popup_menu.c
popup_menu.c: In function ‘show_popup_menu’:
popup_menu.c:98:5: error: ‘gtk_status_icon_position_menu’ is deprecated [-Werror=deprecated-declarations]
gtk_menu_popup(GTK_MENU(menu), NULL, NULL, gtk_status_icon_position_menu,
^
In file included from /usr/include/gtk-3.0/gtk/gtk.h:261:0,
from popup_menu.c:10:
/usr/include/gtk-3.0/gtk/deprecated/gtkstatusicon.h:160:23: note: declared here
void gtk_status_icon_position_menu (GtkMenu *menu,
^
cc1: all warnings being treated as errors
Makefile:475: recipe for target 'pa_applet-popup_menu.o' failed
make[2]: *** [pa_applet-popup_menu.o] Error 1
make[2]: Leaving directory '/usr/local/src/pa-applet-master/src'
Makefile:367: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/usr/local/src/pa-applet-master'
Makefile:308: recipe for target 'all' failed
make: *** [all] Error 2

@mschwager
Copy link

I'm currently getting this error on Ubuntu 16.04 as well.

Though, the suggested patch fixes it. @LeoKSimon you have to make this change: https://github.com/Strubbl/pa-applet/commit/451f68353ffad9c4cf988a022cb92864655fd7f1

It'd be awesome if this code was either updated to avoid the deprecated function (preferable), or the warning was squelched!

@mschwager
Copy link

I've also forked this project and included this fix (among other things): https://github.com/mschwager/pa-applet

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

No branches or pull requests

6 participants