Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/button.py
diff options
context:
space:
mode:
authorerikb <erikb@574bc980-5f2d-0410-acbc-c8f9f0eb14e0>2007-09-25 21:27:50 (GMT)
committer erikb <erikb@574bc980-5f2d-0410-acbc-c8f9f0eb14e0>2007-09-25 21:27:50 (GMT)
commit170145554bee23bd7426d5d77fcd9e06e35cd11f (patch)
treecf0223a145e75915581b0a8bb01e5c0f1b7ef687 /button.py
parenta1056b994476da1f9120fd8d3ef9188c486d6f26 (diff)
cairo buttons now gtk ...
git-svn-id: http://mediamods.com/public-svn/camera-activity/Record.activity@528 574bc980-5f2d-0410-acbc-c8f9f0eb14e0
Diffstat (limited to 'button.py')
-rw-r--r--button.py45
1 files changed, 42 insertions, 3 deletions
diff --git a/button.py b/button.py
index 4374452..f9e2da9 100644
--- a/button.py
+++ b/button.py
@@ -21,13 +21,52 @@ class RecdButton(TrayButton, gobject.GObject):
def getImg( self ):
- pb = self.ui.thumbVideoSvg.get_pixbuf()
img = gtk.Image()
- img.set_from_pixbuf( pb )
- img.show()
+ ipb = self.recd.getThumbPixbuf()
+ if (self.recd.type == self.ui.ca.m.TYPE_PHOTO):
+ if (self.tc.recd.buddy):
+ thumbPhotoSvg = self.ui.loadSvg(self.ui.thumbPhotoSvgData, self.recd.colorStroke.hex, self.recd.colorFill.hex)
+ pb = thumbPhotoSvg.get_pixbuf()
+ img.set_from_pixbuf( pb )
+ img.show()
+ ipb.composite(pb, 8, 8, ipb.get_width(), ipb.get_height(), 0, 0, 1, 1, gtk.gdk.INTERP_BILINEAR, 255 )
+ else:
+ pb = self.ui.thumbPhotoSvg.get_pixbuf()
+ img.set_from_pixbuf( pb )
+ img.show()
+ ipb.composite(pb, 8, 8, ipb.get_width(), ipb.get_height(), 0, 0, 1, 1, gtk.gdk.INTERP_BILINEAR, 255 )
+
+ if (self.recd.type == self.ui.ca.m.TYPE_VIDEO):
+ if (self.tc.recd.buddy):
+ thumbVideoSvg = self.ui.loadSvg(self.ui.thumbVideoSvgData, self.recd.colorStroke.hex, self.recd.colorFill.hex)
+ pb = thumbVideoSvg.get_pixbuf()
+ img.set_from_pixbuf( pb )
+ img.show()
+ ipb.composite(pb, 8, 8, ipb.get_width(), ipb.get_height(), 0, 0, 1, 1, gtk.gdk.INTERP_BILINEAR, 255 )
+ else:
+ pb = self.ui.thumbVideoSvg.get_pixbuf()
+ img.set_from_pixbuf( pb )
+ img.show()
+ ipb.composite(pb, 8, 22, ipb.get_width(), ipb.get_height(), 0, 0, 1, 1, gtk.gdk.INTERP_BILINEAR, 255 )
+
+ if (self.recd.type == self.ui.ca.m.TYPE_AUDIO):
+ if (self.tc.recd.buddy):
+ thumbAudioSvg = self.ui.loadSvg(self.ui.thumbAudioSvgData, self.recd.colorStroke.hex, self.recd.colorFill.hex)
+ pb = thumbAudioSvg.get_pixbuf()
+ img.set_from_pixbuf( pb )
+ img.show()
+ ipb.composite(pb, 8, 8, ipb.get_width(), ipb.get_height(), 0, 0, 1, 1, gtk.gdk.INTERP_BILINEAR, 255 )
+ else:
+ pb = self.ui.thumbAudioSvg.get_pixbuf()
+ img.set_from_pixbuf( pb )
+ img.show()
+ ipb.composite(pb, 8, 22, ipb.get_width(), ipb.get_height(), 0, 0, 1, 1, gtk.gdk.INTERP_BILINEAR, 255 )
+
+ img.set_from_pixbuf(pb)
return img
+
def setup_rollover_options( self, info ):
palette = Palette(info)
self.set_palette(palette)