cratonica / trayhost

Cross-platform Go library to place an icon in the host operating system's taskbar
MIT License
280 stars 60 forks source link

Build error on Ubuntu 20.04 #10

Open sybrenstuvel opened 3 years ago

sybrenstuvel commented 3 years ago

Running go get github.com/cratonica/trayhost results in these errors:

# github.com/cratonica/trayhost
In file included from ../../../go/pkg/mod/github.com/cratonica/trayhost@v0.0.0-20150112162955-98495206fd96/platform/platform.h:10,
                 from ../../../go/pkg/mod/github.com/cratonica/trayhost@v0.0.0-20150112162955-98495206fd96/trayhost.go:43:
../../../go/pkg/mod/github.com/cratonica/trayhost@v0.0.0-20150112162955-98495206fd96/platform/linux/tray.c: In function ‘tray_icon_on_menu’:
../../../go/pkg/mod/github.com/cratonica/trayhost@v0.0.0-20150112162955-98495206fd96/platform/linux/tray.c:62:5: 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]
   62 |     gtk_menu_popup(GTK_MENU(menu), NULL, NULL, NULL, NULL, 0, gtk_get_current_event_time());
      |     ^~~~~~~~~~~~~~
In file included from /usr/include/gtk-3.0/gtk/gtklabel.h:34,
                 from /usr/include/gtk-3.0/gtk/gtkaccellabel.h:35,
                 from /usr/include/gtk-3.0/gtk/gtk.h:33,
                 from ../../../go/pkg/mod/github.com/cratonica/trayhost@v0.0.0-20150112162955-98495206fd96/platform/linux/tray.c:6,
                 from ../../../go/pkg/mod/github.com/cratonica/trayhost@v0.0.0-20150112162955-98495206fd96/platform/platform.h:10,
                 from ../../../go/pkg/mod/github.com/cratonica/trayhost@v0.0.0-20150112162955-98495206fd96/trayhost.go:43:
/usr/include/gtk-3.0/gtk/gtkmenu.h:138:9: note: declared here
  138 | void    gtk_menu_popup    (GtkMenu        *menu,
      |         ^~~~~~~~~~~~~~
In file included from ../../../go/pkg/mod/github.com/cratonica/trayhost@v0.0.0-20150112162955-98495206fd96/platform/platform.h:10,
                 from ../../../go/pkg/mod/github.com/cratonica/trayhost@v0.0.0-20150112162955-98495206fd96/trayhost.go:43:
../../../go/pkg/mod/github.com/cratonica/trayhost@v0.0.0-20150112162955-98495206fd96/platform/linux/tray.c: In function ‘create_tray_icon’:
../../../go/pkg/mod/github.com/cratonica/trayhost@v0.0.0-20150112162955-98495206fd96/platform/linux/tray.c:73:5: warning: ‘gtk_status_icon_new_from_pixbuf’ is deprecated [-Wdeprecated-declarations]
   73 |     tray_icon = gtk_status_icon_new_from_pixbuf(pixbuf);
      |     ^~~~~~~~~
In file included from /usr/include/gtk-3.0/gtk/gtk.h:275,
                 from ../../../go/pkg/mod/github.com/cratonica/trayhost@v0.0.0-20150112162955-98495206fd96/platform/linux/tray.c:6,
                 from ../../../go/pkg/mod/github.com/cratonica/trayhost@v0.0.0-20150112162955-98495206fd96/platform/platform.h:10,
                 from ../../../go/pkg/mod/github.com/cratonica/trayhost@v0.0.0-20150112162955-98495206fd96/trayhost.go:43:
/usr/include/gtk-3.0/gtk/deprecated/gtkstatusicon.h:86:23: note: declared here
   86 | GtkStatusIcon        *gtk_status_icon_new_from_pixbuf    (GdkPixbuf          *pixbuf);
      |                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../../../go/pkg/mod/github.com/cratonica/trayhost@v0.0.0-20150112162955-98495206fd96/platform/platform.h:10,
                 from ../../../go/pkg/mod/github.com/cratonica/trayhost@v0.0.0-20150112162955-98495206fd96/trayhost.go:43:
../../../go/pkg/mod/github.com/cratonica/trayhost@v0.0.0-20150112162955-98495206fd96/platform/linux/tray.c:76:5: warning: ‘gtk_status_icon_set_tooltip_text’ is deprecated [-Wdeprecated-declarations]
   76 |     gtk_status_icon_set_tooltip_text(tray_icon, menu_title);
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/gtk-3.0/gtk/gtk.h:275,
                 from ../../../go/pkg/mod/github.com/cratonica/trayhost@v0.0.0-20150112162955-98495206fd96/platform/linux/tray.c:6,
                 from ../../../go/pkg/mod/github.com/cratonica/trayhost@v0.0.0-20150112162955-98495206fd96/platform/platform.h:10,
                 from ../../../go/pkg/mod/github.com/cratonica/trayhost@v0.0.0-20150112162955-98495206fd96/trayhost.go:43:
/usr/include/gtk-3.0/gtk/deprecated/gtkstatusicon.h:137:23: note: declared here
  137 | void                  gtk_status_icon_set_tooltip_text   (GtkStatusIcon      *status_icon,
      |                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../../../go/pkg/mod/github.com/cratonica/trayhost@v0.0.0-20150112162955-98495206fd96/platform/platform.h:10,
                 from ../../../go/pkg/mod/github.com/cratonica/trayhost@v0.0.0-20150112162955-98495206fd96/trayhost.go:43:
../../../go/pkg/mod/github.com/cratonica/trayhost@v0.0.0-20150112162955-98495206fd96/platform/linux/tray.c:77:5: warning: ‘gtk_status_icon_set_visible’ is deprecated [-Wdeprecated-declarations]
   77 |     gtk_status_icon_set_visible(tray_icon, TRUE);
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/gtk-3.0/gtk/gtk.h:275,
                 from ../../../go/pkg/mod/github.com/cratonica/trayhost@v0.0.0-20150112162955-98495206fd96/platform/linux/tray.c:6,
                 from ../../../go/pkg/mod/github.com/cratonica/trayhost@v0.0.0-20150112162955-98495206fd96/platform/platform.h:10,
                 from ../../../go/pkg/mod/github.com/cratonica/trayhost@v0.0.0-20150112162955-98495206fd96/trayhost.go:43:
/usr/include/gtk-3.0/gtk/deprecated/gtkstatusicon.h:151:23: note: declared here
  151 | void                  gtk_status_icon_set_visible        (GtkStatusIcon      *status_icon,
      |                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~

This is with libgtk-3-dev version 3.24.20-0ubuntu1