[dconf-editor] Remove unneeded parameter.
- From: Arnaud Bonatti <arnaudb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dconf-editor] Remove unneeded parameter.
- Date: Sat, 20 Jan 2018 11:14:12 +0000 (UTC)
commit 05cdf5897c020aa06df0029723fd1fd2ab3197ae
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date: Sat Jan 20 12:13:59 2018 +0100
Remove unneeded parameter.
editor/dconf-model.vala | 17 ++++-------------
1 files changed, 4 insertions(+), 13 deletions(-)
---
diff --git a/editor/dconf-model.vala b/editor/dconf-model.vala
index a017807..62c3771 100644
--- a/editor/dconf-model.vala
+++ b/editor/dconf-model.vala
@@ -134,21 +134,12 @@ public class SettingsModel : Object
return null;
}
- public SettingObject? get_object (string path, bool strict = true)
+ public SettingObject? get_object (string path)
{
- if (!is_key_path (path))
- return (SettingObject?) get_directory (path);
-
- if (strict)
+ if (is_key_path (path))
return (SettingObject?) get_key (path);
-
- GLib.ListStore? key_model = get_children (get_parent_path (path));
- string name = get_name (path);
- SettingObject? key = get_key_from_path_and_name (key_model, name);
- if (key != null)
- return key;
-
- return get_folder_from_path_and_name (key_model, name);
+ else
+ return (SettingObject?) get_directory (path);
}
public Key? get_key (string path)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]