! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
[Feature request] Patch for flags in XDG_DATA_HOME
Status:
RESOLVED: FIXED
Severity:
enhancement
Product:
Xfce4-xkb-plugin
Component:
General

Comments

Description Vadim Raskhozhev 2016-10-05 12:26:23 CEST
Created attachment 6871 
Patch for flags in XDG_DATA_HOME

Hello!

This patch makes xfce4-xkb-plugin use custom per-user flag icons in $XDG_DATA_HOME (as XDG Base Directory [1] specifies it), i. e. $XDG_DATA_HOME/us.svg, $XDG_DATA_HOME/ru.svg and so forth, falling back to FLAGSDIR if those are absent. Such a feature would let a user have his own flags for some (or all) keyboard layouts with no necessity to overwrite flag files in system directory and without losing those on package update. Please consider applying.

[1] https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
Comment 1 Viktor Odintsev editbugs 2017-06-03 00:16:16 CEST
I think using the XDG_DATA_HOME is not a good idea. By default it's a ~/.local/share directory which is not a good place to store icons directly in the root. I think $XDG_DATA_HOME/xfce4/xkb/flags should be used for this (just like /usr/share/xfce4/xkb/flags/ is used by default).
Comment 2 Vadim Raskhozhev 2017-06-03 00:46:31 CEST
(In reply to Viktor Odintsev from comment #1)
> I think using the XDG_DATA_HOME is not a good idea. By default it's a
> ~/.local/share directory which is not a good place to store icons directly
> in the root. I think $XDG_DATA_HOME/xfce4/xkb/flags should be used for this
> (just like /usr/share/xfce4/xkb/flags/ is used by default).

Sure. To be honest, the proposed patch is the best I could do since I'm not a programmer and could not implement the idea right way. So it would be more than nice if someone familiar with C did it like it should be.
Comment 3 Git Bot editbugs 2017-06-10 14:31:49 CEST
Viktor Odintsev referenced this bugreport in commit 7f74d7e811e8031d4e8c475919493d93dd0bbf3d

Bug 12884: Load flags from XDG_DATA_HOME if present

https://git.xfce.org/panel-plugins/xfce4-xkb-plugin/commit?id=7f74d7e811e8031d4e8c475919493d93dd0bbf3d
Comment 4 Vadim Raskhozhev 2017-06-11 22:59:59 CEST
Viktor, thanks!
Comment 5 Viktor Odintsev editbugs 2017-07-24 15:59:17 CEST
Should work in 0.8.0
Comment 6 Vadim Raskhozhev 2017-07-26 16:20:28 CEST
> Should work in 0.8.0

It does. Thanks again!

Bug #12884

Reported by:
Vadim Raskhozhev
Reported on: 2016-10-05
Last modified on: 2017-07-26

People

Assignee:
Azamat H. Hackimov
CC List:
2 users

Version

Attachments

Patch for flags in XDG_DATA_HOME (571 bytes, patch)
2016-10-05 12:26 CEST , Vadim Raskhozhev
no flags

Additional information