Skip to content
  • Gregor Mi's avatar
    Add file related actions to Tabbar context menu and File menu: Rename, Delete,... · e8496c60
    Gregor Mi authored
    Add file related actions to Tabbar context menu and File menu: Rename, Delete, Compare (new), and some more
    
    Summary:
    Add some actions to Tabbar context menu and File menu
    
    New items in Tabbar context menu:
    - 'Rename file'
    - 'Delete file'
    - 'Properties'
    - 'Compare'
    
    'Compare' does the following: compare two files with an external diff tool. It works like this: right click on a tab which is NOT active and select the appropriate menu item (see screenshot). Then, the external tool opens and compares the active document with the one which was clicked on. Currently, three diff tools are supported: kdiff3, kompare and meld.
    
    New items in File main menu:
    - 'Rename file'
    - 'Delete file'
    - 'Compare'
    - 'Copy File Path'
    - 'Open Containing Folder'
    - 'Properties'
    
    Screenshots:
    
    Tab context menu:
    
    {F6414794}
    
    Tab context menu when no file is associated:
    
    {F6414793}
    
    Tab context menu with the compare feature:
    
    {F6431032}
    
    Diff tools not found:
    
    {F6450993}
    
    Actions are also available in the main File menu:
    
    {F6450928}
    
    NOTE: Some code of kfileactions.cpp was copied and adapted from katefiletree.cpp. TODO: reuse code there. Probably, this means kfileactions.h must be moved to KTextEditor.
    
    TODO: in a later change the 'Open with...' menu item which is currently available in the Projects and FileTree plugin could also be extracted and be added to the Tabbar context menu and File menu (Gwenview has it, too).
    
    Reviewers: #kate, #vdg, ngraham, cullmann
    
    Reviewed By: #kate, #vdg, ngraham, cullmann
    
    Subscribers: cullmann, anthonyfieroni, dhaumann, mmustac, ngraham, kwrite-devel
    
    Tags: #kate
    
    Differential Revision: https://phabricator.kde.org/D16830
    e8496c60