コード例 #1
0
 def _icons(self):
     """get/cache icons"""
     if self._iconcache:
         return self._iconcache
     ICO_PAINT = icon.by_name('paint-brush')
     ICO_LINE = icon.by_name('pencil')
     ICO_PLANE = icon.by_name('grid')
     ICO_SLICE = icon.by_name('cutter')
     self._iconcache = dict(
             wireframe=ICO_LINE,
             polygons=ICO_PAINT,
             platform=ICO_PLANE,
             slices = ICO_SLICE,
             )
     return self._iconcache
コード例 #2
0
 def _icons(self):
     """get/cache icons"""
     if self._iconcache:
         return self._iconcache
     ICO_PAINT = icon.by_name('paint-brush')
     ICO_LINE = icon.by_name('pencil')
     ICO_PLANE = icon.by_name('grid')
     ICO_SLICE = icon.by_name('cutter')
     self._iconcache = dict(
         wireframe=ICO_LINE,
         polygons=ICO_PAINT,
         platform=ICO_PLANE,
         slices=ICO_SLICE,
     )
     return self._iconcache
コード例 #3
0
    def test_load_icon(self):
        """Load various icons"""
        icons = dict()

        #icons['address-book'] = by_name('address-book')
        #icons['abacus'] = by_name('abacus')
        #This segfaults if we load by image, so... we don't test.
        icons["edit-undo"] = by_name("edit-undo")
        for name, icon in icons.iteritems():
            assert not icon.isNull()
コード例 #4
0
    def test_load_icon(self):
        """Load various icons"""
        icons = dict()

        #icons['address-book'] = by_name('address-book')
        #icons['abacus'] = by_name('abacus')
        #This segfaults if we load by image, so... we don't test.
        icons["edit-undo"] = by_name("edit-undo")
        for name, icon in icons.iteritems():
            assert not icon.isNull()