summaryrefslogtreecommitdiff
path: root/src/smplayer.cpp
diff options
context:
space:
mode:
authorMaia Kozheva <sikon@ubuntu.com>2010-05-09 21:22:23 +0700
committerMaia Kozheva <sikon@ubuntu.com>2010-05-09 21:22:23 +0700
commit99b53d44a60e3e934fc664152c115ae0d6e19920 (patch)
treee38698c486f6b4044125fa0d0bf33475d92e8f3a /src/smplayer.cpp
parent263b32f108c15cd1c55a8f4eb4704fac6553f1ac (diff)
Imported Upstream version 0.6.9
Diffstat (limited to 'src/smplayer.cpp')
-rw-r--r--src/smplayer.cpp18
1 files changed, 7 insertions, 11 deletions
diff --git a/src/smplayer.cpp b/src/smplayer.cpp
index 8e36181..1768a3d 100644
--- a/src/smplayer.cpp
+++ b/src/smplayer.cpp
@@ -1,5 +1,5 @@
/* smplayer, GUI front-end for mplayer.
- Copyright (C) 2006-2009 Ricardo Villalba <rvm@escomposlinux.org>
+ Copyright (C) 2006-2010 Ricardo Villalba <rvm@escomposlinux.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -49,6 +49,9 @@ SMPlayer::SMPlayer(const QString & config_path, QObject * parent )
main_window = 0;
gui_to_use = "DefaultGui";
+ close_at_end = -1; // Not set
+ start_in_fullscreen = -1; // Not set
+
move_gui = false;
resize_gui = false;
@@ -92,6 +95,9 @@ BaseGui * SMPlayer::gui() {
qDebug("SMPlayer::gui: resizing main window to %dx%d", gui_size.width(), gui_size.height());
main_window->resize(gui_size);
}
+
+ main_window->setForceCloseOnFinish(close_at_end);
+ main_window->setForceStartInFullscreen(start_in_fullscreen);
}
return main_window;
@@ -105,8 +111,6 @@ SMPlayer::ExitCode SMPlayer::processArgs(QStringList args) {
QString action; // Action to be passed to running instance
- int close_at_end = -1; // -1 = not set, 1 = true, 0 false
- int start_in_fullscreen = -1;
bool show_help = false;
if (!pref->gui.isEmpty()) gui_to_use = pref->gui;
@@ -314,14 +318,6 @@ SMPlayer::ExitCode SMPlayer::processArgs(QStringList args) {
qApp->setFont(f);
}
- if (close_at_end != -1) {
- pref->close_on_finish = close_at_end;
- }
-
- if (start_in_fullscreen != -1) {
- pref->start_in_fullscreen = start_in_fullscreen;
- }
-
return SMPlayer::NoExit;
}