summaryrefslogtreecommitdiff
path: root/glib
Commit message (Collapse)AuthorAgeFilesLines
* Remove Glib::WeakRefrefptr_as_sharedptr_v4Murray Cumming2017-04-054-487/+0
| | | | | | | | | | | Now that RefPtr is really a std::shared_ptr<>, we should use std::weak_ref<> instead. Note that a std::weak_ptr<> tells you nothing about whether the underlying GObject is still alive, which Glib::RefPtr did. It just tells you whether our std::shared_ptr<> still holds a reference to it. That's why I removed one of the checks in tests/giomm_listmodel/main.cc.
* Use std::dynamic_pointer_cast<>().Murray Cumming2017-04-052-4/+4
| | | | Instead of Glib::RefPtr<>::cast_dynamic().
* glibmm_weakref: fix get()Marcin Kolny2017-04-051-1/+1
|
* RefPtr: Make this an alias for shared_ptr<> instead.Murray Cumming2017-04-054-468/+13
| | | | | | | | Specifying a Deleter in make_refptr_for_instance(). And changing RefPtr::cast_dynamic<>() to std::dynamic_pointer_cast<>(). The glibmm_refptr test then becomes rather silly, and should maybe just be removed.
* Add and use make_refptr_for_instance().Murray Cumming2017-04-0511-22/+29
|
* IOChannel: Avoid creating a RefPtr to this.Murray Cumming2017-04-053-4/+21
| | | | | | | By adding a private IOSource constructor (and create()), accessible via a friend declaration, that takes the raw GIOChannel. See https://bugzilla.gnome.org/show_bug.cgi?id=755037#c20
* C++11: Variant: Replace more throw(std::bad_cast) with noexcept(false).Murray Cumming2017-04-041-2/+2
| | | | | | This is necessary for C++17 which completely removes dynamic exception specifications. See https://bugzilla.redhat.com/show_bug.cgi?id=1438766
* Object: Use g_object_new_with_properties().Murray Cumming2017-04-042-27/+41
| | | | | | | Instead of (deprecated) g_object_newv() and (deprecated) GParameter. This seems to work. It is meant to be the simplest possible change. I would like to translate this code properly to C++ now that I've noticed it.
* C++11: Variant: Replace throw(std::bad_cast) with noexcept(false).Murray Cumming2017-04-042-2/+2
| | | | | | This is necessary for C++17 which completely removes dynamic exception specifications. See https://bugzilla.redhat.com/show_bug.cgi?id=1438766
* Glib::OptionGroup: Don't allow copy or move2.53.1Kjell Ahlstedt2017-03-232-22/+7
| | | | | | The GOptionGroup contains a pointer to the Glib::OptionGroup wrapper. That pointer can't be changed. Copying (adding a ref) or moving a GOptionGroup to a second Glib::OptionGroup would be problematic.
* Change the ABI to glibmm-2.54Murray Cumming2017-03-221-2/+2
| | | | | | | So we can use the 2.51/52 version numbers for more stable releases. We don't need to release a stable ABI-parallel glibmm until we need to release gtkmm 4.0, and that won't happen until GTK+ 4.0.0 happens, and we don't know when that might be.
* Add some #include directivesKjell Ahlstedt2017-03-227-0/+8
| | | | | Each header file shall include all header files that it depends on. Checked with tools/test_scripts/testheaders.sh
* Really remove containers.ccKjell Ahlstedt2017-03-211-31/+0
| | | | | Should have been done by commit 8c37e116a6a3a862b7574fa607cf69b3b6267dfe, I assume.
* Glib::OptionGroup: Modify on_[pre|post]_parse(), on_error()Kjell Ahlstedt2017-03-212-15/+22
| | | | | | | Remove the OptionGroup& parameter in on_pre_parse(), on_post_parse() and on_error(). It's unnecessary. It's always identical to *this. Add a const Error& parameter to on_error(). It's an input parameter with information about an error that has occurred in OptionContext::parse().
* Glib::OptionGroup: Take advantage of GOptionGroup's refcountKjell Ahlstedt2017-03-203-21/+27
| | | | | | | GOptionGroup is refcounted. Glib::OptionGroup::has_ownership is unnecessary. Replace gobj_give_ownership() by gobj_copy(). Glib::OptionGroup is not made refcounted, for reasons explained in a comment in optiongroup.hg.
* Remove unused containers.[h||cc].Murray Cumming2017-03-203-363/+0
|
* Remove unused helperlist.hMurray Cumming2017-03-203-154/+0
|
* Remove Sequence and sequence().Murray Cumming2017-03-201-37/+0
| | | | | We don't use them in glibmm and gtkmm and I have never heard of anybody ever using them.
* Replace remaining uses of Glib::ListHandle<> with std::vector.Murray Cumming2017-03-202-4/+0
| | | | | | Using Glib::ListHandler<>::list_to_array() and Glib::ListHandler<>::list_to_vector() instead, and only in the implementation instead of in the API.
* Gio::Resolver: Use std::vector instead of Glib::ListHandle<>.Murray Cumming2017-03-202-824/+0
| | | | | | Using Glib::ListHandler<>::list_to_array() and Glib::ListHandler<>::list_to_vector() instead, and only in the implementation instead of in the API.
* Glib::IOChannel, StreamIOChannel: Remove deprecated partsKjell Ahlstedt2017-03-196-603/+3
| | | | | | | | | * glib/glibmm.h: Remove streamiochannel.h. * glib/glibmm/filelist.am: Remove streamiochannel.[cc|h]. * glib/glibmm/streamiochannel.[cc|h]: Removed files. * glib/src/iochannel.[ccg|hg]: Remove the default constructor and the deprecated virtual functions. In .ccg, remove the local GlibmmIOChannel class. It's useless without the virtual functions, as is the default ctor.
* Replace remaining uses of Glib::ArrayHandle<> with std::vector.Murray Cumming2017-03-178-801/+2
| | | | | | Using Glib::ArrayHandler<>::vector_to_array() and Glib::ArrayHandler<>::array_to_vector() instead, and only in the implementatoin instead of in the API.
* Glib::Shell: Use vector instead of Glib::ArrayHandle<>.Murray Cumming2017-03-172-4/+3
| | | | | | Using Glib::ArrayHandler<>::vector_to_array() and Glib::ArrayHandler<>::array_to_vector() instead, and only in the implementatoin instead of in the API.
* Glib::MiscUtils: Use std::vector instead of Glib::ArrayHandle<>.Murray Cumming2017-03-172-10/+9
| | | | | | Using Glib::ArrayHandler<>::vector_to_array() and Glib::ArrayHandler<>::array_to_vector() instead, and only in the implementatoin instead of in the API.
* Glib::Keyfile: Use std::vector instead of Glib::ArrayHandle<>.Murray Cumming2017-03-172-43/+41
| | | | | | Using Glib::ArrayHandler<>::vector_to_array() and Glib::ArrayHandler<>::array_to_vector() instead, and only in the implementatoin instead of in the API.
* Glib::Spawn: Use vector instead of ArrayHandle<std::string>.Murray Cumming2017-03-172-26/+25
| | | | | | Using Glib::ArrayHandler<>::vector_to_array() and Glib::ArrayHandler<>::array_to_vector() instead, and only in the implementatoin instead of in the API.
* Remove unused Glib::SArrayMurray Cumming2017-03-173-65/+0
|
* Use std::vector<> instead of Glib::StringArrayHandle.Murray Cumming2017-03-173-12/+10
| | | | | | Using Glib::ArrayHandler<>::vector_to_array() and Glib::ArrayHandler<>::array_to_vector() instead, and only in the implementatoin instead of in the API.
* Added ustring::make_valid() which fixes non-UTF8 strings.Krzysztof Piecuch2017-03-152-0/+12
| | | | | | | | | | | make_valid replaces all non-UTF8 characters with replacement character (U+FFFD). Allows manipulating with ustring after you find out by ustring::validate() that it's not an UTF-8 string and you need to rescue it somehow. This wraps g_utf8_make_valid(). Bug #780075
* Remove Glib::unconst()Kjell Ahlstedt2017-03-131-11/+0
| | | | | It's not used by glibmm or gtkmm. It's unnecessary. Use const_cast<>() directly instead.
* Glib::Variant: Add template specialization for std::tupleAlexander Rössler2017-03-061-0/+186
| | | | Bug 777791
* Revert "Class: A use of range-based for."Murray Cumming2017-02-231-3/+3
| | | | | | | Because the original code starts at 1, not 0, so this was not equivalent. This reverts commit b0a3e10d17f21254c15781bb7ff57736a9bea569.
* Class: A use of range-based for.Murray Cumming2017-02-231-3/+3
|
* Object construction: Add custom class init and instance init functionsKjell Ahlstedt2017-02-159-36/+269
| | | | | | | Make it possible for named custom types to register additions to the class init function and to register an instance init function. An extra class init function is useful in Gtk::WidgetCustomDraw and Gtk::WidgetCustomSnapshot. Bug 775348
* Glib::Variant—Improve documentation of get_maybe()Daniel Boles2017-02-131-4/+5
| | | | | | | Clarify what is set and returned, and use lower case “nothing” to match how that must be written in GVariant text format, à la GSettings, etc. https://bugzilla.gnome.org/show_bug.cgi?id=778219
* Glib::Variant—Explain how to create “maybe” typesDaniel Boles2017-02-131-2/+5
| | | | | | | | It’s not exactly intuitive why the *_maybe() methods are kept in ContainerBase, nor that Variant<VariantBase> inherits from the former and is the way to get a maybe-typed Variant in glibmm. Let’s fix that! https://bugzilla.gnome.org/show_bug.cgi?id=778219
* Glib::Variant—Cosmetically tweak braces & newlinesDaniel Boles2017-02-131-16/+4
| | | | | | | Donʼt use braces for single-line blocks, and do if the other side of an if/else already did. Also, get rid of a couple of extraneous newlines. https://bugzilla.gnome.org/show_bug.cgi?id=778219
* Glib::Variant: Fix a copy-pasted typo in func docsDaniel Boles2017-02-051-4/+4
|
* Glib::Variant: Remove the string specializations of cast_dynamicKjell Ahlstedt2016-12-272-58/+0
| | | | | The Variant<Glib::ustring> and Variant<std::string> specializations of VariantBase::cast_dynamic<>() are no longer used by glibmm.
* Glib: Remove some deprecated APIKjell Ahlstedt2016-12-274-76/+0
| | | | | | * glib/glibmm/refptr.h: Remove clear(). * glib/glibmm/utility.h: Remove GLIBMM_INITIALIZE_STRUCT and ScopedPtr. * glib/src/value_basictypes.[cc|h].m4: Remove Value<char>.
* Fix some TODO comments requiring ABI breakKjell Ahlstedt2016-12-271-4/+1
| | | | | | | | * gio/src/gio_vfuncs.defs: Add GAsyncResult::is_tagged(): * gio/src/action.hg: get_state_hint_variant() returns VariantContainerBase. * gio/src/actiongroup.hg: Remove the deprecated get_action_state_hint(). * gio/src/asyncresult.hg: Add is_tagged_vfunc(). * glib/src/checksum.hg: update(): The length parameter is a gssize.
* Glib::VariantType: Add get_item_types()Kjell Ahlstedt2016-12-232-3/+32
| | | | | Remove Glib::VariantType::first() and next(). Replace them with get_item_types(). Bug 775741
* Glib::Dispatcher: Implement the pimpl idiomKjell Ahlstedt2016-12-152-71/+88
| | | | | | | Store only a pointer to the private member data in the Dispatcher class. The most important reason for the pimpl idiom (pointer to implementation) in this case is that the deletion of the private data can be delayed until it's safe to delete it. Bug 651942
* Glib::init(): Set the global localeKjell Ahlstedt2016-12-143-9/+98
| | | | | | | | | * glib/glibmm/init.[cc|h]: Add set/get_init_to_users_preferred_locale(). Let Glib::init() set the C andC++ global locale to the user's preferred locale, or (if Glib::set_init_to_users_preferred_locale(false) has been called) set the C++ locale to be equal to the C locale. * glib/glibmm/ustring.h: Add to the documentation that Glib::init() sets the global locale. Bug 661588
* Binding: Make a the TransformProp constructor explicit.Murray Cumming2016-12-121-1/+1
|
* BalancedTree: Make a constructor explicit.Murray Cumming2016-12-121-1/+1
|
* Glib::Dispatcher: Don't cast a HANDLE to an int on WindowsKjell Ahlstedt2016-12-061-7/+5
| | | | | * glib/glibmm/dispatcher.cc: When a Windows HANDLE must be cast, cast it to Glib::PollFD::fd_t instead of int. Bug 772074
* PollFD: autodeduce type of fd fieldMarcin Kolny2016-12-062-12/+14
| | | | | | | | * glib/glibmm/main.[h|cc]: file descriptor to poll can be either of gint, or gint64 type, depending on the platform. glibmm should follow this rule as well. https://bugzilla.gnome.org/show_bug.cgi?id=772074
* Glib::Source: Replace extra_source_data by instance dataKjell Ahlstedt2016-12-032-55/+23
| | | | | | * glib/glibmm/main.[cc|h]: Replace the std::map containing ExtraSourceData with instance data in Source. The map was just a way of avoiding an ABI break, but now we can break ABI. Bug 561885
* Glib::SignalProxyNormal: Remove connect_() and connect_notify_()Kjell Ahlstedt2016-12-012-50/+23
| | | | | and add connect_impl_(bool notify, const sigc::slot_base& slot, bool after). SignalProxyNormal then becomes more like SignalProxyDetailedBase.