Commit a492db37 authored by Pierre Wieser's avatar Pierre Wieser

'item-changed' signal actually does not send any argument

parent dc489518
2011-01-24 Pierre Wieser <pwieser@trychlos.org>
* src/api/na-iio-provider.h:
* src/core/na-io-provider.c:
* src/core/na-io-provider.h: Fix comments.
* src/core/na-iio-provider.c (interface_base_init):
The 'item-changed' signal actually does not send any argument.
* src/core/na-pivot.c:
* src/core/na-pivot.h (na_pivot_on_item_changed_handler):
Updated accordingly.
2011-01-22 Pierre Wieser <pwieser@trychlos.org>
* src/nact/base-window.c: Handles the recorded signals in a GList.
......
......@@ -62,7 +62,7 @@
* The #NAIIOProvider interface does not define specific monitoring
* methods. Instead, it is waited that the I/O provider module
* automatically takes care of starting/stopping its own monitoring
* at load/unload time, calling the na_iio_provider_item_changed()
* services at load/unload time, calling the na_iio_provider_item_changed()
* function when appropriate.
* </para>
* </listitem>
......@@ -324,7 +324,8 @@ GType na_iio_provider_get_type( void );
/* This function is to be called by the I/O provider when it detects
* that an object has been modified in its underlying storage
* subsystem. It eventually ends up by sending a messages to the consumers.
* subsystem. It eventually ends up by sending a messages to its
* registered consumers.
*/
void na_iio_provider_item_changed ( const NAIIOProvider *instance );
......
......@@ -133,14 +133,13 @@ interface_base_init( NAIIOProviderInterface *klass )
* NAIOProvider::io-provider-item-changed:
* @provider: the #NAIIOProvider which has called the
* na_iio_provider_item_changed() function.
* @arg1: not used, initialized to %NULL.
*
* This signal is not meant to be directly sent by a plugin.
* Instead, the plugin should call the na_iio_provider_item_changed()
* function.
*
* The signal is registered without any default handler.
* Typically, only NAPivot object is connected to it.
* Typically, only the NAPivot object is connected to it.
*/
st_signals[ ITEM_CHANGED ] = g_signal_new(
IO_PROVIDER_SIGNAL_ITEM_CHANGED,
......@@ -149,10 +148,9 @@ interface_base_init( NAIIOProviderInterface *klass )
0, /* class offset */
NULL, /* accumulator */
NULL, /* accumulator data */
g_cclosure_marshal_VOID__POINTER,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE,
1,
G_TYPE_POINTER );
0 );
st_initialized = TRUE;
}
......@@ -213,5 +211,5 @@ na_iio_provider_item_changed( const NAIIOProvider *instance )
g_debug( "%s: instance=%p", thisfn, ( void * ) instance );
g_signal_emit_by_name(( gpointer ) instance, IO_PROVIDER_SIGNAL_ITEM_CHANGED, NULL );
g_signal_emit_by_name(( gpointer ) instance, IO_PROVIDER_SIGNAL_ITEM_CHANGED );
}
......@@ -899,6 +899,10 @@ io_providers_list_append_object( const NAPivot *pivot, GList *list, NAIIOProvide
return( merged );
}
/*
* when a IIOProvider plugin is associated with the NAIOProvider object,
* we connect the NAPivot callback to the 'item-changed' signal
*/
static void
io_providers_list_set_module( const NAPivot *pivot, NAIOProvider *provider_object, NAIIOProvider *provider_module )
{
......
......@@ -55,7 +55,7 @@
* this may or not be edited depending of this is a mandatory or user
* preference
* - be willing to write: this is an intrisinc i/o provider attribute
* - be able to write: his is a runtime i/o provider property
* - be able to write: this is a runtime i/o provider property
*
* and the whole configuration must not have been locked by an admin.
*/
......
......@@ -610,8 +610,6 @@ na_pivot_set_new_items( NAPivot *pivot, GList *items )
/*
* na_pivot_on_item_changed_handler:
* @provider: the #NAIIOProvider which has emitted the signal.
* @id: the id of the changed #NAObjectItem-derived object.
* As of 2.30, it is always %NULL.
* @pivot: this #NAPivot instance.
*
* This handler is trigerred by #NAIIOProvider providers when an action
......@@ -621,7 +619,7 @@ na_pivot_set_new_items( NAPivot *pivot, GList *items )
* serie, and then reload the whole list of actions
*/
void
na_pivot_on_item_changed_handler( NAIIOProvider *provider, const gchar *id, NAPivot *pivot )
na_pivot_on_item_changed_handler( NAIIOProvider *provider, NAPivot *pivot )
{
static const gchar *thisfn = "na_pivot_on_item_changed_handler";
......@@ -630,7 +628,7 @@ na_pivot_on_item_changed_handler( NAIIOProvider *provider, const gchar *id, NAPi
if( !pivot->private->dispose_has_run ){
g_debug( "%s: provider=%p, id=%s, pivot=%p", thisfn, ( void * ) provider, id, ( void * ) pivot );
g_debug( "%s: provider=%p, pivot=%p", thisfn, ( void * ) provider, ( void * ) pivot );
/* set a timeout to notify clients at the end of the serie */
g_get_current_time( &pivot->private->last_event );
......
......@@ -156,7 +156,7 @@ GList *na_pivot_get_items ( const NAPivot *pivot );
void na_pivot_load_items ( NAPivot *pivot );
void na_pivot_set_new_items( NAPivot *pivot, GList *tree );
void na_pivot_on_item_changed_handler( NAIIOProvider *provider, const gchar *id, NAPivot *pivot );
void na_pivot_on_item_changed_handler( NAIIOProvider *provider, NAPivot *pivot );
/* NAIPivotConsumer interface management
* to be deprecated
......
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