[nautilus-actions] na_pivot_new() no more takes an argument
- From: Pierre Wieser <pwieser src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [nautilus-actions] na_pivot_new() no more takes an argument
- Date: Tue, 24 Nov 2009 21:59:07 +0000 (UTC)
commit 238ac2b166a26b41b46f83b8d5a2060315e99a70
Author: Pierre Wieser <pwieser trychlos org>
Date: Tue Nov 24 22:35:31 2009 +0100
na_pivot_new() no more takes an argument
ChangeLog | 10 ++++++++++
TODO | 4 +---
nautilus-actions/nact/nact-application.c | 2 +-
nautilus-actions/plugin/nautilus-actions.c | 3 ++-
nautilus-actions/runtime/na-pivot.c | 18 +++++-------------
nautilus-actions/runtime/na-pivot.h | 2 +-
nautilus-actions/utils/nautilus-actions-new.c | 2 +-
7 files changed, 21 insertions(+), 20 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index e48fbc8..31c6cd9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
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.
diff --git a/TODO b/TODO
index 2603589..8b341a5 100644
--- a/TODO
+++ b/TODO
@@ -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
diff --git a/nautilus-actions/nact/nact-application.c b/nautilus-actions/nact/nact-application.c
index ac5cb0a..97c9724 100644
--- a/nautilus-actions/nact/nact-application.c
+++ b/nautilus-actions/nact/nact-application.c
@@ -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 );
diff --git a/nautilus-actions/plugin/nautilus-actions.c b/nautilus-actions/plugin/nautilus-actions.c
index abb0820..bb32184 100644
--- a/nautilus-actions/plugin/nautilus-actions.c
+++ b/nautilus-actions/plugin/nautilus-actions.c
@@ -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 );
}
diff --git a/nautilus-actions/runtime/na-pivot.c b/nautilus-actions/runtime/na-pivot.c
index 75fb38b..32e646a 100644
--- a/nautilus-actions/runtime/na-pivot.c
+++ b/nautilus-actions/runtime/na-pivot.c
@@ -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 );
diff --git a/nautilus-actions/runtime/na-pivot.h b/nautilus-actions/runtime/na-pivot.h
index 109acfc..81edfa4 100644
--- a/nautilus-actions/runtime/na-pivot.h
+++ b/nautilus-actions/runtime/na-pivot.h
@@ -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 );
diff --git a/nautilus-actions/utils/nautilus-actions-new.c b/nautilus-actions/utils/nautilus-actions-new.c
index 0ff7c19..67e3d72 100644
--- a/nautilus-actions/utils/nautilus-actions-new.c
+++ b/nautilus-actions/utils/nautilus-actions-new.c
@@ -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 ));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]