I'm the correspondent Rob refers to below ...
I've now tried a remote Debian box (instead of Solaris) for the display,
& again get a mottled pixmap. Also, I've made the icon toggle between this
& another icon when clicked, & the mottling is different each time.
Hope this stimulates someone,
Thanks,
Brian Keck
On Fri, 03 Nov 2000 22:00:27 +1000, "Rob Hodges" wrote:
>Hi,
>
>I've received a question about a taskbar app I wrote, and I'm hoping
>someone here might recognise the problem. After some correspondence
>we've found that the colours in a pixmap appear strange when the app
>is run remotely on a Debian box, using a Solaris box for the display.
>
>When it can't find anything better, the taskbar uses a default icon
>created from inline xpm data like this:
>
> default_icon = [
> "16 16 2 1",
> "# c #000000",
> ". c None",
> "................",
> "................",
> "..############..",
> "..#..........#..",
> "..#..........#..",
> "..#..........#..",
> "..#..........#..",
> "..#..........#..",
> "..#..........#..",
> "..#..........#..",
> "..#..........#..",
> "..#..........#..",
> "..#..........#..",
> "..############..",
> "................",
> "................"]
>
>The way it does this is (I think) pretty standard:
>
> p = create_pixmap_from_xpm_d(self.mainbox, None, default_icon)
> self.icon = GtkPixmap(p[0], p[1])
> self.icon.show()
> self.mainbox.pack_start(self.icon, FALSE,FALSE,2)
> self.mainbox.reorder_child(self.icon, 0)
> ...
>
>(Here, 'self' is a subclassed GtkToggleButton).
>
>He reports that when it's running on the Debian box but displayed on
>the Solaris box, "though I get a square, it's mottled white & black &
>yellow & green etc. (The interior is OK (transparent), just the
>boundary is peculiar.)"
>
>The problem does not manifest itself when it's displayed on the Debian
>box.
>
>Rather confusingly, it is also not manifest in this simple script,
>whether the display is remote or local:
>
>--8<----------------------------------------------------------
>
>#! /usr/bin/env python
>
>from gtk import *
>
>w = GtkWindow(WINDOW_TOPLEVEL)
>w.connect('delete_event', mainquit)
>
>open_icon = [
> "16 16 2 1",
> "# c #000000",
> ". c None",
> "................",
> "................",
> "..############..",
> "..#..........#..",
> "..#..........#..",
> "..#..........#..",
> "..#..........#..",
> "..#..........#..",
> "..#..........#..",
> "..#..........#..",
> "..#..........#..",
> "..#..........#..",
> "..#..........#..",
> "..############..",
> "................",
> "................"
> ]
>
>p = create_pixmap_from_xpm_d(w, None, open_icon)
>icon = GtkPixmap(p[0], p[1])
>icon.show()
>w.add(icon)
>w.show()
>w.set_default_size(200,200)
>mainloop()
>
>--8<----------------------------------------------------------
>
>I'm short on ideas, so I'd be extremely grateful to anyone who could
>offer any suggestions as to why this might be happening. I don't have
>the hardware to reproduce it, but Brian is also lurking here and will
>be able to test out any theories (however far-fetched!).
>
>Thanks,
>-Rob
>
>_______________________________________________
>pygtk mailing list [EMAIL PROTECTED]
>http://www.daa.com.au/mailman/listinfo/pygtk
>
_______________________________________________
pygtk mailing list [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk