Commit 528c8cc3 authored by Ali Abdallah's avatar Ali Abdallah

Fix loader plugin load (bug #6032).

parent 24d93ed1
1.96
====
- Fix the plugin loader bug, when the a plugin is asking to pack a widget
and the plugin loader is not ready (bug #6032).
- Exit after 60 seconds of inactivity on the browser plugin to avoid
any zombie process.
1.95
====
- Use taglib when compiled to get the media title and display it in
......
......@@ -3,7 +3,7 @@ m4_define([parole_verinfo], [0:2:0])
m4_define([parole_version_api], [0])
m4_define([parole_version_major], [0])
m4_define([parole_version_minor], [1])
m4_define([parole_version_micro], [95])
m4_define([parole_version_micro], [96])
m4_define([parole_version_build], [@REVISION@])
m4_define([parole_version_tag], [])
m4_define([parole_version], [parole_version_major().parole_version_minor().parole_version_micro()ifelse(parole_version_tag(), [git], [parole_version_tag().parole_version_build()], [parole_version_tag()])])
......
......@@ -319,6 +319,7 @@ int main (int argc, char **argv)
}
plugins = parole_plugins_manager_new (!no_plugins);
parole_plugins_manager_load (plugins);
g_object_unref (builder);
gdk_notify_startup_complete ();
......
......@@ -231,7 +231,7 @@ parole_plugin_player_finalize (GObject *object)
g_signal_handler_disconnect (player->priv->gst, player->priv->tag_message);
}
if ( player->priv->box )
if ( player->priv->packed && GTK_IS_WIDGET (player->priv->box))
gtk_widget_destroy (player->priv->box);
G_OBJECT_CLASS (parole_plugin_player_parent_class)->finalize (object);
......
......@@ -583,58 +583,12 @@ parole_plugins_manager_load_plugins (ParolePluginsManager *manager)
}
}
static void
parole_plugins_manager_construct (GObject *object)
{
ParolePluginsManager *manager;
GDir *dir;
GError *error = NULL;
const gchar *name;
manager = PAROLE_PLUGINS_MANAGER (object);
dir = g_dir_open (PAROLE_PLUGINS_DATA_DIR, 0, &error);
if ( error )
{
g_critical ("Error opening plugins data dir: %s", error->message);
g_error_free (error);
return;
}
while ( (name = g_dir_read_name (dir) ))
{
gchar *library_name;
gchar *desktop_file;
desktop_file = g_build_filename (PAROLE_PLUGINS_DATA_DIR, name, NULL);
library_name = parole_plugins_manager_get_module_name (desktop_file);
if ( library_name )
{
gchar *library_path;
ParoleProviderModule *module;
library_path = g_build_filename (PAROLE_PLUGINS_DIR, library_name, NULL);
module = parole_provider_module_new (library_path, desktop_file);
g_ptr_array_add (manager->priv->array, module);
g_free (library_name);
g_free (library_path);
}
g_free (desktop_file);
}
g_dir_close (dir);
if ( manager->priv->load_plugins )
parole_plugins_manager_load_plugins (manager);
}
static void
parole_plugins_manager_class_init (ParolePluginsManagerClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
object_class->finalize = parole_plugins_manager_finalize;
object_class->constructed = parole_plugins_manager_construct;
object_class->set_property = parole_plugins_manager_set_property;
object_class->get_property = parole_plugins_manager_get_property;
......@@ -728,6 +682,48 @@ parole_plugins_manager_get (void)
return PAROLE_PLUGINS_MANAGER (parole_plugins_manager_object);
}
void parole_plugins_manager_load (ParolePluginsManager *manager)
{
GDir *dir;
GError *error = NULL;
const gchar *name;
dir = g_dir_open (PAROLE_PLUGINS_DATA_DIR, 0, &error);
if ( error )
{
g_critical ("Error opening plugins data dir: %s", error->message);
g_error_free (error);
return;
}
while ( (name = g_dir_read_name (dir) ))
{
gchar *library_name;
gchar *desktop_file;
desktop_file = g_build_filename (PAROLE_PLUGINS_DATA_DIR, name, NULL);
library_name = parole_plugins_manager_get_module_name (desktop_file);
if ( library_name )
{
gchar *library_path;
ParoleProviderModule *module;
library_path = g_build_filename (PAROLE_PLUGINS_DIR, library_name, NULL);
module = parole_provider_module_new (library_path, desktop_file);
g_ptr_array_add (manager->priv->array, module);
g_free (library_name);
g_free (library_path);
}
g_free (desktop_file);
}
g_dir_close (dir);
if ( manager->priv->load_plugins )
parole_plugins_manager_load_plugins (manager);
}
void
parole_plugins_manager_pack (ParolePluginsManager *manager, GtkWidget *widget, const gchar *title, ParolePluginContainer container)
{
......
......@@ -51,6 +51,8 @@ ParolePluginsManager *parole_plugins_manager_new (gbool
ParolePluginsManager *parole_plugins_manager_get (void);
void parole_plugins_manager_load (ParolePluginsManager *manager);
void parole_plugins_manager_pack (ParolePluginsManager *manager,
GtkWidget *widget,
const gchar *title,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment