[nautilus-actions] Have at least one profile when reading an action
- From: Pierre Wieser <pwieser src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [nautilus-actions] Have at least one profile when reading an action
- Date: Tue, 1 Dec 2009 22:45:26 +0000 (UTC)
commit bcadb923ff382d9e8d7bd8fda8f8d3137ada6b15
Author: Pierre Wieser <pwieser trychlos org>
Date: Tue Dec 1 23:21:51 2009 +0100
Have at least one profile when reading an action
ChangeLog | 3 +++
TODO | 4 ++++
nautilus-actions/io-provider-desktop/nadp-read.c | 7 +++++++
3 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 8ed2b8d..2875a5c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2009-12-01 Pierre Wieser <pwieser trychlos org>
+ * nautilus-actions/io-provider-desktop/nadp-read.c
+ (action_from_desktop_path): Have at least one profile for the action.
+
* nautilus-actions/io-provider-desktop/nadp-desktop-file.c
(check_key_file): Fix check of required keys.
diff --git a/TODO b/TODO
index 8ac7a21..4888f16 100644
--- a/TODO
+++ b/TODO
@@ -97,3 +97,7 @@
this implies dnd of an action inside of the menu would be forbidden
- nact: if item is read-only, all fields should be disabled
+
+- nact: creation assistant
+
+- toolbar label: if not set, initialize to item label
diff --git a/nautilus-actions/io-provider-desktop/nadp-read.c b/nautilus-actions/io-provider-desktop/nadp-read.c
index 062c562..895a7c3 100644
--- a/nautilus-actions/io-provider-desktop/nadp-read.c
+++ b/nautilus-actions/io-provider-desktop/nadp-read.c
@@ -210,6 +210,7 @@ action_from_desktop_path( const NadpDesktopProvider *provider, DesktopPath *dps,
{
NadpDesktopFile *ndf;
NAObjectAction *action;
+ NAObjectProfile *profile;
ndf = nadp_desktop_file_new_from_path( dps->path );
if( !ndf ){
@@ -222,6 +223,12 @@ action_from_desktop_path( const NadpDesktopProvider *provider, DesktopPath *dps,
g_object_set_data( G_OBJECT( action ), "nadp-desktop-file", ndf );
g_object_weak_ref( G_OBJECT( action ), ( GWeakNotify ) g_object_unref, ndf );
+ /* have at least one profile */
+ if( !na_object_get_items_count( action )){
+ profile = na_object_profile_new();
+ na_object_action_attach_profile( action, profile );
+ }
+
return( action );
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]