gtksourceviewmm r66 - in trunk: . gtksourceview/src tools/m4
- From: murrayc svn gnome org
- To: svn-commits-list gnome org
- Subject: gtksourceviewmm r66 - in trunk: . gtksourceview/src tools/m4
- Date: Fri, 25 Apr 2008 10:29:18 +0100 (BST)
Author: murrayc
Date: Fri Apr 25 09:29:17 2008
New Revision: 66
URL: http://svn.gnome.org/viewvc/gtksourceviewmm?rev=66&view=rev
Log:
Increased version
Modified:
trunk/ChangeLog
trunk/NEWS
trunk/configure.ac
trunk/gtksourceview/src/gtksourceview_signals.defs
trunk/gtksourceview/src/sourcebuffer.hg
trunk/gtksourceview/src/sourcemark.ccg
trunk/gtksourceview/src/sourcemark.hg
trunk/gtksourceview/src/sourcestyle.hg
trunk/gtksourceview/src/sourcestyleschememanager.ccg
trunk/gtksourceview/src/sourcestyleschememanager.hg
trunk/gtksourceview/src/sourceview.hg
trunk/tools/m4/convert_gtksourceviewmm.m4
Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS (original)
+++ trunk/NEWS Fri Apr 25 09:29:17 2008
@@ -1,3 +1,12 @@
+1.9.5:
+
+* SourceBuffer: Added the source_mark_updated signal.
+* SourceMark: Constructor: Added the optional name parameter.
+* SourceStyle: Added the copy() method.
+* SourceStyleSchemeManager: Added set_search_path(), reset_search_path,
+ get_search_path(), and get_scheme_ids() methods.
+* SourceView: Added properties.
+
1.9.4:
* SourceBuffer: Added *_source_mark() methods.
Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Fri Apr 25 09:29:17 2008
@@ -15,7 +15,7 @@
#We use pushdef here because we can't use shell variables before AC_INIT, but we want to use a variable with AC_INIT:
pushdef([GTKSOURCEVIEWMM_MAJOR_VERSION], [1])
pushdef([GTKSOURCEVIEWMM_MINOR_VERSION], [9])
-pushdef([GTKSOURCEVIEWMM_MICRO_VERSION], [4])
+pushdef([GTKSOURCEVIEWMM_MICRO_VERSION], [5])
pushdef([GTKSOURCEVIEWMM_EXTRA_VERSION], [])
pushdef([GTKSOURCEVIEWMM_VERSION], GTKSOURCEVIEWMM_MAJOR_VERSION.GTKSOURCEVIEWMM_MINOR_VERSION.GTKSOURCEVIEWMM_MICRO_VERSION[]GTKSOURCEVIEWMM_EXTRA_VERSION)
AC_INIT([libgtksourceviewmm], GTKSOURCEVIEWMM_VERSION, [Rob Page <page rob gmail com>, Dodji Seketeli <dodji gnome org>])
@@ -52,7 +52,7 @@
# ? :+1 : ? == just some internal changes, nothing breaks but might work
# better
# CURRENT : REVISION : AGE
-LIBGTKSOURCEVIEWMM_SO_VERSION=1:0:0
+LIBGTKSOURCEVIEWMM_SO_VERSION=2:0:0
AC_SUBST(LIBGTKSOURCEVIEWMM_SO_VERSION)
AC_CONFIG_AUX_DIR(scripts)
@@ -126,7 +126,7 @@
gtksourceviewmm_min_gtkmm_version=2.4
#gtksourceviewmm_min_gtksourceview_version=2.0
-PKG_CHECK_MODULES(GTKSOURCEVIEWMM, gtkmm-2.4 >= ${gtksourceviewmm_min_gtkmm_version} gtksourceview-2.0 >= 2.1.0)
+PKG_CHECK_MODULES(GTKSOURCEVIEWMM, gtkmm-2.4 >= ${gtksourceviewmm_min_gtkmm_version} gtksourceview-2.0 >= 2.2.0)
AC_SUBST(GTKSOURCEVIEWMM_CFLAGS)
AC_SUBST(GTKSOURCEVIEWMM_LIBS)
Modified: trunk/gtksourceview/src/gtksourceview_signals.defs
==============================================================================
--- trunk/gtksourceview/src/gtksourceview_signals.defs (original)
+++ trunk/gtksourceview/src/gtksourceview_signals.defs Fri Apr 25 09:29:17 2008
@@ -15,7 +15,7 @@
(return-type "void")
(when "last")
(parameters
- '("GtkTextMark*" "p0")
+ '("GtkSourceMark*" "p0")
)
)
@@ -138,28 +138,28 @@
;; From GtkSourceLanguage
-(define-property section
+(define-property id
(of-object "GtkSourceLanguage")
(prop-type "GParamString")
- (docs "Language section")
+ (docs "Language id")
(readable #t)
(writable #f)
(construct-only #f)
)
-(define-property id
+(define-property name
(of-object "GtkSourceLanguage")
(prop-type "GParamString")
- (docs "Language id")
+ (docs "Language name")
(readable #t)
(writable #f)
(construct-only #f)
)
-(define-property name
+(define-property section
(of-object "GtkSourceLanguage")
(prop-type "GParamString")
- (docs "Language name")
+ (docs "Language section")
(readable #t)
(writable #f)
(construct-only #f)
@@ -362,19 +362,19 @@
(construct-only #t)
)
-(define-property description
+(define-property name
(of-object "GtkSourceStyleScheme")
(prop-type "GParamString")
- (docs "Style scheme description")
+ (docs "Style scheme name")
(readable #t)
(writable #f)
(construct-only #f)
)
-(define-property name
+(define-property description
(of-object "GtkSourceStyleScheme")
(prop-type "GParamString")
- (docs "Style scheme name")
+ (docs "Style scheme description")
(readable #t)
(writable #f)
(construct-only #f)
Modified: trunk/gtksourceview/src/sourcebuffer.hg
==============================================================================
--- trunk/gtksourceview/src/sourcebuffer.hg (original)
+++ trunk/gtksourceview/src/sourcebuffer.hg Fri Apr 25 09:29:17 2008
@@ -144,21 +144,6 @@
/// \param language a GtkSourceLanguage to set.
_WRAP_METHOD(void set_language(const Glib::RefPtr<SourceLanguage>& language), gtk_source_buffer_set_language)
- /// \brief Determines the escaping character used by the source buffer highlighting engine.
- ///
- ///\return the UTF-8 character for the escape character the buffer is using.
- _WRAP_METHOD(gunichar get_escape_char() const, gtk_source_buffer_get_escape_char)
-
- /// \brief Sets the escape character to be used by the highlighting engine.
- ///
- /// When performing the initial analysis,
- /// the engine will discard a matching syntax pattern if it's prefixed
- /// with an odd number of escape characters.
- /// This allows for example to correctly highlight strings with escaped quotes embedded.
- /// This setting affects only syntax patterns (i.e. those defined in GtkSyntaxTag tags).
- /// \param escape_char the escape character the buffer should use.
- _WRAP_METHOD(void set_escape_char(gunichar escape_char), gtk_source_buffer_set_escape_char)
-
/// \brief Determines whether a source buffer can undo the last action
/// \return true if it's possible to undo the last action, false otherwise.
_WRAP_METHOD(bool can_undo() const, gtk_source_buffer_can_undo)
@@ -228,16 +213,6 @@
/// \name signals
/// @{
- /// \brief Emitted whenever there is a change in the buffer's ability to redo an operation.
- ///
- /// parameter can_redo: true if the buffer can now perform a redo, false otherwise.
- _WRAP_SIGNAL(void can_redo(bool can_redo), "can-redo")
-
- /// \brief Emitted whenever there is a change in the buffer's ability to undo an operation.
- ///
- /// parameter can_undo: true if the buffer can now perfom an undo, false otherwise.
- _WRAP_SIGNAL(void can_undo(bool can_redo), "can-undo")
-
/// \brief Emitted whenever the syntax highlighting information has been updated,
/// so that views can request a redraw if the region changed is visible.
///
@@ -246,12 +221,14 @@
/// 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(`GtkSourceMark*',`const Glib::RefPtr<SourceMark>&',`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 marker_updated(Gtk::TextIter &where), "marker-updated", no_default_handler)
+ _WRAP_SIGNAL(void source_mark_updated(const Glib::RefPtr<SourceMark>& where), "source-mark-updated", no_default_handler)
/// @}
};
Modified: trunk/gtksourceview/src/sourcemark.ccg
==============================================================================
--- trunk/gtksourceview/src/sourcemark.ccg (original)
+++ trunk/gtksourceview/src/sourcemark.ccg Fri Apr 25 09:29:17 2008
@@ -22,6 +22,13 @@
namespace gtksourceview
{
+//This is custom implemented because the C _new() function specifies an extra left-gravity property:
+SourceMark::SourceMark(const Glib::ustring& category, const Glib::ustring& name)
+:
+ _CONSTRUCT("name", (name.empty() ? NULL : name.c_str()), "category", category.c_str(), "left-gravity", TRUE)
+{}
+
+
Glib::RefPtr<SourceMark> SourceMark::next()
{
Glib::RefPtr<SourceMark> result = Glib::wrap (gtk_source_mark_next(const_cast<GtkSourceMark*>(gobj()), NULL));
Modified: trunk/gtksourceview/src/sourcemark.hg
==============================================================================
--- trunk/gtksourceview/src/sourcemark.hg (original)
+++ trunk/gtksourceview/src/sourcemark.hg Fri Apr 25 09:29:17 2008
@@ -35,10 +35,12 @@
protected:
_CTOR_DEFAULT
- _WRAP_CTOR(SourceMark(const Glib::ustring& category), gtk_source_mark_new)
+ //We reversed the parameter order, because name can be NULL:
+ explicit SourceMark(const Glib::ustring& category, const Glib::ustring& name = Glib::ustring());
+ _IGNORE(gtk_source_mark_new)
public:
- _WRAP_CREATE(const Glib::ustring& category)
+ _WRAP_CREATE(const Glib::ustring& category, const Glib::ustring& name = Glib::ustring())
_WRAP_METHOD(Glib::ustring get_category() const, gtk_source_mark_get_category)
_WRAP_METHOD(Glib::RefPtr<SourceMark> next(const Glib::ustring& category), gtk_source_mark_next, refreturn)
@@ -54,6 +56,9 @@
// overloaded for category == NULL
Glib::RefPtr<SourceMark> prev();
Glib::RefPtr<const SourceMark> prev() const;
+
+ _WRAP_PROPERTY("category", Glib::ustring)
+
};//end class SourceMark
}//end namespace gtksourceview
Modified: trunk/gtksourceview/src/sourcestyle.hg
==============================================================================
--- trunk/gtksourceview/src/sourcestyle.hg (original)
+++ trunk/gtksourceview/src/sourcestyle.hg Fri Apr 25 09:29:17 2008
@@ -31,7 +31,7 @@
public:
- //TODO: GtkSourceStyle *gtk_source_style_copy (const GtkSourceStyle *style);
+ _WRAP_METHOD(Glib::RefPtr<SourceStyle> copy() const, gtk_source_style_copy);
};
}//end namespace gtksourceview
Modified: trunk/gtksourceview/src/sourcestyleschememanager.ccg
==============================================================================
--- trunk/gtksourceview/src/sourcestyleschememanager.ccg (original)
+++ trunk/gtksourceview/src/sourcestyleschememanager.ccg Fri Apr 25 09:29:17 2008
@@ -21,8 +21,13 @@
namespace gtksourceview
{
- Glib::RefPtr<SourceStyleSchemeManager> SourceStyleSchemeManager::get_default()
- {
- return Glib::wrap(gtk_source_style_scheme_manager_get_default());
- }
+
+
+void SourceStyleSchemeManager::reset_search_path()
+{
+ gtk_source_style_scheme_manager_set_search_path(gobj(), NULL);
}
+
+}
+
+
Modified: trunk/gtksourceview/src/sourcestyleschememanager.hg
==============================================================================
--- trunk/gtksourceview/src/sourcestyleschememanager.hg (original)
+++ trunk/gtksourceview/src/sourcestyleschememanager.hg Fri Apr 25 09:29:17 2008
@@ -38,16 +38,29 @@
public:
_WRAP_CREATE()
- static Glib::RefPtr<SourceStyleSchemeManager> get_default();
- // TODO: set_search_path() and get_search_path()
+ _WRAP_METHOD(static Glib::RefPtr<SourceStyleSchemeManager> get_default(), gtk_source_style_scheme_manager_get_default, refreturn);
+
+ _WRAP_METHOD(void set_search_path(const Glib::StringArrayHandle& path), gtk_source_style_scheme_manager_set_search_path)
+
+ /** Set the search path to the default.
+ */
+ void reset_search_path();
+
+#m4 _CONVERSION(`gchar**',`Glib::StringArrayHandle',`$2($3)')
+ _WRAP_METHOD(Glib::StringArrayHandle get_search_path() const, gtk_source_style_scheme_manager_get_search_path)
+
+
+
_WRAP_METHOD(void append_search_path(const Glib::ustring& path), gtk_source_style_scheme_manager_append_search_path)
_WRAP_METHOD(void prepend_search_path(const Glib::ustring& path), gtk_source_style_scheme_manager_prepend_search_path)
- // TODO: get_scheme_ids
+
_WRAP_METHOD(Glib::RefPtr<SourceStyleScheme> get_scheme(const Glib::ustring& scheme_id), gtk_source_style_scheme_manager_get_scheme, refreturn)
_WRAP_METHOD(Glib::RefPtr<const SourceStyleScheme> get_scheme(const Glib::ustring& scheme_id) const, gtk_source_style_scheme_manager_get_scheme, refreturn, constversion)
_WRAP_METHOD(void force_rescan(), gtk_source_style_scheme_manager_force_rescan)
+ _WRAP_METHOD(Glib::StringArrayHandle get_scheme_ids() const, gtk_source_style_scheme_manager_get_scheme_ids)
+
};//end class SourceStyleSchemeManager
}//end namespace gtksourceview
Modified: trunk/gtksourceview/src/sourceview.hg
==============================================================================
--- trunk/gtksourceview/src/sourceview.hg (original)
+++ trunk/gtksourceview/src/sourceview.hg Fri Apr 25 09:29:17 2008
@@ -165,10 +165,19 @@
_WRAP_METHOD(Glib::RefPtr<const Gdk::Pixbuf> get_mark_category_pixbuf(const Glib::ustring& category) const, gtk_source_view_get_mark_category_pixbuf, refreturn, constversion)
_WRAP_SIGNAL(void redo(), "redo")
-
_WRAP_SIGNAL(void undo(), "undo")
- //TODO: Properties.
+ _WRAP_PROPERTY("show-line-numbers", bool)
+ _WRAP_PROPERTY("show-line-marks", bool)
+ _WRAP_PROPERTY("tab-width", guint)
+ _WRAP_PROPERTY("indent-width", int)
+ _WRAP_PROPERTY("auto_indent", bool)
+ _WRAP_PROPERTY("insert_spaces_instead_of_tabs", bool)
+ _WRAP_PROPERTY("show-right-margin", bool)
+ _WRAP_PROPERTY("right-margin-position", guint)
+ _WRAP_PROPERTY("smart_home_end", SourceSmartHomeEndType)
+ _WRAP_PROPERTY("highlight_current_line", bool)
+ _WRAP_PROPERTY("indent_on_tab", bool)
};
Modified: trunk/tools/m4/convert_gtksourceviewmm.m4
==============================================================================
--- trunk/tools/m4/convert_gtksourceviewmm.m4 (original)
+++ trunk/tools/m4/convert_gtksourceviewmm.m4 Fri Apr 25 09:29:17 2008
@@ -45,6 +45,7 @@
#_CONVERSION(`GdkPixbuf*',`Glib::RefPtr<Gdk::Pixbuf>',`Glib::wrap($3)')
_CONVERSION(`GdkPixbuf*',`Glib::RefPtr<const Gdk::Pixbuf>',`Glib::wrap($3)')
+_CONVERSION(`GtkSourceStyleSchemeManager*',`Glib::RefPtr<SourceStyleSchemeManager>',`Glib::wrap($3)')
_CONV_ENUM(Gtk,SourceSmartHomeEndType)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]