[nautilus-actions] Remove obsolete NATrackedItem class
- From: Pierre Wieser <pwieser src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus-actions] Remove obsolete NATrackedItem class
- Date: Tue, 16 Mar 2010 21:37:10 +0000 (UTC)
commit 358430570e70acf1ad128c14ef78cb90f4da6137
Author: Pierre Wieser <pwieser trychlos org>
Date: Wed Mar 10 19:07:11 2010 +0100
Remove obsolete NATrackedItem class
ChangeLog | 10 +++
src/core/Makefile.am | 1 -
src/core/na-dbus-tracker.h | 57 ---------------
src/core/na-icontextual.c | 1 -
src/core/na-object-profile.c | 126 ----------------------------------
src/plugin-tracker/na-tracker-dbus.c | 2 -
src/utils/nautilus-actions-run.c | 2 +-
7 files changed, 11 insertions(+), 188 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index d6f0a31..bac7e23 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
2009-03-10 Pierre Wieser <pwieser trychlos org>
+ * src/core/na-dbus-tracker.h: Remove no more used file.
+
+ * src/core/Makefile.am: Updated accordingly.
+
+ * src/core/na-icontextual.c:
+ * src/core/na-object-profile.c:
+ * src/plugin-tracker/na-tracker-dbus.c:
+ * src/utils/nautilus-actions-run.c:
+ Remove all references to NATrackedItem obsolete class.
+
* src/api/na-ifactory-object-data.h:
Rename v1 action data group to NA_FACTORY_ACTION_V1_GROUP.
diff --git a/src/core/Makefile.am b/src/core/Makefile.am
index a398168..50bbf2d 100644
--- a/src/core/Makefile.am
+++ b/src/core/Makefile.am
@@ -42,7 +42,6 @@ libna_core_la_SOURCES = \
na-core-utils.c \
na-data-boxed.c \
na-data-types.c \
- na-dbus-tracker.h \
na-exporter.c \
na-exporter.h \
na-export-format.c \
diff --git a/src/core/na-icontextual.c b/src/core/na-icontextual.c
index 5b85978..afa58bd 100644
--- a/src/core/na-icontextual.c
+++ b/src/core/na-icontextual.c
@@ -39,7 +39,6 @@
#include <api/na-core-utils.h>
#include <api/na-object-api.h>
-#include "na-dbus-tracker.h"
#include "na-gnome-vfs-uri.h"
#include "na-selected-info.h"
diff --git a/src/core/na-object-profile.c b/src/core/na-object-profile.c
index ffd8d26..73e090a 100644
--- a/src/core/na-object-profile.c
+++ b/src/core/na-object-profile.c
@@ -44,7 +44,6 @@
#include "na-factory-provider.h"
#include "na-factory-object.h"
-#include "na-dbus-tracker.h"
#include "na-selected-info.h"
#include "na-gnome-vfs-uri.h"
@@ -91,16 +90,6 @@ static gboolean is_valid_path_parameters( const NAObjectProfile *profile );
static gchar *object_id_new_id( const NAObjectId *item, const NAObjectId *new_parent );
-#if 0
-static gchar *parse_parameters( const NAObjectProfile *profile, gint target, GList* files, gboolean from_nautilus );
-static gboolean is_target_selection_candidate( const NAObjectProfile *profile, GList *files, gboolean from_nautilus );
-static gboolean tracked_is_directory( void *iter, gboolean from_nautilus );
-static gchar *tracked_to_basename( void *iter, gboolean from_nautilus );
-static gchar *tracked_to_mimetype( void *iter, gboolean from_nautilus );
-static gchar *tracked_to_scheme( void *iter, gboolean from_nautilus );
-static int validate_schemes( GSList *schemes2test, void *iter, gboolean from_nautilus );
-#endif
-
GType
na_object_profile_get_type( void )
{
@@ -658,118 +647,3 @@ na_object_profile_parse_parameters( const NAObjectProfile *profile, gint target,
parsed = g_string_free( string, FALSE );
return( parsed );
}
-
-#if 0
-static gboolean
-tracked_is_directory( void *iter, gboolean from_nautilus )
-{
- gboolean is_dir;
- GFile *file;
- GFileType type;
-
- if( from_nautilus ){
- is_dir = nautilus_file_info_is_directory(( NautilusFileInfo * ) iter );
-
- } else {
- file = g_file_new_for_uri((( NATrackedItem * ) iter )->uri );
- type = g_file_query_file_type( file, G_FILE_QUERY_INFO_NONE, NULL );
- is_dir = ( type == G_FILE_TYPE_DIRECTORY );
- g_object_unref( file );
- }
-
- return( is_dir );
-}
-
-static gchar *
-tracked_to_basename( void *iter, gboolean from_nautilus )
-{
- gchar *bname;
- GFile *file;
-
- if( from_nautilus ){
- bname = nautilus_file_info_get_name(( NautilusFileInfo * ) iter );
-
- } else {
- file = g_file_new_for_uri((( NATrackedItem * ) iter )->uri );
- bname = g_file_get_basename( file );
- g_object_unref( file );
- }
-
- return( bname );
-}
-
-static gchar *
-tracked_to_mimetype( void *iter, gboolean from_nautilus )
-{
- gchar *type;
- NATrackedItem *tracked;
- GFile *file;
- GFileInfo *info;
-
- type = NULL;
- if( from_nautilus ){
- type = nautilus_file_info_get_mime_type(( NautilusFileInfo * ) iter );
-
- } else {
- tracked = ( NATrackedItem * ) iter;
- if( tracked->mimetype ){
- type = g_strdup( tracked->mimetype );
-
- } else {
- file = g_file_new_for_uri((( NATrackedItem * ) iter )->uri );
- info = g_file_query_info( file, G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE, G_FILE_QUERY_INFO_NONE, NULL, NULL );
- if( info ){
- type = g_strdup( g_file_info_get_content_type( info ));
- g_object_unref( info );
- }
- g_object_unref( file );
- }
- }
-
- return( type );
-}
-
-static gchar *
-tracked_to_scheme( void *iter, gboolean from_nautilus )
-{
- gchar *scheme;
- NAGnomeVFSURI *vfs;
-
- if( from_nautilus ){
- scheme = nautilus_file_info_get_uri_scheme(( NautilusFileInfo * ) iter );
-
- } else {
- vfs = g_new0( NAGnomeVFSURI, 1 );
- na_gnome_vfs_uri_parse( vfs, (( NATrackedItem * ) iter )->uri );
- scheme = g_strdup( vfs->scheme );
- na_gnome_vfs_uri_free( vfs );
- }
-
- return( scheme );
-}
-
-static int
-validate_schemes( GSList* schemes2test, void* tracked_iter, gboolean from_nautilus )
-{
- int retv = 0;
- GSList* iter;
- gboolean found = FALSE;
- gchar *scheme;
-
- iter = schemes2test;
- while( iter && !found ){
-
- scheme = tracked_to_scheme( tracked_iter, from_nautilus );
-
- if( g_ascii_strncasecmp( scheme, ( gchar * ) iter->data, strlen(( gchar * ) iter->data )) == 0 ){
- found = TRUE;
- retv = 1;
- }
-
- g_free( scheme );
- iter = iter->next;
- }
-
- return retv;
-}
-#endif
diff --git a/src/plugin-tracker/na-tracker-dbus.c b/src/plugin-tracker/na-tracker-dbus.c
index bdef115..670a16e 100644
--- a/src/plugin-tracker/na-tracker-dbus.c
+++ b/src/plugin-tracker/na-tracker-dbus.c
@@ -41,8 +41,6 @@
#include <libnautilus-extension/nautilus-file-info.h>
-#include <core/na-dbus-tracker.h>
-
#include "na-tracker-dbus.h"
#include "na-tracker-dbus-glue.h"
diff --git a/src/utils/nautilus-actions-run.c b/src/utils/nautilus-actions-run.c
index c435be4..2f049f8 100644
--- a/src/utils/nautilus-actions-run.c
+++ b/src/utils/nautilus-actions-run.c
@@ -39,8 +39,8 @@
#include <api/na-core-utils.h>
#include <api/na-object-api.h>
+#include <api/na-dbus.h>
-#include <core/na-dbus-tracker.h>
#include <core/na-pivot.h>
#include <core/na-selected-info.h>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]