Rename Pluma to Xedit

This commit is contained in:
Clement Lefebvre
2016-01-25 14:13:49 +00:00
parent 3a62ddff64
commit 4304f9ffc1
563 changed files with 112901 additions and 112901 deletions

View File

@@ -1,11 +1,11 @@
# External Tools plugin
SUBDIRS = tools data scripts
plugindir = $(PLUMA_PLUGINS_LIBS_DIR)
plugindir = $(XEDIT_PLUGINS_LIBS_DIR)
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_in_files = externaltools.xedit-plugin.desktop.in
%.xedit-plugin: %.xedit-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:.pluma-plugin.desktop.in=.pluma-plugin)
plugin_DATA = $(plugin_in_files:.xedit-plugin.desktop.in=.xedit-plugin)
EXTRA_DIST = $(plugin_in_files)

View File

@@ -1,4 +1,4 @@
TOOL_MERGE=$(top_srcdir)/plugins/externaltools/scripts/pluma-tool-merge.pl
TOOL_MERGE=$(top_srcdir)/plugins/externaltools/scripts/xedit-tool-merge.pl
tools_in_files = \
build.tool.in \
@@ -14,7 +14,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 = $(PLUMA_PLUGINS_DATA_DIR)/externaltools/tools
toolsdir = $(XEDIT_PLUGINS_DATA_DIR)/externaltools/tools
all_tools_in_files = \
$(tools_in_files)

View File

@@ -1,4 +1,4 @@
[Pluma Tool]
[Xedit Tool]
_Name=Build
_Comment=Run "make" in the document directory
Input=nothing

View File

@@ -1,7 +1,7 @@
#!/bin/sh
EHOME=`echo $HOME | sed "s/#/\#/"`
DIR=$PLUMA_CURRENT_DOCUMENT_DIR
DIR=$XEDIT_CURRENT_DOCUMENT_DIR
while test "$DIR" != "/"; do
for m in GNUmakefile makefile Makefile; do
if [ -f "${DIR}/${m}" ]; then

View File

@@ -1,4 +1,4 @@
[Pluma Tool]
[Xedit Tool]
_Name=Open terminal here
_Comment=Open a terminal in the document location
Input=nothing

View File

@@ -1,4 +1,4 @@
#!/bin/sh
#TODO: use "mateconftool-2 -g /desktop/mate/applications/terminal/exec"
mate-terminal --working-directory=$PLUMA_CURRENT_DOCUMENT_DIR &
mate-terminal --working-directory=$XEDIT_CURRENT_DOCUMENT_DIR &

View File

@@ -1,4 +1,4 @@
[Pluma Tool]
[Xedit Tool]
_Name=Remove trailing spaces
_Comment=Remove useless trailing spaces in your file
Input=document

View File

@@ -1,4 +1,4 @@
[Pluma Tool]
[Xedit Tool]
_Name=Run command
_Comment=Execute a custom command and put its output in a new document
Input=nothing

View File

@@ -1,4 +1,4 @@
#!/bin/sh
#TODO: use "gsettings get org.mate.applications-terminal exec"
exec `zenity --entry --title="Run command - Pluma" --text="Command to run"`
exec `zenity --entry --title="Run command - Xedit" --text="Command to run"`

View File

@@ -1,4 +1,4 @@
[Pluma Tool]
[Xedit Tool]
_Name=Search
Shortcut=<Primary><Shift>f
Languages=

View File

@@ -1,4 +1,4 @@
[Pluma Tool]
[Xedit Tool]
_Name=Switch onto a file .c and .h
Shortcut=<Shift><Alt>s
Applicability=all

View File

@@ -17,9 +17,9 @@
import os
name = os.environ["PLUMA_CURRENT_DOCUMENT_NAME"]
name = os.environ["XEDIT_CURRENT_DOCUMENT_NAME"]
if name.endswith('.c'):
os.system("pluma %s.h" % ".".join(name.split('.')[:-1]))
os.system("xedit %s.h" % ".".join(name.split('.')[:-1]))
if name.endswith('.h'):
os.system("pluma %s.c" % ".".join(name.split('.')[:-1]))
os.system("xedit %s.c" % ".".join(name.split('.')[:-1]))

View File

@@ -1,4 +1,4 @@
[Pluma Plugin]
[Xedit Plugin]
Loader=python
Module=externaltools
IAge=2

View File

@@ -1,4 +1,4 @@
EXTRA_DIST = pluma-tool-merge.pl
EXTRA_DIST = xedit-tool-merge.pl
-include $(top_srcdir)/git.mk

View File

