[gedit-latex/remove-tools: 3/4] Remove ToolView bottom tab



commit 1d076ccf07f36bc3a8c9a074a32937ab7b2d75b1
Author: John Stowers <john stowers gmail com>
Date:   Sat Jun 25 01:47:05 2011 +1200

    Remove ToolView bottom tab

 latex/base/decorators.py |   14 ---
 latex/latex/actions.py   |    5 +-
 latex/tools/__init__.py  |    4 +-
 latex/tools/views.py     |  200 ----------------------------------------------
 4 files changed, 5 insertions(+), 218 deletions(-)
---
diff --git a/latex/base/decorators.py b/latex/base/decorators.py
index caa39e6..6fbbd23 100644
--- a/latex/base/decorators.py
+++ b/latex/base/decorators.py
@@ -30,7 +30,6 @@ from gi.repository import Gedit, Gtk, Gio
 import string
 
 from config import UI, WINDOW_SCOPE_VIEWS, EDITOR_SCOPE_VIEWS, EDITORS, ACTIONS
-from ..tools.views import ToolView
 from . import File, SideView, BottomView, WindowContext
 from ..preferences import Preferences, IPreferencesMonitor
 
@@ -93,19 +92,6 @@ class GeditWindowDecorator(IPreferencesMonitor):
 		# caches window-scope View instances
 		self._views = {}
 		
-		#
-		# init the ToolView, it's always present
-		#
-		# TODO: position is ignored
-		# 
-		tool_view = ToolView(self._window_context)
-		self._views["ToolView"] = tool_view
-		#fixme put the id!
-		bottom_panel = self._window.get_bottom_panel()
-		print tool_view.icon
-		bottom_panel.add_item(tool_view, "ToolViewid", tool_view.label, tool_view.icon)
-		#self._window_bottom_views.append(tool_view)
-		
 		# update window context
 		self._window_context.window_scope_views = self._views
 	
diff --git a/latex/latex/actions.py b/latex/latex/actions.py
index 9cf297b..eaf42a1 100644
--- a/latex/latex/actions.py
+++ b/latex/latex/actions.py
@@ -28,6 +28,7 @@ from gi.repository import Gtk
 from ..base import Action
 from ..util import IconAction
 from ..preferences import Preferences
+from ..issues import MockStructuredIssueHandler
 
 
 class LaTeXAction(Action):
@@ -490,10 +491,8 @@ class LaTeXBuildImageAction(LaTeXIconAction):
 			
 		tool = self.dialog.run()
 		if tool is not None:
-			tool_view = context.find_view(None, "ToolView")
-			
 			if context.active_editor:
-				ToolRunner().run(context.active_editor.file, tool, tool_view)
+				ToolRunner().run(context.active_editor.file, tool, MockStructuredIssueHandler())
 
 			
 class LaTeXJustifyLeftAction(LaTeXTemplateAction):
diff --git a/latex/tools/__init__.py b/latex/tools/__init__.py
index 181d29c..68c1f2a 100644
--- a/latex/tools/__init__.py
+++ b/latex/tools/__init__.py
@@ -27,6 +27,8 @@ It can be used for cleaning up, converting files, for building PDFs etc.
 
 from logging import getLogger
 
+from ..issues import MockStructuredIssueHandler
+
 
 class Tool(object):
 	"""
@@ -120,7 +122,7 @@ class ToolAction(Action):
 	def activate(self, context):
 		self._log.debug("activate: %s" % self._tool)
 		
-		tool_view = context.find_view(None, "ToolView")
+		tool_view = MockStructuredIssueHandler()
 		
 		if context.active_editor:
 			from ..preferences import Preferences		# FIXME: circ dep



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