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

List:       koffice-devel
Subject:    PATCH: kword2: put the templates back in the startup screen
From:       "Benjamin K. Stuhl" <bks24 () cornell ! edu>
Date:       2006-08-19 21:12:13
Message-ID: 200608191512.16452.bks24 () cornell ! edu
[Download RAW message or body]

[Attachment #2 (multipart/signed)]

[Attachment #4 (multipart/mixed)]


Here's a patch to start fixing the startup screen in kword2; the setInstance() 
isn't strictly needed yet, since there are probably lots of other things 
needed to be a proper KPart, but it's a good practice nonetheless.

-- BKS

["kword2-startup-templates-are-nice.patch" (text/x-diff)]

Index: koffice/kword/part/KWDocument.cpp
===================================================================
--- koffice/kword/part/KWDocument.cpp	(revision 574681)
+++ koffice/kword/part/KWDocument.cpp	(working copy)
@@ -20,6 +20,7 @@
 
 // kword includes
 #include "KWDocument.h"
+#include "KWFactory.h"
 #include "KWView.h"
 #include "KWCanvas.h"
 #include "KWPageManager.h"
@@ -59,6 +60,9 @@
     m_styleManager = new KoStyleManager(this);
     m_zoomMode = KoZoomMode::ZOOM_WIDTH;
 
+    setInstance( KWFactory::instance(), false );
+    setTemplateType( "kword_template" );
+
     connect (&m_frameLayout, SIGNAL(newFrameSet(KWFrameSet*)), this, SLOT(addFrameSet(KWFrameSet*)));
 
     // Init shape Factories with our frame based configuration panels.

[Attachment #8 (application/pgp-signature)]

_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel


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

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