[Xfce4-commits] <parole:master> get rid of unused function on the Plugin Interface.

Ali Abdallah noreply at xfce.org
Wed Nov 25 10:40:02 CET 2009


Updating branch refs/heads/master
         to e397d1eb61351ec607351f0a5ee9fae8c35f1e9c (commit)
       from ae82dfea92bbd132ee5003d5d465e6600826f6da (commit)

commit e397d1eb61351ec607351f0a5ee9fae8c35f1e9c
Author: Ali Abdallah <ali at ali-xfce.org>
Date:   Wed Nov 25 09:08:55 2009 +0100

    get rid of unused function on the Plugin Interface.

 TODO                            |    2 ++
 parole/parole-provider-plugin.c |   23 -----------------------
 parole/parole-provider-plugin.h |    6 ------
 src/parole-module.c             |   21 ++++++++++++++-------
 src/parole-module.h             |    2 ++
 src/parole-plugins-manager.c    |    6 +++---
 6 files changed, 21 insertions(+), 39 deletions(-)

diff --git a/TODO b/TODO
index 472d6cc..f09bdaa 100644
--- a/TODO
+++ b/TODO
@@ -1,4 +1,6 @@
 === Media player ===
+* Automatically detect disc type when parole
+  is launche with --device=/dev/sr0 without a uri
 * Support scale ratio view.
 * Handle missing gstreamer plugins.
 * ...
diff --git a/parole/parole-provider-plugin.c b/parole/parole-provider-plugin.c
index 5e28b7e..09d8291 100644
--- a/parole/parole-provider-plugin.c
+++ b/parole/parole-provider-plugin.c
@@ -113,26 +113,3 @@ void parole_provider_plugin_set_player (ParoleProviderPlugin *provider, ParolePr
 	(*PAROLE_PROVIDER_PLUGIN_GET_INTERFACE (provider)->set_player) (provider, player);
     }
 }
-
-/**
- * parole_provider_plugin_get_is_active:
- * @provider: a #ParoleProviderPlugin
- * 
- * Returns: TRUE is the plugin is currently active e.g. loaded by the player, FALSE otherwise. 
- * 
- * 
- * Since: 0.2
- **/
-gboolean parole_provider_plugin_get_is_active (ParoleProviderPlugin *provider)
-{
-    gboolean active = FALSE;
-    
-    g_return_val_if_fail (PAROLE_IS_PROVIDER_PLUGIN (provider), FALSE);
-    
-    if ( PAROLE_PROVIDER_PLUGIN_GET_INTERFACE (provider)->get_is_active )
-    {
-	active = (*PAROLE_PROVIDER_PLUGIN_GET_INTERFACE (provider)->get_is_active) (provider);
-    }
-    
-    return active;
-}
diff --git a/parole/parole-provider-plugin.h b/parole/parole-provider-plugin.h
index 4e7cb75..0c023e9 100644
--- a/parole/parole-provider-plugin.h
+++ b/parole/parole-provider-plugin.h
@@ -51,9 +51,6 @@ struct _ParoleProviderPluginIface
 								 
     void		 (*set_player)				(ParoleProviderPlugin *provider,
 								 ParoleProviderPlayer *player);
-								 
-    /*< private >*/
-    gboolean		(*get_is_active)			(ParoleProviderPlugin *provider);
 };
 
 GType		 	 parole_provider_plugin_get_type	(void) G_GNUC_CONST;
@@ -65,9 +62,6 @@ void			 parole_provider_plugin_configure       (ParoleProviderPlugin *provider,
 								 
 void			 parole_provider_plugin_set_player	(ParoleProviderPlugin *provider,
 								 ParoleProviderPlayer *player);
-
-gboolean		 parole_provider_plugin_get_is_active   (ParoleProviderPlugin *provider);
-
 G_END_DECLS
 
 #endif /* __PAROLE_PLUGIN_IFACE_H__ */
diff --git a/src/parole-module.c b/src/parole-module.c
index e94cfe8..8732439 100644
--- a/src/parole-module.c
+++ b/src/parole-module.c
@@ -135,12 +135,6 @@ parole_provider_module_class_init (ParoleProviderModuleClass *klass)
 }
 
 static gboolean
