Re: Examples not working




2014-07-04 15:50, Gurjot Singh skrev:
On 4 July 2014 19:16, Kjell Ahlstedt <kjell ahlstedt bredband net> wrote:
dpkg -s libglibmm-2.4-dev
gives me:
Version: 2.37.4-0ubuntu3

Ok so my version is older, then what should I do now? Install newer or
change 'add_action' part?
If latter, then replace it with what?

If you can install a newer version of glibmm without too much trouble,
that's the best solution.

The example programs in the gtkmm tutorial are updated now and then when new
API is added to glibmm or gtkmm, and old API is deprecated. If you compile
more example programs, you may find other programs that require fairly new
versions of glibmm and gtkmm.
Wait a sec,
I have 2.37.4 version of glibmm, and from this:
https://developer.gnome.org/glibmm/2.37/classGio_1_1ActionMap.html#a784dfa4573e994ac452d5e2dd56a5909
I can see that 'add_action' is supported.
So maybe I should use something like:
Gio::ActionMap::add_action

Is that okay?

The version of the overloaded add_action() method that's used in the example programs exists in glibmm 2.37.6, but not in 2.37.4. I suspect that developer.gnome.org/glibmm/2.37 shows one of the latest 2.37.x versions, either 2.37.7 or 2.37.93.

Gio::ActionMap is a base class of Gio::SimpleActionGroup. Gio::ActionMap::add_action() is exactly what's used in the example program.

There is an older version of the main_menu program at
https://git.gnome.org/browse/gtkmm-documentation/tree/examples/book/menus/main_menu?h=gtkmm-3-2
It uses some deprecated functions that will disappear some time in the future.

Kjell



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