~ubuntu-branches/ubuntu/trusty/enigma/trusty

« back to all changes in this revision

Viewing changes to src/gui/OptionsMenu.cc

  • Committer: Package Import Robot
  • Author(s): Erich Schubert
  • Date: 2012-06-19 21:47:22 UTC
  • mfrom: (5.1.8 sid)
  • Revision ID: package-import@ubuntu.com-20120619214722-o8v3jobogn60iw68
Tags: 1.10~~pre-alpha+r2236-1
* New upstream checkout. No release on the horizon, but well playable.
* Acknowledge NMUs. Thank you!
* Drop suggest on enigma-level-previews which are not available for 1.10
* Update policy version, no changes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
139
139
        RatingsUpdateButton() : BoolOptionButton("RatingsAutoUpdate", N_("Auto"), N_("Never"), this) {}
140
140
    };
141
141
 
 
142
    struct ScoreUploadButton : public BoolOptionButton {
 
143
        ScoreUploadButton() : BoolOptionButton("ScoreAutoUpload", N_("Always"), N_("Never"), this) {}
 
144
    };
142
145
 
143
146
 
144
147
    /* -------------------- VideoModeButton -------------------- */
336
339
    /* -------------------- Options Menu -------------------- */
337
340
    
338
341
    OptionsMenu::OptionsMenu(ecl::Surface *background_)
339
 
    : back(NULL),  //(new StaticTextButton(N_("Back"), this)),
340
 
      background(background_), previous_caption(video::GetCaption()),
341
 
      pagesVList(NULL), commandHList(NULL), optionsVList(NULL),
 
342
    : pagesVList(NULL), commandHList(NULL), optionsVList(NULL), back(NULL), 
342
343
      language(NULL), but_main_options(NULL), but_video_options(NULL),
343
344
      but_audio_options(NULL), but_config_options(NULL), fullscreen(NULL),
344
345
      videomode(NULL), userNameTF(NULL), userPathTF(NULL),
345
 
      userImagePathTF(NULL), menuMusicTF(NULL)
 
346
      userImagePathTF(NULL), menuMusicTF(NULL), 
 
347
      background(background_), previous_caption(video::GetCaption())
346
348
    {
347
349
        center();
348
350
        close_page();
355
357
 
356
358
    void OptionsMenu::open_page(OptionsPage new_page) {
357
359
        const video::VMInfo *vminfo = video::GetInfo();
358
 
        const int vshrink = vminfo->width < 640 ? 1 : 0;
359
 
        int hmargin = vshrink ? 5 : (vminfo->width < 660 ? 10 : (vminfo->width < 900 ? 20 : 80));
360
 
        video::VideoModes vm = vminfo->videomode;
361
360
        video::VideoTileType vtt = vminfo->tt;
362
361
        int vh = vminfo->area.x;
363
362
        int vv = (vminfo->height - vminfo->area.h)/2;
492
491
                OPTIONS_NEW_LB(N_("Sound volume: "), new SoundVolumeButton())
493
492
                OPTIONS_NEW_LB(N_("Music volume: "), new MusicVolumeButton())
494
493
                OPTIONS_NEW_LB(N_("Ratings update: "), new RatingsUpdateButton())
 
494
#ifdef ENABLE_EXPERIMENTAL
 
495
                OPTIONS_NEW_LB(N_("Score upload: "), new ScoreUploadButton())
 
496
#endif
495
497
                userNameTF = new TextField(app.state->getString("UserName"));
496
498
                userNameTF->setMaxChars(20);
497
499
                userNameTF->setInvalidChars("+");