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

List:       koffice-devel
Subject:    Re: [patch] for 167009 and 167103
From:       Thomas Zander <zander () kde ! org>
Date:       2008-07-23 7:05:14
Message-ID: 200807230905.14806.zander () kde ! org
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


Ooh, cool. :)

Patches look great.

I committed them with only slight adjustments; I fixed some whitespace issues 
and added a Q_ASSERT(m_currentPage); where you removed the if (m_currentPage) 
just to make it clear we now depend upon that var never being null :)

Thanks a lot for these!!

On Tuesday 22. July 2008 21:36:09 Tony Wolf wrote:
> here are two small patches to fix 167009 and 167103.
>
> I've tested them (compiling and stressing kword :D) and these two issues
> seems to be gone.
>
> For 167009 I tried to find a way to disable "Edit->Delete Page" if there is
> only one page available and to enable it if pageCount is increasing. But
> haven't found a way to do this within KWDocument.

I think the way to do this is to convert KWPageManager into a QObject and let 
it emit a signal if a page is added/removed.  We can then connect to that in 
the document and check if the amount of pages is such that we should enable 
the action; like this;

> This code should do the task:
> bool enablePageCount = m_document->pageCount > 1;
> actionCollection()->action("delete_page")->setEnabled(enablePageCount);

Thanks for working on bugs in kword!
-- 
Thomas Zander

["signature.asc" (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