Commit 238ac2b1 authored by Pierre Wieser's avatar Pierre Wieser

na_pivot_new() no more takes an argument

parent b6906585
2009-11-24 Pierre Wieser <pwieser@trychlos.org>
na_pivot_new no more takes an argument.
* nautilus-actions/nact/nact-application.c
(appli_initialize_application):
* nautilus-actions/plugin/nautilus-actions.c (instance_init):
* nautilus-actions/runtime/na-pivot.c:
* nautilus-actions/runtime/na-pivot.h (na_pivot_new):
* nautilus-actions/utils/nautilus-actions-new.c (write_to_gconf):
Updated accordingly.
* nautilus-actions/runtime/na-utils.c (na_utils_print_version):
Displays current GLib and Gtk+ runtime library versions.
......
......@@ -77,8 +77,6 @@
- nautilus-actions-new:
give same defaults that when creating an action in NACT
- na_pivot_new: shouldn't take an argument (use add_consumer)
- NACT: unable to really delete an action imported with schemas
2009-11-21 (2.29.2-provider) not able to reproduce this, whether the
action is imported via Import assistant or by drag and drop from
......@@ -87,4 +85,4 @@
- bug when dnd to nautilus
see https://bugzilla.gnome.org/show_bug.cgi?id=593453
- nact: menu label/icon label -> context label/toolbar label
- nautilus: doesn't refresh toolbar when an item is updated
......@@ -394,7 +394,7 @@ appli_initialize_application( BaseApplication *application )
fake = na_object_action_new();
g_object_unref( fake );
NACT_APPLICATION( application )->private->pivot = na_pivot_new( NULL );
NACT_APPLICATION( application )->private->pivot = na_pivot_new();
/* call parent class */
ok = BASE_APPLICATION_CLASS( st_parent_class )->initialize_application( application );
......
......@@ -217,7 +217,8 @@ instance_init( GTypeInstance *instance, gpointer klass )
/* initialize NAPivot and load actions through NAIIOProvider interface
* forwarding notification messages from NAPivot to NautilusActions
*/
self->private->pivot = na_pivot_new( NA_IPIVOT_CONSUMER( self ));
self->private->pivot = na_pivot_new();
na_pivot_register_consumer( self->private->pivot, NA_IPIVOT_CONSUMER( self ));
na_pivot_set_automatic_reload( self->private->pivot, TRUE );
na_pivot_check_status( self->private->pivot );
}
......
......@@ -283,24 +283,20 @@ instance_finalize( GObject *object )
/**
* na_pivot_new:
* @target: a GObject which wishes be notified of any modification of
* an action in any of the underlying I/O storage subsystems.
*
* Allocates a new #NAPivot object.
* Returns: a newly allocated #NAPivot object.
*
* The target object should implement NAIPivotConsumer interface.
* It will be triggered on changes on IIOProviders and runtime
* preferences.
* The returned #NAPivot is initialized with the current list of
* #NAObjectItem-derived object.
*/
NAPivot *
na_pivot_new( const NAIPivotConsumer *target )
na_pivot_new( void )
{
static const gchar *thisfn = "na_pivot_new";
NAPivot *pivot;
GSList *messages, *im;
g_debug( "%s: target=%p", thisfn, ( void * ) target );
g_return_val_if_fail( NA_IS_IPIVOT_CONSUMER( target ) || !target, NULL );
g_debug( "%s", thisfn );
pivot = g_object_new( NA_PIVOT_TYPE, NULL );
......@@ -309,10 +305,6 @@ na_pivot_new( const NAIPivotConsumer *target )
/*g_debug( "%s: modules=%p, count=%d",
thisfn, ( void * ) pivot->private->modules, g_list_length( pivot->private->modules ));*/
if( target ){
na_pivot_register_consumer( pivot, target );
}
monitor_runtime_preferences( pivot );
pivot->private->tree = na_io_provider_read_items( pivot, &messages );
......
......@@ -109,7 +109,7 @@ typedef struct {
GType na_pivot_get_type( void );
NAPivot *na_pivot_new( const NAIPivotConsumer *notified );
NAPivot *na_pivot_new( void );
void na_pivot_check_status( const NAPivot *pivot );
void na_pivot_dump( const NAPivot *pivot );
......
......@@ -374,7 +374,7 @@ write_to_gconf( NAObjectAction *action, GSList **msg )
GObject *provider;
guint ret;
pivot = na_pivot_new( NULL );
pivot = na_pivot_new();
provider = na_pivot_get_provider( pivot, NA_IIO_PROVIDER_TYPE );
na_object_set_provider( action, NA_IIO_PROVIDER( provider ));
......
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