diff options
author | Marco Pesenti Gritti <marcopg@litl.com> | 2009-03-16 14:09:25 (GMT) |
---|---|---|
committer | Marco Pesenti Gritti <marcopg@litl.com> | 2010-07-27 22:04:20 (GMT) |
commit | a528c5b40534b666dfdf1bcd4736786d4034fc2e (patch) | |
tree | 47ec4b811227e1e33d3e41d7487d026c233a9330 /browser-plugin/plugin.cpp | |
parent | ce47ec697f381c026e7e0fbc08c3c76dc36f495a (diff) |
Cleanup loading error handling.
Diffstat (limited to 'browser-plugin/plugin.cpp')
-rw-r--r-- | browser-plugin/plugin.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/browser-plugin/plugin.cpp b/browser-plugin/plugin.cpp index 15f39ea..295c0f7 100644 --- a/browser-plugin/plugin.cpp +++ b/browser-plugin/plugin.cpp @@ -89,6 +89,12 @@ Plugin::SetWindow (GdkNativeWindow window) } void +Plugin::ShowLoadingError() +{ + /* FIXME display loading error in the UI */ +} + +void Plugin::Load (const char *fname) { GError *error = NULL; @@ -97,11 +103,9 @@ Plugin::Load (const char *fname) char *uri = g_file_get_uri (file); g_object_unref (file); - /* FIXME display loading error in the UI */ - EvDocument *document = ev_document_factory_get_document (uri, &error); if (error) { - g_warning ("Cannot create document for %s", uri); + ShowLoadingError (); g_error_free (error); return; } @@ -111,7 +115,7 @@ Plugin::Load (const char *fname) ev_document_load (document, uri, &error); if (error) { - g_warning ("Cannot load %s", uri); + ShowLoadingError (); g_error_free (error); return; } |