[gtksourceviewmm/devel] Fix API/ABI break in signals.



commit eea6d1b1d1b270a8af8024a66c3f5ffbb0ee385c
Author: Krzesimir Nowak <qdlacz gmail com>
Date:   Sun Jan 10 19:55:57 2010 +0100

    Fix API/ABI break in signals.
    
    * gtksourceview/src/sourcebuffer.hg: Revert to use SourceMark in
    source-mark-updated signal. Written proper conversion.
    * gtksourceview/src/sourceview.hg: Added no_default_handler to
    line-mark-activated signal.

 gtksourceview/src/sourcebuffer.hg |    9 ++++++---
 gtksourceview/src/sourceview.hg   |    4 ++--
 2 files changed, 8 insertions(+), 5 deletions(-)
---
diff --git a/gtksourceview/src/sourcebuffer.hg b/gtksourceview/src/sourcebuffer.hg
index e569acd..90e74cd 100644
--- a/gtksourceview/src/sourcebuffer.hg
+++ b/gtksourceview/src/sourcebuffer.hg
@@ -323,14 +323,17 @@ public:
   /// parameter end: and iterator at the end of the updated region.
   _WRAP_SIGNAL(void highlight_updated(Gtk::TextIter& start, Gtk::TextIter& end), "highlight-updated", no_default_handler)
 
-#m4 _CONVERSION(`GtkTextMark*',`const Glib::RefPtr<Gtk::TextMark>&',`Glib::wrap($3, true)')
-
+// TODO: Use lower _CONVERSION/_WRAP_SIGNAL when we break API/ABI and remove upper ones.
+#m4 _CONVERSION(`GtkTextMark*',`const Glib::RefPtr<SourceMark>&',`Glib::RefPtr<SourceMark>::cast_dynamic(Glib::wrap($3, true))')
+//#m4 _CONVERSION(`GtkTextMark*',`const Glib::RefPtr<Gtk::TextMark>&',`Glib::wrap($3, true)')
   /// \brief Emitted whenever a marker of sourcebuffer has changed and needs to be redisplayed by the view.
   ///
   /// A change in a marker's type or location can trigger this signal.
   /// Note that moving a marker causes the emission of this signal twice: one for the old location and one for the new.
   /// parameter where:  an iterator at the location where the change occurred.
-  _WRAP_SIGNAL(void source_mark_updated(const Glib::RefPtr<Gtk::TextMark>& where), "source-mark-updated", no_default_handler)
+// TODO: remove no_default_handler when we break API/ABI.
+  _WRAP_SIGNAL(void source_mark_updated(const Glib::RefPtr<SourceMark>& where), "source-mark-updated", no_default_handler)
+//  _WRAP_SIGNAL(void source_mark_updated(const Glib::RefPtr<Gtk::TextMark>& where), "source-mark-updated", no_default_handler)
   /// @}
 };
 
diff --git a/gtksourceview/src/sourceview.hg b/gtksourceview/src/sourceview.hg
index 4e57186..2e2760c 100644
--- a/gtksourceview/src/sourceview.hg
+++ b/gtksourceview/src/sourceview.hg
@@ -278,9 +278,9 @@ public:
 
   _WRAP_SIGNAL(void redo(), "redo")
   _WRAP_SIGNAL(void undo(), "undo")
+// TODO: remove no_default_handler when we will break API/ABI.
   _WRAP_SIGNAL(void show_completion(), "show-completion", no_default_handler)
-//#m4 _CONVERSION(`GtkTextIter*',`const Gtk::TextIter&',`Glib::wrap($3)')
-  _WRAP_SIGNAL(void line_mark_activated(Gtk::TextIter& mark, GdkEvent* event), "line-mark-activated")
+  _WRAP_SIGNAL(void line_mark_activated(Gtk::TextIter& mark, GdkEvent* event), "line-mark-activated", no_default_handler)
 
 
   /// \brief Whether to display line numbers



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