[nautilus-actions] nact_menubar_edit_on_copy(): incrementing ref_count on copy is useless



commit 0f3d8521340ff5bd3b127f94d863cc06885fd730
Author: Pierre Wieser <pwieser trychlos org>
Date:   Tue Feb 14 06:51:08 2012 +0100

    nact_menubar_edit_on_copy(): incrementing ref_count on copy is useless

 ChangeLog                    |    3 +++
 src/nact/nact-menubar-edit.c |    5 +----
 2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 44e322e..12d487d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2012-02-14 Pierre Wieser <pwieser trychlos org>
 
+	* src/nact/nact-menubar-edit.c (nact_menubar_edit_on_copy): Incrementing
+	the objects ref before copying is useless.
+
 	* src/nact/nact-main-window.c
 	(on_base_initialize_gtk, on_base_initialize_window): Move connections to
 	the signals when initializing window; this is not a big difference as the
diff --git a/src/nact/nact-menubar-edit.c b/src/nact/nact-menubar-edit.c
index 496159c..d7490b7 100644
--- a/src/nact/nact-menubar-edit.c
+++ b/src/nact/nact-menubar-edit.c
@@ -251,7 +251,6 @@ void
 nact_menubar_edit_on_copy( GtkAction *gtk_action, BaseWindow *window )
 {
 	static const gchar *thisfn = "nact_menubar_edit_on_copy";
-	GList *items;
 	NactClipboard *clipboard;
 
 	BAR_WINDOW_VOID( window );
@@ -260,11 +259,9 @@ nact_menubar_edit_on_copy( GtkAction *gtk_action, BaseWindow *window )
 	g_return_if_fail( GTK_IS_ACTION( gtk_action ));
 	g_return_if_fail( NACT_IS_MAIN_WINDOW( window ));
 
-	items = na_object_copyref_items( bar->private->selected_items );
 	clipboard = nact_main_window_get_clipboard( NACT_MAIN_WINDOW( window ));
-	nact_clipboard_primary_set( clipboard, items, CLIPBOARD_MODE_COPY );
+	nact_clipboard_primary_set( clipboard, bar->private->selected_items, CLIPBOARD_MODE_COPY );
 	update_clipboard_counters( window );
-	na_object_free_items( items );
 
 	g_signal_emit_by_name( bar, MENUBAR_SIGNAL_UPDATE_SENSITIVITIES );
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]