[nautilus-actions/file-manager-actions] NactTreeIEditable interface is renamed to FMATreeIEditable
- From: Pierre Wieser <pwieser src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus-actions/file-manager-actions] NactTreeIEditable interface is renamed to FMATreeIEditable
- Date: Tue, 8 Sep 2015 19:01:18 +0000 (UTC)
commit e6db0575709e58cab6a9a2b9ae1810489898576e
Author: Pierre Wieser <pwieser trychlos org>
Date: Tue Sep 8 20:33:41 2015 +0200
NactTreeIEditable interface is renamed to FMATreeIEditable
src/ui/Makefile.am | 4 +-
src/ui/fma-assistant-import.c | 6 +-
src/ui/fma-menu-edit.c | 12 +-
src/ui/fma-menu-file.c | 12 +-
...{nact-tree-ieditable.c => fma-tree-ieditable.c} | 200 ++++++++++----------
...{nact-tree-ieditable.h => fma-tree-ieditable.h} | 50 +++---
src/ui/nact-tree-model-dnd.c | 10 +-
src/ui/nact-tree-view.c | 18 +-
8 files changed, 156 insertions(+), 156 deletions(-)
---
diff --git a/src/ui/Makefile.am b/src/ui/Makefile.am
index ce08fd8..cd48d8b 100644
--- a/src/ui/Makefile.am
+++ b/src/ui/Makefile.am
@@ -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 \
diff --git a/src/ui/fma-assistant-import.c b/src/ui/fma-assistant-import.c
index c84d737..786ab1b 100644
--- a/src/ui/fma-assistant-import.c
+++ b/src/ui/fma-assistant-import.c
@@ -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;
}
}
diff --git a/src/ui/fma-menu-edit.c b/src/ui/fma-menu-edit.c
index 1b2c9b5..cd7469a 100644
--- a/src/ui/fma-menu-edit.c
+++ b/src/ui/fma-menu-edit.c
@@ -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 );
diff --git a/src/ui/fma-menu-file.c b/src/ui/fma-menu-file.c
index 860ceda..065d0ce 100644
--- a/src/ui/fma-menu-file.c
+++ b/src/ui/fma-menu-file.c
@@ -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 {
diff --git a/src/ui/nact-tree-ieditable.c b/src/ui/fma-tree-ieditable.c
similarity index 81%
rename from src/ui/nact-tree-ieditable.c
rename to src/ui/fma-tree-ieditable.c
index aab56b6..b2e97b0 100644
--- a/src/ui/nact-tree-ieditable.c
+++ b/src/ui/fma-tree-ieditable.c
@@ -40,21 +40,21 @@
#include "base-keysyms.h"
#include "fma-application.h"
#include "fma-main-window.h"
-#include "nact-tree-ieditable.h"
+#include "fma-tree-ieditable.h"
#include "nact-tree-model.h"
#include "nact-tree-view.h"
/* private interface data
*/
-struct _NactTreeIEditableInterfacePrivate {
+struct _FMATreeIEditableInterfacePrivate {
void *empty; /* so that gcc -pedantic is happy */
};
/* data attached to the NactTreeView
*/
typedef struct {
- FMAUpdater *updater;
- FMAMainWindow *main_window;
+ FMAUpdater *updater;
+ FMAMainWindow *main_window;
GtkTreeView *treeview;
NactTreeModel *model;
gulong modified_handler_id;
@@ -71,29 +71,29 @@ typedef struct {
static guint st_initializations = 0; /* interface initialization count */
static GType register_type( void );
-static void interface_base_init( NactTreeIEditableInterface *klass );
-static void interface_base_finalize( NactTreeIEditableInterface *klass );
-static gboolean on_key_pressed_event( GtkWidget *widget, GdkEventKey *event, NactTreeIEditable
*instance );
+static void interface_base_init( FMATreeIEditableInterface *klass );
+static void interface_base_finalize( FMATreeIEditableInterface *klass );
+static gboolean on_key_pressed_event( GtkWidget *widget, GdkEventKey *event, FMATreeIEditable
*instance );
static void on_label_edited( GtkCellRendererText *renderer, const gchar *path_str, const gchar
*text, NactTreeView *items_view );
-static void on_tree_view_selection_changed( NactTreeIEditable *view, GList *selected_items, void
*empty );
-static void on_object_modified_status_changed( NactTreeIEditable *view, FMAObject *object,
gboolean new_status, void *empty );
-static void on_object_valid_status_changed( NactTreeIEditable *view, FMAObject *object, gboolean
new_status, void *empty );
-static void on_tree_view_level_zero_changed( NactTreeIEditable *view, gboolean is_modified, void
*empty );
-static void on_tree_view_modified_status_changed( NactTreeIEditable *view, gboolean is_modified,
void *empty );
+static void on_tree_view_selection_changed( FMATreeIEditable *view, GList *selected_items, void
*empty );
+static void on_object_modified_status_changed( FMATreeIEditable *view, FMAObject *object, gboolean
new_status, void *empty );
+static void on_object_valid_status_changed( FMATreeIEditable *view, FMAObject *object, gboolean
new_status, void *empty );
+static void on_tree_view_level_zero_changed( FMATreeIEditable *view, gboolean is_modified, void
*empty );
+static void on_tree_view_modified_status_changed( FMATreeIEditable *view, gboolean is_modified,
void *empty );
static void add_to_deleted_rec( IEditableData *ied, FMAObject *object );
-static void decrement_counters( NactTreeIEditable *view, IEditableData *ialid, GList *items );
+static void decrement_counters( FMATreeIEditable *view, IEditableData *ialid, GList *items );
static GtkTreePath *do_insert_before( IEditableData *ied, GList *items, GtkTreePath *insert_path );
static GtkTreePath *do_insert_into( IEditableData *ied, GList *items, GtkTreePath *insert_path );
-static void increment_counters( NactTreeIEditable *view, IEditableData *ied, GList *items );
-static void check_level_zero_status( NactTreeIEditable *instance );
+static void increment_counters( FMATreeIEditable *view, IEditableData *ied, GList *items );
+static void check_level_zero_status( FMATreeIEditable *instance );
static gchar *get_items_id_list_str( GList *items_list );
static GtkTreePath *get_selection_first_path( GtkTreeView *treeview );
static gboolean get_modification_status( IEditableData *ied );
-static IEditableData *get_instance_data( NactTreeIEditable *view );
-static void inline_edition( NactTreeIEditable *view );
+static IEditableData *get_instance_data( FMATreeIEditable *view );
+static void inline_edition( FMATreeIEditable *view );
GType
-nact_tree_ieditable_get_type( void )
+fma_tree_ieditable_get_type( void )
{
static GType iface_type = 0;
@@ -107,11 +107,11 @@ nact_tree_ieditable_get_type( void )
static GType
register_type( void )
{
- static const gchar *thisfn = "nact_tree_ieditable_register_type";
+ static const gchar *thisfn = "fma_tree_ieditable_register_type";
GType type;
static const GTypeInfo info = {
- sizeof( NactTreeIEditableInterface ),
+ sizeof( FMATreeIEditableInterface ),
( GBaseInitFunc ) interface_base_init,
( GBaseFinalizeFunc ) interface_base_finalize,
NULL,
@@ -124,7 +124,7 @@ register_type( void )
g_debug( "%s", thisfn );
- type = g_type_register_static( G_TYPE_INTERFACE, "NactTreeIEditable", &info, 0 );
+ type = g_type_register_static( G_TYPE_INTERFACE, "FMATreeIEditable", &info, 0 );
g_type_interface_add_prerequisite( type, NACT_TYPE_TREE_VIEW );
@@ -132,24 +132,24 @@ register_type( void )
}
static void
-interface_base_init( NactTreeIEditableInterface *klass )
+interface_base_init( FMATreeIEditableInterface *klass )
{
- static const gchar *thisfn = "nact_tree_ieditable_interface_base_init";
+ static const gchar *thisfn = "fma_tree_ieditable_interface_base_init";
if( !st_initializations ){
g_debug( "%s: klass=%p", thisfn, ( void * ) klass );
- klass->private = g_new0( NactTreeIEditableInterfacePrivate, 1 );
+ klass->private = g_new0( FMATreeIEditableInterfacePrivate, 1 );
}
st_initializations += 1;
}
static void
-interface_base_finalize( NactTreeIEditableInterface *klass )
+interface_base_finalize( FMATreeIEditableInterface *klass )
{
- static const gchar *thisfn = "nact_tree_ieditable_interface_base_finalize";
+ static const gchar *thisfn = "fma_tree_ieditable_interface_base_finalize";
st_initializations -= 1;
@@ -162,7 +162,7 @@ interface_base_finalize( NactTreeIEditableInterface *klass )
}
/**
- * nact_tree_ieditable_initialize:
+ * fma_tree_ieditable_initialize:
* @instance: the #NactTreeView which implements this interface.
* @treeview: the embedded #GtkTreeView tree view.
* @window: the #BaseWindow which embeds the @instance.
@@ -170,15 +170,15 @@ interface_base_finalize( NactTreeIEditableInterface *klass )
* Initialize the interface, mainly connecting to signals of interest.
*/
void
-nact_tree_ieditable_initialize( NactTreeIEditable *instance, GtkTreeView *treeview, FMAMainWindow
*main_window )
+fma_tree_ieditable_initialize( FMATreeIEditable *instance, GtkTreeView *treeview, FMAMainWindow *main_window
)
{
- static const gchar *thisfn = "nact_tree_ieditable_initialize";
+ static const gchar *thisfn = "fma_tree_ieditable_initialize";
IEditableData *ied;
GtkApplication *application;
GtkTreeViewColumn *column;
GList *renderers;
- g_return_if_fail( instance && NACT_IS_TREE_IEDITABLE( instance ));
+ g_return_if_fail( instance && FMA_IS_TREE_IEDITABLE( instance ));
g_debug( "%s: instance=%p (%s), treeview=%p, main_window=%p",
thisfn,
@@ -230,18 +230,18 @@ nact_tree_ieditable_initialize( NactTreeIEditable *instance, GtkTreeView *treevi
}
/**
- * nact_tree_ieditable_terminate:
+ * fma_tree_ieditable_terminate:
* @instance: the #NactTreeView which implements this interface.
*
* Free the data when application quits.
*/
void
-nact_tree_ieditable_terminate( NactTreeIEditable *instance )
+fma_tree_ieditable_terminate( FMATreeIEditable *instance )
{
- static const gchar *thisfn = "nact_tree_ieditable_terminate";
+ static const gchar *thisfn = "fma_tree_ieditable_terminate";
IEditableData *ied;
- g_return_if_fail( NACT_IS_TREE_IEDITABLE( instance ));
+ g_return_if_fail( FMA_IS_TREE_IEDITABLE( instance ));
g_debug( "%s: instance=%p (%s)", thisfn, ( void * ) instance, G_OBJECT_TYPE_NAME( instance ));
@@ -257,7 +257,7 @@ nact_tree_ieditable_terminate( NactTreeIEditable *instance )
}
static gboolean
-on_key_pressed_event( GtkWidget *widget, GdkEventKey *event, NactTreeIEditable *instance )
+on_key_pressed_event( GtkWidget *widget, GdkEventKey *event, FMATreeIEditable *instance )
{
gboolean stop = FALSE;
@@ -294,7 +294,7 @@ on_label_edited( GtkCellRendererText *renderer, const gchar *path_str, const gch
}
static void
-on_tree_view_selection_changed( NactTreeIEditable *instance, GList *selected_items, void *empty )
+on_tree_view_selection_changed( FMATreeIEditable *instance, GList *selected_items, void *empty )
{
IEditableData *ied;
FMAObject *object;
@@ -316,9 +316,9 @@ on_tree_view_selection_changed( NactTreeIEditable *instance, GList *selected_ite
* - refresh the display
*/
static void
-on_object_modified_status_changed( NactTreeIEditable *instance, FMAObject *object, gboolean is_modified,
void *empty )
+on_object_modified_status_changed( FMATreeIEditable *instance, FMAObject *object, gboolean is_modified, void
*empty )
{
- static const gchar *thisfn = "nact_tree_ieditable_on_object_modified_status_changed";
+ static const gchar *thisfn = "fma_tree_ieditable_on_object_modified_status_changed";
IEditableData *ied;
gboolean prev_status, status;
@@ -352,9 +352,9 @@ on_object_modified_status_changed( NactTreeIEditable *instance, FMAObject *objec
* - refresh the display
*/
static void
-on_object_valid_status_changed( NactTreeIEditable *instance, FMAObject *object, gboolean new_status, void
*empty )
+on_object_valid_status_changed( FMATreeIEditable *instance, FMAObject *object, gboolean new_status, void
*empty )
{
- static const gchar *thisfn = "nact_tree_ieditable_on_object_valid_status_changed";
+ static const gchar *thisfn = "fma_tree_ieditable_on_object_valid_status_changed";
IEditableData *ied;
g_debug( "%s: instance=%p, new_status=%s, empty=%p",
@@ -368,7 +368,7 @@ on_object_valid_status_changed( NactTreeIEditable *instance, FMAObject *object,
* order or list of items at level zero of the tree has changed
*/
static void
-on_tree_view_level_zero_changed( NactTreeIEditable *view, gboolean is_modified, void *empty )
+on_tree_view_level_zero_changed( FMATreeIEditable *view, gboolean is_modified, void *empty )
{
IEditableData *ied;
gboolean prev_status, status;
@@ -389,7 +389,7 @@ on_tree_view_level_zero_changed( NactTreeIEditable *view, gboolean is_modified,
* the tree has been reloaded
*/
static void
-on_tree_view_modified_status_changed( NactTreeIEditable *view, gboolean is_modified, void *empty )
+on_tree_view_modified_status_changed( FMATreeIEditable *view, gboolean is_modified, void *empty )
{
IEditableData *ied;
@@ -402,8 +402,8 @@ on_tree_view_modified_status_changed( NactTreeIEditable *view, gboolean is_modif
}
/**
- * nact_tree_ieditable_delete:
- * @instance: this #NactTreeIEditable instance.
+ * fma_tree_ieditable_delete:
+ * @instance: this #FMATreeIEditable instance.
* @list: list of #FMAObject to be deleted.
* @ope: whether the objects are actually to be deleted, or just moved
* to another path of the tree.
@@ -423,16 +423,16 @@ on_tree_view_modified_status_changed( NactTreeIEditable *view, gboolean is_modif
* neither the 'deleted' list nor the 'count_modified' counter are modified.
*/
void
-nact_tree_ieditable_delete( NactTreeIEditable *instance, GList *items, TreeIEditableDeleteOpe ope )
+fma_tree_ieditable_delete( FMATreeIEditable *instance, GList *items, TreeIEditableDeleteOpe ope )
{
- static const gchar *thisfn = "nact_tree_ieditable_delete";
+ static const gchar *thisfn = "fma_tree_ieditable_delete";
IEditableData *ied;
gboolean prev_status, status;
GtkTreePath *path;
GList *it;
FMAObjectItem *parent;
- g_return_if_fail( NACT_IS_TREE_IEDITABLE( instance ));
+ g_return_if_fail( FMA_IS_TREE_IEDITABLE( instance ));
g_debug( "%s: instance=%p, items=%p (count=%d), ope=%u",
thisfn, ( void * ) instance, ( void * ) items, g_list_length( items ), ope );
@@ -533,7 +533,7 @@ add_to_deleted_rec( IEditableData *ied, FMAObject *object )
* update the total count of elements
*/
static void
-decrement_counters( NactTreeIEditable *view, IEditableData *ied, GList *items )
+decrement_counters( FMATreeIEditable *view, IEditableData *ied, GList *items )
{
static const gchar *thisfn = "nact_tree_editable_decrement_counters";
gint menus, actions, profiles;
@@ -549,14 +549,14 @@ decrement_counters( NactTreeIEditable *view, IEditableData *ied, GList *items )
}
/**
- * nact_tree_ieditable_remove_deleted:
- * @instance: this #NactTreeIEditable *instance.
+ * fma_tree_ieditable_remove_deleted:
+ * @instance: this #FMATreeIEditable *instance.
* @messages: a pointer to a #GSList of error messages.
*
* Actually removes the deleted items from the underlying I/O storage subsystem.
*
* @messages #GSList is only filled up in case of an error has occured.
- * If there is no error (nact_tree_ieditable_remove_deleted() returns %TRUE),
+ * If there is no error (fma_tree_ieditable_remove_deleted() returns %TRUE),
* then the caller may safely assume that @messages is returned in the
* same state that it has been provided.
*
@@ -564,16 +564,16 @@ decrement_counters( NactTreeIEditable *view, IEditableData *ied, GList *items )
* %FALSE else.
*/
gboolean
-nact_tree_ieditable_remove_deleted( NactTreeIEditable *instance, GSList **messages )
+fma_tree_ieditable_remove_deleted( FMATreeIEditable *instance, GSList **messages )
{
- static const gchar *thisfn = "nact_tree_ieditable_remove_deleted";
+ static const gchar *thisfn = "fma_tree_ieditable_remove_deleted";
gboolean delete_ok;
IEditableData *ied;
GList *it;
FMAObjectItem *item;
GList *not_deleted;
- g_return_val_if_fail( NACT_IS_TREE_IEDITABLE( instance ), TRUE );
+ g_return_val_if_fail( FMA_IS_TREE_IEDITABLE( instance ), TRUE );
delete_ok = TRUE;
ied = get_instance_data( instance );
@@ -597,7 +597,7 @@ nact_tree_ieditable_remove_deleted( NactTreeIEditable *instance, GSList **messag
* (i.e. possibly modified)
*/
if( not_deleted ){
- nact_tree_ieditable_insert_items( instance, not_deleted, NULL );
+ fma_tree_ieditable_insert_items( instance, not_deleted, NULL );
fma_object_free_items( not_deleted );
}
@@ -605,19 +605,19 @@ nact_tree_ieditable_remove_deleted( NactTreeIEditable *instance, GSList **messag
}
/**
- * nact_tree_ieditable_get_deleted:
- * @instance: this #NactTreeIEditable *instance.
+ * fma_tree_ieditable_get_deleted:
+ * @instance: this #FMATreeIEditable *instance.
*
* Returns: a copy of the 'deleted' list, which should be fma_object_free_items()
* by the caller.
*/
GList *
-nact_tree_ieditable_get_deleted( NactTreeIEditable *instance )
+fma_tree_ieditable_get_deleted( FMATreeIEditable *instance )
{
GList *deleted;
IEditableData *ied;
- g_return_val_if_fail( NACT_IS_TREE_IEDITABLE( instance ), NULL );
+ g_return_val_if_fail( FMA_IS_TREE_IEDITABLE( instance ), NULL );
ied = get_instance_data( instance );
deleted = fma_object_copyref_items( ied->deleted );
@@ -626,8 +626,8 @@ nact_tree_ieditable_get_deleted( NactTreeIEditable *instance )
}
/**
- * nact_tree_ieditable_insert_items:
- * @instance: this #NactTreeIEditable instance.
+ * fma_tree_ieditable_insert_items:
+ * @instance: this #FMATreeIEditable instance.
* @items: a list of items to be inserted (e.g. from a paste).
* @sibling: the #FMAObject besides which the insertion should occurs;
* this is mainly used for inserting duplicated items besides each of
@@ -649,14 +649,14 @@ nact_tree_ieditable_get_deleted( NactTreeIEditable *instance )
* on the lastly inserted item, and to refresh the display.
*/
void
-nact_tree_ieditable_insert_items( NactTreeIEditable *instance, GList *items, FMAObject *sibling )
+fma_tree_ieditable_insert_items( FMATreeIEditable *instance, GList *items, FMAObject *sibling )
{
- static const gchar *thisfn = "nact_tree_ieditable_insert_items";
+ static const gchar *thisfn = "fma_tree_ieditable_insert_items";
IEditableData *ied;
GtkTreePath *insert_path;
FMAObject *object, *parent;
- g_return_if_fail( NACT_IS_TREE_IEDITABLE( instance ));
+ g_return_if_fail( FMA_IS_TREE_IEDITABLE( instance ));
g_return_if_fail( items );
g_debug( "%s: instance=%p, items=%p (count=%d), sibling=%p",
@@ -676,7 +676,7 @@ nact_tree_ieditable_insert_items( NactTreeIEditable *instance, GList *items, FMA
/* as a particular case, insert a new profile _into_ current action
*/
if( FMA_IS_OBJECT_ACTION( object ) && FMA_IS_OBJECT_PROFILE( items->data )){
- nact_tree_ieditable_insert_into( instance, items );
+ fma_tree_ieditable_insert_into( instance, items );
gtk_tree_path_free( insert_path );
return;
}
@@ -690,13 +690,13 @@ nact_tree_ieditable_insert_items( NactTreeIEditable *instance, GList *items, FMA
}
}
- nact_tree_ieditable_insert_at_path( instance, items, insert_path );
+ fma_tree_ieditable_insert_at_path( instance, items, insert_path );
gtk_tree_path_free( insert_path );
}
/**
- * nact_tree_ieditable_insert_at_path:
- * @instance: this #NactTreeIEditable instance.
+ * fma_tree_ieditable_insert_at_path:
+ * @instance: this #FMATreeIEditable instance.
* @items: a list of items to be inserted (e.g. from a paste).
* @path: insertion path.
*
@@ -706,16 +706,16 @@ nact_tree_ieditable_insert_items( NactTreeIEditable *instance, GList *items, FMA
* possible, and refilter the display model.
*/
void
-nact_tree_ieditable_insert_at_path( NactTreeIEditable *instance, GList *items, GtkTreePath *insert_path )
+fma_tree_ieditable_insert_at_path( FMATreeIEditable *instance, GList *items, GtkTreePath *insert_path )
{
- static const gchar *thisfn = "nact_tree_ieditable_insert_at_path";
+ static const gchar *thisfn = "fma_tree_ieditable_insert_at_path";
IEditableData *ied;
GtkTreePath *actual_path;
gboolean prev_status, status;
FMAObjectItem *parent;
GList *it;
- g_return_if_fail( NACT_IS_TREE_IEDITABLE( instance ));
+ g_return_if_fail( FMA_IS_TREE_IEDITABLE( instance ));
g_debug( "%s: instance=%p, items=%p (count=%d)",
thisfn, ( void * ) instance, ( void * ) items, g_list_length( items ));
@@ -751,8 +751,8 @@ nact_tree_ieditable_insert_at_path( NactTreeIEditable *instance, GList *items, G
}
/**
- * nact_tree_ieditable_insert_into:
- * @instance: this #NactTreeIEditable instance.
+ * fma_tree_ieditable_insert_into:
+ * @instance: this #FMATreeIEditable instance.
* @items: a list of items to be inserted (e.g. from a paste).
*
* Inserts the provided @items list as first children of the current item.
@@ -770,15 +770,15 @@ nact_tree_ieditable_insert_at_path( NactTreeIEditable *instance, GList *items, G
* last inserted item, and refilter the display model.
*/
void
-nact_tree_ieditable_insert_into( NactTreeIEditable *instance, GList *items )
+fma_tree_ieditable_insert_into( FMATreeIEditable *instance, GList *items )
{
- static const gchar *thisfn = "nact_tree_ieditable_insert_into";
+ static const gchar *thisfn = "fma_tree_ieditable_insert_into";
IEditableData *ied;
GtkTreePath *insert_path;
GtkTreePath *new_path;
FMAObjectItem *parent;
- g_return_if_fail( NACT_IS_TREE_IEDITABLE( instance ));
+ g_return_if_fail( FMA_IS_TREE_IEDITABLE( instance ));
g_debug( "%s: instance=%p, items=%p (count=%d)",
thisfn, ( void * ) instance, ( void * ) items, g_list_length( items ));
@@ -812,7 +812,7 @@ nact_tree_ieditable_insert_into( NactTreeIEditable *instance, GList *items )
static GtkTreePath *
do_insert_before( IEditableData *ied, GList *items, GtkTreePath *asked_path )
{
- static const gchar *thisfn = "nact_tree_ieditable_do_insert_before";
+ static const gchar *thisfn = "fma_tree_ieditable_do_insert_before";
GList *reversed;
GList *it;
GtkTreePath *path;
@@ -898,9 +898,9 @@ do_insert_into( IEditableData *ied, GList *items, GtkTreePath *asked_path )
* we pass here after each insertion operation (apart initial fill)
*/
static void
-increment_counters( NactTreeIEditable *view, IEditableData *ied, GList *items )
+increment_counters( FMATreeIEditable *view, IEditableData *ied, GList *items )
{
- static const gchar *thisfn = "nact_tree_ieditable_increment_counters";
+ static const gchar *thisfn = "fma_tree_ieditable_increment_counters";
gint menus, actions, profiles;
g_debug( "%s: view=%p, ied=%p, items=%p (count=%d)",
@@ -911,8 +911,8 @@ increment_counters( NactTreeIEditable *view, IEditableData *ied, GList *items )
}
/*
- * nact_tree_ieditable_set_items:
- * @instance: this #NactTreeIEditable *instance.
+ * fma_tree_ieditable_set_items:
+ * @instance: this #FMATreeIEditable *instance.
* @items: a #GList of items to be set in the tree view.
*
* The provided list of @items will override the items already in the list
@@ -928,16 +928,16 @@ increment_counters( NactTreeIEditable *view, IEditableData *ied, GList *items )
* So we should be almost sure that each item actually exists in the view.
*/
void
-nact_tree_ieditable_set_items( NactTreeIEditable *instance, GList *items )
+fma_tree_ieditable_set_items( FMATreeIEditable *instance, GList *items )
{
- static const gchar *thisfn = "nact_tree_ieditable_set_items";
+ static const gchar *thisfn = "fma_tree_ieditable_set_items";
IEditableData *ied;
GList *it;
FMAObjectItem *new_item, *old_item;
gchar *id;
GtkTreePath *path, *insert_path;
- g_return_if_fail( NACT_IS_TREE_IEDITABLE( instance ));
+ g_return_if_fail( FMA_IS_TREE_IEDITABLE( instance ));
g_debug( "%s: instance=%p, items=%p (count=%d)",
thisfn, ( void * ) instance, ( void * ) items, g_list_length( items ));
@@ -987,20 +987,20 @@ nact_tree_ieditable_set_items( NactTreeIEditable *instance, GList *items )
}
/**
- * nact_tree_ieditable_dump_modified:
- * @instance: this #NactTreeIEditable *instance.
+ * fma_tree_ieditable_dump_modified:
+ * @instance: this #FMATreeIEditable *instance.
*
* Dump informations about modified items.
*/
void
-nact_tree_ieditable_dump_modified( const NactTreeIEditable *instance )
+fma_tree_ieditable_dump_modified( const FMATreeIEditable *instance )
{
- static const gchar *thisfn = "nact_tree_ieditable_dump_modified";
+ static const gchar *thisfn = "fma_tree_ieditable_dump_modified";
IEditableData *ied;
- g_return_if_fail( NACT_IS_TREE_IEDITABLE( instance ));
+ g_return_if_fail( FMA_IS_TREE_IEDITABLE( instance ));
- ied = get_instance_data(( NactTreeIEditable * ) instance );
+ ied = get_instance_data(( FMATreeIEditable * ) instance );
g_debug( "%s: count_deleted=%u", thisfn, g_list_length( ied->deleted ));
g_debug( "%s: count_modified=%u", thisfn, ied->count_modified );
@@ -1008,29 +1008,29 @@ nact_tree_ieditable_dump_modified( const NactTreeIEditable *instance )
}
/**
- * nact_tree_ieditable_is_level_zero_modified:
- * @instance: this #NactTreeIEditable *instance.
+ * fma_tree_ieditable_is_level_zero_modified:
+ * @instance: this #FMATreeIEditable *instance.
*
* Returns: %TRUE if the level zero must be saved, %FALSE else.
*/
gboolean
-nact_tree_ieditable_is_level_zero_modified( const NactTreeIEditable *instance )
+fma_tree_ieditable_is_level_zero_modified( const FMATreeIEditable *instance )
{
IEditableData *ied;
gboolean is_modified;
- g_return_val_if_fail( NACT_IS_TREE_IEDITABLE( instance ), FALSE );
+ g_return_val_if_fail( FMA_IS_TREE_IEDITABLE( instance ), FALSE );
- ied = get_instance_data(( NactTreeIEditable * ) instance );
+ ied = get_instance_data(( FMATreeIEditable * ) instance );
is_modified = ied->level_zero_changed;
return( is_modified );
}
static void
-check_level_zero_status( NactTreeIEditable *instance )
+check_level_zero_status( FMATreeIEditable *instance )
{
- static const gchar *thisfn = "nact_tree_ieditable_check_level_zero_status";
+ static const gchar *thisfn = "fma_tree_ieditable_check_level_zero_status";
gboolean status;
IEditableData *ied;
GList *items;
@@ -1102,7 +1102,7 @@ get_selection_first_path( GtkTreeView *treeview )
static gboolean
get_modification_status( IEditableData *ied )
{
- static const gchar *thisfn = "nact_tree_ieditable_get_modification_status";
+ static const gchar *thisfn = "fma_tree_ieditable_get_modification_status";
gboolean modified;
modified = ( ied->count_modified > 0 ||
@@ -1117,7 +1117,7 @@ get_modification_status( IEditableData *ied )
}
static IEditableData *
-get_instance_data( NactTreeIEditable *view )
+get_instance_data( FMATreeIEditable *view )
{
IEditableData *ied;
@@ -1136,7 +1136,7 @@ get_instance_data( NactTreeIEditable *view )
* let the label be edited
*/
static void
-inline_edition( NactTreeIEditable *view )
+inline_edition( FMATreeIEditable *view )
{
IEditableData *ied;
GtkTreeSelection *selection;
diff --git a/src/ui/nact-tree-ieditable.h b/src/ui/fma-tree-ieditable.h
similarity index 54%
rename from src/ui/nact-tree-ieditable.h
rename to src/ui/fma-tree-ieditable.h
index 49039c8..b8ffdb0 100644
--- a/src/ui/nact-tree-ieditable.h
+++ b/src/ui/fma-tree-ieditable.h
@@ -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
diff --git a/src/ui/nact-tree-model-dnd.c b/src/ui/nact-tree-model-dnd.c
index 3867e35..a19bfae 100644
--- a/src/ui/nact-tree-model-dnd.c
+++ b/src/ui/nact-tree-model-dnd.c
@@ -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 );
}
diff --git a/src/ui/nact-tree-view.c b/src/ui/nact-tree-view.c
index a89730f..6f14840 100644
--- a/src/ui/nact-tree-view.c
+++ b/src/ui/nact-tree-view.c
@@ -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 ));
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]