keys from mac
authorpierre <pierre@MacBook-Pro-de-pierre-ratinaud.local>
Sun, 10 Feb 2013 16:51:59 +0000 (17:51 +0100)
committerpierre <pierre@MacBook-Pro-de-pierre-ratinaud.local>
Sun, 10 Feb 2013 16:51:59 +0000 (17:51 +0100)
KeyFrame.py
dialog.py

index 2c47759..9856a4f 100755 (executable)
@@ -66,12 +66,12 @@ class AlcOptFrame(wx.Dialog):
             self.listcle.append(cle)
             
 
-        self.button_val = wx.Button(self,wx.ID_OK)
+        self.button_val = wx.Button(self, wx.ID_OK)
         
         for button in self.listbutton :
             self.Bind(wx.EVT_BUTTON,self.OnShowList,button)
         
-        self.Bind(wx.EVT_BUTTON, self.OnApply, self.button_val)
+        #self.Bind(wx.EVT_BUTTON, self.OnApply, self.button_val)
         
         self.dico=self.parent.parent.parent.lexique#'dictionnaires/lexique.txt')
 
@@ -131,15 +131,6 @@ class AlcOptFrame(wx.Dialog):
         ListViewFrame.CenterOnParent()
         val=ListViewFrame.ShowModal()
     
-    def OnApply(self,evt):
-        for i in range(0,len(self.listlabel)):
-            self.keys[self.listcle[i]] = self.listspin[i].GetValue()
-        DoConf().makeoptions(['KEY'], [self.keys], outfile = self.parent.parent.ira.ConfigPath['key'])
-        #self.Disable()
-        self.Destroy()
-        #return
-
-
 class ListView(wx.Dialog):
     def __init__(self, parent):
         wx.Dialog.__init__(self, parent, size=wx.Size(200, 400),style=wx.DEFAULT_DIALOG_STYLE)
index a1a250b..2e629ba 100755 (executable)
--- a/dialog.py
+++ b/dialog.py
@@ -8,11 +8,10 @@ import  wx.lib.colourselect as  csel
 import wx.lib.sized_controls as sc
 import wx.lib.filebrowsebutton as filebrowse
 import locale
+from functions import DoConf
 import os
 import sys
-#from listlex import *
 from KeyFrame import AlcOptFrame
-#from listlex import ListForSpec
 #---------------------------------------------------------------------------
 provider = wx.SimpleHelpProvider()
 wx.HelpProvider_Set(provider)
@@ -1152,7 +1151,11 @@ class StatDialog(wx.Dialog):
         dial = AlcOptFrame(self, self.parent.parent)
         dial.CenterOnParent()
         dial.ShowModal()
-        #dial.Destroy()
+        for i in range(0,len(dial.listlabel)):
+            dial.keys[dial.listcle[i]] = dial.listspin[i].GetValue()
+        print dial.keys
+        DoConf().makeoptions(['KEY'], [dial.keys], outfile = self.parent.parent.ConfigPath['key'])
+        dial.Destroy()
 
 class LexDialog( wx.Dialog ):