[Bug 208260] Re: Too many commas in gcalctool

2010-09-15 Thread Bug Watch Updater
** Changed in: gcalctool
   Importance: Unknown = Critical

-- 
Too many commas in gcalctool
https://bugs.launchpad.net/bugs/208260
You received this bug notification because you are a member of Ubuntu
Desktop Bugs, which is a bug assignee.

-- 
desktop-bugs mailing list
desktop-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/desktop-bugs


[Bug 208260] Re: Too many commas in gcalctool

2008-06-03 Thread Pedro Villavicencio
this should be fixed with the proposed packages on bug 44756

** Changed in: gcalctool (Ubuntu)
   Status: Fix Committed = Fix Released

-- 
Too many commas in gcalctool
https://bugs.launchpad.net/bugs/208260
You received this bug notification because you are a member of Ubuntu
Desktop Bugs, which is a bug assignee.

-- 
desktop-bugs mailing list
desktop-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/desktop-bugs


[Bug 208260] Re: Too many commas in gcalctool

2008-05-28 Thread raguanu
camel9,

This was my first patch here. So please don't take my word as
authoritative information. Meaning that this may not be the best way to
do it. Just one way. :-)

As pointed out by gdi2k, this problem had already been fixed by some
other patch, which also fixes additional issues, just before I submitted
the patch for this specific problem. But the fix is yet to be available
in ubuntu repositories. So simple way to get the update for now, would
be to download latest gcalctool from gnome website and install.

But if you just want to know how source patching works, try this:

1. Download the source code with the following command. This will get you 
version 5.22.1 as per this writing: sudo apt-get source gcalctool
2. Extract source code from the tar archive to some folder e.g. /tmp
3. Download the patch file and use the patch command to apply the patch to your 
source code e.g.: patch --input=/tmp/thousand_separator_fix_raguanu.patch
4. When asked provide path to display.c and the file will be patched/updated. 
e.g. /tmp/gcalctool-5.22.1/gcalctool/display.c
5. After this is done you need to compile the source code. I suggest you to use 
IDEs (Anjuta) which will make the process easy.

I realized that I didn't prepare the patch file well in order to
facilitate easy applying. I will take this note next time.

Hope this helps,
Ragu

-- 
Too many commas in gcalctool
https://bugs.launchpad.net/bugs/208260
You received this bug notification because you are a member of Ubuntu
Desktop Bugs, which is a bug assignee.

-- 
desktop-bugs mailing list
desktop-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/desktop-bugs


[Bug 208260] Re: Too many commas in gcalctool

2008-05-28 Thread Pedro Villavicencio
** Changed in: gcalctool (Ubuntu)
   Status: Triaged = Fix Committed

-- 
Too many commas in gcalctool
https://bugs.launchpad.net/bugs/208260
You received this bug notification because you are a member of Ubuntu
Desktop Bugs, which is a bug assignee.

-- 
desktop-bugs mailing list
desktop-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/desktop-bugs


[Bug 208260] Re: Too many commas in gcalctool

2008-05-28 Thread Bug Watch Updater
** Changed in: gcalctool
   Status: Confirmed = Fix Released

-- 
Too many commas in gcalctool
https://bugs.launchpad.net/bugs/208260
You received this bug notification because you are a member of Ubuntu
Desktop Bugs, which is a bug assignee.

-- 
desktop-bugs mailing list
desktop-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/desktop-bugs


[Bug 208260] Re: Too many commas in gcalctool

2008-05-27 Thread camel9
How do I apply this patch?  Should I compile the file or what?  Full
instructions would be appreciated!

-- 
Too many commas in gcalctool
https://bugs.launchpad.net/bugs/208260
You received this bug notification because you are a member of Ubuntu
Desktop Bugs, which is a bug assignee.

-- 
desktop-bugs mailing list
desktop-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/desktop-bugs


[Bug 208260] Re: Too many commas in gcalctool

2008-05-15 Thread gdi2k
It sounds like this might have already been fixed in the new version of 
gcalctool: 
http://bobthegnome.blogspot.com/2008/04/gcalctool-5231.html 


