[gtksourceviewmm/devel] Some work in SourceView.
- From: Krzesimir Nowak <krnowak src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gtksourceviewmm/devel] Some work in SourceView.
- Date: Sun, 10 Jan 2010 16:57:34 +0000 (UTC)
commit 214ce5e60356be33f195f02cc65f0b7d8987db1f
Author: Krzesimir Nowak <qdlacz gmail com>
Date: Sun Jan 10 17:45:27 2010 +0100
Some work in SourceView.
* gtksourceview/src/sourceview.hg: Added get_completion(), removed
const from line-mark-activated signal.
* gtksourceview/src/sourceview.ccg: Wrapped deprecated method by
hand, so it use nondeprecated function now and wrapped
implementations of deprecated methods into ifndef.
gtksourceview/src/sourceview.ccg | 8 ++++++++
gtksourceview/src/sourceview.hg | 15 +++++++++++----
2 files changed, 19 insertions(+), 4 deletions(-)
---
diff --git a/gtksourceview/src/sourceview.ccg b/gtksourceview/src/sourceview.ccg
index c0c4f32..f196b68 100644
--- a/gtksourceview/src/sourceview.ccg
+++ b/gtksourceview/src/sourceview.ccg
@@ -94,6 +94,13 @@ SourceView::set_source_buffer (const Glib::RefPtr<SourceBuffer> &source_buffer)
set_buffer (source_buffer) ;
}
+#ifndef GTKSOURCEVIEWMM_DISABLE_DEPRECATED
+void
+SourceView::set_mark_category_pixbuf(const Glib::ustring& category, const Glib::RefPtr<Gdk::Pixbuf>& pixbuf)
+{
+ gtk_source_view_set_mark_category_icon_from_pixbuf(gobj(), category.c_str(), pixbuf->gobj());
+}
+
Glib::RefPtr<Gdk::Pixbuf>
SourceView::get_mark_category_pixbuf(const Glib::ustring&)
{
@@ -105,6 +112,7 @@ SourceView::get_mark_category_pixbuf(const Glib::ustring&) const
{
return Glib::RefPtr<const Gdk::Pixbuf>();
}
+#endif
void SourceView::set_mark_category_tooltip_func(const Glib::ustring& category, const SlotMarkTooltip& slot)
{
diff --git a/gtksourceview/src/sourceview.hg b/gtksourceview/src/sourceview.hg
index d19a0b0..7f8bcdd 100644
--- a/gtksourceview/src/sourceview.hg
+++ b/gtksourceview/src/sourceview.hg
@@ -26,6 +26,7 @@
#include <gtkmm/textview.h>
#include <gtksourceviewmm/sourcebuffer.h>
#include <gtksourceviewmm/sourcegutter.h>
+#include <gtksourceviewmm/sourcecompletion.h>
_DEFS(gtksourceviewmm,gtksourceview)
_PINCLUDE(gtkmm/private/textview_p.h)
@@ -34,6 +35,7 @@ namespace gtksourceview
{
class SourceGutter;
+class SourceCompletion;
_WRAP_ENUM(SourceSmartHomeEndType, GtkSourceSmartHomeEndType)
_WRAP_ENUM(SourceDrawSpacesFlags, GtkSourceDrawSpacesFlags)
@@ -210,6 +212,7 @@ public:
/// it defaults to 0.
_WRAP_METHOD(gint get_mark_category_priority(const Glib::ustring& category) const, gtk_source_view_get_mark_category_priority)
+#ifndef GTKSOURCEVIEWMM_DISABLE_DEPRECATED
/// \brief Associates a given pixbuf with a given mark category.
/// If pixbuf is NULL, the pixbuf is unset.
///
@@ -217,10 +220,9 @@ public:
/// \param pixbuf the pixbuf to associate the mark category to.
///
/// \deprecated Use set_mark_category_icon().
- _WRAP_METHOD(void set_mark_category_pixbuf(const Glib::ustring& category, const Glib::RefPtr<Gdk::Pixbuf>& pixbuf), gtk_source_view_set_mark_category_pixbuf, deprecated)
+ void set_mark_category_pixbuf(const Glib::ustring& category, const Glib::RefPtr<Gdk::Pixbuf>& pixbuf);
_IGNORE(gtk_source_view_get_mark_category_pixbuf)
-#ifndef GTKSOURCEVIEWMM_DISABLE_DEPRECATED
/// \brief Gets the pixbuf which is associated with the given mark category.
///
/// \param category a mark category.
@@ -269,11 +271,16 @@ public:
_WRAP_METHOD(Glib::RefPtr<SourceGutter> get_gutter(Gtk::TextWindowType window_type), gtk_source_view_get_gutter, refreturn)
_WRAP_METHOD(Glib::RefPtr<const SourceGutter> get_gutter(Gtk::TextWindowType window_type) const, gtk_source_view_get_gutter, refreturn, constversion)
+#m4 _CONVERSION(`GtkSourceCompletion*',`SourceCompletion*',`Glib::wrap($3)')
+#m4 _CONVERSION(`GtkSourceCompletion*',`const SourceCompletion*',`Glib::wrap($3)')
+ _WRAP_METHOD(SourceCompletion* get_completion(), gtk_source_view_get_completion, refreturn)
+ _WRAP_METHOD(const SourceCompletion* get_completion() const, gtk_source_view_get_completion, refreturn, constversion)
+
_WRAP_SIGNAL(void redo(), "redo")
_WRAP_SIGNAL(void undo(), "undo")
_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(const Gtk::TextIter& mark, GdkEvent* event), "line-mark-activated")
+//#m4 _CONVERSION(`GtkTextIter*',`const Gtk::TextIter&',`Glib::wrap($3)')
+ _WRAP_SIGNAL(void line_mark_activated(Gtk::TextIter& mark, GdkEvent* event), "line-mark-activated")
/// \brief Whether to display line numbers
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]