Renamed Xedit -> Xed (avoid name clash with x11-apps's xedit)
This commit is contained in:
@@ -1,29 +1,29 @@
|
||||
# changecase plugin
|
||||
plugindir = $(XEDIT_PLUGINS_LIBS_DIR)
|
||||
plugindir = $(XED_PLUGINS_LIBS_DIR)
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-I$(top_srcdir) \
|
||||
$(XEDIT_CFLAGS) \
|
||||
$(XED_CFLAGS) \
|
||||
$(WARN_CFLAGS) \
|
||||
$(DISABLE_DEPRECATED_CFLAGS)
|
||||
|
||||
plugin_LTLIBRARIES = libchangecase.la
|
||||
|
||||
libchangecase_la_SOURCES = \
|
||||
xedit-changecase-plugin.h \
|
||||
xedit-changecase-plugin.c
|
||||
xed-changecase-plugin.h \
|
||||
xed-changecase-plugin.c
|
||||
|
||||
libchangecase_la_LDFLAGS = $(PLUGIN_LIBTOOL_FLAGS)
|
||||
libchangecase_la_LIBADD = $(XEDIT_LIBS)
|
||||
libchangecase_la_LIBADD = $(XED_LIBS)
|
||||
|
||||
uidir = $(XEDIT_PLUGINS_DATA_DIR)/changecase
|
||||
uidir = $(XED_PLUGINS_DATA_DIR)/changecase
|
||||
ui_DATA =
|
||||
|
||||
plugin_in_files = changecase.xedit-plugin.desktop.in
|
||||
plugin_in_files = changecase.xed-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
|
||||
%.xed-plugin: %.xed-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:.xedit-plugin.desktop.in=.xedit-plugin)
|
||||
plugin_DATA = $(plugin_in_files:.xed-plugin.desktop.in=.xed-plugin)
|
||||
|
||||
EXTRA_DIST = $(ui_DATA) $(plugin_in_files)
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
[Xedit Plugin]
|
||||
[Xed Plugin]
|
||||
Module=changecase
|
||||
IAge=2
|
||||
_Name=Change Case
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* xedit-changecase-plugin.c
|
||||
* xed-changecase-plugin.c
|
||||
*
|
||||
* Copyright (C) 2004-2005 - Paolo Borelli
|
||||
*
|
||||
@@ -24,16 +24,16 @@
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include "xedit-changecase-plugin.h"
|
||||
#include "xed-changecase-plugin.h"
|
||||
|
||||
#include <glib/gi18n-lib.h>
|
||||
#include <gmodule.h>
|
||||
|
||||
#include <xedit/xedit-debug.h>
|
||||
#include <xed/xed-debug.h>
|
||||
|
||||
#define WINDOW_DATA_KEY "XeditChangecasePluginWindowData"
|
||||
#define WINDOW_DATA_KEY "XedChangecasePluginWindowData"
|
||||
|
||||
XEDIT_PLUGIN_REGISTER_TYPE(XeditChangecasePlugin, xedit_changecase_plugin)
|
||||
XED_PLUGIN_REGISTER_TYPE(XedChangecasePlugin, xed_changecase_plugin)
|
||||
|
||||
typedef enum {
|
||||
TO_UPPER_CASE,
|
||||
@@ -149,15 +149,15 @@ do_title_case (GtkTextBuffer *buffer,
|
||||
}
|
||||
|
||||
static void
|
||||
change_case (XeditWindow *window,
|
||||
change_case (XedWindow *window,
|
||||
ChangeCaseChoice choice)
|
||||
{
|
||||
XeditDocument *doc;
|
||||
XedDocument *doc;
|
||||
GtkTextIter start, end;
|
||||
|
||||
xedit_debug (DEBUG_PLUGINS);
|
||||
xed_debug (DEBUG_PLUGINS);
|
||||
|
||||
doc = xedit_window_get_active_document (window);
|
||||
doc = xed_window_get_active_document (window);
|
||||
g_return_if_fail (doc != NULL);
|
||||
|
||||
if (!gtk_text_buffer_get_selection_bounds (GTK_TEXT_BUFFER (doc),
|
||||
@@ -191,28 +191,28 @@ change_case (XeditWindow *window,
|
||||
|
||||
static void
|
||||
upper_case_cb (GtkAction *action,
|
||||
XeditWindow *window)
|
||||
XedWindow *window)
|
||||
{
|
||||
change_case (window, TO_UPPER_CASE);
|
||||
}
|
||||
|
||||
static void
|
||||
lower_case_cb (GtkAction *action,
|
||||
XeditWindow *window)
|
||||
XedWindow *window)
|
||||
{
|
||||
change_case (window, TO_LOWER_CASE);
|
||||
}
|
||||
|
||||
static void
|
||||
invert_case_cb (GtkAction *action,
|
||||
XeditWindow *window)
|
||||
XedWindow *window)
|
||||
{
|
||||
change_case (window, INVERT_CASE);
|
||||
}
|
||||
|
||||
static void
|
||||
title_case_cb (GtkAction *action,
|
||||
XeditWindow *window)
|
||||
XedWindow *window)
|
||||
{
|
||||
change_case (window, TO_TITLE_CASE);
|
||||
}
|
||||
@@ -251,17 +251,17 @@ const gchar submenu[] =
|
||||
"</ui>";
|
||||
|
||||
static void
|
||||
xedit_changecase_plugin_init (XeditChangecasePlugin *plugin)
|
||||
xed_changecase_plugin_init (XedChangecasePlugin *plugin)
|
||||
{
|
||||
xedit_debug_message (DEBUG_PLUGINS, "XeditChangecasePlugin initializing");
|
||||
xed_debug_message (DEBUG_PLUGINS, "XedChangecasePlugin initializing");
|
||||
}
|
||||
|
||||
static void
|
||||
xedit_changecase_plugin_finalize (GObject *object)
|
||||
xed_changecase_plugin_finalize (GObject *object)
|
||||
{
|
||||
G_OBJECT_CLASS (xedit_changecase_plugin_parent_class)->finalize (object);
|
||||
G_OBJECT_CLASS (xed_changecase_plugin_parent_class)->finalize (object);
|
||||
|
||||
xedit_debug_message (DEBUG_PLUGINS, "XeditChangecasePlugin finalizing");
|
||||
xed_debug_message (DEBUG_PLUGINS, "XedChangecasePlugin finalizing");
|
||||
}
|
||||
|
||||
typedef struct
|
||||
@@ -279,16 +279,16 @@ free_window_data (WindowData *data)
|
||||
}
|
||||
|
||||
static void
|
||||
update_ui_real (XeditWindow *window,
|
||||
update_ui_real (XedWindow *window,
|
||||
WindowData *data)
|
||||
{
|
||||
GtkTextView *view;
|
||||
GtkAction *action;
|
||||
gboolean sensitive = FALSE;
|
||||
|
||||
xedit_debug (DEBUG_PLUGINS);
|
||||
xed_debug (DEBUG_PLUGINS);
|
||||
|
||||
view = GTK_TEXT_VIEW (xedit_window_get_active_view (window));
|
||||
view = GTK_TEXT_VIEW (xed_window_get_active_view (window));
|
||||
|
||||
if (view != NULL)
|
||||
{
|
||||
@@ -305,20 +305,20 @@ update_ui_real (XeditWindow *window,
|
||||
}
|
||||
|
||||
static void
|
||||
impl_activate (XeditPlugin *plugin,
|
||||
XeditWindow *window)
|
||||
impl_activate (XedPlugin *plugin,
|
||||
XedWindow *window)
|
||||
{
|
||||
GtkUIManager *manager;
|
||||
WindowData *data;
|
||||
GError *error = NULL;
|
||||
|
||||
xedit_debug (DEBUG_PLUGINS);
|
||||
xed_debug (DEBUG_PLUGINS);
|
||||
|
||||
data = g_slice_new (WindowData);
|
||||
|
||||
manager = xedit_window_get_ui_manager (window);
|
||||
manager = xed_window_get_ui_manager (window);
|
||||
|
||||
data->action_group = gtk_action_group_new ("XeditChangecasePluginActions");
|
||||
data->action_group = gtk_action_group_new ("XedChangecasePluginActions");
|
||||
gtk_action_group_set_translation_domain (data->action_group,
|
||||
GETTEXT_PACKAGE);
|
||||
gtk_action_group_add_actions (data->action_group,
|
||||
@@ -348,15 +348,15 @@ impl_activate (XeditPlugin *plugin,
|
||||
}
|
||||
|
||||
static void
|
||||
impl_deactivate (XeditPlugin *plugin,
|
||||
XeditWindow *window)
|
||||
impl_deactivate (XedPlugin *plugin,
|
||||
XedWindow *window)
|
||||
{
|
||||
GtkUIManager *manager;
|
||||
WindowData *data;
|
||||
|
||||
xedit_debug (DEBUG_PLUGINS);
|
||||
xed_debug (DEBUG_PLUGINS);
|
||||
|
||||
manager = xedit_window_get_ui_manager (window);
|
||||
manager = xed_window_get_ui_manager (window);
|
||||
|
||||
data = (WindowData *) g_object_get_data (G_OBJECT (window), WINDOW_DATA_KEY);
|
||||
g_return_if_fail (data != NULL);
|
||||
@@ -368,12 +368,12 @@ impl_deactivate (XeditPlugin *plugin,
|
||||
}
|
||||
|
||||
static void
|
||||
impl_update_ui (XeditPlugin *plugin,
|
||||
XeditWindow *window)
|
||||
impl_update_ui (XedPlugin *plugin,
|
||||
XedWindow *window)
|
||||
{
|
||||
WindowData *data;
|
||||
|
||||
xedit_debug (DEBUG_PLUGINS);
|
||||
xed_debug (DEBUG_PLUGINS);
|
||||
|
||||
data = (WindowData *) g_object_get_data (G_OBJECT (window), WINDOW_DATA_KEY);
|
||||
g_return_if_fail (data != NULL);
|
||||
@@ -382,12 +382,12 @@ impl_update_ui (XeditPlugin *plugin,
|
||||
}
|
||||
|
||||
static void
|
||||
xedit_changecase_plugin_class_init (XeditChangecasePluginClass *klass)
|
||||
xed_changecase_plugin_class_init (XedChangecasePluginClass *klass)
|
||||
{
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
XeditPluginClass *plugin_class = XEDIT_PLUGIN_CLASS (klass);
|
||||
XedPluginClass *plugin_class = XED_PLUGIN_CLASS (klass);
|
||||
|
||||
object_class->finalize = xedit_changecase_plugin_finalize;
|
||||
object_class->finalize = xed_changecase_plugin_finalize;
|
||||
|
||||
plugin_class->activate = impl_activate;
|
||||
plugin_class->deactivate = impl_deactivate;
|
72
plugins/changecase/xed-changecase-plugin.h
Normal file
72
plugins/changecase/xed-changecase-plugin.h
Normal file
@@ -0,0 +1,72 @@
|
||||
/*
|
||||
* xed-changecase-plugin.h
|
||||
*
|
||||
* Copyright (C) 2004-2005 - Paolo Borelli
|
||||
*
|
||||
* 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 __XED_CHANGECASE_PLUGIN_H__
|
||||
#define __XED_CHANGECASE_PLUGIN_H__
|
||||
|
||||
#include <glib.h>
|
||||
#include <glib-object.h>
|
||||
#include <xed/xed-plugin.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
/*
|
||||
* Type checking and casting macros
|
||||
*/
|
||||
#define XED_TYPE_CHANGECASE_PLUGIN (xed_changecase_plugin_get_type ())
|
||||
#define XED_CHANGECASE_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), XED_TYPE_CHANGECASE_PLUGIN, XedChangecasePlugin))
|
||||
#define XED_CHANGECASE_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), XED_TYPE_CHANGECASE_PLUGIN, XedChangecasePluginClass))
|
||||
#define XED_IS_CHANGECASE_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), XED_TYPE_CHANGECASE_PLUGIN))
|
||||
#define XED_IS_CHANGECASE_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), XED_TYPE_CHANGECASE_PLUGIN))
|
||||
#define XED_CHANGECASE_PLUGIN_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), XED_TYPE_CHANGECASE_PLUGIN, XedChangecasePluginClass))
|
||||
|
||||
/*
|
||||
* Main object structure
|
||||
*/
|
||||
typedef struct _XedChangecasePlugin XedChangecasePlugin;
|
||||
|
||||
struct _XedChangecasePlugin
|
||||
{
|
||||
XedPlugin parent_instance;
|
||||
};
|
||||
|
||||
/*
|
||||
* Class definition
|
||||
*/
|
||||
typedef struct _XedChangecasePluginClass XedChangecasePluginClass;
|
||||
|
||||
struct _XedChangecasePluginClass
|
||||
{
|
||||
XedPluginClass parent_class;
|
||||
};
|
||||
|
||||
/*
|
||||
* Public methods
|
||||
*/
|
||||
GType xed_changecase_plugin_get_type (void) G_GNUC_CONST;
|
||||
|
||||
/* All the plugins must implement this function */
|
||||
G_MODULE_EXPORT GType register_xed_plugin (GTypeModule *module);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __XED_CHANGECASE_PLUGIN_H__ */
|
@@ -1,72 +0,0 @@
|
||||
/*
|
||||
* xedit-changecase-plugin.h
|
||||
*
|
||||
* Copyright (C) 2004-2005 - Paolo Borelli
|
||||
*
|
||||
* 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_CHANGECASE_PLUGIN_H__
|
||||
#define __XEDIT_CHANGECASE_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_CHANGECASE_PLUGIN (xedit_changecase_plugin_get_type ())
|
||||
#define XEDIT_CHANGECASE_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), XEDIT_TYPE_CHANGECASE_PLUGIN, XeditChangecasePlugin))
|
||||
#define XEDIT_CHANGECASE_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), XEDIT_TYPE_CHANGECASE_PLUGIN, XeditChangecasePluginClass))
|
||||
#define XEDIT_IS_CHANGECASE_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), XEDIT_TYPE_CHANGECASE_PLUGIN))
|
||||
#define XEDIT_IS_CHANGECASE_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), XEDIT_TYPE_CHANGECASE_PLUGIN))
|
||||
#define XEDIT_CHANGECASE_PLUGIN_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), XEDIT_TYPE_CHANGECASE_PLUGIN, XeditChangecasePluginClass))
|
||||
|
||||
/*
|
||||
* Main object structure
|
||||
*/
|
||||
typedef struct _XeditChangecasePlugin XeditChangecasePlugin;
|
||||
|
||||
struct _XeditChangecasePlugin
|
||||
{
|
||||
XeditPlugin parent_instance;
|
||||
};
|
||||
|
||||
/*
|
||||
* Class definition
|
||||
*/
|
||||
typedef struct _XeditChangecasePluginClass XeditChangecasePluginClass;
|
||||
|
||||
struct _XeditChangecasePluginClass
|
||||
{
|
||||
XeditPluginClass parent_class;
|
||||
};
|
||||
|
||||
/*
|
||||
* Public methods
|
||||
*/
|
||||
GType xedit_changecase_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_CHANGECASE_PLUGIN_H__ */
|
Reference in New Issue
Block a user