-parole_provider_module_get_is_active (ParoleProviderPlugin *plugin)
-{
-    return PAROLE_PROVIDER_MODULE (plugin)->active;
-}
-
-static gboolean
 parole_provider_module_get_is_configurable (ParoleProviderPlugin *plugin)
 {
     ParoleProviderModule *module;
@@ -167,7 +161,6 @@ parole_provider_module_configure (ParoleProviderPlugin *plugin, GtkWidget *paren
 static void     
 parole_provider_module_plugin_init (ParoleProviderPluginIface *iface)
 {
-    iface->get_is_active = parole_provider_module_get_is_active;
     iface->get_is_configurable = parole_provider_module_get_is_configurable;
     iface->configure = parole_provider_module_configure;
 }
@@ -206,6 +199,9 @@ parole_provider_module_new (const gchar *filename, const gchar *desktop_file)
 void parole_provider_module_new_plugin (ParoleProviderModule *module)
 {
     TRACE ("start");
+    
+    g_return_if_fail (PAROLE_IS_PROVIDER_MODULE (module));
+    
 #ifdef debug
     g_return_if_fail (module->active == TRUE);
     g_return_if_fail (module->instance == NULL);
@@ -220,6 +216,9 @@ void parole_provider_module_new_plugin (ParoleProviderModule *module)
 void parole_provider_module_free_plugin (ParoleProviderModule *module)
 {
     TRACE ("start");
+    
+    g_return_if_fail (PAROLE_IS_PROVIDER_MODULE (module));
+    
     if ( module->instance )
     {
 	g_object_unref (module->instance);
@@ -232,3 +231,11 @@ void parole_provider_module_free_plugin (ParoleProviderModule *module)
 	module->player = NULL;
     }
 }
+
+gboolean
+parole_provider_module_get_is_active (ParoleProviderModule *module)
+{
+    g_return_val_if_fail (PAROLE_IS_PROVIDER_MODULE (module), FALSE);
+    
+    return module->active;
+}
diff --git a/src/parole-module.h b/src/parole-module.h
index 1f9603b..ee5980e 100644
--- a/src/parole-module.h
+++ b/src/parole-module.h
@@ -69,6 +69,8 @@ void			     parole_provider_module_new_plugin      (ParoleProviderModule *module
 
 void 			     parole_provider_module_free_plugin     (ParoleProviderModule *module);
 
+gboolean		     parole_provider_module_get_is_active   (ParoleProviderModule *module);
+
 G_END_DECLS
 
 #endif /* __PAROLE_MODULE_H */
diff --git a/src/parole-plugins-manager.c b/src/parole-plugins-manager.c
index a3d5f3e..b6ab3ab 100644
--- a/src/parole-plugins-manager.c
+++ b/src/parole-plugins-manager.c
@@ -303,7 +303,7 @@ void parole_plugins_manager_tree_cursor_changed_cb (GtkTreeView *view,
 
     gtk_widget_set_tooltip_text (pref->site, site);
 
-    if ( parole_provider_plugin_get_is_active (PAROLE_PROVIDER_PLUGIN (module) ) )
+    if ( parole_provider_module_get_is_active (module) )
     {
 	configurable = parole_provider_plugin_get_is_configurable (PAROLE_PROVIDER_PLUGIN (module));
     }
@@ -317,7 +317,7 @@ parole_plugins_manager_unload_all (gpointer data, gpointer user_data)
     ParoleProviderModule *module;
     
     module = PAROLE_PROVIDER_MODULE (data);
-    if ( parole_provider_plugin_get_is_active (PAROLE_PROVIDER_PLUGIN (module)) )
+    if ( parole_provider_module_get_is_active (module) )
     {
 	parole_provider_module_free_plugin (module);
 	g_type_module_unuse (G_TYPE_MODULE (data));
@@ -441,7 +441,7 @@ parole_plugins_manager_show_plugins_pref (GtkWidget *widget, ParolePluginsManage
 	
 	gtk_list_store_append (pref->store, &iter);
 	gtk_list_store_set (pref->store, &iter, 
-			    COL_ACTIVE, parole_provider_plugin_get_is_active (PAROLE_PROVIDER_PLUGIN (module)),
+			    COL_ACTIVE, parole_provider_module_get_is_active (module),
 			    COL_PLUGIN, info->name, 
 			    COL_MODULE, module,
 			    COL_INFO, info,



More information about the Xfce4-commits mailing list