app: start porting away from GtkAction and friends

Step one: get rid of all those deprecation warnings that make
it hard to see any other warnings:

- add a lot of dummy API to GimpAction, GimpActionGroup, GimpUIManager
  etc. which simply forwards to the deprecated GTK functions, they
  will all go away again later
- rename GimpAction to GimpActionImpl
- add interface GimpAction that is implemented by all action classes,
  creates a common interface and allows to remove some duplicated
  logic from GimpToggleAction and GimpRadioAction, and at the same
  time adds more features

(cherry picked from commit 86e07c16b5)

Merged to gimp-2-10 to keep the diff to master as small as possible
This commit is contained in:
Michael Natterer
2019-07-02 03:54:38 +02:00
parent 5801ee048f
commit 417d0dccd7
79 changed files with 1576 additions and 1131 deletions

View File

@ -172,18 +172,17 @@ tool_options_actions_update_presets (GimpActionGroup *group,
for (i = 0; ; i++)
{
gchar *action_name;
GtkAction *action;
gchar *action_name;
GimpAction *action;
action_name = g_strdup_printf ("%s-%03d", action_prefix, i);
action = gtk_action_group_get_action (GTK_ACTION_GROUP (group),
action_name);
action = gimp_action_group_get_action (group, action_name);
g_free (action_name);
if (! action)
break;
gtk_action_group_remove_action (GTK_ACTION_GROUP (group), action);
gimp_action_group_remove_action (group, action);
}
if (presets)