2017-05-29 Murray Cumming 3.91.0 2017-05-29 Murray Cumming TextBuffer: get_selection_bounds(): Avoid warning about infinite recursion. clang++ complains about this, but I don't see how the const method could call itself on a non-const instance. Anyway, removing the constversion option is no great loss. 2017-05-29 Murray Cumming Gdk::Window: get_frame_extents(): Avoid infinite recursion. Found by this warning from clang++: window.cc:598:1: error: all paths through this function will call itself [-Werror,-Winfinite-recursion] This was caused by ths commit: https://git.gnome.org/browse/gtkmm/commit/gdk/src/window.hg?id=da86805ec88ce5277255606c0d0ebac6486b96cb 2017-05-26 Daniel Boles gtk-demo: Use #include for system headers including our own and those from the stdlibs. This is more idiomatic, so it makes for better example code to show users. 2017-05-26 Daniel Boles gtk-demo/example_headerbar: Remove an old comment Nearly 3 years later, I think we can safely assume these icons are available on the end-user’s system. 2017-05-26 Daniel Boles gtk-demo/demowindow: Order #includes correctly in the spirit of https://git.gnome.org/browse/gtk+/tree/docs/CODING-STYLE#n458 “Every file must include config.h first, then its own header, then other GTK+ headers that it needs, then system and third-party headers that it needs.” For the “other GTK+ headers” part, I took the liberty of using the order I normally follow, which is GLib headers followed by GIO ones followed by GTK+ ones. I use this as it follows their order in the software stack 2017-05-26 Daniel Boles gtk-demo/demowindow: Use size_t to index in arrays int or unsigned int are not guaranteed to be wide enough. Of course, that will not matter in many practical cases, but it is better style to always use std::size_t when the purpose is to index into an array. 2017-05-26 Daniel Boles gtk-demo/demowindow: Use auto 2017-05-26 Daniel Boles gtk-demo: Don’t remove_page() with invalid index The decrement was in the iteration expression, so it happened after the loop body. So on the first iteration, this would call remove_page() with i == get_n_pages(), which is of course 1 past the maximal allowed index. 2017-05-26 Kjell Ahlstedt Gdk::Event: Add EventTouchpadSwipe and 4 other subclasses * gdk/src/enums.hg: Wrap GdkTouchpadGesturePhase. * gdk/src/event.[ccg|hg]: Add EventTouchpadSwipe, EventTouchpadPinch, EventPadButton, EventPadAxis and EventPadGroupMode classes. Add Event::get_seat(), EventKey::get_scancode(), EventButton::get_click_count(), EventButton::shall_trigger_context_menu(), EventScroll::is_scroll_stop_event(). EventWindowState::get_name() returns Glib::ustring. Fix some comments. * gdk/src/gdk_docs_override.xml: Add some substitute_enumerator_name elements. * tools/m4/convert_gdk.m4: Add conversions for GdkTouchpadGesturePhase. Bug 135978 2017-05-24 Kjell Ahlstedt Gdk::Event: Remove _GDKEVENT_INHERITS(), improve _CLASS_GDKEVENT() * gdk/src/event.hg: * tools/m4/class_gdkevent.m4: Remove _GDKEVENT_INHERITS(). _CLASS_GDKEVENT() can take either 2 or 4 parameters, 2 for the base class, 4 for the subclasses. _CLASS_GDKEVENT(C++ class, C class [, C++ base class, C base class]) Almost like _CLASS_GOBJECT() and _CLASS_GTKOBJECT(). Only the base class, Gdk::Event, has a get_type() function. Correct Gdk::wrap_event(). Add move constructor and move assignment. Remove many @c. Bug 135978 2017-05-24 Mark Vender Gdk::Event: Implement a class hierarchy representing different GdkEvent* types * .gitignore: Add gdk/gdkmm/enums.[h|cc]. * gdk/src/event.[hg|ccg]: Implement a hierarchy representing different GdkEvent* types. Remove some functions within Gdk::Event in favor of similar functions within subclasses. * gdk/src/enums.[hg|ccg]: New files. Move the definitions of event-related enums here. Add definitions of new enums. Required to remove dependencies between other headers. * gdk/src/device.hg: Include enums.h instead of event.h. * gdk/src/filelist.am: Add enums.hg. * tools/m4/class_gdkevent.m4: New file. Add a generator of boilerplate code for Gdk::Event and subclasses. Using existing m4 scripts is not possible, because the subclasses share the same gobject_ within Gdk::Event. * tools/m4/convert_gdk.m4: Add missing enum conversions. * tools/m4/filelist.am: Add class_gdkevent.m4. Note that existing API doesn't allow to wrap GdkEvent statically (i.e. not through a pointer), because allocation, copying and destruction must be done using gdk_event_[new|copy|free]() functions. This is a modified version of Mark Vender's patch in bug 135978. It has been modified to be applicable to gtkmm 4. 2017-05-22 Kjell Ahlstedt Gtk::Widget: remove get_preferred_width() etc. Remove get_preferred_width(), get_preferred_height_for_width(), get_preferred_height() and get_preferred_width_for_height() because the corresponding functions have been removed from gtk+. 2017-05-10 Daniel Boles TreeView: Remove an obsolete comment Commit 4504487c7 replaced the old C syntax (void*)0 with nullptr but did not remove this comment, which referred to the original cast expression. 2017-05-10 Daniel Boles Box: Fix comments on constructor • typo in internal comment • wrong claim that it always creates a horizontal Box in documentation comment – looks like a copy-and-paste error from the HBox/VBox days. 2017-05-10 Daniel Boles CellLayout: Improve docs of get_first_cell() funcs They included the line “This assumes that the CellLayout contains only one CellRenderer.” But that doesn’t matter: these methods always return the first cell, without caring whether there are any others, and thus users can call them without caring too. So, that comment had no purpose. Also, these are ‘safe’ to call for Layouts containing no cells, in the sense that they will return nullptr, so we might as well clarify that. 2017-05-10 Daniel Boles TreeModel: Improve docs of foreach*() functions • Fix example slots to have the correct bool return type; they were void • Don’t use example as 1st paragraph as it ends with ;. which looks odd • Open by explaining what the typedef is for, with link to its foreach() • For each foreach*(), name and link to its type of slot in the comment 2017-05-08 Kjell Ahlstedt Gdk, Gtk: Update documentation of in-class enums * gdk/src/gdk_docs_override.xml: * gtk/src/gtk_docs_override.xml: Add and modifiy substitute_type_name and substitute_enumerator_name xml elements to make gmmproc correctly convert C names to C++ names of enums defined in a class. 2017-05-06 Murray Cumming Use of static_cast<>. 2017-05-06 Murray Cumming convert_gtk.m4: Use of static_cast<>. 2017-05-06 Murray Cumming convert_gdk.m4: Use of static_cast<>. 2017-05-06 Kjell Ahlstedt Builder demo: Remove "expand" child property from the .ui file Because it has been removed from GtkBox. Expand the ScrolledWindow. 2017-05-03 Kjell Ahlstedt Gtk::ShortcutsShortcut: Derive directly from Widget GtkShortcutsShortcut is now derived directly from GtkWidget (was from GtkBox). It was changed more than 3 months ago. Gtkmm could still be built, but one of the demo programs crashed when executed. 2017-05-03 Murray Cumming Window: Remove get/set_hide_titlebar_when_maximized(). It has been removed from GTK+. 2017-04-30 Kjell Ahlstedt Gtk::Container: Update the documentation of forall_vfunc() after the "include_internal" parameter was removed. 2017-04-28 Kjell Ahlstedt Remove tests/dialog Apart from unimportant formatting, tests/dialog/main.cc is identical to tests/delete_cpp_child/main.cc. 2017-04-28 Murray Cumming demos: Adapt to changed Box::pack_start() behaviour. pack_start(EXPAND_WIDGET) or pack_start(EXPAND_PADDING), or the same with pack_end(), sets the child's hexpand and vexpand to true. But that also affects the parent widget (the old fill/expand GTK+ API didn't do that), so sometimes we need to unset that. Well, that explains most of these changes. I found the need for these changes by comparing the appearance (and behaviour when resizing) of gtkmm-demo for both gtkmm 3 and gtkmm 4. 2017-04-28 Murray Cumming Box::pack_start/pack_end(options): Avoid setting child properties when possible. PackOptions::SHRINK seems to correspond with the default behaviour of the new gtk_box_pack_start()/pack_end(), so in this case it seems wise to avoid the complication of setting the child properties unnecessarily. 2017-04-28 Kjell Ahlstedt _CLASS_GTKOBJECT: Put declarations of default signal handlers at the end * tools/m4/class_gtkobject.m4: Declarations of default signal handlers are written at the end of the class definition, like _CLASS_GOBJECT does. This is necessary if a signal handler uses an in-class enum. Bug 86864 2017-04-28 Murray Cumming Box::pack_start():pack_end(options): Set expand/align for both h and v. Because we think that is what the old expand and fill parameters did. 2017-04-28 Murray Cumming Gdk::Window: Change WindowTypeHint to Window::TypeHint. 2017-04-27 Murray Cumming FileChooser: Change FileChooserConfirmation to FileChooser::Confirmation. 2017-04-27 Murray Cumming FileChooser: Change FileChooserAction to FileChooser::Action. 2017-04-27 Murray Cumming PrintOperation: Change PrintOperationAction to PrintOperation::Action. 2017-04-27 Murray Cumming PrintOperation: Change PrintOperationResult to PrintOperation::Result. 2017-04-27 Murray Cumming TreeViewColumn: Change TreeViewColumnSizing to TreeViewColumn::Sizing. 2017-04-27 Murray Cumming RecentFilter: Change RecentFilterFlags to RecentFilter::Flags. 2017-04-27 Murray Cumming Entry: Change EntryIconPosition to Entry::IconPosition. 2017-04-27 Murray Cumming TreeView: Change TreeViewGridLines to GridLines. 2017-04-27 Murray Cumming TreeView: Change TreeViewDropPosition to TreeView::DropPosition. 2017-04-27 Murray Cumming SpinButton: Change SpinButtonUpdatePolicy to SpinButton::UpdatePolicy. 2017-04-27 Murray Cumming IconView: change IconViewDropPosition to IconView::DropPosition. 2017-04-27 Murray Cumming Notebook: Remove NotebookTab enum. We don't use it in the API. It is used in the C API only in a keybinding signal, which we would not wrap. 2017-04-27 Murray Cumming Image: Change ImageType to Image::Type. 2017-04-27 Murray Cumming Scrollable: Change ScrollablePolicy to Scrollable::Policy. 2017-04-27 Murray Cumming FileFilter: Change FileFilterFlags to FileFilter::Flags. 2017-04-27 Murray Cumming LevelBar: Change LevelBarMode to LevelBar::Mode. 2017-04-27 Murray Cumming CssSection: Change CssSectionType to CssSection::Typewq. 2017-04-27 Murray Cumming Popover: Change PopoverConstraint to Popover::Constraint. 2017-04-27 Murray Cumming TreeModel: Change TreeModelFlags to TreeModel::Flags. 2017-04-27 Murray Cumming Gdk::Window: Change WindowHints to Window::Hints. 2017-04-27 Murray Cumming Gdk::Window: Change WindowType to Window::Type. 2017-04-27 Murray Cumming Gdk::Window: Change WindowState to Window::State. 2017-04-27 Murray Cumming CellRendererAccel: Change CellRendererAccelMode to CellRendererAccel::Mode. 2017-04-27 Murray Cumming Calendar: Change CalendarDisplayOptions to Calendar::Display::Options. 2017-04-27 Murray Cumming Assistant: Change AssistantPageType to Assistant::PageType. 2017-04-27 Murray Cumming Application: Change ApplicationInhibitFlags to Application::InhibitFlags. 2017-04-27 Murray Cumming Gdk::Seat: Change SeatCapabilities to Seat::Capabilities. 2017-04-27 Murray Cumming Gkd::Visual: Change VisualType to Visual::Type. 2017-04-27 Murray Cumming Pixbuf: Comment out AlphaMode. We don't use it in our API. It seems to be used only inside the gdk-pixbuf library. 2017-04-27 Murray Cumming Gdk::Pixbuf: Change PixbufRotation to Pixbuf::Rotation. 2017-04-27 Murray Cumming Gdk::Event: Change EventType to Event::Type. 2017-04-27 Murray Cumming Gdk::Device: Change DeviceType to Cursor::Type. 2017-04-27 Murray Cumming Gdk::Cursor: Change CursorType to Cursor::Type. 2017-04-27 Murray Cumming SpinButton: Move INPUT_ERROR constant into class. 2017-04-27 Murray Cumming ButtonBox: Remove apparently-useless BUTTONBOX_DEFAULT_SPACING. 2017-04-27 Murray Cumming configure.ac: Require latest cairomm version. 2017-04-27 Murray Cumming configure.ac: Require latest pangomm and atkmm versions. 2017-04-27 Murray Cumming configure.ac: Require latest glibmm and gtk+. The GTK+ version exists in git, but not yet in a tarball. 2017-04-27 Murray Cumming demos/tests: pack_start/pack_end() calls: Specify EXPAND_WIDGET. Because this was the default value before we had to remove the default value. 2017-04-27 Murray Cumming C++11: Box: Make PackOptions an enum class. This would avoid the implicit conversions noticed in the previous commit, though we don't have that exact problem anyway now that we have removed the bool parameters from pack_start/pack_end(). 2017-04-27 Murray Cumming Demo: Don't pass padding to Box::pack_start(). The parameter was removed from the gtkmm API in this commit: https://git.gnome.org/browse/gtkmm/commit/gtk/src/box.hg?id=a53eea323ab9f9b3d228d72c6c13998b73f58ab3 in response to this GTK+ API change: https://git.gnome.org/browse/gtk+/commit/?id=f45dadadd00d892ba16dc081240987425bc32346 but the compiler was implicitly converting the enum and the int to bool, bool, to call pack_start(widget, bool, bool) instead, which is not what was wanted. I have made changes to the demo code to match the C commit above, more or less, though they don't make much sense. 2017-04-27 Murray Cumming Box: pack_start/pack_end(): Adapt to new GTK+ API. pack_start(Widget& child, bool expand, bool fill) and pack_end(Widget& child, bool expand, bool fill): Remove the expand and fill parameters, as in the C API: https://git.gnome.org/browse/gtk+/commit/?id=5729ea7744c2a41ae8fb833db6690a6aa5ad7a84 https://git.gnome.org/browse/gtk+/commit/?id=c92b7d4224b9cef1d08373fcc28f7fbd96c64e6d (They want us to use the GtkWidget halign and hexpand properties instead.) pack_start(Gtk::Widget& child, Gtk::PackOptions options) and pack_start(Gtk::Widget& child, Gtk::PackOptions options): Reimplement these using the GtkWidget halign and hexpand properties. These still seem useful, because it still doesn't seem useful to fill while not expanding, so having a 3-value enum seems to make it clearer. It also still seems useful to specify this in one method call when adding the widget, instead of having separate code to set the widget properties. Hopefully this works. However, we now need to remove the default options value, to avoid ambiguity with the standard pack_start()/pack_end(). And unfortunately, the default GtkWidget halign and hexpand property values do not correspond to our previous options value (PACK_EXPAND_WIDGET), which fills and expands the widget. So some application code will now change its behaviour without any warning from the compiler. It might be better to just remove these pack_start()/pack_end() overrides, as they don't quite correspond to the new halign/hexpand system anyway. 2017-04-27 Murray Cumming Label: Remove get/set_angle() and property. To match the C API: https://git.gnome.org/browse/gtk+/commit/?id=db4b1d28f53c30e8d4d555775cece1cc8aefdcf3 2017-04-27 Murray Cumming Container: forall_vfunc(): Remove include_internals parameter. See the change in GTK+: https://git.gnome.org/browse/gtk+/commit/?id=f053a63d7480d1b15e4d556ba48461ee3426dc49 2017-04-27 Murray Cumming Widget: Remove get/set_center_widget(). This was removed from the GtkWidget API: https://git.gnome.org/browse/gtk+/commit/?id=fb927d19935efe95130ebdbef14e458c71bac301 2017-04-27 Murray Cumming Regenerate *_docs.xml. 2017-04-27 Murray Cumming Regenerate gtk_signals.defs. 2017-04-27 Murray Cumming Regenerate gdk_methods.defs. 2017-04-27 Murray Cumming Regenerate gtk_methods.defs. 2017-04-27 Murray Cumming Box: Correct method names in documentation. 2017-04-27 Murray Cumming Revert "Gtk: Regenerate .defs and docs.xml files, update gtk_vfuncs.defs" This reverts commit 880dad6f476b9e32de2027f6e0ef84b5e0ab3d96. Because I would rather have these in smaller commits, which lets me apply some other commits. 2017-04-27 Murray Cumming Revert "Gtk: Adapt Box, Container, Label to changes in gtk+" This reverts commit 916c1596268cac9256c8162313e725476ad47754. Because I would rather have the changes in smaller commits (which I was preparing at the same time. Sorry) and because I would like to keep our pack_start()/pack_end() convenience wrappers, at least temporarily. We will probably want to add some of this back later. 2017-04-27 Kjell Ahlstedt Gtk: Adapt Box, Container, Label to changes in gtk+ * gtk/src/bin.ccg: add_pixlabel(): Fix call to Box::pack_start(). * gtk/src/box.[ccg|hg]: Remove enum PackOptions and pack_start/end() overloads that take a PackOptions parameter. Remove the "expand" and "fill" parameters in the other pack_start() and pack_end(). Remove set/get_center_widget(). Remove property_expand() and property_fill(). * gtk/src/container.[ccg|hg]: forall_vfunc(): Remove the "include_internal" parameter. * gtk/src/label.hg: Remove set/get_angle() and property_angle(). 2017-04-27 Kjell Ahlstedt Gtk: Regenerate .defs and docs.xml files, update gtk_vfuncs.defs 2017-04-25 Kjell Ahlstedt Demos: Fix make check after changes in Glib::SignalProxy::connect() Bug 126213 2017-04-24 Murray Cumming Range: Derived from (and implement) Orientable. Because that's what GtkRange does. This also removes the Orientable base class from Scrollbar, because it now gets it via its Range base class. Bug #781655 (Daniel Boles) 2017-04-19 Murray Cumming Adapt to cairomm enum change. 2017-04-18 Murray Cumming Update for enum now in class: Glib::Binding::Flags. 2017-04-18 Murray Cumming Update for enum now in class: Gio::Application::Flags. 2017-04-18 Murray Cumming Builder::get_widget_derived(): Make this static To avoid the need to create a shared_ptr to this. Bug #755037 2017-04-18 Murray Cumming SizeGroup: Rename SizeGroupMode enum to SizeGroup::Mode. Putting the num inside the class. Bug #86864 2017-04-11 Kjell Ahlstedt Fix make check when _WRAP_ENUM generates enum class Bug 86864 2017-04-11 Kjell Ahlstedt Fix build when _WRAP_ENUM generates enum class Bug 86864 2017-04-07 Murray Cumming Adapt dynamic casts for RefPtr as std::shared_ptr. 2017-04-07 Murray Cumming TextMark: Avoid creating a RefPtr to this. By adding a private TextBuffer::get_iter_at_mark(), accessible via a friend declaration, that takes the raw GTextMark. See https://bugzilla.gnome.org/show_bug.cgi?id=755037#c21 2017-04-07 Chun-wei Fan Visual Studio builds: Update glibmm ABI version The glibmm ABI version was updated in its unstable development series, so we ought to reflect that here as well in our projects, as we await for GTK+-4.0. 2017-04-04 Murray Cumming Window: Remove has_toplevel_focus() and property. 2017-04-04 Murray Cumming Container: Remove set_focus_child(), get_focus_child(), etc. gtk_container_set_focus_child() and friends were removed from the GTK+ public API. 2017-03-31 Murray Cumming TextConstIter: Add a default constructor. TextIter has this by default, but TextConstIter does not, because it has custom constructors.