diff --git a/configure.ac b/configure.ac index 33ee387..353a6c3 100644 --- a/configure.ac +++ b/configure.ac @@ -47,6 +47,7 @@ GDK_PIXBUF_REQUIRED=2.22.0 GTK_REQUIRED=3.3.16 GLIB_REQUIRED=2.37.3 +CLUTTER_REQUIRED=1.10 AC_SUBST(GTK_REQUIRED) AC_SUBST(GLIB_REQUIRED) @@ -69,9 +70,12 @@ dnl pkg-config dependency checks PKG_CHECK_MODULES(XAPP, gdk-pixbuf-2.0 >= $GDK_PIXBUF_REQUIRED - gtk+-3.0 >= $GTK_REQUIRED - glib-2.0 >= $GLIB_REQUIRED - gio-2.0 >= $GLIB_REQUIRED) + gtk+-3.0 >= $GTK_REQUIRED + glib-2.0 >= $GLIB_REQUIRED + gio-2.0 >= $GLIB_REQUIRED + cairo + libgnomekbdui + clutter-1.0 >= CLUTTER_REQUIRED) dnl Language Support diff --git a/debian/xapps-common.install b/debian/xapps-common.install index c70a9d6..09f0355 100755 --- a/debian/xapps-common.install +++ b/debian/xapps-common.install @@ -4,3 +4,4 @@ usr/share/locale usr/bin/ usr/share/icons +usr/share/xapps diff --git a/files/usr/share/xapps/flags/aa.png b/files/usr/share/xapps/flags/aa.png new file mode 100644 index 0000000..e070f6a Binary files /dev/null and b/files/usr/share/xapps/flags/aa.png differ diff --git a/files/usr/share/xapps/flags/ad.png b/files/usr/share/xapps/flags/ad.png new file mode 100644 index 0000000..74f976a Binary files /dev/null and b/files/usr/share/xapps/flags/ad.png differ diff --git a/files/usr/share/xapps/flags/ae.png b/files/usr/share/xapps/flags/ae.png new file mode 100644 index 0000000..2bd2165 Binary files /dev/null and b/files/usr/share/xapps/flags/ae.png differ diff --git a/files/usr/share/xapps/flags/af.png b/files/usr/share/xapps/flags/af.png new file mode 100644 index 0000000..0b03bda Binary files /dev/null and b/files/usr/share/xapps/flags/af.png differ diff --git a/files/usr/share/xapps/flags/ag.png b/files/usr/share/xapps/flags/ag.png new file mode 100644 index 0000000..78028d7 Binary files /dev/null and b/files/usr/share/xapps/flags/ag.png differ diff --git a/files/usr/share/xapps/flags/ai.png b/files/usr/share/xapps/flags/ai.png new file mode 100644 index 0000000..fa7af92 Binary files /dev/null and b/files/usr/share/xapps/flags/ai.png differ diff --git a/files/usr/share/xapps/flags/al.png b/files/usr/share/xapps/flags/al.png new file mode 100644 index 0000000..476628c Binary files /dev/null and b/files/usr/share/xapps/flags/al.png differ diff --git a/files/usr/share/xapps/flags/am.png b/files/usr/share/xapps/flags/am.png new file mode 100644 index 0000000..1dc1e87 Binary files /dev/null and b/files/usr/share/xapps/flags/am.png differ diff --git a/files/usr/share/xapps/flags/ao.png b/files/usr/share/xapps/flags/ao.png new file mode 100644 index 0000000..3fe7954 Binary files /dev/null and b/files/usr/share/xapps/flags/ao.png differ diff --git a/files/usr/share/xapps/flags/aq.png b/files/usr/share/xapps/flags/aq.png new file mode 100644 index 0000000..3e459a4 Binary files /dev/null and b/files/usr/share/xapps/flags/aq.png differ diff --git a/files/usr/share/xapps/flags/ar.png b/files/usr/share/xapps/flags/ar.png new file mode 100644 index 0000000..cf5e145 Binary files /dev/null and b/files/usr/share/xapps/flags/ar.png differ diff --git a/files/usr/share/xapps/flags/ara.png b/files/usr/share/xapps/flags/ara.png new file mode 100644 index 0000000..5c7ff72 Binary files /dev/null and b/files/usr/share/xapps/flags/ara.png differ diff --git a/files/usr/share/xapps/flags/as.png b/files/usr/share/xapps/flags/as.png new file mode 100644 index 0000000..b10757a Binary files /dev/null and b/files/usr/share/xapps/flags/as.png differ diff --git a/files/usr/share/xapps/flags/at.png b/files/usr/share/xapps/flags/at.png new file mode 100644 index 0000000..23042ff Binary files /dev/null and b/files/usr/share/xapps/flags/at.png differ diff --git a/files/usr/share/xapps/flags/au.png b/files/usr/share/xapps/flags/au.png new file mode 100644 index 0000000..eadbcb0 Binary files /dev/null and b/files/usr/share/xapps/flags/au.png differ diff --git a/files/usr/share/xapps/flags/aw.png b/files/usr/share/xapps/flags/aw.png new file mode 100644 index 0000000..8cdf24a Binary files /dev/null and b/files/usr/share/xapps/flags/aw.png differ diff --git a/files/usr/share/xapps/flags/ax.png b/files/usr/share/xapps/flags/ax.png new file mode 100644 index 0000000..1e9b700 Binary files /dev/null and b/files/usr/share/xapps/flags/ax.png differ diff --git a/files/usr/share/xapps/flags/az.png b/files/usr/share/xapps/flags/az.png new file mode 100644 index 0000000..03499e8 Binary files /dev/null and b/files/usr/share/xapps/flags/az.png differ diff --git a/files/usr/share/xapps/flags/ba.png b/files/usr/share/xapps/flags/ba.png new file mode 100644 index 0000000..3c58931 Binary files /dev/null and b/files/usr/share/xapps/flags/ba.png differ diff --git a/files/usr/share/xapps/flags/bb.png b/files/usr/share/xapps/flags/bb.png new file mode 100644 index 0000000..6ad3931 Binary files /dev/null and b/files/usr/share/xapps/flags/bb.png differ diff --git a/files/usr/share/xapps/flags/bd.png b/files/usr/share/xapps/flags/bd.png new file mode 100644 index 0000000..bc912f2 Binary files /dev/null and b/files/usr/share/xapps/flags/bd.png differ diff --git a/files/usr/share/xapps/flags/be.png b/files/usr/share/xapps/flags/be.png new file mode 100644 index 0000000..5d37876 Binary files /dev/null and b/files/usr/share/xapps/flags/be.png differ diff --git a/files/usr/share/xapps/flags/bf.png b/files/usr/share/xapps/flags/bf.png new file mode 100644 index 0000000..37c749f Binary files /dev/null and b/files/usr/share/xapps/flags/bf.png differ diff --git a/files/usr/share/xapps/flags/bg.png b/files/usr/share/xapps/flags/bg.png new file mode 100644 index 0000000..393f80e Binary files /dev/null and b/files/usr/share/xapps/flags/bg.png differ diff --git a/files/usr/share/xapps/flags/bh.png b/files/usr/share/xapps/flags/bh.png new file mode 100644 index 0000000..073706e Binary files /dev/null and b/files/usr/share/xapps/flags/bh.png differ diff --git a/files/usr/share/xapps/flags/bi.png b/files/usr/share/xapps/flags/bi.png new file mode 100644 index 0000000..daa5735 Binary files /dev/null and b/files/usr/share/xapps/flags/bi.png differ diff --git a/files/usr/share/xapps/flags/bj.png b/files/usr/share/xapps/flags/bj.png new file mode 100644 index 0000000..72efb5d Binary files /dev/null and b/files/usr/share/xapps/flags/bj.png differ diff --git a/files/usr/share/xapps/flags/bl.png b/files/usr/share/xapps/flags/bl.png new file mode 100644 index 0000000..743d8ba Binary files /dev/null and b/files/usr/share/xapps/flags/bl.png differ diff --git a/files/usr/share/xapps/flags/bm.png b/files/usr/share/xapps/flags/bm.png new file mode 100644 index 0000000..0c6905d Binary files /dev/null and b/files/usr/share/xapps/flags/bm.png differ diff --git a/files/usr/share/xapps/flags/bn.png b/files/usr/share/xapps/flags/bn.png new file mode 100644 index 0000000..5aae537 Binary files /dev/null and b/files/usr/share/xapps/flags/bn.png differ diff --git a/files/usr/share/xapps/flags/bo.png b/files/usr/share/xapps/flags/bo.png new file mode 100644 index 0000000..03e6196 Binary files /dev/null and b/files/usr/share/xapps/flags/bo.png differ diff --git a/files/usr/share/xapps/flags/bq.png b/files/usr/share/xapps/flags/bq.png new file mode 100644 index 0000000..78d69b3 Binary files /dev/null and b/files/usr/share/xapps/flags/bq.png differ diff --git a/files/usr/share/xapps/flags/br.png b/files/usr/share/xapps/flags/br.png new file mode 100644 index 0000000..eefac64 Binary files /dev/null and b/files/usr/share/xapps/flags/br.png differ diff --git a/files/usr/share/xapps/flags/brl.png b/files/usr/share/xapps/flags/brl.png new file mode 100644 index 0000000..6b87157 Binary files /dev/null and b/files/usr/share/xapps/flags/brl.png differ diff --git a/files/usr/share/xapps/flags/bs.png b/files/usr/share/xapps/flags/bs.png new file mode 100644 index 0000000..f995957 Binary files /dev/null and b/files/usr/share/xapps/flags/bs.png differ diff --git a/files/usr/share/xapps/flags/bt.png b/files/usr/share/xapps/flags/bt.png new file mode 100644 index 0000000..641aca2 Binary files /dev/null and b/files/usr/share/xapps/flags/bt.png differ diff --git a/files/usr/share/xapps/flags/bv.png b/files/usr/share/xapps/flags/bv.png new file mode 100644 index 0000000..eb5b72e Binary files /dev/null and b/files/usr/share/xapps/flags/bv.png differ diff --git a/files/usr/share/xapps/flags/bw.png b/files/usr/share/xapps/flags/bw.png new file mode 100644 index 0000000..1a9910d Binary files /dev/null and b/files/usr/share/xapps/flags/bw.png differ diff --git a/files/usr/share/xapps/flags/by.png b/files/usr/share/xapps/flags/by.png new file mode 100644 index 0000000..f65e0a5 Binary files /dev/null and b/files/usr/share/xapps/flags/by.png differ diff --git a/files/usr/share/xapps/flags/bz.png b/files/usr/share/xapps/flags/bz.png new file mode 100644 index 0000000..11a2394 Binary files /dev/null and b/files/usr/share/xapps/flags/bz.png differ diff --git a/files/usr/share/xapps/flags/ca.png b/files/usr/share/xapps/flags/ca.png new file mode 100644 index 0000000..3960a81 Binary files /dev/null and b/files/usr/share/xapps/flags/ca.png differ diff --git a/files/usr/share/xapps/flags/cc.png b/files/usr/share/xapps/flags/cc.png new file mode 100644 index 0000000..724cee9 Binary files /dev/null and b/files/usr/share/xapps/flags/cc.png differ diff --git a/files/usr/share/xapps/flags/cd.png b/files/usr/share/xapps/flags/cd.png new file mode 100644 index 0000000..3fea5dc Binary files /dev/null and b/files/usr/share/xapps/flags/cd.png differ diff --git a/files/usr/share/xapps/flags/cf.png b/files/usr/share/xapps/flags/cf.png new file mode 100644 index 0000000..e06aa6f Binary files /dev/null and b/files/usr/share/xapps/flags/cf.png differ diff --git a/files/usr/share/xapps/flags/cg.png b/files/usr/share/xapps/flags/cg.png new file mode 100644 index 0000000..65b286c Binary files /dev/null and b/files/usr/share/xapps/flags/cg.png differ diff --git a/files/usr/share/xapps/flags/ch.png b/files/usr/share/xapps/flags/ch.png new file mode 100644 index 0000000..934f6bc Binary files /dev/null and b/files/usr/share/xapps/flags/ch.png differ diff --git a/files/usr/share/xapps/flags/ci.png b/files/usr/share/xapps/flags/ci.png new file mode 100644 index 0000000..48505af Binary files /dev/null and b/files/usr/share/xapps/flags/ci.png differ diff --git a/files/usr/share/xapps/flags/ck.png b/files/usr/share/xapps/flags/ck.png new file mode 100644 index 0000000..87c9faa Binary files /dev/null and b/files/usr/share/xapps/flags/ck.png differ diff --git a/files/usr/share/xapps/flags/cl.png b/files/usr/share/xapps/flags/cl.png new file mode 100644 index 0000000..6a310a6 Binary files /dev/null and b/files/usr/share/xapps/flags/cl.png differ diff --git a/files/usr/share/xapps/flags/cm.png b/files/usr/share/xapps/flags/cm.png new file mode 100644 index 0000000..34731af Binary files /dev/null and b/files/usr/share/xapps/flags/cm.png differ diff --git a/files/usr/share/xapps/flags/cn.png b/files/usr/share/xapps/flags/cn.png new file mode 100644 index 0000000..d6b8a05 Binary files /dev/null and b/files/usr/share/xapps/flags/cn.png differ diff --git a/files/usr/share/xapps/flags/co.png b/files/usr/share/xapps/flags/co.png new file mode 100644 index 0000000..1c3ecd4 Binary files /dev/null and b/files/usr/share/xapps/flags/co.png differ diff --git a/files/usr/share/xapps/flags/cr.png b/files/usr/share/xapps/flags/cr.png new file mode 100644 index 0000000..77248f5 Binary files /dev/null and b/files/usr/share/xapps/flags/cr.png differ diff --git a/files/usr/share/xapps/flags/cu.png b/files/usr/share/xapps/flags/cu.png new file mode 100644 index 0000000..214ee61 Binary files /dev/null and b/files/usr/share/xapps/flags/cu.png differ diff --git a/files/usr/share/xapps/flags/cv.png b/files/usr/share/xapps/flags/cv.png new file mode 100644 index 0000000..3f4cde2 Binary files /dev/null and b/files/usr/share/xapps/flags/cv.png differ diff --git a/files/usr/share/xapps/flags/cw.png b/files/usr/share/xapps/flags/cw.png new file mode 100644 index 0000000..d8ddb3a Binary files /dev/null and b/files/usr/share/xapps/flags/cw.png differ diff --git a/files/usr/share/xapps/flags/cx.png b/files/usr/share/xapps/flags/cx.png new file mode 100644 index 0000000..c0509a8 Binary files /dev/null and b/files/usr/share/xapps/flags/cx.png differ diff --git a/files/usr/share/xapps/flags/cy.png b/files/usr/share/xapps/flags/cy.png new file mode 100644 index 0000000..62ce7e9 Binary files /dev/null and b/files/usr/share/xapps/flags/cy.png differ diff --git a/files/usr/share/xapps/flags/cz.png b/files/usr/share/xapps/flags/cz.png new file mode 100644 index 0000000..f17f680 Binary files /dev/null and b/files/usr/share/xapps/flags/cz.png differ diff --git a/files/usr/share/xapps/flags/de.png b/files/usr/share/xapps/flags/de.png new file mode 100644 index 0000000..9eb1120 Binary files /dev/null and b/files/usr/share/xapps/flags/de.png differ diff --git a/files/usr/share/xapps/flags/dj.png b/files/usr/share/xapps/flags/dj.png new file mode 100644 index 0000000..41dfa97 Binary files /dev/null and b/files/usr/share/xapps/flags/dj.png differ diff --git a/files/usr/share/xapps/flags/dk.png b/files/usr/share/xapps/flags/dk.png new file mode 100644 index 0000000..0742c74 Binary files /dev/null and b/files/usr/share/xapps/flags/dk.png differ diff --git a/files/usr/share/xapps/flags/dm.png b/files/usr/share/xapps/flags/dm.png new file mode 100644 index 0000000..7c99ffb Binary files /dev/null and b/files/usr/share/xapps/flags/dm.png differ diff --git a/files/usr/share/xapps/flags/do.png b/files/usr/share/xapps/flags/do.png new file mode 100644 index 0000000..e547870 Binary files /dev/null and b/files/usr/share/xapps/flags/do.png differ diff --git a/files/usr/share/xapps/flags/dz.png b/files/usr/share/xapps/flags/dz.png new file mode 100644 index 0000000..92f97d1 Binary files /dev/null and b/files/usr/share/xapps/flags/dz.png differ diff --git a/files/usr/share/xapps/flags/ec.png b/files/usr/share/xapps/flags/ec.png new file mode 100644 index 0000000..1a16811 Binary files /dev/null and b/files/usr/share/xapps/flags/ec.png differ diff --git a/files/usr/share/xapps/flags/ee.png b/files/usr/share/xapps/flags/ee.png new file mode 100644 index 0000000..f82bbd5 Binary files /dev/null and b/files/usr/share/xapps/flags/ee.png differ diff --git a/files/usr/share/xapps/flags/eg.png b/files/usr/share/xapps/flags/eg.png new file mode 100644 index 0000000..056323b Binary files /dev/null and b/files/usr/share/xapps/flags/eg.png differ diff --git a/files/usr/share/xapps/flags/eh.png b/files/usr/share/xapps/flags/eh.png new file mode 100644 index 0000000..3ef994e Binary files /dev/null and b/files/usr/share/xapps/flags/eh.png differ diff --git a/files/usr/share/xapps/flags/eo.png b/files/usr/share/xapps/flags/eo.png new file mode 100644 index 0000000..ae6a849 Binary files /dev/null and b/files/usr/share/xapps/flags/eo.png differ diff --git a/files/usr/share/xapps/flags/er.png b/files/usr/share/xapps/flags/er.png new file mode 100644 index 0000000..5062004 Binary files /dev/null and b/files/usr/share/xapps/flags/er.png differ diff --git a/files/usr/share/xapps/flags/es.png b/files/usr/share/xapps/flags/es.png new file mode 100644 index 0000000..a4a5ac0 Binary files /dev/null and b/files/usr/share/xapps/flags/es.png differ diff --git a/files/usr/share/xapps/flags/et.png b/files/usr/share/xapps/flags/et.png new file mode 100644 index 0000000..bf5e2c8 Binary files /dev/null and b/files/usr/share/xapps/flags/et.png differ diff --git a/files/usr/share/xapps/flags/fi.png b/files/usr/share/xapps/flags/fi.png new file mode 100644 index 0000000..71cbea2 Binary files /dev/null and b/files/usr/share/xapps/flags/fi.png differ diff --git a/files/usr/share/xapps/flags/fj.png b/files/usr/share/xapps/flags/fj.png new file mode 100644 index 0000000..385a348 Binary files /dev/null and b/files/usr/share/xapps/flags/fj.png differ diff --git a/files/usr/share/xapps/flags/fk.png b/files/usr/share/xapps/flags/fk.png new file mode 100644 index 0000000..eabdf1f Binary files /dev/null and b/files/usr/share/xapps/flags/fk.png differ diff --git a/files/usr/share/xapps/flags/fm.png b/files/usr/share/xapps/flags/fm.png new file mode 100644 index 0000000..a7c61d7 Binary files /dev/null and b/files/usr/share/xapps/flags/fm.png differ diff --git a/files/usr/share/xapps/flags/fo.png b/files/usr/share/xapps/flags/fo.png new file mode 100644 index 0000000..f1dd22a Binary files /dev/null and b/files/usr/share/xapps/flags/fo.png differ diff --git a/files/usr/share/xapps/flags/fr.png b/files/usr/share/xapps/flags/fr.png new file mode 100644 index 0000000..0977b06 Binary files /dev/null and b/files/usr/share/xapps/flags/fr.png differ diff --git a/files/usr/share/xapps/flags/ga.png b/files/usr/share/xapps/flags/ga.png new file mode 100644 index 0000000..5393d6a Binary files /dev/null and b/files/usr/share/xapps/flags/ga.png differ diff --git a/files/usr/share/xapps/flags/gb.png b/files/usr/share/xapps/flags/gb.png new file mode 100644 index 0000000..2f2e54c Binary files /dev/null and b/files/usr/share/xapps/flags/gb.png differ diff --git a/files/usr/share/xapps/flags/gd.png b/files/usr/share/xapps/flags/gd.png new file mode 100644 index 0000000..e5b928e Binary files /dev/null and b/files/usr/share/xapps/flags/gd.png differ diff --git a/files/usr/share/xapps/flags/ge.png b/files/usr/share/xapps/flags/ge.png new file mode 100644 index 0000000..759592b Binary files /dev/null and b/files/usr/share/xapps/flags/ge.png differ diff --git a/files/usr/share/xapps/flags/gf.png b/files/usr/share/xapps/flags/gf.png new file mode 100644 index 0000000..07198a7 Binary files /dev/null and b/files/usr/share/xapps/flags/gf.png differ diff --git a/files/usr/share/xapps/flags/gg.png b/files/usr/share/xapps/flags/gg.png new file mode 100644 index 0000000..82d5509 Binary files /dev/null and b/files/usr/share/xapps/flags/gg.png differ diff --git a/files/usr/share/xapps/flags/gh.png b/files/usr/share/xapps/flags/gh.png new file mode 100644 index 0000000..bb53224 Binary files /dev/null and b/files/usr/share/xapps/flags/gh.png differ diff --git a/files/usr/share/xapps/flags/gi.png b/files/usr/share/xapps/flags/gi.png new file mode 100644 index 0000000..9609004 Binary files /dev/null and b/files/usr/share/xapps/flags/gi.png differ diff --git a/files/usr/share/xapps/flags/gl.png b/files/usr/share/xapps/flags/gl.png new file mode 100644 index 0000000..991a84b Binary files /dev/null and b/files/usr/share/xapps/flags/gl.png differ diff --git a/files/usr/share/xapps/flags/gm.png b/files/usr/share/xapps/flags/gm.png new file mode 100644 index 0000000..820b9fb Binary files /dev/null and b/files/usr/share/xapps/flags/gm.png differ diff --git a/files/usr/share/xapps/flags/gn.png b/files/usr/share/xapps/flags/gn.png new file mode 100644 index 0000000..c041081 Binary files /dev/null and b/files/usr/share/xapps/flags/gn.png differ diff --git a/files/usr/share/xapps/flags/gp.png b/files/usr/share/xapps/flags/gp.png new file mode 100644 index 0000000..3f2b177 Binary files /dev/null and b/files/usr/share/xapps/flags/gp.png differ diff --git a/files/usr/share/xapps/flags/gq.png b/files/usr/share/xapps/flags/gq.png new file mode 100644 index 0000000..525f6b7 Binary files /dev/null and b/files/usr/share/xapps/flags/gq.png differ diff --git a/files/usr/share/xapps/flags/gr.png b/files/usr/share/xapps/flags/gr.png new file mode 100644 index 0000000..3c63179 Binary files /dev/null and b/files/usr/share/xapps/flags/gr.png differ diff --git a/files/usr/share/xapps/flags/gs.png b/files/usr/share/xapps/flags/gs.png new file mode 100644 index 0000000..3caca4c Binary files /dev/null and b/files/usr/share/xapps/flags/gs.png differ diff --git a/files/usr/share/xapps/flags/gt.png b/files/usr/share/xapps/flags/gt.png new file mode 100644 index 0000000..12ed18d Binary files /dev/null and b/files/usr/share/xapps/flags/gt.png differ diff --git a/files/usr/share/xapps/flags/gu.png b/files/usr/share/xapps/flags/gu.png new file mode 100644 index 0000000..c4304f9 Binary files /dev/null and b/files/usr/share/xapps/flags/gu.png differ diff --git a/files/usr/share/xapps/flags/gw.png b/files/usr/share/xapps/flags/gw.png new file mode 100644 index 0000000..9ede58b Binary files /dev/null and b/files/usr/share/xapps/flags/gw.png differ diff --git a/files/usr/share/xapps/flags/gy.png b/files/usr/share/xapps/flags/gy.png new file mode 100644 index 0000000..c3097b9 Binary files /dev/null and b/files/usr/share/xapps/flags/gy.png differ diff --git a/files/usr/share/xapps/flags/hk.png b/files/usr/share/xapps/flags/hk.png new file mode 100644 index 0000000..0ca09b0 Binary files /dev/null and b/files/usr/share/xapps/flags/hk.png differ diff --git a/files/usr/share/xapps/flags/hm.png b/files/usr/share/xapps/flags/hm.png new file mode 100644 index 0000000..f717898 Binary files /dev/null and b/files/usr/share/xapps/flags/hm.png differ diff --git a/files/usr/share/xapps/flags/hn.png b/files/usr/share/xapps/flags/hn.png new file mode 100644 index 0000000..0e99f5a Binary files /dev/null and b/files/usr/share/xapps/flags/hn.png differ diff --git a/files/usr/share/xapps/flags/hr.png b/files/usr/share/xapps/flags/hr.png new file mode 100644 index 0000000..04651f7 Binary files /dev/null and b/files/usr/share/xapps/flags/hr.png differ diff --git a/files/usr/share/xapps/flags/ht.png b/files/usr/share/xapps/flags/ht.png new file mode 100644 index 0000000..042f252 Binary files /dev/null and b/files/usr/share/xapps/flags/ht.png differ diff --git a/files/usr/share/xapps/flags/hu.png b/files/usr/share/xapps/flags/hu.png new file mode 100644 index 0000000..0ca4b0a Binary files /dev/null and b/files/usr/share/xapps/flags/hu.png differ diff --git a/files/usr/share/xapps/flags/id.png b/files/usr/share/xapps/flags/id.png new file mode 100644 index 0000000..6605238 Binary files /dev/null and b/files/usr/share/xapps/flags/id.png differ diff --git a/files/usr/share/xapps/flags/ie.png b/files/usr/share/xapps/flags/ie.png new file mode 100644 index 0000000..00288fa Binary files /dev/null and b/files/usr/share/xapps/flags/ie.png differ diff --git a/files/usr/share/xapps/flags/il.png b/files/usr/share/xapps/flags/il.png new file mode 100644 index 0000000..e069065 Binary files /dev/null and b/files/usr/share/xapps/flags/il.png differ diff --git a/files/usr/share/xapps/flags/im.png b/files/usr/share/xapps/flags/im.png new file mode 100644 index 0000000..3e81b53 Binary files /dev/null and b/files/usr/share/xapps/flags/im.png differ diff --git a/files/usr/share/xapps/flags/in.png b/files/usr/share/xapps/flags/in.png new file mode 100644 index 0000000..0860361 Binary files /dev/null and b/files/usr/share/xapps/flags/in.png differ diff --git a/files/usr/share/xapps/flags/io.png b/files/usr/share/xapps/flags/io.png new file mode 100644 index 0000000..748116b Binary files /dev/null and b/files/usr/share/xapps/flags/io.png differ diff --git a/files/usr/share/xapps/flags/iq.png b/files/usr/share/xapps/flags/iq.png new file mode 100644 index 0000000..a121879 Binary files /dev/null and b/files/usr/share/xapps/flags/iq.png differ diff --git a/files/usr/share/xapps/flags/ir.png b/files/usr/share/xapps/flags/ir.png new file mode 100644 index 0000000..610ed30 Binary files /dev/null and b/files/usr/share/xapps/flags/ir.png differ diff --git a/files/usr/share/xapps/flags/is.png b/files/usr/share/xapps/flags/is.png new file mode 100644 index 0000000..d15f87e Binary files /dev/null and b/files/usr/share/xapps/flags/is.png differ diff --git a/files/usr/share/xapps/flags/it.png b/files/usr/share/xapps/flags/it.png new file mode 100644 index 0000000..0ac0100 Binary files /dev/null and b/files/usr/share/xapps/flags/it.png differ diff --git a/files/usr/share/xapps/flags/je.png b/files/usr/share/xapps/flags/je.png new file mode 100644 index 0000000..e9ce189 Binary files /dev/null and b/files/usr/share/xapps/flags/je.png differ diff --git a/files/usr/share/xapps/flags/jm.png b/files/usr/share/xapps/flags/jm.png new file mode 100644 index 0000000..6401b0d Binary files /dev/null and b/files/usr/share/xapps/flags/jm.png differ diff --git a/files/usr/share/xapps/flags/jo.png b/files/usr/share/xapps/flags/jo.png new file mode 100644 index 0000000..a26fd8f Binary files /dev/null and b/files/usr/share/xapps/flags/jo.png differ diff --git a/files/usr/share/xapps/flags/jp.png b/files/usr/share/xapps/flags/jp.png new file mode 100644 index 0000000..cd59363 Binary files /dev/null and b/files/usr/share/xapps/flags/jp.png differ diff --git a/files/usr/share/xapps/flags/ke.png b/files/usr/share/xapps/flags/ke.png new file mode 100644 index 0000000..a5a47e7 Binary files /dev/null and b/files/usr/share/xapps/flags/ke.png differ diff --git a/files/usr/share/xapps/flags/kg.png b/files/usr/share/xapps/flags/kg.png new file mode 100644 index 0000000..02082b9 Binary files /dev/null and b/files/usr/share/xapps/flags/kg.png differ diff --git a/files/usr/share/xapps/flags/kh.png b/files/usr/share/xapps/flags/kh.png new file mode 100644 index 0000000..1347303 Binary files /dev/null and b/files/usr/share/xapps/flags/kh.png differ diff --git a/files/usr/share/xapps/flags/ki.png b/files/usr/share/xapps/flags/ki.png new file mode 100644 index 0000000..93702f0 Binary files /dev/null and b/files/usr/share/xapps/flags/ki.png differ diff --git a/files/usr/share/xapps/flags/km.png b/files/usr/share/xapps/flags/km.png new file mode 100644 index 0000000..d24b075 Binary files /dev/null and b/files/usr/share/xapps/flags/km.png differ diff --git a/files/usr/share/xapps/flags/kn.png b/files/usr/share/xapps/flags/kn.png new file mode 100644 index 0000000..976e055 Binary files /dev/null and b/files/usr/share/xapps/flags/kn.png differ diff --git a/files/usr/share/xapps/flags/kp.png b/files/usr/share/xapps/flags/kp.png new file mode 100644 index 0000000..c200a4e Binary files /dev/null and b/files/usr/share/xapps/flags/kp.png differ diff --git a/files/usr/share/xapps/flags/kr.png b/files/usr/share/xapps/flags/kr.png new file mode 100644 index 0000000..597c8cd Binary files /dev/null and b/files/usr/share/xapps/flags/kr.png differ diff --git a/files/usr/share/xapps/flags/kw.png b/files/usr/share/xapps/flags/kw.png new file mode 100644 index 0000000..dd20236 Binary files /dev/null and b/files/usr/share/xapps/flags/kw.png differ diff --git a/files/usr/share/xapps/flags/ky.png b/files/usr/share/xapps/flags/ky.png new file mode 100644 index 0000000..7904ca5 Binary files /dev/null and b/files/usr/share/xapps/flags/ky.png differ diff --git a/files/usr/share/xapps/flags/kz.png b/files/usr/share/xapps/flags/kz.png new file mode 100644 index 0000000..1234054 Binary files /dev/null and b/files/usr/share/xapps/flags/kz.png differ diff --git a/files/usr/share/xapps/flags/la.png b/files/usr/share/xapps/flags/la.png new file mode 100644 index 0000000..e807b64 Binary files /dev/null and b/files/usr/share/xapps/flags/la.png differ diff --git a/files/usr/share/xapps/flags/lb.png b/files/usr/share/xapps/flags/lb.png new file mode 100644 index 0000000..4ffc469 Binary files /dev/null and b/files/usr/share/xapps/flags/lb.png differ diff --git a/files/usr/share/xapps/flags/lc.png b/files/usr/share/xapps/flags/lc.png new file mode 100644 index 0000000..2ca5c9e Binary files /dev/null and b/files/usr/share/xapps/flags/lc.png differ diff --git a/files/usr/share/xapps/flags/li.png b/files/usr/share/xapps/flags/li.png new file mode 100644 index 0000000..69ef84d Binary files /dev/null and b/files/usr/share/xapps/flags/li.png differ diff --git a/files/usr/share/xapps/flags/lk.png b/files/usr/share/xapps/flags/lk.png new file mode 100644 index 0000000..8c89663 Binary files /dev/null and b/files/usr/share/xapps/flags/lk.png differ diff --git a/files/usr/share/xapps/flags/lr.png b/files/usr/share/xapps/flags/lr.png new file mode 100644 index 0000000..1e12b6b Binary files /dev/null and b/files/usr/share/xapps/flags/lr.png differ diff --git a/files/usr/share/xapps/flags/ls.png b/files/usr/share/xapps/flags/ls.png new file mode 100644 index 0000000..523e957 Binary files /dev/null and b/files/usr/share/xapps/flags/ls.png differ diff --git a/files/usr/share/xapps/flags/lt.png b/files/usr/share/xapps/flags/lt.png new file mode 100644 index 0000000..1eb2b77 Binary files /dev/null and b/files/usr/share/xapps/flags/lt.png differ diff --git a/files/usr/share/xapps/flags/lu.png b/files/usr/share/xapps/flags/lu.png new file mode 100644 index 0000000..e2986c5 Binary files /dev/null and b/files/usr/share/xapps/flags/lu.png differ diff --git a/files/usr/share/xapps/flags/lv.png b/files/usr/share/xapps/flags/lv.png new file mode 100644 index 0000000..a06caad Binary files /dev/null and b/files/usr/share/xapps/flags/lv.png differ diff --git a/files/usr/share/xapps/flags/ly.png b/files/usr/share/xapps/flags/ly.png new file mode 100644 index 0000000..416a6ff Binary files /dev/null and b/files/usr/share/xapps/flags/ly.png differ diff --git a/files/usr/share/xapps/flags/ma.png b/files/usr/share/xapps/flags/ma.png new file mode 100644 index 0000000..3e06b73 Binary files /dev/null and b/files/usr/share/xapps/flags/ma.png differ diff --git a/files/usr/share/xapps/flags/mc.png b/files/usr/share/xapps/flags/mc.png new file mode 100644 index 0000000..5502e77 Binary files /dev/null and b/files/usr/share/xapps/flags/mc.png differ diff --git a/files/usr/share/xapps/flags/md.png b/files/usr/share/xapps/flags/md.png new file mode 100644 index 0000000..db76c11 Binary files /dev/null and b/files/usr/share/xapps/flags/md.png differ diff --git a/files/usr/share/xapps/flags/me.png b/files/usr/share/xapps/flags/me.png new file mode 100644 index 0000000..ed5b979 Binary files /dev/null and b/files/usr/share/xapps/flags/me.png differ diff --git a/files/usr/share/xapps/flags/mf.png b/files/usr/share/xapps/flags/mf.png new file mode 100644 index 0000000..ae1bb50 Binary files /dev/null and b/files/usr/share/xapps/flags/mf.png differ diff --git a/files/usr/share/xapps/flags/mg.png b/files/usr/share/xapps/flags/mg.png new file mode 100644 index 0000000..a17e285 Binary files /dev/null and b/files/usr/share/xapps/flags/mg.png differ diff --git a/files/usr/share/xapps/flags/mh.png b/files/usr/share/xapps/flags/mh.png new file mode 100644 index 0000000..c4d3836 Binary files /dev/null and b/files/usr/share/xapps/flags/mh.png differ diff --git a/files/usr/share/xapps/flags/mk.png b/files/usr/share/xapps/flags/mk.png new file mode 100644 index 0000000..eb4176b Binary files /dev/null and b/files/usr/share/xapps/flags/mk.png differ diff --git a/files/usr/share/xapps/flags/ml.png b/files/usr/share/xapps/flags/ml.png new file mode 100644 index 0000000..144714b Binary files /dev/null and b/files/usr/share/xapps/flags/ml.png differ diff --git a/files/usr/share/xapps/flags/mm.png b/files/usr/share/xapps/flags/mm.png new file mode 100644 index 0000000..fda168b Binary files /dev/null and b/files/usr/share/xapps/flags/mm.png differ diff --git a/files/usr/share/xapps/flags/mn.png b/files/usr/share/xapps/flags/mn.png new file mode 100644 index 0000000..ebabea7 Binary files /dev/null and b/files/usr/share/xapps/flags/mn.png differ diff --git a/files/usr/share/xapps/flags/mo.png b/files/usr/share/xapps/flags/mo.png new file mode 100644 index 0000000..265b9dc Binary files /dev/null and b/files/usr/share/xapps/flags/mo.png differ diff --git a/files/usr/share/xapps/flags/mp.png b/files/usr/share/xapps/flags/mp.png new file mode 100644 index 0000000..e83a886 Binary files /dev/null and b/files/usr/share/xapps/flags/mp.png differ diff --git a/files/usr/share/xapps/flags/mq.png b/files/usr/share/xapps/flags/mq.png new file mode 100644 index 0000000..cfcc742 Binary files /dev/null and b/files/usr/share/xapps/flags/mq.png differ diff --git a/files/usr/share/xapps/flags/mr.png b/files/usr/share/xapps/flags/mr.png new file mode 100644 index 0000000..a55415f Binary files /dev/null and b/files/usr/share/xapps/flags/mr.png differ diff --git a/files/usr/share/xapps/flags/ms.png b/files/usr/share/xapps/flags/ms.png new file mode 100644 index 0000000..787df82 Binary files /dev/null and b/files/usr/share/xapps/flags/ms.png differ diff --git a/files/usr/share/xapps/flags/mt.png b/files/usr/share/xapps/flags/mt.png new file mode 100644 index 0000000..e0fc224 Binary files /dev/null and b/files/usr/share/xapps/flags/mt.png differ diff --git a/files/usr/share/xapps/flags/mu.png b/files/usr/share/xapps/flags/mu.png new file mode 100644 index 0000000..04bf5ca Binary files /dev/null and b/files/usr/share/xapps/flags/mu.png differ diff --git a/files/usr/share/xapps/flags/mv.png b/files/usr/share/xapps/flags/mv.png new file mode 100644 index 0000000..4da57cf Binary files /dev/null and b/files/usr/share/xapps/flags/mv.png differ diff --git a/files/usr/share/xapps/flags/mw.png b/files/usr/share/xapps/flags/mw.png new file mode 100644 index 0000000..61b3574 Binary files /dev/null and b/files/usr/share/xapps/flags/mw.png differ diff --git a/files/usr/share/xapps/flags/mx.png b/files/usr/share/xapps/flags/mx.png new file mode 100644 index 0000000..b3e0641 Binary files /dev/null and b/files/usr/share/xapps/flags/mx.png differ diff --git a/files/usr/share/xapps/flags/my.png b/files/usr/share/xapps/flags/my.png new file mode 100644 index 0000000..a8e9e68 Binary files /dev/null and b/files/usr/share/xapps/flags/my.png differ diff --git a/files/usr/share/xapps/flags/mz.png b/files/usr/share/xapps/flags/mz.png new file mode 100644 index 0000000..2accf01 Binary files /dev/null and b/files/usr/share/xapps/flags/mz.png differ diff --git a/files/usr/share/xapps/flags/na.png b/files/usr/share/xapps/flags/na.png new file mode 100644 index 0000000..3d3b6b8 Binary files /dev/null and b/files/usr/share/xapps/flags/na.png differ diff --git a/files/usr/share/xapps/flags/nc.png b/files/usr/share/xapps/flags/nc.png new file mode 100644 index 0000000..053041d Binary files /dev/null and b/files/usr/share/xapps/flags/nc.png differ diff --git a/files/usr/share/xapps/flags/ne.png b/files/usr/share/xapps/flags/ne.png new file mode 100644 index 0000000..cfebfe1 Binary files /dev/null and b/files/usr/share/xapps/flags/ne.png differ diff --git a/files/usr/share/xapps/flags/nf.png b/files/usr/share/xapps/flags/nf.png new file mode 100644 index 0000000..b63eab8 Binary files /dev/null and b/files/usr/share/xapps/flags/nf.png differ diff --git a/files/usr/share/xapps/flags/ng.png b/files/usr/share/xapps/flags/ng.png new file mode 100644 index 0000000..ed9ba9d Binary files /dev/null and b/files/usr/share/xapps/flags/ng.png differ diff --git a/files/usr/share/xapps/flags/ni.png b/files/usr/share/xapps/flags/ni.png new file mode 100644 index 0000000..770e220 Binary files /dev/null and b/files/usr/share/xapps/flags/ni.png differ diff --git a/files/usr/share/xapps/flags/nl.png b/files/usr/share/xapps/flags/nl.png new file mode 100644 index 0000000..194252f Binary files /dev/null and b/files/usr/share/xapps/flags/nl.png differ diff --git a/files/usr/share/xapps/flags/no.png b/files/usr/share/xapps/flags/no.png new file mode 100644 index 0000000..43547e1 Binary files /dev/null and b/files/usr/share/xapps/flags/no.png differ diff --git a/files/usr/share/xapps/flags/np.png b/files/usr/share/xapps/flags/np.png new file mode 100644 index 0000000..a258218 Binary files /dev/null and b/files/usr/share/xapps/flags/np.png differ diff --git a/files/usr/share/xapps/flags/nr.png b/files/usr/share/xapps/flags/nr.png new file mode 100644 index 0000000..980b5a9 Binary files /dev/null and b/files/usr/share/xapps/flags/nr.png differ diff --git a/files/usr/share/xapps/flags/nu.png b/files/usr/share/xapps/flags/nu.png new file mode 100644 index 0000000..8a72dea Binary files /dev/null and b/files/usr/share/xapps/flags/nu.png differ diff --git a/files/usr/share/xapps/flags/nz.png b/files/usr/share/xapps/flags/nz.png new file mode 100644 index 0000000..19ae9de Binary files /dev/null and b/files/usr/share/xapps/flags/nz.png differ diff --git a/files/usr/share/xapps/flags/om.png b/files/usr/share/xapps/flags/om.png new file mode 100644 index 0000000..2d5c445 Binary files /dev/null and b/files/usr/share/xapps/flags/om.png differ diff --git a/files/usr/share/xapps/flags/pa.png b/files/usr/share/xapps/flags/pa.png new file mode 100644 index 0000000..ac7afca Binary files /dev/null and b/files/usr/share/xapps/flags/pa.png differ diff --git a/files/usr/share/xapps/flags/pe.png b/files/usr/share/xapps/flags/pe.png new file mode 100644 index 0000000..c6a8cda Binary files /dev/null and b/files/usr/share/xapps/flags/pe.png differ diff --git a/files/usr/share/xapps/flags/pf.png b/files/usr/share/xapps/flags/pf.png new file mode 100644 index 0000000..ecff50d Binary files /dev/null and b/files/usr/share/xapps/flags/pf.png differ diff --git a/files/usr/share/xapps/flags/pg.png b/files/usr/share/xapps/flags/pg.png new file mode 100644 index 0000000..6e98318 Binary files /dev/null and b/files/usr/share/xapps/flags/pg.png differ diff --git a/files/usr/share/xapps/flags/ph.png b/files/usr/share/xapps/flags/ph.png new file mode 100644 index 0000000..ecd8cb0 Binary files /dev/null and b/files/usr/share/xapps/flags/ph.png differ diff --git a/files/usr/share/xapps/flags/pk.png b/files/usr/share/xapps/flags/pk.png new file mode 100644 index 0000000..ce88418 Binary files /dev/null and b/files/usr/share/xapps/flags/pk.png differ diff --git a/files/usr/share/xapps/flags/pl.png b/files/usr/share/xapps/flags/pl.png new file mode 100644 index 0000000..57fcc8e Binary files /dev/null and b/files/usr/share/xapps/flags/pl.png differ diff --git a/files/usr/share/xapps/flags/pm.png b/files/usr/share/xapps/flags/pm.png new file mode 100644 index 0000000..cfcc742 Binary files /dev/null and b/files/usr/share/xapps/flags/pm.png differ diff --git a/files/usr/share/xapps/flags/pn.png b/files/usr/share/xapps/flags/pn.png new file mode 100644 index 0000000..8eae709 Binary files /dev/null and b/files/usr/share/xapps/flags/pn.png differ diff --git a/files/usr/share/xapps/flags/pr.png b/files/usr/share/xapps/flags/pr.png new file mode 100644 index 0000000..7bc2f3d Binary files /dev/null and b/files/usr/share/xapps/flags/pr.png differ diff --git a/files/usr/share/xapps/flags/ps.png b/files/usr/share/xapps/flags/ps.png new file mode 100644 index 0000000..5431fcc Binary files /dev/null and b/files/usr/share/xapps/flags/ps.png differ diff --git a/files/usr/share/xapps/flags/pt.png b/files/usr/share/xapps/flags/pt.png new file mode 100644 index 0000000..3fba43d Binary files /dev/null and b/files/usr/share/xapps/flags/pt.png differ diff --git a/files/usr/share/xapps/flags/pw.png b/files/usr/share/xapps/flags/pw.png new file mode 100644 index 0000000..0ee6d2b Binary files /dev/null and b/files/usr/share/xapps/flags/pw.png differ diff --git a/files/usr/share/xapps/flags/py.png b/files/usr/share/xapps/flags/py.png new file mode 100644 index 0000000..ec204df Binary files /dev/null and b/files/usr/share/xapps/flags/py.png differ diff --git a/files/usr/share/xapps/flags/qa.png b/files/usr/share/xapps/flags/qa.png new file mode 100644 index 0000000..90157dd Binary files /dev/null and b/files/usr/share/xapps/flags/qa.png differ diff --git a/files/usr/share/xapps/flags/re.png b/files/usr/share/xapps/flags/re.png new file mode 100644 index 0000000..2b39eab Binary files /dev/null and b/files/usr/share/xapps/flags/re.png differ diff --git a/files/usr/share/xapps/flags/ro.png b/files/usr/share/xapps/flags/ro.png new file mode 100644 index 0000000..45be982 Binary files /dev/null and b/files/usr/share/xapps/flags/ro.png differ diff --git a/files/usr/share/xapps/flags/rs.png b/files/usr/share/xapps/flags/rs.png new file mode 100644 index 0000000..f4d826b Binary files /dev/null and b/files/usr/share/xapps/flags/rs.png differ diff --git a/files/usr/share/xapps/flags/ru.png b/files/usr/share/xapps/flags/ru.png new file mode 100644 index 0000000..c72a1ec Binary files /dev/null and b/files/usr/share/xapps/flags/ru.png differ diff --git a/files/usr/share/xapps/flags/rw.png b/files/usr/share/xapps/flags/rw.png new file mode 100644 index 0000000..8afd9eb Binary files /dev/null and b/files/usr/share/xapps/flags/rw.png differ diff --git a/files/usr/share/xapps/flags/sa.png b/files/usr/share/xapps/flags/sa.png new file mode 100644 index 0000000..5c7ff72 Binary files /dev/null and b/files/usr/share/xapps/flags/sa.png differ diff --git a/files/usr/share/xapps/flags/sb.png b/files/usr/share/xapps/flags/sb.png new file mode 100644 index 0000000..2d69323 Binary files /dev/null and b/files/usr/share/xapps/flags/sb.png differ diff --git a/files/usr/share/xapps/flags/sc.png b/files/usr/share/xapps/flags/sc.png new file mode 100644 index 0000000..1e23a2f Binary files /dev/null and b/files/usr/share/xapps/flags/sc.png differ diff --git a/files/usr/share/xapps/flags/sd.png b/files/usr/share/xapps/flags/sd.png new file mode 100644 index 0000000..f2a6db2 Binary files /dev/null and b/files/usr/share/xapps/flags/sd.png differ diff --git a/files/usr/share/xapps/flags/se.png b/files/usr/share/xapps/flags/se.png new file mode 100644 index 0000000..863bc2b Binary files /dev/null and b/files/usr/share/xapps/flags/se.png differ diff --git a/files/usr/share/xapps/flags/sg.png b/files/usr/share/xapps/flags/sg.png new file mode 100644 index 0000000..588f719 Binary files /dev/null and b/files/usr/share/xapps/flags/sg.png differ diff --git a/files/usr/share/xapps/flags/sh.png b/files/usr/share/xapps/flags/sh.png new file mode 100644 index 0000000..710a2b1 Binary files /dev/null and b/files/usr/share/xapps/flags/sh.png differ diff --git a/files/usr/share/xapps/flags/si.png b/files/usr/share/xapps/flags/si.png new file mode 100644 index 0000000..f2e0a80 Binary files /dev/null and b/files/usr/share/xapps/flags/si.png differ diff --git a/files/usr/share/xapps/flags/sj.png b/files/usr/share/xapps/flags/sj.png new file mode 100644 index 0000000..7a57ec9 Binary files /dev/null and b/files/usr/share/xapps/flags/sj.png differ diff --git a/files/usr/share/xapps/flags/sk.png b/files/usr/share/xapps/flags/sk.png new file mode 100644 index 0000000..6ab713b Binary files /dev/null and b/files/usr/share/xapps/flags/sk.png differ diff --git a/files/usr/share/xapps/flags/sl.png b/files/usr/share/xapps/flags/sl.png new file mode 100644 index 0000000..dc7012d Binary files /dev/null and b/files/usr/share/xapps/flags/sl.png differ diff --git a/files/usr/share/xapps/flags/sm.png b/files/usr/share/xapps/flags/sm.png new file mode 100644 index 0000000..e64a88f Binary files /dev/null and b/files/usr/share/xapps/flags/sm.png differ diff --git a/files/usr/share/xapps/flags/sn.png b/files/usr/share/xapps/flags/sn.png new file mode 100644 index 0000000..a992128 Binary files /dev/null and b/files/usr/share/xapps/flags/sn.png differ diff --git a/files/usr/share/xapps/flags/so.png b/files/usr/share/xapps/flags/so.png new file mode 100644 index 0000000..76be70a Binary files /dev/null and b/files/usr/share/xapps/flags/so.png differ diff --git a/files/usr/share/xapps/flags/sr.png b/files/usr/share/xapps/flags/sr.png new file mode 100644 index 0000000..1f8b4f9 Binary files /dev/null and b/files/usr/share/xapps/flags/sr.png differ diff --git a/files/usr/share/xapps/flags/ss.png b/files/usr/share/xapps/flags/ss.png new file mode 100644 index 0000000..66423dc Binary files /dev/null and b/files/usr/share/xapps/flags/ss.png differ diff --git a/files/usr/share/xapps/flags/st.png b/files/usr/share/xapps/flags/st.png new file mode 100644 index 0000000..0ba31e3 Binary files /dev/null and b/files/usr/share/xapps/flags/st.png differ diff --git a/files/usr/share/xapps/flags/sv.png b/files/usr/share/xapps/flags/sv.png new file mode 100644 index 0000000..dadff5f Binary files /dev/null and b/files/usr/share/xapps/flags/sv.png differ diff --git a/files/usr/share/xapps/flags/sx.png b/files/usr/share/xapps/flags/sx.png new file mode 100644 index 0000000..1b552de Binary files /dev/null and b/files/usr/share/xapps/flags/sx.png differ diff --git a/files/usr/share/xapps/flags/sy.png b/files/usr/share/xapps/flags/sy.png new file mode 100644 index 0000000..fbefd4e Binary files /dev/null and b/files/usr/share/xapps/flags/sy.png differ diff --git a/files/usr/share/xapps/flags/sz.png b/files/usr/share/xapps/flags/sz.png new file mode 100644 index 0000000..d68d82e Binary files /dev/null and b/files/usr/share/xapps/flags/sz.png differ diff --git a/files/usr/share/xapps/flags/tc.png b/files/usr/share/xapps/flags/tc.png new file mode 100644 index 0000000..869ea6c Binary files /dev/null and b/files/usr/share/xapps/flags/tc.png differ diff --git a/files/usr/share/xapps/flags/td.png b/files/usr/share/xapps/flags/td.png new file mode 100644 index 0000000..3cf815a Binary files /dev/null and b/files/usr/share/xapps/flags/td.png differ diff --git a/files/usr/share/xapps/flags/tf.png b/files/usr/share/xapps/flags/tf.png new file mode 100644 index 0000000..053041d Binary files /dev/null and b/files/usr/share/xapps/flags/tf.png differ diff --git a/files/usr/share/xapps/flags/tg.png b/files/usr/share/xapps/flags/tg.png new file mode 100644 index 0000000..445370f Binary files /dev/null and b/files/usr/share/xapps/flags/tg.png differ diff --git a/files/usr/share/xapps/flags/th.png b/files/usr/share/xapps/flags/th.png new file mode 100644 index 0000000..f75d179 Binary files /dev/null and b/files/usr/share/xapps/flags/th.png differ diff --git a/files/usr/share/xapps/flags/tj.png b/files/usr/share/xapps/flags/tj.png new file mode 100644 index 0000000..8953fe5 Binary files /dev/null and b/files/usr/share/xapps/flags/tj.png differ diff --git a/files/usr/share/xapps/flags/tk.png b/files/usr/share/xapps/flags/tk.png new file mode 100644 index 0000000..744fb6f Binary files /dev/null and b/files/usr/share/xapps/flags/tk.png differ diff --git a/files/usr/share/xapps/flags/tl.png b/files/usr/share/xapps/flags/tl.png new file mode 100644 index 0000000..a3f5e59 Binary files /dev/null and b/files/usr/share/xapps/flags/tl.png differ diff --git a/files/usr/share/xapps/flags/tm.png b/files/usr/share/xapps/flags/tm.png new file mode 100644 index 0000000..425b008 Binary files /dev/null and b/files/usr/share/xapps/flags/tm.png differ diff --git a/files/usr/share/xapps/flags/tn.png b/files/usr/share/xapps/flags/tn.png new file mode 100644 index 0000000..ed6956e Binary files /dev/null and b/files/usr/share/xapps/flags/tn.png differ diff --git a/files/usr/share/xapps/flags/to.png b/files/usr/share/xapps/flags/to.png new file mode 100644 index 0000000..5d730fd Binary files /dev/null and b/files/usr/share/xapps/flags/to.png differ diff --git a/files/usr/share/xapps/flags/tr.png b/files/usr/share/xapps/flags/tr.png new file mode 100644 index 0000000..cd685c2 Binary files /dev/null and b/files/usr/share/xapps/flags/tr.png differ diff --git a/files/usr/share/xapps/flags/tt.png b/files/usr/share/xapps/flags/tt.png new file mode 100644 index 0000000..53968f5 Binary files /dev/null and b/files/usr/share/xapps/flags/tt.png differ diff --git a/files/usr/share/xapps/flags/tv.png b/files/usr/share/xapps/flags/tv.png new file mode 100644 index 0000000..1c8b437 Binary files /dev/null and b/files/usr/share/xapps/flags/tv.png differ diff --git a/files/usr/share/xapps/flags/tw.png b/files/usr/share/xapps/flags/tw.png new file mode 100644 index 0000000..46f119b Binary files /dev/null and b/files/usr/share/xapps/flags/tw.png differ diff --git a/files/usr/share/xapps/flags/tz.png b/files/usr/share/xapps/flags/tz.png new file mode 100644 index 0000000..681db8b Binary files /dev/null and b/files/usr/share/xapps/flags/tz.png differ diff --git a/files/usr/share/xapps/flags/ua.png b/files/usr/share/xapps/flags/ua.png new file mode 100644 index 0000000..df39a36 Binary files /dev/null and b/files/usr/share/xapps/flags/ua.png differ diff --git a/files/usr/share/xapps/flags/ug.png b/files/usr/share/xapps/flags/ug.png new file mode 100644 index 0000000..e11fc3e Binary files /dev/null and b/files/usr/share/xapps/flags/ug.png differ diff --git a/files/usr/share/xapps/flags/um.png b/files/usr/share/xapps/flags/um.png new file mode 100644 index 0000000..47d3a7e Binary files /dev/null and b/files/usr/share/xapps/flags/um.png differ diff --git a/files/usr/share/xapps/flags/us.png b/files/usr/share/xapps/flags/us.png new file mode 100644 index 0000000..1d372e2 Binary files /dev/null and b/files/usr/share/xapps/flags/us.png differ diff --git a/files/usr/share/xapps/flags/uy.png b/files/usr/share/xapps/flags/uy.png new file mode 100644 index 0000000..f369a97 Binary files /dev/null and b/files/usr/share/xapps/flags/uy.png differ diff --git a/files/usr/share/xapps/flags/uz.png b/files/usr/share/xapps/flags/uz.png new file mode 100644 index 0000000..019d13b Binary files /dev/null and b/files/usr/share/xapps/flags/uz.png differ diff --git a/files/usr/share/xapps/flags/va.png b/files/usr/share/xapps/flags/va.png new file mode 100644 index 0000000..57ae91e Binary files /dev/null and b/files/usr/share/xapps/flags/va.png differ diff --git a/files/usr/share/xapps/flags/vc.png b/files/usr/share/xapps/flags/vc.png new file mode 100644 index 0000000..be68626 Binary files /dev/null and b/files/usr/share/xapps/flags/vc.png differ diff --git a/files/usr/share/xapps/flags/ve.png b/files/usr/share/xapps/flags/ve.png new file mode 100644 index 0000000..ae7dc5f Binary files /dev/null and b/files/usr/share/xapps/flags/ve.png differ diff --git a/files/usr/share/xapps/flags/vg.png b/files/usr/share/xapps/flags/vg.png new file mode 100644 index 0000000..86faa1f Binary files /dev/null and b/files/usr/share/xapps/flags/vg.png differ diff --git a/files/usr/share/xapps/flags/vi.png b/files/usr/share/xapps/flags/vi.png new file mode 100644 index 0000000..7a3e46d Binary files /dev/null and b/files/usr/share/xapps/flags/vi.png differ diff --git a/files/usr/share/xapps/flags/vn.png b/files/usr/share/xapps/flags/vn.png new file mode 100644 index 0000000..73d1a07 Binary files /dev/null and b/files/usr/share/xapps/flags/vn.png differ diff --git a/files/usr/share/xapps/flags/vu.png b/files/usr/share/xapps/flags/vu.png new file mode 100644 index 0000000..c06d91b Binary files /dev/null and b/files/usr/share/xapps/flags/vu.png differ diff --git a/files/usr/share/xapps/flags/wf.png b/files/usr/share/xapps/flags/wf.png new file mode 100644 index 0000000..4984938 Binary files /dev/null and b/files/usr/share/xapps/flags/wf.png differ diff --git a/files/usr/share/xapps/flags/ws.png b/files/usr/share/xapps/flags/ws.png new file mode 100644 index 0000000..b43d3fc Binary files /dev/null and b/files/usr/share/xapps/flags/ws.png differ diff --git a/files/usr/share/xapps/flags/ye.png b/files/usr/share/xapps/flags/ye.png new file mode 100644 index 0000000..56d0aa7 Binary files /dev/null and b/files/usr/share/xapps/flags/ye.png differ diff --git a/files/usr/share/xapps/flags/yt.png b/files/usr/share/xapps/flags/yt.png new file mode 100644 index 0000000..103c4db Binary files /dev/null and b/files/usr/share/xapps/flags/yt.png differ diff --git a/files/usr/share/xapps/flags/za.png b/files/usr/share/xapps/flags/za.png new file mode 100644 index 0000000..d281ec9 Binary files /dev/null and b/files/usr/share/xapps/flags/za.png differ diff --git a/files/usr/share/xapps/flags/zm.png b/files/usr/share/xapps/flags/zm.png new file mode 100644 index 0000000..1a19e93 Binary files /dev/null and b/files/usr/share/xapps/flags/zm.png differ diff --git a/files/usr/share/xapps/flags/zw.png b/files/usr/share/xapps/flags/zw.png new file mode 100644 index 0000000..0b8b56e Binary files /dev/null and b/files/usr/share/xapps/flags/zw.png differ diff --git a/libxapp/Makefile.am b/libxapp/Makefile.am index 9b3d8c9..7412362 100644 --- a/libxapp/Makefile.am +++ b/libxapp/Makefile.am @@ -14,7 +14,8 @@ AM_CFLAGS = $(WARN_CFLAGS) introspection_sources = \ - xapp-display.c + xapp-display.c \ + xapp-kbd-layout-controller.c libxapp_la_SOURCES = \ $(introspection_sources) @@ -34,7 +35,8 @@ libxappdir = $(includedir)/xapp/libxapp libxapp_HEADERS = \ - xapp-display.h + xapp-display.h \ + xapp-kbd-layout-controller.h -include $(INTROSPECTION_MAKEFILE) INTROSPECTION_GIRS = @@ -44,8 +46,8 @@ if HAVE_INTROSPECTION XApp-1.0.gir: libxapp.la -XApp_1_0_gir_INCLUDES = GObject-2.0 Gtk-3.0 -XApp_1_0_gir_PACKAGES = gdk-pixbuf-2.0 glib-2.0 gobject-2.0 gio-2.0 gtk+-3.0 +XApp_1_0_gir_INCLUDES = GObject-2.0 Gtk-3.0 Clutter-1.0 +XApp_1_0_gir_PACKAGES = gdk-pixbuf-2.0 glib-2.0 gobject-2.0 gio-2.0 gtk+-3.0 clutter-1.0 XApp_1_0_gir_EXPORT_PACKAGES = xapp XApp_1_0_gir_CFLAGS = -DGNOME_DESKTOP_USE_UNSTABLE_API -I$(top_srcdir) XApp_1_0_gir_LIBS = libxapp.la diff --git a/libxapp/xapp-kbd-layout-controller.c b/libxapp/xapp-kbd-layout-controller.c new file mode 100644 index 0000000..9d847be --- /dev/null +++ b/libxapp/xapp-kbd-layout-controller.c @@ -0,0 +1,697 @@ + +#include + +#include +#include +#include +#include + +#include +#include +#include +#include + +#include + +#include "xapp-kbd-layout-controller.h" + +enum +{ + PROP_0, + + PROP_ENABLED, + PROP_USE_CAPS, +}; + +enum +{ + KBD_LAYOUT_CHANGED, + KBD_CONFIG_CHANGED, + + LAST_SIGNAL +}; + +static guint signals[LAST_SIGNAL] = { 0, }; + +struct _XAppKbdLayoutControllerPrivate +{ + GkbdConfiguration *config; + + gint num_groups; + gchar *flag_dir; + gchar *temp_flag_theme_dir; + + gchar *icon_names[4]; + gchar *text_store[4]; + + gulong changed_id; + gulong group_changed_id; + guint idle_changed_id; + + gboolean enabled; +}; + +G_DEFINE_TYPE (XAppKbdLayoutController, xapp_kbd_layout_controller, G_TYPE_OBJECT); + +static void +initialize_flag_dir (XAppKbdLayoutController *controller) +{ + XAppKbdLayoutControllerPrivate *priv = controller->priv; + gint i; + + const char * const * data_dirs; + + data_dirs = g_get_system_data_dirs (); + + for (i = 0; data_dirs[i] != NULL; i++) + { + gchar *try_path = g_build_filename (data_dirs[i], "xapps", "flags", NULL); + + if (g_file_test (try_path, G_FILE_TEST_EXISTS)) + { + priv->flag_dir = g_strdup (try_path); + break; + } + + g_free (try_path); + } +} + +static void +initialize_icon_theme (XAppKbdLayoutController *controller) +{ + XAppKbdLayoutControllerPrivate *priv = controller->priv; + + const gchar *cache_dir = g_get_user_cache_dir (); + + gchar *path = g_build_filename (cache_dir, "xapp-kbd-layout-controller", NULL); + + g_mkdir_with_parents (path, 0700); + + priv->temp_flag_theme_dir = path; + + gtk_icon_theme_append_search_path (gtk_icon_theme_get_default (), path); +} + +static void +clear_stores (XAppKbdLayoutController *controller) +{ + XAppKbdLayoutControllerPrivate *priv = controller->priv; + + gint i; + + for (i = 0; i < 4; i++) + { + g_clear_pointer (&priv->text_store[i], g_free); + g_clear_pointer (&priv->icon_names[i], g_free); + } +} + +typedef struct +{ + gchar *group; + gint id; +} GroupData; + +static void +group_data_free (GroupData *data) +{ + g_clear_pointer (&data->group, g_free); + data->id = 0; + + g_slice_free (GroupData, data); +} + +static gchar * +create_text (XAppKbdLayoutController *controller, + const gchar *name, + gint id) +{ + if (g_utf8_validate (name, -1, NULL)) + { + gchar utf8[20]; + gchar *utf8_cased = NULL; + + g_utf8_strncpy (utf8, name, 2); + + utf8_cased = g_utf8_strdown (utf8, -1); + + GString *string = g_string_new (utf8_cased); + + g_free (utf8_cased); + + if (id > 0) + { + string = g_string_append_unichar (string, 0x2080 + id); + } + + return g_string_free (string, FALSE); + } + + return NULL; +} + +static GdkPixbuf * +add_notation (GdkPixbuf *original, gint id) +{ + gint width, height; + cairo_surface_t *surface; + cairo_t *cr; + + width = gdk_pixbuf_get_width (original); + height = gdk_pixbuf_get_height (original); + + surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, width, height); + + if (surface == NULL) + { + return original; + } + + cr = cairo_create (surface); + + gdk_cairo_set_source_pixbuf (cr, original, 0, 0); + cairo_paint (cr); + + gint rx, ry, rw, rh; + + rx = rw = width / 2; + ry = rh = height / 2; + + cairo_set_source_rgba (cr, 0.0, 0.0, 0.0, .5); + cairo_rectangle (cr, rx, ry, rw, rh); + cairo_fill (cr); + + cairo_set_source_rgba (cr, 1.0, 1.0, 1.0, .8); + cairo_rectangle (cr, rx - 1, ry - 1, rw, rh); + cairo_fill (cr); + + cairo_set_source_rgba (cr, 0.0, 0.0, 0.0, 1.0); + + gchar *num_string = g_strdup_printf ("%d", id); + cairo_select_font_face (cr, "sans", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD); + cairo_set_font_size (cr, height / 2); + + cairo_text_extents_t ext; + cairo_text_extents (cr, num_string, &ext); + + cairo_move_to (cr, rx + (rw / 2) - (ext.width / 2) - 1, ry + (rh / 2) + (ext.height / 2) - 1); + + cairo_show_text (cr, num_string); + g_free (num_string); + + GdkPixbuf *ret = gdk_pixbuf_get_from_surface (surface, 0, 0, width, height); + + cairo_surface_destroy (surface); + cairo_destroy (cr); + + if (ret == NULL) + { + return original; + } + + g_object_unref (original); + + return ret; +} + +static gchar * +create_pixbuf (XAppKbdLayoutController *controller, + guint group, + const gchar *name, + gint id) +{ + XAppKbdLayoutControllerPrivate *priv = controller->priv; + GdkPixbuf *pixbuf = NULL; + + GdkPixbuf *flag_pixbuf; + + gchar *filename = g_strdup_printf ("%s.png", name); + gchar *full_path = g_build_filename (priv->flag_dir, filename, NULL); + + flag_pixbuf = gdk_pixbuf_new_from_file (full_path, NULL); + + g_free (filename); + g_free (full_path); + + if (flag_pixbuf != NULL) + { + if (id == 0) + { + pixbuf = flag_pixbuf; + } + else + { + pixbuf = add_notation (flag_pixbuf, id); + } + } + + if (flag_pixbuf != NULL) + { + gchar *save_name = g_strdup_printf ("xapp-kbd-layout-%d.png", group); + + gchar *path = g_build_filename (priv->temp_flag_theme_dir, save_name, NULL); + g_remove (path); + + gdk_pixbuf_save (pixbuf, + path, + "png", + NULL, + NULL); + + g_object_unref (pixbuf); + + g_free (save_name); + g_free (path); + } + else + { + return NULL; + } + + return g_strdup_printf ("xapp-kbd-layout-%d", group); +} + +static void +load_stores (XAppKbdLayoutController *controller) +{ + XAppKbdLayoutControllerPrivate *priv = controller->priv; + + gchar **group_names = gkbd_configuration_get_group_names (priv->config); + priv->num_groups = g_strv_length (group_names); + + /* We do nothing if there's only one keyboard layout enabled */ + if (priv->num_groups == 1) + { + priv->enabled = FALSE; + return; + } + + priv->enabled = TRUE; + + /* Make a list of [name, id] tuples, where name is the group/flag name, + * and id is either 0, or, if a flag name is duplicated, a 1, 2, 3, etc... + */ + gint i, j, id; + GPtrArray *list = g_ptr_array_new_with_free_func ((GDestroyNotify) group_data_free); + + for (i = 0; i < priv->num_groups; i++) + { + GroupData *data = g_slice_new0 (GroupData); + + gchar *name = gkbd_configuration_get_group_name (priv->config, i); + id = 0; + + for (j = 0; j < list->len; j++) + { + GroupData *iter = g_ptr_array_index (list, j); + + if (g_strcmp0 (name, iter->group) == 0) + { + id++; + iter->id = id; + } + } + + if (id > 0) + { + id++; + } + + data->group = name; + data->id = id; + + g_ptr_array_add (list, data); + } + + for (i = 0; i < list->len; i++) + { + GroupData *data = g_ptr_array_index (list, i); + + priv->icon_names[i] = create_pixbuf (controller, i, data->group, data->id); + priv->text_store[i] = create_text (controller, data->group, data->id); + } + + gtk_icon_theme_rescan_if_needed (gtk_icon_theme_get_default ()); + + g_ptr_array_unref (list); +} + +static gboolean +idle_config_changed (XAppKbdLayoutController *controller) +{ + XAppKbdLayoutControllerPrivate *priv = controller->priv; + + clear_stores (controller); + load_stores (controller); + + if (gkbd_configuration_get_current_group (priv->config) >= priv->num_groups) + { + xapp_kbd_layout_controller_set_current_group (controller, 0); + } + + g_signal_emit (controller, signals[KBD_CONFIG_CHANGED], 0); + + priv->idle_changed_id = 0; + return FALSE; +} + +static void +on_configuration_changed (GkbdConfiguration *config, + XAppKbdLayoutController *controller) +{ + XAppKbdLayoutControllerPrivate *priv = controller->priv; + + if (priv->idle_changed_id != 0) + { + g_source_remove (priv->idle_changed_id); + priv->idle_changed_id = 0; + } + + priv->idle_changed_id = g_idle_add ((GSourceFunc) idle_config_changed, controller); +} + + +static void +on_configuration_group_changed (GkbdConfiguration *config, + gint group, + XAppKbdLayoutController *controller) +{ + g_signal_emit (controller, signals[KBD_LAYOUT_CHANGED], 0, (guint) group); +} + +static void +xapp_kbd_layout_controller_init (XAppKbdLayoutController *controller) +{ + controller->priv = G_TYPE_INSTANCE_GET_PRIVATE (controller, XAPP_TYPE_KBD_LAYOUT_CONTROLLER, XAppKbdLayoutControllerPrivate); + + XAppKbdLayoutControllerPrivate *priv = controller->priv; + + priv->config = gkbd_configuration_get (); + priv->enabled = FALSE; + priv->flag_dir = NULL; + priv->temp_flag_theme_dir = NULL; + priv->idle_changed_id = 0; +} + +static void +xapp_kbd_layout_controller_constructed (GObject *object) +{ + G_OBJECT_CLASS (xapp_kbd_layout_controller_parent_class)->constructed (object); + + XAppKbdLayoutController *controller = XAPP_KBD_LAYOUT_CONTROLLER (object); + XAppKbdLayoutControllerPrivate *priv = controller->priv; + + initialize_flag_dir (controller); + + initialize_icon_theme (controller); + + gkbd_configuration_start_listen (priv->config); + + priv->changed_id = g_signal_connect_object (priv->config, + "changed", + G_CALLBACK (on_configuration_changed), + controller, 0); + + priv->group_changed_id = g_signal_connect_object (priv->config, + "group-changed", + G_CALLBACK (on_configuration_group_changed), + controller, 0); + clear_stores (controller); + load_stores (controller); +} + +static void +xapp_kbd_layout_controller_get_property (GObject *gobject, + guint prop_id, + GValue *value, + GParamSpec *pspec) +{ + XAppKbdLayoutController *controller = XAPP_KBD_LAYOUT_CONTROLLER (gobject); + XAppKbdLayoutControllerPrivate *priv = controller->priv; + + switch (prop_id) + { + case PROP_ENABLED: + g_value_set_boolean (value, priv->enabled); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, prop_id, pspec); + break; + } +} + +static void +xapp_kbd_layout_controller_dispose (GObject *object) +{ + XAppKbdLayoutController *controller = XAPP_KBD_LAYOUT_CONTROLLER (object); + XAppKbdLayoutControllerPrivate *priv = controller->priv; + + gkbd_configuration_stop_listen (priv->config); + + clear_stores (controller); + + if (priv->changed_id > 0) + { + g_signal_handler_disconnect (priv->config, priv->changed_id); + priv->changed_id = 0; + } + + if (priv->group_changed_id > 0) + { + g_signal_handler_disconnect (priv->config, priv->group_changed_id); + priv->group_changed_id = 0; + } + + if (priv->idle_changed_id != 0) + { + g_source_remove (priv->idle_changed_id); + priv->idle_changed_id = 0; + } + + G_OBJECT_CLASS (xapp_kbd_layout_controller_parent_class)->dispose (object); +} + +static void +xapp_kbd_layout_controller_finalize (GObject *object) +{ + XAppKbdLayoutController *controller = XAPP_KBD_LAYOUT_CONTROLLER (object); + XAppKbdLayoutControllerPrivate *priv = controller->priv; + + g_clear_object (&priv->config); + g_clear_pointer (&priv->flag_dir, g_free); + g_clear_pointer (&priv->temp_flag_theme_dir, g_free); + + G_OBJECT_CLASS (xapp_kbd_layout_controller_parent_class)->finalize (object); +} + +static void +xapp_kbd_layout_controller_class_init (XAppKbdLayoutControllerClass *klass) +{ + GObjectClass *gobject_class = G_OBJECT_CLASS (klass); + + gobject_class->dispose = xapp_kbd_layout_controller_dispose; + gobject_class->finalize = xapp_kbd_layout_controller_finalize; + gobject_class->get_property = xapp_kbd_layout_controller_get_property; + gobject_class->constructed = xapp_kbd_layout_controller_constructed; + + g_type_class_add_private (gobject_class, sizeof (XAppKbdLayoutControllerPrivate)); + + g_object_class_install_property (gobject_class, PROP_ENABLED, + g_param_spec_boolean ("enabled", + "Enabled", + "Whether we're enabled (more than one keyboard layout is installed)", + FALSE, + G_PARAM_READABLE) + ); + + signals[KBD_LAYOUT_CHANGED] = g_signal_new ("layout-changed", + G_TYPE_FROM_CLASS (gobject_class), + G_SIGNAL_RUN_LAST, + 0, + NULL, NULL, + g_cclosure_marshal_VOID__UINT, + G_TYPE_NONE, + 1, G_TYPE_UINT); + + signals[KBD_CONFIG_CHANGED] = g_signal_new ("config-changed", + G_TYPE_FROM_CLASS (gobject_class), + G_SIGNAL_RUN_LAST, + 0, + NULL, NULL, + g_cclosure_marshal_VOID__VOID, + G_TYPE_NONE, + 0, G_TYPE_NONE); +} + +XAppKbdLayoutController * +xapp_kbd_layout_controller_new (void) +{ + return g_object_new (XAPP_TYPE_KBD_LAYOUT_CONTROLLER, NULL); +} + +gboolean +xapp_kbd_layout_controller_get_enabled (XAppKbdLayoutController *controller) +{ + return controller->priv->enabled; +} + +guint +xapp_kbd_layout_controller_get_current_group (XAppKbdLayoutController *controller) +{ + g_return_val_if_fail (controller->priv->enabled, 0); + + return gkbd_configuration_get_current_group (controller->priv->config); +} + +void +xapp_kbd_layout_controller_set_current_group (XAppKbdLayoutController *controller, + guint group) +{ + g_return_if_fail (controller->priv->enabled); + g_return_if_fail (group <= controller->priv->num_groups); + + guint current = gkbd_configuration_get_current_group (controller->priv->config); + + if (current != group) + { + gkbd_configuration_lock_group (controller->priv->config, group); + } +} + +void +xapp_kbd_layout_controller_next_group (XAppKbdLayoutController *controller) +{ + g_return_if_fail (controller->priv->enabled); + + gkbd_configuration_lock_next_group (controller->priv->config); +} + +void +xapp_kbd_layout_controller_previous_group (XAppKbdLayoutController *controller) +{ + g_return_if_fail (controller->priv->enabled); + + XAppKbdLayoutControllerPrivate *priv = controller->priv; + + gint current = gkbd_configuration_get_current_group (priv->config); + + if (current > 0) + { + current--; + } + else + { + current = priv->num_groups - 1; + } + + gkbd_configuration_lock_group (controller->priv->config, current); +} + +/** + * xapp_kbd_layout_controller_get_current_name: + * + * Returns the full name of the current keyboard layout. + * + * Returns: (transfer full): the newly created string or NULL + * if something went wrong. + */ +gchar * +xapp_kbd_layout_controller_get_current_name (XAppKbdLayoutController *controller) +{ + g_return_val_if_fail (controller->priv->enabled, NULL); + + return gkbd_configuration_get_current_tooltip (controller->priv->config); +} + +/** + * xapp_kbd_layout_controller_get_all_names: + * + * Returns an array of all full layout names + * + * Returns: (transfer none) (array zero-terminated=1): array of names + */ +gchar ** +xapp_kbd_layout_controller_get_all_names (XAppKbdLayoutController *controller) +{ + g_return_val_if_fail (controller->priv->enabled, NULL); + + return gkbd_configuration_get_group_names (controller->priv->config); +} + +/** + * xapp_kbd_layout_controller_get_current_icon_name: + * + * Returns the icon name to use for the current layout + * + * Returns: (transfer full): a new string with the icon name. + */ +gchar * +xapp_kbd_layout_controller_get_current_icon_name (XAppKbdLayoutController *controller) +{ + g_return_val_if_fail (controller->priv->enabled, NULL); + + XAppKbdLayoutControllerPrivate *priv = controller->priv; + + guint current = gkbd_configuration_get_current_group (priv->config); + + return g_strdup (priv->icon_names[current]); +} + + +/** + * xapp_kbd_layout_controller_get_icon_name_for_group: + * + * Returns the icon name to use for the specified layout. + * + * Returns: (transfer full): a new string with the icon name. + */ +gchar * +xapp_kbd_layout_controller_get_icon_name_for_group (XAppKbdLayoutController *controller, guint group) +{ + g_return_val_if_fail (controller->priv->enabled, NULL); + g_return_val_if_fail (group <= controller->priv->num_groups, NULL); + + XAppKbdLayoutControllerPrivate *priv = controller->priv; + + return g_strdup (priv->icon_names[group]); +} + +/** + * xapp_kbd_layout_controller_get_current_short_name: + * + * Returns the short name (and subscript, if any) of the current layout + * + * Returns: (transfer full): a new string or NULL. + */ +gchar * +xapp_kbd_layout_controller_get_short_name (XAppKbdLayoutController *controller) +{ + g_return_val_if_fail (controller->priv->enabled, NULL); + + XAppKbdLayoutControllerPrivate *priv = controller->priv; + + guint current = gkbd_configuration_get_current_group (priv->config); + + return g_strdup (priv->text_store[current]); +} + +/** + * xapp_kbd_layout_controller_get_short_name_for_group: + * + * Returns the short name and subscript of the specified group. + * + * Returns: (transfer full): a new string or NULL. + */ +gchar * +xapp_kbd_layout_controller_get_short_name_for_group (XAppKbdLayoutController *controller, + guint group) +{ + g_return_val_if_fail (controller->priv->enabled, NULL); + + XAppKbdLayoutControllerPrivate *priv = controller->priv; + + g_return_val_if_fail (group < controller->priv->num_groups, NULL); + + return g_strdup (priv->text_store[group]); +} diff --git a/libxapp/xapp-kbd-layout-controller.h b/libxapp/xapp-kbd-layout-controller.h new file mode 100644 index 0000000..00bc16d --- /dev/null +++ b/libxapp/xapp-kbd-layout-controller.h @@ -0,0 +1,54 @@ +#ifndef __XAPP_KBD_LAYOUT_CONTROLLER_H__ +#define __XAPP_KBD_LAYOUT_CONTROLLER_H__ + +#include +#include +#include + +#include + +G_BEGIN_DECLS + +#define XAPP_TYPE_KBD_LAYOUT_CONTROLLER (xapp_kbd_layout_controller_get_type ()) +#define XAPP_KBD_LAYOUT_CONTROLLER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), XAPP_TYPE_KBD_LAYOUT_CONTROLLER, XAppKbdLayoutController)) +#define XAPP_KBD_LAYOUT_CONTROLLER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), XAPP_TYPE_KBD_LAYOUT_CONTROLLER, XAppKbdLayoutControllerClass)) +#define XAPP_IS_KBD_LAYOUT_CONTROLLER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), XAPP_TYPE_KBD_LAYOUT_CONTROLLER)) +#define XAPP_IS_KBD_LAYOUT_CONTROLLER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), XAPP_TYPE_KBD_LAYOUT_CONTROLLER)) +#define XAPP_KBD_LAYOUT_CONTROLLER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), XAPP_TYPE_KBD_LAYOUT_CONTROLLER, XAppKbdLayoutControllerClass)) + +typedef struct _XAppKbdLayoutControllerPrivate XAppKbdLayoutControllerPrivate; +typedef struct _XAppKbdLayoutController XAppKbdLayoutController; +typedef struct _XAppKbdLayoutControllerClass XAppKbdLayoutControllerClass; + +struct _XAppKbdLayoutController +{ + GObject parent_object; + + XAppKbdLayoutControllerPrivate *priv; +}; + +struct _XAppKbdLayoutControllerClass +{ + GObjectClass parent_class; +}; + +GType xapp_kbd_layout_controller_get_type (void); +XAppKbdLayoutController *xapp_kbd_layout_controller_new (void); +gboolean xapp_kbd_layout_controller_get_enabled (XAppKbdLayoutController *controller); +guint xapp_kbd_layout_controller_get_current_group (XAppKbdLayoutController *controller); +void xapp_kbd_layout_controller_set_current_group (XAppKbdLayoutController *controller, + guint group); +void xapp_kbd_layout_controller_next_group (XAppKbdLayoutController *controller); +void xapp_kbd_layout_controller_previous_group (XAppKbdLayoutController *controller); +gchar *xapp_kbd_layout_controller_get_current_name (XAppKbdLayoutController *controller); +gchar **xapp_kbd_layout_controller_get_all_names (XAppKbdLayoutController *controller); +gchar *xapp_kbd_layout_controller_get_current_icon_name (XAppKbdLayoutController *controller); +gchar *xapp_kbd_layout_controller_get_icon_name_for_group (XAppKbdLayoutController *controller, + guint group); +gchar *xapp_kbd_layout_controller_get_short_name (XAppKbdLayoutController *controller); +gchar *xapp_kbd_layout_controller_get_short_name_for_group (XAppKbdLayoutController *controller, + guint group); + +G_END_DECLS + +#endif /* __XAPP_KBD_LAYOUT_CONTROLLER_H__ */ diff --git a/libxapp/xapp-uninstalled.pc.in b/libxapp/xapp-uninstalled.pc.in index 0c69744..a7c4a69 100644 --- a/libxapp/xapp-uninstalled.pc.in +++ b/libxapp/xapp-uninstalled.pc.in @@ -5,7 +5,7 @@ Name: xapp Description: Utility library for loading .desktop files -Requires: gtk+-3.0 +Requires: gtk+-3.0 clutter-1.0 Version: @VERSION@ Libs: ${pc_top_builddir}/${pcfiledir}/libxapp.la Cflags: -I${pc_top_builddir}/${pcfiledir}/.. diff --git a/libxapp/xapp.pc.in b/libxapp/xapp.pc.in index b8ba3a6..882e290 100644 --- a/libxapp/xapp.pc.in +++ b/libxapp/xapp.pc.in @@ -5,7 +5,7 @@ Name: xapp Description: Utility library for loading .desktop files -Requires: gtk+-3.0 +Requires: gtk+-3.0 clutter-1.0 Requires.private: xkbfile Version: @VERSION@ Libs: -L${libdir} -lxapp diff --git a/test-scripts/xapp-kbd-layout-controller b/test-scripts/xapp-kbd-layout-controller new file mode 100755 index 0000000..f7b074c --- /dev/null +++ b/test-scripts/xapp-kbd-layout-controller @@ -0,0 +1,103 @@ +#! /usr/bin/python3 + +""" +A demo/test script for the XAppKbdLayoutController class +""" +import sys, os +import signal +import gettext + +import gi +gi.require_version('Gtk', '3.0') +gi.require_version('XApp', '1.0') + +from gi.repository import Gtk, XApp, GObject + +signal.signal(signal.SIGINT, signal.SIG_DFL) + +class Main: + def __init__(self): + win = Gtk.Window() + frame = Gtk.Frame() + frame.set_margin_start(6) + frame.set_margin_end(6) + frame.set_margin_top(6) + frame.set_margin_bottom(6) + + win.add(frame) + + box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) + frame.add(box) + + self.show_flags = False + self.use_caps = False + + self.controller = XApp.KbdLayoutController() + self.controller.connect("layout-changed", self.on_layout_changed) + self.controller.connect("config-changed", self.on_config_changed) + + hbox = Gtk.HBox() + box.pack_start(hbox, True, True, 4) + + self.button = Gtk.Button() + self.button.set_size_request(48, 48) + self.button.connect("clicked", self.on_button_clicked) + hbox.pack_start(self.button, False, False, 4) + + self.label = Gtk.Label() + self.label.set_text(self.controller.get_current_name()) + hbox.pack_start(self.label, True, True, 4) + + check = Gtk.CheckButton.new_with_label("Show flags") + check.connect("toggled", self.on_flag_toggled) + box.pack_start(check, True, True, 4) + + check = Gtk.CheckButton.new_with_label("Use caps") + check.connect("toggled", self.on_caps_toggled) + box.pack_start(check, True, True, 4) + + frame.show_all() + + win.connect("delete-event", lambda w, e: Gtk.main_quit()) + + self.on_layout_changed(self.controller) + + win.present() + + Gtk.main() + + def on_flag_toggled(self, widget): + self.show_flags = widget.get_active() + self.on_layout_changed(self.controller) + + def on_caps_toggled(self, widget): + self.use_caps = widget.get_active() + self.on_layout_changed(self.controller) + + def on_button_clicked(self, widget, data=None): + self.controller.next_group() + + def on_layout_changed(self, controller, group=None): + handled = False + if self.show_flags: + name = self.controller.get_current_icon_name() + if name != None: + image = Gtk.Image.new_from_icon_name(name, Gtk.IconSize.DIALOG) + self.button.set_image(image) + handled = True + + if not handled: + name = self.controller.get_short_name() + if self.use_caps: + name = name.upper() + label = Gtk.Label(name) + label.show() + self.button.set_image(label) + + self.label.set_text(self.controller.get_current_name()) + + def on_config_changed(self, controller): + GObject.idle_add(self.on_layout_changed, controller) + +if __name__ == "__main__": + main = Main()