[gtkmm] Gtk: Update for the latest gtk4 (Gtk::Entry::set_extra_menu(), etc.)



commit 4defa86f4d2d63c97f8a9107de65031dcaebd4fd
Author: Kjell Ahlstedt <kjellahlstedt gmail com>
Date:   Sun Jun 16 09:51:44 2019 +0200

    Gtk: Update for the latest gtk4 (Gtk::Entry::set_extra_menu(), etc.)
    
    Add set/get_extra_menu() in Entry, Label, PasswordEntry, Text, TextView.
    Add enum Gtk::PropagationLimit. And other changes.

 gtk/src/entry.hg           |  7 +++++-
 gtk/src/eventcontroller.hg |  6 ++++-
 gtk/src/label.hg           |  7 ++++--
 gtk/src/menubutton.hg      |  7 ++++++
 gtk/src/modelbutton.hg     |  7 +++---
 gtk/src/passwordentry.hg   | 12 ++++++++--
 gtk/src/popover.ccg        | 20 -----------------
 gtk/src/popover.hg         | 51 ++++-------------------------------------
 gtk/src/popovermenu.ccg    | 18 +++++++++++++++
 gtk/src/popovermenu.hg     | 56 ++++++++++++++++++++++++++++++++++++++++------
 gtk/src/settings.hg        |  1 +
 gtk/src/text.hg            |  8 ++++---
 gtk/src/textview.hg        |  9 +++++---
 gtk/src/widget.hg          |  8 ++-----
 tools/m4/convert_gtk.m4    |  1 +
 15 files changed, 123 insertions(+), 95 deletions(-)
---
diff --git a/gtk/src/entry.hg b/gtk/src/entry.hg
index fb439b31..6e5b5415 100644
--- a/gtk/src/entry.hg
+++ b/gtk/src/entry.hg
@@ -24,6 +24,7 @@
 #include <gtkmm/image.h> //For Image::Type.
 #include <gtkmm/border.h>
 #include <gtkmm/entrybuffer.h>
+#include <giomm/menumodel.h>
 #include <pangomm/attrlist.h>
 #include <pangomm/tabarray.h>
 
@@ -178,6 +179,10 @@ public:
 
   _WRAP_METHOD(void grab_focus_without_selecting(), gtk_entry_grab_focus_without_selecting)
 
+  _WRAP_METHOD(void set_extra_menu(const Glib::RefPtr<Gio::MenuModel>& model), gtk_entry_set_extra_menu)
+  _WRAP_METHOD(Glib::RefPtr<Gio::MenuModel> get_extra_menu(), gtk_entry_get_extra_menu, refreturn)
+  _WRAP_METHOD(Glib::RefPtr<const Gio::MenuModel> get_extra_menu() const, gtk_entry_get_extra_menu, 
refreturn, constversion)
+
   _IGNORE_SIGNAL(activate)dnl // action signal
 
 #m4 _CONVERSION(`const GdkEventButton*',`const Glib::RefPtr<const 
Gdk::EventButton>&',`Glib::wrap(const_cast<GdkEventButton*>($3), true)')
@@ -220,8 +225,8 @@ public:
   _WRAP_PROPERTY("input-purpose", InputPurpose)
   _WRAP_PROPERTY("input-hints", InputHints)
   _WRAP_PROPERTY("attributes", Pango::AttrList)
-  _WRAP_PROPERTY("populate-all", bool)
   _WRAP_PROPERTY("tabs", Pango::TabArray)
+  _WRAP_PROPERTY("extra-menu", Glib::RefPtr<Gio::MenuModel>)
   _WRAP_PROPERTY("show-emoji-icon", bool)
   _WRAP_PROPERTY("enable-emoji-completion", bool)
 };
diff --git a/gtk/src/eventcontroller.hg b/gtk/src/eventcontroller.hg
index 7cc55b22..da677765 100644
--- a/gtk/src/eventcontroller.hg
+++ b/gtk/src/eventcontroller.hg
@@ -36,13 +36,14 @@ namespace Gtk
  * let the widget react to those. On multi-touch gestures, every interacting touch
  * sequence will be tracked independently.
  *
- * See <a href="https://developer.gnome.org/gtk3/unstable/chap-input-handling.html";>The GTK+ Input Handling 
Model</a>
+ * See <a href="https://developer.gnome.org/gtk4/unstable/chap-input-handling.html";>The GTK Input Model</a>
  * for more information about input events and gestures.
  *
  * @newin{3,14}
  */
 
 _WRAP_ENUM(PropagationPhase, GtkPropagationPhase)
+_WRAP_ENUM(PropagationLimit, GtkPropagationLimit)
 
 /** Self-contained handler of series of events.
  *
@@ -73,9 +74,12 @@ public:
   _WRAP_METHOD(void reset(), gtk_event_controller_reset)
   _WRAP_METHOD(PropagationPhase get_propagation_phase() const, gtk_event_controller_get_propagation_phase)
   _WRAP_METHOD(void set_propagation_phase(PropagationPhase phase), 
gtk_event_controller_set_propagation_phase)
+  _WRAP_METHOD(PropagationLimit get_propagation_limit() const, gtk_event_controller_get_propagation_limit)
+  _WRAP_METHOD(void set_propagation_limit(PropagationLimit limit), 
gtk_event_controller_set_propagation_limit)
 
   _WRAP_PROPERTY("widget", Widget*)
   _WRAP_PROPERTY("propagation-phase", PropagationPhase)
+  _WRAP_PROPERTY("propagation-limit", PropagationLimit)
 
   // EventController has no signals
 };
diff --git a/gtk/src/label.hg b/gtk/src/label.hg
index 6520d79c..dfb2ebfd 100644
--- a/gtk/src/label.hg
+++ b/gtk/src/label.hg
@@ -21,6 +21,7 @@ _PINCLUDE(gtk/gtk.h)
 
 #include <gtkmm/widget.h>
 #include <pangomm/attrlist.h>
+#include <giomm/menumodel.h>
 
 namespace Gtk
 {
@@ -132,8 +133,9 @@ public:
   _WRAP_METHOD(void set_yalign (float yalign), gtk_label_set_yalign)
   _WRAP_METHOD(float get_yalign() const, gtk_label_get_yalign)
 
-  // no_default_handler because GtkLabelClass is private.
-  _WRAP_SIGNAL(void populate_popup(Menu* menu), "populate_popup", no_default_handler)
+  _WRAP_METHOD(void set_extra_menu(const Glib::RefPtr<Gio::MenuModel>& model), gtk_label_set_extra_menu)
+  _WRAP_METHOD(Glib::RefPtr<Gio::MenuModel> get_extra_menu(), gtk_label_get_extra_menu, refreturn)
+  _WRAP_METHOD(Glib::RefPtr<const Gio::MenuModel> get_extra_menu() const, gtk_label_get_extra_menu, 
refreturn, constversion)
 
   #m4 _CONVERSION(`const char*',`const Glib::ustring&',__GCHARP_TO_USTRING)
   _WRAP_SIGNAL(bool activate_link(const Glib::ustring& uri), "activate-link", no_default_handler)
@@ -164,6 +166,7 @@ public:
   _WRAP_PROPERTY("lines", int)
   _WRAP_PROPERTY("xalign", float)
   _WRAP_PROPERTY("yalign", float)
+  _WRAP_PROPERTY("extra-menu", Glib::RefPtr<Gio::MenuModel>)
 };
 
 }  // namespace Gtk
diff --git a/gtk/src/menubutton.hg b/gtk/src/menubutton.hg
index df5396d2..aa4be68f 100644
--- a/gtk/src/menubutton.hg
+++ b/gtk/src/menubutton.hg
@@ -88,6 +88,12 @@ public:
   _WRAP_METHOD(void set_label(const Glib::ustring& label), gtk_menu_button_set_label)
   _WRAP_METHOD(Glib::ustring get_label() const, gtk_menu_button_get_label)
 
+  _WRAP_METHOD(void set_relief(ReliefStyle relief), gtk_menu_button_set_relief)
+  _WRAP_METHOD(ReliefStyle get_relief() const, gtk_menu_button_get_relief)
+
+  _WRAP_METHOD(void popup(), gtk_menu_button_popup)
+  _WRAP_METHOD(void popdown(), gtk_menu_button_popdown)
+
   _WRAP_PROPERTY("popup", Menu*)
   _WRAP_PROPERTY("menu-model", Glib::RefPtr<Gio::MenuModel>)
   _WRAP_PROPERTY("align-widget", Widget*)
@@ -96,6 +102,7 @@ public:
   _WRAP_PROPERTY("popover", Popover*)
   _WRAP_PROPERTY("icon-name", Glib::ustring)
   _WRAP_PROPERTY("label", Glib::ustring)
+  _WRAP_PROPERTY("relief", ReliefStyle)
 };
 
 } /* namespace Gtk */
