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

List:       kde-devel
Subject:    Re: KDE/kdenetwork/kopete/kopete/chatwindow
From:       "Jos Poortvliet" <jospoortvliet () kde ! nl>
Date:       2007-09-10 14:19:13
Message-ID: 5c77e14b0709100719r7114b6wb0f1e9e690d45e76 () mail ! gmail ! com
[Download RAW message or body]

On 9/10/07, Nickolai Shaforostoff <shafff@ukr.net> wrote:
> SVN commit 710626 by shaforo:
> 
> make the code ugly again, as requested by the authority

I'm no coder, but personally - I would agree with Nickolai, this code
could be improved.

Reverting this sucks. Why not go for the change, using Pavels and
Richards suggestion, maybe? David was for that as well... would Matt
agree with that?

For the record, Richard suggested:

d->scrollPressed = (scrolledTo < (view()->contentsHeight() - BORDER_WIDTH));

And plz note David as well, he's a God, shouldn't be ignored:
> BTW the -other- changes in that commit seemed fine to me, don't revert it all.

> CCMAIL: kde-devel@kde.org
> 
> 
> 
> M  +13 -8     chatmessagepart.cpp
> 
> 
> --- trunk/KDE/kdenetwork/kopete/kopete/chatwindow/chatmessagepart.cpp \
> #710625:710626 @@ -97,7 +97,7 @@
> {
> public:
> Private()
> -        : /*tt(0L),*/ scrollPressed(false), manager(0),
> +        : /*tt(0L),*/ manager(0), scrollPressed(false),
> copyAction(0), saveAction(0), printAction(0),
> closeAction(0),copyURLAction(0), currentChatStyle(0),
> latestDirection(Kopete::Message::Inbound), latestType(Kopete::Message::TypeNormal)
> @@ -114,8 +114,9 @@
> bool rtfOverride;
> 
> //     ToolTip *tt;
> +
> +       Kopete::ChatSession *manager;
> bool scrollPressed;
> -       Kopete::ChatSession *manager;
> 
> DOM::HTMLElement activeElement;
> 
> @@ -258,7 +259,10 @@
> void ChatMessagePart::slotScrollingTo( int y )
> {
> int scrolledTo = y + view()->visibleHeight();
> -       d->scrollPressed = !( scrolledTo >= ( view()->contentsHeight() - 10 ) );
> +       if ( scrolledTo >= ( view()->contentsHeight() - 10 ) )
> +               d->scrollPressed = false;
> +       else
> +               d->scrollPressed = true;
> }
> 
> void ChatMessagePart::save()
> @@ -739,15 +743,17 @@
> * This also copies the text as type text/html
> * RangeImpl::toHTML  was not implemented before KDE 3.4
> */
> -       QString text = selectedText();
> -       QString htmltext = selectedTextAsHTML();
> +       QString text;
> +       QString htmltext;
> +
> +        htmltext = selectedTextAsHTML();
> +        text = selectedText();
> //selectedText is now sufficient
> //      text=Kopete::Message::unescape( htmltext ).trimmed();
> // Message::unsescape will replace image by his title attribute
> // trimmed is for removing the newline added by the <!DOCTYPE> and other xml things \
> of RangeImpl::toHTML 
> -       if(text.isEmpty())
> -               return;
> +       if(text.isEmpty()) return;
> 
> disconnect( QApplication::clipboard(), SIGNAL( selectionChanged()), this, SLOT( \
> slotClearSelection())); 
> @@ -768,7 +774,6 @@
> #else
> if(!justselection)
> QApplication::clipboard()->setText( text, QClipboard::Clipboard );
> -       //NOTE maybe you wanna 'else' here?
> QApplication::clipboard()->setText( text, QClipboard::Selection );
> #endif
> connect( QApplication::clipboard(), SIGNAL( selectionChanged()), SLOT( \
> slotClearSelection())); 
> > > Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
> 
 
> > Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


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

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