This worked out for the toolbar and also for a static popup menu.
What I am missing is how I can create dynamic popups. For example, when someone right-clicks on a file, different entries in the popup menu should be shown, depending on user preferences which are not available at compile time. How is that solved using GtkUIManager and GtkActions? Unfortunately in the migration guide above this part is missing.
Can anyone here kindly point me to a simple example how a dynamic popup would be created in Gtk in C/C++? In particular, I am talking about a popup menu where its entries depend on the file which is clicked on in the file manager.
The minimum Gtk version of Gnome Commander is 2.18 at the moment. I do not consider to lift it to something of >=3.0. Hope that is possible.
Please, at least bump the requirement to GTK 2.24; anything prior to that is deeply unnecessary, and a ridiculous dependency. GTK 2.18 was released more than 11 years ago, and nothing should ship it. I mean: GTK 2 is basically dead, at this point—it will cease to see any further release and activity as soon as GTK 4.0 is out—but depending on 2.18 is basically pointless.
GtkUIManager is deprecated in GTK3, and has been removed in GTK4 in favour of GMenu to describe menus. GTK4 also dropped all menu widgets, in favour of a declarative approach. Of course, you cannot use GMenu with GTK2, unless you create your own version of gtk_menu_new_from_model().
Thank you for pointing me to those methods, Emmanuele! I will take a look into the example you provided.
Regarding the version: 2.18 is only the minimum dependency as there was no need to increase it from the code perspective. If the system on which Gnome Commander is built has a higher gtk2 version, there should be no problem. No?