aboutsummaryrefslogtreecommitdiffstats
path: root/e-util
diff options
context:
space:
mode:
Diffstat (limited to 'e-util')
-rw-r--r--e-util/e-xml-utils.c22
-rw-r--r--e-util/e-xml-utils.h5
2 files changed, 25 insertions, 2 deletions
diff --git a/e-util/e-xml-utils.c b/e-util/e-xml-utils.c
index 7802d5daf8..db6be09ebc 100644
--- a/e-util/e-xml-utils.c
+++ b/e-util/e-xml-utils.c
@@ -148,6 +148,26 @@ e_xml_get_double_prop_by_name(const xmlNode *parent, const xmlChar *prop_name)
return ret_val;
}
+double
+e_xml_get_double_prop_by_name_with_default(const xmlNode *parent, const xmlChar *prop_name,
+ gdouble def)
+{
+ xmlChar *prop;
+ double ret_val = 0;
+
+ g_return_val_if_fail (parent != NULL, 0);
+ g_return_val_if_fail (prop_name != NULL, 0);
+
+ prop = xmlGetProp ((xmlNode *)parent, prop_name);
+ if (prop) {
+ sscanf (prop, "%lf", &ret_val);
+ xmlFree (prop);
+ } else {
+ ret_val = def;
+ }
+ return ret_val;
+}
+
void
e_xml_set_double_prop_by_name(xmlNode *parent, const xmlChar *prop_name, double value)
{
@@ -182,7 +202,7 @@ e_xml_get_string_prop_by_name(const xmlNode *parent, const xmlChar *prop_name)
}
void
-e_xml_set_string_prop_by_name(xmlNode *parent, const xmlChar *prop_name, char *value)
+e_xml_set_string_prop_by_name(xmlNode *parent, const xmlChar *prop_name, const char *value)
{
g_return_if_fail (parent != NULL);
g_return_if_fail (prop_name != NULL);
diff --git a/e-util/e-xml-utils.h b/e-util/e-xml-utils.h
index 6d857e4e1d..0a722112f0 100644
--- a/e-util/e-xml-utils.h
+++ b/e-util/e-xml-utils.h
@@ -47,6 +47,9 @@ void e_xml_set_bool_prop_by_name (xmlNode *parent,
double e_xml_get_double_prop_by_name (const xmlNode *parent,
const xmlChar *prop_name);
+double e_xml_get_double_prop_by_name_with_default(const xmlNode *parent,
+ const xmlChar *prop_name,
+ gdouble def);
void e_xml_set_double_prop_by_name (xmlNode *parent,
const xmlChar *prop_name,
double value);
@@ -55,7 +58,7 @@ char *e_xml_get_string_prop_by_name (const xmlNode *parent,
const xmlChar *prop_name);
void e_xml_set_string_prop_by_name (xmlNode *parent,
const xmlChar *prop_name,
- char *value);
+ const char *value);
char *e_xml_get_translated_string_prop_by_name (const xmlNode *parent,
const xmlChar *prop_name);
-11-06 07:27:49 +0800'>2018-11-061-1/+5 * Mark as deprecated, it is an abandonware (project staled since 2015)bapt2018-11-041-1/+4 * Mark as deprecated, GNU classpath as stalled since 2012bapt2018-11-021-0/+3 * Update subversion to 1.11.0.lev2018-11-022-2/+2 * . Update to 8u192.glewis2018-10-282-4/+4 * New port: java/wildfly14pi2018-10-287-0/+1658 * New port: java/wildfly13pi2018-10-288-0/+1632 * New port: java/wildfly12pi2018-10-288-0/+1583 * . Update to 8u192.glewis2018-10-283-10/+11 * . Update to 8u192.glewis2018-10-283-6/+7 * Apparently now builds on powerpc64.linimon2018-10-271-2/+0 * devel/icu: update to 63.1jbeich2018-10-231-1/+1 * java/intellij: Update to version 2018.2.5bsam2018-10-202-5/+5 * (1) Update to 1.10.3.lev2018-10-101-1/+1 * java/intellij: Update to version 2018.2.4bsam2018-10-082-5/+5 * . Add a doc port for JDK 10.glewis2018-10-084-0/+50 * java/intellij-ultimate: update to 2018.2.3kbowling2018-09-253-6/+14 * Deprecate dead -devel portsantoine2018-09-161-0/+2 * . Update to 8u181.glewis2018-09-162-6/+6 * . Update to 8u181.glewis2018-09-163-227/+19 * java/intellij: Update to version 2018.2.3bsam2018-09-133-5/+10 * Change x11/xorgproto to become a build depzeising2018-09-122-2/+2 * Add DOCS options to ports that should have one.mat2018-09-104-0/+8 * . Update to 8u181.glewis2018-09-095-681/+849 * . Update to 10.0.2.glewis2018-09-092-4/+4 * . Update to 10.0.2.glewis2018-09-093-5/+5 * java/jlint: Fix build with Clang 6tobik2018-09-013-7/+132 * Update java/intellij-ultimate to 2018.2.2 versiontimur2018-08-313-198/+295 * java/jdk8-doc: update 8u172 -> 8u181pi2018-08-312-5/+6 * java/jikes: Unbreak on 12.0 and fix build with Clang 6tobik2018-08-261-3/+1 * www/webkit2-gtk3, java/openjfx8-devel: unbreak with libc++ 7jbeich2018-08-231-0/+17 * Remove expired ports:rene2018-08-215-97/+0 * java/intellij: Update to version 2018.2.1bsam2018-08-153-179/+269 * Switch to xorgproto instead of individual packageszeising2018-08-011-2/+2 * Bump PORTREVISION for ports depending on the canonical version of GCCgerald2018-07-303-3/+3 * java/intellij-ultimate: Update to 2018.1.6swills2018-07-273-15/+11 * Deprecate ports broken for more than 5 monthsantoine2018-07-171-0/+2 * Remove java/jaf port, since the Java Activation Framework is included byale2018-07-176-67/+6 * bouncycastle15: update to version 1.60eugen2018-07-152-4/+4 * Unbreakantoine2018-07-151-1/+2 * Give the npapi-headers distfile a slightly better filenametobik2018-07-072-3/+3 * Attempt to unbreak java/icedtea-webtobik2018-07-073-3/+22 * . Sync the cacerts file with the version in the latest Oracle binary release.glewis2018-07-032-0/+1 * . Update to 8u172.glewis2018-07-022-4/+4 * devel/icu: update to 62.1jbeich2018-06-291-1/+1 * Replace bsd.qt.mk by Uses/qt.mk and Uses/qt-dist.mktcberner2018-06-291-1/+2 * This fails on amd64-12 as well.linimon2018-06-261-3/+1 * Mark as broken on arm on -CURRENT.linimon2018-06-251-0/+4 * java/icedtea-web: mark as BROKEN after www/libxul removalrene2018-06-231-0/+1 * java/icedtea-web: remove optional support for expired www/libxul.rene2018-06-232-15/+2 * Reset MAINTAINER on ports maintained by amutu@amutu.comyuri2018-06-221-1/+1 * Mark these ports as broken on aarch64, and, where appropriate, on armvX.linimon2018-06-221-0/+1 * - Add LICENSEamdmi32018-06-191-0/+7 * Add Oracle Linux Java 10 JDK/JRE/Server JRE.lev2018-06-1916-0/+2149 * Mark as broken on powerpc64.linimon2018-06-171-0/+2 * java/intellij: Update to version 2018.1.5bsam2018-06-162-5/+5 * Mark as broken on powerpc64.linimon2018-06-051-3/+4 * Fix packaging with DEFAULT_VERSIONS=python=3.xantoine2018-05-281-1/+1 * java/intellij: Update to version 2018.1.4bsam2018-05-273-12/+11 * Fix packaging with DEFAULT_VERSIONS=python=3.xantoine2018-05-271-2/+2 * Update to 8u172glewis2018-05-272-6/+6 * . Update to 8u172.glewis2018-05-273-179/+174 * Fix packaging with DEFAULT_VERSIONS=python=3.xantoine2018-05-261-1/+1 * java/visualvm: update to 1.4.1swills2018-05-252-4/+4 * . Update to 2018e.glewis2018-05-222-4/+4 * . Update to 8u172.glewis2018-05-216-753/+745 * Fix build on head.jkim2018-05-161-49/+48 * Update to 6.0.3 release.ale2018-05-112-4/+4 * - Fix tests and switch to new test frameworkamdmi32018-05-061-4/+3 * Remove redundant PKGMESSAGE assignment, which is set appropriatelydanfe2018-05-061-1/+0 * Update to 2018.1.1krion2018-05-043-526/+438 * multimedia/ffmpeg: update to 4.0jbeich2018-05-021-0/+1 * Update to 6.0.2 release.ale2018-04-262-4/+4 * Only sleep in ports if BATCH/PACKAGE_BUILDING are not defined.mat2018-04-261-0/+2 * java/java-checkstyle: Update version 8.7=>8.9bofh2018-04-252-4/+4 * java/openjfx8-scenebuilder: Update to 8u172-b11tobik2018-04-222-5/+4 * java/openjfx8-devel: Update to 8u172-b11tobik2018-04-226-23/+43 * (1) Remove devel/subversion18lev2018-04-201-10/+5 * java/intellij: Update to version 2018.1bsam2018-04-173-768/+869 * Update to 2018.1.1.vanilla2018-04-163-804/+887 * Update to latest & newest version 1.10.0lev2018-04-161-1/+1 * devel/icu: update to 61.1jbeich2018-04-061-0/+1 * . Tweak message.glewis2018-04-061-1/+1 * . Tweak message.glewis2018-04-061-1/+1 * . Tweak message.glewis2018-04-061-1/+1 * . Correct description.glewis2018-04-062-2/+2 * . Update to 2018d.glewis2018-04-062-4/+4 * Use BINARY_ALIAS to make LLD_UNSAFE more widely applicableemaste2018-03-291-1/+0 * Switch to ld.bfd by default as ld.ldd doesn't have built-in defaultkrion2018-03-291-0/+2 * Make libgnome and libgnomeui not implying esound dependencybapt2018-03-261-1/+1 * java/intellij: Update to version 2017.3.5.bsam2018-03-263-6/+8 * devel/apr1: Bump portrevisionbrnrd2018-03-221-1/+1 * devel/apr1: Fix runtime issues of dependent portbrnrd2018-03-221-0/+1 * Mark BROKEN: fails to buildantoine2018-03-121-0/+2 * Bump PORTREVISIONs of all users of math/mpc that we just updated togerald2018-03-112-1/+2 * java/openjfx8-scenebuilder: Add desktop entrytobik2018-03-081-0/+3 * . Link libinstrument.so with iconv and jli as intended.glewis2018-03-062-4/+14 * Update to 6.0.1 release.ale2018-03-052-4/+4 * . Allow thread names to be set on FreeBSD.glewis2018-03-051-0/+23 * . Add a FONTCONFIG option which allows scaler to obtain per-family FreeTypeglewis2018-03-042-1/+228 * Update to 6.0 release.ale2018-03-024-5/+6 * Apply an upstream patch to fix Zero.jkim2018-02-283-0/+63 * . Add a port of the documentation for Java 9.glewis2018-02-274-0/+48 * . Update to docs for 8u162.glewis2018-02-262-4/+4 * Remove dead code: Java support (via GCJ) has not been part of any ofgerald2018-02-251-5/+2 * Respect the LINUX_ARCH settingglewis2018-02-243-72/+87 * Respect the LINUX_ARCH settingglewis2018-02-243-96/+121 * . Update to b45.glewis2018-02-183-156/+360 * . Update to 2018c.glewis2018-02-153-4/+5 * java/aparapi: fix recent LLVM6 fallout caused by the switch to default to C++...jmd2018-02-092-9/+11 * . Fix the build for i386 when WITH_LLD_IS_LD is set.glewis2018-02-082-0/+12 * . Update to 7u161.glewis2018-02-084-890/+763 * . Update to 8u162.glewis2018-02-044-691/+744 * java/openjfx8-scenebuilder: Update to 8u172-b03tobik2018-02-012-4/+4 * java/openjfx8-devel: Update to 8u172-b03tobik2018-02-0114-93/+69 * java/intellij: Update to version 2017.3.4.bsam2018-01-303-6/+6 * Update to 9.0.4.jkim2018-01-306-134/+138 * Update to 8u162.jkim2018-01-30