After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 704964 - Wrap Gtk::Stack and Gtk::StackSwitcher
Wrap Gtk::Stack and Gtk::StackSwitcher
Status: RESOLVED FIXED
Product: gtkmm
Classification: Bindings
Component: build
3.9.x
Other Linux
: Normal normal
: ---
Assigned To: gtkmm-forge
gtkmm-forge
Depends on:
Blocks:
 
 
Reported: 2013-07-27 00:41 UTC by Andrew Potter
Modified: 2013-10-07 08:09 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to (12.76 KB, patch)
2013-07-27 00:41 UTC, Andrew Potter
needs-work Details | Review

Description Andrew Potter 2013-07-27 00:41:44 UTC
Created attachment 250248 [details] [review]
Patch to 

The attached patch wraps GtkStack and GtkStackSwitcher. I could use some feedback. Specifically, should add_named() and add_titled() be both overloaded into add()?

My jhbuild is deleting stack.hg and stackswitcher.hg when it does the distclean option, so I may be missing a declaration?

I did not use the entire output of the new generated gtk_signals.defs because there appeared to be some noise in the diff; instead I just pasted in the relevant portion.

If everything looks mostly sane, please let me know and I'll start on SearchBar and Revealer.
Comment 1 Murray Cumming 2013-07-29 08:18:02 UTC
Review of attachment 250248 [details] [review]:

Thanks. This just needs some small improvements.

::: gtk/src/stack.hg
@@ +45,3 @@
+  _WRAP_METHOD(void add_named(Gtk::Widget& child, const Glib::ustring& name), gtk_stack_add_named)
+
+  _WRAP_METHOD(void add_titled(Gtk::Widget& child, const Glib::ustring& name, const Glib::ustring& title), gtk_stack_add_titled)

I guess these should both just be add() method overloads.

@@ +48,3 @@
+
+  _WRAP_METHOD(void set_visible_child(Gtk::Widget& child), gtk_stack_set_visible_child)
+  _WRAP_METHOD(Gtk::Widget* get_visible_child() const, gtk_stack_get_visible_child)

That should be two methods:

Widget* get_visible_child()
and
const Widget* get_visible_child() const

::: gtk/src/stackswitcher.hg
@@ +35,3 @@
+ * the Gtk::Stack.
+ *
+ * It is possible to associate multiple GtkStackSwitcher widgets with

Please refer to StackSwitcher rather than GtkStackSwitcher or Gtk::StackSwitcher.

@@ +49,3 @@
+
+  _WRAP_METHOD(void set_stack(Stack& stack), gtk_stack_switcher_set_stack)
+  _WRAP_METHOD(Stack* get_stack() const, gtk_stack_switcher_get_stack)

That should be two methods:

Stack* get_stack()
and
const Stack* get_stack() const

Also, if there are no signals and/or no vfuncs, could you add a comment saying that, please.
Comment 2 Murray Cumming 2013-09-18 08:17:38 UTC
I have made those corrections myself and pushed it. Many thanks.
Comment 3 Murray Cumming 2013-10-07 08:09:16 UTC
Would you like to create an example for this in gtkmm-documentation in examples/book/stack/ ?