[dconf-editor] Allow compiling with Vala 0.36.
- From: Arnaud Bonatti <arnaudb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dconf-editor] Allow compiling with Vala 0.36.
- Date: Wed, 14 Feb 2018 03:19:17 +0000 (UTC)
commit db3d293e6404fa7aab84ab1699776d00e809237a
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date: Wed Feb 14 04:18:24 2018 +0100
Allow compiling with Vala 0.36.
editor/browser-view.vala | 4 ----
editor/dconf-window.vala | 4 ++++
editor/key-list-box-row.vala | 4 ++--
editor/pathbar.vala | 6 +++++-
meson.build | 2 +-
5 files changed, 12 insertions(+), 8 deletions(-)
---
diff --git a/editor/browser-view.vala b/editor/browser-view.vala
index 2b216ed..d64b8a5 100644
--- a/editor/browser-view.vala
+++ b/editor/browser-view.vala
@@ -74,8 +74,6 @@ class BrowserView : Grid
private const GLib.ActionEntry [] action_entries =
{
- { "empty", empty , "*" },
-
{ "refresh-folder", refresh_folder },
{ "set-key-value", set_key_value, "(ssv)" },
@@ -85,8 +83,6 @@ class BrowserView : Grid
{ "toggle-gsettings-key-switch", toggle_gsettings_key_switch, "(ssbb)" }
};
- private void empty (/* SimpleAction action, Variant? variant */) {}
-
private void refresh_folder (/* SimpleAction action, Variant? path_variant */)
requires (key_model != null)
{
diff --git a/editor/dconf-window.vala b/editor/dconf-window.vala
index 606525e..17ba4bf 100644
--- a/editor/dconf-window.vala
+++ b/editor/dconf-window.vala
@@ -362,6 +362,8 @@ class DConfWindow : ApplicationWindow
private const GLib.ActionEntry [] action_entries =
{
+ { "empty", empty , "*" },
+
{ "open-folder", open_folder, "s" },
{ "open-object", open_object, "(ss)" },
{ "open-parent", open_parent, "s" },
@@ -383,6 +385,8 @@ class DConfWindow : ApplicationWindow
{ "copy-path", copy_path }
};
+ private void empty (/* SimpleAction action, Variant? variant */) {}
+
private void open_folder (SimpleAction action, Variant? path_variant)
requires (path_variant != null)
{
diff --git a/editor/key-list-box-row.vala b/editor/key-list-box-row.vala
index dcb8e2b..06006b8 100644
--- a/editor/key-list-box-row.vala
+++ b/editor/key-list-box-row.vala
@@ -370,7 +370,7 @@ private class KeyListBoxRowEditableNoSchema : KeyListBoxRow
bool key_value_boolean = key_value.get_boolean ();
Variant switch_variant = new Variant ("(sb)", key.full_name, !key_value_boolean);
- ((!) boolean_switch).set_action_name ("bro.empty");
+ ((!) boolean_switch).set_action_name ("ui.empty");
((!) boolean_switch).set_active (key_value_boolean);
((!) boolean_switch).set_detailed_action_name ("bro.toggle-dconf-key-switch(" +
switch_variant.print (false) + ")");
}
@@ -498,7 +498,7 @@ private class KeyListBoxRowEditable : KeyListBoxRow
{
bool key_value_boolean = key_value.get_boolean ();
Variant switch_variant = new Variant ("(ssbb)", key.full_name, key.schema_id,
!key_value_boolean, key.default_value.get_boolean ());
- ((!) boolean_switch).set_action_name ("bro.empty");
+ ((!) boolean_switch).set_action_name ("ui.empty");
((!) boolean_switch).set_active (key_value_boolean);
((!) boolean_switch).set_detailed_action_name ("bro.toggle-gsettings-key-switch(" +
switch_variant.print (false) + ")");
}
diff --git a/editor/pathbar.vala b/editor/pathbar.vala
index 1cad0d4..27b255d 100644
--- a/editor/pathbar.vala
+++ b/editor/pathbar.vala
@@ -176,7 +176,7 @@ public class PathBar : Box
if (state)
{
item.cursor_type = PathBarItem.CursorType.CONTEXT;
- item.set_action_name (null);
+ item.set_action_name ("ui.empty");
item.set_sensitive (true); // GAction do not play well with other kind of... reactions
context.add_class ("active");
}
@@ -230,7 +230,11 @@ private class PathBarItem : Button
private void update_cursor ()
{
if (cursor_type != CursorType.CONTEXT)
+ {
+ cursor_type = CursorType.CONTEXT;
+ set_new_cursor_type (cursor_type);
return;
+ }
GLib.Menu menu = new GLib.Menu ();
menu.append (_("Copy current path"), "ui.copy-path"); // or "app.copy(\"" + get_action_target_value
().get_string () + "\")"
diff --git a/meson.build b/meson.build
index 6f00dff..52f4b10 100644
--- a/meson.build
+++ b/meson.build
@@ -26,7 +26,7 @@ dconf_editor_namespace = 'ca.desrt.dconf-editor'
cc = meson.get_compiler('c')
valac = meson.get_compiler('vala')
-vala_req_version = '>= 0.39.4'
+vala_req_version = '>= 0.36.11'
assert(valac.version().version_compare(vala_req_version),
'vala ' + vala_req_version + ' is required')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]