[gtkmm] Widget: Add remove_action_group().
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm] Widget: Add remove_action_group().
- Date: Tue, 17 Sep 2013 11:23:07 +0000 (UTC)
commit fa707a807c2cc788061df46d1128c21da3c58340
Author: Murray Cumming <murrayc murrayc com>
Date: Tue Sep 17 13:22:12 2013 +0200
Widget: Add remove_action_group().
* gtk/src/widget.[hg|ccg]: Now that we know that
gtk_widget_insert_action_group() can take NULL to mean this.
See GTK+ bug #708150 .
gtk/src/widget.ccg | 6 +++++-
gtk/src/widget.hg | 9 +++++++++
2 files changed, 14 insertions(+), 1 deletions(-)
---
diff --git a/gtk/src/widget.ccg b/gtk/src/widget.ccg
index 0a39e9e..ba53ce8 100644
--- a/gtk/src/widget.ccg
+++ b/gtk/src/widget.ccg
@@ -721,10 +721,14 @@ void Widget::unset_cursor()
gtk_widget_override_cursor(gobj(), 0, 0);
}
-
void Widget::transform_cairo_context_to_window(const Cairo::RefPtr<Cairo::Context>& cr, const
Glib::RefPtr<const Gdk::Window>& window)
{
gtk_cairo_transform_to_window((cr)->cobj(), gobj(),
const_cast<GdkWindow*>(Glib::unwrap<Gdk::Window>(window)));
}
+void Widget::remove_action_group(const Glib::ustring& name)
+{
+ gtk_widget_insert_action_group(gobj(), name.c_str(), 0 /* see C docs */);
+}
+
} // namespace Gtk
diff --git a/gtk/src/widget.hg b/gtk/src/widget.hg
index 73644d1..02f75a0 100644
--- a/gtk/src/widget.hg
+++ b/gtk/src/widget.hg
@@ -573,6 +573,15 @@ public:
//but it is sometimes helpful to call it from outside:
_WRAP_METHOD(void insert_action_group(const Glib::ustring& name, const Glib::RefPtr<Gio::ActionGroup>&
group), gtk_widget_insert_action_group)
+ /** Removes a group from the widget.
+ * See insert_action_group().
+ *
+ * @param name The prefix for actions.
+ *
+ * @newin{3,10}
+ */
+ void remove_action_group(const Glib::ustring& name);
+
_WRAP_SIGNAL(void show(),"show")
_WRAP_SIGNAL(void hide(),"hide", custom_c_callback)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]