[gtkmm] Gtk::MenuShell: Initialize a data member in the class declaration
- From: Kjell Ahlstedt <kjellahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm] Gtk::MenuShell: Initialize a data member in the class declaration
- Date: Wed, 27 Nov 2019 16:01:41 +0000 (UTC)
commit 64841054c67279b59fc848f3cd61362a59665768
Author: Kjell Ahlstedt <kjellahlstedt gmail com>
Date: Wed Nov 27 17:00:16 2019 +0100
Gtk::MenuShell: Initialize a data member in the class declaration
MenuShell::accel_window_ is initialized in the class declaration instead
of in every constructor. More constructors can be generated by gmmproc.
gtk/src/menushell.ccg | 18 +-----------------
gtk/src/menushell.hg | 3 +--
2 files changed, 2 insertions(+), 19 deletions(-)
---
diff --git a/gtk/src/menushell.ccg b/gtk/src/menushell.ccg
index 7b693529..e53c5306 100644
--- a/gtk/src/menushell.ccg
+++ b/gtk/src/menushell.ccg
@@ -21,25 +21,9 @@
namespace Gtk
{
-// All ctors are manually implemented just to initialize accel_window_.
-
MenuShell::MenuShell()
:
- _CONSTRUCT_SPECIFIC(Gtk::Container, MenuShell),
- accel_window_ (nullptr)
-{}
-
-MenuShell::MenuShell(const Glib::ConstructParams& construct_params)
-:
- Glib::ObjectBase(nullptr),
- Gtk::Container (construct_params),
- accel_window_ (nullptr)
-{}
-
-MenuShell::MenuShell(GtkMenuShell* castitem)
-:
- Gtk::Container((GtkContainer*) castitem),
- accel_window_ (nullptr)
+ _CONSTRUCT_SPECIFIC(Gtk::Container, MenuShell)
{}
// Why do we need a custom dtor?
diff --git a/gtk/src/menushell.hg b/gtk/src/menushell.hg
index e15b0bec..e639cf89 100644
--- a/gtk/src/menushell.hg
+++ b/gtk/src/menushell.hg
@@ -125,7 +125,6 @@ public:
protected:
MenuShell();
- _CUSTOM_CTOR_CAST()
private:
@@ -138,7 +137,7 @@ dnl // Override GtkMenuItem::insert, in order to accelerate all menu items autom
_POP()
#m4end
- Gtk::Window* accel_window_;
+ Gtk::Window* accel_window_ = nullptr;
};
} // namespace Gtk
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]