968 for confnode_method in confnode.ConfNodeMethods: |
968 for confnode_method in confnode.ConfNodeMethods: |
969 if "method" in confnode_method and confnode_method.get("shown",True): |
969 if "method" in confnode_method and confnode_method.get("shown",True): |
970 id = wx.NewId() |
970 id = wx.NewId() |
971 label = confnode_method["name"] |
971 label = confnode_method["name"] |
972 button = GenBitmapTextButton(id=id, parent=parent, |
972 button = GenBitmapTextButton(id=id, parent=parent, |
973 bitmap=wx.Bitmap(Bpath( "%s.png"%confnode_method.get("bitmap", os.path.join("images", "Unknown")))), label=label, |
973 bitmap=wx.Bitmap(Bpath("images", "%s.png"%confnode_method.get("bitmap", "Unknown"))), label=label, |
974 name=label, pos=wx.DefaultPosition, style=wx.NO_BORDER) |
974 name=label, pos=wx.DefaultPosition, style=wx.NO_BORDER) |
975 button.SetFont(normal_bt_font) |
975 button.SetFont(normal_bt_font) |
976 button.SetToolTipString(confnode_method["tooltip"]) |
976 button.SetToolTipString(confnode_method["tooltip"]) |
977 button.Bind(wx.EVT_BUTTON, self.GetButtonCallBackFunction(confnode, confnode_method["method"]), id=id) |
977 button.Bind(wx.EVT_BUTTON, self.GetButtonCallBackFunction(confnode, confnode_method["method"]), id=id) |
978 # a fancy underline on mouseover |
978 # a fancy underline on mouseover |
1827 Max_Traceback_List_Size = 20 |
1827 Max_Traceback_List_Size = 20 |
1828 |
1828 |
1829 def Display_Exception_Dialog(e_type, e_value, e_tb, bug_report_path): |
1829 def Display_Exception_Dialog(e_type, e_value, e_tb, bug_report_path): |
1830 trcbck_lst = [] |
1830 trcbck_lst = [] |
1831 for i,line in enumerate(traceback.extract_tb(e_tb)): |
1831 for i,line in enumerate(traceback.extract_tb(e_tb)): |
1832 trcbck = " " + str(i+1) + _(". ") |
1832 trcbck = " " + str(i+1) + ". " |
1833 if line[0].find(os.getcwd()) == -1: |
1833 if line[0].find(os.getcwd()) == -1: |
1834 trcbck += _("file : ") + str(line[0]) + _(", ") |
1834 trcbck += "file : " + str(line[0]) + ", " |
1835 else: |
1835 else: |
1836 trcbck += _("file : ") + str(line[0][len(os.getcwd()):]) + _(", ") |
1836 trcbck += "file : " + str(line[0][len(os.getcwd()):]) + ", " |
1837 trcbck += _("line : ") + str(line[1]) + _(", ") + _("function : ") + str(line[2]) |
1837 trcbck += "line : " + str(line[1]) + ", " + "function : " + str(line[2]) |
1838 trcbck_lst.append(trcbck) |
1838 trcbck_lst.append(trcbck) |
1839 |
1839 |
1840 # Allow clicking.... |
1840 # Allow clicking.... |
1841 cap = wx.Window_GetCapture() |
1841 cap = wx.Window_GetCapture() |
1842 if cap: |
1842 if cap: |