[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    =?utf-8?q?=5Bplasmate=5D_/=3A_=27Close_Project=27_button_added_a?=
From:       Giorgos Tsiapaliwkas <terietor () gmail ! com>
Date:       2011-05-20 10:22:19
Message-ID: 20110520102219.21343A60A4 () git ! kde ! org
[Download RAW message or body]

Git commit ebcecdf2e133d13bf440759c7cf71e7b5d627c0d by Giorgos Tsiapaliwkas.
Committed on 20/05/2011 at 12:14.
Pushed by tsiapaliwkas into branch 'master'.

'Close Project' button added at the menu 'File'

M  +10   -0    mainwindow.cpp     
M  +1    -0    mainwindow.h     
M  +1    -0    plasmateui.rc     

http://commits.kde.org/plasmate/ebcecdf2e133d13bf440759c7cf71e7b5d627c0d

diff --git a/mainwindow.cpp b/mainwindow.cpp
index 8d47b09..8326a29 100644
--- a/mainwindow.cpp
+++ b/mainwindow.cpp
@@ -212,6 +212,7 @@ void MainWindow::setupActions()
     addAction(i18n("Create Save Point"), "document-save", SLOT(selectSavePoint()), \
                "savepoint", KStandardShortcut::save());
     addAction(i18n("Publish"), "krfb", SLOT(selectPublish()),   "publish");
 
+    addAction(i18n("Close Project"), "plasmagik", SLOT(showStartPage()),   \
                "file_startpage");
     addAction(i18n("Preview"), "user-desktop", SLOT(togglePreview()), \
                "preview")->setCheckable(true);
     addAction(i18n("Notes"), "accessories-text-editor", SLOT(toggleNotes()), \
                "notes")->setCheckable(true);
     addAction(i18n("Files"), "system-file-manager", SLOT(toggleFileList()), \
"file_list")->setCheckable(true); @@ -228,6 +229,15 @@ void \
                MainWindow::updateActions()
     actionCollection()->action("documentation")->setChecked(m_browser && \
m_browser->isVisible());  }
 
+void MainWindow::showStartPage()
+{
+    toolBar()->hide();
+    menuBar()->hide();
+    setCentralWidget(m_central);
+    m_central->switchTo(m_startPage);
+    setDockOptions(QMainWindow::AllowNestedDocks);
+}
+
 void MainWindow::toggleTimeLine()
 {
     if (!m_timeLine) {
diff --git a/mainwindow.h b/mainwindow.h
index ea78e4d..fe9dcdb 100644
--- a/mainwindow.h
+++ b/mainwindow.h
@@ -76,6 +76,7 @@ private:
     void initTimeLine();
 
 private Q_SLOTS:
+    void showStartPage();
     void saveEditorData();
     void saveAndRefresh();
     void refreshNotes();
diff --git a/plasmateui.rc b/plasmateui.rc
index 05aa1cd..ac0cafb 100644
--- a/plasmateui.rc
+++ b/plasmateui.rc
@@ -6,6 +6,7 @@
     <Merge/>
     <Separator/>
     <Action name="file_quit"/>
+    <Action name="file_startpage"/>
   </Menu>
   <Merge />
 </MenuBar>


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic