def __init__(self, parent, id, aboutBoxInfo, appSettings):
        scrolled.ScrolledPanel.__init__(self, parent, id, wx.DefaultPosition,
                                        wx.DefaultSize)

        creditsPanelVBoxSizer = wx.BoxSizer(orient=wx.VERTICAL)
        self.SetSizer(sizer=creditsPanelVBoxSizer)

        self.SetAutoLayout(1)
        self.SetupScrolling()

        for authorsList in aboutBoxInfo.AuthorsList:
            contributionText = wx.StaticText(parent=self,
                                             id=wx.ID_ANY,
                                             label=authorsList.Contribution)

            contributionText.SetFont(
                font=wx.Font(10, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL,
                             wx.FONTWEIGHT_BOLD))

            creditsPanelVBoxSizer.Add(item=contributionText,
                                      proportion=0,
                                      flag=wx.TOP | wx.CENTER,
                                      border=appSettings.BorderThickness * 12)

            for author in authorsList.Authors:
                authorInfoPanel = wx.Panel(parent=self, id=wx.ID_ANY)
                authorInfoPanelVBoxSizer = wx.BoxSizer(orient=wx.VERTICAL)
                authorInfoPanel.SetSizer(sizer=authorInfoPanelVBoxSizer)

                if (author.Website != None):
                    self.name = wx.HyperlinkCtrl(parent=authorInfoPanel,
                                                 id=wx.ID_ANY,
                                                 label=author.Name,
                                                 url=author.Website)
                else:
                    self.name = wx.StaticText(parent=authorInfoPanel,
                                              id=wx.ID_ANY,
                                              label=author.Name)

                authorInfoPanelVBoxSizer.Add(item=self.name,
                                             proportion=1,
                                             flag=wx.ALL | wx.CENTER)

                if (author.Email != None):
                    self.email = wx.HyperlinkCtrl(parent=authorInfoPanel,
                                                  id=wx.ID_ANY,
                                                  label=author.Email,
                                                  url="mailto:" + author.Email)

                    authorInfoPanelVBoxSizer.Add(
                        item=self.email,
                        proportion=1,
                        flag=wx.ALL | wx.CENTER,
                    )

                creditsPanelVBoxSizer.Add(item=authorInfoPanel,
                                          proportion=0,
                                          flag=wx.ALL | wx.CENTER,
                                          border=appSettings.BorderThickness)
	def __init__(self, *args, **kwds):
		# begin wxGlade: MyDialogCarPedestrian.__init__
		kwds["style"] = wx.DEFAULT_DIALOG_STYLE
		wx.Dialog.__init__(self, *args, **kwds)
		self.hyperlink_car = wx.HyperlinkCtrl(self, wx.ID_ANY, _("parameter tuning for car"), "")
		self.hyperlink_pedestrian = wx.HyperlinkCtrl(self, wx.ID_ANY, _("parameter tuning for pedestrian"), "")

		self.__set_properties()
		self.__do_layout()

		self.Bind(wx.EVT_HYPERLINK, self.OnLink, self.hyperlink_car)
		self.Bind(wx.EVT_HYPERLINK, self.OnLink, self.hyperlink_pedestrian)
Example #3
0
    def GetLinksVBox(self):
        logger.debug("Setting links")
        links_vbox = wx.BoxSizer(wx.VERTICAL)
        link1 = wx.HyperlinkCtrl(self.panel, wx.ID_ANY,
                                 'Adjust screen brightness')
        link1.Bind(wx.EVT_HYPERLINK, self.tbicon.LaunchPowerOptions)
        links_vbox.Add(link1, flag=wx.CENTER | wx.TOP, border=5)

        link2 = wx.HyperlinkCtrl(self.panel, wx.ID_ANY, 'More power options')
        link2.Bind(wx.EVT_HYPERLINK, self.tbicon.LaunchPowerOptions)
        links_vbox.Add(link2, flag=wx.CENTER | wx.TOP, border=5)
        return links_vbox
Example #4
0
    def ConstructMore(self):

        # Extra component--the edit hyperlink
        edit = self.edit = wx.HyperlinkCtrl(self, -1, _('Edit'), '#')
        edit.Hide()
        edit.Bind(wx.EVT_HYPERLINK, lambda e: self.on_edit())

        remove = self.remove = wx.HyperlinkCtrl(self, -1, _('Delete'), '#')
        remove.Hide()
        remove.Bind(wx.EVT_HYPERLINK, lambda e: self.on_delete())

        edit.HoverColour = edit.VisitedColour = edit.ForegroundColour
        remove.HoverColour = remove.VisitedColour = remove.ForegroundColour
Example #5
0
    def __init__(self, *args, **kwds):
        # begin wxGlade: wxgSubstanceEAPnl.__init__
        kwds["style"] = wx.BORDER_NONE | wx.TAB_TRAVERSAL
        wx.ScrolledWindow.__init__(self, *args, **kwds)
        self._TCTRL_substance = cTextCtrl(self,
                                          wx.ID_ANY,
                                          "",
                                          style=wx.BORDER_NONE)
        self._HL_atc_list = wx.HyperlinkCtrl(
            self,
            wx.ID_ANY,
            _("ATC Code"),
            _("http://www.whocc.no/atc_ddd_index/"),
            style=wx.HL_DEFAULT_STYLE)
        self._PRW_atc = cATCPhraseWheel(self,
                                        wx.ID_ANY,
                                        "",
                                        style=wx.BORDER_NONE)
        self._TCTRL_instructions = cTextCtrl(self,
                                             wx.ID_ANY,
                                             "",
                                             style=wx.BORDER_NONE)
        self._HL_loinc_list = wx.HyperlinkCtrl(self,
                                               wx.ID_ANY,
                                               _("LOINCs"),
                                               _("https://search.loinc.org"),
                                               style=wx.HL_DEFAULT_STYLE)
        self._PRW_loinc = cLOINCPhraseWheel(self,
                                            wx.ID_ANY,
                                            "",
                                            style=wx.BORDER_NONE)
        self._BTN_add_loinc = wx.Button(self,
                                        wx.ID_ANY,
                                        _("Add"),
                                        style=wx.BU_EXACTFIT)
        self._LCTRL_loincs = cReportListCtrl(self,
                                             wx.ID_ANY,
                                             style=wx.BORDER_NONE
                                             | wx.LC_REPORT)
        self._BTN_remove_loincs = wx.Button(self,
                                            wx.ID_ANY,
                                            _("Remove"),
                                            style=wx.BU_EXACTFIT)

        self.__set_properties()
        self.__do_layout()

        self.Bind(wx.EVT_BUTTON, self._on_add_loinc_button_pressed,
                  self._BTN_add_loinc)
        self.Bind(wx.EVT_BUTTON, self._on_remove_loincs_button_pressed,
                  self._BTN_remove_loincs)
	def __init__(self, *args, **kwds):
		# begin wxGlade: MyDialogDpm.__init__
		kwds["style"] = wx.DEFAULT_DIALOG_STYLE
		wx.Dialog.__init__(self, *args, **kwds)
		self.panel_v = wx.ScrolledWindow(self, wx.ID_ANY, style=wx.TAB_TRAVERSAL)
		self.button_1 = wx.Button(self, wx.ID_ANY, _("Detection Start"))
		self.hyperlink_car = wx.HyperlinkCtrl(self, wx.ID_ANY, _("car_param_tuning"), "")
		self.hyperlink_pedestrian = wx.HyperlinkCtrl(self, wx.ID_ANY, _("pedestrian_param_tuning"), "")

		self.__set_properties()
		self.__do_layout()

		self.Bind(wx.EVT_BUTTON, self.OnOk, self.button_1)
		self.Bind(wx.EVT_HYPERLINK, self.OnLink, self.hyperlink_car)
		self.Bind(wx.EVT_HYPERLINK, self.OnLink, self.hyperlink_pedestrian)
Example #7
0
    def __init__(self, parent):
        wx.Dialog.__init__(self, parent, -1, '关于我', size=(250, 300))
        bitmap = wx.Image("avatar.jpg", wx.BITMAP_TYPE_JPEG).Rescale(150, 150, quality=wx.IMAGE_QUALITY_HIGH).ConvertToBitmap()
        mask = self._create_round_corner_mask(bitmap.GetSize(), radius=75, border=5)
        bitmap.SetMask(mask)
        wx.StaticBitmap(self, bitmap=bitmap, pos=(50, 10), size=(150, 150))

        wx.StaticText(self, -1, '微博:', pos=(45, 170))
        wx.HyperlinkCtrl(self, -1, 'answer-huang', 'http://weibo.com/u/1623064627', pos=(85, 170))

        wx.StaticText(self, -1, '邮箱:', pos=(45, 200))
        wx.HyperlinkCtrl(self, -1, '*****@*****.**', 'mailto:[email protected]', pos=(85, 200))

        wx.StaticText(self, -1, '博客:', pos=(45, 230))
        wx.HyperlinkCtrl(self, -1, 'answerhuang.duapp.com', 'http://answerhuang.duapp.com', pos=(85, 230))
Example #8
0
    def __init__(self, parent):
        super(ContactPanel, self).__init__(parent)
        sizer = wx.FlexGridSizer(rows=2, cols=1, vgap=5, hgap=5)
        self.SetSizer(sizer)
        contactLabel = wx.StaticText(self,
                                     label="For queries, please contact:")
        font = wx.SystemSettings.GetFont(wx.SYS_DEFAULT_GUI_FONT)
        if sys.platform.startswith("darwin"):
            font.SetPointSize(11)
        else:
            font.SetPointSize(9)
        contactLabel.SetFont(font)
        sizer.Add(contactLabel, border=10, flag=wx.EXPAND)

        contactEmailHyperlink = wx.HyperlinkCtrl(self,
                                                 id=wx.ID_ANY,
                                                 label=CONTACT_EMAIL,
                                                 url="mailto:%s" %
                                                 CONTACT_EMAIL)
        font = wx.SystemSettings.GetFont(wx.SYS_DEFAULT_GUI_FONT)
        if sys.platform.startswith("darwin"):
            font.SetPointSize(11)
        else:
            font.SetPointSize(8)
        contactEmailHyperlink.SetFont(font)
        sizer.Add(contactEmailHyperlink, border=10, flag=wx.LEFT)
        sizer.Fit(self)
Example #9
0
 def _createWidgets(self):
     self.description1 = wx.StaticText(
         self, wx.ID_ANY,
         _extstr(u"mediastoragewizard.WelcomeMessage"))  #$NON-NLS-1$
     self.description1.SetFont(getDefaultFontBold())
     self.description2 = wx.StaticText(
         self,
         wx.ID_ANY,
         _extstr(u"mediastoragewizard.WizardDescription"),
         size=wx.Size(-1, 80))  #$NON-NLS-1$
     self.siteLabel = wx.StaticText(
         self, wx.ID_ANY,
         _extstr(u"mediastoragewizard.MediaStorageType"))  #$NON-NLS-1$
     comboValidator = ZNonEmptySelectionValidator(
         _extstr(u"mediastoragewizard.EmptyStoreTypeSelectionError")
     )  #$NON-NLS-1$
     self.siteCombo = ZValidatingBitmapComboBox(comboValidator,
                                                self,
                                                wx.ID_ANY,
                                                style=wx.CB_READONLY)
     self.siteCombo.SetToolTipString(
         _extstr(u"mediastoragewizard.StoreTypeComboTooltip"))  #$NON-NLS-1$
     self.nameLabel = wx.StaticText(
         self, wx.ID_ANY,
         _extstr(u"mediastoragewizard.MediaStorageName"))  #$NON-NLS-1$
     nameValidator = ZMediaStorageNameValidator(self._getModel())
     self.nameText = ZValidatingTextCtrl(nameValidator, self, wx.ID_ANY)
     self.nameText.SetToolTipString(
         _extstr(
             u"mediastoragewizard.MediaStorageNameTooltip"))  #$NON-NLS-1$
     self.clickHereHyperlink = wx.HyperlinkCtrl(
         self, wx.ID_ANY, _extstr(u"mediastoragewizard.NoStorageLink"),
         u"http://picasaweb.google.com/?ref=ZoundryRaven"
     )  #$NON-NLS-2$ #$NON-NLS-1$
Example #10
0
    def __init__(self, parent, config):
        wx.Dialog.__init__(self, parent, -1, "Review Board")

        self.config = config

        sizer = wx.BoxSizer(wx.VERTICAL)
        sizer.Add(wx.StaticText(
            self, wx.ID_ANY,
            "Post Review could not locate the Perforce command line client (\"p4.exe\") on your system.\nPerforce support will be unavailable until you install this client program.\n\nYou can download the command line client at:"
        ),
                  flag=wx.RIGHT | wx.LEFT | wx.TOP | wx.ALIGN_LEFT,
                  border=5)
        p4downloadurl = "http://www.perforce.com/perforce/downloads/index.html"
        hyperlink = wx.HyperlinkCtrl(self, wx.ID_ANY, p4downloadurl,
                                     p4downloadurl)
        sizer.Add(hyperlink, flag=wx.RIGHT | wx.LEFT | wx.BOTTOM, border=5)
        self.dont_bug_me = wx.CheckBox(self, -1, "Do &not show again")
        sizer.Add(self.dont_bug_me, flag=wx.ALL, border=5)
        okButton = wx.Button(self, wx.ID_OK)
        okButton.SetDefault()
        sizer.Add(okButton, flag=wx.ALL | wx.ALIGN_CENTER, border=5)
        self.Bind(wx.EVT_BUTTON, self.OnOk, okButton)

        self.SetSizer(sizer)
        self.SetAutoLayout(1)
        sizer.Fit(self)
        self.Layout()

        self.CenterOnParent(wx.BOTH)
