Closed Bug 529912 Opened 15 years ago Closed 15 years ago

<setting/> should provide type="integer"

Categories

(Firefox for Android Graveyard :: General, defect)

defect
Not set
minor

Tracking

(Not tracked)

RESOLVED FIXED
fennec1.0

People

(Reporter: sonny, Assigned: vingtetun)

Details

Attachments

(4 files, 1 obsolete file)

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?
(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?
Attached image screenshot
I'm currently working on a wip which made numberbox looks like that.
Attached patch wip for hildonSplinter Review
sorry for the spam, i've forgot the image in the previous wip
Attachment #415131 - Attachment is obsolete: true
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
Closed: 15 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?
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.

Attachment

General

Created:
Updated:
Size: