mate-desktop / libmatekbd

Keyboard management library
https://mate-desktop.org
GNU Lesser General Public License v2.1
17 stars 11 forks source link

moving flags to libmatekbd #35

Open raveit65 opened 7 years ago

raveit65 commented 7 years ago

Initial work is done with https://github.com/mate-desktop/libmatekbd/tree/dev-flags

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/44231569-moving-flags-to-libmatekbd?utm_campaign=plugin&utm_content=tracker%2F1554631&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F1554631&utm_medium=issues&utm_source=github).
raveit65 commented 7 years ago

All Arabic and Spanish (Latin American) are displaying a stop sign instead of correct flags

arabic

Chinese is OK, but not selectable (But Chinese Tibetian and Chinese Uyghur are OK and selectable)

complete list: Afghani Algeria (wrong flag - more like a stop sign) Argentina (wrong flag - more like a stop sign) Azerbaijani Bahrain (wrong flag - more like a stop sign) Belgium Bosnia and Herzegovina Botswana Brunei Darusallam (Malay Jawi) Chile (wrong flag - more like a stop sign) China (flags is visible, but not selectable) Costa Rica - (wrong flag - more like a stop sign) Cuba - (wrong flag - more like a stop sign) Dominican Republic - (wrong flag - more like a stop sign) Ecuador (wrong flag - more like a stop sign) Egypt (wrong flag - more like a stop sign) El Salvador (wrong flag - more like a stop sign) Estonian Faroe Islands Finland Germany Greece Guatemala (wrong flag - more like a stop sign) Guinea Haiti (wrong flag - more like a stop sign) Honduras (wrong flag - more like a stop sign) Jordan (wrong flag - more like a stop sign) Kuwait (wrong flag - more like a stop sign) Kyrgyztan Latvia Lebanon (wrong flag - more like a stop sign) Libya (wrong flag - more like a stop sign) Mali (Bambara) Mauritania (wrong flag - more like a stop sign) Mexico (wrong flag - more like a stop sign) Morocco (wrong flag - more like a stop sign) Nepal Netherlands Nicaragua (wrong flag - more like a stop sign) Oman (wrong flag - more like a stop sign) Palestine (wrong flag - more like a stop sign) Panama - (wrong flag - more like a stop sign) Paraguay (wrong flag - more like a stop sign) Peru (wrong flag - more like a stop sign) Puerto Rico (wrong flag - more like a stop sign) Qatar (wrong flag - more like a stop sign) Romania Saudi Arabia (wrong flag - more like a stop sign) South Africa Sudan (wrong flag - more like a stop sign) Syrian (wrong flag - more like a stop sign) Tanzania Tunisia (wrong flag - more like a stop sign) UAE (wrong flag - more like a stop sign) United Kingdom United States Uruguay (wrong flag - more like a stop sign) Venezuela (wrong flag - more like a stop sign) Western Sahara (wrong flag - more like a stop sign) Yemen (wrong flag - more like a stop sign)

from https://github.com/mate-desktop/mate-icon-theme/issues/22#issue-219928105 https://github.com/mate-desktop/mate-icon-theme/issues/22

raveit65 commented 7 years ago

https://github.com/mate-desktop/libmatekbd/commit/1deb2abfaac55d314e4b726df3545e5751bdac57 Code knows now new flag dir, so this is testable. /usr/share/libmatekbd/flags/ Of course mate-icon-theme can be downgraded to 1.18.0

raveit65 commented 7 years ago

@monsta Should we consider this is a fix for 1.18.x as the flags are moved from mate-icon-theme-1.18.1 ? In result it isn't needed any more to use mate or menta icon theme. Or should we leave that for 1.20 and maybe someone found a solution for countries with spanish or arabic language ?

lukefromdc commented 7 years ago

I just tested this, the only flag that worked was the UK flag for some reason. Using my normal icon set, which inherits from mate icons

raveit65 commented 7 years ago

M-s-d was restarted? And mate-icon-theme- 1.18.0 (w/o flags) is used? Note, flags from south-american countries don't work as we read the keyboard layout name. The layout name is (Spanish, latin america) in this case. So here we have no country name. Same problem we have with arabic countries. For this reason we see a stop sign. This is much better solved with english countries. Ie. (English, Malta).

raveit65 commented 7 years ago

Btw. with m-i-t-1.18.1 al lot of flags were broken, this i fixed before moving the set to libmatekbd. The idea is that ppl who use other icon-themes like mint-theme can use the flags from libmatekbd.

lukefromdc commented 7 years ago

New session and new run of m-s-d made no difference here. Never installed the version of mate-icon-theme with the flags. In testing a few countries I found the Afghanistan, Ireland, and UK flags working but those of the US or Russia not working and falling back to the "do not enter" icon. Most seemed to be broken. no errors found in syslog and nothing obvious in .xsession-errors .

raveit65 commented 7 years ago

Hmm, that sounds like a status before i replaced those icons in a dev branch of m-i-t. @willysr Can you please test again? Use libmatekbd from this branch https://github.com/mate-desktop/libmatekbd/tree/dev-flags and flags should be at /usr/share/libmatekbd/flags/ Of course downgrade mate-icon-theme and restart session or m-s-d.

willysr commented 7 years ago

i can confirm what happened with @lukefromdc also happened here US nor Russia's flag showed stop sign

raveit65 commented 7 years ago

Confirmed. The "do not enter" icon indicates a problem with selecting the country from the layout name. The images itself seems to be OK. I will try to use the pixmap dir instead , maybe this is better for the locale. I created a new dir to avoid a conflict with another package which tries to install to /usr/share/pixmaps/flags or /usr/share/icons/flags Those dirs were already used in our code.

lukefromdc commented 7 years ago

Locales are not the issue here, I've got all unused locales purged except (US)English and Spanish and yet the Afghanistan and Ireland flags work

raveit65 commented 7 years ago

Ok, i tried other dirs mentioned in our code https://github.com/mate-desktop/libmatekbd/blob/master/libmatekbd/matekbd-indicator-config.c#L240 and i got the same unsatisfactory results. I will restore flags in themes which gave the best experience if you use mate or menta icon theme. Here i see only for countries with spanish or arabic languages no flags. Maybe some other find out how the code works here.

raveit65 commented 7 years ago

i released m-i-t-1.16.2 /1.18.2 with fixed icons. @lukefromdc You can add 'Inherits=mate' to your icon theme, than you should see the flags after icon-cache update with your icon-theme. https://github.com/mate-desktop/mate-icon-theme/blob/master/menta/index.theme#L4

lukefromdc commented 7 years ago

I can verify that moving the flags back to mate-icon-theme makes them work. Had the US, Afghani, and Belgian flags set up, could click to cycle through them on the flags