[nautilus-actions] Define new NAFO_DATA_SHORTCUT data



commit 1f4fb6562d20248fa61b509a7573c07c2e517da4
Author: Pierre Wieser <pwieser trychlos org>
Date:   Mon Apr 19 05:27:54 2010 +0200

    Define new NAFO_DATA_SHORTCUT data

 ChangeLog                         |    6 ++++++
 src/api/na-ifactory-object-data.h |    1 +
 src/core/na-object-item-factory.c |   36 +++++++++++++++++++++++++++++++++---
 3 files changed, 40 insertions(+), 3 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index e620d20..5071682 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -45,6 +45,12 @@
 	* src/utils/nautilus-actions-run.c:
 	Mark two new strings for translation.
 
+2010-04-18 Pierre Wieser <pwieser trychlos org>
+
+	* src/api/na-ifactory-object-data.h:
+	* src/core/na-object-item-factory.c:
+	Define new NAFO_DATA_SHORTCUT data.
+
 2010-04-15 Pierre Wieser <pwieser trychlos org>
 
 	* src/nact/nact-schemes-list.c (insert_new_row):
diff --git a/src/api/na-ifactory-object-data.h b/src/api/na-ifactory-object-data.h
index e279be0..b50e06d 100644
--- a/src/api/na-ifactory-object-data.h
+++ b/src/api/na-ifactory-object-data.h
@@ -52,6 +52,7 @@ G_BEGIN_DECLS
 #define NAFO_DATA_TOOLTIP					"na-factory-data-tooltip"
 #define NAFO_DATA_ICON						"na-factory-data-icon"
 #define NAFO_DATA_DESCRIPTION				"na-factory-data-description"
+#define NAFO_DATA_SHORTCUT					"na-factory-data-shortcut"
 #define NAFO_DATA_SUBITEMS					"na-factory-data-items"
 #define NAFO_DATA_SUBITEMS_SLIST			"na-factory-data-items-slist"
 #define NAFO_DATA_ENABLED					"na-factory-data-enabled"
diff --git a/src/core/na-object-item-factory.c b/src/core/na-object-item-factory.c
index e569b3e..a9ed2d6 100644
--- a/src/core/na-object-item-factory.c
+++ b/src/core/na-object-item-factory.c
@@ -41,9 +41,13 @@
 NADataDef data_def_item [] = {
 
 	/* this data is marked as non readable as it has to be readen specifically
-	 * in order to be able to create the corresponding NAObjectItem-derived object
-	 * it is not writable as different I/O providers have different values for it
-	 * it is not instantiated
+	 * in order to be able to create the corresponding NAObjectItem-derived
+	 * object
+	 * it is not writable as different I/O providers may have different values
+	 * for it, and thus it must be written specifically
+	 * (cf. nagp_writer_write_start(), nadp_writer_write_start())
+	 * it is not instantiated because we never need to have an actual value
+	 * (actually being determined at runtime by object class)
 	 * it is just left here to be able to define the corresponding GConf schema
 	 * and to export it as XML
 	 */
@@ -167,6 +171,32 @@ NADataDef data_def_item [] = {
 				NULL,
 				NULL },
 
+	{ NAFO_DATA_SHORTCUT,
+				TRUE,
+				TRUE,
+				TRUE,
+				N_( "Suggested shortcut" ),
+				N_( "A shortcut suggested for the action or the menu.\n" \
+					"Please note that this might be only a suggestion as the shortcut may " \
+					"be already reserved for another use. Implementation should not override " \
+					"an already existing shortcut to define this one.\n" \
+					"The format may look like \"<Control>a\" or \"<Shift><Alt>F1\".\n" \
+					"Defaults to empty." ),
+				NAFD_TYPE_STRING,
+				"",
+				TRUE,
+				TRUE,
+				FALSE,
+				FALSE,
+				"shortcut",
+				"SuggestedShortcut",
+				0,
+				NULL,
+				0,
+				0,
+				NULL,
+				NULL },
+
 	/* dynamic data, so not readable / not writable
 	 */
 	{ NAFO_DATA_SUBITEMS,



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