Skip Menu |

This queue is for tickets about the Gtk2-TrayIcon CPAN distribution.

Report information
The Basics
Id: 52154
Status: resolved
Priority: 0/
Queue: Gtk2-TrayIcon

People
Owner: Nobody in particular
Requestors: DRAXIL [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: (no value)
Fixed in: (no value)



Subject: Gtk2::TrayIcon doesn't seem to like Gtk2 + Threads
If I issue the following: use Gtk2::TrayIcon; use Gtk2 '-init -threads-init'; my $tray_icon = Gtk2::TrayIcon->new( "boo" ); I get: GLib-GObject-WARNING **: invalid (NULL) pointer instance at - line 3. GLib-GObject-CRITICAL **: g_signal_connect_data: assertion `G_TYPE_CHECK_INSTANCE (instance)' failed at - line 3. If I remove the threads init.. Then all is well.
On Sat Nov 28 13:31:58 2009, DRAXIL wrote: Show quoted text
> use Gtk2 '-init -threads-init';
This is incorrect. It results in Gtk2->import being called with just one argument: '-init -threads-init'. But you want it called with two arguments: '-init' and '-threads-init'. So use use Gtk2 '-init', '-threads-init'; or use Gtk2 qw/-init -threads-init/; Also, note that Gtk2::TrayIcon is deprecated now that Gtk2 contains Gtk2::StatusIcon.