renaming from gedit to pluma

This commit is contained in:
Perberos
2011-11-07 19:52:18 -03:00
parent f00b3a11a1
commit 5ded9cba85
557 changed files with 111730 additions and 111724 deletions

View File

@@ -1,29 +1,29 @@
# sort plugin
plugindir = $(GEDIT_PLUGINS_LIBS_DIR)
plugindir = $(PLUMA_PLUGINS_LIBS_DIR)
INCLUDES = \
-I$(top_srcdir) \
$(GEDIT_CFLAGS) \
$(PLUMA_CFLAGS) \
$(WARN_CFLAGS) \
$(DISABLE_DEPRECATED_CFLAGS)
plugin_LTLIBRARIES = libsort.la
libsort_la_SOURCES = \
gedit-sort-plugin.h \
gedit-sort-plugin.c
pluma-sort-plugin.h \
pluma-sort-plugin.c
libsort_la_LDFLAGS = $(PLUGIN_LIBTOOL_FLAGS)
libsort_la_LIBADD = $(GEDIT_LIBS)
libsort_la_LIBADD = $(PLUMA_LIBS)
uidir = $(GEDIT_PLUGINS_DATA_DIR)/sort
uidir = $(PLUMA_PLUGINS_DATA_DIR)/sort
ui_DATA = sort.ui
plugin_in_files = sort.gedit-plugin.desktop.in
plugin_in_files = sort.pluma-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
%.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 = $(ui_DATA) $(plugin_in_files)

View File

@@ -1,73 +0,0 @@
/*
* gedit-sort-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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* $Id$
*/
#ifndef __GEDIT_SORT_PLUGIN_H__
#define __GEDIT_SORT_PLUGIN_H__
#include <glib.h>
#include <glib-object.h>
#include <gedit/gedit-plugin.h>
G_BEGIN_DECLS
/*
* Type checking and casting macros
*/
#define GEDIT_TYPE_SORT_PLUGIN (gedit_sort_plugin_get_type ())
#define GEDIT_SORT_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GEDIT_TYPE_SORT_PLUGIN, GeditSortPlugin))
#define GEDIT_SORT_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GEDIT_TYPE_SORT_PLUGIN, GeditSortPluginClass))
#define GEDIT_IS_SORT_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GEDIT_TYPE_SORT_PLUGIN))
#define GEDIT_IS_SORT_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GEDIT_TYPE_SORT_PLUGIN))
#define GEDIT_SORT_PLUGIN_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GEDIT_TYPE_SORT_PLUGIN, GeditSortPluginClass))
/* Private structure type */
typedef struct _GeditSortPluginPrivate GeditSortPluginPrivate;
/*
* Main object structure
*/
typedef struct _GeditSortPlugin GeditSortPlugin;
struct _GeditSortPlugin
{
GeditPlugin parent_instance;
};
/*
* Class definition
*/
typedef struct _GeditSortPluginClass GeditSortPluginClass;
struct _GeditSortPluginClass
{
GeditPluginClass parent_class;
};
/*
* Public methods
*/
GType gedit_sort_plugin_get_type (void) G_GNUC_CONST;
/* All the plugins must implement this function */
G_MODULE_EXPORT GType register_gedit_plugin (GTypeModule *module);
G_END_DECLS
#endif /* __GEDIT_SORT_PLUGIN_H__ */

View File

