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

List:       kfm-devel
Subject:    Re: kdelibs/kdeui
From:       Simon Hausmann <hausmann () kde ! org>
Date:       2001-12-16 15:17:03
[Download RAW message or body]

On Sun, Dec 16, 2001 at 02:37:04PM +0100, Martijn Klingens wrote:
> On Sunday 16 December 2001 11:15, Simon Hausmann wrote:
> > Aside from that I personally disagree with back/forward obeying the
> > RTL settings here's a tiny API suggestion, based on what Ettrich said
> > two months ago on core-devel:
> 
> BTW, you would really do the code duplication in each app with back/forward 
> actions? ew...

Actually yes. Simple because obeying the RTL setting makes only
sense when two back and forward items are grouped together. In every
other case it results in a visual bug.

Now one could speculate which case is more likely, that back/fwd are
grouped or only one of them being used. But aside from that I think
it is just semantically wrong to create a relation between two
methods (the back() and forward() ones from KStdGuiItem) which is
completely invisible to the developer. They are separate methods
with different names, nothing obvious showing the relation.

Here's an alternative idea:

QPair<KGuiItem, KGuiItem> KStdGuiItem::backAndForward()
{
    KStdGuiItem::RTLSetting rtl = QApplication::reverseLayout() ?  Blah : Foo;
    return qMakePair( back( rtl ), forward( rtl ) );
}


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

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