1
/* smplayer, GUI front-end for mplayer.
2
Copyright (C) 2006-2009 Ricardo Villalba <rvm@escomposlinux.org>
4
This program is free software; you can redistribute it and/or modify
5
it under the terms of the GNU General Public License as published by
6
the Free Software Foundation; either version 2 of the License, or
7
(at your option) any later version.
9
This program is distributed in the hope that it will be useful,
10
but WITHOUT ANY WARRANTY; without even the implied warranty of
11
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
GNU General Public License for more details.
14
You should have received a copy of the GNU General Public License
15
along with this program; if not, write to the Free Software
16
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21
#include "preferences.h"
25
#include "constants.h"
27
#include "translator.h"
29
#include <QApplication>
32
QSettings * Global::settings = 0;
33
Preferences * Global::pref = 0;
34
Translator * Global::translator = 0;
36
using namespace Global;
38
void Global::global_init(const QString & config_path) {
39
qDebug("global_init");
42
translator = new Translator();
45
if (!config_path.isEmpty()) {
46
Paths::setConfigPath(config_path);
49
if (Paths::iniPath().isEmpty()) {
50
settings = new QSettings(QSettings::IniFormat, QSettings::UserScope,
51
QString(COMPANY), QString(PROGRAM) );
53
QString filename = Paths::iniPath() + "/smplayer.ini";
54
settings = new QSettings( filename, QSettings::IniFormat );
55
qDebug("global_init: config file: '%s'", filename.toUtf8().data());
60
pref = new Preferences();
63
void Global::global_end() {
76
Preferences * Global::pref = 0;
78
using namespace Global;
80
void Global::global_init() {
81
qDebug("global_init");
84
pref = new Preferences();
87
void Global::global_end() {