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 @@
# Python snippets plugin
SUBDIRS = snippets data
plugindir = $(PLUMA_PLUGINS_LIBS_DIR)
plugindir = $(XEDIT_PLUGINS_LIBS_DIR)
plugin_in_files = snippets.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 = snippets.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

@@ -26,7 +26,7 @@ snippets_DATA = \
xml.xml \
xslt.xml
snippetsdir = $(PLUMA_PLUGINS_DATA_DIR)/snippets
snippetsdir = $(XEDIT_PLUGINS_DATA_DIR)/snippets
EXTRA_DIST = $(snippets_DATA)

View File

@@ -2,7 +2,7 @@
<snippets language="C">
<snippet id="gpl">
<text><![CDATA[/*
* ${1:[$PLUMA_CURRENT_DOCUMENT_NAME,<filename>]}
* ${1:[$XEDIT_CURRENT_DOCUMENT_NAME,<filename>]}
* This file is part of ${2:<program name>}
*
* Copyright (C) $<3: import datetime; return str(datetime.date.today().year)> - $<4:
@@ -34,7 +34,7 @@ $0]]></text>
</snippet>
<snippet id="lgpl">
<text><![CDATA[/*
* ${1:[$PLUMA_CURRENT_DOCUMENT_NAME,<filename>]}
* ${1:[$XEDIT_CURRENT_DOCUMENT_NAME,<filename>]}
* This file is part of ${2:<library name>}
*
* Copyright (C) $<3: import datetime; return str(datetime.date.today().year)> - $<4:

View File

@@ -34,7 +34,7 @@ $0]]></text>
</snippet>
<snippet id="gpl">
<text><![CDATA[/*
* ${1:[$PLUMA_CURRENT_DOCUMENT_NAME,<filename>]}
* ${1:[$XEDIT_CURRENT_DOCUMENT_NAME,<filename>]}
* This file is part of ${2:<program name>}
*
* Copyright (C) $<3: import datetime; return str(datetime.date.today().year)> - $<4:
@@ -66,7 +66,7 @@ $0]]></text>
</snippet>
<snippet id="lgpl">
<text><![CDATA[/*
* ${1:[$PLUMA_CURRENT_DOCUMENT_NAME,<filename>]}
* ${1:[$XEDIT_CURRENT_DOCUMENT_NAME,<filename>]}
* This file is part of ${2:<library name>}
*
* Copyright (C) $<3: import datetime; return str(datetime.date.today().year)> - $<4:

View File

@@ -105,7 +105,7 @@ $0]]></text>
</snippet>
<snippet id="gpl">
<text><![CDATA[/*
* ${1:[$PLUMA_CURRENT_DOCUMENT_NAME,<filename>]}
* ${1:[$XEDIT_CURRENT_DOCUMENT_NAME,<filename>]}
* This file is part of ${2:<program name>}
*
* Copyright (C) $<3: import datetime; return str(datetime.date.today().year)> - $<4:
@@ -137,7 +137,7 @@ except KeyError:
</snippet>
<snippet id="lgpl">
<text><![CDATA[/*
* ${1:[$PLUMA_CURRENT_DOCUMENT_NAME,<filename>]}
* ${1:[$XEDIT_CURRENT_DOCUMENT_NAME,<filename>]}
* This file is part of ${2:<library name>}
*
* Copyright (C) $<3: import datetime; return str(datetime.date.today().year)> - $<4:

View File

@@ -34,13 +34,13 @@
<accelerator/>
</snippet>
<snippet id="appwrap">
<text><![CDATA[<application>$PLUMA_SELECTED_TEXT</application>]]></text>
<text><![CDATA[<application>$XEDIT_SELECTED_TEXT</application>]]></text>
<tag>application</tag>
<description>application tag</description>
<accelerator/>
</snippet>
<snippet id="enclose">
<text><![CDATA[<${1}>$PLUMA_SELECTED_TEXT</${1}>]]></text>
<text><![CDATA[<${1}>$XEDIT_SELECTED_TEXT</${1}>]]></text>
<tag>enclose</tag>
<description>enclose selected text</description>
<accelerator/>

View File

@@ -54,14 +54,14 @@ $0]]></text>
<description>Date</description>
</snippet>
<snippet id="ref">
<text><![CDATA[<a href="${1:http://somesite.com/}">${2:$PLUMA_SELECTED_TEXT}</a>
<text><![CDATA[<a href="${1:http://somesite.com/}">${2:$XEDIT_SELECTED_TEXT}</a>
]]></text>
<accelerator><![CDATA[<Shift><Alt>l]]></accelerator>
<description>Wrap Selection as Link</description>
<tag>ref</tag>
</snippet>
<snippet id="open/close">
<text><![CDATA[<${1:p}>$PLUMA_SELECTED_TEXT</${1}>]]></text>
<text><![CDATA[<${1:p}>$XEDIT_SELECTED_TEXT</${1}>]]></text>
<accelerator><![CDATA[<Shift><Alt>w]]></accelerator>
<description>Wrap Selection in Open/Close Tag</description>
</snippet>
@@ -96,7 +96,7 @@ $0]]></text>
</snippet>
<snippet id="div">
<text><![CDATA[<div ${1}>
${0:$PLUMA_SELECTED_TEXT}
${0:$XEDIT_SELECTED_TEXT}
</div>]]></text>
<description>Div</description>
<tag>div</tag>
@@ -117,7 +117,7 @@ $0]]></text>
<tag>form</tag>
</snippet>
<snippet id="h">
<text><![CDATA[<h${1:1} id="${2}">${3:$PLUMA_SELECTED_TEXT}</h${1}>
<text><![CDATA[<h${1:1} id="${2}">${3:$XEDIT_SELECTED_TEXT}</h${1}>
$0]]></text>
<description>Heading</description>
<tag>h</tag>

View File

@@ -69,7 +69,7 @@ $0
</snippet>
<snippet id="try/catch">
<text><![CDATA[try {
$PLUMA_SELECTED_TEXT
$XEDIT_SELECTED_TEXT
}
catch (Exception e) {
${1:e.printStackTrace();}

View File

@@ -2,7 +2,7 @@
lang_DATA = \
snippets.lang
langdir = $(PLUMA_PLUGINS_DATA_DIR)/snippets/lang
langdir = $(XEDIT_PLUGINS_DATA_DIR)/snippets/lang
EXTRA_DIST = $(lang_DATA)

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<snippets language="LaTeX">
<snippet id="command">
<text><![CDATA[{\\${1:bf} $PLUMA_SELECTED_TEXT}]]></text>
<text><![CDATA[{\\${1:bf} $XEDIT_SELECTED_TEXT}]]></text>
<accelerator><![CDATA[<Shift><Alt>w]]></accelerator>
<description>Wrap Selection in Command</description>
</snippet>

View File

@@ -74,12 +74,12 @@ $0]]></text>
<description>while loop</description>
</snippet>
<snippet id="insert">
<text><![CDATA["${1:$PLUMA_SELECTED_TEXT}"]]></text>
<text><![CDATA["${1:$XEDIT_SELECTED_TEXT}"]]></text>
<accelerator><![CDATA[<Control>2]]></accelerator>
<description>Inside String: Insert "…"</description>
</snippet>
<snippet id="insert-1">
<text><![CDATA['${1:$PLUMA_SELECTED_TEXT}']]></text>
<text><![CDATA['${1:$XEDIT_SELECTED_TEXT}']]></text>
<accelerator><![CDATA[<Control>apostrophe]]></accelerator>
<description>Inside String: Insert '…'</description>
</snippet>

View File

@@ -26,73 +26,73 @@
<tag>regex</tag>
</snippet>
<snippet id="$-CURRENT_DOCUMENT_PATH">
<text><![CDATA[\$PLUMA_CURRENT_DOCUMENT_PATH]]></text>
<description>Pluma Current Document Path Variable</description>
<text><![CDATA[\$XEDIT_CURRENT_DOCUMENT_PATH]]></text>
<description>Xedit Current Document Path Variable</description>
<tag>$</tag>
</snippet>
<snippet id="$-CURRENT_DOCUMENT_NAME">
<text><![CDATA[\$PLUMA_CURRENT_DOCUMENT_NAME]]></text>
<description>Pluma Current Document Name Variable</description>
<text><![CDATA[\$XEDIT_CURRENT_DOCUMENT_NAME]]></text>
<description>Xedit Current Document Name Variable</description>
<tag>$</tag>
</snippet>
<snippet id="$-CURRENT_DOCUMENT_URI">
<text><![CDATA[\$PLUMA_CURRENT_DOCUMENT_URI]]></text>
<description>Pluma Current Document Uri Variable</description>
<text><![CDATA[\$XEDIT_CURRENT_DOCUMENT_URI]]></text>
<description>Xedit Current Document Uri Variable</description>
<tag>$</tag>
</snippet>
<snippet id="$-CURRENT_DOCUMENT_SCHEME">
<text><![CDATA[\$PLUMA_CURRENT_DOCUMENT_SCHEME]]></text>
<description>Pluma Current Document Scheme Variable</description>
<text><![CDATA[\$XEDIT_CURRENT_DOCUMENT_SCHEME]]></text>
<description>Xedit Current Document Scheme Variable</description>
<tag>$</tag>
</snippet>
<snippet id="$-CURRENT_DOCUMENT_TYPE">
<text><![CDATA[\$PLUMA_CURRENT_DOCUMENT_TYPE]]></text>
<description>Pluma Current Document Type Variable</description>
<text><![CDATA[\$XEDIT_CURRENT_DOCUMENT_TYPE]]></text>
<description>Xedit Current Document Type Variable</description>
<tag>$</tag>
</snippet>
<snippet id="$-DOCUMENTS_URI">
<text><![CDATA[\$PLUMA_DOCUMENTS_URI]]></text>
<description>Pluma Documents Uri Variable</description>
<text><![CDATA[\$XEDIT_DOCUMENTS_URI]]></text>
<description>Xedit Documents Uri Variable</description>
<tag>$</tag>
</snippet>
<snippet id="$-DOCUMENTS_PATH">
<text><![CDATA[\$PLUMA_DOCUMENTS_PATH]]></text>
<description>Pluma Documents Path Variable</description>
<text><![CDATA[\$XEDIT_DOCUMENTS_PATH]]></text>
<description>Xedit Documents Path Variable</description>
<tag>$</tag>
</snippet>
<snippet id="$-SELECTED_TEXT">
<text><![CDATA[\$PLUMA_SELECTED_TEXT]]></text>
<description>Pluma Selected Text Variable</description>
<text><![CDATA[\$XEDIT_SELECTED_TEXT]]></text>
<description>Xedit Selected Text Variable</description>
<tag>$</tag>
</snippet>
<snippet id="$-CURRENT_WORD">
<text><![CDATA[\$PLUMA_CURRENT_WORD]]></text>
<description>Pluma Current Word Variable</description>
<text><![CDATA[\$XEDIT_CURRENT_WORD]]></text>
<description>Xedit Current Word Variable</description>
<tag>$</tag>
</snippet>
<snippet id="$-CURRENT_LINE">
<text><![CDATA[\$PLUMA_CURRENT_LINE]]></text>
<description>Pluma Current Line Variable</description>
<text><![CDATA[\$XEDIT_CURRENT_LINE]]></text>
<description>Xedit Current Line Variable</description>
<tag>$</tag>
</snippet>
<snippet id="$-CURRENT_LINE_NUMBER">
<text><![CDATA[\$PLUMA_CURRENT_LINE_NUMBER]]></text>
<description>Pluma Current Line Number Variable</description>
<text><![CDATA[\$XEDIT_CURRENT_LINE_NUMBER]]></text>
<description>Xedit Current Line Number Variable</description>
<tag>$</tag>
</snippet>
<snippet id="$-DROP_FILENAME">
<text><![CDATA[\$PLUMA_DROP_FILENAME]]></text>
<description>Pluma Drop Filename Variable</description>
<text><![CDATA[\$XEDIT_DROP_FILENAME]]></text>
<description>Xedit Drop Filename Variable</description>
<tag>$</tag>
</snippet>
<snippet id="$-DROP_REL_FILENAME">
<text><![CDATA[\$PLUMA_DROP_REL_FILENAME]]></text>
<description>Pluma Drop Relative Filename Variable</description>
<text><![CDATA[\$XEDIT_DROP_REL_FILENAME]]></text>
<description>Xedit Drop Relative Filename Variable</description>
<tag>$</tag>
</snippet>
<snippet id="$-DROP_MIME_TYPE">
<text><![CDATA[\$PLUMA_DROP_MIME_TYPE]]></text>
<description>Pluma Drop Mime Type Variable</description>
<text><![CDATA[\$XEDIT_DROP_MIME_TYPE]]></text>
<description>Xedit Drop Mime Type Variable</description>
<tag>$</tag>
</snippet>
</snippets>

View File

@@ -103,13 +103,13 @@ $0]]></text>
<tag>attr</tag>
</snippet>
<snippet id="text">
<text><![CDATA[<xsl:text>${1:$PLUMA_SELECTED_TEXT}</xsl:text>
<text><![CDATA[<xsl:text>${1:$XEDIT_SELECTED_TEXT}</xsl:text>
]]></text>
<description>Text</description>
<tag>text</tag>
</snippet>
<snippet id="comment">
<text><![CDATA[<xsl:comment>${1:$PLUMA_SELECTED_TEXT}</xsl:comment>
<text><![CDATA[<xsl:comment>${1:$XEDIT_SELECTED_TEXT}</xsl:comment>
]]></text>
<description>Comment</description>
<tag>comment</tag>

View File

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

View File

@@ -1,6 +1,6 @@
import gtksourceview2 as gsv
import gobject
import pluma
import xedit
import gtk
from Library import Library
@@ -102,7 +102,7 @@ class Provider(gobject.GObject, gsv.CompletionProvider):
def do_get_info_widget(self, proposal):
if not self.info_widget:
view = pluma.View(pluma.Document())
view = xedit.View(xedit.Document())
manager = get_language_manager()
lang = manager.get_language('snippets')

View File

@@ -1,4 +1,4 @@
# Pluma snippets plugin
# Xedit snippets plugin
# Copyright (C) 2005-2006 Jesse van den Kieboom <jesse@icecrew.nl>
#
# This program is free software; you can redistribute it and/or modify
@@ -21,7 +21,7 @@ import re
import gtk
from gtk import gdk
import gio
import pluma
import xedit
import gtksourceview2 as gsv
import gobject
@@ -433,7 +433,7 @@ class Document:
def env_get_documents_uri(self, buf):
toplevel = self.view.get_toplevel()
if isinstance(toplevel, pluma.Window):
if isinstance(toplevel, xedit.Window):
documents_uri = [doc.get_location().get_uri()
for doc in toplevel.get_documents()
if doc.get_location() is not None]
@@ -445,14 +445,14 @@ class Document:
def env_get_documents_path(self, buf):
toplevel = self.view.get_toplevel()
if isinstance(toplevel, pluma.Window):
if isinstance(toplevel, xedit.Window):
documents_location = [doc.get_location()
for doc in toplevel.get_documents()
if doc.get_location() is not None]
documents_path = [location.get_path()
for location in documents_location
if pluma.utils.uri_has_file_scheme(location.get_uri())]
if xedit.utils.uri_has_file_scheme(location.get_uri())]
else:
documents_path = []
@@ -461,25 +461,25 @@ class Document:
def update_environment(self):
buf = self.view.get_buffer()
variables = {'PLUMA_SELECTED_TEXT': self.env_get_selected_text,
'PLUMA_CURRENT_WORD': self.env_get_current_word,
'PLUMA_CURRENT_LINE': self.env_get_current_line,
'PLUMA_CURRENT_LINE_NUMBER': self.env_get_current_line_number,
'PLUMA_CURRENT_DOCUMENT_URI': self.env_get_document_uri,
'PLUMA_CURRENT_DOCUMENT_NAME': self.env_get_document_name,
'PLUMA_CURRENT_DOCUMENT_SCHEME': self.env_get_document_scheme,
'PLUMA_CURRENT_DOCUMENT_PATH': self.env_get_document_path,
'PLUMA_CURRENT_DOCUMENT_DIR': self.env_get_document_dir,
'PLUMA_CURRENT_DOCUMENT_TYPE': self.env_get_document_type,
'PLUMA_DOCUMENTS_URI': self.env_get_documents_uri,
'PLUMA_DOCUMENTS_PATH': self.env_get_documents_path,
variables = {'XEDIT_SELECTED_TEXT': self.env_get_selected_text,
'XEDIT_CURRENT_WORD': self.env_get_current_word,
'XEDIT_CURRENT_LINE': self.env_get_current_line,
'XEDIT_CURRENT_LINE_NUMBER': self.env_get_current_line_number,
'XEDIT_CURRENT_DOCUMENT_URI': self.env_get_document_uri,
'XEDIT_CURRENT_DOCUMENT_NAME': self.env_get_document_name,
'XEDIT_CURRENT_DOCUMENT_SCHEME': self.env_get_document_scheme,
'XEDIT_CURRENT_DOCUMENT_PATH': self.env_get_document_path,
'XEDIT_CURRENT_DOCUMENT_DIR': self.env_get_document_dir,
'XEDIT_CURRENT_DOCUMENT_TYPE': self.env_get_document_type,
'XEDIT_DOCUMENTS_URI': self.env_get_documents_uri,
'XEDIT_DOCUMENTS_PATH': self.env_get_documents_path,
}
for var in variables:
os.environ[var] = variables[var](buf)
def uses_current_word(self, snippet):
matches = re.findall('(\\\\*)\\$PLUMA_CURRENT_WORD', snippet['text'])
matches = re.findall('(\\\\*)\\$XEDIT_CURRENT_WORD', snippet['text'])
for match in matches:
if len(match) % 2 == 0:
@@ -488,7 +488,7 @@ class Document:
return False
def uses_current_line(self, snippet):
matches = re.findall('(\\\\*)\\$PLUMA_CURRENT_LINE', snippet['text'])
matches = re.findall('(\\\\*)\\$XEDIT_CURRENT_LINE', snippet['text'])
for match in matches:
if len(match) % 2 == 0:
@@ -865,19 +865,19 @@ class Document:
dirname = ''
ruri = ''
if pluma.utils.uri_has_file_scheme(uri):
if xedit.utils.uri_has_file_scheme(uri):
pathname = gfile.get_path()
dirname = gfile.get_parent().get_path()
name = os.path.basename(uri)
scheme = gfile.get_uri_scheme()
os.environ['PLUMA_DROP_DOCUMENT_URI'] = uri
os.environ['PLUMA_DROP_DOCUMENT_NAME'] = name
os.environ['PLUMA_DROP_DOCUMENT_SCHEME'] = scheme
os.environ['PLUMA_DROP_DOCUMENT_PATH'] = pathname
os.environ['PLUMA_DROP_DOCUMENT_DIR'] = dirname
os.environ['PLUMA_DROP_DOCUMENT_TYPE'] = mime
os.environ['XEDIT_DROP_DOCUMENT_URI'] = uri
os.environ['XEDIT_DROP_DOCUMENT_NAME'] = name
os.environ['XEDIT_DROP_DOCUMENT_SCHEME'] = scheme
os.environ['XEDIT_DROP_DOCUMENT_PATH'] = pathname
os.environ['XEDIT_DROP_DOCUMENT_DIR'] = dirname
os.environ['XEDIT_DROP_DOCUMENT_TYPE'] = mime
buf = self.view.get_buffer()
location = buf.get_location()
@@ -886,7 +886,7 @@ class Document:
relpath = self.relative_path(ruri, uri, mime)
os.environ['PLUMA_DROP_DOCUMENT_RELATIVE_PATH'] = relpath
os.environ['XEDIT_DROP_DOCUMENT_RELATIVE_PATH'] = relpath
mark = buf.get_mark('gtk_drag_target')

View File

@@ -1,4 +1,4 @@
# Pluma snippets plugin
# Xedit snippets plugin
# Copyright (C) 2005-2006 Jesse van den Kieboom <jesse@icecrew.nl>
#
# This program is free software; you can redistribute it and/or modify
@@ -62,7 +62,7 @@ def insert_with_indent(view, piter, text, indentfirst = True, context = None):
text = spaces_instead_of_tabs(view, text)
lines = text.split('\n')
view.get_buffer().set_data('PlumaSnippetsPluginContext', context)
view.get_buffer().set_data('XeditSnippetsPluginContext', context)
if len(lines) == 1:
view.get_buffer().insert(piter, text)
@@ -79,10 +79,10 @@ def insert_with_indent(view, piter, text, indentfirst = True, context = None):
view.get_buffer().insert(piter, text[:-1])
view.get_buffer().set_data('PlumaSnippetsPluginContext', None)
view.get_buffer().set_data('XeditSnippetsPluginContext', None)
def get_buffer_context(buf):
return buf.get_data('PlumaSnippetsPluginContext')
return buf.get_data('XeditSnippetsPluginContext')
def snippets_debug(*s):
return

View File

@@ -1,4 +1,4 @@
# Pluma snippets plugin
# Xedit snippets plugin
# Copyright (C) 2005-2006 Jesse van den Kieboom <jesse@icecrew.nl>
#
# This program is free software; you can redistribute it and/or modify

View File

@@ -1,5 +1,5 @@
# Python snippets plugin
plugindir = $(PLUMA_PLUGINS_LIBS_DIR)/snippets
plugindir = $(XEDIT_PLUGINS_LIBS_DIR)/snippets
plugin_PYTHON = \
__init__.py \
@@ -17,7 +17,7 @@ plugin_PYTHON = \
LanguageManager.py \
Completion.py
uidir = $(PLUMA_PLUGINS_DATA_DIR)/snippets/ui
uidir = $(XEDIT_PLUGINS_DATA_DIR)/snippets/ui
ui_DATA = snippets.ui
EXTRA_DIST = $(ui_DATA)

View File

@@ -1,4 +1,4 @@
# Pluma snippets plugin
# Xedit snippets plugin
# Copyright (C) 2005-2006 Jesse van den Kieboom <jesse@icecrew.nl>
#
# This program is free software; you can redistribute it and/or modify
@@ -24,7 +24,7 @@ import gtk
from gtk import gdk
import gtksourceview2 as gsv
import pango
import pluma
import xedit
import gio
from Snippet import Snippet
@@ -95,7 +95,7 @@ class Manager:
self.tree_view.expand_row(path, False)
def build_model(self, force_reload = False):
window = pluma.app_get_default().get_active_window()
window = xedit.app_get_default().get_active_window()
if window:
view = window.get_active_view()
@@ -116,7 +116,7 @@ class Manager:
self.model = gtk.TreeStore(str, str, object)
self.model.set_sort_column_id(self.SORT_COLUMN, gtk.SORT_ASCENDING)
manager = get_language_manager()
langs = pluma.language_manager_list_languages_sorted(manager, True)
langs = xedit.language_manager_list_languages_sorted(manager, True)
piter = self.model.append(None, (_('Global'), '', None))
# Add dummy node
@@ -618,7 +618,7 @@ class Manager:
def on_dialog_snippets_response(self, dlg, resp):
if resp == gtk.RESPONSE_HELP:
pluma.help_display(self.dlg, 'pluma', 'pluma-snippets-plugin')
xedit.help_display(self.dlg, 'xedit', 'xedit-snippets-plugin')
return
self.dlg.destroy()
@@ -765,7 +765,7 @@ class Manager:
success = True
for filename in filenames:
if not pluma.utils.uri_has_file_scheme(filename):
if not xedit.utils.uri_has_file_scheme(filename):
continue
# Remove file://

View File

@@ -1,4 +1,4 @@
# Pluma snippets plugin
# Xedit snippets plugin
# Copyright (C) 2006-2007 Jesse van den Kieboom <jesse@icecrew.nl>
#
# This program is free software; you can redistribute it and/or modify

View File

@@ -1,4 +1,4 @@
# Pluma snippets plugin
# Xedit snippets plugin
# Copyright (C) 2005-2006 Jesse van den Kieboom <jesse@icecrew.nl>
#
# This program is free software; you can redistribute it and/or modify
@@ -524,7 +524,7 @@ class PlaceholderEval(PlaceholderExpand):
# SIGALRM is not supported on all platforms (e.g. windows). Timeout
# with SIGALRM will not be used on those platforms. This will
# potentially block pluma if you have a placeholder which gets stuck,
# potentially block xedit if you have a placeholder which gets stuck,
# but it's better than not supporting them at all. At some point we
# might have proper thread support and we can fix this in a better way
def timeout_supported(self):
@@ -577,9 +577,9 @@ class PlaceholderEval(PlaceholderExpand):
if 'process_snippet' in self.namespace:
try:
# Install a sigalarm signal. This is a HACK to make sure
# pluma doesn't get freezed by someone creating a python
# xedit doesn't get freezed by someone creating a python
# placeholder which for instance loops indefinately. Since
# the code is executed synchronously it will hang pluma. With
# the code is executed synchronously it will hang xedit. With
# the alarm signal we raise an exception and catch this
# (see below). We show an error message and return False.
# ___this is a HACK___ and should be fixed properly (I just

View File

@@ -1,4 +1,4 @@
# Pluma snippets plugin
# Xedit snippets plugin
# Copyright (C) 2005-2006 Jesse van den Kieboom <jesse@icecrew.nl>
#
# This program is free software; you can redistribute it and/or modify

View File

@@ -1,4 +1,4 @@
# Pluma snippets plugin
# Xedit snippets plugin
# Copyright (C) 2006-2007 Jesse van den Kieboom <jesse@icecrew.nl>
#
# This program is free software; you can redistribute it and/or modify

View File

@@ -1,4 +1,4 @@
# Pluma snippets plugin
# Xedit snippets plugin
# Copyright (C) 2005-2006 Jesse van den Kieboom <jesse@icecrew.nl>
#
# This program is free software; you can redistribute it and/or modify
@@ -21,7 +21,7 @@ import gettext
import gtk
from gtk import gdk
import pluma
import xedit
from Document import Document
from Library import Library
@@ -46,7 +46,7 @@ class WindowHelper:
# Add controllers to all the current views
for view in self.window.get_views():
if isinstance(view, pluma.View) and not self.has_controller(view):
if isinstance(view, xedit.View) and not self.has_controller(view):
view._snippet_controller = Document(self, view)
self.update()
@@ -61,7 +61,7 @@ class WindowHelper:
# Iterate over all the tabs and remove every controller
for view in self.window.get_views():
if isinstance(view, pluma.View) and self.has_controller(view):
if isinstance(view, xedit.View) and self.has_controller(view):
view._snippet_controller.stop()
view._snippet_controller = None
@@ -72,8 +72,8 @@ class WindowHelper:
bus = self.window.get_message_bus()
self.messages = {
'activate': bus.register('/plugins/snippets', 'activate', ('view', 'iter'), trigger=str, view=pluma.View, iter=gtk.TextIter),
'parse-and-activate': bus.register('/plugins/snippets', 'parse-and-activate', ('view', 'iter'), snippet=str, view=pluma.View, iter=gtk.TextIter)
'activate': bus.register('/plugins/snippets', 'activate', ('view', 'iter'), trigger=str, view=xedit.View, iter=gtk.TextIter),
'parse-and-activate': bus.register('/plugins/snippets', 'parse-and-activate', ('view', 'iter'), snippet=str, view=xedit.View, iter=gtk.TextIter)
}
bus.connect('/plugins/snippets', 'activate', self.on_message_activate)
@@ -124,8 +124,8 @@ class WindowHelper:
def insert_menu(self):
manager = self.window.get_ui_manager()
self.action_group = gtk.ActionGroup("PlumaSnippetPluginActions")
self.action_group.set_translation_domain('pluma')
self.action_group = gtk.ActionGroup("XeditSnippetPluginActions")
self.action_group.set_translation_domain('xedit')
self.action_group.add_actions([('ManageSnippets', None,
_('Manage _Snippets...'), \
None, _('Manage snippets'), \
@@ -192,10 +192,10 @@ class WindowHelper:
# Callbacks
def on_tab_added(self, window, tab):
# Create a new controller for this tab if it has a standard pluma view
# Create a new controller for this tab if it has a standard xedit view
view = tab.get_view()
if isinstance(view, pluma.View) and not self.has_controller(view):
if isinstance(view, xedit.View) and not self.has_controller(view):
view._snippet_controller = Document(self, view)
self.update()

View File

@@ -1,4 +1,4 @@
# Pluma snippets plugin
# Xedit snippets plugin
# Copyright (C) 2005-2006 Jesse van den Kieboom <jesse@icecrew.nl>
#
# This program is free software; you can redistribute it and/or modify
@@ -21,7 +21,7 @@ import shutil
import gtk
from gtk import gdk
import pluma
import xedit
import platform
from WindowHelper import WindowHelper
@@ -29,9 +29,9 @@ from Library import Library
from Manager import Manager
from Snippet import Snippet
class SnippetsPlugin(pluma.Plugin):
class SnippetsPlugin(xedit.Plugin):
def __init__(self):
pluma.Plugin.__init__(self)
xedit.Plugin.__init__(self)
self.dlg = None
@@ -39,13 +39,13 @@ class SnippetsPlugin(pluma.Plugin):
library.set_accelerator_callback(self.accelerator_activated)
if platform.platform() == 'Windows':
snippetsdir = os.path.expanduser('~/pluma/snippets')
snippetsdir = os.path.expanduser('~/xedit/snippets')
else:
userdir = os.getenv('MATE22_USER_DIR')
if userdir:
snippetsdir = os.path.join(userdir, 'pluma/snippets')
snippetsdir = os.path.join(userdir, 'xedit/snippets')
else:
snippetsdir = os.path.expanduser('~/.config/pluma/snippets')
snippetsdir = os.path.expanduser('~/.config/xedit/snippets')
library.set_dirs(snippetsdir, self.system_dirs())
@@ -59,7 +59,7 @@ class SnippetsPlugin(pluma.Plugin):
dirs = []
for d in datadirs.split(os.pathsep):
d = os.path.join(d, 'pluma', 'plugins', 'snippets')
d = os.path.join(d, 'xedit', 'plugins', 'snippets')
if os.path.isdir(d):
dirs.append(d)
@@ -85,7 +85,7 @@ class SnippetsPlugin(pluma.Plugin):
else:
self.dlg.run()
window = pluma.app_get_default().get_active_window()
window = xedit.app_get_default().get_active_window()
if window:
self.dlg.dlg.set_transient_for(window)

View File

@@ -32,7 +32,7 @@
</row>
</data>
</object>
<object class="PlumaDocument" id="source_buffer">
<object class="XeditDocument" id="source_buffer">
<property name="highlight-matching-brackets">True</property>
</object>
<object class="GtkDialog" id="dialog_snippets">
@@ -330,7 +330,7 @@
<property name="shadow_type">GTK_SHADOW_IN</property>
<property name="window_placement">GTK_CORNER_TOP_LEFT</property>
<child>
<object class="PlumaView" id="source_view_snippet">
<object class="XeditView" id="source_view_snippet">
<property name="buffer">source_buffer</property>
<property name="visible">True</property>
<property name="auto-indent">True</property>