X-Git-Url: http://www.iramuteq.org/git?a=blobdiff_plain;f=iramuteq.py;h=042ee0ef41a7f542c23ce994eb94b0538e6965e1;hb=refs%2Fheads%2F3.0;hp=2bec72a81b59f747f7597bafa40ff3734c4cedc6;hpb=14ef9adbd80ca7e8ed9ee3f108858fa7d7c24d5b;p=iramuteq diff --git a/iramuteq.py b/iramuteq.py index 2bec72a..042ee0e 100755 --- a/iramuteq.py +++ b/iramuteq.py @@ -184,8 +184,8 @@ class printer(object) : def flush(self): pass -sys.stderr = writer() -sys.stdout = printer() +#sys.stderr = writer() +#sys.stdout = printer() images_analyses = { 'textroot' : 'textroot.png', @@ -238,6 +238,7 @@ class IraFrame(wx.Frame): wx.CLIP_CHILDREN): log.info('Starting Iramuteq... ' ) log.info('version : %s' % ConfigGlob.get('DEFAULT', 'version')) + print(size) wx.Frame.__init__(self, parent, id, title, pos, size, style) #Font self.SetFont(wx.Font(12, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL)) @@ -432,7 +433,7 @@ class IraFrame(wx.Frame): # min size for the frame itself isn't completely done. # see the end up FrameManager::Update() for the test # code. For now, just hard code a frame minimum size - self.SetMinSize(wx.Size(400, 400)) + self.SetMinSize(wx.Size(800, 600)) #-------------------------------------------------------------------- # barre d'outils : le menu de petits icones en haut de la fenetre @@ -584,7 +585,7 @@ class IraFrame(wx.Frame): self._mgr.GetPane("lefttree").Show() self._mgr.GetPane("classif_tb").Hide() # utilisé nulle part ailleurs que sur cette ligne ??? # "commit" all changes made to FrameManager - self._mgr.Update() + #self._mgr.Update() # Attache les événements aux éléments d'interface self.Bind(wx.EVT_MENU, self.OnAcceuil, id=ID_ACCEUIL) @@ -644,7 +645,7 @@ class IraFrame(wx.Frame): self._mgr.SetAGWFlags(self._mgr.GetAGWFlags() ^ (aui.AUI_MGR_RECTANGLE_HINT | aui.AUI_MGR_ALLOW_FLOATING)) self._mgr.GetArtProvider().SetMetric(aui.AUI_DOCKART_GRADIENT_TYPE, aui.AUI_GRADIENT_HORIZONTAL) self.GetDockArt().SetColor(aui.AUI_DOCKART_ACTIVE_CAPTION_GRADIENT_COLOUR, "#00FFF9") - self.DoUpdate() + #self.DoUpdate() self._icon = wx.Icon(os.path.join(ImagePath, "iraicone.ico"), wx.BITMAP_TYPE_ICO) self.SetIcon(self._icon) @@ -707,7 +708,14 @@ class IraFrame(wx.Frame): BestRPath = False if not CheckRPath(self.PathPath) : if sys.platform == 'win32': - BestRPath = FindRPAthWin32() + if os.path.exists(self.AppliPath + '\\R\\R\\x64\\R.exe') : + BestRPath = self.AppliPath + '\\R\\R\\bin\\x64\\R.exe' + elif os.path.exists(self.AppliPath + '\\R\\R\\i386\\R.exe') : + BestRPath = self.AppliPath + '\\R\\R\\bin\\i386\\R.exe' + else : + BestRPath = FindRPAthWin32() + elif os.path.exists(self.AppliPath + '/R/R') : + BestRPath = self.AppliPath + '/R/R' else: BestRPath = FindRPathNix() if BestRPath: @@ -747,13 +755,23 @@ class IraFrame(wx.Frame): if menu == 'text' : menu_pos = 4 if Show : + if self._mgr.GetPane('tb_text').IsShown() : + return self._mgr.GetPane('tb_text').Show() + self._mgr.GetPane('tb_mat').Hide() + self.mb.EnableTop(menu_pos, Show) + self.mb.EnableTop(3, False) else : self._mgr.GetPane('tb_text').Hide() elif menu == 'matrix' : menu_pos = 3 if Show : + if self._mgr.GetPane('tb_mat').IsShown(): + return self._mgr.GetPane('tb_mat').Show() + self._mgr.GetPane('tb_text').Hide() + self.mb.EnableTop(menu_pos, Show) + self.mb.EnableTop(4, False) else : self._mgr.GetPane('tb_mat').Hide() elif menu == 'view' : @@ -761,9 +779,10 @@ class IraFrame(wx.Frame): else : menu_pos = None if not menu_pos is None : - self.mb.EnableTop(menu_pos, Show) + #self.mb.EnableTop(menu_pos, Show) self.mb.Refresh() self._mgr.Update() + self.Refresh() #-------------------------------------------------------------------- # fin de __init__ du wx.Frame @@ -918,12 +937,6 @@ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, États-Unis.""" npage = self.nb.GetPage(new) if 'parametres' in dir(npage) : self.tree.GiveFocus(uuid=npage.parametres['uuid']) - if npage.parametres.get('matrix', False) : - self.ShowMenu('text', False) - self.ShowMenu('matrix', True) - elif npage.parametres.get('corpus', False) : - self.ShowMenu('text') - self.ShowMenu('matrix', False) # action ou évènement ? def OnCloseTab(self, evt): @@ -960,11 +973,14 @@ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, États-Unis.""" # action ou évènement ? def ShowAPane(self, panel): + print('ShowAPane') for pane in self._mgr.GetAllPanes() : if not pane.IsToolbar() and pane.name != 'lefttree': pane.Hide() self._mgr.GetPane(panel).Show() self._mgr.Update() + wx.CallAfter(self.nb.SendSizeEvent) + self.Refresh() # action ou évènement ? def OnAcceuil(self, event): @@ -1430,7 +1446,7 @@ class MySplashScreen(wx.adv.SplashScreen): displaySize = wx.DisplaySize() w = displaySize[0]/1.2 h = displaySize[1]/1.2 - frame = IraFrame(None, -1, "IRaMuTeQ " + ConfigGlob.get('DEFAULT', 'version'), size=(w, h)) + frame = IraFrame(None, -1, "IRaMuTeQ " + ConfigGlob.get('DEFAULT', 'version'), size=(int(w), int(h))) frame.Show() frame.finish_init() frame.Upgrade()