[evince/wip/bug654832: 6/18] [libdocument] Remove ev_backends_manager_get_document_module_name



commit 006f10a0b62ab5b088026bd4b545369f9540ee74
Author: Christian Persch <chpe gnome org>
Date:   Sat Feb 13 18:48:09 2010 +0100

    [libdocument] Remove ev_backends_manager_get_document_module_name
    
    Change ev-window-title to use the document class type name instead.
    That code should move to the backend, either directly into the document
    classes' get_title method, or a new get_display_title method.

 libdocument/ev-backends-manager.c |    9 ---------
 libdocument/ev-backends-manager.h |    1 -
 shell/ev-window-title.c           |    6 +++---
 3 files changed, 3 insertions(+), 13 deletions(-)
---
diff --git a/libdocument/ev-backends-manager.c b/libdocument/ev-backends-manager.c
index d94c7f6..46319ce 100644
--- a/libdocument/ev-backends-manager.c
+++ b/libdocument/ev-backends-manager.c
@@ -293,15 +293,6 @@ get_document_backend_info (EvDocument *document)
 	return NULL;
 }
 
-const gchar *
-ev_backends_manager_get_document_module_name (EvDocument *document)
-{
-	EvBackendInfo *info;
-
-	info = get_document_backend_info (document);
-	return info ? info->module_name : NULL;
-}
-
 EvBackendInfo *
 _ev_backends_manager_get_backend_for_document (EvDocument *document)
 {
diff --git a/libdocument/ev-backends-manager.h b/libdocument/ev-backends-manager.h
index 2124619..fa23274 100644
--- a/libdocument/ev-backends-manager.h
+++ b/libdocument/ev-backends-manager.h
@@ -41,7 +41,6 @@ gboolean    _ev_backends_manager_init                     (void);
 void        _ev_backends_manager_shutdown                 (void);
 
 EvDocument  *ev_backends_manager_get_document             (const gchar *mime_type);
-const gchar *ev_backends_manager_get_document_module_name (EvDocument  *document);
 
 G_END_DECLS
 
diff --git a/shell/ev-window-title.c b/shell/ev-window-title.c
index 94dd333..993fb45 100644
--- a/shell/ev-window-title.c
+++ b/shell/ev-window-title.c
@@ -27,8 +27,8 @@
 #include <glib/gi18n.h>
 
 /* Known backends (for bad extensions fix) */
-#define EV_BACKEND_PS  "psdocument"
-#define EV_BACKEND_PDF "pdfdocument"
+#define EV_BACKEND_PS  "PSDocument"
+#define EV_BACKEND_PDF "PdfDocument"
 
 typedef struct
 {
@@ -89,7 +89,7 @@ ev_window_title_sanitize_title (EvWindowTitle *window_title, char **title) {
 	const gchar *backend;
 	int i;
 
-	backend = ev_backends_manager_get_document_module_name (window_title->document);
+	backend = G_OBJECT_TYPE_NAME (window_title->document);
 
 	for (i = 0; i < G_N_ELEMENTS (bad_extensions); i++) {
 		if (g_ascii_strcasecmp (bad_extensions[i].backend, backend) == 0 && 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]