gedit r6790 - in trunk: . gedit
- From: jessevdk svn gnome org
- To: svn-commits-list gnome org
- Subject: gedit r6790 - in trunk: . gedit
- Date: Thu, 1 Jan 2009 22:47:29 +0000 (UTC)
Author: jessevdk
Date: Thu Jan 1 22:47:29 2009
New Revision: 6790
URL: http://svn.gnome.org/viewvc/gedit?rev=6790&view=rev
Log:
* gedit/gedit-plugins-engine.c: call gtk_ui_manager_ensure_update when
deactivating a plugin from the preference dialog. This fixes a crash
suspectedly caused by something in GtkUIManager using the static
strings from provided GtkActionEntry from the loaded plugin module.
When the module is unloaded, the 'static' strings are no longer valid,
and the ui manager updates the ui in an idle func (which causes access
to the now invalid strings).
Modified:
trunk/ChangeLog
trunk/gedit/gedit-plugins-engine.c
Modified: trunk/gedit/gedit-plugins-engine.c
==============================================================================
--- trunk/gedit/gedit-plugins-engine.c (original)
+++ trunk/gedit/gedit-plugins-engine.c Thu Jan 1 22:47:29 2009
@@ -631,6 +631,19 @@
}
static void
+call_plugin_deactivate (GeditPlugin *plugin,
+ GeditWindow *window)
+{
+ gedit_plugin_deactivate (plugin, window);
+
+ /* ensure update of ui manager, because we suspect it does something
+ with expected static strings in the type module (when unloaded the
+ strings don't exist anymore, and ui manager updates in an idle
+ func) */
+ gtk_ui_manager_ensure_update (gedit_window_get_ui_manager (window));
+}
+
+static void
gedit_plugins_engine_deactivate_plugin_real (GeditPluginsEngine *engine,
GeditPluginInfo *info)
{
@@ -643,7 +656,7 @@
wins = gedit_app_get_windows (gedit_app_get_default ());
for (; wins != NULL; wins = wins->next)
- gedit_plugin_deactivate (info->plugin, GEDIT_WINDOW (wins->data));
+ call_plugin_deactivate (info->plugin, GEDIT_WINDOW (wins->data));
/* first unref the plugin (the loader still has one) */
g_object_unref (info->plugin);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]