gcalctool r2365 - trunk/gcalctool



Author: rancell
Date: Sun Feb  8 12:13:56 2009
New Revision: 2365
URL: http://svn.gnome.org/viewvc/gcalctool?rev=2365&view=rev

Log:
Localize non decimal displays

Modified:
   trunk/gcalctool/display.c

Modified: trunk/gcalctool/display.c
==============================================================================
--- trunk/gcalctool/display.c	(original)
+++ trunk/gcalctool/display.c	Sun Feb  8 12:13:56 2009
@@ -103,12 +103,6 @@
     int digit_count = -1, read_cursor, new_cursor;
     gboolean after_radix = FALSE;
     
-    /* Only modify if valid */
-    if (v->error || v->base != DEC) {
-        STRNCPY(dest, src, dest_length - 1);
-        return;
-    }
-    
     if (cursor) {
         new_cursor = *cursor;
     } else {
@@ -131,7 +125,8 @@
             g_string_append_c(output, *c);
             
             /* Insert separator after nth digit */
-            if (v->display.show_tsep && !after_radix && digit_count > 1 && digit_count % v->tsep_count == 1) {
+            if (v->display.show_tsep && v->base == DEC &&
+                !after_radix && digit_count > 1 && digit_count % v->tsep_count == 1) {
                 g_string_append(output, v->tsep);
                 if (new_cursor > read_cursor) {
                     new_cursor++;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]