[nautilus-actions/file-manager-actions] NactTreeModel class is renamed to FMATreeModel
- From: Pierre Wieser <pwieser src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus-actions/file-manager-actions] NactTreeModel class is renamed to FMATreeModel
- Date: Tue, 8 Sep 2015 19:01:28 +0000 (UTC)
commit b49c0ab87ba914984e8e50c1523a59607d43fb78
Author: Pierre Wieser <pwieser trychlos org>
Date: Tue Sep 8 20:40:52 2015 +0200
NactTreeModel class is renamed to FMATreeModel
src/ui/Makefile.am | 8 +-
src/ui/fma-clipboard.c | 2 +-
src/ui/fma-match-list.c | 2 +-
src/ui/fma-tree-ieditable.c | 24 +-
...{nact-tree-model-dnd.c => fma-tree-model-dnd.c} | 178 ++++++------
...act-tree-model-priv.h => fma-tree-model-priv.h} | 38 ++--
src/ui/{nact-tree-model.c => fma-tree-model.c} | 306 ++++++++++----------
src/ui/{nact-tree-model.h => fma-tree-model.h} | 60 ++--
src/ui/nact-tree-view.c | 32 +-
9 files changed, 325 insertions(+), 325 deletions(-)
---
diff --git a/src/ui/Makefile.am b/src/ui/Makefile.am
index a2c2baa..63e7f23 100644
--- a/src/ui/Makefile.am
+++ b/src/ui/Makefile.am
@@ -134,10 +134,10 @@ fma_config_tool_SOURCES = \
fma-status-bar.h \
fma-tree-ieditable.c \
fma-tree-ieditable.h \
- nact-tree-model.c \
- nact-tree-model.h \
- nact-tree-model-priv.h \
- nact-tree-model-dnd.c \
+ fma-tree-model.c \
+ fma-tree-model.h \
+ fma-tree-model-priv.h \
+ fma-tree-model-dnd.c \
nact-tree-view.c \
nact-tree-view.h \
$(BUILT_SOURCES) \
diff --git a/src/ui/fma-clipboard.c b/src/ui/fma-clipboard.c
index 9a882bd..4a0c12b 100644
--- a/src/ui/fma-clipboard.c
+++ b/src/ui/fma-clipboard.c
@@ -42,7 +42,7 @@
#include "fma-application.h"
#include "fma-export-ask.h"
#include "fma-main-window.h"
-#include "nact-tree-model.h"
+#include "fma-tree-model.h"
#include "fma-clipboard.h"
/* private class data
diff --git a/src/ui/fma-match-list.c b/src/ui/fma-match-list.c
index d79b43e..58761d9 100644
--- a/src/ui/fma-match-list.c
+++ b/src/ui/fma-match-list.c
@@ -1008,7 +1008,7 @@ on_instance_finalized( MatchListData *data, BaseWindow *window )
g_object_set_data( G_OBJECT( window ), data->tab_name, NULL );
/* This function is called when the FMAMainWindow is about to be finalized.
- * At this time, the NactTreeModel has already been finalized.
+ * At this time, the FMATreeModel has already been finalized.
* It is so too late to try to clear it...
*/
#if 0
diff --git a/src/ui/fma-tree-ieditable.c b/src/ui/fma-tree-ieditable.c
index b2e97b0..1dadfa9 100644
--- a/src/ui/fma-tree-ieditable.c
+++ b/src/ui/fma-tree-ieditable.c
@@ -41,7 +41,7 @@
#include "fma-application.h"
#include "fma-main-window.h"
#include "fma-tree-ieditable.h"
-#include "nact-tree-model.h"
+#include "fma-tree-model.h"
#include "nact-tree-view.h"
/* private interface data
@@ -56,7 +56,7 @@ typedef struct {
FMAUpdater *updater;
FMAMainWindow *main_window;
GtkTreeView *treeview;
- NactTreeModel *model;
+ FMATreeModel *model;
gulong modified_handler_id;
gulong valid_handler_id;
guint count_modified;
@@ -188,7 +188,7 @@ fma_tree_ieditable_initialize( FMATreeIEditable *instance, GtkTreeView *treeview
ied = get_instance_data( instance );
ied->main_window = main_window;
ied->treeview = treeview;
- ied->model = NACT_TREE_MODEL( gtk_tree_view_get_model( treeview ));
+ ied->model = FMA_TREE_MODEL( gtk_tree_view_get_model( treeview ));
application = gtk_window_get_application( GTK_WINDOW( main_window ));
g_return_if_fail( application && FMA_IS_APPLICATION( application ));
@@ -286,7 +286,7 @@ on_label_edited( GtkCellRendererText *renderer, const gchar *path_str, const gch
if( nact_tree_view_are_notify_allowed( items_view )){
ied = ( IEditableData * ) g_object_get_data( G_OBJECT( items_view ), VIEW_DATA_IEDITABLE );
path = gtk_tree_path_new_from_string( path_str );
- object = nact_tree_model_object_at_path( ied->model, path );
+ object = fma_tree_model_object_at_path( ied->model, path );
fma_object_set_label( object, text );
g_signal_emit_by_name( ied->main_window, MAIN_SIGNAL_ITEM_UPDATED, object );
@@ -453,7 +453,7 @@ fma_tree_ieditable_delete( FMATreeIEditable *instance, GList *items, TreeIEditab
* so potentially update the modification status
*/
parent = fma_object_get_parent( it->data );
- path = nact_tree_model_delete( ied->model, FMA_OBJECT( it->data ));
+ path = fma_tree_model_delete( ied->model, FMA_OBJECT( it->data ));
if( parent ){
fma_object_check_status( parent );
} else {
@@ -666,11 +666,11 @@ fma_tree_ieditable_insert_items( FMATreeIEditable *instance, GList *items, FMAOb
ied = get_instance_data( instance );
if( sibling ){
- insert_path = nact_tree_model_object_to_path( ied->model, sibling );
+ insert_path = fma_tree_model_object_to_path( ied->model, sibling );
} else {
insert_path = get_selection_first_path( ied->treeview );
- object = nact_tree_model_object_at_path( ied->model, insert_path );
+ object = fma_tree_model_object_at_path( ied->model, insert_path );
g_debug( "%s: current object at insertion path is %p", thisfn, ( void * ) object );
/* as a particular case, insert a new profile _into_ current action
@@ -686,7 +686,7 @@ fma_tree_ieditable_insert_items( FMATreeIEditable *instance, GList *items, FMAOb
if( FMA_IS_OBJECT_PROFILE( object ) && FMA_IS_OBJECT_ITEM( items->data )){
parent = ( FMAObject * ) fma_object_get_parent( object );
gtk_tree_path_free( insert_path );
- insert_path = nact_tree_model_object_to_path( ied->model, parent );
+ insert_path = fma_tree_model_object_to_path( ied->model, parent );
}
}
@@ -828,7 +828,7 @@ do_insert_before( IEditableData *ied, GList *items, GtkTreePath *asked_path )
} else {
path = gtk_tree_path_copy( asked_path );
}
- actual_path = nact_tree_model_insert_before( ied->model, FMA_OBJECT( it->data ), path );
+ actual_path = fma_tree_model_insert_before( ied->model, FMA_OBJECT( it->data ), path );
gtk_tree_path_free( path );
g_debug( "%s: object=%p (%s, ref_count=%d)", thisfn,
( void * ) it->data, G_OBJECT_TYPE_NAME( it->data ), G_OBJECT( it->data
)->ref_count );
@@ -873,7 +873,7 @@ do_insert_into( IEditableData *ied, GList *items, GtkTreePath *asked_path )
/* insert the last child into the wished path
* and recursively all its children
*/
- actual_path = nact_tree_model_insert_into( ied->model, FMA_OBJECT( last->data ), asked_path );
+ actual_path = fma_tree_model_insert_into( ied->model, FMA_OBJECT( last->data ), asked_path );
gtk_tree_view_expand_to_path( ied->treeview, actual_path );
if( FMA_IS_OBJECT_ITEM( last->data )){
@@ -973,8 +973,8 @@ fma_tree_ieditable_set_items( FMATreeIEditable *instance, GList *items )
* only children of the old item are its own profiles, which are to be
* replaced with the profiles provided by the new item
*/
- path = nact_tree_model_delete( ied->model, FMA_OBJECT( old_item ));
- insert_path = nact_tree_model_insert_before( ied->model, FMA_OBJECT( new_item ), path
);
+ path = fma_tree_model_delete( ied->model, FMA_OBJECT( old_item ));
+ insert_path = fma_tree_model_insert_before( ied->model, FMA_OBJECT( new_item ), path
);
gtk_tree_path_free( path );
gtk_tree_path_free( insert_path );
diff --git a/src/ui/nact-tree-model-dnd.c b/src/ui/fma-tree-model-dnd.c
similarity index 84%
rename from src/ui/nact-tree-model-dnd.c
rename to src/ui/fma-tree-model-dnd.c
index 953943a..8ce985b 100644
--- a/src/ui/nact-tree-model-dnd.c
+++ b/src/ui/fma-tree-model-dnd.c
@@ -45,8 +45,8 @@
#include "fma-clipboard.h"
#include "fma-status-bar.h"
#include "fma-main-window.h"
-#include "nact-tree-model.h"
-#include "nact-tree-model-priv.h"
+#include "fma-tree-model.h"
+#include "fma-tree-model-priv.h"
#include "fma-tree-ieditable.h"
/*
@@ -59,25 +59,25 @@
*
* as soon as mouse has quitted the selected area
* call once egg_tree_multi_dnd_stop_drag_check( treeview )
- * call once nact_tree_model_dnd_imulti_drag_source_row_draggable: drag_source=0x92a0d70,
path_list=0x9373c90
- * call once nact_tree_model_dnd_on_drag_begin
+ * call once fma_tree_model_dnd_imulti_drag_source_row_draggable: drag_source=0x92a0d70,
path_list=0x9373c90
+ * call once fma_tree_model_dnd_on_drag_begin
* fma_clipboard_dnd_clear()
* call once fma_clipboard_on_drag_begin( treeview, context, main_window )
*
* when we drop (e.g. in Nautilus)
* call once egg_tree_multi_dnd_on_drag_data_get( treeview, context, selection_data, info=0, time )
- * call once nact_tree_model_dnd_imulti_drag_source_drag_data_get( drag_source, context, selection_data,
path_list, atom=XdndDirectSave0 )
+ * call once fma_tree_model_dnd_imulti_drag_source_drag_data_get( drag_source, context, selection_data,
path_list, atom=XdndDirectSave0 )
* fma_clipboard_dnd_set()
- * call once nact_tree_model_dnd_on_drag_end
+ * call once fma_tree_model_dnd_on_drag_end
* fma_clipboard_dnd_drag_end
* fma_clipboard_get_from_dnd_clipboard_callback
* fma_clipboard_dnd_clear
*
* when we drop in FileManager-Actions
* call once egg_tree_multi_dnd_on_drag_data_get( treeview, context, selection_data, info=0, time )
- * call once nact_tree_model_imulti_drag_source_drag_data_get( drag_source, context, selection_data,
path_list, atom=XdndNautilusActions )
+ * call once fma_tree_model_imulti_drag_source_drag_data_get( drag_source, context, selection_data,
path_list, atom=XdndFileManagerActions )
* call once fma_clipboard_get_data_for_intern_use
- * call once nact_tree_model_idrag_dest_drag_data_received
+ * call once fma_tree_model_idrag_dest_drag_data_received
* call once fma_clipboard_on_drag_end( treeview, context, main_window )
*/
@@ -86,7 +86,7 @@
#define XDS_ATOM gdk_atom_intern( "XdndDirectSave0", FALSE )
#define XDS_FILENAME "xds.txt"
-#define NACT_ATOM gdk_atom_intern( "XdndNautilusActions", FALSE
)
+#define NACT_ATOM gdk_atom_intern( "XdndFileManagerActions",
FALSE )
/* as a dnd source, we provide
* - a special XdndNautilusAction format for internal move/copy
@@ -96,10 +96,10 @@
* - a text (xml) format, to go to clipboard or a text editor
*/
static GtkTargetEntry dnd_source_formats[] = {
- { "XdndNautilusActions", GTK_TARGET_SAME_WIDGET, FMA_XCHANGE_FORMAT_NACT },
- { "XdndDirectSave0", GTK_TARGET_OTHER_APP, FMA_XCHANGE_FORMAT_XDS },
- { "application/xml", GTK_TARGET_OTHER_APP, FMA_XCHANGE_FORMAT_APPLICATION_XML },
- { "text/plain", GTK_TARGET_OTHER_APP, FMA_XCHANGE_FORMAT_TEXT_PLAIN },
+ { "XdndFileManagerActions", GTK_TARGET_SAME_WIDGET, FMA_XCHANGE_FORMAT_FMA },
+ { "XdndDirectSave0", GTK_TARGET_OTHER_APP, FMA_XCHANGE_FORMAT_XDS },
+ { "application/xml", GTK_TARGET_OTHER_APP, FMA_XCHANGE_FORMAT_APPLICATION_XML },
+ { "text/plain", GTK_TARGET_OTHER_APP, FMA_XCHANGE_FORMAT_TEXT_PLAIN },
};
/* as a dnd dest, we accept
@@ -109,10 +109,10 @@ static GtkTargetEntry dnd_source_formats[] = {
* - a plain text, which we are going to try to import as a XML description
*/
GtkTargetEntry tree_model_dnd_dest_formats[] = {
- { "XdndNautilusActions", 0, FMA_XCHANGE_FORMAT_NACT },
- { "text/uri-list", 0, FMA_XCHANGE_FORMAT_URI_LIST },
- { "application/xml", 0, FMA_XCHANGE_FORMAT_APPLICATION_XML },
- { "text/plain", 0, FMA_XCHANGE_FORMAT_TEXT_PLAIN },
+ { "XdndFileManagerActions", 0, FMA_XCHANGE_FORMAT_FMA },
+ { "text/uri-list", 0, FMA_XCHANGE_FORMAT_URI_LIST },
+ { "application/xml", 0, FMA_XCHANGE_FORMAT_APPLICATION_XML },
+ { "text/plain", 0, FMA_XCHANGE_FORMAT_TEXT_PLAIN },
};
guint tree_model_dnd_dest_formats_count = G_N_ELEMENTS( tree_model_dnd_dest_formats );
@@ -122,19 +122,19 @@ static const gchar *st_refuse_drop_item = N_( "Unable to drop an action or a men
static const gchar *st_parent_not_writable = N_( "Unable to drop here as parent is not writable" );
static const gchar *st_level_zero_not_writable = N_( "Unable to drop here as level zero is not writable" );
-static gboolean drop_inside( NactTreeModel *model, GtkTreePath *dest, GtkSelectionData *selection_data
);
-static gboolean is_drop_possible( NactTreeModel *model, GtkTreePath *dest, FMAObjectItem **parent );
-static gboolean is_drop_possible_before_iter( NactTreeModel *model, GtkTreeIter *iter, FMAMainWindow
*window, FMAObjectItem **parent );
-static gboolean is_drop_possible_into_dest( NactTreeModel *model, GtkTreePath *dest, FMAMainWindow
*window, FMAObjectItem **parent );
-static void drop_inside_move_dest( NactTreeModel *model, GList *rows, GtkTreePath **dest );
-static gboolean drop_uri_list( NactTreeModel *model, GtkTreePath *dest, GtkSelectionData
*selection_data );
+static gboolean drop_inside( FMATreeModel *model, GtkTreePath *dest, GtkSelectionData *selection_data
);
+static gboolean is_drop_possible( FMATreeModel *model, GtkTreePath *dest, FMAObjectItem **parent );
+static gboolean is_drop_possible_before_iter( FMATreeModel *model, GtkTreeIter *iter, FMAMainWindow
*window, FMAObjectItem **parent );
+static gboolean is_drop_possible_into_dest( FMATreeModel *model, GtkTreePath *dest, FMAMainWindow
*window, FMAObjectItem **parent );
+static void drop_inside_move_dest( FMATreeModel *model, GList *rows, GtkTreePath **dest );
+static gboolean drop_uri_list( FMATreeModel *model, GtkTreePath *dest, GtkSelectionData
*selection_data );
static FMAObjectItem *is_dropped_already_exists( const FMAObjectItem *importing, const FMAMainWindow *window
);
-static char *get_xds_atom_value( GdkDragContext *context );
-static gboolean is_parent_accept_new_children( FMAApplication *application, FMAMainWindow *window,
FMAObjectItem *parent );
-static guint target_atom_to_id( GdkAtom atom );
+static char *get_xds_atom_value( GdkDragContext *context );
+static gboolean is_parent_accept_new_children( FMAApplication *application, FMAMainWindow *window,
FMAObjectItem *parent );
+static guint target_atom_to_id( GdkAtom atom );
/**
- * nact_tree_model_dnd_idrag_dest_drag_data_received:
+ * fma_tree_model_dnd_idrag_dest_drag_data_received:
* @drag_dest:
* @dest:
* @selection_data:
@@ -153,15 +153,15 @@ static guint target_atom_to_id( GdkAtom atom );
*
* When moving/copy from the treeview to the treeview:
* - selection=XdndSelection
- * - target=XdndNautilusActions
- * - type=XdndNautilusActions
+ * - target=XdndFileManagerActions
+ * - type=XdndFileManagerActions
*/
gboolean
-nact_tree_model_dnd_idrag_dest_drag_data_received( GtkTreeDragDest *drag_dest, GtkTreePath *dest,
GtkSelectionData *selection_data )
+fma_tree_model_dnd_idrag_dest_drag_data_received( GtkTreeDragDest *drag_dest, GtkTreePath *dest,
GtkSelectionData *selection_data )
{
- static const gchar *thisfn = "nact_tree_model_dnd_idrag_dest_drag_data_received";
+ static const gchar *thisfn = "fma_tree_model_dnd_idrag_dest_drag_data_received";
gboolean result = FALSE;
- NactTreeModel *model;
+ FMATreeModel *model;
gchar *atom_name;
guint info;
gchar *path_str;
@@ -171,9 +171,9 @@ nact_tree_model_dnd_idrag_dest_drag_data_received( GtkTreeDragDest *drag_dest, G
gint selection_data_format;
gint selection_data_length;
- g_return_val_if_fail( NACT_IS_TREE_MODEL( drag_dest ), result );
+ g_return_val_if_fail( FMA_IS_TREE_MODEL( drag_dest ), result );
- model = NACT_TREE_MODEL( drag_dest );
+ model = FMA_TREE_MODEL( drag_dest );
if( !model->private->dispose_has_run ){
@@ -210,7 +210,7 @@ nact_tree_model_dnd_idrag_dest_drag_data_received( GtkTreeDragDest *drag_dest, G
g_free( path_str );
switch( info ){
- case FMA_XCHANGE_FORMAT_NACT:
+ case FMA_XCHANGE_FORMAT_FMA:
result = drop_inside( model, dest, selection_data );
break;
@@ -230,7 +230,7 @@ nact_tree_model_dnd_idrag_dest_drag_data_received( GtkTreeDragDest *drag_dest, G
}
/**
- * nact_tree_model_dnd_idrag_dest_row_drop_possible:
+ * fma_tree_model_dnd_idrag_dest_row_drop_possible:
* @drag_dest:
* @dest_path:
* @selection_data:
@@ -240,9 +240,9 @@ nact_tree_model_dnd_idrag_dest_drag_data_received( GtkTreeDragDest *drag_dest, G
* nor during the motion.
*/
gboolean
-nact_tree_model_dnd_idrag_dest_row_drop_possible( GtkTreeDragDest *drag_dest, GtkTreePath *dest_path,
GtkSelectionData *selection_data )
+fma_tree_model_dnd_idrag_dest_row_drop_possible( GtkTreeDragDest *drag_dest, GtkTreePath *dest_path,
GtkSelectionData *selection_data )
{
- static const gchar *thisfn = "nact_tree_model_dnd_idrag_dest_row_drop_possible";
+ static const gchar *thisfn = "fma_tree_model_dnd_idrag_dest_row_drop_possible";
g_debug( "%s: drag_dest=%p, dest_path=%p, selection_data=%p", thisfn, ( void * ) drag_dest, ( void *
) dest_path, ( void * ) selection_data );
@@ -250,7 +250,7 @@ nact_tree_model_dnd_idrag_dest_row_drop_possible( GtkTreeDragDest *drag_dest, Gt
}
/**
- * nact_tree_model_dnd_imulti_drag_source_drag_data_get:
+ * fma_tree_model_dnd_imulti_drag_source_drag_data_get:
* @context: contains
* - the suggested action, as chosen by the drop site,
* between those we have provided in imulti_drag_source_get_drag_actions()
@@ -263,7 +263,7 @@ nact_tree_model_dnd_idrag_dest_row_drop_possible( GtkTreeDragDest *drag_dest, Gt
* This function is called when we release the selected items onto the
* destination
*
- * FMA_XCHANGE_FORMAT_NACT:
+ * FMA_XCHANGE_FORMAT_FMA:
* internal format for drag and drop inside the treeview:
* - copy in the clipboard the list of row references
* - selection data is empty
@@ -284,15 +284,15 @@ nact_tree_model_dnd_idrag_dest_row_drop_possible( GtkTreeDragDest *drag_dest, Gt
* %FALSE else.
*/
gboolean
-nact_tree_model_dnd_imulti_drag_source_drag_data_get( EggTreeMultiDragSource *drag_source,
+fma_tree_model_dnd_imulti_drag_source_drag_data_get( EggTreeMultiDragSource *drag_source,
GdkDragContext *context,
GtkSelectionData *selection_data,
GList *rows,
guint info )
{
- static const gchar *thisfn = "nact_tree_model_dnd_imulti_drag_source_drag_data_get";
+ static const gchar *thisfn = "fma_tree_model_dnd_imulti_drag_source_drag_data_get";
gchar *atom_name;
- NactTreeModel *model;
+ FMATreeModel *model;
gchar *data;
gboolean ret = FALSE;
gchar *dest_folder, *folder;
@@ -323,7 +323,7 @@ nact_tree_model_dnd_imulti_drag_source_drag_data_get( EggTreeMultiDragSource *dr
atom_name );
g_free( atom_name );
- model = NACT_TREE_MODEL( drag_source );
+ model = FMA_TREE_MODEL( drag_source );
g_return_val_if_fail( model->private->window, FALSE );
if( !model->private->dispose_has_run ){
@@ -333,7 +333,7 @@ nact_tree_model_dnd_imulti_drag_source_drag_data_get( EggTreeMultiDragSource *dr
}
switch( info ){
- case FMA_XCHANGE_FORMAT_NACT:
+ case FMA_XCHANGE_FORMAT_FMA:
copy_data = ( context_selected_action == GDK_ACTION_COPY );
gtk_selection_data_set( selection_data,
selection_data_target, 8, ( guchar * ) "", 0 );
@@ -382,14 +382,14 @@ nact_tree_model_dnd_imulti_drag_source_drag_data_get( EggTreeMultiDragSource *dr
}
/**
- * nact_tree_model_dnd_imulti_drag_source_drag_data_delete:
+ * fma_tree_model_dnd_imulti_drag_source_drag_data_delete:
* @drag_source:
* @rows:
*/
gboolean
-nact_tree_model_dnd_imulti_drag_source_drag_data_delete( EggTreeMultiDragSource *drag_source, GList *rows )
+fma_tree_model_dnd_imulti_drag_source_drag_data_delete( EggTreeMultiDragSource *drag_source, GList *rows )
{
- static const gchar *thisfn = "nact_tree_model_dnd_imulti_drag_source_drag_data_delete";
+ static const gchar *thisfn = "fma_tree_model_dnd_imulti_drag_source_drag_data_delete";
g_debug( "%s: drag_source=%p, path_list=%p", thisfn, ( void * ) drag_source, ( void * ) rows );
@@ -397,17 +397,17 @@ nact_tree_model_dnd_imulti_drag_source_drag_data_delete( EggTreeMultiDragSource
}
/**
- * nact_tree_model_dnd_imulti_drag_source_get_drag_actions:
+ * fma_tree_model_dnd_imulti_drag_source_get_drag_actions:
* @drag_source:
*/
GdkDragAction
-nact_tree_model_dnd_imulti_drag_source_get_drag_actions( EggTreeMultiDragSource *drag_source )
+fma_tree_model_dnd_imulti_drag_source_get_drag_actions( EggTreeMultiDragSource *drag_source )
{
return( GDK_ACTION_COPY | GDK_ACTION_MOVE );
}
GtkTargetList *
-nact_tree_model_dnd_imulti_drag_source_get_format_list( EggTreeMultiDragSource *drag_source )
+fma_tree_model_dnd_imulti_drag_source_get_format_list( EggTreeMultiDragSource *drag_source )
{
GtkTargetList *target_list;
@@ -417,7 +417,7 @@ nact_tree_model_dnd_imulti_drag_source_get_format_list( EggTreeMultiDragSource *
}
/**
- * nact_tree_model_dnd_imulti_drag_source_row_draggable:
+ * fma_tree_model_dnd_imulti_drag_source_row_draggable:
* @drag_source:
* @rows:
*
@@ -426,10 +426,10 @@ nact_tree_model_dnd_imulti_drag_source_get_format_list( EggTreeMultiDragSource *
* We only make use of them in on_drag_motion handler.
*/
gboolean
-nact_tree_model_dnd_imulti_drag_source_row_draggable( EggTreeMultiDragSource *drag_source, GList *rows )
+fma_tree_model_dnd_imulti_drag_source_row_draggable( EggTreeMultiDragSource *drag_source, GList *rows )
{
- static const gchar *thisfn = "nact_tree_model_dnd_imulti_drag_source_row_draggable";
- NactTreeModel *model;
+ static const gchar *thisfn = "fma_tree_model_dnd_imulti_drag_source_row_draggable";
+ FMATreeModel *model;
GtkTreeModel *store;
GtkTreePath *path;
GtkTreeIter iter;
@@ -441,8 +441,8 @@ nact_tree_model_dnd_imulti_drag_source_row_draggable( EggTreeMultiDragSource *dr
( void * ) drag_source, G_OBJECT( drag_source )->ref_count,
( void * ) rows, g_list_length( rows ));
- g_return_val_if_fail( NACT_IS_TREE_MODEL( drag_source ), FALSE );
- model = NACT_TREE_MODEL( drag_source );
+ g_return_val_if_fail( FMA_IS_TREE_MODEL( drag_source ), FALSE );
+ model = FMA_TREE_MODEL( drag_source );
if( !model->private->dispose_has_run ){
@@ -468,7 +468,7 @@ nact_tree_model_dnd_imulti_drag_source_row_draggable( EggTreeMultiDragSource *dr
}
/**
- * nact_tree_model_dnd_on_drag_begin:
+ * fma_tree_model_dnd_on_drag_begin:
* @widget: the GtkTreeView from which item is to be dragged.
* @context:
* @window: the parent #FMAMainWindow instance.
@@ -477,15 +477,15 @@ nact_tree_model_dnd_imulti_drag_source_row_draggable( EggTreeMultiDragSource *dr
* when we are dragging from the IActionsList treeview.
*/
void
-nact_tree_model_dnd_on_drag_begin( GtkWidget *widget, GdkDragContext *context, BaseWindow *window )
+fma_tree_model_dnd_on_drag_begin( GtkWidget *widget, GdkDragContext *context, BaseWindow *window )
{
- static const gchar *thisfn = "nact_tree_model_dnd_on_drag_begin";
- NactTreeModel *model;
+ static const gchar *thisfn = "fma_tree_model_dnd_on_drag_begin";
+ FMATreeModel *model;
GdkWindow *context_source_window;
g_return_if_fail( GTK_IS_TREE_VIEW( widget ));
- model = ( NactTreeModel * ) gtk_tree_view_get_model( GTK_TREE_VIEW( widget ));
- g_return_if_fail( NACT_IS_TREE_MODEL( model ));
+ model = ( FMATreeModel * ) gtk_tree_view_get_model( GTK_TREE_VIEW( widget ));
+ g_return_if_fail( FMA_IS_TREE_MODEL( model ));
if( !model->private->dispose_has_run ){
@@ -514,21 +514,21 @@ nact_tree_model_dnd_on_drag_begin( GtkWidget *widget, GdkDragContext *context, B
}
/**
- * nact_tree_model_dnd_on_drag_end:
+ * fma_tree_model_dnd_on_drag_end:
* @widget:
* @context:
* @window:
*/
void
-nact_tree_model_dnd_on_drag_end( GtkWidget *widget, GdkDragContext *context, BaseWindow *window )
+fma_tree_model_dnd_on_drag_end( GtkWidget *widget, GdkDragContext *context, BaseWindow *window )
{
- static const gchar *thisfn = "nact_tree_model_dnd_on_drag_end";
- NactTreeModel *model;
+ static const gchar *thisfn = "fma_tree_model_dnd_on_drag_end";
+ FMATreeModel *model;
GdkWindow *context_source_window;
g_return_if_fail( GTK_IS_TREE_VIEW( widget ));
- model = ( NactTreeModel * ) gtk_tree_view_get_model( GTK_TREE_VIEW( widget ));
- g_return_if_fail( NACT_IS_TREE_MODEL( model ));
+ model = ( FMATreeModel * ) gtk_tree_view_get_model( GTK_TREE_VIEW( widget ));
+ g_return_if_fail( FMA_IS_TREE_MODEL( model ));
if( !model->private->dispose_has_run ){
@@ -560,9 +560,9 @@ nact_tree_model_dnd_on_drag_end( GtkWidget *widget, GdkDragContext *context, Bas
* the given dest, %FALSE else.
*/
static gboolean
-drop_inside( NactTreeModel *model, GtkTreePath *dest, GtkSelectionData *selection_data )
+drop_inside( FMATreeModel *model, GtkTreePath *dest, GtkSelectionData *selection_data )
{
- static const gchar *thisfn = "nact_tree_model_dnd_inside_drag_and_drop";
+ static const gchar *thisfn = "fma_tree_model_dnd_inside_drag_and_drop";
FMAApplication *application;
FMAUpdater *updater;
FMAMainWindow *main_window;
@@ -660,9 +660,9 @@ drop_inside( NactTreeModel *model, GtkTreePath *dest, GtkSelectionData *selecti
* dest
*/
static gboolean
-is_drop_possible( NactTreeModel *model, GtkTreePath *dest, FMAObjectItem **parent )
+is_drop_possible( FMATreeModel *model, GtkTreePath *dest, FMAObjectItem **parent )
{
- NactTreeModelPrivate *priv;
+ FMATreeModelPrivate *priv;
gboolean drop_ok;
GtkApplication *application;
FMAMainWindow *main_window;
@@ -720,9 +720,9 @@ is_drop_possible( NactTreeModel *model, GtkTreePath *dest, FMAObjectItem **paren
}
static gboolean
-is_drop_possible_before_iter( NactTreeModel *model, GtkTreeIter *iter, FMAMainWindow *window, FMAObjectItem
**parent )
+is_drop_possible_before_iter( FMATreeModel *model, GtkTreeIter *iter, FMAMainWindow *window, FMAObjectItem
**parent )
{
- static const gchar *thisfn = "nact_tree_model_dnd_is_drop_possible_before_iter";
+ static const gchar *thisfn = "fma_tree_model_dnd_is_drop_possible_before_iter";
gboolean drop_ok;
FMAObject *object;
FMAStatusBar *bar;
@@ -761,9 +761,9 @@ is_drop_possible_before_iter( NactTreeModel *model, GtkTreeIter *iter, FMAMainWi
}
static gboolean
-is_drop_possible_into_dest( NactTreeModel *model, GtkTreePath *dest, FMAMainWindow *window, FMAObjectItem
**parent )
+is_drop_possible_into_dest( FMATreeModel *model, GtkTreePath *dest, FMAMainWindow *window, FMAObjectItem
**parent )
{
- static const gchar *thisfn = "nact_tree_model_dnd_is_drop_possible_into_dest";
+ static const gchar *thisfn = "fma_tree_model_dnd_is_drop_possible_into_dest";
gboolean drop_ok;
GtkTreePath *path;
GtkTreeIter iter;
@@ -810,7 +810,7 @@ is_drop_possible_into_dest( NactTreeModel *model, GtkTreePath *dest, FMAMainWind
}
static void
-drop_inside_move_dest( NactTreeModel *model, GList *rows, GtkTreePath **dest )
+drop_inside_move_dest( FMATreeModel *model, GList *rows, GtkTreePath **dest )
{
GList *it;
GtkTreePath *path;
@@ -859,10 +859,10 @@ drop_inside_move_dest( NactTreeModel *model, GList *rows, GtkTreePath **dest )
* so ony valid dest in outside (besides of) an action
*/
static gboolean
-drop_uri_list( NactTreeModel *model, GtkTreePath *dest, GtkSelectionData *selection_data )
+drop_uri_list( FMATreeModel *model, GtkTreePath *dest, GtkSelectionData *selection_data )
{
- static const gchar *thisfn = "nact_tree_model_dnd_drop_uri_list";
- NactTreeModelPrivate *priv;
+ static const gchar *thisfn = "fma_tree_model_dnd_drop_uri_list";
+ FMATreeModelPrivate *priv;
gboolean drop_done;
GtkApplication *application;
FMAUpdater *updater;
@@ -1007,7 +1007,7 @@ is_dropped_already_exists( const FMAObjectItem *importing, const FMAMainWindow *
* this function works well, but only called from on_drag_motion handler...
*/
/*static gboolean
-is_row_drop_possible( NactTreeModel *model, GtkTreePath *path, GtkTreeViewDropPosition pos )
+is_row_drop_possible( FMATreeModel *model, GtkTreePath *path, GtkTreeViewDropPosition pos )
{
gboolean ok = FALSE;
GtkTreeModel *store;
@@ -1042,13 +1042,13 @@ is_row_drop_possible( NactTreeModel *model, GtkTreePath *path, GtkTreeViewDropPo
static gboolean
on_drag_motion( GtkWidget *widget, GdkDragContext *context, gint x, gint y, guint time, BaseWindow *window )
{
- NactTreeModel *model;
+ FMATreeModel *model;
gboolean ok = FALSE;
GtkTreePath *path;
GtkTreeViewDropPosition pos;
- model = NACT_TREE_MODEL( gtk_tree_view_get_model( GTK_TREE_VIEW( widget )));
- g_return_val_if_fail( NACT_IS_TREE_MODEL( model ), FALSE );
+ model = FMA_TREE_MODEL( gtk_tree_view_get_model( GTK_TREE_VIEW( widget )));
+ g_return_val_if_fail( FMA_IS_TREE_MODEL( model ), FALSE );
if( !model->private->dispose_has_run ){
@@ -1072,7 +1072,7 @@ on_drag_motion( GtkWidget *widget, GdkDragContext *context, gint x, gint y, guin
}
gtk_tree_path_free( path );
- g_debug( "nact_tree_model_on_drag_motion: ok=%s, pos=%d", ok ? "True":"False", pos );
+ g_debug( "fma_tree_model_on_drag_motion: ok=%s, pos=%d", ok ? "True":"False", pos );
}
return( ok );
@@ -1086,10 +1086,10 @@ on_drag_motion( GtkWidget *widget, GdkDragContext *context, gint x, gint y, guin
/*static gboolean
on_drag_drop( GtkWidget *widget, GdkDragContext *context, gint x, gint y, guint time, BaseWindow *window )
{
- NactTreeModel *model;
+ FMATreeModel *model;
- model = NACT_TREE_MODEL( gtk_tree_view_get_model( GTK_TREE_VIEW( widget )));
- g_return_val_if_fail( NACT_IS_TREE_MODEL( model ), FALSE );
+ model = FMA_TREE_MODEL( gtk_tree_view_get_model( GTK_TREE_VIEW( widget )));
+ g_return_val_if_fail( FMA_IS_TREE_MODEL( model ), FALSE );
if( !model->private->dispose_has_run ){
diff --git a/src/ui/nact-tree-model-priv.h b/src/ui/fma-tree-model-priv.h
similarity index 55%
rename from src/ui/nact-tree-model-priv.h
rename to src/ui/fma-tree-model-priv.h
index d9a5ec1..90d2a09 100644
--- a/src/ui/nact-tree-model-priv.h
+++ b/src/ui/fma-tree-model-priv.h
@@ -28,13 +28,13 @@
*/
/**
- * SECTION: nact_tree_model
- * @short_description: #NactTreeModel private data definition.
- * @include: ui/nact-tree-model-priv.h
+ * SECTION: fma_tree_model
+ * @short_description: #FMATreeModel private data definition.
+ * @include: ui/fma-tree-model-priv.h
*/
-#ifndef __UI_NACT_TREE_MODEL_PRIV_H__
-#define __UI_NACT_TREE_MODEL_PRIV_H__
+#ifndef __UI_FMA_TREE_MODEL_PRIV_H__
+#define __UI_FMA_TREE_MODEL_PRIV_H__
#include "egg-tree-multi-dnd.h"
#include "fma-clipboard.h"
@@ -43,7 +43,7 @@ G_BEGIN_DECLS
/* private instance data
*/
-struct _NactTreeModelPrivate {
+struct _FMATreeModelPrivate {
gboolean dispose_has_run;
/* data set at instanciation time
@@ -54,8 +54,8 @@ struct _NactTreeModelPrivate {
/* must be initialized right after the instanciation
*/
- FMAMainWindow *window;
- FMAClipboard *clipboard;
+ FMAMainWindow *window;
+ FMAClipboard *clipboard;
guint mode;
/* runtime data
@@ -65,22 +65,22 @@ struct _NactTreeModelPrivate {
gboolean drag_drop; /* defined for on_drag_motion handler */
};
-#define TREE_MODEL_STATUSBAR_CONTEXT "nact-tree-model-statusbar-context"
+#define TREE_MODEL_STATUSBAR_CONTEXT "fma-tree-model-statusbar-context"
-gboolean nact_tree_model_dnd_idrag_dest_drag_data_received( GtkTreeDragDest *drag_dest, GtkTreePath
*dest, GtkSelectionData *selection_data );
-gboolean nact_tree_model_dnd_idrag_dest_row_drop_possible( GtkTreeDragDest *drag_dest, GtkTreePath
*dest_path, GtkSelectionData *selection_data );
+gboolean fma_tree_model_dnd_idrag_dest_drag_data_received( GtkTreeDragDest *drag_dest, GtkTreePath
*dest, GtkSelectionData *selection_data );
+gboolean fma_tree_model_dnd_idrag_dest_row_drop_possible( GtkTreeDragDest *drag_dest, GtkTreePath
*dest_path, GtkSelectionData *selection_data );
-gboolean nact_tree_model_dnd_imulti_drag_source_drag_data_get( EggTreeMultiDragSource *drag_source,
GdkDragContext *context, GtkSelectionData *selection_data, GList *path_list, guint info );
-gboolean nact_tree_model_dnd_imulti_drag_source_drag_data_delete( EggTreeMultiDragSource *drag_source,
GList *path_list );
-GdkDragAction nact_tree_model_dnd_imulti_drag_source_get_drag_actions( EggTreeMultiDragSource *drag_source
);
-GtkTargetList *nact_tree_model_dnd_imulti_drag_source_get_format_list( EggTreeMultiDragSource *drag_source );
-gboolean nact_tree_model_dnd_imulti_drag_source_row_draggable( EggTreeMultiDragSource *drag_source,
GList *path_list );
+gboolean fma_tree_model_dnd_imulti_drag_source_drag_data_get( EggTreeMultiDragSource *drag_source,
GdkDragContext *context, GtkSelectionData *selection_data, GList *path_list, guint info );
+gboolean fma_tree_model_dnd_imulti_drag_source_drag_data_delete( EggTreeMultiDragSource *drag_source,
GList *path_list );
+GdkDragAction fma_tree_model_dnd_imulti_drag_source_get_drag_actions( EggTreeMultiDragSource *drag_source );
+GtkTargetList *fma_tree_model_dnd_imulti_drag_source_get_format_list( EggTreeMultiDragSource *drag_source );
+gboolean fma_tree_model_dnd_imulti_drag_source_row_draggable( EggTreeMultiDragSource *drag_source,
GList *path_list );
-void nact_tree_model_dnd_on_drag_begin( GtkWidget *widget, GdkDragContext *context, BaseWindow
*window );
+void fma_tree_model_dnd_on_drag_begin( GtkWidget *widget, GdkDragContext *context, BaseWindow
*window );
/*gboolean on_drag_motion( GtkWidget *widget, GdkDragContext *context, gint x, gint y, guint time,
BaseWindow *window );*/
/*gboolean on_drag_drop( GtkWidget *widget, GdkDragContext *context, gint x, gint y, guint time,
BaseWindow *window );*/
-void nact_tree_model_dnd_on_drag_end( GtkWidget *widget, GdkDragContext *context, BaseWindow
*window );
+void fma_tree_model_dnd_on_drag_end( GtkWidget *widget, GdkDragContext *context, BaseWindow
*window );
G_END_DECLS
-#endif /* __UI_NACT_TREE_MODEL_PRIV_H__ */
+#endif /* __UI_FMA_TREE_MODEL_PRIV_H__ */
diff --git a/src/ui/nact-tree-model.c b/src/ui/fma-tree-model.c
similarity index 77%
rename from src/ui/nact-tree-model.c
rename to src/ui/fma-tree-model.c
index 5e4d995..308257d 100644
--- a/src/ui/nact-tree-model.c
+++ b/src/ui/fma-tree-model.c
@@ -43,12 +43,12 @@
#include "base-gtk-utils.h"
#include "fma-main-tab.h"
#include "fma-main-window.h"
-#include "nact-tree-model.h"
-#include "nact-tree-model-priv.h"
+#include "fma-tree-model.h"
+#include "fma-tree-model-priv.h"
/* iter on tree store
*/
-typedef gboolean ( *FnIterOnStore )( const NactTreeModel *, GtkTreeStore *, GtkTreePath *, FMAObject *,
gpointer );
+typedef gboolean ( *FnIterOnStore )( const FMATreeModel *, GtkTreeStore *, GtkTreePath *, FMAObject *,
gpointer );
/* getting the list of items
* - mode is the indicator of the wished content
@@ -65,7 +65,7 @@ typedef struct {
*/
typedef struct {
gchar *id;
- FMAObject *object;
+ FMAObject *object;
GtkTreeIter *iter;
}
ntmFindId;
@@ -75,8 +75,8 @@ typedef struct {
*/
typedef struct {
const FMAObject *object;
- GtkTreeIter *iter;
- GtkTreePath *path;
+ GtkTreeIter *iter;
+ GtkTreePath *path;
}
ntmFindObject;
@@ -88,46 +88,46 @@ typedef struct {
}
ntmDumpStruct;
-/* drop formats, as defined in nact-tree-model-dnd.c
+/* drop formats, as defined in fma-tree-model-dnd.c
*/
extern GtkTargetEntry tree_model_dnd_dest_formats[];
extern guint tree_model_dnd_dest_formats_count;
-#define TREE_MODEL_ORDER_MODE "nact-tree-model-order-mode"
+#define TREE_MODEL_ORDER_MODE "fma-tree-model-order-mode"
static GtkTreeModelFilterClass *st_parent_class = NULL;
static GType register_type( void );
-static void class_init( NactTreeModelClass *klass );
+static void class_init( FMATreeModelClass *klass );
static void imulti_drag_source_init( EggTreeMultiDragSourceIface *iface, void *user_data );
static void idrag_dest_init( GtkTreeDragDestIface *iface, void *user_data );
static void instance_init( GTypeInstance *instance, gpointer klass );
static void instance_dispose( GObject *model );
static void instance_finalize( GObject *model );
-static void connect_item_updated_signal( NactTreeModel *tmodel );
-static void on_settings_order_mode_changed( const gchar *group, const gchar *key, gconstpointer
new_value, gboolean mandatory, NactTreeModel *model );
-static void on_main_item_updated( BaseWindow *window, FMAIContext *context, guint data, NactTreeModel
*model );
-static void setup_dnd_edition( NactTreeModel *tmodel );
+static void connect_item_updated_signal( FMATreeModel *tmodel );
+static void on_settings_order_mode_changed( const gchar *group, const gchar *key, gconstpointer
new_value, gboolean mandatory, FMATreeModel *model );
+static void on_main_item_updated( BaseWindow *window, FMAIContext *context, guint data, FMATreeModel
*model );
+static void setup_dnd_edition( FMATreeModel *tmodel );
static void append_item( GtkTreeStore *model, GtkTreeView *treeview, GtkTreeIter *parent, GtkTreeIter
*iter, const FMAObject *object );
static void display_item( GtkTreeStore *model, GtkTreeView *treeview, GtkTreeIter *iter, const FMAObject
*object );
-static void display_order_change( NactTreeModel *model, gint order_mode );
+static void display_order_change( FMATreeModel *model, gint order_mode );
#if 0
-static void dump( NactTreeModel *model );
-static gboolean dump_store( NactTreeModel *model, GtkTreePath *path, FMAObject *object, ntmDumpStruct *ntm );
+static void dump( FMATreeModel *model );
+static gboolean dump_store( FMATreeModel *model, GtkTreePath *path, FMAObject *object, ntmDumpStruct *ntm );
#endif
static void fill_tree_store( GtkTreeStore *model, GtkTreeView *treeview, FMAObject *object, GtkTreeIter
*parent );
-static gboolean filter_visible( GtkTreeModel *store, GtkTreeIter *iter, NactTreeModel *model );
-static gboolean find_item_iter( NactTreeModel *model, GtkTreeStore *store, GtkTreePath *path, FMAObject
*object, ntmFindId *nfo );
-static gboolean find_object_iter( NactTreeModel *model, GtkTreeStore *store, GtkTreePath *path, FMAObject
*object, ntmFindObject *nfo );
-static gboolean get_items_iter( const NactTreeModel *model, GtkTreeStore *store, GtkTreePath *path,
FMAObject *object, ntmGetItems *ngi );
-static void iter_on_store( const NactTreeModel *model, GtkTreeModel *store, GtkTreeIter *parent,
FnIterOnStore fn, gpointer user_data );
-static gboolean iter_on_store_item( const NactTreeModel *model, GtkTreeModel *store, GtkTreeIter *iter,
FnIterOnStore fn, gpointer user_data );
-static void remove_if_exists( NactTreeModel *model, GtkTreeModel *store, const FMAObject *object );
+static gboolean filter_visible( GtkTreeModel *store, GtkTreeIter *iter, FMATreeModel *model );
+static gboolean find_item_iter( FMATreeModel *model, GtkTreeStore *store, GtkTreePath *path, FMAObject
*object, ntmFindId *nfo );
+static gboolean find_object_iter( FMATreeModel *model, GtkTreeStore *store, GtkTreePath *path, FMAObject
*object, ntmFindObject *nfo );
+static gboolean get_items_iter( const FMATreeModel *model, GtkTreeStore *store, GtkTreePath *path, FMAObject
*object, ntmGetItems *ngi );
+static void iter_on_store( const FMATreeModel *model, GtkTreeModel *store, GtkTreeIter *parent,
FnIterOnStore fn, gpointer user_data );
+static gboolean iter_on_store_item( const FMATreeModel *model, GtkTreeModel *store, GtkTreeIter *iter,
FnIterOnStore fn, gpointer user_data );
+static void remove_if_exists( FMATreeModel *model, GtkTreeModel *store, const FMAObject *object );
static gboolean delete_items_rec( GtkTreeStore *store, GtkTreeIter *iter );
static gint sort_actions_list( GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b, gpointer user_data );
GType
-nact_tree_model_get_type( void )
+fma_tree_model_get_type( void )
{
static GType model_type = 0;
@@ -141,17 +141,17 @@ nact_tree_model_get_type( void )
static GType
register_type (void)
{
- static const gchar *thisfn = "nact_tree_model_register_type";
+ static const gchar *thisfn = "fma_tree_model_register_type";
GType type;
static const GTypeInfo info = {
- sizeof( NactTreeModelClass ),
+ sizeof( FMATreeModelClass ),
NULL, /* base_init */
NULL, /* base_finalize */
( GClassInitFunc ) class_init,
NULL, /* class_finalize */
NULL, /* class_data */
- sizeof( NactTreeModel ),
+ sizeof( FMATreeModel ),
0,
( GInstanceInitFunc ) instance_init
};
@@ -170,7 +170,7 @@ register_type (void)
g_debug( "%s", thisfn );
- type = g_type_register_static( GTK_TYPE_TREE_MODEL_FILTER, "NactTreeModel", &info, 0 );
+ type = g_type_register_static( GTK_TYPE_TREE_MODEL_FILTER, "FMATreeModel", &info, 0 );
g_type_add_interface_static( type, EGG_TYPE_TREE_MULTI_DRAG_SOURCE, &imulti_drag_source_info );
@@ -180,9 +180,9 @@ register_type (void)
}
static void
-class_init( NactTreeModelClass *klass )
+class_init( FMATreeModelClass *klass )
{
- static const gchar *thisfn = "nact_tree_model_class_init";
+ static const gchar *thisfn = "fma_tree_model_class_init";
GObjectClass *object_class;
g_debug( "%s: klass=%p", thisfn, ( void * ) klass );
@@ -197,43 +197,43 @@ class_init( NactTreeModelClass *klass )
static void
imulti_drag_source_init( EggTreeMultiDragSourceIface *iface, void *user_data )
{
- static const gchar *thisfn = "nact_tree_model_imulti_drag_source_init";
+ static const gchar *thisfn = "fma_tree_model_imulti_drag_source_init";
g_debug( "%s: iface=%p, user_data=%p", thisfn, ( void * ) iface, ( void * ) user_data );
- iface->row_draggable = nact_tree_model_dnd_imulti_drag_source_row_draggable;
- iface->drag_data_get = nact_tree_model_dnd_imulti_drag_source_drag_data_get;
- iface->drag_data_delete = nact_tree_model_dnd_imulti_drag_source_drag_data_delete;
- iface->get_target_list = nact_tree_model_dnd_imulti_drag_source_get_format_list;
+ iface->row_draggable = fma_tree_model_dnd_imulti_drag_source_row_draggable;
+ iface->drag_data_get = fma_tree_model_dnd_imulti_drag_source_drag_data_get;
+ iface->drag_data_delete = fma_tree_model_dnd_imulti_drag_source_drag_data_delete;
+ iface->get_target_list = fma_tree_model_dnd_imulti_drag_source_get_format_list;
iface->free_target_list = NULL;
- iface->get_drag_actions = nact_tree_model_dnd_imulti_drag_source_get_drag_actions;
+ iface->get_drag_actions = fma_tree_model_dnd_imulti_drag_source_get_drag_actions;
}
static void
idrag_dest_init( GtkTreeDragDestIface *iface, void *user_data )
{
- static const gchar *thisfn = "nact_tree_model_idrag_dest_init";
+ static const gchar *thisfn = "fma_tree_model_idrag_dest_init";
g_debug( "%s: iface=%p, user_data=%p", thisfn, ( void * ) iface, ( void * ) user_data );
- iface->drag_data_received = nact_tree_model_dnd_idrag_dest_drag_data_received;
- iface->row_drop_possible = nact_tree_model_dnd_idrag_dest_row_drop_possible;
+ iface->drag_data_received = fma_tree_model_dnd_idrag_dest_drag_data_received;
+ iface->row_drop_possible = fma_tree_model_dnd_idrag_dest_row_drop_possible;
}
static void
instance_init( GTypeInstance *instance, gpointer klass )
{
- static const gchar *thisfn = "nact_tree_model_instance_init";
- NactTreeModel *self;
+ static const gchar *thisfn = "fma_tree_model_instance_init";
+ FMATreeModel *self;
- g_return_if_fail( NACT_IS_TREE_MODEL( instance ));
+ g_return_if_fail( FMA_IS_TREE_MODEL( instance ));
g_debug( "%s: instance=%p (%s), klass=%p",
thisfn, ( void * ) instance, G_OBJECT_TYPE_NAME( instance ), ( void * ) klass );
- self = NACT_TREE_MODEL( instance );
+ self = FMA_TREE_MODEL( instance );
- self->private = g_new0( NactTreeModelPrivate, 1 );
+ self->private = g_new0( FMATreeModelPrivate, 1 );
self->private->dispose_has_run = FALSE;
}
@@ -250,12 +250,12 @@ instance_init( GTypeInstance *instance, gpointer klass )
static void
instance_constructed( GObject *model )
{
- static const gchar *thisfn = "nact_tree_model_instance_constructed";
- NactTreeModelPrivate *priv;
+ static const gchar *thisfn = "fma_tree_model_instance_constructed";
+ FMATreeModelPrivate *priv;
- g_return_if_fail( NACT_IS_TREE_MODEL( model ));
+ g_return_if_fail( FMA_IS_TREE_MODEL( model ));
- priv = NACT_TREE_MODEL( model )->private;
+ priv = FMA_TREE_MODEL( model )->private;
if( !priv->dispose_has_run ){
@@ -266,7 +266,7 @@ instance_constructed( GObject *model )
g_debug( "%s: model=%p (%s)", thisfn, ( void * ) model, G_OBJECT_TYPE_NAME( model ));
- /* nact_tree_model_set_main_window */
+ /* fma_tree_model_set_main_window */
priv->clipboard = fma_clipboard_new( priv->window );
if( priv->mode == TREE_MODE_EDITION ){
@@ -279,11 +279,11 @@ instance_constructed( GObject *model )
priv->treeview,
tree_model_dnd_dest_formats,
tree_model_dnd_dest_formats_count,
- nact_tree_model_dnd_imulti_drag_source_get_drag_actions(
EGG_TREE_MULTI_DRAG_SOURCE( model )));
+ fma_tree_model_dnd_imulti_drag_source_get_drag_actions(
EGG_TREE_MULTI_DRAG_SOURCE( model )));
g_signal_connect(
priv->treeview, "drag-begin",
- G_CALLBACK( nact_tree_model_dnd_on_drag_begin ), priv->window );
+ G_CALLBACK( fma_tree_model_dnd_on_drag_begin ), priv->window );
/* connect: implies that we have to do all hard stuff
* connect_after: no more triggers drag-drop signal
@@ -296,7 +296,7 @@ instance_constructed( GObject *model )
g_signal_connect(
priv->treeview, "drag-end",
- G_CALLBACK( nact_tree_model_dnd_on_drag_end ), priv->window );
+ G_CALLBACK( fma_tree_model_dnd_on_drag_end ), priv->window );
/* set_edition_mode */
fma_settings_register_key_callback(
@@ -317,13 +317,13 @@ instance_constructed( GObject *model )
static void
instance_dispose( GObject *object )
{
- static const gchar *thisfn = "nact_tree_model_instance_dispose";
- NactTreeModel *self;
+ static const gchar *thisfn = "fma_tree_model_instance_dispose";
+ FMATreeModel *self;
GtkTreeStore *ts_model;
- g_return_if_fail( NACT_IS_TREE_MODEL( object ));
+ g_return_if_fail( FMA_IS_TREE_MODEL( object ));
- self = NACT_TREE_MODEL( object );
+ self = FMA_TREE_MODEL( object );
if( !self->private->dispose_has_run ){
g_debug( "%s: object=%p (%s)", thisfn, ( void * ) object, G_OBJECT_TYPE_NAME( object ));
@@ -346,14 +346,14 @@ instance_dispose( GObject *object )
static void
instance_finalize( GObject *object )
{
- static const gchar *thisfn = "nact_tree_model_instance_finalize";
- NactTreeModel *self;
+ static const gchar *thisfn = "fma_tree_model_instance_finalize";
+ FMATreeModel *self;
- g_return_if_fail( NACT_IS_TREE_MODEL( object ));
+ g_return_if_fail( FMA_IS_TREE_MODEL( object ));
g_debug( "%s: object=%p (%s)", thisfn, ( void * ) object, G_OBJECT_TYPE_NAME( object ));
- self = NACT_TREE_MODEL( object );
+ self = FMA_TREE_MODEL( object );
g_free( self->private );
@@ -364,16 +364,16 @@ instance_finalize( GObject *object )
}
/**
- * nact_tree_model_new:
+ * fma_tree_model_new:
*
- * Returns: a newly created NactTreeModel object.
+ * Returns: a newly created FMATreeModel object.
*/
-NactTreeModel *
-nact_tree_model_new( GtkTreeView *treeview )
+FMATreeModel *
+fma_tree_model_new( GtkTreeView *treeview )
{
- static const gchar *thisfn = "nact_tree_model_new";
+ static const gchar *thisfn = "fma_tree_model_new";
GtkTreeStore *ts_model;
- NactTreeModel *model;
+ FMATreeModel *model;
gint order_mode;
g_return_val_if_fail( treeview && GTK_IS_TREE_VIEW( treeview ), NULL );
@@ -385,7 +385,7 @@ nact_tree_model_new( GtkTreeView *treeview )
TREE_N_COLUMN, GDK_TYPE_PIXBUF, G_TYPE_STRING, FMA_TYPE_OBJECT );
/* create our filter model */
- model = g_object_new( NACT_TYPE_TREE_MODEL,
+ model = g_object_new( FMA_TYPE_TREE_MODEL,
"child-model", ts_model,
NULL );
g_object_unref( ts_model );
@@ -403,8 +403,8 @@ nact_tree_model_new( GtkTreeView *treeview )
}
/**
- * nact_tree_model_set_main_window:
- * @tmodel: this #NactTreeModel instance
+ * fma_tree_model_set_main_window:
+ * @tmodel: this #FMATreeModel instance
* @main_window: the #FMAMainWindow.
*
* Attach the main window to the tree model, which is required to get
@@ -412,12 +412,12 @@ nact_tree_model_new( GtkTreeView *treeview )
* drop.
*/
void
-nact_tree_model_set_main_window( NactTreeModel *tmodel, FMAMainWindow *window )
+fma_tree_model_set_main_window( FMATreeModel *tmodel, FMAMainWindow *window )
{
- static const gchar *thisfn = "nact_tree_model_set_main_window";
- NactTreeModelPrivate *priv;
+ static const gchar *thisfn = "fma_tree_model_set_main_window";
+ FMATreeModelPrivate *priv;
- g_return_if_fail( tmodel && NACT_IS_TREE_MODEL( tmodel ));
+ g_return_if_fail( tmodel && FMA_IS_TREE_MODEL( tmodel ));
g_return_if_fail( window && FMA_IS_MAIN_WINDOW( window ));
g_debug( "%s: tmodel=%p, window=%p", thisfn, ( void * ) tmodel, ( void * ) window );
@@ -435,20 +435,20 @@ nact_tree_model_set_main_window( NactTreeModel *tmodel, FMAMainWindow *window )
}
/**
- * nact_tree_model_set_edition_mode:
- * @tmodel: this #NactTreeModel instance
+ * fma_tree_model_set_edition_mode:
+ * @tmodel: this #FMATreeModel instance
* @mode: the edition mode
*
* Set the edition mode which is required in order to rightly initialize
* the drag and drop code.
*/
void
-nact_tree_model_set_edition_mode( NactTreeModel *tmodel, guint mode )
+fma_tree_model_set_edition_mode( FMATreeModel *tmodel, guint mode )
{
- static const gchar *thisfn = "nact_tree_model_set_edition_mode";
- NactTreeModelPrivate *priv;
+ static const gchar *thisfn = "fma_tree_model_set_edition_mode";
+ FMATreeModelPrivate *priv;
- g_return_if_fail( tmodel && NACT_IS_TREE_MODEL( tmodel ));
+ g_return_if_fail( tmodel && FMA_IS_TREE_MODEL( tmodel ));
g_debug( "%s: tmodel=%p, mode=%u", thisfn, ( void * ) tmodel, mode );
@@ -481,9 +481,9 @@ nact_tree_model_set_edition_mode( NactTreeModel *tmodel, guint mode )
* are in edition mode
*/
static void
-connect_item_updated_signal( NactTreeModel *tmodel )
+connect_item_updated_signal( FMATreeModel *tmodel )
{
- NactTreeModelPrivate *priv;
+ FMATreeModelPrivate *priv;
priv = tmodel->private;
@@ -500,13 +500,13 @@ connect_item_updated_signal( NactTreeModel *tmodel )
* FMASettings callback for a change on IPREFS_ITEMS_LIST_ORDER_MODE key
*/
static void
-on_settings_order_mode_changed( const gchar *group, const gchar *key, gconstpointer new_value, gboolean
mandatory, NactTreeModel *model )
+on_settings_order_mode_changed( const gchar *group, const gchar *key, gconstpointer new_value, gboolean
mandatory, FMATreeModel *model )
{
- static const gchar *thisfn = "nact_tree_model_on_settings_order_mode_changed";
+ static const gchar *thisfn = "fma_tree_model_on_settings_order_mode_changed";
const gchar *order_mode_str;
guint order_mode;
- g_return_if_fail( NACT_IS_TREE_MODEL( model ));
+ g_return_if_fail( FMA_IS_TREE_MODEL( model ));
if( !model->private->dispose_has_run ){
@@ -525,9 +525,9 @@ on_settings_order_mode_changed( const gchar *group, const gchar *key, gconstpoin
* if force_display is true, then refresh the display of the view
*/
static void
-on_main_item_updated( BaseWindow *window, FMAIContext *context, guint data, NactTreeModel *model )
+on_main_item_updated( BaseWindow *window, FMAIContext *context, guint data, FMATreeModel *model )
{
- static const gchar *thisfn = "nact_tree_model_on_main_item_updated";
+ static const gchar *thisfn = "fma_tree_model_on_main_item_updated";
GtkTreePath *path;
GtkTreeStore *store;
GtkTreeIter iter;
@@ -542,7 +542,7 @@ on_main_item_updated( BaseWindow *window, FMAIContext *context, guint data, Nact
( void * ) model );
if( data & ( MAIN_DATA_LABEL | MAIN_DATA_ICON )){
- path = nact_tree_model_object_to_path( model, ( FMAObject * ) context );
+ path = fma_tree_model_object_to_path( model, ( FMAObject * ) context );
if( path ){
store = GTK_TREE_STORE( gtk_tree_model_filter_get_model(
GTK_TREE_MODEL_FILTER( model )));
if( gtk_tree_model_get_iter( GTK_TREE_MODEL( store ), &iter, path )){
@@ -556,9 +556,9 @@ on_main_item_updated( BaseWindow *window, FMAIContext *context, guint data, Nact
}
static void
-setup_dnd_edition( NactTreeModel *tmodel )
+setup_dnd_edition( FMATreeModel *tmodel )
{
- NactTreeModelPrivate *priv;
+ FMATreeModelPrivate *priv;
priv = tmodel->private;
@@ -572,11 +572,11 @@ setup_dnd_edition( NactTreeModel *tmodel )
priv->treeview,
tree_model_dnd_dest_formats,
tree_model_dnd_dest_formats_count,
- nact_tree_model_dnd_imulti_drag_source_get_drag_actions(
EGG_TREE_MULTI_DRAG_SOURCE( tmodel )));
+ fma_tree_model_dnd_imulti_drag_source_get_drag_actions(
EGG_TREE_MULTI_DRAG_SOURCE( tmodel )));
g_signal_connect(
priv->treeview, "drag-begin",
- G_CALLBACK( nact_tree_model_dnd_on_drag_begin ), priv->window );
+ G_CALLBACK( fma_tree_model_dnd_on_drag_begin ), priv->window );
/* connect: implies that we have to do all hard stuff
* connect_after: no more triggers drag-drop signal
@@ -589,15 +589,15 @@ setup_dnd_edition( NactTreeModel *tmodel )
g_signal_connect(
priv->treeview, "drag-end",
- G_CALLBACK( nact_tree_model_dnd_on_drag_end ), priv->window );
+ G_CALLBACK( fma_tree_model_dnd_on_drag_end ), priv->window );
priv->dnd_setup = TRUE;
}
}
/**
- * nact_tree_model_delete:
- * @model: this #NactTreeModel instance.
+ * fma_tree_model_delete:
+ * @model: this #FMATreeModel instance.
* @object: the #FMAObject to be deleted.
*
* Recursively deletes the specified object.
@@ -605,15 +605,15 @@ setup_dnd_edition( NactTreeModel *tmodel )
* Returns: a path which may be suitable for the next selection.
*/
GtkTreePath *
-nact_tree_model_delete( NactTreeModel *model, FMAObject *object )
+fma_tree_model_delete( FMATreeModel *model, FMAObject *object )
{
GtkTreePath *path;
- static const gchar *thisfn = "nact_tree_model_delete";
+ static const gchar *thisfn = "fma_tree_model_delete";
GtkTreeIter iter;
GtkTreeStore *store;
FMAObjectItem *parent;
- g_return_val_if_fail( NACT_IS_TREE_MODEL( model ), NULL );
+ g_return_val_if_fail( FMA_IS_TREE_MODEL( model ), NULL );
path = NULL;
@@ -621,7 +621,7 @@ nact_tree_model_delete( NactTreeModel *model, FMAObject *object )
g_debug( "%s: model=%p, object=%p (%s)",
thisfn, ( void * ) model, ( void * ) object, object ? G_OBJECT_TYPE_NAME(
object ) : "null" );
- path = nact_tree_model_object_to_path( model, object );
+ path = fma_tree_model_object_to_path( model, object );
if( path != NULL ){
@@ -646,8 +646,8 @@ nact_tree_model_delete( NactTreeModel *model, FMAObject *object )
}
/**
- * nact_tree_model_fill:
- * @model: this #NactTreeModel instance.
+ * fma_tree_model_fill:
+ * @model: this #FMATreeModel instance.
* @ŧreeview: the #GtkTreeView widget.
* @items: this list of items, usually from #FMAPivot, which will be used
* to fill up the tree store.
@@ -659,14 +659,14 @@ nact_tree_model_delete( NactTreeModel *model, FMAObject *object )
* tree store, so that we are able to freely edit it.
*/
void
-nact_tree_model_fill( NactTreeModel *model, GList *items )
+fma_tree_model_fill( FMATreeModel *model, GList *items )
{
- static const gchar *thisfn = "nact_tree_model_fill";
+ static const gchar *thisfn = "fma_tree_model_fill";
GtkTreeStore *ts_model;
GList *it;
FMAObject *duplicate;
- g_return_if_fail( NACT_IS_TREE_MODEL( model ));
+ g_return_if_fail( FMA_IS_TREE_MODEL( model ));
g_debug( "%s: model=%p, items=%p (count=%d)",
thisfn, ( void * ) model, ( void * ) items, g_list_length( items ));
@@ -686,8 +686,8 @@ nact_tree_model_fill( NactTreeModel *model, GList *items )
}
/**
- * nact_tree_model_insert_before:
- * @model: this #NactTreeModel instance.
+ * fma_tree_model_insert_before:
+ * @model: this #FMATreeModel instance.
* @object: a #FMAObject-derived object to be inserted.
* @path: the #GtkTreePath which specifies the insertion path.
* @parent: set to the parent or the object itself.
@@ -702,9 +702,9 @@ nact_tree_model_fill( NactTreeModel *model, GList *items )
* asked insertion path if tree is sorted.
*/
GtkTreePath *
-nact_tree_model_insert_before( NactTreeModel *model, const FMAObject *object, GtkTreePath *path )
+fma_tree_model_insert_before( FMATreeModel *model, const FMAObject *object, GtkTreePath *path )
{
- static const gchar *thisfn = "nact_tree_model_insert_before";
+ static const gchar *thisfn = "fma_tree_model_insert_before";
GtkTreeModel *store;
gchar *path_str;
GtkTreeIter iter;
@@ -724,7 +724,7 @@ nact_tree_model_insert_before( NactTreeModel *model, const FMAObject *object, Gt
( void * ) object, G_OBJECT_TYPE_NAME( object ), G_OBJECT( object )->ref_count,
( void * ) path, path_str );
g_free( path_str );
- g_return_val_if_fail( NACT_IS_TREE_MODEL( model ), NULL );
+ g_return_val_if_fail( FMA_IS_TREE_MODEL( model ), NULL );
g_return_val_if_fail( FMA_IS_OBJECT( object ), NULL );
inserted_path = NULL;
@@ -785,8 +785,8 @@ nact_tree_model_insert_before( NactTreeModel *model, const FMAObject *object, Gt
}
/**
- * nact_tree_model_insert_into:
- * @model: this #NactTreeModel instance.
+ * fma_tree_model_insert_into:
+ * @model: this #FMATreeModel instance.
* @object: the #FMAObject to be inserted.
* @path: the wished #GtkTreePath path.
*
@@ -797,9 +797,9 @@ nact_tree_model_insert_before( NactTreeModel *model, const FMAObject *object, Gt
* by the caller.
*/
GtkTreePath *
-nact_tree_model_insert_into( NactTreeModel *model, const FMAObject *object, GtkTreePath *path )
+fma_tree_model_insert_into( FMATreeModel *model, const FMAObject *object, GtkTreePath *path )
{
- static const gchar *thisfn = "nact_tree_model_insert_into";
+ static const gchar *thisfn = "fma_tree_model_insert_into";
GtkTreeModel *store;
GtkTreeIter iter;
GtkTreeIter parent_iter;
@@ -814,7 +814,7 @@ nact_tree_model_insert_into( NactTreeModel *model, const FMAObject *object, GtkT
( void * ) object, G_OBJECT_TYPE_NAME( object ), G_OBJECT( object )->ref_count,
( void * ) path, path_str, ( void * ) parent );
g_free( path_str );
- g_return_val_if_fail( NACT_IS_TREE_MODEL( model ), NULL );
+ g_return_val_if_fail( FMA_IS_TREE_MODEL( model ), NULL );
g_return_val_if_fail( FMA_IS_OBJECT( object ), NULL );
new_path = NULL;
@@ -850,8 +850,8 @@ nact_tree_model_insert_into( NactTreeModel *model, const FMAObject *object, GtkT
}
/**
- * nact_tree_model_get_item_by_id:
- * @model: this #NactTreeModel object.
+ * fma_tree_model_get_item_by_id:
+ * @model: this #FMATreeModel object.
* @id: the searched #FMAObjectItem.
*
* Returns: a pointer on the searched #FMAObjectItem if it exists, or %NULL.
@@ -860,13 +860,13 @@ nact_tree_model_insert_into( NactTreeModel *model, const FMAObject *object, GtkT
* not be released by the caller.
*/
FMAObjectItem *
-nact_tree_model_get_item_by_id( const NactTreeModel *model, const gchar *id )
+fma_tree_model_get_item_by_id( const FMATreeModel *model, const gchar *id )
{
- static const gchar *thisfn = "nact_tree_model_get_item_by_id";
+ static const gchar *thisfn = "fma_tree_model_get_item_by_id";
GtkTreeStore *store;
ntmFindId nfi;
- g_return_val_if_fail( NACT_IS_TREE_MODEL( model ), NULL );
+ g_return_val_if_fail( FMA_IS_TREE_MODEL( model ), NULL );
nfi.object = NULL;
@@ -882,22 +882,22 @@ nact_tree_model_get_item_by_id( const NactTreeModel *model, const gchar *id )
}
/**
- * nact_tree_model_get_items:
- * @model: this #NactTreeModel object.
+ * fma_tree_model_get_items:
+ * @model: this #FMATreeModel object.
* @mode: the content indicator for the returned list
*
* Returns: the content of the current store as a newly allocated list
* which should be fma_object_free_items() by the caller.
*/
GList *
-nact_tree_model_get_items( const NactTreeModel *model, guint mode )
+fma_tree_model_get_items( const FMATreeModel *model, guint mode )
{
- static const gchar *thisfn = "nact_tree_model_get_items";
+ static const gchar *thisfn = "fma_tree_model_get_items";
GList *items;
GtkTreeStore *store;
ntmGetItems ngi;
- g_return_val_if_fail( NACT_IS_TREE_MODEL( model ), NULL );
+ g_return_val_if_fail( FMA_IS_TREE_MODEL( model ), NULL );
items = NULL;
@@ -915,8 +915,8 @@ nact_tree_model_get_items( const NactTreeModel *model, guint mode )
}
/**
- * nact_tree_model_object_at_path:
- * @model: this #NactTreeModel instance.
+ * fma_tree_model_object_at_path:
+ * @model: this #FMATreeModel instance.
* @path: the #GtkTreePath to be searched.
*
* Returns: the #FMAObject at the given @path if any, or NULL.
@@ -925,13 +925,13 @@ nact_tree_model_get_items( const NactTreeModel *model, guint mode )
* is owned by the tree store and should not be released by the caller.
*/
FMAObject *
-nact_tree_model_object_at_path( const NactTreeModel *model, GtkTreePath *path )
+fma_tree_model_object_at_path( const FMATreeModel *model, GtkTreePath *path )
{
FMAObject *object;
GtkTreeModel *store;
GtkTreeIter iter;
- g_return_val_if_fail( NACT_IS_TREE_MODEL( model ), NULL );
+ g_return_val_if_fail( FMA_IS_TREE_MODEL( model ), NULL );
object = NULL;
@@ -948,8 +948,8 @@ nact_tree_model_object_at_path( const NactTreeModel *model, GtkTreePath *path )
}
/**
- * nact_tree_model_object_to_path:
- * @model: this #NactTreeModel.
+ * fma_tree_model_object_to_path:
+ * @model: this #FMATreeModel.
* @object: the searched FMAObject.
*
* Returns: a newly allocated GtkTreePath which is the current position
@@ -958,14 +958,14 @@ nact_tree_model_object_at_path( const NactTreeModel *model, GtkTreePath *path )
* The returned path should be gtk_tree_path_free() by the caller.
*/
GtkTreePath *
-nact_tree_model_object_to_path( const NactTreeModel *model, const FMAObject *object )
+fma_tree_model_object_to_path( const FMATreeModel *model, const FMAObject *object )
{
- static const gchar *thisfn = "nact_tree_model_object_to_path";
+ static const gchar *thisfn = "fma_tree_model_object_to_path";
ntmFindObject nfo;
GtkTreeIter iter;
GtkTreeStore *store;
- g_return_val_if_fail( NACT_IS_TREE_MODEL( model ), NULL );
+ g_return_val_if_fail( FMA_IS_TREE_MODEL( model ), NULL );
nfo.path = NULL;
@@ -986,7 +986,7 @@ nact_tree_model_object_to_path( const NactTreeModel *model, const FMAObject *obj
static void
append_item( GtkTreeStore *model, GtkTreeView *treeview, GtkTreeIter *parent, GtkTreeIter *iter, const
FMAObject *object )
{
- /*g_debug( "nact_tree_model_append_item: object=%p (ref_count=%d), parent=%p",
+ /*g_debug( "fma_tree_model_append_item: object=%p (ref_count=%d), parent=%p",
( void * ) object, G_OBJECT( object )->ref_count, ( void * ) parent
);*/
gtk_tree_store_append( model, iter, parent );
@@ -1010,18 +1010,18 @@ display_item( GtkTreeStore *model, GtkTreeView *treeview, GtkTreeIter *iter, con
}
/*
- * nact_tree_model_display_order_change:
- * @model: this #NactTreeModel.
+ * fma_tree_model_display_order_change:
+ * @model: this #FMATreeModel.
* @order_mode: the new order mode.
*
* Setup the new order mode.
*/
static void
-display_order_change( NactTreeModel *model, gint order_mode )
+display_order_change( FMATreeModel *model, gint order_mode )
{
GtkTreeStore *store;
- g_return_if_fail( NACT_IS_TREE_MODEL( model ));
+ g_return_if_fail( FMA_IS_TREE_MODEL( model ));
if( !model->private->dispose_has_run ){
@@ -1061,22 +1061,22 @@ display_order_change( NactTreeModel *model, gint order_mode )
#if 0
/*
* dump:
- * @model: this #NactTreeModel instance.
+ * @model: this #FMATreeModel instance.
*
* Briefly dumps the content of the tree.
*/
static void
-dump( NactTreeModel *model )
+dump( FMATreeModel *model )
{
GList *items;
- items = nact_tree_model_get_items( model, TREE_LIST_ALL );
+ items = fma_tree_model_get_items( model, TREE_LIST_ALL );
fma_object_dump_tree( items );
fma_object_free_items( items );
}
static gboolean
-dump_store( NactTreeModel *model, GtkTreePath *path, FMAObject *object, ntmDumpStruct *ntm )
+dump_store( FMATreeModel *model, GtkTreePath *path, FMAObject *object, ntmDumpStruct *ntm )
{
gint depth;
gint i;
@@ -1110,7 +1110,7 @@ dump_store( NactTreeModel *model, GtkTreePath *path, FMAObject *object, ntmDumpS
static void
fill_tree_store( GtkTreeStore *model, GtkTreeView *treeview, FMAObject *object, GtkTreeIter *parent )
{
- static const gchar *thisfn = "nact_tree_model_fill_tree_store";
+ static const gchar *thisfn = "fma_tree_model_fill_tree_store";
GList *subitems, *it;
GtkTreeIter iter;
@@ -1142,7 +1142,7 @@ fill_tree_store( GtkTreeStore *model, GtkTreeView *treeview, FMAObject *object,
* so is called the first time _before_ the FMAObject be set on the row.
*/
static gboolean
-filter_visible( GtkTreeModel *store, GtkTreeIter *iter, NactTreeModel *model )
+filter_visible( GtkTreeModel *store, GtkTreeIter *iter, FMATreeModel *model )
{
FMAObject *object;
FMAObjectAction *action;
@@ -1166,7 +1166,7 @@ filter_visible( GtkTreeModel *store, GtkTreeIter *iter, NactTreeModel *model )
*/
g_return_val_if_fail( FMA_IS_OBJECT_PROFILE( object ), FALSE );
- if( NACT_TREE_MODEL( model )->private->mode == TREE_MODE_SELECTION ){
+ if( FMA_TREE_MODEL( model )->private->mode == TREE_MODE_SELECTION ){
return( FALSE );
}
@@ -1182,7 +1182,7 @@ filter_visible( GtkTreeModel *store, GtkTreeIter *iter, NactTreeModel *model )
* search for an object, given its id
*/
static gboolean
-find_item_iter( NactTreeModel *model, GtkTreeStore *store, GtkTreePath *path, FMAObject *object, ntmFindId
*nfi )
+find_item_iter( FMATreeModel *model, GtkTreeStore *store, GtkTreePath *path, FMAObject *object, ntmFindId
*nfi )
{
gchar *id;
gboolean found = FALSE;
@@ -1202,7 +1202,7 @@ find_item_iter( NactTreeModel *model, GtkTreeStore *store, GtkTreePath *path, FM
}
static gboolean
-find_object_iter( NactTreeModel *model, GtkTreeStore *store, GtkTreePath *path, FMAObject *object,
ntmFindObject *nfo )
+find_object_iter( FMATreeModel *model, GtkTreeStore *store, GtkTreePath *path, FMAObject *object,
ntmFindObject *nfo )
{
if( object == nfo->object ){
if( gtk_tree_model_get_iter( GTK_TREE_MODEL( store ), nfo->iter, path )){
@@ -1221,7 +1221,7 @@ find_object_iter( NactTreeModel *model, GtkTreeStore *store, GtkTreePath *path,
* This function is called from iter_on_store_item();
*/
static gboolean
-get_items_iter( const NactTreeModel *model, GtkTreeStore *store, GtkTreePath *path, FMAObject *object,
ntmGetItems *ngi )
+get_items_iter( const FMATreeModel *model, GtkTreeStore *store, GtkTreePath *path, FMAObject *object,
ntmGetItems *ngi )
{
if( ngi->mode & TREE_LIST_ALL ){
if( gtk_tree_path_get_depth( path ) == 1 ){
@@ -1234,7 +1234,7 @@ get_items_iter( const NactTreeModel *model, GtkTreeStore *store, GtkTreePath *pa
}
static void
-iter_on_store( const NactTreeModel *model, GtkTreeModel *store, GtkTreeIter *parent, FnIterOnStore fn,
gpointer user_data )
+iter_on_store( const FMATreeModel *model, GtkTreeModel *store, GtkTreeIter *parent, FnIterOnStore fn,
gpointer user_data )
{
GtkTreeIter iter;
gboolean stop;
@@ -1249,7 +1249,7 @@ iter_on_store( const NactTreeModel *model, GtkTreeModel *store, GtkTreeIter *par
}
static gboolean
-iter_on_store_item( const NactTreeModel *model, GtkTreeModel *store, GtkTreeIter *iter, FnIterOnStore fn,
gpointer user_data )
+iter_on_store_item( const FMATreeModel *model, GtkTreeModel *store, GtkTreeIter *iter, FnIterOnStore fn,
gpointer user_data )
{
FMAObject *object;
GtkTreePath *path;
@@ -1262,7 +1262,7 @@ iter_on_store_item( const NactTreeModel *model, GtkTreeModel *store, GtkTreeIter
g_object_unref( object );
/*
- g_debug( "nact_tree_model_iter_on_store_item: object=%p (%s, ref_count=%d)",
+ g_debug( "fma_tree_model_iter_on_store_item: object=%p (%s, ref_count=%d)",
( void * ) object, G_OBJECT_TYPE_NAME( object ), G_OBJECT( object )->ref_count );
*/
@@ -1282,7 +1282,7 @@ iter_on_store_item( const NactTreeModel *model, GtkTreeModel *store, GtkTreeIter
* then remove it first
*/
static void
-remove_if_exists( NactTreeModel *model, GtkTreeModel *store, const FMAObject *object )
+remove_if_exists( FMATreeModel *model, GtkTreeModel *store, const FMAObject *object )
{
ntmFindId nfi;
GtkTreeIter iter;
@@ -1296,7 +1296,7 @@ remove_if_exists( NactTreeModel *model, GtkTreeModel *store, const FMAObject *ob
iter_on_store( model, store, NULL, ( FnIterOnStore ) find_item_iter, &nfi );
if( nfi.object ){
- g_debug( "nact_tree_model_remove_if_exists: removing %s %p",
+ g_debug( "fma_tree_model_remove_if_exists: removing %s %p",
G_OBJECT_TYPE_NAME( object ), ( void * ) object );
gtk_tree_store_remove( GTK_TREE_STORE( store ), nfi.iter );
}
@@ -1326,7 +1326,7 @@ delete_items_rec( GtkTreeStore *store, GtkTreeIter *iter )
static gint
sort_actions_list( GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b, gpointer user_data )
{
- /*static const gchar *thisfn = "nact_tree_model_sort_actions_list";*/
+ /*static const gchar *thisfn = "fma_tree_model_sort_actions_list";*/
FMAObjectId *obj_a, *obj_b;
gint ret;
diff --git a/src/ui/nact-tree-model.h b/src/ui/fma-tree-model.h
similarity index 51%
rename from src/ui/nact-tree-model.h
rename to src/ui/fma-tree-model.h
index 9b5a162..df483a6 100644
--- a/src/ui/nact-tree-model.h
+++ b/src/ui/fma-tree-model.h
@@ -28,21 +28,21 @@
*/
/**
- * SECTION: nact_tree_model
- * @short_description: #NactTreeModel class definition.
- * @include: ui/nact-tree-model.h
+ * SECTION: fma_tree_model
+ * @short_description: #FMATreeModel class definition.
+ * @include: ui/fma-tree-model.h
*
- * NactTreeModel is derived from GtkTreeModelFilter in order to be able
+ * FMATreeModel is derived from GtkTreeModelFilter in order to be able
* to selectively display profiles, whether an action has one or more
* profiles.
*
- * NactTreeModel implements EggTreeMultiDragSource and GtkTreeDragDest
+ * FMATreeModel implements EggTreeMultiDragSource and GtkTreeDragDest
* interfaces.
*
* The GtkTreeModelFilter base class embeds a GtkTreeStore.
*/
-#ifndef __UI_NACT_TREE_MODEL_H__
-#define __UI_NACT_TREE_MODEL_H__
+#ifndef __UI_FMA_TREE_MODEL_H__
+#define __UI_FMA_TREE_MODEL_H__
#include "api/fma-object.h"
@@ -50,27 +50,27 @@
G_BEGIN_DECLS
-#define NACT_TYPE_TREE_MODEL ( nact_tree_model_get_type())
-#define NACT_TREE_MODEL( object ) ( G_TYPE_CHECK_INSTANCE_CAST(( object ), NACT_TYPE_TREE_MODEL,
NactTreeModel ))
-#define NACT_TREE_MODEL_CLASS( klass ) ( G_TYPE_CHECK_CLASS_CAST(( klass ), NACT_TYPE_TREE_MODEL,
NactTreeModelClass ))
-#define NACT_IS_TREE_MODEL( object ) ( G_TYPE_CHECK_INSTANCE_TYPE(( object ), NACT_TYPE_TREE_MODEL ))
-#define NACT_IS_TREE_MODEL_CLASS( klass ) ( G_TYPE_CHECK_CLASS_TYPE(( klass ), NACT_TYPE_TREE_MODEL ))
-#define NACT_TREE_MODEL_GET_CLASS( object ) ( G_TYPE_INSTANCE_GET_CLASS(( object ), NACT_TYPE_TREE_MODEL,
NactTreeModelClass ))
+#define FMA_TYPE_TREE_MODEL ( fma_tree_model_get_type())
+#define FMA_TREE_MODEL( object ) ( G_TYPE_CHECK_INSTANCE_CAST(( object ), FMA_TYPE_TREE_MODEL,
FMATreeModel ))
+#define FMA_TREE_MODEL_CLASS( klass ) ( G_TYPE_CHECK_CLASS_CAST(( klass ), FMA_TYPE_TREE_MODEL,
FMATreeModelClass ))
+#define FMA_IS_TREE_MODEL( object ) ( G_TYPE_CHECK_INSTANCE_TYPE(( object ), FMA_TYPE_TREE_MODEL ))
+#define FMA_IS_TREE_MODEL_CLASS( klass ) ( G_TYPE_CHECK_CLASS_TYPE(( klass ), FMA_TYPE_TREE_MODEL ))
+#define FMA_TREE_MODEL_GET_CLASS( object ) ( G_TYPE_INSTANCE_GET_CLASS(( object ), FMA_TYPE_TREE_MODEL,
FMATreeModelClass ))
-typedef struct _NactTreeModelPrivate NactTreeModelPrivate;
+typedef struct _FMATreeModelPrivate FMATreeModelPrivate;
typedef struct {
/*< private >*/
GtkTreeModelFilter parent;
- NactTreeModelPrivate *private;
+ FMATreeModelPrivate *private;
}
- NactTreeModel;
+ FMATreeModel;
typedef struct {
/*< private >*/
GtkTreeModelFilterClass parent;
}
- NactTreeModelClass;
+ FMATreeModelClass;
/**
* Column ordering in the tree view
@@ -82,42 +82,42 @@ enum {
TREE_N_COLUMN
};
-GType nact_tree_model_get_type ( void );
+GType fma_tree_model_get_type ( void );
-NactTreeModel *nact_tree_model_new ( GtkTreeView *treeview );
+FMATreeModel *fma_tree_model_new ( GtkTreeView *treeview );
-void nact_tree_model_set_main_window ( NactTreeModel *tmodel,
+void fma_tree_model_set_main_window ( FMATreeModel *tmodel,
FMAMainWindow *main_window );
-void nact_tree_model_set_edition_mode( NactTreeModel *tmodel,
+void fma_tree_model_set_edition_mode( FMATreeModel *tmodel,
guint mode );
-GtkTreePath *nact_tree_model_delete ( NactTreeModel *model,
+GtkTreePath *fma_tree_model_delete ( FMATreeModel *model,
FMAObject *object );
-void nact_tree_model_fill ( NactTreeModel *model,
+void fma_tree_model_fill ( FMATreeModel *model,
GList *items );
-GtkTreePath *nact_tree_model_insert_before ( NactTreeModel *model,
+GtkTreePath *fma_tree_model_insert_before ( FMATreeModel *model,
const FMAObject *object,
GtkTreePath *path );
-GtkTreePath *nact_tree_model_insert_into ( NactTreeModel *model,
+GtkTreePath *fma_tree_model_insert_into ( FMATreeModel *model,
const FMAObject *object,
GtkTreePath *path );
-FMAObjectItem *nact_tree_model_get_item_by_id ( const NactTreeModel *model,
+FMAObjectItem *fma_tree_model_get_item_by_id ( const FMATreeModel *model,
const gchar *id );
-GList *nact_tree_model_get_items ( const NactTreeModel *model,
+GList *fma_tree_model_get_items ( const FMATreeModel *model,
guint mode );
-FMAObject *nact_tree_model_object_at_path ( const NactTreeModel *model,
+FMAObject *fma_tree_model_object_at_path ( const FMATreeModel *model,
GtkTreePath *path );
-GtkTreePath *nact_tree_model_object_to_path ( const NactTreeModel *model,
+GtkTreePath *fma_tree_model_object_to_path ( const FMATreeModel *model,
const FMAObject *object );
G_END_DECLS
-#endif /* __UI_NACT_TREE_MODEL_H__ */
+#endif /* __UI_FMA_TREE_MODEL_H__ */
diff --git a/src/ui/nact-tree-view.c b/src/ui/nact-tree-view.c
index 6f14840..d6ffc49 100644
--- a/src/ui/nact-tree-view.c
+++ b/src/ui/nact-tree-view.c
@@ -41,7 +41,7 @@
#include "fma-application.h"
#include "fma-main-window.h"
#include "nact-tree-view.h"
-#include "nact-tree-model.h"
+#include "fma-tree-model.h"
#include "fma-tree-ieditable.h"
/* private instance data
@@ -475,7 +475,7 @@ initialize_gtk( NactTreeView *view )
static const gchar *thisfn = "nact_tree_view_initialize_gtk";
NactTreeViewPrivate *priv;
GtkWidget *scrolled, *tview;
- NactTreeModel *model;
+ FMATreeModel *model;
GtkTreeViewColumn *column;
GtkCellRenderer *renderer;
GtkTreeSelection *selection;
@@ -495,8 +495,8 @@ initialize_gtk( NactTreeView *view )
priv->tree_view = GTK_TREE_VIEW( tview );
gtk_tree_view_set_headers_visible( priv->tree_view, FALSE );
- model = nact_tree_model_new( GTK_TREE_VIEW( tview ));
- nact_tree_model_set_main_window( model, priv->window );
+ model = fma_tree_model_new( GTK_TREE_VIEW( tview ));
+ fma_tree_model_set_main_window( model, priv->window );
gtk_tree_view_set_model( GTK_TREE_VIEW( tview ), GTK_TREE_MODEL( model ));
g_object_unref( model );
@@ -593,8 +593,8 @@ nact_tree_view_set_edition_mode( NactTreeView *view, guint mode )
}
tmodel = gtk_tree_view_get_model( priv->tree_view );
- g_return_if_fail( tmodel && NACT_IS_TREE_MODEL( tmodel ));
- nact_tree_model_set_edition_mode( NACT_TREE_MODEL( tmodel ), mode );
+ g_return_if_fail( tmodel && FMA_IS_TREE_MODEL( tmodel ));
+ fma_tree_model_set_edition_mode( FMA_TREE_MODEL( tmodel ), mode );
}
}
@@ -734,7 +734,7 @@ void
nact_tree_view_fill( NactTreeView *view, GList *items )
{
static const gchar *thisfn = "nact_tree_view_fill";
- NactTreeModel *model;
+ FMATreeModel *model;
gint nb_menus, nb_actions, nb_profiles;
g_return_if_fail( NACT_IS_TREE_VIEW( view ));
@@ -745,9 +745,9 @@ nact_tree_view_fill( NactTreeView *view, GList *items )
clear_selection( view );
view->private->notify_allowed = FALSE;
- model = NACT_TREE_MODEL( gtk_tree_view_get_model( view->private->tree_view ));
- nact_tree_model_fill( model, items );
- g_debug( "%s: nact_tree_model_ref_count=%d", thisfn, G_OBJECT( model )->ref_count );
+ model = FMA_TREE_MODEL( gtk_tree_view_get_model( view->private->tree_view ));
+ fma_tree_model_fill( model, items );
+ g_debug( "%s: fma_tree_model_ref_count=%d", thisfn, G_OBJECT( model )->ref_count );
view->private->notify_allowed = TRUE;
fma_object_count_items( items, &nb_menus, &nb_actions, &nb_profiles );
@@ -845,7 +845,7 @@ FMAObjectItem *
nact_tree_view_get_item_by_id( const NactTreeView *view, const gchar *id )
{
FMAObjectItem *item;
- NactTreeModel *model;
+ FMATreeModel *model;
g_return_val_if_fail( NACT_IS_TREE_VIEW( view ), NULL );
@@ -853,8 +853,8 @@ nact_tree_view_get_item_by_id( const NactTreeView *view, const gchar *id )
if( !view->private->dispose_has_run ){
- model = NACT_TREE_MODEL( gtk_tree_view_get_model( view->private->tree_view ));
- item = nact_tree_model_get_item_by_id( model, id );
+ model = FMA_TREE_MODEL( gtk_tree_view_get_model( view->private->tree_view ));
+ item = fma_tree_model_get_item_by_id( model, id );
}
return( item );
@@ -885,7 +885,7 @@ GList *
nact_tree_view_get_items_ex( const NactTreeView *view, guint mode )
{
GList *items;
- NactTreeModel *model;
+ FMATreeModel *model;
GList *deleted;
g_return_val_if_fail( NACT_IS_TREE_VIEW( view ), NULL );
@@ -902,8 +902,8 @@ nact_tree_view_get_items_ex( const NactTreeView *view, guint mode )
}
}
- model = NACT_TREE_MODEL( gtk_tree_view_get_model( view->private->tree_view ));
- items = nact_tree_model_get_items( model, mode );
+ model = FMA_TREE_MODEL( gtk_tree_view_get_model( view->private->tree_view ));
+ items = fma_tree_model_get_items( model, mode );
items = g_list_concat( items, deleted );
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]