[glom/maemo5: 4/4] Maemo: Fix the non-exceptions build again.
- From: Murray Cumming <murrayc src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [glom/maemo5: 4/4] Maemo: Fix the non-exceptions build again.
- Date: Fri, 25 Sep 2009 12:09:26 +0000 (UTC)
commit ff851cd231f7d00296deac0b2005b76c84dc8b40
Author: Murray Cumming <murrayc murrayc com>
Date: Fri Sep 25 14:09:14 2009 +0200
Maemo: Fix the non-exceptions build again.
* glom/print_layout/canvas_print_layout.cc: Added ifdefs around KeyFile
calls. I wonder why I only noticed this now.
ChangeLog | 7 +++++++
glom/print_layout/canvas_print_layout.cc | 20 +++++++++++++++++++-
2 files changed, 26 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 288675d..f1f2df9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2009-09-25 Murray Cumming <murrayc murrayc com>
+
+ Maemo: Fix the non-exceptions build again.
+
+ * glom/print_layout/canvas_print_layout.cc: Added ifdefs around KeyFile
+ calls. I wonder why I only noticed this now.
+
2009-09-24 Murray Cumming <murrayc murrayc com>
Self-Hosting: Use the new ident configuration for PostgreSQL 8.4.
diff --git a/glom/print_layout/canvas_print_layout.cc b/glom/print_layout/canvas_print_layout.cc
index 5894480..ad301d4 100644
--- a/glom/print_layout/canvas_print_layout.cc
+++ b/glom/print_layout/canvas_print_layout.cc
@@ -89,7 +89,15 @@ void Canvas_PrintLayout::set_print_layout(const Glib::ustring& table_name, const
if(!key_file_text.empty())
{
Glib::KeyFile key_file;
+
+ #ifdef GLIBMM_EXCEPTIONS_ENABLED
+ //TODO: Catch an exception
key_file.load_from_data(key_file_text);
+ #else
+ std::auto_ptr<Glib::Error> ex;
+ key_file.load_from_data(key_file_text, Glib::KEY_FILE_NONE, ex);
+ #endif
+
//TODO: Use this when gtkmm and GTK+ have been fixed: page_setup = Gtk::PageSetup::create(key_file);
page_setup = Glib::wrap(gtk_page_setup_new_from_key_file(key_file.gobj(), NULL, NULL));
}
@@ -107,7 +115,17 @@ sharedptr<PrintLayout> Canvas_PrintLayout::get_print_layout()
//Page Setup:
Glib::KeyFile key_file;
m_page_setup->save_to_key_file(key_file);
- result->set_page_setup(key_file.to_data());
+
+ Glib::ustring data;
+ #ifdef GLIBMM_EXCEPTIONS_ENABLED
+ //TODO: Catch an exception
+ data = key_file.to_data();
+ #else
+ std::auto_ptr<Glib::Error> ex;
+ data = key_file.to_data(ex);
+ #endif
+
+ result->set_page_setup(data);
return result;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]