From: Jean-Baptiste M. <jb...@kd...> - 2015-08-04 22:36:12
|
Git commit 16d8d7323476b7fe13e3c926b248b53c1bf04b09 by Jean-Baptiste Mardelle. Committed on 04/08/2015 at 22:19. Pushed by mardelle into branch 'Applications/15.08'. Hide Project Notes widget on first startup, not a widely used feature M +8 -2 src/project/notesplugin.cpp M +3 -0 src/project/notesplugin.h M +2 -0 src/project/projectmanager.cpp http://commits.kde.org/kdenlive/16d8d7323476b7fe13e3c926b248b53c1bf04b09 diff --git a/src/project/notesplugin.cpp b/src/project/notesplugin.cpp index 660ba49..2bccb48 100644 --- a/src/project/notesplugin.cpp +++ b/src/project/notesplugin.cpp @@ -25,11 +25,17 @@ NotesPlugin::NotesPlugin(ProjectManager *projectManager) : connect(m_widget, &NotesWidget::insertNotesTimecode, this, &NotesPlugin::slotInsertTimecode); m_widget->setTabChangesFocus(true); m_widget->setPlaceholderText(i18n("Enter your project notes here ...")); - pCore->window()->addDock(i18n("Project Notes"), "notes_widget", m_widget); - + m_notesDock = pCore->window()->addDock(i18n("Project Notes"), "notes_widget", m_widget); + m_notesDock->close(); connect(projectManager, SIGNAL(docOpened(KdenliveDoc*)), SLOT(setProject(KdenliveDoc*))); } +NotesPlugin::~NotesPlugin() +{ + delete m_widget; + delete m_notesDock; +} + void NotesPlugin::setProject(KdenliveDoc* document) { connect(m_widget, SIGNAL(seekProject(int)), pCore->monitorManager()->projectMonitor()->render, SLOT(seekToFrame(int))); diff --git a/src/project/notesplugin.h b/src/project/notesplugin.h index e7218dc..cea2ab5 100644 --- a/src/project/notesplugin.h +++ b/src/project/notesplugin.h @@ -16,6 +16,7 @@ the Free Software Foundation, either version 3 of the License, or class NotesWidget; class KdenliveDoc; class ProjectManager; +class QDockWidget; /** * @class NotesPlugin @@ -32,6 +33,7 @@ public: explicit NotesPlugin(ProjectManager *projectManager); NotesWidget *widget(); void clear(); + ~NotesPlugin(); private slots: void setProject(KdenliveDoc *document); @@ -40,6 +42,7 @@ private slots: private: NotesWidget *m_widget; + QDockWidget *m_notesDock; }; #endif diff --git a/src/project/projectmanager.cpp b/src/project/projectmanager.cpp index 9570948..9ea45d6 100644 --- a/src/project/projectmanager.cpp +++ b/src/project/projectmanager.cpp @@ -63,6 +63,8 @@ ProjectManager::ProjectManager(QObject* parent) : ProjectManager::~ProjectManager() { + delete m_notesPlugin; + if (m_trackView) { delete m_trackView; } |