[nautilus-actions/file-manager-actions] NactClipboard class is renamed to FMAClipboard
- From: Pierre Wieser <pwieser src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus-actions/file-manager-actions] NactClipboard class is renamed to FMAClipboard
- Date: Tue, 8 Sep 2015 18:59:57 +0000 (UTC)
commit 7d9265447d505029711050863e2c1827574599e4
Author: Pierre Wieser <pwieser trychlos org>
Date: Tue Sep 8 19:40:29 2015 +0200
NactClipboard class is renamed to FMAClipboard
+ cosmetic changes in the class headers
src/ui/Makefile.am | 4 +-
src/ui/base-assistant.h | 2 +-
src/ui/base-builder.h | 2 +-
src/ui/base-dialog.h | 2 +-
src/ui/base-gtk-utils.h | 2 +-
src/ui/base-isession.h | 2 +-
src/ui/base-keysyms.h | 10 +-
src/ui/base-window.h | 2 +-
src/ui/fma-add-capability-dialog.h | 2 +-
src/ui/fma-add-scheme-dialog.h | 2 +-
src/ui/fma-application.h | 2 +-
src/ui/fma-assistant-export.c | 50 +++---
src/ui/fma-assistant-export.h | 2 +-
src/ui/fma-assistant-import.c | 54 +++---
src/ui/fma-assistant-import.h | 2 +-
src/ui/{nact-clipboard.c => fma-clipboard.c} | 242 +++++++++++++-------------
src/ui/fma-clipboard.h | 125 +++++++++++++
src/ui/nact-clipboard.h | 125 -------------
src/ui/nact-confirm-logout.h | 2 +-
src/ui/nact-export-ask.h | 2 +-
src/ui/nact-iaction-tab.h | 2 +-
src/ui/nact-ibasenames-tab.h | 2 +-
src/ui/nact-icapabilities-tab.h | 2 +-
src/ui/nact-icommand-tab.h | 2 +-
src/ui/nact-icon-chooser.h | 2 +-
src/ui/nact-ienvironment-tab.h | 2 +-
src/ui/nact-iexecution-tab.h | 2 +-
src/ui/nact-ifolders-tab.h | 2 +-
src/ui/nact-imimetypes-tab.h | 2 +-
src/ui/nact-iproperties-tab.h | 2 +-
src/ui/nact-ischemes-tab.h | 2 +-
src/ui/nact-main-tab.h | 2 +-
src/ui/nact-main-window-def.h | 2 +-
src/ui/nact-main-window.c | 10 +-
src/ui/nact-main-window.h | 4 +-
src/ui/nact-match-list.h | 2 +-
src/ui/nact-menu-edit.c | 14 +-
src/ui/nact-preferences-editor.h | 2 +-
src/ui/nact-schemes-list.h | 2 +-
src/ui/nact-statusbar.h | 2 +-
src/ui/nact-tree-model-dnd.c | 68 ++++----
src/ui/nact-tree-model-priv.h | 6 +-
src/ui/nact-tree-model.c | 6 +-
src/ui/nact-tree-model.h | 2 +-
44 files changed, 388 insertions(+), 392 deletions(-)
---
diff --git a/src/ui/Makefile.am b/src/ui/Makefile.am
index 6465a78..9050f3b 100644
--- a/src/ui/Makefile.am
+++ b/src/ui/Makefile.am
@@ -79,8 +79,8 @@ fma_config_tool_SOURCES = \
fma-assistant-export.h \
fma-assistant-import.c \
fma-assistant-import.h \
- nact-clipboard.c \
- nact-clipboard.h \
+ fma-clipboard.c \
+ fma-clipboard.h \
nact-confirm-logout.c \
nact-confirm-logout.h \
nact-export-ask.c \
diff --git a/src/ui/base-assistant.h b/src/ui/base-assistant.h
index a125d60..97f0252 100644
--- a/src/ui/base-assistant.h
+++ b/src/ui/base-assistant.h
@@ -33,7 +33,7 @@
/**
* SECTION: base_assistant
* @short_description: #BaseAssistant class definition.
- * @include: nact/base-assistant.h
+ * @include: ui/base-assistant.h
*
* This class is derived from BaseWindow class, and serves as a base
* class for all FileManager-Actions assistants.
diff --git a/src/ui/base-builder.h b/src/ui/base-builder.h
index efcc8ce..99417ec 100644
--- a/src/ui/base-builder.h
+++ b/src/ui/base-builder.h
@@ -33,7 +33,7 @@
/**
* SECTION: base_builder
* @short_description: #BaseBuilder class definition.
- * @include: nact/base-builder.h
+ * @include: ui/base-builder.h
*
* This class is derived from GtkBuilder class. It adds to it two
* features:
diff --git a/src/ui/base-dialog.h b/src/ui/base-dialog.h
index 2426b8a..6224153 100644
--- a/src/ui/base-dialog.h
+++ b/src/ui/base-dialog.h
@@ -34,7 +34,7 @@
* SECTION: base-dialog
* @title: BaseDialog
* @short_description: The BaseDialog dialog base class definition
- * @include: base-dialog.h
+ * @include: ui/base-dialog.h
*
* This class is derived from BaseWindow class, and serves as a base
* class for all FileManager-Actions dialogs.
diff --git a/src/ui/base-gtk-utils.h b/src/ui/base-gtk-utils.h
index b61caa2..e09ae50 100644
--- a/src/ui/base-gtk-utils.h
+++ b/src/ui/base-gtk-utils.h
@@ -34,7 +34,7 @@
* SECTION: base-gtk-utils
* @title: BaseGtkUtils
* @short_description: Gtk helper functions
- * @include: base-gtk-utils.h
+ * @include: ui/base-gtk-utils.h
*/
#include "base-window.h"
diff --git a/src/ui/base-isession.h b/src/ui/base-isession.h
index 9ecc77c..51fa5fa 100644
--- a/src/ui/base-isession.h
+++ b/src/ui/base-isession.h
@@ -33,7 +33,7 @@
/**
* SECTION: base_isession
* @short_description: #BaseISession interface definition.
- * @include: nact/base-isession.h
+ * @include: ui/base-isession.h
*
* This interface implements the features needed to monitor the end of the
* session, thus letting the application react if some modifications need
diff --git a/src/ui/base-keysyms.h b/src/ui/base-keysyms.h
index f565ae7..861bd2f 100644
--- a/src/ui/base-keysyms.h
+++ b/src/ui/base-keysyms.h
@@ -31,13 +31,9 @@
#define __UI_BASE_KEYSYMS_H__
/**
- * SECTION: base_window
- * @short_description: #BaseWindow public function declaration.
- * @include: nact/base-window.h
- *
- * This is a base class which encapsulates a Gtk+ windows.
- * It works together with the BaseApplication class to run a Gtk+
- * application.
+ * SECTION: base_keysyms
+ * @short_description: Keys declarations.
+ * @include: ui/base-keysyms.h
*/
#include <gtk/gtk.h>
diff --git a/src/ui/base-window.h b/src/ui/base-window.h
index 9f80caa..e3a2a76 100644
--- a/src/ui/base-window.h
+++ b/src/ui/base-window.h
@@ -34,7 +34,7 @@
* SECTION: base-window
* @title: BaseWindow
* @short_description: the BaseWindow base window class definition
- * @include: base-window.h
+ * @include: ui/base-window.h
*
* This is a base class which manages a Gtk+ toplevel.
*
diff --git a/src/ui/fma-add-capability-dialog.h b/src/ui/fma-add-capability-dialog.h
index f2566fb..db00e58 100644
--- a/src/ui/fma-add-capability-dialog.h
+++ b/src/ui/fma-add-capability-dialog.h
@@ -33,7 +33,7 @@
/**
* SECTION: fma_add_capability_dialog
* @short_description: #FMAAddCapabilityDialog class definition.
- * @include: nact/fma-add-capability-dialog.h
+ * @include: ui/fma-add-capability-dialog.h
*
* The dialog let the user pick a capability from the default list
* when adding a new capability to a profile (resp. an action, a menu).
diff --git a/src/ui/fma-add-scheme-dialog.h b/src/ui/fma-add-scheme-dialog.h
index 60cfeea..ef51e7e 100644
--- a/src/ui/fma-add-scheme-dialog.h
+++ b/src/ui/fma-add-scheme-dialog.h
@@ -33,7 +33,7 @@
/**
* SECTION: fma_add_scheme_dialog
* @short_description: #FMAAddSchemeDialog class definition.
- * @include: nact/fma-add-scheme-dialog.h
+ * @include: ui/fma-add-scheme-dialog.h
*
* The dialog let the user pick a scheme from the default list
* when adding a new scheme to a profile (resp. an action, a menu).
diff --git a/src/ui/fma-application.h b/src/ui/fma-application.h
index 4e4d138..53e3399 100644
--- a/src/ui/fma-application.h
+++ b/src/ui/fma-application.h
@@ -33,7 +33,7 @@
/**
* SECTION: fma_application
* @short_description: #FMAApplication class definition.
- * @include: nact/fma-application.h
+ * @include: ui/fma-application.h
*
* This is the main class for filemanager-actions-config-tool program.
*
diff --git a/src/ui/fma-assistant-export.c b/src/ui/fma-assistant-export.c
index 2d666a5..fec72cb 100644
--- a/src/ui/fma-assistant-export.c
+++ b/src/ui/fma-assistant-export.c
@@ -82,9 +82,9 @@ struct _FMAAssistantExportPrivate {
typedef struct {
FMAObjectItem *item;
- GSList *msg;
- gchar *fname;
- gchar *format;
+ GSList *msg;
+ gchar *fname;
+ gchar *format;
}
ExportStruct;
@@ -94,29 +94,29 @@ static const gchar *st_wsp_name = IPREFS_EXPORT_ASSISTANT_WSP;
static BaseAssistantClass *st_parent_class = NULL;
-static GType register_type( void );
-static void class_init( FMAAssistantExportClass *klass );
-static void ioptions_list_iface_init( FMAIOptionsListInterface *iface, void *user_data );
-static GList *ioptions_list_get_formats( const FMAIOptionsList *instance, GtkWidget *container );
-static void ioptions_list_free_formats( const FMAIOptionsList *instance, GtkWidget *container, GList
*formats );
+static GType register_type( void );
+static void class_init( FMAAssistantExportClass *klass );
+static void ioptions_list_iface_init( FMAIOptionsListInterface *iface, void *user_data );
+static GList *ioptions_list_get_formats( const FMAIOptionsList *instance, GtkWidget *container );
+static void ioptions_list_free_formats( const FMAIOptionsList *instance, GtkWidget *container, GList
*formats );
static FMAIOption *ioptions_list_get_ask_option( const FMAIOptionsList *instance, GtkWidget *container );
-static void instance_init( GTypeInstance *instance, gpointer klass );
-static void instance_constructed( GObject *instance );
-static void instance_dispose( GObject *instance );
-static void instance_finalize( GObject *instance );
-static void on_base_initialize_gtk_toplevel( FMAAssistantExport *window, GtkAssistant *toplevel, void
*empty );
-static void items_tree_view_initialize_gtk( FMAAssistantExport *window, GtkAssistant *toplevel );
-static void folder_chooser_initialize_gtk( FMAAssistantExport *window );
-static void format_tree_view_initialize_gtk( FMAAssistantExport *window );
-static void on_base_initialize_base_window( FMAAssistantExport *window, void *empty );
-static void on_base_all_widgets_showed( FMAAssistantExport *window, void *empty );
-static void on_items_tree_view_selection_changed( FMAAssistantExport *window, GList *selected_items,
gpointer user_data );
-static void on_folder_chooser_selection_changed( GtkFileChooser *chooser, FMAAssistantExport *window );
-static void assistant_prepare( BaseAssistant *window, GtkAssistant *assistant, GtkWidget *page );
-static void assist_prepare_confirm( FMAAssistantExport *window, GtkAssistant *assistant, GtkWidget
*page );
-static void assistant_apply( BaseAssistant *window, GtkAssistant *assistant );
-static void assist_prepare_exportdone( FMAAssistantExport *window, GtkAssistant *assistant, GtkWidget
*page );
-static void free_results( GList *list );
+static void instance_init( GTypeInstance *instance, gpointer klass );
+static void instance_constructed( GObject *instance );
+static void instance_dispose( GObject *instance );
+static void instance_finalize( GObject *instance );
+static void on_base_initialize_gtk_toplevel( FMAAssistantExport *window, GtkAssistant *toplevel, void
*empty );
+static void items_tree_view_initialize_gtk( FMAAssistantExport *window, GtkAssistant *toplevel );
+static void folder_chooser_initialize_gtk( FMAAssistantExport *window );
+static void format_tree_view_initialize_gtk( FMAAssistantExport *window );
+static void on_base_initialize_base_window( FMAAssistantExport *window, void *empty );
+static void on_base_all_widgets_showed( FMAAssistantExport *window, void *empty );
+static void on_items_tree_view_selection_changed( FMAAssistantExport *window, GList *selected_items,
gpointer user_data );
+static void on_folder_chooser_selection_changed( GtkFileChooser *chooser, FMAAssistantExport *window
);
+static void assistant_prepare( BaseAssistant *window, GtkAssistant *assistant, GtkWidget *page );
+static void assist_prepare_confirm( FMAAssistantExport *window, GtkAssistant *assistant, GtkWidget
*page );
+static void assistant_apply( BaseAssistant *window, GtkAssistant *assistant );
+static void assist_prepare_exportdone( FMAAssistantExport *window, GtkAssistant *assistant, GtkWidget
*page );
+static void free_results( GList *list );
GType
fma_assistant_export_get_type( void )
diff --git a/src/ui/fma-assistant-export.h b/src/ui/fma-assistant-export.h
index 55b11ca..541521e 100644
--- a/src/ui/fma-assistant-export.h
+++ b/src/ui/fma-assistant-export.h
@@ -33,7 +33,7 @@
/**
* SECTION: fma_assistant_export
* @short_description: #FMAAssistantExport class definition.
- * @include: nact/fma-assistant-export.h
+ * @include: ui/fma-assistant-export.h
*
* Rationale:
*
diff --git a/src/ui/fma-assistant-import.c b/src/ui/fma-assistant-import.c
index ddd190c..a7a4c22 100644
--- a/src/ui/fma-assistant-import.c
+++ b/src/ui/fma-assistant-import.c
@@ -84,7 +84,7 @@ struct _FMAAssistantImportPrivate {
gboolean dispose_has_run;
GtkWidget *file_chooser;
GtkTreeView *duplicates_listview;
- FMAIOption *mode;
+ FMAIOption *mode;
GList *results;
GList *overriden;
};
@@ -95,35 +95,35 @@ static const gchar *st_wsp_name = IPREFS_IMPORT_ASSISTANT_WSP;
static BaseAssistantClass *st_parent_class = NULL;
-static GType register_type( void );
-static void class_init( FMAAssistantImportClass *klass );
-static void ioptions_list_iface_init( FMAIOptionsListInterface *iface, void *user_data );
-static GList *ioptions_list_get_modes( const FMAIOptionsList *instance, GtkWidget *container );
-static void ioptions_list_free_modes( const FMAIOptionsList *instance, GtkWidget *container, GList
*modes );
+static GType register_type( void );
+static void class_init( FMAAssistantImportClass *klass );
+static void ioptions_list_iface_init( FMAIOptionsListInterface *iface, void *user_data );
+static GList *ioptions_list_get_modes( const FMAIOptionsList *instance, GtkWidget *container );
+static void ioptions_list_free_modes( const FMAIOptionsList *instance, GtkWidget *container, GList
*modes );
static FMAIOption *ioptions_list_get_ask_option( const FMAIOptionsList *instance, GtkWidget *container );
-static void instance_init( GTypeInstance *instance, gpointer klass );
-static void instance_dispose( GObject *application );
-static void instance_finalize( GObject *application );
-
-static void on_base_initialize_gtk( FMAAssistantImport *dialog );
-static void create_duplicates_treeview_model( FMAAssistantImport *dialog );
-static void on_base_initialize_base_window( FMAAssistantImport *dialog );
-static void runtime_init_intro( FMAAssistantImport *window, GtkAssistant *assistant );
-static void runtime_init_file_selector( FMAAssistantImport *window, GtkAssistant *assistant );
-static void on_file_selection_changed( GtkFileChooser *chooser, gpointer user_data );
-static gboolean has_loadable_files( GSList *uris );
-static void runtime_init_duplicates( FMAAssistantImport *window, GtkAssistant *assistant );
-
-static void assistant_prepare( BaseAssistant *window, GtkAssistant *assistant, GtkWidget *page );
-static void prepare_confirm( FMAAssistantImport *window, GtkAssistant *assistant, GtkWidget *page );
-static void assistant_apply( BaseAssistant *window, GtkAssistant *assistant );
+static void instance_init( GTypeInstance *instance, gpointer klass );
+static void instance_dispose( GObject *application );
+static void instance_finalize( GObject *application );
+
+static void on_base_initialize_gtk( FMAAssistantImport *dialog );
+static void create_duplicates_treeview_model( FMAAssistantImport *dialog );
+static void on_base_initialize_base_window( FMAAssistantImport *dialog );
+static void runtime_init_intro( FMAAssistantImport *window, GtkAssistant *assistant );
+static void runtime_init_file_selector( FMAAssistantImport *window, GtkAssistant *assistant );
+static void on_file_selection_changed( GtkFileChooser *chooser, gpointer user_data );
+static gboolean has_loadable_files( GSList *uris );
+static void runtime_init_duplicates( FMAAssistantImport *window, GtkAssistant *assistant );
+
+static void assistant_prepare( BaseAssistant *window, GtkAssistant *assistant, GtkWidget *page );
+static void prepare_confirm( FMAAssistantImport *window, GtkAssistant *assistant, GtkWidget *page
);
+static void assistant_apply( BaseAssistant *window, GtkAssistant *assistant );
static FMAObjectItem *check_for_existence( const FMAObjectItem *, NactMainWindow *window );
-static void prepare_importdone( FMAAssistantImport *window, GtkAssistant *assistant, GtkWidget
*page );
-static void free_results( GList *list );
+static void prepare_importdone( FMAAssistantImport *window, GtkAssistant *assistant, GtkWidget
*page );
+static void free_results( GList *list );
-static GtkWidget *find_widget_from_page( GtkWidget *page, const gchar *name );
-static GtkTreeView *get_duplicates_treeview_from_assistant_import( FMAAssistantImport *window );
-static GtkTreeView *get_duplicates_treeview_from_page( GtkWidget *page );
+static GtkWidget *find_widget_from_page( GtkWidget *page, const gchar *name );
+static GtkTreeView *get_duplicates_treeview_from_assistant_import( FMAAssistantImport *window );
+static GtkTreeView *get_duplicates_treeview_from_page( GtkWidget *page );
GType
fma_assistant_import_get_type( void )
diff --git a/src/ui/fma-assistant-import.h b/src/ui/fma-assistant-import.h
index 612cc6c..51219cd 100644
--- a/src/ui/fma-assistant-import.h
+++ b/src/ui/fma-assistant-import.h
@@ -33,7 +33,7 @@
/**
* SECTION: fma_assistant_import
* @short_description: #FMAAssistantImport class definition.
- * @include: nact/fma-assistant-import.h
+ * @include: ui/fma-assistant-import.h
*/
#include "base-assistant.h"
diff --git a/src/ui/nact-clipboard.c b/src/ui/fma-clipboard.c
similarity index 75%
rename from src/ui/nact-clipboard.c
rename to src/ui/fma-clipboard.c
index 174eb27..c30f49c 100644
--- a/src/ui/nact-clipboard.c
+++ b/src/ui/fma-clipboard.c
@@ -43,11 +43,11 @@
#include "nact-export-ask.h"
#include "nact-main-window.h"
#include "nact-tree-model.h"
-#include "nact-clipboard.h"
+#include "fma-clipboard.h"
/* private class data
*/
-struct _NactClipboardClassPrivate {
+struct _FMAClipboardClassPrivate {
void *empty; /* so that gcc -pedantic is happy */
};
@@ -59,7 +59,7 @@ typedef struct {
GList *rows;
gboolean copy;
}
- NactClipboardDndData;
+ FMAClipboardDndData;
typedef struct {
GList *items;
@@ -70,22 +70,22 @@ typedef struct {
}
PrimaryData;
-struct _NactClipboardPrivate {
+struct _FMAClipboardPrivate {
gboolean dispose_has_run;
- NactMainWindow *window;
+ NactMainWindow *window;
GtkClipboard *dnd;
GtkClipboard *primary;
PrimaryData *primary_data;
gboolean primary_got;
};
-#define NACT_CLIPBOARD_ATOM gdk_atom_intern( "_NACT_CLIPBOARD", FALSE )
-#define NACT_CLIPBOARD_NACT_ATOM gdk_atom_intern( "ClipboardNautilusActions", FALSE )
+#define FMA_CLIPBOARD_ATOM gdk_atom_intern( "_FMA_CLIPBOARD", FALSE )
+#define FMA_CLIPBOARD_NACT_ATOM gdk_atom_intern( "ClipboardFileManagerActions", FALSE )
enum {
- NACT_CLIPBOARD_FORMAT_NACT = 0,
- NACT_CLIPBOARD_FORMAT_APPLICATION_XML,
- NACT_CLIPBOARD_FORMAT_TEXT_PLAIN
+ FMA_CLIPBOARD_FORMAT_FMA = 0,
+ FMA_CLIPBOARD_FORMAT_APPLICATION_XML,
+ FMA_CLIPBOARD_FORMAT_TEXT_PLAIN
};
/* clipboard formats
@@ -97,34 +97,34 @@ enum {
* - a text (xml) format, to go to clipboard or a text editor
*/
static GtkTargetEntry clipboard_formats[] = {
- { "ClipboardNautilusActions", 0, NACT_CLIPBOARD_FORMAT_NACT },
- { "application/xml", 0, NACT_CLIPBOARD_FORMAT_APPLICATION_XML },
- { "text/plain", 0, NACT_CLIPBOARD_FORMAT_TEXT_PLAIN },
+ { "ClipboardFileManagerActions", 0, FMA_CLIPBOARD_FORMAT_FMA },
+ { "application/xml", 0, FMA_CLIPBOARD_FORMAT_APPLICATION_XML },
+ { "text/plain", 0, FMA_CLIPBOARD_FORMAT_TEXT_PLAIN },
};
static GObjectClass *st_parent_class = NULL;
static GType register_type( void );
-static void class_init( NactClipboardClass *klass );
+static void class_init( FMAClipboardClass *klass );
static void instance_init( GTypeInstance *instance, gpointer klass );
static void instance_dispose( GObject *application );
static void instance_finalize( GObject *application );
static void get_from_dnd_clipboard_callback( GtkClipboard *clipboard, GtkSelectionData *selection_data,
guint info, guchar *data );
-static void clear_dnd_clipboard_callback( GtkClipboard *clipboard, NactClipboardDndData *data );
-static gchar *export_rows( NactClipboard *clipboard, GList *rows, const gchar *dest_folder );
-static gchar *export_objects( NactClipboard *clipboard, GList *objects );
-static gchar *export_row_object( NactClipboard *clipboard, FMAObject *object, const gchar *dest_folder,
GList **exported, gboolean first );
+static void clear_dnd_clipboard_callback( GtkClipboard *clipboard, FMAClipboardDndData *data );
+static gchar *export_rows( FMAClipboard *clipboard, GList *rows, const gchar *dest_folder );
+static gchar *export_objects( FMAClipboard *clipboard, GList *objects );
+static gchar *export_row_object( FMAClipboard *clipboard, FMAObject *object, const gchar *dest_folder, GList
**exported, gboolean first );
-static void get_from_primary_clipboard_callback( GtkClipboard *gtk_clipboard, GtkSelectionData
*selection_data, guint info, NactClipboard *clipboard );
-static void clear_primary_clipboard( NactClipboard *clipboard );
-static void clear_primary_clipboard_callback( GtkClipboard *gtk_clipboard, NactClipboard *clipboard );
-static void dump_primary_clipboard( NactClipboard *clipboard );
+static void get_from_primary_clipboard_callback( GtkClipboard *gtk_clipboard, GtkSelectionData
*selection_data, guint info, FMAClipboard *clipboard );
+static void clear_primary_clipboard( FMAClipboard *clipboard );
+static void clear_primary_clipboard_callback( GtkClipboard *gtk_clipboard, FMAClipboard *clipboard );
+static void dump_primary_clipboard( FMAClipboard *clipboard );
static gchar *clipboard_mode_to_string( gint mode );
GType
-nact_clipboard_get_type( void )
+fma_clipboard_get_type( void )
{
static GType type = 0;
@@ -138,32 +138,32 @@ nact_clipboard_get_type( void )
static GType
register_type( void )
{
- static const gchar *thisfn = "nact_clipboard_register_type";
+ static const gchar *thisfn = "fma_clipboard_register_type";
GType type;
static GTypeInfo info = {
- sizeof( NactClipboardClass ),
+ sizeof( FMAClipboardClass ),
( GBaseInitFunc ) NULL,
( GBaseFinalizeFunc ) NULL,
( GClassInitFunc ) class_init,
NULL,
NULL,
- sizeof( NactClipboard ),
+ sizeof( FMAClipboard ),
0,
( GInstanceInitFunc ) instance_init
};
g_debug( "%s", thisfn );
- type = g_type_register_static( G_TYPE_OBJECT, "NactClipboard", &info, 0 );
+ type = g_type_register_static( G_TYPE_OBJECT, "FMAClipboard", &info, 0 );
return( type );
}
static void
-class_init( NactClipboardClass *klass )
+class_init( FMAClipboardClass *klass )
{
- static const gchar *thisfn = "nact_clipboard_class_init";
+ static const gchar *thisfn = "fma_clipboard_class_init";
GObjectClass *object_class;
g_debug( "%s: klass=%p", thisfn, ( void * ) klass );
@@ -174,29 +174,29 @@ class_init( NactClipboardClass *klass )
object_class->dispose = instance_dispose;
object_class->finalize = instance_finalize;
- klass->private = g_new0( NactClipboardClassPrivate, 1 );
+ klass->private = g_new0( FMAClipboardClassPrivate, 1 );
}
static void
instance_init( GTypeInstance *instance, gpointer klass )
{
- static const gchar *thisfn = "nact_clipboard_instance_init";
- NactClipboard *self;
+ static const gchar *thisfn = "fma_clipboard_instance_init";
+ FMAClipboard *self;
GdkDisplay *display;
- g_return_if_fail( NACT_IS_CLIPBOARD( instance ));
+ g_return_if_fail( FMA_IS_CLIPBOARD( instance ));
g_debug( "%s: instance=%p (%s), klass=%p",
thisfn, ( void * ) instance, G_OBJECT_TYPE_NAME( instance ), ( void * ) klass );
- self = NACT_CLIPBOARD( instance );
+ self = FMA_CLIPBOARD( instance );
- self->private = g_new0( NactClipboardPrivate, 1 );
+ self->private = g_new0( FMAClipboardPrivate, 1 );
self->private->dispose_has_run = FALSE;
display = gdk_display_get_default();
- self->private->dnd = gtk_clipboard_get_for_display( display, NACT_CLIPBOARD_ATOM );
+ self->private->dnd = gtk_clipboard_get_for_display( display, FMA_CLIPBOARD_ATOM );
self->private->primary = gtk_clipboard_get_for_display( display, GDK_SELECTION_CLIPBOARD );
self->private->primary_data = NULL;
}
@@ -204,12 +204,12 @@ instance_init( GTypeInstance *instance, gpointer klass )
static void
instance_dispose( GObject *object )
{
- static const gchar *thisfn = "nact_clipboard_instance_dispose";
- NactClipboard *self;
+ static const gchar *thisfn = "fma_clipboard_instance_dispose";
+ FMAClipboard *self;
- g_return_if_fail( NACT_IS_CLIPBOARD( object ));
+ g_return_if_fail( FMA_IS_CLIPBOARD( object ));
- self = NACT_CLIPBOARD( object );
+ self = FMA_CLIPBOARD( object );
if( !self->private->dispose_has_run ){
@@ -230,14 +230,14 @@ instance_dispose( GObject *object )
static void
instance_finalize( GObject *instance )
{
- static const gchar *thisfn = "nact_clipboard_instance_finalize";
- NactClipboard *self;
+ static const gchar *thisfn = "fma_clipboard_instance_finalize";
+ FMAClipboard *self;
- g_return_if_fail( NACT_IS_CLIPBOARD( instance ));
+ g_return_if_fail( FMA_IS_CLIPBOARD( instance ));
g_debug( "%s: instance=%p (%s)", thisfn, ( void * ) instance, G_OBJECT_TYPE_NAME( instance ));
- self = NACT_CLIPBOARD( instance );
+ self = FMA_CLIPBOARD( instance );
if( self->private->primary_data ){
clear_primary_clipboard( self );
@@ -253,16 +253,16 @@ instance_finalize( GObject *instance )
}
/**
- * nact_clipboard_new:
+ * fma_clipboard_new:
*
- * Returns: a new #NactClipboard object.
+ * Returns: a new #FMAClipboard object.
*/
-NactClipboard *
-nact_clipboard_new( NactMainWindow *window )
+FMAClipboard *
+fma_clipboard_new( NactMainWindow *window )
{
- NactClipboard *clipboard;
+ FMAClipboard *clipboard;
- clipboard = g_object_new( NACT_TYPE_CLIPBOARD, NULL );
+ clipboard = g_object_new( FMA_TYPE_CLIPBOARD, NULL );
clipboard->private->window = window;
@@ -270,8 +270,8 @@ nact_clipboard_new( NactMainWindow *window )
}
/**
- * nact_clipboard_dnd_set:
- * @clipboard: this #NactClipboard instance.
+ * fma_clipboard_dnd_set:
+ * @clipboard: this #FMAClipboard instance.
* @rows: the list of row references of dragged items.
* @folder: the URI of the target folder if any (XDS protocol to outside).
* @copy_data: %TRUE if data is to be copied, %FALSE else
@@ -280,18 +280,18 @@ nact_clipboard_new( NactMainWindow *window )
* Set the selected items into our dnd clipboard.
*/
void
-nact_clipboard_dnd_set( NactClipboard *clipboard, guint target, GList *rows, const gchar *folder, gboolean
copy_data )
+fma_clipboard_dnd_set( FMAClipboard *clipboard, guint target, GList *rows, const gchar *folder, gboolean
copy_data )
{
- static const gchar *thisfn = "nact_clipboard_dnd_set";
- NactClipboardDndData *data;
+ static const gchar *thisfn = "fma_clipboard_dnd_set";
+ FMAClipboardDndData *data;
GList *it;
- g_return_if_fail( NACT_IS_CLIPBOARD( clipboard ));
+ g_return_if_fail( FMA_IS_CLIPBOARD( clipboard ));
g_return_if_fail( rows && g_list_length( rows ));
if( !clipboard->private->dispose_has_run ){
- data = g_new0( NactClipboardDndData, 1 );
+ data = g_new0( FMAClipboardDndData, 1 );
data->target = target;
data->folder = g_strdup( folder );
@@ -315,8 +315,8 @@ nact_clipboard_dnd_set( NactClipboard *clipboard, guint target, GList *rows, con
}
/**
- * nact_clipboard_dnd_get_data:
- * @clipboard: this #NactClipboard instance.
+ * fma_clipboard_dnd_get_data:
+ * @clipboard: this #FMAClipboard instance.
* @copy_data: will be set to the original value of the drag and drop.
*
* Returns the list of rows references privously stored.
@@ -325,16 +325,16 @@ nact_clipboard_dnd_set( NactClipboard *clipboard, guint target, GList *rows, con
* caller.
*/
GList *
-nact_clipboard_dnd_get_data( NactClipboard *clipboard, gboolean *copy_data )
+fma_clipboard_dnd_get_data( FMAClipboard *clipboard, gboolean *copy_data )
{
- static const gchar *thisfn = "nact_clipboard_dnd_get_data";
+ static const gchar *thisfn = "fma_clipboard_dnd_get_data";
GList *rows = NULL;
GtkSelectionData *selection;
- NactClipboardDndData *data;
+ FMAClipboardDndData *data;
GList *it;
g_debug( "%s: clipboard=%p", thisfn, ( void * ) clipboard );
- g_return_val_if_fail( NACT_IS_CLIPBOARD( clipboard ), NULL );
+ g_return_val_if_fail( FMA_IS_CLIPBOARD( clipboard ), NULL );
if( copy_data ){
*copy_data = FALSE;
@@ -342,11 +342,11 @@ nact_clipboard_dnd_get_data( NactClipboard *clipboard, gboolean *copy_data )
if( !clipboard->private->dispose_has_run ){
- selection = gtk_clipboard_wait_for_contents( clipboard->private->dnd,
NACT_CLIPBOARD_NACT_ATOM );
+ selection = gtk_clipboard_wait_for_contents( clipboard->private->dnd, FMA_CLIPBOARD_NACT_ATOM
);
if( selection ){
- data = ( NactClipboardDndData * ) gtk_selection_data_get_data( selection );
+ data = ( FMAClipboardDndData * ) gtk_selection_data_get_data( selection );
- if( data->target == NACT_XCHANGE_FORMAT_NACT ){
+ if( data->target == FMA_XCHANGE_FORMAT_NACT ){
for( it = data->rows ; it ; it = it->next ){
rows = g_list_append( rows,
gtk_tree_row_reference_copy(( GtkTreeRowReference * )
it->data ));
@@ -376,12 +376,12 @@ nact_clipboard_dnd_get_data( NactClipboard *clipboard, gboolean *copy_data )
* the presence of several <?xml ?> headers inside.
*/
gchar *
-nact_clipboard_dnd_get_text( NactClipboard *clipboard, GList *rows )
+fma_clipboard_dnd_get_text( FMAClipboard *clipboard, GList *rows )
{
- static const gchar *thisfn = "nact_clipboard_dnd_get_text";
+ static const gchar *thisfn = "fma_clipboard_dnd_get_text";
gchar *buffer;
- g_return_val_if_fail( NACT_IS_CLIPBOARD( clipboard ), NULL );
+ g_return_val_if_fail( FMA_IS_CLIPBOARD( clipboard ), NULL );
g_debug( "%s: clipboard=%p, rows=%p (count=%u)",
thisfn, ( void * ) clipboard, ( void * ) rows, g_list_length( rows ));
@@ -398,32 +398,32 @@ nact_clipboard_dnd_get_text( NactClipboard *clipboard, GList *rows )
}
/**
- * nact_clipboard_dnd_drag_end:
- * @clipboard: this #NactClipboard instance.
+ * fma_clipboard_dnd_drag_end:
+ * @clipboard: this #FMAClipboard instance.
*
* On drag-end, exports the objects if needed.
*/
void
-nact_clipboard_dnd_drag_end( NactClipboard *clipboard )
+fma_clipboard_dnd_drag_end( FMAClipboard *clipboard )
{
- static const gchar *thisfn = "nact_clipboard_dnd_drag_end";
+ static const gchar *thisfn = "fma_clipboard_dnd_drag_end";
GtkSelectionData *selection;
- NactClipboardDndData *data;
+ FMAClipboardDndData *data;
gchar *buffer;
g_debug( "%s: clipboard=%p", thisfn, ( void * ) clipboard );
- g_return_if_fail( NACT_IS_CLIPBOARD( clipboard ));
+ g_return_if_fail( FMA_IS_CLIPBOARD( clipboard ));
if( !clipboard->private->dispose_has_run ){
- selection = gtk_clipboard_wait_for_contents( clipboard->private->dnd,
NACT_CLIPBOARD_NACT_ATOM );
+ selection = gtk_clipboard_wait_for_contents( clipboard->private->dnd, FMA_CLIPBOARD_NACT_ATOM
);
g_debug( "%s: selection=%p", thisfn, ( void * ) selection );
if( selection ){
- data = ( NactClipboardDndData * ) gtk_selection_data_get_data( selection );
- g_debug( "%s: data=%p (NactClipboardDndData)", thisfn, ( void * ) data );
+ data = ( FMAClipboardDndData * ) gtk_selection_data_get_data( selection );
+ g_debug( "%s: data=%p (FMAClipboardDndData)", thisfn, ( void * ) data );
- if( data->target == NACT_XCHANGE_FORMAT_XDS ){
+ if( data->target == FMA_XCHANGE_FORMAT_XDS ){
g_debug( "%s: folder=%s", thisfn, data->folder );
buffer = export_rows( clipboard, data->rows, data->folder );
g_free( buffer );
@@ -435,17 +435,17 @@ nact_clipboard_dnd_drag_end( NactClipboard *clipboard )
}
/**
- * nact_clipboard_dnd_clear:
- * @clipboard: this #NactClipboard instance.
+ * fma_clipboard_dnd_clear:
+ * @clipboard: this #FMAClipboard instance.
*
* Clears the drag-and-drop clipboard.
*
* At least called on drag-begin.
*/
void
-nact_clipboard_dnd_clear( NactClipboard *clipboard )
+fma_clipboard_dnd_clear( FMAClipboard *clipboard )
{
- g_debug( "nact_clipboard_dnd_clear: clipboard=%p", ( void * ) clipboard );
+ g_debug( "fma_clipboard_dnd_clear: clipboard=%p", ( void * ) clipboard );
gtk_clipboard_clear( clipboard->private->dnd );
}
@@ -453,7 +453,7 @@ nact_clipboard_dnd_clear( NactClipboard *clipboard )
static void
get_from_dnd_clipboard_callback( GtkClipboard *clipboard, GtkSelectionData *selection_data, guint info,
guchar *data )
{
- static const gchar *thisfn = "nact_clipboard_get_from_dnd_clipboard_callback";
+ static const gchar *thisfn = "fma_clipboard_get_from_dnd_clipboard_callback";
GdkAtom selection_data_target;
selection_data_target = gtk_selection_data_get_target( selection_data );
@@ -463,13 +463,13 @@ get_from_dnd_clipboard_callback( GtkClipboard *clipboard, GtkSelectionData *sele
( void * ) selection_data, gdk_atom_name( selection_data_target ), info, ( void * )
data );
gtk_selection_data_set( selection_data,
- selection_data_target, 8, data, sizeof( NactClipboardDndData ));
+ selection_data_target, 8, data, sizeof( FMAClipboardDndData ));
}
static void
-clear_dnd_clipboard_callback( GtkClipboard *clipboard, NactClipboardDndData *data )
+clear_dnd_clipboard_callback( GtkClipboard *clipboard, FMAClipboardDndData *data )
{
- static const gchar *thisfn = "nact_clipboard_clear_dnd_clipboard_callback";
+ static const gchar *thisfn = "fma_clipboard_clear_dnd_clipboard_callback";
g_debug( "%s: clipboard=%p, data=%p", thisfn, ( void * ) clipboard, ( void * ) data );
@@ -484,9 +484,9 @@ clear_dnd_clipboard_callback( GtkClipboard *clipboard, NactClipboardDndData *dat
* else export items as files to target directory, returning an empty string
*/
static gchar *
-export_rows( NactClipboard *clipboard, GList *rows, const gchar *dest_folder )
+export_rows( FMAClipboard *clipboard, GList *rows, const gchar *dest_folder )
{
- static const gchar *thisfn = "nact_clipboard_export_rows";
+ static const gchar *thisfn = "fma_clipboard_export_rows";
GString *data;
GtkTreeModel *model;
GList *exported, *irow;
@@ -526,7 +526,7 @@ export_rows( NactClipboard *clipboard, GList *rows, const gchar *dest_folder )
}
static gchar *
-export_objects( NactClipboard *clipboard, GList *objects )
+export_objects( FMAClipboard *clipboard, GList *objects )
{
gchar *buffer;
GString *data;
@@ -563,9 +563,9 @@ export_objects( NactClipboard *clipboard, GList *objects )
* exported twice
*/
static gchar *
-export_row_object( NactClipboard *clipboard, FMAObject *object, const gchar *dest_folder, GList **exported,
gboolean first )
+export_row_object( FMAClipboard *clipboard, FMAObject *object, const gchar *dest_folder, GList **exported,
gboolean first )
{
- static const gchar *thisfn = "nact_clipboard_export_row_object";
+ static const gchar *thisfn = "fma_clipboard_export_row_object";
GList *subitems, *isub;
FMAApplication *application;
FMAUpdater *updater;
@@ -646,8 +646,8 @@ export_row_object( NactClipboard *clipboard, FMAObject *object, const gchar *des
}
/**
- * nact_clipboard_primary_set:
- * @clipboard: this #NactClipboard object.
+ * fma_clipboard_primary_set:
+ * @clipboard: this #FMAClipboard object.
* @items: a list of #FMAObject items
* @mode: where do these items come from ?
* Or what is the operation which has led the items to the clipboard?
@@ -667,15 +667,15 @@ export_row_object( NactClipboard *clipboard, FMAObject *object, const gchar *des
* data out of the clipboard.
*/
void
-nact_clipboard_primary_set( NactClipboard *clipboard, GList *items, gint mode )
+fma_clipboard_primary_set( FMAClipboard *clipboard, GList *items, gint mode )
{
- static const gchar *thisfn = "nact_clipboard_primary_set";
+ static const gchar *thisfn = "fma_clipboard_primary_set";
PrimaryData *user_data;
GList *it;
g_debug( "%s: clipboard=%p, items=%p (count=%d), mode=%d",
thisfn, ( void * ) clipboard, ( void * ) items, g_list_length( items ), mode );
- g_return_if_fail( NACT_IS_CLIPBOARD( clipboard ));
+ g_return_if_fail( FMA_IS_CLIPBOARD( clipboard ));
if( !clipboard->private->dispose_has_run ){
@@ -715,8 +715,8 @@ nact_clipboard_primary_set( NactClipboard *clipboard, GList *items, gint mode )
}
/**
- * nact_clipboard_primary_get:
- * @clipboard: this #NactClipboard object.
+ * fma_clipboard_primary_get:
+ * @clipboard: this #FMAClipboard object.
*
* Returns: a copy of the list of items previously referenced in the
* internal clipboard.
@@ -725,9 +725,9 @@ nact_clipboard_primary_set( NactClipboard *clipboard, GList *items, gint mode )
* time.
*/
GList *
-nact_clipboard_primary_get( NactClipboard *clipboard, gboolean *relabel )
+fma_clipboard_primary_get( FMAClipboard *clipboard, gboolean *relabel )
{
- static const gchar *thisfn = "nact_clipboard_primary_get";
+ static const gchar *thisfn = "fma_clipboard_primary_get";
GList *items = NULL;
GtkSelectionData *selection;
PrimaryData *user_data;
@@ -735,12 +735,12 @@ nact_clipboard_primary_get( NactClipboard *clipboard, gboolean *relabel )
FMAObject *obj;
g_debug( "%s: clipboard=%p", thisfn, ( void * ) clipboard );
- g_return_val_if_fail( NACT_IS_CLIPBOARD( clipboard ), NULL );
+ g_return_val_if_fail( FMA_IS_CLIPBOARD( clipboard ), NULL );
g_return_val_if_fail( relabel, NULL );
if( !clipboard->private->dispose_has_run ){
- selection = gtk_clipboard_wait_for_contents( clipboard->private->primary,
NACT_CLIPBOARD_NACT_ATOM );
+ selection = gtk_clipboard_wait_for_contents( clipboard->private->primary,
FMA_CLIPBOARD_NACT_ATOM );
if( selection ){
user_data = ( PrimaryData * ) gtk_selection_data_get_data( selection );
@@ -768,17 +768,17 @@ nact_clipboard_primary_get( NactClipboard *clipboard, gboolean *relabel )
}
/**
- * nact_clipboard_primary_counts:
- * @clipboard: this #NactClipboard object.
+ * fma_clipboard_primary_counts:
+ * @clipboard: this #FMAClipboard object.
*
* Returns some counters on content of primary clipboard.
*/
void
-nact_clipboard_primary_counts( NactClipboard *clipboard, guint *actions, guint *profiles, guint *menus )
+fma_clipboard_primary_counts( FMAClipboard *clipboard, guint *actions, guint *profiles, guint *menus )
{
PrimaryData *user_data;
- g_return_if_fail( NACT_IS_CLIPBOARD( clipboard ));
+ g_return_if_fail( FMA_IS_CLIPBOARD( clipboard ));
g_return_if_fail( actions && profiles && menus );
if( !clipboard->private->dispose_has_run ){
@@ -798,9 +798,9 @@ nact_clipboard_primary_counts( NactClipboard *clipboard, guint *actions, guint *
}
static void
-get_from_primary_clipboard_callback( GtkClipboard *gtk_clipboard, GtkSelectionData *selection_data, guint
info, NactClipboard *clipboard )
+get_from_primary_clipboard_callback( GtkClipboard *gtk_clipboard, GtkSelectionData *selection_data, guint
info, FMAClipboard *clipboard )
{
- static const gchar *thisfn = "nact_clipboard_get_from_primary_clipboard_callback";
+ static const gchar *thisfn = "fma_clipboard_get_from_primary_clipboard_callback";
PrimaryData *user_data;
gchar *buffer;
GdkAtom selection_data_target;
@@ -813,7 +813,7 @@ get_from_primary_clipboard_callback( GtkClipboard *gtk_clipboard, GtkSelectionDa
user_data = clipboard->private->primary_data;
- if( info == NACT_CLIPBOARD_FORMAT_TEXT_PLAIN ){
+ if( info == FMA_CLIPBOARD_FORMAT_TEXT_PLAIN ){
buffer = export_objects( clipboard, user_data->items );
gtk_selection_data_set( selection_data,
selection_data_target, 8, ( const guchar * ) buffer, strlen( buffer ));
@@ -826,9 +826,9 @@ get_from_primary_clipboard_callback( GtkClipboard *gtk_clipboard, GtkSelectionDa
}
static void
-clear_primary_clipboard( NactClipboard *clipboard )
+clear_primary_clipboard( FMAClipboard *clipboard )
{
- static const gchar *thisfn = "nact_clipboard_clear_primary_clipboard";
+ static const gchar *thisfn = "fma_clipboard_clear_primary_clipboard";
PrimaryData *user_data;
g_debug( "%s: clipboard=%p", thisfn, ( void * ) clipboard );
@@ -847,22 +847,22 @@ clear_primary_clipboard( NactClipboard *clipboard )
}
static void
-clear_primary_clipboard_callback( GtkClipboard *gtk_clipboard, NactClipboard *clipboard )
+clear_primary_clipboard_callback( GtkClipboard *gtk_clipboard, FMAClipboard *clipboard )
{
}
/**
- * nact_clipboard_dump:
- * @clipboard: this #NactClipboard instance.
+ * fma_clipboard_dump:
+ * @clipboard: this #FMAClipboard instance.
*
* Dumps the content of the primary clipboard.
*/
void
-nact_clipboard_dump( NactClipboard *clipboard )
+fma_clipboard_dump( FMAClipboard *clipboard )
{
- static const gchar *thisfn = "nact_clipboard_dump";
+ static const gchar *thisfn = "fma_clipboard_dump";
- g_return_if_fail( NACT_IS_CLIPBOARD( clipboard ));
+ g_return_if_fail( FMA_IS_CLIPBOARD( clipboard ));
if( !clipboard->private->dispose_has_run ){
@@ -878,14 +878,14 @@ nact_clipboard_dump( NactClipboard *clipboard )
}
static void
-dump_primary_clipboard( NactClipboard *clipboard )
+dump_primary_clipboard( FMAClipboard *clipboard )
{
- static const gchar *thisfn = "nact_clipboard_dump_primary";
+ static const gchar *thisfn = "fma_clipboard_dump_primary";
PrimaryData *user_data;
gchar *mode;
GList *it;
- g_return_if_fail( NACT_IS_CLIPBOARD( clipboard ));
+ g_return_if_fail( FMA_IS_CLIPBOARD( clipboard ));
if( !clipboard->private->dispose_has_run ){
diff --git a/src/ui/fma-clipboard.h b/src/ui/fma-clipboard.h
new file mode 100644
index 0000000..3019180
--- /dev/null
+++ b/src/ui/fma-clipboard.h
@@ -0,0 +1,125 @@
+/*
+ * FileManager-Actions
+ * A file-manager extension which offers configurable context menu actions.
+ *
+ * Copyright (C) 2005 The GNOME Foundation
+ * Copyright (C) 2006-2008 Frederic Ruaudel and others (see AUTHORS)
+ * Copyright (C) 2009-2015 Pierre Wieser and others (see AUTHORS)
+ *
+ * FileManager-Actions is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * FileManager-Actions is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with FileManager-Actions; see the file COPYING. If not, see
+ * <http://www.gnu.org/licenses/>.
+ *
+ * Authors:
+ * Frederic Ruaudel <grumz grumz net>
+ * Rodrigo Moya <rodrigo gnome-db org>
+ * Pierre Wieser <pwieser trychlos org>
+ * ... and many others (see AUTHORS)
+ */
+
+#ifndef __UI_FMA_CLIPBOARD_H__
+#define __UI_FMA_CLIPBOARD_H__
+
+/*
+ * SECTION: fma_clipboard.
+ * @short_description: #FMAClipboard class definition.
+ * @include: ui/fma-clipboard.h
+ *
+ * This is just a convenience class to extract clipboard functions
+ * from main window code. There is a unique object which manages all
+ * clipboard buffers.
+ */
+
+#include <gtk/gtk.h>
+
+#include "nact-main-window-def.h"
+
+G_BEGIN_DECLS
+
+#define FMA_TYPE_CLIPBOARD ( fma_clipboard_get_type())
+#define FMA_CLIPBOARD( object ) ( G_TYPE_CHECK_INSTANCE_CAST( object, FMA_TYPE_CLIPBOARD,
FMAClipboard ))
+#define FMA_CLIPBOARD_CLASS( klass ) ( G_TYPE_CHECK_CLASS_CAST( klass, FMA_TYPE_CLIPBOARD,
FMAClipboardClass ))
+#define FMA_IS_CLIPBOARD( object ) ( G_TYPE_CHECK_INSTANCE_TYPE( object, FMA_TYPE_CLIPBOARD ))
+#define FMA_IS_CLIPBOARD_CLASS( klass ) ( G_TYPE_CHECK_CLASS_TYPE(( klass ), FMA_TYPE_CLIPBOARD ))
+#define FMA_CLIPBOARD_GET_CLASS( object ) ( G_TYPE_INSTANCE_GET_CLASS(( object ), FMA_TYPE_CLIPBOARD,
FMAClipboardClass ))
+
+typedef struct _FMAClipboardPrivate FMAClipboardPrivate;
+
+typedef struct {
+ /*< private >*/
+ GObject parent;
+ FMAClipboardPrivate *private;
+}
+ FMAClipboard;
+
+typedef struct _FMAClipboardClassPrivate FMAClipboardClassPrivate;
+
+typedef struct {
+ /*< private >*/
+ GObjectClass parent;
+ FMAClipboardClassPrivate *private;
+}
+ FMAClipboardClass;
+
+/* drag and drop formats
+ */
+enum {
+ FMA_XCHANGE_FORMAT_NACT = 0,
+ FMA_XCHANGE_FORMAT_XDS,
+ FMA_XCHANGE_FORMAT_APPLICATION_XML,
+ FMA_XCHANGE_FORMAT_TEXT_PLAIN,
+ FMA_XCHANGE_FORMAT_URI_LIST
+};
+
+/* mode indicator
+ */
+enum {
+ CLIPBOARD_MODE_CUT = 1,
+ CLIPBOARD_MODE_COPY
+};
+
+GType fma_clipboard_get_type ( void );
+
+FMAClipboard *fma_clipboard_new ( NactMainWindow *window );
+
+void fma_clipboard_dnd_set ( FMAClipboard *clipboard,
+ guint
target,
+ GList
*rows,
+ const
gchar *folder,
+
gboolean copy );
+
+GList *fma_clipboard_dnd_get_data ( FMAClipboard *clipboard, gboolean *copy );
+
+gchar *fma_clipboard_dnd_get_text ( FMAClipboard *clipboard, GList *rows );
+
+void fma_clipboard_dnd_drag_end ( FMAClipboard *clipboard );
+
+void fma_clipboard_dnd_clear ( FMAClipboard *clipboard );
+
+void fma_clipboard_primary_set ( FMAClipboard *clipboard,
+ GList
*items,
+ gint
mode );
+
+GList *fma_clipboard_primary_get ( FMAClipboard *clipboard,
+
gboolean *relabel );
+
+void fma_clipboard_primary_counts( FMAClipboard *clipboard,
+ guint
*actions,
+ guint
*profiles,
+ guint
*menus );
+
+void fma_clipboard_dump ( FMAClipboard *clipboard );
+
+G_END_DECLS
+
+#endif /* __UI_FMA_CLIPBOARD_H__ */
diff --git a/src/ui/nact-confirm-logout.h b/src/ui/nact-confirm-logout.h
index e6448bb..2786e16 100644
--- a/src/ui/nact-confirm-logout.h
+++ b/src/ui/nact-confirm-logout.h
@@ -33,7 +33,7 @@
/**
* SECTION: nact_preferences_editor
* @short_description: #NactConfirmLogout class definition.
- * @include: nact/nact-preferences-editor.h
+ * @include: ui/nact-preferences-editor.h
*
* This class is derived from NactWindow.
* It encapsulates the "PreferencesDialog" widget dialog.
diff --git a/src/ui/nact-export-ask.h b/src/ui/nact-export-ask.h
index a65a315..adb8516 100644
--- a/src/ui/nact-export-ask.h
+++ b/src/ui/nact-export-ask.h
@@ -33,7 +33,7 @@
/**
* SECTION: nact_export_ask
* @short_description: #NactExportAsk class definition.
- * @include: nact/nact-export-ask.h
+ * @include: ui/nact-export-ask.h
*
* This class is derived from BaseDialog.
* It is ran each time an action is to be exported, and the user want
diff --git a/src/ui/nact-iaction-tab.h b/src/ui/nact-iaction-tab.h
index e68a197..f90dd05 100644
--- a/src/ui/nact-iaction-tab.h
+++ b/src/ui/nact-iaction-tab.h
@@ -33,7 +33,7 @@
/**
* SECTION: nact_iaction_tab
* @short_description: #NactIActionTab interface definition.
- * @include: nact/nact-iaction-tab.h
+ * @include: ui/nact-iaction-tab.h
*
* This interface implements the "Nautilus Menu Item" tab of the notebook.
*
diff --git a/src/ui/nact-ibasenames-tab.h b/src/ui/nact-ibasenames-tab.h
index f44ee70..6c549aa 100644
--- a/src/ui/nact-ibasenames-tab.h
+++ b/src/ui/nact-ibasenames-tab.h
@@ -33,7 +33,7 @@
/**
* SECTION: nact_ibasenames_tab
* @short_description: #NactIBasenamesTab interface declaration.
- * @include: nact/nact-ibasenames-tab.h
+ * @include: ui/nact-ibasenames-tab.h
*
* This interface implements all the widgets which define the
* basenames-based conditions.
diff --git a/src/ui/nact-icapabilities-tab.h b/src/ui/nact-icapabilities-tab.h
index cd1f283..5c9c935 100644
--- a/src/ui/nact-icapabilities-tab.h
+++ b/src/ui/nact-icapabilities-tab.h
@@ -33,7 +33,7 @@
/**
* SECTION: nact_icapabilities_tab
* @short_description: #NactICapabilitiesTab interface declaration.
- * @include: nact/nact-icapabilities-tab.h
+ * @include: ui/nact-icapabilities-tab.h
*
* This interface implements all the widgets which define the
* conditions for the action.
diff --git a/src/ui/nact-icommand-tab.h b/src/ui/nact-icommand-tab.h
index 218dfe7..1cdd5d2 100644
--- a/src/ui/nact-icommand-tab.h
+++ b/src/ui/nact-icommand-tab.h
@@ -33,7 +33,7 @@
/**
* SECTION: nact_icommand_tab
* @short_description: #NactICommandTab interface declaration.
- * @include: nact/nact-icommand-tab.h
+ * @include: ui/nact-icommand-tab.h
*
* This interface implements all the widgets which define the
* actual action to be executed (from FMAObjectProfile).
diff --git a/src/ui/nact-icon-chooser.h b/src/ui/nact-icon-chooser.h
index 21d929d..de71f75 100644
--- a/src/ui/nact-icon-chooser.h
+++ b/src/ui/nact-icon-chooser.h
@@ -33,7 +33,7 @@
/**
* SECTION: nact_icon_chooser
* @short_description: NactIconChooser dialog box
- * @include: nact/nact-icon-chooser.h
+ * @include: ui/nact-icon-chooser.h
*
* This class is derived from BaseDialog.
*/
diff --git a/src/ui/nact-ienvironment-tab.h b/src/ui/nact-ienvironment-tab.h
index 2a87a94..7618aee 100644
--- a/src/ui/nact-ienvironment-tab.h
+++ b/src/ui/nact-ienvironment-tab.h
@@ -33,7 +33,7 @@
/**
* SECTION: nact_ienvironment_tab
* @short_description: #NactIEnvironmentTab interface declaration.
- * @include: nact/nact-ienvironment-tab.h
+ * @include: ui/nact-ienvironment-tab.h
*
* This interface implements all the widgets which define the
* actual action to be executed.
diff --git a/src/ui/nact-iexecution-tab.h b/src/ui/nact-iexecution-tab.h
index 2cdd5ef..751e54d 100644
--- a/src/ui/nact-iexecution-tab.h
+++ b/src/ui/nact-iexecution-tab.h
@@ -33,7 +33,7 @@
/**
* SECTION: nact_iexecution_tab
* @short_description: #NactIExecutionTab interface declaration.
- * @include: nact/nact-iexecution-tab.h
+ * @include: ui/nact-iexecution-tab.h
*
* This interface implements all the widgets which define the
* actual action to be executed.
diff --git a/src/ui/nact-ifolders-tab.h b/src/ui/nact-ifolders-tab.h
index b665012..5ace4f4 100644
--- a/src/ui/nact-ifolders-tab.h
+++ b/src/ui/nact-ifolders-tab.h
@@ -33,7 +33,7 @@
/**
* SECTION: nact_ifolders_tab
* @short_description: #NactIFoldersTab interface declaration.
- * @include: nact/nact-ifolders-tab.h
+ * @include: ui/nact-ifolders-tab.h
*
* This interface implements all the widgets which are relevant for
* items which are applied to backgrounds.
diff --git a/src/ui/nact-imimetypes-tab.h b/src/ui/nact-imimetypes-tab.h
index c7fa42f..a96c863 100644
--- a/src/ui/nact-imimetypes-tab.h
+++ b/src/ui/nact-imimetypes-tab.h
@@ -33,7 +33,7 @@
/**
* SECTION: nact_imimetypes_tab
* @short_description: #NactIMimetypesTab interface declaration.
- * @include: nact/nact-imimetypes-tab.h
+ * @include: ui/nact-imimetypes-tab.h
*
* This interface implements all the widgets which define the
* mimetypes-based conditions.
diff --git a/src/ui/nact-iproperties-tab.h b/src/ui/nact-iproperties-tab.h
index 2c09009..3a31276 100644
--- a/src/ui/nact-iproperties-tab.h
+++ b/src/ui/nact-iproperties-tab.h
@@ -33,7 +33,7 @@
/**
* SECTION: nact_iproperties_tab
* @short_description: #NactIPropertiesTab interface definition.
- * @include: nact/nact-iproperties-tab.h
+ * @include: ui/nact-iproperties-tab.h
*
* This interface implements the "Properties" tab of the notebook.
*
diff --git a/src/ui/nact-ischemes-tab.h b/src/ui/nact-ischemes-tab.h
index c157964..19a9245 100644
--- a/src/ui/nact-ischemes-tab.h
+++ b/src/ui/nact-ischemes-tab.h
@@ -33,7 +33,7 @@
/**
* SECTION: nact_ischemes_tab
* @short_description: #NactISchemesTab interface declaration.
- * @include: nact/nact-ischemes-tab.h
+ * @include: ui/nact-ischemes-tab.h
*
* This interface implements all the widgets which define the
* conditions for the action.
diff --git a/src/ui/nact-main-tab.h b/src/ui/nact-main-tab.h
index d67b098..8591728 100644
--- a/src/ui/nact-main-tab.h
+++ b/src/ui/nact-main-tab.h
@@ -37,7 +37,7 @@
/**
* SECTION: nact_main_tab
* @short_description: Signals and properties.
- * @include: nact/nact-main-tab.h
+ * @include: ui/nact-main-tab.h
*
* Here as defined signals and properties common to all tabs.
*/
diff --git a/src/ui/nact-main-window-def.h b/src/ui/nact-main-window-def.h
index 2fbe039..365a7f8 100644
--- a/src/ui/nact-main-window-def.h
+++ b/src/ui/nact-main-window-def.h
@@ -65,7 +65,7 @@
* | |
* | +-> setup_main_ui()
* | setup_treeview()
- * | nact_clipboard_new()
+ * | fma_clipboard_new()
* | nact_sort_buttons_new()
* |
* | nact_iaction_tab_init()
diff --git a/src/ui/nact-main-window.c b/src/ui/nact-main-window.c
index 68d2fc9..6880fd8 100644
--- a/src/ui/nact-main-window.c
+++ b/src/ui/nact-main-window.c
@@ -114,7 +114,7 @@ struct _NactMainWindowPrivate {
*/
NactTreeView *items_view;
gboolean is_tree_modified;
- NactClipboard *clipboard;
+ FMAClipboard *clipboard;
NactStatusbar *statusbar;
NactSortButtons *sort_buttons;
@@ -665,7 +665,7 @@ nact_main_window_new( FMAApplication *application )
setup_treeview( window );
nact_menu_win( window );
- window->private->clipboard = nact_clipboard_new( window );
+ window->private->clipboard = fma_clipboard_new( window );
window->private->sort_buttons = nact_sort_buttons_new( window );
/* initialize the notebook interfaces
@@ -812,12 +812,12 @@ setup_monitor_pivot( NactMainWindow *main_window )
* nact_main_window_get_clipboard:
* @window: this #NactMainWindow instance.
*
- * Returns: the #NactClipboard convenience object.
+ * Returns: the #FMAClipboard convenience object.
*/
-NactClipboard *
+FMAClipboard *
nact_main_window_get_clipboard( const NactMainWindow *window )
{
- NactClipboard *clipboard;
+ FMAClipboard *clipboard;
g_return_val_if_fail( NACT_IS_MAIN_WINDOW( window ), NULL );
diff --git a/src/ui/nact-main-window.h b/src/ui/nact-main-window.h
index 7a8a530..f39faf7 100644
--- a/src/ui/nact-main-window.h
+++ b/src/ui/nact-main-window.h
@@ -38,7 +38,7 @@
*/
#include "fma-application.h"
-#include "nact-clipboard.h"
+#include "fma-clipboard.h"
#include "nact-main-window-def.h"
#include "nact-sort-buttons.h"
#include "nact-statusbar.h"
@@ -73,7 +73,7 @@ enum {
NactMainWindow *nact_main_window_new ( FMAApplication *application );
-NactClipboard *nact_main_window_get_clipboard ( const NactMainWindow *window );
+FMAClipboard *nact_main_window_get_clipboard ( const NactMainWindow *window );
NactSortButtons *nact_main_window_get_sort_buttons( const NactMainWindow *window );
diff --git a/src/ui/nact-match-list.h b/src/ui/nact-match-list.h
index 6b42555..5f6cef4 100644
--- a/src/ui/nact-match-list.h
+++ b/src/ui/nact-match-list.h
@@ -33,7 +33,7 @@
/**
* SECTION: nact_match_list
* @short_description: Implementation of a list match/does not match.
- * @include: nact/nact-match-list.h
+ * @include: ui/nact-match-list.h
*
* In an ideal world, this would be a base interface for NactISchemesTab,
* etc. interfaces.
diff --git a/src/ui/nact-menu-edit.c b/src/ui/nact-menu-edit.c
index 1265ba6..7db014e 100644
--- a/src/ui/nact-menu-edit.c
+++ b/src/ui/nact-menu-edit.c
@@ -38,7 +38,7 @@
#include "core/fma-io-provider.h"
#include "fma-application.h"
-#include "nact-clipboard.h"
+#include "fma-clipboard.h"
#include "nact-main-tab.h"
#include "nact-main-window.h"
#include "nact-menu.h"
@@ -204,7 +204,7 @@ nact_menu_edit_cut( NactMainWindow *main_window )
static const gchar *thisfn = "nact_menu_edit_cut";
sMenuData *sdata;
GList *items;
- NactClipboard *clipboard;
+ FMAClipboard *clipboard;
GList *to_delete;
GSList *ndeletables;
NactTreeView *view;
@@ -229,7 +229,7 @@ nact_menu_edit_cut( NactMainWindow *main_window )
if( to_delete ){
clipboard = nact_main_window_get_clipboard( NACT_MAIN_WINDOW( main_window ));
- nact_clipboard_primary_set( clipboard, to_delete, CLIPBOARD_MODE_CUT );
+ fma_clipboard_primary_set( clipboard, to_delete, CLIPBOARD_MODE_CUT );
update_clipboard_counters( main_window, sdata );
view = nact_main_window_get_items_view( main_window );
nact_tree_ieditable_delete( NACT_TREE_IEDITABLE( view ), to_delete, TREE_OPE_DELETE );
@@ -254,7 +254,7 @@ nact_menu_edit_copy( NactMainWindow *main_window )
{
static const gchar *thisfn = "nact_menu_edit_copy";
sMenuData *sdata;
- NactClipboard *clipboard;
+ FMAClipboard *clipboard;
g_debug( "%s: main_window=%p", thisfn, ( void * ) main_window );
g_return_if_fail( main_window && NACT_IS_MAIN_WINDOW( main_window ));
@@ -262,7 +262,7 @@ nact_menu_edit_copy( NactMainWindow *main_window )
sdata = nact_menu_get_data( main_window );
clipboard = nact_main_window_get_clipboard( main_window );
- nact_clipboard_primary_set( clipboard, sdata->selected_items, CLIPBOARD_MODE_COPY );
+ fma_clipboard_primary_set( clipboard, sdata->selected_items, CLIPBOARD_MODE_COPY );
update_clipboard_counters( main_window, sdata );
g_signal_emit_by_name( main_window, MAIN_SIGNAL_UPDATE_SENSITIVITIES );
@@ -345,13 +345,13 @@ prepare_for_paste( NactMainWindow *window, sMenuData *sdata )
{
static const gchar *thisfn = "nact_menu_edit_prepare_for_paste";
GList *items, *it;
- NactClipboard *clipboard;
+ FMAClipboard *clipboard;
FMAObjectAction *action;
gboolean relabel;
gboolean renumber;
clipboard = nact_main_window_get_clipboard( window );
- items = nact_clipboard_primary_get( clipboard, &renumber );
+ items = fma_clipboard_primary_get( clipboard, &renumber );
action = NULL;
/* if pasted items are profiles, then setup the target action
diff --git a/src/ui/nact-preferences-editor.h b/src/ui/nact-preferences-editor.h
index 624bc34..739aa3c 100644
--- a/src/ui/nact-preferences-editor.h
+++ b/src/ui/nact-preferences-editor.h
@@ -33,7 +33,7 @@
/**
* SECTION: nact_preferences_editor
* @short_description: #NactPreferencesEditor class definition.
- * @include: nact/nact-preferences-editor.h
+ * @include: ui/nact-preferences-editor.h
*
* This class is derived from NactWindow.
* It encapsulates the "PreferencesDialog" widget dialog.
diff --git a/src/ui/nact-schemes-list.h b/src/ui/nact-schemes-list.h
index bb74e29..0204cfa 100644
--- a/src/ui/nact-schemes-list.h
+++ b/src/ui/nact-schemes-list.h
@@ -33,7 +33,7 @@
/**
* SECTION: nact_schemes_list
* @short_description: Schemes list view management.
- * @include: nact/nact-schemes-list.h
+ * @include: ui/nact-schemes-list.h
*
* This set of functions manages the schemes list view.
*
diff --git a/src/ui/nact-statusbar.h b/src/ui/nact-statusbar.h
index 36c0395..b70efea 100644
--- a/src/ui/nact-statusbar.h
+++ b/src/ui/nact-statusbar.h
@@ -33,7 +33,7 @@
/**
* SECTION: nact_statusbar
* @short_description: Statusbar class definition.
- * @include: nact/nact-statusbar.h
+ * @include: ui/nact-statusbar.h
*
* The #NactStatusbar embeds both:
* - a message bar
diff --git a/src/ui/nact-tree-model-dnd.c b/src/ui/nact-tree-model-dnd.c
index df31204..68e8332 100644
--- a/src/ui/nact-tree-model-dnd.c
+++ b/src/ui/nact-tree-model-dnd.c
@@ -42,7 +42,7 @@
#include <core/fma-importer.h>
#include "fma-application.h"
-#include "nact-clipboard.h"
+#include "fma-clipboard.h"
#include "nact-statusbar.h"
#include "nact-main-window.h"
#include "nact-tree-model.h"
@@ -61,24 +61,24 @@
* 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
- * nact_clipboard_dnd_clear()
- * call once nact_clipboard_on_drag_begin( treeview, context, main_window )
+ * 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 )
- * nact_clipboard_dnd_set()
+ * fma_clipboard_dnd_set()
* call once nact_tree_model_dnd_on_drag_end
- * nact_clipboard_dnd_drag_end
- * nact_clipboard_get_from_dnd_clipboard_callback
- * nact_clipboard_dnd_clear
+ * 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 nact_clipboard_get_data_for_intern_use
+ * call once fma_clipboard_get_data_for_intern_use
* call once nact_tree_model_idrag_dest_drag_data_received
- * call once nact_clipboard_on_drag_end( treeview, context, main_window )
+ * call once fma_clipboard_on_drag_end( treeview, context, main_window )
*/
#define MAX_XDS_ATOM_VAL_LEN 4096
@@ -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, NACT_XCHANGE_FORMAT_NACT },
- { "XdndDirectSave0", GTK_TARGET_OTHER_APP, NACT_XCHANGE_FORMAT_XDS },
- { "application/xml", GTK_TARGET_OTHER_APP, NACT_XCHANGE_FORMAT_APPLICATION_XML },
- { "text/plain", GTK_TARGET_OTHER_APP, NACT_XCHANGE_FORMAT_TEXT_PLAIN },
+ { "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 },
};
/* 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, NACT_XCHANGE_FORMAT_NACT },
- { "text/uri-list", 0, NACT_XCHANGE_FORMAT_URI_LIST },
- { "application/xml", 0, NACT_XCHANGE_FORMAT_APPLICATION_XML },
- { "text/plain", 0, NACT_XCHANGE_FORMAT_TEXT_PLAIN },
+ { "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 },
};
guint tree_model_dnd_dest_formats_count = G_N_ELEMENTS( tree_model_dnd_dest_formats );
@@ -210,14 +210,14 @@ nact_tree_model_dnd_idrag_dest_drag_data_received( GtkTreeDragDest *drag_dest, G
g_free( path_str );
switch( info ){
- case NACT_XCHANGE_FORMAT_NACT:
+ case FMA_XCHANGE_FORMAT_NACT:
result = drop_inside( model, dest, selection_data );
break;
/* drop some actions from outside
* most probably from the file manager as a list of uris
*/
- case NACT_XCHANGE_FORMAT_URI_LIST:
+ case FMA_XCHANGE_FORMAT_URI_LIST:
result = drop_uri_list( model, dest, selection_data );
break;
@@ -263,19 +263,19 @@ 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
*
- * NACT_XCHANGE_FORMAT_NACT:
+ * FMA_XCHANGE_FORMAT_NACT:
* internal format for drag and drop inside the treeview:
* - copy in the clipboard the list of row references
* - selection data is empty
*
- * NACT_XCHANGE_FORMAT_XDS:
+ * FMA_XCHANGE_FORMAT_XDS:
* exchange format to drop to outside:
* - copy in the clipboard the list of row references
* - set the destination folder
* - selection data is 'success' or 'failure'
*
- * NACT_XCHANGE_FORMAT_APPLICATION_XML:
- * NACT_XCHANGE_FORMAT_TEXT_PLAIN:
+ * FMA_XCHANGE_FORMAT_APPLICATION_XML:
+ * FMA_XCHANGE_FORMAT_TEXT_PLAIN:
* exchange format to export to outside:
* - do not use dnd clipboard
* - selection data receives the export in text format
@@ -333,15 +333,15 @@ nact_tree_model_dnd_imulti_drag_source_drag_data_get( EggTreeMultiDragSource *dr
}
switch( info ){
- case NACT_XCHANGE_FORMAT_NACT:
+ case FMA_XCHANGE_FORMAT_NACT:
copy_data = ( context_selected_action == GDK_ACTION_COPY );
gtk_selection_data_set( selection_data,
selection_data_target, 8, ( guchar * ) "", 0 );
- nact_clipboard_dnd_set( model->private->clipboard, info, rows, NULL,
copy_data );
+ fma_clipboard_dnd_set( model->private->clipboard, info, rows, NULL, copy_data
);
ret = TRUE;
break;
- case NACT_XCHANGE_FORMAT_XDS:
+ case FMA_XCHANGE_FORMAT_XDS:
/* get the dest default filename as an uri
* e.g. file:///home/pierre/data/eclipse/filemanager-actions/trash/xds.txt
*/
@@ -356,7 +356,7 @@ nact_tree_model_dnd_imulti_drag_source_drag_data_get( EggTreeMultiDragSource *dr
selection_data_target, 8, ( guchar * )( is_writable ? "S" :
"F" ), 1 );
if( is_writable ){
- nact_clipboard_dnd_set( model->private->clipboard, info, rows,
dest_folder, TRUE );
+ fma_clipboard_dnd_set( model->private->clipboard, info, rows,
dest_folder, TRUE );
}
g_free( dest_folder );
@@ -364,9 +364,9 @@ nact_tree_model_dnd_imulti_drag_source_drag_data_get( EggTreeMultiDragSource *dr
ret = is_writable;
break;
- case NACT_XCHANGE_FORMAT_APPLICATION_XML:
- case NACT_XCHANGE_FORMAT_TEXT_PLAIN:
- data = nact_clipboard_dnd_get_text( model->private->clipboard, rows );
+ case FMA_XCHANGE_FORMAT_APPLICATION_XML:
+ case FMA_XCHANGE_FORMAT_TEXT_PLAIN:
+ data = fma_clipboard_dnd_get_text( model->private->clipboard, rows );
gtk_selection_data_set( selection_data,
selection_data_target, 8, ( guchar * ) data, strlen( data ));
g_free( data );
@@ -499,7 +499,7 @@ nact_tree_model_dnd_on_drag_begin( GtkWidget *widget, GdkDragContext *context, B
model->private->drag_highlight = FALSE;
model->private->drag_drop = FALSE;
- nact_clipboard_dnd_clear( model->private->clipboard );
+ fma_clipboard_dnd_clear( model->private->clipboard );
#if GTK_CHECK_VERSION( 2, 22, 0 )
context_source_window = gdk_drag_context_get_source_window( context );
@@ -539,8 +539,8 @@ nact_tree_model_dnd_on_drag_end( GtkWidget *widget, GdkDragContext *context, Bas
( void * ) window,
( void * ) model, G_OBJECT( model )->ref_count );
- nact_clipboard_dnd_drag_end( model->private->clipboard );
- nact_clipboard_dnd_clear( model->private->clipboard );
+ fma_clipboard_dnd_drag_end( model->private->clipboard );
+ fma_clipboard_dnd_clear( model->private->clipboard );
#if GTK_CHECK_VERSION( 2, 22, 0 )
context_source_window = gdk_drag_context_get_source_window( context );
@@ -592,7 +592,7 @@ drop_inside( NactTreeModel *model, GtkTreePath *dest, GtkSelectionData *selecti
* without profile: only valid dest is outside (besides of) an action
*/
parent = NULL;
- rows = nact_clipboard_dnd_get_data( model->private->clipboard, ©_data );
+ rows = fma_clipboard_dnd_get_data( model->private->clipboard, ©_data );
if( !is_drop_possible( model, dest, &parent )){
return( FALSE );
diff --git a/src/ui/nact-tree-model-priv.h b/src/ui/nact-tree-model-priv.h
index b409829..1a5f264 100644
--- a/src/ui/nact-tree-model-priv.h
+++ b/src/ui/nact-tree-model-priv.h
@@ -30,14 +30,14 @@
/**
* SECTION: nact_tree_model
* @short_description: #NactTreeModel private data definition.
- * @include: nact/nact-tree-model-priv.h
+ * @include: ui/nact-tree-model-priv.h
*/
#ifndef __UI_NACT_TREE_MODEL_PRIV_H__
#define __UI_NACT_TREE_MODEL_PRIV_H__
#include "egg-tree-multi-dnd.h"
-#include "nact-clipboard.h"
+#include "fma-clipboard.h"
G_BEGIN_DECLS
@@ -55,7 +55,7 @@ struct _NactTreeModelPrivate {
/* must be initialized right after the instanciation
*/
NactMainWindow *window;
- NactClipboard *clipboard;
+ FMAClipboard *clipboard;
guint mode;
/* runtime data
diff --git a/src/ui/nact-tree-model.c b/src/ui/nact-tree-model.c
index d10404d..7616016 100644
--- a/src/ui/nact-tree-model.c
+++ b/src/ui/nact-tree-model.c
@@ -39,7 +39,7 @@
#include "core/fma-iprefs.h"
#include "fma-application.h"
-#include "nact-clipboard.h"
+#include "fma-clipboard.h"
#include "base-gtk-utils.h"
#include "nact-main-tab.h"
#include "nact-main-window.h"
@@ -267,7 +267,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 */
- priv->clipboard = nact_clipboard_new( priv->window );
+ priv->clipboard = fma_clipboard_new( priv->window );
if( priv->mode == TREE_MODE_EDITION ){
@@ -427,7 +427,7 @@ nact_tree_model_set_main_window( NactTreeModel *tmodel, NactMainWindow *window )
if( !priv->dispose_has_run ){
priv->window = window;
- priv->clipboard = nact_clipboard_new( window );
+ priv->clipboard = fma_clipboard_new( window );
/* depends of window and edition mode */
connect_item_updated_signal( tmodel );
diff --git a/src/ui/nact-tree-model.h b/src/ui/nact-tree-model.h
index 4e52512..541e93d 100644
--- a/src/ui/nact-tree-model.h
+++ b/src/ui/nact-tree-model.h
@@ -30,7 +30,7 @@
/**
* SECTION: nact_tree_model
* @short_description: #NactTreeModel class definition.
- * @include: nact/nact-tree-model.h
+ * @include: ui/nact-tree-model.h
*
* NactTreeModel is derived from GtkTreeModelFilter in order to be able
* to selectively display profiles, whether an action has one or more
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]