summaryrefslogtreecommitdiff
path: root/plugins/externaltools
diff options
context:
space:
mode:
authorPerberos <[email protected]>2011-11-07 19:52:18 -0300
committerPerberos <[email protected]>2011-11-07 19:52:18 -0300
commit5ded9cba8563f336939400303d6a841d5089b107 (patch)
treec5676588cff26ba37e12369fe4de24b54e9f6682 /plugins/externaltools
parentf00b3a11a199f9f85a4d46a600f9d14179b37dbf (diff)
downloadpluma-5ded9cba8563f336939400303d6a841d5089b107.tar.bz2
pluma-5ded9cba8563f336939400303d6a841d5089b107.tar.xz
renaming from gedit to pluma
Diffstat (limited to 'plugins/externaltools')
-rwxr-xr-xplugins/externaltools/Makefile.am8
-rwxr-xr-xplugins/externaltools/data/Makefile.am4
-rwxr-xr-xplugins/externaltools/data/build.desktop.in2
-rwxr-xr-xplugins/externaltools/data/build.tool.in2
-rwxr-xr-xplugins/externaltools/data/open-terminal-here-osx.desktop.in2
-rwxr-xr-xplugins/externaltools/data/open-terminal-here-osx.tool.in2
-rwxr-xr-xplugins/externaltools/data/open-terminal-here.desktop.in2
-rwxr-xr-xplugins/externaltools/data/open-terminal-here.tool.in2
-rwxr-xr-xplugins/externaltools/data/remove-trailing-spaces.desktop.in2
-rwxr-xr-xplugins/externaltools/data/run-command.desktop.in2
-rwxr-xr-xplugins/externaltools/data/run-command.tool.in2
-rwxr-xr-xplugins/externaltools/externaltools.pluma-plugin.desktop.in (renamed from plugins/externaltools/externaltools.gedit-plugin.desktop.in)4
-rwxr-xr-xplugins/externaltools/scripts/Makefile.am2
-rwxr-xr-xplugins/externaltools/scripts/pluma-tool-merge.pl (renamed from plugins/externaltools/scripts/gedit-tool-merge.pl)10
-rwxr-xr-xplugins/externaltools/tools/Makefile.am4
-rwxr-xr-xplugins/externaltools/tools/__init__.py10
-rwxr-xr-xplugins/externaltools/tools/capture.py2
-rwxr-xr-xplugins/externaltools/tools/filelookup.py6
-rwxr-xr-xplugins/externaltools/tools/functions.py38
-rwxr-xr-xplugins/externaltools/tools/library.py20
-rwxr-xr-xplugins/externaltools/tools/manager.py12
-rwxr-xr-xplugins/externaltools/tools/outputpanel.py6
-rwxr-xr-xplugins/externaltools/tools/tools.ui4
23 files changed, 74 insertions, 74 deletions
diff --git a/plugins/externaltools/Makefile.am b/plugins/externaltools/Makefile.am
index f529640c..bec58b63 100755
--- a/plugins/externaltools/Makefile.am
+++ b/plugins/externaltools/Makefile.am
@@ -1,11 +1,11 @@
# External Tools plugin
SUBDIRS = tools data scripts
-plugindir = $(GEDIT_PLUGINS_LIBS_DIR)
+plugindir = $(PLUMA_PLUGINS_LIBS_DIR)
-plugin_in_files = externaltools.gedit-plugin.desktop.in
-%.gedit-plugin: %.gedit-plugin.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache
+plugin_in_files = externaltools.pluma-plugin.desktop.in
+%.pluma-plugin: %.pluma-plugin.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache
-plugin_DATA = $(plugin_in_files:.gedit-plugin.desktop.in=.gedit-plugin)
+plugin_DATA = $(plugin_in_files:.pluma-plugin.desktop.in=.pluma-plugin)
EXTRA_DIST = $(plugin_in_files)
diff --git a/plugins/externaltools/data/Makefile.am b/plugins/externaltools/data/Makefile.am
index ae3a1c66..abac77c9 100755
--- a/plugins/externaltools/data/Makefile.am
+++ b/plugins/externaltools/data/Makefile.am
@@ -1,4 +1,4 @@
-TOOL_MERGE=$(top_srcdir)/plugins/externaltools/scripts/gedit-tool-merge.pl
+TOOL_MERGE=$(top_srcdir)/plugins/externaltools/scripts/pluma-tool-merge.pl
tools_in_files = \
build.tool.in \
@@ -29,7 +29,7 @@ desktop_in_files = $(install_tools_in_files:.tool.in=.desktop.in)
desktop_files = $(install_tools_in_files:.tool.in=.desktop)
tools_SCRIPTS = $(install_tools_in_files:.tool.in=)
-toolsdir = $(GEDIT_PLUGINS_DATA_DIR)/externaltools/tools
+toolsdir = $(PLUMA_PLUGINS_DATA_DIR)/externaltools/tools
all_tools_in_files = \
$(tools_in_files) \
diff --git a/plugins/externaltools/data/build.desktop.in b/plugins/externaltools/data/build.desktop.in
index 13767ee7..c2a49871 100755
--- a/plugins/externaltools/data/build.desktop.in
+++ b/plugins/externaltools/data/build.desktop.in
@@ -1,4 +1,4 @@
-[Gedit Tool]
+[Pluma Tool]
_Name=Build
_Comment=Run "make" in the document directory
Input=nothing
diff --git a/plugins/externaltools/data/build.tool.in b/plugins/externaltools/data/build.tool.in
index 0b81d5b6..d4cd7f43 100755
--- a/plugins/externaltools/data/build.tool.in
+++ b/plugins/externaltools/data/build.tool.in
@@ -1,7 +1,7 @@
#!/bin/sh
EHOME=`echo $HOME | sed "s/#/\#/"`
-DIR=$GEDIT_CURRENT_DOCUMENT_DIR
+DIR=$PLUMA_CURRENT_DOCUMENT_DIR
while test "$DIR" != "/"; do
for m in GNUmakefile makefile Makefile; do
if [ -f "${DIR}/${m}" ]; then
diff --git a/plugins/externaltools/data/open-terminal-here-osx.desktop.in b/plugins/externaltools/data/open-terminal-here-osx.desktop.in
index 801b003c..45587ef6 100755
--- a/plugins/externaltools/data/open-terminal-here-osx.desktop.in
+++ b/plugins/externaltools/data/open-terminal-here-osx.desktop.in
@@ -1,4 +1,4 @@
-[Gedit Tool]
+[Pluma Tool]
_Name=Open terminal here
_Comment=Open a terminal in the document location
Input=nothing
diff --git a/plugins/externaltools/data/open-terminal-here-osx.tool.in b/plugins/externaltools/data/open-terminal-here-osx.tool.in
index c3360064..86d842dc 100755
--- a/plugins/externaltools/data/open-terminal-here-osx.tool.in
+++ b/plugins/externaltools/data/open-terminal-here-osx.tool.in
@@ -1,6 +1,6 @@
#!/usr/bin/osascript
-set the_path to system attribute "GEDIT_CURRENT_DOCUMENT_DIR"
+set the_path to system attribute "PLUMA_CURRENT_DOCUMENT_DIR"
set cmd to "cd " & quoted form of the_path
tell application "System Events" to set terminalIsRunning to exists application process "Terminal"
diff --git a/plugins/externaltools/data/open-terminal-here.desktop.in b/plugins/externaltools/data/open-terminal-here.desktop.in
index 801b003c..45587ef6 100755
--- a/plugins/externaltools/data/open-terminal-here.desktop.in
+++ b/plugins/externaltools/data/open-terminal-here.desktop.in
@@ -1,4 +1,4 @@
-[Gedit Tool]
+[Pluma Tool]
_Name=Open terminal here
_Comment=Open a terminal in the document location
Input=nothing
diff --git a/plugins/externaltools/data/open-terminal-here.tool.in b/plugins/externaltools/data/open-terminal-here.tool.in
index d2dda8db..af35792a 100755
--- a/plugins/externaltools/data/open-terminal-here.tool.in
+++ b/plugins/externaltools/data/open-terminal-here.tool.in
@@ -1,4 +1,4 @@
#!/bin/sh
#TODO: use "mateconftool-2 -g /desktop/mate/applications/terminal/exec"
-mate-terminal --working-directory=$GEDIT_CURRENT_DOCUMENT_DIR &
+mate-terminal --working-directory=$PLUMA_CURRENT_DOCUMENT_DIR &
diff --git a/plugins/externaltools/data/remove-trailing-spaces.desktop.in b/plugins/externaltools/data/remove-trailing-spaces.desktop.in
index 99b8b703..70bd8fd1 100755
--- a/plugins/externaltools/data/remove-trailing-spaces.desktop.in
+++ b/plugins/externaltools/data/remove-trailing-spaces.desktop.in
@@ -1,4 +1,4 @@
-[Gedit Tool]
+[Pluma Tool]
_Name=Remove trailing spaces
_Comment=Remove useless trailing spaces in your file
Input=document
diff --git a/plugins/externaltools/data/run-command.desktop.in b/plugins/externaltools/data/run-command.desktop.in
index b58294b0..4e15e678 100755
--- a/plugins/externaltools/data/run-command.desktop.in
+++ b/plugins/externaltools/data/run-command.desktop.in
@@ -1,4 +1,4 @@
-[Gedit Tool]
+[Pluma Tool]
_Name=Run command
_Comment=Execute a custom command and put its output in a new document
Input=nothing
diff --git a/plugins/externaltools/data/run-command.tool.in b/plugins/externaltools/data/run-command.tool.in
index ee611bbb..6f08a622 100755
--- a/plugins/externaltools/data/run-command.tool.in
+++ b/plugins/externaltools/data/run-command.tool.in
@@ -1,4 +1,4 @@
#!/bin/sh
#TODO: use "mateconftool-2 -g /desktop/mate/applications/terminal/exec"
-exec `matedialog --entry --title="Run command - gedit" --text="Command to run"`
+exec `matedialog --entry --title="Run command - pluma" --text="Command to run"`
diff --git a/plugins/externaltools/externaltools.gedit-plugin.desktop.in b/plugins/externaltools/externaltools.pluma-plugin.desktop.in
index 5212c49b..fcd15a9d 100755
--- a/plugins/externaltools/externaltools.gedit-plugin.desktop.in
+++ b/plugins/externaltools/externaltools.pluma-plugin.desktop.in
@@ -1,4 +1,4 @@
-[Gedit Plugin]
+[Pluma Plugin]
Loader=python
Module=externaltools
IAge=2
@@ -6,4 +6,4 @@ _Name=External Tools
_Description=Execute external commands and shell scripts.
Authors=Steve Frécinaux <[email protected]>
Copyright=Copyright © 2005 Steve Frécinaux
-Website=http://www.gedit.org
+Website=http://www.pluma.org
diff --git a/plugins/externaltools/scripts/Makefile.am b/plugins/externaltools/scripts/Makefile.am
index 4ff8060b..237d5e58 100755
--- a/plugins/externaltools/scripts/Makefile.am
+++ b/plugins/externaltools/scripts/Makefile.am
@@ -1,4 +1,4 @@
-EXTRA_DIST = gedit-tool-merge.pl
+EXTRA_DIST = pluma-tool-merge.pl
-include $(top_srcdir)/git.mk
diff --git a/plugins/externaltools/scripts/gedit-tool-merge.pl b/plugins/externaltools/scripts/pluma-tool-merge.pl
index 780d95dd..37b752e7 100755
--- a/plugins/externaltools/scripts/gedit-tool-merge.pl
+++ b/plugins/externaltools/scripts/pluma-tool-merge.pl
@@ -1,22 +1,22 @@
#!/usr/bin/perl
-# gedit-tool-merge.pl
-# This file is part of gedit
+# pluma-tool-merge.pl
+# This file is part of pluma
#
# Copyright (C) 2006 - Steve Frécinaux <[email protected]>
#
-# gedit is free software; you can redistribute it and/or modify
+# pluma is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
-# gedit is distributed in the hope that it will be useful,
+# pluma is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with gedit; if not, write to the Free Software
+# along with pluma; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor,
# Boston, MA 02110-1301 USA
diff --git a/plugins/externaltools/tools/Makefile.am b/plugins/externaltools/tools/Makefile.am
index 5edcab58..d90eb4aa 100755
--- a/plugins/externaltools/tools/Makefile.am
+++ b/plugins/externaltools/tools/Makefile.am
@@ -1,6 +1,6 @@
# Python snippets plugin
-plugindir = $(GEDIT_PLUGINS_LIBS_DIR)/externaltools
+plugindir = $(PLUMA_PLUGINS_LIBS_DIR)/externaltools
plugin_PYTHON = \
__init__.py \
capture.py \
@@ -11,7 +11,7 @@ plugin_PYTHON = \
filelookup.py \
linkparsing.py
-uidir = $(GEDIT_PLUGINS_DATA_DIR)/externaltools/ui
+uidir = $(PLUMA_PLUGINS_DATA_DIR)/externaltools/ui
ui_DATA = tools.ui \
outputpanel.ui
diff --git a/plugins/externaltools/tools/__init__.py b/plugins/externaltools/tools/__init__.py
index a46aef8f..39522ede 100755
--- a/plugins/externaltools/tools/__init__.py
+++ b/plugins/externaltools/tools/__init__.py
@@ -1,5 +1,5 @@
# -*- coding: UTF-8 -*-
-# Gedit External Tools plugin
+# Pluma External Tools plugin
# Copyright (C) 2005-2006 Steve Frécinaux <[email protected]>
#
# This program is free software; you can redistribute it and/or modify
@@ -19,7 +19,7 @@
__all__ = ('ExternalToolsPlugin', 'ExternalToolsWindowHelper',
'Manager', 'OutputPanel', 'Capture', 'UniqueById')
-import gedit
+import pluma
import gtk
from manager import Manager
from library import ToolLibrary
@@ -166,7 +166,7 @@ class ExternalToolsWindowHelper(object):
manager = window.get_ui_manager()
self._action_group = gtk.ActionGroup('ExternalToolsPluginActions')
- self._action_group.set_translation_domain('gedit')
+ self._action_group.set_translation_domain('pluma')
self._action_group.add_actions([('ExternalToolManager',
None,
_('Manage _External Tools...'),
@@ -229,7 +229,7 @@ class ExternalToolsWindowHelper(object):
def update_manager(self, tool):
self._plugin.update_manager(tool)
-class ExternalToolsPlugin(gedit.Plugin):
+class ExternalToolsPlugin(pluma.Plugin):
WINDOW_DATA_KEY = "ExternalToolsPluginWindowData"
def __init__(self):
@@ -263,7 +263,7 @@ class ExternalToolsPlugin(gedit.Plugin):
self._manager.dialog.connect('destroy', self.on_manager_destroy)
- window = gedit.app_get_default().get_active_window()
+ window = pluma.app_get_default().get_active_window()
self._manager.run(window)
return self._manager.dialog
diff --git a/plugins/externaltools/tools/capture.py b/plugins/externaltools/tools/capture.py
index e47862c8..2f065761 100755
--- a/plugins/externaltools/tools/capture.py
+++ b/plugins/externaltools/tools/capture.py
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
-# Gedit External Tools plugin
+# Pluma External Tools plugin
# Copyright (C) 2005-2006 Steve Frécinaux <[email protected]>
#
# This program is free software; you can redistribute it and/or modify
diff --git a/plugins/externaltools/tools/filelookup.py b/plugins/externaltools/tools/filelookup.py
index 229823b7..ce4961f9 100755
--- a/plugins/externaltools/tools/filelookup.py
+++ b/plugins/externaltools/tools/filelookup.py
@@ -18,7 +18,7 @@
import os
import gio
-import gedit
+import pluma
class FileLookup:
"""
@@ -110,7 +110,7 @@ class OpenDocumentRelPathFileLookupProvider(FileLookupProvider):
if path.startswith('/'):
return None
- for doc in gedit.app_get_default().get_documents():
+ for doc in pluma.app_get_default().get_documents():
if doc.is_local():
location = doc.get_location()
if location:
@@ -135,7 +135,7 @@ class OpenDocumentFileLookupProvider(FileLookupProvider):
if path.startswith('/'):
return None
- for doc in gedit.app_get_default().get_documents():
+ for doc in pluma.app_get_default().get_documents():
if doc.is_local():
location = doc.get_location()
if location and location.get_uri().endswith(path):
diff --git a/plugins/externaltools/tools/functions.py b/plugins/externaltools/tools/functions.py
index 0d2bfdbf..b4b666f6 100755
--- a/plugins/externaltools/tools/functions.py
+++ b/plugins/externaltools/tools/functions.py
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
-# Gedit External Tools plugin
+# Pluma External Tools plugin
# Copyright (C) 2005-2006 Steve Frécinaux <[email protected]>
#
# This program is free software; you can redistribute it and/or modify
@@ -20,7 +20,7 @@ import os
import gtk
from gtk import gdk
import gio
-import gedit
+import pluma
#import gtksourceview
from outputpanel import OutputPanel
from capture import *
@@ -53,7 +53,7 @@ def run_external_tool(window, node):
capture = Capture(node.command, cwd)
capture.env = os.environ.copy()
- capture.set_env(GEDIT_CWD = cwd)
+ capture.set_env(PLUMA_CWD = cwd)
view = window.get_active_view()
if view is not None:
@@ -63,7 +63,7 @@ def run_external_tool(window, node):
# Current line number
piter = document.get_iter_at_mark(document.get_insert())
- capture.set_env(GEDIT_CURRENT_LINE_NUMBER=str(piter.get_line() + 1))
+ capture.set_env(PLUMA_CURRENT_LINE_NUMBER=str(piter.get_line() + 1))
# Current line text
piter.set_line_offset(0)
@@ -72,42 +72,42 @@ def run_external_tool(window, node):
if not end.ends_line():
end.forward_to_line_end()
- capture.set_env(GEDIT_CURRENT_LINE=piter.get_text(end))
+ capture.set_env(PLUMA_CURRENT_LINE=piter.get_text(end))
# Selected text (only if input is not selection)
if node.input != 'selection' and node.input != 'selection-document':
bounds = document.get_selection_bounds()
if bounds:
- capture.set_env(GEDIT_SELECTED_TEXT=bounds[0].get_text(bounds[1]))
+ capture.set_env(PLUMA_SELECTED_TEXT=bounds[0].get_text(bounds[1]))
bounds = current_word(document)
- capture.set_env(GEDIT_CURRENT_WORD=bounds[0].get_text(bounds[1]))
+ capture.set_env(PLUMA_CURRENT_WORD=bounds[0].get_text(bounds[1]))
- capture.set_env(GEDIT_CURRENT_DOCUMENT_TYPE=document.get_mime_type())
+ capture.set_env(PLUMA_CURRENT_DOCUMENT_TYPE=document.get_mime_type())
if uri is not None:
gfile = gio.File(uri)
scheme = gfile.get_uri_scheme()
name = os.path.basename(uri)
- capture.set_env(GEDIT_CURRENT_DOCUMENT_URI = uri,
- GEDIT_CURRENT_DOCUMENT_NAME = name,
- GEDIT_CURRENT_DOCUMENT_SCHEME = scheme)
- if gedit.utils.uri_has_file_scheme(uri):
+ capture.set_env(PLUMA_CURRENT_DOCUMENT_URI = uri,
+ PLUMA_CURRENT_DOCUMENT_NAME = name,
+ PLUMA_CURRENT_DOCUMENT_SCHEME = scheme)
+ if pluma.utils.uri_has_file_scheme(uri):
path = gfile.get_path()
cwd = os.path.dirname(path)
capture.set_cwd(cwd)
- capture.set_env(GEDIT_CURRENT_DOCUMENT_PATH = path,
- GEDIT_CURRENT_DOCUMENT_DIR = cwd)
+ capture.set_env(PLUMA_CURRENT_DOCUMENT_PATH = path,
+ PLUMA_CURRENT_DOCUMENT_DIR = cwd)
documents_uri = [doc.get_uri()
for doc in window.get_documents()
if doc.get_uri() is not None]
documents_path = [gio.File(uri).get_path()
for uri in documents_uri
- if gedit.utils.uri_has_file_scheme(uri)]
- capture.set_env(GEDIT_DOCUMENTS_URI = ' '.join(documents_uri),
- GEDIT_DOCUMENTS_PATH = ' '.join(documents_path))
+ if pluma.utils.uri_has_file_scheme(uri)]
+ capture.set_env(PLUMA_DOCUMENTS_URI = ' '.join(documents_uri),
+ PLUMA_DOCUMENTS_PATH = ' '.join(documents_path))
flags = capture.CAPTURE_BOTH
@@ -224,7 +224,7 @@ class MultipleDocumentsSaver:
for doc in docs:
signals[doc] = doc.connect('saving', self.on_document_saving)
- gedit.commands.save_document(window, doc)
+ pluma.commands.save_document(window, doc)
doc.disconnect(signals[doc])
def on_document_saving(self, doc, size, total_size):
@@ -277,7 +277,7 @@ def capture_end_execute_panel(capture, exit_code, panel, view, output_type):
end.forward_chars(300)
mtype = gio.content_type_guess(data=doc.get_text(start, end))
- lmanager = gedit.get_language_manager()
+ lmanager = pluma.get_language_manager()
language = lmanager.guess_language(doc.get_uri(), mtype)
diff --git a/plugins/externaltools/tools/library.py b/plugins/externaltools/tools/library.py
index 6eb6ff1a..e3dc624c 100755
--- a/plugins/externaltools/tools/library.py
+++ b/plugins/externaltools/tools/library.py
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
-# Gedit External Tools plugin
+# Pluma External Tools plugin
# Copyright (C) 2006 Steve Frécinaux <[email protected]>
#
# This program is free software; you can redistribute it and/or modify
@@ -41,19 +41,19 @@ class ToolLibrary(Singleton):
if platform.platform() != 'Windows':
for d in self.get_xdg_data_dirs():
- self.locations.append(os.path.join(d, 'gedit-2', 'plugins', 'externaltools', 'tools'))
+ self.locations.append(os.path.join(d, 'pluma-2', 'plugins', 'externaltools', 'tools'))
self.locations.append(datadir)
# self.locations[0] is where we save the custom scripts
if platform.platform() == 'Windows':
- toolsdir = os.path.expanduser('~/gedit/tools')
+ toolsdir = os.path.expanduser('~/pluma/tools')
else:
userdir = os.getenv('MATE22_USER_DIR')
if userdir:
- toolsdir = os.path.join(userdir, 'gedit/tools')
+ toolsdir = os.path.join(userdir, 'pluma/tools')
else:
- toolsdir = os.path.expanduser('~/.mate2/gedit/tools')
+ toolsdir = os.path.expanduser('~/.mate2/pluma/tools')
self.locations.insert(0, toolsdir);
@@ -80,9 +80,9 @@ class ToolLibrary(Singleton):
import xml.etree.ElementTree as et
userdir = os.getenv('MATE22_USER_DIR')
if userdir:
- filename = os.path.join(userdir, 'gedit/gedit-tools.xml')
+ filename = os.path.join(userdir, 'pluma/pluma-tools.xml')
else:
- filename = os.path.expanduser('~/.mate2/gedit/gedit-tools.xml')
+ filename = os.path.expanduser('~/.mate2/pluma/pluma-tools.xml')
if not os.path.isfile(filename):
return
@@ -250,7 +250,7 @@ class Tool(object):
for line in fp:
if not in_block:
- in_block = line.startswith('# [Gedit Tool]')
+ in_block = line.startswith('# [Pluma Tool]')
continue
if line.startswith('##') or line.startswith('# #'): continue
if not line.startswith('# '): break
@@ -389,7 +389,7 @@ class Tool(object):
# before entering the data block
for line in fp:
- if line.startswith('# [Gedit Tool]'):
+ if line.startswith('# [Pluma Tool]'):
break
lines.append(line)
# in the block:
@@ -407,7 +407,7 @@ class Tool(object):
return lines
def _dump_properties(self):
- lines = ['# [Gedit Tool]']
+ lines = ['# [Pluma Tool]']
for item in self._properties.iteritems():
if item[0] in self._transform:
lines.append('# %s=%s' % (item[0], self._transform[item[0]][1](item[1])))
diff --git a/plugins/externaltools/tools/manager.py b/plugins/externaltools/tools/manager.py
index e28a088a..4d4d50aa 100755
--- a/plugins/externaltools/tools/manager.py
+++ b/plugins/externaltools/tools/manager.py
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
-# Gedit External Tools plugin
+# Pluma External Tools plugin
# Copyright (C) 2005-2006 Steve Frécinaux <[email protected]>
#
# This program is free software; you can redistribute it and/or modify
@@ -18,7 +18,7 @@
__all__ = ('Manager', )
-import gedit
+import pluma
import gtk
import gtksourceview2 as gsv
import os.path
@@ -114,7 +114,7 @@ class LanguagesPopup(gtk.Window):
def init_languages(self, languages):
manager = gsv.LanguageManager()
- langs = gedit.language_manager_list_languages_sorted(manager, True)
+ langs = pluma.language_manager_list_languages_sorted(manager, True)
self.model.append([_('All languages'), None, not languages])
self.model.append(['-', None, False])
@@ -548,7 +548,7 @@ class Manager:
self.script_hash = self.compute_hash(script)
contenttype = gio.content_type_guess(data=script)
- lmanager = gedit.get_language_manager()
+ lmanager = pluma.get_language_manager()
language = lmanager.guess_language(content_type=contenttype)
if language is not None:
@@ -818,7 +818,7 @@ class Manager:
def on_tool_manager_dialog_response(self, dialog, response):
if response == gtk.RESPONSE_HELP:
- gedit.help_display(self.dialog, 'gedit', 'gedit-external-tools-plugin')
+ pluma.help_display(self.dialog, 'pluma', 'pluma-external-tools-plugin')
return
self.on_tool_manager_dialog_focus_out(dialog, None)
@@ -830,7 +830,7 @@ class Manager:
def on_tool_manager_dialog_focus_out(self, dialog, event):
self.save_current_tool()
- for window in gedit.app_get_default().get_windows():
+ for window in pluma.app_get_default().get_windows():
helper = window.get_data("ExternalToolsPluginWindowData")
helper.menu.update()
diff --git a/plugins/externaltools/tools/outputpanel.py b/plugins/externaltools/tools/outputpanel.py
index a30aad72..9d1da65f 100755
--- a/plugins/externaltools/tools/outputpanel.py
+++ b/plugins/externaltools/tools/outputpanel.py
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
-# Gedit External Tools plugin
+# Pluma External Tools plugin
# Copyright (C) 2005-2006 Steve Frécinaux <[email protected]>
# Copyright (C) 2010 Per Arneng <[email protected]>
#
@@ -19,7 +19,7 @@
__all__ = ('OutputPanel', 'UniqueById')
-import gtk, gedit
+import gtk, pluma
import pango
import gobject
import os
@@ -217,7 +217,7 @@ class OutputPanel(UniqueById):
gfile = self.file_lookup.lookup(link.path)
if gfile:
- gedit.commands.load_uri(self.window, gfile.get_uri(), None,
+ pluma.commands.load_uri(self.window, gfile.get_uri(), None,
link.line_nr)
gobject.idle_add(self.idle_grab_focus)
diff --git a/plugins/externaltools/tools/tools.ui b/plugins/externaltools/tools/tools.ui
index dff7d192..8b40ad98 100755
--- a/plugins/externaltools/tools/tools.ui
+++ b/plugins/externaltools/tools/tools.ui
@@ -122,7 +122,7 @@
</row>
</data>
</object>
- <object class="GeditDocument" id="commands_buffer">
+ <object class="PlumaDocument" id="commands_buffer">
<property name="highlight-matching-brackets">True</property>
</object>
<object class="GtkDialog" id="tool-manager-dialog">
@@ -517,7 +517,7 @@
<property name="vscrollbar_policy">automatic</property>
<property name="shadow_type">in</property>
<child>
- <object class="GeditView" id="commands">
+ <object class="PlumaView" id="commands">
<property name="buffer">commands_buffer</property>
<property name="visible">True</property>
<property name="auto-indent">True</property>