gnumed-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnumed-devel] Re: new developer... little changes to gmBMICalc & gmPr


From: Michael Bonert
Subject: [Gnumed-devel] Re: new developer... little changes to gmBMICalc & gmPreg Calc
Date: Tue, 31 Dec 2002 18:55:31 -0500 (EST)

Hi Karsten:

I do not know why you are having problem exiting the Pregnancy
calculator.  I ran it standalone without problems.

Could you please test the following little tid bit of code?
-----
#!/bin/env python
# A little program to show how window icons are set.  Requires 'images_test'
from wxPython.wx import *
import images_test

class MyFrame(wxFrame):
        def __init__(self,parent,id,title):
                
wxFrame.__init__(self,parent,-4,title,size=(300,150),style=wxMAXIMIZE_BOX)
                # wxMAXMIZE_BOX disables maximize button & resizing

                icon=images_test.getBMICalcIcon()       # get icon
                self.SetIcon(icon)                      # set icon


app = wxPySimpleApp()
frame = MyFrame(None, -1, "Recognize the Icon?")
frame.Show(1)
app.MainLoop()
-----

----- save as 'images_test.py' -----
# This file was created by copying some stuff out of the file 
"images_gnuMedGP_Toolbar.py"
# and then making a few minor additions.
from wxPython.wx import wxBitmapFromXPMData, wxImageFromBitmap, wxEmptyIcon
import cPickle, zlib

def getToolbar_BMICalcData():
    return cPickle.loads(zlib.decompress(
'x\xda]\x90\xbd\n\x83P\x0c\x85\xf7>E ^,\x08\xe1\xbaT\xc7P\xc55\x83\xcb]\xc5\
\xb1\x82}\xff\xa9\x89\xf7Gm\x0c\xc2\xf9r\x92\x18\x9f\xdb\xb7}\xccu\xfb\x02K\
\x0fm\xfdX\xe6\x9a`\x85\xf7\xb6\xac\x9fC\x05U\xd8\xf5\xdd\xe0\xfd\xa1%\xeb\
\xae?4\x98\x1e\xfbq\x18\xa3nb\xdd\xfb\xe4\xdfMO\xfd\x94\xfb+\xd3\xde\x17\xcd\
address@hidden(0h\xe6W\x82r\x8b\x04\xa9\x11\
\xb8D\x82A\x84\x99\xad\x82X\x16\x05\xe1\x8a\xb9\x12 w\x85BL"\xe8\xf49!\x08\
\x93\xf6*\xa4+\xac\x88\x9cC\xf9w:D\x10\xbc9\xd9\xc6\xc1\xddi\xbd`\xf0\xbc\
\xdd\xf6\xb2\x9dC\xc5\xa9\x1f\xaf\x8bc\x94\x99\x12\xf4\xef\xe9-1\r\xd2\x0fX\
\x95oP' ))

def getToolbar_BMICalcBitmap():
    return wxBitmapFromXPMData(getToolbar_BMICalcData())

def getToolbar_BMICalcImage():
    return wxImageFromBitmap(getToolbar_BMICalcBitmap())

# This method was added
def getBMICalcIcon():
    icon = wxEmptyIcon()
    icon.CopyFromBitmap(getToolbar_BMICalcBitmap())
    return icon
-----

If the above runs okay I'm baffled.  If it doesn't we
might be able to narrow the problem down a bit.


I'm wondering whether differences in our set-up could
be the cause...

I'm running the following:
OS                      Mandrake Linux 9.0
Desktop                 KDE 3.0
Python                  2.2.1
GTK libraries           2.0
mx extension libraries  2.0.4
PostgreSQL              7.2.2
wxWindows               2.2-2.3.3.1
PyPgSQL                 2.2
GCC                     3.2


>IMHO we would put icon data into the
>approprate files as has happened with quite a
>few plugins already.
Ok. I can integrate the icons directly in gmCalcPreg.py
and gmBMICalc.py.

I'll also write a small encoder... if I can get hold
of the original pictures files (I didn't manage to
find them on CVS).

Take Care,
Michael





reply via email to

[Prev in Thread] Current Thread [Next in Thread]