diff options
author | Jörg Frings-Fürst <debian@jff.email> | 2019-04-28 16:45:51 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff.email> | 2019-04-28 16:45:51 +0200 |
commit | 7385922cd37e4ffe65f4af34b2795307a76670c4 (patch) | |
tree | 2d908584bfb663268004e19a23e02ce6c65034c5 /plugins/common | |
parent | 6dd5e6966c6ec10d38d4b620a053ae262ac60d86 (diff) | |
parent | 6710aa856175300e598b23b701c0d2741f2cb6b3 (diff) |
Update upstream source from tag 'upstream/0.30.4'
Update to upstream version '0.30.4'
with Debian dir 2d4b66e5f883875fb1420e1b17811073c8065d44
Diffstat (limited to 'plugins/common')
-rw-r--r-- | plugins/common/RESTSupport.vala | 12 | ||||
-rw-r--r-- | plugins/common/Resources.vala | 7 |
2 files changed, 16 insertions, 3 deletions
diff --git a/plugins/common/RESTSupport.vala b/plugins/common/RESTSupport.vala index 482fd2c..5cd3768 100644 --- a/plugins/common/RESTSupport.vala +++ b/plugins/common/RESTSupport.vala @@ -444,6 +444,18 @@ public class Transaction { public void add_argument(string name, string value) { arguments += new Argument(name, value); } + + public void set_argument(string name, string value) { + foreach (var arg in arguments) { + if (arg.key == name) { + arg.value = value; + + return; + } + } + + add_argument(name, value); + } public string? get_endpoint_url() { return (endpoint_url != null) ? endpoint_url : parent_session.get_endpoint_url(); diff --git a/plugins/common/Resources.vala b/plugins/common/Resources.vala index 29c7294..ecbf2f8 100644 --- a/plugins/common/Resources.vala +++ b/plugins/common/Resources.vala @@ -42,7 +42,7 @@ public Gdk.Pixbuf[]? load_icon_set(GLib.File? icon_file) { try { icon = new Gdk.Pixbuf.from_file(icon_file.get_path()); } catch (Error err) { - warning("couldn't load icon set from %s.", icon_file.get_path()); + warning("couldn't load icon set from %s: %s", icon_file.get_path(), err.message); } if (icon != null) { @@ -57,9 +57,10 @@ public Gdk.Pixbuf[]? load_icon_set(GLib.File? icon_file) { public Gdk.Pixbuf[]? load_from_resource (string resource_path) { Gdk.Pixbuf? icon = null; try { - icon = new Gdk.Pixbuf.from_resource (resource_path); + debug ("Loading icon from %s", resource_path); + icon = new Gdk.Pixbuf.from_resource_at_scale (resource_path, 24, 24, true); } catch (Error error) { - warning ("Couldn't load icon set from %s", resource_path); + warning ("Couldn't load icon set from %s: %s", resource_path, error.message); } if (icon != null) { |