GNOME Bugzilla – Bug 622550
Don't link against a particular version of GTK+
Last modified: 2010-06-30 19:11:39 UTC
As per patch
Created attachment 164461 [details] [review] Don't link against a particular version of GTK+ Instead, open ourselves through GModule, and check whether we have all the GTK+ and GDK functions required for us to work correctly. This means that the front-end application cannot rely on libnotify linking against GTK+, which would only be a problem for edge-cases.
Created attachment 164462 [details] [review] Use g_object_get() to get pixbuf properties Instead of 7 separate gdk_pixbuf function calls.
Comment on attachment 164462 [details] [review] Use g_object_get() to get pixbuf properties Attachment 164462 [details] pushed as 1f85092 - Use g_object_get() to get pixbuf properties
Created attachment 164479 [details] [review] Don't link against a particular version of GTK+ Instead, open ourselves through GModule, and check whether we have all the GTK+ and GDK functions required for us to work correctly. This means that the front-end application cannot rely on libnotify linking against GTK+, which would only be a problem for edge-cases.
Attachment 164479 [details] pushed as 0eb56b2 - Don't link against a particular version of GTK+
This is not portable. libnotify explicitly depends on symbols from libgdk/libgtk. On PE platforms (Cygwin/MinGW), as well as on Linux when linked with -Wl,z,defs, all symbols must be resolved at link time, so the build fails: .libs/notify.o:notify.c:(.data+0x4): undefined reference to `_gdk_screen_make_display_name' .libs/notify.o:notify.c:(.data+0xc): undefined reference to `_gdk_window_get_origin' .libs/notify.o:notify.c:(.data+0x14): undefined reference to `_gtk_status_icon_get_geometry' .libs/notify.o:notify.c:(.data+0x1c): undefined reference to `_gtk_status_icon_get_x11_window_id' .libs/notify.o:notify.c:(.data+0x24): undefined reference to `_gtk_widget_get_allocation' .libs/notify.o:notify.c:(.data+0x2c): undefined reference to `_gtk_widget_get_has_window' .libs/notify.o:notify.c:(.data+0x34): undefined reference to `_gtk_widget_get_screen' .libs/notify.o:notify.c:(.data+0x3c): undefined reference to `_gtk_widget_get_window' .libs/notification.o:notification.c:(.text+0x14a9): undefined reference to `_gdk_screen_get_type' .libs/notification.o:notification.c:(.text+0x14ff): undefined reference to `_gdk_screen_make_display_name' .libs/notification.o:notification.c:(.text+0x1657): undefined reference to `_gtk_status_icon_get_x11_window_id' .libs/notification.o:notification.c:(.text+0x1680): undefined reference to `_gtk_status_icon_get_geometry' .libs/notification.o:notification.c:(.text+0x18ef): undefined reference to `_gtk_widget_get_screen' .libs/notification.o:notification.c:(.text+0x18fa): undefined reference to `_gtk_widget_get_window' .libs/notification.o:notification.c:(.text+0x1910): undefined reference to `_gdk_window_get_origin' .libs/notification.o:notification.c:(.text+0x191f): undefined reference to `_gtk_widget_get_allocation' .libs/notification.o:notification.c:(.text+0x1927): undefined reference to `_gtk_widget_get_has_window' .libs/notification.o:notification.c:(.text+0x1a0b): undefined reference to `_gtk_status_icon_get_type' .libs/notification.o:notification.c:(.text+0x1d73): undefined reference to `_gtk_status_icon_get_type' .libs/notification.o:notification.c:(.text+0x1e4f): undefined reference to `_gtk_widget_get_type' .libs/notification.o:notification.c:(.text+0x20a3): undefined reference to `_gtk_widget_get_type' .libs/notification.o:notification.c:(.text+0x20e4): undefined reference to `_gtk_status_icon_get_type' Please revert and reopen.
(In reply to comment #6) > This is not portable. libnotify explicitly depends on symbols from > libgdk/libgtk. On PE platforms (Cygwin/MinGW), as well as on Linux when linked > with -Wl,z,defs, all symbols must be resolved at link time, so the build fails: What's the use of libnotify on Windows?
Cygwin != Windows. Cygwin is a *NIX/X11 platform and libnotify/notification-daemon work just like on other *NIX platforms.