[gtkmm/gtkmm-3-18] Gtk: Use nullptr instead of 0
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm/gtkmm-3-18] Gtk: Use nullptr instead of 0
- Date: Thu, 14 Apr 2016 16:07:02 +0000 (UTC)
commit 94ef0033881cc425242a1921af3401f0439335bb
Author: Kjell Ahlstedt <kjell ahlstedt bredband net>
Date: Thu Dec 10 10:54:00 2015 +0100
Gtk: Use nullptr instead of 0
gtk/gtkmm/accelmap.cc | 5 +---
gtk/gtkmm/childpropertyproxy_base.cc | 4 +--
gtk/gtkmm/object.cc | 4 +-
gtk/gtkmm/radiobuttongroup.cc | 4 +--
gtk/gtkmm/selectiondata_private.cc | 5 +---
gtk/gtkmm/stock.cc | 7 +----
gtk/gtkmm/stockid.cc | 6 +----
gtk/gtkmm/styleproperty.cc | 10 ++++----
gtk/src/aboutdialog.ccg | 4 +-
gtk/src/accellabel.ccg | 2 +-
gtk/src/action.ccg | 4 +-
gtk/src/actionable.hg | 2 +-
gtk/src/actionbar.ccg | 2 +-
gtk/src/actiongroup.ccg | 4 +-
gtk/src/application.ccg | 16 +++++++-------
gtk/src/box.ccg | 2 +-
gtk/src/builder.ccg | 8 +++---
gtk/src/calendar.ccg | 2 +-
gtk/src/celllayout.ccg | 2 +-
gtk/src/cellrenderer.ccg | 2 +-
gtk/src/cellrenderercombo.ccg | 2 +-
gtk/src/cellview.ccg | 2 +-
gtk/src/clipboard.ccg | 6 ++--
gtk/src/colorbutton.ccg | 4 +-
gtk/src/combobox.ccg | 4 +-
gtk/src/container.ccg | 2 +-
gtk/src/entry.ccg | 2 +-
gtk/src/entrycompletion.ccg | 2 +-
gtk/src/flowbox.ccg | 4 +-
gtk/src/frame.ccg | 2 +-
gtk/src/gesture.ccg | 2 +-
gtk/src/gesturemultipress.ccg | 2 +-
gtk/src/headerbar.ccg | 2 +-
gtk/src/iconinfo.ccg | 8 +++---
gtk/src/icontheme.ccg | 2 +-
gtk/src/iconview.ccg | 26 ++++++++++++------------
gtk/src/image.ccg | 4 +-
gtk/src/image.hg | 2 +-
gtk/src/listbox.ccg | 10 ++++----
gtk/src/listboxrow.ccg | 2 +-
gtk/src/liststore.ccg | 2 +-
gtk/src/lockbutton.ccg | 2 +-
gtk/src/main.ccg | 10 ++++----
gtk/src/menu.ccg | 14 ++++++------
gtk/src/menubutton.ccg | 8 +++---
gtk/src/menuitem.ccg | 6 ++--
gtk/src/menushell.ccg | 8 +++---
gtk/src/menutoolbutton.ccg | 12 +++++-----
gtk/src/notebook.ccg | 6 ++--
gtk/src/pagesetup.ccg | 4 +-
gtk/src/papersize.ccg | 6 ++--
gtk/src/printoperation.ccg | 6 ++--
gtk/src/printsettings.ccg | 4 +-
gtk/src/radioaction.ccg | 4 +-
gtk/src/radiobutton.ccg | 2 +-
gtk/src/radiomenuitem.ccg | 2 +-
gtk/src/radiotoolbutton.ccg | 18 ++++++++--------
gtk/src/range.ccg | 2 +-
gtk/src/recentaction.ccg | 8 +++---
gtk/src/recentchooser.ccg | 2 +-
gtk/src/recentfilter.ccg | 4 +-
gtk/src/recentmanager.ccg | 4 +-
gtk/src/scale.hg | 2 +-
gtk/src/scalebutton.ccg | 2 +-
gtk/src/scrollable.ccg | 4 +-
gtk/src/spinbutton.ccg | 2 +-
gtk/src/stacksidebar.ccg | 2 +-
gtk/src/stackswitcher.ccg | 2 +-
gtk/src/statusicon.ccg | 6 ++--
gtk/src/stockitem.ccg | 6 ++--
gtk/src/stylecontext.ccg | 2 +-
gtk/src/textbuffer.ccg | 18 ++++++++--------
gtk/src/textiter.ccg | 12 +++++-----
gtk/src/textiter.hg | 6 ++--
gtk/src/toggleaction.ccg | 4 +-
gtk/src/toggletoolbutton.ccg | 12 +++++-----
gtk/src/toolbar.ccg | 2 +-
gtk/src/toolbutton.ccg | 8 +++---
gtk/src/toolitem.ccg | 2 +-
gtk/src/tooltip.ccg | 8 +++---
gtk/src/treeiter.ccg | 12 +++++-----
gtk/src/treeiter.hg | 8 +++---
gtk/src/treemodel.ccg | 6 ++--
gtk/src/treemodelfilter.ccg | 2 +-
gtk/src/treepath.ccg | 4 +-
gtk/src/treerowreference.ccg | 2 +-
gtk/src/treeselection.ccg | 2 +-
gtk/src/treesortable.ccg | 2 +-
gtk/src/treestore.ccg | 6 ++--
gtk/src/treeview.ccg | 36 +++++++++++++++++-----------------
gtk/src/treeview.hg | 2 +-
gtk/src/treeviewcolumn.ccg | 2 +-
gtk/src/treeviewcolumn.hg | 4 +-
gtk/src/uimanager.ccg | 2 +-
gtk/src/widget.ccg | 26 ++++++++++++------------
gtk/src/window.ccg | 10 ++++----
96 files changed, 264 insertions(+), 281 deletions(-)
---
diff --git a/gtk/gtkmm/accelmap.cc b/gtk/gtkmm/accelmap.cc
index 8ce70ef..1fca2b7 100644
--- a/gtk/gtkmm/accelmap.cc
+++ b/gtk/gtkmm/accelmap.cc
@@ -1,6 +1,3 @@
-// -*- c++ -*-
-/* $Id$ */
-
/* Copyright (C) 2002 The gtkmm Development Team
*
* This library is free software; you can redistribute it and/or
@@ -79,7 +76,7 @@ bool lookup_entry(const Glib::ustring& accel_path, Gtk::AccelKey& key)
bool lookup_entry(const Glib::ustring& accel_path)
{
- return gtk_accel_map_lookup_entry(accel_path.c_str(), 0 /* "optional", according to the C docs. */);
+ return gtk_accel_map_lookup_entry(accel_path.c_str(), nullptr /* "optional", according to the C docs. */);
}
} // namespace AccelMap
diff --git a/gtk/gtkmm/childpropertyproxy_base.cc b/gtk/gtkmm/childpropertyproxy_base.cc
index 1bd5125..7783b58 100644
--- a/gtk/gtkmm/childpropertyproxy_base.cc
+++ b/gtk/gtkmm/childpropertyproxy_base.cc
@@ -1,5 +1,3 @@
-// -*- c++ -*-
-
/* childpropertyproxy_base.cc
*
* Copyright 2014 The gtkmm Development Team
@@ -77,7 +75,7 @@ void ChildPropertyProxy_Base::reset_property_()
const GParamSpec *const pParamSpec =
gtk_container_class_find_child_property(G_OBJECT_GET_CLASS(parent_->gobj()), property_name_);
- g_return_if_fail(pParamSpec != 0);
+ g_return_if_fail(pParamSpec != nullptr);
Glib::ValueBase value;
value.init(G_PARAM_SPEC_VALUE_TYPE(pParamSpec));
diff --git a/gtk/gtkmm/object.cc b/gtk/gtkmm/object.cc
index 99efef6..be5dc63 100644
--- a/gtk/gtkmm/object.cc
+++ b/gtk/gtkmm/object.cc
@@ -199,7 +199,7 @@ void Object::disconnect_cpp_wrapper()
g_object_set_qdata((GObject*)gobj(), Glib::quark_cpp_wrapper_deleted_, (gpointer)true);
//Prevent C++ instance from using GTK+ object:
- gobject_ = 0;
+ gobject_ = nullptr;
//TODO: Disconnect any signals, using gtk methods.
//We'll have to keep a record of all the connections.
@@ -226,7 +226,7 @@ void Object::destroy_notify_()
//Actually this function is called when the GObject is finalized, not when it's
//disposed. Clear the pointer to the GObject, because otherwise it would
//become a dangling pointer, pointing to a non-existant object.
- gobject_ = 0;
+ gobject_ = nullptr;
if(!cpp_destruction_in_progress_) //This function might have been called as a side-effect of destroy_()
when it called g_object_run_dispose().
{
diff --git a/gtk/gtkmm/radiobuttongroup.cc b/gtk/gtkmm/radiobuttongroup.cc
index 7891d5f..de28d3c 100644
--- a/gtk/gtkmm/radiobuttongroup.cc
+++ b/gtk/gtkmm/radiobuttongroup.cc
@@ -1,5 +1,3 @@
-/* $Id$ */
-
/* Copyright(C) 2003 The gtkmm Development Team
*
* This library is free software; you can redistribute it and/or
@@ -32,7 +30,7 @@ namespace Gtk
{
RadioButtonGroup::RadioButtonGroup()
-: group_(0)
+: group_(nullptr)
{}
RadioButtonGroup::RadioButtonGroup(GSList* group)
diff --git a/gtk/gtkmm/selectiondata_private.cc b/gtk/gtkmm/selectiondata_private.cc
index 44af631..854e43a 100644
--- a/gtk/gtkmm/selectiondata_private.cc
+++ b/gtk/gtkmm/selectiondata_private.cc
@@ -1,7 +1,4 @@
-// -*- c++ -*-
-
/*
- *
* Copyright 2002 The gtkmm Development Team
*
* This library is free software; you can redistribute it and/or
@@ -32,7 +29,7 @@ SelectionData_WithoutOwnership::SelectionData_WithoutOwnership(GtkSelectionData*
SelectionData_WithoutOwnership::~SelectionData_WithoutOwnership() noexcept
{
//Prevent the base class's destructor from free-ing the underlying gobject:
- gobject_ = 0;
+ gobject_ = nullptr;
}
} //namespace Gtk
diff --git a/gtk/gtkmm/stock.cc b/gtk/gtkmm/stock.cc
index fde715c..7cd8025 100644
--- a/gtk/gtkmm/stock.cc
+++ b/gtk/gtkmm/stock.cc
@@ -1,11 +1,8 @@
-// -*- c++ -*-
#undef GTK_DISABLE_DEPRECATED
#define GDK_DISABLE_DEPRECATION_WARNINGS 1
#ifndef GTKMM_DISABLE_DEPRECATED // This whole file is deprecated.
-/* $Id$ */
-
/* Copyright (C) 2002 The gtkmm Development Team
*
* This library is free software; you can redistribute it and/or
@@ -159,13 +156,13 @@ bool lookup(const Gtk::StockID& stock_id, Gtk::StockItem& item)
bool lookup(const Gtk::StockID& stock_id, Glib::RefPtr<IconSet>& iconset)
{
iconset = IconSet::lookup_default(stock_id);
- return (iconset && (iconset->gobj() != 0));
+ return (iconset && (iconset->gobj() != nullptr));
}
bool lookup(const Gtk::StockID& stock_id, Gtk::IconSize size, Gtk::Image& image)
{
image.set(stock_id, size);
- return (image.gobj() != 0);
+ return (image.gobj() != nullptr);
}
std::vector<Gtk::StockID> get_ids()
diff --git a/gtk/gtkmm/stockid.cc b/gtk/gtkmm/stockid.cc
index aae9e2a..fb574bf 100644
--- a/gtk/gtkmm/stockid.cc
+++ b/gtk/gtkmm/stockid.cc
@@ -1,9 +1,5 @@
-// -*- c++ -*-
-
#ifndef GTKMM_DISABLE_DEPRECATED // This whole file is deprecated.
-/* $Id$ */
-
/* stockid.cc
*
* Copyright (C) 1998-2002 The gtkmm Development Team
@@ -64,7 +60,7 @@ StockID& StockID::operator=(const StockID& other)
StockID::operator const void*() const
{
- return !(id_.empty()) ? GINT_TO_POINTER(1) : 0 ;
+ return !(id_.empty()) ? GINT_TO_POINTER(1) : nullptr ;
}
bool StockID::equal(const StockID& rhs) const
diff --git a/gtk/gtkmm/styleproperty.cc b/gtk/gtkmm/styleproperty.cc
index 494325d..e748416 100644
--- a/gtk/gtkmm/styleproperty.cc
+++ b/gtk/gtkmm/styleproperty.cc
@@ -27,7 +27,7 @@ StylePropertyBase::StylePropertyBase(Gtk::Widget& widget, GType value_type)
:
widget_ (&widget),
value_type_ (value_type),
- param_spec_ (0)
+ param_spec_ (nullptr)
{
}
@@ -39,7 +39,7 @@ StylePropertyBase::~StylePropertyBase() noexcept
bool StylePropertyBase::lookup_style_property(const Glib::ustring& name)
{
- g_assert(param_spec_ == 0);
+ g_assert(param_spec_ == nullptr);
param_spec_ = gtk_widget_class_find_style_property(GTK_WIDGET_GET_CLASS(widget_->gobj()), name.c_str());
@@ -49,12 +49,12 @@ bool StylePropertyBase::lookup_style_property(const Glib::ustring& name)
g_param_spec_ref(param_spec_);
}
- return param_spec_ != 0;
+ return param_spec_ != nullptr;
}
void StylePropertyBase::install_style_property(GParamSpec* param_spec)
{
- g_return_if_fail(param_spec != 0);
+ g_return_if_fail(param_spec != nullptr);
gtk_widget_class_install_style_property(GTK_WIDGET_GET_CLASS(widget_->gobj()), param_spec);
@@ -65,7 +65,7 @@ void StylePropertyBase::install_style_property(GParamSpec* param_spec)
const char* StylePropertyBase::get_name_internal() const
{
const char* const name = g_param_spec_get_name(param_spec_);
- g_return_val_if_fail(name != 0, "");
+ g_return_val_if_fail(name != nullptr, "");
return name;
}
diff --git a/gtk/src/aboutdialog.ccg b/gtk/src/aboutdialog.ccg
index 81f4c34..6a17370 100644
--- a/gtk/src/aboutdialog.ccg
+++ b/gtk/src/aboutdialog.ccg
@@ -25,12 +25,12 @@ namespace Gtk
void AboutDialog::unset_license()
{
- gtk_about_dialog_set_license(gobj(), 0);
+ gtk_about_dialog_set_license(gobj(), nullptr);
}
void AboutDialog::set_logo_default()
{
- gtk_about_dialog_set_logo(gobj(), 0);
+ gtk_about_dialog_set_logo(gobj(), nullptr);
}
} // namespace Gtk
diff --git a/gtk/src/accellabel.ccg b/gtk/src/accellabel.ccg
index 18ab3e7..8aff201 100644
--- a/gtk/src/accellabel.ccg
+++ b/gtk/src/accellabel.ccg
@@ -35,7 +35,7 @@ AccelLabel::AccelLabel(const Glib::ustring& label, bool mnemonic)
void AccelLabel::unset_accel_widget()
{
//Not documented, at the moment, but this is what the source does:
- gtk_accel_label_set_accel_widget(gobj(), 0);
+ gtk_accel_label_set_accel_widget(gobj(), nullptr);
}
} // namespace Gtk
diff --git a/gtk/src/action.ccg b/gtk/src/action.ccg
index 55278ed..ddbf99c 100644
--- a/gtk/src/action.ccg
+++ b/gtk/src/action.ccg
@@ -33,13 +33,13 @@ namespace Gtk
_DEPRECATE_IFDEF_START
Action::Action(const Glib::ustring& name, const Gtk::StockID& stock_id, const Glib::ustring& label, const
Glib::ustring& tooltip)
:
- _CONSTRUCT("name", name.c_str(), "stock_id", stock_id.get_c_str(), "label", (label.empty() ? 0 :
label.c_str()), "tooltip", (tooltip.empty() ? 0 : tooltip.c_str()))
+ _CONSTRUCT("name", name.c_str(), "stock_id", stock_id.get_c_str(), "label", (label.empty() ? nullptr :
label.c_str()), "tooltip", (tooltip.empty() ? nullptr : tooltip.c_str()))
{}
_DEPRECATE_IFDEF_END
Action::Action(const Glib::ustring& name, const Glib::ustring& icon_name, const Glib::ustring& label, const
Glib::ustring& tooltip)
:
- _CONSTRUCT("name", name.c_str(), "icon_name", icon_name.c_str(), "label", (label.empty() ? 0 :
label.c_str()), "tooltip", (tooltip.empty() ? 0 : tooltip.c_str()))
+ _CONSTRUCT("name", name.c_str(), "icon_name", icon_name.c_str(), "label", (label.empty() ? nullptr :
label.c_str()), "tooltip", (tooltip.empty() ? nullptr : tooltip.c_str()))
{}
Glib::RefPtr<Action> Action::create(const Glib::ustring& name, const Glib::ustring& label, const
Glib::ustring& tooltip)
diff --git a/gtk/src/actionable.hg b/gtk/src/actionable.hg
index 6ec203b..77185ba 100644
--- a/gtk/src/actionable.hg
+++ b/gtk/src/actionable.hg
@@ -66,7 +66,7 @@ public:
_WRAP_PROPERTY("action-name", Glib::ustring)
_WRAP_PROPERTY("action-target", Glib::VariantBase)
-#m4 _CONVERSION(`Glib::ustring',`const gchar*',`$3.empty() ? 0 : $3.c_str()')
+#m4 _CONVERSION(`Glib::ustring',`const gchar*',`$3.empty() ? nullptr : $3.c_str()')
_WRAP_VFUNC(Glib::ustring get_action_name() const, "get_action_name", keep_return)
_WRAP_VFUNC(void set_action_name(const Glib::ustring& action_name), "set_action_name")
diff --git a/gtk/src/actionbar.ccg b/gtk/src/actionbar.ccg
index 174ce78..4d5d22e 100644
--- a/gtk/src/actionbar.ccg
+++ b/gtk/src/actionbar.ccg
@@ -24,7 +24,7 @@ namespace Gtk
void ActionBar::unset_center_widget()
{
- gtk_action_bar_set_center_widget(gobj(), NULL);
+ gtk_action_bar_set_center_widget(gobj(), nullptr);
}
} // namespace Gtk
diff --git a/gtk/src/actiongroup.ccg b/gtk/src/actiongroup.ccg
index c8c19ad..e9b9a5f 100644
--- a/gtk/src/actiongroup.ccg
+++ b/gtk/src/actiongroup.ccg
@@ -27,7 +27,7 @@ namespace Gtk
void ActionGroup::add(const Glib::RefPtr<Action>& action)
{
gtk_action_group_add_action_with_accel(gobj(), Glib::unwrap(action),
- 0 /* accelerator=0 means use the stock accelerator if this is a stock item */ );
+ nullptr /* accelerator=nullptr means use the stock accelerator if this is a stock item */ );
}
void ActionGroup::add(const Glib::RefPtr<Action>& action, const AccelKey& accel_key)
@@ -49,7 +49,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 = nullptr;
- g_object_get(G_OBJECT(Glib::unwrap(action)), "name", &action_name, static_cast<char*>(0));
+ g_object_get(G_OBJECT(Glib::unwrap(action)), "name", &action_name, nullptr);
if(action_name)
{
accel_path = "<Actions>/" + get_name() + '/' + action_name;
diff --git a/gtk/src/application.ccg b/gtk/src/application.ccg
index dfad8d4..ab4ce92 100644
--- a/gtk/src/application.ccg
+++ b/gtk/src/application.ccg
@@ -66,21 +66,21 @@ const Glib::Class& Application::custom_class_init()
Application::Application(const Glib::ustring& application_id, Gio::ApplicationFlags flags)
:
// Mark this class as non-derived to allow C++ vfuncs to be skipped.
- //Note that GApplication complains about "" but allows NULL (0), so we avoid passing "".
- Glib::ObjectBase(0),
- Gio::Application(Glib::ConstructParams(custom_class_init(), "application_id", (application_id.empty() ? 0
: application_id.c_str()), "flags", GApplicationFlags(flags), static_cast<char*>(0))),
+ //Note that GApplication complains about "" but allows nullptr, so we avoid passing "".
+ Glib::ObjectBase(nullptr),
+ Gio::Application(Glib::ConstructParams(custom_class_init(), "application_id", (application_id.empty() ?
nullptr : application_id.c_str()), "flags", GApplicationFlags(flags), nullptr)),
m_argc(0),
- m_argv(0)
+ m_argv(nullptr)
{
- gtk_init(0, 0);
+ gtk_init(nullptr, nullptr);
}
Application::Application(int& argc, char**& argv, const Glib::ustring& application_id, Gio::ApplicationFlags
flags)
:
// Mark this class as non-derived to allow C++ vfuncs to be skipped.
- //Note that GApplication complains about "" but allows NULL (0), so we avoid passing "".
- Glib::ObjectBase(0),
- Gio::Application(Glib::ConstructParams(custom_class_init(), "application_id", (application_id.empty() ? 0
: application_id.c_str()), "flags", GApplicationFlags(flags), static_cast<char*>(0))),
+ //Note that GApplication complains about "" but allows nullptr, so we avoid passing "".
+ Glib::ObjectBase(nullptr),
+ Gio::Application(Glib::ConstructParams(custom_class_init(), "application_id", (application_id.empty() ?
nullptr : application_id.c_str()), "flags", GApplicationFlags(flags), nullptr)),
m_argc(argc),
m_argv(argv)
{
diff --git a/gtk/src/box.ccg b/gtk/src/box.ccg
index d1dfd4d..2991198 100644
--- a/gtk/src/box.ccg
+++ b/gtk/src/box.ccg
@@ -41,7 +41,7 @@ void Box::pack_end(Widget& child, PackOptions options, guint padding)
void Box::unset_center_widget()
{
- gtk_box_set_center_widget(gobj(), NULL);
+ gtk_box_set_center_widget(gobj(), nullptr);
}
} //namespace Gtk
diff --git a/gtk/src/builder.ccg b/gtk/src/builder.ccg
index 8010fb8..92eb6b6 100644
--- a/gtk/src/builder.ccg
+++ b/gtk/src/builder.ccg
@@ -273,7 +273,7 @@ GtkWidget* Builder::get_cwidget(const Glib::ustring& name)
if(!cobject)
{
g_critical("gtkmm: object `%s' not found in GtkBuilder file.", name.c_str());
- return 0;
+ return nullptr;
}
if (!GTK_IS_WIDGET (cobject))
@@ -281,7 +281,7 @@ GtkWidget* Builder::get_cwidget(const Glib::ustring& name)
g_critical("gtkmm: object `%s' (type=`%s') (in GtkBuilder file) is not a widget type.",
name.c_str(), G_OBJECT_TYPE_NAME(cobject));
// Don't unref cobject. gtk_builder_get_object() does not give us a reference.
- return 0;
+ return nullptr;
}
return GTK_WIDGET (cobject);
@@ -295,7 +295,7 @@ Gtk::Widget* Builder::get_widget_checked(const Glib::ustring& name, GType type)
{
g_critical("gtkmm: Gtk::Builder: widget `%s' was not found in the GtkBuilder file, or the specified part
of it.",
name.c_str());
- return 0;
+ return nullptr;
}
// Check if it has the correct type.
@@ -303,7 +303,7 @@ Gtk::Widget* Builder::get_widget_checked(const Glib::ustring& name, GType type)
{
g_critical("gtkmm: widget `%s' (in GtkBuilder file) is of type `%s' but `%s' was expected",
name.c_str(), G_OBJECT_TYPE_NAME(cobject), g_type_name(type));
- return 0;
+ return nullptr;
}
// Don't take a reference. That's done only in methods that return
diff --git a/gtk/src/calendar.ccg b/gtk/src/calendar.ccg
index dd4e85d..1d0711f 100644
--- a/gtk/src/calendar.ccg
+++ b/gtk/src/calendar.ccg
@@ -36,7 +36,7 @@ static gchar* SignalProxy_Details_gtk_callback(GtkCalendar*, guint year, guint m
{
Glib::exception_handlers_invoke();
}
- return 0; // arbitrary value
+ return nullptr; // arbitrary value
}
static void SignalProxy_Details_gtk_callback_destroy(void* data)
diff --git a/gtk/src/celllayout.ccg b/gtk/src/celllayout.ccg
index 30abefe..a94192c 100644
--- a/gtk/src/celllayout.ccg
+++ b/gtk/src/celllayout.ccg
@@ -75,7 +75,7 @@ CellRenderer* CellLayout::get_first_cell()
if(!vecCellRenderers.empty())
return vecCellRenderers[0];
else
- return 0;
+ return nullptr;
}
const CellRenderer* CellLayout::get_first_cell() const
diff --git a/gtk/src/cellrenderer.ccg b/gtk/src/cellrenderer.ccg
index 0d64f02..78d146e 100644
--- a/gtk/src/cellrenderer.ccg
+++ b/gtk/src/cellrenderer.ccg
@@ -23,7 +23,7 @@ namespace Gtk
Glib::PropertyProxy_Base CellRenderer::_property_renderable()
{
g_assert_not_reached();
- return Glib::PropertyProxy<int>(0, 0); // shut up warnings
+ return Glib::PropertyProxy<int>(nullptr, nullptr); // shut up warnings
}
//These vfunc callbacks are custom implemented because we want the output
diff --git a/gtk/src/cellrenderercombo.ccg b/gtk/src/cellrenderercombo.ccg
index 0aaf89f..ebee2d4 100644
--- a/gtk/src/cellrenderercombo.ccg
+++ b/gtk/src/cellrenderercombo.ccg
@@ -22,7 +22,7 @@
static GtkTreeModel* _get_model(GtkCellRendererCombo* renderer)
{
if(!renderer)
- return 0;
+ return nullptr;
GtkTreeModel* combo_model = nullptr;
g_object_get(G_OBJECT(renderer), "model", &combo_model, nullptr);
diff --git a/gtk/src/cellview.ccg b/gtk/src/cellview.ccg
index 05244c4..46655c4 100644
--- a/gtk/src/cellview.ccg
+++ b/gtk/src/cellview.ccg
@@ -54,7 +54,7 @@ CellView::CellView(const Glib::RefPtr<Gdk::Pixbuf>& pixbuf)
void CellView::unset_model()
{
- gtk_cell_view_set_model(gobj(), 0);
+ gtk_cell_view_set_model(gobj(), nullptr);
}
diff --git a/gtk/src/clipboard.ccg b/gtk/src/clipboard.ccg
index 8a9d5c6..fb4cf8b 100644
--- a/gtk/src/clipboard.ccg
+++ b/gtk/src/clipboard.ccg
@@ -279,7 +279,7 @@ SelectionData Clipboard::wait_for_contents(const Glib::ustring& target) const
std::vector<Glib::ustring> Clipboard::wait_for_targets() const
{
- GdkAtom* atoms (0);
+ GdkAtom* atoms (nullptr);
int n_targets (0);
if (!gtk_clipboard_wait_for_targets(const_cast<GtkClipboard*>(gobj()), &atoms, &n_targets))
@@ -297,14 +297,14 @@ void Clipboard::set_can_store(const std::vector<TargetEntry>& targets)
void Clipboard::set_can_store()
{
- gtk_clipboard_set_can_store( gobj(), 0, 0 /* See C docs */ );
+ gtk_clipboard_set_can_store( gobj(), nullptr, 0 /* See C docs */ );
}
std::string Clipboard::wait_for_rich_text(const Glib::RefPtr<TextBuffer>& buffer, std::string& format)
{
std::string result;
- GdkAtom format_atom = 0;
+ GdkAtom format_atom = GDK_NONE;
gsize length = 0;
guint8* text = gtk_clipboard_wait_for_rich_text(const_cast<GtkClipboard*>(gobj()), buffer->gobj(),
&format_atom, &length);
if(text && length)
diff --git a/gtk/src/colorbutton.ccg b/gtk/src/colorbutton.ccg
index 4257685..5d3bf4a 100644
--- a/gtk/src/colorbutton.ccg
+++ b/gtk/src/colorbutton.ccg
@@ -26,8 +26,8 @@ namespace Gtk
ColorButton::ColorButton(const Gdk::Color& color)
:
// Mark this class as non-derived to allow C++ vfuncs to be skipped.
- Glib::ObjectBase(0),
- Gtk::Button(Glib::ConstructParams(colorbutton_class_.init(), "color", (color).gobj(),
static_cast<char*>(0)))
+ Glib::ObjectBase(nullptr),
+ Gtk::Button(Glib::ConstructParams(colorbutton_class_.init(), "color", (color).gobj(), nullptr))
{
}
#endif //GTKMM_DISABLE_DEPRECATED
diff --git a/gtk/src/combobox.ccg b/gtk/src/combobox.ccg
index aacf41a..77011f8 100644
--- a/gtk/src/combobox.ccg
+++ b/gtk/src/combobox.ccg
@@ -79,7 +79,7 @@ TreeModel::const_iterator ComboBox::get_active() const
void ComboBox::unset_model()
{
- gtk_combo_box_set_model(gobj(), 0);
+ gtk_combo_box_set_model(gobj(), nullptr);
}
@@ -96,7 +96,7 @@ void ComboBox::set_row_separator_func(const SlotRowSeparator& slot)
void ComboBox::unset_row_separator_func()
{
- gtk_combo_box_set_row_separator_func(gobj(), 0, 0, 0 /* See C docs. */);
+ gtk_combo_box_set_row_separator_func(gobj(), nullptr, nullptr, nullptr /* See C docs. */);
}
Entry* ComboBox::get_entry()
diff --git a/gtk/src/container.ccg b/gtk/src/container.ccg
index fe40a83..2c3b7a2 100644
--- a/gtk/src/container.ccg
+++ b/gtk/src/container.ccg
@@ -179,7 +179,7 @@ void Container::add(Widget& widget)
bool Container::has_focus_chain() const
{
- return gtk_container_get_focus_chain(const_cast<GtkContainer*>(gobj()), 0);
+ return gtk_container_get_focus_chain(const_cast<GtkContainer*>(gobj()), nullptr);
}
std::vector<Widget*> Container::get_focus_chain()
diff --git a/gtk/src/entry.ccg b/gtk/src/entry.ccg
index 5e16185..8777b4b 100644
--- a/gtk/src/entry.ccg
+++ b/gtk/src/entry.ccg
@@ -40,7 +40,7 @@ void Entry::set_icon_from_gicon(const Glib::RefPtr<Gio::Icon>& icon, EntryIconPo
void Entry::unset_icon(EntryIconPosition icon_pos)
{
//We could use any one of these set_icon_from_* functions:
- gtk_entry_set_icon_from_pixbuf(gobj(), ((GtkEntryIconPosition)(icon_pos)), 0);
+ gtk_entry_set_icon_from_pixbuf(gobj(), ((GtkEntryIconPosition)(icon_pos)), nullptr);
}
void Entry::set_icon_activatable(bool activatable, EntryIconPosition icon_pos)
diff --git a/gtk/src/entrycompletion.ccg b/gtk/src/entrycompletion.ccg
index 6a367b0..1d73262 100644
--- a/gtk/src/entrycompletion.ccg
+++ b/gtk/src/entrycompletion.ccg
@@ -50,7 +50,7 @@ namespace Gtk
void EntryCompletion::unset_model()
{
- gtk_entry_completion_set_model(gobj(), 0);
+ gtk_entry_completion_set_model(gobj(), nullptr);
}
void EntryCompletion::set_match_func(const SlotMatch& slot)
diff --git a/gtk/src/flowbox.ccg b/gtk/src/flowbox.ccg
index b7d7477..9963fea 100644
--- a/gtk/src/flowbox.ccg
+++ b/gtk/src/flowbox.ccg
@@ -101,7 +101,7 @@ void FlowBox::set_filter_func(const SlotFilter& slot)
void FlowBox::unset_filter_func()
{
- gtk_flow_box_set_filter_func(gobj(), 0, 0, 0);
+ gtk_flow_box_set_filter_func(gobj(), nullptr, nullptr, nullptr);
}
void FlowBox::set_sort_func(const SlotSort& slot)
@@ -118,7 +118,7 @@ void FlowBox::set_sort_func(const SlotSort& slot)
void FlowBox::unset_sort_func()
{
- gtk_flow_box_set_sort_func(gobj(), 0, 0, 0);
+ gtk_flow_box_set_sort_func(gobj(), nullptr, nullptr, nullptr);
}
} //namespace Gtk
diff --git a/gtk/src/frame.ccg b/gtk/src/frame.ccg
index b9daa6f..ef3b463 100644
--- a/gtk/src/frame.ccg
+++ b/gtk/src/frame.ccg
@@ -22,7 +22,7 @@ namespace Gtk
void Frame::unset_label()
{
- gtk_frame_set_label(gobj(), 0);
+ gtk_frame_set_label(gobj(), nullptr);
}
} // namespace Gtk
diff --git a/gtk/src/gesture.ccg b/gtk/src/gesture.ccg
index e32310b..3c7e8a6 100644
--- a/gtk/src/gesture.ccg
+++ b/gtk/src/gesture.ccg
@@ -35,7 +35,7 @@ std::vector<const GdkEventSequence*> Gesture::get_sequences() const
void Gesture::unset_window()
{
- gtk_gesture_set_window(gobj(), 0);
+ gtk_gesture_set_window(gobj(), nullptr);
}
} //namespace Gtk
diff --git a/gtk/src/gesturemultipress.ccg b/gtk/src/gesturemultipress.ccg
index 7fdaf1d..f78df34 100644
--- a/gtk/src/gesturemultipress.ccg
+++ b/gtk/src/gesturemultipress.ccg
@@ -21,7 +21,7 @@ namespace Gtk
void GestureMultiPress::unset_area()
{
- gtk_gesture_multi_press_set_area(gobj(), 0);
+ gtk_gesture_multi_press_set_area(gobj(), nullptr);
}
} //namespace Gtk
diff --git a/gtk/src/headerbar.ccg b/gtk/src/headerbar.ccg
index 42828a5..0a4071b 100644
--- a/gtk/src/headerbar.ccg
+++ b/gtk/src/headerbar.ccg
@@ -24,7 +24,7 @@ namespace Gtk
void HeaderBar::unset_decoration_layout()
{
- gtk_header_bar_set_decoration_layout(gobj(), NULL);
+ gtk_header_bar_set_decoration_layout(gobj(), nullptr);
}
} // namespace Gtk
diff --git a/gtk/src/iconinfo.ccg b/gtk/src/iconinfo.ccg
index 7827754..3dfd10d 100644
--- a/gtk/src/iconinfo.ccg
+++ b/gtk/src/iconinfo.ccg
@@ -79,7 +79,7 @@ _DEPRECATE_IFDEF_END
IconInfo::operator const void*() const
{
- return gobj() ? GINT_TO_POINTER(1) : 0;
+ return gobj() ? GINT_TO_POINTER(1) : nullptr;
}
@@ -143,7 +143,7 @@ void IconInfo::load_icon_async(const Gio::SlotAsyncReady& slot)
auto slot_copy = new Gio::SlotAsyncReady(slot);
gtk_icon_info_load_icon_async(gobj(),
- 0,
+ nullptr,
&SignalProxy_async_callback,
slot_copy);
}
@@ -178,7 +178,7 @@ void IconInfo::load_symbolic_async(const Gdk::RGBA& fg, const Gdk::RGBA& success
success_color.gobj(),
warning_color.gobj(),
error_color.gobj(),
- 0,
+ nullptr,
&SignalProxy_async_callback,
slot_copy);
}
@@ -207,7 +207,7 @@ void IconInfo::load_symbolic_for_context_async(const Glib::RefPtr<StyleContext>&
gtk_icon_info_load_symbolic_for_context_async(gobj(),
Glib::unwrap(context),
- 0,
+ nullptr,
&SignalProxy_async_callback,
slot_copy);
}
diff --git a/gtk/src/icontheme.ccg b/gtk/src/icontheme.ccg
index da845c2..de6ddda 100644
--- a/gtk/src/icontheme.ccg
+++ b/gtk/src/icontheme.ccg
@@ -46,7 +46,7 @@ std::vector<int> IconTheme::get_icon_sizes(const Glib::ustring& icon_name) const
std::vector<Glib::ustring> IconTheme::list_icons() const
{
- return
Glib::ListHandler<Glib::ustring>::list_to_vector(gtk_icon_theme_list_icons(const_cast<GtkIconTheme*>(gobj()),
0 /* means all icons according to the C documentation. */ ), Glib::OWNERSHIP_SHALLOW);
+ return
Glib::ListHandler<Glib::ustring>::list_to_vector(gtk_icon_theme_list_icons(const_cast<GtkIconTheme*>(gobj()),
nullptr /* means all icons according to the C documentation. */ ), Glib::OWNERSHIP_SHALLOW);
}
diff --git a/gtk/src/iconview.ccg b/gtk/src/iconview.ccg
index 31a05aa..8566a0c 100644
--- a/gtk/src/iconview.ccg
+++ b/gtk/src/iconview.ccg
@@ -46,7 +46,7 @@ namespace Gtk
void IconView::unset_model()
{
- gtk_icon_view_set_model(gobj(), 0);
+ gtk_icon_view_set_model(gobj(), nullptr);
}
void IconView::selected_foreach(const SlotForeach& slot)
@@ -69,7 +69,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 = nullptr;
- bool result = gtk_icon_view_get_item_at_pos(const_cast<GtkIconView*>(gobj()), x, y, &cpath, 0);
+ bool result = gtk_icon_view_get_item_at_pos(const_cast<GtkIconView*>(gobj()), x, y, &cpath, nullptr);
path = Glib::wrap(cpath); //Don't take copy because the gtk_icon_view_get_item_at_pos documentation says
we should free this.
return result;
@@ -78,7 +78,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 = nullptr;
- bool result = gtk_icon_view_get_item_at_pos(const_cast<GtkIconView*>(gobj()), x, y, 0, &ccell);
+ bool result = gtk_icon_view_get_item_at_pos(const_cast<GtkIconView*>(gobj()), x, y, nullptr, &ccell);
cell = Glib::wrap(ccell);
return result;
@@ -111,7 +111,7 @@ bool IconView::get_cursor(TreeModel::Path& path, CellRenderer*& cell) const
bool IconView::get_cursor(TreeModel::Path& path) const
{
GtkTreePath* cpath = nullptr;
- bool result = gtk_icon_view_get_cursor(const_cast<GtkIconView*>(gobj()), &cpath, 0);
+ bool result = gtk_icon_view_get_cursor(const_cast<GtkIconView*>(gobj()), &cpath, nullptr);
path = Glib::wrap(cpath); //Don't take copy because the gtk_icon_view_get_cursor documentation says we
should free this.
return result;
@@ -120,7 +120,7 @@ bool IconView::get_cursor(TreeModel::Path& path) const
bool IconView::get_cursor(CellRenderer*& cell) const
{
GtkCellRenderer* ccell = nullptr;
- bool result = gtk_icon_view_get_cursor(const_cast<GtkIconView*>(gobj()), 0, &ccell);
+ bool result = gtk_icon_view_get_cursor(const_cast<GtkIconView*>(gobj()), nullptr, &ccell);
cell = Glib::wrap(ccell);
return result;
@@ -137,14 +137,14 @@ void IconView::get_drag_dest_item(TreeModel::Path& path, IconViewDropPosition& p
void IconView::get_drag_dest_item(TreeModel::Path& path) const
{
GtkTreePath* cpath = nullptr;
- gtk_icon_view_get_drag_dest_item(const_cast<GtkIconView*>(gobj()), &cpath, NULL);
+ gtk_icon_view_get_drag_dest_item(const_cast<GtkIconView*>(gobj()), &cpath, nullptr);
if(cpath)
path = Gtk::TreeModel::Path(cpath, true /* make_a_copy */);
}
void IconView::get_drag_dest_item(IconViewDropPosition& pos) const
{
- gtk_icon_view_get_drag_dest_item(const_cast<GtkIconView*>(gobj()), NULL,
(GtkIconViewDropPosition*)(&pos));
+ gtk_icon_view_get_drag_dest_item(const_cast<GtkIconView*>(gobj()), nullptr,
(GtkIconViewDropPosition*)(&pos));
}
@@ -161,7 +161,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 = nullptr;
- const bool result = gtk_icon_view_get_dest_item_at_pos(const_cast<GtkIconView*>(gobj()), drag_x, drag_y,
&cpath, NULL);
+ const bool result = gtk_icon_view_get_dest_item_at_pos(const_cast<GtkIconView*>(gobj()), drag_x, drag_y,
&cpath, nullptr);
if(cpath)
path = Gtk::TreeModel::Path(cpath, true /* make_a_copy */);
@@ -170,7 +170,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, IconViewDropPosition& pos) const
{
- return gtk_icon_view_get_dest_item_at_pos(const_cast<GtkIconView*>(gobj()), drag_x, drag_y, NULL,
(GtkIconViewDropPosition*)(&pos));
+ return gtk_icon_view_get_dest_item_at_pos(const_cast<GtkIconView*>(gobj()), drag_x, drag_y, nullptr,
(GtkIconViewDropPosition*)(&pos));
}
@@ -196,9 +196,9 @@ IconView::get_tooltip_context_path(int& x, int& y,
gtk_icon_view_get_tooltip_context(gobj(),
&x, &y,
keyboard_tip,
- 0,
+ nullptr,
&cpath,
- 0);
+ nullptr);
// If result is false, cpath is not modified, it's still 0.
// wrap() can handle that situation.
@@ -218,8 +218,8 @@ IconView::get_tooltip_context_iter(int& x, int& y,
gtk_icon_view_get_tooltip_context(gobj(),
&x, &y,
keyboard_tip,
- 0,
- 0,
+ nullptr,
+ nullptr,
&src_iter);
iter = TreeIter(gtk_icon_view_get_model(this->gobj()), &src_iter);
diff --git a/gtk/src/image.ccg b/gtk/src/image.ccg
index da0912c..344fbaf 100644
--- a/gtk/src/image.ccg
+++ b/gtk/src/image.ccg
@@ -31,7 +31,7 @@ Image::Image(const Gtk::StockID& stock_id, IconSize size)
#ifndef GTKMM_DISABLE_DEPRECATED
Image::Image(const Glib::RefPtr<IconSet>& icon_set, IconSize size)
:
- _CONSTRUCT("icon-set", (icon_set ? icon_set->gobj() : 0), "icon-size", (GtkIconSize) int(size))
+ _CONSTRUCT("icon-set", (icon_set ? icon_set->gobj() : nullptr), "icon-size", (GtkIconSize) int(size))
{}
#endif //GTKMM_DISABLE_DEPRECATED
@@ -73,7 +73,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS
Glib::ustring Image::get_icon_name() const
{
const gchar* pchIconName = nullptr;
- gtk_image_get_icon_name(const_cast<GtkImage*>(gobj()), &pchIconName, 0);
+ gtk_image_get_icon_name(const_cast<GtkImage*>(gobj()), &pchIconName, nullptr);
return Glib::convert_const_gchar_ptr_to_ustring(pchIconName);
}
diff --git a/gtk/src/image.hg b/gtk/src/image.hg
index 388ff39..3f7f70e 100644
--- a/gtk/src/image.hg
+++ b/gtk/src/image.hg
@@ -109,7 +109,7 @@ public:
_WRAP_METHOD(void set(const Glib::RefPtr<Gdk::PixbufAnimation>& animation), gtk_image_set_from_animation)
_WRAP_METHOD(void set(const Glib::RefPtr<const Gio::Icon>& icon, IconSize size), gtk_image_set_from_gicon)
-#m4 _CONVERSION(`const ::Cairo::RefPtr< ::Cairo::Surface>&',`cairo_surface_t*',`($3) ?
const_cast<cairo_surface_t*>(($3)->cobj()) : 0')
+#m4 _CONVERSION(`const ::Cairo::RefPtr< ::Cairo::Surface>&',`cairo_surface_t*',`($3) ?
const_cast<cairo_surface_t*>(($3)->cobj()) : nullptr')
_WRAP_METHOD(void set(const ::Cairo::RefPtr< ::Cairo::Surface>& surface), gtk_image_set_from_surface)
_WRAP_METHOD(void set_from_icon_name(const Glib::ustring& icon_name, IconSize size),
gtk_image_set_from_icon_name)
diff --git a/gtk/src/listbox.ccg b/gtk/src/listbox.ccg
index 8fb1b7b..69a8118 100644
--- a/gtk/src/listbox.ccg
+++ b/gtk/src/listbox.ccg
@@ -103,12 +103,12 @@ namespace Gtk
void ListBox::unselect_row()
{
- gtk_list_box_select_row(gobj(), 0);
+ gtk_list_box_select_row(gobj(), nullptr);
}
void ListBox::unset_placeholder()
{
- gtk_list_box_set_placeholder(gobj(), 0);
+ gtk_list_box_set_placeholder(gobj(), nullptr);
}
void ListBox::set_filter_func(const SlotFilter& slot)
@@ -125,7 +125,7 @@ void ListBox::set_filter_func(const SlotFilter& slot)
void ListBox::unset_filter_func()
{
- gtk_list_box_set_filter_func(gobj(), 0, 0, 0);
+ gtk_list_box_set_filter_func(gobj(), nullptr, nullptr, nullptr);
}
void ListBox::set_sort_func(const SlotSort& slot)
@@ -142,7 +142,7 @@ void ListBox::set_sort_func(const SlotSort& slot)
void ListBox::unset_sort_func()
{
- gtk_list_box_set_sort_func(gobj(), 0, 0, 0);
+ gtk_list_box_set_sort_func(gobj(), nullptr, nullptr, nullptr);
}
void ListBox::set_header_func(const SlotUpdateHeader& slot)
@@ -159,7 +159,7 @@ void ListBox::set_header_func(const SlotUpdateHeader& slot)
void ListBox::unset_header_func()
{
- gtk_list_box_set_header_func(gobj(), 0, 0, 0);
+ gtk_list_box_set_header_func(gobj(), nullptr, nullptr, nullptr);
}
void ListBox::append(Widget& child)
diff --git a/gtk/src/listboxrow.ccg b/gtk/src/listboxrow.ccg
index e695a6b..04e100d 100644
--- a/gtk/src/listboxrow.ccg
+++ b/gtk/src/listboxrow.ccg
@@ -21,7 +21,7 @@ namespace Gtk
void ListBoxRow::unset_header()
{
- gtk_list_box_row_set_header(gobj(), 0);
+ gtk_list_box_row_set_header(gobj(), nullptr);
}
} // namespace Gtk
diff --git a/gtk/src/liststore.ccg b/gtk/src/liststore.ccg
index ed28528..7ca72bc 100644
--- a/gtk/src/liststore.ccg
+++ b/gtk/src/liststore.ccg
@@ -38,7 +38,7 @@ void ListStore::set_column_types(const TreeModelColumnRecord& columns)
TreeModel::iterator ListStore::erase(const iterator& iter)
{
- g_assert(iter.get_gobject_if_not_end() != 0);
+ g_assert(iter.get_gobject_if_not_end() != nullptr);
iterator next(iter);
++next;
diff --git a/gtk/src/lockbutton.ccg b/gtk/src/lockbutton.ccg
index 2707e43..8e1420a 100644
--- a/gtk/src/lockbutton.ccg
+++ b/gtk/src/lockbutton.ccg
@@ -24,7 +24,7 @@ namespace Gtk
void LockButton::unset_permission()
{
- gtk_lock_button_set_permission(gobj(), NULL);
+ gtk_lock_button_set_permission(gobj(), nullptr);
}
} // namespace Gtk
diff --git a/gtk/src/main.ccg b/gtk/src/main.ccg
index 7133c9c..5b266a5 100644
--- a/gtk/src/main.ccg
+++ b/gtk/src/main.ccg
@@ -85,8 +85,8 @@ GtkMainConnectionNode::GtkMainConnectionNode(const sigc::slot_base& slot)
:
slot_(slot),
conn_id_ (0),
- remove_func_ (0),
- has_destroy_notify_ (false),
+ remove_func_ (nullptr),
+ has_destroy_notify_ (false),
destroyed_ (false)
{
slot_.set_parent(this, &GtkMainConnectionNode::notify);
@@ -117,7 +117,7 @@ void* GtkMainConnectionNode::notify(void* data)
delete self;
}
- return 0;
+ return nullptr;
}
// static
@@ -183,7 +183,7 @@ bool GtkMainConnectionNode::list_remove(GtkMainConnectionNode* conn_node)
// static
void GtkMainConnectionNode::list_notify_all()
{
- while(connection_list_ != 0)
+ while(connection_list_ != nullptr)
{
GtkMainConnectionNode *const conn_node =
static_cast<GtkMainConnectionNode*>(connection_list_->data);
@@ -264,7 +264,7 @@ Main::Main(int* argc, char*** argv, bool set_locale)
Main::Main(bool set_locale)
{
- init(0, 0, set_locale);
+ init(nullptr, nullptr, set_locale);
}
Main::~Main()
diff --git a/gtk/src/menu.ccg b/gtk/src/menu.ccg
index c86c171..0c26926 100644
--- a/gtk/src/menu.ccg
+++ b/gtk/src/menu.ccg
@@ -66,12 +66,12 @@ void Menu::popup(const SlotPositionCalc& position_calc_slot, guint button, guint
// Tell GTK+ to call the static function with the slot's address as the extra
// data, so that the static function can then call the sigc::slot:
if(!device)
- gtk_menu_popup(gobj(), 0, 0, &SignalProxy_PopupPosition_gtk_callback,
const_cast<SlotPositionCalc*>(&position_calc_slot), button, activate_time);
+ gtk_menu_popup(gobj(), nullptr, nullptr, &SignalProxy_PopupPosition_gtk_callback,
const_cast<SlotPositionCalc*>(&position_calc_slot), button, activate_time);
else
{
auto slot_copy = new SlotPositionCalc(position_calc_slot); //Deleted in the destroy callback.
- gtk_menu_popup_for_device(gobj(), device->gobj(), 0, 0, &SignalProxy_PopupPosition_gtk_callback,
slot_copy, &SignalProxy_PopupPosition_gtk_callback_destroy, button, activate_time);
+ gtk_menu_popup_for_device(gobj(), device->gobj(), nullptr, nullptr,
&SignalProxy_PopupPosition_gtk_callback, slot_copy, &SignalProxy_PopupPosition_gtk_callback_destroy, button,
activate_time);
}
}
@@ -92,9 +92,9 @@ void Menu::popup(MenuShell& parent_menu_shell, MenuItem& parent_menu_item, const
void Menu::popup(guint button, guint32 activate_time, const Glib::RefPtr<Gdk::Device>& device)
{
if(!device)
- gtk_menu_popup(gobj(), 0, 0, 0, 0, button, activate_time);
+ gtk_menu_popup(gobj(), nullptr, nullptr, nullptr, nullptr, button, activate_time);
else
- gtk_menu_popup_for_device(gobj(), device->gobj(), 0, 0, 0, 0, 0, button, activate_time);
+ gtk_menu_popup_for_device(gobj(), device->gobj(), nullptr, nullptr, nullptr, nullptr, nullptr, button,
activate_time);
}
void Menu::reorder_child(const MenuItem& child, int position)
@@ -107,21 +107,21 @@ void Menu::reorder_child(const MenuItem& child, int position)
void Menu::unset_accel_group()
{
- gtk_menu_set_accel_group(gobj(), 0);
+ gtk_menu_set_accel_group(gobj(), nullptr);
}
_DEPRECATE_IFDEF_START
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
void Menu::unset_title()
{
- gtk_menu_set_title(gobj(), 0);
+ gtk_menu_set_title(gobj(), nullptr);
}
G_GNUC_END_IGNORE_DEPRECATIONS
_DEPRECATE_IFDEF_END
void Menu::attach_to_widget(Widget& attach_widget)
{
- gtk_menu_attach_to_widget(gobj(), (attach_widget).gobj(), 0 /* allowed by the C docs. */);
+ gtk_menu_attach_to_widget(gobj(), (attach_widget).gobj(), nullptr /* allowed by the C docs. */);
}
diff --git a/gtk/src/menubutton.ccg b/gtk/src/menubutton.ccg
index 3b68a0e..2e5954d 100644
--- a/gtk/src/menubutton.ccg
+++ b/gtk/src/menubutton.ccg
@@ -23,23 +23,23 @@ namespace Gtk
_DEPRECATE_IFDEF_START
void MenuButton::unset_menu()
{
- gtk_menu_button_set_popup(gobj(), 0);
+ gtk_menu_button_set_popup(gobj(), nullptr);
}
_DEPRECATE_IFDEF_END
void MenuButton::unset_popup()
{
- gtk_menu_button_set_popup(gobj(), 0);
+ gtk_menu_button_set_popup(gobj(), nullptr);
}
void MenuButton::unset_popover()
{
- gtk_menu_button_set_popover(gobj(), 0);
+ gtk_menu_button_set_popover(gobj(), nullptr);
}
void MenuButton::unset_menu_model()
{
- gtk_menu_button_set_menu_model(gobj(), 0);
+ gtk_menu_button_set_menu_model(gobj(), nullptr);
}
#ifndef GTKMM_DISABLE_DEPRECATED
diff --git a/gtk/src/menuitem.ccg b/gtk/src/menuitem.ccg
index 7bdc97c..59ed513 100644
--- a/gtk/src/menuitem.ccg
+++ b/gtk/src/menuitem.ccg
@@ -68,7 +68,7 @@ void MenuItem::set_accel_key(const AccelKey& accel_key)
bool MenuItem::has_submenu() const
{
- return get_submenu() != 0;
+ return get_submenu() != nullptr;
}
void MenuItem::accelerate(Window& window)
@@ -96,12 +96,12 @@ void MenuItem::accelerate(Window& window)
void MenuItem::unset_accel_path()
{
- gtk_menu_item_set_accel_path(gobj(), 0);
+ gtk_menu_item_set_accel_path(gobj(), nullptr);
}
void MenuItem::unset_submenu()
{
- gtk_menu_item_set_submenu(gobj(), 0);
+ gtk_menu_item_set_submenu(gobj(), nullptr);
}
} // namespace Gtk
diff --git a/gtk/src/menushell.ccg b/gtk/src/menushell.ccg
index 5706f20..c236782 100644
--- a/gtk/src/menushell.ccg
+++ b/gtk/src/menushell.ccg
@@ -26,20 +26,20 @@ namespace Gtk
MenuShell::MenuShell()
:
_CONSTRUCT_SPECIFIC(Gtk::Container, MenuShell),
- accel_window_ (0)
+ accel_window_ (nullptr)
{}
MenuShell::MenuShell(const Glib::ConstructParams& construct_params)
:
- Glib::ObjectBase(0),
+ Glib::ObjectBase(nullptr),
Gtk::Container (construct_params),
- accel_window_ (0)
+ accel_window_ (nullptr)
{}
MenuShell::MenuShell(GtkMenuShell* castitem)
:
Gtk::Container((GtkContainer*) castitem),
- accel_window_ (0)
+ accel_window_ (nullptr)
{}
// TODO: Why do we need a custom dtor?
diff --git a/gtk/src/menutoolbutton.ccg b/gtk/src/menutoolbutton.ccg
index 7d38c85..c43eeb6 100644
--- a/gtk/src/menutoolbutton.ccg
+++ b/gtk/src/menutoolbutton.ccg
@@ -25,23 +25,23 @@ namespace Gtk
MenuToolButton::MenuToolButton(const Gtk::StockID& stock_id)
:
// Mark this class as non-derived to allow C++ vfuncs to be skipped.
- Glib::ObjectBase(0),
- Gtk::ToolButton(Glib::ConstructParams(menutoolbutton_class_.init(), "stock_id", (stock_id).get_c_str(),
static_cast<char*>(0)))
+ Glib::ObjectBase(nullptr),
+ Gtk::ToolButton(Glib::ConstructParams(menutoolbutton_class_.init(), "stock_id", (stock_id).get_c_str(),
nullptr))
{
}
#endif // GTKMM_DISABLE_DEPRECATED
MenuToolButton::MenuToolButton(const Glib::ustring& label)
:
- Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc
optimisations.
- Gtk::ToolButton(Glib::ConstructParams(menutoolbutton_class_.init(), "label", label.c_str(), (char*) 0))
+ Glib::ObjectBase(nullptr), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow
vfunc optimisations.
+ Gtk::ToolButton(Glib::ConstructParams(menutoolbutton_class_.init(), "label", label.c_str(), nullptr))
{
}
MenuToolButton::MenuToolButton(Widget& icon_widget, const Glib::ustring& label)
:
- Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc
optimisations.
- Gtk::ToolButton(Glib::ConstructParams(menutoolbutton_class_.init(), "icon_widget", (icon_widget).gobj(),
"label", label.c_str(), (char*) 0))
+ Glib::ObjectBase(nullptr), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow
vfunc optimisations.
+ Gtk::ToolButton(Glib::ConstructParams(menutoolbutton_class_.init(), "icon_widget", (icon_widget).gobj(),
"label", label.c_str(), nullptr))
{
}
diff --git a/gtk/src/notebook.ccg b/gtk/src/notebook.ccg
index ebb0b7a..53205ec 100644
--- a/gtk/src/notebook.ccg
+++ b/gtk/src/notebook.ccg
@@ -70,17 +70,17 @@ void Notebook::remove_page(Widget& child)
int Notebook::prepend_page(Widget& child)
{
- return gtk_notebook_prepend_page(gobj(), child.gobj(), 0 /* see GTK+ docs */);
+ return gtk_notebook_prepend_page(gobj(), child.gobj(), nullptr /* see GTK+ docs */);
}
int Notebook::append_page(Widget& child)
{
- return gtk_notebook_append_page(gobj(), child.gobj(), 0 /* see GTK+ docs */);
+ return gtk_notebook_append_page(gobj(), child.gobj(), nullptr /* see GTK+ docs */);
}
int Notebook::insert_page(Widget& child, int position)
{
- return gtk_notebook_insert_page(gobj(), child.gobj(), 0 /* see GTK+ docs */, position);
+ return gtk_notebook_insert_page(gobj(), child.gobj(), nullptr /* see GTK+ docs */, position);
}
} //namespace Gtk
diff --git a/gtk/src/pagesetup.ccg b/gtk/src/pagesetup.ccg
index 7769395..a94d037 100644
--- a/gtk/src/pagesetup.ccg
+++ b/gtk/src/pagesetup.ccg
@@ -49,13 +49,13 @@ Glib::RefPtr<PageSetup> PageSetup::create_from_file(const std::string& file_name
void PageSetup::save_to_key_file(Glib::KeyFile& key_file) const
{
- gtk_page_setup_to_key_file(const_cast<GtkPageSetup*>(gobj()), (key_file).gobj(), 0);
+ gtk_page_setup_to_key_file(const_cast<GtkPageSetup*>(gobj()), (key_file).gobj(), nullptr);
}
bool PageSetup::load_from_key_file(const Glib::KeyFile& key_file)
{
GError* gerror = nullptr;
- bool retvalue = gtk_page_setup_load_key_file(gobj(), const_cast<GKeyFile*>((key_file).gobj()), NULL,
&(gerror));
+ bool retvalue = gtk_page_setup_load_key_file(gobj(), const_cast<GKeyFile*>((key_file).gobj()), nullptr,
&(gerror));
if(gerror)
::Glib::Error::throw_exception(gerror);
diff --git a/gtk/src/papersize.ccg b/gtk/src/papersize.ccg
index 73ce6f9..c0c1bf7 100644
--- a/gtk/src/papersize.ccg
+++ b/gtk/src/papersize.ccg
@@ -61,7 +61,7 @@ PaperSize::PaperSize(const Glib::ustring& name, const Glib::ustring& display_nam
//TODO: No, throw the error/exception instead.
PaperSize::PaperSize(const Glib::KeyFile& key_file, const Glib::ustring& group_name)
:
- gobject_(gtk_paper_size_new_from_key_file(const_cast<GKeyFile*>(key_file.gobj()), (group_name.empty() ?
NULL : group_name.c_str()) , NULL /* GError */))
+ gobject_(gtk_paper_size_new_from_key_file(const_cast<GKeyFile*>(key_file.gobj()), (group_name.empty() ?
nullptr : group_name.c_str()) , nullptr /* GError */))
{}
bool PaperSize::equal(const PaperSize& other) const
@@ -72,12 +72,12 @@ bool PaperSize::equal(const PaperSize& other) const
PaperSize::operator const void*() const
{
- return gobj() ? GINT_TO_POINTER(1) : 0;
+ return gobj() ? GINT_TO_POINTER(1) : nullptr;
}
void PaperSize::save_to_key_file(Glib::KeyFile& key_file)
{
- gtk_paper_size_to_key_file( gobj(), (key_file).gobj(), 0);
+ gtk_paper_size_to_key_file( gobj(), (key_file).gobj(), nullptr);
}
diff --git a/gtk/src/printoperation.ccg b/gtk/src/printoperation.ccg
index e8e7aff..b1153b1 100644
--- a/gtk/src/printoperation.ccg
+++ b/gtk/src/printoperation.ccg
@@ -45,7 +45,7 @@ PrintOperation::run(PrintOperationAction action)
{
GError* gerror = nullptr;
PrintOperationResult res =
- (PrintOperationResult)gtk_print_operation_run(this->gobj(), (GtkPrintOperationAction)action, 0, &gerror);
+ (PrintOperationResult)gtk_print_operation_run(this->gobj(), (GtkPrintOperationAction)action, nullptr,
&gerror);
if (res == PRINT_OPERATION_RESULT_ERROR)
{
@@ -84,7 +84,7 @@ run_page_setup_dialog(Window& parent,
return Glib::wrap(
gtk_print_run_page_setup_dialog(
parent.gobj(),
- 0,
+ nullptr,
const_cast<GtkPrintSettings*>(Glib::unwrap<PrintSettings>(print_settings))));
}
@@ -122,7 +122,7 @@ run_page_setup_dialog_async(Window& parent,
// not to work):
gtk_print_run_page_setup_dialog_async(
parent.gobj(),
- 0,
+ nullptr,
const_cast<GtkPrintSettings*>(Glib::unwrap<PrintSettings>(print_settings)),
&SignalProxy_PrintSetupDone_gtk_callback,
slot_copy);
diff --git a/gtk/src/printsettings.ccg b/gtk/src/printsettings.ccg
index 7f91f83..27c5485 100644
--- a/gtk/src/printsettings.ccg
+++ b/gtk/src/printsettings.ccg
@@ -140,7 +140,7 @@ void PrintSettings::set_page_ranges(const std::vector<PrintSettings::PageRange>&
bool PrintSettings::load_from_key_file(const Glib::KeyFile& key_file)
{
GError* gerror = nullptr;
- bool retvalue = gtk_print_settings_load_key_file(gobj(), const_cast<GKeyFile*>((key_file).gobj()), NULL,
&(gerror));
+ bool retvalue = gtk_print_settings_load_key_file(gobj(), const_cast<GKeyFile*>((key_file).gobj()),
nullptr, &(gerror));
if(gerror)
::Glib::Error::throw_exception(gerror);
@@ -149,7 +149,7 @@ bool PrintSettings::load_from_key_file(const Glib::KeyFile& key_file)
void PrintSettings::save_to_key_file(Glib::KeyFile& key_file) const
{
- gtk_print_settings_to_key_file(const_cast<GtkPrintSettings*>(gobj()), (key_file).gobj(), 0);
+ gtk_print_settings_to_key_file(const_cast<GtkPrintSettings*>(gobj()), (key_file).gobj(), nullptr);
}
} // namespace Gtk
diff --git a/gtk/src/radioaction.ccg b/gtk/src/radioaction.ccg
index b26b00a..249503b 100644
--- a/gtk/src/radioaction.ccg
+++ b/gtk/src/radioaction.ccg
@@ -26,7 +26,7 @@ namespace Gtk
_DEPRECATE_IFDEF_START
RadioAction::RadioAction(Group& group, const Glib::ustring& name, const Gtk::StockID& stock_id, const
Glib::ustring& label, const Glib::ustring& tooltip)
:
- _CONSTRUCT("name", name.c_str(), "stock_id", stock_id.get_c_str(), "label", (label.empty() ? 0 :
label.c_str()), "tooltip", (tooltip.empty() ? 0 : tooltip.c_str()))
+ _CONSTRUCT("name", name.c_str(), "stock_id", stock_id.get_c_str(), "label", (label.empty() ? nullptr :
label.c_str()), "tooltip", (tooltip.empty() ? nullptr : tooltip.c_str()))
{
set_group(group);
}
@@ -34,7 +34,7 @@ _DEPRECATE_IFDEF_END
RadioAction::RadioAction(Group& group, const Glib::ustring& name, const Glib::ustring& icon_name, const
Glib::ustring& label, const Glib::ustring& tooltip)
:
- _CONSTRUCT("name", name.c_str(), "icon_name", icon_name.c_str(), "label", (label.empty() ? 0 :
label.c_str()), "tooltip", (tooltip.empty() ? 0 : tooltip.c_str()))
+ _CONSTRUCT("name", name.c_str(), "icon_name", icon_name.c_str(), "label", (label.empty() ? nullptr :
label.c_str()), "tooltip", (tooltip.empty() ? nullptr : tooltip.c_str()))
{
set_group(group);
}
diff --git a/gtk/src/radiobutton.ccg b/gtk/src/radiobutton.ccg
index c545f21..8fec2ea 100644
--- a/gtk/src/radiobutton.ccg
+++ b/gtk/src/radiobutton.ccg
@@ -57,7 +57,7 @@ void RadioButton::set_group(Group& group)
void RadioButton::reset_group()
{
- gtk_radio_button_set_group(gobj(), 0);
+ gtk_radio_button_set_group(gobj(), nullptr);
}
} //namespace Gtk
diff --git a/gtk/src/radiomenuitem.ccg b/gtk/src/radiomenuitem.ccg
index c49b050..8ce3518 100644
--- a/gtk/src/radiomenuitem.ccg
+++ b/gtk/src/radiomenuitem.ccg
@@ -50,7 +50,7 @@ void RadioMenuItem::set_group(Group& group)
void RadioMenuItem::reset_group()
{
- gtk_radio_menu_item_set_group(gobj(), 0);
+ gtk_radio_menu_item_set_group(gobj(), nullptr);
}
diff --git a/gtk/src/radiotoolbutton.ccg b/gtk/src/radiotoolbutton.ccg
index bb44c2e..f294bd9 100644
--- a/gtk/src/radiotoolbutton.ccg
+++ b/gtk/src/radiotoolbutton.ccg
@@ -25,8 +25,8 @@ namespace Gtk
RadioToolButton::RadioToolButton(Group& group, const Glib::ustring& label)
:
- Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc
optimisations.
- Gtk::ToggleToolButton(Glib::ConstructParams(radiotoolbutton_class_.init(), "label", label.c_str(), (char*)
0))
+ Glib::ObjectBase(nullptr), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow
vfunc optimisations.
+ Gtk::ToggleToolButton(Glib::ConstructParams(radiotoolbutton_class_.init(), "label", label.c_str(),
nullptr))
{
set_group(group);
}
@@ -34,8 +34,8 @@ RadioToolButton::RadioToolButton(Group& group, const Glib::ustring& label)
#ifndef GTKMM_DISABLE_DEPRECATED
RadioToolButton::RadioToolButton(Group& group, const Gtk::StockID& stock_id)
:
- Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc
optimisations.
- Gtk::ToggleToolButton(Glib::ConstructParams(radiotoolbutton_class_.init(), "stock_id",
(stock_id).get_c_str(), (char*) 0))
+ Glib::ObjectBase(nullptr), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow
vfunc optimisations.
+ Gtk::ToggleToolButton(Glib::ConstructParams(radiotoolbutton_class_.init(), "stock_id",
(stock_id).get_c_str(), nullptr))
{
//Based on the source of gtk_radio_tool_button_new_from_stock():
set_group(group);
@@ -45,8 +45,8 @@ RadioToolButton::RadioToolButton(Group& group, const Gtk::StockID& stock_id)
/* This would look too much like a copy constructor:
RadioToolButton::RadioToolButton(RadioToolButton& group, const Gtk::StockID& stock_id)
:
- Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc
optimisations.
- Gtk::ToggleToolButton(Glib::ConstructParams(radiotoolbutton_class_.init(), "stock_id",
(stock_id).get_c_str(), (char*) 0))
+ Glib::ObjectBase(nullptr), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow
vfunc optimisations.
+ Gtk::ToggleToolButton(Glib::ConstructParams(radiotoolbutton_class_.init(), "stock_id",
(stock_id).get_c_str(), nullptr))
{
//Based on the source of gtk_radio_tool_button_new_with_stock_from_widget():
auto radiogroup = group.get_group();
@@ -56,8 +56,8 @@ RadioToolButton::RadioToolButton(RadioToolButton& group, const Gtk::StockID& sto
RadioToolButton::RadioToolButton(Widget& icon_widget, const Glib::ustring& label)
:
- Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc
optimisations.
- Gtk::ToggleToolButton(Glib::ConstructParams(radiotoolbutton_class_.init(), "icon_widget",
(icon_widget).gobj(), "label", label.c_str(), (char*) 0))
+ Glib::ObjectBase(nullptr), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow
vfunc optimisations.
+ Gtk::ToggleToolButton(Glib::ConstructParams(radiotoolbutton_class_.init(), "icon_widget",
(icon_widget).gobj(), "label", label.c_str(), nullptr))
{
}
@@ -71,7 +71,7 @@ void RadioToolButton::set_group(Group& group)
void RadioToolButton::reset_group()
{
- gtk_radio_tool_button_set_group(gobj(), 0);
+ gtk_radio_tool_button_set_group(gobj(), nullptr);
}
} // namespace Gtk
diff --git a/gtk/src/range.ccg b/gtk/src/range.ccg
index 2e23e19..bca8255 100644
--- a/gtk/src/range.ccg
+++ b/gtk/src/range.ccg
@@ -23,7 +23,7 @@ namespace Gtk
void Range::unset_adjustment()
{
- gtk_range_set_adjustment(gobj(), 0);
+ gtk_range_set_adjustment(gobj(), nullptr);
}
#ifdef GLIBMM_VFUNCS_ENABLED
diff --git a/gtk/src/recentaction.ccg b/gtk/src/recentaction.ccg
index 1cac8c4..9ad53b9 100644
--- a/gtk/src/recentaction.ccg
+++ b/gtk/src/recentaction.ccg
@@ -25,16 +25,16 @@ _DEPRECATE_IFDEF_START
RecentAction::RecentAction(const Glib::ustring& name, const StockID& stock_id, const Glib::ustring& label,
const Glib::ustring& tooltip)
:
// Mark this class as non-derived to allow C++ vfuncs to be skipped.
- Glib::ObjectBase(0),
- Gtk::Action(Glib::ConstructParams(recentaction_class_.init(), "name", name.empty() ? 0 : name.c_str(),
"stock_id", (stock_id).get_c_str(), "label", label.empty() ? 0 : label.c_str(), "tooltip", tooltip.empty() ?
0 : tooltip.c_str(), static_cast<char*>(0)))
+ Glib::ObjectBase(nullptr),
+ Gtk::Action(Glib::ConstructParams(recentaction_class_.init(), "name", name.empty() ? nullptr :
name.c_str(), "stock_id", (stock_id).get_c_str(), "label", label.empty() ? nullptr : label.c_str(),
"tooltip", tooltip.empty() ? nullptr : tooltip.c_str(), nullptr))
{
}
RecentAction::RecentAction(const Glib::ustring& name, const StockID& stock_id, const Glib::ustring& label,
const Glib::ustring& tooltip, const Glib::RefPtr<RecentManager>& recent_manager)
:
// Mark this class as non-derived to allow C++ vfuncs to be skipped.
- Glib::ObjectBase(0),
- Gtk::Action(Glib::ConstructParams(recentaction_class_.init(), "name", name.empty() ? 0 : name.c_str(),
"stock_id", (stock_id).get_c_str(), "label", label.empty() ? 0 : label.c_str(), "tooltip", tooltip.empty() ?
0 : tooltip.c_str(), "recent_manager", Glib::unwrap(recent_manager), static_cast<char*>(0)))
+ Glib::ObjectBase(nullptr),
+ Gtk::Action(Glib::ConstructParams(recentaction_class_.init(), "name", name.empty() ? nullptr :
name.c_str(), "stock_id", (stock_id).get_c_str(), "label", label.empty() ? nullptr : label.c_str(),
"tooltip", tooltip.empty() ? nullptr : tooltip.c_str(), "recent_manager", Glib::unwrap(recent_manager),
nullptr))
{
}
_DEPRECATE_IFDEF_END
diff --git a/gtk/src/recentchooser.ccg b/gtk/src/recentchooser.ccg
index d799e0b..5c21b6f 100644
--- a/gtk/src/recentchooser.ccg
+++ b/gtk/src/recentchooser.ccg
@@ -58,7 +58,7 @@ void RecentChooser::set_sort_func(const SlotCompare& slot)
std::vector<Glib::ustring> RecentChooser::get_uris() const
{
- return
Glib::ArrayHandler<Glib::ustring>::array_to_vector(gtk_recent_chooser_get_uris(const_cast<GtkRecentChooser*>(gobj()),
NULL), Glib::OWNERSHIP_DEEP);
+ return
Glib::ArrayHandler<Glib::ustring>::array_to_vector(gtk_recent_chooser_get_uris(const_cast<GtkRecentChooser*>(gobj()),
nullptr), Glib::OWNERSHIP_DEEP);
}
void RecentChooser::unset_limit()
diff --git a/gtk/src/recentfilter.ccg b/gtk/src/recentfilter.ccg
index 161a274..cc4cf98 100644
--- a/gtk/src/recentfilter.ccg
+++ b/gtk/src/recentfilter.ccg
@@ -36,11 +36,11 @@ static gboolean SignalProxy_Custom_gtk_callback(const GtkRecentFilterInfo* filte
// Create string lists from char**s.
- for(int i = 0; filter_info->groups[i] != 0; ++i)
+ for(int i = 0; filter_info->groups[i] != nullptr; ++i)
{
cppInfo.groups.push_back( Glib::convert_const_gchar_ptr_to_ustring(filter_info->groups[i]) );
}
- for(int i = 0; filter_info->applications[i] != 0; ++i)
+ for(int i = 0; filter_info->applications[i] != nullptr; ++i)
{
cppInfo.applications.push_back( Glib::convert_const_gchar_ptr_to_ustring(filter_info->applications[i])
);
}
diff --git a/gtk/src/recentmanager.ccg b/gtk/src/recentmanager.ccg
index d1c8dc3..0cc37ba 100644
--- a/gtk/src/recentmanager.ccg
+++ b/gtk/src/recentmanager.ccg
@@ -28,7 +28,7 @@ bool RecentManager::add_item(const Glib::ustring& uri, const Data& data)
gboolean result;
// I wonder whether these should be const in the GTK+ API. armin.
- c_data.display_name = data.display_name.empty() ? NULL : const_cast<gchar*>(data.display_name.c_str());
+ c_data.display_name = data.display_name.empty() ? nullptr : const_cast<gchar*>(data.display_name.c_str());
c_data.description = const_cast<gchar*>(data.description.c_str());
c_data.mime_type = const_cast<gchar*>(data.mime_type.c_str());
c_data.app_name = const_cast<gchar*>(data.app_name.c_str());
@@ -37,7 +37,7 @@ bool RecentManager::add_item(const Glib::ustring& uri, const Data& data)
c_data.groups = static_cast<gchar**>(g_malloc((data.groups.size() + 1) * sizeof(gchar*)));
for(unsigned int i = 0; i < data.groups.size(); ++ i)
c_data.groups[i] = const_cast<gchar*>(data.groups[i].c_str());
- c_data.groups[data.groups.size()] = NULL;
+ c_data.groups[data.groups.size()] = nullptr;
c_data.is_private = data.is_private;
diff --git a/gtk/src/scale.hg b/gtk/src/scale.hg
index 7b6fd3c..e76f883 100644
--- a/gtk/src/scale.hg
+++ b/gtk/src/scale.hg
@@ -100,7 +100,7 @@ public:
#m4 dnl// Also, ensure that format_value never returns an empty char[],
#m4 dnl// because that could be caused by an intermediate empty ustring from an initial null char*,
#m4 dnl//See bug http://bugzilla.gnome.org/show_bug.cgi?id=168747.
-#m4 _CONVERSION(`Glib::ustring',`gchar*',`(strlen($3.c_str()) ? g_strdup($3.c_str()) : 0)')
+#m4 _CONVERSION(`Glib::ustring',`gchar*',`(strlen($3.c_str()) ? g_strdup($3.c_str()) : nullptr)')
_WRAP_SIGNAL(Glib::ustring format_value(double value), "format_value")
// TODO: When we can break ABI, this signal needs to be
diff --git a/gtk/src/scalebutton.ccg b/gtk/src/scalebutton.ccg
index 33ffaa8..0e2e3ce 100644
--- a/gtk/src/scalebutton.ccg
+++ b/gtk/src/scalebutton.ccg
@@ -25,7 +25,7 @@ namespace Gtk
ScaleButton::ScaleButton(IconSize size, double min, double max, double step, const
std::vector<Glib::ustring>& icons)
:
- _CONSTRUCT("size", static_cast<GtkIconSize>(int(size)), "icons",
Glib::ArrayHandler<Glib::ustring>::vector_to_array(icons).data(), static_cast<char*>(0))
+ _CONSTRUCT("size", static_cast<GtkIconSize>(int(size)), "icons",
Glib::ArrayHandler<Glib::ustring>::vector_to_array(icons).data(), nullptr)
{
auto adjustment = Adjustment::create(min, min, max, step, 10 * step, 0);
set_adjustment(adjustment);
diff --git a/gtk/src/scrollable.ccg b/gtk/src/scrollable.ccg
index db929ae..832ab48 100644
--- a/gtk/src/scrollable.ccg
+++ b/gtk/src/scrollable.ccg
@@ -22,12 +22,12 @@ namespace Gtk
void Scrollable::unset_hadjustment()
{
- gtk_scrollable_set_hadjustment(gobj(), 0);
+ gtk_scrollable_set_hadjustment(gobj(), nullptr);
}
void Scrollable::unset_vadjustment()
{
- gtk_scrollable_set_vadjustment(gobj(), 0);
+ gtk_scrollable_set_vadjustment(gobj(), nullptr);
}
} //namespace Gtk
diff --git a/gtk/src/spinbutton.ccg b/gtk/src/spinbutton.ccg
index f24674f..9c36c1f 100644
--- a/gtk/src/spinbutton.ccg
+++ b/gtk/src/spinbutton.ccg
@@ -28,7 +28,7 @@ SpinButton::SpinButton(double climb_rate, guint digits)
void SpinButton::unset_adjustment()
{
- gtk_spin_button_set_adjustment(gobj(), 0);
+ gtk_spin_button_set_adjustment(gobj(), nullptr);
}
} // namespace Gtk
diff --git a/gtk/src/stacksidebar.ccg b/gtk/src/stacksidebar.ccg
index 31fe2e4..408dce7 100644
--- a/gtk/src/stacksidebar.ccg
+++ b/gtk/src/stacksidebar.ccg
@@ -21,7 +21,7 @@ namespace Gtk
void StackSidebar::unset_stack()
{
- gtk_stack_sidebar_set_stack(gobj(), 0);
+ gtk_stack_sidebar_set_stack(gobj(), nullptr);
}
} //namespace Gtk
diff --git a/gtk/src/stackswitcher.ccg b/gtk/src/stackswitcher.ccg
index 818224b..ef9c738 100644
--- a/gtk/src/stackswitcher.ccg
+++ b/gtk/src/stackswitcher.ccg
@@ -23,7 +23,7 @@ namespace Gtk
void StackSwitcher::unset_stack()
{
- gtk_stack_switcher_set_stack(gobj(), 0);
+ gtk_stack_switcher_set_stack(gobj(), nullptr);
}
} //namespace Gtk
diff --git a/gtk/src/statusicon.ccg b/gtk/src/statusicon.ccg
index 3b6f3ba..d1bf068 100644
--- a/gtk/src/statusicon.ccg
+++ b/gtk/src/statusicon.ccg
@@ -25,8 +25,8 @@ namespace Gtk
StatusIcon::StatusIcon(const StockID& stock)
:
// Mark this class as non-derived to allow C++ vfuncs to be skipped.
- Glib::ObjectBase(0),
- Glib::Object(Glib::ConstructParams(statusicon_class_.init(), "stock", (stock).get_c_str(),
static_cast<char*>(0)))
+ Glib::ObjectBase(nullptr),
+ Glib::Object(Glib::ConstructParams(statusicon_class_.init(), "stock", (stock).get_c_str(), nullptr))
{}
#endif // GTKMM_DISABLE_DEPRECATED
@@ -63,7 +63,7 @@ bool StatusIcon::get_geometry(Glib::RefPtr<Gdk::Screen>& screen, Gdk::Rectangle&
void StatusIcon::popup_menu_at_position(Menu& menu, guint button, guint32 activate_time)
{
- gtk_menu_popup(menu.gobj(), NULL, NULL,
+ gtk_menu_popup(menu.gobj(), nullptr, nullptr,
gtk_status_icon_position_menu, gobj() /* user_data, passed to gtk_status_icon_position_menu()/ */,
button, activate_time);
}
diff --git a/gtk/src/stockitem.ccg b/gtk/src/stockitem.ccg
index 0787b8d..5bb1823 100644
--- a/gtk/src/stockitem.ccg
+++ b/gtk/src/stockitem.ccg
@@ -32,7 +32,7 @@ StockItem::StockItem(const Gtk::StockID& stock_id,
const_cast<char*>(label.c_str()),
static_cast<GdkModifierType>(unsigned(modifier)),
keyval,
- (translation_domain.empty()) ? 0 : const_cast<char*>(translation_domain.c_str())
+ (translation_domain.empty()) ? nullptr : const_cast<char*>(translation_domain.c_str())
};
gobject_ = gtk_stock_item_copy(&stock_item);
@@ -41,13 +41,13 @@ StockItem::StockItem(const Gtk::StockID& stock_id,
// static
bool StockItem::lookup(const Gtk::StockID& stock_id, Gtk::StockItem& item)
{
- GtkStockItem item_gobj = { 0, 0, GdkModifierType(0), 0, 0, };
+ GtkStockItem item_gobj = { nullptr, nullptr, GdkModifierType(0), 0, nullptr, };
const bool known_id = gtk_stock_lookup(stock_id.get_c_str(), &item_gobj);
if(item.gobject_)
gtk_stock_item_free(item.gobject_);
- item.gobject_ = (known_id) ? gtk_stock_item_copy(&item_gobj) : 0;
+ item.gobject_ = (known_id) ? gtk_stock_item_copy(&item_gobj) : nullptr;
return known_id;
}
diff --git a/gtk/src/stylecontext.ccg b/gtk/src/stylecontext.ccg
index ae5bb16..71d3be9 100644
--- a/gtk/src/stylecontext.ccg
+++ b/gtk/src/stylecontext.ccg
@@ -80,7 +80,7 @@ Border StyleContext::get_margin(StateFlags state) const
void StyleContext::unset_parent()
{
- gtk_style_context_set_parent(gobj(), 0);
+ gtk_style_context_set_parent(gobj(), nullptr);
}
diff --git a/gtk/src/textbuffer.ccg b/gtk/src/textbuffer.ccg
index 1642954..1877004 100644
--- a/gtk/src/textbuffer.ccg
+++ b/gtk/src/textbuffer.ccg
@@ -43,7 +43,7 @@ static guint8* SignalProxy_Serialize(GtkTextBuffer* /* register_buffer */,
{
Glib::exception_handlers_invoke();
}
- return 0;
+ return nullptr;
}
static void SignalProxy_Serialize_gtk_callback_destroy(void* user_data)
@@ -97,7 +97,7 @@ Glib::RefPtr<TextBuffer::Tag> TextBuffer::create_tag(const Glib::ustring& tag_na
{
//gtk_text_buffer_create_tag takes a varargs list of property names and values.
//gtkmm coders should use the Tag.set_* method instead.
- return Glib::wrap(gtk_text_buffer_create_tag(gobj(), tag_name.c_str(), (char*)0), true); //true =
take_copy.
+ return Glib::wrap(gtk_text_buffer_create_tag(gobj(), tag_name.c_str(), nullptr), true); //true = take_copy.
//We have to take a copy because gtk_text_buffer_create_tag() doesn't ref for us, for no real reason.
}
@@ -105,7 +105,7 @@ Glib::RefPtr<TextBuffer::Tag> TextBuffer::create_tag()
{
//gtk_text_buffer_create_tag takes a varargs list of property names and values.
//gtkmm coders should use the Tag.set_* method instead.
- return Glib::wrap(gtk_text_buffer_create_tag(gobj(), (const char*)0, (char*)0), true); //true = take_copy.
+ return Glib::wrap(gtk_text_buffer_create_tag(gobj(), nullptr, nullptr), true); //true = take_copy.
//We have to take a copy because gtk_text_buffer_create_tag() doesn't ref for us, for no real reason.
}
@@ -113,7 +113,7 @@ Glib::RefPtr<TextBuffer::Mark>
TextBuffer::create_mark(const TextBuffer::iterator& where, bool left_gravity)
{
return Glib::wrap(gtk_text_buffer_create_mark(
- gobj(), 0, const_cast<GtkTextIter*>(where.gobj()), left_gravity),
+ gobj(), nullptr, const_cast<GtkTextIter*>(where.gobj()), left_gravity),
true); // acquire reference
}
@@ -291,7 +291,7 @@ TextBuffer::iterator TextBuffer::insert_with_tag(const iterator& pos, const Glib
iterator iterCopy (pos);
gtk_text_buffer_insert_with_tags(
- gobj(), iterCopy.gobj(), text.data(), text.bytes(), tag->gobj(), (GtkTextTag*)0);
+ gobj(), iterCopy.gobj(), text.data(), text.bytes(), tag->gobj(), nullptr);
return get_iter_at_offset(offset + text.size());
}
@@ -305,7 +305,7 @@ TextBuffer::iterator TextBuffer::insert_with_tag(const iterator& pos,
iterator iterCopy (pos);
gtk_text_buffer_insert_with_tags(
- gobj(), iterCopy.gobj(), text_begin, text_end - text_begin, tag->gobj(), (GtkTextTag*)0);
+ gobj(), iterCopy.gobj(), text_begin, text_end - text_begin, tag->gobj(), nullptr);
return get_iter_at_offset(offset + (text_end - text_begin));
}
@@ -318,7 +318,7 @@ TextBuffer::iterator TextBuffer::insert_with_tag(const iterator& pos, const Glib
iterator iterCopy (pos);
gtk_text_buffer_insert_with_tags_by_name(
- gobj(), iterCopy.gobj(), text.data(), text.bytes(), tag_name.c_str(), (char*)0);
+ gobj(), iterCopy.gobj(), text.data(), text.bytes(), tag_name.c_str(), nullptr);
return get_iter_at_offset(offset + text.size());
}
@@ -332,7 +332,7 @@ TextBuffer::iterator TextBuffer::insert_with_tag(const iterator& pos,
iterator iterCopy (pos);
gtk_text_buffer_insert_with_tags_by_name(
- gobj(), iterCopy.gobj(), text_begin, text_end - text_begin, tag_name.c_str(), (char*)0);
+ gobj(), iterCopy.gobj(), text_begin, text_end - text_begin, tag_name.c_str(), nullptr);
return get_iter_at_offset(offset + (text_end - text_begin));
}
@@ -506,7 +506,7 @@ void TextBuffer::paste_clipboard(const Glib::RefPtr<Clipboard>& clipboard, const
void TextBuffer::paste_clipboard(const Glib::RefPtr<Clipboard>& clipboard, bool default_editable)
{
- gtk_text_buffer_paste_clipboard(gobj(), clipboard->gobj(), 0, default_editable);
+ gtk_text_buffer_paste_clipboard(gobj(), clipboard->gobj(), nullptr, default_editable);
}
TextBuffer::iterator TextBuffer::get_iter_at_child_anchor(const Glib::RefPtr<ChildAnchor>& anchor)
diff --git a/gtk/src/textiter.ccg b/gtk/src/textiter.ccg
index 0115291..cd617c5 100644
--- a/gtk/src/textiter.ccg
+++ b/gtk/src/textiter.ccg
@@ -41,32 +41,32 @@ bool TextIter::get_attributes(TextAttributes& values) const
bool TextIter::begins_tag() const
{
- return gtk_text_iter_begins_tag(const_cast<GtkTextIter*>(gobj()), 0 /* see C docs */);
+ return gtk_text_iter_begins_tag(const_cast<GtkTextIter*>(gobj()), nullptr /* see C docs */);
}
bool TextIter::ends_tag() const
{
- return gtk_text_iter_ends_tag(const_cast<GtkTextIter*>(gobj()), 0 /* see C docs */);
+ return gtk_text_iter_ends_tag(const_cast<GtkTextIter*>(gobj()), nullptr /* see C docs */);
}
bool TextIter::toggles_tag() const
{
- return gtk_text_iter_toggles_tag(const_cast<GtkTextIter*>(gobj()), 0 /* see C docs */);
+ return gtk_text_iter_toggles_tag(const_cast<GtkTextIter*>(gobj()), nullptr /* see C docs */);
}
bool TextIter::has_tag() const
{
- return gtk_text_iter_has_tag(const_cast<GtkTextIter*>(gobj()), 0 /* see C docs */);
+ return gtk_text_iter_has_tag(const_cast<GtkTextIter*>(gobj()), nullptr /* see C docs */);
}
bool TextIter::forward_search(const Glib::ustring& str, TextSearchFlags flags, TextIter& match_start,
TextIter& match_end) const
{
- return gtk_text_iter_forward_search(const_cast<GtkTextIter*>(gobj()), str.c_str(),
((GtkTextSearchFlags)(flags)), (match_start).gobj(), (match_end).gobj(), 0 /* means end() - see C docs */);
+ return gtk_text_iter_forward_search(const_cast<GtkTextIter*>(gobj()), str.c_str(),
((GtkTextSearchFlags)(flags)), (match_start).gobj(), (match_end).gobj(), nullptr /* means end() - see C docs
*/);
}
bool TextIter::backward_search(const Glib::ustring& str, TextSearchFlags flags, TextIter& match_start,
TextIter& match_end) const
{
- return gtk_text_iter_backward_search(const_cast<GtkTextIter*>(gobj()), str.c_str(),
((GtkTextSearchFlags)(flags)), (match_start).gobj(), (match_end).gobj(), 0 /* means end - see C docs */);
+ return gtk_text_iter_backward_search(const_cast<GtkTextIter*>(gobj()), str.c_str(),
((GtkTextSearchFlags)(flags)), (match_start).gobj(), (match_end).gobj(), nullptr /* means end - see C docs
*/);
}
diff --git a/gtk/src/textiter.hg b/gtk/src/textiter.hg
index 1ca86e5..b4fa9e3 100644
--- a/gtk/src/textiter.hg
+++ b/gtk/src/textiter.hg
@@ -337,7 +337,7 @@ TextIter::value_type TextIter::operator*() const
inline
TextIter::operator BoolExpr() const
{
- return !is_end() ? GINT_TO_POINTER(1) : 0;
+ return !is_end() ? GINT_TO_POINTER(1) : nullptr;
}
template <class Predicate>
@@ -353,7 +353,7 @@ bool TextIter::forward_find_char(const Predicate& predicate)
{
typedef TextIter::PredicateAdapter<Predicate> PredAdapter;
PredAdapter adapter (predicate);
- return this->forward_find_char_impl(&PredAdapter::gtk_callback, &adapter, 0);
+ return this->forward_find_char_impl(&PredAdapter::gtk_callback, &adapter, nullptr);
}
template <class Predicate>
@@ -369,7 +369,7 @@ bool TextIter::backward_find_char(const Predicate& predicate)
{
typedef TextIter::PredicateAdapter<Predicate> PredAdapter;
PredAdapter adapter (predicate);
- return this->backward_find_char_impl(&PredAdapter::gtk_callback, &adapter, 0);
+ return this->backward_find_char_impl(&PredAdapter::gtk_callback, &adapter, nullptr);
}
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
diff --git a/gtk/src/toggleaction.ccg b/gtk/src/toggleaction.ccg
index 3b244b2..affc08f 100644
--- a/gtk/src/toggleaction.ccg
+++ b/gtk/src/toggleaction.ccg
@@ -24,7 +24,7 @@ namespace Gtk
_DEPRECATE_IFDEF_START
ToggleAction::ToggleAction(const Glib::ustring& name, const Gtk::StockID& stock_id, const Glib::ustring&
label, const Glib::ustring& tooltip, bool is_active)
:
- _CONSTRUCT("name", name.c_str(), "stock_id", stock_id.get_c_str(), "label", (label.empty() ? 0 :
label.c_str()), "tooltip", (tooltip.empty() ? 0 : tooltip.c_str()))
+ _CONSTRUCT("name", name.c_str(), "stock_id", stock_id.get_c_str(), "label", (label.empty() ? nullptr :
label.c_str()), "tooltip", (tooltip.empty() ? nullptr : tooltip.c_str()))
{
set_active(is_active);
}
@@ -32,7 +32,7 @@ _DEPRECATE_IFDEF_END
ToggleAction::ToggleAction(const Glib::ustring& name, const Glib::ustring& icon_name, const Glib::ustring&
label, const Glib::ustring& tooltip, bool is_active)
:
- _CONSTRUCT("name", name.c_str(), "icon_name", icon_name.c_str(), "label", (label.empty() ? 0 :
label.c_str()), "tooltip", (tooltip.empty() ? 0 : tooltip.c_str()))
+ _CONSTRUCT("name", name.c_str(), "icon_name", icon_name.c_str(), "label", (label.empty() ? nullptr :
label.c_str()), "tooltip", (tooltip.empty() ? nullptr : tooltip.c_str()))
{
set_active(is_active);
}
diff --git a/gtk/src/toggletoolbutton.ccg b/gtk/src/toggletoolbutton.ccg
index 024868e..68c91e0 100644
--- a/gtk/src/toggletoolbutton.ccg
+++ b/gtk/src/toggletoolbutton.ccg
@@ -25,23 +25,23 @@ namespace Gtk
ToggleToolButton::ToggleToolButton(const Gtk::StockID& stock_id)
:
// Mark this class as non-derived to allow C++ vfuncs to be skipped.
- Glib::ObjectBase(0),
- Gtk::ToolButton(Glib::ConstructParams(toggletoolbutton_class_.init(), "stock_id", (stock_id).get_c_str(),
static_cast<char*>(0)))
+ Glib::ObjectBase(nullptr),
+ Gtk::ToolButton(Glib::ConstructParams(toggletoolbutton_class_.init(), "stock_id", (stock_id).get_c_str(),
nullptr))
{
}
#endif // GTKMM_DISABLE_DEPRECATED
ToggleToolButton::ToggleToolButton(const Glib::ustring& label)
:
- Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc
optimisations.
- Gtk::ToolButton(Glib::ConstructParams(toggletoolbutton_class_.init(), "label", label.c_str(), (char*) 0))
+ Glib::ObjectBase(nullptr), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow
vfunc optimisations.
+ Gtk::ToolButton(Glib::ConstructParams(toggletoolbutton_class_.init(), "label", label.c_str(), nullptr))
{
}
ToggleToolButton::ToggleToolButton(Widget& icon_widget, const Glib::ustring& label)
:
- Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc
optimisations.
- Gtk::ToolButton(Glib::ConstructParams(toggletoolbutton_class_.init(), "icon_widget", (icon_widget).gobj(),
"label", label.c_str(), (char*) 0))
+ Glib::ObjectBase(nullptr), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow
vfunc optimisations.
+ Gtk::ToolButton(Glib::ConstructParams(toggletoolbutton_class_.init(), "icon_widget", (icon_widget).gobj(),
"label", label.c_str(), nullptr))
{
}
diff --git a/gtk/src/toolbar.ccg b/gtk/src/toolbar.ccg
index 1a3707b..0805264 100644
--- a/gtk/src/toolbar.ccg
+++ b/gtk/src/toolbar.ccg
@@ -76,7 +76,7 @@ void Toolbar::prepend(ToggleToolButton& item, const sigc::slot<void>& toggled_sl
void Toolbar::unset_drop_highlight_item()
{
//See GTK+ docs.
- gtk_toolbar_set_drop_highlight_item(gobj(), 0, 0);
+ gtk_toolbar_set_drop_highlight_item(gobj(), nullptr, 0);
}
} // namespace Gtk
diff --git a/gtk/src/toolbutton.ccg b/gtk/src/toolbutton.ccg
index 791600e..1146ed1 100644
--- a/gtk/src/toolbutton.ccg
+++ b/gtk/src/toolbutton.ccg
@@ -24,15 +24,15 @@ namespace Gtk
ToolButton::ToolButton(const Gtk::StockID& stock_id)
:
// Mark this class as non-derived to allow C++ vfuncs to be skipped.
- Glib::ObjectBase(0),
- Gtk::ToolItem(Glib::ConstructParams(toolbutton_class_.init(), "stock_id", (stock_id).get_c_str(),
static_cast<char*>(0)))
+ Glib::ObjectBase(nullptr),
+ Gtk::ToolItem(Glib::ConstructParams(toolbutton_class_.init(), "stock_id", (stock_id).get_c_str(), nullptr))
{}
#endif // GTKMM_DISABLE_DEPRECATED
ToolButton::ToolButton(const Glib::ustring& label)
:
- Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc
optimisations.
- Gtk::ToolItem(Glib::ConstructParams(toolbutton_class_.init(), "label", label.c_str(), (char*) 0))
+ Glib::ObjectBase(nullptr), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow
vfunc optimisations.
+ Gtk::ToolItem(Glib::ConstructParams(toolbutton_class_.init(), "label", label.c_str(), nullptr))
{
}
diff --git a/gtk/src/toolitem.ccg b/gtk/src/toolitem.ccg
index e33fa95..86ec783 100644
--- a/gtk/src/toolitem.ccg
+++ b/gtk/src/toolitem.ccg
@@ -23,7 +23,7 @@ namespace Gtk
void ToolItem::unset_proxy_menu_item(const Glib::ustring& menu_item_id)
{
- gtk_tool_item_set_proxy_menu_item(gobj(), menu_item_id.c_str(), 0);
+ gtk_tool_item_set_proxy_menu_item(gobj(), menu_item_id.c_str(), nullptr);
}
} // namespace Gtk
diff --git a/gtk/src/tooltip.ccg b/gtk/src/tooltip.ccg
index 0394c80..fe08e3c 100644
--- a/gtk/src/tooltip.ccg
+++ b/gtk/src/tooltip.ccg
@@ -28,22 +28,22 @@ void Tooltip::trigger_tooltip_query(const Glib::RefPtr<Gdk::Display>& display)
void Tooltip::unset_markup()
{
- gtk_tooltip_set_markup(gobj(), 0);
+ gtk_tooltip_set_markup(gobj(), nullptr);
}
void Tooltip::unset_text()
{
- gtk_tooltip_set_text(gobj(), 0);
+ gtk_tooltip_set_text(gobj(), nullptr);
}
void Tooltip::unset_icon()
{
- gtk_tooltip_set_icon(gobj(), 0);
+ gtk_tooltip_set_icon(gobj(), nullptr);
}
void Tooltip::unset_custom()
{
- gtk_tooltip_set_custom(gobj(), 0);
+ gtk_tooltip_set_custom(gobj(), nullptr);
}
} // namespace Gtk
diff --git a/gtk/src/treeiter.ccg b/gtk/src/treeiter.ccg
index be42197..e415a4b 100644
--- a/gtk/src/treeiter.ccg
+++ b/gtk/src/treeiter.ccg
@@ -27,7 +27,7 @@ namespace Gtk
TreeIter::TreeIter()
:
TreeIterBase(),
- model_ (0),
+ model_ (nullptr),
is_end_ (false)
{}
@@ -42,7 +42,7 @@ TreeIter::TreeIter(GtkTreeModel* model, const GtkTreeIter* iter)
:
TreeIterBase(iter),
model_ (dynamic_cast<TreeModel*>(Glib::wrap_auto((GObject*) model))),
- is_end_ (iter == 0)
+ is_end_ (iter == nullptr)
{}
TreeIter& TreeIter::operator++()
@@ -84,7 +84,7 @@ TreeIter& TreeIter::operator--()
else // --end yields last
{
auto next = gobject_;
- const auto parent = (next.stamp != 0) ? &next : 0;
+ const auto parent = (next.stamp != 0) ? &next : nullptr;
const int index = gtk_tree_model_iter_n_children(Glib::unwrap(model_), parent) - 1;
is_end_ = !gtk_tree_model_iter_nth_child(Glib::unwrap(model_), &gobject_, parent, index);
@@ -105,7 +105,7 @@ const TreeIter TreeIter::operator--(int)
}
else // --end yields last
{
- const auto parent = (next.gobject_.stamp != 0) ? &next.gobject_ : 0;
+ const auto parent = (next.gobject_.stamp != 0) ? &next.gobject_ : nullptr;
const int index = gtk_tree_model_iter_n_children(model_->gobj(), parent) - 1;
is_end_ = !gtk_tree_model_iter_nth_child(model_->gobj(), &gobject_, parent, index);
@@ -139,7 +139,7 @@ TreeIter::operator const void*() const
// Test whether the GtkTreeIter is valid and not an end iterator. This check
// is almost the same as the private VALID_ITER() macro in gtkliststore.c and
// gtktreestore.c.
- return (!is_end_ && gobject_.stamp) ? GINT_TO_POINTER(1) : 0;
+ return (!is_end_ && gobject_.stamp) ? GINT_TO_POINTER(1) : nullptr;
}
void TreeIter::setup_end_iterator(const TreeIter& last_valid)
@@ -166,7 +166,7 @@ void TreeIter::set_model_gobject(GtkTreeModel* model)
GtkTreeModel* TreeIter::get_model_gobject() const
{
- return (model_) ? model_->gobj() : 0;
+ return (model_) ? model_->gobj() : nullptr;
}
diff --git a/gtk/src/treeiter.hg b/gtk/src/treeiter.hg
index 6b99e91..544fe1f 100644
--- a/gtk/src/treeiter.hg
+++ b/gtk/src/treeiter.hg
@@ -160,10 +160,10 @@ public:
void setup_end_iterator(const TreeIter& last_valid);
const GtkTreeIter* get_gobject_if_not_end() const
- { return (!is_end_) ? &gobject_ : 0; }
+ { return (!is_end_) ? &gobject_ : nullptr; }
const GtkTreeIter* get_parent_gobject_if_end() const
- { return (is_end_ && gobject_.stamp) ? &gobject_ : 0; }
+ { return (is_end_ && gobject_.stamp) ? &gobject_ : nullptr; }
protected:
@@ -385,7 +385,7 @@ public:
*/
operator BoolExpr() const
{
- return !empty() ? GINT_TO_POINTER(1) : 0;
+ return !empty() ? GINT_TO_POINTER(1) : nullptr;
}
#ifndef DOXYGEN_SHOULD_SKIP_THIS
@@ -394,7 +394,7 @@ public:
: TreeIter(model) {}
const GtkTreeIter* get_parent_gobject() const
- { return (gobject_.stamp != 0) ? &gobject_ : 0; }
+ { return (gobject_.stamp != 0) ? &gobject_ : nullptr; }
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
};
diff --git a/gtk/src/treemodel.ccg b/gtk/src/treemodel.ccg
index af21fda..e52ebc5 100644
--- a/gtk/src/treemodel.ccg
+++ b/gtk/src/treemodel.ccg
@@ -511,7 +511,7 @@ bool TreeModel::iter_nth_root_child_vfunc(int n, iterator& iter) const
{
//This means that iter_nth_child(0) might be called by iter_children_vfunc_callback(),
//but hopefully that's exactly the same thing. TODO: Ask why both vfuncs exist. murrayc.
- return (*base->iter_nth_child)( const_cast<GtkTreeModel*>(gobj()), iter.gobj(), 0 /* the null parent */,
n );
+ return (*base->iter_nth_child)( const_cast<GtkTreeModel*>(gobj()), iter.gobj(), nullptr /* the null
parent */, n );
}
return bool();
@@ -582,7 +582,7 @@ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) /
) );
if(base && base->iter_n_children)
- return (*base->iter_n_children)(const_cast<GtkTreeModel*>(gobj()), 0 /* null iter to mean root node, as
described in C docs */);
+ return (*base->iter_n_children)(const_cast<GtkTreeModel*>(gobj()), nullptr /* null iter to mean root
node, as described in C docs */);
typedef int RType;
return RType();
@@ -604,7 +604,7 @@ void TreeModel::rows_reordered(const Path& path, const std::vector<int>& new_ord
//The size of the array seems to be based on the known number of children. murrayc.
gtk_tree_model_rows_reordered(gobj(),
const_cast<GtkTreePath*>((path).gobj()),
- 0,
+ nullptr,
const_cast<int*>(Glib::ArrayHandler<int>::vector_to_array(new_order).data
()));
}
diff --git a/gtk/src/treemodelfilter.ccg b/gtk/src/treemodelfilter.ccg
index 89ef880..a229d7f 100644
--- a/gtk/src/treemodelfilter.ccg
+++ b/gtk/src/treemodelfilter.ccg
@@ -86,7 +86,7 @@ TreeModelFilter::TreeModelFilter(const Glib::RefPtr<TreeModel>& child_model)
TreeModelFilter::TreeModelFilter(const Glib::RefPtr<TreeModel>& child_model, const TreeModel::Path&
virtual_root)
:
- _CONSTRUCT("child_model", child_model->gobj(), "virtual_root", (virtual_root.empty() ? 0 :
const_cast<GtkTreePath*>((virtual_root).gobj())) )
+ _CONSTRUCT("child_model", child_model->gobj(), "virtual_root", (virtual_root.empty() ? nullptr :
const_cast<GtkTreePath*>((virtual_root).gobj())) )
{
}
diff --git a/gtk/src/treepath.ccg b/gtk/src/treepath.ccg
index d0618fd..a3cbe8d 100644
--- a/gtk/src/treepath.ccg
+++ b/gtk/src/treepath.ccg
@@ -77,7 +77,7 @@ TreePath::size_type TreePath::size() const
TreePath::operator const void*() const
{
- return !empty() ? GINT_TO_POINTER(1) : 0;
+ return !empty() ? GINT_TO_POINTER(1) : nullptr;
}
bool TreePath::empty() const
@@ -134,7 +134,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 = nullptr;
- gboolean result = gtk_tree_get_row_drag_data(const_cast<GtkSelectionData*>(selection_data.gobj()), 0,
&src_path);
+ gboolean result = gtk_tree_get_row_drag_data(const_cast<GtkSelectionData*>(selection_data.gobj()),
nullptr, &src_path);
//gtk_tree_get_row_drag_data gives us ownership of src_path.
path = Glib::wrap(src_path, false /* take_copy=false */);
diff --git a/gtk/src/treerowreference.ccg b/gtk/src/treerowreference.ccg
index d63eb12..617f3b7 100644
--- a/gtk/src/treerowreference.ccg
+++ b/gtk/src/treerowreference.ccg
@@ -28,7 +28,7 @@ TreeRowReference::TreeRowReference(const Glib::RefPtr<TreeModel>& model, const T
TreeRowReference::operator const void*() const
{
- return is_valid() ? GINT_TO_POINTER(1) : 0;
+ return is_valid() ? GINT_TO_POINTER(1) : nullptr;
}
} // namespace Gtk
diff --git a/gtk/src/treeselection.ccg b/gtk/src/treeselection.ccg
index 9c54d9c..24d3d7d 100644
--- a/gtk/src/treeselection.ccg
+++ b/gtk/src/treeselection.ccg
@@ -165,7 +165,7 @@ void TreeSelection::selected_foreach(const SlotForeachPathAndIter& slot) const
std::vector<TreeModel::Path> TreeSelection::get_selected_rows() const
{
return Glib::ListHandler<TreeModel::Path,
TreePathTraits>::list_to_vector(gtk_tree_selection_get_selected_rows(
- const_cast<GtkTreeSelection*>(gobj()), 0), Glib::OWNERSHIP_DEEP);
+ const_cast<GtkTreeSelection*>(gobj()), nullptr), Glib::OWNERSHIP_DEEP);
}
std::vector<TreeModel::Path> TreeSelection::get_selected_rows(Glib::RefPtr<TreeModel>& model)
diff --git a/gtk/src/treesortable.ccg b/gtk/src/treesortable.ccg
index ff7fe90..31645aa 100644
--- a/gtk/src/treesortable.ccg
+++ b/gtk/src/treesortable.ccg
@@ -68,7 +68,7 @@ void TreeSortable::set_default_sort_func(const SlotCompare& slot)
void TreeSortable::unset_default_sort_func()
{
gtk_tree_sortable_set_default_sort_func(
- gobj(), 0, 0, 0); /* See GTK+ docs about the 0s. */
+ gobj(), nullptr, nullptr, nullptr); /* See GTK+ docs about the nullptrs. */
}
} // namespace Gtk
diff --git a/gtk/src/treestore.ccg b/gtk/src/treestore.ccg
index a3cc3d7..72e515c 100644
--- a/gtk/src/treestore.ccg
+++ b/gtk/src/treestore.ccg
@@ -37,7 +37,7 @@ void TreeStore::set_column_types(const TreeModelColumnRecord& columns)
TreeModel::iterator TreeStore::erase(const iterator& iter)
{
- g_assert(iter.get_gobject_if_not_end() != 0);
+ g_assert(iter.get_gobject_if_not_end() != nullptr);
iterator next (iter);
++next;
@@ -81,7 +81,7 @@ TreeModel::iterator TreeStore::insert_after(const iterator& iter)
TreeModel::iterator TreeStore::prepend()
{
iterator new_pos (this);
- gtk_tree_store_prepend(gobj(), new_pos.gobj(), 0);
+ gtk_tree_store_prepend(gobj(), new_pos.gobj(), nullptr);
return new_pos;
}
@@ -99,7 +99,7 @@ TreeModel::iterator TreeStore::prepend(const TreeNodeChildren& node)
TreeModel::iterator TreeStore::append()
{
iterator new_pos (this);
- gtk_tree_store_append(gobj(), new_pos.gobj(), 0);
+ gtk_tree_store_append(gobj(), new_pos.gobj(), nullptr);
return new_pos;
}
diff --git a/gtk/src/treeview.ccg b/gtk/src/treeview.ccg
index 0d41d45..8ee904a 100644
--- a/gtk/src/treeview.ccg
+++ b/gtk/src/treeview.ccg
@@ -131,7 +131,7 @@ int TreeView::insert_column_with_data_func(int position, const Glib::ustring& ti
void TreeView::set_cursor(const TreeModel::Path& path)
{
- gtk_tree_view_set_cursor(gobj(), const_cast<GtkTreePath*>(path.gobj()), 0, false);
+ gtk_tree_view_set_cursor(gobj(), const_cast<GtkTreePath*>(path.gobj()), nullptr, false);
}
void TreeView::get_cursor(TreeModel::Path& path, TreeViewColumn*& focus_column)
@@ -190,7 +190,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 = nullptr;
- const bool result = gtk_tree_view_get_path_at_pos(const_cast<GtkTreeView*>(gobj()), x, y, &pTreePath, 0,
0, 0);
+ const bool result = gtk_tree_view_get_path_at_pos(const_cast<GtkTreeView*>(gobj()), x, y, &pTreePath,
nullptr, nullptr, nullptr);
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 */ );
return result;
@@ -255,7 +255,7 @@ void TreeView::set_column_drag_function(const SlotColumnDrop& slot)
void TreeView::unset_column_drag_function()
{
gtk_tree_view_set_column_drag_function(gobj(),
- 0, 0, 0); /* See GTK+ docs about the 0s. */
+ nullptr, nullptr, nullptr); /* See GTK+ docs about the nullptrs. */
}
void TreeView::scroll_to_cell(const TreeModel::Path& path, TreeViewColumn& column, float row_align, float
col_align)
@@ -270,22 +270,22 @@ void TreeView::scroll_to_cell(const TreeModel::Path& path, TreeViewColumn& colum
void TreeView::scroll_to_row(const TreeModel::Path& path, float row_align)
{
- gtk_tree_view_scroll_to_cell(gobj(), const_cast<GtkTreePath*>(path.gobj()), 0, TRUE, row_align, 0.0);
+ gtk_tree_view_scroll_to_cell(gobj(), const_cast<GtkTreePath*>(path.gobj()), nullptr, TRUE, row_align, 0.0);
}
void TreeView::scroll_to_row(const TreeModel::Path& path)
{
- gtk_tree_view_scroll_to_cell(gobj(), const_cast<GtkTreePath*>(path.gobj()), 0, FALSE, 0.0, 0.0);
+ gtk_tree_view_scroll_to_cell(gobj(), const_cast<GtkTreePath*>(path.gobj()), nullptr, FALSE, 0.0, 0.0);
}
void TreeView::scroll_to_column(TreeViewColumn& column, float col_align)
{
- gtk_tree_view_scroll_to_cell(gobj(), 0, column.gobj(), TRUE, 0.0, col_align);
+ gtk_tree_view_scroll_to_cell(gobj(), nullptr, column.gobj(), TRUE, 0.0, col_align);
}
void TreeView::scroll_to_column(TreeViewColumn& column)
{
- gtk_tree_view_scroll_to_cell(gobj(), 0, column.gobj(), FALSE, 0.0, 0.0);
+ gtk_tree_view_scroll_to_cell(gobj(), nullptr, column.gobj(), FALSE, 0.0, 0.0);
}
void TreeView::remove_all_columns()
@@ -315,7 +315,7 @@ CellRenderer* TreeView::get_column_cell_renderer(int n)
if(pColumn)
return pColumn->get_first_cell();
else
- return 0;
+ return nullptr;
}
@@ -328,7 +328,7 @@ const CellRenderer* TreeView::get_column_cell_renderer(int n) const
void TreeView::reset_expander_column()
{
- gtk_tree_view_set_expander_column(gobj(), 0 /* see C docs */);
+ gtk_tree_view_set_expander_column(gobj(), nullptr /* see C docs */);
}
void TreeView::_auto_store_on_cellrenderer_toggle_edited(const Glib::ustring& path_string,
@@ -366,7 +366,7 @@ void TreeView::_auto_store_on_cellrenderer_toggle_edited_with_model(const Glib::
void TreeView::move_column_to_start(TreeViewColumn& column)
{
- gtk_tree_view_move_column_after(gobj(), (column).gobj(), 0 /* See C docs */);
+ gtk_tree_view_move_column_after(gobj(), (column).gobj(), nullptr /* See C docs */);
}
void TreeView::set_row_separator_func(const SlotRowSeparator& slot)
@@ -404,7 +404,7 @@ bool TreeView::get_visible_range(TreeModel::Path& start_path, TreeModel::Path& e
void TreeView::unset_model()
{
- gtk_tree_view_set_model(gobj(), 0);
+ gtk_tree_view_set_model(gobj(), nullptr);
}
bool
@@ -422,9 +422,9 @@ TreeView::get_tooltip_context_path(int& x, int& y,
gtk_tree_view_get_tooltip_context(gobj(),
&x, &y,
keyboard_tip,
- 0,
+ nullptr,
&cpath,
- 0);
+ nullptr);
path = Glib::wrap(cpath, false /* take_copy=false */);
@@ -442,8 +442,8 @@ TreeView::get_tooltip_context_iter(int& x, int& y,
gtk_tree_view_get_tooltip_context(gobj(),
&x, &y,
keyboard_tip,
- 0,
- 0,
+ nullptr,
+ nullptr,
&src_iter);
iter = TreeIter(gtk_tree_view_get_model(this->gobj()), &src_iter);
@@ -464,18 +464,18 @@ bool TreeView::is_blank_at_pos(int x, int y, TreePath& path, TreeViewColumn*& co
bool TreeView::is_blank_at_pos(int x, int y) const
{
- return gtk_tree_view_is_blank_at_pos(const_cast<GtkTreeView*>(gobj()), x, y, 0, 0, 0, 0);
+ return gtk_tree_view_is_blank_at_pos(const_cast<GtkTreeView*>(gobj()), x, y, nullptr, nullptr, nullptr,
nullptr);
}
void TreeView::unset_drag_dest_row()
{
// The C docs specify that a 0 path means unset.
- gtk_tree_view_set_drag_dest_row(gobj(), 0, GTK_TREE_VIEW_DROP_BEFORE /* Arbitrary. Ignored anyway. */);
+ gtk_tree_view_set_drag_dest_row(gobj(), nullptr, GTK_TREE_VIEW_DROP_BEFORE /* Arbitrary. Ignored anyway.
*/);
}
void TreeView::unset_row_separator_func()
{
- gtk_tree_view_set_row_separator_func(gobj(), 0, 0, 0);
+ gtk_tree_view_set_row_separator_func(gobj(), nullptr, nullptr, nullptr);
}
} // namespace Gtk
diff --git a/gtk/src/treeview.hg b/gtk/src/treeview.hg
index ae481a0..b795e54 100644
--- a/gtk/src/treeview.hg
+++ b/gtk/src/treeview.hg
@@ -733,7 +733,7 @@ _DEPRECATE_IFDEF_END
_WRAP_METHOD(void set_tooltip_row(const Glib::RefPtr<Tooltip>& tooltip, const TreePath& path),
gtk_tree_view_set_tooltip_row)
//Note that we use pointers instead of references because any one of the 3 arguments may be NULL, and we
don't want that many method overloads:
-#m4 _CONVERSION(`const TreeModel::Path*',`GtkTreePath*',`(($3) ? const_cast<GtkTreePath*>(($3)->gobj()) :
0)')
+#m4 _CONVERSION(`const TreeModel::Path*',`GtkTreePath*',`(($3) ? const_cast<GtkTreePath*>(($3)->gobj()) :
nullptr)')
_WRAP_METHOD(void set_tooltip_cell(const Glib::RefPtr<Tooltip>& tooltip, const TreeModel::Path* path,
TreeViewColumn* column, CellRenderer* cell), gtk_tree_view_set_tooltip_cell)
_IGNORE(gtk_tree_view_get_tooltip_context)
diff --git a/gtk/src/treeviewcolumn.ccg b/gtk/src/treeviewcolumn.ccg
index 788be62..d49b5ca 100644
--- a/gtk/src/treeviewcolumn.ccg
+++ b/gtk/src/treeviewcolumn.ccg
@@ -76,7 +76,7 @@ void TreeViewColumn::set_cell_data_func(CellRenderer& cell_renderer, const SlotT
void TreeViewColumn::unset_cell_data_func(CellRenderer& cell_renderer)
{
- gtk_tree_view_column_set_cell_data_func(gobj(), cell_renderer.gobj(), 0, 0, 0);
+ gtk_tree_view_column_set_cell_data_func(gobj(), cell_renderer.gobj(), nullptr, nullptr, nullptr);
}
} // namespace Gtk
diff --git a/gtk/src/treeviewcolumn.hg b/gtk/src/treeviewcolumn.hg
index 6c1fec4..3a70273 100644
--- a/gtk/src/treeviewcolumn.hg
+++ b/gtk/src/treeviewcolumn.hg
@@ -272,8 +272,8 @@ template <class T_ModelColumnType> inline
TreeViewColumn::TreeViewColumn(const Glib::ustring& title,
const TreeModelColumn<T_ModelColumnType>& column)
:
- Glib::ObjectBase(0), // not (yet) a custom class
- Gtk::Object(Glib::ConstructParams(class_init_(), "title", title.c_str(), (char*) 0))
+ Glib::ObjectBase(nullptr), // not (yet) a custom class
+ Gtk::Object(Glib::ConstructParams(class_init_(), "title", title.c_str(), nullptr))
{
pack_start(column, true /* expand */);
}
diff --git a/gtk/src/uimanager.ccg b/gtk/src/uimanager.ccg
index 376c10a..c88400a 100644
--- a/gtk/src/uimanager.ccg
+++ b/gtk/src/uimanager.ccg
@@ -40,7 +40,7 @@ UIManager::ui_merge_id UIManager::add_ui_from_string(const Glib::ustring& buffer
void UIManager::add_ui_separator(ui_merge_id merge_id, const Glib::ustring& path, const Glib::ustring& name,
UIManagerItemType type, bool top)
{
- gtk_ui_manager_add_ui(gobj(), merge_id, path.c_str(), name.c_str(), 0 /* See C docs */,
((GtkUIManagerItemType)(type)), static_cast<int>(top));
+ gtk_ui_manager_add_ui(gobj(), merge_id, path.c_str(), name.c_str(), nullptr /* See C docs */,
((GtkUIManagerItemType)(type)), static_cast<int>(top));
}
} // namespace Gtk
diff --git a/gtk/src/widget.ccg b/gtk/src/widget.ccg
index ff168b9..bac08ce 100644
--- a/gtk/src/widget.ccg
+++ b/gtk/src/widget.ccg
@@ -421,9 +421,9 @@ void Widget::reparent(Widget& new_parent)
//TODO: When 'Widget& new_parent' is changed to 'Container& new_parent',
// remove the next two statements.
auto new_container = dynamic_cast<Container*>(&new_parent);
- g_return_if_fail(new_container != 0); // if new_parent is not a Container
+ g_return_if_fail(new_container != nullptr); // if new_parent is not a Container
auto old_container = get_parent();
- g_return_if_fail(old_container != 0); // if the widget is not in a Container
+ g_return_if_fail(old_container != nullptr); // if the widget is not in a Container
if (old_container != new_container)
{
@@ -437,19 +437,19 @@ void Widget::reparent(Widget& new_parent)
bool Widget::intersect(const Gdk::Rectangle& area) const
{
return gtk_widget_intersect(
- const_cast<GtkWidget*>(gobj()), const_cast<GdkRectangle*>(area.gobj()), 0);
+ const_cast<GtkWidget*>(gobj()), const_cast<GdkRectangle*>(area.gobj()), nullptr);
}
void Widget::unset_name()
{
- gtk_widget_set_name(gobj(), 0);
+ gtk_widget_set_name(gobj(), nullptr);
}
#ifndef GTKMM_DISABLE_DEPRECATED
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
void Widget::unset_composite_name()
{
- gtk_widget_set_composite_name(gobj(), 0);
+ gtk_widget_set_composite_name(gobj(), nullptr);
}
G_GNUC_END_IGNORE_DEPRECATIONS
#endif // GTKMM_DISABLE_DEPRECATED
@@ -506,7 +506,7 @@ int Widget::get_height() const
void Widget::drag_dest_set(DestDefaults flags, Gdk::DragAction actions)
{
- gtk_drag_dest_set(gobj(), (GtkDestDefaults)flags, 0, 0, (GdkDragAction)actions);
+ gtk_drag_dest_set(gobj(), (GtkDestDefaults)flags, nullptr, 0, (GdkDragAction)actions);
}
void Widget::drag_dest_set(const std::vector<TargetEntry>& targets,
@@ -694,7 +694,7 @@ void Widget_Class::dispose_vfunc_callback(GObject* self)
Glib::ustring Widget::drag_dest_find_target(const Glib::RefPtr<Gdk::DragContext>& context) const
{
- return Gdk::AtomString::to_cpp_type(gtk_drag_dest_find_target(const_cast<GtkWidget*>(gobj()),
Glib::unwrap(context), 0 /* See GTK+ docs */));
+ return Gdk::AtomString::to_cpp_type(gtk_drag_dest_find_target(const_cast<GtkWidget*>(gobj()),
Glib::unwrap(context), nullptr /* See GTK+ docs */));
}
#ifndef GTKMM_DISABLE_DEPRECATED
@@ -721,27 +721,27 @@ _DEPRECATE_IFDEF_START
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
void Widget::unset_color(StateFlags state)
{
- gtk_widget_override_color(gobj(), ((GtkStateFlags)(state)), 0);
+ gtk_widget_override_color(gobj(), ((GtkStateFlags)(state)), nullptr);
}
void Widget::unset_background_color(StateFlags state)
{
- gtk_widget_override_background_color(gobj(), ((GtkStateFlags)(state)), 0);
+ gtk_widget_override_background_color(gobj(), ((GtkStateFlags)(state)), nullptr);
}
void Widget::unset_font()
{
- gtk_widget_override_font(gobj(), 0);
+ gtk_widget_override_font(gobj(), nullptr);
}
void Widget::unset_symbolic_color(const Glib::ustring& name)
{
- gtk_widget_override_symbolic_color(gobj(), name.c_str(), 0);
+ gtk_widget_override_symbolic_color(gobj(), name.c_str(), nullptr);
}
void Widget::unset_cursor()
{
- gtk_widget_override_cursor(gobj(), 0, 0);
+ gtk_widget_override_cursor(gobj(), nullptr, nullptr);
}
G_GNUC_END_IGNORE_DEPRECATIONS
_DEPRECATE_IFDEF_END
@@ -753,7 +753,7 @@ void Widget::transform_cairo_context_to_window(const Cairo::RefPtr<Cairo::Contex
void Widget::remove_action_group(const Glib::ustring& name)
{
- gtk_widget_insert_action_group(gobj(), name.c_str(), 0 /* see C docs */);
+ gtk_widget_insert_action_group(gobj(), name.c_str(), nullptr /* see C docs */);
}
} // namespace Gtk
diff --git a/gtk/src/window.ccg b/gtk/src/window.ccg
index cb83dfd..483bf53 100644
--- a/gtk/src/window.ccg
+++ b/gtk/src/window.ccg
@@ -180,27 +180,27 @@ void Window_Class::dispose_vfunc_callback(GObject* self)
void Window::unset_focus()
{
- gtk_window_set_focus(gobj(), 0 /* See GTK+ docs */);
+ gtk_window_set_focus(gobj(), nullptr /* See GTK+ docs */);
}
void Window::unset_default()
{
- gtk_window_set_default(gobj(), 0 /* See GTK+ docs */);
+ gtk_window_set_default(gobj(), nullptr /* See GTK+ docs */);
}
void Window::unset_transient_for()
{
- gtk_window_set_transient_for(gobj(), 0 /* See GTK+ docs */);
+ gtk_window_set_transient_for(gobj(), nullptr /* See GTK+ docs */);
}
void Window::unset_attached_to()
{
- gtk_window_set_attached_to(gobj(), 0 /* See GTK+ docs */);
+ gtk_window_set_attached_to(gobj(), nullptr /* See GTK+ docs */);
}
void Window::unset_application()
{
- gtk_window_set_application(gobj(), 0 /* See GTK+ docs */);
+ gtk_window_set_application(gobj(), nullptr /* See GTK+ docs */);
}
#ifndef GTKMM_DISABLE_DEPRECATED
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]