home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2009 June / maximum-cd-2009-06.iso / DiscContents / digsby_setup.exe / lib / gui / video / webvideo.pyo (.txt) < prev   
Encoding:
Python Compiled Bytecode  |  2009-02-26  |  2.1 KB  |  42 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyo (Python 2.5)
  3.  
  4. from __future__ import with_statement
  5. import wx
  6. from gui import skin
  7. from gui.browser import BrowserFrame
  8. from gui.toolbox import persist_window_pos, snap_pref
  9. from logging import getLogger
  10. log = getLogger('webvideo')
  11. video_frame_url = 'http://v.digsby.com/embed.php?id=%(widget_id)s'
  12. video_frame_style = wx.MINIMIZE_BOX | wx.SYSTEM_MENU | wx.CAPTION | wx.CLOSE_BOX | wx.CLIP_CHILDREN | wx.STAY_ON_TOP
  13. video_frame_size = (542, 264)
  14.  
  15. def confirm_invite(buddy_name):
  16.     return wx.YES == wx.MessageBox(_('%s has invited you to an audio/video chat.\n\nWould you like to join?') % buddy_name, _('Audio/Video Chat Invitation'), style = wx.YES_NO)
  17.  
  18.  
  19. class VideoChatWindow(BrowserFrame):
  20.     
  21.     def __init__(self, title, widget_id, on_close = None):
  22.         self.widget_url = video_frame_url % dict(widget_id = widget_id)
  23.         BrowserFrame.__init__(self, None, name = 'Video Chat Window', title = title, url = self.widget_url, style = video_frame_style)
  24.         self.on_close = on_close
  25.         self.SetFrameIcon(skin.get('AppDefaults.TaskBarIcon'))
  26.         persist_window_pos(self, position_only = True)
  27.         snap_pref(self)
  28.         self.SetClientSize(video_frame_size)
  29.         log.debug('opening video embed url: %s' % self.widget_url)
  30.         if on_close is not None:
  31.             self.Bind(wx.EVT_CLOSE, self.OnClose)
  32.         
  33.  
  34.     
  35.     def OnClose(self, e):
  36.         e.Skip()
  37.         if self.on_close is not None:
  38.             self.on_close()
  39.         
  40.  
  41.  
  42.