@@ -1,8 +1,8 @@
/*
* gedit-sort-plugin.c
* pluma-sort-plugin.c
*
* Original author: Carlo Borreo <borreo@softhome.net>
* Ported to Gedit2 by Lee Mallabone <mate@fonicmonkey.net>
* Ported to Pluma2 by Lee Mallabone <mate@fonicmonkey.net>
*
* 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
@@ -25,25 +25,25 @@
#include <config.h>
#endif
#include "gedit-sort-plugin.h"
#include "pluma-sort-plugin.h"
#include <string.h>
#include <glib/gi18n-lib.h>
#include <gmodule.h>
#include <gedit/gedit-debug.h>
#include <gedit/gedit-utils.h>
#include <gedit/gedit-help.h>
#include <pluma/pluma-debug.h>
#include <pluma/pluma-utils.h>
#include <pluma/pluma-help.h>
#define GEDIT_SORT_PLUGIN_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), GEDIT_TYPE_SORT_PLUGIN, GeditSortPluginPrivate))
#define PLUMA_SORT_PLUGIN_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), PLUMA_TYPE_SORT_PLUGIN, PlumaSortPluginPrivate))
/* Key in case the plugin ever needs any settings. */
#define SORT_BASE_KEY "/apps/gedit-2/plugins/sort"
#define SORT_BASE_KEY "/apps/pluma-2/plugins/sort"
#define WINDOW_DATA_KEY "GeditSortPluginWindowData"
#define WINDOW_DATA_KEY "PlumaSortPluginWindowData"
#define MENU_PATH "/MenuBar/EditMenu/EditOps_6"
GEDIT_PLUGIN_REGISTER_TYPE(GeditSortPlugin, gedit_sort_plugin)
PLUMA_PLUGIN_REGISTER_TYPE(PlumaSortPlugin, pluma_sort_plugin)
typedef struct
{
@@ -53,7 +53,7 @@ typedef struct
GtkWidget *ignore_case_checkbutton;
GtkWidget *remove_dups_checkbutton;
GeditDocument *doc;
PlumaDocument *doc;
GtkTextIter start, end; /* selection */
} SortDialog;
@@ -66,8 +66,8 @@ typedef struct
typedef struct
{
GeditPlugin *plugin;
GeditWindow *window;
PlumaPlugin *plugin;
PlumaWindow *window;
} ActionData;
typedef struct
@@ -95,7 +95,7 @@ static void
sort_dialog_destroy (GtkObject *obj,
gpointer dialog_pointer)
{
gedit_debug (DEBUG_PLUGINS);
pluma_debug (DEBUG_PLUGINS);
g_slice_free (SortDialog, dialog_pointer);
}
@@ -105,7 +105,7 @@ sort_dialog_response_handler (GtkDialog *widget,
gint res_id,
SortDialog *dialog)
{
gedit_debug (DEBUG_PLUGINS);
pluma_debug (DEBUG_PLUGINS);
switch (res_id)
{
@@ -115,9 +115,9 @@ sort_dialog_response_handler (GtkDialog *widget,
break;
case GTK_RESPONSE_HELP:
gedit_help_display (GTK_WINDOW (widget),
pluma_help_display (GTK_WINDOW (widget),
NULL,
"gedit-sort-plugin");
"pluma-sort-plugin");
break;
case GTK_RESPONSE_CANCEL:
@@ -130,13 +130,13 @@ sort_dialog_response_handler (GtkDialog *widget,
* the text field (like the combo box) looses the documnent selection.
* Storing the selection ONLY works because the dialog is modal */
static void
get_current_selection (GeditWindow *window, SortDialog *dialog)
get_current_selection (PlumaWindow *window, SortDialog *dialog)
{
GeditDocument *doc;
PlumaDocument *doc;
gedit_debug (DEBUG_PLUGINS);
pluma_debug (DEBUG_PLUGINS);
doc = gedit_window_get_active_document (window);
doc = pluma_window_get_active_document (window);
if (!gtk_text_buffer_get_selection_bounds (GTK_TEXT_BUFFER (doc),
&dialog->start,
@@ -158,14 +158,14 @@ get_sort_dialog (ActionData *action_data)
gchar *data_dir;
gchar *ui_file;
gedit_debug (DEBUG_PLUGINS);
pluma_debug (DEBUG_PLUGINS);
dialog = g_slice_new (SortDialog);
data_dir = gedit_plugin_get_data_dir (action_data->plugin);
data_dir = pluma_plugin_get_data_dir (action_data->plugin);
ui_file = g_build_filename (data_dir, "sort.ui", NULL);
g_free (data_dir);
ret = gedit_utils_get_ui_objects (ui_file,
ret = pluma_utils_get_ui_objects (ui_file,
NULL,
&error_widget,
"sort_dialog", &dialog->dialog,
@@ -181,7 +181,7 @@ get_sort_dialog (ActionData *action_data)
const gchar *err_message;
err_message = gtk_label_get_label (GTK_LABEL (error_widget));
gedit_warning (GTK_WINDOW (action_data->window),
pluma_warning (GTK_WINDOW (action_data->window),
"%s", err_message);
g_free (dialog);
@@ -212,19 +212,19 @@ static void
sort_cb (GtkAction *action,
ActionData *action_data)
{
GeditDocument *doc;
PlumaDocument *doc;
GtkWindowGroup *wg;
SortDialog *dialog;
gedit_debug (DEBUG_PLUGINS);
pluma_debug (DEBUG_PLUGINS);
doc = gedit_window_get_active_document (action_data->window);
doc = pluma_window_get_active_document (action_data->window);
g_return_if_fail (doc != NULL);
dialog = get_sort_dialog (action_data);
g_return_if_fail (dialog != NULL);
wg = gedit_window_get_group (action_data->window);
wg = pluma_window_get_group (action_data->window);
gtk_window_group_add_window (wg,
GTK_WINDOW (dialog->dialog));
@@ -253,7 +253,7 @@ compare_algorithm (gconstpointer s1,
gchar *key1, *key2;
SortInfo *sort_info;
gedit_debug (DEBUG_PLUGINS);
pluma_debug (DEBUG_PLUGINS);
sort_info = (SortInfo *) data;
g_return_val_if_fail (sort_info != NULL, -1);
@@ -350,7 +350,7 @@ get_line_slice (GtkTextBuffer *buf,
static void
sort_real (SortDialog *dialog)
{
GeditDocument *doc;
PlumaDocument *doc;
GtkTextIter start, end;
gint start_line, end_line;
gint i;
@@ -359,7 +359,7 @@ sort_real (SortDialog *dialog)
gchar **lines;
SortInfo *sort_info;
gedit_debug (DEBUG_PLUGINS);
pluma_debug (DEBUG_PLUGINS);
doc = dialog->doc;
g_return_if_fail (doc != NULL);
@@ -386,7 +386,7 @@ sort_real (SortDialog *dialog)
num_lines = end_line - start_line + 1;
lines = g_new0 (gchar *, num_lines + 1);
gedit_debug_message (DEBUG_PLUGINS, "Building list...");
pluma_debug_message (DEBUG_PLUGINS, "Building list...");
for (i = 0; i < num_lines; i++)
{
@@ -395,7 +395,7 @@ sort_real (SortDialog *dialog)
lines[num_lines] = NULL;
gedit_debug_message (DEBUG_PLUGINS, "Sort list...");
pluma_debug_message (DEBUG_PLUGINS, "Sort list...");
g_qsort_with_data (lines,
num_lines,
@@ -403,7 +403,7 @@ sort_real (SortDialog *dialog)
compare_algorithm,
sort_info);
gedit_debug_message (DEBUG_PLUGINS, "Rebuilding document...");
pluma_debug_message (DEBUG_PLUGINS, "Rebuilding document...");
gtk_source_buffer_begin_not_undoable_action (GTK_SOURCE_BUFFER (doc));
@@ -435,7 +435,7 @@ sort_real (SortDialog *dialog)
g_strfreev (lines);
g_free (sort_info);
gedit_debug_message (DEBUG_PLUGINS, "Done.");
pluma_debug_message (DEBUG_PLUGINS, "Done.");
}
static void
@@ -456,14 +456,14 @@ free_action_data (ActionData *data)
}
static void
update_ui_real (GeditWindow *window,
update_ui_real (PlumaWindow *window,
WindowData *data)
{
GeditView *view;
PlumaView *view;
gedit_debug (DEBUG_PLUGINS);
pluma_debug (DEBUG_PLUGINS);
view = gedit_window_get_active_view (window);
view = pluma_window_get_active_view (window);
gtk_action_group_set_sensitive (data->ui_action_group,
(view != NULL) &&
@@ -471,23 +471,23 @@ update_ui_real (GeditWindow *window,
}
static void
impl_activate (GeditPlugin *plugin,
GeditWindow *window)
impl_activate (PlumaPlugin *plugin,
PlumaWindow *window)
{
GtkUIManager *manager;
WindowData *data;
ActionData *action_data;
gedit_debug (DEBUG_PLUGINS);
pluma_debug (DEBUG_PLUGINS);
data = g_slice_new (WindowData);
action_data = g_slice_new (ActionData);
action_data->window = window;
action_data->plugin = plugin;
manager = gedit_window_get_ui_manager (window);
manager = pluma_window_get_ui_manager (window);
data->ui_action_group = gtk_action_group_new ("GeditSortPluginActions");
data->ui_action_group = gtk_action_group_new ("PlumaSortPluginActions");
gtk_action_group_set_translation_domain (data->ui_action_group,
GETTEXT_PACKAGE);
gtk_action_group_add_actions_full (data->ui_action_group,
@@ -520,15 +520,15 @@ impl_activate (GeditPlugin *plugin,
}
static void
impl_deactivate (GeditPlugin *plugin,
GeditWindow *window)
impl_deactivate (PlumaPlugin *plugin,
PlumaWindow *window)
{
GtkUIManager *manager;
WindowData *data;
gedit_debug (DEBUG_PLUGINS);
pluma_debug (DEBUG_PLUGINS);
manager = gedit_window_get_ui_manager (window);
manager = pluma_window_get_ui_manager (window);
data = (WindowData *) g_object_get_data (G_OBJECT (window),
WINDOW_DATA_KEY);
@@ -545,12 +545,12 @@ impl_deactivate (GeditPlugin *plugin,
}
static void
impl_update_ui (GeditPlugin *plugin,
GeditWindow *window)
impl_update_ui (PlumaPlugin *plugin,
PlumaWindow *window)
{
WindowData *data;
gedit_debug (DEBUG_PLUGINS);
pluma_debug (DEBUG_PLUGINS);
data = (WindowData *) g_object_get_data (G_OBJECT (window),
WINDOW_DATA_KEY);
@@ -561,26 +561,26 @@ impl_update_ui (GeditPlugin *plugin,
}
static void
gedit_sort_plugin_init (GeditSortPlugin *plugin)
pluma_sort_plugin_init (PlumaSortPlugin *plugin)
{
gedit_debug_message (DEBUG_PLUGINS, "GeditSortPlugin initializing");
pluma_debug_message (DEBUG_PLUGINS, "PlumaSortPlugin initializing");
}
static void
gedit_sort_plugin_finalize (GObject *object)
pluma_sort_plugin_finalize (GObject *object)
{
gedit_debug_message (DEBUG_PLUGINS, "GeditSortPlugin finalizing");
pluma_debug_message (DEBUG_PLUGINS, "PlumaSortPlugin finalizing");
G_OBJECT_CLASS (gedit_sort_plugin_parent_class)->finalize (object);
G_OBJECT_CLASS (pluma_sort_plugin_parent_class)->finalize (object);
}
static void
gedit_sort_plugin_class_init (GeditSortPluginClass *klass)
pluma_sort_plugin_class_init (PlumaSortPluginClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GeditPluginClass *plugin_class = GEDIT_PLUGIN_CLASS (klass);
PlumaPluginClass *plugin_class = PLUMA_PLUGIN_CLASS (klass);
object_class->finalize = gedit_sort_plugin_finalize;
object_class->finalize = pluma_sort_plugin_finalize;
plugin_class->activate = impl_activate;
plugin_class->deactivate = impl_deactivate;

View File

@@ -0,0 +1,73 @@
/*
* pluma-sort-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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* $Id$
*/
#ifndef __PLUMA_SORT_PLUGIN_H__
#define __PLUMA_SORT_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_SORT_PLUGIN (pluma_sort_plugin_get_type ())
#define PLUMA_SORT_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), PLUMA_TYPE_SORT_PLUGIN, PlumaSortPlugin))
#define PLUMA_SORT_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), PLUMA_TYPE_SORT_PLUGIN, PlumaSortPluginClass))
#define PLUMA_IS_SORT_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), PLUMA_TYPE_SORT_PLUGIN))
#define PLUMA_IS_SORT_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), PLUMA_TYPE_SORT_PLUGIN))
#define PLUMA_SORT_PLUGIN_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), PLUMA_TYPE_SORT_PLUGIN, PlumaSortPluginClass))
/* Private structure type */
typedef struct _PlumaSortPluginPrivate PlumaSortPluginPrivate;
/*
* Main object structure
*/
typedef struct _PlumaSortPlugin PlumaSortPlugin;
struct _PlumaSortPlugin
{
PlumaPlugin parent_instance;
};
/*
* Class definition
*/
typedef struct _PlumaSortPluginClass PlumaSortPluginClass;
struct _PlumaSortPluginClass
{
PlumaPluginClass parent_class;
};
/*
* Public methods
*/
GType pluma_sort_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_SORT_PLUGIN_H__ */

View File

@@ -1,4 +1,4 @@
[Gedit Plugin]
[Pluma Plugin]
Module=sort
IAge=2
_Name=Sort
@@ -6,4 +6,4 @@ _Description=Sorts a document or selected text.
Icon=gtk-sort-ascending
Authors=Carlo Borreo <borreo@softhome.net>;Lee Mallabone <mate@fonicmonkey.net>;Paolo Maggi <paolo.maggi@polito.it>;Jorge Alberto Torres H. <jorge@deadoak.com>
Copyright=Copyright © 2001 Carlo Borreo\nCopyright © 2002-2003 Lee Mallabone, Paolo Maggi\nCopyright © 2004-2005 Paolo Maggi
Website=http://www.gedit.org
Website=http://www.pluma.org