diff --git a/gtk/src/modelbutton.hg b/gtk/src/modelbutton.hg
index d75b44e0..d516c602 100644
--- a/gtk/src/modelbutton.hg
+++ b/gtk/src/modelbutton.hg
@@ -15,6 +15,7 @@
  */
 
 #include <gtkmm/button.h>
+#include <gtkmm/sizegroup.h>
 #include <giomm/icon.h>
 
 _DEFS(gtkmm,gtk)
@@ -69,11 +70,11 @@ public:
   _WRAP_PROPERTY("use-markup", bool, newin "3,96")
   _WRAP_PROPERTY("active", bool)
   _WRAP_PROPERTY("menu-name", Glib::ustring)
-  _WRAP_PROPERTY("inverted", bool)
-  _WRAP_PROPERTY("centered", bool)
   _WRAP_PROPERTY("iconic", bool)
+  _WRAP_PROPERTY("accel", Glib::ustring)
+  _WRAP_PROPERTY("indicator-size-group", Glib::RefPtr<SizeGroup>)
 
-  // ModelButton has no methods, signals, child properties nor vfuncs.
+  // ModelButton has no methods, signals nor vfuncs.
 };
 
 } //namespace Gtk
diff --git a/gtk/src/passwordentry.hg b/gtk/src/passwordentry.hg
index fd1c9cd2..de740185 100644
--- a/gtk/src/passwordentry.hg
+++ b/gtk/src/passwordentry.hg
@@ -16,6 +16,7 @@
 
 #include <gtkmm/widget.h>
 #include <gtkmm/editable.h>
+#include <giomm/menumodel.h>
 
 _DEFS(gtkmm,gtk)
 _PINCLUDE(gtkmm/private/widget_p.h)
@@ -30,8 +31,10 @@ namespace Gtk
  * does not allow to copy it to the clipboard, and it shows a
  * warning when Caps-Lock is engaged.
  *
- * %Gtk::PasswordEntry provides no API of its own and should be used
- * with the Gtk::Editable API.
+ * Optionally, it can offer a way to reveal the contents in clear text.
+ *
+ * %Gtk::PasswordEntry provides only minimal API and should be used with the
+ * Gtk::Editable API.
  *
  * @newin{3,96}
  * @ingroup Widgets
@@ -46,9 +49,14 @@ public:
   _WRAP_METHOD(void set_show_peek_icon(bool show_peek_icon = true), gtk_password_entry_set_show_peek_icon)
   _WRAP_METHOD(bool get_show_peek_icon() const, gtk_password_entry_get_show_peek_icon)
 
+  _WRAP_METHOD(void set_extra_menu(const Glib::RefPtr<Gio::MenuModel>& model), 
gtk_password_entry_set_extra_menu)
+  _WRAP_METHOD(Glib::RefPtr<Gio::MenuModel> get_extra_menu(), gtk_password_entry_get_extra_menu, refreturn)
+  _WRAP_METHOD(Glib::RefPtr<const Gio::MenuModel> get_extra_menu() const, gtk_password_entry_get_extra_menu, 
refreturn, constversion)
+
   _WRAP_PROPERTY("placeholder-text", Glib::ustring)
   _WRAP_PROPERTY("activates-default", bool)
   _WRAP_PROPERTY("show-peek-icon", bool)
+  _WRAP_PROPERTY("extra-menu", Glib::RefPtr<Gio::MenuModel>)
 };
 
 } //namespace Gtk
diff --git a/gtk/src/popover.ccg b/gtk/src/popover.ccg
index e169fb44..9ed39357 100644
--- a/gtk/src/popover.ccg
+++ b/gtk/src/popover.ccg
@@ -19,23 +19,3 @@
 #include <gtk/gtk.h>
 
 using Constraint = Gtk::Popover::Constraint;
