techee commented on this pull request.


> @@ -782,6 +768,36 @@ static void load_kb(GeanyKeyGroup *group, 
> GeanyKeyBinding *kb, gpointer user_dat
 }
 
 
+static void init_platform_kb(void)
+{
+#ifdef __APPLE__
+       gchar *configfile = g_build_filename(app->datadir, 
"keybindings_osx.conf", NULL);

Great! I knew you wouldn't resist the temptation to mess with m4 :-)

But the patch doesn't do exactly the right thing. The point of my patch was to 
keep Geany's keybindings.conf and only override the keybindings which have to 
change inside keybindings_osx.conf so it doesn't have to change every time some 
new keybinding is added and it's easier to see only the changes. See the calls 
of init_default_kb() followed by init_system_kb() which does the overrides.

So what I assumed you had in mind in your original comment was to keep 
`keybindings.conf` as it is now but then on install time copy only the 
keybindings file specific to the used platform and rename it to e.g. 
`keybindings_patform.conf` which would be referenced in the sources so there 
wouldn't have to be any ifdefs and only one version of platform-specific 
keybindings would be installed.

Also I think it would be best to keep the platform-specific keybinding files 
inside the data dir in sources and not to move it under osx as they will 
usually have to be updated together.

Now the question is how hard this would be to do this and whether it's worth 
the work...

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/1395#discussion_r140652208

Reply via email to