~ubuntu-branches/ubuntu/quantal/xdaliclock/quantal

« back to all changes in this revision

Viewing changes to webos/DaliClock/app/assistants/prefs-assistant.js

  • Committer: Bazaar Package Importer
  • Author(s): Kartik Mistry
  • Date: 2010-04-20 08:42:20 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20100420084220-j7ykvh34b2jx7hyv
Tags: 2.31-1
* New maintainer (Closes: #561233)
* New upstream release (Closes: #578379)
* debian/control:
  + Updated to Standards-Version 3.8.4
  + Added ${misc:Depends} to Depends
  + Updated debhelper dependency to 7
* debian/rules:
  + Do not do append to copyright file trick
  + Used dh_prep instead of dh_clean -k
* Converted package to new source format 3.0 (quilt)
* debian/copyright:
  + Added missing vroot.h copyright
  + Better copyright assignment, year for Author
* debian/patches/spelling-error-in-manpage_xdaliclock:
  + Added patch to fix manpage spelling mistake by Florian Ernst
    <florian@debian.org>

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* Dali Clock - a melting digital clock for Palm WebOS.
 
2
 * Copyright (c) 1991-2009 Jamie Zawinski <jwz@jwz.org>
 
3
 *
 
4
 * Permission to use, copy, modify, distribute, and sell this software and its
 
5
 * documentation for any purpose is hereby granted without fee, provided that
 
6
 * the above copyright notice appear in all copies and that both that
 
7
 * copyright notice and this permission notice appear in supporting
 
8
 * documentation.  No representations are made about the suitability of this
 
9
 * software for any purpose.  It is provided "as is" without express or
 
10
 * implied warranty.
 
11
 */
 
12
 
 
13
function PrefsAssistant(model, hide_cb) {
 
14
  this.model   = model;
 
15
  this.hide_cb = hide_cb;
 
16
}
 
17
 
 
18
 
 
19
PrefsAssistant.prototype.setup = function() {
 
20
 
 
21
  // Create the option menus
 
22
  //
 
23
  this.controller.setupWidget('timeModeSelector', {
 
24
      label:         'Time Display',
 
25
      modelProperty: 'time_mode',
 
26
      choices: [
 
27
       {label: 'Hour, Min & Sec', value: 'HHMMSS' },
 
28
       {label: 'Hour & Min Only', value: 'HHMM'   },
 
29
       {label: 'Seconds Only',    value: 'SS'     },
 
30
       ]},
 
31
    this.model);
 
32
 
 
33
  this.controller.setupWidget('dateModeSelector', {
 
34
      label:         'Date Display',
 
35
      modelProperty: 'date_mode',
 
36
      choices: [
 
37
       {label: 'Month/Day/Year', value: 'MMDDYY' },
 
38
       {label: 'Day/Month/Year', value: 'DDMMYY' },
 
39
       {label: 'Year/Month/Day', value: 'YYMMDD' },
 
40
       ]},
 
41
    this.model);
 
42
 
 
43
  this.controller.setupWidget('twelveHourRadio', {
 
44
      modelProperty: 'twelve_hour_p',
 
45
      choices: [
 
46
       {label: '12 Hour Time', value: true  },
 
47
       {label: '24 Hour Time', value: false },
 
48
       ]},
 
49
    this.model);
 
50
 
 
51
  this.controller.setupWidget('fpsSlider', {
 
52
      modelProperty: 'fps',
 
53
      minValue: '1',
 
54
      maxValue: '30',
 
55
     },
 
56
    this.model);
 
57
 
 
58
  this.controller.setupWidget('cpsSlider', {
 
59
      modelProperty: 'cps',
 
60
      minValue: '0',
 
61
      maxValue: '30',
 
62
     },
 
63
    this.model);
 
64
 
 
65
}
 
66
 
 
67
 
 
68
PrefsAssistant.prototype.deactivate = function(event) {
 
69
  if (this.hide_cb)
 
70
    this.hide_cb.call();  // callback from parent
 
71
}