gedit r6645 - in trunk: . gedit
- From: pborelli svn gnome org
- To: svn-commits-list gnome org
- Subject: gedit r6645 - in trunk: . gedit
- Date: Mon, 1 Dec 2008 10:35:39 +0000 (UTC)
Author: pborelli
Date: Mon Dec 1 10:35:39 2008
New Revision: 6645
URL: http://svn.gnome.org/viewvc/gedit?rev=6645&view=rev
Log:
2008-12-01 Paolo Borelli <pborelli katamail com>
* gedit/gedit-plugins-engine.c: free the infos after the loaders
Modified:
trunk/ChangeLog
trunk/gedit/gedit-plugin-loader.c
trunk/gedit/gedit-plugins-engine.c
Modified: trunk/gedit/gedit-plugin-loader.c
==============================================================================
--- trunk/gedit/gedit-plugin-loader.c (original)
+++ trunk/gedit/gedit-plugin-loader.c Mon Dec 1 10:35:39 2008
@@ -38,8 +38,8 @@
gedit_plugin_loader_get_type (void)
{
static GType type = 0;
-
- if (type == 0)
+
+ if (G_UNLIKELY (type == 0))
{
static const GTypeInfo info =
{
Modified: trunk/gedit/gedit-plugins-engine.c
==============================================================================
--- trunk/gedit/gedit-plugins-engine.c (original)
+++ trunk/gedit/gedit-plugins-engine.c Mon Dec 1 10:35:39 2008
@@ -350,19 +350,27 @@
g_return_if_fail (engine->priv->gconf_client != NULL);
+ /* Firs deactivate all plugins */
for (item = engine->priv->plugin_list; item; item = item->next)
{
GeditPluginInfo *info = GEDIT_PLUGIN_INFO (item->data);
if (gedit_plugin_info_is_active (info))
gedit_plugins_engine_deactivate_plugin_real (engine, info);
-
- _gedit_plugin_info_unref (info);
}
- g_list_free (engine->priv->plugin_list);
-
+ /* unref the loaders */
g_hash_table_destroy (engine->priv->loaders);
+
+ /* and finally free the infos */
+ for (item = engine->priv->plugin_list; item; item = item->next)
+ {
+ GeditPluginInfo *info = GEDIT_PLUGIN_INFO (item->data);
+
+ _gedit_plugin_info_unref (info);
+ }
+
+ g_list_free (engine->priv->plugin_list);
g_object_unref (engine->priv->gconf_client);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]