-
-namespace Gtk
-{
-
-Popover::Popover(const Widget& relative_to, const Glib::RefPtr<Gio::MenuModel>& model)
-:
-  _CONSTRUCT("relative_to", relative_to.gobj())
-{
-  bind_model(model);
-}
-
-Popover::Popover(const Glib::RefPtr<Gio::MenuModel>& model)
-:
-  _CONSTRUCT("relative_to", 0)
-{
-  bind_model(model);
-}
-
-} // namespace Gtk
-
diff --git a/gtk/src/popover.hg b/gtk/src/popover.hg
index 59e0597a..9bec0865 100644
--- a/gtk/src/popover.hg
+++ b/gtk/src/popover.hg
@@ -18,7 +18,6 @@
 
 #include <gtkmm/bin.h>
 #include <gtkmm/native.h>
-#include <giomm/menumodel.h>
 
 _DEFS(gtkmm,gtk)
 _PINCLUDE(gtkmm/private/bin_p.h)
@@ -28,9 +27,9 @@ namespace Gtk
 
 /** Context dependent bubbles.
  *
- * Gtk::Popover is a bubble-like context window, primarily meant to
+ * %Gtk::Popover is a bubble-like context window, primarily meant to
  * provide context-dependent information or options. Popovers are
- * attached to a widget, passed at construction time on Gtk::Popover(),
+ * attached to a widget, passed at construction time on %Gtk::Popover(),
  * or updated afterwards through Gtk::Popover::set_relative_to(), by
  * default they will point to the whole widget area, although this
  * behavior can be changed through Gtk::Popover::set_pointing_to().
@@ -38,7 +37,7 @@ namespace Gtk
  * The position of a popover relative to the widget it is attached to
  * can also be changed through Gtk::Popover::set_position().
  *
- * By default, Gtk::Popover performs a GTK+ grab, in order to ensure
+ * By default, %Gtk::Popover performs a GTK grab, in order to ensure
  * input events get redirected to it while it is shown, and also so
  * the popover is dismissed in the expected situations (clicks outside
  * the popover, or the Esc key being pressed). If no such modal behavior
@@ -61,47 +60,6 @@ public:
    */
   _WRAP_CTOR(Popover(const Widget& relative_to{?}), gtk_popover_new)
 
-  //This is custom-implemented because the gtk_popover_new_from_model() does more
-  //than just call g_object_new. MenuBar and Menu have both the same issue.
-  //See https://bugzilla.gnome.org/show_bug.cgi?id=704671
-  /** Creates a Popover and populates it according to
-   * @a model. The popover is pointed to the @a relative_to widget.
-   *
-   * The created buttons are connected to actions found in the
-   * ApplicationWindow to which the popover belongs - typically
-   * by means of being attached to a widget that is contained within
-   * the ApplicationWindow widget hierarchy.
-   *
-   * Actions can also be added using Widget::insert_action_group()
-   * on the menu's attached widget or on any of its parent widgets.
-   *
-   * @param relative_to: Widget the popover is related to
-   * @param model: a Gio::MenuModel
-   *
-   * @newin{3,12}
-   */
-  explicit Popover(const Widget& relative_to, const Glib::RefPtr<Gio::MenuModel>& model);
-
-  /** Creates a Popover and populates it according to
-   * @a model.
-   *
-   * The created buttons are connected to actions found in the
-   * ApplicationWindow to which the popover belongs - typically
-   * by means of being attached to a widget that is contained within
-   * the ApplicationWindow widget hierarchy.
-   *
-   * Actions can also be added using Widget::insert_action_group()
-   * on the menu's attached widget or on any of its parent widgets.
-   *
-   * @param model: a Gio::MenuModel
-   *
-   * @newin{3,12}
-   */
-  explicit Popover(const Glib::RefPtr<Gio::MenuModel>& model);
-
-  _IGNORE(gtk_popover_new_from_model)
-
-
   _WRAP_METHOD(void set_relative_to(const Widget& relative_to), gtk_popover_set_relative_to)
   // transfer none
   _WRAP_METHOD(Widget* get_relative_to(), gtk_popover_get_relative_to)
@@ -122,8 +80,6 @@ public:
   _WRAP_METHOD(void set_has_arrow(bool has_arrow = true), gtk_popover_set_has_arrow)
   _WRAP_METHOD(bool get_has_arrow() const, gtk_popover_get_has_arrow)
 
-  _WRAP_METHOD(void bind_model(const Glib::RefPtr<Gio::MenuModel>& model, const Glib::ustring& 
action_namespace{?}), gtk_popover_bind_model)
-
   _WRAP_METHOD(void set_default_widget(Widget& widget), gtk_popover_set_default_widget)
 
   _WRAP_METHOD(void popup(), gtk_popover_popup)
