Changeset 1450
- Timestamp:
- 07/02/08 17:54:14 (5 months ago)
- Location:
- trunk/peppy
- Files:
-
- 4 modified
-
actions/__init__.py (modified) (2 diffs)
-
frame.py (modified) (1 diff)
-
plugins/error_log.py (modified) (1 diff)
-
plugins/project.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/peppy/actions/__init__.py
r1415 r1450 375 375 return self.id2index[id] 376 376 377 def getNonInlineName(self): 378 """When the list isn't an inline menu, get the name that should be used 379 as the indicator label for the menu. 380 """ 381 return _(self.name) 382 377 383 def insertIntoMenu(self,menu,pos=None): 378 384 self.cache.resetIndex() … … 393 399 # Inline list should always use a localized name for the pop-right 394 400 # indicator 395 self._insertMenu(menu, pos, child, _(self.name),True)401 self._insertMenu(menu, pos, child, self.getNonInlineName(),True) 396 402 self.topindex=pos 397 403 pos=0 -
trunk/peppy/frame.py
r1435 r1450 694 694 mode.showInitialPosition(url) 695 695 return mode is not None 696 697 def findTabOrOpen(self, url): 698 """Find a tab that contains this URL, otherwise open a new tab""" 699 if not self.makeTabActive(url): 700 self.open(url) 696 701 697 702 def open(self, url, modecls=None, mode_to_replace=None, force_new_tab=False, created_from_url=None): -
trunk/peppy/plugins/error_log.py
r1439 r1450 237 237 238 238 def open(self, url): 239 if not self.major.frame.makeTabActive(url): 240 self.major.frame.open(url) 239 self.major.frame.findTabOrOpen(url) 241 240 242 241 class ErrorLogPlugin(IPeppyPlugin): -
trunk/peppy/plugins/project.py
r1443 r1450 159 159 menumax = 20 160 160 161 def isEnabled(self): 162 return bool(self.mode.project_info) and hasattr(self, 'tags') and bool(self.tags) 163 164 def getNonInlineName(self): 165 lookup = self.mode.check_spelling[0] 166 dprint(lookup) 167 return lookup or "ctags unavailable" 168 161 169 def getItems(self): 162 170 # Because this is a popup action, we can save stuff to this object. … … 171 179 return [_('No suggestions')] 172 180 173 def isEnabled(self): 174 return bool(self.mode.project_info) and hasattr(self, 'tags') and bool(self.tags) 175 176 def action(self, index=-1, multiplier=1): 177 dprint(self.tags[index]) 181 def action(self, index=-1, multiplier=1): 182 file = self.tags[index][0] 183 addr = self.tags[index][1] 184 dprint("opening %s at line %s" % (file, addr)) 185 try: 186 line = int(addr) 187 file = "%s#%d" % (file, line) 188 except: 189 pass 190 self.frame.findTabOrOpen(file) 178 191 179 192 … … 348 361 PathParam('ctags_command', 'exuberant-ctags', 'Path to ctags command', fullwidth=True), 349 362 PathParam('ctags_tag_file_name', 'tags', 'name of the generated tags file', fullwidth=True), 350 StrParam('ctags_args', '-R ', 'extra arguments for the ctags command', fullwidth=True),363 StrParam('ctags_args', '-R -n', 'extra arguments for the ctags command', fullwidth=True), 351 364 ) 352 365