From the page: 
* Fixes issues with thousands seperators and radix in non-english
locales (Bug #527669)

-- 
Too many commas in gcalctool
https://bugs.launchpad.net/bugs/208260
You received this bug notification because you are a member of Ubuntu
Desktop Bugs, which is a bug assignee.

-- 
desktop-bugs mailing list
desktop-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/desktop-bugs


[Bug 208260] Re: Too many commas in gcalctool

2008-04-30 Thread Bug Watch Updater
** Changed in: gcalctool
   Status: Invalid = Confirmed

-- 
Too many commas in gcalctool
https://bugs.launchpad.net/bugs/208260
You received this bug notification because you are a member of Ubuntu
Desktop Bugs, which is a bug assignee.

-- 
desktop-bugs mailing list
desktop-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/desktop-bugs


[Bug 208260] Re: Too many commas in gcalctool

2008-04-28 Thread Bug Watch Updater
** Changed in: gcalctool
   Status: Unknown = Invalid

-- 
Too many commas in gcalctool
https://bugs.launchpad.net/bugs/208260
You received this bug notification because you are a member of Ubuntu
Desktop Bugs, which is a bug assignee.

-- 
desktop-bugs mailing list
desktop-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/desktop-bugs


[Bug 208260] Re: Too many commas in gcalctool

2008-04-12 Thread Chris Sherlock
Does that work for numbers with a decimal place?

-- 
Too many commas in gcalctool
https://bugs.launchpad.net/bugs/208260
You received this bug notification because you are a member of Ubuntu
Desktop Bugs, which is a bug assignee.

-- 
desktop-bugs mailing list
desktop-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/desktop-bugs


[Bug 208260] Re: Too many commas in gcalctool

2008-04-12 Thread Chris Sherlock
I believe the main gcalctool dev has taken on board my feedback and
implemented a localize_expression function.

-- 
Too many commas in gcalctool
https://bugs.launchpad.net/bugs/208260
You received this bug notification because you are a member of Ubuntu
Desktop Bugs, which is a bug assignee.

-- 
desktop-bugs mailing list
desktop-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/desktop-bugs


[Bug 208260] Re: Too many commas in gcalctool

2008-04-12 Thread raguanu
Chris,

 - Yes. It works for numbers with decimal point.
 - As you said, I see that the duplicate item under gnome-bugs #524746 is fixed 
around the same time I submitted the patch, as a part of all other 'thousand 
separator' problem. So I think this patch would not be necessary.

-- 
Too many commas in gcalctool
https://bugs.launchpad.net/bugs/208260
You received this bug notification because you are a member of Ubuntu
Desktop Bugs, which is a bug assignee.

-- 
desktop-bugs mailing list
desktop-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/desktop-bugs


[Bug 208260] Re: Too many commas in gcalctool

2008-04-11 Thread Ananth
I noticed that when the displayed number is result of a calculation, the
thousand separator gives wrong set of commas. But if we clear the
screen, and type in (or paste) the same number, the commas are correct.

E.g. 
 - Paste 169 -- 16,666,666,669
 - 169 * 1 -- 16,,66,6,6,66,,669

Hope this helps to narrow down the problem.

-- 
Too many commas in gcalctool
https://bugs.launchpad.net/bugs/208260
You received this bug notification because you are a member of Ubuntu
Desktop Bugs, which is a bug assignee.

-- 
desktop-bugs mailing list
desktop-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/desktop-bugs


[Bug 208260] Re: Too many commas in gcalctool

2008-04-11 Thread raguanu
The issue was with the localize_number() function. It assumed that the
string to format does not contain ,+*,etc. So it gave incorrect result
when the expression already includes thousand separators. Moreover, the
logic was not working well when there were non-digit characters in the
expression e.g. (,),+,%, etc.

Minor update to the localize_number() function in gcalctool/display.c,
provided in the attached patch. Basically we want to identify 3
contiguous digits, and we need to add the separator only if the next
char is a number. If a non-digit char occurs, I reset the digit counter.

I tested this patch in all calculator modes satisfactorily. Things like
3,333,333,336+36,985 are working now.

I would appreciate if someone reviews this to see if it is acceptable.

** Attachment added: This is the patch for gcalctool/display.c
   http://launchpadlibrarian.net/13369122/display.c

-- 
Too many commas in gcalctool
https://bugs.launchpad.net/bugs/208260
You received this bug notification because you are a member of Ubuntu
Desktop Bugs, which is a bug assignee.

-- 
desktop-bugs mailing list
desktop-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/desktop-bugs


[Bug 208260] Re: Too many commas in gcalctool

2008-04-11 Thread raguanu
The issue was with the localize_number() function. It assumed that the
string to format does not contain ,+*,etc. So it gave incorrect result
when the expression already includes thousand separators. Moreover, the
logic was not working well when there were non-digit characters in the
expression e.g. (,),+,%, etc.

Minor update to the localize_number() function in gcalctool/display.c,
provided in the attached patch. Basically we want to identify 3
contiguous digits, and we need to add the separator only if the next
char is a number. If a non-digit char occurs, I reset the digit counter.

I tested this patch in all calculator modes satisfactorily. Things like
3,333,333,336+36,985 are working now.

I would appreciate if someone reviews this to see if it is acceptable.

** Attachment added: This is the patch for gcalctool/display.c
   http://launchpadlibrarian.net/13369125/thousand_separator_fix_raguanu.patch

** Attachment removed: This is the patch for gcalctool/display.c

   http://launchpadlibrarian.net/13369122/display.c

-- 
Too many commas in gcalctool
https://bugs.launchpad.net/bugs/208260
You received this bug notification because you are a member of Ubuntu
Desktop Bugs, which is a bug assignee.

-- 
desktop-bugs mailing list
desktop-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/desktop-bugs


[Bug 208260] Re: Too many commas in gcalctool

2008-03-31 Thread Chris Sherlock
Looks like a different issue to me... that issue seems to be a problem
with the decimal point, this one is a problem with the whole expression
being localised and adding in commas every third character.

Haven't seen the diff where they fixed it though, so YMMV.

-- 
Too many commas in gcalctool
https://bugs.launchpad.net/bugs/208260
You received this bug notification because you are a member of Ubuntu
Desktop Bugs, which is a bug assignee.

-- 
desktop-bugs mailing list
desktop-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/desktop-bugs


[Bug 208260] Re: Too many commas in gcalctool

2008-03-30 Thread Morten Kjeldgaard
This seems to be a reincarnation of bug #198250

-- 
Too many commas in gcalctool
https://bugs.launchpad.net/bugs/208260
You received this bug notification because you are a member of Ubuntu
Desktop Bugs, which is a bug assignee.

-- 
desktop-bugs mailing list
desktop-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/desktop-bugs


[Bug 208260] Re: Too many commas in gcalctool

2008-03-29 Thread Chris Sherlock
No probs :-)

