The present disclosure relates to apparatuses and methods for storage and management of one or more data files containing a device theme.
Screen size and shape vary significantly between portable electronic devices. In addition, devices often use interface themes that impact generation of different screen elements. Screen elements such as status indicators, icons and lists, for example, are generated in a different manner depending on the device or the individual locale or language activated within the device. As a result, there are challenges in designing a data records containing a device theme using a single file. The challenges are exacerbated by the need to provide different languages and locales for each theme. The challenges are typically addressed by simply using multiple files rather than single files, or providing reduced functionality within a single file. The multiplicity of files can hamper efficient use of device processing and memory resources. It is therefore desirable to improve data records containing device themes.
Embodiments, offered by way of example only, will now be discussed with reference to the attached Figures in which:
An aspect of the specification provides a method for managing a data file containing a device theme comprising:
providing a plurality of theme data files each corresponding to a different device theme;
receiving data representing an active one of a plurality of property settings in said device;
receiving theme data corresponding to one of said theme data files; said theme data including conditional definitions corresponding to one or more of said property settings; said theme data further including theme elements corresponding to said property settings;
selecting theme elements from said theme data based on said conditional definitions and said data representing said active one of said property settings; and,
generating a theme respective to said selected the data file on a display of said device based on said selected theme elements.
The theme elements can include at least one of text data and icon data. The text data can include at least one of time and date. The icon data can include a signal strength indicator.
The method can further comprises determining if said active one of a plurality of property settings has changed and thereafter repeating said receiving said data, receiving said theme data, selecting said theme elements and generating said theme.
The method can further comprise determining if said one of said theme data files has changed and thereafter repeating said receiving said data, receiving said theme data, selecting said theme elements and generating said theme corresponding to said one of said theme data files.
The property settings can be based on locale.
The property settings can be based on a font size.
The theme data can specify one or more of a location, size and orientation of each of said theme elements.
Another aspect of the specification provides an electronic device comprising non-volatile storage configured to maintain: i) a plurality of theme data files; ii) theme data representing each of said theme data files; each of said theme data files corresponding to one or more property settings; iii) each of said theme data files containing theme data, including conditional definitions corresponding to one or more of said property settings; said theme data further including theme elements corresponding to said property settings. The device also comprises a processor connected to said non-volatile storage. The processor is configured to select theme elements from said theme data corresponding to a selected one of said theme data files. The selected theme data file is based on said conditional definitions and the data representing said active one of said property settings. The device also comprises a display connected to said processor. The processor is further configured to generate a theme corresponding to said selected theme data file on said display based on said selected theme elements.
Aspects of the present specification provide the ability to define or check device properties during generation of a theme in conjunction with examination of the theme definition as maintained in a device theme data file. The device theme generation application is configured so that it is possible to determine the locale that is active in the device when the theme is applied. Each element in the theme definition can be configured to be used only in certain conditions, such as when a given property is set, or only when a given property is not set, or all the time. This configuration of the theme definition makes it is possible to selectively use certain parts of the theme and the prescription of all of the layouts necessary for each language in a single theme data file or set of data files. Since all of the layouts are associated with a single theme, the theme can be re-applied automatically when the language or locale of the device is changed.
XML elements and attributes can be used within the device theme data file to both define the conditions and provide the ability to selectively apply the elements of the theme. Properties can be defined using either a <property> element or a <condition> element. The <property> element can be used to define a property with a string value, while the <condition> element is used to evaluate and set a property based on the logic contained in its children. The children of the condition element can be logical operations that allow properties and their values to be compared against each other and against system variables such as the current language.
To check a device variable, a unique name can be given to each device variable within the device theme data file that can be evaluated. The variable name can be, for example, prefaced by “${” and suffixed by “}” to indicate that it is a device variable name.
To provide a selection mechanism for the different parts of the theme, each element of the theme can optionally include either an “if” or “unless” attribute. The value of the attribute can be the name of a property. If the “if” attribute is specified, then the element is only used if the named property is set. The “unless” attribute is the reverse, and if specified then the element is only used if the named property is not specified. If neither “if” nor “unless” is specified then that element is always used in the theme.
An “ifthenelse” child of the condition node can also be used in the device theme data file. The “ifthenelse” child allows the prescription of three conditions. If the first condition evaluates to true, then the second condition is evaluated and the condition element enclosing the “ifthenelse” element is resolved to the result of the second condition. If the first condition resolves to false, then the third condition is evaluated and condition element enclosing the “ifthenelse” element is resolved to the result of the third condition. This is useful for building more complex logical structures within the device theme data file.
Referring now to
Tower 54 houses at least one central processing unit, random access memory (or other volatile storage), read only memory and hard disc storage (or other non-volatile storage) all of which are interconnected by a bus. The computing environment of tower 54 renders tower 54 operable to execute DE 70. DE 70 executes on the central processing unit of tower 54, making appropriate and/or necessary use of other components within tower 54, and receiving instructions from developer D via keyboard 62 and generating responses for developer D on display 58. Other types of input peripherals, in addition to or in lieu of keyboard 62 are contemplated. Likewise, other types of output peripherals, in addition to or in lieu of display 58 are contemplated.
Computing device 66 is a portable wireless email telephony device, but it should be understood that in other example embodiments computing device 66 can be any type of computing environment for which developer D may be called upon to develop device theme data file 74 using DE 70. While device theme data file 74 is discussed herein as being a file, note that device theme data file 74 can be any software object or plurality thereof or the like can be used by theme generation application 78 in order to generate a theme on the display of computing device 66.
Referring now to
Programming instructions that implement the functional teachings of computing device 66 as described herein are typically maintained, persistently, in non-volatile storage unit 212 and used by processor 208 which makes appropriate utilization of volatile storage 216 during the execution of such programming instructions. Of particular note is that non-volatile storage unit 212 persistently maintains device theme data file 74 and theme generation application 78. Theme generation application 78 can be executed on processor 208 making use of volatile storage 216 as appropriate, in order to generate a theme on display 224. Non-volatile storage unit 212 also persistently maintains a locale identifier 82 which can be set to identify various languages or other preferences. Various other applications (not shown) are maintained in non-volatile storage unit 212 according to the desired configuration and functioning of computing device 66.
Referring now to
It is to be understood that the structure of theme data file 74 is purely exemplary, and is simplified for purposes of explanation. For example, only two sets of theme elements 90 are shown, yet theme data file 74 can comprise any number of sets of theme elements. Furthermore, it is contemplated that additional sets of common theme elements can be provided within data file that are not unique to any particular locale but are in fact common to all locales. For such common sets of theme elements, conditional definitions 86 can be structured to point to such common sets of theme elements for all locales while pointing to unique theme elements 90 for individually selected locales.
Referring now to
Block 310 comprises receiving a locale. Block 310 is effected on device 66 by theme generation application 78 accessing locale identifier 82, to establish the current locale setting that is active in locale identifier 82.
Referring again to
Referring again to
It should now be understood that as part of performance of block 320, then generation application 78 will access conditional definitions 86 and compare those definitions 86 with the active locale setting 94-1, to determine that elements 90-1 are to be used to generate theme 500-1. Elements 90-1 thus include programming instructions for theme application 78 corresponding to the specific location, size and orientation of elements 504-1. In other words, the specific appearance of theme 500-1 corresponds to programming instructions within element 90-1, and element 90-1 is activated due to the fact that locale setting 94-1 is active.
Referring again to
However, if at block 325 it is determined that “yes”, the locale has changed, then method 300 cycles back to block 310 where the new locale is received and blocks 315 and 320 are performed again.
Elements 90-2 thus include programming instructions for theme application 78 corresponding to the specific location, size and orientation of elements 504-2. In other words, the specific appearance of theme 500-2 corresponds to programming instructions within element 90-2, and element 90-2 is activated due to the fact that locale setting 94-2 is active.
Having described method 300, it should now be understood that variations are contemplated.
Referring back now to
As a still further variation, while block 310 of method 300 contemplates receiving a locale, and block 320 contemplates generating a theme based on locale and theme data, in other embodiments, it is contemplated that other properties, in addition to or in lieu of locale could be implemented at block 310 and block 320. For example, such properties include screen size, software version etc.
Other variations are also contemplated. The following code-snippet (that could be included in, for example, theme data section 90) shows portions of a theme data file 74 that illustrate one such variation.
In the foregoing code-snippet, the first attribute set element will only be applied is the LOCALE_EN property is set, LOCALE_EN identifies a particular locale setting. If LOCALE_EN is not set, the first attribute set element will be skipped. The second attribute set element is the reverse of the first. If LOCALE_EN property is set, then the second attribute set element will be skipped. If the LOCALE_EN property is not set, then the second attribute set element will be parsed.
The following code-snippet (that could be included in conditional definitions 86) shows portions of a theme data file 74 that illustrate another variation, whereby conditions are defined based on the default system locale properties
The above code-snippet defines three conditions which will result in one and only one property being defined:
1) If the system language is English then the LOCALE_EN property will be set.
2) If the system language is Spanish then the LOCALE_ES property will be set.
3) If the system language is neither English nor Spanish then the OTHER_LOCALE property will be set.
In general, it will now be understood that variations, combinations and subsets of the foregoing embodiments are contemplated.
Number | Date | Country | |
---|---|---|---|
61052033 | May 2008 | US |