Gtk::Application and signal_startup()
- From: Christoph Brill <egore911 gmail com>
- To: gtkmm-list gnome org
- Subject: Gtk::Application and signal_startup()
- Date: Wed, 9 Jul 2014 22:54:00 +0200
Hi list,
I'm currently working on porting meld (the diff viewer) from pygtk to gtkmm. It basically does the following when starting:
class MeldApp(Gtk.Application):
def some_method():
Gtk.Application.do_startup(self)
widget = builder.get_widget()
self.add_window(widget)
app.run(sys.argv)
I'm trying to do the same, but calling this->add_window() segfaults in gtkapplicationimpl.c:88. I guess this is simply because I don't call "do_start()" prior to this->add_window(). This is due to the reason it only seems to exist in form of a signal in gtkmm. So my code basically does:
class MeldApp : public Gtk::Application {
void some_method() {
#if 0
Gtk::Application::do_startup();
#endif
builder->get_widget("window", widget);
this->add_window(widget);
this->run(argc, argv);
}
}
Can anyone suggest on how to initialize a child class of Gtk::Application (that was not instantiated using Gtk::Application::create())?
I amend the last commit from time to time as way to much stuff is still if'ed out :D
Thanks in advance,
Christoph
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]