Re: usage of Gsv::LanguageManager::get_default from Gtksourceviewmm



2012-03-18 10:12, Basile Starynkevitch skrev:
And it is probably because, when executing
    _app_langman = Gsv::LanguageManager::get_default();
line 619 of my simplemelt-gtkmm-probe.cc I am getting
(simplemelt-gtkmm-probe:14602): glibmm-WARNING **: Failed to wrap object of type
'GtkSourceLanguageManager'. Hint: this error is commonly caused by failing to call a
library init() function.

I don't understand why I am getting this warning. It is called inside the contructor of
SmeltAppl, a subclass of Gtk::Main, so gtk should be initialized then -since Gtk::Main
constructor has been called- (and I cannot figure if and how I have to explicitly
initialize the GtkSourceViewMM library).

I restrict my reply to this question. I know almost nothing about gtksourceviewmm, but the warning makes me believe that Gsv::wrap_init() has not been called. Gtk::Main does not do that for you. Gtkmm does not depend on gtksourceviewmm. It's the other way around, gtksourceviewmm depends on gtkmm.

Gsv::wrap_init() is called from Gsv::init(). I think you must call Gsv::init() early in your program.

Kjell


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