[gtksourceviewmm] Added missing properties and finished the move to SourceMarkAttributes.
- From: Krzesimir Nowak <krnowak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceviewmm] Added missing properties and finished the move to SourceMarkAttributes.
- Date: Sat, 15 Jan 2011 13:10:17 +0000 (UTC)
commit c854b799e8b69330656ef6336594f79afd12d0b6
Author: Krzesimir Nowak <qdlacz gmail com>
Date: Thu Jan 13 20:51:50 2011 +0100
Added missing properties and finished the move to SourceMarkAttributes.
* codegen/m4/convert_gtksourceview.m4: Added needed conversion for
SourceMarkAttributes, removed SourceMarkCategory conversion.
* configure.ac: Fixed the build.
* gtksourceview/src/sourcegutterrendererpixbuf.hg:
* gtksourceview/src/sourcegutterrenderertext.hg:
* gtksourceview/src/sourcelanguage.hg:
* gtksourceview/src/sourcelanguagemanager.hg:
* gtksourceview/src/sourcestylescheme.hg:
* gtksourceview/src/sourcestyleschememanager.hg: Added missing
properties.
* gtksourceview/src/sourcemarkattributes.hg: Fixed constructor
and removed obsolete methods and properties.
* gtksourceview/src/sourceview.hg:
* gtksourceview/src/sourceview.ccg: Use SourceMarkAttributes instead
of SourceMarkCategory.
* .gitignore: Ignore patches.
* gtksourceview/gtksourceviewmm/.gitignore: Ignore SourceMarkAttributes
instead of removed SourceMarkCategory.
.gitignore | 1 +
codegen/m4/convert_gtksourceview.m4 | 8 ++++++--
configure.ac | 3 +--
gtksourceview/gtksourceviewmm/.gitignore | 2 +-
gtksourceview/src/sourcegutterrendererpixbuf.hg | 5 +++++
gtksourceview/src/sourcegutterrenderertext.hg | 3 +++
gtksourceview/src/sourcelanguage.hg | 5 +++++
gtksourceview/src/sourcelanguagemanager.hg | 3 +++
gtksourceview/src/sourcemarkattributes.hg | 14 ++------------
gtksourceview/src/sourcestylescheme.hg | 5 +++++
gtksourceview/src/sourcestyleschememanager.hg | 2 ++
gtksourceview/src/sourceview.ccg | 3 ++-
gtksourceview/src/sourceview.hg | 8 +++++---
13 files changed, 41 insertions(+), 21 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 5315296..c0f87e3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,6 +8,7 @@
/INSTALL
/gtksourceview/gtksourceviewmmconfig.h
/tests/*/test
+/*.patch
Makefile
Makefile.in
diff --git a/codegen/m4/convert_gtksourceview.m4 b/codegen/m4/convert_gtksourceview.m4
index 6b150f8..f0e8ff6 100644
--- a/codegen/m4/convert_gtksourceview.m4
+++ b/codegen/m4/convert_gtksourceview.m4
@@ -79,8 +79,12 @@ _CONVERSION(`GtkSourceMark*',`Glib::RefPtr<SourceMark>',`Glib::wrap($3)')
_CONVERSION(`const Glib::RefPtr<SourceMark>&',`GtkSourceMark*',`Glib::unwrap($3)')
-# GtkSourceMarkCategory -> Gsv::SourceMarkCategory
-_CONVERSION(`'GtkSourceMarkCategory*,`Glib::RefPtr<SourceMarkCategory>',`Glib::wrap($3)')
+# GtkSourceMarkAttributes -> Gsv::SourceMarkAttributes
+_CONVERSION(`'GtkSourceMarkAttributes*,`Glib::RefPtr<SourceMarkAttributes>',`Glib::wrap($3)')
+
+
+# Gsv::SourceMarkAttributes -> GtkSourceMarkAttributes
+_CONVERSION(`const Glib::RefPtr<SourceMarkAttributes>&',`GtkSourceMarkAttributes*',`Glib::unwrap($3)')
# GtkSourceStyle -> Gsv::SourceStyle
diff --git a/configure.ac b/configure.ac
index 189e29e..e31c5fd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -29,8 +29,7 @@ PKG_CHECK_MODULES([GTKSOURCEVIEWMM], [$GTKSOURCEVIEWMM_MODULES])
MM_PKG_CONFIG_SUBST([GTHREAD_CFLAGS], [--cflags-only-other gthread-2.0])
MM_PKG_CONFIG_SUBST([GMMPROC_DIR], [--variable=gmmprocdir glibmm-2.4 ])
-MM_PKG_CONFIG_SUBST([GMMPROC_EXTRA_M4_DIR], [--variable=gmmprocm4dir gtkmm-3.0])
-
+MM_PKG_CONFIG_SUBST([GMMPROC_EXTRA_M4_DIR], [--variable=gmmprocm4dir pangomm-1.4 atkmm-1.6 gtkmm-3.0])
MM_ARG_DISABLE_DEPRECATED_API([GTKSOURCEVIEWMM])
diff --git a/gtksourceview/gtksourceviewmm/.gitignore b/gtksourceview/gtksourceviewmm/.gitignore
index ddb70fa..57b74ec 100644
--- a/gtksourceview/gtksourceviewmm/.gitignore
+++ b/gtksourceview/gtksourceviewmm/.gitignore
@@ -14,7 +14,7 @@
/sourcelanguage.*
/sourcelanguagemanager.*
/sourcemark.*
-/sourcemarkcategory.*
+/sourcemarkattributes.*
/sourceprintcompositor.*
/sourcestyle.*
/sourcestylescheme.*
diff --git a/gtksourceview/src/sourcegutterrendererpixbuf.hg b/gtksourceview/src/sourcegutterrendererpixbuf.hg
index 236363f..5ebe0bd 100644
--- a/gtksourceview/src/sourcegutterrendererpixbuf.hg
+++ b/gtksourceview/src/sourcegutterrendererpixbuf.hg
@@ -59,6 +59,11 @@ public:
_WRAP_METHOD(std::string get_icon_name() const, gtk_source_gutter_renderer_pixbuf_get_icon_name)
_WRAP_METHOD(void set_icon_name(const std::string& icon_name), gtk_source_gutter_renderer_pixbuf_set_icon_name)
+
+ _WRAP_PROPERTY("pixbuf", Glib::RefPtr<Gdk::Pixbuf>)
+ _WRAP_PROPERTY("stock-id", std::string)
+ _WRAP_PROPERTY("icon-name", std::string)
+ _WRAP_PROPERTY("gicon", Glib::RefPtr<Gio::Icon>)
};
} // namespace Gsv
diff --git a/gtksourceview/src/sourcegutterrenderertext.hg b/gtksourceview/src/sourcegutterrenderertext.hg
index fcc643d..327404f 100644
--- a/gtksourceview/src/sourcegutterrenderertext.hg
+++ b/gtksourceview/src/sourcegutterrenderertext.hg
@@ -47,6 +47,9 @@ public:
_WRAP_METHOD(void measure(const SourceMarkup& markup, int& width, int& height), gtk_source_gutter_renderer_text_measure_markup)
_WRAP_METHOD(void measure(const Glib::ustring& text, int& width, int& height), gtk_source_gutter_renderer_text_measure)
+
+ _WRAP_PROPERTY("text", Glib::ustring)
+ _WRAP_PROPERTY("markup", Glib::ustring)
};
} // namespace Gsv
diff --git a/gtksourceview/src/sourcelanguage.hg b/gtksourceview/src/sourcelanguage.hg
index 6662ea3..acbdf6b 100644
--- a/gtksourceview/src/sourcelanguage.hg
+++ b/gtksourceview/src/sourcelanguage.hg
@@ -120,6 +120,11 @@ public:
* empty string if language doesn't contain that metadata property.
*/
_WRAP_METHOD(Glib::ustring get_metadata(const Glib::ustring& name) const, gtk_source_language_get_metadata)
+
+ _WRAP_PROPERTY("id", std::string)
+ _WRAP_PROPERTY("name", std::string)
+ _WRAP_PROPERTY("section", std::string)
+ _WRAP_PROPERTY("hidden", bool)
};
} /* namespace Gsv */
diff --git a/gtksourceview/src/sourcelanguagemanager.hg b/gtksourceview/src/sourcelanguagemanager.hg
index a459635..89e039f 100644
--- a/gtksourceview/src/sourcelanguagemanager.hg
+++ b/gtksourceview/src/sourcelanguagemanager.hg
@@ -212,6 +212,9 @@ public:
* language for given @a filename and/or @a content_type.
*/
_WRAP_METHOD(Glib::RefPtr<const SourceLanguage> guess_language(const std::string& filename, const std::string& content_type) const, gtk_source_language_manager_guess_language, refreturn, constversion)
+
+ _WRAP_PROPERTY("search-path", std::vector<std::string>)
+ _WRAP_PROPERTY("language-ids", std::vector<std::string>)
};
} /* namespace Gsv */
diff --git a/gtksourceview/src/sourcemarkattributes.hg b/gtksourceview/src/sourcemarkattributes.hg
index 1a0687f..02c44a9 100644
--- a/gtksourceview/src/sourcemarkattributes.hg
+++ b/gtksourceview/src/sourcemarkattributes.hg
@@ -59,11 +59,9 @@ class SourceMarkAttributes : public Glib::Object
{
_CLASS_GOBJECT(SourceMarkAttributes, GtkSourceMarkAttributes, GTK_SOURCE_MARK_ATTRIBUTES, Glib::Object, GObject)
protected:
- _WRAP_CTOR(SourceMarkAttributes(const std::string& id), gtk_source_mark_attributes_new)
+ _CTOR_DEFAULT
public:
- _WRAP_CREATE(const std::string& id)
-
- _WRAP_METHOD(std::string get_id() const, gtk_source_mark_attributes_get_id)
+ _WRAP_CREATE()
_WRAP_METHOD(bool get_background(Gdk::RGBA& rgba) const, gtk_source_mark_attributes_get_background)
@@ -71,10 +69,6 @@ public:
_WRAP_METHOD(void set_background(const Gdk::RGBA& rgba), gtk_source_mark_attributes_set_background)
- _WRAP_METHOD(int get_priority() const, gtk_source_mark_attributes_get_priority)
-
- _WRAP_METHOD(void set_priority(int priority), gtk_source_mark_attributes_set_priority)
-
_WRAP_METHOD(std::string get_stock_id() const, gtk_source_mark_attributes_get_stock_id)
_WRAP_METHOD(void set_stock_id(const std::string& stock_id), gtk_source_mark_attributes_set_stock_id)
@@ -103,12 +97,8 @@ public:
_WRAP_METHOD(Glib::ustring get_tooltip_markup(const Glib::RefPtr<SourceMark>& mark) const, gtk_source_mark_attributes_get_tooltip_markup)
- _WRAP_PROPERTY("id", std::string)
-
_WRAP_PROPERTY("background", Gdk::RGBA)
- _WRAP_PROPERTY("priority", int)
-
_WRAP_PROPERTY("stock-id", std::string)
_WRAP_PROPERTY("pixbuf", Glib::RefPtr<Gdk::Pixbuf>)
diff --git a/gtksourceview/src/sourcestylescheme.hg b/gtksourceview/src/sourcestylescheme.hg
index 9233114..9f8ccd7 100644
--- a/gtksourceview/src/sourcestylescheme.hg
+++ b/gtksourceview/src/sourcestylescheme.hg
@@ -114,6 +114,11 @@ public:
* @newin{2,2}
*/
_WRAP_METHOD(Glib::RefPtr<const SourceStyle> get_style(const Glib::ustring& style_id) const, gtk_source_style_scheme_get_style, refreturn, constversion)
+
+ _WRAP_PROPERTY("id", std::string)
+ _WRAP_PROPERTY("name", Glib::ustring)
+ _WRAP_PROPERTY("description", Glib::ustring)
+ _WRAP_PROPERTY("filename", std::string)
};//end class SourceStyleScheme
}//end namespace Gsv
diff --git a/gtksourceview/src/sourcestyleschememanager.hg b/gtksourceview/src/sourcestyleschememanager.hg
index 52a852a..34a64c0 100644
--- a/gtksourceview/src/sourcestyleschememanager.hg
+++ b/gtksourceview/src/sourcestyleschememanager.hg
@@ -111,6 +111,8 @@ public:
*/
_WRAP_METHOD(Glib::ArrayHandle<std::string> get_scheme_ids() const, gtk_source_style_scheme_manager_get_scheme_ids)
+ _WRAP_PROPERTY("search-path", std::vector<std::string>)
+ _WRAP_PROPERTY("scheme-ids", std::vector<std::string>)
};//end class SourceStyleSchemeManager
}//end namespace Gsv
diff --git a/gtksourceview/src/sourceview.ccg b/gtksourceview/src/sourceview.ccg
index eac30a3..c6990c6 100644
--- a/gtksourceview/src/sourceview.ccg
+++ b/gtksourceview/src/sourceview.ccg
@@ -23,7 +23,8 @@
#include <gtksourceview/gtksourceview-typebuiltins.h>
#include <gtksourceviewmm/sourceview.h>
-#include <gtksourceviewmm/sourcemarkcategory.h>
+#include <gtksourceviewmm/sourcemarkattributes.h>
+
namespace Gsv
{
diff --git a/gtksourceview/src/sourceview.hg b/gtksourceview/src/sourceview.hg
index 8a4ad94..7046bf5 100644
--- a/gtksourceview/src/sourceview.hg
+++ b/gtksourceview/src/sourceview.hg
@@ -33,7 +33,7 @@ namespace Gsv
class SourceCompletion;
class SourceGutter;
-class SourceMarkCategory;
+class SourceMarkAttributes;
/** Defines a behaviour of smart Home/End keys.
*/
@@ -335,9 +335,11 @@ public:
*/
_WRAP_METHOD(Glib::RefPtr<const SourceCompletion> get_completion() const, gtk_source_view_get_completion, refreturn, constversion)
- _WRAP_METHOD(Glib::RefPtr<SourceMarkCategory> get_mark_category(const Glib::ustring& category), gtk_source_view_get_mark_category, refreturn)
+ _WRAP_METHOD(void set_mark_attributes(const Glib::ustring& category, const Glib::RefPtr<SourceMarkAttributes>& attributes, int priority), gtk_source_view_set_mark_attributes)
- _WRAP_METHOD(Glib::RefPtr<const SourceMarkCategory> get_mark_category(const Glib::ustring& category) const, gtk_source_view_get_mark_category, constversion)
+ _WRAP_METHOD(Glib::RefPtr<SourceMarkAttributes> get_mark_attributes(const Glib::ustring& category, int& priority), gtk_source_view_get_mark_attributes, refreturn)
+
+ _WRAP_METHOD(Glib::RefPtr<const SourceMarkAttributes> get_mark_attributes(const Glib::ustring& category, int& priority) const, gtk_source_view_get_mark_attributes, constversion)
/** Emitted when redo action is requested.
*/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]