Menu

#60 Enable file delete from file context menu in project window

Undefined
open
None
Patch
2020-10-17
2014-10-09
Riot
No

The right-click context menu in the project window allows you to rename files (but only while they are not open in the editor).

Since it's possible to create files and rename them inside Code::Blocks, it would also make sense to add functionality to delete project files from disk, as well as just the project, in the same interface. As it is, I currently have to remove a file from the project and then manually step outside of the editor to delete the file on disk in a separate step, which is a hindrance to workflow.

Related

Tickets: #418

Discussion

  • Morten MacFly

    Morten MacFly - 2015-02-07
    • Type: --> Undefined
     
  • Teodor Petrov

    Teodor Petrov - 2016-10-24
    • Type: Undefined --> Feature_Request
    • Milestone: Next_Release --> Undefined
     
  • bluehazzard

    bluehazzard - 2016-10-25

    You can delete the file with:
    Right click on the project -> Open Project Folder in File Browser

    browse to file

    Right click -> delete

     
    • Riot

      Riot - 2016-10-25

      This feature request is about deleting files from disk, not simply removing them from the project.

      Since it's currently possible to create files on disk in codeblocks, and rename files on disk by renaming them in the project, it would be logical to also delete files from inside codeblocks without having to switch away from the editor.

       
  • bluehazzard

    bluehazzard - 2016-10-25

    you delete it from disk with the File browser (it is a plugin)

     
  • bluehazzard

    bluehazzard - 2018-04-19

    With this patch the user gets asked if he wants to delete the file also from disk, if he removes a file from project.

    A other solution would be to add this functionality to the ProjectManager::RemoveFileFromProject() function with a bool variable...

    opinions?

     
    • Teodor Petrov

      Teodor Petrov - 2018-04-28
      1. I don't like the code duplication
      2. You should use an annoying dialog instead of cbMessageBox. Most people wouldn't want to be asked all the time about this.
      3. Not sure if it is not a good idea to make a more complex dialog where there are multiple buttons for different actions - "From project", "From disk", "From both", "Cancel"....
       
  • Teodor Petrov

    Teodor Petrov - 2018-04-28
    • Type: Feature_Request --> Patch
     
  • Teodor Petrov

    Teodor Petrov - 2018-05-23

    @bluehazzard: Any progress with this one?

     
  • bluehazzard

    bluehazzard - 2018-05-24

    sry, really busy at the moment...

     
  • Teodor Petrov

    Teodor Petrov - 2018-05-24

    I'm not in a hurry. I just want to make sure that time spent for this won't be in vein.

     
  • Teodor Petrov

    Teodor Petrov - 2018-09-11

    Ping 2?

     
  • bluehazzard

    bluehazzard - 2018-09-11

    You should use an annoying dialog instead of cbMessageBox. Most people wouldn't want to be asked all the time about this.
    Not sure if it is not a good idea to make a more complex dialog where there are multiple buttons for different actions - "From project", "From disk", "From both", "Cancel"....

    What about expanding annoying dialog to be able to carry 4 (or X) buttons and make every button customizable? I think a flexible Dialog like this could probably be used in many places. I hate to add a other dialog (to mutch work with all this project files)... I would open a new ticket for this dialog...

     
  • Teodor Petrov

    Teodor Petrov - 2018-09-12

    Add it to one of them and I'll add it to all the others. I'm not sure it is a good idea to touch the annoying dialog much.

     
  • bluehazzard

    bluehazzard - 2018-09-13

    Ok, i removed the code duplication and used the annoying dialog.
    The user gets asked if he wants to remove the file form:

    • only project
    • disk and project
    • cancel

    i don't see an usefull case to delte a file from disk but not from project...

     

    Last edit: bluehazzard 2018-09-13
  • Teodor Petrov

    Teodor Petrov - 2020-10-17
    • assigned_to: bluehazzard
     
  • Teodor Petrov

    Teodor Petrov - 2020-10-17
    • assigned_to: bluehazzard --> Teodor Petrov
     
  • Teodor Petrov

    Teodor Petrov - 2020-10-17

    I'll do this, because the formatting of the patch needs to be cleaned up.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.