[gedit-latex] Remove LaTeXForwardSearch - replaced by synctex



commit 2d5baf467e2d99a14724df73f7a6933af617eda1
Author: John Stowers <john stowers gmail com>
Date:   Sun Jun 26 17:06:17 2011 +1200

    Remove LaTeXForwardSearch - replaced by synctex

 latex/base/__init__.py |    9 ---------
 latex/base/config.py   |    5 ++---
 latex/latex/actions.py |   23 -----------------------
 3 files changed, 2 insertions(+), 35 deletions(-)
---
diff --git a/latex/base/__init__.py b/latex/base/__init__.py
index 8c24460..d83486a 100644
--- a/latex/base/__init__.py
+++ b/latex/base/__init__.py
@@ -598,15 +598,6 @@ class Editor(object):
 		return self._text_buffer.get_encoding().get_charset()
 	
 	@property
-	def cursor_position(self):
-		"""
-		@return: a tuple containing (line, column)
-		"""
-		# only need by LaTeXForwardSearchAction
-		iter = self._text_buffer.get_iter_at_mark(self._text_buffer.get_insert())
-		return (iter.get_line(), iter.get_line_offset())
-	
-	@property
 	def content(self):
 		"""
 		Return the string contained in the TextBuffer
diff --git a/latex/base/config.py b/latex/base/config.py
index 836a8c3..4447014 100644
--- a/latex/base/config.py
+++ b/latex/base/config.py
@@ -46,7 +46,6 @@ UI = """
 					<separator />
 					<menuitem action="LaTeXCloseEnvironmentAction" />
 					<separator />
-					<menuitem action="LaTeXForwardSearchAction" />
 					<menuitem action="LaTeXBuildImageAction" />
 				</menu>
 				<menu action="BibTeXMenuAction">
@@ -120,7 +119,7 @@ from ..latex.actions import LaTeXMenuAction, LaTeXNewAction, LaTeXChooseMasterAc
 		LaTeXJustifyCenterAction, LaTeXJustifyRightAction, LaTeXMathMenuAction, LaTeXMathAction, LaTeXDisplayMathAction, \
 		LaTeXEquationAction, LaTeXUnEqnArrayAction, LaTeXEqnArrayAction, LaTeXUnderlineAction, LaTeXSmallCapitalsAction, \
 		LaTeXRomanAction, LaTeXSansSerifAction, LaTeXTypewriterAction, LaTeXCloseEnvironmentAction, LaTeXBlackboardBoldAction, \
-		LaTeXCaligraphyAction, LaTeXFrakturAction, LaTeXForwardSearchAction, LaTeXBuildImageAction, LaTeXSaveAsTemplateAction
+		LaTeXCaligraphyAction, LaTeXFrakturAction, LaTeXBuildImageAction, LaTeXSaveAsTemplateAction
 
 from ..bibtex.actions import BibTeXMenuAction, BibTeXNewEntryAction
 
@@ -132,7 +131,7 @@ ACTIONS = [ LaTeXMenuAction, LaTeXNewAction, LaTeXChooseMasterAction,
 		LaTeXJustifyCenterAction, LaTeXJustifyRightAction, LaTeXMathMenuAction, LaTeXMathAction, LaTeXDisplayMathAction, 
 		LaTeXEquationAction, LaTeXUnEqnArrayAction, LaTeXEqnArrayAction, LaTeXUnderlineAction, LaTeXSmallCapitalsAction, 
 		LaTeXRomanAction, LaTeXSansSerifAction, LaTeXTypewriterAction, LaTeXCloseEnvironmentAction, LaTeXBlackboardBoldAction, 
-		LaTeXCaligraphyAction, LaTeXFrakturAction, LaTeXForwardSearchAction, LaTeXBuildImageAction, LaTeXSaveAsTemplateAction, 
+		LaTeXCaligraphyAction, LaTeXFrakturAction, LaTeXBuildImageAction, LaTeXSaveAsTemplateAction, 
 		BibTeXMenuAction, BibTeXNewEntryAction ]
 
 # views
diff --git a/latex/latex/actions.py b/latex/latex/actions.py
index 9cf297b..d4dde1b 100644
--- a/latex/latex/actions.py
+++ b/latex/latex/actions.py
@@ -128,29 +128,6 @@ class LaTeXChooseMasterAction(LaTeXAction):
 			property_file.save()
 		
 		
-class LaTeXForwardSearchAction(LaTeXAction):
-	_log = getLogger("LaTeXForwardSearchAction")
-	
-	label = "Find Position In DVI"
-	stock_id = Gtk.STOCK_FIND
-	accelerator = None
-	tooltip = None
-	
-	def activate(self, context):
-		editor = context.active_editor
-		assert type(editor) is LaTeXEditor
-		
-		tex_filename = "%s.tex" % editor.edited_file.shortname
-		dvi_filename = "%s.dvi" % editor.file.shortname
-		line, column = editor.cursor_position
-		
-		command = "xdvi -sourceposition \"%s:%s %s\" \"%s\"" % (line + 1, column, tex_filename, dvi_filename)
-		self._log.debug(command)
-		
-		import os
-		os.system(command)
-
-
 from parser import LaTeXParser, Node
 from ..issues import MockIssueHandler
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]