From: Youness Alaoui Date: Wed, 2 Sep 2015 18:37:22 +0000 (-0400) Subject: Add a url to materials and show a hyperlink X-Git-Tag: lulzbot-16.01~11 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=58752af21218b4ebab120d1db0e305f545759ab3;p=cura.git Add a url to materials and show a hyperlink --- diff --git a/Cura/gui/simpleMode.py b/Cura/gui/simpleMode.py index 288fee47..fbdd2ffc 100644 --- a/Cura/gui/simpleMode.py +++ b/Cura/gui/simpleMode.py @@ -132,6 +132,9 @@ class simpleModePanel(wx.Panel): boxsizer.Add(label, flag=wx.EXPAND) boxsizer.Add(self.materialCombo, border=5, flag=wx.BOTTOM|wx.TOP|wx.EXPAND) self.printMaterialPanel.SetSizer(boxsizer) + self.materialHyperlink = wx.HyperlinkCtrl(self.printMaterialPanel, -1, label=_('Click here for more!'), url='') + self.materialHyperlink.Show(False) + boxsizer.Add(self.materialHyperlink, border=5, flag=wx.BOTTOM|wx.TOP|wx.EXPAND) sizer.Add(self.printMaterialPanel, (1,0), border=10, flag=wx.EXPAND|wx.RIGHT|wx.LEFT|wx.TOP) sb = wx.StaticBox(self.printTypePanel, label=_("Select a quickprint profile:")) @@ -231,6 +234,10 @@ class simpleModePanel(wx.Panel): self.printOptionsBox.Show(True) self.printTypePanel.Show(True) + if material.url: + self.materialHyperlink.SetURL(material.url) + self.materialHyperlink.Show(material.url is not None) + # Add new profiles selectedProfile = None for print_profile in material.profiles: diff --git a/Cura/util/resources.py b/Cura/util/resources.py index 1e9ed86f..b3c031a6 100644 --- a/Cura/util/resources.py +++ b/Cura/util/resources.py @@ -132,6 +132,8 @@ class ProfileIni(object): self.full_name = self._getProfileInfo(ini_file, 'full_name') if self.full_name is None: self.full_name = self.name + # URL for the profile + self.url = self._getProfileInfo(ini_file, 'url') # Finds the full path to the real profile_file self.profile_file = self._findProfileFile() # default = The default profile to select