http://code.google.com/p/quarkplayer/source/detail?r=1436
Modified:
/trunk/quarkplayer-plugins/MainWindow/CommonActions.cpp
/trunk/quarkplayer-plugins/MainWindow/MainWindow.cpp
/trunk/quarkplayer-plugins/Playlist/DragAndDropTreeView.cpp
/trunk/quarkplayer-plugins/Playlist/PlaylistWidget.cpp
=======================================
--- /trunk/quarkplayer-plugins/MainWindow/CommonActions.cpp Wed Feb 23
18:38:25 2011
+++ /trunk/quarkplayer-plugins/MainWindow/CommonActions.cpp Thu Feb 24
18:17:38 2011
@@ -128,7 +128,7 @@
action->setCheckable(true);
Actions.add("Common.FullScreen", action);
- action = new TkAction(app, tr("Esc"));
+ action = new TkAction(app, tr("Esc"), tr("Backspace"));
Actions.add("Common.FullScreenExit", action);
}
=======================================
--- /trunk/quarkplayer-plugins/MainWindow/MainWindow.cpp Thu Feb 24
10:33:59 2011
+++ /trunk/quarkplayer-plugins/MainWindow/MainWindow.cpp Thu Feb 24
18:17:38 2011
@@ -252,15 +252,9 @@
}
void MainWindow::setupUi() {
- //No central widget, only QDockWidget
- //setCentralWidget(NULL);
- /*QWidget * centralWidget = new QWidget();
- centralWidget->setMaximumSize(0, 0);
- centralWidget->setSizeIncrement(0, 0);
- centralWidget->setBaseSize(0, 0);
- centralWidget->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
- centralWidget->setMinimumSize(0, 0);
- setCentralWidget(centralWidget);*/
+ //Fake a central widget, Qt requires it
+ setCentralWidget(new QWidget());
+ centralWidget()->hide();
///
_menuFile = new QMenu();
@@ -434,17 +428,13 @@
void MainWindow::addDockWidget(Qt::DockWidgetArea area, QDockWidget *
lastDockWidget, QDockWidget * dockWidget) {
if (dockWidget) {
+
+ //Disable QDockWidget features
+ //The dock widget cannot be closed, moved, or floated
//dockWidget->setFeatures(QDockWidget::NoDockWidgetFeatures);
-#ifdef Q_WS_MAC
- //QDockWidgets cannot be floatable under Mac
- //so let's fully disable this feature
- dockWidget->setFloating(false);
-#endif //Q_WS_MAC
-
- //To hide the title bar completely
- //we must replace the default widget with a generic one
- dockWidget->setTitleBarWidget(new QWidget(this));
+ //Hide the title bar
+ //dockWidget->setTitleBarWidget(new QWidget(this));
QMainWindow::addDockWidget(area, dockWidget);
if (lastDockWidget) {
=======================================
--- /trunk/quarkplayer-plugins/Playlist/DragAndDropTreeView.cpp Wed Feb 23
10:23:21 2011
+++ /trunk/quarkplayer-plugins/Playlist/DragAndDropTreeView.cpp Thu Feb 24
18:17:38 2011
@@ -133,9 +133,13 @@
_actions.add("Playlist.PlayItem", new QAction(app));
_actions.add("Playlist.RemoveItem", new QAction(app));
+
TkAction * action = new TkAction(app, tr("Ctrl+I"), tr("Alt+3"));
action->setShortcutContext(Qt::ApplicationShortcut);
_actions.add("Playlist.GetInfo", action);
+ //Add it directly to the widget otherwise the shortcuts won't work
+ addAction(_actions["Playlist.GetInfo"]);
+
_actions.add("Playlist.OpenDir", new QAction(app));
}
=======================================
--- /trunk/quarkplayer-plugins/Playlist/PlaylistWidget.cpp Thu Feb 24
10:33:59 2011
+++ /trunk/quarkplayer-plugins/Playlist/PlaylistWidget.cpp Thu Feb 24
18:17:38 2011
@@ -354,13 +354,13 @@
}
void PlaylistWidget::playlistLoaded(PlaylistParser::Error, int
timeElapsed) {
- updateWindowTitle(tr("Playlist loaded:") + ' ' + QString::number((float)
timeElapsed / 1000) + ' ' + tr("seconds") +
- " (" + QString::number(_playlistModel->rowCount()) + ' ' +
tr("medias", "", _playlistModel->rowCount()) + ')');
+ PlaylistDebug() << "Load time (seconds):" << timeElapsed / 1000;
+ updateWindowTitle("");
}
void PlaylistWidget::playlistSaved(PlaylistParser::Error, int timeElapsed)
{
- updateWindowTitle(tr("Playlist saved:") + ' ' + QString::number((float)
timeElapsed / 1000) + ' ' + tr("seconds") +
- " (" + QString::number(_playlistModel->rowCount()) + ' ' +
tr("medias", "", _playlistModel->rowCount()) + ')');
+ PlaylistDebug() << "Save time (seconds):" << timeElapsed / 1000;
+ updateWindowTitle("");
}
void PlaylistWidget::updateWindowTitle(const QString & statusMessage) {
@@ -528,8 +528,8 @@
connectToMediaObject(quarkPlayer().currentMediaObject());
QString title = _dockWidget->windowTitle();
- if (title[0] != '!') {
- _dockWidget->setWindowTitle('!' + title);
+ if (!title.startsWith("> ")) {
+ _dockWidget->setWindowTitle("> " + title);
}
} else {
//This playlist is not the active one
@@ -538,8 +538,8 @@
//updateWindowTitle();
QString title = _dockWidget->windowTitle();
- if (title[0] == '!') {
- title.remove(0, 1);
+ if (title.startsWith("> ")) {
+ title.remove(0, 2);
_dockWidget->setWindowTitle(title);
}
}