Not sure if it's worthwhile saying so here, but I suspect that the problem with 
gcalctool is because refresh_display() calls
ui_set_display(). However, ui_set_display calls:

if (v-noparens == 0) {
localize_number(localized, str);
str = localized;
}

Basically, it looks like it's trying to localize the whole expression,
but this function is only build to localize an individual *number*. Thus
is adds in the comma every 3rd character regardless...

Not sure how you'd get around this, but I think that's the problem here.

-- 
Too many commas in gcalctool
https://bugs.launchpad.net/bugs/208260
You received this bug notification because you are a member of Ubuntu
Desktop Bugs, which is a bug assignee.

-- 
desktop-bugs mailing list
desktop-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/desktop-bugs


[Bug 208260] Re: Too many commas in gcalctool

2008-03-28 Thread toobuntu
Confirmed.  I have been experiencing the same issues in Hardy.

** Changed in: gcalctool (Ubuntu)
   Status: New = Confirmed

-- 
Too many commas in gcalctool
https://bugs.launchpad.net/bugs/208260
You received this bug notification because you are a member of Ubuntu
Desktop Bugs, which is subscribed to gcalctool in ubuntu.

-- 
desktop-bugs mailing list
desktop-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/desktop-bugs


[Bug 208260] Re: Too many commas in gcalctool

2008-03-28 Thread Pedro Villavicencio
thanks for send it upstream.

** Changed in: gcalctool (Ubuntu)
   Importance: Undecided = Low
 Assignee: (unassigned) = Ubuntu Desktop Bugs (desktop-bugs)
   Status: Confirmed = Triaged

-- 
Too many commas in gcalctool
https://bugs.launchpad.net/bugs/208260
You received this bug notification because you are a member of Ubuntu
Desktop Bugs, which is a bug assignee.

-- 
desktop-bugs mailing list
desktop-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/desktop-bugs