<setting/> should provide type="integer"

RESOLVED FIXED in fennec1.0

Status

Fennec Graveyard
General
--
minor
RESOLVED FIXED
8 years ago
8 years ago

People

(Reporter: sonny, Assigned: vingtetun)

Tracking

Trunk
fennec1.0

Details

Attachments

(4 attachments, 1 obsolete attachment)

(Reporter)

Description

8 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.5) Gecko/20091109 Ubuntu/9.10 (karmic) Firefox/3.5.5
Build Identifier: Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9.b3pre) Gecko/20091109 Namoraka/3.6b3pre Fennec/1.0b5

<setting/> should provide type="integer" because actually there is no way to manipulate integer pref.

Reproducible: Always
Actually we support numeric textbox with inputype="number" on setting-string from setting.xml. (http://mxr.mozilla.org/mobile-browser/source/chrome/content/bindings/setting.xml#204)

But the binding didn't fit well at all in fennec.

Madhava do you have an idea of the wanted style?  - this is the equivalent of https://developer.mozilla.org/en/XUL_Tutorial/Numeric_Controls.
Status: UNCONFIRMED → NEW
Ever confirmed: true
(In reply to comment #1)
> Actually we support numeric textbox with inputype="number" on setting-string
> from setting.xml.
> (http://mxr.mozilla.org/mobile-browser/source/chrome/content/bindings/setting.xml#204)

But that binding will save to a String pref, not an Integer pref
 
> But the binding didn't fit well at all in fennec.

Huh?

> Madhava do you have an idea of the wanted style?  - this is the equivalent of
> https://developer.mozilla.org/en/XUL_Tutorial/Numeric_Controls.

Why doesn't the current textbox-showing-a-number style work?
Created attachment 413600 [details]
Actual look of a numeric textbox

(In reply to comment #2)
> (In reply to comment #1)
> > Actually we support numeric textbox with inputype="number" on setting-string
> > from setting.xml.
> > (http://mxr.mozilla.org/mobile-browser/source/chrome/content/bindings/setting.xml#204)
> 
> But that binding will save to a String pref, not an Integer pref

true.

> 
> > But the binding didn't fit well at all in fennec.
> 
> Huh?

see the attached screenshot


> > Madhava do you have an idea of the wanted style?  - this is the equivalent of
> > https://developer.mozilla.org/en/XUL_Tutorial/Numeric_Controls.
> 
> Why doesn't the current textbox-showing-a-number style work?
Created attachment 415121 [details]
screenshot

I'm currently working on a wip which made numberbox looks like that.
Created attachment 415131 [details] [diff] [review]
wip
Created attachment 415132 [details] [diff] [review]
wip for hildon

sorry for the spam, i've forgot the image in the previous wip
Attachment #415131 - Attachment is obsolete: true
Created attachment 415155 [details] [diff] [review]
Patch
Attachment #415155 - Flags: review?
Attachment #415155 - Flags: review? → review?(mark.finkle)
Attachment #415155 - Flags: review?(mark.finkle) → review+
Comment on attachment 415155 [details] [diff] [review]
Patch

We need to keep the number related attributes on the "string" type for doubles.

The new binding should only handle integers, so we should remove the "decimalplaces" attribute from the "int" type.

I'll make those changes and land.
pushed with changes and removed the test setting from browser.xul:
https://hg.mozilla.org/mobile-browser/rev/52a6eef433fc
Assignee: nobody → 21
Status: NEW → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Post-B5
Is there a use case for this via an add-on or is this something that's being added in as a nice-to-have?
(Reporter)

Comment 11

8 years ago
well, I have integer prefs for my add-on.
You need to log in before you can comment on or make changes to this bug.