Rename Pluma to Xedit
This commit is contained in:
@@ -1,26 +1,26 @@
|
||||
# trailsave plugin
|
||||
plugindir = $(PLUMA_PLUGINS_LIBS_DIR)
|
||||
plugindir = $(XEDIT_PLUGINS_LIBS_DIR)
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-I$(top_srcdir) \
|
||||
$(PLUMA_CFLAGS) \
|
||||
$(XEDIT_CFLAGS) \
|
||||
$(WARN_CFLAGS) \
|
||||
$(DISABLE_DEPRECATED_CFLAGS)
|
||||
|
||||
plugin_LTLIBRARIES = libtrailsave.la
|
||||
|
||||
libtrailsave_la_SOURCES = \
|
||||
pluma-trail-save-plugin.h \
|
||||
pluma-trail-save-plugin.c
|
||||
xedit-trail-save-plugin.h \
|
||||
xedit-trail-save-plugin.c
|
||||
|
||||
libtrailsave_la_LDFLAGS = $(PLUGIN_LIBTOOL_FLAGS)
|
||||
libtrailsave_la_LIBADD = $(PLUMA_LIBS)
|
||||
libtrailsave_la_LIBADD = $(XEDIT_LIBS)
|
||||
|
||||
plugin_in_files = trailsave.pluma-plugin.desktop.in
|
||||
plugin_in_files = trailsave.xedit-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
|
||||
%.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)
|
||||
|
||||
|
@@ -1,70 +0,0 @@
|
||||
/*
|
||||
* pluma-trail-save-plugin.h
|
||||
*
|
||||
* This program 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, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program 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 this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef __PLUMA_TRAIL_SAVE_PLUGIN_H__
|
||||
#define __PLUMA_TRAIL_SAVE_PLUGIN_H__
|
||||
|
||||
#include <glib.h>
|
||||
#include <glib-object.h>
|
||||
#include <pluma/pluma-plugin.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
/*
|
||||
* Type checking and casting macros
|
||||
*/
|
||||
#define PLUMA_TYPE_TRAIL_SAVE_PLUGIN (pluma_trail_save_plugin_get_type ())
|
||||
#define PLUMA_TRAIL_SAVE_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), PLUMA_TYPE_TRAIL_SAVE_PLUGIN, PlumaTrailSavePlugin))
|
||||
#define PLUMA_TRAIL_SAVE_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), PLUMA_TYPE_TRAIL_SAVE_PLUGIN, PlumaTrailSavePluginClass))
|
||||
#define PLUMA_IS_TRAIL_SAVE_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), PLUMA_TYPE_TRAIL_SAVE_PLUGIN))
|
||||
#define PLUMA_IS_TRAIL_SAVE_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), PLUMA_TYPE_TRAIL_SAVE_PLUGIN))
|
||||
#define PLUMA_TRAIL_SAVE_PLUGIN_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), PLUMA_TYPE_TRAIL_SAVE_PLUGIN, PlumaTrailSavePluginClass))
|
||||
|
||||
/*
|
||||
* Main object structure
|
||||
*/
|
||||
typedef struct _PlumaTrailSavePlugin PlumaTrailSavePlugin;
|
||||
|
||||
struct _PlumaTrailSavePlugin
|
||||
{
|
||||
PlumaPlugin parent_instance;
|
||||
};
|
||||
|
||||
/*
|
||||
* Class definition
|
||||
*/
|
||||
typedef struct _PlumaTrailSavePluginClass PlumaTrailSavePluginClass;
|
||||
|
||||
struct _PlumaTrailSavePluginClass
|
||||
{
|
||||
PlumaPluginClass parent_class;
|
||||
};
|
||||
|
||||
/*
|
||||
* Public methods
|
||||
*/
|
||||
GType pluma_trail_save_plugin_get_type (void) G_GNUC_CONST;
|
||||
|
||||
/* All the plugins must implement this function */
|
||||
G_MODULE_EXPORT GType register_pluma_plugin (GTypeModule *module);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __PLUMA_TRAIL_SAVE_PLUGIN_H__ */
|
@@ -1,4 +1,4 @@
|
||||
[Pluma Plugin]
|
||||
[Xedit Plugin]
|
||||
Module=trailsave
|
||||
IAge=2
|
||||
_Name=Save Without Trailing Spaces
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* pluma-trail-save-plugin.c
|
||||
* xedit-trail-save-plugin.c
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -22,9 +22,9 @@
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include "pluma-trail-save-plugin.h"
|
||||
#include "xedit-trail-save-plugin.h"
|
||||
|
||||
PLUMA_PLUGIN_REGISTER_TYPE(PlumaTrailSavePlugin, pluma_trail_save_plugin)
|
||||
XEDIT_PLUGIN_REGISTER_TYPE(XeditTrailSavePlugin, xedit_trail_save_plugin)
|
||||
|
||||
static void
|
||||
strip_trailing_spaces (GtkTextBuffer *text_buffer)
|
||||
@@ -103,11 +103,11 @@ strip_trailing_spaces (GtkTextBuffer *text_buffer)
|
||||
}
|
||||
|
||||
static void
|
||||
on_save (PlumaDocument *document,
|
||||
on_save (XeditDocument *document,
|
||||
const gchar *uri,
|
||||
PlumaEncoding *encoding,
|
||||
PlumaDocumentSaveFlags save_flags,
|
||||
PlumaPlugin *plugin)
|
||||
XeditEncoding *encoding,
|
||||
XeditDocumentSaveFlags save_flags,
|
||||
XeditPlugin *plugin)
|
||||
{
|
||||
GtkTextBuffer *text_buffer = GTK_TEXT_BUFFER (document);
|
||||
|
||||
@@ -115,47 +115,47 @@ on_save (PlumaDocument *document,
|
||||
}
|
||||
|
||||
static void
|
||||
on_tab_added (PlumaWindow *window,
|
||||
PlumaTab *tab,
|
||||
PlumaPlugin *plugin)
|
||||
on_tab_added (XeditWindow *window,
|
||||
XeditTab *tab,
|
||||
XeditPlugin *plugin)
|
||||
{
|
||||
PlumaDocument *document;
|
||||
XeditDocument *document;
|
||||
|
||||
document = pluma_tab_get_document (tab);
|
||||
document = xedit_tab_get_document (tab);
|
||||
g_signal_connect (document, "save", G_CALLBACK (on_save), plugin);
|
||||
}
|
||||
|
||||
static void
|
||||
on_tab_removed (PlumaWindow *window,
|
||||
PlumaTab *tab,
|
||||
PlumaPlugin *plugin)
|
||||
on_tab_removed (XeditWindow *window,
|
||||
XeditTab *tab,
|
||||
XeditPlugin *plugin)
|
||||
{
|
||||
PlumaDocument *document;
|
||||
XeditDocument *document;
|
||||
|
||||
document = pluma_tab_get_document (tab);
|
||||
document = xedit_tab_get_document (tab);
|
||||
g_signal_handlers_disconnect_by_data (document, plugin);
|
||||
}
|
||||
|
||||
static void
|
||||
impl_activate (PlumaPlugin *plugin,
|
||||
PlumaWindow *window)
|
||||
impl_activate (XeditPlugin *plugin,
|
||||
XeditWindow *window)
|
||||
{
|
||||
GList *documents;
|
||||
GList *documents_iter;
|
||||
PlumaDocument *document;
|
||||
XeditDocument *document;
|
||||
|
||||
pluma_debug (DEBUG_PLUGINS);
|
||||
xedit_debug (DEBUG_PLUGINS);
|
||||
|
||||
g_signal_connect (window, "tab_added", G_CALLBACK (on_tab_added), plugin);
|
||||
g_signal_connect (window, "tab_removed", G_CALLBACK (on_tab_removed), plugin);
|
||||
|
||||
documents = pluma_window_get_documents (window);
|
||||
documents = xedit_window_get_documents (window);
|
||||
|
||||
for (documents_iter = documents;
|
||||
documents_iter && documents_iter->data;
|
||||
documents_iter = documents_iter->next)
|
||||
{
|
||||
document = (PlumaDocument *) documents_iter->data;
|
||||
document = (XeditDocument *) documents_iter->data;
|
||||
g_signal_connect (document, "save", G_CALLBACK (on_save), plugin);
|
||||
}
|
||||
|
||||
@@ -163,24 +163,24 @@ impl_activate (PlumaPlugin *plugin,
|
||||
}
|
||||
|
||||
static void
|
||||
impl_deactivate (PlumaPlugin *plugin,
|
||||
PlumaWindow *window)
|
||||
impl_deactivate (XeditPlugin *plugin,
|
||||
XeditWindow *window)
|
||||
{
|
||||
GList *documents;
|
||||
GList *documents_iter;
|
||||
PlumaDocument *document;
|
||||
XeditDocument *document;
|
||||
|
||||
pluma_debug (DEBUG_PLUGINS);
|
||||
xedit_debug (DEBUG_PLUGINS);
|
||||
|
||||
g_signal_handlers_disconnect_by_data (window, plugin);
|
||||
|
||||
documents = pluma_window_get_documents (window);
|
||||
documents = xedit_window_get_documents (window);
|
||||
|
||||
for (documents_iter = documents;
|
||||
documents_iter && documents_iter->data;
|
||||
documents_iter = documents_iter->next)
|
||||
{
|
||||
document = (PlumaDocument *) documents_iter->data;
|
||||
document = (XeditDocument *) documents_iter->data;
|
||||
g_signal_handlers_disconnect_by_data (document, plugin);
|
||||
}
|
||||
|
||||
@@ -188,26 +188,26 @@ impl_deactivate (PlumaPlugin *plugin,
|
||||
}
|
||||
|
||||
static void
|
||||
pluma_trail_save_plugin_init (PlumaTrailSavePlugin *plugin)
|
||||
xedit_trail_save_plugin_init (XeditTrailSavePlugin *plugin)
|
||||
{
|
||||
pluma_debug_message (DEBUG_PLUGINS, "PlumaTrailSavePlugin initializing");
|
||||
xedit_debug_message (DEBUG_PLUGINS, "XeditTrailSavePlugin initializing");
|
||||
}
|
||||
|
||||
static void
|
||||
pluma_trail_save_plugin_finalize (GObject *object)
|
||||
xedit_trail_save_plugin_finalize (GObject *object)
|
||||
{
|
||||
pluma_debug_message (DEBUG_PLUGINS, "PlumaTrailSavePlugin finalizing");
|
||||
xedit_debug_message (DEBUG_PLUGINS, "XeditTrailSavePlugin finalizing");
|
||||
|
||||
G_OBJECT_CLASS (pluma_trail_save_plugin_parent_class)->finalize (object);
|
||||
G_OBJECT_CLASS (xedit_trail_save_plugin_parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
static void
|
||||
pluma_trail_save_plugin_class_init (PlumaTrailSavePluginClass *klass)
|
||||
xedit_trail_save_plugin_class_init (XeditTrailSavePluginClass *klass)
|
||||
{
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
PlumaPluginClass *plugin_class = PLUMA_PLUGIN_CLASS (klass);
|
||||
XeditPluginClass *plugin_class = XEDIT_PLUGIN_CLASS (klass);
|
||||
|
||||
object_class->finalize = pluma_trail_save_plugin_finalize;
|
||||
object_class->finalize = xedit_trail_save_plugin_finalize;
|
||||
|
||||
plugin_class->activate = impl_activate;
|
||||
plugin_class->deactivate = impl_deactivate;
|
70
plugins/trailsave/xedit-trail-save-plugin.h
Normal file
70
plugins/trailsave/xedit-trail-save-plugin.h
Normal file
@@ -0,0 +1,70 @@
|
||||
/*
|
||||
* xedit-trail-save-plugin.h
|
||||
*
|
||||
* This program 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, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program 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 this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef __XEDIT_TRAIL_SAVE_PLUGIN_H__
|
||||
#define __XEDIT_TRAIL_SAVE_PLUGIN_H__
|
||||
|
||||
#include <glib.h>
|
||||
#include <glib-object.h>
|
||||
#include <xedit/xedit-plugin.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
/*
|
||||
* Type checking and casting macros
|
||||
*/
|
||||
#define XEDIT_TYPE_TRAIL_SAVE_PLUGIN (xedit_trail_save_plugin_get_type ())
|
||||
#define XEDIT_TRAIL_SAVE_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), XEDIT_TYPE_TRAIL_SAVE_PLUGIN, XeditTrailSavePlugin))
|
||||
#define XEDIT_TRAIL_SAVE_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), XEDIT_TYPE_TRAIL_SAVE_PLUGIN, XeditTrailSavePluginClass))
|
||||
#define XEDIT_IS_TRAIL_SAVE_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), XEDIT_TYPE_TRAIL_SAVE_PLUGIN))
|
||||
#define XEDIT_IS_TRAIL_SAVE_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), XEDIT_TYPE_TRAIL_SAVE_PLUGIN))
|
||||
#define XEDIT_TRAIL_SAVE_PLUGIN_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), XEDIT_TYPE_TRAIL_SAVE_PLUGIN, XeditTrailSavePluginClass))
|
||||
|
||||
/*
|
||||
* Main object structure
|
||||
*/
|
||||
typedef struct _XeditTrailSavePlugin XeditTrailSavePlugin;
|
||||
|
||||
struct _XeditTrailSavePlugin
|
||||
{
|
||||
XeditPlugin parent_instance;
|
||||
};
|
||||
|
||||
/*
|
||||
* Class definition
|
||||
*/
|
||||
typedef struct _XeditTrailSavePluginClass XeditTrailSavePluginClass;
|
||||
|
||||
struct _XeditTrailSavePluginClass
|
||||
{
|
||||
XeditPluginClass parent_class;
|
||||
};
|
||||
|
||||
/*
|
||||
* Public methods
|
||||
*/
|
||||
GType xedit_trail_save_plugin_get_type (void) G_GNUC_CONST;
|
||||
|
||||
/* All the plugins must implement this function */
|
||||
G_MODULE_EXPORT GType register_xedit_plugin (GTypeModule *module);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __XEDIT_TRAIL_SAVE_PLUGIN_H__ */
|
Reference in New Issue
Block a user