[nautilus-actions] Convert pre-v3 parameters
- From: Pierre Wieser <pwieser src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus-actions] Convert pre-v3 parameters
- Date: Sun, 13 Jun 2010 13:04:33 +0000 (UTC)
commit b6ff1e37581ddc62c86afa939e85eafb4e81af73
Author: Pierre Wieser <pwieser trychlos org>
Date: Fri Jun 11 16:26:22 2010 +0200
Convert pre-v3 parameters
ChangeLog | 13 ++
src/api/na-icontext.h | 11 +-
src/api/na-object-api.h | 8 +
src/core/na-icontext-factory.c | 2 +-
src/core/na-icontext.c | 72 ++++----
src/core/na-object-item-factory.c | 4 +
src/core/na-object.c | 5 +-
src/io-gconf/nagp-reader.c | 88 +++++++++-
src/nact/nautilus-actions-config-tool.ui | 291 ++++++++++++++++++++++++------
src/test/test-reader.c | 6 +
10 files changed, 395 insertions(+), 105 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 997b2db..a305bc4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2010-06-11 Pierre Wieser <pwieser trychlos org>
+
+ * src/api/na-icontext.h:
+ * src/core/na-icontext.c (na_icontext_is_all_mimetypes): New function.
+
+ * src/api/na-object-api.h: Define new getters/setters.
+
+ * src/core/na-icontext-factory.c:
+ * src/core/na-object-item-factory.c: Fix comments.
+
+ * src/io-gconf/nagp-reader.c:
+ Convert pre-v3 is_multiple, is_file and is_dir parameters.
+
2010-06-10 Pierre Wieser <pwieser trychlos org>
* configure.ac: Bump post-release version number.
diff --git a/src/api/na-icontext.h b/src/api/na-icontext.h
index 89c413f..a22971b 100644
--- a/src/api/na-icontext.h
+++ b/src/api/na-icontext.h
@@ -83,13 +83,14 @@ typedef struct {
GType na_icontext_get_type( void );
-gboolean na_icontext_is_candidate( const NAIContext *object, guint target, GList *selection );
-gboolean na_icontext_is_valid ( const NAIContext *object );
+gboolean na_icontext_is_candidate ( const NAIContext *object, guint target, GList *selection );
+gboolean na_icontext_is_valid ( const NAIContext *object );
+gboolean na_icontext_is_all_mimetypes( const NAIContext *object );
-void na_icontext_read_done ( NAIContext *object );
+void na_icontext_read_done ( NAIContext *object );
-void na_icontext_set_scheme ( NAIContext *object, const gchar *scheme, gboolean selected );
-void na_icontext_replace_folder( NAIContext *object, const gchar *old, const gchar *new );
+void na_icontext_set_scheme ( NAIContext *object, const gchar *scheme, gboolean selected );
+void na_icontext_replace_folder ( NAIContext *object, const gchar *old, const gchar *new );
G_END_DECLS
diff --git a/src/api/na-object-api.h b/src/api/na-object-api.h
index 406091d..fd07f50 100644
--- a/src/api/na-object-api.h
+++ b/src/api/na-object-api.h
@@ -193,6 +193,14 @@ G_BEGIN_DECLS
#define na_object_replace_folder( obj, old, new ) na_icontext_replace_folder( NA_ICONTEXT( obj ), ( const gchar * )( old ), ( const gchar * )( new ))
#define na_object_set_scheme( obj, scheme, add ) na_icontext_set_scheme( NA_ICONTEXT( obj ), ( const gchar * )( scheme ), ( add ))
#define na_object_set_schemes( obj, schemes ) na_ifactory_object_set_from_void( NA_IFACTORY_OBJECT( obj ), NAFO_DATA_SCHEMES, ( const void * )( schemes ))
+#define na_object_set_only_show_in( obj, list ) na_ifactory_object_set_from_void( NA_IFACTORY_OBJECT( obj ), NAFO_DATA_ONLY_SHOW, ( const void * )( list ))
+#define na_object_set_not_show_in( obj, list ) na_ifactory_object_set_from_void( NA_IFACTORY_OBJECT( obj ), NAFO_DATA_NOT_SHOW, ( const void * )( list ))
+#define na_object_set_try_exec( obj, exec ) na_ifactory_object_set_from_void( NA_IFACTORY_OBJECT( obj ), NAFO_DATA_TRY_EXEC, ( const void * )( exec ))
+#define na_object_set_show_if_registered( obj, name ) na_ifactory_object_set_from_void( NA_IFACTORY_OBJECT( obj ), NAFO_DATA_SHOW_IF_REGISTERED, ( const void * )( name ))
+#define na_object_set_show_if_true( obj, exec ) na_ifactory_object_set_from_void( NA_IFACTORY_OBJECT( obj ), NAFO_DATA_SHOW_IF_TRUE, ( const void * )( exec ))
+#define na_object_set_show_if_running( obj, name ) na_ifactory_object_set_from_void( NA_IFACTORY_OBJECT( obj ), NAFO_DATA_SHOW_IF_RUNNING, ( const void * )( name ))
+#define na_object_set_selection_count( obj, cond ) na_ifactory_object_set_from_void( NA_IFACTORY_OBJECT( obj ), NAFO_DATA_SELECTION_COUNT, ( const void * )( cond ))
+#define na_object_set_capabilities( obj, cap ) na_ifactory_object_set_from_void( NA_IFACTORY_OBJECT( obj ), NAFO_DATA_CAPABILITITES, ( const void * )( cap ))
G_END_DECLS
diff --git a/src/core/na-icontext-factory.c b/src/core/na-icontext-factory.c
index b324d39..27c2602 100644
--- a/src/core/na-icontext-factory.c
+++ b/src/core/na-icontext-factory.c
@@ -214,7 +214,7 @@ NADataDef data_def_conditions [] = {
NULL },
/* this is obsoleted starting with 2.30-newdata (released as 2.31.x serie)
- * and replaced by count-sign and count-number
+ * and replaced by selection-count
*/
{ NAFO_DATA_MULTIPLE,
TRUE,
diff --git a/src/core/na-icontext.c b/src/core/na-icontext.c
index a5ae98d..20baa0a 100644
--- a/src/core/na-icontext.c
+++ b/src/core/na-icontext.c
@@ -83,7 +83,6 @@ static gboolean is_valid_isfiledir( const NAIContext *object );
static gboolean is_valid_schemes( const NAIContext *object );
static gboolean is_valid_folders( const NAIContext *object );
-static void check_for_all_mimetypes( NAIContext *context );
static gboolean is_positive_assertion( const gchar *assertion );
static gboolean validate_schemes( GSList *object_schemes, NASelectedInfo *iter );
@@ -262,6 +261,42 @@ na_icontext_is_valid( const NAIContext *object )
}
/**
+ * na_icontext_is_all_mimetypes:
+ * @context: the #NAIContext object to be checked.
+ *
+ * Returns: %TRUE if this context is valid for all mimetypes, %FALSE else.
+ */
+gboolean
+na_icontext_is_all_mimetypes( const NAIContext *object )
+{
+ gboolean is_all;
+ GSList *mimetypes, *im;
+
+ g_return_val_if_fail( NA_IS_ICONTEXT( object ), FALSE );
+
+ is_all = TRUE;
+ mimetypes = na_object_get_mimetypes( object );
+
+ for( im = mimetypes ; im ; im = im->next ){
+ if( !im->data || !strlen( im->data )){
+ continue;
+ }
+ const gchar *imtype = ( const gchar * ) im->data;
+ if( !strcmp( imtype, "*" ) ||
+ !strcmp( imtype, "*/*" ) ||
+ !strcmp( imtype, "all" ) ||
+ !strcmp( imtype, "all/*" ) ||
+ !strcmp( imtype, "all/all" )){
+ continue;
+ }
+ is_all = FALSE;
+ break;
+ }
+
+ return( is_all );
+}
+
+/**
* na_icontext_read_done:
* @context: the #NAIContext to be prepared.
*
@@ -270,7 +305,7 @@ na_icontext_is_valid( const NAIContext *object )
void
na_icontext_read_done( NAIContext *context )
{
- check_for_all_mimetypes( context );
+ na_object_set_all_mimetypes( context, na_icontext_is_all_mimetypes( context ));
}
/**
@@ -1071,39 +1106,6 @@ is_valid_folders( const NAIContext *object )
}
/*
- * @context: the #NAIContext object to be checked.
- *
- * Check if this object is valid for all mimetypes. This is done at load
- * time, and let us spend as less time as possible when testing for
- * candidates.
- */
-static void
-check_for_all_mimetypes( NAIContext *context )
-{
- gboolean all = TRUE;
- GSList *mimetypes = na_object_get_mimetypes( context );
- GSList *im;
-
- for( im = mimetypes ; im ; im = im->next ){
- if( !im->data || !strlen( im->data )){
- continue;
- }
- const gchar *imtype = ( const gchar * ) im->data;
- if( !strcmp( imtype, "*" ) ||
- !strcmp( imtype, "*/*" ) ||
- !strcmp( imtype, "all" ) ||
- !strcmp( imtype, "all/*" ) ||
- !strcmp( imtype, "all/all" )){
- continue;
- }
- all = FALSE;
- break;
- }
-
- na_object_set_all_mimetypes( context, all );
-}
-
-/*
* "image/ *" is a positive assertion
* "!image/jpeg" is a negative one
*/
diff --git a/src/core/na-object-item-factory.c b/src/core/na-object-item-factory.c
index 78b6eb0..e0175bc 100644
--- a/src/core/na-object-item-factory.c
+++ b/src/core/na-object-item-factory.c
@@ -361,6 +361,10 @@ NADataDef data_def_item [] = {
/* this integer version number is introduced with .desktop files and obsoletes
* the previous string version number which was only set on actions
* we so have: "1.0" < "1.1" < "2.0" < 3
+ * Also note that iversion=3 is only written in GConf, while .desktop files
+ * do not have this key.
+ * Only when version will need to be incremented, we will write a version key
+ * in .desktop files (probably 1 or 2), and increment this iversion to 4.
*/
{ NAFO_DATA_IVERSION,
TRUE,
diff --git a/src/core/na-object.c b/src/core/na-object.c
index bbd43f7..ed3065b 100644
--- a/src/core/na-object.c
+++ b/src/core/na-object.c
@@ -712,7 +712,7 @@ na_object_object_unref( NAObject *object )
{
GList *children, *ic;
- g_debug( "na_object_object_unref: object=%p (%s, ref_count=%d)",
+ g_debug( "na_object_object_unref:enter: object=%p (%s, ref_count=%d)",
( void * ) object, G_OBJECT_TYPE_NAME( object ), G_OBJECT( object )->ref_count );
g_return_if_fail( NA_IS_OBJECT( object ));
@@ -727,6 +727,9 @@ na_object_object_unref( NAObject *object )
}
}
+ g_debug( "na_object_object_unref:about_to_unref: object=%p (%s, ref_count=%d)",
+ ( void * ) object, G_OBJECT_TYPE_NAME( object ), G_OBJECT( object )->ref_count );
+
g_object_unref( object );
}
}
diff --git a/src/io-gconf/nagp-reader.c b/src/io-gconf/nagp-reader.c
index add3c2c..bdf6eab 100644
--- a/src/io-gconf/nagp-reader.c
+++ b/src/io-gconf/nagp-reader.c
@@ -62,6 +62,8 @@ static void read_done_profile_attach_profile( const NAIFactoryProvider
static gboolean convert_pre_v3_parameters( NAObjectProfile *profile );
static gboolean convert_pre_v3_parameters_str( gchar *str );
+static gboolean convert_pre_v3_multiple( NAObjectProfile *profile );
+static gboolean convert_pre_v3_isfiledir( NAObjectProfile *profile );
static NADataBoxed *get_boxed_from_path( const NagpGConfProvider *provider, const gchar *path, ReaderData *reader_data, const NADataDef *def );
static gboolean is_key_writable( NagpGConfProvider *gconf, const gchar *key );
@@ -324,13 +326,18 @@ read_done_profile_attach_profile( const NAIFactoryProvider *provider, NAObjectPr
na_object_attach_profile( data->parent, profile );
- /* converts pre-v3 parameters
+ /* converts pre-v3 data
*/
iversion = na_object_get_iversion( data->parent );
g_debug( "%s: iversion=%d", thisfn, iversion );
+
if( iversion < 3 ){
- if( convert_pre_v3_parameters( profile )){
- na_object_set_iversion( data->parent, 3 );
+
+ if( convert_pre_v3_parameters( profile ) ||
+ convert_pre_v3_multiple( profile ) ||
+ convert_pre_v3_isfiledir( profile )){
+
+ na_object_set_iversion( data->parent, 3 );
}
}
}
@@ -449,6 +456,81 @@ convert_pre_v3_parameters_str( gchar *str )
return( changed );
}
+/*
+ * default changes from accept_multiple=false
+ * to selection_count>0
+ */
+static gboolean
+convert_pre_v3_multiple( NAObjectProfile *profile )
+{
+ gboolean accept_multiple;
+ gchar *selection_count;
+
+ accept_multiple = na_object_is_multiple( profile );
+ selection_count = g_strdup( accept_multiple ? ">0" : "=1" );
+ na_object_set_selection_count( profile, selection_count );
+ g_free( selection_count );
+
+ return( TRUE );
+}
+
+/*
+ * we may have file=true and dir=false -> only files -> all/allfiles
+ * file=false and dir=true -> only dirs -> inode/directory
+ * file=true and dir=true -> both files and dirs -> all/all
+ *
+ * we try to replace this with the corresponding mimetype, but only if
+ * current mimetype is '*' (or * / * or all/all)
+ */
+static gboolean
+convert_pre_v3_isfiledir( NAObjectProfile *profile )
+{
+ gboolean converted;
+ gboolean isfile, isdir;
+ GSList *mimetypes;
+
+ converted = FALSE;
+
+ if( na_icontext_is_all_mimetypes( NA_ICONTEXT( profile ))){
+ converted = TRUE;
+ mimetypes = NULL;
+
+ isfile = na_object_is_file( profile );
+ isdir = na_object_is_dir( profile );
+
+ if( isfile ){
+ if( isdir ){
+ /* both file and dir -> do not modify mimetypes
+ */
+ converted = FALSE;
+ } else {
+ /* files only
+ */
+ mimetypes = g_slist_prepend( NULL, g_strdup( "all/allfiles" ));
+ }
+ } else {
+ if( isdir ){
+ /* dir only
+ */
+ mimetypes = g_slist_prepend( NULL, g_strdup( "inode/directory" ));
+ } else {
+ /* not files nor dir: this is an invalid case -> do not modify
+ * mimetypes
+ */
+ converted = FALSE;
+ }
+ }
+
+ if( converted ){
+ na_object_set_mimetypes( profile, mimetypes );
+ }
+
+ na_core_utils_slist_free( mimetypes );
+ }
+
+ return( converted );
+}
+
static NADataBoxed *
get_boxed_from_path( const NagpGConfProvider *provider, const gchar *path, ReaderData *reader_data, const NADataDef *def )
{
diff --git a/src/nact/nautilus-actions-config-tool.ui b/src/nact/nautilus-actions-config-tool.ui
index b5a4c64..602d162 100644
--- a/src/nact/nautilus-actions-config-tool.ui
+++ b/src/nact/nautilus-actions-config-tool.ui
@@ -643,7 +643,7 @@ Menus are never displayed in the toolbar.</property>
</child>
<child>
<object class="GtkToggleButton" id="CommandLegendButton">
- <property name="label" translatable="yes">L_egend</property>
+ <property name="label" translatable="yes">Le_gend</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@@ -1328,7 +1328,7 @@ Defining several profiles lets you have several commands, each applying with a d
</child>
<child>
<object class="GtkButton" id="AddFromDefaultButton">
- <property name="label" translatable="yes">A_dd from common...</property>
+ <property name="label" translatable="yes">C_ommon...</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@@ -2968,7 +2968,7 @@ Be warned: this mode may be dangerous. You will not be prompted another time.</p
<child>
<object class="GtkTable" id="table5">
<property name="visible">True</property>
- <property name="n_rows">11</property>
+ <property name="n_rows">18</property>
<property name="n_columns">2</property>
<property name="column_spacing">2</property>
<property name="row_spacing">6</property>
@@ -2977,7 +2977,7 @@ Be warned: this mode may be dangerous. You will not be prompted another time.</p
<property name="visible">True</property>
<property name="xalign">1</property>
<property name="yalign">0</property>
- <property name="label" translatable="yes"><b>%d</b> :</property>
+ <property name="label" translatable="yes"><b>%b</b> :</property>
<property name="use_markup">True</property>
</object>
<packing>
@@ -2989,7 +2989,7 @@ Be warned: this mode may be dangerous. You will not be prompted another time.</p
<property name="visible">True</property>
<property name="xalign">1</property>
<property name="yalign">0</property>
- <property name="label" translatable="yes"><b>%f</b> :</property>
+ <property name="label" translatable="yes"><b>%B</b> :</property>
<property name="use_markup">True</property>
</object>
<packing>
@@ -3003,7 +3003,7 @@ Be warned: this mode may be dangerous. You will not be prompted another time.</p
<property name="visible">True</property>
<property name="xalign">1</property>
<property name="yalign">0</property>
- <property name="label" translatable="yes"><b>%h</b> :</property>
+ <property name="label" translatable="yes"><b>%c</b> :</property>
<property name="use_markup">True</property>
</object>
<packing>
@@ -3017,7 +3017,7 @@ Be warned: this mode may be dangerous. You will not be prompted another time.</p
<property name="visible">True</property>
<property name="xalign">1</property>
<property name="yalign">0</property>
- <property name="label" translatable="yes"><b>%m</b> :</property>
+ <property name="label" translatable="yes"><b>%d</b> :</property>
<property name="use_markup">True</property>
</object>
<packing>
@@ -3031,7 +3031,7 @@ Be warned: this mode may be dangerous. You will not be prompted another time.</p
<property name="visible">True</property>
<property name="xalign">1</property>
<property name="yalign">0</property>
- <property name="label" translatable="yes"><b>%M</b> :</property>
+ <property name="label" translatable="yes"><b>%D</b> :</property>
<property name="use_markup">True</property>
</object>
<packing>
@@ -3049,22 +3049,8 @@ Be warned: this mode may be dangerous. You will not be prompted another time.</p
<property name="use_markup">True</property>
</object>
<packing>
- <property name="top_attach">5</property>
- <property name="bottom_attach">6</property>
- <property name="x_options">GTK_SHRINK | GTK_FILL</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label9">
- <property name="visible">True</property>
- <property name="xalign">1</property>
- <property name="yalign">0</property>
- <property name="label" translatable="yes"><b>%R</b> :</property>
- <property name="use_markup">True</property>
- </object>
- <packing>
- <property name="top_attach">6</property>
- <property name="bottom_attach">7</property>
+ <property name="top_attach">9</property>
+ <property name="bottom_attach">10</property>
<property name="x_options">GTK_SHRINK | GTK_FILL</property>
</packing>
</child>
@@ -3077,8 +3063,8 @@ Be warned: this mode may be dangerous. You will not be prompted another time.</p
<property name="use_markup">True</property>
</object>
<packing>
- <property name="top_attach">7</property>
- <property name="bottom_attach">8</property>
+ <property name="top_attach">10</property>
+ <property name="bottom_attach">11</property>
<property name="x_options">GTK_SHRINK | GTK_FILL</property>
</packing>
</child>
@@ -3091,8 +3077,8 @@ Be warned: this mode may be dangerous. You will not be prompted another time.</p
<property name="use_markup">True</property>
</object>
<packing>
- <property name="top_attach">8</property>
- <property name="bottom_attach">9</property>
+ <property name="top_attach">11</property>
+ <property name="bottom_attach">12</property>
<property name="x_options">GTK_SHRINK | GTK_FILL</property>
</packing>
</child>
@@ -3105,8 +3091,8 @@ Be warned: this mode may be dangerous. You will not be prompted another time.</p
<property name="use_markup">True</property>
</object>
<packing>
- <property name="top_attach">9</property>
- <property name="bottom_attach">10</property>
+ <property name="top_attach">12</property>
+ <property name="bottom_attach">13</property>
<property name="x_options">GTK_SHRINK | GTK_FILL</property>
</packing>
</child>
@@ -3119,8 +3105,8 @@ Be warned: this mode may be dangerous. You will not be prompted another time.</p
<property name="use_markup">True</property>
</object>
<packing>
- <property name="top_attach">10</property>
- <property name="bottom_attach">11</property>
+ <property name="top_attach">17</property>
+ <property name="bottom_attach">18</property>
<property name="x_options">GTK_SHRINK | GTK_FILL</property>
</packing>
</child>
@@ -3129,7 +3115,7 @@ Be warned: this mode may be dangerous. You will not be prompted another time.</p
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="yalign">0</property>
- <property name="label" translatable="yes">base directory of the (first) selected file or folder.</property>
+ <property name="label" translatable="yes">(first) basename.</property>
</object>
<packing>
<property name="left_attach">1</property>
@@ -3142,7 +3128,7 @@ Be warned: this mode may be dangerous. You will not be prompted another time.</p
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="yalign">0</property>
- <property name="label" translatable="yes">the name of the (first) selected file or folder.</property>
+ <property name="label" translatable="yes">space-separated list of the basenames of the selected file(s)/folder(s).</property>
</object>
<packing>
<property name="left_attach">1</property>
@@ -3157,7 +3143,7 @@ Be warned: this mode may be dangerous. You will not be prompted another time.</p
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="yalign">0</property>
- <property name="label" translatable="yes">hostname of the (first) URI.</property>
+ <property name="label" translatable="yes">count of selected item(s).</property>
</object>
<packing>
<property name="left_attach">1</property>
@@ -3172,7 +3158,7 @@ Be warned: this mode may be dangerous. You will not be prompted another time.</p
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="yalign">0</property>
- <property name="label" translatable="yes">space-separated list of the basenames of the selected file(s)/folder(s).</property>
+ <property name="label" translatable="yes">(first) base directory.</property>
</object>
<packing>
<property name="left_attach">1</property>
@@ -3187,7 +3173,7 @@ Be warned: this mode may be dangerous. You will not be prompted another time.</p
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="yalign">0</property>
- <property name="label" translatable="yes">space-separated list of the full pathnames of the selected file(s) or folder(s).</property>
+ <property name="label" translatable="yes">space-separated list of the base directory of the selected file(s)/folder(s).</property>
</object>
<packing>
<property name="left_attach">1</property>
@@ -3207,13 +3193,43 @@ Be warned: this mode may be dangerous. You will not be prompted another time.</p
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="top_attach">5</property>
- <property name="bottom_attach">6</property>
+ <property name="top_attach">9</property>
+ <property name="bottom_attach">10</property>
<property name="x_options">GTK_FILL</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="label29">
+ <object class="GtkLabel" id="label30">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
+ <property name="label" translatable="yes">scheme of the (first) URI.</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">10</property>
+ <property name="bottom_attach">11</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label31">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
+ <property name="label" translatable="yes">(first) URI.</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">11</property>
+ <property name="bottom_attach">12</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="abel32">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="yalign">0</property>
@@ -3222,69 +3238,224 @@ Be warned: this mode may be dangerous. You will not be prompted another time.</p
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="top_attach">6</property>
- <property name="bottom_attach">7</property>
+ <property name="top_attach">12</property>
+ <property name="bottom_attach">13</property>
<property name="x_options">GTK_FILL</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="label30">
+ <object class="GtkLabel" id="label34">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="yalign">0</property>
- <property name="label" translatable="yes">scheme of the (first) URI.</property>
+ <property name="label" translatable="yes">a percent sign.</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
+ <property name="top_attach">17</property>
+ <property name="bottom_attach">18</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label46">
+ <property name="visible">True</property>
+ <property name="xalign">1</property>
+ <property name="label" translatable="yes"><b>%f</b> :</property>
+ <property name="use_markup">True</property>
+ </object>
+ <packing>
+ <property name="top_attach">5</property>
+ <property name="bottom_attach">6</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label2">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">(first) filename.</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">5</property>
+ <property name="bottom_attach">6</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label62">
+ <property name="visible">True</property>
+ <property name="xalign">1</property>
+ <property name="label" translatable="yes"><b>%F</b> :</property>
+ <property name="use_markup">True</property>
+ </object>
+ <packing>
+ <property name="top_attach">6</property>
+ <property name="bottom_attach">7</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label63">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">space-separated list of the selected filename(s).</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">6</property>
+ <property name="bottom_attach">7</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label64">
+ <property name="visible">True</property>
+ <property name="xalign">1</property>
+ <property name="label" translatable="yes"><b>%h</b> :</property>
+ <property name="use_markup">True</property>
+ </object>
+ <packing>
<property name="top_attach">7</property>
<property name="bottom_attach">8</property>
- <property name="x_options">GTK_FILL</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="label31">
+ <object class="GtkLabel" id="label69">
<property name="visible">True</property>
<property name="xalign">0</property>
- <property name="yalign">0</property>
- <property name="label" translatable="yes">(first) URI.</property>
+ <property name="label" translatable="yes">hostname of the (first) selected URI.</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
+ <property name="top_attach">7</property>
+ <property name="bottom_attach">8</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label70">
+ <property name="visible">True</property>
+ <property name="xalign">1</property>
+ <property name="label" translatable="yes"><b>%n</b> :</property>
+ <property name="use_markup">True</property>
+ </object>
+ <packing>
<property name="top_attach">8</property>
<property name="bottom_attach">9</property>
- <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label78">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">username of the (first) selected URI.</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">8</property>
+ <property name="bottom_attach">9</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label29">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">(first) basename without the extension.</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">13</property>
+ <property name="bottom_attach">14</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label32">
<property name="visible">True</property>
<property name="xalign">0</property>
- <property name="yalign">0</property>
- <property name="label" translatable="yes">username of the (first) URI.</property>
+ <property name="label" translatable="yes">space-separated list of the basenames without the extension.</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="top_attach">9</property>
- <property name="bottom_attach">10</property>
- <property name="x_options">GTK_FILL</property>
+ <property name="top_attach">14</property>
+ <property name="bottom_attach">15</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="label34">
+ <object class="GtkLabel" id="label60">
<property name="visible">True</property>
<property name="xalign">0</property>
- <property name="yalign">0</property>
- <property name="label" translatable="yes">a percent sign.</property>
+ <property name="label" translatable="yes">(first) extension.</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="top_attach">10</property>
- <property name="bottom_attach">11</property>
- <property name="x_options">GTK_FILL</property>
+ <property name="top_attach">15</property>
+ <property name="bottom_attach">16</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label79">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">space-separated list of the extension of the selected file(s)/folder(s).</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">16</property>
+ <property name="bottom_attach">17</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label9">
+ <property name="visible">True</property>
+ <property name="xalign">1</property>
+ <property name="label" translatable="yes"><b>%w</b> :</property>
+ <property name="use_markup">True</property>
+ </object>
+ <packing>
+ <property name="top_attach">13</property>
+ <property name="bottom_attach">14</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label80">
+ <property name="visible">True</property>
+ <property name="xalign">1</property>
+ <property name="label" translatable="yes"><b>%W</b> :</property>
+ <property name="use_markup">True</property>
+ </object>
+ <packing>
+ <property name="top_attach">14</property>
+ <property name="bottom_attach">15</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label81">
+ <property name="visible">True</property>
+ <property name="xalign">1</property>
+ <property name="label" translatable="yes"><b>%x</b> :</property>
+ <property name="use_markup">True</property>
+ </object>
+ <packing>
+ <property name="top_attach">15</property>
+ <property name="bottom_attach">16</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label82">
+ <property name="visible">True</property>
+ <property name="xalign">1</property>
+ <property name="label" translatable="yes"><b>%X</b> :</property>
+ <property name="use_markup">True</property>
+ </object>
+ <packing>
+ <property name="top_attach">16</property>
+ <property name="bottom_attach">17</property>
</packing>
</child>
</object>
diff --git a/src/test/test-reader.c b/src/test/test-reader.c
index 130f87e..fc42b3d 100755
--- a/src/test/test-reader.c
+++ b/src/test/test-reader.c
@@ -72,6 +72,12 @@ main( int argc, char **argv )
check_options( argc, argv, context );
NAPivot *pivot = na_pivot_new();
+ /* for test */
+ /*na_pivot_register_consumer( pivot, NA_IPIVOT_CONSUMER( self ));*/
+ na_pivot_set_automatic_reload( pivot, TRUE );
+ na_pivot_set_loadable( pivot, !PIVOT_LOAD_DISABLED & !PIVOT_LOAD_INVALID );
+ na_pivot_load_items( pivot );
+ /* for test - end */
parms.version = 1;
parms.uri = uri;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]