diff options
author | Youness Alaoui <kakaroto@kakaroto.homelinux.net> | 2015-09-02 21:37:22 +0300 |
---|---|---|
committer | Youness Alaoui <kakaroto@kakaroto.homelinux.net> | 2015-09-02 21:37:22 +0300 |
commit | 58752af21218b4ebab120d1db0e305f545759ab3 (patch) | |
tree | 3f4b149a6c57d8b7bb76ae3c387bfa9641e8ba48 | |
parent | 6650dc400abc2f5815244360d0f269d2b5d4eca0 (diff) |
Add a url to materials and show a hyperlink
-rw-r--r-- | Cura/gui/simpleMode.py | 7 | ||||
-rw-r--r-- | Cura/util/resources.py | 2 |
2 files changed, 9 insertions, 0 deletions
diff --git a/Cura/gui/simpleMode.py b/Cura/gui/simpleMode.py index 288fee4748..fbdd2ffc3c 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 1e9ed86fff..b3c031a6a2 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 |