Logo Search packages:      
Sourcecode: gajim version File versions  Download package

def roster_window::RosterWindow::load_iconset (   self,
  path,
  pixbuf2 = None,
  transport = False 
)

load an iconset from the given path, and add pixbuf2 on top left of
each static images

Definition at line 2682 of file roster_window.py.

02682                                                                      :
            '''load an iconset from the given path, and add pixbuf2 on top left of
            each static images'''
            imgs = {}
            path += '/'
            if transport:
                  list = ('online', 'chat', 'away', 'xa', 'dnd', 'offline',
                        'not in roster')
            else:
                  list = ('connecting', 'online', 'chat', 'away', 'xa', 'dnd',
                        'invisible', 'offline', 'error', 'requested', 'message', 'opened',
                        'closed', 'not in roster', 'muc_active', 'muc_inactive')
                  if pixbuf2:
                        list = ('connecting', 'online', 'chat', 'away', 'xa', 'dnd',
                              'offline', 'error', 'requested', 'message', 'not in roster')
            for state in list:
                  # try to open a pixfile with the correct method
                  state_file = state.replace(' ', '_')
                  files = []
                  files.append(path + state_file + '.gif')
                  files.append(path + state_file + '.png')
                  image = gtk.Image()
                  image.show()
                  imgs[state] = image
                  for file in files: # loop seeking for either gif or png
                        if os.path.exists(file):
                              image.set_from_file(file)
                              if pixbuf2 and image.get_storage_type() == gtk.IMAGE_PIXBUF:
                                    # add pixbuf2 on top-left corner of image
                                    pixbuf1 = image.get_pixbuf()
                                    pixbuf2.composite(pixbuf1, 0, 0,
                                          pixbuf2.get_property('width'),
                                          pixbuf2.get_property('height'), 0, 0, 1.0, 1.0,
                                          gtk.gdk.INTERP_HYPER, 255)
                                    image.set_from_pixbuf(pixbuf1)
                              break
            return imgs

      def make_jabber_state_images(self):


Generated by  Doxygen 1.6.0   Back to index