[gtkmm] Gtk::Application::custom_class_init(): Update a comment
- From: Kjell Ahlstedt <kjellahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm] Gtk::Application::custom_class_init(): Update a comment
- Date: Wed, 27 Sep 2017 14:19:21 +0000 (UTC)
commit 0b8cd52f2c493dcda98258d970778f2d55ea21c5
Author: Kjell Ahlstedt <kjellahlstedt gmail com>
Date: Wed Sep 27 16:17:21 2017 +0200
Gtk::Application::custom_class_init(): Update a comment
The private custom_class_init() method is still needed, but the
reason is no longer that the deprecated g_type_init() must be called.
gtk/src/application.ccg | 6 ++++--
gtk/src/application.hg | 6 ++----
2 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/gtk/src/application.ccg b/gtk/src/application.ccg
index d2ef1fe..8aa5ad6 100644
--- a/gtk/src/application.ccg
+++ b/gtk/src/application.ccg
@@ -91,9 +91,11 @@ const Glib::Class& Application::custom_class_init()
Application::Application(const Glib::ustring& application_id, Gio::Application::Flags flags)
:
// Mark this class as non-derived to allow C++ vfuncs to be skipped.
- //Note that GApplication complains about "" but allows nullptr, so we avoid passing "".
+ // 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))
+ Gio::Application(Glib::ConstructParams(custom_class_init(),
+ "application_id", Glib::c_str_or_nullptr(application_id),
+ "flags", static_cast<GApplicationFlags>(flags), nullptr))
{
// gtk_init() is called by the 'startup' default signal handler when g_application_run() is called.
// It's also called here, to make it possible for users of gtkmm to create
diff --git a/gtk/src/application.hg b/gtk/src/application.hg
index 8d2d8c2..b275051 100644
--- a/gtk/src/application.hg
+++ b/gtk/src/application.hg
@@ -307,10 +307,8 @@ public:
_WRAP_SIGNAL(void window_removed(Window* window), "window-removed")
private:
- /** This is just a way to call Glib::init() (which calls g_type_init()) before
- * calling application_class_.init(), so that
- * gtk_application_get_type() will always succeed.
- * See https://bugzilla.gnome.org/show_bug.cgi?id=639925
+ /** This is just a way to call Glib::init() before calling a Glib::Object ctor,
+ * so that glibmm's GQuarks are created before they are used.
*/
const Glib::Class& custom_class_init();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]