[gtkmm/gtkmm-2-24: 4/7] inkButton: Deprecates set_uri_hook() and unset_uri_hook().



commit 3bdf3914647ceba40c7af29d4735a2a2bfd746c9
Author: Murray Cumming <murrayc murrayc com>
Date:   Thu Nov 25 12:38:20 2010 +0100

    inkButton: Deprecates set_uri_hook() and unset_uri_hook().
    
    * gtk/src/linkbutton.[hg|ccg]: Also use #undef to fix the build.

 ChangeLog              |    6 ++++++
 gtk/src/linkbutton.ccg |    6 ++++--
 gtk/src/linkbutton.hg  |   14 ++++++++++++--
 3 files changed, 22 insertions(+), 4 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 75897f9..5cc5fe4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2010-11-25  Murray Cumming  <murrayc murrayc com>
+
+	LinkButton: Deprecates set_uri_hook() and unset_uri_hook().
+
+	* gtk/src/linkbutton.[hg|ccg]: Also use #undef to fix the build.
+
 2010-11-25  Murray Cumming  <murrayc murrayc com>>
 
 	ComboBox: Add constructors with a bool has_entry property, and add methods.
diff --git a/gtk/src/linkbutton.ccg b/gtk/src/linkbutton.ccg
index 1f0944c..dfd534c 100644
--- a/gtk/src/linkbutton.ccg
+++ b/gtk/src/linkbutton.ccg
@@ -22,7 +22,7 @@
 
 #include <gtk/gtk.h>
 
-
+_DEPRECATE_IFDEF_START
 static void SignalProxy_UriHook_gtk_callback(GtkLinkButton *button, const gchar *link, gpointer user_data)
 {
   Gtk::LinkButton::SlotUri* the_slot = static_cast<Gtk::LinkButton::SlotUri*>(user_data);
@@ -42,11 +42,13 @@ static void SignalProxy_UriHook_gtk_callback_destroy(void* data)
 {
   delete static_cast<Gtk::LinkButton::SlotUri*>(data);
 }
+_DEPRECATE_IFDEF_END
 
 
 namespace Gtk
 {
 
+_DEPRECATE_IFDEF_START
 LinkButton::LinkButton(const Glib::ustring& uri)
 :
   _CONSTRUCT("uri", uri.c_str(), "label", uri.c_str()) //Note that the uri is used for the label too, as in the C _new() function.
@@ -65,7 +67,7 @@ void LinkButton::unset_uri_hook()
 {
   gtk_link_button_set_uri_hook (0, 0, 0);
 }
-
+_DEPRECATE_IFDEF_END
 
 } // namespace Gtk
 
diff --git a/gtk/src/linkbutton.hg b/gtk/src/linkbutton.hg
index 8f012ab..ee685ee 100644
--- a/gtk/src/linkbutton.hg
+++ b/gtk/src/linkbutton.hg
@@ -23,6 +23,9 @@
 _DEFS(gtkmm,gtk)
 _PINCLUDE(gtkmm/private/button_p.h)
 
+#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
+#undef GTK_DISABLE_DEPRECATED
+#m4 _POP()
 
 namespace Gtk
 {
@@ -58,10 +61,13 @@ public:
   _WRAP_METHOD(bool get_visited() const, gtk_link_button_get_visited)
   _WRAP_METHOD(void set_visited(bool visited = true), gtk_link_button_set_visited)
 
+_DEPRECATE_IFDEF_START
   /** For instance,
    * void on_linkbutton_uri(Gtk::LinkButton *button, const Glib::ustring& uri);
    *
    * @see set_uri_hook().
+   *
+   * @deprecated Use Button::signal_clicked() instead.
    */
   typedef sigc::slot<void, Gtk::LinkButton*, const Glib::ustring&> SlotUri;
 
@@ -70,16 +76,20 @@ public:
    *
    * @param slot A function called each time a LinkButton is clicked.
    * @newin{2,12}
+   *
+   * @deprecated Use Button::signal_clicked()  instead.
    */
   static void set_uri_hook(const SlotUri& slot);
   _IGNORE(gtk_link_button_set_uri_hook)
 
   /** Unsets any previously set slot as the function that should be invoked every time a user clicks a LinkButton. 
    * @see set_uri_hook().
-   * @newin{2,12}
+   * @newin{2,
+   *
+   * @deprecated Use  Button::signal_clicked() instead.
    */
   static void unset_uri_hook();
-
+_DEPRECATE_IFDEF_END
 
   _WRAP_PROPERTY("uri", Glib::ustring)
   _WRAP_PROPERTY("visited", bool)                                          



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]