gedit r6636 - in trunk: . gedit plugin-loaders/c plugin-loaders/python
- From: pborelli svn gnome org
- To: svn-commits-list gnome org
- Subject: gedit r6636 - in trunk: . gedit plugin-loaders/c plugin-loaders/python
- Date: Sat, 29 Nov 2008 21:10:38 +0000 (UTC)
Author: pborelli
Date: Sat Nov 29 21:10:38 2008
New Revision: 6636
URL: http://svn.gnome.org/viewvc/gedit?rev=6636&view=rev
Log:
2008-11-29 Paolo Borelli <pborelli katamail com>
* gedit/gedit-plugin-engine.c:
* gedit/gedit-plugin-loader.[ch]:
* plugin-loaders/c/plugin-loader-c.[ch]:
* plugin-loaders/c/plugin-loader-python.[ch]:
rename loader_get_name to loader_get_id
Modified:
trunk/ChangeLog
trunk/gedit/gedit-plugin-loader.c
trunk/gedit/gedit-plugin-loader.h
trunk/gedit/gedit-plugins-engine.c
trunk/plugin-loaders/c/gedit-plugin-loader-c.c
trunk/plugin-loaders/python/gedit-plugin-loader-python.c
Modified: trunk/gedit/gedit-plugin-loader.c
==============================================================================
--- trunk/gedit/gedit-plugin-loader.c (original)
+++ trunk/gedit/gedit-plugin-loader.c Sat Nov 29 21:10:38 2008
@@ -61,7 +61,7 @@
}
const gchar *
-gedit_plugin_loader_type_get_name (GType type)
+gedit_plugin_loader_type_get_id (GType type)
{
GTypeClass *klass;
GeditPluginLoaderInterface *iface;
@@ -84,8 +84,8 @@
return NULL;
}
- g_return_val_if_fail (iface->get_name != NULL, NULL);
- return iface->get_name ();
+ g_return_val_if_fail (iface->get_id != NULL, NULL);
+ return iface->get_id ();
}
GeditPlugin *
Modified: trunk/gedit/gedit-plugin-loader.h
==============================================================================
--- trunk/gedit/gedit-plugin-loader.h (original)
+++ trunk/gedit/gedit-plugin-loader.h Sat Nov 29 21:10:38 2008
@@ -40,7 +40,7 @@
struct _GeditPluginLoaderInterface {
GTypeInterface parent;
- const gchar *(*get_name) (void);
+ const gchar *(*get_id) (void);
GeditPlugin *(*load) (GeditPluginLoader *loader,
GeditPluginInfo *info,
@@ -54,7 +54,7 @@
GType gedit_plugin_loader_get_type (void);
-const gchar *gedit_plugin_loader_type_get_name (GType type);
+const gchar *gedit_plugin_loader_type_get_id (GType type);
GeditPlugin *gedit_plugin_loader_load (GeditPluginLoader *loader,
GeditPluginInfo *info,
const gchar *path);
Modified: trunk/gedit/gedit-plugins-engine.c
==============================================================================
--- trunk/gedit/gedit-plugins-engine.c (original)
+++ trunk/gedit/gedit-plugins-engine.c Sat Nov 29 21:10:38 2008
@@ -271,7 +271,7 @@
static void
add_loader (GeditPluginsEngine *engine,
- const gchar *loader_name,
+ const gchar *loader_id,
GeditObjectModule *module)
{
LoaderInfo *info;
@@ -280,7 +280,7 @@
info->loader = NULL;
info->module = module;
- g_hash_table_insert (engine->priv->loaders, g_strdup (loader_name), info);
+ g_hash_table_insert (engine->priv->loaders, g_strdup (loader_id), info);
}
static void
@@ -412,7 +412,7 @@
GeditObjectModule *module;
gchar *base;
gchar *path;
- const gchar *name;
+ const gchar *id;
GType type;
/* try to load in the module */
@@ -432,13 +432,13 @@
return TRUE;
}
-
+
/* get the exported type and check the name as exported by the
* loader interface */
type = gedit_object_module_get_object_type (module);
- name = gedit_plugin_loader_type_get_name (type);
+ id = gedit_plugin_loader_type_get_id (type);
- add_loader (engine, name, module);
+ add_loader (engine, id, module);
g_type_module_unuse (G_TYPE_MODULE (module));
return TRUE;
@@ -470,14 +470,14 @@
static GeditPluginLoader *
get_plugin_loader (GeditPluginsEngine *engine, GeditPluginInfo *info)
{
- const gchar *loader_name;
+ const gchar *loader_id;
LoaderInfo *loader_info;
-
- loader_name = info->loader;
+
+ loader_id = info->loader;
loader_info = (LoaderInfo *)g_hash_table_lookup (
engine->priv->loaders,
- loader_name);
+ loader_id);
if (loader_info == NULL)
{
@@ -493,15 +493,13 @@
loader_info = (LoaderInfo *)g_hash_table_lookup (
engine->priv->loaders,
- loader_name);
+ loader_id);
}
-
-
-
+
if (loader_info == NULL)
{
/* cache non-existent so we don't scan again */
- add_loader (engine, loader_name, NULL);
+ add_loader (engine, loader_id, NULL);
return NULL;
}
Modified: trunk/plugin-loaders/c/gedit-plugin-loader-c.c
==============================================================================
--- trunk/plugin-loaders/c/gedit-plugin-loader-c.c (original)
+++ trunk/plugin-loaders/c/gedit-plugin-loader-c.c Sat Nov 29 21:10:38 2008
@@ -36,7 +36,7 @@
static const gchar *
-gedit_plugin_loader_iface_get_name (void)
+gedit_plugin_loader_iface_get_id (void)
{
return "C";
}
@@ -100,7 +100,7 @@
{
GeditPluginLoaderInterface *iface = (GeditPluginLoaderInterface *)g_iface;
- iface->get_name = gedit_plugin_loader_iface_get_name;
+ iface->get_id = gedit_plugin_loader_iface_get_id;
iface->load = gedit_plugin_loader_iface_load;
iface->unload = gedit_plugin_loader_iface_unload;
}
Modified: trunk/plugin-loaders/python/gedit-plugin-loader-python.c
==============================================================================
--- trunk/plugin-loaders/python/gedit-plugin-loader-python.c (original)
+++ trunk/plugin-loaders/python/gedit-plugin-loader-python.c Sat Nov 29 21:10:38 2008
@@ -140,7 +140,7 @@
}
static const gchar *
-gedit_plugin_loader_iface_get_name (void)
+gedit_plugin_loader_iface_get_id (void)
{
return "Python";
}
@@ -279,7 +279,7 @@
{
GeditPluginLoaderInterface *iface = (GeditPluginLoaderInterface *)g_iface;
- iface->get_name = gedit_plugin_loader_iface_get_name;
+ iface->get_id = gedit_plugin_loader_iface_get_id;
iface->load = gedit_plugin_loader_iface_load;
iface->unload = gedit_plugin_loader_iface_unload;
iface->garbage_collect = gedit_plugin_loader_iface_garbage_collect;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]