[glom] Utils:get_resource_exists(): Use the latest Gio::Resource API.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glom] Utils:get_resource_exists(): Use the latest Gio::Resource API.
- Date: Mon, 1 Dec 2014 10:39:06 +0000 (UTC)
commit 47f09d00ea890bef7e42d50ad0dbbd7428864dbb
Author: Murray Cumming <murrayc murrayc com>
Date: Mon Dec 1 11:03:42 2014 +0100
Utils:get_resource_exists(): Use the latest Gio::Resource API.
glom/libglom/utils.cc | 10 +---------
1 files changed, 1 insertions(+), 9 deletions(-)
---
diff --git a/glom/libglom/utils.cc b/glom/libglom/utils.cc
index 3560d53..48c77af 100644
--- a/glom/libglom/utils.cc
+++ b/glom/libglom/utils.cc
@@ -1572,15 +1572,7 @@ bool Utils::script_check_for_pygtk2(const Glib::ustring& script)
bool Utils::get_resource_exists(const std::string& resource_path)
{
- try
- {
- Gio::Resource::get_info_global(resource_path);
- return true;
- }
- catch (const Gio::ResourceError&)
- {
- return false;
- }
+ return Gio::Resource::get_file_exists_global_nothrow(resource_path);
}
} //namespace Glom
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]