~ubuntu-branches/debian/stretch/smplayer/stretch

« back to all changes in this revision

Viewing changes to src/prefinterface.cpp

  • Committer: Package Import Robot
  • Author(s): Mateusz Łukasik
  • Date: 2014-04-21 11:53:59 UTC
  • mfrom: (1.3.2)
  • Revision ID: package-import@ubuntu.com-20140421115359-oz572avkq20ieqaf
Tags: 14.3.0-1
* Add myself to uploaders.
* New upstream release. (Closes: #740769, #742685)
* debian/control:
  - bump standards version to 3.9.5. (no changes needed)
  - rename smplayer-translations to smplayer-l10n. (Closes: #698365)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*  smplayer, GUI front-end for mplayer.
2
 
    Copyright (C) 2006-2013 Ricardo Villalba <rvm@users.sourceforge.net>
 
2
    Copyright (C) 2006-2014 Ricardo Villalba <rvm@users.sourceforge.net>
3
3
 
4
4
    This program is free software; you can redistribute it and/or modify
5
5
    it under the terms of the GNU General Public License as published by
24
24
#include "languages.h"
25
25
#include "recents.h"
26
26
#include "urlhistory.h"
 
27
#include "autohidewidget.h"
27
28
 
28
29
#include <QDir>
29
30
#include <QStyleFactory>
108
109
            this, SLOT(GUIChanged(int)));
109
110
#endif
110
111
 
111
 
#ifdef Q_OS_WIN
112
 
        floating_bypass_wm_check->hide();
113
 
#endif
114
 
 
115
112
#ifndef SEEKBAR_RESOLUTION
116
113
        seeking_method_group->hide();
117
114
#endif
204
201
 
205
202
        int gui_index = gui_combo->currentIndex();
206
203
        gui_combo->clear();
207
 
        gui_combo->addItem( tr("Default GUI"), "DefaultGUI");
 
204
        gui_combo->addItem( tr("Basic GUI"), "DefaultGUI");
208
205
        gui_combo->addItem( tr("Mini GUI"), "MiniGUI");
 
206
#ifdef MPCGUI
209
207
        gui_combo->addItem( tr("Mpc GUI"), "MpcGUI");
 
208
#endif
210
209
#ifdef SKINS
211
210
        gui_combo->addItem( tr("Skinnable GUI"), "SkinGUI");
212
211
        if (n_skins == 0) {
261
260
        setFloatingWidth(pref->floating_control_width);
262
261
        setFloatingMargin(pref->floating_control_margin);
263
262
        setDisplayFloatingInCompactMode(pref->floating_display_in_compact_mode);
264
 
#ifndef Q_OS_WIN
265
 
        setFloatingBypassWindowManager(pref->bypass_window_manager);
266
 
#endif
 
263
        floating_move_bottom_check->setChecked(pref->floating_activation_area == AutohideWidget::Bottom);
 
264
        floating_hide_delay_spin->setValue(pref->floating_hide_delay);
267
265
 
268
266
        setRecentsMaxItems(pref->history_recents->maxItems());
269
267
        setURLMaxItems(pref->history_urls->maxItems());
331
329
        pref->floating_control_width = floatingWidth();
332
330
        pref->floating_control_margin = floatingMargin();
333
331
        pref->floating_display_in_compact_mode = displayFloatingInCompactMode();
334
 
#ifndef Q_OS_WIN
335
 
        pref->bypass_window_manager = floatingBypassWindowManager();
336
 
#endif
 
332
        pref->floating_activation_area = floating_move_bottom_check->isChecked() ? AutohideWidget::Bottom : AutohideWidget::Anywhere;
 
333
        pref->floating_hide_delay = floating_hide_delay_spin->value();
337
334
 
338
335
        if (pref->history_recents->maxItems() != recentsMaxItems()) {
339
336
                pref->history_recents->setMaxItems( recentsMaxItems() );
617
614
        return floating_compact_check->isChecked();
618
615
}
619
616
 
620
 
#ifndef Q_OS_WIN
621
 
void PrefInterface::setFloatingBypassWindowManager(bool b) {
622
 
        floating_bypass_wm_check->setChecked(b);
623
 
}
624
 
 
625
 
bool PrefInterface::floatingBypassWindowManager() {
626
 
        return floating_bypass_wm_check->isChecked();
627
 
}
628
 
#endif
629
 
 
630
617
void PrefInterface::setRecentsMaxItems(int n) {
631
618
        recents_max_items_spin->setValue(n);
632
619
}
674
661
                tr("Here you can change the language of the application.") );
675
662
 
676
663
        setWhatsThis(gui_combo, tr("GUI"),
677
 
        tr("Select the GUI you prefer for the application. Currently "
678
 
           "there are two available: Default GUI and Mini GUI.<br>"
679
 
           "The <b>Default GUI</b> provides the traditional GUI, with the "
680
 
           "toolbar and control bar. The <b>Mini GUI</b> provides a "
681
 
           "more simple GUI, without toolbar and a control bar with few "
682
 
           "buttons.") );
 
664
        tr("Select the graphic interface you prefer for the application.") +"<br>"+
 
665
        tr("The <b>Basic GUI</b> provides the traditional interface, with the "
 
666
           "toolbar and control bar.") +" "+ 
 
667
        tr("The <b>Mini GUI</b> provides a more simple interface, without toolbar and a control bar with few "
 
668
           "buttons.") +" "+
 
669
        tr("The <b>Skinnable GUI</b> provides an interface where several skins are available.")
 
670
#ifdef MPCGUI
 
671
        +" "+
 
672
        tr("The <b>Mpc GUI</b> looks like the interface in Media Player Classic.")
 
673
#endif
 
674
        );
683
675
 
684
676
        setWhatsThis(iconset_combo, tr("Icon set"),
685
677
        tr("Select the icon set you prefer for the application.") );
760
752
           "screen is a TV, as the overscan might prevent the control to be "
761
753
           "visible.") );
762
754
 
 
755
        setWhatsThis(floating_move_bottom_check, tr("Show only when moving the mouse to the bottom of the screen"),
 
756
                tr("If this option is checked, the floating control will only be displayed when the mouse is moved "
 
757
           "to the bottom of the screen. Otherwise the control will appear whenever the mouse is moved, no matter "
 
758
           "its position.") );
 
759
 
763
760
        setWhatsThis(floating_compact_check, tr("Display in compact mode too"),
764
761
                tr("If this option is enabled, the floating control will appear "
765
 
           "in compact mode too. <b>Warning:</b> the floating control has not been "
 
762
           "in compact mode too.") +" " +
 
763
                tr("This option only works with the basic GUI.") +" "+
 
764
                tr("<b>Warning:</b> the floating control has not been "
766
765
           "designed for compact mode and it might not work properly.") );
767
766
 
768
 
#ifndef Q_OS_WIN
769
 
        setWhatsThis(floating_bypass_wm_check, tr("Bypass window manager"),
770
 
                tr("If this option is checked, the control is displayed bypassing the "
771
 
           "window manager. Disable this option if the floating control "
772
 
           "doesn't work well with your window manager.") );
773
 
#endif
 
767
        setWhatsThis(floating_hide_delay_spin, tr("Time to hide the control"),
 
768
                tr("Sets the time (in milliseconds) to hide the control after the mouse went away from the control."));
774
769
 
775
770
        addSectionTitle(tr("Privacy"));
776
771