Hello
Most times Gtk::Application is only used like this:
auto app = Gtk::Application::create("org.example");
return app->make_window_and_run(argc, argv);
If the constructor would be public we and the compiler wouldn't have to
deal with smart pointers:
Gtk::Application app("org.example");
public.:)
btw. now that Glib::RefPtr is a std::shared_ptr you could use
std::make_shared().
(also my philosophy)
Thanks for the answer.
phosit
___
gtkmm-list mailing list
gtkmm-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtkmm-list
> (2) Your posting is public, which is fine. There is nothing
> inappropriate in it.
I revered to the constructor.
Glib::RefPtr don't has to be converted to std::shared_ptr. Glib::RefPtr
is a typedef(actually using) std::shared_ptr.
___
gtkmm-list
What is a god method of creating a OptionGroup?
The best option I see is to asign every member of Glib::OptionEntry and
then add it to the Glib::OptionGroup. Like so:
Glib::OptionGroup mainGroup;
Glib::OptionEntry ent;
ent.set_long_name("verbose");
ent.set_short_name('V');
Ok thank you. Unfortunately I don't use Gio::Application.
pgpIGHlh6bGNp.pgp
Description: OpenPGP digital signature
___
gtkmm-list mailing list
gtkmm-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtkmm-list
Hello
I try to list the awailable font-families.
If I open and close multiple windows ther is a critical error:
GLib-GObject-CRITICAL **: 15:22:32.722: g_object_unref: assertion
'G_IS_OBJECT (object)' failed
This is the code, the error ocours even without the uncomented code:
#include
#include
Thank you for the answer and the fix.
Is ther a bug report i can track?
___
gtkmm-list mailing list
gtkmm-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtkmm-list
> does the error occur if you do windows.reserve(2) before the
> emplace_back()s?
Yes
___
gtkmm-list mailing list
gtkmm-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtkmm-list