After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 134995 - percent complete should allow input with % sign
percent complete should allow input with % sign
Status: RESOLVED FIXED
Product: gnome-panel
Classification: Other
Component: clock
2.5.x
Other Linux
: Normal normal
: ---
Assigned To: Panel Maintainers
Panel Maintainers
: 160585 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2004-02-20 20:56 UTC by William Jon McCann
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: 2.5/2.6


Attachments
patch for applets/clock/clock.c (1.27 KB, patch)
2004-10-13 18:35 UTC, Vincent Noel
accepted-commit_now Details | Review

Description William Jon McCann 2004-02-20 20:56:46 UTC
The tasks percent complete should allow input with a % sign.

I think it is reasonable to support user input of both (in regex):
\s*([0-9]+)\s*
\s*([0-9]+)\s*%\s*

Currently, only numeric input is accepted.  It seems this is because a
g_strtod() is used.
Comment 1 Luis Villa 2004-03-04 22:32:37 UTC
I'm feeing sort of dumb- where in the clock applet does it accept
percentages complete of anything?
Comment 2 William Jon McCann 2004-03-05 01:38:04 UTC
If the applet is compiled with libecal (evolution-data-server) support
and you have tasks defined for the given day in e-d-s they will be
diplayed.  The percentage complete of each task is displayed and is
editable by clicking directly on the text.
Comment 3 Vincent Noel 2004-10-13 17:47:24 UTC
Actually any character other than a number will not be accepted.
For example if you input "25 " (with a whitespace) it will be discarded.
Comment 4 Vincent Noel 2004-10-13 18:35:44 UTC
Created attachment 32575 [details] [review]
patch for applets/clock/clock.c

This patch filters percent and whitespace characters before evaluating the
string.
Comment 5 Mark McLoughlin 2004-11-11 09:17:20 UTC
This looks strange:

+        text_copy = g_strdelimit (text_copy, "% ", ' ');

i.e. why replace ' ' with ' ' ?

But apart from that it looks fine to commit
Comment 6 Vincent Noel 2004-11-17 20:35:21 UTC
Good point. I have removed the space in the first argument, and changed the
following g_strchomp to a g_strstrip to get rid of all spaces. I've committed,
closing the bug.
Comment 7 Vincent Untz 2004-12-06 18:04:00 UTC
*** Bug 160585 has been marked as a duplicate of this bug. ***