Example #11
0
    def _createHeaderPanel(self, parent):
        panel = wx.Panel(parent, wx.ID_ANY)
        panel.SetBackgroundColour(wx.WHITE)

        self.headerLink = wx.HyperlinkCtrl(panel, wx.ID_ANY,
                                           self._getHeaderTitle(),
                                           self._getHeaderHelpURL())
        self.headerLink.SetFont(getDefaultFontBold())
        self.headerMessage = wx.StaticText(panel, wx.ID_ANY,
                                           self._getHeaderMessage())
        headerImagePath = self._getHeaderImagePath()
        if not headerImagePath:
            headerImagePath = u"images/dialogs/image/header_image.png"  #$NON-NLS-1$
        self.headerIcon = ZStaticBitmap(
            panel,
            getResourceRegistry().getBitmap(headerImagePath))

        linkAndMsgSizer = wx.BoxSizer(wx.VERTICAL)
        linkAndMsgSizer.Add(self.headerLink, 0, wx.ALL, 2)
        linkAndMsgSizer.Add(self.headerMessage, 1, wx.EXPAND | wx.ALL, 2)

        sizer = wx.BoxSizer(wx.HORIZONTAL)
        sizer.AddSizer(linkAndMsgSizer, 1, wx.EXPAND | wx.ALL, 5)
        sizer.Add(self.headerIcon, 0, wx.EXPAND | wx.ALL, 10)

        panel.SetAutoLayout(True)
        panel.SetSizer(sizer)

        return panel
Example #12
0
def make_dialog(definition):
    window = wx.Dialog(None, -1, definition["title"])
    dialog = PluginDialog(window)
    panel = wx.Panel(window, -1)
    controls = []
    for control in definition["controls"]:
        if control["type"] == LINK_CONTROL:
            wx_control = wx.HyperlinkCtrl(panel, -1, control["text"],
                                          control["url"])
            controls.append(wx_control)
        elif control["type"] == TEXTINPUT_CONTROL:
            wx_control = wx.TextCtrl(panel, -1)
            label = wx.StaticText(panel, -1, control["label"])
            hbox = wx.BoxSizer(wx.HORIZONTAL)
            hbox.Add(label)
            hbox.Add(wx_control, 1, wx.EXPAND)
            controls.append(hbox)
        dialog.add_control((control, wx_control))
    mainvbox = wx.BoxSizer(wx.VERTICAL)
    for control in controls:
        mainvbox.Add(control, 0, wx.EXPAND)
    ok_button = wx.Button(panel, wx.ID_OK)
    cancel_button = wx.Button(panel, wx.ID_CANCEL)
    button_sizer = wx.StdDialogButtonSizer()
    button_sizer.AddButton(ok_button)
    button_sizer.AddButton(cancel_button)
    button_sizer.Realize()
    if button_sizer:
        mainvbox.Add(button_sizer, 0, wx.ALIGN_RIGHT | wx.TOP, 15)
    border = wx.BoxSizer()
    border.Add(mainvbox, 0, wx.ALL, 15)
    panel.SetSizerAndFit(border)
    window.Fit()
    return dialog
Example #13
0
    def __init__(self, parent):
        wx.Frame.__init__(
            self,
            parent,
            id=wx.ID_ANY,
            title=wx.EmptyString,
            pos=wx.DefaultPosition,
            size=wx.Size(500, 300),
            style=wx.DEFAULT_FRAME_STYLE | wx.TAB_TRAVERSAL,
        )

        self.SetSizeHintsSz(wx.DefaultSize, wx.DefaultSize)

        bSizer6 = wx.BoxSizer(wx.VERTICAL)

        self.m_hyperlink2 = wx.HyperlinkCtrl(
            self,
            wx.ID_ANY,
            "wxFB Website",
            "http://www.wxformbuilder.org",
            wx.DefaultPosition,
            wx.DefaultSize,
            wx.HL_DEFAULT_STYLE,
        )
        bSizer6.Add(self.m_hyperlink2, 0, wx.ALL, 5)

        self.SetSizer(bSizer6)
        self.Layout()

        self.Centre(wx.BOTH)
Example #14
0
    def __init__(self, parent):
        wx.Frame.__init__(self,
                          parent,
                          id=wx.ID_ANY,
                          title=wx.EmptyString,
                          pos=wx.DefaultPosition,
                          size=wx.Size(289, 276),
                          style=wx.CAPTION | wx.CLOSE_BOX
                          | wx.FRAME_TOOL_WINDOW | wx.SYSTEM_MENU
                          | wx.TAB_TRAVERSAL)

        self.SetSizeHintsSz(wx.DefaultSize, wx.DefaultSize)
        self.SetBackgroundColour(
            wx.SystemSettings.GetColour(wx.SYS_COLOUR_HIGHLIGHTTEXT))

        bSizer10 = wx.BoxSizer(wx.VERTICAL)

        self.dev_label = wx.StaticText(
            self, wx.ID_ANY,
            u"\n\nDeveloped by\nVighnesh Birodkar\nemail : [email protected]\n\nAutoSubtitles Copyright (C) 2012 Vighnesh Birodkar\nThis Program comes with \nABSOLUTELY\nNO WARRANTY\n\nSubtitles thanks to\n",
            wx.DefaultPosition, wx.DefaultSize, wx.ALIGN_CENTRE)
        self.dev_label.Wrap(-1)
        bSizer10.Add(self.dev_label, 0, wx.ALIGN_CENTER_HORIZONTAL, 5)

        self.sub_link = wx.HyperlinkCtrl(self, wx.ID_ANY,
                                         u"www.opensubtitles.org",
                                         u"www.opensubtitles.org/",
                                         wx.DefaultPosition, wx.DefaultSize,
                                         wx.HL_DEFAULT_STYLE)
        bSizer10.Add(self.sub_link, 0, wx.ALIGN_CENTER_HORIZONTAL, 5)

        self.imdb_text = wx.StaticText(self, wx.ID_ANY,
                                       u"\nMovie Data Thanks to\nBrian Fritz",
                                       wx.DefaultPosition, wx.DefaultSize,
                                       wx.ALIGN_CENTRE)
        self.imdb_text.Wrap(-1)
        bSizer10.Add(self.imdb_text, 0, wx.ALIGN_CENTER_HORIZONTAL, 5)

        self.m_hyperlink2 = wx.HyperlinkCtrl(
            self, wx.ID_ANY, u"www.imdbapi.com", u"http://www.imdbapi.com",
            wx.DefaultPosition, wx.DefaultSize, wx.HL_DEFAULT_STYLE)
        bSizer10.Add(self.m_hyperlink2, 0, wx.ALIGN_CENTER_HORIZONTAL, 5)

        self.SetSizer(bSizer10)
        self.Layout()

        self.Centre(wx.BOTH)
