[amtk/wip/misc] Support detailed GAction names in factory functions



commit 87387a8a5c7a70c00435a75a2ab9e83ab82f87d1
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Mon Apr 27 17:39:04 2020 +0200

    Support detailed GAction names in factory functions

 amtk/NOTES              | 17 ++---------------
 amtk/amtk-action-info.c |  8 +++++---
 amtk/amtk-action-info.h |  7 ++++---
 3 files changed, 11 insertions(+), 21 deletions(-)
---
diff --git a/amtk/NOTES b/amtk/NOTES
index 64cc2e2..69355f4 100644
--- a/amtk/NOTES
+++ b/amtk/NOTES
@@ -1,21 +1,8 @@
 Amtk notes
 ==========
 
-TODO list
----------
-
-- Support detailed GAction names in factory functions:
-       - In AmtkActionInfo, document that the "action name" can be a detailed
-         action name, with a reference to g_action_parse_detailed_name().
-       - In AmtkFactory, call gtk_actionable_set_detailed_action_name() and
-         adapt docs.
-       - Adapt docs and code in other classes if needed (but I think it's only
-         in AmtkActionInfo and AmtkFactory).
-
-- Implement more factory functions.
-
-Other possible things to do
----------------------------
+Possible things to do
+---------------------
 
 - When calling amtk_menu_item_set_icon_name(), do not have a large margin on
   the left. GtkUIManager was able to put the icon without the large margin (in
diff --git a/amtk/amtk-action-info.c b/amtk/amtk-action-info.c
index cf517d6..371c8d8 100644
--- a/amtk/amtk-action-info.c
+++ b/amtk/amtk-action-info.c
@@ -1,7 +1,7 @@
 /*
  * This file is part of Amtk - Actions, Menus and Toolbars Kit
  *
- * Copyright 2017, 2018 - Sébastien Wilmet <swilmet gnome org>
+ * Copyright 2017, 2018, 2020 - Sébastien Wilmet <swilmet gnome org>
  *
  * Amtk is free software; you can redistribute it and/or modify it under
  * the terms of the GNU Lesser General Public License as published by the
@@ -211,7 +211,8 @@ amtk_action_info_copy (const AmtkActionInfo *info)
  * amtk_action_info_get_action_name:
  * @info: an #AmtkActionInfo.
  *
- * Returns: (nullable): the action name, or %NULL. Example: `"win.save"`.
+ * Returns: (nullable): the action name, or %NULL. Example: `"win.save"`. Can be
+ * a detailed action name, see g_action_parse_detailed_name().
  * Since: 2.0
  */
 const gchar *
@@ -227,7 +228,8 @@ amtk_action_info_get_action_name (const AmtkActionInfo *info)
  * @info: an #AmtkActionInfo.
  * @action_name: the action name.
  *
- * Sets the action name, for example `"win.save"`.
+ * Sets the action name, for example `"win.save"`. Can be a detailed action
+ * name, see g_action_parse_detailed_name().
  *
  * Since: 2.0
  */
diff --git a/amtk/amtk-action-info.h b/amtk/amtk-action-info.h
index 18058ca..8e54fbd 100644
--- a/amtk/amtk-action-info.h
+++ b/amtk/amtk-action-info.h
@@ -1,7 +1,7 @@
 /*
  * This file is part of Amtk - Actions, Menus and Toolbars Kit
  *
- * Copyright 2017 - Sébastien Wilmet <swilmet gnome org>
+ * Copyright 2017, 2020 - Sébastien Wilmet <swilmet gnome org>
  *
  * Amtk is free software; you can redistribute it and/or modify it under
  * the terms of the GNU Lesser General Public License as published by the
@@ -33,11 +33,12 @@ G_BEGIN_DECLS
 
 /**
  * AmtkActionInfoEntry:
- * @action_name: the action name.
+ * @action_name: the action name. Can be a detailed action name, see
+ *   g_action_parse_detailed_name().
  * @icon_name: the icon name, or %NULL.
  * @label: the label (i.e. a short description) with a mnemonic, or %NULL.
  * @accel: the accelerator, in the format understood by gtk_accelerator_parse().
- * Or %NULL.
+ *   Or %NULL.
  * @tooltip: the tooltip (i.e. a long description), or %NULL.
  *
  * This struct defines a set of information for a single action. It is for use


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