@@ -1,22 +1,22 @@
#!/usr/bin/perl
# pluma-tool-merge.pl
# This file is part of pluma
# xedit-tool-merge.pl
# This file is part of xedit
#
# Copyright (C) 2006 - Steve Frécinaux <code@istique.net>
#
# pluma is free software; you can redistribute it and/or modify
# xedit 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.
#
# pluma is distributed in the hope that it will be useful,
# xedit 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 pluma; if not, write to the Free Software
# along with xedit; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor,
# Boston, MA 02110-1301 USA

View File

@@ -1,6 +1,6 @@
# Python snippets plugin
plugindir = $(PLUMA_PLUGINS_LIBS_DIR)/externaltools
plugindir = $(XEDIT_PLUGINS_LIBS_DIR)/externaltools
plugin_PYTHON = \
__init__.py \
capture.py \
@@ -11,7 +11,7 @@ plugin_PYTHON = \
filelookup.py \
linkparsing.py
uidir = $(PLUMA_PLUGINS_DATA_DIR)/externaltools/ui
uidir = $(XEDIT_PLUGINS_DATA_DIR)/externaltools/ui
ui_DATA = tools.ui \
outputpanel.ui

View File

@@ -1,5 +1,5 @@
# -*- coding: UTF-8 -*-
# Pluma External Tools plugin
# Xedit External Tools plugin
# Copyright (C) 2005-2006 Steve Frécinaux <steve@istique.net>
#
# This program is free software; you can redistribute it and/or modify
@@ -19,7 +19,7 @@
__all__ = ('ExternalToolsPlugin', 'ExternalToolsWindowHelper',
'Manager', 'OutputPanel', 'Capture', 'UniqueById')
import pluma
import xedit
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('pluma')
self._action_group.set_translation_domain('xedit')
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(pluma.Plugin):
class ExternalToolsPlugin(xedit.Plugin):
WINDOW_DATA_KEY = "ExternalToolsPluginWindowData"
def __init__(self):
@@ -263,7 +263,7 @@ class ExternalToolsPlugin(pluma.Plugin):
self._manager.dialog.connect('destroy', self.on_manager_destroy)
window = pluma.app_get_default().get_active_window()
window = xedit.app_get_default().get_active_window()
self._manager.run(window)
return self._manager.dialog

View File

@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Pluma External Tools plugin
# Xedit External Tools plugin
# Copyright (C) 2005-2006 Steve Frécinaux <steve@istique.net>
#
# This program is free software; you can redistribute it and/or modify

View File