@@ -137,6 +93,7 @@ public:
   _WRAP_PROPERTY("default-widget", Widget*)
 
   _WRAP_SIGNAL(void closed(), "closed")
+  _IGNORE_SIGNAL("activate-default")dnl// action signal
 };
 
 } // namespace Gtk
diff --git a/gtk/src/popovermenu.ccg b/gtk/src/popovermenu.ccg
index 8eaff978..cc85e3fc 100644
--- a/gtk/src/popovermenu.ccg
+++ b/gtk/src/popovermenu.ccg
@@ -15,3 +15,21 @@
  */
 
 #include <gtk/gtk.h>
+
+namespace Gtk
+{
+// Delegating constructors.
+PopoverMenu::PopoverMenu(const Widget& relative_to, const Glib::RefPtr<Gio::MenuModel>& model)
+:
+  PopoverMenu((GtkPopoverMenu*)gtk_popover_menu_new_from_model(
+    const_cast<GtkWidget*>(relative_to.gobj()), Glib::unwrap(model)))
+{
+}
+
+PopoverMenu::PopoverMenu(const Glib::RefPtr<Gio::MenuModel>& model)
+:
+  PopoverMenu((GtkPopoverMenu*)gtk_popover_menu_new_from_model(nullptr, Glib::unwrap(model)))
+{
+}
+
+} // namespace Gtk
diff --git a/gtk/src/popovermenu.hg b/gtk/src/popovermenu.hg
index 92234095..c9ec57be 100644
--- a/gtk/src/popovermenu.hg
+++ b/gtk/src/popovermenu.hg
@@ -15,6 +15,7 @@
  */
 
 #include <gtkmm/popover.h>
+#include <giomm/menumodel.h>
 
 _DEFS(gtkmm,gtk)
 _PINCLUDE(gtkmm/private/popover_p.h)
@@ -23,17 +24,20 @@ namespace Gtk
 {
 /** A Popover to use as a menu.
  *
- * PopoverMenu is a subclass of Popover that treats its
+ * %PopoverMenu is a subclass of Popover that treats its
  * childen like menus and allows switching between them. It is
  * meant to be used primarily together with ModelButton, but
  * any widget can be used, such as SpinButton or Scale.
- * In this respect, PopoverMenu is more flexible than popovers
+ * In this respect, %PopoverMenu is more flexible than popovers
  * that are created from a Gio::MenuModel.
  *
- * To add a child as a submenu, set the child_property_submenu()
- * to the name of the submenu. To let the user open
- * this submenu, add a ModelButton whose ModelButton::property_menu_name()
- * is set to the name you've given to the submenu.
+ * To add a child as a submenu, use add_submenu().
+ * To let the user open this submenu, add a ModelButton whose
+ * ModelButton::property_menu_name() is set to the name you've given
+ * to the submenu.
+ *
+ * To add a named submenu in a ui file, set Widget::property_name()
+ * of the widget that you are adding as a child of the popover menu.
  *
  * By convention, the first child of a submenu should be a ModelButton
  * to switch back to the parent menu. Such a button should use
@@ -53,7 +57,45 @@ class PopoverMenu : public Popover
   _CLASS_GTKOBJECT(PopoverMenu, GtkPopoverMenu, GTK_POPOVER_MENU, Gtk::Popover, GtkPopover)
 
 public:
-  _CTOR_DEFAULT
+  /** Creates a new popover menu to point to @a relative_to.
+   *
+   * @param relative_to The Gtk::Widget the popover menu is related to.
+   */
+  _WRAP_CTOR(PopoverMenu(const Widget& relative_to{?}), gtk_popover_menu_new)
+
+  //This is custom-implemented because the gtk_popover_menu_new_from_model() does more
+  //than just call g_object_new. MenuBar and Menu have both the same issue.
+  //See https://bugzilla.gnome.org/show_bug.cgi?id=704671
+  /** Creates a %PopoverMenu and populates it according to @a model.
+   * The popover menu is pointed to the @a relative_to widget.
+   *
+   * The created buttons are connected to actions found in the
+   * ApplicationWindow to which the popover menu belongs - typically
+   * by means of being attached to a widget that is contained within
+   * the ApplicationWindow widget hierarchy.
+   *
+   * Actions can also be added using Widget::insert_action_group()
+   * on the menu's attached widget or on any of its parent widgets.
+   *
+   * @param relative_to Widget the popover menu is related to
+   * @param model A Gio::MenuModel
+   */
+  explicit PopoverMenu(const Widget& relative_to, const Glib::RefPtr<Gio::MenuModel>& model);
+
+  /** Creates a %PopoverMenu and populates it according to @a model.
+   *
+   * The created buttons are connected to actions found in the
+   * ApplicationWindow to which the popover menu belongs - typically
+   * by means of being attached to a widget that is contained within
+   * the ApplicationWindow widget hierarchy.
+   *
+   * Actions can also be added using Widget::insert_action_group()
+   * on the menu's attached widget or on any of its parent widgets.
+   *
+   * @param model A Gio::MenuModel
+   */
+  explicit PopoverMenu(const Glib::RefPtr<Gio::MenuModel>& model);
+  _IGNORE(gtk_popover_menu_new_from_model)
 
   _WRAP_METHOD(void add_submenu(Widget& submenu, const Glib::ustring& name), gtk_popover_menu_add_submenu)
   _WRAP_METHOD(void open_submenu(const Glib::ustring& name), gtk_popover_menu_open_submenu)
diff --git a/gtk/src/settings.hg b/gtk/src/settings.hg
index 864c5c48..81686f89 100644
--- a/gtk/src/settings.hg
+++ b/gtk/src/settings.hg
@@ -100,6 +100,7 @@ public:
 
   _WRAP_PROPERTY("gtk-long-press-time", guint) // since 3.14
   _WRAP_PROPERTY("gtk-keynav-use-caret", bool)
+  _WRAP_PROPERTY("gtk-overlay-scrolling", bool)
 };
 
 } //namespace Gtk
