Commit 89b0c709 authored by Pierre Wieser's avatar Pierre Wieser

NactTreeIEditable interface is renamed to FMATreeIEditable

parent 101a0e38
......@@ -132,8 +132,8 @@ fma_config_tool_SOURCES = \
fma-sort-buttons.h \
fma-statusbar.c \
fma-statusbar.h \
nact-tree-ieditable.c \
nact-tree-ieditable.h \
fma-tree-ieditable.c \
fma-tree-ieditable.h \
nact-tree-model.c \
nact-tree-model.h \
nact-tree-model-priv.h \
......
......@@ -47,7 +47,7 @@
#include "fma-application.h"
#include "fma-assistant-import.h"
#include "fma-main-window.h"
#include "nact-tree-ieditable.h"
#include "fma-tree-ieditable.h"
/* Import Assistant
*
......@@ -698,7 +698,7 @@ assistant_apply( BaseAssistant *wnd, GtkAssistant *assistant )
if( insertable_items ){
insertable_items = g_list_reverse( insertable_items );
items_view = fma_main_window_get_items_view( FMA_MAIN_WINDOW( main_window ));
nact_tree_ieditable_insert_items( NACT_TREE_IEDITABLE( items_view ), insertable_items, NULL );
fma_tree_ieditable_insert_items( FMA_TREE_IEDITABLE( items_view ), insertable_items, NULL );
fma_object_free_items( insertable_items );
}
......@@ -707,7 +707,7 @@ assistant_apply( BaseAssistant *wnd, GtkAssistant *assistant )
*/
if( overriden_items ){
items_view = fma_main_window_get_items_view( FMA_MAIN_WINDOW( main_window ));
nact_tree_ieditable_set_items( NACT_TREE_IEDITABLE( items_view ), overriden_items );
fma_tree_ieditable_set_items( FMA_TREE_IEDITABLE( items_view ), overriden_items );
window->private->overriden = overriden_items;
}
}
......
......@@ -43,7 +43,7 @@
#include "fma-main-window.h"
#include "fma-menu.h"
#include "fma-menu-edit.h"
#include "nact-tree-ieditable.h"
#include "fma-tree-ieditable.h"
#include "nact-tree-view.h"
static GList *prepare_for_paste( FMAMainWindow *window, sMenuData *sdata );
......@@ -232,7 +232,7 @@ fma_menu_edit_cut( FMAMainWindow *main_window )
fma_clipboard_primary_set( clipboard, to_delete, CLIPBOARD_MODE_CUT );
update_clipboard_counters( main_window, sdata );
view = fma_main_window_get_items_view( main_window );
nact_tree_ieditable_delete( NACT_TREE_IEDITABLE( view ), to_delete, TREE_OPE_DELETE );
fma_tree_ieditable_delete( FMA_TREE_IEDITABLE( view ), to_delete, TREE_OPE_DELETE );
}
fma_object_free_items( items );
......@@ -299,7 +299,7 @@ fma_menu_edit_paste( FMAMainWindow *main_window )
if( items ){
view = fma_main_window_get_items_view( main_window );
nact_tree_ieditable_insert_items( NACT_TREE_IEDITABLE( view ), items, NULL );
fma_tree_ieditable_insert_items( FMA_TREE_IEDITABLE( view ), items, NULL );
fma_object_free_items( items );
}
}
......@@ -335,7 +335,7 @@ fma_menu_edit_paste_into( FMAMainWindow *main_window )
if( items ){
view = fma_main_window_get_items_view( main_window );
nact_tree_ieditable_insert_into( NACT_TREE_IEDITABLE( view ), items );
fma_tree_ieditable_insert_into( FMA_TREE_IEDITABLE( view ), items );
fma_object_free_items( items );
}
}
......@@ -422,7 +422,7 @@ fma_menu_edit_duplicate( FMAMainWindow *main_window )
fma_object_check_status( obj );
dup = g_list_prepend( NULL, obj );
view = fma_main_window_get_items_view( FMA_MAIN_WINDOW( main_window ));
nact_tree_ieditable_insert_items( NACT_TREE_IEDITABLE( view ), dup, it->data );
fma_tree_ieditable_insert_items( FMA_TREE_IEDITABLE( view ), dup, it->data );
fma_object_free_items( dup );
}
......@@ -475,7 +475,7 @@ fma_menu_edit_delete( FMAMainWindow *main_window )
if( to_delete ){
view = fma_main_window_get_items_view( main_window );
nact_tree_ieditable_delete( NACT_TREE_IEDITABLE( view ), to_delete, TREE_OPE_DELETE );
fma_tree_ieditable_delete( FMA_TREE_IEDITABLE( view ), to_delete, TREE_OPE_DELETE );
}
fma_object_free_items( items );
......
......@@ -46,7 +46,7 @@
#include "fma-main-window.h"
#include "fma-menu.h"
#include "fma-menu-file.h"
#include "nact-tree-ieditable.h"
#include "fma-tree-ieditable.h"
static FMATimeout st_autosave_prefs_timeout = { 0 };
static guint st_event_autosave = 0;
......@@ -135,7 +135,7 @@ fma_menu_file_new_menu( FMAMainWindow *main_window )
fma_updater_check_item_writability_status( sdata->updater, FMA_OBJECT_ITEM( menu ));
items = g_list_prepend( NULL, menu );
items_view = fma_main_window_get_items_view( main_window );
nact_tree_ieditable_insert_items( NACT_TREE_IEDITABLE( items_view ), items, NULL );
fma_tree_ieditable_insert_items( FMA_TREE_IEDITABLE( items_view ), items, NULL );
fma_object_free_items( items );
}
......@@ -159,7 +159,7 @@ fma_menu_file_new_action( FMAMainWindow *main_window )
fma_updater_check_item_writability_status( sdata->updater, FMA_OBJECT_ITEM( action ));
items = g_list_prepend( NULL, action );
items_view = fma_main_window_get_items_view( main_window );
nact_tree_ieditable_insert_items( NACT_TREE_IEDITABLE( items_view ), items, NULL );
fma_tree_ieditable_insert_items( FMA_TREE_IEDITABLE( items_view ), items, NULL );
fma_object_free_items( items );
}
......@@ -192,7 +192,7 @@ fma_menu_file_new_profile( FMAMainWindow *main_window )
items = g_list_prepend( NULL, profile );
items_view = fma_main_window_get_items_view( main_window );
nact_tree_ieditable_insert_items( NACT_TREE_IEDITABLE( items_view ), items, NULL );
fma_tree_ieditable_insert_items( FMA_TREE_IEDITABLE( items_view ), items, NULL );
fma_object_free_items( items );
}
......@@ -249,7 +249,7 @@ fma_menu_file_save_items( FMAMainWindow *window )
fma_object_dump_tree( items );
messages = NULL;
if( nact_tree_ieditable_is_level_zero_modified( NACT_TREE_IEDITABLE( items_view ))){
if( fma_tree_ieditable_is_level_zero_modified( FMA_TREE_IEDITABLE( items_view ))){
if( !fma_iprefs_write_level_zero( items, &messages )){
if( g_slist_length( messages )){
msg = fma_core_utils_slist_join_at_end( messages, "\n" );
......@@ -270,7 +270,7 @@ fma_menu_file_save_items( FMAMainWindow *window )
* so that new actions with same id do not risk to be deleted later
* not deleted items are reinserted in the tree
*/
if( !nact_tree_ieditable_remove_deleted( NACT_TREE_IEDITABLE( items_view ), &messages )){
if( !fma_tree_ieditable_remove_deleted( FMA_TREE_IEDITABLE( items_view ), &messages )){
if( g_slist_length( messages )){
msg = fma_core_utils_slist_join_at_end( messages, "\n" );
} else {
......
......@@ -32,15 +32,15 @@
/**
* SECTION: nact-tree_ieditable
* @title: NactTreeIEditable
* @short_description: The NactTreeIEditable interface definition
* @include: nact-tree_ieditable.h
* @title: FMATreeIEditable
* @short_description: The FMATreeIEditable interface definition
* @include: ui/fma-tree-ieditable.h
*
* This interface is to be implemented by a NactTreeView which would
* want get edition features, such as inline edition, insert, delete,
* and so on.
*
* NactTreeIEditable maintains the count of modified items.
* FMATreeIEditable maintains the count of modified items.
* Starting with zero when the tree view is filled up, it is incremented
* each time an item is modified, inserted or deleted.
* The modified count is fully recomputed after a save.
......@@ -52,20 +52,20 @@
G_BEGIN_DECLS
#define NACT_TREE_IEDITABLE_TYPE ( nact_tree_ieditable_get_type())
#define NACT_TREE_IEDITABLE( object ) ( G_TYPE_CHECK_INSTANCE_CAST( object, NACT_TREE_IEDITABLE_TYPE, NactTreeIEditable ))
#define NACT_IS_TREE_IEDITABLE( object ) ( G_TYPE_CHECK_INSTANCE_TYPE( object, NACT_TREE_IEDITABLE_TYPE ))
#define NACT_TREE_IEDITABLE_GET_INTERFACE( instance ) ( G_TYPE_INSTANCE_GET_INTERFACE(( instance ), NACT_TREE_IEDITABLE_TYPE, NactTreeIEditableInterface ))
#define FMA_TREE_IEDITABLE_TYPE ( fma_tree_ieditable_get_type())
#define FMA_TREE_IEDITABLE( object ) ( G_TYPE_CHECK_INSTANCE_CAST( object, FMA_TREE_IEDITABLE_TYPE, FMATreeIEditable ))
#define FMA_IS_TREE_IEDITABLE( object ) ( G_TYPE_CHECK_INSTANCE_TYPE( object, FMA_TREE_IEDITABLE_TYPE ))
#define FMA_TREE_IEDITABLE_GET_INTERFACE( instance ) ( G_TYPE_INSTANCE_GET_INTERFACE(( instance ), FMA_TREE_IEDITABLE_TYPE, FMATreeIEditableInterface ))
typedef struct _NactTreeIEditable NactTreeIEditable;
typedef struct _NactTreeIEditableInterfacePrivate NactTreeIEditableInterfacePrivate;
typedef struct _FMATreeIEditable FMATreeIEditable;
typedef struct _FMATreeIEditableInterfacePrivate FMATreeIEditableInterfacePrivate;
typedef struct {
/*< private >*/
GTypeInterface parent;
NactTreeIEditableInterfacePrivate *private;
GTypeInterface parent;
FMATreeIEditableInterfacePrivate *private;
}
NactTreeIEditableInterface;
FMATreeIEditableInterface;
/**
* Delete operations
......@@ -76,40 +76,40 @@ typedef enum {
}
TreeIEditableDeleteOpe;
GType nact_tree_ieditable_get_type ( void );
GType fma_tree_ieditable_get_type ( void );
void nact_tree_ieditable_initialize ( NactTreeIEditable *instance,
void fma_tree_ieditable_initialize ( FMATreeIEditable *instance,
GtkTreeView *treeview,
FMAMainWindow *main_window );
void nact_tree_ieditable_terminate ( NactTreeIEditable *instance );
void fma_tree_ieditable_terminate ( FMATreeIEditable *instance );
void nact_tree_ieditable_delete ( NactTreeIEditable *instance,
void fma_tree_ieditable_delete ( FMATreeIEditable *instance,
GList *items,
TreeIEditableDeleteOpe ope );
gboolean nact_tree_ieditable_remove_deleted ( NactTreeIEditable *instance,
gboolean fma_tree_ieditable_remove_deleted ( FMATreeIEditable *instance,
GSList **messages );
GList *nact_tree_ieditable_get_deleted ( NactTreeIEditable *instance );
GList *fma_tree_ieditable_get_deleted ( FMATreeIEditable *instance );
void nact_tree_ieditable_insert_items ( NactTreeIEditable *instance,
void fma_tree_ieditable_insert_items ( FMATreeIEditable *instance,
GList *items,
FMAObject *sibling );
void nact_tree_ieditable_insert_at_path ( NactTreeIEditable *instance,
void fma_tree_ieditable_insert_at_path ( FMATreeIEditable *instance,
GList *items,
GtkTreePath *path );
void nact_tree_ieditable_insert_into ( NactTreeIEditable *instance,
void fma_tree_ieditable_insert_into ( FMATreeIEditable *instance,
GList *items );
void nact_tree_ieditable_set_items ( NactTreeIEditable *instance,
void fma_tree_ieditable_set_items ( FMATreeIEditable *instance,
GList *items );
void nact_tree_ieditable_dump_modified ( const NactTreeIEditable *instance );
void fma_tree_ieditable_dump_modified ( const FMATreeIEditable *instance );
gboolean nact_tree_ieditable_is_level_zero_modified( const NactTreeIEditable *instance );
gboolean fma_tree_ieditable_is_level_zero_modified( const FMATreeIEditable *instance );
G_END_DECLS
......
......@@ -47,7 +47,7 @@
#include "fma-main-window.h"
#include "nact-tree-model.h"
#include "nact-tree-model-priv.h"
#include "nact-tree-ieditable.h"
#include "fma-tree-ieditable.h"
/*
* call once egg_tree_multi_drag_add_drag_support( treeview ) at init time (before gtk_main)
......@@ -621,7 +621,7 @@ drop_inside( NactTreeModel *model, GtkTreePath *dest, GtkSelectionData *selecti
} else {
inserted = fma_object_ref( current );
deletable = g_list_prepend( NULL, inserted );
nact_tree_ieditable_delete( NACT_TREE_IEDITABLE( items_view ), deletable, TREE_OPE_MOVE );
fma_tree_ieditable_delete( FMA_TREE_IEDITABLE( items_view ), deletable, TREE_OPE_MOVE );
g_list_free( deletable );
relabel = FALSE;
}
......@@ -635,7 +635,7 @@ drop_inside( NactTreeModel *model, GtkTreePath *dest, GtkSelectionData *selecti
}
object_list = g_list_reverse( object_list );
nact_tree_ieditable_insert_at_path( NACT_TREE_IEDITABLE( items_view ), object_list, new_dest );
fma_tree_ieditable_insert_at_path( FMA_TREE_IEDITABLE( items_view ), object_list, new_dest );
fma_object_free_items( object_list );
gtk_tree_path_free( new_dest );
......@@ -964,7 +964,7 @@ drop_uri_list( NactTreeModel *model, GtkTreePath *dest, GtkSelectionData *selec
if( imported ){
fma_object_dump_tree( imported );
view = fma_main_window_get_items_view( main_window );
nact_tree_ieditable_insert_at_path( NACT_TREE_IEDITABLE( view ), imported, dest );
fma_tree_ieditable_insert_at_path( FMA_TREE_IEDITABLE( view ), imported, dest );
}
/* override items if needed
......@@ -973,7 +973,7 @@ drop_uri_list( NactTreeModel *model, GtkTreePath *dest, GtkSelectionData *selec
if( overriden ){
fma_object_dump_tree( overriden );
view = fma_main_window_get_items_view( main_window );
nact_tree_ieditable_set_items( NACT_TREE_IEDITABLE( view ), overriden );
fma_tree_ieditable_set_items( FMA_TREE_IEDITABLE( view ), overriden );
fma_object_free_items( overriden );
}
......
......@@ -42,7 +42,7 @@
#include "fma-main-window.h"
#include "nact-tree-view.h"
#include "nact-tree-model.h"
#include "nact-tree-ieditable.h"
#include "fma-tree-ieditable.h"
/* private instance data
*/
......@@ -96,7 +96,7 @@ static GObjectClass *st_parent_class = NULL;
static GType register_type( void );
static void class_init( NactTreeViewClass *klass );
static void tree_ieditable_iface_init( NactTreeIEditableInterface *iface, void *user_data );
static void tree_ieditable_iface_init( FMATreeIEditableInterface *iface, void *user_data );
static void instance_init( GTypeInstance *instance, gpointer klass );
static void instance_dispose( GObject *application );
static void instance_finalize( GObject *application );
......@@ -135,7 +135,7 @@ nact_tree_view_get_type( void )
if( !type ){
type = register_type();
g_type_add_interface_static( type, NACT_TREE_IEDITABLE_TYPE, &tree_ieditable_iface_info );
g_type_add_interface_static( type, FMA_TREE_IEDITABLE_TYPE, &tree_ieditable_iface_info );
}
return( type );
......@@ -295,7 +295,7 @@ class_init( NactTreeViewClass *klass )
* the count of modified FMAObjectItems has changed, when an item is
* deleted, or when the level zero is changed.
*
* The signal is actually emitted by the NactTreeIEditable interface
* The signal is actually emitted by the FMATreeIEditable interface
* which takes care of all edition features.
*
* Signal args:
......@@ -375,7 +375,7 @@ class_init( NactTreeViewClass *klass )
}
static void
tree_ieditable_iface_init( NactTreeIEditableInterface *iface, void *user_data )
tree_ieditable_iface_init( FMATreeIEditableInterface *iface, void *user_data )
{
static const gchar *thisfn = "fma_main_window_tree_ieditable_iface_init";
......@@ -416,7 +416,7 @@ instance_dispose( GObject *object )
self->private->dispose_has_run = TRUE;
if( self->private->mode == TREE_MODE_EDITION ){
nact_tree_ieditable_terminate( NACT_TREE_IEDITABLE( self ));
fma_tree_ieditable_terminate( FMA_TREE_IEDITABLE( self ));
}
/* chain up to the parent class */
......@@ -588,8 +588,8 @@ nact_tree_view_set_edition_mode( NactTreeView *view, guint mode )
gtk_tree_view_column_set_cell_data_func(
column, renderer, ( GtkTreeCellDataFunc ) display_label, view, NULL );
nact_tree_ieditable_initialize(
NACT_TREE_IEDITABLE( view ), priv->tree_view, priv->window );
fma_tree_ieditable_initialize(
FMA_TREE_IEDITABLE( view ), priv->tree_view, priv->window );
}
tmodel = gtk_tree_view_get_model( priv->tree_view );
......@@ -898,7 +898,7 @@ nact_tree_view_get_items_ex( const NactTreeView *view, guint mode )
if( view->private->mode == TREE_MODE_EDITION ){
if( mode & TREE_LIST_DELETED ){
deleted = nact_tree_ieditable_get_deleted( NACT_TREE_IEDITABLE( view ));
deleted = fma_tree_ieditable_get_deleted( FMA_TREE_IEDITABLE( view ));
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment