[Gtk-sharp-list] Update statusIcon gtk pixbuf

Bojan Rajkovic bojanr at brandeis.edu
Mon Jun 1 17:56:14 EDT 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

SomeIrishGuy wrote:
> private StatusIcon trayIcon;
>
> in the constructor i have
>
> Constructor
> {
> this.trayIcon = new StatusIcon(getStatusIconPixbuf());
> ......
> }
>
>
> private Pixbuf getStatusIconPixbuf() // returns a generated pixbuf
> {
> .......
> }
>
>
>
>
> this works fine, but i would like to be able to change the pixbuf
> icon in the statusmenu at periodical intervals using a timer
>
> i seems to cause havok though, as the menu no longer draws correctly
and the
> pixbuf just goes blank
>
> i presume i've done something to the main thread (cross invocation
> exception), but i cant find any documentation on how to invoke a change
> managed by a delegate for this event.
>
> Thanks.
> Dave.
>
> mono 2.4
> gtk#2.12.8
Use Application.Invoke with a delegate that sets the status icon.

- --
Bojan Rajkovic <bojanr at brandeis.edu>
Biochemistry '10, Brandeis University
PGP Signature Key ID: 0x8783D016
PGP Encryption Key ID: 0x2497B8B2
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iQIcBAEBCAAGBQJKJE56AAoJEO4IwQyHg9AW4VgQAJ9N6r4zwbVAOqgLEF6Yj+dY
Bbxm6Ggr75mBWPkYny2jlqXqUZTw6hn9+GEsyV9hA/T9U5Zl3imkDavOcH7uEHBc
Z5CCKBrkDBjN8u0CTn1jCpzKg9ZSxjF+EhtsOX8e71w5Kj9tjf5xiuBfQGMMrhNq
wRI8gz+hfnsrJHuMOSkkzebYoFLE94Om0kOyeFjVZxIp9BVRmNGnFHlWocFHkVjW
xdQbEiGpuqjL3ueKX/1L+PsU7X4kvj6dr79RXTEMuhWCuSVZ7kQ5vON/ttsldoj9
+3z1KkzdzdWjKhpIU2nLTqy5SW5WqEe9TkOZuQrnc9SqATsqflOvVsieEzVCj8e+
LBmDWXidG8C/daFJ27DIqUp/nURI5brXZCAVa6mrBptxKu9VNcAHm+ZoBxhFp/G8
g4Teg+anYGm2+/oyk16GBHwz//1WpTSlAYP1pIOCnn1Vau12NgWiyq22I47uenlo
vB2iKZfsYNer/35Xt3UGq1RsNibNklTtoTF1q/J5aF2IrkTEdrwr7pMKmJg9sBUz
aLBlKzthlM8oVfSm1a+IAyqQfohoeDetoQhAF5LZj63+8owcSf3spshRWowfJxiF
c7OhsNibpCb5lLyRuy2AwRn6i9YK5WavXRRTRzQWyl8W1x2TlPe486Mr7rsmxixE
ym+AxZzcMReWBgqRDuQv
=UzYI
-----END PGP SIGNATURE-----



More information about the Gtk-sharp-list mailing list