[gnome-documents] utils: remove unused code
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-documents] utils: remove unused code
- Date: Sun, 30 Oct 2016 23:20:28 +0000 (UTC)
commit c3ada55262a3aa0f29bfe22b5165b4a1bf16c03f
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Sun Oct 30 16:01:19 2016 -0700
utils: remove unused code
src/lib/gd-utils.c | 107 ----------------------------------------------------
src/lib/gd-utils.h | 4 --
2 files changed, 0 insertions(+), 111 deletions(-)
---
diff --git a/src/lib/gd-utils.c b/src/lib/gd-utils.c
index 6f841ef..9782b90 100644
--- a/src/lib/gd-utils.c
+++ b/src/lib/gd-utils.c
@@ -168,113 +168,6 @@ gd_filename_strip_extension (const char * filename_with_extension)
}
/**
- * gd_filename_to_mime_type:
- * @filename_with_extension:
- *
- * Returns: (transfer none):
- */
-const char *
-gd_filename_to_mime_type (const gchar *filename_with_extension)
-{
- const gchar *extension;
- const gchar *type = NULL;
-
- g_return_val_if_fail (filename_with_extension != NULL, NULL);
-
- extension = gd_filename_get_extension_offset (filename_with_extension);
-
- if (g_strcmp0 (extension, ".pdf") == 0)
- type = "application/pdf";
- else if (g_strcmp0 (extension, ".djv") == 0)
- type = "image/vnd.djvu+multipage";
- else if (g_strcmp0 (extension, ".djvu") == 0)
- type = "image/vnd.djvu+multipage";
- else if (g_strcmp0 (extension, ".epub") == 0)
- type = "application/epub+zip";
- else if (g_strcmp0 (extension, ".cbr") == 0)
- type = "application/x-cbr";
- else if (g_strcmp0 (extension, ".cbz") == 0)
- type = "application/x-cbz";
- else if (g_strcmp0 (extension, ".cbt") == 0)
- type = "application/x-cbt";
- else if (g_strcmp0 (extension, ".cb7") == 0)
- type = "application/x-cb7";
- else if (g_strcmp0 (extension, ".fb2.zip") == 0)
- type = "application/x-zip-compressed-fb2";
- else if (g_strcmp0 (extension, ".fb2") == 0)
- type = "application/x-fictionbook+xml";
- else if (g_strcmp0 (extension, ".mobi") == 0)
- type = "application/x-mobipocket-ebook";
- else if (g_strcmp0 (extension, ".prc") == 0)
- type = "application/x-mobipocket-ebook";
-
- return type;
-}
-
-/**
- * gd_filename_to_rdf_type:
- * @filename_with_extension:
- *
- * Returns: (transfer none):
- */
-const char *
-gd_filename_to_rdf_type (const gchar *filename_with_extension)
-{
- const gchar *extension;
- const gchar *type = NULL;
-
- g_return_val_if_fail (filename_with_extension != NULL, NULL);
-
- extension = gd_filename_get_extension_offset (filename_with_extension);
-
- if (g_strcmp0 (extension, ".html") == 0)
- type = "nfo:HtmlDocument";
-
- else if (g_strcmp0 (extension, ".doc") == 0
- || g_strcmp0 (extension, ".docm") == 0
- || g_strcmp0 (extension, ".docx") == 0
- || g_strcmp0 (extension, ".dot") == 0
- || g_strcmp0 (extension, ".dotx") == 0
- || g_strcmp0 (extension, ".pdf") == 0)
- type = "nfo:PaginatedTextDocument";
-
- else if (g_strcmp0 (extension, ".epub") == 0
- || g_strcmp0 (extension, ".djv") == 0
- || g_strcmp0 (extension, ".djvu") == 0
- || g_strcmp0 (extension, ".cbr") == 0
- || g_strcmp0 (extension, ".cbz") == 0
- || g_strcmp0 (extension, ".cbt") == 0
- || g_strcmp0 (extension, ".cb7") == 0
- || g_strcmp0 (extension, ".fb2") == 0
- || g_strcmp0 (extension, ".fb2.zip") == 0
- || g_strcmp0 (extension, ".mobi") == 0
- || g_strcmp0 (extension, ".prc") == 0)
- type = "nfo:EBook";
-
- else if (g_strcmp0 (extension, ".pot") == 0
- || g_strcmp0 (extension, ".potm") == 0
- || g_strcmp0 (extension, ".potx") == 0
- || g_strcmp0 (extension, ".pps") == 0
- || g_strcmp0 (extension, ".ppsm") == 0
- || g_strcmp0 (extension, ".ppsx") == 0
- || g_strcmp0 (extension, ".ppt") == 0
- || g_strcmp0 (extension, ".pptm") == 0
- || g_strcmp0 (extension, ".pptx") == 0)
- type = "nfo:Presentation";
-
- else if (g_strcmp0 (extension, ".txt") == 0)
- type = "nfo:PlainTextDocument";
-
- else if (g_strcmp0 (extension, ".xls") == 0
- || g_strcmp0 (extension, ".xlsb") == 0
- || g_strcmp0 (extension, ".xlsm") == 0
- || g_strcmp0 (extension, ".xlsx") == 0)
- type = "nfo:Spreadsheet";
-
- return type;
-}
-
-/**
* gd_iso8601_from_timestamp:
* @timestamp:
*
diff --git a/src/lib/gd-utils.h b/src/lib/gd-utils.h
index 61053f2..d4ff1bb 100644
--- a/src/lib/gd-utils.h
+++ b/src/lib/gd-utils.h
@@ -35,10 +35,6 @@ const char *gd_filename_get_extension_offset (const char *filename);
char *gd_filename_strip_extension (const char * filename_with_extension);
-const char *gd_filename_to_mime_type (const gchar *filename_with_extension);
-
-const char *gd_filename_to_rdf_type (const gchar *filename_with_extension);
-
gchar *gd_iso8601_from_timestamp (gint64 timestamp);
GIcon *gd_create_collection_icon (gint base_size,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]