aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Baptiste Mardelle <[email protected]>2015-08-05 00:19:25 +0200
committerJean-Baptiste Mardelle <[email protected]>2015-08-05 00:19:25 +0200
commit16d8d7323476b7fe13e3c926b248b53c1bf04b09 (patch)
treef1be1ce9d48a5eb031a7c8ef94a156062a1390cd
parent770fc2417b2c6db72ddbdd389e3be6b5cbc4a8df (diff)
Hide Project Notes widget on first startup, not a widely used feature
-rw-r--r--src/project/notesplugin.cpp10
-rw-r--r--src/project/notesplugin.h3
-rw-r--r--src/project/projectmanager.cpp2
3 files changed, 13 insertions, 2 deletions
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;
}