@@ -18,7 +18,7 @@
import os
import gio
import pluma
import xedit
class FileLookup:
"""
@@ -110,7 +110,7 @@ class OpenDocumentRelPathFileLookupProvider(FileLookupProvider):
if path.startswith('/'):
return None
for doc in pluma.app_get_default().get_documents():
for doc in xedit.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 pluma.app_get_default().get_documents():
for doc in xedit.app_get_default().get_documents():
if doc.is_local():
location = doc.get_location()
if location and location.get_uri().endswith(path):

View File

@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Pluma External Tools plugin
# Xedit External Tools plugin
# Copyright (C) 2005-2006 Steve Frécinaux <steve@istique.net>
#
# 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 pluma
import xedit
#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(PLUMA_CWD = cwd)
capture.set_env(XEDIT_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(PLUMA_CURRENT_LINE_NUMBER=str(piter.get_line() + 1))
capture.set_env(XEDIT_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(PLUMA_CURRENT_LINE=piter.get_text(end))
capture.set_env(XEDIT_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(PLUMA_SELECTED_TEXT=bounds[0].get_text(bounds[1]))
capture.set_env(XEDIT_SELECTED_TEXT=bounds[0].get_text(bounds[1]))
bounds = current_word(document)
capture.set_env(PLUMA_CURRENT_WORD=bounds[0].get_text(bounds[1]))
capture.set_env(XEDIT_CURRENT_WORD=bounds[0].get_text(bounds[1]))
capture.set_env(PLUMA_CURRENT_DOCUMENT_TYPE=document.get_mime_type())
capture.set_env(XEDIT_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(PLUMA_CURRENT_DOCUMENT_URI = uri,
PLUMA_CURRENT_DOCUMENT_NAME = name,
PLUMA_CURRENT_DOCUMENT_SCHEME = scheme)
if pluma.utils.uri_has_file_scheme(uri):
capture.set_env(XEDIT_CURRENT_DOCUMENT_URI = uri,
XEDIT_CURRENT_DOCUMENT_NAME = name,
XEDIT_CURRENT_DOCUMENT_SCHEME = scheme)
if xedit.utils.uri_has_file_scheme(uri):
path = gfile.get_path()
cwd = os.path.dirname(path)
capture.set_cwd(cwd)
capture.set_env(PLUMA_CURRENT_DOCUMENT_PATH = path,
PLUMA_CURRENT_DOCUMENT_DIR = cwd)
capture.set_env(XEDIT_CURRENT_DOCUMENT_PATH = path,
XEDIT_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 pluma.utils.uri_has_file_scheme(uri)]
capture.set_env(PLUMA_DOCUMENTS_URI = ' '.join(documents_uri),
PLUMA_DOCUMENTS_PATH = ' '.join(documents_path))
if xedit.utils.uri_has_file_scheme(uri)]
capture.set_env(XEDIT_DOCUMENTS_URI = ' '.join(documents_uri),
XEDIT_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)
pluma.commands.save_document(window, doc)
xedit.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 = pluma.get_language_manager()
lmanager = xedit.get_language_manager()
language = lmanager.guess_language(doc.get_uri(), mtype)

View File

@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Pluma External Tools plugin
# Xedit External Tools plugin
# Copyright (C) 2006 Steve Frécinaux <code@istique.net>
#
# 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, 'pluma', 'plugins', 'externaltools', 'tools'))
self.locations.append(os.path.join(d, 'xedit', '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('~/pluma/tools')
toolsdir = os.path.expanduser('~/xedit/tools')
else:
userdir = os.getenv('MATE22_USER_DIR')
if userdir:
toolsdir = os.path.join(userdir, 'pluma/tools')
toolsdir = os.path.join(userdir, 'xedit/tools')
else:
toolsdir = os.path.expanduser('~/.config/pluma/tools')
toolsdir = os.path.expanduser('~/.config/xedit/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, 'pluma/pluma-tools.xml')
filename = os.path.join(userdir, 'xedit/xedit-tools.xml')
else:
filename = os.path.expanduser('~/.config/pluma/pluma-tools.xml')
filename = os.path.expanduser('~/.config/xedit/xedit-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('# [Pluma Tool]')
in_block = line.startswith('# [Xedit 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('# [Pluma Tool]'):
if line.startswith('# [Xedit Tool]'):
break
lines.append(line)
# in the block:
@@ -407,7 +407,7 @@ class Tool(object):
return lines
def _dump_properties(self):
lines = ['# [Pluma Tool]']
lines = ['# [Xedit 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])))

View File

@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Pluma External Tools plugin
# Xedit External Tools plugin
# Copyright (C) 2005-2006 Steve Frécinaux <steve@istique.net>
#
# This program is free software; you can redistribute it and/or modify
@@ -18,7 +18,7 @@
__all__ = ('Manager', )
import pluma
import xedit
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 = pluma.language_manager_list_languages_sorted(manager, True)
langs = xedit.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 = pluma.get_language_manager()
lmanager = xedit.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:
pluma.help_display(self.dialog, 'pluma', 'pluma-external-tools-plugin')
xedit.help_display(self.dialog, 'xedit', 'xedit-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 pluma.app_get_default().get_windows():
for window in xedit.app_get_default().get_windows():
helper = window.get_data("ExternalToolsPluginWindowData")
helper.menu.update()

View File

@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Pluma External Tools plugin
# Xedit External Tools plugin
# Copyright (C) 2005-2006 Steve Frécinaux <steve@istique.net>
# Copyright (C) 2010 Per Arneng <per.arneng@anyplanet.com>
#
@@ -19,7 +19,7 @@
__all__ = ('OutputPanel', 'UniqueById')
import gtk, pluma
import gtk, xedit
import pango
import gobject
import os
@@ -217,7 +217,7 @@ class OutputPanel(UniqueById):
gfile = self.file_lookup.lookup(link.path)
if gfile:
pluma.commands.load_uri(self.window, gfile.get_uri(), None,
xedit.commands.load_uri(self.window, gfile.get_uri(), None,
link.line_nr)
gobject.idle_add(self.idle_grab_focus)

View File

@@ -122,7 +122,7 @@
</row>
</data>
</object>
<object class="PlumaDocument" id="commands_buffer">
<object class="XeditDocument" id="commands_buffer">
<property name="highlight-matching-brackets">True</property>
</object>
<object class="GtkDialog" id="tool-manager-dialog">
@@ -516,7 +516,7 @@
<property name="vscrollbar_policy">automatic</property>
<property name="shadow_type">in</property>
<child>
<object class="PlumaView" id="commands">
<object class="XeditView" id="commands">
<property name="buffer">commands_buffer</property>
<property name="visible">True</property>
<property name="auto-indent">True</property>