def __init__(self, parent, id, plugin=None, **kwds): UIProxyReceiver.__init__(self) self.data = {} self.plugin = plugin self.peer_desc = None self.active = False args = (parent, id) # begin wxGlade: FileDialog.__init__ kwds["style"] = wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER | wx.THICK_FRAME wx.Dialog.__init__(self, *args, **kwds) self.fileaction_sizer_staticbox = wx.StaticBox(self, -1, _("Actions")) self.label_1 = wx.StaticText(self, -1, _("Incoming dir:")) self.repo_value = wx.TextCtrl(self, -1, "") self.repo_button = wx.BitmapButton(self, -1, wx.Bitmap(DOWNLOAD_DIR(), wx.BITMAP_TYPE_ANY)) self.download_button = wx.BitmapButton(self, -1, wx.Bitmap(DOWNLOAD(), wx.BITMAP_TYPE_ANY)) self.peerfiles_list = wx.ListCtrl(self, -1, style=wx.LC_REPORT | wx.SUNKEN_BORDER) self.__set_properties() self.__do_layout() # end wxGlade self.peerfiles_list.InsertColumn(NAME_COL, "File") self.peerfiles_list.InsertColumn(TAG_COL, "Tag") self.peerfiles_list.InsertColumn(SIZE_COL, "Size") self.peerfiles_list.SetColumnWidth(NAME_COL, 150) self.peerfiles_list.SetColumnWidth(SIZE_COL, 60) self.peerfiles_list.SetColumnWidth(TAG_COL, wx.LIST_AUTOSIZE_USEHEADER) self.bind_controls()
def __init__(self, options, *args): UIProxyReceiver.__init__(self) self.options = options self.options['App'] = self # needed by wxCollector self.main_window = None self.config_data = ConfigData() self.config_data.services_dir = os.path.dirname(solipsis.services.__file__) wx.App.__init__(self, *args)
def __init__(self, viewport): """ Constructor. """ BaseWorld.__init__(self, viewport) UIProxyReceiver.__init__(self) self.charset = GetCharset() self.repository = images.ImageRepository() self.avatars = AvatarRepository() self.avatars.AskNotify(UIProxy(self).UpdateAvatars)
def __init__(self, parent, id, plugin=None, **kwds): UIProxyReceiver.__init__(self) self.plugin = plugin args = (parent, id) # begin wxGlade: ProfileDialog.__init__ kwds["style"] = wx.DEFAULT_DIALOG_STYLE|wx.RESIZE_BORDER|wx.THICK_FRAME wx.Dialog.__init__(self, *args, **kwds) self.profile_window = MyHtmlWindow(self, -1) self.__set_properties() self.__do_layout()
def __init__(self, viewport): """ Constructor. """ UIProxyReceiver.__init__(self) # Solipsis ID of the node self.node_id = None self.node_item = None # Charset used for display self.charset = GetCharset() self.viewport = viewport self.repository = images.ImageRepository() self.avatars = AvatarRepository() self.avatars.AskNotify(UIProxy(self).UpdateAvatars) # Cache of all encountered peers (useful for labels, avatars, etc.) self.item_cache = {} self.Reset()
def __init__(self, plugin, dir_): self.plugin = plugin self.pseudos = {} self.sounds = sounds.SoundRepository() wx.EvtHandler.__init__(self) UIProxyReceiver.__init__(self) # Load widgets from resource file self.windows = ["chat_window"] objects = self.windows self.LoadResource(os.path.join(dir_, "gui.xrc")) for obj_name in objects: setattr(self, obj_name, self.Resource(obj_name)) # Shortcuts to objects self.chat_panel = XRCCTRL(self.chat_window, "chat_panel") self.chat_edit = XRCCTRL(self.chat_window, "chat_edit") self.chat_users = XRCCTRL(self.chat_window, "chat_users") # We must create the TextCtrl and its Sizer manually since XRCed # does not yet support adding the TE_RICH flag to a TextCtrl... # (which is needed to have styles inside the TextCtrl under Windows!) self.chat_view = wx.TextCtrl(parent=self.chat_panel, style=wx.TE_MULTILINE | wx.TE_READONLY | wx.TE_RICH) sizer = wx.BoxSizer(wx.VERTICAL) sizer.Add(self.chat_view, flag=wx.EXPAND, proportion=1) self.chat_panel.SetSizer(sizer) self.chat_users.InsertColumn(0, _("Nickname")) # Nicer sizing for obj_name in objects: attr = getattr(self, obj_name) attr.SetSizeHintsSz(attr.GetBestVirtualSize()) # UI event handlers wx.EVT_BUTTON(self.chat_window, XRCID("chat_send"), self._Send) wx.EVT_BUTTON(self.chat_window, XRCID("chat_close"), self._Close) wx.EVT_CLOSE(self.chat_window, self._Close)
def __init__(self, display, parent, id, *args, **kwds): UIProxyReceiver.__init__(self) self.display = display args = (parent, id) # begin wxGlade: DownloadDialog.__init__ kwds["style"] = wx.CAPTION wx.Dialog.__init__(self, *args, **kwds) self.bitmap_1 = wx.StaticBitmap(self, -1, wx.Bitmap(DISPLAY_IMG(), wx.BITMAP_TYPE_ANY)) self.download_label = wx.StaticText(self, -1, _("Connecting...")) self.separator_copy = wx.StaticLine(self, -1) self.always_display_check = wx.CheckBox(self, -1, _("Always display")) self.ok_button = wx.Button(self, wx.ID_CLOSE, _("Ok")) self.download_gauge = wx.Gauge(self, -1, 10, style=wx.GA_HORIZONTAL|wx.GA_SMOOTH) self.__set_properties() self.__do_layout() # end wxGlade self.counter = 0 self.bind_controls()
def __init__(self, parent, id, plugin=None, **kwds): UIProxyReceiver.__init__(self) self.peer_desc = None args = (parent, id) # begin wxGlade: BlogDialog.__init__ kwds["style"] = wx.DEFAULT_DIALOG_STYLE|wx.RESIZE_BORDER|wx.THICK_FRAME wx.Dialog.__init__(self, *args, **kwds) self.peerblog_actions_staticbox = wx.StaticBox(self, -1, _("Actions")) self.add_comment_button = wx.BitmapButton(self, -1, wx.Bitmap(ADD_COMMENT(),wx.BITMAP_TYPE_ANY)) self.del_comment_button = wx.BitmapButton(self, -1, wx.Bitmap(DEL_BLOG(),wx.BITMAP_TYPE_ANY)) self.upload_button = wx.BitmapButton(self, -1, wx.Bitmap(UPLOAD_BLOG(),wx.BITMAP_TYPE_ANY)) self.peerblog_text = wx.TextCtrl(self, -1, "", style=wx.TE_MULTILINE|wx.TE_RICH2|wx.TE_LINEWRAP) self.peerblog_list = PeerHtmlListBox(self, -1) self.__set_properties() self.__do_layout() # end wxGlade # specific stuff self.plugin = plugin self.bind_controls()
def __init__(self, parent, id, plugin=None, **kwds): UIProxyReceiver.__init__(self) self.data = {} self.plugin = plugin self.download_repo = DOWNLOAD_REPO self.peer_desc = None args = (parent, id) # begin wxGlade: FileDialog.__init__ kwds["style"] = wx.DEFAULT_DIALOG_STYLE|wx.RESIZE_BORDER|wx.THICK_FRAME wx.Dialog.__init__(self, *args, **kwds) self.fileaction_sizer_staticbox = wx.StaticBox(self, -1, _("Actions")) self.repo_button = wx.BitmapButton(self, -1, wx.Bitmap(DOWNLOAD_DIR(),wx.BITMAP_TYPE_ANY)) self.download_button = wx.BitmapButton(self, -1, wx.Bitmap(DOWNLOAD(),wx.BITMAP_TYPE_ANY)) self.peerfiles_list = wx.ListCtrl(self, -1, style=wx.LC_REPORT|wx.SUNKEN_BORDER) self.__set_properties() self.__do_layout() # end wxGlade self.peerfiles_list.InsertColumn(0, "File") self.peerfiles_list.InsertColumn(1, "Tag") self.bind_controls()
def __init__(self, options, parent, id, plugin=None, **kwds): UIProxyReceiver.__init__(self) self.plugin = plugin self.options = options args = (parent, id) # begin wxGlade: MatchFrame.__init__ kwds["style"] = wx.DEFAULT_FRAME_STYLE wx.Frame.__init__(self, *args, **kwds) # Menu Bar self.match_frame_menubar = wx.MenuBar() self.SetMenuBar(self.match_frame_menubar) self.action_menu = wx.Menu() self.getfile_item = wx.MenuItem(self.action_menu, wx.NewId(), _("&Get files\tCtrl+G"), "", wx.ITEM_NORMAL) self.action_menu.AppendItem(self.getfile_item) self.closematch_item = wx.MenuItem(self.action_menu, wx.NewId(), _("&Close\tCtrl+W"), "", wx.ITEM_NORMAL) self.action_menu.AppendItem(self.closematch_item) self.match_frame_menubar.Append(self.action_menu, _("Actions")) self.info_menu = wx.Menu() self.about_item = wx.MenuItem(self.info_menu, wx.NewId(), _("About...\tCtrl+?"), "", wx.ITEM_NORMAL) self.info_menu.AppendItem(self.about_item) self.match_frame_menubar.Append(self.info_menu, _("Info")) # Menu Bar end self.matched_panel = MatchPanel(self, -1) self.__set_properties() self.__do_layout() # end wxGlade # quite different initialisation according to launched by navigator or not if self.options["standalone"]: self.viewpeer_item = wx.MenuItem(self.action_menu, wx.NewId(), _("View peer...\tCtrl+V"), "", wx.ITEM_NORMAL) self.action_menu.AppendItem(self.viewpeer_item) self.hide_item = wx.MenuItem(self.action_menu, wx.NewId(), _("Hide...\tCtrl+R"), _("Hide profile from note book"), wx.ITEM_NORMAL) self.action_menu.AppendItem(self.hide_item) # events self.bind_controls()
def __init__(self, *args, **kwds): wx.html.HtmlWindow.__init__(self, *args, **kwds) UIProxyReceiver.__init__(self)