aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gmenuharness/MenuItemMatcher.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/gmenuharness/MenuItemMatcher.cpp b/src/gmenuharness/MenuItemMatcher.cpp
index 2280ef5..ab22364 100644
--- a/src/gmenuharness/MenuItemMatcher.cpp
+++ b/src/gmenuharness/MenuItemMatcher.cpp
@@ -354,6 +354,22 @@ MenuItemMatcher& MenuItemMatcher::string_attribute(const string& name, const str
&gvariant_deleter));
}
+MenuItemMatcher& MenuItemMatcher::int32_attribute(const std::string& name, int value)
+{
+ return attribute(
+ name,
+ shared_ptr<GVariant>(g_variant_new_int32 (value),
+ &gvariant_deleter));
+}
+
+MenuItemMatcher& MenuItemMatcher::double_attribute(const std::string& name, double value)
+{
+ return attribute(
+ name,
+ shared_ptr<GVariant>(g_variant_new_double (value),
+ &gvariant_deleter));
+}
+
MenuItemMatcher& MenuItemMatcher::toggled(bool isToggled)
{
p->m_isToggled = make_shared<bool>(isToggled);