Why isn't the constructor of Gtk::Application public?

2021-09-28 Thread phosit
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");

Re: Why isn't the constructor of Gtk::Application public?

2021-09-28 Thread phosit
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

Re: Why isn't the constructor of Gtk::Application public?

2021-09-29 Thread phosit
> (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

creating a Glib::OptionGroup

2022-01-10 Thread phosit--- via 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');

Re: creating a Glib::OptionGroup

2022-01-10 Thread phosit--- via gtkmm-list
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

How to use Pango::Context?

2022-02-21 Thread phosit--- via 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

Re: How to use Pango::Context?

2022-02-21 Thread phosit--- via gtkmm-list
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

Re: How to use Pango::Context?

2022-02-21 Thread phosit--- via 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