[gtkmm] Main: Deprecate signal_key_snooper().
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm] Main: Deprecate signal_key_snooper().
- Date: Fri, 3 Feb 2012 08:22:09 +0000 (UTC)
commit ec7c4892882476f2622574788d570c9930eab08e
Author: Murray Cumming <murrayc murrayc com>
Date: Tue Jan 10 11:59:00 2012 +0100
Main: Deprecate signal_key_snooper().
* gtk/src/main.[hg|ccg]: Deprecate signal_key_snooper(),
because gtk_key_snooper_install() was deprecated.
Also #define GDK_DISABLE_DEPRECATION_WARNINGS here to fix
the build with --enable-warnings=fatal.
ChangeLog | 9 +++++++++
gtk/src/main.ccg | 6 ++++++
gtk/src/main.hg | 16 +++++++++++++++-
3 files changed, 30 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 2f8f6fa..b730149 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2012-01-10 Murray Cumming <murrayc murrayc com>
+
+ Main: Deprecate signal_key_snooper().
+
+ * gtk/src/main.[hg|ccg]: Deprecate signal_key_snooper(),
+ because gtk_key_snooper_install() was deprecated.
+ Also #define GDK_DISABLE_DEPRECATION_WARNINGS here to fix
+ the build with --enable-warnings=fatal.
+
2012-02-01 Josà Alburquerque <jaalburquerque gmail com>
Entry: Deprecate [set|get]_inner_border().
diff --git a/gtk/src/main.ccg b/gtk/src/main.ccg
index 6d83b32..16c7876 100644
--- a/gtk/src/main.ccg
+++ b/gtk/src/main.ccg
@@ -206,6 +206,8 @@ void GtkMainConnectionNode::list_notify_all()
namespace Gtk
{
+_DEPRECATE_IFDEF_START
+
/**** Gtk::KeySnooperSig ***************************************************/
sigc::connection KeySnooperSig::connect(const KeySnooperSig::SlotType& slot)
@@ -237,10 +239,14 @@ gint KeySnooperSig::gtk_callback(GtkWidget* widget, GdkEventKey* event, gpointer
return 0;
}
+_DEPRECATE_IFDEF_END
/**** Gtk::Main -- static data *********************************************/
+_DEPRECATE_IFDEF_START
KeySnooperSig Main::signal_key_snooper_;
+_DEPRECATE_IFDEF_END
+
Main* Main::instance_ = 0;
diff --git a/gtk/src/main.hg b/gtk/src/main.hg
index 48bdcac..63da89b 100644
--- a/gtk/src/main.hg
+++ b/gtk/src/main.hg
@@ -28,6 +28,12 @@
_DEFS(gtkmm,gtk)
+#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
+#undef GTK_DISABLE_DEPRECATED
+#define GDK_DISABLE_DEPRECATION_WARNINGS 1
+#m4 _POP()
+
+
namespace Gtk
{
@@ -39,6 +45,7 @@ class Window;
#ifndef DOXYGEN_SHOULD_SKIP_THIS
//Actually, I'd like to just keep these out of the alphabetical list. murrayc.
+_DEPRECATE_IFDEF_START
/// KeySnooper Signal Class (internal)
class KeySnooperSig
{
@@ -50,6 +57,7 @@ public:
protected:
static int gtk_callback(GtkWidget* widget, GdkEventKey* event, gpointer data);
};
+_DEPRECATE_IFDEF_END
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
@@ -208,6 +216,7 @@ public:
*/
static bool events_pending();
+_DEPRECATE_IFDEF_START
/** KeySnooper signal
* Allows you to channel keypresses to a signal handler
* without registering with the widget.
@@ -217,8 +226,11 @@ public:
* It is the responsibility of the snooper to pass the keypress
* to the widget, however, care must be taken that the keypress is
* not passed twice.
+ *
+ * @deprecated Key snooping should not be done. Events should be handled by widgets.
*/
static KeySnooperSig& signal_key_snooper();
+_DEPRECATE_IFDEF_END
// Initialize table of wrap_new functions.
// Doesn't need an instance of Gtk::Main.
@@ -239,8 +251,10 @@ protected:
// Signal handlers:
virtual void on_window_hide();
+_DEPRECATE_IFDEF_START
// Signal proxies:
- static KeySnooperSig signal_key_snooper_;
+ static KeySnooperSig signal_key_snooper_;
+_DEPRECATE_IFDEF_END
private:
static Main* instance_;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]