[gtksourceviewmm] Make constructors protected and add public create() methods.



commit b062e51d5dc848b2eb421d2076e1a254c2ba6f58
Author: Murray Cumming <murrayc murrayc com>
Date:   Wed Aug 3 12:02:48 2016 +0200

    Make constructors protected and add public create() methods.
    
    Because these new classes should be used via RefPtr.

 gtksourceview/src/searchcontext.hg  |    6 +++++-
 gtksourceview/src/searchsettings.hg |    6 +++++-
 2 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/gtksourceview/src/searchcontext.hg b/gtksourceview/src/searchcontext.hg
index 7f2fa7f..32a81bd 100644
--- a/gtksourceview/src/searchcontext.hg
+++ b/gtksourceview/src/searchcontext.hg
@@ -39,7 +39,7 @@ class SearchContext : public Glib::Object
 {
   _CLASS_GOBJECT(SearchContext, GtkSourceSearchContext, GTK_SOURCE_SEARCH_CONTEXT, Glib::Object, GObject)
 
-public:
+protected:
 
   /** Creates a new search context, associated with buffer , and customized with settings . If settings is 
NULL, a new GtkSourceSearchSettings object will be
    * created, that you can retrieve with gtk_source_search_context_get_settings().
@@ -51,6 +51,10 @@ public:
    */
   _WRAP_CTOR(SearchContext(const Glib::RefPtr<Buffer>& buffer, const Glib::RefPtr<SearchSettings>& 
settings), gtk_source_search_context_new)
 
+public:
+
+  _WRAP_CREATE(const Glib::RefPtr<Buffer>& buffer, const Glib::RefPtr<SearchSettings>& settings)
+ 
   /**
    * @return the associated buffer.
    *
diff --git a/gtksourceview/src/searchsettings.hg b/gtksourceview/src/searchsettings.hg
index 7c33d04..eb2e93a 100644
--- a/gtksourceview/src/searchsettings.hg
+++ b/gtksourceview/src/searchsettings.hg
@@ -31,9 +31,13 @@ namespace Gsv
 class SearchSettings : public Glib::Object
 {
   _CLASS_GOBJECT(SearchSettings, GtkSourceSearchSettings, GTK_SOURCE_SEARCH_SETTINGS, Glib::Object, GObject)
-public:
+
+protected:
   _CTOR_DEFAULT()
 
+public:
+  _WRAP_CREATE()
+
   /** Sets the text to search. If text is NULL or is empty, the search will be disabled. A copy of text will 
be made, so
    * you can safely free text after a call to this function.
    *


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