Friday, April 26, 2024
 Popular · Latest · Hot · Upcoming
2
rated 0 times [  2] [ 0]  / answers: 1 / hits: 3445  / 1 Year ago, sat, february 4, 2023, 6:54:56

I read the explanation to add a Custom Action, and how to remove them. But I'd like to remove the "delete" custom Action to keep only those I want.



Is it possible to Remove defaults custom actions, or to select them or do we have to keep some Custom Actions like "Delete" or others ?



Thunar image



And if yes, how can we manage ?


More From » thunar

 Answers
0

As far as I understand.. you want to remove the "Delete" action in Thunar.

Keep in mind that those are "Default Actions" not "Custom Actions". They are in the Thunar's source code.


In order to remove the "Delete" default action you should download the source code, edit, and then recompile it.



NOTE: In my case I'm running Xubuntu 13.04 with Thunar 1.6.2



enter image description here



You can try the following:



1) Open a Terminal and install the necessary packages.




  • sudo apt-get install build-essential



2) Install build dependencies




  • sudo apt-get build-dep thunar



3) Create a folder to download the source code.




  • mkdir ~/Downloads/src


  • cd ~/Downloads/src




4) Download the source code.




  • apt-get source thunar



5) Edit the the file "thunar-standard-view.c"




  • mousepad thunar-1.6.2/thunar/thunar-standard-view.c



You should remove the line number "402" and save the changes.




{ "delete", GTK_STOCK_DELETE, N_ ("_Delete"), NULL, NULL, G_CALLBACK
(thunar_standard_view_action_delete), },




Before:
enter image description here



After:
enter image description here



6) Go to the "thunar-1.6.2" folder to build the deb packages.




  • cd thunar-1.6.2/

  • dpkg-buildpackage -rfakeroot -uc -b



7) Now you can install the deb packages.




  • cd ..


  • sudo dpkg -i *deb




8) Finally you can logout and Login to see the changes.



9) Your thunar file manager should look like this:
(without the "Delete" Action")



enter image description here



hope it helps.


[#29782] Sunday, February 5, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
imonove

Total Points: 82
Total Questions: 113
Total Answers: 106

Location: Saint Vincent and the Grenadines
Member since Wed, Nov 3, 2021
3 Years ago
;