How to use Glib::Interface derived interfaces in custom classes?
- From: Krzesimir Nowak <qdlacz gmail com>
- To: gtkmm-list <gtkmm-list gnome org>
- Subject: How to use Glib::Interface derived interfaces in custom classes?
- Date: Thu, 04 Nov 2010 20:14:19 +0100
Hi,
I'm trying to write a sort of a test of completion feature in
gtksourceviewmm. Or rather port the one written in C in gtksourceview-3
to C++. I have pushed a nonworking version to gtksourceviewmm repo. [1]
In short - there is a class TestProvider [2], which inherits from
Glib::Object and Gsv::SourceCompletionProvider [3]. The latter is an
interface.
There is a SourceCompletion's method named add_provider() which is used
in three places. [4][5][6]. The [4] call works, [5][6] - don't: I'm
getting a critical from gtksourceview:
(test:17365): GtkSourceView-CRITICAL **:
gtk_source_completion_add_provider: assertion
`GTK_IS_SOURCE_COMPLETION_PROVIDER (provider)' failed
(test:17365): GtkSourceView-CRITICAL **:
gtk_source_completion_add_provider: assertion
`GTK_IS_SOURCE_COMPLETION_PROVIDER (provider)' failed
That means that TestProvider::gobj() does not return a GObject
deriving/implementing a C GtkSourceCompletionProvider class. What I am
doing wrong?
Thanks for help,
Krzesimir
[1]
http://git.gnome.org/browse/gtksourceviewmm/tree/tests/completion/main.cc
[2]
http://git.gnome.org/browse/gtksourceviewmm/tree/tests/completion/main.cc#n14
[3]
http://git.gnome.org/browse/gtksourceviewmm/tree/gtksourceview/src/sourcecompletionprovider.hg
[4]
http://git.gnome.org/browse/gtksourceviewmm/tree/tests/completion/main.cc#n176
[5]
http://git.gnome.org/browse/gtksourceviewmm/tree/tests/completion/main.cc#n184
[6]
http://git.gnome.org/browse/gtksourceviewmm/tree/tests/completion/main.cc#n190
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]