[gtkmm/gtkmm-3-22] GtkMainConnectionNode: Remove unused method
- From: Kjell Ahlstedt <kjellahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm/gtkmm-3-22] GtkMainConnectionNode: Remove unused method
- Date: Mon, 31 Oct 2016 15:21:49 +0000 (UTC)
commit a5eeb4600754d63966e32b9dde4f273989d38f47
Author: Kjell Ahlstedt <kjell ahlstedt bredband net>
Date: Mon Oct 31 16:15:37 2016 +0100
GtkMainConnectionNode: Remove unused method
* gtk/src/main.ccg: destroy_notify_handler() in the local GtkMainConnectionNode
class is not used. gcc 6.2 reports that as an error when building
with --enable-warnings=fatal. Remove the unused method.
gtk/src/main.ccg | 30 +++++-------------------------
1 files changed, 5 insertions(+), 25 deletions(-)
---
diff --git a/gtk/src/main.ccg b/gtk/src/main.ccg
index 5b266a5..d124642 100644
--- a/gtk/src/main.ccg
+++ b/gtk/src/main.ccg
@@ -38,6 +38,11 @@ namespace
* the gtk_*_remove() functions have the same signature, all main signals can
* be handled by a single class. Special handling is needed for signals that
* don't support destroy notification; see the comment on connection_list_.
+ *
+ * This class is now used only by the deprecated key snooper API. The class
+ * contains some code and data which is now unnecessary, after other code has
+ * been removed. Both the key snooper API and the GtkMainConnectionNode class
+ * can be removed in gtk+-4/gtkmm-4.
*/
class GtkMainConnectionNode
{
@@ -48,7 +53,6 @@ public:
explicit GtkMainConnectionNode(const sigc::slot_base& slot);
static void* notify(void* data);
- static void destroy_notify_handler(void* data);
// Call this after installing the GTK+ callback.
void install(guint conn_id, RemoveFunc remove_func, bool has_destroy_notify);
@@ -120,30 +124,6 @@ void* GtkMainConnectionNode::notify(void* data)
return nullptr;
}
-// static
-void GtkMainConnectionNode::destroy_notify_handler(void* data)
-{
- // notification from the gtk+ side ...
-
- const auto self = static_cast<GtkMainConnectionNode*>(data);
-
- // this call might be triggered from notify().
- if(!self->destroyed_)
- {
- self->destroyed_ = true;
-
- // The GTK+ side is disconnected now, thus the ID is no longer valid.
- self->conn_id_ = 0;
-
- // remove self from global list.
- if (!self->has_destroy_notify_)
- list_remove(self);
-
- // destruction of slot_ notifies all objects referring to it.
- delete self;
- }
-}
-
void GtkMainConnectionNode::install(
guint conn_id, GtkMainConnectionNode::RemoveFunc remove_func, bool has_destroy_notify)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]