~ubuntu-branches/ubuntu/maverick/wxwidgets2.8/maverick-proposed

« back to all changes in this revision

Viewing changes to wxPython/wx/lib/foldpanelbar.py

  • Committer: Bazaar Package Importer
  • Author(s): Devid Filoni
  • Date: 2008-06-30 22:02:17 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20080630220217-vag3tkfp91t0453d
Tags: 2.8.8.0-0ubuntu1
* New upstream version, based on the upstream tarball
  wxPython-src-2.8.8.0.tar.bz2, remove upstream debian dir (LP: #244355).
* Add debian/watch file, LP: #242164.
* Edit get-orig-source target to provide a .orig.tar.gz with the same md5 for
  each .orig.tar.gz generated.
* debian/rules: remove get-orig-source from .PHONY target.
* debian/control.in: add python-wxtools in python-wxgtk=V=U Suggests field.
* Do not apply fix_from_upstream_svn_r52465 patch, not needed.
* Regenerate octave_oct, tcl_tk_tcl patches for the new version.
* Fix spelling-error-in-description lintian warning.
* Fix depends-on-obsolete-package lintian error.
* Fix executable-not-elf-or-script lintian warnings.
* Fix script-not-executable lintian warnings.
* Fix missing-dependency-on-libc lintian error.
* Fix dbg-package-missing-depends lintian warnings.
* Fix package-contains-empty-directory lintian warnings.
* Fix manpage-has-errors-from-man lintian warning.
* Fix image-file-in-usr-lib lintian warnings:
  - add editra_pixmaps patch
  - add xrced_bitmaps patch
* Fix unused-override lintian info.
* Fix malformed-override lintian errors.
* Fix extra-license-file lintian warnings.
* Install upstream wx.pth instead of generated file links (LP: #211553).
* Add editra.png, pyshell.png (encoded using uuencode) icons, LP: #236876:
  - debian/rules: use uudecode to decode .png icons.
* Add a new pyshell.xpm icon.
* Fix doc-base-file-references-missing-file lintian error.
* Fix doc-base-unknown-section lintian warning.
* Fix ruby-script-but-no-ruby-dep lintian errors.
* Fix wish-script-but-no-wish-dep lintian errors.
* Fix missing-dep-for-interpreter errors.
* Bump Standards-Version to 3.8.0.

Show diffs side-by-side

added added

removed removed

Lines of Context:
122
122
# Collapsed And Expanded Bitmap Images
123
123
# Created With img2py.py 
124
124
#----------------------------------------------------------------------
125
 
 
126
 
def GetCollapsedIconData():
127
 
    return \
128
 
'\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\x10\x00\x00\x00\x10\x08\x06\
129
 
\x00\x00\x00\x1f\xf3\xffa\x00\x00\x00\x04sBIT\x08\x08\x08\x08|\x08d\x88\x00\
130
 
\x00\x007IDAT8\x8dcddbf\xa0\x040Q\xa4{\xf0\x1b\xf0\xff\xdf\xdf\xff\x03\xe7\
131
 
\x02\x98\xed\x84\\A\x1b\x17\xa0\xdb\x8a\xcf\x15\xd4w\x01.\xdbp\x89S\xec\x02\
132
 
\xc6\xd1\xbc\xc0\x00\x00\x9a\xf5\x1b\xfa\xf9m$?\x00\x00\x00\x00IEND\xaeB`\
133
 
\x82' 
134
 
 
135
 
def GetCollapsedIconBitmap():
136
 
    return wx.BitmapFromImage(GetCollapsedIconImage())
137
 
 
138
 
def GetCollapsedIconImage():
139
 
    import  cStringIO
140
 
    stream = cStringIO.StringIO(GetCollapsedIconData())
141
 
    return wx.ImageFromStream(stream)
142
 
 
143
 
#----------------------------------------------------------------------
144
 
def GetExpandedIconData():
145
 
    return \
146
 
'\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\x10\x00\x00\x00\x10\x08\x06\
147
 
\x00\x00\x00\x1f\xf3\xffa\x00\x00\x00\x04sBIT\x08\x08\x08\x08|\x08d\x88\x00\
148
 
\x00\x00BIDAT8\x8dcddbf\xa0\x040Q\xa4{P\x18\xc0\x82.\xf0\xff\xdf\xdf\xff\xb8\
149
 
\x143213R\xdd\x05\x18\x06`\xb3\x05\x9f8m\x02\x11\xdd6\\\xb6\xd3\xce\x05\xc8\
150
 
\xb6\xe2\xb3\x9d*.`\x1c\xcd\x0b\x0c\x00\x9e\xbc\x04W\x19\xcfa\xb5\x00\x00\
151
 
\x00\x00IEND\xaeB`\x82' 
152
 
 
153
 
def GetExpandedIconBitmap():
154
 
    return wx.BitmapFromImage(GetExpandedIconImage())
155
 
 
156
 
def GetExpandedIconImage():
157
 
    import  cStringIO
158
 
    stream = cStringIO.StringIO(GetExpandedIconData())
159
 
    return wx.ImageFromStream(stream)
160
 
 
161
 
#----------------------------------------------------------------------
 
125
from wx.lib.embeddedimage import PyEmbeddedImage
 
126
 
 
127
CollapsedIcon = PyEmbeddedImage(
 
128
    "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAADdJ"
 
129
    "REFUOI1jZGRiZqAEMFGke/Ab8P/f3/8D5wKY7YRcQRsXoNuKzxXUdwEu23CJU+wCxtG8wAAA"
 
130
    "mvUb+vltJD8AAAAASUVORK5CYII=")
 
131
 
 
132
ExpandedIcon = PyEmbeddedImage(
 
133
    "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAEJJ"
 
134
    "REFUOI1jZGRiZqAEMFGke1AYwIIu8P/f3/+4FDMyMTNS3QUYBmCzBZ84bQIR3TZcttPOBci2"
 
135
    "4rOdKi5gHM0LDACevARXGc9htQAAAABJRU5ErkJggg==")
162
136
 
163
137
#----------------------------------------------------------------------
164
138
# FOLDPANELBAR Starts Here
512
486
        if foldIcons is None:
513
487
            foldIcons = wx.ImageList(16, 16)
514
488
 
515
 
            bmp = GetExpandedIconBitmap()
 
489
            bmp = ExpandedIcon.GetBitmap()
516
490
            foldIcons.Add(bmp)
517
 
            bmp = GetCollapsedIconBitmap()
 
491
            bmp = CollapsedIcon.GetBitmap()
518
492
            foldIcons.Add(bmp)
519
493
 
520
494
        # set initial size
1072
1046
        if foldIcons is None:
1073
1047
            foldIcons = wx.ImageList(16, 16)
1074
1048
 
1075
 
            bmp = GetExpandedIconBitmap()
 
1049
            bmp = ExpandedIcon.GetBitmap()
1076
1050
            foldIcons.Add(bmp)
1077
 
            bmp = GetCollapsedIconBitmap()
 
1051
            bmp = CollapsedIcon.GetBitmap()
1078
1052
            foldIcons.Add(bmp)
1079
1053
    
1080
1054
        item = FoldPanelItem(self._foldPanel, -1, caption=caption,
1500
1474
        if foldIcons is None:
1501
1475
            foldIcons = wx.ImageList(16, 16)
1502
1476
 
1503
 
            bmp = GetExpandedIconBitmap()
 
1477
            bmp = ExpandedIcon.GetBitmap()
1504
1478
            foldIcons.Add(bmp)
1505
 
            bmp = GetCollapsedIconBitmap()
 
1479
            bmp = CollapsedIcon.GetBitmap()
1506
1480
            foldIcons.Add(bmp)
1507
1481
        
1508
1482
        self._foldIcons = foldIcons