Review Request: Allow tabs to be dettached from window

Lasath Fernando kde at lasath.org
Wed Jul 6 19:55:21 CEST 2011



> On July 6, 2011, 10:40 a.m., David Edmundson wrote:
> > Code is generally really really good. You've done it pretty much how I was expecting.
> > 
> > I can see one outstanding quite large issue.
> >  Try doing this:
> >     open 2 chats
> >     detatch a tab
> >     wait till person B changes state.
> >     the new tab won't update the icon in the window - it may even still change the icon in the wrong window
> >     
> > Reason you only call setupTabSignals in createTab, not in addTab.
> > Also you don't ever disconnect the signals when you removeTab
> > 
> > I don't like ChatWindow having createTab and addTab - and it being structured in a way that createTab doesn't call addTab.
> > I would even consider moving createTab to TelepathyChatUi, but that's up to you.
> > 
> > I'd like to see another diff with Martin's comments and this issue addressed. Then I think we'll be good to ship.

I removed ChatWindow::startNewChat. It was actually rather useless. 

TelepathyChatUi::handleMessage now creates a new tab, and sets its window.


> On July 6, 2011, 10:40 a.m., David Edmundson wrote:
> > app/chat-window.cpp, line 188
> > <http://git.reviewboard.kde.org/r/101862/diff/1/?file=26130#file26130line188>
> >
> >     Why.. you delete it on the next line?

Because this actually calls removeTab, which removes it from the TabWidget etc.

I know this isn't particularly clear, but I'm trying to think up of a better way of laying it out.


> On July 6, 2011, 10:40 a.m., David Edmundson wrote:
> > app/chat-window.cpp, line 102
> > <http://git.reviewboard.kde.org/r/101862/diff/1/?file=26130#file26130line102>
> >
> >     For bonus points disable these actions if you can't move it left or right.

Done.


> On July 6, 2011, 10:40 a.m., David Edmundson wrote:
> > app/telepathy-chat-ui.cpp, line 115
> > <http://git.reviewboard.kde.org/r/101862/diff/1/?file=26132#file26132line115>
> >
> >     This is slightly dangerous - what if there are no chat Windows? You'll access out of bounds.
> >     
> >     In reality, you're probably safe as soon as last window closes the chat handler will close, though there is a very small risk of getting a new chat whilst you're closing the window at which point it could go wrong.
> >     
> >     Check window exists before you use it.
> >     
> >     In the next refactor that I can see happening I think we'll move creating windows to here.
> >

Fair enough. it now creates a new window if m_chatWindows.count() == 0.


- Lasath


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/101862/#review4442
-----------------------------------------------------------


On July 6, 2011, 5:55 p.m., Lasath Fernando wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/101862/
> -----------------------------------------------------------
> 
> (Updated July 6, 2011, 5:55 p.m.)
> 
> 
> Review request for Telepathy.
> 
> 
> Summary
> -------
> 
> Okay, internet's really sketchy here - I don't have time to type a long description. 
> 
> I'm not sure I handled the result from KMenu::exec() right, but apart form that my changes *should* be fairly straightforward in the diff.
> 
> http://quickgit.kde.org/?p=clones%2Ftelepathy-chat-handler%2Ffernando%2FdetachableTabs.git&a=shortlog&h=refs/heads/refractored_tabs
> 
> 
> Diffs
> -----
> 
>   app/chat-tab.h 2175fe2 
>   app/chat-tab.cpp 23c912e 
>   app/chat-window.h 2b2b70d 
>   app/chat-window.cpp 517b694 
>   app/telepathy-chat-ui.h 306912d 
>   app/telepathy-chat-ui.cpp 1654a9d 
> 
> Diff: http://git.reviewboard.kde.org/r/101862/diff
> 
> 
> Testing
> -------
> 
> Detached a few conversations with friends. 
> 
> 
> Thanks,
> 
> Lasath
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/kde-telepathy/attachments/20110706/c82b14d8/attachment-0001.htm 


More information about the KDE-Telepathy mailing list