Beispiel #1
0
 def activateHook(self):
     Publisher().subscribe(self.projectInfo, 'mode.preinit')
     Publisher().subscribe(self.getFundamentalMenu,
                           'fundamental.context_menu')
     Publisher().subscribe(self.applyProjectSettings,
                           'fundamental.default_settings_applied')
     pub.subscribe(self.getTabMenu, 'tabs.context_menu')
Beispiel #2
0
 def __init__(self, parent, **kwargs):
     if wx.Platform == '__WXMSW__':
         style = wx.TR_HAS_BUTTONS
         self.has_root = True
     else:
         style = wx.TR_HIDE_ROOT|wx.TR_HAS_BUTTONS
         self.has_root = False
     wx.TreeCtrl.__init__(self, parent, -1, size=(self.classprefs.best_width, self.classprefs.best_height), style=style)
     MinorMode.__init__(self, parent, **kwargs)
     self.root = self.AddRoot(self.mode.getTabName())
     self.hierarchy = None
     self.Bind(wx.EVT_TREE_ITEM_ACTIVATED, self.OnActivate)
     self.Bind(wx.EVT_TREE_ITEM_EXPANDED, self.OnExpand)
     self.Bind(wx.EVT_TREE_ITEM_COLLAPSED, self.OnCollapse)
     self.Bind(wx.EVT_TREE_ITEM_COLLAPSING, self.OnCollapsing)
     pub.subscribe(self.foldChanged, 'fold_changed')
Beispiel #3
0
 def createListenersPostHook(self):
     pub.subscribe(self.psBufferChanged, 'buffer.opened')
     pub.subscribe(self.psBufferChanged, 'buffer.modified')
     pub.subscribe(self.psBufferClosed, 'buffer.closed')
Beispiel #4
0
 def activateHook(self):
     pub.subscribe(self.getTabMenu, 'tabs.context_menu')
Beispiel #5
0
 def activateHook(self):
     pub.subscribe(RecentFiles.append, 'buffer.opened')
     pub.subscribe(RecentProjectFiles.append, 'project.file.opened')
     pub.subscribe(self.getTabMenu, 'tabs.context_menu')
Beispiel #6
0
 def createListenersPostHook(self):
     pub.subscribe(self.psBufferChanged, 'buffer.opened')
     pub.subscribe(self.psBufferChanged, 'buffer.modified')
     pub.subscribe(self.psBufferClosed, 'buffer.closed')
Beispiel #7
0
 def activateHook(self):
     Publisher().subscribe(self.projectInfo, "mode.preinit")
     Publisher().subscribe(self.getFundamentalMenu, "fundamental.context_menu")
     Publisher().subscribe(self.applyProjectSettings, "fundamental.default_settings_applied")
     pub.subscribe(self.getTabMenu, "tabs.context_menu")
Beispiel #8
0
 def activateHook(self):
     pub.subscribe(self.getTabBackgroundMenu, 'tab_background.context_menu')
     pub.subscribe(self.getTabMenu, 'tabs.context_menu')
     Publisher().subscribe(self.getFundamentalMenu, 'fundamental.context_menu')
Beispiel #9
0
 def activateHook(self):
     pub.subscribe(RecentFiles.append, 'buffer.opened')
     pub.subscribe(RecentProjectFiles.append, 'project.file.opened')
     pub.subscribe(self.getTabMenu, 'tabs.context_menu')