gcalctool r2102 - in trunk: . gcalctool
- From: rancell svn gnome org
- To: svn-commits-list gnome org
- Subject: gcalctool r2102 - in trunk: . gcalctool
- Date: Tue, 27 May 2008 23:24:46 +0000 (UTC)
Author: rancell
Date: Tue May 27 23:24:46 2008
New Revision: 2102
URL: http://svn.gnome.org/viewvc/gcalctool?rev=2102&view=rev
Log:
Default to no thousands separator not ',' (Bug #527669)
Modified:
trunk/ChangeLog
trunk/gcalctool/display.c
trunk/gcalctool/get.c
Modified: trunk/gcalctool/display.c
==============================================================================
--- trunk/gcalctool/display.c (original)
+++ trunk/gcalctool/display.c Tue May 27 23:24:46 2008
@@ -105,7 +105,7 @@
/* Remove separators if not supported */
clean = g_string_sized_new(strlen(src));
for (c = src, read_cursor = 1; *c; c++, read_cursor++) {
- if (strncmp(c, v->tsep, strlen(v->tsep)) == 0) {
+ if (v->tsep[0] != '\0' && strncmp(c, v->tsep, strlen(v->tsep)) == 0) {
c += strlen(v->tsep) - 1;
if (new_cursor >= read_cursor) {
new_cursor--;
@@ -633,7 +633,7 @@
/* Remove thousands separators and use english radix */
clean = g_string_sized_new(strlen(e->expression));
for (c = e->expression; *c; c++) {
- if (strncmp(c, v->tsep, strlen(v->tsep)) == 0) {
+ if (v->tsep[0] != '\0' && strncmp(c, v->tsep, strlen(v->tsep)) == 0) {
c += strlen(v->tsep) - 1;
} else if (strncmp(c, v->radix, strlen(v->radix)) == 0) {
g_string_append_c(clean, '.');
Modified: trunk/gcalctool/get.c
==============================================================================
--- trunk/gcalctool/get.c (original)
+++ trunk/gcalctool/get.c Tue May 27 23:24:46 2008
@@ -217,7 +217,7 @@
}
if (tsep == NULL) {
- return(",");
+ return("");
} else {
return(tsep);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]