summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMurray Cumming <murrayc@murrayc.com>2013-10-08 09:42:57 +0200
committerMurray Cumming <murrayc@murrayc.com>2013-10-08 09:42:57 +0200
commitc364ee5a1fbdd7bada2e59d84e509a460ee185f2 (patch)
treeb6f6018161caed98925f12a478583fa93610ad19
parent3aec72e2642f9daad798fb0206308b119b2a9684 (diff)
downloadglibmm-c364ee5a1fbdd7bada2e59d84e509a460ee185f2.tar.gz
Action: print_detailed_name(): Remove the action_name parameter.
* gio/src/action.hg: This is a non-static version of the method, so we can just use get_name(). We already use the instance to get the state type.
-rw-r--r--gio/src/action.hg11
1 files changed, 4 insertions, 7 deletions
diff --git a/gio/src/action.hg b/gio/src/action.hg
index f5c4a687..ecd8c704 100644
--- a/gio/src/action.hg
+++ b/gio/src/action.hg
@@ -174,9 +174,7 @@ public:
//TODO: _WRAP_METHOD(static bool parse_detailed_name(const Glib::ustring& detailed_name, gchar** action_name, GVariant** target_value), g_action_parse_detailed_name, errthrow)
- /** Formats a detailed action name from @a action_name and @a target_value.
- *
- * It is an error to call this function with an invalid action name.
+ /** Formats a detailed action name from the action's action_name and @a target_value.
*
* This function is the opposite of parse_detailed_action_name().
* It will produce a string that can be parsed back to the @a action_name
@@ -185,12 +183,11 @@ public:
* See that function for the types of strings that will be printed by
* this function.
*
- * @param action_name A valid action name.
* @param target_value A Variant target value.
* @result A detailed format string.
*/
template <typename T_Value>
- Glib::ustring print_detailed_name(const Glib::ustring& action_name, const T_Value& value);
+ Glib::ustring print_detailed_name(const T_Value& value);
_WRAP_METHOD(static Glib::ustring print_detailed_name_variant(const Glib::ustring& action_name, const Glib::VariantBase& parameter), g_action_print_detailed_name)
@@ -254,14 +251,14 @@ void Action::get_state_hint(T_Value& value) const
}
template <typename T_Value>
-Glib::ustring Action::print_detailed_name(const Glib::ustring& action_name, const T_Value& parameter)
+Glib::ustring Action::print_detailed_name(const T_Value& parameter)
{
typedef Glib::Variant<T_Value> type_glib_variant;
g_return_val_if_fail(
g_variant_type_equal(g_action_get_parameter_type(const_cast<GAction*>(gobj())), type_glib_variant::variant_type().gobj()),
Glib::ustring());
- return print_detailed_name_variant(type_glib_variant::create(parameter));
+ return print_detailed_name_variant(get_name(), type_glib_variant::create(parameter));
}
template <typename T_Value>