[nautilus-actions] nact_menubar_file_on_new_profile(): attach new profile to its parent action
- From: Pierre Wieser <pwieser src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus-actions] nact_menubar_file_on_new_profile(): attach new profile to its parent action
- Date: Tue, 14 Feb 2012 17:39:25 +0000 (UTC)
commit a9b10eb73c6e192be3f4739fdc1f2218a8676d3d
Author: Pierre Wieser <pwieser trychlos org>
Date: Wed Feb 8 22:18:44 2012 +0100
nact_menubar_file_on_new_profile(): attach new profile to its parent action
ChangeLog | 3 +++
src/nact/nact-menubar-file.c | 10 +++-------
2 files changed, 6 insertions(+), 7 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index f07773e..bada58f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2012-02-08 Pierre Wieser <pwieser trychlos org>
+ * src/nact/nact-menubar-file.c (nact_menubar_file_on_new_profile):
+ Attach new profile to its parent action.
+
* src/core/na-object-action.c
(na_object_action_new_with_profile, na_object_action_new_with_defaults):
Rather use the macro na_object_attach_profile().
diff --git a/src/nact/nact-menubar-file.c b/src/nact/nact-menubar-file.c
index ec5216f..f38191a 100644
--- a/src/nact/nact-menubar-file.c
+++ b/src/nact/nact-menubar-file.c
@@ -180,7 +180,6 @@ nact_menubar_file_on_new_profile( GtkAction *gtk_action, BaseWindow *window )
NAObjectAction *action;
NAObjectProfile *profile;
NactTreeView *items_view;
- gchar *name;
GList *items;
g_return_if_fail( GTK_IS_ACTION( gtk_action ));
@@ -192,13 +191,10 @@ nact_menubar_file_on_new_profile( GtkAction *gtk_action, BaseWindow *window )
NULL );
profile = na_object_profile_new_with_defaults();
- na_object_set_label( profile, _( "New profile" ));
-
- name = na_object_action_get_new_profile_name( action );
- na_object_set_id( profile, name );
- g_free( name );
+ na_object_attach_profile( action, profile );
- /*na_object_attach_profile( action, profile );*/
+ na_object_set_label( profile, _( "New profile" ));
+ na_object_set_new_id( profile, action );
na_object_check_status( profile );
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]