[gtkmm] C++11: Use nullptr.



commit 454d06aee845ff5b241bdfb3c2cf73c7c24e4f96
Author: Murray Cumming <murrayc murrayc com>
Date:   Thu Jul 16 22:10:28 2015 +0200

    C++11: Use nullptr.

 demos/gtk-demo/demowindow.cc                      |   12 ++++----
 demos/gtk-demo/example_builder.cc                 |    8 +++---
 demos/gtk-demo/example_buttonbox.cc               |    2 +-
 demos/gtk-demo/example_change_display.cc          |   12 ++++----
 demos/gtk-demo/example_stacksidebar.cc            |    2 +-
 demos/gtk-demo/example_textview.cc                |    4 +-
 demos/gtk-demo/example_treeview_editable_cells.cc |    2 +-
 demos/gtk-demo/textwidget.cc                      |   12 ++++----
 gdk/src/device.ccg                                |    6 ++--
 gdk/src/dragcontext.ccg                           |    2 +-
 gdk/src/pixbuf.ccg                                |   14 +++++-----
 gdk/src/pixbufanimation.ccg                       |    2 +-
 gdk/src/pixbufloader.ccg                          |    4 +-
 gdk/src/window.ccg                                |    2 +-
 gtk/src/actiongroup.ccg                           |    2 +-
 gtk/src/builder.ccg                               |    4 +-
 gtk/src/builder.hg                                |    8 +++---
 gtk/src/cellrenderercombo.ccg                     |    2 +-
 gtk/src/colorselection.ccg                        |   12 ++++----
 gtk/src/container.ccg                             |    6 ++--
 gtk/src/cssprovider.ccg                           |    2 +-
 gtk/src/iconinfo.ccg                              |    8 +++---
 gtk/src/iconset.ccg                               |    2 +-
 gtk/src/icontheme.ccg                             |    2 +-
 gtk/src/iconview.ccg                              |   30 ++++++++++----------
 gtk/src/image.ccg                                 |    8 +++---
 gtk/src/main.ccg                                  |    6 ++--
 gtk/src/pagesetup.ccg                             |    2 +-
 gtk/src/printoperation.ccg                        |    2 +-
 gtk/src/printsettings.ccg                         |    2 +-
 gtk/src/recentinfo.ccg                            |    2 +-
 gtk/src/selectiondata.ccg                         |    2 +-
 gtk/src/statusicon.ccg                            |    2 +-
 gtk/src/stylecontext.ccg                          |    2 +-
 gtk/src/treepath.ccg                              |    6 ++--
 gtk/src/treeselection.ccg                         |    6 ++--
 gtk/src/treeview.ccg                              |   22 +++++++-------
 gtk/src/treeview.hg                               |    2 +-
 gtk/src/uimanager.ccg                             |    2 +-
 tests/builder/main.cc                             |    4 +-
 tests/delete_cpp_child/main.cc                    |    2 +-
 tests/dialog/main.cc                              |    2 +-
 tools/extra_defs_gen/generate_defs_gtk.cc         |    2 +-
 43 files changed, 119 insertions(+), 119 deletions(-)
---
diff --git a/demos/gtk-demo/demowindow.cc b/demos/gtk-demo/demowindow.cc
index c5b8ab8..cda5188 100644
--- a/demos/gtk-demo/demowindow.cc
+++ b/demos/gtk-demo/demowindow.cc
@@ -61,7 +61,7 @@ DemoWindow::DemoWindow()
   m_TextWidget_Info(false),
   m_TextWidget_Source(true)
 {
-  m_pWindow_Example = 0;
+  m_pWindow_Example = nullptr;
 
   configure_header_bar();
 
@@ -262,8 +262,8 @@ void DemoWindow::load_file(const std::string& filename)
       lines[i] = g_strchomp(lines[i]);
 
       gchar *p = lines[i];
-      gchar *q = 0;
-      gchar *r = 0;
+      gchar *q = nullptr;
+      gchar *r = nullptr;
 
       switch (state)
       {
@@ -384,7 +384,7 @@ void DemoWindow::add_data_tabs(const std::string& filename)
   for (unsigned int i = 0; i < resources.size(); ++i)
   {
     const std::string resource_name = resource_dir + "/" + resources[i];
-    Gtk::Widget* widget = 0;
+    Gtk::Widget* widget = nullptr;
     Gtk::Image* image = new Gtk::Image();
     image->set_from_resource(resource_name);
     if (image->get_pixbuf() || image->get_animation())
@@ -396,7 +396,7 @@ void DemoWindow::add_data_tabs(const std::string& filename)
       // So we've used the best API available to figure out it's
       // not an image. Let's try something else then.
       delete image;
-      image = 0;
+      image = nullptr;
 
       Glib::RefPtr<const Glib::Bytes> bytes;
       try
@@ -449,7 +449,7 @@ void DemoWindow::on_example_window_hide()
       (*iter)[demo_columns().italic] = false;
 
       delete m_pWindow_Example;
-      m_pWindow_Example = 0;
+      m_pWindow_Example = nullptr;
     }
   }
 }
diff --git a/demos/gtk-demo/example_builder.cc b/demos/gtk-demo/example_builder.cc
index d7d2ac7..1b68be6 100644
--- a/demos/gtk-demo/example_builder.cc
+++ b/demos/gtk-demo/example_builder.cc
@@ -38,7 +38,7 @@ Gtk::Window* do_builder()
   }
 
   // Get the GtkBuilder-instantiated window:
