~ubuntu-branches/ubuntu/intrepid/smplayer/intrepid

« back to all changes in this revision

Viewing changes to src/corelib/preferences.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Matvey Kozhev
  • Date: 2008-05-13 10:12:30 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20080513101230-3rx6z4ulb2zkyd2t
Tags: 0.6.0-1
* New upstream release.
* Bumped debian/compat to 6.
* debian/control:
  - Require debhelper >= 6.
  - Relaxed the dependency of smplayer-translations on smplayer
    to Recommends. (Closes: #478713)
* Dropped debian/smplayer.desktop, changes applied upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
Preferences::Preferences() {
31
31
        reset();
32
32
 
33
 
#ifdef USE_INI_FILES
 
33
#ifndef NO_USE_INI_FILES
34
34
        load();
35
35
#endif
36
36
}
37
37
 
38
38
Preferences::~Preferences() {
39
 
#ifdef USE_INI_FILES
 
39
#ifndef NO_USE_INI_FILES
40
40
        save();
41
41
#endif
42
42
}
173
173
        connection_port = 8000;
174
174
 
175
175
        mouse_left_click_function = "";
 
176
        mouse_right_click_function = "show_context_menu";
176
177
        mouse_double_click_function = "fullscreen";
177
178
        mouse_middle_click_function = "mute";
178
179
        mouse_xbutton1_click_function = "";
267
268
    //mplayer log autosaving end
268
269
 
269
270
        auto_add_to_playlist = true;
270
 
        use_volume_option = false; 
 
271
        use_volume_option2 = Detect; 
271
272
 
272
273
        use_short_pathnames = false;
273
274
 
274
275
        mplayer_detected_version = -1; //None version parsed yet
275
276
        mplayer_user_supplied_version = -1;
 
277
        mplayer_has_volume_option = false;
276
278
}
277
279
 
278
 
#ifdef USE_INI_FILES
 
280
#ifndef NO_USE_INI_FILES
279
281
void Preferences::save() {
280
282
        qDebug("Preferences::save");
281
283
 
396
398
        set->setValue("connection_port", connection_port);
397
399
 
398
400
        set->setValue("mouse_left_click_function", mouse_left_click_function);
 
401
        set->setValue("mouse_right_click_function", mouse_right_click_function);
399
402
        set->setValue("mouse_double_click_function", mouse_double_click_function);
400
403
        set->setValue("mouse_middle_click_function", mouse_middle_click_function);
401
404
        set->setValue("mouse_xbutton1_click_function", mouse_xbutton1_click_function);
454
457
    //mplayer log autosaving end
455
458
 
456
459
    set->setValue("auto_add_to_playlist", auto_add_to_playlist);
457
 
        set->setValue("use_volume_option", use_volume_option);
 
460
        set->setValue("use_volume_option2", use_volume_option2);
458
461
 
459
462
        set->setValue("use_short_pathnames", use_short_pathnames);
460
463
 
492
495
        set->beginGroup( "mplayer_info");
493
496
        set->setValue("mplayer_detected_version", mplayer_detected_version);
494
497
        set->setValue("mplayer_user_supplied_version", mplayer_user_supplied_version);
 
498
        set->setValue("mplayer_has_volume_option", mplayer_has_volume_option);
495
499
        set->endGroup();
496
500
}
497
501
 
620
624
        connection_port = set->value("connection_port", connection_port).toInt();
621
625
 
622
626
        mouse_left_click_function = set->value("mouse_left_click_function", mouse_left_click_function).toString();
 
627
        mouse_right_click_function = set->value("mouse_right_click_function", mouse_right_click_function).toString();
623
628
        mouse_double_click_function = set->value("mouse_double_click_function", mouse_double_click_function).toString();
624
629
        mouse_middle_click_function = set->value("mouse_middle_click_function", mouse_middle_click_function).toString();
625
630
        mouse_xbutton1_click_function = set->value("mouse_xbutton1_click_function", mouse_xbutton1_click_function).toString();
678
683
    //mplayer log autosaving end
679
684
 
680
685
        auto_add_to_playlist = set->value("auto_add_to_playlist", auto_add_to_playlist).toBool();
681
 
        use_volume_option = set->value("use_volume_option", use_volume_option).toBool();
 
686
        use_volume_option2 = (OptionState) set->value("use_volume_option2", use_volume_option2).toInt();
682
687
 
683
688
        use_short_pathnames = set->value("use_short_pathnames", use_short_pathnames).toBool();
684
689
 
716
721
        set->beginGroup( "mplayer_info");
717
722
        mplayer_detected_version = set->value("mplayer_detected_version", mplayer_detected_version).toInt();
718
723
        mplayer_user_supplied_version = set->value("mplayer_user_supplied_version", mplayer_user_supplied_version).toInt();
 
724
        mplayer_has_volume_option = set->value("mplayer_has_volume_option", mplayer_has_volume_option).toBool();
719
725
        set->endGroup();
720
726
 
721
727
        /*
727
733
        */
728
734
}
729
735
 
730
 
#endif // USE_INI_FILES
 
736
#endif // NO_USE_INI_FILES
731
737
 
732
738
double Preferences::monitor_aspect_double() {
733
739
        qDebug("Preferences::monitor_aspect_double");