gedit r6235 - in branches/jessevdk-plugins: . bindings/python gedit gedit/dialogs gedit/plugins plugins/changecase plugins/docinfo plugins/filebrowser plugins/indent plugins/modelines plugins/sample plugins/sort plugins/spell plugins/taglist plugins/time
- From: jessevdk svn gnome org
- To: svn-commits-list gnome org
- Subject: gedit r6235 - in branches/jessevdk-plugins: . bindings/python gedit gedit/dialogs gedit/plugins plugins/changecase plugins/docinfo plugins/filebrowser plugins/indent plugins/modelines plugins/sample plugins/sort plugins/spell plugins/taglist plugins/time
- Date: Mon, 7 Apr 2008 00:22:04 +0100 (BST)
Author: jessevdk
Date: Mon Apr 7 00:22:03 2008
New Revision: 6235
URL: http://svn.gnome.org/viewvc/gedit?rev=6235&view=rev
Log:
* Moved all plugin related sources to plugins/ and updated
plugins, bindings, includes accordingly
Added:
branches/jessevdk-plugins/gedit/plugins/
branches/jessevdk-plugins/gedit/plugins/Makefile.am
branches/jessevdk-plugins/gedit/plugins/gedit-module.c
- copied unchanged from r6230, /branches/jessevdk-plugins/gedit/gedit-module.c
branches/jessevdk-plugins/gedit/plugins/gedit-module.h
- copied unchanged from r6230, /branches/jessevdk-plugins/gedit/gedit-module.h
branches/jessevdk-plugins/gedit/plugins/gedit-plugin-info-priv.h
- copied unchanged from r6231, /branches/jessevdk-plugins/gedit/gedit-plugin-info-priv.h
branches/jessevdk-plugins/gedit/plugins/gedit-plugin-info.c
- copied, changed from r6231, /branches/jessevdk-plugins/gedit/gedit-plugin-info.c
branches/jessevdk-plugins/gedit/plugins/gedit-plugin-info.h
- copied, changed from r6231, /branches/jessevdk-plugins/gedit/gedit-plugin-info.h
branches/jessevdk-plugins/gedit/plugins/gedit-plugin-manager.c
- copied unchanged from r6231, /branches/jessevdk-plugins/gedit/gedit-plugin-manager.c
branches/jessevdk-plugins/gedit/plugins/gedit-plugin-manager.h
- copied unchanged from r6230, /branches/jessevdk-plugins/gedit/gedit-plugin-manager.h
branches/jessevdk-plugins/gedit/plugins/gedit-plugin.c
- copied unchanged from r6230, /branches/jessevdk-plugins/gedit/gedit-plugin.c
branches/jessevdk-plugins/gedit/plugins/gedit-plugin.h
- copied unchanged from r6230, /branches/jessevdk-plugins/gedit/gedit-plugin.h
branches/jessevdk-plugins/gedit/plugins/gedit-plugins-engine.c
- copied unchanged from r6232, /branches/jessevdk-plugins/gedit/gedit-plugins-engine.c
branches/jessevdk-plugins/gedit/plugins/gedit-plugins-engine.h
- copied, changed from r6232, /branches/jessevdk-plugins/gedit/gedit-plugins-engine.h
branches/jessevdk-plugins/gedit/plugins/gedit-python-module.c
- copied unchanged from r6232, /branches/jessevdk-plugins/gedit/gedit-python-module.c
branches/jessevdk-plugins/gedit/plugins/gedit-python-module.h
- copied unchanged from r6230, /branches/jessevdk-plugins/gedit/gedit-python-module.h
branches/jessevdk-plugins/gedit/plugins/gedit-python-plugin.c
- copied, changed from r6232, /branches/jessevdk-plugins/gedit/gedit-python-plugin.c
branches/jessevdk-plugins/gedit/plugins/gedit-python-plugin.h
- copied, changed from r6232, /branches/jessevdk-plugins/gedit/gedit-python-plugin.h
Removed:
branches/jessevdk-plugins/gedit/gedit-module.c
branches/jessevdk-plugins/gedit/gedit-module.h
branches/jessevdk-plugins/gedit/gedit-plugin-info-priv.h
branches/jessevdk-plugins/gedit/gedit-plugin-info.c
branches/jessevdk-plugins/gedit/gedit-plugin-info.h
branches/jessevdk-plugins/gedit/gedit-plugin-manager.c
branches/jessevdk-plugins/gedit/gedit-plugin-manager.h
branches/jessevdk-plugins/gedit/gedit-plugin.c
branches/jessevdk-plugins/gedit/gedit-plugin.h
branches/jessevdk-plugins/gedit/gedit-plugins-engine.c
branches/jessevdk-plugins/gedit/gedit-plugins-engine.h
branches/jessevdk-plugins/gedit/gedit-python-module.c
branches/jessevdk-plugins/gedit/gedit-python-module.h
branches/jessevdk-plugins/gedit/gedit-python-plugin.c
branches/jessevdk-plugins/gedit/gedit-python-plugin.h
Modified:
branches/jessevdk-plugins/bindings/python/gedit.override
branches/jessevdk-plugins/bindings/python/geditplugin.override
branches/jessevdk-plugins/bindings/python/geditplugins.override
branches/jessevdk-plugins/configure.ac
branches/jessevdk-plugins/gedit/Makefile.am
branches/jessevdk-plugins/gedit/dialogs/gedit-preferences-dialog.c
branches/jessevdk-plugins/gedit/gedit-session.c
branches/jessevdk-plugins/gedit/gedit-window.c
branches/jessevdk-plugins/plugins/changecase/gedit-changecase-plugin.h
branches/jessevdk-plugins/plugins/docinfo/gedit-docinfo-plugin.h
branches/jessevdk-plugins/plugins/filebrowser/Makefile.am
branches/jessevdk-plugins/plugins/filebrowser/gedit-file-bookmarks-store.c
branches/jessevdk-plugins/plugins/filebrowser/gedit-file-browser-plugin.c
branches/jessevdk-plugins/plugins/filebrowser/gedit-file-browser-plugin.h
branches/jessevdk-plugins/plugins/filebrowser/gedit-file-browser-store.c
branches/jessevdk-plugins/plugins/filebrowser/gedit-file-browser-store.h
branches/jessevdk-plugins/plugins/filebrowser/gedit-file-browser-view.c
branches/jessevdk-plugins/plugins/filebrowser/gedit-file-browser-widget.c
branches/jessevdk-plugins/plugins/filebrowser/gedit-file-browser-widget.h
branches/jessevdk-plugins/plugins/indent/gedit-indent-plugin.h
branches/jessevdk-plugins/plugins/modelines/gedit-modeline-plugin.h
branches/jessevdk-plugins/plugins/sample/gedit-sample-plugin.h
branches/jessevdk-plugins/plugins/sort/gedit-sort-plugin.h
branches/jessevdk-plugins/plugins/spell/gedit-spell-plugin.h
branches/jessevdk-plugins/plugins/taglist/gedit-taglist-plugin-panel.c
branches/jessevdk-plugins/plugins/taglist/gedit-taglist-plugin.c
branches/jessevdk-plugins/plugins/taglist/gedit-taglist-plugin.h
branches/jessevdk-plugins/plugins/time/gedit-time-plugin.h
Modified: branches/jessevdk-plugins/bindings/python/gedit.override
==============================================================================
--- branches/jessevdk-plugins/bindings/python/gedit.override (original)
+++ branches/jessevdk-plugins/bindings/python/gedit.override Mon Apr 7 00:22:03 2008
@@ -5,8 +5,8 @@
#include <pygtk/pygtk.h>
#include "gedit-language-manager.h"
-#include "gedit-plugin.h"
-#include "gedit-python-plugin.h"
+#include "plugins/gedit-plugin.h"
+#include "plugins/gedit-python-plugin.h"
#include "gedit-app.h"
#include "gedit-encodings.h"
#include "gedit-enum-types.h"
Modified: branches/jessevdk-plugins/bindings/python/geditplugin.override
==============================================================================
--- branches/jessevdk-plugins/bindings/python/geditplugin.override (original)
+++ branches/jessevdk-plugins/bindings/python/geditplugin.override Mon Apr 7 00:22:03 2008
@@ -1,7 +1,7 @@
%%
headers
- #include "gedit-plugin.h"
- #include "gedit-window.h"
+#include "plugins/gedit-plugin.h"
+#include "gedit-window.h"
%%
override gedit_plugin_activate kwargs
static PyObject *
@@ -10,7 +10,7 @@
gpointer klass, klass2;
static char *kwlist[] = { "window", NULL };
PyGObject *window;
- PyObject *cls = ((PyObject *)self)->ob_type; // FIXME
+ PyObject *cls = (PyObject *)(((PyObject *)self)->ob_type);
if (!PyArg_ParseTupleAndKeywords (args,
kwargs,
@@ -52,7 +52,7 @@
gpointer klass, klass2;
static char *kwlist[] = {"window", NULL};
PyGObject *window;
- PyObject *cls = ((PyObject *)self)->ob_type;
+ PyObject *cls = (PyObject *)(((PyObject *)self)->ob_type);
if (!PyArg_ParseTupleAndKeywords (args,
kwargs,
@@ -94,7 +94,7 @@
gpointer klass, klass2;
static char *kwlist[] = {"window", NULL};
PyGObject *window;
- PyObject *cls = ((PyObject *)self)->ob_type;
+ PyObject *cls = (PyObject *)(((PyObject *)self)->ob_type);
if (!PyArg_ParseTupleAndKeywords (args,
kwargs,
@@ -135,7 +135,7 @@
{
int ret;
gpointer klass, klass2;
- PyObject *cls = ((PyObject *)self)->ob_type;
+ PyObject *cls = (PyObject *)(((PyObject *)self)->ob_type);
klass = g_type_class_ref (pyg_type_from_object (cls));
@@ -166,7 +166,7 @@
{
GtkWidget *ret;
gpointer klass, klass2;
- PyObject *cls = ((PyObject *)self)->ob_type;
+ PyObject *cls = (PyObject *)(((PyObject *)self)->ob_type);
klass = g_type_class_ref(pyg_type_from_object (cls));
Modified: branches/jessevdk-plugins/bindings/python/geditplugins.override
==============================================================================
--- branches/jessevdk-plugins/bindings/python/geditplugins.override (original)
+++ branches/jessevdk-plugins/bindings/python/geditplugins.override Mon Apr 7 00:22:03 2008
@@ -4,9 +4,9 @@
#include "pygobject.h"
#include <pygtk/pygtk.h>
-#include "gedit-plugins-engine.h"
-#include "gedit-plugin.h"
-#include "gedit-plugin-info.h"
+#include "plugins/gedit-plugins-engine.h"
+#include "plugins/gedit-plugin.h"
+#include "plugins/gedit-plugin-info.h"
static PyObject *
_helper_wrap_string_list (const gchar **list)
Modified: branches/jessevdk-plugins/configure.ac
==============================================================================
--- branches/jessevdk-plugins/configure.ac (original)
+++ branches/jessevdk-plugins/configure.ac Mon Apr 7 00:22:03 2008
@@ -359,6 +359,7 @@
docs/Makefile
docs/reference/Makefile
gedit/dialogs/Makefile
+gedit/plugins/Makefile
gedit/Makefile
help/Makefile
help/eu/Makefile
@@ -371,6 +372,7 @@
plugins/externaltools/data/Makefile
plugins/externaltools/scripts/Makefile
plugins/filebrowser/Makefile
+plugins/filebrowser/bindings/Makefile
plugins/indent/Makefile
plugins/Makefile
plugins/modelines/Makefile
Modified: branches/jessevdk-plugins/gedit/Makefile.am
==============================================================================
--- branches/jessevdk-plugins/gedit/Makefile.am (original)
+++ branches/jessevdk-plugins/gedit/Makefile.am Mon Apr 7 00:22:03 2008
@@ -1,5 +1,5 @@
## Process this file with automake to produce Makefile.in
-SUBDIRS = dialogs
+SUBDIRS = dialogs plugins
bin_PROGRAMS = gedit
@@ -37,7 +37,8 @@
libgedit_la_LIBADD = \
$(GEDIT_LIBS) \
- dialogs/libdialogs.la
+ dialogs/libdialogs.la \
+ plugins/libplugins.la
if ENABLE_PYTHON
libgedit_la_LIBADD += \
@@ -54,11 +55,6 @@
gedit-commands.h \
gedit-language-manager.h \
gedit-style-scheme-manager.h \
- gedit-plugin-info.h \
- gedit-plugin-info-priv.h \
- gedit-plugin-manager.h \
- gedit-plugins-engine.h \
- gedit-module.h \
gedit-ui.h \
gedit-window-private.h \
gedit-documents-panel.h \
@@ -78,12 +74,6 @@
gedittextregion.h \
gedit-session.h
-if ENABLE_PYTHON
-NOINST_H_FILES += \
- gedit-python-module.h \
- gedit-python-plugin.h
-endif
-
INST_H_FILES = \
gedit-app.h \
gedit-convert.h \
@@ -97,7 +87,6 @@
gedit-metadata-manager.h \
gedit-notebook.h \
gedit-panel.h \
- gedit-plugin.h \
gedit-prefs-manager-app.h \
gedit-prefs-manager.h \
gedit-progress-message-area.h \
@@ -142,13 +131,8 @@
gedit-language-manager.c \
gedit-message-area.c \
gedit-metadata-manager.c \
- gedit-module.c \
gedit-notebook.c \
gedit-panel.c \
- gedit-plugin-info.c \
- gedit-plugin.c \
- gedit-plugin-manager.c \
- gedit-plugins-engine.c \
gedit-prefs-manager-app.c \
gedit-prefs-manager.c \
gedit-prefs-manager-private.h \
@@ -168,15 +152,6 @@
$(NOINST_H_FILES) \
$(INST_H_FILES)
-
-if ENABLE_PYTHON
-libgedit_la_SOURCES += \
- gedit-python-module.c \
- gedit-python-module.h \
- gedit-python-plugin.c \
- gedit-python-plugin.h
-endif
-
gedit-enum-types.h: gedit-enum-types.h.template $(INST_H_FILES) $(GLIB_MKENUMS)
(cd $(srcdir) && $(GLIB_MKENUMS) --template gedit-enum-types.h.template $(INST_H_FILES)) > $@
Modified: branches/jessevdk-plugins/gedit/dialogs/gedit-preferences-dialog.c
==============================================================================
--- branches/jessevdk-plugins/gedit/dialogs/gedit-preferences-dialog.c (original)
+++ branches/jessevdk-plugins/gedit/dialogs/gedit-preferences-dialog.c Mon Apr 7 00:22:03 2008
@@ -46,7 +46,7 @@
#include "gedit-debug.h"
#include "gedit-document.h"
#include "gedit-style-scheme-manager.h"
-#include "gedit-plugin-manager.h"
+#include "plugins/gedit-plugin-manager.h"
#include "gedit-help.h"
/*
Modified: branches/jessevdk-plugins/gedit/gedit-session.c
==============================================================================
--- branches/jessevdk-plugins/gedit/gedit-session.c (original)
+++ branches/jessevdk-plugins/gedit/gedit-session.c Mon Apr 7 00:22:03 2008
@@ -47,7 +47,7 @@
#include "gedit-session.h"
#include "gedit-debug.h"
-#include "gedit-plugins-engine.h"
+#include "plugins/gedit-plugins-engine.h"
#include "gedit-prefs-manager-app.h"
#include "gedit-metadata-manager.h"
#include "gedit-window.h"
Modified: branches/jessevdk-plugins/gedit/gedit-window.c
==============================================================================
--- branches/jessevdk-plugins/gedit/gedit-window.c (original)
+++ branches/jessevdk-plugins/gedit/gedit-window.c Mon Apr 7 00:22:03 2008
@@ -52,7 +52,7 @@
#include "gedit-prefs-manager-app.h"
#include "gedit-panel.h"
#include "gedit-documents-panel.h"
-#include "gedit-plugins-engine.h"
+#include "plugins/gedit-plugins-engine.h"
#include "gedit-enum-types.h"
#define LANGUAGE_NONE (const gchar *)"LangNone"
Added: branches/jessevdk-plugins/gedit/plugins/Makefile.am
==============================================================================
--- (empty file)
+++ branches/jessevdk-plugins/gedit/plugins/Makefile.am Mon Apr 7 00:22:03 2008
@@ -0,0 +1,62 @@
+INCLUDES = \
+ -I$(top_srcdir) \
+ -I$(top_builddir) \
+ -I$(top_srcdir)/gedit \
+ -I$(top_builddir)/gedit \
+ $(GEDIT_CFLAGS) \
+ $(WARN_CFLAGS) \
+ $(DISABLE_DEPRECATED_CFLAGS) \
+ -DDATADIR=\""$(datadir)"\" \
+ -DGEDIT_DATADIR=\""$(datadir)/gedit-2"\" \
+ -DGEDIT_LOCALEDIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
+ -DGEDIT_UI_DIR=\""$(datadir)/gedit-2/ui/"\" \
+ -DGEDIT_PLUGINDIR=\""$(libdir)/gedit-2/plugins"\" \
+ -DGEDIT_GLADEDIR=\""$(datadir)/gedit-2/glade/"\" \
+ -DGEDIT_ICONDIR=\""$(datadir)/gedit-2/icons"\"
+
+if ENABLE_PYTHON
+INCLUDES += \
+ $(NO_STRICT_ALIASING_CFLAGS) \
+ $(PYGTK_CFLAGS) \
+ $(PYTHON_CFLAGS) \
+ $(AM_CFLAGS)
+endif
+
+noinst_LTLIBRARIES = libplugins.la
+
+NOINST_H_FILES = \
+ gedit-plugin-info-priv.h \
+ gedit-plugin-manager.h \
+ gedit-module.h
+
+if ENABLE_PYTHON
+NOINST_H_FILES += \
+ gedit-python-module.h \
+ gedit-python-plugin.h
+endif
+
+INST_H_FILES = \
+ gedit-plugin.h \
+ gedit-plugin-info.h \
+ gedit-plugins-engine.h
+
+
+headerdir = $(prefix)/include/gedit- GEDIT_API_VERSION@/gedit/plugins
+
+header_DATA = \
+ $(INST_H_FILES)
+
+libplugins_la_SOURCES = \
+ gedit-module.c \
+ gedit-plugin.c \
+ gedit-plugin-info.c \
+ gedit-plugin-manager.c \
+ gedit-plugins-engine.c \
+ $(NOINST_H_FILES) \
+ $(INST_H_FILES)
+
+if ENABLE_PYTHON
+libplugins_la_SOURCES += \
+ gedit-python-module.c \
+ gedit-python-plugin.c
+endif
Copied: branches/jessevdk-plugins/gedit/plugins/gedit-plugin-info.c (from r6231, /branches/jessevdk-plugins/gedit/gedit-plugin-info.c)
==============================================================================
--- /branches/jessevdk-plugins/gedit/gedit-plugin-info.c (original)
+++ branches/jessevdk-plugins/gedit/plugins/gedit-plugin-info.c Mon Apr 7 00:22:03 2008
@@ -42,13 +42,13 @@
#include "gedit-debug.h"
#include "gedit-plugin.h"
-void
+static void
_gedit_plugin_info_ref (GeditPluginInfo *info)
{
g_atomic_int_inc (&info->refcount);
}
-void
+static void
_gedit_plugin_info_unref (GeditPluginInfo *info)
{
if (!g_atomic_int_dec_and_test (&info->refcount))
Copied: branches/jessevdk-plugins/gedit/plugins/gedit-plugin-info.h (from r6231, /branches/jessevdk-plugins/gedit/gedit-plugin-info.h)
==============================================================================
--- /branches/jessevdk-plugins/gedit/gedit-plugin-info.h (original)
+++ branches/jessevdk-plugins/gedit/plugins/gedit-plugin-info.h Mon Apr 7 00:22:03 2008
@@ -33,7 +33,7 @@
#define __GEDIT_PLUGIN_INFO_H__
#include <glib-object.h>
-#include "gedit-plugin.h"
+#include <gedit/plugins/gedit-plugin.h>
G_BEGIN_DECLS
Copied: branches/jessevdk-plugins/gedit/plugins/gedit-plugins-engine.h (from r6232, /branches/jessevdk-plugins/gedit/gedit-plugins-engine.h)
==============================================================================
--- /branches/jessevdk-plugins/gedit/gedit-plugins-engine.h (original)
+++ branches/jessevdk-plugins/gedit/plugins/gedit-plugins-engine.h Mon Apr 7 00:22:03 2008
@@ -32,9 +32,9 @@
#define __GEDIT_PLUGINS_ENGINE_H__
#include <glib.h>
-#include "gedit-window.h"
-#include "gedit-plugin-info.h"
-#include "gedit-plugin.h"
+#include <gedit/gedit-window.h>
+#include <gedit/plugins/gedit-plugin-info.h>
+#include <gedit/plugins/gedit-plugin.h>
G_BEGIN_DECLS
Copied: branches/jessevdk-plugins/gedit/plugins/gedit-python-plugin.c (from r6232, /branches/jessevdk-plugins/gedit/gedit-python-plugin.c)
==============================================================================
--- /branches/jessevdk-plugins/gedit/gedit-python-plugin.c (original)
+++ branches/jessevdk-plugins/gedit/plugins/gedit-python-plugin.c Mon Apr 7 00:22:03 2008
@@ -107,8 +107,6 @@
PyGILState_STATE state = pyg_gil_state_ensure ();
GeditPythonPluginPrivate *priv = GEDIT_PYTHON_PLUGIN_GET_PRIVATE(plugin);
- gedit_debug_message (DEBUG_PLUGINS, "Update ui %d", priv->instance);
-
if (PyObject_HasAttrString (priv->instance, "update_ui"))
{
PyObject *py_ret = call_python_method (priv, window, "update_ui");
@@ -131,8 +129,6 @@
PyGILState_STATE state = pyg_gil_state_ensure ();
GeditPythonPluginPrivate *priv = GEDIT_PYTHON_PLUGIN_GET_PRIVATE(plugin);
- gedit_debug_message (DEBUG_PLUGINS, "Deactivate %d", priv->instance);
-
if (PyObject_HasAttrString (priv->instance, "deactivate"))
{
PyObject *py_ret = call_python_method (priv, window, "deactivate");
@@ -154,8 +150,6 @@
{
PyGILState_STATE state = pyg_gil_state_ensure ();
GeditPythonPluginPrivate *priv = GEDIT_PYTHON_PLUGIN_GET_PRIVATE(plugin);
-
- gedit_debug_message (DEBUG_PLUGINS, "Activate %d", priv->instance);
if (PyObject_HasAttrString (priv->instance, "activate"))
{
@@ -179,8 +173,6 @@
GeditPythonPluginPrivate *priv = GEDIT_PYTHON_PLUGIN_GET_PRIVATE(plugin);
GtkWidget *ret = NULL;
- gedit_debug_message (DEBUG_PLUGINS, "Configure dialog %d", priv->instance);
-
if (PyObject_HasAttrString (priv->instance, "create_configure_dialog"))
{
PyObject *py_ret = call_python_method (priv, NULL, "create_configure_dialog");
@@ -237,8 +229,6 @@
GeditPythonPluginPrivate *priv = GEDIT_PYTHON_PLUGIN_GET_PRIVATE(plugin);
Py_XDECREF(priv->instance);
-
- gedit_debug_message (DEBUG_PLUGINS, "Setting Python plugin PyObject instance %d (%d)", instance);
/* CHECK: is the increment actually needed? */
Py_INCREF(instance);
@@ -280,12 +270,15 @@
static void
gedit_python_plugin_finalize (GObject *object)
{
- PyGILState_STATE state = pyg_gil_state_ensure ();
+ PyGILState_STATE state;
GeditPythonPluginPrivate *priv = GEDIT_PYTHON_PLUGIN_GET_PRIVATE (object);
gedit_debug_message (DEBUG_PLUGINS, "Finalizing Python plugin instance");
- Py_XDECREF (GEDIT_PYTHON_PLUGIN_GET_PRIVATE(object)->instance);
+ state = pyg_gil_state_ensure ();
+ Py_XDECREF (priv->instance);
+ pyg_gil_state_release (state);
+
G_OBJECT_CLASS (parent_class)->finalize (object);
}
Copied: branches/jessevdk-plugins/gedit/plugins/gedit-python-plugin.h (from r6232, /branches/jessevdk-plugins/gedit/gedit-python-plugin.h)
==============================================================================
--- /branches/jessevdk-plugins/gedit/gedit-python-plugin.h (original)
+++ branches/jessevdk-plugins/gedit/plugins/gedit-python-plugin.h Mon Apr 7 00:22:03 2008
@@ -27,7 +27,7 @@
#include <glib-object.h>
#include <pygobject.h>
-#include <gedit/gedit-plugin.h>
+#include "gedit-plugin.h"
G_BEGIN_DECLS
Modified: branches/jessevdk-plugins/plugins/changecase/gedit-changecase-plugin.h
==============================================================================
--- branches/jessevdk-plugins/plugins/changecase/gedit-changecase-plugin.h (original)
+++ branches/jessevdk-plugins/plugins/changecase/gedit-changecase-plugin.h Mon Apr 7 00:22:03 2008
@@ -25,7 +25,7 @@
#include <glib.h>
#include <glib-object.h>
-#include <gedit/gedit-plugin.h>
+#include <gedit/plugins/gedit-plugin.h>
G_BEGIN_DECLS
Modified: branches/jessevdk-plugins/plugins/docinfo/gedit-docinfo-plugin.h
==============================================================================
--- branches/jessevdk-plugins/plugins/docinfo/gedit-docinfo-plugin.h (original)
+++ branches/jessevdk-plugins/plugins/docinfo/gedit-docinfo-plugin.h Mon Apr 7 00:22:03 2008
@@ -25,7 +25,7 @@
#include <glib.h>
#include <glib-object.h>
-#include <gedit/gedit-plugin.h>
+#include <gedit/plugins/gedit-plugin.h>
G_BEGIN_DECLS
Modified: branches/jessevdk-plugins/plugins/filebrowser/Makefile.am
==============================================================================
--- branches/jessevdk-plugins/plugins/filebrowser/Makefile.am (original)
+++ branches/jessevdk-plugins/plugins/filebrowser/Makefile.am Mon Apr 7 00:22:03 2008
@@ -1,4 +1,8 @@
-# filebrowser
+SUBDIRS =
+
+if ENABLE_PYTHON
+SUBDIRS += bindings
+endif
plugindir = $(libdir)/gedit-2/plugins
filebrowserdir = $(datadir)/gedit-2/plugins/filebrowser
Modified: branches/jessevdk-plugins/plugins/filebrowser/gedit-file-bookmarks-store.c
==============================================================================
--- branches/jessevdk-plugins/plugins/filebrowser/gedit-file-bookmarks-store.c (original)
+++ branches/jessevdk-plugins/plugins/filebrowser/gedit-file-bookmarks-store.c Mon Apr 7 00:22:03 2008
@@ -23,7 +23,7 @@
#include <glib/gi18n.h>
#include <libgnomevfs/gnome-vfs.h>
#include <gedit/gedit-utils.h>
-#include <gedit/gedit-plugin.h>
+#include <gedit/plugins/gedit-plugin.h>
#include "gedit-file-bookmarks-store.h"
#include "gedit-file-browser-utils.h"
Modified: branches/jessevdk-plugins/plugins/filebrowser/gedit-file-browser-plugin.c
==============================================================================
--- branches/jessevdk-plugins/plugins/filebrowser/gedit-file-browser-plugin.c (original)
+++ branches/jessevdk-plugins/plugins/filebrowser/gedit-file-browser-plugin.c Mon Apr 7 00:22:03 2008
@@ -101,7 +101,7 @@
GtkTreeIter * iter,
GeditFileBrowserPluginData * data);
-GEDIT_PLUGIN_REGISTER_TYPE_WITH_CODE (GeditFileBrowserPlugin, filetree_plugin, \
+GEDIT_PLUGIN_REGISTER_TYPE_WITH_CODE (GeditFileBrowserPlugin, gedit_file_browser_plugin, \
gedit_file_browser_enum_and_flag_register_type (module); \
gedit_file_browser_store_register_type (module); \
gedit_file_bookmarks_store_register_type (module); \
@@ -111,17 +111,17 @@
static void
-filetree_plugin_init (GeditFileBrowserPlugin * plugin)
+gedit_file_browser_plugin_init (GeditFileBrowserPlugin * plugin)
{
plugin->priv = GEDIT_FILE_BROWSER_PLUGIN_GET_PRIVATE (plugin);
}
static void
-filetree_plugin_finalize (GObject * object)
+gedit_file_browser_plugin_finalize (GObject * object)
{
//GeditFileBrowserPlugin * plugin = GEDIT_FILE_BROWSER_PLUGIN (object);
- G_OBJECT_CLASS (filetree_plugin_parent_class)->finalize (object);
+ G_OBJECT_CLASS (gedit_file_browser_plugin_parent_class)->finalize (object);
}
static GeditFileBrowserPluginData *
@@ -816,12 +816,12 @@
}
static void
-filetree_plugin_class_init (GeditFileBrowserPluginClass * klass)
+gedit_file_browser_plugin_class_init (GeditFileBrowserPluginClass * klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GeditPluginClass * plugin_class = GEDIT_PLUGIN_CLASS (klass);
- object_class->finalize = filetree_plugin_finalize;
+ object_class->finalize = gedit_file_browser_plugin_finalize;
plugin_class->activate = impl_activate;
plugin_class->deactivate = impl_deactivate;
Modified: branches/jessevdk-plugins/plugins/filebrowser/gedit-file-browser-plugin.h
==============================================================================
--- branches/jessevdk-plugins/plugins/filebrowser/gedit-file-browser-plugin.h (original)
+++ branches/jessevdk-plugins/plugins/filebrowser/gedit-file-browser-plugin.h Mon Apr 7 00:22:03 2008
@@ -24,13 +24,13 @@
#include <glib.h>
#include <glib-object.h>
-#include <gedit/gedit-plugin.h>
+#include <gedit/plugins/gedit-plugin.h>
G_BEGIN_DECLS
/*
* Type checking and casting macros
*/
-#define GEDIT_TYPE_FILE_BROWSER_PLUGIN (filetree_plugin_get_type ())
+#define GEDIT_TYPE_FILE_BROWSER_PLUGIN (gedit_file_browser_plugin_get_type ())
#define GEDIT_FILE_BROWSER_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GEDIT_TYPE_FILE_BROWSER_PLUGIN, GeditFileBrowserPlugin))
#define GEDIT_FILE_BROWSER_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GEDIT_TYPE_FILE_BROWSER_PLUGIN, GeditFileBrowserPluginClass))
#define GEDIT_IS_FILE_BROWSER_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GEDIT_TYPE_FILE_BROWSER_PLUGIN))
@@ -50,8 +50,6 @@
GeditFileBrowserPluginPrivate *priv;
};
-
-
struct _GeditFileBrowserPluginClass
{
GeditPluginClass parent_class;
@@ -60,7 +58,7 @@
/*
* Public methods
*/
-GType filetree_plugin_get_type (void) G_GNUC_CONST;
+GType gedit_file_browser_plugin_get_type (void) G_GNUC_CONST;
/* All the plugins must implement this function */
G_MODULE_EXPORT GType register_gedit_plugin (GTypeModule * module);
Modified: branches/jessevdk-plugins/plugins/filebrowser/gedit-file-browser-store.c
==============================================================================
--- branches/jessevdk-plugins/plugins/filebrowser/gedit-file-browser-store.c (original)
+++ branches/jessevdk-plugins/plugins/filebrowser/gedit-file-browser-store.c Mon Apr 7 00:22:03 2008
@@ -25,7 +25,7 @@
#include <string.h>
#include <glib/gi18n-lib.h>
-#include <gedit/gedit-plugin.h>
+#include <gedit/plugins/gedit-plugin.h>
#include <gedit/gedit-utils.h>
#include "gedit-file-browser-store.h"
@@ -94,6 +94,7 @@
GeditFileBrowserStoreFilterMode filter_mode;
GeditFileBrowserStoreFilterFunc filter_func;
gpointer filter_user_data;
+ GDestroyNotify filter_destroy_func;
SortFunc sort_func;
@@ -212,6 +213,10 @@
((AsyncHandle *) (item->data))->alive = FALSE;
g_slist_free (obj->priv->async_handles);
+
+ if (obj->priv->filter_destroy_func)
+ obj->priv->filter_destroy_func(obj->priv->filter_user_data);
+
G_OBJECT_CLASS (gedit_file_browser_store_parent_class)->
finalize (object);
}
@@ -380,6 +385,7 @@
// Default filter mode is hiding the hidden files
obj->priv->filter_mode = gedit_file_browser_store_filter_mode_get_default ();
obj->priv->sort_func = model_sort_default;
+ obj->priv->filter_destroy_func = NULL;
}
static gboolean
@@ -2883,12 +2889,15 @@
void
gedit_file_browser_store_set_filter_func (GeditFileBrowserStore * model,
GeditFileBrowserStoreFilterFunc
- func, gpointer user_data)
+ func, gpointer user_data,
+ GDestroyNotify destroy_func)
{
g_return_if_fail (GEDIT_IS_FILE_BROWSER_STORE (model));
model->priv->filter_func = func;
model->priv->filter_user_data = user_data;
+ model->priv->filter_destroy_func = destroy_func;
+
model_refilter (model);
}
Modified: branches/jessevdk-plugins/plugins/filebrowser/gedit-file-browser-store.h
==============================================================================
--- branches/jessevdk-plugins/plugins/filebrowser/gedit-file-browser-store.h (original)
+++ branches/jessevdk-plugins/plugins/filebrowser/gedit-file-browser-store.h Mon Apr 7 00:22:03 2008
@@ -157,7 +157,8 @@
GeditFileBrowserStoreFilterMode mode);
void gedit_file_browser_store_set_filter_func (GeditFileBrowserStore * model,
GeditFileBrowserStoreFilterFunc func,
- gpointer user_data);
+ gpointer user_data,
+ GDestroyNotify func_notify);
void gedit_file_browser_store_refilter (GeditFileBrowserStore * model);
GeditFileBrowserStoreFilterMode
gedit_file_browser_store_filter_mode_get_default (void);
Modified: branches/jessevdk-plugins/plugins/filebrowser/gedit-file-browser-view.c
==============================================================================
--- branches/jessevdk-plugins/plugins/filebrowser/gedit-file-browser-view.c (original)
+++ branches/jessevdk-plugins/plugins/filebrowser/gedit-file-browser-view.c Mon Apr 7 00:22:03 2008
@@ -20,7 +20,7 @@
*/
#include <string.h>
-#include <gedit/gedit-plugin.h>
+#include <gedit/plugins/gedit-plugin.h>
#include <gdk/gdkkeysyms.h>
#include "gedit-file-browser-store.h"
Modified: branches/jessevdk-plugins/plugins/filebrowser/gedit-file-browser-widget.c
==============================================================================
--- branches/jessevdk-plugins/plugins/filebrowser/gedit-file-browser-widget.c (original)
+++ branches/jessevdk-plugins/plugins/filebrowser/gedit-file-browser-widget.c Mon Apr 7 00:22:03 2008
@@ -31,7 +31,7 @@
#include <libgnomevfs/gnome-vfs.h>
#include <libgnomeui/libgnomeui.h>
#include <gedit/gedit-utils.h>
-#include <gedit/gedit-plugin.h>
+#include <gedit/plugins/gedit-plugin.h>
#include "gedit-file-browser-utils.h"
#include "gedit-file-browser-error.h"
@@ -97,6 +97,7 @@
gulong id;
GeditFileBrowserWidgetFilterFunc func;
gpointer user_data;
+ GDestroyNotify destroy_func;
} FilterFunc;
typedef struct
@@ -239,7 +240,8 @@
static FilterFunc *
filter_func_new (GeditFileBrowserWidget * obj,
GeditFileBrowserWidgetFilterFunc func,
- gpointer user_data)
+ gpointer user_data,
+ GDestroyNotify destroy_func)
{
FilterFunc *result;
@@ -248,6 +250,7 @@
result->id = ++obj->priv->filter_id;
result->func = func;
result->user_data = user_data;
+ result->destroy_func = destroy_func;
return result;
}
@@ -304,17 +307,28 @@
{
GeditFileBrowserWidget *obj = GEDIT_FILE_BROWSER_WIDGET (object);
GList *loc;
-
+ GSList *ffunc;
+ FilterFunc *filter;
+
remove_path_items (obj);
gedit_file_browser_store_set_filter_func (obj->priv->file_store,
- NULL, NULL);
+ NULL, NULL, NULL);
g_object_unref (obj->priv->manager);
g_object_unref (obj->priv->file_store);
g_object_unref (obj->priv->bookmarks_store);
g_object_unref (obj->priv->combo_model);
- g_slist_foreach (obj->priv->filter_funcs, (GFunc) g_free, NULL);
+ for (ffunc = obj->priv->filter_funcs; ffunc; ffunc = ffunc->next)
+ {
+ filter = (FilterFunc *)(ffunc->data);
+
+ if (filter->destroy_func)
+ filter->destroy_func(filter->user_data);
+
+ g_free(filter);
+ }
+
g_slist_free (obj->priv->filter_funcs);
for (loc = obj->priv->locations; loc; loc = loc->next)
@@ -1154,7 +1168,7 @@
GEDIT_FILE_BROWSER_STORE_FILTER_MODE_HIDE_BINARY);
gedit_file_browser_store_set_filter_func (obj->priv->file_store,
(GeditFileBrowserStoreFilterFunc)
- filter_real, obj);
+ filter_real, obj, NULL);
sw = gtk_scrolled_window_new (NULL, NULL);
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (sw),
@@ -1730,6 +1744,7 @@
obj->priv->glob_filter_id =
gedit_file_browser_widget_add_filter (obj,
filter_glob,
+ NULL,
NULL);
}
@@ -1880,13 +1895,14 @@
gulong
gedit_file_browser_widget_add_filter (GeditFileBrowserWidget * obj,
GeditFileBrowserWidgetFilterFunc
- func, gpointer user_data)
+ func, gpointer user_data,
+ GDestroyNotify destroy_func)
{
FilterFunc *f;
GtkTreeModel *model =
gtk_tree_view_get_model (GTK_TREE_VIEW (obj->priv->treeview));
- f = filter_func_new (obj, func, user_data);
+ f = filter_func_new (obj, func, user_data, destroy_func);
obj->priv->filter_funcs =
g_slist_append (obj->priv->filter_funcs, f);
Modified: branches/jessevdk-plugins/plugins/filebrowser/gedit-file-browser-widget.h
==============================================================================
--- branches/jessevdk-plugins/plugins/filebrowser/gedit-file-browser-widget.h (original)
+++ branches/jessevdk-plugins/plugins/filebrowser/gedit-file-browser-widget.h Mon Apr 7 00:22:03 2008
@@ -106,7 +106,8 @@
gulong gedit_file_browser_widget_add_filter (GeditFileBrowserWidget * obj,
GeditFileBrowserWidgetFilterFunc func,
- gpointer user_data);
+ gpointer user_data,
+ GDestroyNotify destroy_func);
void gedit_file_browser_widget_remove_filter (GeditFileBrowserWidget * obj,
gulong id);
void gedit_file_browser_widget_set_filter_pattern (GeditFileBrowserWidget * obj,
Modified: branches/jessevdk-plugins/plugins/indent/gedit-indent-plugin.h
==============================================================================
--- branches/jessevdk-plugins/plugins/indent/gedit-indent-plugin.h (original)
+++ branches/jessevdk-plugins/plugins/indent/gedit-indent-plugin.h Mon Apr 7 00:22:03 2008
@@ -25,7 +25,7 @@
#include <glib.h>
#include <glib-object.h>
-#include <gedit/gedit-plugin.h>
+#include <gedit/plugins/gedit-plugin.h>
G_BEGIN_DECLS
Modified: branches/jessevdk-plugins/plugins/modelines/gedit-modeline-plugin.h
==============================================================================
--- branches/jessevdk-plugins/plugins/modelines/gedit-modeline-plugin.h (original)
+++ branches/jessevdk-plugins/plugins/modelines/gedit-modeline-plugin.h Mon Apr 7 00:22:03 2008
@@ -24,7 +24,7 @@
#include <glib.h>
#include <glib-object.h>
-#include <gedit/gedit-plugin.h>
+#include <gedit/plugins/gedit-plugin.h>
G_BEGIN_DECLS
Modified: branches/jessevdk-plugins/plugins/sample/gedit-sample-plugin.h
==============================================================================
--- branches/jessevdk-plugins/plugins/sample/gedit-sample-plugin.h (original)
+++ branches/jessevdk-plugins/plugins/sample/gedit-sample-plugin.h Mon Apr 7 00:22:03 2008
@@ -25,7 +25,7 @@
#include <glib.h>
#include <glib-object.h>
-#include <gedit/gedit-plugin.h>
+#include <gedit/plugins/gedit-plugin.h>
G_BEGIN_DECLS
Modified: branches/jessevdk-plugins/plugins/sort/gedit-sort-plugin.h
==============================================================================
--- branches/jessevdk-plugins/plugins/sort/gedit-sort-plugin.h (original)
+++ branches/jessevdk-plugins/plugins/sort/gedit-sort-plugin.h Mon Apr 7 00:22:03 2008
@@ -23,7 +23,7 @@
#include <glib.h>
#include <glib-object.h>
-#include <gedit/gedit-plugin.h>
+#include <gedit/plugins/gedit-plugin.h>
G_BEGIN_DECLS
Modified: branches/jessevdk-plugins/plugins/spell/gedit-spell-plugin.h
==============================================================================
--- branches/jessevdk-plugins/plugins/spell/gedit-spell-plugin.h (original)
+++ branches/jessevdk-plugins/plugins/spell/gedit-spell-plugin.h Mon Apr 7 00:22:03 2008
@@ -25,7 +25,7 @@
#include <glib.h>
#include <glib-object.h>
-#include <gedit/gedit-plugin.h>
+#include <gedit/plugins/gedit-plugin.h>
G_BEGIN_DECLS
Modified: branches/jessevdk-plugins/plugins/taglist/gedit-taglist-plugin-panel.c
==============================================================================
--- branches/jessevdk-plugins/plugins/taglist/gedit-taglist-plugin-panel.c (original)
+++ branches/jessevdk-plugins/plugins/taglist/gedit-taglist-plugin-panel.c Mon Apr 7 00:22:03 2008
@@ -39,7 +39,7 @@
#include <gedit/gedit-utils.h>
#include <gedit/gedit-debug.h>
-#include <gedit/gedit-plugin.h>
+#include <gedit/plugins/gedit-plugin.h>
#include <gdk/gdkkeysyms.h>
#include <glib/gi18n.h>
Modified: branches/jessevdk-plugins/plugins/taglist/gedit-taglist-plugin.c
==============================================================================
--- branches/jessevdk-plugins/plugins/taglist/gedit-taglist-plugin.c (original)
+++ branches/jessevdk-plugins/plugins/taglist/gedit-taglist-plugin.c Mon Apr 7 00:22:03 2008
@@ -38,7 +38,7 @@
#include <glib/gi18n-lib.h>
#include <gmodule.h>
-#include <gedit/gedit-plugin.h>
+#include <gedit/plugins/gedit-plugin.h>
#include <gedit/gedit-debug.h>
#define WINDOW_DATA_KEY "GeditTaglistPluginWindowData"
Modified: branches/jessevdk-plugins/plugins/taglist/gedit-taglist-plugin.h
==============================================================================
--- branches/jessevdk-plugins/plugins/taglist/gedit-taglist-plugin.h (original)
+++ branches/jessevdk-plugins/plugins/taglist/gedit-taglist-plugin.h Mon Apr 7 00:22:03 2008
@@ -32,7 +32,7 @@
#include <glib.h>
#include <glib-object.h>
-#include <gedit/gedit-plugin.h>
+#include <gedit/plugins/gedit-plugin.h>
G_BEGIN_DECLS
Modified: branches/jessevdk-plugins/plugins/time/gedit-time-plugin.h
==============================================================================
--- branches/jessevdk-plugins/plugins/time/gedit-time-plugin.h (original)
+++ branches/jessevdk-plugins/plugins/time/gedit-time-plugin.h Mon Apr 7 00:22:03 2008
@@ -25,7 +25,7 @@
#include <glib.h>
#include <glib-object.h>
-#include <gedit/gedit-plugin.h>
+#include <gedit/plugins/gedit-plugin.h>
G_BEGIN_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]