~ubuntu-branches/ubuntu/maverick/awn-extras-applets/maverick

« back to all changes in this revision

Viewing changes to applets/maintained/slickswitcher/drawing.py

  • Committer: Bazaar Package Importer
  • Author(s): Julien Lavergne
  • Date: 2010-04-11 22:38:55 UTC
  • mto: (2.2.5 sid)
  • mto: This revision was merged to the branch mainline in revision 20.
  • Revision ID: james.westby@ubuntu.com-20100411223855-bb0ovgd1kerhtyv8
Tags: upstream-0.4.0
ImportĀ upstreamĀ versionĀ 0.4.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
460
460
                return
461
461
 
462
462
            #Hooray Gdk!
463
 
            pixmap = gtk.gdk.Pixmap(self.owner.window, self.settings['width'], \
464
 
                self.settings['height'])
465
 
            pixmap.draw_pixbuf(None, self.backgrounds[number], 0, 0, 0, 0, \
466
 
                dither=gtk.gdk.RGB_DITHER_MAX)
467
 
            cr2 = pixmap.cairo_create()
468
 
            self.cr.set_source_surface(cr2.get_target(), 0, 0)
 
463
            gdk_cr = gtk.gdk.CairoContext(self.cr)
 
464
            gdk_cr.set_source_pixbuf(self.backgrounds[number], 0, 0)
 
465
            gdk_cr.paint()
 
466
 
 
467
            del gdk_cr
469
468
 
470
469
        #The background is simply a cairo surface
471
470
        else:
472
 
            pixmap = None
473
 
            cr2 = None
474
471
            self.cr.set_source_surface(self.backgrounds[number], 0, 0)
475
 
 
476
 
        #Now fill the background
477
 
        self.cr.fill_preserve()
478
 
        self.cr.paint()
 
472
            self.cr.paint()
479
473
 
480
474
        #Draw the windows
481
475
        self.draw_windows()
500
494
        self.owner.updated()
501
495
 
502
496
        #Free some memory
503
 
        del self.cr, pixmap, cr2
 
497
        del self.cr
504
498
 
505
499
    #Update the values from the owner
506
500
    def update_values(self):