Example #15
0
    def populatePanel( self, panel ):
        self.mainFrame = gui.mainFrame.MainFrame.getInstance()
        self.HTMLExportSettings = service.settings.HTMLExportSettings.getInstance()
        self.dirtySettings = False
        dlgWidth = panel.GetParent().GetParent().ClientSize.width
        mainSizer = wx.BoxSizer( wx.VERTICAL )

        self.stTitle = wx.StaticText( panel, wx.ID_ANY, self.title, wx.DefaultPosition, wx.DefaultSize, 0 )
        self.stTitle.Wrap( -1 )
        self.stTitle.SetFont( wx.Font( 12, 70, 90, 90, False, wx.EmptyString ) )
        mainSizer.Add( self.stTitle, 0, wx.ALL, 5 )

        self.m_staticline1 = wx.StaticLine( panel, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL )
        mainSizer.Add( self.m_staticline1, 0, wx.EXPAND|wx.TOP|wx.BOTTOM, 5 )

        self.stDesc = wx.StaticText( panel, wx.ID_ANY, self.desc, wx.DefaultPosition, wx.DefaultSize, 0 )
        self.stDesc.Wrap(dlgWidth - 50)
        mainSizer.Add( self.stDesc, 0, wx.ALL, 5 )

        self.PathLinkCtrl = wx.HyperlinkCtrl( panel, wx.ID_ANY, self.HTMLExportSettings.getPath(), u'file:///{}'.format(self.HTMLExportSettings.getPath()), wx.DefaultPosition, wx.DefaultSize, wx.HL_ALIGN_LEFT|wx.NO_BORDER|wx.HL_CONTEXTMENU )
        mainSizer.Add( self.PathLinkCtrl, 0, wx.ALL|wx.EXPAND, 5)

        self.fileSelectDialog = wx.FileDialog(None, "Save Fitting As...", wildcard = "EVE IGB HTML fitting file (*.html)|*.html", style = wx.FD_SAVE)
        self.fileSelectDialog.SetPath(self.HTMLExportSettings.getPath())
        self.fileSelectDialog.SetFilename(os.path.basename(self.HTMLExportSettings.getPath()));

        self.fileSelectButton = wx.Button(panel, -1, "Set export destination", pos=(0,0))
        self.fileSelectButton.Bind(wx.EVT_BUTTON, self.selectHTMLExportFilePath)
        mainSizer.Add( self.fileSelectButton, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5)

        self.stDesc2 = wx.StaticText( panel, wx.ID_ANY, self.desc2, wx.DefaultPosition, wx.DefaultSize, 0 )
        self.stDesc2.Wrap(dlgWidth - 50)
        mainSizer.Add( self.stDesc2, 0, wx.ALL, 5 )

        self.exportEnabled = wx.CheckBox( panel, wx.ID_ANY, u"Enable automatic HTML export", wx.DefaultPosition, wx.DefaultSize, 0 )
        self.exportEnabled.SetValue(self.HTMLExportSettings.getEnabled())
        self.exportEnabled.Bind(wx.EVT_CHECKBOX, self.OnExportEnabledChange)
        mainSizer.Add( self.exportEnabled, 0, wx.ALL|wx.EXPAND, 5 )

        self.stDesc3 = wx.StaticText( panel, wx.ID_ANY, self.desc3, wx.DefaultPosition, wx.DefaultSize, 0 )
        self.stDesc3.Wrap(dlgWidth - 50)
        mainSizer.Add( self.stDesc3, 0, wx.ALL, 5 )

        websiteSizer = wx.BoxSizer( wx.HORIZONTAL )

        self.stWebsite = wx.StaticText( panel, wx.ID_ANY, u"Website:", wx.DefaultPosition, wx.DefaultSize, 0 )
        self.stWebsite.Wrap( -1 )
        websiteSizer.Add( self.stWebsite, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )

        self.chWebsiteChoices = [ "o.smium.org", "null-sec.com" ]
        self.chWebsiteType = wx.Choice( panel, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, self.chWebsiteChoices, 0 )
        self.chWebsiteType.SetStringSelection( self.HTMLExportSettings.getWebsite() )
        websiteSizer.Add( self.chWebsiteType, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )
        self.chWebsiteType.Bind(wx.EVT_CHOICE, self.OnCHWebsiteTypeSelect)

        mainSizer.Add( websiteSizer, 0, wx.EXPAND, 5 )

        panel.SetSizer( mainSizer )
        panel.Layout()
Example #16
0
def HyperlinkControl(parent, label, url):
    '''
    Creates a hyperlink control with the given label and destination URL. Sets all display colors to be the same.
    '''
    hlc = wx.HyperlinkCtrl(parent, -1, label, url)
    hlc.HoverColour = hlc.VisitedColour = hlc.NormalColour

    return hlc
Example #17
0
 def _get_metadata(self, name, value):
     sizer = wx.BoxSizer(wx.HORIZONTAL)
     sizer.Add(Label(self, label='%s: ' % name))
     if value.split('://')[0] in ['http', 'https']:
         sizer.Add(wx.HyperlinkCtrl(self, -1, label=value, url=value))
     else:
         sizer.Add(Label(self, label=value))
     return sizer
Example #18
0
    def __init__(self, parent):
        wx.Panel.__init__(self, parent)
        flash_url = 'http://www.adobe.com/go/EN_US-H-GET-FLASH'

        self.link = wx.HyperlinkCtrl(self,
                                     -1,
                                     'Adobe Flash is required',
                                     url=flash_url)
Example #19
0
    def on_text_to_speech(self, event):
        """Handler for the speak button, sends entered text for processing."""
        text = self.edit_text.Value.strip()
        lang = conf.Languages[self.list_lang.Selection][0]
        text_present = [i for i in self.data.values()
                        if i["text"] == text and i["lang"] == lang]
        if not text:
            pass
        elif not text_present:
            self.text_id = wx.NewId()
            data = self.data[self.text_id] = {"filenames": [], "lang": lang,
                "lang_text": conf.Languages[self.list_lang.Selection][1],
                "text": text, "current": None, "count": 0, "id": self.text_id,
                "datetime": datetime.datetime.now(), "stopped": False,
                "completed": False, "allatonce": self.cb_allatonce.Value
            }
            self.out_queue.put(data)
            self.button_save.Enabled = False
            # Create panel in history list
            p = wx.lib.sized_controls.SizedPanel(self.panel_list,
                size=(150, 100))
            p.text_id = data["id"]
            self.panel_list.SetupScrolling(scroll_x=False)
            self.panel_list.BackgroundColour = "LIGHT GRAY"
            p.SetSizerType("vertical")
            p.BackgroundColour = "WHITE"
            p_top = wx.lib.sized_controls.SizedPanel(p)
            p_top.SetSizerType("horizontal")
            t_date = wx.StaticText(
                p_top, label="%s\n%s" % (
                    data["datetime"].strftime("%H:%M %d.%m.%Y"),
                    data["lang_text"])
            )
            t_date.text_id = data["id"]
            t_date.ForegroundColour = "GRAY"
            h = wx.HyperlinkCtrl(p_top, id=wx.NewId(), label="Open", url="")
            h.text_id = data["id"]
            t_text = wx.StaticText(p, label=text[:200].replace("\n", " "))
            t_text.text_id = data["id"]
            t_text.ForegroundColour = "LIGHT GRAY"
            self.panel_list.Sizer.Insert(0, p, border=2, proportion=1,
                                         flag=wx.ALL | wx.EXPAND)
            self.panels_history.append(p)
            self.Bind(wx.EVT_HYPERLINK, self.on_open_text, h)
            t_date.Bind(wx.EVT_LEFT_DCLICK, self.on_open_text)
            t_text.Bind(wx.EVT_LEFT_DCLICK, self.on_open_text)
            p.Bind(wx.EVT_LEFT_DCLICK, self.on_open_text)

            self.panel_list.Layout()
            t_text.Wrap(p.Size.width - 5)
            self.panel_list.Refresh()
        elif text_present[0]["id"] != self.text_id \
        and text_present[0]["filenames"]:
            self.mediactrl.Load(text_present[0]["filenames"][0])
            if self.mc_hack:
                wx.CallLater(500, self.mediactrl.Play)
        else:
            self.mediactrl.Play()