-  Example_Builder* pWindow = 0;
+  Example_Builder* pWindow = nullptr;
   builder->get_widget_derived("window1", pWindow);
   if (!pWindow)
   {
@@ -53,7 +53,7 @@ Example_Builder::Example_Builder(
 : Gtk::Window(cobject),
   m_builder(builder)
 {
-  Gtk::Toolbar* pToolbar = 0;
+  Gtk::Toolbar* pToolbar = nullptr;
   builder->get_widget("toolbar1", pToolbar);
   if (pToolbar)
     pToolbar->get_style_context()->add_class("primary-toolbar");
@@ -67,7 +67,7 @@ Example_Builder::Example_Builder(
   Glib::RefPtr<Gtk::AccelGroup> refAccelGroup = Gtk::AccelGroup::create();
   add_accel_group(refAccelGroup);
 
-  Gtk::MenuItem* pMenuItem = 0;
+  Gtk::MenuItem* pMenuItem = nullptr;
   builder->get_widget("new_item", pMenuItem);
   if (pMenuItem)
     pMenuItem->add_accelerator("activate", refAccelGroup,
@@ -127,7 +127,7 @@ void Example_Builder::on_file_quit()
 
 void Example_Builder::on_help_about()
 {
-  Gtk::AboutDialog* pDialog = 0;
+  Gtk::AboutDialog* pDialog = nullptr;
   m_builder->get_widget("aboutdialog1", pDialog);
   if (pDialog)
   {
diff --git a/demos/gtk-demo/example_buttonbox.cc b/demos/gtk-demo/example_buttonbox.cc
index 6a1d645..de8cf41 100644
--- a/demos/gtk-demo/example_buttonbox.cc
+++ b/demos/gtk-demo/example_buttonbox.cc
@@ -71,7 +71,7 @@ Gtk::Frame* Example_ButtonBox::create_button_box(bool horizontal, const Glib::us
 {
   Gtk::Frame* pFrame = Gtk::manage(new Gtk::Frame(title));
 
-  Gtk::ButtonBox* pButtonBox = 0;
+  Gtk::ButtonBox* pButtonBox = nullptr;
   if (horizontal)
     pButtonBox = Gtk::manage(new Gtk::ButtonBox(Gtk::ORIENTATION_HORIZONTAL));
   else
diff --git a/demos/gtk-demo/example_change_display.cc b/demos/gtk-demo/example_change_display.cc
index e430042..67a33f6 100644
--- a/demos/gtk-demo/example_change_display.cc
+++ b/demos/gtk-demo/example_change_display.cc
@@ -149,7 +149,7 @@ Example_ChangeDisplay::~Example_ChangeDisplay()
   if(m_pPopup)
   {
     delete m_pPopup;
-    m_pPopup = 0;
+    m_pPopup = nullptr;
   }
 }
 
@@ -299,7 +299,7 @@ Gtk::Window* Example_ChangeDisplay::query_for_toplevel(const Glib::RefPtr<Gdk::S
   if(m_pPopup)
   {
     delete m_pPopup;
-    m_pPopup = 0;
+    m_pPopup = nullptr;
   }
 
   m_pPopup = new Popup(screen, prompt);
@@ -308,7 +308,7 @@ Gtk::Window* Example_ChangeDisplay::query_for_toplevel(const Glib::RefPtr<Gdk::S
 
   Glib::RefPtr<Gdk::Cursor> cursor = Gdk::Cursor::create(refDisplay, Gdk::CROSSHAIR);
 
-  Gtk::Window* toplevel = 0;
+  Gtk::Window* toplevel = nullptr;
 
   //TODO: Find a suitable replacement for this:
   //const GdkGrabStatus grabbed =  m_pPopup->get_window()->grab(false, Gdk::BUTTON_RELEASE_MASK, cursor, 
GDK_CURRENT_TIME);
@@ -328,7 +328,7 @@ Gtk::Window* Example_ChangeDisplay::query_for_toplevel(const Glib::RefPtr<Gdk::S
 
     toplevel = dynamic_cast<Gtk::Window*>(find_toplevel_at_pointer(screen->get_display()));
     if (toplevel == m_pPopup)
-       toplevel = 0;
+       toplevel = nullptr;
   }
 
   Gdk::flush(); /* Really release the grab */
@@ -348,8 +348,8 @@ Gtk::Widget* Example_ChangeDisplay::find_toplevel_at_pointer(const Glib::RefPtr<
   {
     // The user data field of a GdkWindow is used to store a pointer
     // to the widget that created it.
-    GtkWidget* cWidget = 0;
-    gpointer* user_data = 0;
+    GtkWidget* cWidget = nullptr;
+    gpointer* user_data = nullptr;
     refPointerWindow->get_user_data(user_data);
     cWidget = (GtkWidget*)user_data;
 
diff --git a/demos/gtk-demo/example_stacksidebar.cc b/demos/gtk-demo/example_stacksidebar.cc
index 52aeaa5..6982a58 100644
--- a/demos/gtk-demo/example_stacksidebar.cc
+++ b/demos/gtk-demo/example_stacksidebar.cc
@@ -61,7 +61,7 @@ Example_StackSidebar::Example_StackSidebar()
   fill_page_names();
   for (std::size_t i = 0; i != m_page_names.size(); ++i)
   {
-    Gtk::Widget* widget = 0;
+    Gtk::Widget* widget = nullptr;
     if (i == 0)
     {
       Gtk::Image* image = Gtk::manage(new Gtk::Image());
diff --git a/demos/gtk-demo/example_textview.cc b/demos/gtk-demo/example_textview.cc
index fe689dd..b0bdbe0 100644
--- a/demos/gtk-demo/example_textview.cc
+++ b/demos/gtk-demo/example_textview.cc
@@ -381,7 +381,7 @@ void Example_TextView::attach_widgets(Gtk::TextView& text_view)
   while(find_anchor(iter)) //previously created with create_child_anchor().
   {
     Glib::RefPtr<Gtk::TextChildAnchor> refAnchor = iter.get_child_anchor();
-    Gtk::Widget* pWidget = 0;
+    Gtk::Widget* pWidget = nullptr;
     if (i == 0)
     {
       Gtk::Button* pButton = Gtk::manage( new Gtk::Button("Click Me") );
@@ -417,7 +417,7 @@ void Example_TextView::attach_widgets(Gtk::TextView& text_view)
     }
     else
     {
-      pWidget = 0;
+      pWidget = nullptr;
       g_assert_not_reached ();
     }
 
diff --git a/demos/gtk-demo/example_treeview_editable_cells.cc 
b/demos/gtk-demo/example_treeview_editable_cells.cc
index 7083402..08614a2 100644
--- a/demos/gtk-demo/example_treeview_editable_cells.cc
+++ b/demos/gtk-demo/example_treeview_editable_cells.cc
@@ -204,7 +204,7 @@ void Example_TreeView_EditableCells::on_column_number_edited(const Glib::ustring
     if(iter)
     {
       //Convert the text to a number, using the same logic used by GtkCellRendererText when it stores 
numbers.
-      char* pchEnd = 0;
+      char* pchEnd = nullptr;
       int new_value = (int) strtod(new_text.c_str(), &pchEnd);
 
       //Store the user's new text in the model:
diff --git a/demos/gtk-demo/textwidget.cc b/demos/gtk-demo/textwidget.cc
index 44627b3..089860a 100644
--- a/demos/gtk-demo/textwidget.cc
+++ b/demos/gtk-demo/textwidget.cc
@@ -191,7 +191,7 @@ parse_chars (constpch text,
        bool   start)
 {
   int i = 0;
-  const char* next_token = 0;
+  const char* next_token = nullptr;
 
   /* Handle comments first */
   if(*state == STATE_IN_COMMENT)
@@ -207,8 +207,8 @@ parse_chars (constpch text,
     return;
   }
 
-  *tag = 0;
-  *end_ptr = 0;
+  *tag = nullptr;
+  *end_ptr = nullptr;
 
   /* check for comment */
   if (!strncmp (text, "/*", 2))
@@ -227,7 +227,7 @@ parse_chars (constpch text,
   /* check for preprocessor defines */
   if (*text == '#' && start)
   {
-    *end_ptr = 0;
+    *end_ptr = nullptr;
     *tag = "preprocessor";
     return;
   }
@@ -345,8 +345,8 @@ void TextWidget::fontify()
     const Glib::ustring& str = iterStart.get_text(iterNext);
     const gchar* start_ptr = str.c_str();
 
-    const gchar* end_ptr = 0;
-    const gchar* tag = 0;
+    const gchar* end_ptr = nullptr;
+    const gchar* tag = nullptr;
 
     do
     {
diff --git a/gdk/src/device.ccg b/gdk/src/device.ccg
index cd6ae7e..0ff05aa 100644
--- a/gdk/src/device.ccg
+++ b/gdk/src/device.ccg
@@ -25,7 +25,7 @@ namespace Gdk
 
 std::vector<TimeCoord> Device::get_history(const Glib::RefPtr<Window>& window, guint32 start, guint32 stop) 
const
 {
-  GdkTimeCoord** coords = 0;
+  GdkTimeCoord** coords = nullptr;
   int events_count = 0;
 
   // we don't care about returned value - false means that either getting history is unsupported or no 
motion events happened.
@@ -41,7 +41,7 @@ void Device::get_position(int& x, int& y) const
 
 void Device::get_position(Glib::RefPtr<Screen>& screen, int& x, int& y) const
 {
-  GdkScreen* cScreen = 0;
+  GdkScreen* cScreen = nullptr;
   gdk_device_get_position(const_cast<GdkDevice*>(gobj()), &cScreen, &x, &y);
   screen = Glib::wrap(cScreen, true);
 }
@@ -53,7 +53,7 @@ void Device::get_position(double& x, double& y) const
 
 void Device::get_position(Glib::RefPtr<Screen>& screen, double& x, double& y) const
 {
-  GdkScreen* cScreen = 0;
+  GdkScreen* cScreen = nullptr;
   gdk_device_get_position_double(const_cast<GdkDevice*>(gobj()), &cScreen, &x, &y);
   screen = Glib::wrap(cScreen, true);
 }
diff --git a/gdk/src/dragcontext.ccg b/gdk/src/dragcontext.ccg
index 0bbfba8..cc0b53b 100644
--- a/gdk/src/dragcontext.ccg
+++ b/gdk/src/dragcontext.ccg
@@ -28,7 +28,7 @@ namespace Gdk
 
 void DragContext::find_window_for_screen(const Glib::RefPtr<Window>& drag_window, const 
Glib::RefPtr<Screen>& screen, int x_root, int y_root, Glib::RefPtr<Window>& dest_window, DragProtocol& 
protocol) const
 {
-  GdkWindow* cWindow = 0;
+  GdkWindow* cWindow = nullptr;
   GdkDragProtocol cprotocol = GDK_DRAG_PROTO_NONE; //arbitrary default.
   gdk_drag_find_window_for_screen(const_cast<GdkDragContext*>(gobj()), drag_window->gobj(), screen->gobj(), 
x_root, y_root, &cWindow, &cprotocol);
   dest_window = Glib::wrap(cWindow);
diff --git a/gdk/src/pixbuf.ccg b/gdk/src/pixbuf.ccg
index 0dddd19..b433299 100644
--- a/gdk/src/pixbuf.ccg
+++ b/gdk/src/pixbuf.ccg
@@ -28,7 +28,7 @@ namespace
 static void pixbuf_destroy_data_callback(guint8* pixels, void* user_data)
 {
   const auto slot = static_cast<Gdk::Pixbuf::SlotDestroyData*>(user_data);
-  g_return_if_fail(slot != 0);
+  g_return_if_fail(slot != nullptr);
 
   try
   {
@@ -88,7 +88,7 @@ Glib::RefPtr<Pixbuf> Pixbuf::create_from_data(const guint8* data, Colorspace col
 
 Glib::RefPtr<Pixbuf> Pixbuf::create_from_stream(const Glib::RefPtr<Gio::InputStream>& stream)
 {
-  GError* gerror = 0;
+  GError* gerror = nullptr;
   auto retvalue = Glib::wrap(gdk_pixbuf_new_from_stream(const_cast<GInputStream*>(Glib::unwrap(stream)), 0, 
&(gerror)));
 
   if(gerror)
@@ -99,7 +99,7 @@ Glib::RefPtr<Pixbuf> Pixbuf::create_from_stream(const Glib::RefPtr<Gio::InputStr
 
 Glib::RefPtr<Pixbuf> Pixbuf::create_from_stream_at_scale(const Glib::RefPtr<Gio::InputStream>& stream, int 
width, int height, bool preserve_aspect_ratio)
 {
-  GError* gerror = 0;
+  GError* gerror = nullptr;
   auto retvalue = 
Glib::wrap(gdk_pixbuf_new_from_stream_at_scale(const_cast<GInputStream*>(Glib::unwrap(stream)), width, 
height, static_cast<int>(preserve_aspect_ratio), 0, &(gerror)));
 
   if(gerror)
@@ -110,7 +110,7 @@ Glib::RefPtr<Pixbuf> Pixbuf::create_from_stream_at_scale(const Glib::RefPtr<Gio:
 
 void Pixbuf::save(const std::string& filename, const Glib::ustring& type) const
 {
-  GError* gerror = 0;
+  GError* gerror = nullptr;
   gdk_pixbuf_savev(const_cast<GdkPixbuf*>(gobj()),
                    filename.c_str(), type.c_str(), 0, 0, &gerror);
 
@@ -130,7 +130,7 @@ void Pixbuf::save(const std::string& filename, const Glib::ustring& type,
                   const std::vector<Glib::ustring>& option_keys,
                   const std::vector<Glib::ustring>& option_values) const
 {
-  GError* gerror = 0;
+  GError* gerror = nullptr;
 
   gdk_pixbuf_savev(
       const_cast<GdkPixbuf*>(gobj()), filename.c_str(), type.c_str(),
@@ -155,7 +155,7 @@ void Pixbuf::save(const std::string& filename, const Glib::ustring& type,
 void Pixbuf::save_to_buffer(gchar*& buffer, gsize& buffer_size,
                             const Glib::ustring& type) const
 {
-  GError* gerror = 0;
+  GError* gerror = nullptr;
 
   gdk_pixbuf_save_to_buffer(
       const_cast<GdkPixbuf*>(gobj()), &buffer, &buffer_size,
@@ -180,7 +180,7 @@ void Pixbuf::save_to_buffer(gchar*& buffer, gsize& buffer_size,
                             const std::vector<Glib::ustring>& option_keys,
                             const std::vector<Glib::ustring>& option_values) const
 {
-  GError* gerror = 0;
+  GError* gerror = nullptr;
 
   gdk_pixbuf_save_to_bufferv(
       const_cast<GdkPixbuf*>(gobj()),
diff --git a/gdk/src/pixbufanimation.ccg b/gdk/src/pixbufanimation.ccg
index 43cf215..55f7c4d 100644
--- a/gdk/src/pixbufanimation.ccg
+++ b/gdk/src/pixbufanimation.ccg
@@ -23,7 +23,7 @@ namespace Gdk
 
 Glib::RefPtr<PixbufAnimation> PixbufAnimation::create_from_file(const Glib::ustring& filename)
 {
-  GError* gerror = 0;
+  GError* gerror = nullptr;
   return Glib::wrap(gdk_pixbuf_animation_new_from_file(filename.c_str(), &gerror));
 
   if(gerror)
diff --git a/gdk/src/pixbufloader.ccg b/gdk/src/pixbufloader.ccg
index d5c9710..ec5a92d 100644
--- a/gdk/src/pixbufloader.ccg
+++ b/gdk/src/pixbufloader.ccg
@@ -26,8 +26,8 @@ namespace
  */
 static GdkPixbufLoader* pixbuf_loader_create_with_type(const Glib::ustring& image_type, bool mime_type)
 {
-  GError* error = 0;
-  GdkPixbufLoader* loader = 0;
+  GError* error = nullptr;
+  GdkPixbufLoader* loader = nullptr;
 
   if(mime_type)
     loader = gdk_pixbuf_loader_new_with_mime_type(image_type.c_str(), &error);
diff --git a/gdk/src/window.ccg b/gdk/src/window.ccg
index df71b0a..eda9989 100644
--- a/gdk/src/window.ccg
+++ b/gdk/src/window.ccg
@@ -63,7 +63,7 @@ Glib::RefPtr<DragContext> Window::drag_begin (const std::vector<Glib::ustring>&
 
 DragProtocol Window::get_drag_protocol(Glib::RefPtr<Window>& target) const
 {
-  GdkWindow* window = 0;
+  GdkWindow* window = nullptr;
   auto result = gdk_window_get_drag_protocol(
     const_cast<GdkWindow*>(gobj()),
     &window);
diff --git a/gtk/src/actiongroup.ccg b/gtk/src/actiongroup.ccg
index 5357b5a..c8c19ad 100644
--- a/gtk/src/actiongroup.ccg
+++ b/gtk/src/actiongroup.ccg
@@ -48,7 +48,7 @@ void ActionGroup::add(const Glib::RefPtr<Action>& action, const AccelKey& accel_
     {
       //Copied from the gtk_action_group_add_action_with_accel() implementation:
 
-      gchar* action_name = 0;
+      gchar* action_name = nullptr;
       g_object_get(G_OBJECT(Glib::unwrap(action)), "name", &action_name, static_cast<char*>(0));
       if(action_name)
       {
diff --git a/gtk/src/builder.ccg b/gtk/src/builder.ccg
index c1c776b..8010fb8 100644
--- a/gtk/src/builder.ccg
+++ b/gtk/src/builder.ccg
@@ -229,7 +229,7 @@ bool Builder::add_from_resource(const std::string& resource_path, const Glib::us
 
 bool Builder::add_from_string(const Glib::ustring& buffer)
 {
-  GError* gerror = 0;
+  GError* gerror = nullptr;
   bool retvalue = gtk_builder_add_from_string(gobj(), buffer.c_str(), -1 /* means null-terminated */, 
&(gerror));
   if(gerror)
     ::Glib::Error::throw_exception(gerror);
@@ -254,7 +254,7 @@ bool Builder::add_from_string(const Glib::ustring& buffer, const Glib::ustring&
 
 bool Builder::add_from_string(const Glib::ustring& buffer, const std::vector<Glib::ustring>& object_ids)
 {
-  GError* gerror = 0;
+  GError* gerror = nullptr;
   bool retvalue = gtk_builder_add_objects_from_string(
     gobj(),
     buffer.c_str(),
diff --git a/gtk/src/builder.hg b/gtk/src/builder.hg
index 715a024..42ab976 100644
--- a/gtk/src/builder.hg
+++ b/gtk/src/builder.hg
@@ -443,7 +443,7 @@ public:
   /** Get a widget from the Builder file.
    * For instance:
    * @code
-   * Gtk::Grid* pGrid = 0;
+   * Gtk::Grid* pGrid = nullptr;
    * refXml->get_widget("mygrid", pGrid);
    * @endcode
    * This method prints a warning message to the console if the widget
@@ -462,7 +462,7 @@ public:
   void get_widget(const Glib::ustring& name, T_Widget*& widget)
   {
     // Initialize output parameter:
-    widget = 0;
+    widget = nullptr;
 
     // The dynamic_cast<> should never fail if get_widget_checked() succeeded.
     widget = dynamic_cast<T_Widget*>(this->get_widget_checked(name, T_Widget::get_base_type()));
@@ -489,7 +489,7 @@ public:
    *
    * For instance:
    * @code
-   * Gtk::DerivedBox* pBox = 0;
+   * Gtk::DerivedBox* pBox = nullptr;
    * refXml->get_widget_derived("mybox", pBox);
    * @endcode
    *
@@ -500,7 +500,7 @@ public:
   void get_widget_derived(const Glib::ustring& name, T_Widget*& widget)
   {
      // Initialize output parameter:
-     widget = 0;
+     widget = nullptr;
 
      // Get the widget from the GtkBuilder file.
      typedef typename T_Widget::BaseObjectType cwidget_type;
diff --git a/gtk/src/cellrenderercombo.ccg b/gtk/src/cellrenderercombo.ccg
index 7776530..bfdaa16 100644
--- a/gtk/src/cellrenderercombo.ccg
+++ b/gtk/src/cellrenderercombo.ccg
@@ -24,7 +24,7 @@ static GtkTreeModel* _get_model(GtkCellRendererCombo* renderer)
   if(!renderer)
     return 0;
 
-  GtkTreeModel* combo_model = 0;
+  GtkTreeModel* combo_model = nullptr;
   g_object_get(G_OBJECT(renderer), "model", &combo_model, (void*)0);
   return combo_model;
 }
diff --git a/gtk/src/colorselection.ccg b/gtk/src/colorselection.ccg
index c688ed4..9369cf5 100644
--- a/gtk/src/colorselection.ccg
+++ b/gtk/src/colorselection.ccg
@@ -23,11 +23,11 @@
 namespace
 {
 
-static Gtk::ColorSelection::SlotChangePaletteHook* global_change_palette_hook = 0;
+static Gtk::ColorSelection::SlotChangePaletteHook* global_change_palette_hook = nullptr;
 
 static void global_change_palette_hook_callback(GdkScreen* screen, const GdkColor* colors, int n_colors)
 {
-  g_return_if_fail(global_change_palette_hook != 0);
+  g_return_if_fail(global_change_palette_hook != nullptr);
 
   try
   {
@@ -45,7 +45,7 @@ static void old_change_palette_hook_callback(const Glib::RefPtr<Gdk::Screen>& sc
                                       const std::vector<Gdk::Color>&    colors,
                                       GtkColorSelectionChangePaletteWithScreenFunc func)
 {
-  g_return_if_fail(func != 0);
+  g_return_if_fail(func != nullptr);
 
   (*func)(Glib::unwrap(screen),
           Glib::ArrayHandler<Gdk::Color, Gdk::ColorTraits>::vector_to_array(colors).data(),
@@ -89,7 +89,7 @@ Gdk::RGBA ColorSelection::get_previous_rgba() const
 // static
 std::vector<Gdk::Color> ColorSelection::palette_from_string(const Glib::ustring& str)
 {
-  GdkColor* colors = 0;
+  GdkColor* colors = nullptr;
   int     n_colors = 0;
 
   gtk_color_selection_palette_from_string(str.c_str(), &colors, &n_colors);
@@ -110,8 +110,8 @@ Glib::ustring ColorSelection::palette_to_string(const std::vector<Gdk::Color>& c
 ColorSelection::SlotChangePaletteHook
 ColorSelection::set_change_palette_hook(const ColorSelection::SlotChangePaletteHook& slot)
 {
-  GtkColorSelectionChangePaletteWithScreenFunc new_func = 0;
-  SlotChangePaletteHook* new_slot = 0;
+  GtkColorSelectionChangePaletteWithScreenFunc new_func = nullptr;
+  SlotChangePaletteHook* new_slot = nullptr;
   SlotChangePaletteHook  old_slot;
 
   if(slot)
diff --git a/gtk/src/container.ccg b/gtk/src/container.ccg
index 7d51d64..fe40a83 100644
--- a/gtk/src/container.ccg
+++ b/gtk/src/container.ccg
@@ -31,7 +31,7 @@ static void container_foreach_callback(GtkWidget* widget_gobj, void* data)
     const auto & slot = *static_cast<Gtk::Container::ForeachSlot*>(data);
     const auto widget = Glib::wrap(widget_gobj);
 
-    g_return_if_fail(widget != 0);
+    g_return_if_fail(widget != nullptr);
 
     slot(*widget);
   }
@@ -184,7 +184,7 @@ bool Container::has_focus_chain() const
 
 std::vector<Widget*> Container::get_focus_chain()
 {
-  GList* list = 0;
+  GList* list = nullptr;
   gtk_container_get_focus_chain(gobj(), &list);
 
   return Glib::ListHandler<Widget*>::list_to_vector(list, Glib::OWNERSHIP_SHALLOW);
@@ -192,7 +192,7 @@ std::vector<Widget*> Container::get_focus_chain()
 
 std::vector<const Widget*> Container::get_focus_chain() const
 {
-  GList* list = 0;
+  GList* list = nullptr;
   gtk_container_get_focus_chain(const_cast<GtkContainer*>(gobj()), &list);
 
   return Glib::ListHandler<const Widget*>::list_to_vector(list, Glib::OWNERSHIP_SHALLOW);
diff --git a/gtk/src/cssprovider.ccg b/gtk/src/cssprovider.ccg
index 9ee4198..666fe47 100644
--- a/gtk/src/cssprovider.ccg
+++ b/gtk/src/cssprovider.ccg
@@ -55,7 +55,7 @@ namespace Gtk
 
 bool CssProvider::load_from_data(const std::string& data)
 {
-  GError* gerror = 0;
+  GError* gerror = nullptr;
   bool retvalue = gtk_css_provider_load_from_data(gobj(), data.c_str(), -1, &(gerror));
   if(gerror)
     Glib::Error::throw_exception(gerror);
diff --git a/gtk/src/iconinfo.ccg b/gtk/src/iconinfo.ccg
index f6dce5f..7827754 100644
--- a/gtk/src/iconinfo.ccg
+++ b/gtk/src/iconinfo.ccg
@@ -64,7 +64,7 @@ _DEPRECATE_IFDEF_START
 G_GNUC_BEGIN_IGNORE_DEPRECATIONS
 std::vector<Gdk::Point> IconInfo::get_attach_points() const
 {
-  GdkPoint* c_attach_points = 0;
+  GdkPoint* c_attach_points = nullptr;
   gint n_points = 0;
   gtk_icon_info_get_attach_points (const_cast<GtkIconInfo*>(gobj()), &c_attach_points, &n_points);
 
@@ -85,7 +85,7 @@ IconInfo::operator const void*() const
 
 Glib::RefPtr<Gdk::Pixbuf> IconInfo::load_symbolic(const Gdk::RGBA& fg, const Gdk::RGBA& success_color, const 
Gdk::RGBA& warning_color, const Gdk::RGBA& error_color, bool& was_symbolic) const
 {
-  GError* gerror = 0;
+  GError* gerror = nullptr;
   gboolean c_was_symbolic = false;
   auto retvalue = Glib::wrap(gtk_icon_info_load_symbolic(const_cast<GtkIconInfo*>(gobj()), 
const_cast<GdkRGBA*>(fg.gobj()), const_cast<GdkRGBA*>(success_color.gobj()), 
const_cast<GdkRGBA*>(warning_color.gobj()), const_cast<GdkRGBA*>(error_color.gobj()), &c_was_symbolic, 
&(gerror)));
   was_symbolic = c_was_symbolic;
@@ -97,7 +97,7 @@ Glib::RefPtr<Gdk::Pixbuf> IconInfo::load_symbolic(const Gdk::RGBA& fg, const Gdk
 
 Glib::RefPtr<Gdk::Pixbuf> IconInfo::load_symbolic(const Glib::RefPtr<StyleContext>& style, bool& 
was_symbolic)
 {
-  GError* gerror = 0;
+  GError* gerror = nullptr;
   gboolean c_was_symbolic = false;
   auto retvalue = Glib::wrap(gtk_icon_info_load_symbolic_for_context(gobj(), Glib::unwrap(style), 
&c_was_symbolic, &(gerror)));
   was_symbolic = c_was_symbolic;
@@ -111,7 +111,7 @@ Glib::RefPtr<Gdk::Pixbuf> IconInfo::load_symbolic(const Glib::RefPtr<StyleContex
 /* deprecated
 Glib::RefPtr<Gdk::Pixbuf> IconInfo::load_symbolic(const Glib::RefPtr<Style>& style, StateType state, bool& 
was_symbolic) const
 {
-  GError* gerror = 0;
+  GError* gerror = nullptr;
   gboolean c_was_symbolic = false;
   auto retvalue = Glib::wrap(gtk_icon_info_load_symbolic_for_style(const_cast<GtkIconInfo*>(gobj()), 
Glib::unwrap(style), ((GtkStateType)(state)), &c_was_symbolic, &(gerror)));
   was_symbolic = c_was_symbolic;
diff --git a/gtk/src/iconset.ccg b/gtk/src/iconset.ccg
index 5c474fb..46211b8 100644
--- a/gtk/src/iconset.ccg
+++ b/gtk/src/iconset.ccg
@@ -30,7 +30,7 @@ Glib::RefPtr<IconSet> IconSet::create(const Glib::RefPtr<Gdk::Pixbuf>& pixbuf)
 
 std::vector<IconSize> IconSet::get_sizes() const
 {
-  GtkIconSize* pSizes = 0;
+  GtkIconSize* pSizes = nullptr;
   int n_sizes = 0;
   gtk_icon_set_get_sizes(const_cast<GtkIconSet*>(gobj()), &pSizes, &n_sizes);
 
diff --git a/gtk/src/icontheme.ccg b/gtk/src/icontheme.ccg
index 8feeb93..da845c2 100644
--- a/gtk/src/icontheme.ccg
+++ b/gtk/src/icontheme.ccg
@@ -31,7 +31,7 @@ void IconTheme::set_search_path(const std::vector<Glib::ustring>& path)
 std::vector<Glib::ustring> IconTheme::get_search_path() const
 {
   int temp_int = 0;
-  gchar** temp_path = 0;
+  gchar** temp_path = nullptr;
   gtk_icon_theme_get_search_path(const_cast<GtkIconTheme*>(gobj()), &temp_path, &temp_int);
   return Glib::ArrayHandler<Glib::ustring>::array_to_vector(temp_path, temp_int, Glib::OWNERSHIP_DEEP);
 }
diff --git a/gtk/src/iconview.ccg b/gtk/src/iconview.ccg
index 5af1990..31a05aa 100644
--- a/gtk/src/iconview.ccg
+++ b/gtk/src/iconview.ccg
@@ -57,8 +57,8 @@ void IconView::selected_foreach(const SlotForeach& slot)
 
 bool IconView::get_item_at_pos(int x, int y, TreeModel::Path& path, CellRenderer*& cell) const
 {
-  GtkTreePath* cpath = 0;
-  GtkCellRenderer* ccell = 0;
+  GtkTreePath* cpath = nullptr;
+  GtkCellRenderer* ccell = nullptr;
   bool result = gtk_icon_view_get_item_at_pos(const_cast<GtkIconView*>(gobj()), x, y, &cpath, &ccell);
 
   path = Glib::wrap(cpath); //Don't take copy because the gtk_icon_view_get_item_at_pos documentation says 
we should free this.
@@ -68,7 +68,7 @@ bool IconView::get_item_at_pos(int x, int y, TreeModel::Path& path, CellRenderer
 
 bool IconView::get_item_at_pos(int x, int y, TreeModel::Path& path) const
 {
-  GtkTreePath* cpath = 0;
+  GtkTreePath* cpath = nullptr;
   bool result = gtk_icon_view_get_item_at_pos(const_cast<GtkIconView*>(gobj()), x, y, &cpath, 0);
 
   path = Glib::wrap(cpath); //Don't take copy because the gtk_icon_view_get_item_at_pos documentation says 
we should free this.
@@ -77,7 +77,7 @@ bool IconView::get_item_at_pos(int x, int y, TreeModel::Path& path) const
 
 bool IconView::get_item_at_pos(int x, int y, CellRenderer*& cell) const
 {
-  GtkCellRenderer* ccell = 0;
+  GtkCellRenderer* ccell = nullptr;
   bool result = gtk_icon_view_get_item_at_pos(const_cast<GtkIconView*>(gobj()), x, y, 0, &ccell);
 
   cell = Glib::wrap(ccell);
@@ -86,8 +86,8 @@ bool IconView::get_item_at_pos(int x, int y, CellRenderer*& cell) const
 
 bool IconView::get_visible_range(TreeModel::Path& start_path, TreeModel::Path& end_path) const
 {
-  GtkTreePath* cstart_path = 0;
-  GtkTreePath* cend_path = 0;
+  GtkTreePath* cstart_path = nullptr;
+  GtkTreePath* cend_path = nullptr;
   bool result = gtk_icon_view_get_visible_range(const_cast<GtkIconView*>(gobj()), &cstart_path, &cend_path);
 
   start_path = Glib::wrap(cstart_path); //Don't take copy because the gtk_icon_view_get_visible_range 
documentation says we should free this.
@@ -99,8 +99,8 @@ bool IconView::get_visible_range(TreeModel::Path& start_path, TreeModel::Path& e
 
 bool IconView::get_cursor(TreeModel::Path& path, CellRenderer*& cell) const
 {
-  GtkTreePath* cpath = 0;
-  GtkCellRenderer* ccell = 0;
+  GtkTreePath* cpath = nullptr;
+  GtkCellRenderer* ccell = nullptr;
   bool result = gtk_icon_view_get_cursor(const_cast<GtkIconView*>(gobj()), &cpath, &ccell);
 
   path = Glib::wrap(cpath); //Don't take copy because the gtk_icon_view_get_cursor documentation says we 
should free this.
@@ -110,7 +110,7 @@ bool IconView::get_cursor(TreeModel::Path& path, CellRenderer*& cell) const
 
 bool IconView::get_cursor(TreeModel::Path& path) const
 {
-  GtkTreePath* cpath = 0;
+  GtkTreePath* cpath = nullptr;
   bool result = gtk_icon_view_get_cursor(const_cast<GtkIconView*>(gobj()), &cpath, 0);
 
   path = Glib::wrap(cpath); //Don't take copy because the gtk_icon_view_get_cursor documentation says we 
should free this.
@@ -119,7 +119,7 @@ bool IconView::get_cursor(TreeModel::Path& path) const
 
 bool IconView::get_cursor(CellRenderer*& cell) const
 {
-  GtkCellRenderer* ccell = 0;
+  GtkCellRenderer* ccell = nullptr;
   bool result = gtk_icon_view_get_cursor(const_cast<GtkIconView*>(gobj()), 0, &ccell);
 
   cell = Glib::wrap(ccell);
@@ -128,7 +128,7 @@ bool IconView::get_cursor(CellRenderer*& cell) const
 
 void IconView::get_drag_dest_item(TreeModel::Path& path, IconViewDropPosition& pos) const
 {
-  GtkTreePath* cpath = 0;
+  GtkTreePath* cpath = nullptr;
   gtk_icon_view_get_drag_dest_item(const_cast<GtkIconView*>(gobj()), &cpath, 
(GtkIconViewDropPosition*)(&pos));
   if(cpath)
     path = Gtk::TreeModel::Path(cpath, true /* make_a_copy */);
@@ -136,7 +136,7 @@ void IconView::get_drag_dest_item(TreeModel::Path& path, IconViewDropPosition& p
 
 void IconView::get_drag_dest_item(TreeModel::Path& path) const
 {
-  GtkTreePath* cpath = 0;
+  GtkTreePath* cpath = nullptr;
   gtk_icon_view_get_drag_dest_item(const_cast<GtkIconView*>(gobj()), &cpath, NULL);
   if(cpath)
     path = Gtk::TreeModel::Path(cpath, true /* make_a_copy */);
@@ -150,7 +150,7 @@ void IconView::get_drag_dest_item(IconViewDropPosition& pos) const
 
 bool IconView::get_dest_item_at_pos(int drag_x, int drag_y, TreeModel::Path& path, IconViewDropPosition& 
pos) const
 {
-  GtkTreePath* cpath = 0;
+  GtkTreePath* cpath = nullptr;
   const bool result = gtk_icon_view_get_dest_item_at_pos(const_cast<GtkIconView*>(gobj()), drag_x, drag_y, 
&cpath, (GtkIconViewDropPosition*)(&pos));
   if(cpath)
     path = Gtk::TreeModel::Path(cpath, true /* make_a_copy */);
@@ -160,7 +160,7 @@ bool IconView::get_dest_item_at_pos(int drag_x, int drag_y, TreeModel::Path& pat
 
 bool IconView::get_dest_item_at_pos(int drag_x, int drag_y, TreeModel::Path& path) const
 {
-  GtkTreePath* cpath = 0;
+  GtkTreePath* cpath = nullptr;
   const bool result = gtk_icon_view_get_dest_item_at_pos(const_cast<GtkIconView*>(gobj()), drag_x, drag_y, 
&cpath, NULL);
   if(cpath)
     path = Gtk::TreeModel::Path(cpath, true /* make_a_copy */);
@@ -190,7 +190,7 @@ IconView::get_tooltip_context_path(int& x, int& y,
                                    bool keyboard_tip,
                                    TreeModel::Path& path)
 {
-  GtkTreePath* cpath = 0;
+  GtkTreePath* cpath = nullptr;
 
   gboolean result =
     gtk_icon_view_get_tooltip_context(gobj(),
diff --git a/gtk/src/image.ccg b/gtk/src/image.ccg
index ba4e2fa..da0912c 100644
--- a/gtk/src/image.ccg
+++ b/gtk/src/image.ccg
@@ -44,7 +44,7 @@ Image::Image(const Glib::RefPtr<Gdk::PixbufAnimation>& animation)
 G_GNUC_BEGIN_IGNORE_DEPRECATIONS
 void Image::get_stock(Gtk::StockID& stock_id, IconSize& size) const
 {
-  char* pStockID = 0; // GTK+ iconsistency: although not const, it should not be freed.
+  char* pStockID = nullptr; // GTK+ iconsistency: although not const, it should not be freed.
   GtkIconSize icon_size = GTK_ICON_SIZE_INVALID;
 
   gtk_image_get_stock(const_cast<GtkImage*>(gobj()), &pStockID, &icon_size);
@@ -59,7 +59,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS
 G_GNUC_BEGIN_IGNORE_DEPRECATIONS
 void Image::get_icon_set(Glib::RefPtr<IconSet>& icon_set, IconSize& size) const
 {
-  GtkIconSet* pIconSet = 0;
+  GtkIconSet* pIconSet = nullptr;
   GtkIconSize icon_size = GTK_ICON_SIZE_INVALID;
 
   gtk_image_get_icon_set(const_cast<GtkImage*>(gobj()), &pIconSet, &icon_size);
@@ -72,14 +72,14 @@ G_GNUC_END_IGNORE_DEPRECATIONS
 
 Glib::ustring Image::get_icon_name() const
 {
-  const gchar* pchIconName = 0;
+  const gchar* pchIconName = nullptr;
   gtk_image_get_icon_name(const_cast<GtkImage*>(gobj()), &pchIconName, 0);
   return Glib::convert_const_gchar_ptr_to_ustring(pchIconName);
 }
 
 Glib::RefPtr<Gio::Icon> Image::get_gicon(Gtk::IconSize& icon_size)
 {
-  GIcon* cicon = 0;
+  GIcon* cicon = nullptr;
   GtkIconSize cicon_size = GTK_ICON_SIZE_INVALID;
   gtk_image_get_gicon(gobj(), &cicon, &cicon_size);
 
diff --git a/gtk/src/main.ccg b/gtk/src/main.ccg
index 145fda0..7133c9c 100644
--- a/gtk/src/main.ccg
+++ b/gtk/src/main.ccg
@@ -79,7 +79,7 @@ private:
  * for instance.
  */
 // static
-GSList* GtkMainConnectionNode::connection_list_ = 0;
+GSList* GtkMainConnectionNode::connection_list_ = nullptr;
 
 GtkMainConnectionNode::GtkMainConnectionNode(const sigc::slot_base& slot)
 :
@@ -243,7 +243,7 @@ gint KeySnooperSig::gtk_callback(GtkWidget* widget, GdkEventKey* event, gpointer
 
 KeySnooperSig Main::signal_key_snooper_;
 
-Main*         Main::instance_ = 0;
+Main*         Main::instance_ = nullptr;
 
 /**** Gtk::Main -- construction/destruction ********************************/
 
@@ -273,7 +273,7 @@ Main::~Main()
   // Main::~Main would still run. So this prevents the crash.
   if(instance_ == this)
   {
-    instance_ = 0;
+    instance_ = nullptr;
     GtkMainConnectionNode::list_notify_all();
 
     // Release the gtkmm type registration tables,
diff --git a/gtk/src/pagesetup.ccg b/gtk/src/pagesetup.ccg
index 9ff9001..7769395 100644
--- a/gtk/src/pagesetup.ccg
+++ b/gtk/src/pagesetup.ccg
@@ -54,7 +54,7 @@ void PageSetup::save_to_key_file(Glib::KeyFile& key_file) const
 
 bool PageSetup::load_from_key_file(const Glib::KeyFile& key_file)
 {
-  GError* gerror = 0;
+  GError* gerror = nullptr;
   bool retvalue = gtk_page_setup_load_key_file(gobj(), const_cast<GKeyFile*>((key_file).gobj()), NULL, 
&(gerror));
   if(gerror)
     ::Glib::Error::throw_exception(gerror);
diff --git a/gtk/src/printoperation.ccg b/gtk/src/printoperation.ccg
index d6fa569..e8e7aff 100644
--- a/gtk/src/printoperation.ccg
+++ b/gtk/src/printoperation.ccg
@@ -43,7 +43,7 @@ namespace Gtk
 PrintOperationResult
 PrintOperation::run(PrintOperationAction action)
 {
-  GError* gerror = 0;
+  GError* gerror = nullptr;
   PrintOperationResult res =
     (PrintOperationResult)gtk_print_operation_run(this->gobj(), (GtkPrintOperationAction)action, 0, &gerror);
 
diff --git a/gtk/src/printsettings.ccg b/gtk/src/printsettings.ccg
index 1fef30e..7f91f83 100644
--- a/gtk/src/printsettings.ccg
+++ b/gtk/src/printsettings.ccg
@@ -139,7 +139,7 @@ void PrintSettings::set_page_ranges(const std::vector<PrintSettings::PageRange>&
 
 bool PrintSettings::load_from_key_file(const Glib::KeyFile& key_file)
 {
-  GError* gerror = 0;
+  GError* gerror = nullptr;
   bool retvalue = gtk_print_settings_load_key_file(gobj(), const_cast<GKeyFile*>((key_file).gobj()), NULL, 
&(gerror));
   if(gerror)
     ::Glib::Error::throw_exception(gerror);
diff --git a/gtk/src/recentinfo.ccg b/gtk/src/recentinfo.ccg
index 08d6418..78e7e87 100644
--- a/gtk/src/recentinfo.ccg
+++ b/gtk/src/recentinfo.ccg
@@ -34,7 +34,7 @@ std::vector<Glib::ustring> RecentInfo::get_applications() const
 bool RecentInfo::get_application_info(const Glib::ustring& app_name, std::string& app_exec,
                                       guint& count, std::time_t& time_) const
 {
-  const char* app_exec_cstr = 0;
+  const char* app_exec_cstr = nullptr;
   const int found = gtk_recent_info_get_application_info(
       const_cast<GtkRecentInfo*>(gobj()), app_name.c_str(), &app_exec_cstr, &count, &time_);
 
diff --git a/gtk/src/selectiondata.ccg b/gtk/src/selectiondata.ccg
index a23b2fc..5a36b86 100644
--- a/gtk/src/selectiondata.ccg
+++ b/gtk/src/selectiondata.ccg
@@ -74,7 +74,7 @@ std::string SelectionData::get_target() const
 
 std::vector<std::string> SelectionData::get_targets() const
 {
-  GdkAtom* targets = 0;
+  GdkAtom* targets = nullptr;
   int n_targets = 0;
 
   if(!gtk_selection_data_get_targets(const_cast<GtkSelectionData*>(gobj()), &targets, &n_targets))
diff --git a/gtk/src/statusicon.ccg b/gtk/src/statusicon.ccg
index 55afdad..3b6f3ba 100644
--- a/gtk/src/statusicon.ccg
+++ b/gtk/src/statusicon.ccg
@@ -46,7 +46,7 @@ Glib::RefPtr<StatusIcon> StatusIcon::create_from_file(const std::string& filenam
 
 bool StatusIcon::get_geometry(Glib::RefPtr<Gdk::Screen>& screen, Gdk::Rectangle& area, Orientation& 
orientation)
 {
-  GdkScreen* cscreen = 0;
+  GdkScreen* cscreen = nullptr;
   GdkRectangle carea;
   const bool result = gtk_status_icon_get_geometry(const_cast<GtkStatusIcon*>(gobj()), &cscreen, &carea, 
(GtkOrientation*)(&orientation));
 
diff --git a/gtk/src/stylecontext.ccg b/gtk/src/stylecontext.ccg
index 24043a6..ae5bb16 100644
--- a/gtk/src/stylecontext.ccg
+++ b/gtk/src/stylecontext.ccg
@@ -51,7 +51,7 @@ _DEPRECATE_IFDEF_END
 Pango::FontDescription StyleContext::get_font(StateFlags state) const
 {
   // gtk_style_context_get_font() is deprecated.
-  PangoFontDescription* description = 0;
+  PangoFontDescription* description = nullptr;
   gtk_style_context_get(const_cast<GtkStyleContext*>(gobj()), (GtkStateFlags)state, "font", &description, 
NULL);
   // gtk_style_context_get() returns a newly allocated font description, owned by the caller.
   return Glib::wrap(description, false);
diff --git a/gtk/src/treepath.ccg b/gtk/src/treepath.ccg
index 53abe0c..d0618fd 100644
--- a/gtk/src/treepath.ccg
+++ b/gtk/src/treepath.ccg
@@ -119,8 +119,8 @@ TreePath::const_iterator TreePath::end() const
 
 bool TreePath::get_from_selection_data(const SelectionData& selection_data, Glib::RefPtr<TreeModel>& model, 
TreePath& path) //static
 {
-  GtkTreeModel* src_model = 0;
-  GtkTreePath* src_path = 0;
+  GtkTreeModel* src_model = nullptr;
+  GtkTreePath* src_path = nullptr;
   gboolean result = gtk_tree_get_row_drag_data(const_cast<GtkSelectionData*>(selection_data.gobj()), 
&src_model, &src_path);
 
   model = Glib::wrap(src_model, true /* take_copy=true */);
@@ -133,7 +133,7 @@ bool TreePath::get_from_selection_data(const SelectionData& selection_data, Glib
 
 bool TreePath::get_from_selection_data(const SelectionData& selection_data, TreePath& path) //static
 {
-  GtkTreePath* src_path = 0;
+  GtkTreePath* src_path = nullptr;
   gboolean result = gtk_tree_get_row_drag_data(const_cast<GtkSelectionData*>(selection_data.gobj()), 0, 
&src_path);
 
   //gtk_tree_get_row_drag_data gives us ownership of src_path.
diff --git a/gtk/src/treeselection.ccg b/gtk/src/treeselection.ccg
index 49284d9..9c54d9c 100644
--- a/gtk/src/treeselection.ccg
+++ b/gtk/src/treeselection.ccg
@@ -123,7 +123,7 @@ Glib::RefPtr<const TreeModel> TreeSelection::get_model() const
 TreeModel::iterator TreeSelection::get_selected()
 {
   TreeModel::iterator iter;
-  GtkTreeModel* model_gobject = 0;
+  GtkTreeModel* model_gobject = nullptr;
 
   gtk_tree_selection_get_selected(gobj(), &model_gobject, iter.gobj());
 
@@ -134,7 +134,7 @@ TreeModel::iterator TreeSelection::get_selected()
 TreeModel::iterator TreeSelection::get_selected(Glib::RefPtr<TreeModel>& model)
 {
   TreeModel::iterator iter;
-  GtkTreeModel* model_gobject = 0;
+  GtkTreeModel* model_gobject = nullptr;
 
   gtk_tree_selection_get_selected(gobj(), &model_gobject, iter.gobj());
 
@@ -170,7 +170,7 @@ std::vector<TreeModel::Path> TreeSelection::get_selected_rows() const
 
 std::vector<TreeModel::Path> TreeSelection::get_selected_rows(Glib::RefPtr<TreeModel>& model)
 {
-  GtkTreeModel* model_gobject = 0;
+  GtkTreeModel* model_gobject = nullptr;
 
   const std::vector<TreeModel::Path> result (Glib::ListHandler<TreeModel::Path, 
TreePathTraits>::list_to_vector(gtk_tree_selection_get_selected_rows(
       const_cast<GtkTreeSelection*>(gobj()), &model_gobject), Glib::OWNERSHIP_DEEP));
diff --git a/gtk/src/treeview.ccg b/gtk/src/treeview.ccg
index 7e33059..850e32a 100644
--- a/gtk/src/treeview.ccg
+++ b/gtk/src/treeview.ccg
@@ -136,8 +136,8 @@ void TreeView::set_cursor(const TreeModel::Path& path)
 
 void TreeView::get_cursor(TreeModel::Path& path, TreeViewColumn*& focus_column)
 {
-  GtkTreePath* pTreePath = 0;
-  GtkTreeViewColumn* pTreeViewColumn = 0;
+  GtkTreePath* pTreePath = nullptr;
+  GtkTreeViewColumn* pTreeViewColumn = nullptr;
   gtk_tree_view_get_cursor(gobj(), &pTreePath, &pTreeViewColumn);
 
   path = TreeModel::Path(pTreePath, false); /* Use the existing underlying GtkTreePath instance without 
copying and freeing, because gtk_tree_view_get_cursor() gives us ownernship. */
@@ -178,8 +178,8 @@ void TreeView::enable_model_drag_dest(Gdk::DragAction actions)
 
 bool TreeView::get_path_at_pos(int x, int y, TreeModel::Path& path, TreeViewColumn*& column, int& cell_x, 
int& cell_y) const
 {
-  GtkTreePath* pTreePath = 0;
-  GtkTreeViewColumn* pTreeViewColumn = 0;
+  GtkTreePath* pTreePath = nullptr;
+  GtkTreeViewColumn* pTreeViewColumn = nullptr;
   const bool result = gtk_tree_view_get_path_at_pos(const_cast<GtkTreeView*>(gobj()), x, y, &pTreePath, 
&pTreeViewColumn, &cell_x, &cell_y);
 
   path = TreeModel::Path(pTreePath, false /* don't take a copy, because the gtk_tree_view_get_path_at_pos() 
docs say that we must free the path */ );
@@ -189,7 +189,7 @@ bool TreeView::get_path_at_pos(int x, int y, TreeModel::Path& path, TreeViewColu
 
 bool TreeView::get_path_at_pos(int x, int y, TreeModel::Path& path) const
 {
-  GtkTreePath* pTreePath = 0;
+  GtkTreePath* pTreePath = nullptr;
   const bool result = gtk_tree_view_get_path_at_pos(const_cast<GtkTreeView*>(gobj()), x, y, &pTreePath, 0, 
0, 0);
 
   path = TreeModel::Path(pTreePath, false /* don't take a copy, because the gtk_tree_view_get_path_at_pos() 
docs say that we must free the path */ );
@@ -209,14 +209,14 @@ int TreeView::append_column(const Glib::ustring& title, CellRenderer& cell)
 
 void TreeView::get_drag_dest_row(TreeModel::Path& path, TreeViewDropPosition& pos) const
 {
-  GtkTreePath* pTreePath = 0;
+  GtkTreePath* pTreePath = nullptr;
   gtk_tree_view_get_drag_dest_row(const_cast<GtkTreeView*>(gobj()), &pTreePath, (GtkTreeViewDropPosition*) 
&pos);
   path = TreeModel::Path(pTreePath, true); //true = take_copy.
 }
 
 bool TreeView::get_dest_row_at_pos(int drag_x, int drag_y, TreeModel::Path& path, TreeViewDropPosition& pos) 
const
 {
-  GtkTreePath* pTreePath = 0;
+  GtkTreePath* pTreePath = nullptr;
   const bool bResult = gtk_tree_view_get_dest_row_at_pos(
       const_cast<GtkTreeView*>(gobj()), drag_x, drag_y, &pTreePath, (GtkTreeViewDropPosition*) &pos);
 
@@ -393,8 +393,8 @@ void TreeView::set_search_position_func(const SlotSearchPosition& slot)
 
 bool TreeView::get_visible_range(TreeModel::Path& start_path, TreeModel::Path& end_path) const
 {
-  GtkTreePath* pTreePathStart = 0;
-  GtkTreePath* pTreePathEnd = 0;
+  GtkTreePath* pTreePathStart = nullptr;
+  GtkTreePath* pTreePathEnd = nullptr;
   bool result = gtk_tree_view_get_visible_range(const_cast<GtkTreeView*>(gobj()), &pTreePathStart, 
&pTreePathEnd);
 
   start_path = TreeModel::Path(pTreePathStart, false /* don't take a copy, because the 
gtk_tree_view_get_visible_range() docs say that we must free the path */ );
@@ -453,8 +453,8 @@ TreeView::get_tooltip_context_iter(int& x, int& y,
 
 bool TreeView::is_blank_at_pos(int x, int y, TreePath& path, TreeViewColumn*& column, int& cell_x, int& 
cell_y) const
 {
-  GtkTreePath* cpath = 0;
-  GtkTreeViewColumn* pcolumn = 0;
+  GtkTreePath* cpath = nullptr;
+  GtkTreeViewColumn* pcolumn = nullptr;
   const bool result = gtk_tree_view_is_blank_at_pos(const_cast<GtkTreeView*>(gobj()), x, y, &cpath, 
&pcolumn, &(cell_x), &(cell_y));
 
   path = TreePath(cpath, false /* take ownership instead of taking a copy */);
diff --git a/gtk/src/treeview.hg b/gtk/src/treeview.hg
index 3a562e9..d6fad5a 100644
--- a/gtk/src/treeview.hg
+++ b/gtk/src/treeview.hg
@@ -1183,7 +1183,7 @@ void _auto_store_on_cellrenderer_text_edited_numerical(const Glib::ustring& path
       //new_value << astream; //Get it out of the stream as the numerical type.
 
       //Convert the text to a number, using the same logic used by GtkCellRendererText when it stores 
numbers.
-      char* pchEnd = 0;
+      char* pchEnd = nullptr;
       ColumnType new_value = static_cast<ColumnType>( strtod(new_text.c_str(), &pchEnd) );
 
       //Store the user's new text in the model:
diff --git a/gtk/src/uimanager.ccg b/gtk/src/uimanager.ccg
index 0c4b6be..376c10a 100644
--- a/gtk/src/uimanager.ccg
+++ b/gtk/src/uimanager.ccg
@@ -28,7 +28,7 @@ typedef UIManager::ui_merge_id ui_merge_id; //Help gmmproc so that it does not n
 
 UIManager::ui_merge_id UIManager::add_ui_from_string(const Glib::ustring& buffer)
 {
-  GError* gerror = 0;
+  GError* gerror = nullptr;
   guint retvalue = gtk_ui_manager_add_ui_from_string(gobj(), buffer.c_str(), buffer.size(), &(gerror));
 
   if (gerror)
diff --git a/tests/builder/main.cc b/tests/builder/main.cc
index 3bbfba1..c9c1ac1 100644
--- a/tests/builder/main.cc
+++ b/tests/builder/main.cc
@@ -152,10 +152,10 @@ int main(int argc, char* argv[])
 
   Glib::RefPtr<Gtk::Builder> builder = Gtk::Builder::create_from_string(gladefile);
 
-  MainWindow* main_win = 0;
+  MainWindow* main_win = nullptr;
   builder->get_widget_derived("main_window", main_win);
 
-  Gtk::Button* orph_button = 0;
+  Gtk::Button* orph_button = nullptr;
   builder->get_widget("orphaned_button", orph_button);
   orph_button->add_destroy_notify_callback(0, on_orphaned_button_deleted);
 
diff --git a/tests/delete_cpp_child/main.cc b/tests/delete_cpp_child/main.cc
index 6966349..bd507b6 100644
--- a/tests/delete_cpp_child/main.cc
+++ b/tests/delete_cpp_child/main.cc
@@ -44,7 +44,7 @@ void AppWindow::on_button_clicked()
   {
     g_warning("AppWindow::on_button_clicked(): label refcount=%d", G_OBJECT(m_label->gobj())->ref_count);
     delete m_label;
-    m_label = 0;
+    m_label = nullptr;
   }
 }
 
diff --git a/tests/dialog/main.cc b/tests/dialog/main.cc
index 890d43b..44e4e90 100644
--- a/tests/dialog/main.cc
+++ b/tests/dialog/main.cc
@@ -44,7 +44,7 @@ void AppWindow::on_button_clicked()
   {
     g_warning("AppWindow::on_button_clicked(): label refcount=%d", G_OBJECT(m_label->gobj())->ref_count);
     delete m_label;
-    m_label = 0;
+    m_label = nullptr;
   }
 }
 
diff --git a/tools/extra_defs_gen/generate_defs_gtk.cc b/tools/extra_defs_gen/generate_defs_gtk.cc
index efdcb25..633048b 100644
--- a/tools/extra_defs_gen/generate_defs_gtk.cc
+++ b/tools/extra_defs_gen/generate_defs_gtk.cc
@@ -282,7 +282,7 @@ std::string get_child_properties(GType gtype)
   std::string strResult; std::string strObjectName = g_type_name(gtype);
 
   //Get the list of properties:
-  GParamSpec** ppParamSpec = 0;
+  GParamSpec** ppParamSpec = nullptr;
   guint iCount = 0;
   if(g_type_is_a(gtype, GTK_TYPE_CONTAINER))
   {



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