[gnome-control-center/wip/hadess/power-profile-holds: 3/6] power: Move variant_lookup_string() helper function
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/wip/hadess/power-profile-holds: 3/6] power: Move variant_lookup_string() helper function
- Date: Mon, 19 Jul 2021 22:51:55 +0000 (UTC)
commit 05997b424c869736ff2f1f90dd979e637d01a6fd
Author: Bastien Nocera <hadess hadess net>
Date: Fri Jul 16 10:07:28 2021 +0200
power: Move variant_lookup_string() helper function
panels/power/cc-power-panel.c | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
---
diff --git a/panels/power/cc-power-panel.c b/panels/power/cc-power-panel.c
index 1869be065..4633627c2 100644
--- a/panels/power/cc-power-panel.c
+++ b/panels/power/cc-power-panel.c
@@ -1343,6 +1343,18 @@ setup_power_saving (CcPowerPanel *self)
#endif
}
+static const char *
+variant_lookup_string (GVariant *dict,
+ const char *key)
+{
+ GVariant *variant;
+
+ variant = g_variant_lookup_value (dict, key, G_VARIANT_TYPE_STRING);
+ if (!variant)
+ return NULL;
+ return g_variant_get_string (variant, NULL);
+}
+
static void
performance_profile_set_active (CcPowerPanel *self,
const char *profile_str)
@@ -1427,18 +1439,6 @@ perf_profile_list_box_sort (GtkListBoxRow *row1,
return 0;
}
-static const char *
-variant_lookup_string (GVariant *dict,
- const char *key)
-{
- GVariant *variant;
-
- variant = g_variant_lookup_value (dict, key, G_VARIANT_TYPE_STRING);
- if (!variant)
- return NULL;
- return g_variant_get_string (variant, NULL);
-}
-
static void
power_profiles_properties_changed_cb (CcPowerPanel *self,
GVariant *changed_properties,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]