Review Request 118994: make CTRL+SHIFT+T reopen last closed tab

Emmanuel Pescosta emmanuelpescosta099 at gmail.com
Sat Jul 5 13:15:15 BST 2014


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/118994/#review61644
-----------------------------------------------------------


Arjun, thanks for the updated patch!

Great so far, but looking at the code again, we should add a signal e.g. "closedTabsCountChanged(int)" to DolphinRecentTabsMenu and react on this signal in the main window. 

slot in main window:
closedTabsCountChanged(int count)
{
    actionCollection()->action("undo_close_tab")->setEnabled(count > 0);
}

So we need no new member variable in DolphinMainWindow and we have only one place where we enable/disable "closed tabs" related actions.

At the end of DolphinRecentTabsMenu::handleAction we calculate the number of closed tabs first, then we can emit the signal "closedTabsCountChanged(int)".
So we can save a lot of changes (we need only add 2 slots and 1 signal).

Sorry that I didn't come up with this idea earlier, so you had to do a lot of extra work, my fault! :(

- Emmanuel Pescosta


On July 5, 2014, 1:19 p.m., Arjun Ak wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/118994/
> -----------------------------------------------------------
> 
> (Updated July 5, 2014, 1:19 p.m.)
> 
> 
> Review request for Dolphin and KDE Base Apps.
> 
> 
> Bugs: 336818
>     http://bugs.kde.org/show_bug.cgi?id=336818
> 
> 
> Repository: kde-baseapps
> 
> 
> Description
> -------
> 
> Upon pressing CTRL+SHIFT+T, the most recently closed tab is reopened (with the help of Go->'Recently closed tabs' menu).
> 
> 
> Diffs
> -----
> 
>   dolphin/src/dolphinui.rc 52826bb 
>   dolphin/src/dolphinrecenttabsmenu.h 34d4153 
>   dolphin/src/dolphinrecenttabsmenu.cpp a39f994 
>   dolphin/src/dolphinmainwindow.h acf60a4 
>   dolphin/src/dolphinmainwindow.cpp c60951d 
> 
> Diff: https://git.reviewboard.kde.org/r/118994/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Arjun Ak
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20140705/2bd2db3a/attachment.htm>


More information about the kde-core-devel mailing list