diff --git a/gtk/src/text.hg b/gtk/src/text.hg
index 077c92c7..59f71e6d 100644
--- a/gtk/src/text.hg
+++ b/gtk/src/text.hg
@@ -17,6 +17,7 @@
 #include <gtkmm/widget.h>
 #include <gtkmm/editable.h>
 #include <gtkmm/entrybuffer.h>
+#include <giomm/menumodel.h>
 #include <pangomm/attrlist.h>
 #include <pangomm/tabarray.h>
 
@@ -92,8 +93,9 @@ public:
 
   _WRAP_METHOD(void grab_focus_without_selecting(), gtk_text_grab_focus_without_selecting)
 
-  // no_default_handler because GtkTextClass is private.
-  _WRAP_SIGNAL(void populate_popup(Widget* widget), "populate-popup", no_default_handler)
+  _WRAP_METHOD(void set_extra_menu(const Glib::RefPtr<Gio::MenuModel>& model), gtk_text_set_extra_menu)
+  _WRAP_METHOD(Glib::RefPtr<Gio::MenuModel> get_extra_menu(), gtk_text_get_extra_menu, refreturn)
+  _WRAP_METHOD(Glib::RefPtr<const Gio::MenuModel> get_extra_menu() const, gtk_text_get_extra_menu, 
refreturn, constversion)
 
   // Action signals
   _IGNORE_SIGNAL(activate, move-cursor, insert-at-cursor, delete-from-cursor,
@@ -114,10 +116,10 @@ public:
   _WRAP_PROPERTY("input-purpose", InputPurpose)
   _WRAP_PROPERTY("input-hints", InputHints)
   _WRAP_PROPERTY("attributes", Pango::AttrList)
-  _WRAP_PROPERTY("populate-all", bool)
   _WRAP_PROPERTY("tabs", Pango::TabArray)
   _WRAP_PROPERTY("enable-emoji-completion", bool)
   _WRAP_PROPERTY("propagate-text-width", bool)
+  _WRAP_PROPERTY("extra-menu", Glib::RefPtr<Gio::MenuModel>)
 };
 
 } //namespace Gtk
diff --git a/gtk/src/textview.hg b/gtk/src/textview.hg
index 77a29ffe..821deb3f 100644
--- a/gtk/src/textview.hg
+++ b/gtk/src/textview.hg
@@ -23,6 +23,7 @@ _CONFIGINCLUDE(gtkmmconfig.h)
 #include <gtkmm/scrollable.h>
 #include <gtkmm/textbuffer.h>
 #include <gtkmm/textmark.h>
