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 723124 - Wrap GtkActionBar
Wrap GtkActionBar
Status: RESOLVED FIXED
Product: gtkmm
Classification: Bindings
Component: general
3.11.x
Other Linux
: Normal normal
: ---
Assigned To: gtkmm-forge
gtkmm-forge
Depends on:
Blocks:
 
 
Reported: 2014-01-27 21:36 UTC by Juan R. Garcia Blanco
Modified: 2014-04-07 15:24 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
GtkActionBar wrapper (5.18 KB, patch)
2014-01-27 21:36 UTC, Juan R. Garcia Blanco
none Details | Review
Gtk::ActionBar example (6.63 KB, patch)
2014-01-30 20:52 UTC, Juan R. Garcia Blanco
committed Details | Review
patch: Use fallback for symbolic icons (4.48 KB, patch)
2014-04-07 09:14 UTC, Kjell Ahlstedt
none Details | Review

Description Juan R. Garcia Blanco 2014-01-27 21:36:14 UTC
Created attachment 267349 [details] [review]
GtkActionBar wrapper

I've a working example, but I didn't generated the corresponding patch to gtkmm-documentation.

I guess this is not strictly correct: I've generated this patch from HEAD, the exact same point I generated the patch for GtkPopover from. I presume these two patches will therefore conflict a little bit :(
Comment 1 Murray Cumming 2014-01-28 09:55:33 UTC
That looks fine. Thanks. Please push it if you have write access.
Comment 2 Juan R. Garcia Blanco 2014-01-28 19:17:02 UTC
Sorry, I don't have write access.

Please, let this bug report open, as I can post here an example for the book.
Comment 3 Murray Cumming 2014-01-29 11:42:53 UTC
Pushed to master. Thanks.

We should probably get you direct git write access soon.
Comment 4 Juan R. Garcia Blanco 2014-01-30 10:15:22 UTC
Perfect. Thank you.
Comment 5 Juan R. Garcia Blanco 2014-01-30 20:52:03 UTC
Created attachment 267674 [details] [review]
Gtk::ActionBar example
Comment 6 Kjell Ahlstedt 2014-04-07 09:14:44 UTC
Created attachment 273692 [details] [review]
patch: Use fallback for symbolic icons

Suggested changes to
  examples/book/actionbar/examplewindow.cc
  examples/book/headerbar/examplewindow.cc
  examples/book/popover/examplewindow.cc
  examples/book/searchbar/examplewindow.cc

if (Gtk::Image* image = dynamic_cast<Gtk::Image*>(m_prev_button.get_image()))
  image->property_use_fallback() = true;

is ugly. GtkImage has no get/set methods corresponding to the use-fallback
property. Perhaps Gtk::Button::set_image_from_icon_name() should have had a
'bool use_fallback' argument.
Comment 7 Murray Cumming 2014-04-07 09:26:14 UTC
Comment on attachment 273692 [details] [review]
patch: Use fallback for symbolic icons

It seems fine to me. Feel free to add a bool to that method. I trust your judgement.
Comment 8 Murray Cumming 2014-04-07 09:28:16 UTC
Although I have no idea what use-fallback means there. The GtkImage documentation doesn't explain it.
Comment 9 Kjell Ahlstedt 2014-04-07 15:24:42 UTC
I have pushed a gtkmm patch that adds
void Button::set_image_from_icon_name(const Glib::ustring& icon_name,
  IconSize size, bool use_fallback),
https://git.gnome.org/browse/gtkmm/commit/?id=a8fb2b77aa0530faeedfce721f1782c7bdfcbc44

and a gtkmm-documentation patch where this new method overload is used,
https://git.gnome.org/browse/gtkmm-documentation/commit/?id=12959d5c02ef1d1e7bd552078b87c3db7d7787fc

Now some icons are shown even if you have selected an icon theme that lacks
*-symbolic named icons.