[gtkmm] Gtk::Window: Make raise() non-virtual
- From: Kjell Ahlstedt <kjellahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm] Gtk::Window: Make raise() non-virtual
- Date: Mon, 14 Nov 2016 09:46:52 +0000 (UTC)
commit 7da8a91ae79e67b4cd54ebd0ca76cffca6940d6c
Author: Kjell Ahlstedt <kjell ahlstedt bredband net>
Date: Mon Nov 14 10:42:54 2016 +0100
Gtk::Window: Make raise() non-virtual
and make some comments in menushell.ccg and window.ccg clearer.
gtk/src/menushell.ccg | 5 ++++-
gtk/src/window.ccg | 2 +-
gtk/src/window.hg | 3 +--
3 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/gtk/src/menushell.ccg b/gtk/src/menushell.ccg
index c236782..be5775b 100644
--- a/gtk/src/menushell.ccg
+++ b/gtk/src/menushell.ccg
@@ -42,7 +42,10 @@ MenuShell::MenuShell(GtkMenuShell* castitem)
accel_window_ (nullptr)
{}
-// TODO: Why do we need a custom dtor?
+// Why do we need a custom dtor?
+// We don't actually need it, but a gmmproc-generated destructor calls destroy_().
+// That's unnecessary here. GtkMenuShell is an abstract base class. When ~MenuShell()
+// is executed, destroy_() has already been called by the destructor of a subclass.
MenuShell::~MenuShell() noexcept
{}
diff --git a/gtk/src/window.ccg b/gtk/src/window.ccg
index 7a71720..20da4aa 100644
--- a/gtk/src/window.ccg
+++ b/gtk/src/window.ccg
@@ -55,7 +55,7 @@ void Window::destroy_()
{
//Called from destructors.
//overridden so that the correct _release_c_instance() ends up being called by the destructor.
- //destroy_() is virtual, but _release_c_instance() is not.
+ //The destructors that call destroy_() are virtual, but _release_c_instance() is not.
//GTKMM_LIFECYCLE
diff --git a/gtk/src/window.hg b/gtk/src/window.hg
index 3665e76..611f40d 100644
--- a/gtk/src/window.hg
+++ b/gtk/src/window.hg
@@ -350,11 +350,10 @@ dnl
*/
Glib::RefPtr<AccelGroup> get_accel_group();
- //TODO: Remove the virtual from this when we can break ABI.
/** Brings the window to the front.
* This is just a more obvious convenience wrapper for get_window()->raise().
*/
- virtual void raise();
+ void raise();
///Overriden to warn that it doesn't make sense to use Gtk::manage() on this class because it has no
parent container.
void set_manage() override;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]