Commit 564e9199 authored by Pierre Wieser's avatar Pierre Wieser

NAIContext interface is renamed to FMAIContext

parent e56143a1
......@@ -44,7 +44,7 @@ api_include_HEADERS = \
fma-data-types.h \
fma-gconf-monitor.h \
fma-gconf-utils.h \
na-icontext.h \
fma-icontext.h \
na-iduplicable.h \
na-ifactory-object.h \
na-ifactory-object-data.h \
......
......@@ -32,9 +32,9 @@
/**
* SECTION: icontext
* @title: NAIContext
* @title: FMAIContext
* @short_description: The Contextual Interface
* @include: file-manager-actions/na-icontext.h
* @include: file-manager-actions/fma-icontext.h
*
* This interface is implemented by all #NAObject -derived objects
* whose the display in the Nautilus context menu is subject to some
......@@ -49,16 +49,16 @@
G_BEGIN_DECLS
#define NA_TYPE_ICONTEXT ( na_icontext_get_type())
#define NA_ICONTEXT( instance ) ( G_TYPE_CHECK_INSTANCE_CAST( instance, NA_TYPE_ICONTEXT, NAIContext ))
#define NA_IS_ICONTEXT( instance ) ( G_TYPE_CHECK_INSTANCE_TYPE( instance, NA_TYPE_ICONTEXT ))
#define NA_ICONTEXT_GET_INTERFACE( instance ) ( G_TYPE_INSTANCE_GET_INTERFACE(( instance ), NA_TYPE_ICONTEXT, NAIContextInterface ))
#define FMA_TYPE_ICONTEXT ( fma_icontext_get_type())
#define FMA_ICONTEXT( instance ) ( G_TYPE_CHECK_INSTANCE_CAST( instance, FMA_TYPE_ICONTEXT, FMAIContext ))
#define FMA_IS_ICONTEXT( instance ) ( G_TYPE_CHECK_INSTANCE_TYPE( instance, FMA_TYPE_ICONTEXT ))
#define FMA_ICONTEXT_GET_INTERFACE( instance ) ( G_TYPE_INSTANCE_GET_INTERFACE(( instance ), FMA_TYPE_ICONTEXT, FMAIContextInterface ))
typedef struct _NAIContext NAIContext;
typedef struct _NAIContextInterfacePrivate NAIContextInterfacePrivate;
typedef struct _FMAIContext FMAIContext;
typedef struct _FMAIContextInterfacePrivate FMAIContextInterfacePrivate;
/**
* NAIContextInterface:
* FMAIContextInterface:
* @is_candidate: determines if the given NAObject-derived object is
* candidate to display in Nautilus.
*
......@@ -68,17 +68,17 @@ typedef struct _NAIContextInterfacePrivate NAIContextInterfacePrivate;
typedef struct {
/*< private >*/
GTypeInterface parent;
NAIContextInterfacePrivate *private;
FMAIContextInterfacePrivate *private;
/*< public >*/
/**
* is_candidate:
* @object: this NAIContext object.
* @object: this FMAIContext object.
* @target: the initial target which triggered this function's stack.
* This target is defined in na-object-item.h.
* @selection: the current selection as a GList of NautilusFileInfo.
*
* The NAIContext implementor may take advantage of this
* The FMAIContext implementor may take advantage of this
* virtual function to check for its own specific data. Only if the
* implementor does return %TRUE (or just doesn't implement this
* virtual), the conditions themselves will be checked.
......@@ -88,24 +88,24 @@ typedef struct {
*
* Since: 2.30
*/
gboolean ( *is_candidate )( NAIContext *object, guint target, GList *selection );
gboolean ( *is_candidate )( FMAIContext *object, guint target, GList *selection );
}
NAIContextInterface;
FMAIContextInterface;
GType na_icontext_get_type( void );
GType fma_icontext_get_type( void );
gboolean na_icontext_are_equal ( const NAIContext *a, const NAIContext *b );
gboolean na_icontext_is_candidate ( const NAIContext *context, guint target, GList *selection );
gboolean na_icontext_is_valid ( const NAIContext *context );
gboolean fma_icontext_are_equal ( const FMAIContext *a, const FMAIContext *b );
gboolean fma_icontext_is_candidate ( const FMAIContext *context, guint target, GList *selection );
gboolean fma_icontext_is_valid ( const FMAIContext *context );
void na_icontext_check_mimetypes ( const NAIContext *context );
void fma_icontext_check_mimetypes ( const FMAIContext *context );
void na_icontext_copy ( NAIContext *context, const NAIContext *source );
void na_icontext_read_done ( NAIContext *context );
void na_icontext_set_scheme ( NAIContext *context, const gchar *scheme, gboolean selected );
void na_icontext_set_only_desktop( NAIContext *context, const gchar *desktop, gboolean selected );
void na_icontext_set_not_desktop ( NAIContext *context, const gchar *desktop, gboolean selected );
void na_icontext_replace_folder ( NAIContext *context, const gchar *old, const gchar *new );
void fma_icontext_copy ( FMAIContext *context, const FMAIContext *source );
void fma_icontext_read_done ( FMAIContext *context );
void fma_icontext_set_scheme ( FMAIContext *context, const gchar *scheme, gboolean selected );
void fma_icontext_set_only_desktop( FMAIContext *context, const gchar *desktop, gboolean selected );
void fma_icontext_set_not_desktop ( FMAIContext *context, const gchar *desktop, gboolean selected );
void fma_icontext_replace_folder ( FMAIContext *context, const gchar *old, const gchar *new );
G_END_DECLS
......
......@@ -130,7 +130,7 @@ G_BEGIN_DECLS
*
* The datas which determine the display conditions of a menu or an action.
*
* @see_also: #NAIContext interface.
* @see_also: #FMAIContext interface.
*/
#define NA_FACTORY_OBJECT_CONDITIONS_GROUP "na-factory-group-conditions"
#define NAFO_DATA_BASENAMES "na-factory-data-basenames"
......
......@@ -44,7 +44,7 @@
#include "na-ifactory-object.h"
#include "na-ifactory-object-data.h"
#include "na-iduplicable.h"
#include "na-icontext.h"
#include "fma-icontext.h"
#include "na-object-action.h"
#include "na-object-profile.h"
#include "na-object-menu.h"
......@@ -174,9 +174,9 @@ G_BEGIN_DECLS
#define na_object_set_startup_class( obj, class ) na_ifactory_object_set_from_void( NA_IFACTORY_OBJECT( obj ), NAFO_DATA_STARTUP_WMCLASS, ( const void * )( class ))
#define na_object_set_execute_as( obj, user ) na_ifactory_object_set_from_void( NA_IFACTORY_OBJECT( obj ), NAFO_DATA_EXECUTE_AS, ( const void * )( user ))
/* NAIContext
/* FMAIContext
*/
#define na_object_check_mimetypes( obj ) na_icontext_check_mimetypes( NA_ICONTEXT( obj ))
#define na_object_check_mimetypes( obj ) fma_icontext_check_mimetypes( FMA_ICONTEXT( obj ))
#define na_object_get_basenames( obj ) (( GSList * ) na_ifactory_object_get_as_void( NA_IFACTORY_OBJECT( obj ), NAFO_DATA_BASENAMES ))
#define na_object_get_matchcase( obj ) (( gboolean ) GPOINTER_TO_UINT( na_ifactory_object_get_as_void( NA_IFACTORY_OBJECT( obj ), NAFO_DATA_MATCHCASE )))
......@@ -198,13 +198,13 @@ G_BEGIN_DECLS
#define na_object_set_mimetypes( obj, types ) na_ifactory_object_set_from_void( NA_IFACTORY_OBJECT( obj ), NAFO_DATA_MIMETYPES, ( const void * )( types ))
#define na_object_set_all_mimetypes( obj, all ) na_ifactory_object_set_from_void( NA_IFACTORY_OBJECT( obj ), NAFO_DATA_MIMETYPES_IS_ALL, ( const void * ) GUINT_TO_POINTER( all ))
#define na_object_set_folders( obj, folders ) na_ifactory_object_set_from_void( NA_IFACTORY_OBJECT( obj ), NAFO_DATA_FOLDERS, ( const void * )( folders ))
#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_replace_folder( obj, old, new ) fma_icontext_replace_folder( FMA_ICONTEXT( obj ), ( const gchar * )( old ), ( const gchar * )( new ))
#define na_object_set_scheme( obj, scheme, add ) fma_icontext_set_scheme( FMA_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_only_desktop( obj, desktop, add ) na_icontext_set_only_desktop( NA_ICONTEXT( obj ), ( const gchar * )( desktop ), ( add ))
#define na_object_set_only_desktop( obj, desktop, add ) fma_icontext_set_only_desktop( FMA_ICONTEXT( obj ), ( const gchar * )( desktop ), ( add ))
#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_not_desktop( obj, desktop, add ) na_icontext_set_not_desktop( NA_ICONTEXT( obj ), ( const gchar * )( desktop ), ( add ))
#define na_object_set_not_desktop( obj, desktop, add ) fma_icontext_set_not_desktop( FMA_ICONTEXT( obj ), ( const gchar * )( desktop ), ( add ))
#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 ))
......
......@@ -76,8 +76,8 @@ libna_core_la_SOURCES = \
na-gnome-vfs-uri.h \
na-gtk-utils.c \
na-gtk-utils.h \
na-icontext.c \
na-icontext-factory.c \
fma-icontext.c \
fma-icontext-factory.c \
na-iduplicable.c \
na-iexporter.c \
na-ifactory-object.c \
......
......@@ -44,7 +44,7 @@
extern FMADataDef data_def_id []; /* defined in na-object-id-factory.c */
extern FMADataDef data_def_item []; /* defined in na-object-item-factory.c */
extern FMADataDef data_def_conditions []; /* defined in na-icontext-factory.c */
extern FMADataDef data_def_conditions []; /* defined in fma-icontext-factory.c */
static FMADataDef data_def_action [] = {
......
......@@ -82,8 +82,8 @@ static void ifactory_object_read_done( NAIFactoryObject *instance, const
static guint ifactory_object_write_start( NAIFactoryObject *instance, const NAIFactoryProvider *writer, void *writer_data, GSList **messages );
static guint ifactory_object_write_done( NAIFactoryObject *instance, const NAIFactoryProvider *writer, void *writer_data, GSList **messages );
static void icontext_iface_init( NAIContextInterface *iface, void *user_data );
static gboolean icontext_is_candidate( NAIContext *object, guint target, GList *selection );
static void icontext_iface_init( FMAIContextInterface *iface, void *user_data );
static gboolean icontext_is_candidate( FMAIContext *object, guint target, GList *selection );
static NAObjectProfile *read_done_convert_v1_to_v2( NAIFactoryObject *instance );
static void read_done_deals_with_toolbar_label( NAIFactoryObject *instance );
......@@ -140,7 +140,7 @@ register_type( void )
type = g_type_register_static( NA_TYPE_OBJECT_ITEM, "NAObjectAction", &info, 0 );
g_type_add_interface_static( type, NA_TYPE_ICONTEXT, &icontext_iface_info );
g_type_add_interface_static( type, FMA_TYPE_ICONTEXT, &icontext_iface_info );
g_type_add_interface_static( type, NA_TYPE_IFACTORY_OBJECT, &ifactory_object_iface_info );
......@@ -406,7 +406,7 @@ ifactory_object_read_done( NAIFactoryObject *instance, const NAIFactoryProvider
/* prepare the context after the reading
*/
na_icontext_read_done( NA_ICONTEXT( instance ));
fma_icontext_read_done( FMA_ICONTEXT( instance ));
/* last, set action defaults
*/
......@@ -434,7 +434,7 @@ ifactory_object_write_done( NAIFactoryObject *instance, const NAIFactoryProvider
}
static void
icontext_iface_init( NAIContextInterface *iface, void *user_data )
icontext_iface_init( FMAIContextInterface *iface, void *user_data )
{
static const gchar *thisfn = "na_object_action_icontext_iface_init";
......@@ -444,7 +444,7 @@ icontext_iface_init( NAIContextInterface *iface, void *user_data )
}
static gboolean
icontext_is_candidate( NAIContext *object, guint target, GList *selection )
icontext_is_candidate( FMAIContext *object, guint target, GList *selection )
{
return( TRUE );
}
......
......@@ -37,7 +37,7 @@
extern FMADataDef data_def_id []; /* defined in na-object-id-factory.c */
extern FMADataDef data_def_item []; /* defined in na-object-item-factory.c */
extern FMADataDef data_def_conditions []; /* defined in na-icontext-factory.c */
extern FMADataDef data_def_conditions []; /* defined in fma-icontext-factory.c */
/*
* As of 3.2 non copyables data are:
......
......@@ -77,8 +77,8 @@ static void ifactory_object_read_done( NAIFactoryObject *instance, const
static guint ifactory_object_write_start( NAIFactoryObject *instance, const NAIFactoryProvider *writer, void *writer_data, GSList **messages );
static guint ifactory_object_write_done( NAIFactoryObject *instance, const NAIFactoryProvider *writer, void *writer_data, GSList **messages );
static void icontext_iface_init( NAIContextInterface *iface, void *user_data );
static gboolean icontext_is_candidate( NAIContext *object, guint target, GList *selection );
static void icontext_iface_init( FMAIContextInterface *iface, void *user_data );
static gboolean icontext_is_candidate( FMAIContext *object, guint target, GList *selection );
GType
na_object_menu_get_type( void )
......@@ -127,7 +127,7 @@ register_type( void )
type = g_type_register_static( NA_TYPE_OBJECT_ITEM, "NAObjectMenu", &info, 0 );
g_type_add_interface_static( type, NA_TYPE_ICONTEXT, &icontext_iface_info );
g_type_add_interface_static( type, FMA_TYPE_ICONTEXT, &icontext_iface_info );
g_type_add_interface_static( type, NA_TYPE_IFACTORY_OBJECT, &ifactory_object_iface_info );
......@@ -300,7 +300,7 @@ ifactory_object_read_done( NAIFactoryObject *instance, const NAIFactoryProvider
/* prepare the context after the reading
*/
na_icontext_read_done( NA_ICONTEXT( instance ));
fma_icontext_read_done( FMA_ICONTEXT( instance ));
/* last, set menu defaults
*/
......@@ -322,7 +322,7 @@ ifactory_object_write_done( NAIFactoryObject *instance, const NAIFactoryProvider
}
static void
icontext_iface_init( NAIContextInterface *iface, void *user_data )
icontext_iface_init( FMAIContextInterface *iface, void *user_data )
{
static const gchar *thisfn = "na_object_menu_icontext_iface_init";
......@@ -332,7 +332,7 @@ icontext_iface_init( NAIContextInterface *iface, void *user_data )
}
static gboolean
icontext_is_candidate( NAIContext *object, guint target, GList *selection )
icontext_is_candidate( FMAIContext *object, guint target, GList *selection )
{
return( TRUE );
}
......
......@@ -38,7 +38,7 @@
#include <api/fma-data-types.h>
extern FMADataDef data_def_id []; /* defined in na-object-id-factory.c */
extern FMADataDef data_def_conditions []; /* defined in na-icontext-factory.c */
extern FMADataDef data_def_conditions []; /* defined in fma-icontext-factory.c */
static FMADataDef data_def_profile [] = {
......
......@@ -85,8 +85,8 @@ static FMADataGroup *ifactory_object_get_groups( const NAIFactoryObject *instanc
static void ifactory_object_read_done( NAIFactoryObject *instance, const NAIFactoryProvider *reader, void *reader_data, GSList **messages );
static guint ifactory_object_write_done( NAIFactoryObject *instance, const NAIFactoryProvider *writer, void *writer_data, GSList **messages );
static void icontext_iface_init( NAIContextInterface *iface, void *user_data );
static gboolean icontext_is_candidate( NAIContext *object, guint target, GList *selection );
static void icontext_iface_init( FMAIContextInterface *iface, void *user_data );
static gboolean icontext_is_candidate( FMAIContext *object, guint target, GList *selection );
static gboolean convert_pre_v3_parameters( NAObjectProfile *profile );
static gboolean convert_pre_v3_parameters_str( gchar *str );
......@@ -144,7 +144,7 @@ register_type( void )
type = g_type_register_static( NA_TYPE_OBJECT_ID, "NAObjectProfile", &info, 0 );
g_type_add_interface_static( type, NA_TYPE_ICONTEXT, &icontext_iface_info );
g_type_add_interface_static( type, FMA_TYPE_ICONTEXT, &icontext_iface_info );
g_type_add_interface_static( type, NA_TYPE_IFACTORY_OBJECT, &ifactory_object_iface_info );
......@@ -372,7 +372,7 @@ ifactory_object_write_done( NAIFactoryObject *instance, const NAIFactoryProvider
}
static void
icontext_iface_init( NAIContextInterface *iface, void *user_data )
icontext_iface_init( FMAIContextInterface *iface, void *user_data )
{
static const gchar *thisfn = "na_object_profile_icontext_iface_init";
......@@ -382,7 +382,7 @@ icontext_iface_init( NAIContextInterface *iface, void *user_data )
}
static gboolean
icontext_is_candidate( NAIContext *object, guint target, GList *selection )
icontext_is_candidate( FMAIContext *object, guint target, GList *selection )
{
return( TRUE );
}
......@@ -643,7 +643,7 @@ read_done_ending( NAObjectProfile *profile )
/* prepare the context after the reading
*/
na_icontext_read_done( NA_ICONTEXT( profile ));
fma_icontext_read_done( FMA_ICONTEXT( profile ));
/* last, set profile defaults
*/
......
......@@ -247,8 +247,8 @@ iduplicable_copy( NAIDuplicable *target, const NAIDuplicable *source, guint mode
na_factory_object_copy( NA_IFACTORY_OBJECT( target ), NA_IFACTORY_OBJECT( source ));
}
if( NA_IS_ICONTEXT( target )){
na_icontext_copy( NA_ICONTEXT( target ), NA_ICONTEXT( source ));
if( FMA_IS_ICONTEXT( target )){
fma_icontext_copy( FMA_ICONTEXT( target ), FMA_ICONTEXT( source ));
}
v_copy( dest, src, mode );
......@@ -277,8 +277,8 @@ iduplicable_are_equal( const NAIDuplicable *a, const NAIDuplicable *b )
are_equal &= na_factory_object_are_equal( NA_IFACTORY_OBJECT( a ), NA_IFACTORY_OBJECT( b ));
}
if( NA_IS_ICONTEXT( a )){
are_equal &= na_icontext_are_equal( NA_ICONTEXT( a ), NA_ICONTEXT( b ));
if( FMA_IS_ICONTEXT( a )){
are_equal &= fma_icontext_are_equal( FMA_ICONTEXT( a ), FMA_ICONTEXT( b ));
}
are_equal &= v_are_equal( NA_OBJECT( a ), NA_OBJECT( b ));
......@@ -306,8 +306,8 @@ iduplicable_is_valid( const NAIDuplicable *object )
is_valid &= na_factory_object_is_valid( NA_IFACTORY_OBJECT( object ));
}
if( NA_IS_ICONTEXT( object )){
is_valid &= na_icontext_is_valid( NA_ICONTEXT( object ));
if( FMA_IS_ICONTEXT( object )){
is_valid &= fma_icontext_is_valid( FMA_ICONTEXT( object ));
}
is_valid &= v_is_valid( NA_OBJECT( object ));
......
......@@ -75,7 +75,7 @@ static void interface_base_init( NactIActionTabInterface *klass );
static void interface_base_finalize( NactIActionTabInterface *klass );
static void initialize_gtk( NactIActionTab *instance );
static void initialize_window( NactIActionTab *instance );
static void on_main_item_updated( NactIActionTab *instance, NAIContext *context, guint data, void *empty );
static void on_main_item_updated( NactIActionTab *instance, FMAIContext *context, guint data, void *empty );
static void on_tree_selection_changed( NactTreeView *tview, GList *selected_items, NactIActionTab *instance );
static void on_target_selection_toggled( GtkToggleButton *button, NactIActionTab *instance );
static void on_target_location_toggled( GtkToggleButton *button, NactIActionTab *instance );
......@@ -313,7 +313,7 @@ nact_iaction_tab_has_label( NactIActionTab *instance )
}
static void
on_main_item_updated( NactIActionTab *instance, NAIContext *context, guint data, void *empty )
on_main_item_updated( NactIActionTab *instance, FMAIContext *context, guint data, void *empty )
{
GtkWidget *label_widget;
gchar *label;
......
......@@ -39,7 +39,7 @@
*
* Entry fields are enabled, as soon as an edited item has been set as a
* property of the main window, Fields are those of NAObjectItem (i.e.
* not NAObjectProfile, not NAIContext, but may be NAObjectAction specific).
* not NAObjectProfile, not FMAIContext, but may be NAObjectAction specific).
*/
#include <glib-object.h>
......
......@@ -237,7 +237,7 @@ initialize_window( NactIBasenamesTab *instance )
static void
on_tree_selection_changed( NactTreeView *tview, GList *selected_items, NactIBasenamesTab *instance )
{
NAIContext *context;
FMAIContext *context;
gboolean editable;
gboolean enable_tab;
GtkToggleButton *matchcase_button;
......@@ -265,7 +265,7 @@ on_tree_selection_changed( NactTreeView *tview, GList *selected_items, NactIBase
static void
on_matchcase_toggled( GtkToggleButton *button, NactIBasenamesTab *instance )
{
NAIContext *context;
FMAIContext *context;
gboolean editable;
gboolean matchcase;
IBasenamesData *data;
......
......@@ -61,8 +61,8 @@ static void initialize_gtk( NactICapabilitiesTab *instance );
static void initialize_window( NactICapabilitiesTab *instance );
static void on_tree_selection_changed( NactTreeView *tview, GList *selected_items, NactICapabilitiesTab *instance );
static void on_add_clicked( GtkButton *button, NactICapabilitiesTab *instance );
static GSList *get_capabilities( NAIContext *context );
static void set_capabilities( NAIContext *context, GSList *list );
static GSList *get_capabilities( FMAIContext *context );
static void set_capabilities( FMAIContext *context, GSList *list );
static void on_instance_finalized( gpointer user_data, NactICapabilitiesTab *instance );
GType
......@@ -206,7 +206,7 @@ initialize_window( NactICapabilitiesTab *instance )
static void
on_tree_selection_changed( NactTreeView *tview, GList *selected_items, NactICapabilitiesTab *instance )
{
NAIContext *context;
FMAIContext *context;
gboolean editable;
gboolean enable_tab;
......@@ -221,7 +221,7 @@ on_tree_selection_changed( NactTreeView *tview, GList *selected_items, NactICapa
static void
on_add_clicked( GtkButton *button, NactICapabilitiesTab *instance )
{
NAIContext *context;
FMAIContext *context;
GSList *capabilities;
gchar *new_cap;
......@@ -241,13 +241,13 @@ on_add_clicked( GtkButton *button, NactICapabilitiesTab *instance )
}
static GSList *
get_capabilities( NAIContext *context )
get_capabilities( FMAIContext *context )
{
return( na_object_get_capabilities( context ));
}
static void
set_capabilities( NAIContext *context, GSList *list )
set_capabilities( FMAIContext *context, GSList *list )
{
na_object_set_capabilities( context, list );
}
......
......@@ -77,7 +77,7 @@ static void interface_base_init( NactICommandTabInterface *klass );
static void interface_base_finalize( NactICommandTabInterface *klass );
static void initialize_gtk( NactICommandTab *instance );
static void initialize_window( NactICommandTab *instance );
static void on_main_item_updated( NactICommandTab *instance, NAIContext *context, guint data, void *empty );
static void on_main_item_updated( NactICommandTab *instance, FMAIContext *context, guint data, void *empty );
static void on_tree_selection_changed( NactTreeView *tview, GList *selected_items, NactICommandTab *instance );
static GtkWidget *get_label_entry( NactICommandTab *instance );
static GtkButton *get_legend_button( NactICommandTab *instance );
......@@ -289,7 +289,7 @@ initialize_window( NactICommandTab *instance )
}
static void
on_main_item_updated( NactICommandTab *instance, NAIContext *context, guint data, void *empty )
on_main_item_updated( NactICommandTab *instance, FMAIContext *context, guint data, void *empty )
{
GtkWidget *label_widget;
gchar *label;
......
......@@ -349,7 +349,7 @@ static void
on_tree_selection_changed( NactTreeView *tview, GList *selected_items, NactIEnvironmentTab *instance )
{
static const gchar *thisfn = "nact_ienvironment_tab_on_tree_selection_changed";
NAIContext *context;
FMAIContext *context;
gboolean editable;
gboolean enable_tab;
gchar *sel_count, *selcount_ope, *selcount_int;
......@@ -494,7 +494,7 @@ on_selcount_int_changed( GtkEntry *entry, NactIEnvironmentTab *instance )
static void
on_selection_count_changed( NactIEnvironmentTab *instance )
{
NAIContext *context;
FMAIContext *context;
gchar *selcount;
IEnvironData *data;
......@@ -529,7 +529,7 @@ static void
on_show_always_toggled( GtkToggleButton *toggle_button, NactIEnvironmentTab *instance )
{
static const gchar *thisfn = "nact_ienvironment_tab_on_show_always_toggled";
NAIContext *context;
FMAIContext *context;
gboolean editable;
gboolean active;
GtkTreeView *listview;
......@@ -570,7 +570,7 @@ static void
on_only_show_toggled( GtkToggleButton *toggle_button, NactIEnvironmentTab *instance )
{
static const gchar *thisfn = "nact_ienvironment_tab_on_only_show_toggled";
NAIContext *context;
FMAIContext *context;
gboolean editable;
gboolean active;
GSList *show;
......@@ -611,7 +611,7 @@ static void
on_do_not_show_toggled( GtkToggleButton *toggle_button, NactIEnvironmentTab *instance )
{
static const gchar *thisfn = "nact_ienvironment_tab_on_do_not_show_toggled";
NAIContext *context;
FMAIContext *context;
gboolean editable;
gboolean active;
GSList *show;
......@@ -652,7 +652,7 @@ static void
on_desktop_toggled( GtkCellRendererToggle *renderer, gchar *path, NactIEnvironmentTab *instance )
{
static const gchar *thisfn = "nact_ienvironment_tab_on_desktop_toggled";
NAIContext *context;
FMAIContext *context;
gboolean editable;
GtkTreeView *listview;
GtkTreeModel *model;
......@@ -706,7 +706,7 @@ on_desktop_toggled( GtkCellRendererToggle *renderer, gchar *path, NactIEnvironme
static void
on_try_exec_changed( GtkEntry *entry, NactIEnvironmentTab *instance )
{
NAIContext *context;
FMAIContext *context;
const gchar *text;
g_object_get( G_OBJECT( instance ), MAIN_PROP_CONTEXT, &context, NULL );
......@@ -734,7 +734,7 @@ on_try_exec_browse( GtkButton *button, NactIEnvironmentTab *instance )
static void
on_show_if_registered_changed( GtkEntry *entry, NactIEnvironmentTab *instance )
{
NAIContext *context;
FMAIContext *context;
const gchar *text;
g_object_get( G_OBJECT( instance ), MAIN_PROP_CONTEXT, &context, NULL );
......@@ -749,7 +749,7 @@ on_show_if_registered_changed( GtkEntry *entry, NactIEnvironmentTab *instance )
static void
on_show_if_true_changed( GtkEntry *entry, NactIEnvironmentTab *instance )
{
NAIContext *context;
FMAIContext *context;
const gchar *text;
g_object_get( G_OBJECT( instance ), MAIN_PROP_CONTEXT, &context, NULL );
......@@ -764,7 +764,7 @@ on_show_if_true_changed( GtkEntry *entry, NactIEnvironmentTab *instance )
static void
on_show_if_running_changed( GtkEntry *entry, NactIEnvironmentTab *instance )
{
NAIContext *context;
FMAIContext *context;
const gchar *text;
g_object_get( G_OBJECT( instance ), MAIN_PROP_CONTEXT, &context, NULL );
......
......@@ -214,7 +214,7 @@ initialize_window( NactIFoldersTab *instance )
static void
on_tree_selection_changed( NactTreeView *tview, GList *selected_items, NactIFoldersTab *instance )
{
NAIContext *context;
FMAIContext *context;
gboolean editable;
gboolean enable_tab;
GtkWidget *button;
......
......@@ -218,7 +218,7 @@ initialize_window( NactIMimetypesTab *instance )
static void
on_tree_selection_changed( NactTreeView *tview, GList *selected_items, NactIMimetypesTab *instance )
{
NAIContext *context;
FMAIContext *context;
gboolean editable;
gboolean enable_tab;
......
......@@ -70,7 +70,7 @@ static void interface_base_init( NactIPropertiesTabInterface *klass
static void interface_base_finalize( NactIPropertiesTabInterface *klass );
static void initialize_window( NactIPropertiesTab *instance );
static void on_tree_selection_changed( NactTreeView *tview, GList *selected_items, NactIPropertiesTab *instance );
static void on_main_item_updated( NactIPropertiesTab *instance, NAIContext *context, guint data, void *empty );
static void on_main_item_updated( NactIPropertiesTab *instance, FMAIContext *context, guint data, void *empty );
static GtkButton *get_enabled_button( NactIPropertiesTab *instance );
static void on_enabled_toggled( GtkToggleButton *button, NactIPropertiesTab *instance );
static void on_readonly_toggled( GtkToggleButton *button, NactIPropertiesTab *instance );
......@@ -313,7 +313,7 @@ on_tree_selection_changed( NactTreeView *tview, GList *selected_items, NactIProp
}
static void
on_main_item_updated( NactIPropertiesTab *instance, NAIContext *context, guint data, void *empty )
on_main_item_updated( NactIPropertiesTab *instance, FMAIContext *context, guint data, void *empty )
{
static const gchar *thisfn = "nact_iproperties_tab_on_main_item_updated";
......
......@@ -213,7 +213,7 @@ initialize_window( NactISchemesTab *instance )
static void
on_tree_selection_changed( NactTreeView *tview, GList *selected_items, NactISchemesTab *instance )
{
NAIContext *context;
FMAIContext *context;
gboolean editable;
gboolean enable_tab;
GtkWidget *button;
......@@ -234,7 +234,7 @@ on_add_from_defaults( GtkButton *button, NactISchemesTab *instance )
{
GSList *schemes;
gchar *new_scheme;
NAIContext *context;
FMAIContext *context;
g_object_get( G_OBJECT( instance ), MAIN_PROP_CONTEXT, &context, NULL );
g_return_if_fail( context );
......
......@@ -30,7 +30,7 @@
#ifndef __NACT_MAIN_TAB_H__
#define __NACT_MAIN_TAB_H__
#include <api/na-icontext.h>
#include <api/fma-icontext.h>
#include "nact-main-window-def.h"
......
......@@ -104,10 +104,10 @@ struct _NactMainWindowPrivate {
/**
* Current context.
*
* This is the #NAIContext data which corresponds to @current_profile
* This is the #FMAIContext data which corresponds to @current_profile
* or @current_item, depending of which one is actually selected.
*/
NAIContext *current_context;
FMAIContext *current_context;
/**
* Some convenience objects and data.
......@@ -176,7 +176,7 @@ static void setup_monitor_pivot( NactMainWindow *main_window );
static void on_block_items_changed_timeout( NactMainWindow *window );
static void on_tree_view_modified_status_changed( NactTreeView *treeview, gboolean is_modified, NactMainWindow *window );
static void on_tree_view_selection_changed( NactTreeView *treeview, GList *selected_items, NactMainWindow *window );
static void on_tab_item_updated( NactMainWindow *window, NAIContext *context, guint data, void *empty );
static void on_tab_item_updated( NactMainWindow *window, FMAIContext *context, guint data, void *empty );
static void raz_selection_properties( NactMainWindow *window );
static void setup_current_selection( NactMainWindow *window, NAObjectId *selected_row );
static void setup_dialog_title( NactMainWindow *window );
......@@ -342,8 +342,8 @@ class_init( NactMainWindowClass *klass )
g_object_class_install_property( object_class, MAIN_PROP_CONTEXT_ID,
g_param_spec_pointer(
MAIN_PROP_CONTEXT,
_( "Current NAIContext" ),
_( "A pointer to the currently edited NAIContext" ),
_( "Current FMAIContext" ),
_( "A pointer to the currently edited FMAIContext" ),
G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE ));
g_object_class_install_property( object_class, MAIN_PROP_EDITABLE_ID,
......@@ -373,7 +373,7 @@ class_init( NactMainWindowClass *klass )
*
* Handler:
* void handler( NactMainWindow *main_window,
* NAIContext *updated_context,
* FMAIContext *updated_context,
* guint updated_data,
* void *user_data );
*/
......@@ -1004,7 +1004,7 @@ on_tree_view_selection_changed( NactTreeView *treeview, GList *selected_items, N
}
static void
on_tab_item_updated( NactMainWindow *window, NAIContext *context, guint data, void *empty )
on_tab_item_updated( NactMainWindow *window, FMAIContext *context, guint data, void *empty )
{
static const gchar *thisfn = "nact_main_window_on_tab_item_updated";
......@@ -1045,13 +1045,13 @@ setup_current_selection( NactMainWindow *window, NAObjectId *selected_row )
if( NA_IS_OBJECT_PROFILE( selected_row )){
window->private->current_profile = NA_OBJECT_PROFILE( selected_row );
window->private->current_context = NA_ICONTEXT( selected_row );
window->private->current_context = FMA_ICONTEXT( selected_row );
window->private->current_item = NA_OBJECT_ITEM( na_object_get_parent( selected_row ));
} else {
g_return_if_fail( NA_IS_OBJECT_ITEM( selected_row ));
window->private->current_item = NA_OBJECT_ITEM( selected_row );
window->private->current_context = NA_ICONTEXT( selected_row );
window->private->current_context = FMA_ICONTEXT( selected_row );
if( NA_IS_OBJECT_ACTION( selected_row )){
nb_profiles = na_object_get_items_count( selected_row );
......@@ -1059,7 +1059,7 @@ setup_current_selection( NactMainWindow *window, NAObjectId *selected_row )
if( nb_profiles == 1 ){
profiles = na_object_get_items( selected_row );
window->private->current_profile = NA_OBJECT_PROFILE( profiles->data );
window->private->current_context = NA_ICONTEXT( profiles->data );
window->private->current_context = FMA_ICONTEXT( profiles->data );
}
}
}
......
......@@ -327,7 +327,7 @@ static void
on_tree_selection_changed( NactTreeView *treeview, GList *selected_items, MatchListData *data )
{
static const gchar *thisfn = "nact_match_list_on_tree_selection_changed";
NAIContext *context;
FMAIContext *context;
gboolean enable_tab;
GSList *filters;
GtkTreeModel *model;
......@@ -447,7 +447,7 @@ on_filter_edited( GtkCellRendererText *renderer, const gchar *path_str, const gc
GtkTreeIter iter;
GtkTreePath *path;
gchar *old_text;
NAIContext *context;
FMAIContext *context;
gboolean must_match, must_not_match;
gchar *to_add, *to_remove;