X-Git-Url: http://www.iramuteq.org/git?a=blobdiff_plain;f=iramuteq.py;h=042ee0ef41a7f542c23ce994eb94b0538e6965e1;hb=refs%2Fheads%2F3.0;hp=d0bfb720982470b38e84015e62e8572d224e3469;hpb=dac789bedd0b3867a7749b1d71bc7868c44642f7;p=iramuteq diff --git a/iramuteq.py b/iramuteq.py index d0bfb72..042ee0e 100755 --- a/iramuteq.py +++ b/iramuteq.py @@ -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,10 +708,14 @@ class IraFrame(wx.Frame): BestRPath = False if not CheckRPath(self.PathPath) : if sys.platform == 'win32': - if os.path.exists(self.AppliPath + '\\R\\R') : + 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: @@ -750,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' : @@ -764,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._mgr.Update() + self.Refresh() #-------------------------------------------------------------------- # fin de __init__ du wx.Frame @@ -920,16 +936,7 @@ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, États-Unis.""" if isinstance(parent, IraFrame) : 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) - #self._mgr.Update() - #wx.CallAfter(self.nb.SendSizeEvent) - #self.Refresh() + self.tree.GiveFocus(uuid=npage.parametres['uuid']) # action ou évènement ? def OnCloseTab(self, evt): @@ -966,12 +973,12 @@ 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() - print('show a pane refresh') wx.CallAfter(self.nb.SendSizeEvent) self.Refresh()