Example #20
0
	def __init__( self, parent ):
		wx.Frame.__init__ ( self, parent, id = wx.ID_ANY, title = u"Acerca De", pos = wx.DefaultPosition, size = wx.Size( 613,302 ), style = wx.CAPTION|wx.CLOSE_BOX|wx.SYSTEM_MENU, name = u"Acerca De" )
		
		self.SetSizeHintsSz( wx.DefaultSize, wx.DefaultSize )
		self.SetBackgroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_SCROLLBAR ) )
		
		bSizer1 = wx.BoxSizer( wx.HORIZONTAL )
		
		self.i_Logo = wx.StaticBitmap( self, wx.ID_ANY, wx.Bitmap( u"candado.ico", wx.BITMAP_TYPE_ANY ), wx.DefaultPosition, wx.DefaultSize, 0 )
		bSizer1.Add( self.i_Logo, 0, wx.ALL, 5 )
		
		bSizer2 = wx.BoxSizer( wx.VERTICAL )
		
		self.t_edita = wx.StaticText( self, wx.ID_ANY, u"EDITA 1.1.0", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.t_edita.Wrap( -1 )
		self.t_edita.SetFont( wx.Font( 22, 74, 90, 92, False, "Calibri" ) )
		
		bSizer2.Add( self.t_edita, 0, wx.ALL, 5 )
		
		self.t_Descri = wx.StaticText( self, wx.ID_ANY, u"Encriptador/Desencriptador Informatico de Texto Ascii 1.1.0", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.t_Descri.Wrap( -1 )
		bSizer2.Add( self.t_Descri, 0, wx.ALL, 5 )
		
		self.t_copyright = wx.StaticText( self, wx.ID_ANY, u"Copyright © 2016", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.t_copyright.Wrap( -1 )
		bSizer2.Add( self.t_copyright, 0, wx.ALL, 5 )
		
		self.m_staticline21 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL )
		bSizer2.Add( self.m_staticline21, 0, wx.EXPAND |wx.ALL, 5 )
		
		self.t_programa = wx.StaticText( self, wx.ID_ANY, u"EDITA es una herramienta de texto que permite \nencriptar o desencriptar mensajes que esten en\nel formate ASCII.", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.t_programa.Wrap( -1 )
		self.t_programa.SetFont( wx.Font( 11, 74, 93, 90, False, "Arial" ) )
		
		bSizer2.Add( self.t_programa, 0, wx.ALL, 5 )
		
		self.m_staticline2 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL )
		bSizer2.Add( self.m_staticline2, 0, wx.EXPAND |wx.ALL, 5 )
		
		self.m_staticText6 = wx.StaticText( self, wx.ID_ANY, u"Desarrolladores:", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText6.Wrap( -1 )
		bSizer2.Add( self.m_staticText6, 0, wx.ALL, 5 )
		
		self.t_nombres = wx.StaticText( self, wx.ID_ANY, u"Manassero Franco,Marques Aldana y Pasquini Matias", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.t_nombres.Wrap( -1 )
		bSizer2.Add( self.t_nombres, 0, wx.ALL, 5 )
		
		self.m_hyperlink = wx.HyperlinkCtrl( self, wx.ID_ANY, u"Visita el sitio de ITEC Rio Cuarto", u"http://www.itec.org.ar", wx.DefaultPosition, wx.DefaultSize, wx.HL_DEFAULT_STYLE )
		bSizer2.Add( self.m_hyperlink, 0, wx.ALL, 5 )
		
		
		bSizer1.Add( bSizer2, 1, wx.EXPAND, 5 )
		
		
		self.SetSizer( bSizer1 )
		self.Layout()
		
		self.Centre( wx.BOTH )
Example #21
0
    def __init__(self, currversion, *args, **kwds):
        self.imagesDir = getImagesDir()

        wx.Dialog.__init__(self, *args, **kwds)
        self.titleLabel = wx.StaticText(self, -1, _("OutWiker"))
        self.versionTitleLabel = wx.StaticText(self, -1, _("Version:"))
        self.versionLabel = wx.StaticText(self, -1, "")
        self.notebook = wx.Notebook(self, -1, style=0)
        self.aboutPane = wx.Panel(self.notebook, -1)
        self.logo = wx.StaticBitmap(self.aboutPane, -1, wx.Bitmap(os.path.join (self.imagesDir, "outwiker_64x64.png"), wx.BITMAP_TYPE_ANY))
        self.description = wx.StaticText (self.aboutPane, -1, _("OutWiker is personal wiki system and tree notes outliner."))
        self.license = wx.StaticText(self.aboutPane, -1, _("License: GPL 3"))
        self.siteLabel = wx.StaticText(self.aboutPane, -1, _("OutWiker's page:"))
        self.outwikerUrl = wx.HyperlinkCtrl(self.aboutPane, -1, label=_("http://jenyay.net/Outwiker/English"), url=_("http://jenyay.net/Outwiker/English"))
        self.contactsPane = wx.Panel(self.notebook, -1)
        self.email = wx.HyperlinkCtrl(self.contactsPane, -1, label=_(u"*****@*****.**"), url=_(u"mailto:[email protected]"))
        self.googleplus = wx.HyperlinkCtrl(self.contactsPane, -1, label=_(u"Google+ page"), url=_(u"https://plus.google.com/u/0/b/113404982971748285098/113404982971748285098/posts"))
        self.facebook = wx.HyperlinkCtrl(self.contactsPane, -1, label=_(u"Facebook page"), url=_(u"http://www.facebook.com/outwiker"))
        self.livejournal = wx.HyperlinkCtrl(self.contactsPane, -1, label=_(u"Livejournal community"), url=_(u"http://ru-outwiker.livejournal.com/?style=mine"))
        self.twitter = wx.HyperlinkCtrl(self.contactsPane, -1, label=_(u"Twitter"), url=_(u"https://twitter.com/OutWiker"))
        self.vkontakte = wx.HyperlinkCtrl(self.contactsPane, -1, label=_(u"Vkontakte group"), url=_(u"http://vk.com/outwiker"))
        self.okButton = wx.Button(self, wx.ID_OK, "")

        self.__set_properties()
        self.__do_layout()

        self.currversion = currversion
        self.versionLabel.SetLabel (str (self.currversion))
Example #22
0
    def InitUI(self):
        panel = wx.Panel(self)
        select_poem, select_link = getSomeSprog()

        menubar = wx.MenuBar()
        filem = wx.Menu()
        editm = wx.Menu()
        helpm = wx.Menu()

        menubar.Append(filem, '&File')
        menubar.Append(editm, '&Edit')
        menubar.Append(helpm, '&Help')
        fitem = filem.Append(wx.ID_EXIT, 'Quit', 'Quit application')

        vbox = wx.BoxSizer(wx.VERTICAL)

        hbox1 = wx.BoxSizer(wx.HORIZONTAL)
        ppanel = wx.TextCtrl(panel,
                             style=wx.TE_READONLY | wx.TE_MULTILINE
                             | wx.TE_CENTRE)
        ppanel.AppendText(select_poem)
        hbox1.Add(ppanel, proportion=1, flag=wx.EXPAND)
        vbox.Add(hbox1,
                 proportion=1,
                 flag=wx.ALIGN_CENTER_HORIZONTAL | wx.EXPAND | wx.LEFT
                 | wx.RIGHT | wx.TOP,
                 border=10)

        vbox.Add((-1, 25))

        hbox2 = wx.BoxSizer(wx.HORIZONTAL)
        lpanel = wx.HyperlinkCtrl(panel,
                                  wx.ID_ANY,
                                  'Link to Sprog',
                                  url=select_link)
        hbox2.Add(lpanel)
        vbox.Add(hbox2, flag=wx.LEFT | wx.RIGHT | wx.TOP, border=10)

        vbox.Add((-1, 25))

        hbox3 = wx.BoxSizer(wx.HORIZONTAL)
        cbtn = wx.Button(panel, label='Close', size=(70, 30))
        cbtn.Bind(wx.EVT_BUTTON, self.On_Quit)
        hbox3.Add(cbtn)
        rbtn = wx.Button(panel, label='Refresh', size=(70, 30))
        rbtn.Bind(wx.EVT_BUTTON, self.On_Refresh)
        hbox3.Add(rbtn, flag=wx.LEFT | wx.BOTTOM, border=5)
        vbox.Add(hbox3, flag=wx.ALIGN_RIGHT | wx.RIGHT, border=10)

        panel.SetSizer(vbox)

        self.Bind(wx.EVT_MENU, self.On_Quit, fitem)
        self.ppanel = ppanel
        self.ppanel.ShowPosition(0)
        self.lpanel = lpanel

        self.SetMenuBar(menubar)
Example #23
0
    def __init__(self, *args, **kwds):
        # begin wxGlade: add_div.__init__

        kwds[
            "style"] = wx.CAPTION | wx.CLOSE_BOX | wx.MINIMIZE_BOX | wx.STAY_ON_TOP
        wx.Dialog.__init__(self, *args, **kwds)
        self.panel_1 = wx.ScrolledWindow(self, -1, style=wx.TAB_TRAVERSAL)
        self.label_1 = wx.StaticText(self.panel_1, -1, "YEAR")

        self.combo_box_1 = wx.ComboBox(self.panel_1,
                                       -1,
                                       choices=[],
                                       style=wx.CB_DROPDOWN | wx.CB_DROPDOWN
                                       | wx.CB_READONLY | wx.CB_SORT)
        self.label_2 = wx.StaticText(self.panel_1, -1, "CLASS")
        self.combo_box_2 = wx.ComboBox(self.panel_1,
                                       -1,
                                       choices=["Select", "8", "9", "10"],
                                       style=wx.CB_DROPDOWN | wx.CB_DROPDOWN
                                       | wx.CB_READONLY | wx.CB_SORT)
        self.sizer_4_staticbox = wx.StaticBox(self.panel_1, -1,
                                              "Specify Class ")
        self.list_box_1 = wx.ListBox(self.panel_1,
                                     -1,
                                     choices=[],
                                     style=wx.LB_SINGLE | wx.LB_SORT)
        self.button_1 = wx.Button(self.panel_1, -1, "Remove Divison")
        self.text_ctrl_1 = wx.TextCtrl(self.panel_1, -1, "")
        self.button_2 = wx.Button(self.panel_1, -1, "Add Division")
        self.sizer_9_staticbox = wx.StaticBox(self.panel_1, -1, "New Division")
        self.button_3 = wx.Button(self.panel_1, -1, "Close")
        self.hyperlink_1 = wx.HyperlinkCtrl(self.panel_1, wx.ID_ANY, "",
                                            "Add Academic Year")

        self.__set_properties()
        self.__do_layout()

        self.Bind(wx.EVT_COMBOBOX, self.on_year, self.combo_box_1)
        self.Bind(wx.EVT_COMBOBOX, self.on_class, self.combo_box_2)
        self.Bind(wx.EVT_LISTBOX, self.on_list, self.list_box_1)
        self.Bind(wx.EVT_BUTTON, self.on_remove, self.button_1)
        self.Bind(wx.EVT_TEXT, self.on_text, self.text_ctrl_1)

        self.Bind(wx.EVT_BUTTON, self.on_add, self.button_2)
        self.Bind(wx.EVT_BUTTON, self.on_close, self.button_3)

        self.text_ctrl_1.Bind(wx.EVT_SET_FOCUS, self.onfocus)
        self.text_ctrl_1.Bind(wx.EVT_KILL_FOCUS, self.offocus)
        self.text_ctrl_1.Bind(wx.EVT_KEY_DOWN, self.on_keypress)

        self.Bind(wx.EVT_HYPERLINK, self.on_hlink, self.hyperlink_1)

        self.YEAR = ''
        self.CLASS = ''

        self.DB = db_operations()
        self.load_year()
Example #24
0
    def construct_common(self, is_new):
        self.label_warnings = StaticText(self, -1, '', style = wx.ALIGN_CENTER)
        self.label_warnings.SetForegroundColour(wx.Colour(224, 0, 0))
        self.clear_warning()

        needs_password =  self.protocolinfo.get('needs_password', True)
        self.label_screenname = StaticText(self, -1, self.screenname_name + ':', style = ALIGN_RIGHT)

        if needs_password:
            self.label_password = StaticText(self, -1, 'Password:'******'' and hasattr(self.protocolinfo, 'newuser_url'):
            sn = self.url_screenname   = wx.HyperlinkCtrl(self, -1, 'New User?',
                                                     getattr(self.protocolinfo, 'newuser_url'))
            sn.HoverColour = sn.VisitedColour = sn.NormalColour

        if needs_password and hasattr(self.protocolinfo, 'password_url'):
            password = self.url_password     = wx.HyperlinkCtrl(self, -1, 'Forgot Password?',
                                                     getattr(self.protocolinfo, 'password_url'))

            password.HoverColour = password.VisitedColour = password.NormalColour

        if self.protocolinfo.get('needs_smtp', False):
            self.email_address = TextCtrl(self, -1, value = getattr(self.account, 'email_address', ''), size = txtSize, validator=LengthLimit(1024))

        self.name = TextCtrl(self, -1, value=self.account.name, size=txtSize, validator=LengthLimit(1024))

        # disable editing of username if this account is not new
        if not self.new:
            self.name.SetEditable(False)
            self.name.SetBackgroundColour(wx.SystemSettings.GetColour(wx.SYS_COLOUR_SCROLLBAR))
        # self.name.Enable(self.new)

        if needs_password:
            password = self.account._decryptedpw()

            f = lambda p: TextCtrl(self, -1, value = p,
                                          size = txtSize, style = wx.TE_PASSWORD,
                                          validator = LengthLimit(128))
            try:
                self.password = f(password)
            except UnicodeDecodeError:
                self.password = f('')
Example #25
0
    def __init__(self, parent, title="About"):
        wx.Frame.__init__(self, parent, title=title,
                          style=wx.CLOSE_BOX | wx.RESIZE_BORDER | wx.CAPTION)
        # Every windows should use panel as parent. Not doing so will
        # make the windows look non-native (very ugly)
        panel = wx.Panel(self)

        self.about1 = wx.StaticText(panel, style=wx.ALIGN_CENTER,
                                    label="Minecraft Region-Fixer (GUI) (ver. {0})\n(using Region-Fixer ver. {1})".format(gui_ver,rf_ver))
        self.about2 = wx.StaticText(panel, style=wx.ALIGN_CENTER,
                                    label="Fix problems in Minecraft worlds.")
        self.about3 = wx.StaticText(panel, style=wx.ALIGN_CENTER,
                                    label="Official-web:")
        self.link_github = wx.HyperlinkCtrl(panel, wx.ID_ABOUT,
                        "https://github.com/Fenixin/Minecraft-Region-Fixer",
                        "https://github.com/Fenixin/Minecraft-Region-Fixer",
                        style=wx.ALIGN_CENTER)
        self.about4 = wx.StaticText(panel,
                                    style=wx.TE_MULTILINE | wx.ALIGN_CENTER,
                                    label="Minecraft forums post:")
        self.link_minecraft_forums = wx.HyperlinkCtrl(panel, wx.ID_ABOUT,
            "http://www.minecraftforum.net/topic/302380-minecraft-region-fixer/",
            "http://www.minecraftforum.net/topic/302380-minecraft-region-fixer/",
            style=wx.ALIGN_CENTER)

        self.close_button = wx.Button(panel, wx.ID_CLOSE)

        self.sizer = wx.BoxSizer(wx.VERTICAL)
        self.sizer.Add(self.about1, 0, wx.ALIGN_CENTER | wx.TOP, 10)
        self.sizer.Add(self.about2, 0, wx.ALIGN_CENTER| wx.TOP, 20)
        self.sizer.Add(self.about3, 0, wx.ALIGN_CENTER | wx.TOP, 20)
        self.sizer.Add(self.link_github, 0, wx.ALIGN_CENTER | wx.ALL, 5)
        self.sizer.Add(self.about4, 0, wx.ALIGN_CENTER | wx.TOP, 20)
        self.sizer.Add(self.link_minecraft_forums, 0,wx.ALIGN_CENTER | wx.ALL, 5)
        self.sizer.Add(self.close_button, 0, wx.ALIGN_CENTER | wx.ALL, 20)

        # Fit sizers and make the windows not resizable
        panel.SetSizerAndFit(self.sizer)
        self.sizer.Fit(self)
        size = self.GetSize()
        self.SetMinSize(size)
        self.SetMaxSize(size)

        self.Bind(wx.EVT_BUTTON, self.OnClose, self.close_button)
Example #26
0
    def __init__(self, *args, **kwds):
        # begin wxGlade: wxgDynamicHintListDlg.__init__
        kwds[
            "style"] = wx.DEFAULT_DIALOG_STYLE | wx.MAXIMIZE_BOX | wx.MINIMIZE_BOX | wx.RESIZE_BORDER
        wx.Dialog.__init__(self, *args, **kwds)
        self._TCTRL_header = wx.TextCtrl(self,
                                         wx.ID_ANY,
                                         _("Dynamic hints"),
                                         style=wx.BORDER_NONE | wx.TE_CENTRE
                                         | wx.TE_READONLY)
        self._LCTRL_hints = cReportListCtrl(self,
                                            wx.ID_ANY,
                                            style=wx.BORDER_SIMPLE
                                            | wx.LC_REPORT | wx.LC_SINGLE_SEL)
        self._TCTRL_hint = wx.TextCtrl(self,
                                       wx.ID_ANY,
                                       "",
                                       style=wx.TE_MULTILINE | wx.TE_READONLY
                                       | wx.TE_WORDWRAP)
        self._TCTRL_source = wx.TextCtrl(self,
                                         wx.ID_ANY,
                                         _("<hint source>"),
                                         style=wx.BORDER_NONE | wx.TE_CENTRE
                                         | wx.TE_READONLY)
        self._URL_info = wx.HyperlinkCtrl(self,
                                          wx.ID_ANY,
                                          _("Further information"),
                                          _("http://www.duckduckgo.com"),
                                          style=wx.HL_DEFAULT_STYLE)
        self._TCTRL_rationale = cTextCtrl(self,
                                          wx.ID_ANY,
                                          "",
                                          style=wx.BORDER_NONE
                                          | wx.TE_MULTILINE | wx.TE_WORDWRAP)
        self._LBL_previous_rationale = wx.StaticText(self, wx.ID_ANY,
                                                     _("Previous\nrationale"))
        self._TCTRL_previous_rationale = cTextCtrl(
            self,
            wx.ID_ANY,
            "",
            style=wx.BORDER_NONE | wx.TE_MULTILINE | wx.TE_READONLY
            | wx.TE_WORDWRAP)
        self._BTN_OK = wx.Button(self, wx.ID_OK, "")
        self._BTN_suppress = wx.Button(self, wx.ID_ANY, _("&Suppress"))
        self._BTN_manage_hints = wx.Button(self,
                                           wx.ID_ANY,
                                           _("&Manage"),
                                           style=wx.BU_EXACTFIT)

        self.__set_properties()
        self.__do_layout()

        self.Bind(wx.EVT_BUTTON, self._on_suppress_button_pressed,
                  self._BTN_suppress)
        self.Bind(wx.EVT_BUTTON, self._on_manage_hints_button_pressed,
                  self._BTN_manage_hints)
Example #27
0
    def __init__(self, parent):
        wx.Dialog.__init__(self,
                           parent,
                           id=wx.ID_ANY,
                           title=u"MicroView Update Available",
                           pos=wx.DefaultPosition,
                           size=wx.Size(375, 179),
                           style=wx.DEFAULT_DIALOG_STYLE)

        self.SetSizeHintsSz(wx.DefaultSize, wx.DefaultSize)

        bSizer105 = wx.BoxSizer(wx.VERTICAL)

        bSizer106 = wx.BoxSizer(wx.HORIZONTAL)

        self.m_bitmap2 = wx.StaticBitmap(
            self, wx.ID_ANY, wx.ArtProvider.GetBitmap(wx.ART_INFORMATION, ),
            wx.DefaultPosition, wx.Size(-1, -1), 0)
        bSizer106.Add(self.m_bitmap2, 0, wx.ALL, 5)

        self.m_staticTextVersionMessage = wx.StaticText(
            self, wx.ID_ANY,
            u"A new version of MicroView is available for download!\nVersion %s can be downloaded by using the following link:",
            wx.DefaultPosition, wx.Size(-1, 50), 0)
        self.m_staticTextVersionMessage.Wrap(300)
        bSizer106.Add(self.m_staticTextVersionMessage, 0, wx.ALL | wx.EXPAND,
                      5)

        bSizer105.Add(bSizer106, 0, wx.EXPAND, 5)

        self.m_hyperlink1 = wx.HyperlinkCtrl(
            self, wx.ID_ANY, u"http://www.parallax-innovations.com/microview",
            u"http://www.parallax-innovations.com/microview",
            wx.DefaultPosition, wx.DefaultSize, wx.HL_DEFAULT_STYLE)
        bSizer105.Add(self.m_hyperlink1, 0, wx.ALL | wx.BOTTOM | wx.TOP, 10)

        bSizer105.AddSpacer((0, 0), 0, wx.EXPAND, 5)

        self.m_checkBoxShowDialog = wx.CheckBox(
            self, wx.ID_ANY, u"Show this dialog at start-up",
            wx.DefaultPosition, wx.DefaultSize, 0)
        self.m_checkBoxShowDialog.SetValue(True)
        bSizer105.Add(self.m_checkBoxShowDialog, 0, wx.ALL, 5)

        self.m_buttonOk = wx.Button(self, wx.ID_OK, u"OK", wx.DefaultPosition,
                                    wx.DefaultSize, 0)
        bSizer105.Add(self.m_buttonOk, 0, wx.ALIGN_CENTER_HORIZONTAL | wx.ALL,
                      5)

        self.SetSizer(bSizer105)
        self.Layout()

        self.Centre(wx.BOTH)

        # Connect Events
        self.m_buttonOk.Bind(wx.EVT_BUTTON, self.onButtonClick)
Example #28
0
    def __init__(self, parent, latestVersionTagName, latestVersionChanges):
        if hasattr(sys, "frozen"):
            from .. import __version__ as VERSION
        else:
            from .. import LATEST_COMMIT as VERSION
        super(NewVersionAlertPanel, self).__init__(parent)
        sizer = wx.FlexGridSizer(rows=5, cols=1, vgap=5, hgap=5)
        self.SetSizer(sizer)
        newVersionAlertTitleLabel = wx.StaticText(self, label="MyData")
        font = wx.SystemSettings.GetFont(wx.SYS_DEFAULT_GUI_FONT)
        font.SetPointSize(14)
        font.SetWeight(wx.BOLD)
        newVersionAlertTitleLabel.SetFont(font)
        sizer.Add(newVersionAlertTitleLabel)

        newVersionAlertTextLabel1 = wx.StaticText(
            self,
            label="You are running version v" + VERSION + "\n\n" +
            "The latest version is " + latestVersionTagName + "\n\n" +
            "Please download MyData %s from:" % latestVersionTagName)
        font = wx.SystemSettings.GetFont(wx.SYS_DEFAULT_GUI_FONT)
        if sys.platform.startswith("darwin"):
            font.SetPointSize(11)
        else:
            font.SetPointSize(9)
        newVersionAlertTextLabel1.SetFont(font)
        sizer.Add(newVersionAlertTextLabel1, flag=wx.EXPAND)

        newVersionAlertHyperlink = wx.HyperlinkCtrl(self,
                                                    id=wx.ID_ANY,
                                                    label=UPDATE_URL,
                                                    url=UPDATE_URL)
        font = wx.SystemSettings.GetFont(wx.SYS_DEFAULT_GUI_FONT)
        if sys.platform.startswith("darwin"):
            font.SetPointSize(11)
        else:
            font.SetPointSize(8)
        newVersionAlertHyperlink.SetFont(font)
        sizer.Add(newVersionAlertHyperlink, border=10, flag=wx.LEFT)

        self.latestVersionChangesTextCtrl = wx.TextCtrl(self,
                                                        size=(600, 200),
                                                        style=wx.TE_MULTILINE
                                                        | wx.TE_READONLY)
        sizer.Add(self.latestVersionChangesTextCtrl, flag=wx.EXPAND)
        if sys.platform.startswith("darwin"):
            font = wx.Font(11, wx.MODERN, wx.NORMAL, wx.NORMAL, False,
                           u'Courier New')
        else:
            font = wx.Font(9, wx.MODERN, wx.NORMAL, wx.NORMAL, False,
                           u'Courier New')
        self.latestVersionChangesTextCtrl.SetFont(font)
        self.latestVersionChangesTextCtrl.AppendText(latestVersionChanges)
        self.latestVersionChangesTextCtrl.SetInsertionPoint(0)

        sizer.Add(ContactPanel(self), flag=wx.EXPAND)
Example #29
0
    def __init__(self, parent):
        self._init_ctrls(parent)

        self.hyperlink = wx.HyperlinkCtrl(self, 100, "http://www.morcavon.com", "http://morcavon.com/1178440402", size=wx.Size(390,30))
        self.hyperlink.Center(wx.BOTH)
        self.hyperlink.SetCursor(wx.CROSS_CURSOR)
        self.hyperlink.SetToolTipString('\xba\xed\xb7\xce\xb1\xd7\xb7\xce GoGo~')
        self.hyperlink.SetForegroundColour(wx.Colour(255, 0, 0))
        self.hyperlink.SetFont(wx.Font(20, wx.SWISS, wx.NORMAL, wx.BOLD,
              False, 'Tahoma'))
        self.hyperlink.SetVisitedColour(wx.Colour(0,0,0))
Example #30
0
    def ConstructMore(self):
        self.checks = []
        self.hiddens = []
        import gui.lattice
        for s in sorted((IServiceComponentGUIMetaData(sc)
                         for sc in IServiceProviderGUIMetaData(self.data).service_components),
                        key = attrgetter('type'),
                        cmp = component_sort):
            c = wx.CheckBox(self, -1, s.service_name)
            for a in self.data.accounts.values():
                if a.protocol == s.component_id:
                    c.controller = AccountEnabledCheckSync(account = a,
                                                           check = c)
                    break
            else:
                c.controller = NoAccountEnabledCheckSync(provider = self.data, component = s, check = c)
            if s.type == 'im':
                text = wx.StaticText(self, label = _('(auto login)'))
                f = c.Font
                text.Font = f
                text.ForegroundColour = wx.Color(*self._base_color_tuple)
                text.Hide()
                self.hiddens.append(text)
                c = (c, text)
            self.checks.append(c)

        # Extra component--the edit hyperlink
        edit = self.edit = wx.HyperlinkCtrl(self, -1, _('Edit'), '#')
        edit.Hide()
        edit.Bind(wx.EVT_HYPERLINK, lambda e: self.on_edit())

        remove = self.remove = wx.HyperlinkCtrl(self, -1, _('Remove'), '#')
        remove.Hide()
        remove.Bind(wx.EVT_HYPERLINK, lambda e: self.on_delete())

        self.hiddens.append(edit)
        self.hiddens.append(remove)

        edit.HoverColour = edit.VisitedColour = edit.ForegroundColour
        remove.HoverColour = remove.VisitedColour = remove.ForegroundColour
        self._reset_text_name()