gtkmm r1123 - in branches/gtkmm-2-14: . demos/gtk-demo gtk/src
- From: daniel svn gnome org
- To: svn-commits-list gnome org
- Subject: gtkmm r1123 - in branches/gtkmm-2-14: . demos/gtk-demo gtk/src
- Date: Mon, 23 Mar 2009 16:04:24 +0000 (UTC)
Author: daniel
Date: Mon Mar 23 16:04:24 2009
New Revision: 1123
URL: http://svn.gnome.org/viewvc/gtkmm?rev=1123&view=rev
Log:
Fix --disable-api-exceptions build
* gtk/src/builder.{ccg,hg}: Conditionalize all exception handling
code in order to fix the build with --disable-api-exceptions.
* gtk/src/printjob.hg: ditto,
* demos/gtk-demo/example_images.cc: ditto,
* demos/gtk-demo/example_treeview_treestore.cc: ditto.
Modified:
branches/gtkmm-2-14/ (props changed)
branches/gtkmm-2-14/ChangeLog
branches/gtkmm-2-14/demos/gtk-demo/example_images.cc
branches/gtkmm-2-14/demos/gtk-demo/example_treeview_treestore.cc
branches/gtkmm-2-14/gtk/src/builder.ccg
branches/gtkmm-2-14/gtk/src/builder.hg
branches/gtkmm-2-14/gtk/src/printjob.hg
Modified: branches/gtkmm-2-14/demos/gtk-demo/example_images.cc
==============================================================================
--- branches/gtkmm-2-14/demos/gtk-demo/example_images.cc (original)
+++ branches/gtkmm-2-14/demos/gtk-demo/example_images.cc Mon Mar 23 16:04:24 2009
@@ -261,7 +261,7 @@
{
#else
std::auto_ptr<Glib::Error> error;
- m_image_stream = Glib::IOChannel::create_from_file(demo_find_file("alphatest.png)", "r", error);
+ m_image_stream = Glib::IOChannel::create_from_file(demo_find_file("alphatest.png"), "r", error);
if(error.get())
{
#endif //GLIBMM_EXCEPTIONS_ENABLED
Modified: branches/gtkmm-2-14/demos/gtk-demo/example_treeview_treestore.cc
==============================================================================
--- branches/gtkmm-2-14/demos/gtk-demo/example_treeview_treestore.cc (original)
+++ branches/gtkmm-2-14/demos/gtk-demo/example_treeview_treestore.cc Mon Mar 23 16:04:24 2009
@@ -173,6 +173,9 @@
add_columns();
m_ScrolledWindow.add(m_TreeView);
+#ifndef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
+ signal_realize().connect(sigc::mem_fun(*this, &Example_TreeView_TreeStore::on_realize), false);
+#endif
show_all();
}
@@ -475,8 +478,9 @@
void Example_TreeView_TreeStore::on_realize()
{
m_TreeView.expand_all();
-
+#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
//call base class:
Window::on_realize();
+#endif
}
Modified: branches/gtkmm-2-14/gtk/src/builder.ccg
==============================================================================
--- branches/gtkmm-2-14/gtk/src/builder.ccg (original)
+++ branches/gtkmm-2-14/gtk/src/builder.ccg Mon Mar 23 16:04:24 2009
@@ -46,7 +46,8 @@
namespace Gtk
{
-//static
+#ifdef GLIBMM_EXCEPTIONS_ENABLED
+// static
Glib::RefPtr<Builder> Builder::create_from_file(const std::string& filename)
{
Glib::RefPtr<Builder> builder = Builder::create();
@@ -55,8 +56,20 @@
else
return Glib::RefPtr<Builder>();
}
+#else
+Glib::RefPtr<Builder> Builder::create_from_file(const std::string& filename,
+ std::auto_ptr<Glib::Error>& error)
+{
+ Glib::RefPtr<Builder> builder = Builder::create();
+ if(builder->add_from_file(filename, error))
+ return builder;
+ else
+ return Glib::RefPtr<Builder>();
+}
+#endif /* !GLIBMM_EXCEPTIONS_ENABLED */
-//static
+#ifdef GLIBMM_EXCEPTIONS_ENABLED
+// static
Glib::RefPtr<Builder> Builder::create_from_file(const std::string& filename, const char* object_id)
{
Glib::RefPtr<Builder> builder = Builder::create();
@@ -95,6 +108,17 @@
else
return Glib::RefPtr<Builder>();
}
+#else
+Glib::RefPtr<Builder> Builder::create_from_string(const Glib::ustring& buffer,
+ std::auto_ptr<Glib::Error>& error)
+{
+ Glib::RefPtr<Builder> builder = Builder::create();
+ if(builder->add_from_string(buffer, error))
+ return builder;
+ else
+ return Glib::RefPtr<Builder>();
+}
+#endif /* !GLIBMM_EXCEPTIONS_ENABLED */
//static
Glib::RefPtr<Builder> Builder::create_from_string(const Glib::ustring& buffer, const char* object_id)
Modified: branches/gtkmm-2-14/gtk/src/builder.hg
==============================================================================
--- branches/gtkmm-2-14/gtk/src/builder.hg (original)
+++ branches/gtkmm-2-14/gtk/src/builder.hg Mon Mar 23 16:04:24 2009
@@ -60,7 +60,12 @@
*
* @newin2p12
*/
+#ifdef GLIBMM_EXCEPTIONS_ENABLED
static Glib::RefPtr<Builder> create_from_file(const std::string& filename);
+#else
+ static Glib::RefPtr<Builder> create_from_file(const std::string& filename,
+ std::auto_ptr<Glib::Error>& error);
+#endif
/** Parses a file containing a GtkBuilder UI definition, building only the requested object.
*
@@ -121,8 +126,12 @@
*
* @newin2p12
*/
+#ifdef GLIBMM_EXCEPTIONS_ENABLED
static Glib::RefPtr<Builder> create_from_string(const Glib::ustring& buffer);
-
+#else
+ static Glib::RefPtr<Builder> create_from_string(const Glib::ustring& buffer,
+ std::auto_ptr<Glib::Error>& error);
+#endif
//This is just to avoid the ambiguous call when using a string literal,
//caused by the overload that takes a StringArrayHandle.
/** Parses a string containing a GtkBuilder UI definition building only the requested object.
Modified: branches/gtkmm-2-14/gtk/src/printjob.hg
==============================================================================
--- branches/gtkmm-2-14/gtk/src/printjob.hg (original)
+++ branches/gtkmm-2-14/gtk/src/printjob.hg Mon Mar 23 16:04:24 2009
@@ -65,7 +65,7 @@
#m4 _CONVERSION(`cairo_surface_t*',`Cairo::RefPtr<const Cairo::Surface>',`Cairo::RefPtr<Cairo::Surface>(new Cairo::Surface($3, false /* take reference */))')
_WRAP_METHOD(Cairo::RefPtr<Cairo::Surface> get_surface(), gtk_print_job_get_surface, errthrow)
- _WRAP_METHOD(Cairo::RefPtr<const Cairo::Surface> get_surface() const, gtk_print_job_get_surface, constversion, errthrow)
+ _WRAP_METHOD(Cairo::RefPtr<const Cairo::Surface> get_surface() const, gtk_print_job_get_surface, errthrow)
_WRAP_METHOD(void set_track_print_status(bool track_status = true), gtk_print_job_set_track_print_status)
_WRAP_METHOD(bool get_track_print_status() const, gtk_print_job_get_track_print_status)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]