Пример #1
0
 def show_popup(self):
     '''Show the text notification popup.'''
     text = self.__msgtext.GetValue()
     if text:
         # Text is set, show dialog.  Status of text notification.
         self.__textnotif = 'show'
         font = self.__data.get_sys('msg_font')
         colors = self.__data.get_sys('popup_colors')
         icon = os.path.join(self.__dir,
                            self.__data.get_sys('icon_close'))
         popup = Popup(parent=self,
                   style=self.__bdist,
                   text=text,
                   font=font,
                   colors=colors,
                   icon=icon)
         popw, poph = popup.get_size()
         dispw, disph = wx.GetDisplaySize()
         offx = (dispw - popw) / 2
         offy = (disph - poph) / 2
         popup.Position(ptOrigin=(0, 0), size=(offx, offy))
         popup.Popup()
     else:
         # No text, no Popup, set __textnotif 'close'.
         self.__textnotif = 'close'
Пример #2
0
 def show_popup(self):
     """Show the text notification popup."""
     text = self.__msgtext.GetValue()
     if text:
         # Text is set, show dialog.  Status of text notification.
         self.__textnotif = "show"
         font = self.__data.get_sys("msg_font")
         colors = self.__data.get_sys("popup_colors")
         icon = os.path.join(self.__dir, self.__data.get_sys("icon_close"))
         popup = Popup(parent=self, style=self.__bdist, text=text, font=font, colors=colors, icon=icon)
         popw, poph = popup.get_size()
         dispw, disph = wx.GetDisplaySize()
         offx = (dispw - popw) / 2
         offy = (disph - poph) / 2
         popup.Position(ptOrigin=(0, 0), size=(offx, offy))
         popup.Popup()
Пример #3
0
 def show_popup(self):
     '''Show the text notification popup.'''
     text = self.__msgtext.GetValue()
     if text:
         # Text is set, show dialog.
         font = self.__data.get_sys('msg_font')
         colors = self.__data.get_sys('popup_colors')
         icon = os.path.join(self.__dir, self.__data.get_sys('icon_close'))
         popup = Popup(parent=self,
                       style=self.__bdist,
                       text=text,
                       font=font,
                       colors=colors,
                       icon=icon)
         popw, poph = popup.get_size()
         dispw, disph = wx.GetDisplaySize()
         offx = (dispw - popw) / 2
         offy = (disph - poph) / 2
         popup.Position(ptOrigin=(0, 0), size=(offx, offy))
         popup.Popup()