+#include <giomm/menumodel.h>
 
 _DEFS(gtkmm,gtk)
 _PINCLUDE(gtkmm/private/container_p.h)
@@ -201,8 +202,10 @@ public:
   _WRAP_METHOD(void set_monospace(bool monospace = true), gtk_text_view_set_monospace)
   _WRAP_METHOD(bool get_monospace() const, gtk_text_view_get_monospace)
 
-#m4 _CONVERSION(`Container*',`GtkWidget*',`($3)->Widget::gobj()')
-  _WRAP_SIGNAL(void populate_popup(Container* popup), "populate_popup")
+  _WRAP_METHOD(void set_extra_menu(const Glib::RefPtr<Gio::MenuModel>& model), gtk_text_view_set_extra_menu)
+  _WRAP_METHOD(Glib::RefPtr<Gio::MenuModel> get_extra_menu(), gtk_text_view_get_extra_menu, refreturn)
+  _WRAP_METHOD(Glib::RefPtr<const Gio::MenuModel> get_extra_menu() const, gtk_text_view_get_extra_menu, 
refreturn, constversion)
+
   _WRAP_SIGNAL(void set_anchor(), "set_anchor")
 
 #m4 _CONVERSION(`const char*',`const Glib::ustring&',__GCHARP_TO_USTRING)
@@ -242,8 +245,8 @@ public:
   _WRAP_PROPERTY("im-module", Glib::ustring)
   _WRAP_PROPERTY("input-purpose", InputPurpose)
   _WRAP_PROPERTY("input-hints", InputHints)
-  _WRAP_PROPERTY("populate-all", bool)
   _WRAP_PROPERTY("monospace", bool)
+  _WRAP_PROPERTY("extra-menu", Glib::RefPtr<Gio::MenuModel>)
 };
 
 } //namespace Gtk
diff --git a/gtk/src/widget.hg b/gtk/src/widget.hg
index 1c510b07..7cd19c5b 100644
--- a/gtk/src/widget.hg
+++ b/gtk/src/widget.hg
@@ -556,12 +556,6 @@ public:
    */
   void remove_action_group(const Glib::ustring& name);
 
-  _WRAP_METHOD(Glib::RefPtr<Gio::ActionGroup> get_action_group(const Glib::ustring& prefix), 
gtk_widget_get_action_group, refreturn)
-  _WRAP_METHOD(Glib::RefPtr<const Gio::ActionGroup> get_action_group(const Glib::ustring& prefix) const, 
gtk_widget_get_action_group, refreturn, constversion)
-
-#m4 _CONVERSION(`const 
gchar**',`std::vector<Glib::ustring>',`Glib::ArrayHandler<Glib::ustring>::array_to_vector($3, 
Glib::OWNERSHIP_SHALLOW)')
-  _WRAP_METHOD(std::vector<Glib::ustring> list_action_prefixes() const, gtk_widget_list_action_prefixes)
-
   _WRAP_METHOD(void activate_action(const Glib::ustring& name, const Glib::VariantBase& parameter), 
gtk_widget_activate_action)
   _WRAP_METHOD(void activate_default(), gtk_widget_activate_default)
 
@@ -631,6 +625,8 @@ public:
 
   _WRAP_METHOD(void snapshot_child(Widget& child, const Glib::RefPtr<Gtk::Snapshot>& snapshot), 
gtk_widget_snapshot_child)
 
+  _WRAP_METHOD(bool should_layout() const, gtk_widget_should_layout)
+
   _WRAP_SIGNAL(void show(),"show")
   _WRAP_SIGNAL(void hide(),"hide", custom_c_callback)
 
diff --git a/tools/m4/convert_gtk.m4 b/tools/m4/convert_gtk.m4
index 1e9c3f2b..dfbeb9d1 100644
--- a/tools/m4/convert_gtk.m4
+++ b/tools/m4/convert_gtk.m4
@@ -68,6 +68,7 @@ _CONV_ENUM(Gtk,PositionType)
 _CONV_ENUM(Gtk,PreviewType)
 _CONV_ENUM(Gtk,ProgressBarOrientation)
 _CONV_ENUM(Gtk,ProgressBarStyle)
+_CONV_ENUM(Gtk,PropagationLimit)
 _CONV_ENUM(Gtk,PropagationPhase)
 _CONV_ENUM(Gtk,ReliefStyle)
 _CONV_ENUM(Gtk,RevealerTransitionType)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]