summaryrefslogtreecommitdiff
authoralwin <alwin>2005-04-14 09:23:25 (UTC)
committer alwin <alwin>2005-04-14 09:23:25 (UTC)
commitc643e152dc7d2167381d3fc0568ad4043de5604e (patch) (side-by-side diff)
tree3050f49d659a1d6eb54cca2a08ed64cf0d04842a
parentcb10570b4118161a066b741c2674d8d522670623 (diff)
downloadopie-c643e152dc7d2167381d3fc0568ad4043de5604e.zip
opie-c643e152dc7d2167381d3fc0568ad4043de5604e.tar.gz
opie-c643e152dc7d2167381d3fc0568ad4043de5604e.tar.bz2
gui polish
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer3/mwindow.cpp9
-rw-r--r--noncore/multimedia/opieplayer3/mwindow.h1
-rw-r--r--noncore/multimedia/opieplayer3/playlist.cpp6
-rw-r--r--noncore/multimedia/opieplayer3/videowidget.cpp1
4 files changed, 14 insertions, 3 deletions
diff --git a/noncore/multimedia/opieplayer3/mwindow.cpp b/noncore/multimedia/opieplayer3/mwindow.cpp
index 75d1490..0898c7b 100644
--- a/noncore/multimedia/opieplayer3/mwindow.cpp
+++ b/noncore/multimedia/opieplayer3/mwindow.cpp
@@ -42,8 +42,9 @@
#include <opie2/ofileselector.h>
#include <opie2/odebug.h>
#include <qpe/resource.h>
+#include <qpe/qpeapplication.h>
#include <qfileinfo.h>
#include <qfile.h>
#include <qtoolbar.h>
@@ -60,9 +61,9 @@ using namespace Opie::Ui;
PMainWindow::PMainWindow(QWidget*w, const char*name, WFlags f)
: QMainWindow(w,name,f)
{
checkLib();
- setCaption( QObject::tr("Opie Mediaplayer 3" ) );
+ setCaption(appTitle());
m_MainBox = new QWidget(this);
QVBoxLayout*m_l = new QVBoxLayout(m_MainBox);
@@ -210,8 +211,9 @@ void PMainWindow::slotUserStop()
m_PlayLib->stop();
m_PosSlider->setEnabled(false);
hideVideo();
slotShowList();
+ setCaption(appTitle());
}
void PMainWindow::slotTogglePlay(bool how)
{
@@ -243,8 +245,9 @@ void PMainWindow::slotPlayCurrent()
m_PosSlider->setEnabled(false);
a_playAction->setOn(false);
hideVideo();
slotShowList();
+ setCaption(appTitle());
return;
}
m_CurrentPos = 0;
m_playList->setCurrentItem(m_LastItem);
@@ -265,8 +268,9 @@ void PMainWindow::slotPlayCurrent()
// fehler
return;
}
mediaWindowraised();
+ setCaption(appTitle()+" - "+m_LastItem->Lnk().name());
odebug << "Range: " << result << oendl;
m_PosSlider->setEnabled(true);
m_PosSlider->setRange(0,m_PlayLib->length());
m_PosSlider->setValue(m_PlayLib->currentTime());
@@ -310,9 +314,10 @@ void PMainWindow::slotCheckPos()
m_uppos = m_PlayLib->currentTime();
emit sigPos(m_uppos);
m_PosSlider->setValue(m_PlayLib->currentTime());
}
- QTimer::singleShot( 1000, this, SLOT( slotCheckPos() ) );
+ qApp->processEvents(100);
+ QTimer::singleShot( 900, this, SLOT( slotCheckPos() ) );
}
void PMainWindow::slotRemoveFiles()
{
diff --git a/noncore/multimedia/opieplayer3/mwindow.h b/noncore/multimedia/opieplayer3/mwindow.h
index 5d011d5..3ea9a52 100644
--- a/noncore/multimedia/opieplayer3/mwindow.h
+++ b/noncore/multimedia/opieplayer3/mwindow.h
@@ -63,8 +63,9 @@ class QSlider;
class PMainWindow : public QMainWindow {
Q_OBJECT
public:
static QString appName() { return QString::fromLatin1("opie-mediaplayer3" ); }
+ static QString appTitle() {return QString::fromLatin1("Opie Mediaplayer 3" ); }
PMainWindow(QWidget*, const char*, WFlags );
virtual ~PMainWindow();
public slots:
diff --git a/noncore/multimedia/opieplayer3/playlist.cpp b/noncore/multimedia/opieplayer3/playlist.cpp
index 2eb40e3..6f2e668 100644
--- a/noncore/multimedia/opieplayer3/playlist.cpp
+++ b/noncore/multimedia/opieplayer3/playlist.cpp
@@ -163,8 +163,10 @@ void PlaylistView::addFile(const QString&aFile,const QString&aName)
QMessageBox::warning(0,tr("Error reading fileheader"),msg);
return;
}
m_lastItem = m_items.last();
+ PlaylistItem*_it = currentItem();
+
if (m_lastItem) {
m_lastItem = new PlaylistItem(aFile,this,m_lastItem);
} else {
m_lastItem = new PlaylistItem(aFile,this);
@@ -198,9 +200,11 @@ void PlaylistView::addFile(const QString&aFile,const QString&aName)
// time
m_lastItem->setText(COL_TIME,codec);
m_lastItem->Video(m_Infolib->hasVideo());
m_items.append(m_lastItem);
- setSelected(m_lastItem,true);
+ if (_it==NULL) {
+ setSelected(m_lastItem,true);
+ }
}
void PlaylistView::slotAppendDir()
{
diff --git a/noncore/multimedia/opieplayer3/videowidget.cpp b/noncore/multimedia/opieplayer3/videowidget.cpp
index 833ecb4..414400b 100644
--- a/noncore/multimedia/opieplayer3/videowidget.cpp
+++ b/noncore/multimedia/opieplayer3/videowidget.cpp
@@ -56,8 +56,9 @@ int VideoWidget::playFile(const DocLnk&aLnk,XINE::Lib*aLib)
m_xineLib->setWidget(m_Videodisplay);
m_xineLib->setShowVideo(true);
int res = m_xineLib->play(m_current.file());
vSize = m_xineLib->videoSize();
+
slot_Videoresized(m_Videodisplay->size());
odebug << "Xine play: " << res << oendl;
if (res != 1) {
return -2;