Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarlos Garcia Campos <carlosgc@gnome.org>2010-07-27 15:43:31 (GMT)
committer Carlos Garcia Campos <carlosgc@gnome.org>2010-07-27 15:47:55 (GMT)
commitc54c1daa5e398a0c1df101bfc04db9cf6a1fb03e (patch)
tree7995d39e50128c58f4a0f8b71df3180be9fabec5
parent47fc87d93eb90481fb3b1cdad9a822559cf189b7 (diff)
[shell] Add ev_metadata_is_empty()
It can be used to know whether a document has already metadata
-rw-r--r--shell/ev-metadata.c6
-rw-r--r--shell/ev-metadata.h1
2 files changed, 7 insertions, 0 deletions
diff --git a/shell/ev-metadata.c b/shell/ev-metadata.c
index e69ecbd..3a0eefa 100644
--- a/shell/ev-metadata.c
+++ b/shell/ev-metadata.c
@@ -137,6 +137,12 @@ ev_metadata_new (GFile *file)
}
gboolean
+ev_metadata_is_empty (EvMetadata *metadata)
+{
+ return g_hash_table_size (metadata->items) == 0;
+}
+
+gboolean
ev_metadata_get_string (EvMetadata *metadata,
const gchar *key,
gchar **value)
diff --git a/shell/ev-metadata.h b/shell/ev-metadata.h
index d8bb17b..f5ce67d 100644
--- a/shell/ev-metadata.h
+++ b/shell/ev-metadata.h
@@ -35,6 +35,7 @@ typedef struct _EvMetadataClass EvMetadataClass;
GType ev_metadata_get_type (void) G_GNUC_CONST;
EvMetadata *ev_metadata_new (GFile *file);
+gboolean ev_metadata_is_empty (EvMetadata *metadata);
gboolean ev_metadata_get_string (EvMetadata *metadata,
const gchar *key,