[haiku-development] Re: RFC : using attributes to store shortcuts for Tracker add-ons

  • From: Philippe Saint-Pierre <stpere@xxxxxxxxx>
  • To: haiku-development <haiku-development@xxxxxxxxxxxxx>
  • Date: Mon, 1 Jul 2013 21:22:23 -0400

Hello again,

really short version : same ticket, new patch

long version:

I tried an approach similar to what was discussed, here are the details :

1. The default shortcuts are stored as resources in the binaries
2. To override that default, you can use the Shortcuts preflet (it
writes to ~/config/settings/shortcuts_settings)
     a) when you do so, only the shortcuts related to Tracker add-ons
are handled by Tracker, the other are still handled by shortcut_filter
in input_server
     b) following the same line as a), shortcut_filter doesn't handle
shortcut related to tracker add-ons

Tracker monitors that config files, and also monitor the add-ons
folders.  When you remove an overwrite in the setting file, Tracker
revert automatically to the default.

Tracker doesn't rescan the add-ons folders completely on every
invocation of the menu anymore, but rely on the NodeMonitor to
maintain it (mainly motivated by the slightly increased cost of
refreshing the list --- checking the BResources, then if it's in the
config file)

I hope that by reusing an already present preflet, it shouldn't add
unnecessary additional cruft in ~/config and make it acceptable. Also,
the shortcut_filter was improved; now it detects the removal of
shortcuts_settings and behave accordingly.

Comments welcome.

Philippe

Other related posts: