summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.anjuta/anjuta.session9
-rw-r--r--.anjuta/default.anjuta8
-rw-r--r--.anjuta/dock-layout.xml2
-rw-r--r--.cvsignore30
-rw-r--r--.tm_project2.cachebin52012 -> 0 bytes
-rw-r--r--AUTHORS1
-rw-r--r--COPYING.LIB481
-rw-r--r--ChangeLog95
-rw-r--r--ChangeLog.libgswitchit269
-rw-r--r--ChangeLog.libkbdraw295
-rw-r--r--Makefile.am20
-rw-r--r--NEWS0
-rw-r--r--README0
-rw-r--r--README.cvs1
-rwxr-xr-xautogen.sh25
-rw-r--r--capplet/.cvsignore6
-rw-r--r--capplet/Makefile.am50
-rw-r--r--capplet/gkbd-indicator-plugins-add.c193
-rw-r--r--capplet/gkbd-indicator-plugins-capplet.c383
-rw-r--r--capplet/gkbd-indicator-plugins-capplet.desktop.in.in15
-rw-r--r--capplet/gkbd-indicator-plugins-capplet.h65
-rw-r--r--capplet/gkbd-indicator-plugins-capplet.pngbin2378 -> 0 bytes
-rw-r--r--capplet/gkbd-indicator-plugins.glade532
-rw-r--r--configure.in109
-rw-r--r--libgnomekbd.anjuta54
-rw-r--r--libgnomekbd.pc.in10
-rw-r--r--libgnomekbd/.cvsignore10
-rw-r--r--libgnomekbd/.indent.pro2
-rw-r--r--libgnomekbd/Makefile.am128
-rw-r--r--libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in193
-rw-r--r--libgnomekbd/gkbd-config-private.h102
-rw-r--r--libgnomekbd/gkbd-config-registry.c194
-rw-r--r--libgnomekbd/gkbd-config-registry.h65
-rw-r--r--libgnomekbd/gkbd-config-registry.xml16
-rw-r--r--libgnomekbd/gkbd-desktop-config.c409
-rw-r--r--libgnomekbd/gkbd-desktop-config.h104
-rw-r--r--libgnomekbd/gkbd-indicator-config.c365
-rw-r--r--libgnomekbd/gkbd-indicator-config.h92
-rw-r--r--libgnomekbd/gkbd-indicator-marshal.list1
-rw-r--r--libgnomekbd/gkbd-indicator-plugin-manager.c407
-rw-r--r--libgnomekbd/gkbd-indicator-plugin-manager.h116
-rw-r--r--libgnomekbd/gkbd-indicator-plugin.h125
-rw-r--r--libgnomekbd/gkbd-indicator.c858
-rw-r--r--libgnomekbd/gkbd-indicator.h80
-rw-r--r--libgnomekbd/gkbd-keyboard-config.c830
-rw-r--r--libgnomekbd/gkbd-keyboard-config.h125
-rw-r--r--libgnomekbd/gkbd-keyboard-drawing-marshal.list2
-rw-r--r--libgnomekbd/gkbd-keyboard-drawing.c1861
-rw-r--r--libgnomekbd/gkbd-keyboard-drawing.h188
-rw-r--r--libgnomekbd/gkbd-util.c151
-rw-r--r--libgnomekbd/gkbd-util.h33
-rw-r--r--libgnomekbdui.pc.in10
-rw-r--r--m4/intltool.m4204
-rw-r--r--po/.cvsignore6
-rw-r--r--po/ChangeLog12
-rw-r--r--po/Makefile.in.in221
-rw-r--r--po/POTFILES.in13
-rw-r--r--po/bg.po217
-rw-r--r--po/ja.po215
-rw-r--r--po/nb.po216
-rw-r--r--po/ru.po169
-rw-r--r--po/sv.po209
-rw-r--r--test/.cvsignore6
-rw-r--r--test/.indent.pro2
-rw-r--r--test/Makefile.am47
-rwxr-xr-xtest/gkbd-config-registry-client.sh41
-rw-r--r--test/gkbd-config-registry-server.c58
-rw-r--r--test/gkbd-indicator-test.c82
-rw-r--r--test/gkbd-keyboard-drawing-test.c284
-rw-r--r--trunk/.anjuta/anjuta.session9
-rw-r--r--trunk/.anjuta/default.anjuta8
-rw-r--r--trunk/.anjuta/dock-layout.xml2
-rw-r--r--trunk/.cvsignore30
-rw-r--r--trunk/.tm_project2.cachebin52012 -> 0 bytes
-rw-r--r--trunk/AUTHORS1
-rw-r--r--trunk/COPYING.LIB481
-rw-r--r--trunk/ChangeLog95
-rw-r--r--trunk/ChangeLog.libgswitchit269
-rw-r--r--trunk/ChangeLog.libkbdraw295
-rw-r--r--trunk/Makefile.am20
-rw-r--r--trunk/NEWS0
-rw-r--r--trunk/README0
-rw-r--r--trunk/README.cvs1
-rwxr-xr-xtrunk/autogen.sh25
-rw-r--r--trunk/capplet/.cvsignore6
-rw-r--r--trunk/capplet/Makefile.am50
-rw-r--r--trunk/capplet/gkbd-indicator-plugins-add.c193
-rw-r--r--trunk/capplet/gkbd-indicator-plugins-capplet.c383
-rw-r--r--trunk/capplet/gkbd-indicator-plugins-capplet.desktop.in.in15
-rw-r--r--trunk/capplet/gkbd-indicator-plugins-capplet.h65
-rw-r--r--trunk/capplet/gkbd-indicator-plugins-capplet.pngbin2378 -> 0 bytes
-rw-r--r--trunk/capplet/gkbd-indicator-plugins.glade532
-rw-r--r--trunk/configure.in109
-rw-r--r--trunk/libgnomekbd.anjuta54
-rw-r--r--trunk/libgnomekbd.pc.in10
-rw-r--r--trunk/libgnomekbd/.cvsignore10
-rw-r--r--trunk/libgnomekbd/.indent.pro2
-rw-r--r--trunk/libgnomekbd/Makefile.am128
-rw-r--r--trunk/libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in193
-rw-r--r--trunk/libgnomekbd/gkbd-config-private.h102
-rw-r--r--trunk/libgnomekbd/gkbd-config-registry.c194
-rw-r--r--trunk/libgnomekbd/gkbd-config-registry.h65
-rw-r--r--trunk/libgnomekbd/gkbd-config-registry.xml16
-rw-r--r--trunk/libgnomekbd/gkbd-desktop-config.c409
-rw-r--r--trunk/libgnomekbd/gkbd-desktop-config.h104
-rw-r--r--trunk/libgnomekbd/gkbd-indicator-config.c365
-rw-r--r--trunk/libgnomekbd/gkbd-indicator-config.h92
-rw-r--r--trunk/libgnomekbd/gkbd-indicator-marshal.list1
-rw-r--r--trunk/libgnomekbd/gkbd-indicator-plugin-manager.c407
-rw-r--r--trunk/libgnomekbd/gkbd-indicator-plugin-manager.h116
-rw-r--r--trunk/libgnomekbd/gkbd-indicator-plugin.h125
-rw-r--r--trunk/libgnomekbd/gkbd-indicator.c858
-rw-r--r--trunk/libgnomekbd/gkbd-indicator.h80
-rw-r--r--trunk/libgnomekbd/gkbd-keyboard-config.c830
-rw-r--r--trunk/libgnomekbd/gkbd-keyboard-config.h125
-rw-r--r--trunk/libgnomekbd/gkbd-keyboard-drawing-marshal.list2
-rw-r--r--trunk/libgnomekbd/gkbd-keyboard-drawing.c1861
-rw-r--r--trunk/libgnomekbd/gkbd-keyboard-drawing.h188
-rw-r--r--trunk/libgnomekbd/gkbd-util.c151
-rw-r--r--trunk/libgnomekbd/gkbd-util.h33
-rw-r--r--trunk/libgnomekbdui.pc.in10
-rw-r--r--trunk/m4/intltool.m4204
-rw-r--r--trunk/po/.cvsignore6
-rw-r--r--trunk/po/ChangeLog12
-rw-r--r--trunk/po/Makefile.in.in221
-rw-r--r--trunk/po/POTFILES.in13
-rw-r--r--trunk/po/bg.po217
-rw-r--r--trunk/po/ja.po215
-rw-r--r--trunk/po/nb.po216
-rw-r--r--trunk/po/ru.po169
-rw-r--r--trunk/po/sv.po209
-rw-r--r--trunk/test/.cvsignore6
-rw-r--r--trunk/test/.indent.pro2
-rw-r--r--trunk/test/Makefile.am47
-rwxr-xr-xtrunk/test/gkbd-config-registry-client.sh41
-rw-r--r--trunk/test/gkbd-config-registry-server.c58
-rw-r--r--trunk/test/gkbd-indicator-test.c82
-rw-r--r--trunk/test/gkbd-keyboard-drawing-test.c284
138 files changed, 0 insertions, 22244 deletions
diff --git a/.anjuta/anjuta.session b/.anjuta/anjuta.session
deleted file mode 100644
index 40a96e3..0000000
--- a/.anjuta/anjuta.session
+++ /dev/null
@@ -1,9 +0,0 @@
-
-[Anjuta]
-Geometry=1120x755+10+25
-
-[File Loader]
-Files=file:///home/svu/CVS/libgnomekbd/capplet/gswitchit-plugins-app.h#30%%%file:///home/svu/CVS/libgnomekbd/capplet/gswitchit-plugins-app.c#394%%%file:///home/svu/CVS/libgnomekbd/capplet/gswitchit-plugins-add.c#173
-
-[Execution]
-Run in terminal=2
diff --git a/.anjuta/default.anjuta b/.anjuta/default.anjuta
deleted file mode 100644
index 3c61a54..0000000
--- a/.anjuta/default.anjuta
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0"?>
-<anjuta>
- <plugin name="GtkSourceview editor" mandatory="no">
- <require group="Anjuta Plugin"
- attribute="Location"
- value="anjuta-sourceview:SourceviewPlugin"/>
- </plugin>
-</anjuta>
diff --git a/.anjuta/dock-layout.xml b/.anjuta/dock-layout.xml
deleted file mode 100644
index 30defe8..0000000
--- a/.anjuta/dock-layout.xml
+++ /dev/null
@@ -1,2 +0,0 @@
-<?xml version="1.0"?>
-<dock-layout><layout name="__default__"><dock name="__dock_1" floating="no" width="-1" height="-1" floatx="0" floaty="0"><paned orientation="vertical" locked="no" position="409"><placeholder name="ph_center" next-placement="center"/><paned orientation="horizontal" locked="no" position="453"><notebook orientation="vertical" locked="no" page="0"><item name="AnjutaFileManager" orientation="vertical" locked="no"><placeholder name="ph_left" next-placement="center"/></item><item name="AnjutaProjectManager" orientation="vertical" locked="no"/><item name="AnjutaSymbolBrowser" orientation="vertical" locked="no"/></notebook><notebook orientation="vertical" locked="no" page="0"><placeholder name="ph_right" next-placement="right"/><item name="AnjutaDocumentManager" orientation="vertical" locked="no"><placeholder name="ph_top" next-placement="center"/></item><item name="AnjutaTodoPlugin" orientation="vertical" locked="no"/></notebook></paned><item name="AnjutaMessageView" orientation="vertical" locked="no"><placeholder name="ph_bottom" next-placement="center"/></item></paned></dock></layout></dock-layout>
diff --git a/.cvsignore b/.cvsignore
deleted file mode 100644
index 615898e..0000000
--- a/.cvsignore
+++ /dev/null
@@ -1,30 +0,0 @@
-COPYING
-INSTALL
-Makefile
-Makefile.in
-aclocal.m4
-autom4te.cache
-compile
-config.guess
-config.h
-config.h.in
-config.log
-config.status
-config.sub
-configure
-depcomp
-install-sh
-intltool-extract
-intltool-extract.in
-intltool-merge
-intltool-merge.in
-intltool-update
-intltool-update.in
-libgnomekbd-0.1.tar.gz
-libgnomekbd.pc
-libgnomekbdui.pc
-libtool
-ltmain.sh
-missing
-mkinstalldirs
-stamp-h1
diff --git a/.tm_project2.cache b/.tm_project2.cache
deleted file mode 100644
index 35c9d12..0000000
--- a/.tm_project2.cache
+++ /dev/null
Binary files differ
diff --git a/AUTHORS b/AUTHORS
deleted file mode 100644
index 8e9452b..0000000
--- a/AUTHORS
+++ /dev/null
@@ -1 +0,0 @@
-Email: svu@users.sourceforge.net
diff --git a/COPYING.LIB b/COPYING.LIB
deleted file mode 100644
index 92b8903..0000000
--- a/COPYING.LIB
+++ /dev/null
@@ -1,481 +0,0 @@
- GNU LIBRARY GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1991 Free Software Foundation, Inc.
- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-[This is the first released version of the library GPL. It is
- numbered 2 because it goes with version 2 of the ordinary GPL.]
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-Licenses are intended to guarantee your freedom to share and change
-free software--to make sure the software is free for all its users.
-
- This license, the Library General Public License, applies to some
-specially designated Free Software Foundation software, and to any
-other libraries whose authors decide to use it. You can use it for
-your libraries, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if
-you distribute copies of the library, or if you modify it.
-
- For example, if you distribute copies of the library, whether gratis
-or for a fee, you must give the recipients all the rights that we gave
-you. You must make sure that they, too, receive or can get the source
-code. If you link a program with the library, you must provide
-complete object files to the recipients so that they can relink them
-with the library, after making changes to the library and recompiling
-it. And you must show them these terms so they know their rights.
-
- Our method of protecting your rights has two steps: (1) copyright
-the library, and (2) offer you this license which gives you legal
-permission to copy, distribute and/or modify the library.
-
- Also, for each distributor's protection, we want to make certain
-that everyone understands that there is no warranty for this free
-library. If the library is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original
-version, so that any problems introduced by others will not reflect on
-the original authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that companies distributing free
-software will individually obtain patent licenses, thus in effect
-transforming the program into proprietary software. To prevent this,
-we have made it clear that any patent must be licensed for everyone's
-free use or not licensed at all.
-
- Most GNU software, including some libraries, is covered by the ordinary
-GNU General Public License, which was designed for utility programs. This
-license, the GNU Library General Public License, applies to certain
-designated libraries. This license is quite different from the ordinary
-one; be sure to read it in full, and don't assume that anything in it is
-the same as in the ordinary license.
-
- The reason we have a separate public license for some libraries is that
-they blur the distinction we usually make between modifying or adding to a
-program and simply using it. Linking a program with a library, without
-changing the library, is in some sense simply using the library, and is
-analogous to running a utility program or application program. However, in
-a textual and legal sense, the linked executable is a combined work, a
-derivative of the original library, and the ordinary General Public License
-treats it as such.
-
- Because of this blurred distinction, using the ordinary General
-Public License for libraries did not effectively promote software
-sharing, because most developers did not use the libraries. We
-concluded that weaker conditions might promote sharing better.
-
- However, unrestricted linking of non-free programs would deprive the
-users of those programs of all benefit from the free status of the
-libraries themselves. This Library General Public License is intended to
-permit developers of non-free programs to use free libraries, while
-preserving your freedom as a user of such programs to change the free
-libraries that are incorporated in them. (We have not seen how to achieve
-this as regards changes in header files, but we have achieved it as regards
-changes in the actual functions of the Library.) The hope is that this
-will lead to faster development of free libraries.
-
- The precise terms and conditions for copying, distribution and
-modification follow. Pay close attention to the difference between a
-"work based on the library" and a "work that uses the library". The
-former contains code derived from the library, while the latter only
-works together with the library.
-
- Note that it is possible for a library to be covered by the ordinary
-General Public License rather than by this special one.
-
- GNU LIBRARY GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License Agreement applies to any software library which
-contains a notice placed by the copyright holder or other authorized
-party saying it may be distributed under the terms of this Library
-General Public License (also called "this License"). Each licensee is
-addressed as "you".
-
- A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application programs
-(which use some of those functions and data) to form executables.
-
- The "Library", below, refers to any such software library or work
-which has been distributed under these terms. A "work based on the
-Library" means either the Library or any derivative work under
-copyright law: that is to say, a work containing the Library or a
-portion of it, either verbatim or with modifications and/or translated
-straightforwardly into another language. (Hereinafter, translation is
-included without limitation in the term "modification".)
-
- "Source code" for a work means the preferred form of the work for
-making modifications to it. For a library, complete source code means
-all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control compilation
-and installation of the library.
-
- Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running a program using the Library is not restricted, and output from
-such a program is covered only if its contents constitute a work based
-on the Library (independent of the use of the Library in a tool for
-writing it). Whether that is true depends on what the Library does
-and what the program that uses the Library does.
-
- 1. You may copy and distribute verbatim copies of the Library's
-complete source code as you receive it, in any medium, provided that
-you conspicuously and appropriately publish on each copy an
-appropriate copyright notice and disclaimer of warranty; keep intact
-all the notices that refer to this License and to the absence of any
-warranty; and distribute a copy of this License along with the
-Library.
-
- You may charge a fee for the physical act of transferring a copy,
-and you may at your option offer warranty protection in exchange for a
-fee.
-
- 2. You may modify your copy or copies of the Library or any portion
-of it, thus forming a work based on the Library, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) The modified work must itself be a software library.
-
- b) You must cause the files modified to carry prominent notices
- stating that you changed the files and the date of any change.
-
- c) You must cause the whole of the work to be licensed at no
- charge to all third parties under the terms of this License.
-
- d) If a facility in the modified Library refers to a function or a
- table of data to be supplied by an application program that uses
- the facility, other than as an argument passed when the facility
- is invoked, then you must make a good faith effort to ensure that,
- in the event an application does not supply such function or
- table, the facility still operates, and performs whatever part of
- its purpose remains meaningful.
-
- (For example, a function in a library to compute square roots has
- a purpose that is entirely well-defined independent of the
- application. Therefore, Subsection 2d requires that any
- application-supplied function or table used by this function must
- be optional: if the application does not supply it, the square
- root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Library,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Library, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote
-it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the Library
-with the Library (or with a work based on the Library) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library. To do
-this, you must alter all the notices that refer to this License, so
-that they refer to the ordinary GNU General Public License, version 2,
-instead of to this License. (If a newer version than version 2 of the
-ordinary GNU General Public License has appeared, then you can specify
-that version instead if you wish.) Do not make any other change in
-these notices.
-
- Once this change is made in a given copy, it is irreversible for
-that copy, so the ordinary GNU General Public License applies to all
-subsequent copies and derivative works made from that copy.
-
- This option is useful when you wish to copy part of the code of
-the Library into a program that is not a library.
-
- 4. You may copy and distribute the Library (or a portion or
-derivative of it, under Section 2) in object code or executable form
-under the terms of Sections 1 and 2 above provided that you accompany
-it with the complete corresponding machine-readable source code, which
-must be distributed under the terms of Sections 1 and 2 above on a
-medium customarily used for software interchange.
-
- If distribution of object code is made by offering access to copy
-from a designated place, then offering equivalent access to copy the
-source code from the same place satisfies the requirement to
-distribute the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 5. A program that contains no derivative of any portion of the
-Library, but is designed to work with the Library by being compiled or
-linked with it, is called a "work that uses the Library". Such a
-work, in isolation, is not a derivative work of the Library, and
-therefore falls outside the scope of this License.
-
- However, linking a "work that uses the Library" with the Library
-creates an executable that is a derivative of the Library (because it
-contains portions of the Library), rather than a "work that uses the
-library". The executable is therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
- When a "work that uses the Library" uses material from a header file
-that is part of the Library, the object code for the work may be a
-derivative work of the Library even though the source code is not.
-Whether this is true is especially significant if the work can be
-linked without the Library, or if the work is itself a library. The
-threshold for this to be true is not precisely defined by law.
-
- If such an object file uses only numerical parameters, data
-structure layouts and accessors, and small macros and small inline
-functions (ten lines or less in length), then the use of the object
-file is unrestricted, regardless of whether it is legally a derivative
-work. (Executables containing this object code plus portions of the
-Library will still fall under Section 6.)
-
- Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of Section 6.
-Any executables containing that work also fall under Section 6,
-whether or not they are linked directly with the Library itself.
-
- 6. As an exception to the Sections above, you may also compile or
-link a "work that uses the Library" with the Library to produce a
-work containing portions of the Library, and distribute that work
-under terms of your choice, provided that the terms permit
-modification of the work for the customer's own use and reverse
-engineering for debugging such modifications.
-
- You must give prominent notice with each copy of the work that the
-Library is used in it and that the Library and its use are covered by
-this License. You must supply a copy of this License. If the work
-during execution displays copyright notices, you must include the
-copyright notice for the Library among them, as well as a reference
-directing the user to the copy of this License. Also, you must do one
-of these things:
-
- a) Accompany the work with the complete corresponding
- machine-readable source code for the Library including whatever
- changes were used in the work (which must be distributed under
- Sections 1 and 2 above); and, if the work is an executable linked
- with the Library, with the complete machine-readable "work that
- uses the Library", as object code and/or source code, so that the
- user can modify the Library and then relink to produce a modified
- executable containing the modified Library. (It is understood
- that the user who changes the contents of definitions files in the
- Library will not necessarily be able to recompile the application
- to use the modified definitions.)
-
- b) Accompany the work with a written offer, valid for at
- least three years, to give the same user the materials
- specified in Subsection 6a, above, for a charge no more
- than the cost of performing this distribution.
-
- c) If distribution of the work is made by offering access to copy
- from a designated place, offer equivalent access to copy the above
- specified materials from the same place.
-
- d) Verify that the user has already received a copy of these
- materials or that you have already sent this user a copy.
-
- For an executable, the required form of the "work that uses the
-Library" must include any data and utility programs needed for
-reproducing the executable from it. However, as a special exception,
-the source code distributed need not include anything that is normally
-distributed (in either source or binary form) with the major
-components (compiler, kernel, and so on) of the operating system on
-which the executable runs, unless that component itself accompanies
-the executable.
-
- It may happen that this requirement contradicts the license
-restrictions of other proprietary libraries that do not normally
-accompany the operating system. Such a contradiction means you cannot
-use both them and the Library together in an executable that you
-distribute.
-
- 7. You may place library facilities that are a work based on the
-Library side-by-side in a single library together with other library
-facilities not covered by this License, and distribute such a combined
-library, provided that the separate distribution of the work based on
-the Library and of the other library facilities is otherwise
-permitted, and provided that you do these two things:
-
- a) Accompany the combined library with a copy of the same work
- based on the Library, uncombined with any other library
- facilities. This must be distributed under the terms of the
- Sections above.
-
- b) Give prominent notice with the combined library of the fact
- that part of it is a work based on the Library, and explaining
- where to find the accompanying uncombined form of the same work.
-
- 8. You may not copy, modify, sublicense, link with, or distribute
-the Library except as expressly provided under this License. Any
-attempt otherwise to copy, modify, sublicense, link with, or
-distribute the Library is void, and will automatically terminate your
-rights under this License. However, parties who have received copies,
-or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
-
- 9. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Library or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Library (or any work based on the
-Library), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Library or works based on it.
-
- 10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the
-original licensor to copy, distribute, link with or modify the Library
-subject to these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
- 11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Library at all. For example, if a patent
-license would not permit royalty-free redistribution of the Library by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply,
-and the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 12. If the distribution and/or use of the Library is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Library under this License may add
-an explicit geographical distribution limitation excluding those countries,
-so that distribution is permitted only in or among countries not thus
-excluded. In such case, this License incorporates the limitation as if
-written in the body of this License.
-
- 13. The Free Software Foundation may publish revised and/or new
-versions of the Library General Public License from time to time.
-Such new versions will be similar in spirit to the present version,
-but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Library
-specifies a version number of this License which applies to it and
-"any later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation. If the Library does not specify a
-license version number, you may choose any version ever published by
-the Free Software Foundation.
-
- 14. If you wish to incorporate parts of the Library into other free
-programs whose distribution conditions are incompatible with these,
-write to the author to ask for permission. For software which is
-copyrighted by the Free Software Foundation, write to the Free
-Software Foundation; we sometimes make exceptions for this. Our
-decision will be guided by the two goals of preserving the free status
-of all derivatives of our free software and of promoting the sharing
-and reuse of software generally.
-
- NO WARRANTY
-
- 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
-KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
-LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
-FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
-LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Libraries
-
- If you develop a new library, and you want it to be of the greatest
-possible use to the public, we recommend making it free software that
-everyone can redistribute and change. You can do so by permitting
-redistribution under these terms (or, alternatively, under the terms of the
-ordinary General Public License).
-
- To apply these terms, attach the following notices to the library. It is
-safest to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least the
-"copyright" line and a pointer to where the full notice is found.
-
- <one line to give the library's name and a brief idea of what it does.>
- Copyright (C) <year> <name of author>
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
-Also add information on how to contact you by electronic and paper mail.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the library, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the
- library `Frob' (a library for tweaking knobs) written by James Random Hacker.
-
- <signature of Ty Coon>, 1 April 1990
- Ty Coon, President of Vice
-
-That's all there is to it!
diff --git a/ChangeLog b/ChangeLog
deleted file mode 100644
index 956a252..0000000
--- a/ChangeLog
+++ /dev/null
@@ -1,95 +0,0 @@
-2007-02-28 svu
-
- * configure.in: preparing 2.17.92
-
-2006-02-20 Alexander Shopov <ash@contact.bg>
-
- * Makefile.in.in: Reverting to revision 2. I am apologize
- for committing the file in the previous commit.
-
-2006-02-20 Alexander Shopov <ash@contact.bg>
-
- * configure.in: Added "bg" (Bulgarian) to ALL_LINGUAS
-
-2007-02-04 svu
-
- * libgnomekbd/gkbd-keyboard-drawing.c: using really primary outline,
- closing http://bugzilla.gnome.org/show_bug.cgi?id=352779
- * libgnomekbd/gkbd-keyboard-drawing.c: unneeded text rotation is
- eliminated
-
-2007-02-03 svu
-
- * libgnomekbd/gkbd-keyboard-drawing.c,
- libgnomekbd/gkbd-keyboard-drawing.h: performance and layout fixes,
- closing
- http://bugzilla.gnome.org/show_bug.cgi?id=357872
-
-2007-01-23 svu
-
- * gkbd-indicator-plugins-capplet.c, Makefile.am,
- gkbd-indicator-plugins-capplet.png: fixing the capplet icon
-
-2007-01-13 Takeshi AIHANA <takeshi.aihana@gmail.com>
-
- * configure.in:
- Added 'ja' (Japanese) to ALL_LINGUAS.
-
-2006-11-13 svu
-
- * test/gkbd-config-registry-server.c: small C89 bug, thanks to Jens
- Granseuer
-
-2006-11-07 svu
-
- * CVS: tagging 2.17.2
-
-2006-11-05 svu
-
- * libgnomekbd/Makefile.am: missing libs added, closing
- http://bugzilla.gnome.org/show_bug.cgi?id=371119
-
-2006-10-31 Kjartan Maraas <kmaraas@gnome.org>
-
- * configure.in: Add nb to ALL_LINGUAS
- * po/POTFILES.in: Add missing file.
- * po/nb.po: Add this.
-
-2006-10-28 svu
-
- * libgnomekbd/gkbd-indicator.c: fixing the potential crash
-
-2006-10-27 svu
-
- * libgnomekbd/gkbd-keyboard-config.c: closing the critical memory
- allocation bug: http://bugzilla.gnome.org/show_bug.cgi?id=365590
-
-2006-10-17 svu
-
- * configure.in, libgnomekbd/Makefile.am: adding VERSION_INFO
- controlling the .so versioning
-
-2006-10-07 svu
-
- * capplet/gkbd-indicator-plugins-capplet.c,
- libgnomekbd/gkbd-config-registry.c,
- libgnomekbd/gkbd-config-registry.h,
- libgnomekbd/gkbd-config-registry.xml,
- libgnomekbd/gkbd-desktop-config.c, libgnomekbd/gkbd-desktop-config.h,
- libgnomekbd/gkbd-indicator-config.c, libgnomekbd/gkbd-indicator.c,
- libgnomekbd/gkbd-keyboard-config.c,
- libgnomekbd/gkbd-keyboard-config.h,
- test/gkbd-config-registry-client.sh: now, dbus function asks
- explicitly for layouts/variants. This saves some X traffic, makes
- behavior more consistent.
-
-2006-10-07 svu
-
- * COPYING.LIB, *.c, *.h: putting proper comments describing the
- licensing terms (LGPL).
-
-2006-10-05 svu
-
- * libgnomekbd*.pc.in: added required .so dependencies
- * test/Makefile.am, test/gkbd-config-registry-client.sh: added a tiny
- script to test the dbus server from the command line
diff --git a/ChangeLog.libgswitchit b/ChangeLog.libgswitchit
deleted file mode 100644
index 4dc064b..0000000
--- a/ChangeLog.libgswitchit
+++ /dev/null
@@ -1,269 +0,0 @@
-2006-09-18 Sergey Udaltsov <svu@gnome.org>
-
- * Makefile.am: one header should not be installed, one header should
- be installed instead (for plugins to be built properly).
-
-2006-07-02 Sergey Udaltsov <svu@gnome.org>
-
- * gnome-kbd-indicator.c: fix for gcc 2.95, #347611
-
-2006-07-02 Sergey Udaltsov <svu@gnome.org>
-
- * gnome-kbd-indicator.c: using Unicode subscript for repeating
- descriptions.
-
-2006-07-29 Sergey Udaltsov <svu@gnome.org>
-
- * Makefile.am: fixed CLEANFILES, thanks to Davyd
-
-2006-07-11 Sebastien Bacher <seb128@debian.org>
-
- * Makefile.am: specify srcdir where it's required
-
-2006-07-11 Sebastien Bacher <seb128@debian.org>
-
- * Makefile.am:
- make gswitchitinc_HEADERS list gswitchit-plugins-app.h
-
-2006-07-11 Sebastien Bacher <seb128@debian.org>
-
- * Makefile.am:
- make gswitchitinc_HEADERS list keyboard-config-registry.h
-
-2006-07-11 Sebastien Bacher <seb128@debian.org>
-
- * Makefile.am: fixed type to gswitchit-plugins.h
-
-2006-07-10 Sergey Udaltsov <svu@gnome.org>
-
- * keyboard-config-registry.c: made XML loading lazy. Thanks for the
- idea, Ben
-
-2006-07-10 Sergey Udaltsov <svu@gnome.org>
-
- * gswitchit-plugins-app.c: changing bonobo loop to glib loop
-
-2006-07-09 Sergey Udaltsov <svu@gnome.org>
-
- * gnome-startup.*: Long unused startup stuff removed
-
-2006-07-08 Sergey Udaltsov <svu@gnome.org>
-
- * gnome-kbd-indicator.c, gswitchit-applet-config.c,
- gswitchit-config-private.h, gswitchit-config.c, gswitchit-config.h,
- gswitchit-plugins-add.c, gswitchit-plugins-app.c,
- gswitchit-plugins-app.h, gswitchit-plugins.glade, gswitchit-util.c,
- gswitchit-util.h: Code restructuring, moving plugin management app to
- libgswitchit
-
-2006-07-08 Sergey Udaltsov <svu@gnome.org>
-
- * gnome-kbd-indicator.*: adding set_angle function
-
-2006-07-06 Sergey Udaltsov <svu@gnome.org>
-
- Fixed build process, renaming files from '_' to '-'
-
-2006-07-05 Sergey Udaltsov <svu@gnome.org>
-
- * Makefile.am,
- gnome-kbd-indicator.c,
- gswitchit_config.c,
- gswitchit_config.h: Remote group names from DBUS are working
-
-2006-06-25 Sergey Udaltsov <svu@gnome.org>
-
- The GKI widget is working, the libgswitchit API is changed
- to the GNOME naming convention. Massive change in all GNOME
- kbd-related sources.
-
-2006-06-23 Sergey Udaltsov <svu@gnome.org>
-
- * gnome-kbd-indicator.[ch]: first version of the g-k-i widget
- the development is in progress
-
-2006-05-27 Sergey Udaltsov <svu@gnome.org>
-
- * gswitchit_config.[ch]: optimizing dealing with UTF8 descriptions -
- changed GSList to NULL-terminated gchar **
-
-2006-04-22 Sergey Udaltsov <svu@gnome.org>
-
- * gswitchit_config.[ch]: save/load preview window coords
-
-2006-04-20 Sergey Udaltsov <svu@gnome.org>
-
- * gswitchit_config.c: added kbd config ToString function
-
-2006-04-20 Sergey Udaltsov <svu@gnome.org>
-
- * *.c,*.h: update for new libxklavier API
-
-2006-01-03 Kristof Vansant <de_lupus@pandora.be>
-
- Fixes #171668
-
- * gswitchit_config.c:
- * gnome-startup.[ch]: header cleanup.
-
-2005-12-06 Sergey V. Udaltsov <svu@gnome.org>
-
- * gswitchit_plugin_manager.h,
- gswitchit_plugin_manager.c: Small change in the plugin API:
- the GroupChanged is called for every instance of the applet
-
-2005-11-14 Kjartan Maraas <kmaraas@gnome.org>
-
- * gswitchit_config.c: (GSwitchItConfigLockPrevGroup):
- Fix typo in function name.
-
-2005-09-14 Sergey V. Udaltsov <svu@gnome.org>
-
- * gswitchit_plugin_manager.h,
- gswitchit_plugin_manager.c: added ConfigChanged proxy
-
-2005-07-15 Mark McLoughlin <mark@skynet.ie>
-
- Re-work the way some of the GConf keys are handled.
- See bug #310513
-
- * gswitchit_config.c:
- (_GSwitchItKbdConfigLoadParams): kbdConfig->model can
- be NULL.
- (_GSwitchItKbdConfigSaveParams): if ->model, ->options or
- ->layouts is NULL, unset the appropriate key.
- (GSwitchItKbdConfigLoadFromGConf): ignore overrideSettings
- and use the XKB default for any unset keys.
- (GSwitchItKbdConfigSaveToGConf): ignore overrideSettings.
- (GSwitchItKbdConfigModelSet): set ->model to NULL if the
- GConf key contains an empty string.
-
- * gswitchit_config.h: remove the overrideSettings member
- from GSwitchItKbdConfig and add a kbdConfigDefault to
- parameter to GSwitchItKbdConfigLoadFromGConf()
-
-2005-03-16 Sergey V. Udaltsov <svu@gnome.org>
-
- * Makefile.am: removing -Werror
-
-2005-03-14 Pedro Villavicencio Garrido <pvillavi@gnome.org>
-
- * gswitchit_config.c (GSwitchItAppletConfigLoadImages): use GtkMessageDialog instead of gnome_error_dialog.
-
-2005-03-16 Kjartan Maraas <kmaraas@gnome.org>
-
- * gnome-startup.c: (gnome_startup_acquire_token):
- Fix some compiler warnings wrt signedness.
- * gswitchit_config.h:
- * gswitchit_plugin_manager.c:
- * gswitchit_util.c:
- * gswitchit_util.h: Clean up headers.
-
-2005-01-12 Sergey Udaltsov <svu@gnome.org>
-
- * gswitchit_config.h,
- gswitchit_config.c: the listeners are inside the structs
-
-2005-01-08 Sergey Udaltsov <svu@gnome.org>
-
- * gswitchit_config.h,
- gswitchit_config.c: better names for the save/load functions
-
-2005-01-03 Dan Winship <danw@novell.com>
-
- * gswitchit_util.c (GSwitchItLogAppender): Cast time_t to long to
- match the printf format.
-
-2004-12-22 Sergey Udaltsov <svu@gnome.org>
-
- * gswitchit_config.h,
- gswitchit_config.c: can listen for the changes
- in the general configuration
-
-2004-12-18 Sergey Udaltsov <svu@gnome.org>
-
- * Makefile.am,
- gswitchit_applet_config.h,
- gswitchit_config.c,
- gswitchit_config.h,
- gswitchit_config_private.h,
- gswitchit_plugin.h,
- gswitchit_plugin_manager.c,
- gswitchit_plugin_manager.h,
- gswitchit_xkb_config.h,
- gswitchit_xkb_config_private.h: massive redesign.
- Three GSwitchIt*Config classes now - instead of two.
- GConf entries changed.
-
-2004-12-08 Sergey Udaltsov <svu@gnome.org>
-
- * gswitchit_applet_config.h,
- gswitchit_config.c,
- gswitchit_plugin_manager.c: changing fixed-size array to GSList.
- Memleaks fixed.
-
-2004-10-03 Sergey Udaltsov <svu@gnome.org>
-
- * gswitchit_config.c:
- Removing a function which was never used.
-
-2004-06-29 Jody Goldberg <jody@gnome.org>
-
- * gswitchit_config.c (GSwitchItXkbConfigInit) : s/g_error/g_warning/
- (GSwitchItAppletConfigInit) : ditto.
-
-2004-04-15 Jody Goldberg <jody@gnome.org>
-
- * Release 2.6.1
-
-2004-04-04 Sergey Udaltsov <svu@gnome.org>
-
- * gswithit_config.c:
- Better theme handling - deprecated GnomeIconTheme changed to
- GtkIconTheme. Also now gswitchit applet allows local per-user
- icons.
-
-2004-04-01 Jody Goldberg <jody@gnome.org>
-
- * Release 2.6.0.3
-
-2004-03-30 Jody Goldberg <jody@gnome.org>
-
- * Release 2.6.0.1
-
-2004-03-23 Jody Goldberg <jody@gnome.org>
-
- * Release 2.6.0
-
-2004-03-11 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.4
-
-2004-02-21 Dennis Smit <ds@nerds-incorporated.org>
-
- * gswitchit_util.c, gswitchit_util.h (GSwitchItHelp):
- Changed GtkWindow argument into a GtkWidget argument.
-
- Updated to egg help and made multihead aware.
-
-2004-02-13 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.3
-
-2004-01-14 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.2
-
-2003-12-30 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.1.1
-
-2003-12-30 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.1
-
-2003-11-12 Jody Goldberg <jody@gnome.org>
-
- * Makefile.am (EXTRA_DIST) : always dist gswitchit.pc.in to keep
- automake happy. There is no significant downside to it.
-
diff --git a/ChangeLog.libkbdraw b/ChangeLog.libkbdraw
deleted file mode 100644
index 3f80b82..0000000
--- a/ChangeLog.libkbdraw
+++ /dev/null
@@ -1,295 +0,0 @@
-2005-10-07 Sergey V. Udaltsov <svu@gnome.org>
-
- * src/keyboard-drawing.c: A bit of cleanup. No flipping any more at
- all.
-
-2005-09-27 Sergey V. Udaltsov <svu@gnome.org>
-
- * src/keyboard-drawing.c: Hack on flipping (const FALSE). Will fix it
- properly next time.
-
-2005-08-24 Sergey V. Udaltsov <svu@gnome.org>
-
- * src/keyboard-drawing.c: Do not use pangoxft any more - and the
- text at least appears.
-
-2005-08-15 Sergey V. Udaltsov <svu@gnome.org>
-
- * src/keyboard-drawing.c: fixing BAD bug with the stack variables,
- I would kill the person doing (gint*)
-
-2005-08-14 Sergey V. Udaltsov <svu@gnome.org>
-
- * autogen.sh, configure.ac: up2date
-
-2004-12-30 Sergey V. Udaltsov <svu@gnome.org>
-
- * src/keyboard-drawing.c, src/keyboard-drawing.h,
- tests/kbdraw.c: substantial architectural changes, introducing
- struct KeyboardDrawingGroupLevel
-
-2004-10-28 Sergey V. Udaltsov <svu@gnome.org>
-
- * src/keyboard-drawing.c, src/keyboard-drawing.h,
- tests/kbdraw.c: Cleaning up the indicators handling.
- Now indicators are handled properly on the off-screen keyboard.
-
-2004-10-24 Sergey V. Udaltsov <svu@gnome.org>
-
- * src/keyboard-drawing.c, src/keyboard-drawing.h,
- tests/kbdraw.c: tracking the modifiers
-
-2004-07-28 Sergey V. Udaltsov
-
- * src/keyboard-drawing.c: prope handling of the "destroy" event
-
-2004-07-14 Sergey V. Udaltsov
-
- * autogen.sh: make automake-1.8 friendly
-
-2004-03-26 Noah Levitt
-
- * src/keyboard-drawing.c:
- * src/keyboard-drawing.h:
- * test/kbdraw.c: Fix up tracking functions and flags.
-
- * src/keyboard-drawing.h: Reformat.
-
-2004-03-25 Noah Levitt
-
- * test/kbdraw.c:
- * src/keyboard-drawing.c: Fix code formatting.
-
-2004-03-25 Noah Levitt
-
- * autogen.sh: Plagiarize gnome-common’s autogen.sh.
-
-2004-02-25 Sergey Oudaltsov
-
- * test/kbdraw.c: two more options - track the group, track the
- config
-
-2004-02-25 Sergey Oudaltsov
-
- * src/: keyboard-drawing.c, keyboard-drawing.h: Now kbdraw can
- track the group and configuration changes. Looks funny actually -
- especially the groups > 0
-
-2004-02-24 Sergey Oudaltsov
-
- * Makefile.am, configure.ac, src/Makefile.am, test/.cvsignore,
- test/Makefile.am, test/kbdraw.c, src/kbdraw.c: now libkbdraw can
- be inserted into other modules as static lib
-
-2003-11-18 Noah Levitt
-
- * README: Add cvs info.
-
- * configure.ac: Need to #include <X11/Xlib.h> before XKBlib.h for
- Xfree86 3.3.6. (Mike Castle)
-
-2003-11-16 Noah Levitt
-
- * configure.ac:
- * kbdraw.pc.in:
- * .cvsignore:
- * Makefile.am: Add pkg-config kbdraw.pc file.
-
-2003-11-16 Noah Levitt
-
- * src/keyboard-drawing.h: Update preprocessor define.
-
- * configure.ac: Bump version number for release.
-
- * README: New readme.
-
-2003-08-18 Noah Levitt
-
- * src/Makefile.am: Add keyboard-marshal.list to EXTRA_DIST.
-
-2003-08-18 Noah Levitt
-
- * src/kbdraw.c: Fix mistake parsing --levels.
-
-2003-08-13 Noah Levitt
-
- * src/keyboard-drawing.c: With the last change, it would warn a bit
- too often. Fixed.
-
-2003-08-13 Noah Levitt
-
- * src/keyboard-drawing.[ch]: Check that the index returned by
- XkbGetNamedIndicator is within range before using it.
-
-2003-08-09 Noah Levitt
-
- * src/kbdraw.c:
- * src/keyboard-drawing.c:
- * src/keyboard-drawing.h: Draw only two shift levels. Command line
- option to choose which ones.
-
-2003-08-09 Noah Levitt
-
- * src/keyboard-drawing.c (keyboard_drawing_set_keyboard): Get
- indicator information.
-
- * src/keyboard_drawing.c (keyboard_drawing_init): Get only the
- information needed, and use XkbGBN_* masks, since they seem to be what
- it expects.
-
-2003-08-09 Noah Levitt
-
- * src/kbdraw.c: Print a more detailed message about what was attempted
- when keyboard_drawing_set_keyboard fails.
-
-2003-08-09 Noah Levitt
-
- * src/keyboard-drawing.c: Draw logo doodads simplistically.
-
-2003-08-09 Noah Levitt
-
- * src/keyboard-drawing.c: Remove debugging printfs.
-
-2003-08-09 Noah Levitt
-
- * src/keyboard-drawing.c:
- * src/keyboard-drawing.h: Color indicator doodads appropriately for
- their state.
-
-2003-08-08 Noah Levitt
-
- * src/keyboard-drawing: Changed my mind. Replace g_asserts with
- g_critical. (g_assert can be disabled, anyway). Hopefully, we'll
- survive a critical thing.
-
-2003-08-07 Noah Levitt
-
- * src/keyboard-drawing.c: It's ok to die if the keyboard geometry says
- the width or height of the keyboard is zero, but use an assertion
- instead of getting a floating point exception.
-
-2003-08-07 Noah Levitt
-
- * src/keyboard-drawing.c: Draw text doodads at the correct angle.
-
-2003-08-07 Noah Levitt
-
- * src/kbdraw.c:
- * src/keyboard-drawing.c:
- * src/keyboard-drawing.h: Choose the keyboard you want to look at from
- the command line (--symbols, --geometry).
-
-2003-08-07 Noah Levitt
-
- * src/keyboard-drawing.c: Get keysyms from the keyboard description,
- not from the server.
-
-2003-08-03 Noah Levitt
-
- * src/keyboard-drawing.c: Fix bug freeing the old keyboard when
- setting a new one.
-
-2003-08-02 Noah Levitt
-
- * src/keyboard-drawing.c: Blank the widget if
- keyboard_drawing_set_keyboard fails.
-
-2003-08-01 Noah Levitt
-
- * src/keyboard-drawing.[ch]: Change keyboard_drawing_set_keybaord to
- take an XkbComponentNamesRec so that we can manage the memory of the
- XkbDescRec ourselves.
-
-2003-07-29 Noah Levitt
-
- * configure.ac: Check for Xkb stuff.
-
-2003-07-29 Noah Levitt
-
- * src/keyboard-drawing.c:
- * src/keyboard-drawing.h: Add keyboard_drawing_set_keyboard.
-
-2003-07-29 Noah Levitt
-
- * src/keyboard-drawing.h: Angle is signed.
-
-2003-07-26 Noah Levitt
-
- * src/keyboard-drawing.c: Fix typo in keyboard_drawing_get_pixbuf.
-
-2003-07-26 Noah Levitt
-
- * src/keyboard-drawing.c:
- * src/keyboard-drawing.h: Add keyboard_drawing_get_pixbuf.
-
-2003-07-26 Noah Levitt
-
- * src/keyboard-drawing.c: Position the second and subsequent lines of
- rotated multi-line pango layouts correctly.
-
-2003-07-26 Noah Levitt
-
- * src/.cvsignore:
- * src/keyboard-marshal.list: Forgot to add this in the last commit.
-
-2003-07-26 Noah Levitt
-
- * configure.ac:
- * src/Makefile.am:
- * src/kbdraw.c:
- * src/keyboard-drawing.c:
- * src/keyboard-drawing.h: Emit a signal "bad-keycode" when we get a
- key event with a keycode that X doesn't think is on the keyboard.
-
-2003-07-26 Noah Levitt
-
- * src/keyboard-drawing.c: Fix bug where string drawn at a different
- angle than the previous string is messed up.
-
-2003-07-26 Noah Levitt
-
- * src/keyboard-drawing.c: Redraw all the region that needs to be
- redrawn when a key is pressed or released.
-
-2003-07-26 Noah Levitt
-
- * src/keyboard-drawing.c: Draw a key even if we can't find a keycode
- for it.
-
-2003-07-26 Noah Levitt
-
- * src/keyboard-drawing.c: Position labels correctly within rotated
- keys (well, most of the time).
-
-2003-07-26 Noah Levitt
-
- * src/keyboard-drawing.c: Position rotated keys correctly.
-
-2003-07-26 Noah Levitt
-
- * src/keyboard-drawing.c: Draw rotated keys rotated. (Still have to
- position them and lots of other stuff.)
-
-2003-07-26 Noah Levitt
-
- * MAINTAINERS: Add MAINTAINERS file.
-
-2003-07-26 Noah Levitt
-
- * src/keyboard-drawing.c:
- * src/keyboard-drawing.h: Remember the angle we're drawing text at, so
- that we don't have to set it every time. Also, use the correct screen
- everywhere instead of screen 0.
-
-2003-07-26 Noah Levitt
-
- * .cvsignore:
- * COPYING:
- * Makefile.am:
- * autogen.sh:
- * configure.ac:
- * src/.cvsignore:
- * src/Makefile.am:
- * src/kbdraw.c:
- * src/keyboard-drawing.c:
- * src/keyboard-drawing.h: Initial checkin.
diff --git a/Makefile.am b/Makefile.am
deleted file mode 100644
index 5f54f6e..0000000
--- a/Makefile.am
+++ /dev/null
@@ -1,20 +0,0 @@
-SUBDIRS = libgnomekbd test capplet po
-
-ACLOCAL_AMFLAGS = -I m4
-
-DISTCLEANFILES = \
- intltool-extract \
- intltool-merge \
- intltool-update
-
-EXTRA_DIST = \
- libgnomekbd.pc.in \
- libgnomekbdui.pc.in \
- intltool-extract.in \
- intltool-merge.in \
- intltool-update.in \
- README.cvs \
- ChangeLog.libkbdraw ChangeLog.libgswitchit
-
-pkgconfigdir = $(libdir)/pkgconfig
-pkgconfig_DATA = libgnomekbd.pc libgnomekbdui.pc
diff --git a/NEWS b/NEWS
deleted file mode 100644
index e69de29..0000000
--- a/NEWS
+++ /dev/null
diff --git a/README b/README
deleted file mode 100644
index e69de29..0000000
--- a/README
+++ /dev/null
diff --git a/README.cvs b/README.cvs
deleted file mode 100644
index 49664ac..0000000
--- a/README.cvs
+++ /dev/null
@@ -1 +0,0 @@
-Please ask a maintainer before committing
diff --git a/autogen.sh b/autogen.sh
deleted file mode 100755
index a97b4a7..0000000
--- a/autogen.sh
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-# Run this to generate all the initial makefiles, etc.
-
-srcdir=`dirname $0`
-test -z "$srcdir" && srcdir=.
-
-PKG_NAME="libgnomekbd"
-
-(test -f $srcdir/configure.in \
- && test -f $srcdir/autogen.sh \
- && test -d $srcdir/libgnomekbd) || {
- echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
- echo " top-level $PKG_NAME directory"
- exit 1
-}
-
-DIE=0
-
-if ! which gnome-autogen.sh ; then
- echo "You need to install the gnome-common module and make"
- echo "sure the gnome-autogen.sh script is in your \$PATH."
- exit 1
-fi
-
-REQUIRED_AUTOMAKE_VERSION=1.9 . gnome-autogen.sh
diff --git a/capplet/.cvsignore b/capplet/.cvsignore
deleted file mode 100644
index 41013e3..0000000
--- a/capplet/.cvsignore
+++ /dev/null
@@ -1,6 +0,0 @@
-Makefile
-Makefile.in
-gkbd-indicator-plugins-capplet
-gkbd-indicator-plugins-capplet.desktop
-gkbd-indicator-plugins-capplet.desktop.in
-
diff --git a/capplet/Makefile.am b/capplet/Makefile.am
deleted file mode 100644
index e099f66..0000000
--- a/capplet/Makefile.am
+++ /dev/null
@@ -1,50 +0,0 @@
-bin_PROGRAMS = gkbd-indicator-plugins-capplet
-
-gladedir="$(pkgdatadir)/glade"
-glade_DATA = gkbd-indicator-plugins.glade
-
-@INTLTOOL_DESKTOP_RULE@
-
-desktopdir = $(datadir)/applications
-Desktop_in_files = gkbd-indicator-plugins-capplet.desktop.in
-desktop_DATA = $(Desktop_in_files:.desktop.in=.desktop)
-
-gkbd_indicator_plugins_capplet_CFLAGS = \
- -I$(top_srcdir) -Wall -Werror \
- $(LIBGLADE_CFLAGS) \
- $(LIBGNOME_CFLAGS) \
- $(LIBGNOMEUI_CFLAGS) \
- $(LIBXKLAVIER_CFLAGS) \
- -I$(top_srcdir)/intl \
- -DSYS_PLUGIN_DIR=\"$(libdir)/gnomekbd/\" \
- -DG_LOG_DOMAIN=\"GnomeKbdIndicatorPluginsCapplet\" \
- -DPREFIX=\"$(prefix)\" \
- -DGLADEDIR=\"$(gladedir)\" \
- -DDATADIR=\"$(datadir)\" \
- -DSYSCONFDIR=\"$(sysconfdir)\" \
- -DLIBDIR=\"$(libdir)\"
-
-gkbd_indicator_plugins_capplet_SOURCES = gkbd-indicator-plugins-capplet.c \
- gkbd-indicator-plugins-add.c \
- gkbd-indicator-plugins-capplet.h
-
-gkbd_indicator_plugins_capplet_LDFLAGS = -export-dynamic
-
-gkbd_indicator_plugins_capplet_LDADD = \
- $(DBUS_LIBS) \
- $(GCONF_LIBS) \
- $(LIBGNOME_LIBS) \
- $(LIBGNOMEUI_LIBS) \
- $(LIBGLADE_LIBS) \
- $(LIBXKLAVIER_LIBS) \
- $(top_builddir)/libgnomekbd/libgnomekbd.la \
- $(top_builddir)/libgnomekbd/libgnomekbdui.la
-
-EXTRA_DIST = gkbd-indicator-plugins-capplet.desktop.in.in \
- $(glade_DATA) \
- $(pixmap_DATA)
-
-DISTCLEANFILES = $(desktop_DATA)
-
-pixmapdir = $(datadir)/icons/hicolor/48x48/apps
-pixmap_DATA = gkbd-indicator-plugins-capplet.png
diff --git a/capplet/gkbd-indicator-plugins-add.c b/capplet/gkbd-indicator-plugins-add.c
deleted file mode 100644
index 59e8e6e..0000000
--- a/capplet/gkbd-indicator-plugins-add.c
+++ /dev/null
@@ -1,193 +0,0 @@
-/*
- * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#include <config.h>
-
-#include "gkbd-indicator-plugins-capplet.h"
-
-#include <string.h>
-#include <sys/stat.h>
-
-#include <gdk/gdkx.h>
-#include <glade/glade.h>
-#include <libbonobo.h>
-
-#include <libxklavier/xklavier.h>
-
-static void
-CappletAddAvailablePluginFunc (const char *fullPath,
- GkbdIndicatorPluginManagerRecord * rec,
- GkbdIndicatorPluginsCapplet * gipc)
-{
- GtkListStore *availablePluginsModel;
- GtkTreeIter iter;
- const GkbdIndicatorPlugin *plugin = rec->plugin;
-
- if (NULL !=
- g_slist_find_custom (gipc->applet_cfg.enabled_plugins,
- fullPath, (GCompareFunc) strcmp))
- return;
-
- availablePluginsModel =
- GTK_LIST_STORE (g_object_get_data (G_OBJECT (gipc->capplet),
- "gkbd_indicator_plugins_add.availablePluginsModel"));
- if (availablePluginsModel == NULL)
- return;
-
- if (plugin != NULL)
- {
- gtk_list_store_append (availablePluginsModel, &iter);
- gtk_list_store_set (availablePluginsModel, &iter,
- NAME_COLUMN, plugin->name,
- FULLPATH_COLUMN, fullPath, -1);
- }
-}
-
-static void
-CappletFillAvailablePluginList (GtkTreeView *
- availablePluginsList,
- GkbdIndicatorPluginsCapplet * gipc)
-{
- GtkListStore *availablePluginsModel =
- GTK_LIST_STORE (gtk_tree_view_get_model
- (GTK_TREE_VIEW (availablePluginsList)));
- GSList *pluginPathNode = gipc->applet_cfg.enabled_plugins;
- GHashTable *allPluginRecs = gipc->plugin_manager.all_plugin_recs;
-
- gtk_list_store_clear (availablePluginsModel);
- if (allPluginRecs == NULL)
- return;
-
- g_object_set_data (G_OBJECT (gipc->capplet),
- "gkbd_indicator_plugins_add.availablePluginsModel",
- availablePluginsModel);
- g_hash_table_foreach (allPluginRecs,
- (GHFunc) CappletAddAvailablePluginFunc, gipc);
- g_object_set_data (G_OBJECT (gipc->capplet),
- "gkbd_indicator_plugins_add.availablePluginsModel",
- NULL);
- pluginPathNode = g_slist_next (pluginPathNode);
-}
-
-static void
-CappletAvailablePluginsSelectionChanged (GtkTreeSelection *
- selection,
- GkbdIndicatorPluginsCapplet * gipc)
-{
- GtkWidget *availablePluginsList =
- GTK_WIDGET (gtk_tree_selection_get_tree_view (selection));
- gboolean isAnythingSelected = FALSE;
- GtkWidget *lblDescription =
- GTK_WIDGET (g_object_get_data (G_OBJECT (gipc->capplet),
- "gkbd_indicator_plugins_add.lblDescription"));
-
- char *fullPath =
- CappletGetSelectedPluginPath (GTK_TREE_VIEW (availablePluginsList),
- gipc);
- isAnythingSelected = fullPath != NULL;
- gtk_label_set_text (GTK_LABEL (lblDescription),
- g_strconcat ("<small><i>",
- _("No description."),
- "</i></small>", NULL));
- gtk_label_set_use_markup (GTK_LABEL (lblDescription), TRUE);
-
- if (fullPath != NULL)
- {
- const GkbdIndicatorPlugin *plugin =
- gkbd_indicator_plugin_manager_get_plugin (&gipc->plugin_manager,
- fullPath);
- if (plugin != NULL && plugin->description != NULL)
- gtk_label_set_text (GTK_LABEL (lblDescription),
- g_strconcat ("<small><i>",
- plugin->
- description, "</i></small>", NULL));
- gtk_label_set_use_markup (GTK_LABEL (lblDescription), TRUE);
- }
- gtk_widget_set_sensitive (GTK_WIDGET
- (g_object_get_data
- (G_OBJECT (gipc->capplet),
- "gkbd_indicator_plugins_add.btnOK")),
- isAnythingSelected);
-}
-
-void
-CappletEnablePlugin (GtkWidget * btnAdd, GkbdIndicatorPluginsCapplet * gipc)
-{
- /* default domain! */
- GladeXML *data = glade_xml_new (GLADEDIR "/gkbd-indicator-plugins.glade",
- "gkbd_indicator_plugins_add", NULL);
- GtkWidget *popup =
- glade_xml_get_widget (data, "gkbd_indicator_plugins_add");
- GtkWidget *availablePluginsList;
- GtkTreeModel *availablePluginsModel;
- GtkCellRenderer *renderer =
- GTK_CELL_RENDERER (gtk_cell_renderer_text_new ());
- GtkTreeViewColumn *column = gtk_tree_view_column_new_with_attributes (NULL,
- renderer,
- "text",
- 0,
- NULL);
- GtkTreeSelection *selection;
- gint response;
- availablePluginsList = glade_xml_get_widget (data, "allPlugins");
- availablePluginsModel =
- GTK_TREE_MODEL (gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_STRING));
- gtk_tree_view_set_model (GTK_TREE_VIEW (availablePluginsList),
- availablePluginsModel);
- gtk_tree_view_append_column (GTK_TREE_VIEW (availablePluginsList), column);
- selection =
- gtk_tree_view_get_selection (GTK_TREE_VIEW (availablePluginsList));
- gtk_tree_selection_set_mode (selection, GTK_SELECTION_SINGLE);
- CappletFillAvailablePluginList (GTK_TREE_VIEW (availablePluginsList), gipc);
- g_signal_connect (G_OBJECT (selection), "changed",
- G_CALLBACK
- (CappletAvailablePluginsSelectionChanged), gipc);
- g_object_set_data (G_OBJECT (gipc->capplet),
- "gkbd_indicator_plugins_add.btnOK",
- glade_xml_get_widget (data, "btnOK"));
- g_object_set_data (G_OBJECT (gipc->capplet),
- "gkbd_indicator_plugins_add.lblDescription",
- glade_xml_get_widget (data, "lblDescription"));
- CappletAvailablePluginsSelectionChanged (selection, gipc);
- response = gtk_dialog_run (GTK_DIALOG (popup));
- g_object_set_data (G_OBJECT (gipc->capplet),
- "gkbd_indicator_plugins_add.lblDescription", NULL);
- g_object_set_data (G_OBJECT (gipc->capplet),
- "gkbd_indicator_plugins_add.btnOK", NULL);
- gtk_widget_hide_all (popup);
- if (response == GTK_RESPONSE_OK)
- {
- char *fullPath =
- CappletGetSelectedPluginPath (GTK_TREE_VIEW (availablePluginsList),
- gipc);
- if (fullPath != NULL)
- {
- gkbd_indicator_plugin_manager_enable_plugin (&gipc->
- plugin_manager,
- &gipc->
- applet_cfg.
- enabled_plugins,
- fullPath);
- CappletFillActivePluginList (gipc);
- g_free (fullPath);
- gkbd_indicator_config_save_to_gconf (&gipc->applet_cfg);
- }
- }
- gtk_widget_destroy (popup);
-}
diff --git a/capplet/gkbd-indicator-plugins-capplet.c b/capplet/gkbd-indicator-plugins-capplet.c
deleted file mode 100644
index d2e0f82..0000000
--- a/capplet/gkbd-indicator-plugins-capplet.c
+++ /dev/null
@@ -1,383 +0,0 @@
-/*
- * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#include <config.h>
-
-#include "gkbd-indicator-plugins-capplet.h"
-
-#include <string.h>
-#include <sys/stat.h>
-
-#include <glib/gi18n.h>
-#include <gdk/gdkx.h>
-#include <glade/glade.h>
-#include <libgnomeui/gnome-ui-init.h>
-#include <libgnomeui/gnome-help.h>
-
-static GkbdKeyboardConfig initialSysKbdConfig;
-static GMainLoop *loop;
-
-extern void
-CappletFillActivePluginList (GkbdIndicatorPluginsCapplet * gipc)
-{
- GtkWidget *activePlugins = CappletGetGladeWidget (gipc, "activePlugins");
- GtkListStore *activePluginsModel =
- GTK_LIST_STORE (gtk_tree_view_get_model (GTK_TREE_VIEW (activePlugins)));
- GSList *pluginPathNode = gipc->applet_cfg.enabled_plugins;
- GHashTable *allPluginRecs = gipc->plugin_manager.all_plugin_recs;
-
- gtk_list_store_clear (activePluginsModel);
- if (allPluginRecs == NULL)
- return;
-
- while (pluginPathNode != NULL)
- {
- GtkTreeIter iter;
- const char *fullPath = (const char *) pluginPathNode->data;
- const GkbdIndicatorPlugin *plugin =
- gkbd_indicator_plugin_manager_get_plugin (&gipc->plugin_manager,
- fullPath);
- if (plugin != NULL)
- {
- gtk_list_store_append (activePluginsModel, &iter);
- gtk_list_store_set (activePluginsModel, &iter,
- NAME_COLUMN, plugin->name,
- FULLPATH_COLUMN, fullPath, -1);
- }
-
- pluginPathNode = g_slist_next (pluginPathNode);
- }
-}
-
-static char *
-CappletGetSelectedActivePluginPath (GkbdIndicatorPluginsCapplet * gipc)
-{
- GtkTreeView *pluginsList =
- GTK_TREE_VIEW (CappletGetGladeWidget (gipc, "activePlugins"));
- return CappletGetSelectedPluginPath (pluginsList, gipc);
-}
-
-char *
-CappletGetSelectedPluginPath (GtkTreeView * pluginsList,
- GkbdIndicatorPluginsCapplet * gipc)
-{
- GtkTreeModel *model = gtk_tree_view_get_model (GTK_TREE_VIEW (pluginsList));
- GtkTreeSelection *selection =
- gtk_tree_view_get_selection (GTK_TREE_VIEW (pluginsList));
- GtkTreeIter selectedIter;
-
- if (gtk_tree_selection_get_selected (selection, NULL, &selectedIter))
- {
- char *fullPath = NULL;
-
- gtk_tree_model_get (model, &selectedIter,
- FULLPATH_COLUMN, &fullPath, -1);
- return fullPath;
- }
- return NULL;
-}
-
-static void
-CappletActivePluginsSelectionChanged (GtkTreeSelection *
- selection,
- GkbdIndicatorPluginsCapplet * gipc)
-{
- GtkWidget *activePlugins = CappletGetGladeWidget (gipc, "activePlugins");
- GtkTreeModel *model =
- gtk_tree_view_get_model (GTK_TREE_VIEW (activePlugins));
- GtkTreeIter selectedIter;
- gboolean isAnythingSelected = FALSE;
- gboolean isFirstSelected = FALSE;
- gboolean isLastSelected = FALSE;
- gboolean hasConfigurationUi = FALSE;
- GtkWidget *btnRemove = CappletGetGladeWidget (gipc, "btnRemove");
- GtkWidget *btnUp = CappletGetGladeWidget (gipc, "btnUp");
- GtkWidget *btnDown = CappletGetGladeWidget (gipc, "btnDown");
- GtkWidget *btnProperties = CappletGetGladeWidget (gipc, "btnProperties");
- GtkWidget *lblDescription = CappletGetGladeWidget (gipc, "lblDescription");
-
- gtk_label_set_text (GTK_LABEL (lblDescription),
- g_strconcat ("<small><i>",
- _("No description."),
- "</i></small>", NULL));
- gtk_label_set_use_markup (GTK_LABEL (lblDescription), TRUE);
-
- if (gtk_tree_selection_get_selected (selection, NULL, &selectedIter))
- {
- int counter = gtk_tree_model_iter_n_children (model, NULL);
- GtkTreePath *treePath = gtk_tree_model_get_path (model, &selectedIter);
- gint *indices = gtk_tree_path_get_indices (treePath);
- char *fullPath = CappletGetSelectedActivePluginPath (gipc);
- const GkbdIndicatorPlugin *plugin =
- gkbd_indicator_plugin_manager_get_plugin (&gipc->plugin_manager,
- fullPath);
-
- isAnythingSelected = TRUE;
-
- isFirstSelected = indices[0] == 0;
- isLastSelected = indices[0] == counter - 1;
-
- if (plugin != NULL)
- {
- hasConfigurationUi =
- (plugin->configure_properties_callback != NULL);
- gtk_label_set_text (GTK_LABEL (lblDescription),
- g_strconcat ("<small><i>",
- plugin->
- description,
- "</i></small>", NULL));
- gtk_label_set_use_markup (GTK_LABEL (lblDescription), TRUE);
- }
- g_free (fullPath);
-
- gtk_tree_path_free (treePath);
- }
- gtk_widget_set_sensitive (btnRemove, isAnythingSelected);
- gtk_widget_set_sensitive (btnUp, isAnythingSelected && !isFirstSelected);
- gtk_widget_set_sensitive (btnDown, isAnythingSelected && !isLastSelected);
- gtk_widget_set_sensitive (btnProperties, isAnythingSelected
- && hasConfigurationUi);
-}
-
-static void
-CappletPromotePlugin (GtkWidget * btnUp, GkbdIndicatorPluginsCapplet * gipc)
-{
- char *fullPath = CappletGetSelectedActivePluginPath (gipc);
- if (fullPath != NULL)
- {
- gkbd_indicator_plugin_manager_promote_plugin (&gipc->
- plugin_manager,
- gipc->applet_cfg.
- enabled_plugins,
- fullPath);
- g_free (fullPath);
- CappletFillActivePluginList (gipc);
- gkbd_indicator_config_save_to_gconf (&gipc->applet_cfg);
- }
-}
-
-static void
-CappletDemotePlugin (GtkWidget * btnUp, GkbdIndicatorPluginsCapplet * gipc)
-{
- char *fullPath = CappletGetSelectedActivePluginPath (gipc);
- if (fullPath != NULL)
- {
- gkbd_indicator_plugin_manager_demote_plugin (&gipc->
- plugin_manager,
- gipc->applet_cfg.
- enabled_plugins, fullPath);
- g_free (fullPath);
- CappletFillActivePluginList (gipc);
- gkbd_indicator_config_save_to_gconf (&gipc->applet_cfg);
- }
-}
-
-static void
-CappletDisablePlugin (GtkWidget * btnRemove,
- GkbdIndicatorPluginsCapplet * gipc)
-{
- char *fullPath = CappletGetSelectedActivePluginPath (gipc);
- if (fullPath != NULL)
- {
- gkbd_indicator_plugin_manager_disable_plugin (&gipc->
- plugin_manager,
- &gipc->
- applet_cfg.
- enabled_plugins,
- fullPath);
- g_free (fullPath);
- CappletFillActivePluginList (gipc);
- gkbd_indicator_config_save_to_gconf (&gipc->applet_cfg);
- }
-}
-
-static void
-CappletConfigurePlugin (GtkWidget * btnRemove,
- GkbdIndicatorPluginsCapplet * gipc)
-{
- char *fullPath = CappletGetSelectedActivePluginPath (gipc);
- if (fullPath != NULL)
- {
- gkbd_indicator_plugin_manager_configure_plugin (&gipc->
- plugin_manager,
- &gipc->
- plugin_container,
- fullPath,
- GTK_WINDOW
- (gipc->capplet));
- g_free (fullPath);
- }
-}
-
-static void
-CappletResponse (GtkDialog * dialog, gint response)
-{
- if (response == GTK_RESPONSE_HELP)
- {
- GError *error = NULL;
- gnome_help_display_on_screen ("gkbd", "gkb-indicator-applet-plugins",
- gtk_widget_get_screen (GTK_WIDGET
- (dialog)), &error);
- return;
- }
-
- g_main_loop_quit (loop);
-}
-
-static void
-CappletSetup (GkbdIndicatorPluginsCapplet * gipc)
-{
- GladeXML *data;
- GtkWidget *capplet;
- GtkWidget *activePlugins;
- GtkTreeModel *activePluginsModel;
- GtkCellRenderer *renderer =
- GTK_CELL_RENDERER (gtk_cell_renderer_text_new ());
- GtkTreeViewColumn *column =
- gtk_tree_view_column_new_with_attributes (NULL, renderer,
- "text", 0,
- NULL);
- GtkTreeSelection *selection;
- glade_gnome_init ();
-
- gtk_window_set_default_icon_name ("gkbd-indicator-plugins-capplet");
-
- /* default domain! */
- data =
- glade_xml_new (GLADEDIR "/gkbd-indicator-plugins.glade",
- "gkbd_indicator_plugins", NULL);
- gipc->capplet = capplet =
- glade_xml_get_widget (data, "gkbd_indicator_plugins");
-
- gtk_object_set_data (GTK_OBJECT (capplet), "gladeData", data);
- g_signal_connect_swapped (GTK_OBJECT (capplet),
- "destroy", G_CALLBACK (g_object_unref), data);
- g_signal_connect_swapped (G_OBJECT (capplet), "unrealize",
- G_CALLBACK (g_main_loop_quit), loop);
-
- g_signal_connect (GTK_OBJECT (capplet),
- "response", G_CALLBACK (CappletResponse), NULL);
-
- glade_xml_signal_connect_data (data, "on_btnUp_clicked",
- GTK_SIGNAL_FUNC
- (CappletPromotePlugin), gipc);
- glade_xml_signal_connect_data (data,
- "on_btnDown_clicked",
- GTK_SIGNAL_FUNC (CappletDemotePlugin), gipc);
- glade_xml_signal_connect_data (data,
- "on_btnAdd_clicked",
- GTK_SIGNAL_FUNC (CappletEnablePlugin), gipc);
- glade_xml_signal_connect_data (data,
- "on_btnRemove_clicked",
- GTK_SIGNAL_FUNC
- (CappletDisablePlugin), gipc);
- glade_xml_signal_connect_data (data,
- "on_btnProperties_clicked",
- GTK_SIGNAL_FUNC
- (CappletConfigurePlugin), gipc);
-
- activePlugins = CappletGetGladeWidget (gipc, "activePlugins");
- activePluginsModel =
- GTK_TREE_MODEL (gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_STRING));
- gtk_tree_view_set_model (GTK_TREE_VIEW (activePlugins), activePluginsModel);
- gtk_tree_view_append_column (GTK_TREE_VIEW (activePlugins), column);
- selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (activePlugins));
- gtk_tree_selection_set_mode (selection, GTK_SELECTION_SINGLE);
- g_signal_connect (G_OBJECT (selection), "changed",
- G_CALLBACK (CappletActivePluginsSelectionChanged), gipc);
- CappletFillActivePluginList (gipc);
- CappletActivePluginsSelectionChanged (selection, gipc);
- gtk_widget_show_all (capplet);
-}
-
-int
-main (int argc, char **argv)
-{
- GkbdIndicatorPluginsCapplet gipc;
-
- GError *gconf_error = NULL;
- GConfClient *confClient;
-
- bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
- bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
- textdomain (GETTEXT_PACKAGE);
- memset (&gipc, 0, sizeof (gipc));
- gnome_program_init ("gkbd", VERSION,
- LIBGNOMEUI_MODULE, argc, argv,
- GNOME_PROGRAM_STANDARD_PROPERTIES, NULL);
- if (!gconf_init (argc, argv, &gconf_error))
- {
- g_warning (_("Failed to init GConf: %s\n"), gconf_error->message);
- g_error_free (gconf_error);
- return 1;
- }
- gconf_error = NULL;
- /*GkbdIndicatorInstallGlibLogAppender( ); */
- gipc.engine = xkl_engine_get_instance (GDK_DISPLAY ());
- gipc.config_registry = xkl_config_registry_get_instance (gipc.engine);
-
- confClient = gconf_client_get_default ();
- gkbd_indicator_plugin_container_init (&gipc.plugin_container, confClient);
- g_object_unref (confClient);
-
- gkbd_keyboard_config_init (&gipc.kbd_cfg, confClient, gipc.engine);
- gkbd_keyboard_config_init (&initialSysKbdConfig, confClient, gipc.engine);
-
- gkbd_indicator_config_init (&gipc.applet_cfg, confClient, gipc.engine);
-
- gkbd_indicator_plugin_manager_init (&gipc.plugin_manager);
-
- gkbd_keyboard_config_load_from_x_initial (&initialSysKbdConfig, NULL);
- gkbd_keyboard_config_load_from_gconf (&gipc.kbd_cfg, &initialSysKbdConfig);
-
- gkbd_indicator_config_load_from_gconf (&gipc.applet_cfg);
-
- loop = g_main_loop_new (NULL, TRUE);
-
- CappletSetup (&gipc);
-
- g_main_loop_run (loop);
-
- gkbd_indicator_plugin_manager_term (&gipc.plugin_manager);
-
- gkbd_indicator_config_term (&gipc.applet_cfg);
-
- gkbd_keyboard_config_term (&gipc.kbd_cfg);
- gkbd_keyboard_config_term (&initialSysKbdConfig);
-
- gkbd_indicator_plugin_container_term (&gipc.plugin_container);
- g_object_unref (G_OBJECT (gipc.config_registry));
- g_object_unref (G_OBJECT (gipc.engine));
- return 0;
-}
-
-/* functions just for plugins - otherwise ldd is not happy */
-void
-gkbd_indicator_plugin_container_reinit_ui (GkbdIndicatorPluginContainer * pc)
-{
-}
-
-gchar **
-gkbd_indicator_plugin_load_localized_group_names (GkbdIndicatorPluginContainer
- * pc)
-{
- return
- gkbd_desktop_config_load_group_descriptions_utf8 (&
- (((GkbdIndicatorPluginsCapplet *) pc)->cfg), (((GkbdIndicatorPluginsCapplet *) pc)->config_registry));
-}
diff --git a/capplet/gkbd-indicator-plugins-capplet.desktop.in.in b/capplet/gkbd-indicator-plugins-capplet.desktop.in.in
deleted file mode 100644
index f9e04df..0000000
--- a/capplet/gkbd-indicator-plugins-capplet.desktop.in.in
+++ /dev/null
@@ -1,15 +0,0 @@
-[Desktop Entry]
-Encoding=UTF-8
-_Name=Keyboard Indicator plugins
-_Comment=Enable/disable installed plugins
-Exec=gkbd-indicator-plugins-capplet
-Icon=gnome-dev-keyboard
-Terminal=false
-Type=Application
-StartupNotify=true
-Categories=Application;System;Settings;AdvancedSettings;
-OnlyShowIn=GNOME;
-X-GNOME-Bugzilla-Bugzilla=GNOME
-X-GNOME-Bugzilla-Product=libgnomekbd
-X-GNOME-Bugzilla-Component=keyboard indicator plugins capplet
-X-GNOME-Bugzilla-Version=@VERSION@
diff --git a/capplet/gkbd-indicator-plugins-capplet.h b/capplet/gkbd-indicator-plugins-capplet.h
deleted file mode 100644
index 4f622c2..0000000
--- a/capplet/gkbd-indicator-plugins-capplet.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef __GKBD_INDICATOR_PLUGINS_CAPPLET_H__
-#define __GKBD_INDICATOR_PLUGINS_CAPPLET_H__
-
-#include <glib-object.h>
-#include <gtk/gtkwidget.h>
-#include <glade/glade-xml.h>
-
-#include "libgnomekbd/gkbd-desktop-config.h"
-#include "libgnomekbd/gkbd-indicator-config.h"
-#include "libgnomekbd/gkbd-keyboard-config.h"
-
-#include "libgnomekbd/gkbd-indicator-plugin-manager.h"
-#include "libgnomekbd/gkbd-util.h"
-
-typedef struct _GkbdIndicatorPluginsCapplet
-{
- GkbdIndicatorPluginContainer plugin_container;
- GkbdDesktopConfig cfg;
- GkbdIndicatorConfig applet_cfg;
- GkbdKeyboardConfig kbd_cfg;
- GkbdIndicatorPluginManager plugin_manager;
- XklEngine *engine;
- XklConfigRegistry *config_registry;
-
- GtkWidget *capplet;
-} GkbdIndicatorPluginsCapplet;
-
-#define NAME_COLUMN 0
-#define FULLPATH_COLUMN 1
-
-#define CappletGetGladeWidget( gipc, name ) \
- glade_xml_get_widget( \
- GLADE_XML( g_object_get_data( G_OBJECT( (gipc)->capplet ), \
- "gladeData" ) ), \
- name )
-
-extern void CappletFillActivePluginList (GkbdIndicatorPluginsCapplet * gipc);
-
-extern char *CappletGetSelectedPluginPath (GtkTreeView * plugins_list,
- GkbdIndicatorPluginsCapplet *
- gipc);
-
-extern void CappletEnablePlugin (GtkWidget * btnAdd,
- GkbdIndicatorPluginsCapplet * gipc);
-
-#endif
diff --git a/capplet/gkbd-indicator-plugins-capplet.png b/capplet/gkbd-indicator-plugins-capplet.png
deleted file mode 100644
index acedf80..0000000
--- a/capplet/gkbd-indicator-plugins-capplet.png
+++ /dev/null
Binary files differ
diff --git a/capplet/gkbd-indicator-plugins.glade b/capplet/gkbd-indicator-plugins.glade
deleted file mode 100644
index 9d3d2d1..0000000
--- a/capplet/gkbd-indicator-plugins.glade
+++ /dev/null
@@ -1,532 +0,0 @@
-<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
-
-<glade-interface>
-<requires lib="gnome"/>
-
-<widget class="GtkDialog" id="gkbd_indicator_plugins">
- <property name="border_width">5</property>
- <property name="visible">True</property>
- <property name="title" translatable="yes">Keyboard Indicator Plugins</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">False</property>
- <property name="resizable">True</property>
- <property name="destroy_with_parent">False</property>
- <property name="decorated">True</property>
- <property name="skip_taskbar_hint">False</property>
- <property name="skip_pager_hint">False</property>
- <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
- <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
- <property name="has_separator">False</property>
-
- <child internal-child="vbox">
- <widget class="GtkVBox" id="dialog-vbox1">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">2</property>
-
- <child internal-child="action_area">
- <widget class="GtkHButtonBox" id="dialog-action_area1">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</property>
-
- <child>
- <widget class="GtkButton" id="btnClose">
- <property name="visible">True</property>
- <property name="tooltip" translatable="yes">Close the dialog</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-close</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="response_id">-7</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="btnHelp">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-help</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="response_id">-11</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="pack_type">GTK_PACK_END</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox5">
- <property name="border_width">5</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkHBox" id="hbox1">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">12</property>
-
- <child>
- <widget class="GtkAlignment" id="alignment1">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xscale">1</property>
- <property name="yscale">1</property>
- <property name="top_padding">0</property>
- <property name="bottom_padding">0</property>
- <property name="left_padding">0</property>
- <property name="right_padding">0</property>
-
- <child>
- <widget class="GtkVBox" id="vbox1">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="label3">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Active _plugins:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">activePlugins</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkScrolledWindow" id="scrolledwindow1">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="shadow_type">GTK_SHADOW_IN</property>
- <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
-
- <child>
- <widget class="GtkTreeView" id="activePlugins">
- <property name="width_request">160</property>
- <property name="visible">True</property>
- <property name="tooltip" translatable="yes">The list of active plugins</property>
- <property name="can_focus">True</property>
- <property name="headers_visible">False</property>
- <property name="rules_hint">False</property>
- <property name="reorderable">False</property>
- <property name="enable_search">True</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkAlignment" id="alignment12">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xscale">1</property>
- <property name="yscale">1</property>
- <property name="top_padding">0</property>
- <property name="bottom_padding">0</property>
- <property name="left_padding">0</property>
- <property name="right_padding">0</property>
-
- <child>
- <widget class="GtkVBox" id="vbox3">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="label10">
- <property name="visible">True</property>
- <property name="label" translatable="yes"></property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkButton" id="btnAdd">
- <property name="visible">True</property>
- <property name="tooltip" translatable="yes">Activate more plugins</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-add</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <signal name="clicked" handler="on_btnAdd_clicked" last_modification_time="Tue, 29 Jul 2003 23:37:15 GMT"/>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkButton" id="btnRemove">
- <property name="visible">True</property>
- <property name="tooltip" translatable="yes">Deactivate selected plugin</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-remove</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <signal name="clicked" handler="on_btnRemove_clicked" last_modification_time="Tue, 29 Jul 2003 23:37:02 GMT"/>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkButton" id="btnUp">
- <property name="visible">True</property>
- <property name="tooltip" translatable="yes">Increase the plugin priority</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-go-up</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <signal name="clicked" handler="on_btnUp_clicked" last_modification_time="Tue, 29 Jul 2003 23:36:45 GMT"/>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkButton" id="btnDown">
- <property name="visible">True</property>
- <property name="tooltip" translatable="yes">Decrease the plugin priority</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-go-down</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <signal name="clicked" handler="on_btnDown_clicked" last_modification_time="Tue, 29 Jul 2003 23:36:30 GMT"/>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkButton" id="btnProperties">
- <property name="visible">True</property>
- <property name="tooltip" translatable="yes">Configure the selected plugin</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-properties</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <signal name="clicked" handler="on_btnProperties_clicked" last_modification_time="Tue, 29 Jul 2003 23:36:16 GMT"/>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label11">
- <property name="visible">True</property>
- <property name="label" translatable="yes"></property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="lblDescription">
- <property name="visible">True</property>
- <property name="label" translatable="yes"></property>
- <property name="use_underline">False</property>
- <property name="use_markup">True</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">True</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- </child>
-</widget>
-
-<widget class="GtkDialog" id="gkbd_indicator_plugins_add">
- <property name="border_width">5</property>
- <property name="visible">True</property>
- <property name="title" translatable="yes">Add Plugin</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">True</property>
- <property name="resizable">True</property>
- <property name="destroy_with_parent">True</property>
- <property name="decorated">True</property>
- <property name="skip_taskbar_hint">False</property>
- <property name="skip_pager_hint">False</property>
- <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
- <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
- <property name="has_separator">False</property>
-
- <child internal-child="vbox">
- <widget class="GtkVBox" id="dialog-vbox2">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">2</property>
-
- <child internal-child="action_area">
- <widget class="GtkHButtonBox" id="dialog-action_area2">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</property>
-
- <child>
- <widget class="GtkButton" id="helpbutton1">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-help</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="response_id">-11</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="cancelbutton1">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-cancel</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="response_id">-6</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="btnOK">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-ok</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="response_id">-5</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="pack_type">GTK_PACK_END</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkAlignment" id="alignment13">
- <property name="border_width">5</property>
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xscale">1</property>
- <property name="yscale">1</property>
- <property name="top_padding">0</property>
- <property name="bottom_padding">0</property>
- <property name="left_padding">0</property>
- <property name="right_padding">0</property>
-
- <child>
- <widget class="GtkVBox" id="vbox4">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="label18">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Available plugins:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">allPlugins</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkScrolledWindow" id="scrolledwindow2">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="shadow_type">GTK_SHADOW_IN</property>
- <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
-
- <child>
- <widget class="GtkTreeView" id="allPlugins">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="headers_visible">False</property>
- <property name="rules_hint">False</property>
- <property name="reorderable">False</property>
- <property name="enable_search">True</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="lblDescription">
- <property name="visible">True</property>
- <property name="label" translatable="yes"></property>
- <property name="use_underline">False</property>
- <property name="use_markup">True</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">True</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- </child>
-</widget>
-
-</glade-interface>
diff --git a/configure.in b/configure.in
deleted file mode 100644
index 77eb0b5..0000000
--- a/configure.in
+++ /dev/null
@@ -1,109 +0,0 @@
-dnl ***************************************************************************
-dnl *** configure.in for libgnomekbd ***
-dnl ***************************************************************************
-AC_INIT(libgnomekbd, 2.17.92)
-AC_PREREQ(2.59)
-
-VERSION_INFO=1:0:0
-AC_SUBST(VERSION_INFO)
-
-AM_CONFIG_HEADER(config.h)
-AM_INIT_AUTOMAKE(1.8)
-AC_CONFIG_MACRO_DIR(m4)
-
-dnl ***************************************************************************
-dnl *** Minimum library versions for libgnomekbd ***
-dnl ***************************************************************************
-DBUS_REQUIRED=0.92
-DBUS_GLIB_REQUIRED=0.34
-GCONF_REQUIRED=2.14.0
-GDK_REQUIRED=2.10.3
-GTK_REQUIRED=2.10.3
-LIBGLADE_REQUIRED=2.6.0
-LIBGNOME_REQUIRED=2.16.0
-LIBGNOMEUI_REQUIRED=2.16.0
-LIBXKLAVIER_REQUIRED=2.91
-dnl ***************************************************************************
-
-AM_MAINTAINER_MODE
-
-AC_PROG_INTLTOOL
-GNOME_COMPILE_WARNINGS
-
-AC_ISC_POSIX
-AC_PROG_CC
-AC_STDC_HEADERS
-AM_PROG_LIBTOOL
-
-GETTEXT_PACKAGE=libgnomekbd
-AC_SUBST(GETTEXT_PACKAGE)
-AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Gettext package])
-
-ALL_LINGUAS="bg ja nb ru"
-
-AM_GLIB_GNU_GETTEXT
-
-GLIB_DEFINE_LOCALEDIR(GNOMELOCALEDIR)
-
-AC_CHECK_FUNCS(setlocale)
-
-PKG_CHECK_MODULES(DBUS, dbus-1 >= $DBUS_REQUIRED dbus-glib-1 >= $DBUS_GLIB_REQUIRED)
-
-AC_SUBST(DBUS_CFLAGS)
-AC_SUBST(DBUS_LIBS)
-
-PKG_CHECK_MODULES(GCONF, gconf-2.0 >= $GCONF_REQUIRED)
-
-AC_SUBST(GCONF_CFLAGS)
-AC_SUBST(GCONF_LIBS)
-
-PKG_CHECK_MODULES(GDK, gdk-2.0 >= $GDK_REQUIRED)
-
-AC_SUBST(GDK_CFLAGS)
-AC_SUBST(GDK_LIBS)
-
-PKG_CHECK_MODULES(GTK, gtk+-2.0 >= $GTK_REQUIRED gdk-x11-2.0 >= $GDK_REQUIRED)
-
-AC_SUBST(GTK_CFLAGS)
-AC_SUBST(GTK_LIBS)
-
-PKG_CHECK_MODULES(LIBXKLAVIER, libxklavier >= $LIBXKLAVIER_REQUIRED)
-
-AC_SUBST(LIBXKLAVIER_CFLAGS)
-AC_SUBST(LIBXKLAVIER_LIBS)
-
-PKG_CHECK_MODULES(LIBGLADE, libglade-2.0 >= $LIBGLADE_REQUIRED)
-
-AC_SUBST(LIBGLADE_CFLAGS)
-AC_SUBST(LIBGLADE_LIBS)
-
-PKG_CHECK_MODULES(LIBGNOME, libgnome-2.0 >= $LIBGNOME_REQUIRED)
-
-AC_SUBST(LIBGNOME_CFLAGS)
-AC_SUBST(LIBGNOME_LIBS)
-
-PKG_CHECK_MODULES(LIBGNOMEUI, libgnomeui-2.0 >= $LIBGNOMEUI_REQUIRED)
-
-AC_SUBST(LIBGNOMEUI_CFLAGS)
-AC_SUBST(LIBGNOMEUI_LIBS)
-
-AC_PATH_PROG(GCONFTOOL, gconftool-2, no)
-
-if test x"$GCONFTOOL" = xno; then
- AC_MSG_ERROR([gconftool-2 executable not found in your path - should be installed with GConf])
-fi
-
-AM_GCONF_SOURCE_2
-
-AC_OUTPUT([
-Makefile
-libgnomekbd.pc
-libgnomekbdui.pc
-po/Makefile.in
-libgnomekbd/Makefile
-test/Makefile
-capplet/Makefile
-capplet/gkbd-indicator-plugins-capplet.desktop.in
-])
-
-
diff --git a/libgnomekbd.anjuta b/libgnomekbd.anjuta
deleted file mode 100644
index b6a1551..0000000
--- a/libgnomekbd.anjuta
+++ /dev/null
@@ -1,54 +0,0 @@
-<?xml version="1.0"?>
-<anjuta>
- <plugin name="GBF Project Manager"
- url="http://anjuta.org/plugins/"
- mandatory="yes">
- <require group="Anjuta Plugin"
- attribute="Interfaces"
- value="IAnjutaProjectManager"/>
- <require group="Project"
- attribute="Supported-Project-Types"
- value="automake"/>
- </plugin>
- <plugin name="Symbol Browser"
- url="http://anjuta.org/plugins/"
- mandatory="yes">
- <require group="Anjuta Plugin"
- attribute="Location"
- value="anjuta-symbol-browser:SymbolBrowserPlugin"/>
- </plugin>
- <plugin name="Make Build System"
- url="http://anjuta.org/plugins/"
- mandatory="yes">
- <require group="Anjuta Plugin"
- attribute="Interfaces"
- value="IAnjutaBuildable"/>
- <require group="Build"
- attribute="Supported-Build-Types"
- value="make"/>
- </plugin>
- <plugin name="CVS Version Control System"
- url="http://anjuta.org/plugins/"
- mandatory="no">
- <require group="Anjuta Plugin"
- attribute="Interfaces"
- value="IAnjutaVcs"/>
- <require group="Version Control"
- attribute="Supported-Vcs-Types"
- value="cvs"/>
- </plugin>
- <plugin name="Task Manager"
- url="http://anjuta.org/plugins/"
- mandatory="no">
- <require group="Anjuta Plugin"
- attribute="Interfaces"
- value="IAnjutaTodo"/>
- </plugin>
- <plugin name="Debug Manager"
- url="http://anjuta.org/plugins/"
- mandatory="no">
- <require group="Anjuta Plugin"
- attribute="Interfaces"
- value="IAnjutaDebuggerManager"/>
- </plugin>
-</anjuta>
diff --git a/libgnomekbd.pc.in b/libgnomekbd.pc.in
deleted file mode 100644
index cc9b6fc..0000000
--- a/libgnomekbd.pc.in
+++ /dev/null
@@ -1,10 +0,0 @@
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-libdir=@libdir@
-includedir=@includedir@
-
-Name: libgnomekbd
-Description: GNOME keyboard shared library
-Version: @VERSION@
-Libs: -L${libdir} -lgnomekbd @GDK_LIBS@ @GCONF_LIBS@ @LIBGNOME_LIBS@ @LIBXKLAVIER_LIBS@ @DBUS_LIBS@
-Cflags: -I${includedir}
diff --git a/libgnomekbd/.cvsignore b/libgnomekbd/.cvsignore
deleted file mode 100644
index 9567442..0000000
--- a/libgnomekbd/.cvsignore
+++ /dev/null
@@ -1,10 +0,0 @@
-Makefile
-Makefile.in
-desktop_gnome_peripherals_keyboard_xkb.schemas
-gkbd-config-registry-client.h
-gkbd-config-registry-server.h
-gkbd-indicator-marshal.c
-gkbd-indicator-marshal.h
-gkbd-keyboard-drawing-marshal.c
-gkbd-keyboard-drawing-marshal.h
-
diff --git a/libgnomekbd/.indent.pro b/libgnomekbd/.indent.pro
deleted file mode 100644
index bdff074..0000000
--- a/libgnomekbd/.indent.pro
+++ /dev/null
@@ -1,2 +0,0 @@
--kr -i8 -pcs -lps -psl
-
diff --git a/libgnomekbd/Makefile.am b/libgnomekbd/Makefile.am
deleted file mode 100644
index 9e7df2e..0000000
--- a/libgnomekbd/Makefile.am
+++ /dev/null
@@ -1,128 +0,0 @@
-lib_LTLIBRARIES = libgnomekbd.la libgnomekbdui.la
-
-common_CFLAGS = \
- -I$(top_srcdir) -Wall -Werror \
- $(GDK_CFLAGS) \
- $(DBUS_CFLAGS) \
- $(GCONF_CFLAGS) \
- $(LIBGNOME_CFLAGS) \
- $(LIBXKLAVIER_CFLAGS) \
- -I$(top_srcdir)/intl \
- -DSYS_PLUGIN_DIR=\"$(libdir)/gnomekbd/\" \
- -DG_LOG_DOMAIN=\"GnomeKbdIndicator\" \
- -DGLADEDIR=\"$(gladedir)\" \
- -DDATADIR=\"$(datadir)\" \
- -DSYSCONFDIR=\"$(sysconfdir)\" \
- -DLIBDIR=\"$(libdir)\"
-
-libgnomekbd_la_CFLAGS = $(common_CFLAGS)
-
-libgnomekbdui_la_CFLAGS = $(common_CFLAGS) \
- $(GTK_CFLAGS)
-
-common_LDFLAGS = -version-info @VERSION_INFO@ \
- $(DBUS_LIBS) \
- $(GDK_LIBS) \
- $(GCONF_LIBS) \
- $(LIBXKLAVIER_LIBS)
-
-libgnomekbd_la_LDFLAGS = $(common_LDFLAGS)
-
-libgnomekbdui_la_LDFLAGS = $(common_LDFLAGS) \
- $(GTK_LIBS) \
- $(LIBGNOME_LIBS) \
- -lgnomekbd
-
-libgnomekbd_la_SOURCES = \
- gkbd-config-registry.c \
- gkbd-desktop-config.c \
- gkbd-keyboard-config.c \
- gkbd-util.c
-
-libgnomekbdui_la_SOURCES = \
- gkbd-indicator-config.c \
- gkbd-indicator.c \
- gkbd-indicator-marshal.c \
- gkbd-indicator-plugin-manager.c \
- gkbd-keyboard-drawing-marshal.c \
- gkbd-keyboard-drawing.c
-
-BUILT_SOURCES = gkbd-indicator-marshal.c \
- gkbd-indicator-marshal.h \
- gkbd-config-registry-server.h \
- gkbd-config-registry-client.h \
- gkbd-keyboard-drawing-marshal.c \
- gkbd-keyboard-drawing-marshal.h
-
-CLEANFILES = $(BUILT_SOURCES) $(schema_DATA)
-
-gnomekbdincdir = $(includedir)/libgnomekbd
-gnomekbdinc_HEADERS = \
- gkbd-desktop-config.h \
- gkbd-keyboard-config.h \
- gkbd-config-registry-client.h \
- gkbd-config-registry.h \
- gkbd-indicator.h \
- gkbd-indicator-config.h \
- gkbd-indicator-plugin.h \
- gkbd-keyboard-drawing.h \
- gkbd-util.h
-
-@INTLTOOL_DESKTOP_RULE@
-
-@INTLTOOL_SCHEMAS_RULE@
-
-noinst_HEADERS = gkbd-indicator-plugin-manager.h \
- $(extra_nih) \
- gkbd-config-private.h \
- gkbd-config-registry-server.h
-
-EXTRA_DIST = gkbd-indicator-marshal.list \
- gkbd-keyboard-drawing-marshal.list \
- gkbd-config-registry.xml \
- $(glade_DATA) \
- $(schema_in_files)
-
-GLIB_GENMARSHAL = $(shell pkg-config --variable=glib_genmarshal glib-2.0)
-
-gkbd-indicator-marshal.h: gkbd-indicator-marshal.list
- $(GLIB_GENMARSHAL) --prefix=gkbd_indicator $(srcdir)/gkbd-indicator-marshal.list --header > $@
-
-gkbd-indicator-marshal.c: gkbd-indicator-marshal.h
- $(GLIB_GENMARSHAL) --prefix=gkbd_indicator $(srcdir)/gkbd-indicator-marshal.list --body > $@
-
-gkbd-config-registry-server.h: gkbd-config-registry.xml
- dbus-binding-tool --prefix=gkbd_config_registry --mode=glib-server $< > $@
-
-gkbd-config-registry-client.h: gkbd-config-registry.xml
- dbus-binding-tool --prefix=gkbd_config_registry --mode=glib-client $< > $@
-
-gkbd-keyboard-drawing-marshal.h: gkbd-keyboard-drawing-marshal.list
- ( $(GLIB_GENMARSHAL) --prefix=gkbd_keyboard_drawing $(srcdir)/gkbd-keyboard-drawing-marshal.list \
- --header > gkbd-keyboard-drawing-marshal.tmp \
- && mv gkbd-keyboard-drawing-marshal.tmp gkbd-keyboard-drawing-marshal.h ) \
- || ( rm -f gkbd-keyboard-drawing-marshal.tmp && exit 1 )
-
-gkbd-keyboard-drawing-marshal.c: gkbd-keyboard-drawing-marshal.h
- ( $(GLIB_GENMARSHAL) --prefix=gkbd_keyboard_drawing $(srcdir)/gkbd-keyboard-drawing-marshal.list \
- --body > gkbd-keyboard-drawing-marshal.tmp \
- && mv gkbd-keyboard-drawing-marshal.tmp gkbd-keyboard-drawing-marshal.c ) \
- || ( rm -f gkbd-keyboard-drawing-marshal.tmp && exit 1 )
-
-schemadir = $(GCONF_SCHEMA_FILE_DIR)
-schema_in_files= desktop_gnome_peripherals_keyboard_xkb.schemas.in
-
-schema_DATA = $(schema_in_files:.schemas.in=.schemas)
-
-if GCONF_SCHEMAS_INSTALL
-# don't do this if we are building in eg. rpm
-install-data-local:
- if test -z "$(DESTDIR)" ; then \
- for p in $(schema_DATA) ; do \
- GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $$p; \
- done \
- fi
-else
-install-data-local:
-endif
-
diff --git a/libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in b/libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in
deleted file mode 100644
index 881a3e0..0000000
--- a/libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in
+++ /dev/null
@@ -1,193 +0,0 @@
-<?xml version="1.0"?>
-<gconfschemafile>
- <schemalist>
- <schema>
- <key>/schemas/desktop/gnome/peripherals/keyboard/kbd/overrideSettings</key>
- <applyto>/desktop/gnome/peripherals/keyboard/kbd/overrideSettings</applyto>
- <owner>gnome</owner>
- <type>bool</type>
- <default>true</default>
- <locale name="C">
- <short>Keyboard settings in gconf will be overridden from the system ASAP (deprecated)</short>
- <long>Very soon, keyboard settings in gconf will be overridden (from the system configuration)
- This key has been deprecated since GNOME 2.12, please unset the model, layouts and
- options keys to get the default system configuration.</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/desktop/gnome/peripherals/keyboard/kbd/model</key>
- <applyto>/desktop/gnome/peripherals/keyboard/kbd/model</applyto>
- <owner>gnome</owner>
- <type>string</type>
- <default></default>
- <locale name="C">
- <short>Keyboard model</short>
- <long>keyboard model</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/desktop/gnome/peripherals/keyboard/kbd/layouts</key>
- <applyto>/desktop/gnome/peripherals/keyboard/kbd/layouts</applyto>
- <owner>gnome</owner>
- <type>list</type>
- <list_type>string</list_type>
- <default>[]</default>
- <locale name="C">
- <short>Keyboard layout</short>
- <long>keyboard layout</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/desktop/gnome/peripherals/keyboard/kbd/options</key>
- <applyto>/desktop/gnome/peripherals/keyboard/kbd/options</applyto>
- <owner>gnome</owner>
- <type>list</type>
- <list_type>string</list_type>
- <default>[]</default>
- <locale name="C">
- <short>Keyboard options</short>
- <long>Keyboard options</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/desktop/gnome/peripherals/keyboard/general/update_handlers</key>
- <applyto>/desktop/gnome/peripherals/keyboard/general/update_handlers</applyto>
- <owner>gnome</owner>
- <type>list</type>
- <list_type>string</list_type>
- <default>[]</default>
- <locale name="C">
- <short>Keyboard Update Handlers</short>
- <long>A collection of scripts to run whenever the keyboard state is
- reloaded. Useful for re-applying xmodmap based adjustments</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/desktop/gnome/peripherals/keyboard/general/known_file_list</key>
- <applyto>/desktop/gnome/peripherals/keyboard/general/known_file_list</applyto>
- <owner>gnome</owner>
- <type>list</type>
- <list_type>string</list_type>
- <default>[]</default>
- <locale name="C">
- <short>modmap file list</short>
- <long>A list of modmap files available in the $HOME directory.</long>
- </locale>
- </schema>
-
-
- <schema>
- <key>/schemas/desktop/gnome/peripherals/keyboard/general/defaultGroup</key>
- <applyto>/desktop/gnome/peripherals/keyboard/general/defaultGroup</applyto>
- <owner>gnome</owner>
- <type>int</type>
- <default>-1</default>
- <locale name="C">
- <short>Default group, assigned on window creation</short>
- <long>Default group, assigned on window creation</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/desktop/gnome/peripherals/keyboard/general/groupPerWindow</key>
- <applyto>/desktop/gnome/peripherals/keyboard/general/groupPerWindow</applyto>
- <owner>gnome</owner>
- <type>bool</type>
- <default>true</default>
- <locale name="C">
- <short>Keep and manage separate group per window</short>
- <long>Keep and manage separate group per window</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/desktop/gnome/peripherals/keyboard/general/handleIndicators</key>
- <applyto>/desktop/gnome/peripherals/keyboard/general/handleIndicators</applyto>
- <owner>gnome</owner>
- <type>bool</type>
- <default>false</default>
- <locale name="C">
- <short>Save/restore indicators together with layout groups</short>
- <long>Save/restore indicators together with layout groups</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/desktop/gnome/peripherals/keyboard/general/layoutNamesAsGroupNames</key>
- <applyto>/desktop/gnome/peripherals/keyboard/general/layoutNamesAsGroupNames</applyto>
- <owner>gnome</owner>
- <type>bool</type>
- <default>true</default>
- <locale name="C">
- <short>Show layout names instead of group names</short>
- <long>Show layout names instead of group names (only for versions of XFree supporting multiple layouts)</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/desktop/gnome/peripherals/keyboard/general/disable_sysconfig_changed_warning</key>
- <applyto>/desktop/gnome/peripherals/keyboard/general/disable_sysconfig_changed_warning</applyto>
- <owner>gnome</owner>
- <type>bool</type>
- <default>false</default>
- <locale name="C">
- <short>Suppress the "X sysconfig changed" warning message</short>
- <long>Suppress the "X sysconfig changed" warning message</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/desktop/gnome/peripherals/keyboard/preview/x</key>
- <applyto>/desktop/gnome/peripherals/keyboard/preview/x</applyto>
- <owner>gnome</owner>
- <type>int</type>
- <default>-1</default>
- <locale name="C">
- <short>The Keyboard Preview, X offset</short>
- <long>The Keyboard Preview, X offset</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/desktop/gnome/peripherals/keyboard/preview/y</key>
- <applyto>/desktop/gnome/peripherals/keyboard/preview/y</applyto>
- <owner>gnome</owner>
- <type>int</type>
- <default>-1</default>
- <locale name="C">
- <short>The Keyboard Preview, Y offset</short>
- <long>The Keyboard Preview, Y offset</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/desktop/gnome/peripherals/keyboard/preview/width</key>
- <applyto>/desktop/gnome/peripherals/keyboard/preview/width</applyto>
- <owner>gnome</owner>
- <type>int</type>
- <default>-1</default>
- <locale name="C">
- <short>The Keyboard Preview, width</short>
- <long>The Keyboard Preview, width</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/desktop/gnome/peripherals/keyboard/preview/height</key>
- <applyto>/desktop/gnome/peripherals/keyboard/preview/height</applyto>
- <owner>gnome</owner>
- <type>int</type>
- <default>-1</default>
- <locale name="C">
- <short>The Keyboard Preview, height</short>
- <long>The Keyboard Preview, height</long>
- </locale>
- </schema>
-
- </schemalist>
-</gconfschemafile>
diff --git a/libgnomekbd/gkbd-config-private.h b/libgnomekbd/gkbd-config-private.h
deleted file mode 100644
index cdaa711..0000000
--- a/libgnomekbd/gkbd-config-private.h
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef __GKBD_CONFIG_PRIVATE_H__
-#define __GKBD_CONFIG_PRIVATE_H__
-
-#include "libgnomekbd/gkbd-desktop-config.h"
-#include "libgnomekbd/gkbd-keyboard-config.h"
-
-#define GKBD_CONFIG_KEY_PREFIX "/desktop/gnome/peripherals/keyboard"
-
-extern const gchar GKBD_PREVIEW_CONFIG_DIR[];
-extern const gchar GKBD_PREVIEW_CONFIG_KEY_X[];
-extern const gchar GKBD_PREVIEW_CONFIG_KEY_Y[];
-extern const gchar GKBD_PREVIEW_CONFIG_KEY_WIDTH[];
-extern const gchar GKBD_PREVIEW_CONFIG_KEY_HEIGHT[];
-
-/**
- * General config functions (private)
- */
-extern void
- gkbd_desktop_config_add_listener (GConfClient * conf_client,
- const gchar * key,
- GConfClientNotifyFunc func,
- gpointer user_data, int *pid);
-
-
-extern void
- gkbd_desktop_config_remove_listener (GConfClient * conf_client, int *pid);
-
-extern void gkbd_keyboard_config_model_set (GkbdKeyboardConfig *
- kbd_config,
- const gchar * model_name);
-
-extern void gkbd_keyboard_config_layouts_reset (GkbdKeyboardConfig *
- kbd_config);
-extern void gkbd_keyboard_config_layouts_add (GkbdKeyboardConfig *
- kbd_config,
- const gchar * layout_name,
- const gchar * variant_name);
-
-extern void gkbd_keyboard_config_layouts_reset (GkbdKeyboardConfig *
- kbd_config);
-extern void gkbd_keyboard_config_options_reset (GkbdKeyboardConfig *
- kbd_config);
-
-extern void gkbd_keyboard_config_options_add (GkbdKeyboardConfig *
- kbd_config,
- const gchar * group_name,
- const gchar * option_name);
-extern gboolean gkbd_keyboard_config_options_is_set (GkbdKeyboardConfig *
- kbd_config,
- const gchar *
- group_name,
- const gchar *
- option_name);
-
-extern gboolean gkbd_keyboard_config_dump_settings (GkbdKeyboardConfig *
- kbd_config,
- const char *file_name);
-
-extern void gkbd_keyboard_config_start_listen (GkbdKeyboardConfig *
- kbd_config,
- GConfClientNotifyFunc func,
- gpointer user_data);
-
-extern void gkbd_keyboard_config_stop_listen (GkbdKeyboardConfig *
- kbd_config);
-
-extern gboolean gkbd_keyboard_config_get_lv_descriptions (XklConfigRegistry
- *
- config_registry,
- const gchar *
- layout_name,
- const gchar *
- variant_name,
- gchar **
- layout_short_descr,
- gchar **
- layout_descr,
- gchar **
- variant_short_descr,
- gchar **
- variant_descr);
-
-#endif
diff --git a/libgnomekbd/gkbd-config-registry.c b/libgnomekbd/gkbd-config-registry.c
deleted file mode 100644
index 8c8e0b8..0000000
--- a/libgnomekbd/gkbd-config-registry.c
+++ /dev/null
@@ -1,194 +0,0 @@
-/*
- * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#include <config.h>
-
-#include <X11/Xlib.h>
-
-#include <gkbd-config-registry.h>
-#include <gkbd-config-registry-server.h>
-#include <gkbd-keyboard-config.h>
-
-static GObjectClass *parent_class = NULL;
-
-gboolean
- gkbd_config_registry_get_descriptions_as_utf8
- (GkbdConfigRegistry * registry,
- gchar ** layout_ids,
- gchar ** variant_ids,
- gchar *** short_layout_descriptions,
- gchar *** long_layout_descriptions,
- gchar *** short_variant_descriptions,
- gchar *** long_variant_descriptions, GError ** error) {
- char **pl, **pv;
- guint total_layouts;
- gchar **sld, **lld, **svd, **lvd;
-
- if (!registry->registry) {
- registry->registry =
- xkl_config_registry_get_instance (registry->engine);
-
- xkl_config_registry_load (registry->registry);
- }
-
- if (!
- (xkl_engine_get_features (registry->engine) &
- XKLF_MULTIPLE_LAYOUTS_SUPPORTED))
- return FALSE;
-
- pl = layout_ids;
- pv = variant_ids;
- total_layouts = g_strv_length (layout_ids);
- sld = *short_layout_descriptions =
- g_new0 (char *, total_layouts + 1);
- lld = *long_layout_descriptions =
- g_new0 (char *, total_layouts + 1);
- svd = *short_variant_descriptions =
- g_new0 (char *, total_layouts + 1);
- lvd = *long_variant_descriptions =
- g_new0 (char *, total_layouts + 1);
-
- while (pl != NULL && *pl != NULL) {
- XklConfigItem item;
-
- xkl_debug (100, "ids: [%s][%s]\n", *pl, pv == NULL ? NULL : *pv);
-
- g_snprintf (item.name, sizeof item.name, "%s", *pl);
- if (xkl_config_registry_find_layout
- (registry->registry, &item)) {
- *sld = g_strdup (item.short_description);
- *lld = g_strdup (item.description);
- } else {
- *sld = g_strdup ("");
- *lld = g_strdup ("");
- }
-
- if (*pv != NULL) {
- g_snprintf (item.name, sizeof item.name, "%s",
- *pv);
- if (xkl_config_registry_find_variant
- (registry->registry, *pl, &item)) {
- *svd = g_strdup (item.short_description);
- *lvd = g_strdup (item.description);
- } else {
- *svd = g_strdup ("");
- *lvd = g_strdup ("");
- }
- } else {
- *svd = g_strdup ("");
- *lvd = g_strdup ("");
- }
-
- xkl_debug (100, "description: [%s][%s][%s][%s]\n",
- *sld, *lld, *svd, *lvd);
- sld++;
- lld++;
- svd++;
- lvd++;
-
- pl++;
-
- if (*pv != NULL)
- pv++;
- }
-
- return TRUE;
-}
-
-G_DEFINE_TYPE (GkbdConfigRegistry, gkbd_config_registry, G_TYPE_OBJECT)
-static void
-finalize (GObject * object)
-{
- GkbdConfigRegistry *registry;
-
- registry = GKBD_CONFIG_REGISTRY (object);
- if (registry->registry == NULL) {
- return;
- }
-
- g_object_unref (registry->registry);
- registry->registry = NULL;
-
- g_object_unref (registry->engine);
-
- G_OBJECT_CLASS (parent_class)->finalize (object);
-}
-
-static void
-gkbd_config_registry_class_init (GkbdConfigRegistryClass * klass)
-{
- GError *error = NULL;
- GObjectClass *object_class;
-
- /* Init the DBus connection, per-klass */
- klass->connection = dbus_g_bus_get (DBUS_BUS_SESSION, &error);
- if (klass->connection == NULL) {
- g_warning ("Unable to connect to dbus: %s",
- error->message);
- g_error_free (error);
- return;
- }
-
- dbus_g_object_type_install_info (GKBD_CONFIG_TYPE_REGISTRY,
- &dbus_glib_gkbd_config_registry_object_info);
-
- object_class = G_OBJECT_CLASS (klass);
-
- object_class->finalize = finalize;
-
- parent_class = g_type_class_peek_parent (klass);
-}
-
-static void
-gkbd_config_registry_init (GkbdConfigRegistry * registry)
-{
- GError *error = NULL;
- DBusGProxy *driver_proxy;
- GkbdConfigRegistryClass *klass =
- GKBD_CONFIG_REGISTRY_GET_CLASS (registry);
- unsigned request_ret;
-
- /* Register DBUS path */
- dbus_g_connection_register_g_object (klass->connection,
- "/org/gnome/GkbdConfigRegistry",
- G_OBJECT (registry));
-
- /* Register the service name, the constant here are defined in dbus-glib-bindings.h */
- driver_proxy = dbus_g_proxy_new_for_name (klass->connection,
- DBUS_SERVICE_DBUS,
- DBUS_PATH_DBUS,
- DBUS_INTERFACE_DBUS);
-
- if (driver_proxy != NULL) {
- if (!org_freedesktop_DBus_request_name
- (driver_proxy, "org.gnome.GkbdConfigRegistry", 0,
- &request_ret, &error)) {
- g_warning ("Unable to register service: %s",
- error->message);
- g_error_free (error);
- }
- g_object_unref (driver_proxy);
- } else
- g_critical ("Could not create DBUS proxy");
-
- /* Init libxklavier stuff */
- registry->engine = xkl_engine_get_instance (XOpenDisplay (NULL));
- /* Lazy initialization */
- registry->registry = NULL;
-}
diff --git a/libgnomekbd/gkbd-config-registry.h b/libgnomekbd/gkbd-config-registry.h
deleted file mode 100644
index d958090..0000000
--- a/libgnomekbd/gkbd-config-registry.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef __GKBD_CONFIG_REGISTRY_H__
-#define __GKBD_CONFIG_REGISTRY_H__
-
-#include <dbus/dbus-glib-bindings.h>
-#include <libxklavier/xklavier.h>
-
-typedef struct GkbdConfigRegistry GkbdConfigRegistry;
-typedef struct GkbdConfigRegistryClass GkbdConfigRegistryClass;
-
-struct GkbdConfigRegistry {
- GObject parent;
-
- XklEngine *engine;
- XklConfigRegistry *registry;
-};
-
-struct GkbdConfigRegistryClass {
- GObjectClass parent;
- DBusGConnection *connection;
-};
-
-#define GKBD_CONFIG_TYPE_REGISTRY (gkbd_config_registry_get_type ())
-#define GKBD_CONFIG_REGISTRY(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GKBD_CONFIG_TYPE_REGISTRY, GkbdConfigRegistry))
-#define GKBD_CONFIG_REGISTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GKBD_CONFIG_TYPE_REGISTRY, GkbdConfigRegistryClass))
-#define GKBD_IS_CONFIG_REGISTRY(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GKBD_CONFIG_TYPE_REGISTRY))
-#define GKBD_IS_CONFIG_REGISTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GKBD_CONFIG_TYPE_REGISTRY))
-#define GKBD_CONFIG_REGISTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GKBD_CONFIG_TYPE_REGISTRY, GkbdConfigRegistryClass))
-
-
-/**
- * DBUS server
- */
-
-extern GType gkbd_config_registry_get_type (void);
-
-extern gboolean
- gkbd_config_registry_get_descriptions_as_utf8
- (GkbdConfigRegistry * registry,
- gchar ** layout_ids,
- gchar ** variant_ids,
- gchar *** short_layout_descriptions,
- gchar *** long_layout_descriptions,
- gchar *** short_variant_descriptions,
- gchar *** long_variant_descriptions, GError ** error);
-
-#endif
diff --git a/libgnomekbd/gkbd-config-registry.xml b/libgnomekbd/gkbd-config-registry.xml
deleted file mode 100644
index 73b6404..0000000
--- a/libgnomekbd/gkbd-config-registry.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<node name="/org/gnome/GkbdConfigRegistry">
- <interface name="org.gnome.GkbdConfigRegistry">
- <annotation name="org.freedesktop.DBus.GLib.CSymbol" value="gkbd_config_registry"/>
- <method name="GetDescriptionsAsUtf8">
- <arg type="as" name="layoutIds" direction="in" />
- <arg type="as" name="variantIds" direction="in" />
- <arg type="as" name="shortLayoutDescriptions" direction="out" />
- <arg type="as" name="longLayoutDescriptions" direction="out" />
- <arg type="as" name="shortVariantDescriptions" direction="out" />
- <arg type="as" name="longVariantDescriptions" direction="out" />
- </method>
- <!-- Add more methods/signals if you want -->
- </interface>
-</node>
diff --git a/libgnomekbd/gkbd-desktop-config.c b/libgnomekbd/gkbd-desktop-config.c
deleted file mode 100644
index 936ad67..0000000
--- a/libgnomekbd/gkbd-desktop-config.c
+++ /dev/null
@@ -1,409 +0,0 @@
-/*
- * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#include <config.h>
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <X11/keysym.h>
-
-#include <glib/gi18n.h>
-#include <libgnome/gnome-program.h>
-
-#include <gkbd-desktop-config.h>
-#include <gkbd-config-private.h>
-
-#include <gkbd-config-registry-client.h>
-
-/**
- * GkbdDesktopConfig
- */
-#define GKBD_DESKTOP_CONFIG_KEY_PREFIX GKBD_CONFIG_KEY_PREFIX "/general"
-
-const gchar GKBD_DESKTOP_CONFIG_DIR[] = GKBD_DESKTOP_CONFIG_KEY_PREFIX;
-const gchar GKBD_DESKTOP_CONFIG_KEY_DEFAULT_GROUP[] =
- GKBD_DESKTOP_CONFIG_KEY_PREFIX "/defaultGroup";
-const gchar GKBD_DESKTOP_CONFIG_KEY_GROUP_PER_WINDOW[] =
- GKBD_DESKTOP_CONFIG_KEY_PREFIX "/groupPerWindow";
-const gchar GKBD_DESKTOP_CONFIG_KEY_HANDLE_INDICATORS[] =
- GKBD_DESKTOP_CONFIG_KEY_PREFIX "/handleIndicators";
-const gchar GKBD_DESKTOP_CONFIG_KEY_LAYOUT_NAMES_AS_GROUP_NAMES[]
- = GKBD_DESKTOP_CONFIG_KEY_PREFIX "/layoutNamesAsGroupNames";
-
-/**
- * static common functions
- */
-
-static gboolean
-gkbd_desktop_config_get_remote_lv_descriptions_utf8 (const gchar ** lids,
- const gchar ** vids,
- gchar *** sld,
- gchar *** lld,
- gchar *** svd,
- gchar *** lvd)
-{
- DBusGProxy *proxy;
- DBusGConnection *connection;
- GError *error = NULL;
-
- connection = dbus_g_bus_get (DBUS_BUS_SESSION, &error);
- if (connection == NULL) {
- g_warning ("Unable to connect to dbus: %s\n",
- error->message);
- g_error_free (error);
- /* Basically here, there is a problem, since there is no dbus :) */
- return False;
- }
-
-/* This won't trigger activation! */
- proxy = dbus_g_proxy_new_for_name (connection,
- "org.gnome.GkbdConfigRegistry",
- "/org/gnome/GkbdConfigRegistry",
- "org.gnome.GkbdConfigRegistry");
-
-/* The method call will trigger activation, more on that later */
- if (!org_gnome_GkbdConfigRegistry_get_descriptions_as_utf8
- (proxy, lids, vids, sld, lld, svd, lvd, &error)) {
- /* Method failed, the GError is set, let's warn everyone */
- g_warning ("Woops remote method failed: %s",
- error->message);
- g_error_free (error);
- return False;
- }
- return True;
-}
-
-void
-gkbd_desktop_config_add_listener (GConfClient * conf_client,
- const gchar * key,
- GConfClientNotifyFunc func,
- gpointer user_data, int *pid)
-{
- GError *gerror = NULL;
- xkl_debug (150, "Listening to [%s]\n", key);
- *pid = gconf_client_notify_add (conf_client,
- key, func, user_data, NULL,
- &gerror);
- if (0 == *pid) {
- g_warning ("Error listening for configuration: [%s]\n",
- gerror->message);
- g_error_free (gerror);
- }
-}
-
-void
-gkbd_desktop_config_remove_listener (GConfClient * conf_client, int *pid)
-{
- if (*pid != 0) {
- gconf_client_notify_remove (conf_client, *pid);
- *pid = 0;
- }
-}
-
-/**
- * extern GkbdDesktopConfig config functions
- */
-void
-gkbd_desktop_config_init (GkbdDesktopConfig * config,
- GConfClient * conf_client, XklEngine * engine)
-{
- GError *gerror = NULL;
-
- memset (config, 0, sizeof (*config));
- config->conf_client = conf_client;
- config->engine = engine;
- g_object_ref (config->conf_client);
-
- gconf_client_add_dir (config->conf_client,
- GKBD_DESKTOP_CONFIG_DIR,
- GCONF_CLIENT_PRELOAD_NONE, &gerror);
- if (gerror != NULL) {
- g_warning ("err: %s\n", gerror->message);
- g_error_free (gerror);
- gerror = NULL;
- }
-}
-
-void
-gkbd_desktop_config_term (GkbdDesktopConfig * config)
-{
- g_object_unref (config->conf_client);
- config->conf_client = NULL;
-}
-
-void
-gkbd_desktop_config_load_from_gconf (GkbdDesktopConfig * config)
-{
- GError *gerror = NULL;
-
- config->group_per_app =
- gconf_client_get_bool (config->conf_client,
- GKBD_DESKTOP_CONFIG_KEY_GROUP_PER_WINDOW,
- &gerror);
- if (gerror != NULL) {
- g_warning ("Error reading configuration:%s\n",
- gerror->message);
- config->group_per_app = FALSE;
- g_error_free (gerror);
- gerror = NULL;
- }
- xkl_debug (150, "group_per_app: %d\n", config->group_per_app);
-
- config->handle_indicators =
- gconf_client_get_bool (config->conf_client,
- GKBD_DESKTOP_CONFIG_KEY_HANDLE_INDICATORS,
- &gerror);
- if (gerror != NULL) {
- g_warning ("Error reading configuration:%s\n",
- gerror->message);
- config->handle_indicators = FALSE;
- g_error_free (gerror);
- gerror = NULL;
- }
- xkl_debug (150, "handle_indicators: %d\n",
- config->handle_indicators);
-
- config->layout_names_as_group_names =
- gconf_client_get_bool (config->conf_client,
- GKBD_DESKTOP_CONFIG_KEY_LAYOUT_NAMES_AS_GROUP_NAMES,
- &gerror);
- if (gerror != NULL) {
- g_warning ("Error reading configuration:%s\n",
- gerror->message);
- config->layout_names_as_group_names = TRUE;
- g_error_free (gerror);
- gerror = NULL;
- }
- xkl_debug (150, "layout_names_as_group_names: %d\n",
- config->layout_names_as_group_names);
-
- config->default_group =
- gconf_client_get_int (config->conf_client,
- GKBD_DESKTOP_CONFIG_KEY_DEFAULT_GROUP,
- &gerror);
- if (gerror != NULL) {
- g_warning ("Error reading configuration:%s\n",
- gerror->message);
- config->default_group = -1;
- g_error_free (gerror);
- gerror = NULL;
- }
-
- if (config->default_group < -1
- || config->default_group >=
- xkl_engine_get_max_num_groups (config->engine))
- config->default_group = -1;
- xkl_debug (150, "default_group: %d\n", config->default_group);
-}
-
-void
-gkbd_desktop_config_save_to_gconf (GkbdDesktopConfig * config)
-{
- GConfChangeSet *cs;
- GError *gerror = NULL;
-
- cs = gconf_change_set_new ();
-
- gconf_change_set_set_bool (cs,
- GKBD_DESKTOP_CONFIG_KEY_GROUP_PER_WINDOW,
- config->group_per_app);
- gconf_change_set_set_bool (cs,
- GKBD_DESKTOP_CONFIG_KEY_HANDLE_INDICATORS,
- config->handle_indicators);
- gconf_change_set_set_bool (cs,
- GKBD_DESKTOP_CONFIG_KEY_LAYOUT_NAMES_AS_GROUP_NAMES,
- config->layout_names_as_group_names);
- gconf_change_set_set_int (cs,
- GKBD_DESKTOP_CONFIG_KEY_DEFAULT_GROUP,
- config->default_group);
-
- gconf_client_commit_change_set (config->conf_client, cs, TRUE,
- &gerror);
- if (gerror != NULL) {
- g_warning ("Error saving active configuration: %s\n",
- gerror->message);
- g_error_free (gerror);
- gerror = NULL;
- }
- gconf_change_set_unref (cs);
-}
-
-gboolean
-gkbd_desktop_config_activate (GkbdDesktopConfig * config)
-{
- gboolean rv = TRUE;
-
- xkl_engine_set_group_per_toplevel_window (config->engine,
- config->group_per_app);
- xkl_engine_set_indicators_handling (config->engine,
- config->handle_indicators);
- xkl_engine_set_default_group (config->engine,
- config->default_group);
-
- return rv;
-}
-
-void
-gkbd_desktop_config_lock_next_group (GkbdDesktopConfig * config)
-{
- int group = xkl_engine_get_next_group (config->engine);
- xkl_engine_lock_group (config->engine, group);
-}
-
-void
-gkbd_desktop_config_lock_prev_group (GkbdDesktopConfig * config)
-{
- int group = xkl_engine_get_prev_group (config->engine);
- xkl_engine_lock_group (config->engine, group);
-}
-
-void
-gkbd_desktop_config_restore_group (GkbdDesktopConfig * config)
-{
- int group = xkl_engine_get_current_window_group (config->engine);
- xkl_engine_lock_group (config->engine, group);
-}
-
-void
-gkbd_desktop_config_start_listen (GkbdDesktopConfig * config,
- GConfClientNotifyFunc func,
- gpointer user_data)
-{
- gkbd_desktop_config_add_listener (config->conf_client,
- GKBD_DESKTOP_CONFIG_DIR, func,
- user_data,
- &config->config_listener_id);
-}
-
-void
-gkbd_desktop_config_stop_listen (GkbdDesktopConfig * config)
-{
- gkbd_desktop_config_remove_listener (config->conf_client,
- &config->config_listener_id);
-}
-
-gboolean
-gkbd_desktop_config_load_remote_group_descriptions_utf8 (GkbdDesktopConfig
- * config,
- const gchar **
- layout_ids,
- const gchar **
- variant_ids,
- gchar ***
- short_group_names,
- gchar ***
- full_group_names)
-{
- gchar **sld, **lld, **svd, **lvd;
- gchar **psld, **plld, **plvd;
- gchar **psgn, **pfgn;
- gint total_descriptions;
-
- if (!gkbd_desktop_config_get_remote_lv_descriptions_utf8
- (layout_ids, variant_ids, &sld, &lld, &svd, &lvd)) {
- return False;
- }
-
- total_descriptions = g_strv_length (sld);
-
- *short_group_names = psgn =
- g_new0 (gchar *, total_descriptions + 1);
- *full_group_names = pfgn =
- g_new0 (gchar *, total_descriptions + 1);
-
- plld = lld;
- psld = sld;
- plvd = lvd;
- while (plld != NULL && *plld != NULL) {
- *psgn++ = g_strdup (*psld++);
- *pfgn++ = g_strdup (gkbd_keyboard_config_format_full_layout
- (*plld++, *plvd++));
- }
- g_strfreev (sld);
- g_strfreev (lld);
- g_strfreev (svd);
- g_strfreev (lvd);
-
- return True;
-}
-
-gchar **
-gkbd_desktop_config_load_group_descriptions_utf8 (GkbdDesktopConfig *
- config,
- XklConfigRegistry *
- config_registry)
-{
- int i;
- const gchar **native_names =
- xkl_engine_get_groups_names (config->engine);
- guint total_groups = xkl_engine_get_num_groups (config->engine);
- guint total_layouts;
- gchar **rv = g_new0 (char *, total_groups + 1);
- gchar **current_descr = rv;
-
- if ((xkl_engine_get_features (config->engine) &
- XKLF_MULTIPLE_LAYOUTS_SUPPORTED)
- && config->layout_names_as_group_names) {
- XklConfigRec *xkl_config = xkl_config_rec_new ();
- if (xkl_config_rec_get_from_server
- (xkl_config, config->engine)) {
- char **pl = xkl_config->layouts;
- char **pv = xkl_config->variants;
- i = total_groups;
- while (pl != NULL && *pl != NULL && i >= 0) {
- char *ls_descr;
- char *l_descr;
- char *vs_descr;
- char *v_descr;
- if (gkbd_keyboard_config_get_lv_descriptions (config_registry, *pl++, *pv++, &ls_descr, &l_descr, &vs_descr, &v_descr)) {
- char *name_utf =
- g_locale_to_utf8
- (gkbd_keyboard_config_format_full_layout
- (l_descr, v_descr), -1, NULL,
- NULL, NULL);
- *current_descr++ = name_utf;
- } else {
- *current_descr++ = g_strdup ("");
- }
- }
- }
- g_object_unref (G_OBJECT (xkl_config));
- /* Worst case - multiple layous - but SOME of them are multigrouped :(((
- * We cannot do much - just add empty descriptions.
- * The UI is going to be messy.
- * Canadian layouts are famous for this sh.t. */
- total_layouts = g_strv_length (rv);
- if (total_layouts != total_groups) {
- xkl_debug (0,
- "The mismatch between "
- "the number of groups: %d and number of layouts: %d\n",
- total_groups, total_layouts);
- current_descr = rv + total_layouts;
- for (i = total_groups - total_layouts; --i >= 0;)
- *current_descr++ = g_strdup ("");
- }
- }
- total_layouts = g_strv_length (rv);
- if (!total_layouts)
- for (i = total_groups; --i >= 0;)
- *current_descr++ = g_strdup (*native_names++);
-
- return rv;
-}
diff --git a/libgnomekbd/gkbd-desktop-config.h b/libgnomekbd/gkbd-desktop-config.h
deleted file mode 100644
index 11eb91d..0000000
--- a/libgnomekbd/gkbd-desktop-config.h
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef __GKBD_DESKTOP_CONFIG_H__
-#define __GKBD_DESKTOP_CONFIG_H__
-
-#include <X11/Xlib.h>
-
-#include <glib.h>
-#include <glib/gslist.h>
-
-#include <gconf/gconf-client.h>
-
-#include <libxklavier/xklavier.h>
-
-extern const gchar GKBD_DESKTOP_CONFIG_DIR[];
-extern const gchar GKBD_DESKTOP_CONFIG_KEY_DEFAULT_GROUP[];
-extern const gchar GKBD_DESKTOP_CONFIG_KEY_GROUP_PER_WINDOW[];
-extern const gchar GKBD_DESKTOP_CONFIG_KEY_HANDLE_INDICATORS[];
-extern const gchar GKBD_DESKTOP_CONFIG_KEY_LAYOUT_NAMES_AS_GROUP_NAMES[];
-
-/*
- * General configuration
- */
-typedef struct _GkbdDesktopConfig {
- gint default_group;
- gboolean group_per_app;
- gboolean handle_indicators;
- gboolean layout_names_as_group_names;
-
- /* private, transient */
- GConfClient *conf_client;
- int config_listener_id;
- XklEngine *engine;
-} GkbdDesktopConfig;
-
-/**
- * GkbdDesktopConfig functions
- */
-extern void gkbd_desktop_config_init (GkbdDesktopConfig * config,
- GConfClient * conf_client,
- XklEngine * engine);
-extern void gkbd_desktop_config_term (GkbdDesktopConfig * config);
-
-extern void gkbd_desktop_config_load_from_gconf (GkbdDesktopConfig *
- config);
-
-extern void gkbd_desktop_config_save_to_gconf (GkbdDesktopConfig * config);
-
-extern gboolean gkbd_desktop_config_activate (GkbdDesktopConfig * config);
-
-/* Affected by XKB and XKB/GConf configuration */
-extern gchar
- **
-gkbd_desktop_config_load_group_descriptions_utf8 (GkbdDesktopConfig *
- config,
- XklConfigRegistry *
- config_registry);
-
-
-/* Using DBUS */
-extern gboolean
-gkbd_desktop_config_load_remote_group_descriptions_utf8 (GkbdDesktopConfig
- * config,
- const gchar **
- layout_ids,
- const gchar **
- variant_ids,
- gchar ***
- short_group_names,
- gchar ***
- full_group_names);
-
-extern void gkbd_desktop_config_lock_next_group (GkbdDesktopConfig *
- config);
-
-extern void gkbd_desktop_config_lock_prev_group (GkbdDesktopConfig *
- config);
-
-extern void gkbd_desktop_config_restore_group (GkbdDesktopConfig * config);
-
-extern void gkbd_desktop_config_start_listen (GkbdDesktopConfig * config,
- GConfClientNotifyFunc func,
- gpointer user_data);
-
-extern void gkbd_desktop_config_stop_listen (GkbdDesktopConfig * config);
-
-#endif
diff --git a/libgnomekbd/gkbd-indicator-config.c b/libgnomekbd/gkbd-indicator-config.c
deleted file mode 100644
index f353f01..0000000
--- a/libgnomekbd/gkbd-indicator-config.c
+++ /dev/null
@@ -1,365 +0,0 @@
-/*
- * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#include <config.h>
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <X11/keysym.h>
-
-#include <glib/gi18n.h>
-#include <gdk/gdkx.h>
-#include <libgnome/gnome-program.h>
-
-#include <gkbd-keyboard-config.h>
-#include <gkbd-indicator-config.h>
-
-#include <gkbd-config-private.h>
-
-#include <gkbd-config-registry-client.h>
-
-/**
- * GkbdIndicatorConfig
- */
-#define GKBD_INDICATOR_CONFIG_KEY_PREFIX GKBD_CONFIG_KEY_PREFIX "/indicator"
-
-const gchar GKBD_INDICATOR_CONFIG_DIR[] = GKBD_INDICATOR_CONFIG_KEY_PREFIX;
-const gchar GKBD_INDICATOR_CONFIG_KEY_SHOW_FLAGS[] =
- GKBD_INDICATOR_CONFIG_KEY_PREFIX "/showFlags";
-const gchar GKBD_INDICATOR_CONFIG_KEY_ENABLED_PLUGINS[] =
- GKBD_INDICATOR_CONFIG_KEY_PREFIX "/enabledPlugins";
-const gchar GKBD_INDICATOR_CONFIG_KEY_SECONDARIES[] =
- GKBD_INDICATOR_CONFIG_KEY_PREFIX "/secondary";
-
-/**
- * static applet config functions
- */
-static void
-gkbd_indicator_config_free_enabled_plugins (GkbdIndicatorConfig *
- ind_config)
-{
- GSList *plugin_node = ind_config->enabled_plugins;
- if (plugin_node != NULL) {
- do {
- if (plugin_node->data != NULL) {
- g_free (plugin_node->data);
- plugin_node->data = NULL;
- }
- plugin_node = g_slist_next (plugin_node);
- } while (plugin_node != NULL);
- g_slist_free (ind_config->enabled_plugins);
- ind_config->enabled_plugins = NULL;
- }
-}
-
-/**
- * extern applet kbdConfig functions
- */
-void
-gkbd_indicator_config_free_images (GkbdIndicatorConfig * ind_config)
-{
- GdkPixbuf *pi;
- GSList *img_node;
- while ((img_node = ind_config->images) != NULL) {
- pi = GDK_PIXBUF (img_node->data);
- /* It can be NULL - some images may be missing */
- if (pi != NULL) {
- gdk_pixbuf_unref (pi);
- }
- ind_config->images =
- g_slist_remove_link (ind_config->images, img_node);
- g_slist_free_1 (img_node);
- }
-}
-
-char *
-gkbd_indicator_config_get_images_file (GkbdIndicatorConfig *
- ind_config,
- GkbdKeyboardConfig *
- kbd_config, int group)
-{
- char *image_file = NULL;
- GtkIconInfo *icon_info = NULL;
-
- if (!ind_config->show_flags)
- return NULL;
-
- if ((kbd_config->layouts_variants != NULL) &&
- (g_slist_length (kbd_config->layouts_variants) > group)) {
- char *full_layout_name =
- (char *) g_slist_nth_data (kbd_config->
- layouts_variants, group);
-
- if (full_layout_name != NULL) {
- char *l, *v;
- gkbd_keyboard_config_split_items (full_layout_name,
- &l, &v);
- if (l != NULL) {
- // probably there is something in theme?
- icon_info = gtk_icon_theme_lookup_icon
- (ind_config->icon_theme, l, 48, 0);
- }
- }
- }
- // fallback to the default value
- if (icon_info == NULL) {
- icon_info = gtk_icon_theme_lookup_icon
- (ind_config->icon_theme, "stock_dialog-error", 48, 0);
- }
- if (icon_info != NULL) {
- image_file =
- g_strdup (gtk_icon_info_get_filename (icon_info));
- gtk_icon_info_free (icon_info);
- }
-
- return image_file;
-}
-
-void
-gkbd_indicator_config_load_images (GkbdIndicatorConfig * ind_config,
- GkbdKeyboardConfig * kbd_config)
-{
- int i;
- ind_config->images = NULL;
-
- if (!ind_config->show_flags)
- return;
-
- for (i = xkl_engine_get_max_num_groups (ind_config->engine);
- --i >= 0;) {
- GdkPixbuf *image = NULL;
- char *image_file =
- gkbd_indicator_config_get_images_file (ind_config,
- kbd_config,
- i);
-
- if (image_file != NULL) {
- GError *gerror = NULL;
- image =
- gdk_pixbuf_new_from_file (image_file, &gerror);
- if (image == NULL) {
- GtkWidget *dialog =
- gtk_message_dialog_new (NULL,
- GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_MESSAGE_ERROR,
- GTK_BUTTONS_OK,
- _
- ("There was an error loading an image: %s"),
- gerror->
- message);
- g_signal_connect (G_OBJECT (dialog),
- "response",
- G_CALLBACK
- (gtk_widget_destroy),
- NULL);
-
- gtk_window_set_resizable (GTK_WINDOW
- (dialog), FALSE);
-
- gtk_widget_show (dialog);
- g_error_free (gerror);
- }
- xkl_debug (150,
- "Image %d[%s] loaded -> %p[%dx%d]\n",
- i, image_file, image,
- gdk_pixbuf_get_width (image),
- gdk_pixbuf_get_height (image));
- g_free (image_file);
- }
- /* We append the image anyway - even if it is NULL! */
- ind_config->images =
- g_slist_prepend (ind_config->images, image);
- }
-}
-
-void
-gkbd_indicator_config_init (GkbdIndicatorConfig * ind_config,
- GConfClient * conf_client, XklEngine * engine)
-{
- GError *gerror = NULL;
- gchar *sp, *datadir;
-
- memset (ind_config, 0, sizeof (*ind_config));
- ind_config->conf_client = conf_client;
- ind_config->engine = engine;
- g_object_ref (ind_config->conf_client);
-
- gconf_client_add_dir (ind_config->conf_client,
- GKBD_INDICATOR_CONFIG_DIR,
- GCONF_CLIENT_PRELOAD_NONE, &gerror);
- if (gerror != NULL) {
- g_warning ("err1:%s\n", gerror->message);
- g_error_free (gerror);
- gerror = NULL;
- }
-
- ind_config->icon_theme = gtk_icon_theme_get_default ();
-
- datadir =
- gnome_program_locate_file (NULL, GNOME_FILE_DOMAIN_APP_DATADIR,
- "", FALSE, NULL);
- gtk_icon_theme_append_search_path (ind_config->icon_theme, sp =
- g_build_filename (g_get_home_dir
- (),
- ".icons/flags",
- NULL));
- g_free (sp);
-
- gtk_icon_theme_append_search_path (ind_config->icon_theme,
- sp =
- g_build_filename (datadir,
- "pixmaps/flags",
- NULL));
- g_free (sp);
-
- gtk_icon_theme_append_search_path (ind_config->icon_theme,
- sp =
- g_build_filename (datadir,
- "icons/flags",
- NULL));
- g_free (sp);
- g_free (datadir);
-}
-
-void
-gkbd_indicator_config_term (GkbdIndicatorConfig * ind_config)
-{
-#if 0
- g_object_unref (G_OBJECT (ind_config->icon_theme));
-#endif
- ind_config->icon_theme = NULL;
-
- gkbd_indicator_config_free_images (ind_config);
-
- gkbd_indicator_config_free_enabled_plugins (ind_config);
- g_object_unref (ind_config->conf_client);
- ind_config->conf_client = NULL;
-}
-
-void
-gkbd_indicator_config_update_images (GkbdIndicatorConfig *
- ind_config,
- GkbdKeyboardConfig * kbd_config)
-{
- gkbd_indicator_config_free_images (ind_config);
- gkbd_indicator_config_load_images (ind_config, kbd_config);
-}
-
-void
-gkbd_indicator_config_load_from_gconf (GkbdIndicatorConfig * ind_config)
-{
- GError *gerror = NULL;
-
- ind_config->secondary_groups_mask =
- gconf_client_get_int (ind_config->conf_client,
- GKBD_INDICATOR_CONFIG_KEY_SECONDARIES,
- &gerror);
- if (gerror != NULL) {
- g_warning ("Error reading configuration:%s\n",
- gerror->message);
- ind_config->secondary_groups_mask = 0;
- g_error_free (gerror);
- gerror = NULL;
- }
-
- ind_config->show_flags =
- gconf_client_get_bool (ind_config->conf_client,
- GKBD_INDICATOR_CONFIG_KEY_SHOW_FLAGS,
- &gerror);
- if (gerror != NULL) {
- g_warning ("Error reading kbdConfiguration:%s\n",
- gerror->message);
- ind_config->show_flags = FALSE;
- g_error_free (gerror);
- gerror = NULL;
- }
-
- gkbd_indicator_config_free_enabled_plugins (ind_config);
- ind_config->enabled_plugins =
- gconf_client_get_list (ind_config->conf_client,
- GKBD_INDICATOR_CONFIG_KEY_ENABLED_PLUGINS,
- GCONF_VALUE_STRING, &gerror);
-
- if (gerror != NULL) {
- g_warning ("Error reading kbd_configuration:%s\n",
- gerror->message);
- ind_config->enabled_plugins = NULL;
- g_error_free (gerror);
- gerror = NULL;
- }
-}
-
-void
-gkbd_indicator_config_save_to_gconf (GkbdIndicatorConfig * ind_config)
-{
- GConfChangeSet *cs;
- GError *gerror = NULL;
-
- cs = gconf_change_set_new ();
-
- gconf_change_set_set_int (cs,
- GKBD_INDICATOR_CONFIG_KEY_SECONDARIES,
- ind_config->secondary_groups_mask);
- gconf_change_set_set_bool (cs,
- GKBD_INDICATOR_CONFIG_KEY_SHOW_FLAGS,
- ind_config->show_flags);
- gconf_change_set_set_list (cs,
- GKBD_INDICATOR_CONFIG_KEY_ENABLED_PLUGINS,
- GCONF_VALUE_STRING,
- ind_config->enabled_plugins);
-
- gconf_client_commit_change_set (ind_config->conf_client, cs,
- TRUE, &gerror);
- if (gerror != NULL) {
- g_warning ("Error saving configuration: %s\n",
- gerror->message);
- g_error_free (gerror);
- gerror = NULL;
- }
- gconf_change_set_unref (cs);
-}
-
-void
-gkbd_indicator_config_activate (GkbdIndicatorConfig * ind_config)
-{
- xkl_engine_set_secondary_groups_mask (ind_config->engine,
- ind_config->
- secondary_groups_mask);
-}
-
-void
-gkbd_indicator_config_start_listen (GkbdIndicatorConfig *
- ind_config,
- GConfClientNotifyFunc func,
- gpointer user_data)
-{
- gkbd_desktop_config_add_listener (ind_config->conf_client,
- GKBD_INDICATOR_CONFIG_DIR, func,
- user_data,
- &ind_config->config_listener_id);
-}
-
-void
-gkbd_indicator_config_stop_listen (GkbdIndicatorConfig * ind_config)
-{
- gkbd_desktop_config_remove_listener (ind_config->conf_client,
- &ind_config->
- config_listener_id);
-}
diff --git a/libgnomekbd/gkbd-indicator-config.h b/libgnomekbd/gkbd-indicator-config.h
deleted file mode 100644
index 556b911..0000000
--- a/libgnomekbd/gkbd-indicator-config.h
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef __GKBD_INDICATOR_CONFIG_H__
-#define __GKBD_INDICATOR_CONFIG_H__
-
-#include <gtk/gtk.h>
-
-#include "libgnomekbd/gkbd-keyboard-config.h"
-
-/*
- * Indicator configuration
- */
-typedef struct _GkbdIndicatorConfig {
- int secondary_groups_mask;
- gboolean show_flags;
-
- GSList *enabled_plugins;
-
- /* private, transient */
- GConfClient *conf_client;
- GSList *images;
- GtkIconTheme *icon_theme;
- int config_listener_id;
- XklEngine *engine;
-} GkbdIndicatorConfig;
-
-/**
- * GkbdIndicatorConfig functions -
- * some of them require GkbdKeyboardConfig as well -
- * for loading approptiate images
- */
-extern void gkbd_indicator_config_init (GkbdIndicatorConfig *
- applet_config,
- GConfClient * conf_client,
- XklEngine * engine);
-extern void gkbd_indicator_config_term (GkbdIndicatorConfig *
- applet_config);
-
-extern void gkbd_indicator_config_load_from_gconf (GkbdIndicatorConfig
- * applet_config);
-extern void gkbd_indicator_config_save_to_gconf (GkbdIndicatorConfig *
- applet_config);
-
-extern gchar
- * gkbd_indicator_config_get_images_file (GkbdIndicatorConfig *
- applet_config,
- GkbdKeyboardConfig *
- kbd_config, int group);
-
-extern void gkbd_indicator_config_load_images (GkbdIndicatorConfig *
- applet_config,
- GkbdKeyboardConfig *
- kbd_config);
-extern void gkbd_indicator_config_free_images (GkbdIndicatorConfig *
- applet_config);
-
-/* Should be updated on Indicator/GConf and Kbd/GConf configuration change */
-extern void gkbd_indicator_config_update_images (GkbdIndicatorConfig *
- applet_config,
- GkbdKeyboardConfig *
- kbd_config);
-
-/* Should be updated on Indicator/GConf configuration change */
-extern void gkbd_indicator_config_activate (GkbdIndicatorConfig *
- applet_config);
-
-extern void gkbd_indicator_config_start_listen (GkbdIndicatorConfig *
- applet_config,
- GConfClientNotifyFunc
- func, gpointer user_data);
-
-extern void gkbd_indicator_config_stop_listen (GkbdIndicatorConfig *
- applet_config);
-
-#endif
diff --git a/libgnomekbd/gkbd-indicator-marshal.list b/libgnomekbd/gkbd-indicator-marshal.list
deleted file mode 100644
index 5b76282..0000000
--- a/libgnomekbd/gkbd-indicator-marshal.list
+++ /dev/null
@@ -1 +0,0 @@
-VOID:VOID
diff --git a/libgnomekbd/gkbd-indicator-plugin-manager.c b/libgnomekbd/gkbd-indicator-plugin-manager.c
deleted file mode 100644
index b6c2082..0000000
--- a/libgnomekbd/gkbd-indicator-plugin-manager.c
+++ /dev/null
@@ -1,407 +0,0 @@
-/*
- * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#include <config.h>
-
-#include <string.h>
-
-#include <libxklavier/xklavier.h>
-
-#include <gkbd-indicator-plugin-manager.h>
-
-#define FOREACH_INITED_PLUGIN() \
-{ \
- GSList *prec; \
- for( prec = manager->inited_plugin_recs; prec != NULL; prec = prec->next ) \
- { \
- const GkbdIndicatorPlugin *plugin = \
- ( ( GkbdIndicatorPluginManagerRecord * ) ( prec->data ) )->plugin; \
- if( plugin != NULL ) \
- {
-
-#define NEXT_INITED_PLUGIN() \
- } \
- } \
-}
-
-static void
-gkbd_indicator_plugin_manager_add_plugins_dir (GkbdIndicatorPluginManager *
- manager,
- const char *dirname)
-{
- GDir *dir = g_dir_open (dirname, 0, NULL);
- const gchar *filename;
- if (dir == NULL)
- return;
-
- xkl_debug (100, "Scanning [%s]...\n", dirname);
- while ((filename = g_dir_read_name (dir)) != NULL) {
- gchar *full_path =
- g_build_filename (dirname, filename, NULL);
- xkl_debug (100, "Loading plugin module [%s]...\n",
- full_path);
- if (full_path != NULL) {
- GModule *module = g_module_open (full_path, 0);
- if (module != NULL) {
- gpointer get_plugin_func;
- if (g_module_symbol
- (module, "GetPlugin",
- &get_plugin_func)) {
- const GkbdIndicatorPlugin *plugin =
- ((GkbdIndicatorPluginGetPluginFunc)
- get_plugin_func) ();
- if (plugin != NULL) {
- GkbdIndicatorPluginManagerRecord
- * rec =
- g_new0
- (GkbdIndicatorPluginManagerRecord,
- 1);
- xkl_debug (100,
- "Loaded plugin from [%s]: [%s]/[%s]...\n",
- full_path,
- plugin->name,
- plugin->
- description);
- rec->full_path = full_path;
- rec->module = module;
- rec->plugin = plugin;
- g_hash_table_insert
- (manager->
- all_plugin_recs,
- full_path, rec);
- continue;
- }
- } else
- xkl_debug (0,
- "Bad plugin: [%s]\n",
- full_path);
- g_module_close (module);
- } else
- xkl_debug (0, "Bad module: [%s], %s\n",
- full_path, g_module_error ());
- g_free (full_path);
- }
- }
- g_dir_close (dir);
-}
-
-static void
-gkbd_indicator_plugin_manager_load_all (GkbdIndicatorPluginManager *
- manager)
-{
- if (!g_module_supported ()) {
- xkl_debug (0, "Modules are not supported - no plugins!\n");
- return;
- }
- gkbd_indicator_plugin_manager_add_plugins_dir (manager,
- SYS_PLUGIN_DIR);
-}
-
-static void
-gkbd_indicator_plugin_manager_rec_term (GkbdIndicatorPluginManagerRecord *
- rec, void *user_data)
-{
- const GkbdIndicatorPlugin *plugin = rec->plugin;
- if (plugin != NULL) {
- xkl_debug (100, "Terminating plugin: [%s]...\n",
- plugin->name);
- if (plugin->term_callback)
- (*plugin->term_callback) ();
- }
-}
-
-static void
-gkbd_indicator_plugin_manager_rec_destroy (GkbdIndicatorPluginManagerRecord
- * rec)
-{
- xkl_debug (100, "Unloading plugin: [%s]...\n", rec->plugin->name);
-
- g_module_close (rec->module);
- g_free (rec);
-}
-
-void
-gkbd_indicator_plugin_manager_init (GkbdIndicatorPluginManager * manager)
-{
- manager->all_plugin_recs =
- g_hash_table_new_full (g_str_hash, g_str_equal,
- (GDestroyNotify) g_free,
- (GDestroyNotify)
- gkbd_indicator_plugin_manager_rec_destroy);
- gkbd_indicator_plugin_manager_load_all (manager);
-}
-
-void
-gkbd_indicator_plugin_manager_term (GkbdIndicatorPluginManager * manager)
-{
- gkbd_indicator_plugin_manager_term_initialized_plugins (manager);
- if (manager->all_plugin_recs != NULL) {
- g_hash_table_destroy (manager->all_plugin_recs);
- manager->all_plugin_recs = NULL;
- }
-}
-
-void
- gkbd_indicator_plugin_manager_init_enabled_plugins
- (GkbdIndicatorPluginManager * manager,
- GkbdIndicatorPluginContainer * pc, GSList * enabled_plugins) {
- GSList *plugin_name_node = enabled_plugins;
- if (manager->all_plugin_recs == NULL)
- return;
- xkl_debug (100, "Initializing all enabled plugins...\n");
- while (plugin_name_node != NULL) {
- const char *full_path = plugin_name_node->data;
- if (full_path != NULL) {
- GkbdIndicatorPluginManagerRecord *rec =
- (GkbdIndicatorPluginManagerRecord *)
- g_hash_table_lookup (manager->all_plugin_recs,
- full_path);
-
- if (rec != NULL) {
- const GkbdIndicatorPlugin *plugin =
- rec->plugin;
- gboolean initialized = FALSE;
- xkl_debug (100,
- "Initializing plugin: [%s] from [%s]...\n",
- plugin->name, full_path);
- if (plugin->init_callback != NULL)
- initialized =
- (*plugin->init_callback) (pc);
- else
- initialized = TRUE;
-
- manager->inited_plugin_recs =
- g_slist_append (manager->
- inited_plugin_recs,
- rec);
- xkl_debug (100,
- "Plugin [%s] initialized: %d\n",
- plugin->name, initialized);
- }
- }
- plugin_name_node = g_slist_next (plugin_name_node);
- }
-}
-
-void
- gkbd_indicator_plugin_manager_term_initialized_plugins
- (GkbdIndicatorPluginManager * manager) {
-
- if (manager->inited_plugin_recs == NULL)
- return;
- g_slist_foreach (manager->inited_plugin_recs,
- (GFunc) gkbd_indicator_plugin_manager_rec_term,
- NULL);
- g_slist_free (manager->inited_plugin_recs);
- manager->inited_plugin_recs = NULL;
-}
-
-void
-gkbd_indicator_plugin_manager_toggle_plugins (GkbdIndicatorPluginManager *
- manager,
- GkbdIndicatorPluginContainer
- * pc,
- GSList * enabled_plugins)
-{
- gkbd_indicator_plugin_manager_term_initialized_plugins (manager);
- gkbd_indicator_plugin_manager_init_enabled_plugins (manager, pc,
- enabled_plugins);
-}
-
-void
-gkbd_indicator_plugin_manager_group_changed (GkbdIndicatorPluginManager *
- manager, GtkWidget * notebook,
- int new_group)
-{
- FOREACH_INITED_PLUGIN ();
- if (plugin->group_changed_callback)
- (*plugin->group_changed_callback) (notebook, new_group);
- NEXT_INITED_PLUGIN ();
-}
-
-void
-gkbd_indicator_plugin_manager_config_changed (GkbdIndicatorPluginManager *
- manager,
- GkbdKeyboardConfig * from,
- GkbdKeyboardConfig * to)
-{
- FOREACH_INITED_PLUGIN ();
- if (plugin->config_changed_callback)
- (*plugin->config_changed_callback) (from, to);
- NEXT_INITED_PLUGIN ();
-}
-
-const GkbdIndicatorPlugin *
-gkbd_indicator_plugin_manager_get_plugin (GkbdIndicatorPluginManager *
- manager, const char *full_path)
-{
- GkbdIndicatorPluginManagerRecord *rec =
- (GkbdIndicatorPluginManagerRecord *)
- g_hash_table_lookup (manager->all_plugin_recs,
- full_path);
- if (rec == NULL)
- return NULL;
- return rec->plugin;
-}
-
-void
-gkbd_indicator_plugin_manager_promote_plugin (GkbdIndicatorPluginManager *
- manager,
- GSList * enabled_plugins,
- const char *full_path)
-{
- GSList *the_node = enabled_plugins;
- GSList *prev_node = NULL;
-
- while (the_node != NULL) {
- if (!strcmp (the_node->data, full_path)) {
- if (prev_node != NULL) {
- char *tmp = (char *) prev_node->data;
- prev_node->data = the_node->data;
- the_node->data = tmp;
- }
- break;
- }
- prev_node = the_node;
- the_node = g_slist_next (the_node);
- }
-}
-
-void
-gkbd_indicator_plugin_manager_demote_plugin (GkbdIndicatorPluginManager *
- manager,
- GSList * enabled_plugins,
- const char *full_path)
-{
- GSList *the_node = g_slist_find_custom (enabled_plugins, full_path,
- (GCompareFunc) strcmp);
- if (the_node != NULL) {
- GSList *next_node = g_slist_next (the_node);
- if (next_node != NULL) {
- char *tmp = (char *) next_node->data;
- next_node->data = the_node->data;
- the_node->data = tmp;
- }
- }
-}
-
-void
-gkbd_indicator_plugin_manager_enable_plugin (GkbdIndicatorPluginManager *
- manager,
- GSList ** enabled_plugins,
- const char *full_path)
-{
- if (NULL !=
- gkbd_indicator_plugin_manager_get_plugin (manager,
- full_path)) {
- *enabled_plugins =
- g_slist_append (*enabled_plugins,
- (gpointer) g_strdup (full_path));
- }
-}
-
-void
-gkbd_indicator_plugin_manager_disable_plugin (GkbdIndicatorPluginManager *
- manager,
- GSList ** enabled_plugins,
- const char *full_path)
-{
- GSList *the_node =
- g_slist_find_custom (*enabled_plugins, full_path,
- (GCompareFunc) strcmp);
- if (the_node != NULL) {
- g_free (the_node->data);
- *enabled_plugins =
- g_slist_delete_link (*enabled_plugins, the_node);
- }
-}
-
-int
-gkbd_indicator_plugin_manager_window_created (GkbdIndicatorPluginManager *
- manager, Window win,
- Window parent)
-{
- FOREACH_INITED_PLUGIN ();
- if (plugin->window_created_callback) {
- int group_to_assign =
- (*plugin->window_created_callback) (win, parent);
- if (group_to_assign != -1) {
- xkl_debug (100,
- "Plugin [%s] assigned group %d to new window %ld\n",
- plugin->name, group_to_assign, win);
- return group_to_assign;
- }
- }
- NEXT_INITED_PLUGIN ();
- return -1;
-}
-
-GtkWidget *
-gkbd_indicator_plugin_manager_decorate_widget (GkbdIndicatorPluginManager *
- manager, GtkWidget * widget,
- const gint group,
- const char
- *group_description,
- GkbdKeyboardConfig *
- kbd_config)
-{
- FOREACH_INITED_PLUGIN ();
- if (plugin->decorate_widget_callback) {
- GtkWidget *decorated_widget =
- (*plugin->decorate_widget_callback) (widget, group,
- group_description,
- kbd_config);
- if (decorated_widget != NULL) {
- xkl_debug (100,
- "Plugin [%s] decorated widget %p to %p\n",
- plugin->name, widget, decorated_widget);
- return decorated_widget;
- }
- }
- NEXT_INITED_PLUGIN ();
- return NULL;
-}
-
-void
-gkbd_indicator_plugin_manager_configure_plugin (GkbdIndicatorPluginManager
- * manager,
- GkbdIndicatorPluginContainer
- * pc,
- const char *full_path,
- GtkWindow * parent)
-{
- const GkbdIndicatorPlugin *plugin =
- gkbd_indicator_plugin_manager_get_plugin (manager, full_path);
- if (plugin->configure_properties_callback != NULL)
- plugin->configure_properties_callback (pc, parent);
-}
-
-void
-gkbd_indicator_plugin_container_init (GkbdIndicatorPluginContainer * pc,
- GConfClient * conf_client)
-{
- pc->conf_client = conf_client;
- g_object_ref (pc->conf_client);
-}
-
-void
-gkbd_indicator_plugin_container_term (GkbdIndicatorPluginContainer * pc)
-{
- g_object_unref (pc->conf_client);
-}
diff --git a/libgnomekbd/gkbd-indicator-plugin-manager.h b/libgnomekbd/gkbd-indicator-plugin-manager.h
deleted file mode 100644
index 8a3c544..0000000
--- a/libgnomekbd/gkbd-indicator-plugin-manager.h
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef __GSWITCHIT_PLUGIN_MANAGER_H__
-#define __GSWITCHIT_PLUGIN_MANAGER_H__
-
-#include <gmodule.h>
-#include <libgnomekbd/gkbd-indicator-plugin.h>
-
-typedef struct _GkbdIndicatorPluginManager {
- GHashTable *all_plugin_recs;
- GSList *inited_plugin_recs;
-} GkbdIndicatorPluginManager;
-
-typedef struct _GkbdIndicatorPluginManagerRecord {
- const char *full_path;
- GModule *module;
- const GkbdIndicatorPlugin *plugin;
-} GkbdIndicatorPluginManagerRecord;
-
-extern void
- gkbd_indicator_plugin_manager_init (GkbdIndicatorPluginManager * manager);
-
-extern void
- gkbd_indicator_plugin_manager_term (GkbdIndicatorPluginManager * manager);
-
-extern void
- gkbd_indicator_plugin_manager_init_enabled_plugins (GkbdIndicatorPluginManager * manager,
- GkbdIndicatorPluginContainer
- * pc,
- GSList *
- enabled_plugins);
-
-extern void
- gkbd_indicator_plugin_manager_term_initialized_plugins (GkbdIndicatorPluginManager * manager);
-
-extern void
- gkbd_indicator_plugin_manager_toggle_plugins (GkbdIndicatorPluginManager * manager,
- GkbdIndicatorPluginContainer
- * pc,
- GSList * enabled_plugins);
-
-extern const GkbdIndicatorPlugin
- *
-gkbd_indicator_plugin_manager_get_plugin (GkbdIndicatorPluginManager *
- manager, const char *full_path);
-
-extern void
- gkbd_indicator_plugin_manager_promote_plugin (GkbdIndicatorPluginManager * manager,
- GSList * enabled_plugins,
- const char *full_path);
-
-extern void
- gkbd_indicator_plugin_manager_demote_plugin (GkbdIndicatorPluginManager * manager,
- GSList * enabled_plugins,
- const char *full_path);
-
-extern void
- gkbd_indicator_plugin_manager_enable_plugin (GkbdIndicatorPluginManager * manager,
- GSList ** enabled_plugins,
- const char *full_path);
-
-extern void
- gkbd_indicator_plugin_manager_disable_plugin (GkbdIndicatorPluginManager * manager,
- GSList ** enabled_plugins,
- const char *full_path);
-
-extern void
- gkbd_indicator_plugin_manager_configure_plugin (GkbdIndicatorPluginManager * manager,
- GkbdIndicatorPluginContainer
- * pc,
- const char *full_path,
- GtkWindow * parent);
-
-// actual calling plugin notification methods
-
-extern void
- gkbd_indicator_plugin_manager_group_changed (GkbdIndicatorPluginManager * manager,
- GtkWidget * notebook,
- int new_group);
-
-extern void
- gkbd_indicator_plugin_manager_config_changed (GkbdIndicatorPluginManager * manager,
- GkbdKeyboardConfig * from,
- GkbdKeyboardConfig * to);
-
-extern int
- gkbd_indicator_plugin_manager_window_created (GkbdIndicatorPluginManager * manager,
- Window win, Window parent);
-
-extern GtkWidget
- *
-gkbd_indicator_plugin_manager_decorate_widget (GkbdIndicatorPluginManager *
- manager, GtkWidget * widget,
- const gint group, const char
- *group_description,
- GkbdKeyboardConfig *
- config);
-
-#endif
diff --git a/libgnomekbd/gkbd-indicator-plugin.h b/libgnomekbd/gkbd-indicator-plugin.h
deleted file mode 100644
index 839fb21..0000000
--- a/libgnomekbd/gkbd-indicator-plugin.h
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef __GKBD_INDICATOR_PLUGIN_H__
-#define __GKBD_INDICATOR_PLUGIN_H__
-
-#include <gtk/gtk.h>
-#include <gconf/gconf-client.h>
-#include <libgnomekbd/gkbd-keyboard-config.h>
-
-#define MAX_LOCAL_NAME_BUF_LENGTH 512
-
-struct _GkbdIndicatorPlugin;
-
-typedef struct _GkbdIndicatorPluginContainer {
- GConfClient *conf_client;
-} GkbdIndicatorPluginContainer;
-
-typedef const struct _GkbdIndicatorPlugin
-*(*GkbdIndicatorPluginGetPluginFunc) (void);
-
-typedef
- gboolean (*GkbdIndicatorPluginInitFunc) (GkbdIndicatorPluginContainer *
- pc);
-
-typedef void (*GkbdIndicatorPluginGroupChangedFunc) (GtkWidget * notebook,
- int new_group);
-
-typedef void (*GkbdIndicatorPluginConfigChangedFunc) (const
- GkbdKeyboardConfig *
- from,
- const
- GkbdKeyboardConfig *
- to);
-
-typedef int (*GkbdIndicatorPluginWindowCreatedFunc) (const Window win,
- const Window parent);
-
-typedef void (*GkbdIndicatorPluginTermFunc) (void);
-
-typedef GtkWidget *(*GkbdIndicatorPluginCreateWidget) (void);
-
-typedef GtkWidget *(*GkbdIndicatorPluginDecorateWidget) (GtkWidget *
- widget,
- const gint group,
- const char
- *group_description,
- GkbdKeyboardConfig
- * config);
-
-typedef
-void (*GkbdIndicatorPluginConfigureProperties)
- (GkbdIndicatorPluginContainer * pc, GtkWindow * parent);
-
-typedef struct _GkbdIndicatorPlugin {
- const char *name;
-
- const char *description;
-
-// implemented
- GkbdIndicatorPluginInitFunc init_callback;
-
-// implemented
- GkbdIndicatorPluginTermFunc term_callback;
-
-// implemented
- GkbdIndicatorPluginConfigureProperties
- configure_properties_callback;
-
-// implemented
- GkbdIndicatorPluginGroupChangedFunc group_changed_callback;
-
-// implemented
- GkbdIndicatorPluginWindowCreatedFunc window_created_callback;
-
-// implemented
- GkbdIndicatorPluginDecorateWidget decorate_widget_callback;
-
-// non implemented
- GkbdIndicatorPluginConfigChangedFunc config_changed_callback;
-
-// non implemented
- GkbdIndicatorPluginCreateWidget create_widget_callback;
-
-} GkbdIndicatorPlugin;
-
-/**
- * Functions accessible for plugins
- */
-
-extern void
- gkbd_indicator_plugin_container_init (GkbdIndicatorPluginContainer * pc,
- GConfClient * conf_client);
-
-extern void
- gkbd_indicator_plugin_container_term (GkbdIndicatorPluginContainer * pc);
-
-extern void
- gkbd_indicator_plugin_container_reinit_ui (GkbdIndicatorPluginContainer * pc);
-
-extern guint
-gkbd_indicator_plugin_get_num_groups (GkbdIndicatorPluginContainer * pc);
-
-extern gchar
- **
- gkbd_indicator_plugin_load_localized_group_names
- (GkbdIndicatorPluginContainer * pc);
-
-#endif
diff --git a/libgnomekbd/gkbd-indicator.c b/libgnomekbd/gkbd-indicator.c
deleted file mode 100644
index 7dad71d..0000000
--- a/libgnomekbd/gkbd-indicator.c
+++ /dev/null
@@ -1,858 +0,0 @@
-/*
- * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#include <memory.h>
-
-#include <gdk/gdkkeysyms.h>
-#include <gdk/gdkx.h>
-#include <glib/gi18n.h>
-
-#include <gkbd-indicator.h>
-#include <gkbd-indicator-marshal.h>
-
-#include <gkbd-desktop-config.h>
-#include <gkbd-indicator-config.h>
-
-#include <gkbd-indicator-plugin-manager.h>
-
-#include <gkbd-config-registry-client.h>
-
-typedef struct _gki_globals {
- XklEngine *engine;
-
- GkbdDesktopConfig cfg;
- GkbdIndicatorConfig ind_cfg;
- GkbdKeyboardConfig kbd_cfg;
-
- GkbdIndicatorPluginContainer plugin_container;
- GkbdIndicatorPluginManager plugin_manager;
-
- const gchar *tooltips_format;
- gchar **full_group_names;
- gchar **short_group_names;
- GSList *widget_instances;
-} gki_globals;
-
-struct _GkbdIndicatorPrivate {
- gboolean set_parent_tooltips;
- gdouble angle;
-};
-
-/* one instance for ALL widgets */
-static gki_globals globals;
-
-#define ForAllIndicators() \
- { \
- GSList* cur; \
- for (cur = globals.widget_instances; cur != NULL; cur = cur->next) { \
- GkbdIndicator * gki = (GkbdIndicator*)cur->data;
-#define NextIndicator() \
- } \
- }
-
-G_DEFINE_TYPE (GkbdIndicator, gkbd_indicator, GTK_TYPE_NOTEBOOK)
-
-static void
-gkbd_indicator_global_init (void);
-static void
-gkbd_indicator_global_term (void);
-static GtkWidget *
-gkbd_indicator_prepare_drawing (GkbdIndicator * gki, int group);
-static void
-gkbd_indicator_set_current_page_for_group (GkbdIndicator * gki, int group);
-static void
-gkbd_indicator_set_current_page (GkbdIndicator * gki);
-static void
-gkbd_indicator_cleanup (GkbdIndicator * gki);
-static void
-gkbd_indicator_fill (GkbdIndicator * gki);
-static void
-gkbd_indicator_set_tooltips (GkbdIndicator * gki, const char *str);
-
-void
-gkbd_indicator_set_tooltips (GkbdIndicator * gki, const char *str)
-{
- GtkTooltips *tooltips;
-
- if (str == NULL)
- return;
- tooltips = gtk_tooltips_new ();
- g_object_ref (G_OBJECT (tooltips));
- gtk_object_sink (GTK_OBJECT (tooltips));
- g_object_set_data_full (G_OBJECT (gki), "tooltips",
- tooltips, (GDestroyNotify) g_object_unref);
- gtk_tooltips_set_tip (tooltips, GTK_WIDGET (gki), str, NULL);
-
- if (gki->priv->set_parent_tooltips) {
- GtkWidget *parent =
- gtk_widget_get_parent (GTK_WIDGET (gki));
- if (parent != NULL) {
- gtk_tooltips_set_tip (tooltips,
- GTK_WIDGET (parent), str,
- NULL);
- g_object_ref (G_OBJECT (tooltips));
- g_object_set_data_full (G_OBJECT (parent),
- "gnome-kbd-indicator.tooltips",
- tooltips, (GDestroyNotify)
- g_object_unref);
- }
- }
- gtk_tooltips_enable (tooltips);
-}
-
-void
-gkbd_indicator_cleanup (GkbdIndicator * gki)
-{
- int i;
- GtkNotebook *notebook = GTK_NOTEBOOK (gki);
-
- /* Do not remove the first page! It is the default page */
- for (i = gtk_notebook_get_n_pages (notebook); --i > 0;) {
- gtk_notebook_remove_page (notebook, i);
- }
-}
-
-void
-gkbd_indicator_fill (GkbdIndicator * gki)
-{
- int grp;
- int total_groups = xkl_engine_get_num_groups (globals.engine);
- GtkNotebook *notebook = GTK_NOTEBOOK (gki);
-
- for (grp = 0; grp < total_groups; grp++) {
- GtkWidget *page, *decorated_page;
- page = gkbd_indicator_prepare_drawing (gki, grp);
-
- if (page == NULL)
- page = gtk_label_new ("");
-
- decorated_page =
- gkbd_indicator_plugin_manager_decorate_widget
- (&globals.plugin_manager, page, grp,
- globals.full_group_names[grp], &globals.kbd_cfg);
-
- page = decorated_page == NULL ? page : decorated_page;
-
- gtk_notebook_append_page (notebook, page, NULL);
- gtk_widget_show_all (page);
- }
-}
-
-static gboolean
-gkbd_indicator_key_pressed (GtkWidget *
- widget, GdkEventKey * event,
- GkbdIndicator * gki)
-{
- switch (event->keyval) {
- case GDK_KP_Enter:
- case GDK_ISO_Enter:
- case GDK_3270_Enter:
- case GDK_Return:
- case GDK_space:
- case GDK_KP_Space:
- gkbd_desktop_config_lock_next_group (&globals.cfg);
- return TRUE;
- default:
- break;
- }
- return FALSE;
-}
-
-static gboolean
-gkbd_indicator_button_pressed (GtkWidget *
- widget,
- GdkEventButton * event, GkbdIndicator * gki)
-{
- GtkWidget *img = gtk_bin_get_child (GTK_BIN (widget));
- xkl_debug (150, "Flag img size %d x %d\n",
- img->allocation.width, img->allocation.height);
- if (event->button == 1 && event->type == GDK_BUTTON_PRESS) {
- xkl_debug (150, "Mouse button pressed on applet\n");
- gkbd_desktop_config_lock_next_group (&globals.cfg);
- return TRUE;
- }
- return FALSE;
-}
-
-static void
-flag_exposed (GtkWidget * flag, GdkEventExpose * event, GdkPixbuf * image)
-{
- /* Image width and height */
- int iw = gdk_pixbuf_get_width (image);
- int ih = gdk_pixbuf_get_height (image);
- /* widget-to-image scales, X and Y */
- double xwiratio = 1.0 * flag->allocation.width / iw;
- double ywiratio = 1.0 * flag->allocation.height / ih;
- double wiratio = xwiratio < ywiratio ? xwiratio : ywiratio;
-
- /* scaled width and height */
- int sw = iw * wiratio;
- int sh = ih * wiratio;
-
- /* offsets */
- int ox = (flag->allocation.width - sw) >> 1;
- int oy = (flag->allocation.height - sh) >> 1;
-
- GdkPixbuf *scaled = gdk_pixbuf_scale_simple (image, sw, sh,
- GDK_INTERP_HYPER);
-
- gdk_draw_pixbuf (GDK_DRAWABLE (flag->window),
- NULL,
- scaled,
- 0, 0,
- ox, oy, sw, sh, GDK_RGB_DITHER_NORMAL, 0, 0);
- g_object_unref (G_OBJECT (scaled));
-}
-
-static GtkWidget *
-gkbd_indicator_prepare_drawing (GkbdIndicator * gki, int group)
-{
- gpointer pimage;
- GdkPixbuf *image;
- GtkWidget *ebox;
-
- pimage = g_slist_nth_data (globals.ind_cfg.images, group);
- ebox = gtk_event_box_new ();
- if (globals.ind_cfg.show_flags) {
- GtkWidget *flag;
- if (pimage == NULL)
- return NULL;
- image = GDK_PIXBUF (pimage);
- flag = gtk_drawing_area_new ();
- g_signal_connect (G_OBJECT (flag),
- "expose_event",
- G_CALLBACK (flag_exposed), image);
- gtk_container_add (GTK_CONTAINER (ebox), flag);
- } else {
- gpointer pcounter = NULL;
- char *prev_layout_name = NULL, **ppln;
- char *lbl_title = NULL;
- int counter = 0;
- char *layout_name = NULL;
- GtkWidget *align, *label;
- /**
- * Map "short desciption" ->
- * number of layouts in the configuration
- * having this short description
- */
- static GHashTable *short_descrs = NULL;
-
- if (group == 0)
- short_descrs =
- g_hash_table_new_full (g_str_hash, g_str_equal,
- g_free, NULL);
-
- if (xkl_engine_get_features (globals.engine) &
- XKLF_MULTIPLE_LAYOUTS_SUPPORTED) {
- char *full_layout_name =
- (char *) g_slist_nth_data (globals.kbd_cfg.
- layouts_variants,
- group);
- char *variant_name;
- if (!gkbd_keyboard_config_split_items
- (full_layout_name, &layout_name,
- &variant_name))
- /* just in case */
- layout_name = g_strdup (full_layout_name);
-
- if (globals.short_group_names != NULL) {
- char *short_group_name =
- globals.short_group_names[group];
- if (short_group_name != NULL
- && *short_group_name != '\0') {
- layout_name =
- g_strdup (short_group_name);
- }
- }
- } else
- layout_name =
- g_strdup (globals.full_group_names[group]);
-
- if (layout_name == NULL)
- layout_name = g_strdup ("?");
-
- /* Process layouts with repeating description */
- ppln = &prev_layout_name;
- if (g_hash_table_lookup_extended
- (short_descrs, layout_name,
- (gpointer *) ppln, &pcounter)) {
- /* "next" same description */
- gchar appendix[10] = "";
- gint utf8length;
- gunichar cidx;
- counter = GPOINTER_TO_INT (pcounter);
- /* Unicode subscript 2, 3, 4 */
- cidx = 0x2081 + counter;
- utf8length = g_unichar_to_utf8 (cidx, appendix);
- appendix[utf8length] = '\0';
- lbl_title =
- g_strconcat (layout_name, appendix, NULL);
- } else {
- /* "first" time this description */
- lbl_title = g_strdup (layout_name);
- }
- g_hash_table_insert (short_descrs, layout_name,
- GINT_TO_POINTER (counter + 1));
-
- align = gtk_alignment_new (0.5, 0.5, 1.0, 1.0);
- label = gtk_label_new (lbl_title);
- g_free (lbl_title);
- gtk_label_set_angle (GTK_LABEL (label), gki->priv->angle);
-
- if (group == xkl_engine_get_num_groups (globals.engine)) {
- g_hash_table_destroy (short_descrs);
- short_descrs = NULL;
- }
-
- gtk_container_add (GTK_CONTAINER (align), label);
- gtk_container_add (GTK_CONTAINER (ebox), align);
-
- gtk_container_set_border_width (GTK_CONTAINER (align), 2);
- }
- g_signal_connect (G_OBJECT (ebox),
- "button_press_event",
- G_CALLBACK (gkbd_indicator_button_pressed), gki);
-
- g_signal_connect (G_OBJECT (gki),
- "key_press_event",
- G_CALLBACK (gkbd_indicator_key_pressed), gki);
-
- /* We have everything prepared for that size */
-
- return ebox;
-}
-
-static void
-gkbd_indicator_update_tooltips (GkbdIndicator * gki)
-{
- XklState *state = xkl_engine_get_current_state (globals.engine);
- gchar *buf;
- if (state == NULL || state->group < 0)
- return;
-
- buf = g_strdup_printf (globals.tooltips_format,
- globals.full_group_names[state->group]);
-
- gkbd_indicator_set_tooltips (gki, buf);
- g_free (buf);
-}
-
-static void
-gkbd_indicator_parent_set (GtkWidget * gki, GtkWidget * previous_parent)
-{
- gkbd_indicator_update_tooltips (GKBD_INDICATOR (gki));
-}
-
-
-void
-gkbd_indicator_reinit_ui (GkbdIndicator * gki)
-{
- gkbd_indicator_cleanup (gki);
- gkbd_indicator_fill (gki);
-
- gkbd_indicator_set_current_page (gki);
-
- g_signal_emit_by_name (gki, "reinit-ui");
-}
-
-/* Should be called once for all widgets */
-static void
-gkbd_indicator_cfg_changed (GConfClient * client,
- guint cnxn_id, GConfEntry * entry)
-{
- xkl_debug (100,
- "General configuration changed in GConf - reiniting...\n");
- gkbd_desktop_config_load_from_gconf (&globals.cfg);
- gkbd_desktop_config_activate (&globals.cfg);
- ForAllIndicators () {
- gkbd_indicator_reinit_ui (gki);
- } NextIndicator ();
-}
-
-/* Should be called once for all widgets */
-static void
-gkbd_indicator_ind_cfg_changed (GConfClient * client,
- guint cnxn_id, GConfEntry * entry)
-{
- xkl_debug (100,
- "Applet configuration changed in GConf - reiniting...\n");
- gkbd_indicator_config_load_from_gconf (&globals.ind_cfg);
- gkbd_indicator_config_update_images (&globals.ind_cfg,
- &globals.kbd_cfg);
- gkbd_indicator_config_activate (&globals.ind_cfg);
-
- gkbd_indicator_plugin_manager_toggle_plugins (&globals.
- plugin_manager,
- &globals.
- plugin_container,
- globals.ind_cfg.
- enabled_plugins);
-
- ForAllIndicators () {
- gkbd_indicator_reinit_ui (gki);
- } NextIndicator ();
-}
-
-static void
-gkbd_indicator_load_group_names (const gchar ** layout_ids,
- const gchar ** variant_ids)
-{
- if (!gkbd_desktop_config_load_remote_group_descriptions_utf8
- (&globals.cfg, layout_ids, variant_ids,
- &globals.short_group_names, &globals.full_group_names)) {
- /* We just populate no short names (remain NULL) -
- * full names are going to be used anyway */
- gint i, total_groups =
- xkl_engine_get_num_groups (globals.engine);
- globals.full_group_names =
- g_new0 (char *, total_groups + 1);
-
- if (xkl_engine_get_features (globals.engine) &
- XKLF_MULTIPLE_LAYOUTS_SUPPORTED) {
- GSList *lst = globals.kbd_cfg.layouts_variants;
- for (i = 0; lst; lst = lst->next,i++) {
- globals.full_group_names[i] =
- g_strdup ((char *) lst->data);
- }
- } else {
- for (i = total_groups; --i >= 0;) {
- globals.full_group_names[i] =
- g_strdup_printf ("Group %d", i);
- }
- }
- }
-}
-
-/* Should be called once for all widgets */
-static void
-gkbd_indicator_kbd_cfg_callback (GkbdIndicator * gki)
-{
- XklConfigRec *xklrec = xkl_config_rec_new ();
- xkl_debug (100,
- "XKB configuration changed on X Server - reiniting...\n");
-
- gkbd_keyboard_config_load_from_x_current (&globals.kbd_cfg,
- xklrec);
- gkbd_indicator_config_update_images (&globals.ind_cfg,
- &globals.kbd_cfg);
-
- g_strfreev (globals.full_group_names);
- globals.full_group_names = NULL;
-
- if (globals.short_group_names != NULL) {
- g_strfreev (globals.short_group_names);
- globals.short_group_names = NULL;
- }
-
- gkbd_indicator_load_group_names ((const gchar **) xklrec->layouts,
- (const gchar **) xklrec->
- variants);
-
- ForAllIndicators () {
- gkbd_indicator_reinit_ui (gki);
- } NextIndicator ();
- g_object_unref (G_OBJECT (xklrec));
-}
-
-/* Should be called once for all applets */
-static void
-gkbd_indicator_state_callback (XklEngine * engine,
- XklEngineStateChange changeType,
- gint group, gboolean restore)
-{
- xkl_debug (150, "group is now %d, restore: %d\n", group, restore);
-
- if (changeType == GROUP_CHANGED) {
- ForAllIndicators () {
- gkbd_indicator_plugin_manager_group_changed
- (&globals.plugin_manager, GTK_WIDGET (gki),
- group);
- xkl_debug (200, "do repaint\n");
- gkbd_indicator_set_current_page_for_group
- (gki, group);
- }
- NextIndicator ();
- }
-}
-
-
-void
-gkbd_indicator_set_current_page (GkbdIndicator * gki)
-{
- XklState *cur_state;
- cur_state = xkl_engine_get_current_state (globals.engine);
- if (cur_state->group >= 0)
- gkbd_indicator_set_current_page_for_group (gki,
- cur_state->
- group);
-}
-
-void
-gkbd_indicator_set_current_page_for_group (GkbdIndicator * gki, int group)
-{
- xkl_debug (200, "Revalidating for group %d\n", group);
-
- gtk_notebook_set_current_page (GTK_NOTEBOOK (gki), group + 1);
-
- gkbd_indicator_update_tooltips (gki);
-}
-
-/* Should be called once for all widgets */
-static GdkFilterReturn
-gkbd_indicator_filter_x_evt (GdkXEvent * xev, GdkEvent * event)
-{
- XEvent *xevent = (XEvent *) xev;
-
- xkl_engine_filter_events (globals.engine, xevent);
- switch (xevent->type) {
- case ReparentNotify:
- {
- XReparentEvent *rne = (XReparentEvent *) xev;
-
- ForAllIndicators () {
- GdkWindow *w =
- gtk_widget_get_parent_window
- (GTK_WIDGET (gki));
-
- /* compare the indicator's parent window with the even window */
- if (w != NULL
- && GDK_WINDOW_XID (w) == rne->window) {
- /* if so - make it transparent... */
- xkl_engine_set_window_transparent
- (globals.engine, rne->window,
- TRUE);
- }
- }
- NextIndicator ()
- }
- break;
- }
- return GDK_FILTER_CONTINUE;
-}
-
-
-/* Should be called once for all widgets */
-static void
-gkbd_indicator_start_listen (void)
-{
- gdk_window_add_filter (NULL, (GdkFilterFunc)
- gkbd_indicator_filter_x_evt, NULL);
- gdk_window_add_filter (gdk_get_default_root_window (),
- (GdkFilterFunc)
- gkbd_indicator_filter_x_evt, NULL);
-
- xkl_engine_start_listen (globals.engine,
- XKLL_TRACK_KEYBOARD_STATE);
-}
-
-/* Should be called once for all widgets */
-static void
-gkbd_indicator_stop_listen (void)
-{
- xkl_engine_stop_listen (globals.engine);
-
- gdk_window_remove_filter (NULL, (GdkFilterFunc)
- gkbd_indicator_filter_x_evt, NULL);
- gdk_window_remove_filter
- (gdk_get_default_root_window (),
- (GdkFilterFunc) gkbd_indicator_filter_x_evt, NULL);
-}
-
-static gboolean
-gkbd_indicator_scroll (GtkWidget * gki, GdkEventScroll * event)
-{
- /* mouse wheel events should be ignored, otherwise funny effects appear */
- return TRUE;
-}
-
-static void
-gkbd_indicator_init (GkbdIndicator * gki)
-{
- GtkWidget *def_drawing;
- GtkNotebook *notebook;
-
- if (!g_slist_length (globals.widget_instances))
- gkbd_indicator_global_init ();
-
- gki->priv = g_new0 (GkbdIndicatorPrivate, 1);
-
- notebook = GTK_NOTEBOOK (gki);
-
- xkl_debug (100, "Initiating the widget startup process for %p\n",
- gki);
-
- gtk_notebook_set_show_tabs (notebook, FALSE);
- gtk_notebook_set_show_border (notebook, FALSE);
-
- def_drawing =
- gtk_image_new_from_stock (GTK_STOCK_STOP,
- GTK_ICON_SIZE_BUTTON);
-
- gtk_notebook_append_page (notebook, def_drawing,
- gtk_label_new (""));
-
- if (globals.engine == NULL) {
- gkbd_indicator_set_tooltips (gki,
- _
- ("XKB initialization error"));
- return;
- }
-
- gkbd_indicator_set_tooltips (gki, "");
-
- gkbd_indicator_fill (gki);
- gkbd_indicator_set_current_page (gki);
-
- gtk_widget_add_events (GTK_WIDGET (gki), GDK_BUTTON_PRESS_MASK);
-
- /* append AFTER all initialization work is finished */
- globals.widget_instances =
- g_slist_append (globals.widget_instances, gki);
-}
-
-static void
-gkbd_indicator_finalize (GObject * obj)
-{
- GkbdIndicator *gki = GKBD_INDICATOR (obj);
- xkl_debug (100,
- "Starting the gnome-kbd-indicator widget shutdown process for %p\n",
- gki);
-
- /* remove BEFORE all termination work is finished */
- globals.widget_instances =
- g_slist_remove (globals.widget_instances, gki);
-
- gkbd_indicator_cleanup (gki);
-
- xkl_debug (100,
- "The instance of gnome-kbd-indicator successfully finalized\n");
-
- g_free (gki->priv);
-
- G_OBJECT_CLASS (gkbd_indicator_parent_class)->finalize (obj);
-
- if (!g_slist_length (globals.widget_instances))
- gkbd_indicator_global_term ();
-}
-
-static void
-gkbd_indicator_global_term (void)
-{
- xkl_debug (100, "*** Last GkbdIndicator instance *** \n");
- gkbd_indicator_stop_listen ();
-
- gkbd_desktop_config_stop_listen (&globals.cfg);
- gkbd_indicator_config_stop_listen (&globals.ind_cfg);
-
- gkbd_indicator_plugin_manager_term_initialized_plugins (&globals.
- plugin_manager);
- gkbd_indicator_plugin_manager_term (&globals.plugin_manager);
-
- gkbd_indicator_config_term (&globals.ind_cfg);
- gkbd_keyboard_config_term (&globals.kbd_cfg);
- gkbd_desktop_config_term (&globals.cfg);
-
- gkbd_indicator_plugin_container_term (&globals.plugin_container);
-
- g_object_unref (G_OBJECT (globals.engine));
- globals.engine = NULL;
- xkl_debug (100, "*** Terminated globals *** \n");
-}
-
-static void
-gkbd_indicator_class_init (GkbdIndicatorClass * klass)
-{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
- GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
-
- xkl_debug (100, "*** First GkbdIndicator instance *** \n");
-
- memset (&globals, 0, sizeof (globals));
-
- /* Initing some global vars */
- globals.tooltips_format = "%s";
-
- /* Initing vtable */
- object_class->finalize = gkbd_indicator_finalize;
-
- widget_class->scroll_event = gkbd_indicator_scroll;
- widget_class->parent_set = gkbd_indicator_parent_set;
-
- /* Signals */
- g_signal_new ("reinit-ui", GKBD_TYPE_INDICATOR,
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (GkbdIndicatorClass, reinit_ui),
- NULL, NULL, gkbd_indicator_VOID__VOID,
- G_TYPE_NONE, 0);
-}
-
-static void
-gkbd_indicator_global_init (void)
-{
- GConfClient *gconf_client;
- XklConfigRec *xklrec = xkl_config_rec_new ();
-
- globals.engine = xkl_engine_get_instance (GDK_DISPLAY ());
- if (globals.engine == NULL) {
- xkl_debug (0, "Libxklavier initialization error");
- return;
- }
-
- gconf_client = gconf_client_get_default ();
-
- g_signal_connect (globals.engine, "X-state-changed",
- G_CALLBACK (gkbd_indicator_state_callback),
- NULL);
- g_signal_connect (globals.engine, "X-config-changed",
- G_CALLBACK (gkbd_indicator_kbd_cfg_callback),
- NULL);
-
- gkbd_indicator_plugin_container_init (&globals.plugin_container,
- gconf_client);
-
- gkbd_desktop_config_init (&globals.cfg, gconf_client,
- globals.engine);
- gkbd_keyboard_config_init (&globals.kbd_cfg, gconf_client,
- globals.engine);
- gkbd_indicator_config_init (&globals.ind_cfg, gconf_client,
- globals.engine);
-
- g_object_unref (gconf_client);
-
- gkbd_desktop_config_load_from_gconf (&globals.cfg);
- gkbd_desktop_config_activate (&globals.cfg);
- gkbd_keyboard_config_load_from_x_current (&globals.kbd_cfg,
- xklrec);
- gkbd_indicator_config_load_from_gconf (&globals.ind_cfg);
- gkbd_indicator_config_update_images (&globals.ind_cfg,
- &globals.kbd_cfg);
- gkbd_indicator_config_activate (&globals.ind_cfg);
-
- gkbd_indicator_load_group_names ((const gchar **) xklrec->layouts,
- (const gchar **) xklrec->
- variants);
- g_object_unref (G_OBJECT (xklrec));
-
- gkbd_indicator_plugin_manager_init (&globals.plugin_manager);
- gkbd_indicator_plugin_manager_init_enabled_plugins (&globals.
- plugin_manager,
- &globals.
- plugin_container,
- globals.
- ind_cfg.
- enabled_plugins);
- gkbd_desktop_config_start_listen (&globals.cfg,
- (GConfClientNotifyFunc)
- gkbd_indicator_cfg_changed,
- NULL);
- gkbd_indicator_config_start_listen (&globals.ind_cfg,
- (GConfClientNotifyFunc)
- gkbd_indicator_ind_cfg_changed,
- NULL);
- gkbd_indicator_start_listen ();
-
- xkl_debug (100, "*** Inited globals *** \n");
-}
-
-GtkWidget *
-gkbd_indicator_new (void)
-{
- return
- GTK_WIDGET (g_object_new (gkbd_indicator_get_type (), NULL));
-}
-
-void
-gkbd_indicator_set_parent_tooltips (GkbdIndicator * gki, gboolean spt)
-{
- gki->priv->set_parent_tooltips = spt;
- gkbd_indicator_update_tooltips (gki);
-}
-
-void
-gkbd_indicator_set_tooltips_format (const gchar format[])
-{
- globals.tooltips_format = format;
- ForAllIndicators ()
- gkbd_indicator_update_tooltips (gki);
- NextIndicator ()
-}
-
-XklEngine *
-gkbd_indicator_get_xkl_engine ()
-{
- return globals.engine;
-}
-
-gchar **
-gkbd_indicator_get_group_names ()
-{
- return globals.full_group_names;
-}
-
-gchar *
-gkbd_indicator_get_image_filename (guint group)
-{
- if (!globals.ind_cfg.show_flags)
- return NULL;
- return gkbd_indicator_config_get_images_file (&globals.
- ind_cfg,
- &globals.
- kbd_cfg, group);
-}
-
-gdouble
-gkbd_indicator_get_max_width_height_ratio (void)
-{
- gdouble rv = 0.0;
- GSList *ip = globals.ind_cfg.images;
- if (!globals.ind_cfg.show_flags)
- return 0;
- while (ip != NULL) {
- GdkPixbuf *img = GDK_PIXBUF (ip->data);
- gdouble r =
- 1.0 * gdk_pixbuf_get_width (img) /
- gdk_pixbuf_get_height (img);
- if (r > rv)
- rv = r;
- ip = ip->next;
- }
- return rv;
-}
-
-void
-gkbd_indicator_set_angle (GkbdIndicator * gki, gdouble angle)
-{
- gki->priv->angle = angle;
-}
-
-/* Plugin support */
-/* Preserve the plugin container functions during the linking */
-void
-gkbd_indicator_plugin_container_reinit_ui (GkbdIndicatorPluginContainer *
- pc)
-{
- ForAllIndicators () {
- gkbd_indicator_reinit_ui (gki);
- } NextIndicator ();
-}
-
-gchar **gkbd_indicator_plugin_load_localized_group_names
- (GkbdIndicatorPluginContainer * pc) {
- return globals.full_group_names;
-}
diff --git a/libgnomekbd/gkbd-indicator.h b/libgnomekbd/gkbd-indicator.h
deleted file mode 100644
index 49544e1..0000000
--- a/libgnomekbd/gkbd-indicator.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef __GKBD_INDICATOR_H__
-#define __GKBD_INDICATOR_H__
-
-#include <gtk/gtk.h>
-
-#include <libxklavier/xklavier.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
- typedef struct _GkbdIndicator GkbdIndicator;
- typedef struct _GkbdIndicatorPrivate GkbdIndicatorPrivate;
- typedef struct _GkbdIndicatorClass GkbdIndicatorClass;
-
-#define GKBD_TYPE_INDICATOR (gkbd_indicator_get_type ())
-#define GKBD_INDICATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GKBD_TYPE_INDICATOR, GkbdIndicator))
-#define GKBD_INDCATOR_CLASS(obj) (G_TYPE_CHECK_CLASS_CAST ((obj), GKBD_TYPE_INDICATOR, GkbdIndicatorClass))
-#define GKBD_IS_INDICATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GKBD_TYPE_INDICATOR))
-#define GKBD_IS_INDICATOR_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE ((obj), GKBD_TYPE_INDICATOR))
-#define GKBD_INDICATOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GKBD_TYPE_INDICATOR, GkbdIndicatorClass))
-
- struct _GkbdIndicator {
- GtkNotebook parent;
- GkbdIndicatorPrivate *priv;
- };
-
- struct _GkbdIndicatorClass {
- GtkNotebookClass parent_class;
-
- void (*reinit_ui) (GkbdIndicator * gki);
- };
-
- extern GType gkbd_indicator_get_type (void);
-
- extern GtkWidget *gkbd_indicator_new (void);
-
- extern void gkbd_indicator_reinit_ui (GkbdIndicator * gki);
-
- extern void gkbd_indicator_set_angle (GkbdIndicator * gki,
- gdouble angle);
-
- extern XklEngine *gkbd_indicator_get_xkl_engine (void);
-
- extern gchar **gkbd_indicator_get_group_names (void);
-
- extern gchar *gkbd_indicator_get_image_filename (guint group);
-
- extern gdouble gkbd_indicator_get_max_width_height_ratio (void);
-
- extern void
- gkbd_indicator_set_parent_tooltips (GkbdIndicator *
- gki, gboolean ifset);
-
- extern void
- gkbd_indicator_set_tooltips_format (const gchar str[]);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/libgnomekbd/gkbd-keyboard-config.c b/libgnomekbd/gkbd-keyboard-config.c
deleted file mode 100644
index c7d4a14..0000000
--- a/libgnomekbd/gkbd-keyboard-config.c
+++ /dev/null
@@ -1,830 +0,0 @@
-/*
- * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#include <config.h>
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <X11/keysym.h>
-
-#include <glib/gi18n.h>
-#include <libgnome/gnome-program.h>
-
-#include <gkbd-keyboard-config.h>
-#include <gkbd-config-private.h>
-
-#include <gkbd-config-registry-client.h>
-
-/**
- * GkbdKeyboardConfig
- */
-#define GKBD_KEYBOARD_CONFIG_KEY_PREFIX GKBD_CONFIG_KEY_PREFIX "/kbd"
-
-const gchar GKBD_KEYBOARD_CONFIG_DIR[] = GKBD_KEYBOARD_CONFIG_KEY_PREFIX;
-const gchar GKBD_KEYBOARD_CONFIG_KEY_MODEL[] =
- GKBD_KEYBOARD_CONFIG_KEY_PREFIX "/model";
-const gchar GKBD_KEYBOARD_CONFIG_KEY_LAYOUTS[] =
- GKBD_KEYBOARD_CONFIG_KEY_PREFIX "/layouts";
-const gchar GKBD_KEYBOARD_CONFIG_KEY_OPTIONS[] =
- GKBD_KEYBOARD_CONFIG_KEY_PREFIX "/options";
-
-const gchar *GKBD_KEYBOARD_CONFIG_ACTIVE[] = {
- GKBD_KEYBOARD_CONFIG_KEY_MODEL,
- GKBD_KEYBOARD_CONFIG_KEY_LAYOUTS,
- GKBD_KEYBOARD_CONFIG_KEY_OPTIONS
-};
-
-#define GKBD_KEYBOARD_CONFIG_SYSBACKUP_KEY_PREFIX GKBD_CONFIG_KEY_PREFIX "/kbd.sysbackup"
-
-const gchar GKBD_KEYBOARD_CONFIG_SYSBACKUP_DIR[] =
- GKBD_KEYBOARD_CONFIG_SYSBACKUP_KEY_PREFIX;
-const gchar GKBD_KEYBOARD_CONFIG_SYSBACKUP_KEY_MODEL[] =
- GKBD_KEYBOARD_CONFIG_SYSBACKUP_KEY_PREFIX "/model";
-const gchar GKBD_KEYBOARD_CONFIG_SYSBACKUP_KEY_LAYOUTS[] =
- GKBD_KEYBOARD_CONFIG_SYSBACKUP_KEY_PREFIX "/layouts";
-const gchar GKBD_KEYBOARD_CONFIG_SYSBACKUP_KEY_OPTIONS[] =
- GKBD_KEYBOARD_CONFIG_SYSBACKUP_KEY_PREFIX "/options";
-
-const gchar *GKBD_KEYBOARD_CONFIG_SYSBACKUP[] = {
- GKBD_KEYBOARD_CONFIG_SYSBACKUP_KEY_MODEL,
- GKBD_KEYBOARD_CONFIG_SYSBACKUP_KEY_LAYOUTS,
- GKBD_KEYBOARD_CONFIG_SYSBACKUP_KEY_OPTIONS
-};
-
-/**
- * static common functions
- */
-static void
-gkbd_keyboard_config_string_list_reset (GSList ** plist)
-{
- while (*plist != NULL) {
- GSList *p = *plist;
- *plist = (*plist)->next;
- g_free (p->data);
- g_slist_free_1 (p);
- }
-}
-
-static gboolean
-gslist_str_equal (GSList * l1, GSList * l2)
-{
- if (l1 == l2)
- return TRUE;
- while (l1 != NULL && l2 != NULL) {
- if ((l1->data != l2->data) &&
- (l1->data != NULL) &&
- (l2->data != NULL) &&
- g_ascii_strcasecmp (l1->data, l2->data))
- return False;
-
- l1 = l1->next;
- l2 = l2->next;
- }
- return (l1 == NULL && l2 == NULL);
-}
-
-gboolean
-gkbd_keyboard_config_get_lv_descriptions (XklConfigRegistry *
- config_registry,
- const gchar * layout_name,
- const gchar * variant_name,
- gchar ** layout_short_descr,
- gchar ** layout_descr,
- gchar ** variant_short_descr,
- gchar ** variant_descr)
-{
- static XklConfigItem litem;
- static XklConfigItem vitem;
-
- layout_name = g_strdup (layout_name);
-
- g_snprintf (litem.name, sizeof litem.name, "%s", layout_name);
- if (xkl_config_registry_find_layout (config_registry, &litem)) {
- *layout_short_descr = litem.short_description;
- *layout_descr = litem.description;
- } else
- *layout_short_descr = *layout_descr = NULL;
-
- if (variant_name != NULL) {
- variant_name = g_strdup (variant_name);
- g_snprintf (vitem.name, sizeof vitem.name, "%s",
- variant_name);
- if (xkl_config_registry_find_variant
- (config_registry, layout_name, &vitem)) {
- *variant_short_descr = vitem.short_description;
- *variant_descr = vitem.description;
- } else
- *variant_short_descr = *variant_descr = NULL;
-
- g_free ((char *) variant_name);
- } else
- *variant_descr = NULL;
-
- g_free ((char *) layout_name);
- return *layout_descr != NULL;
-}
-
-/**
- * extern common functions
- */
-const gchar *
-gkbd_keyboard_config_merge_items (const gchar * parent,
- const gchar * child)
-{
- static gchar buffer[XKL_MAX_CI_NAME_LENGTH * 2 - 1];
- *buffer = '\0';
- if (parent != NULL) {
- if (strlen (parent) >= XKL_MAX_CI_NAME_LENGTH)
- return NULL;
- strcat (buffer, parent);
- }
- if (child != NULL) {
- if (strlen (child) >= XKL_MAX_CI_NAME_LENGTH)
- return NULL;
- strcat (buffer, "\t");
- strcat (buffer, child);
- }
- return buffer;
-}
-
-gboolean
-gkbd_keyboard_config_split_items (const gchar * merged, gchar ** parent,
- gchar ** child)
-{
- static gchar pbuffer[XKL_MAX_CI_NAME_LENGTH];
- static gchar cbuffer[XKL_MAX_CI_NAME_LENGTH];
- int plen, clen;
- const gchar *pos;
- *parent = *child = NULL;
-
- if (merged == NULL)
- return FALSE;
-
- pos = strchr (merged, '\t');
- if (pos == NULL) {
- plen = strlen (merged);
- clen = 0;
- } else {
- plen = pos - merged;
- clen = strlen (pos + 1);
- if (clen >= XKL_MAX_CI_NAME_LENGTH)
- return FALSE;
- strcpy (*child = cbuffer, pos + 1);
- }
- if (plen >= XKL_MAX_CI_NAME_LENGTH)
- return FALSE;
- memcpy (*parent = pbuffer, merged, plen);
- pbuffer[plen] = '\0';
- return TRUE;
-}
-
-/**
- * static GkbdKeyboardConfig functions
- */
-static void
-gkbd_keyboard_config_options_add_full (GkbdKeyboardConfig * kbd_config,
- const gchar * full_option_name)
-{
- kbd_config->options =
- g_slist_append (kbd_config->options,
- g_strdup (full_option_name));
-}
-
-static void
-gkbd_keyboard_config_layouts_add_full (GkbdKeyboardConfig * kbd_config,
- const gchar * full_layout_name)
-{
- kbd_config->layouts_variants =
- g_slist_append (kbd_config->layouts_variants,
- g_strdup (full_layout_name));
-}
-
-static void
-gkbd_keyboard_config_copy_from_xkl_config (GkbdKeyboardConfig * kbd_config,
- XklConfigRec * pdata)
-{
- char **p, **p1;
- gkbd_keyboard_config_model_set (kbd_config, pdata->model);
- xkl_debug (150, "Loaded Kbd model: [%s]\n", pdata->model);
-
- gkbd_keyboard_config_layouts_reset (kbd_config);
- p = pdata->layouts;
- p1 = pdata->variants;
- while (p != NULL && *p != NULL) {
- const gchar *full_layout =
- gkbd_keyboard_config_merge_items (*p, *p1);
- xkl_debug (150,
- "Loaded Kbd layout (with variant): [%s]\n",
- full_layout);
- gkbd_keyboard_config_layouts_add_full (kbd_config,
- full_layout);
- p++;
- p1++;
- }
-
- gkbd_keyboard_config_options_reset (kbd_config);
- p = pdata->options;
- while (p != NULL && *p != NULL) {
- char group[XKL_MAX_CI_NAME_LENGTH];
- char *option = *p;
- char *delim =
- (option != NULL) ? strchr (option, ':') : NULL;
- int len;
- if ((delim != NULL) &&
- ((len = (delim - option)) < XKL_MAX_CI_NAME_LENGTH)) {
- strncpy (group, option, len);
- group[len] = 0;
- xkl_debug (150, "Loaded Kbd option: [%s][%s]\n",
- group, option);
- gkbd_keyboard_config_options_add (kbd_config,
- group, option);
- }
- p++;
- }
-}
-
-static void
-gkbd_keyboard_config_copy_to_xkl_config (GkbdKeyboardConfig * kbd_config,
- XklConfigRec * pdata)
-{
- int i;
- int num_layouts, num_options;
- pdata->model =
- (kbd_config->model ==
- NULL) ? NULL : g_strdup (kbd_config->model);
-
- num_layouts =
- (kbd_config->layouts_variants ==
- NULL) ? 0 : g_slist_length (kbd_config->layouts_variants);
- num_options =
- (kbd_config->options ==
- NULL) ? 0 : g_slist_length (kbd_config->options);
-
- xkl_debug (150, "Taking %d layouts\n", num_layouts);
- if (num_layouts != 0) {
- GSList *the_layout_variant = kbd_config->layouts_variants;
- char **p1 = pdata->layouts =
- g_new0 (char *, num_layouts + 1);
- char **p2 = pdata->variants =
- g_new0 (char *, num_layouts + 1);
- for (i = num_layouts; --i >= 0;) {
- char *layout, *variant;
- if (gkbd_keyboard_config_split_items
- (the_layout_variant->data, &layout, &variant)
- && variant != NULL) {
- *p1 =
- (layout ==
- NULL) ? g_strdup ("") :
- g_strdup (layout);
- *p2 =
- (variant ==
- NULL) ? g_strdup ("") :
- g_strdup (variant);
- } else {
- *p1 =
- (the_layout_variant->data ==
- NULL) ? g_strdup ("") :
- g_strdup (the_layout_variant->data);
- *p2 = g_strdup ("");
- }
- xkl_debug (150, "Adding [%s]/%p and [%s]/%p\n",
- *p1 ? *p1 : "(nil)", *p1,
- *p2 ? *p2 : "(nil)", *p2);
- p1++;
- p2++;
- the_layout_variant = the_layout_variant->next;
- }
- }
-
- if (num_options != 0) {
- GSList *the_option = kbd_config->options;
- char **p = pdata->options =
- g_new0 (char *, num_options + 1);
- for (i = num_options; --i >= 0;) {
- char *group, *option;
- if (gkbd_keyboard_config_split_items
- (the_option->data, &group, &option)
- && option != NULL)
- *(p++) = g_strdup (option);
- else {
- *(p++) = g_strdup ("");
- xkl_debug (150, "Could not split [%s]\n",
- the_option->data);
- }
- the_option = the_option->next;
- }
- }
-}
-
-static void
-gkbd_keyboard_config_load_params (GkbdKeyboardConfig * kbd_config,
- const gchar * param_names[])
-{
- GError *gerror = NULL;
- gchar *pc;
- GSList *pl;
-
- pc = gconf_client_get_string (kbd_config->conf_client,
- param_names[0], &gerror);
- if (pc == NULL || gerror != NULL) {
- if (gerror != NULL) {
- g_warning ("Error reading configuration:%s\n",
- gerror->message);
- g_error_free (gerror);
- g_free (pc);
- gerror = NULL;
- }
- gkbd_keyboard_config_model_set (kbd_config, NULL);
- } else {
- gkbd_keyboard_config_model_set (kbd_config, pc);
- g_free (pc);
- }
- xkl_debug (150, "Loaded Kbd model: [%s]\n",
- kbd_config->model ? kbd_config->model : "(null)");
-
- gkbd_keyboard_config_layouts_reset (kbd_config);
-
- pl = gconf_client_get_list (kbd_config->conf_client,
- param_names[1],
- GCONF_VALUE_STRING, &gerror);
- if (pl == NULL || gerror != NULL) {
- if (gerror != NULL) {
- g_warning ("Error reading configuration:%s\n",
- gerror->message);
- g_error_free (gerror);
- gerror = NULL;
- }
- }
-
- while (pl != NULL) {
- xkl_debug (150, "Loaded Kbd layout: [%s]\n", pl->data);
- gkbd_keyboard_config_layouts_add_full (kbd_config,
- pl->data);
- pl = pl->next;
- }
- gkbd_keyboard_config_string_list_reset (&pl);
-
- gkbd_keyboard_config_options_reset (kbd_config);
-
- pl = gconf_client_get_list (kbd_config->conf_client,
- param_names[2],
- GCONF_VALUE_STRING, &gerror);
- if (pl == NULL || gerror != NULL) {
- if (gerror != NULL) {
- g_warning ("Error reading configuration:%s\n",
- gerror->message);
- g_error_free (gerror);
- gerror = NULL;
- }
- }
-
- while (pl != NULL) {
- xkl_debug (150, "Loaded Kbd option: [%s]\n", pl->data);
- gkbd_keyboard_config_options_add_full (kbd_config,
- (const gchar *) pl->
- data);
- pl = pl->next;
- }
- gkbd_keyboard_config_string_list_reset (&pl);
-}
-
-static void
-gkbd_keyboard_config_save_params (GkbdKeyboardConfig * kbd_config,
- GConfChangeSet * cs,
- const gchar * param_names[])
-{
- GSList *pl;
-
- if (kbd_config->model)
- gconf_change_set_set_string (cs, param_names[0],
- kbd_config->model);
- else
- gconf_change_set_unset (cs, param_names[0]);
- xkl_debug (150, "Saved Kbd model: [%s]\n",
- kbd_config->model ? kbd_config->model : "(null)");
-
- if (kbd_config->layouts_variants) {
- pl = kbd_config->layouts_variants;
- while (pl != NULL) {
- xkl_debug (150, "Saved Kbd layout: [%s]\n",
- pl->data);
- pl = pl->next;
- }
- gconf_change_set_set_list (cs,
- param_names[1],
- GCONF_VALUE_STRING,
- kbd_config->layouts_variants);
- } else {
- xkl_debug (150, "Saved Kbd layouts: []\n");
- gconf_change_set_unset (cs, param_names[1]);
- }
-
- if (kbd_config->options) {
- pl = kbd_config->options;
- while (pl != NULL) {
- xkl_debug (150, "Saved Kbd option: [%s]\n",
- pl->data);
- pl = pl->next;
- }
- gconf_change_set_set_list (cs,
- param_names[2],
- GCONF_VALUE_STRING,
- kbd_config->options);
- } else {
- xkl_debug (150, "Saved Kbd options: []\n");
- gconf_change_set_unset (cs, param_names[2]);
- }
-}
-
-/**
- * extern GkbdKeyboardConfig config functions
- */
-void
-gkbd_keyboard_config_init (GkbdKeyboardConfig * kbd_config,
- GConfClient * conf_client, XklEngine * engine)
-{
- GError *gerror = NULL;
-
- memset (kbd_config, 0, sizeof (*kbd_config));
- kbd_config->conf_client = conf_client;
- kbd_config->engine = engine;
- g_object_ref (kbd_config->conf_client);
-
- gconf_client_add_dir (kbd_config->conf_client,
- GKBD_KEYBOARD_CONFIG_DIR,
- GCONF_CLIENT_PRELOAD_NONE, &gerror);
- if (gerror != NULL) {
- g_warning ("err: %s\n", gerror->message);
- g_error_free (gerror);
- gerror = NULL;
- }
-}
-
-void
-gkbd_keyboard_config_term (GkbdKeyboardConfig * kbd_config)
-{
- gkbd_keyboard_config_model_set (kbd_config, NULL);
-
- gkbd_keyboard_config_layouts_reset (kbd_config);
-
- g_object_unref (kbd_config->conf_client);
- kbd_config->conf_client = NULL;
-}
-
-void
-gkbd_keyboard_config_load_from_gconf (GkbdKeyboardConfig * kbd_config,
- GkbdKeyboardConfig *
- kbd_config_default)
-{
- gkbd_keyboard_config_load_params (kbd_config,
- GKBD_KEYBOARD_CONFIG_ACTIVE);
-
- if (kbd_config_default != NULL) {
- GSList *pl;
-
- if (kbd_config->model == NULL)
- kbd_config->model =
- g_strdup (kbd_config_default->model);
-
- if (kbd_config->layouts_variants == NULL) {
- pl = kbd_config_default->layouts_variants;
- while (pl != NULL) {
- kbd_config->layouts_variants =
- g_slist_append (kbd_config->
- layouts_variants,
- g_strdup (pl->data));
- pl = pl->next;
- }
- }
-
- if (kbd_config->options == NULL) {
- pl = kbd_config_default->options;
- while (pl != NULL) {
- kbd_config->options =
- g_slist_append (kbd_config->options,
- g_strdup (pl->data));
- pl = pl->next;
- }
- }
- }
-}
-
-void
-gkbd_keyboard_config_load_from_gconf_backup (GkbdKeyboardConfig *
- kbd_config)
-{
- gkbd_keyboard_config_load_params (kbd_config,
- GKBD_KEYBOARD_CONFIG_SYSBACKUP);
-}
-
-void
-gkbd_keyboard_config_load_from_x_current (GkbdKeyboardConfig * kbd_config,
- XklConfigRec * data)
-{
- gboolean own_data = data == NULL;
- if (own_data)
- data = xkl_config_rec_new ();
- if (xkl_config_rec_get_from_server (data, kbd_config->engine))
- gkbd_keyboard_config_copy_from_xkl_config (kbd_config,
- data);
- else
- xkl_debug (150,
- "Could not load keyboard config from server: [%s]\n",
- xkl_get_last_error ());
- if (own_data)
- g_object_unref (G_OBJECT (data));
-}
-
-void
-gkbd_keyboard_config_load_from_x_initial (GkbdKeyboardConfig * kbd_config,
- XklConfigRec * data)
-{
- gboolean own_data = data == NULL;
- if (own_data)
- data = xkl_config_rec_new ();
- if (xkl_config_rec_get_from_backup (data, kbd_config->engine))
- gkbd_keyboard_config_copy_from_xkl_config (kbd_config,
- data);
- else
- xkl_debug (150,
- "Could not load keyboard config from backup: [%s]\n",
- xkl_get_last_error ());
- if (own_data)
- g_object_unref (G_OBJECT (data));
-}
-
-gboolean
-gkbd_keyboard_config_equals (GkbdKeyboardConfig * kbd_config1,
- GkbdKeyboardConfig * kbd_config2)
-{
- if (kbd_config1 == kbd_config2)
- return True;
- if ((kbd_config1->model != kbd_config2->model) &&
- (kbd_config1->model != NULL) &&
- (kbd_config2->model != NULL) &&
- g_ascii_strcasecmp (kbd_config1->model, kbd_config2->model))
- return False;
- return gslist_str_equal (kbd_config1->layouts_variants,
- kbd_config2->layouts_variants)
- && gslist_str_equal (kbd_config1->options,
- kbd_config2->options);
-}
-
-void
-gkbd_keyboard_config_save_to_gconf (GkbdKeyboardConfig * kbd_config)
-{
- GConfChangeSet *cs;
- GError *gerror = NULL;
-
- cs = gconf_change_set_new ();
-
- gkbd_keyboard_config_save_params (kbd_config, cs,
- GKBD_KEYBOARD_CONFIG_ACTIVE);
-
- gconf_client_commit_change_set (kbd_config->conf_client, cs, TRUE,
- &gerror);
- if (gerror != NULL) {
- g_warning ("Error saving active configuration: %s\n",
- gerror->message);
- g_error_free (gerror);
- gerror = NULL;
- }
- gconf_change_set_unref (cs);
-}
-
-void
-gkbd_keyboard_config_save_to_gconf_backup (GkbdKeyboardConfig * kbd_config)
-{
- GConfChangeSet *cs;
- GError *gerror = NULL;
-
- cs = gconf_change_set_new ();
-
- gkbd_keyboard_config_save_params (kbd_config, cs,
- GKBD_KEYBOARD_CONFIG_SYSBACKUP);
-
- gconf_client_commit_change_set (kbd_config->conf_client, cs, TRUE,
- &gerror);
- if (gerror != NULL) {
- g_warning ("Error saving backup configuration: %s\n",
- gerror->message);
- g_error_free (gerror);
- gerror = NULL;
- }
- gconf_change_set_unref (cs);
-}
-
-void
-gkbd_keyboard_config_model_set (GkbdKeyboardConfig * kbd_config,
- const gchar * model_name)
-{
- if (kbd_config->model != NULL)
- g_free (kbd_config->model);
- kbd_config->model =
- (model_name == NULL
- || model_name[0] == '\0') ? NULL : g_strdup (model_name);
-}
-
-void
-gkbd_keyboard_config_layouts_add (GkbdKeyboardConfig * kbd_config,
- const gchar * layout_name,
- const gchar * variant_name)
-{
- const gchar *merged;
- if (layout_name == NULL)
- return;
- merged =
- gkbd_keyboard_config_merge_items (layout_name, variant_name);
- if (merged == NULL)
- return;
- gkbd_keyboard_config_layouts_add_full (kbd_config, merged);
-}
-
-void
-gkbd_keyboard_config_layouts_reset (GkbdKeyboardConfig * kbd_config)
-{
- gkbd_keyboard_config_string_list_reset (&kbd_config->
- layouts_variants);
-}
-
-void
-gkbd_keyboard_config_options_reset (GkbdKeyboardConfig * kbd_config)
-{
- gkbd_keyboard_config_string_list_reset (&kbd_config->options);
-}
-
-void
-gkbd_keyboard_config_options_add (GkbdKeyboardConfig * kbd_config,
- const gchar * group_name,
- const gchar * option_name)
-{
- const gchar *merged;
- if (group_name == NULL || option_name == NULL)
- return;
- merged =
- gkbd_keyboard_config_merge_items (group_name, option_name);
- if (merged == NULL)
- return;
- gkbd_keyboard_config_options_add_full (kbd_config, merged);
-}
-
-gboolean
-gkbd_keyboard_config_options_is_set (GkbdKeyboardConfig * kbd_config,
- const gchar * group_name,
- const gchar * option_name)
-{
- const gchar *merged =
- gkbd_keyboard_config_merge_items (group_name, option_name);
- if (merged == NULL)
- return FALSE;
-
- return NULL != g_slist_find_custom (kbd_config->options, (gpointer)
- merged, (GCompareFunc)
- g_ascii_strcasecmp);
-}
-
-gboolean
-gkbd_keyboard_config_activate (GkbdKeyboardConfig * kbd_config)
-{
- gboolean rv;
- XklConfigRec *data = xkl_config_rec_new ();
-
- gkbd_keyboard_config_copy_to_xkl_config (kbd_config, data);
- rv = xkl_config_rec_activate (data, kbd_config->engine);
- g_object_unref (G_OBJECT (data));
-
- return rv;
-}
-
-void
-gkbd_keyboard_config_start_listen (GkbdKeyboardConfig * kbd_config,
- GConfClientNotifyFunc func,
- gpointer user_data)
-{
- gkbd_desktop_config_add_listener (kbd_config->conf_client,
- GKBD_KEYBOARD_CONFIG_DIR, func,
- user_data,
- &kbd_config->config_listener_id);
-}
-
-void
-gkbd_keyboard_config_stop_listen (GkbdKeyboardConfig * kbd_config)
-{
- gkbd_desktop_config_remove_listener (kbd_config->conf_client,
- &kbd_config->
- config_listener_id);
-}
-
-gboolean
-gkbd_keyboard_config_get_descriptions (XklConfigRegistry * config_registry,
- const gchar * name,
- gchar ** layout_short_descr,
- gchar ** layout_descr,
- gchar ** variant_short_descr,
- gchar ** variant_descr)
-{
- char *layout_name = NULL, *variant_name = NULL;
- if (!gkbd_keyboard_config_split_items
- (name, &layout_name, &variant_name))
- return FALSE;
- return gkbd_keyboard_config_get_lv_descriptions (config_registry,
- layout_name,
- variant_name,
- layout_short_descr,
- layout_descr,
- variant_short_descr,
- variant_descr);
-}
-
-const gchar *
-gkbd_keyboard_config_format_full_layout (const gchar * layout_descr,
- const gchar * variant_descr)
-{
- static gchar full_descr[XKL_MAX_CI_DESC_LENGTH * 2];
- if (variant_descr == NULL)
- g_snprintf (full_descr, sizeof (full_descr), "%s",
- layout_descr);
- else
- g_snprintf (full_descr, sizeof (full_descr), "%s %s",
- layout_descr, variant_descr);
- return full_descr;
-}
-
-gchar *
-gkbd_keyboard_config_to_string (const GkbdKeyboardConfig * config)
-{
- gchar *layouts = NULL, *options = NULL;
- GString *buffer = g_string_new (NULL);
-
- GSList *iter;
- gint count;
- gchar *result;
-
- if (config->layouts_variants) {
- /* g_slist_length is "expensive", so we determinate the length on the fly */
- for (iter = config->layouts_variants, count = 0; iter;
- iter = iter->next, ++count) {
- if (buffer->len)
- g_string_append (buffer, " ");
-
- g_string_append (buffer,
- (const gchar *) iter->data);
- }
-
- /* TRANS: The count is related to the number of options. The %s format specifier should not be modified,
- * left "as is". */
- layouts =
- g_strdup_printf (ngettext
- ("layout \"%s\"", "layouts \"%s\"",
- count), buffer->str);
- g_string_truncate (buffer, 0);
- }
- if (config->options) {
- /* g_slist_length is "expensive", so we determinate the length on the fly */
- for (iter = config->options, count = 0; iter;
- iter = iter->next, ++count) {
- if (buffer->len)
- g_string_append (buffer, " ");
-
- g_string_append (buffer,
- (const gchar *) iter->data);
- }
-
- /* TRANS: The count is related to the number of options. The %s format specifier should not be modified,
- * left "as is". */
- options =
- g_strdup_printf (ngettext
- ("option \"%s\"", "options \"%s\"",
- count), buffer->str);
- g_string_truncate (buffer, 0);
- }
-
- g_string_free (buffer, TRUE);
-
- result =
- g_strdup_printf (_("model \"%s\", %s and %s"), config->model,
- layouts ? layouts : _("no layout"),
- options ? options : _("no options"));
-
- g_free (options);
- g_free (layouts);
-
- return result;
-}
diff --git a/libgnomekbd/gkbd-keyboard-config.h b/libgnomekbd/gkbd-keyboard-config.h
deleted file mode 100644
index 579338a..0000000
--- a/libgnomekbd/gkbd-keyboard-config.h
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef __GKBD_KEYBOARD_CONFIG_H__
-#define __GKBD_KEYBOARD_CONFIG_H__
-
-#include <X11/Xlib.h>
-
-#include <glib.h>
-#include <glib/gslist.h>
-
-#include <gconf/gconf-client.h>
-
-#include <libxklavier/xklavier.h>
-
-extern const gchar GKBD_KEYBOARD_CONFIG_DIR[];
-extern const gchar GKBD_KEYBOARD_CONFIG_KEY_MODEL[];
-extern const gchar GKBD_KEYBOARD_CONFIG_KEY_LAYOUTS[];
-extern const gchar GKBD_KEYBOARD_CONFIG_KEY_OPTIONS[];
-
-/*
- * Keyboard Configuration
- */
-typedef struct _GkbdKeyboardConfig {
- gchar *model;
- GSList *layouts_variants;
- GSList *options;
-
- /* private, transient */
- GConfClient *conf_client;
- int config_listener_id;
- XklEngine *engine;
-} GkbdKeyboardConfig;
-
-/**
- * GkbdKeyboardConfig functions
- */
-extern void gkbd_keyboard_config_init (GkbdKeyboardConfig * kbd_config,
- GConfClient * conf_client,
- XklEngine * engine);
-extern void gkbd_keyboard_config_term (GkbdKeyboardConfig * kbd_config);
-
-extern void gkbd_keyboard_config_load_from_gconf (GkbdKeyboardConfig *
- kbd_config,
- GkbdKeyboardConfig *
- kbd_config_default);
-
-extern void gkbd_keyboard_config_save_to_gconf (GkbdKeyboardConfig *
- kbd_config);
-
-extern void gkbd_keyboard_config_load_from_gconf_backup (GkbdKeyboardConfig
- * kbd_config);
-
-extern void gkbd_keyboard_config_save_to_gconf_backup (GkbdKeyboardConfig *
- kbd_config);
-
-extern void gkbd_keyboard_config_load_from_x_initial (GkbdKeyboardConfig *
- kbd_config,
- XklConfigRec * buf);
-
-extern void gkbd_keyboard_config_load_from_x_current (GkbdKeyboardConfig *
- kbd_config,
- XklConfigRec * buf);
-
-extern void gkbd_keyboard_config_start_listen (GkbdKeyboardConfig *
- kbd_config,
- GConfClientNotifyFunc func,
- gpointer user_data);
-
-extern void gkbd_keyboard_config_stop_listen (GkbdKeyboardConfig *
- kbd_config);
-
-extern gboolean gkbd_keyboard_config_equals (GkbdKeyboardConfig *
- kbd_config1,
- GkbdKeyboardConfig *
- kbd_config2);
-
-extern gboolean gkbd_keyboard_config_activate (GkbdKeyboardConfig *
- kbd_config);
-
-extern const gchar *gkbd_keyboard_config_merge_items (const gchar * parent,
- const gchar * child);
-
-extern gboolean gkbd_keyboard_config_split_items (const gchar * merged,
- gchar ** parent,
- gchar ** child);
-
-extern gboolean gkbd_keyboard_config_get_descriptions (XklConfigRegistry *
- config_registry,
- const gchar * name,
- gchar **
- layout_short_descr,
- gchar **
- layout_descr,
- gchar **
- variant_short_descr,
- gchar **
- variant_descr);
-
-extern const gchar *gkbd_keyboard_config_format_full_layout (const gchar
- *
- layout_descr,
- const gchar *
- variant_descr);
-
-extern gchar *gkbd_keyboard_config_to_string (const GkbdKeyboardConfig *
- config);
-
-#endif
diff --git a/libgnomekbd/gkbd-keyboard-drawing-marshal.list b/libgnomekbd/gkbd-keyboard-drawing-marshal.list
deleted file mode 100644
index 88a875f..0000000
--- a/libgnomekbd/gkbd-keyboard-drawing-marshal.list
+++ /dev/null
@@ -1,2 +0,0 @@
-# $Id$
-VOID:UINT
diff --git a/libgnomekbd/gkbd-keyboard-drawing.c b/libgnomekbd/gkbd-keyboard-drawing.c
deleted file mode 100644
index 829560b..0000000
--- a/libgnomekbd/gkbd-keyboard-drawing.c
+++ /dev/null
@@ -1,1861 +0,0 @@
-/*
- * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#include <config.h>
-#include <gtk/gtk.h>
-#include <gdk/gdkx.h>
-#include <gdk/gdkkeysyms.h>
-#include <X11/XKBlib.h>
-#include <X11/extensions/XKBgeom.h>
-#include <stdlib.h>
-#include <memory.h>
-#include <math.h>
-
-#include <gkbd-keyboard-drawing.h>
-#include <gkbd-keyboard-drawing-marshal.h>
-
-#define noKBDRAW_DEBUG
-
-enum {
- BAD_KEYCODE = 0,
- NUM_SIGNALS
-};
-
-static guint gkbd_keyboard_drawing_signals[NUM_SIGNALS] = { 0 };
-
-static void gkbd_keyboard_drawing_set_mods (GkbdKeyboardDrawing * drawing,
- guint mods);
-
-static gint
-xkb_to_pixmap_coord (GkbdKeyboardDrawing * drawing, gint n)
-{
- return n * drawing->scale_numerator / drawing->scale_denominator;
-}
-
-/* angle is in tenths of a degree; coordinates can be anything as (xkb,
- * pixels, pango) as long as they are all the same */
-static void
-rotate_coordinate (gint origin_x,
- gint origin_y,
- gint x,
- gint y, gint angle, gint * rotated_x, gint * rotated_y)
-{
- *rotated_x =
- origin_x + (x - origin_x) * cos (M_PI * angle / 1800.0) - (y -
- origin_y)
- * sin (M_PI * angle / 1800.0);
- *rotated_y =
- origin_y + (x - origin_x) * sin (M_PI * angle / 1800.0) + (y -
- origin_y)
- * cos (M_PI * angle / 1800.0);
-}
-
-static void
-draw_polygon (GkbdKeyboardDrawing * drawing,
- GdkColor * fill_color,
- gint xkb_x,
- gint xkb_y, XkbPointRec * xkb_points, guint num_points)
-{
- GtkStateType state = GTK_WIDGET_STATE (GTK_WIDGET (drawing));
- GdkGC *gc;
- GdkPoint *points;
- gboolean filled;
- gint i;
-
- if (drawing->pixmap == NULL)
- return;
-
- if (fill_color) {
- gc = gdk_gc_new (GTK_WIDGET (drawing)->window);
- gdk_gc_set_rgb_fg_color (gc, fill_color);
- filled = TRUE;
- } else {
- gc = GTK_WIDGET (drawing)->style->dark_gc[state];
- filled = FALSE;
- }
-
- points = g_new (GdkPoint, num_points);
-
- for (i = 0; i < num_points; i++) {
- points[i].x =
- xkb_to_pixmap_coord (drawing, xkb_x + xkb_points[i].x);
- points[i].y =
- xkb_to_pixmap_coord (drawing, xkb_y + xkb_points[i].y);
- }
-
- gdk_draw_polygon (drawing->pixmap, gc, filled, points, num_points);
-
- g_free (points);
- if (fill_color)
- g_object_unref (gc);
-}
-
-/* x, y, width, height are in the xkb coordinate system */
-static void
-draw_rectangle (GkbdKeyboardDrawing * drawing,
- GdkColor * fill_color,
- gint angle,
- gint xkb_x, gint xkb_y, gint xkb_width, gint xkb_height)
-{
- if (drawing->pixmap == NULL)
- return;
-
- if (angle == 0) {
- GtkStateType state =
- GTK_WIDGET_STATE (GTK_WIDGET (drawing));
- gint x, y, width, height;
- gboolean filled;
- GdkGC *gc;
-
- if (fill_color) {
- gc = gdk_gc_new (GTK_WIDGET (drawing)->window);
- gdk_gc_set_rgb_fg_color (gc, fill_color);
- filled = TRUE;
- } else {
- gc = GTK_WIDGET (drawing)->style->dark_gc[state];
- filled = FALSE;
- }
-
- x = xkb_to_pixmap_coord (drawing, xkb_x);
- y = xkb_to_pixmap_coord (drawing, xkb_y);
- width =
- xkb_to_pixmap_coord (drawing, xkb_x + xkb_width) - x;
- height =
- xkb_to_pixmap_coord (drawing, xkb_y + xkb_height) - y;
-
- gdk_draw_rectangle (drawing->pixmap, gc, filled, x, y,
- width, height);
-
- if (fill_color)
- g_object_unref (gc);
- } else {
- XkbPointRec points[4];
- gint x, y;
-
- points[0].x = xkb_x;
- points[0].y = xkb_y;
- rotate_coordinate (xkb_x, xkb_y, xkb_x + xkb_width, xkb_y,
- angle, &x, &y);
- points[1].x = x;
- points[1].y = y;
- rotate_coordinate (xkb_x, xkb_y, xkb_x + xkb_width,
- xkb_y + xkb_height, angle, &x, &y);
- points[2].x = x;
- points[2].y = y;
- rotate_coordinate (xkb_x, xkb_y, xkb_x, xkb_y + xkb_height,
- angle, &x, &y);
- points[3].x = x;
- points[3].y = y;
-
- /* the points we've calculated are relative to 0,0 */
- draw_polygon (drawing, fill_color, 0, 0, points, 4);
- }
-}
-
-static void
-draw_outline (GkbdKeyboardDrawing * drawing,
- XkbOutlineRec * outline,
- GdkColor * color, gint angle, gint origin_x, gint origin_y)
-{
-#ifdef KBDRAW_DEBUG
- printf ("num_points in %p: %d\n", outline, outline->num_points);
-#endif
-
- if (outline->num_points == 1) {
- if (color)
- draw_rectangle (drawing, color, angle, origin_x,
- origin_y, outline->points[0].x,
- outline->points[0].y);
-
-#ifdef KBDRAW_DEBUG
- printf ("points:%p\n", outline->points);
- printf ("pointsxy:%d %d\n", outline->points[0].x,
- outline->points[0].y);
-#endif
-
- draw_rectangle (drawing, NULL, angle, origin_x, origin_y,
- outline->points[0].x,
- outline->points[0].y);
- } else if (outline->num_points == 2) {
- gint rotated_x0, rotated_y0;
-
- rotate_coordinate (origin_x, origin_y,
- origin_x + outline->points[0].x,
- origin_y + outline->points[0].y,
- angle, &rotated_x0, &rotated_y0);
- if (color)
- draw_rectangle (drawing, color, angle, rotated_x0,
- rotated_y0, outline->points[1].x,
- outline->points[1].y);
-
- draw_rectangle (drawing, NULL, angle, rotated_x0,
- rotated_y0, outline->points[1].x,
- outline->points[1].y);
- } else {
- if (color)
- draw_polygon (drawing, color, origin_x, origin_y,
- outline->points,
- outline->num_points);
-
- draw_polygon (drawing, NULL, origin_x, origin_y,
- outline->points, outline->num_points);
- }
-}
-
-/* see PSColorDef in xkbprint */
-static gboolean
-parse_xkb_color_spec (gchar * colorspec, GdkColor * color)
-{
- glong level;
-
- if (g_ascii_strcasecmp (colorspec, "black") == 0) {
- color->red = 0;
- color->green = 0;
- color->blue = 0;
- } else if (g_ascii_strcasecmp (colorspec, "white") == 0) {
- color->red = 65535;
- color->green = 65535;
- color->blue = 65535;
- } else if (g_ascii_strncasecmp (colorspec, "grey", 4) == 0 ||
- g_ascii_strncasecmp (colorspec, "gray", 4) == 0) {
- level = strtol (colorspec + 4, NULL, 10);
-
- color->red = 65535 - 65535 * level / 100;
- color->green = 65535 - 65535 * level / 100;
- color->blue = 65535 - 65535 * level / 100;
- } else if (g_ascii_strcasecmp (colorspec, "red") == 0) {
- color->red = 65535;
- color->green = 0;
- color->blue = 0;
- } else if (g_ascii_strcasecmp (colorspec, "green") == 0) {
- color->red = 0;
- color->green = 65535;
- color->blue = 0;
- } else if (g_ascii_strcasecmp (colorspec, "blue") == 0) {
- color->red = 0;
- color->green = 0;
- color->blue = 65535;
- } else if (g_ascii_strncasecmp (colorspec, "red", 3) == 0) {
- level = strtol (colorspec + 3, NULL, 10);
-
- color->red = 65535 * level / 100;
- color->green = 0;
- color->blue = 0;
- } else if (g_ascii_strncasecmp (colorspec, "green", 5) == 0) {
- level = strtol (colorspec + 5, NULL, 10);
-
- color->red = 0;
- color->green = 65535 * level / 100;;
- color->blue = 0;
- } else if (g_ascii_strncasecmp (colorspec, "blue", 4) == 0) {
- level = strtol (colorspec + 4, NULL, 10);
-
- color->red = 0;
- color->green = 0;
- color->blue = 65535 * level / 100;
- } else
- return FALSE;
-
- return TRUE;
-}
-
-
-static guint
-find_keycode (GkbdKeyboardDrawing * drawing, gchar * key_name)
-{
- guint i;
-
- if (!drawing->xkb)
- return (gint) (-1);
-
- for (i = drawing->xkb->min_key_code;
- i <= drawing->xkb->max_key_code; i++) {
- if (drawing->xkb->names->keys[i].name[0] == key_name[0]
- && drawing->xkb->names->keys[i].name[1] == key_name[1]
- && drawing->xkb->names->keys[i].name[2] == key_name[2]
- && drawing->xkb->names->keys[i].name[3] == key_name[3])
- return i;
- }
-
- return (guint) (-1);
-}
-
-
-static void
-set_key_label_in_layout (GkbdKeyboardDrawing * drawing,
- PangoLayout * layout, guint keyval)
-{
- gchar buf[5];
- gunichar uc;
-
- switch (keyval) {
- case GDK_Scroll_Lock:
- pango_layout_set_text (layout, "Scroll\nLock", -1);
- break;
-
- case GDK_space:
- pango_layout_set_text (layout, "", -1);
- break;
-
- case GDK_Sys_Req:
- pango_layout_set_text (layout, "Sys Rq", -1);
- break;
-
- case GDK_Page_Up:
- pango_layout_set_text (layout, "Page\nUp", -1);
- break;
-
- case GDK_Page_Down:
- pango_layout_set_text (layout, "Page\nDown", -1);
- break;
-
- case GDK_Num_Lock:
- pango_layout_set_text (layout, "Num\nLock", -1);
- break;
-
- case GDK_KP_Page_Up:
- pango_layout_set_text (layout, "Pg Up", -1);
- break;
-
- case GDK_KP_Page_Down:
- pango_layout_set_text (layout, "Pg Dn", -1);
- break;
-
- case GDK_KP_Home:
- pango_layout_set_text (layout, "Home", -1);
- break;
-
- case GDK_KP_Left:
- pango_layout_set_text (layout, "Left", -1);
- break;
-
- case GDK_KP_End:
- pango_layout_set_text (layout, "End", -1);
- break;
-
- case GDK_KP_Up:
- pango_layout_set_text (layout, "Up", -1);
- break;
-
- case GDK_KP_Begin:
- pango_layout_set_text (layout, "Begin", -1);
- break;
-
- case GDK_KP_Right:
- pango_layout_set_text (layout, "Right", -1);
- break;
-
- case GDK_KP_Enter:
- pango_layout_set_text (layout, "Enter", -1);
- break;
-
- case GDK_KP_Down:
- pango_layout_set_text (layout, "Down", -1);
- break;
-
- case GDK_KP_Insert:
- pango_layout_set_text (layout, "Ins", -1);
- break;
-
- case GDK_KP_Delete:
- pango_layout_set_text (layout, "Del", -1);
- break;
-
- case GDK_dead_grave:
- pango_layout_set_text (layout, "ˋ", -1);
- break;
-
- case GDK_dead_acute:
- pango_layout_set_text (layout, "ˊ", -1);
- break;
-
- case GDK_dead_circumflex:
- pango_layout_set_text (layout, "ˆ", -1);
- break;
-
- case GDK_dead_tilde:
- pango_layout_set_text (layout, "~", -1);
- break;
-
- case GDK_dead_macron:
- pango_layout_set_text (layout, "ˉ", -1);
- break;
-
- case GDK_dead_breve:
- pango_layout_set_text (layout, "˘", -1);
- break;
-
- case GDK_dead_abovedot:
- pango_layout_set_text (layout, "˙", -1);
- break;
-
- case GDK_dead_diaeresis:
- pango_layout_set_text (layout, "¨", -1);
- break;
-
- case GDK_dead_abovering:
- pango_layout_set_text (layout, "˚", -1);
- break;
-
- case GDK_dead_doubleacute:
- pango_layout_set_text (layout, "˝", -1);
- break;
-
- case GDK_dead_caron:
- pango_layout_set_text (layout, "ˇ", -1);
- break;
-
- case GDK_dead_cedilla:
- pango_layout_set_text (layout, "¸", -1);
- break;
-
- case GDK_dead_ogonek:
- pango_layout_set_text (layout, "˛", -1);
- break;
-
- /* case GDK_dead_iota:
- * case GDK_dead_voiced_sound:
- * case GDK_dead_semivoiced_sound: */
-
- case GDK_dead_belowdot:
- pango_layout_set_text (layout, " ̣", -1);
- break;
-
- case GDK_horizconnector:
- pango_layout_set_text (layout, "horiz\nconn", -1);
- break;
-
- case GDK_Mode_switch:
- pango_layout_set_text (layout, "AltGr", -1);
- break;
-
- case GDK_Multi_key:
- pango_layout_set_text (layout, "Compose", -1);
- break;
-
- default:
- uc = gdk_keyval_to_unicode (keyval);
- if (uc != 0 && g_unichar_isgraph (uc)) {
- buf[g_unichar_to_utf8 (uc, buf)] = '\0';
- pango_layout_set_text (layout, buf, -1);
- } else {
- gchar *name = gdk_keyval_name (keyval);
- if (name)
- pango_layout_set_text (layout, name, -1);
- else
- pango_layout_set_text (layout, "", -1);
- }
- }
-}
-
-
-static void
-draw_pango_layout (GkbdKeyboardDrawing * drawing,
- gint angle, gint x, gint y, PangoLayout * layout)
-{
- GtkStateType state = GTK_WIDGET_STATE (GTK_WIDGET (drawing));
- PangoLayoutLine *line;
- gint x_off, y_off;
- gint i;
-
- if (drawing->pixmap == NULL)
- return;
-
- if (angle != drawing->angle) {
- PangoMatrix matrix = PANGO_MATRIX_INIT;
- pango_matrix_rotate (&matrix, -angle / 10.0);
- pango_context_set_matrix (gtk_widget_get_pango_context
- (GTK_WIDGET (drawing)), &matrix);
- pango_layout_context_changed (drawing->layout);
- drawing->angle = angle;
- }
-
- i = 0;
- y_off = 0;
- for (line = pango_layout_get_line (drawing->layout, i);
- line != NULL;
- line = pango_layout_get_line (drawing->layout, ++i)) {
- GSList *runp;
- PangoRectangle line_extents;
-
- x_off = 0;
-
- for (runp = line->runs; runp != NULL; runp = runp->next) {
- PangoGlyphItem *run = runp->data;
- gint j;
-
- for (j = 0; j < run->glyphs->num_glyphs; j++) {
- PangoGlyphGeometry *geometry;
-
- geometry =
- &run->glyphs->glyphs[j].geometry;
-
- x_off += geometry->width;
- }
- }
-
- pango_layout_line_get_extents (line, NULL, &line_extents);
- y_off +=
- line_extents.height +
- pango_layout_get_spacing (drawing->layout);
- }
-
- gdk_draw_layout (drawing->pixmap,
- GTK_WIDGET (drawing)->style->text_gc[state], x, y,
- drawing->layout);
-}
-
-static void
-draw_key_label_helper (GkbdKeyboardDrawing * drawing,
- KeySym keysym,
- gint angle,
- GkbdKeyboardDrawingGroupLevelPosition glp,
- gint x,
- gint y, gint width, gint height, gint padding)
-{
- gint label_x, label_y, label_max_width, ycell;
-
- if (keysym == 0)
- return;
-#ifdef KBDRAW_DEBUG
- printf ("keysym: %04X(%c) at glp: %d\n",
- (unsigned) keysym, (char) keysym, (int) glp);
-#endif
-
- switch (glp) {
- case GKBD_KEYBOARD_DRAWING_POS_TOPLEFT:
- case GKBD_KEYBOARD_DRAWING_POS_BOTTOMLEFT:
- {
- ycell =
- glp == GKBD_KEYBOARD_DRAWING_POS_BOTTOMLEFT;
-
- rotate_coordinate (x, y, x + padding,
- y + padding + (height -
- 2 * padding) *
- ycell * 4 / 7, angle, &label_x,
- &label_y);
- label_max_width =
- PANGO_SCALE * (width - 2 * padding);
- break;
- }
- case GKBD_KEYBOARD_DRAWING_POS_TOPRIGHT:
- case GKBD_KEYBOARD_DRAWING_POS_BOTTOMRIGHT:
- {
- ycell =
- glp == GKBD_KEYBOARD_DRAWING_POS_BOTTOMRIGHT;
-
- rotate_coordinate (x, y,
- x + padding + (width -
- 2 * padding) *
- 4 / 7,
- y + padding + (height -
- 2 * padding) *
- ycell * 4 / 7, angle, &label_x,
- &label_y);
- label_max_width =
- PANGO_SCALE * ((width - 2 * padding) -
- (width - 2 * padding) * 4 / 7);
- break;
- }
- default:
- return;
- }
- set_key_label_in_layout (drawing, drawing->layout, keysym);
- pango_layout_set_width (drawing->layout, label_max_width);
- label_y -= (pango_layout_get_line_count (drawing->layout) - 1) *
- (pango_font_description_get_size (drawing->font_desc) / PANGO_SCALE);
- draw_pango_layout (drawing, angle, label_x, label_y, drawing->layout);
-}
-
-static void
-draw_key_label (GkbdKeyboardDrawing * drawing,
- guint keycode,
- gint angle,
- gint xkb_origin_x,
- gint xkb_origin_y, gint xkb_width, gint xkb_height)
-{
- gint x, y, width, height;
- gint padding;
- gint g, l, glp;
-
- if (!drawing->xkb)
- return;
-
- padding = 23 * drawing->scale_numerator / drawing->scale_denominator; /* 2.3mm */
-
- x = xkb_to_pixmap_coord (drawing, xkb_origin_x);
- y = xkb_to_pixmap_coord (drawing, xkb_origin_y);
- width =
- xkb_to_pixmap_coord (drawing, xkb_origin_x + xkb_width) - x;
- height =
- xkb_to_pixmap_coord (drawing, xkb_origin_y + xkb_height) - y;
-
- for (glp = GKBD_KEYBOARD_DRAWING_POS_TOPLEFT;
- glp < GKBD_KEYBOARD_DRAWING_POS_TOTAL; glp++) {
- if (drawing->groupLevels[glp] == NULL)
- continue;
- g = drawing->groupLevels[glp]->group;
- l = drawing->groupLevels[glp]->level;
-
- if (g < 0 || g >= XkbKeyNumGroups (drawing->xkb, keycode))
- continue;
- if (l < 0
- || l >= XkbKeyGroupWidth (drawing->xkb, keycode, g))
- continue;
-
- /* Skip "exotic" levels like the "Ctrl" level in PC_SYSREQ */
- if (l > 0) {
- guint mods = XkbKeyKeyType (drawing->xkb, keycode, g)->mods.mask;
- if ((mods & (ShiftMask | drawing->l3mod)) == 0)
- continue;
- }
-
- if (drawing->track_modifiers) {
- uint mods_rtrn;
- KeySym keysym;
-
- if (XkbTranslateKeyCode (drawing->xkb, keycode,
- XkbBuildCoreState
- (drawing->mods, g),
- &mods_rtrn, &keysym)) {
- draw_key_label_helper (drawing, keysym,
- angle, glp, x, y,
- width, height,
- padding);
- /* reverse y order */
- }
- } else {
- KeySym keysym;
-
- keysym =
- XkbKeySymEntry (drawing->xkb, keycode, l, g);
-
- draw_key_label_helper (drawing, keysym, angle, glp,
- x, y, width, height,
- padding);
- /* reverse y order */
- }
- }
-}
-
-/* groups are from 0-3 */
-static void
-draw_key (GkbdKeyboardDrawing * drawing, GkbdKeyboardDrawingKey * key)
-{
- XkbShapeRec *shape;
- GdkColor *color;
- /* gint i; */
-
- if (!drawing->xkb)
- return;
-
-#ifdef KBDRAW_DEBUG
- printf ("shape: %p (%p + %d)\n",
- drawing->xkb->geom->shapes + key->xkbkey->shape_ndx,
- drawing->xkb->geom->shapes, key->xkbkey->shape_ndx);
-#endif
-
- shape = drawing->xkb->geom->shapes + key->xkbkey->shape_ndx;
-
- if (key->pressed)
- color =
- &(GTK_WIDGET (drawing)->style->
- base[GTK_STATE_SELECTED]);
- else
- color = drawing->colors + key->xkbkey->color_ndx;
-
-#ifdef KBDRAW_DEBUG
- printf ("outlines: %p(%d)\n", shape->outlines,
- shape->num_outlines);
-#endif
-
- /* draw the primary outline */
- draw_outline (drawing, shape->primary ? shape->primary : shape->outlines,
- color, key->angle, key->origin_x, key->origin_y);
-#if 0
- /* don't draw other outlines for now, since
- * the text placement does not take them into account
- */
- for (i = 0; i < shape->num_outlines; i++)
- {
- if (shape->outlines + i == shape->approx ||
- shape->outlines + i == shape->primary)
- continue;
- draw_outline (drawing, shape->outlines + i, NULL,
- key->angle, key->origin_x, key->origin_y);
- }
-#endif
-
- draw_key_label (drawing, key->keycode, key->angle, key->origin_x,
- key->origin_y, shape->bounds.x2, shape->bounds.y2);
-}
-
-static void
-invalidate_region (GkbdKeyboardDrawing * drawing,
- gdouble angle,
- gint origin_x, gint origin_y, XkbShapeRec * shape)
-{
- GdkPoint points[4];
- gint x_min, x_max, y_min, y_max;
- gint x, y, width, height;
- gint xx, yy;
-
- rotate_coordinate (0, 0, 0, 0, angle, &xx, &yy);
- points[0].x = xx;
- points[0].y = yy;
- rotate_coordinate (0, 0, shape->bounds.x2, 0, angle, &xx, &yy);
- points[1].x = xx;
- points[1].y = yy;
- rotate_coordinate (0, 0, shape->bounds.x2, shape->bounds.y2, angle,
- &xx, &yy);
- points[2].x = xx;
- points[2].y = yy;
- rotate_coordinate (0, 0, 0, shape->bounds.y2, angle, &xx, &yy);
- points[3].x = xx;
- points[3].y = yy;
-
- x_min =
- MIN (MIN (points[0].x, points[1].x),
- MIN (points[2].x, points[3].x));
- x_max =
- MAX (MAX (points[0].x, points[1].x),
- MAX (points[2].x, points[3].x));
- y_min =
- MIN (MIN (points[0].y, points[1].y),
- MIN (points[2].y, points[3].y));
- y_max =
- MAX (MAX (points[0].y, points[1].y),
- MAX (points[2].y, points[3].y));
-
- x = xkb_to_pixmap_coord (drawing, origin_x + x_min) - 6;
- y = xkb_to_pixmap_coord (drawing, origin_y + y_min) - 6;
- width = xkb_to_pixmap_coord (drawing, x_max - x_min) + 12;
- height = xkb_to_pixmap_coord (drawing, y_max - y_min) + 12;
-
- gtk_widget_queue_draw_area (GTK_WIDGET (drawing), x, y, width,
- height);
-}
-
-static void
-invalidate_indicator_doodad_region (GkbdKeyboardDrawing * drawing,
- GkbdKeyboardDrawingDoodad * doodad)
-{
- if (!drawing->xkb)
- return;
-
- invalidate_region (drawing,
- doodad->angle,
- doodad->origin_x +
- doodad->doodad->indicator.left,
- doodad->origin_y +
- doodad->doodad->indicator.top,
- &drawing->xkb->geom->shapes[doodad->doodad->
- indicator.
- shape_ndx]);
-}
-
-static void
-invalidate_key_region (GkbdKeyboardDrawing * drawing,
- GkbdKeyboardDrawingKey * key)
-{
- if (!drawing->xkb)
- return;
-
- invalidate_region (drawing,
- key->angle,
- key->origin_x,
- key->origin_y,
- &drawing->xkb->geom->shapes[key->xkbkey->
- shape_ndx]);
-}
-
-static void
-draw_text_doodad (GkbdKeyboardDrawing * drawing,
- GkbdKeyboardDrawingDoodad * doodad,
- XkbTextDoodadRec * text_doodad)
-{
- gint x, y;
- if (!drawing->xkb)
- return;
-
- x = xkb_to_pixmap_coord (drawing,
- doodad->origin_x + text_doodad->left);
- y = xkb_to_pixmap_coord (drawing,
- doodad->origin_y + text_doodad->top);
-
- pango_layout_set_text (drawing->layout, text_doodad->text, -1);
- draw_pango_layout (drawing, doodad->angle, x, y, drawing->layout);
-}
-
-static void
-draw_indicator_doodad (GkbdKeyboardDrawing * drawing,
- GkbdKeyboardDrawingDoodad * doodad,
- XkbIndicatorDoodadRec * indicator_doodad)
-{
- GdkColor *color;
- XkbShapeRec *shape;
- gint i;
-
- if (!drawing->xkb)
- return;
-
- shape = drawing->xkb->geom->shapes + indicator_doodad->shape_ndx;
-
- color = drawing->colors + (doodad->on ?
- indicator_doodad->on_color_ndx :
- indicator_doodad->off_color_ndx);
-
- for (i = 0; i < 1; i++)
- draw_outline (drawing, shape->outlines + i, color,
- doodad->angle,
- doodad->origin_x + indicator_doodad->left,
- doodad->origin_y + indicator_doodad->top);
-}
-
-static void
-draw_shape_doodad (GkbdKeyboardDrawing * drawing,
- GkbdKeyboardDrawingDoodad * doodad,
- XkbShapeDoodadRec * shape_doodad)
-{
- XkbShapeRec *shape;
- GdkColor *color;
- gint i;
-
- if (!drawing->xkb)
- return;
-
- shape = drawing->xkb->geom->shapes + shape_doodad->shape_ndx;
- color = drawing->colors + shape_doodad->color_ndx;
-
- /* draw the primary outline filled */
- draw_outline (drawing, shape->primary ? shape->primary : shape->outlines,
- color, doodad->angle,
- doodad->origin_x + shape_doodad->left,
- doodad->origin_y + shape_doodad->top);
-
- /* stroke the other outlines */
- for (i = 0; i < shape->num_outlines; i++) {
- if (shape->outlines + i == shape->approx ||
- shape->outlines + i == shape->primary)
- continue;
- draw_outline (drawing, shape->outlines + i, NULL, doodad->angle,
- doodad->origin_x + shape_doodad->left,
- doodad->origin_y + shape_doodad->top);
- }
-}
-
-static void
-draw_doodad (GkbdKeyboardDrawing * drawing,
- GkbdKeyboardDrawingDoodad * doodad)
-{
- switch (doodad->doodad->any.type) {
- case XkbOutlineDoodad:
- case XkbSolidDoodad:
- draw_shape_doodad (drawing, doodad,
- &doodad->doodad->shape);
- break;
-
- case XkbTextDoodad:
- draw_text_doodad (drawing, doodad, &doodad->doodad->text);
- break;
-
- case XkbIndicatorDoodad:
- draw_indicator_doodad (drawing, doodad,
- &doodad->doodad->indicator);
- break;
-
- case XkbLogoDoodad:
- /* g_print ("draw_doodad: logo: %s\n", doodad->doodad->logo.logo_name); */
- /* XkbLogoDoodadRec is essentially a subclass of XkbShapeDoodadRec */
- draw_shape_doodad (drawing, doodad,
- &doodad->doodad->shape);
- break;
- }
-}
-
-static void
-draw_keyboard_item (GkbdKeyboardDrawingItem * item,
- GkbdKeyboardDrawing * drawing)
-{
- if (!drawing->xkb)
- return;
-
- switch (item->type) {
- case GKBD_KEYBOARD_DRAWING_ITEM_TYPE_KEY:
- draw_key (drawing, (GkbdKeyboardDrawingKey *) item);
- break;
-
- case GKBD_KEYBOARD_DRAWING_ITEM_TYPE_DOODAD:
- draw_doodad (drawing, (GkbdKeyboardDrawingDoodad *) item);
- break;
- }
-}
-
-static void
-draw_keyboard (GkbdKeyboardDrawing * drawing)
-{
- GtkStateType state = GTK_WIDGET_STATE (GTK_WIDGET (drawing));
- gint pixw, pixh;
-
- if (!drawing->xkb)
- return;
-
- pixw = GTK_WIDGET (drawing)->allocation.width;
- pixh = GTK_WIDGET (drawing)->allocation.height;
-
- drawing->pixmap =
- gdk_pixmap_new (GTK_WIDGET (drawing)->window, pixw, pixh, -1);
-
- /* blank background */
- gdk_draw_rectangle (drawing->pixmap,
- GTK_WIDGET (drawing)->style->base_gc[state],
- TRUE, 0, 0, pixw, pixh);
-
- if (drawing->xkb == NULL)
- return;
-
-#ifdef KBDRAW_DEBUG
- printf ("mods: %d\n", drawing->mods);
-#endif
-
- g_list_foreach (drawing->keyboard_items,
- (GFunc) draw_keyboard_item, drawing);
-}
-
-static void
-alloc_pango_layout (GkbdKeyboardDrawing * drawing)
-{
- PangoContext *context =
- gtk_widget_get_pango_context (GTK_WIDGET (drawing));
- drawing->layout = pango_layout_new (context);
- pango_layout_set_ellipsize (drawing->layout, PANGO_ELLIPSIZE_END);
-}
-
-static void
-free_pango_layout (GkbdKeyboardDrawing * drawing)
-{
- g_object_unref (G_OBJECT (drawing->layout));
- drawing->layout = NULL;
-}
-
-static gboolean
-expose_event (GtkWidget * widget,
- GdkEventExpose * event, GkbdKeyboardDrawing * drawing)
-{
- GtkStateType state = GTK_WIDGET_STATE (GTK_WIDGET (drawing));
-
- if (!drawing->xkb)
- return FALSE;
-
- if (drawing->pixmap == NULL)
- return FALSE;
-
- gdk_draw_drawable (widget->window,
- widget->style->fg_gc[state],
- drawing->pixmap,
- event->area.x, event->area.y,
- event->area.x, event->area.y,
- event->area.width, event->area.height);
-
- if (GTK_WIDGET_HAS_FOCUS (widget))
- gtk_paint_focus (widget->style, widget->window,
- GTK_WIDGET_STATE (widget), &event->area,
- widget, "keyboard-drawing",
- 0, 0,
- widget->allocation.width,
- widget->allocation.height);
-
- return FALSE;
-}
-
-static gboolean
-idle_redraw (gpointer user_data)
-{
- GkbdKeyboardDrawing *drawing = user_data;
-
- drawing->idle_redraw = 0;
- draw_keyboard (drawing);
- gtk_widget_queue_draw (GTK_WIDGET (drawing));
- return FALSE;
-}
-
-static void
-size_allocate (GtkWidget * widget,
- GtkAllocation * allocation, GkbdKeyboardDrawing * drawing)
-{
- if (!drawing->xkb)
- return;
-
- if (drawing->pixmap) {
- g_object_unref (drawing->pixmap);
- drawing->pixmap = NULL;
- }
-
- if (drawing->xkb->geom->width_mm <= 0
- || drawing->xkb->geom->height_mm <= 0) {
- g_critical
- ("keyboard geometry reports width or height as zero!");
- return;
- }
-
- if (allocation->width * drawing->xkb->geom->height_mm <
- allocation->height * drawing->xkb->geom->width_mm) {
- drawing->scale_numerator = allocation->width;
- drawing->scale_denominator = drawing->xkb->geom->width_mm;
- } else {
- drawing->scale_numerator = allocation->height;
- drawing->scale_denominator = drawing->xkb->geom->height_mm;
- }
-
- pango_font_description_set_size (drawing->font_desc,
- 36000 * drawing->scale_numerator /
- drawing->scale_denominator);
- pango_layout_set_spacing (drawing->layout,
- -8000 * drawing->scale_numerator /
- drawing->scale_denominator);
- pango_layout_set_font_description (drawing->layout,
- drawing->font_desc);
-
- if (!drawing->idle_redraw)
- drawing->idle_redraw = g_idle_add (idle_redraw, drawing);
-}
-
-static gint
-key_event (GtkWidget * widget,
- GdkEventKey * event, GkbdKeyboardDrawing * drawing)
-{
- GkbdKeyboardDrawingKey *key;
- if (!drawing->xkb)
- return FALSE;
-
- key = drawing->keys + event->hardware_keycode;
-
- if (event->hardware_keycode > drawing->xkb->max_key_code ||
- event->hardware_keycode < drawing->xkb->min_key_code ||
- key->xkbkey == NULL) {
- g_signal_emit (drawing,
- gkbd_keyboard_drawing_signals[BAD_KEYCODE],
- 0, event->hardware_keycode);
- return TRUE;
- }
-
- if ((event->type == GDK_KEY_PRESS && key->pressed) ||
- (event->type == GDK_KEY_RELEASE && !key->pressed))
- return TRUE;
- /* otherwise this event changes the state we believed we had before */
-
- key->pressed = (event->type == GDK_KEY_PRESS);
-
- draw_key (drawing, key);
-
- invalidate_key_region (drawing, key);
-
- return TRUE;
-}
-
-static gint
-button_press_event (GtkWidget * widget,
- GdkEventButton * event, GkbdKeyboardDrawing * drawing)
-{
- if (!drawing->xkb)
- return FALSE;
-
- gtk_widget_grab_focus (widget);
- return FALSE;
-}
-
-static gboolean
-unpress_keys (GkbdKeyboardDrawing * drawing)
-{
- gint i;
-
- if (!drawing->xkb)
- return FALSE;
-
- for (i = drawing->xkb->min_key_code;
- i <= drawing->xkb->max_key_code; i++)
- if (drawing->keys[i].pressed) {
- drawing->keys[i].pressed = FALSE;
- draw_key (drawing, drawing->keys + i);
- invalidate_key_region (drawing, drawing->keys + i);
- }
-
- return FALSE;
-}
-
-static gint
-focus_event (GtkWidget * widget,
- GdkEventFocus * event, GkbdKeyboardDrawing * drawing)
-{
- if (event->in && drawing->timeout > 0) {
- g_source_remove (drawing->timeout);
- drawing->timeout = 0;
- } else
- drawing->timeout =
- g_timeout_add (120, (GSourceFunc) unpress_keys,
- drawing);
-
- return FALSE;
-}
-
-static gint
-compare_keyboard_item_priorities (GkbdKeyboardDrawingItem * a,
- GkbdKeyboardDrawingItem * b)
-{
- if (a->priority > b->priority)
- return 1;
- else if (a->priority < b->priority)
- return -1;
- else
- return 0;
-}
-
-static void
-init_indicator_doodad (GkbdKeyboardDrawing * drawing,
- XkbDoodadRec * xkbdoodad,
- GkbdKeyboardDrawingDoodad * doodad)
-{
- if (!drawing->xkb)
- return;
-
- if (xkbdoodad->any.type == XkbIndicatorDoodad) {
- gint index;
- Atom iname = 0;
- Atom sname = xkbdoodad->indicator.name;
- unsigned long phys_indicators =
- drawing->xkb->indicators->phys_indicators;
- Atom *pind = drawing->xkb->names->indicators;
-
-#ifdef KBDRAW_DEBUG
- printf ("Looking for %d[%s]\n",
- (int) sname, XGetAtomName (drawing->display,
- sname));
-#endif
-
- for (index = 0; index < XkbNumIndicators; index++) {
- iname = *pind++;
- /* name matches and it is real */
- if (iname == sname
- && (phys_indicators & (1 << index)))
- break;
- if (iname == 0)
- break;
- }
- if (iname == 0)
- g_warning ("Could not find indicator %d [%s]\n",
- (int) sname,
- XGetAtomName (drawing->display, sname));
- else {
-#ifdef KBDRAW_DEBUG
- printf ("Found in xkbdesc as %d\n", index);
-#endif
- drawing->physical_indicators[index] = doodad;
- /* Trying to obtain the real state, but if fail - just assume OFF */
- if (!XkbGetNamedIndicator
- (drawing->display, sname, NULL, &doodad->on,
- NULL, NULL))
- doodad->on = 0;
- }
- }
-}
-
-static void
-init_keys_and_doodads (GkbdKeyboardDrawing * drawing)
-{
- gint i, j, k;
- gint x, y;
-
- if (!drawing->xkb)
- return;
-
- for (i = 0; i < drawing->xkb->geom->num_doodads; i++) {
- XkbDoodadRec *xkbdoodad = drawing->xkb->geom->doodads + i;
- GkbdKeyboardDrawingDoodad *doodad =
- g_new (GkbdKeyboardDrawingDoodad, 1);
-
- doodad->type = GKBD_KEYBOARD_DRAWING_ITEM_TYPE_DOODAD;
- doodad->origin_x = 0;
- doodad->origin_y = 0;
- doodad->angle = 0;
- doodad->priority = xkbdoodad->any.priority * 256 * 256;
- doodad->doodad = xkbdoodad;
-
- init_indicator_doodad (drawing, xkbdoodad, doodad);
-
- drawing->keyboard_items =
- g_list_append (drawing->keyboard_items, doodad);
- }
-
- for (i = 0; i < drawing->xkb->geom->num_sections; i++) {
-#ifdef KBDRAW_DEBUG
- printf ("initing section %d\n", i);
-#endif
- XkbSectionRec *section = drawing->xkb->geom->sections + i;
- guint priority;
-
- x = section->left;
- y = section->top;
- priority = section->priority * 256 * 256;
-
- for (j = 0; j < section->num_rows; j++) {
- XkbRowRec *row = section->rows + j;
-
-#ifdef KBDRAW_DEBUG
- printf (" initing row %d\n", j);
-#endif
- x = section->left + row->left;
- y = section->top + row->top;
-
- for (k = 0; k < row->num_keys; k++) {
- XkbKeyRec *xkbkey = row->keys + k;
- GkbdKeyboardDrawingKey *key;
- XkbShapeRec *shape =
- drawing->xkb->geom->shapes +
- xkbkey->shape_ndx;
- guint keycode = find_keycode (drawing,
- xkbkey->name.
- name);
-
-#ifdef KBDRAW_DEBUG
- printf
- (" initing key %d, shape: %p(%p + %d), code: %d\n",
- k, shape, drawing->xkb->geom->shapes,
- xkbkey->shape_ndx, keycode);
-#endif
- if (row->vertical)
- y += xkbkey->gap;
- else
- x += xkbkey->gap;
-
- if (keycode >= drawing->xkb->min_key_code
- && keycode <=
- drawing->xkb->max_key_code)
- key = drawing->keys + keycode;
- else {
- g_warning
- ("key %4.4s: keycode = %u; not in range %d..%d\n",
- xkbkey->name.name, keycode,
- drawing->xkb->min_key_code,
- drawing->xkb->max_key_code);
-
- key =
- g_new0 (GkbdKeyboardDrawingKey,
- 1);
- }
-
- key->type =
- GKBD_KEYBOARD_DRAWING_ITEM_TYPE_KEY;
- key->xkbkey = xkbkey;
- key->angle = section->angle;
- rotate_coordinate (section->left,
- section->top, x, y,
- section->angle,
- &key->origin_x,
- &key->origin_y);
- key->priority = priority;
- key->keycode = keycode;
-
- drawing->keyboard_items =
- g_list_append (drawing->keyboard_items,
- key);
-
- if (row->vertical)
- y += shape->bounds.y2;
- else
- x += shape->bounds.x2;
-
- priority++;
- }
- }
-
- for (j = 0; j < section->num_doodads; j++) {
- XkbDoodadRec *xkbdoodad = section->doodads + j;
- GkbdKeyboardDrawingDoodad *doodad =
- g_new (GkbdKeyboardDrawingDoodad, 1);
-
- doodad->type =
- GKBD_KEYBOARD_DRAWING_ITEM_TYPE_DOODAD;
- doodad->origin_x = x;
- doodad->origin_y = y;
- doodad->angle = section->angle;
- doodad->priority =
- priority + xkbdoodad->any.priority;
- doodad->doodad = xkbdoodad;
-
- init_indicator_doodad (drawing, xkbdoodad, doodad);
-
- drawing->keyboard_items =
- g_list_append (drawing->keyboard_items,
- doodad);
- }
- }
-
- drawing->keyboard_items = g_list_sort (drawing->keyboard_items,
- (GCompareFunc)
- compare_keyboard_item_priorities);
-}
-
-static void
-init_colors (GkbdKeyboardDrawing * drawing)
-{
- gboolean result;
- gint i;
-
- if (!drawing->xkb)
- return;
-
- drawing->colors = g_new (GdkColor, drawing->xkb->geom->num_colors);
-
- for (i = 0; i < drawing->xkb->geom->num_colors; i++) {
- result =
- parse_xkb_color_spec (drawing->xkb->geom->colors[i].
- spec, drawing->colors + i);
-
- if (!result)
- g_warning
- ("init_colors: unable to parse color %s\n",
- drawing->xkb->geom->colors[i].spec);
- }
-}
-
-static void
-free_cdik ( /*colors doodads indicators keys */
- GkbdKeyboardDrawing * drawing)
-{
- GList *itemp;
-
- if (!drawing->xkb)
- return;
-
- for (itemp = drawing->keyboard_items; itemp; itemp = itemp->next) {
- GkbdKeyboardDrawingItem *item = itemp->data;
- GkbdKeyboardDrawingKey *key;
-
- switch (item->type) {
- case GKBD_KEYBOARD_DRAWING_ITEM_TYPE_DOODAD:
- g_free (item);
- break;
-
- case GKBD_KEYBOARD_DRAWING_ITEM_TYPE_KEY:
- key = (GkbdKeyboardDrawingKey *) item;
- if (key->keycode < drawing->xkb->min_key_code ||
- key->keycode > drawing->xkb->max_key_code)
- g_free (key);
- /* otherwise it's part of the array */
- break;
- }
- }
-
- g_list_free (drawing->keyboard_items);
- drawing->keyboard_items = NULL;
-
- g_free (drawing->keys);
- g_free (drawing->colors);
-}
-
-static void
-alloc_cdik (GkbdKeyboardDrawing * drawing)
-{
- drawing->physical_indicators_size =
- drawing->xkb->indicators->phys_indicators + 1;
- drawing->physical_indicators =
- g_new0 (GkbdKeyboardDrawingDoodad *,
- drawing->physical_indicators_size);
- drawing->keys =
- g_new0 (GkbdKeyboardDrawingKey,
- drawing->xkb->max_key_code + 1);
-}
-
-static GdkFilterReturn
-xkb_state_notify_event_filter (GdkXEvent * gdkxev,
- GdkEvent * event,
- GkbdKeyboardDrawing * drawing)
-{
-#define group_change_mask (XkbGroupStateMask | XkbGroupBaseMask | XkbGroupLatchMask | XkbGroupLockMask)
-#define modifier_change_mask (XkbModifierStateMask | XkbModifierBaseMask | XkbModifierLatchMask | XkbModifierLockMask)
-
- if (!drawing->xkb)
- return GDK_FILTER_CONTINUE;
-
- if (((XEvent *) gdkxev)->type == drawing->xkb_event_type) {
- XkbEvent *kev = (XkbEvent *) gdkxev;
- switch (kev->any.xkb_type) {
- case XkbStateNotify:
- if (((kev->state.changed & modifier_change_mask) &&
- drawing->track_modifiers)) {
- free_cdik (drawing);
- if (drawing->track_modifiers)
- gkbd_keyboard_drawing_set_mods
- (drawing,
- kev->state.compat_state);
- drawing->keys =
- g_new0 (GkbdKeyboardDrawingKey,
- drawing->xkb->max_key_code +
- 1);
- size_allocate (GTK_WIDGET (drawing),
- &(GTK_WIDGET (drawing)->
- allocation), drawing);
-
- init_keys_and_doodads (drawing);
- init_colors (drawing);
- }
- break;
-
- case XkbIndicatorStateNotify:
- {
- /* Good question: should we track indicators when the keyboard is
- NOT really taken from the screen */
- XkbIndicatorNotifyEvent *iev =
- &((XkbEvent *) gdkxev)->indicators;
- gint i;
-
- for (i = 0;
- i <=
- drawing->xkb->indicators->
- phys_indicators; i++)
- if (drawing->
- physical_indicators[i] != NULL
- && (iev->changed & 1 << i)) {
- gint state =
- (iev->
- state & 1 << i) !=
- FALSE;
-
- if ((state
- && !drawing->
- physical_indicators
- [i]->on) || (!state
- &&
- drawing->
- physical_indicators
- [i]->
- on)) {
- drawing->
- physical_indicators
- [i]->on =
- state;
- draw_doodad
- (drawing,
- drawing->
- physical_indicators
- [i]);
- invalidate_indicator_doodad_region
- (drawing,
- drawing->
- physical_indicators
- [i]);
- }
- }
- }
- break;
-
- case XkbIndicatorMapNotify:
- case XkbControlsNotify:
- case XkbNamesNotify:
- case XkbNewKeyboardNotify:
- {
- XkbStateRec state;
- memset (&state, 0, sizeof (state));
- XkbGetState (drawing->display,
- XkbUseCoreKbd, &state);
- if (drawing->track_modifiers)
- gkbd_keyboard_drawing_set_mods
- (drawing, state.compat_state);
- if (drawing->track_config)
- gkbd_keyboard_drawing_set_keyboard
- (drawing, NULL);
- }
- break;
- }
- }
-
- return GDK_FILTER_CONTINUE;
-}
-
-static void
-destroy (GkbdKeyboardDrawing * drawing)
-{
- free_pango_layout (drawing);
- gdk_window_remove_filter (NULL, (GdkFilterFunc)
- xkb_state_notify_event_filter, drawing);
- if (drawing->timeout > 0) {
- g_source_remove (drawing->timeout);
- drawing->timeout = 0;
- }
- if (drawing->idle_redraw > 0) {
- g_source_remove (drawing->idle_redraw);
- drawing->idle_redraw = 0;
- }
-
- g_object_unref (drawing->pixmap);
-}
-
-static void
-style_changed (GkbdKeyboardDrawing * drawing)
-{
- pango_layout_context_changed (drawing->layout);
-}
-
-static void
-gkbd_keyboard_drawing_init (GkbdKeyboardDrawing * drawing)
-{
- gint opcode = 0, error = 0, major = 1, minor = 0;
- gint mask;
-
- drawing->display =
- GDK_DISPLAY_XDISPLAY (gdk_display_get_default ());
- printf ("dpy: %p\n", drawing->display);
-
- if (!XkbQueryExtension
- (drawing->display, &opcode, &drawing->xkb_event_type, &error,
- &major, &minor))
- g_critical
- ("XkbQueryExtension failed! Stuff probably won't work.");
-
- printf ("evt/error/major/minor: %d/%d/%d/%d\n",
- drawing->xkb_event_type, error, major, minor);
-
- /* XXX: this stuff probably doesn't matter.. also, gdk_screen_get_default can fail */
- if (gtk_widget_has_screen (GTK_WIDGET (drawing)))
- drawing->screen_num =
- gdk_screen_get_number (gtk_widget_get_screen
- (GTK_WIDGET (drawing)));
- else
- drawing->screen_num =
- gdk_screen_get_number (gdk_screen_get_default ());
-
- drawing->pixmap = NULL;
- alloc_pango_layout (drawing);
-
- drawing->font_desc =
- pango_font_description_copy (GTK_WIDGET (drawing)->style->
- font_desc);
- drawing->keyboard_items = NULL;
- drawing->colors = NULL;
- drawing->angle = 0;
- drawing->scale_numerator = 1;
- drawing->scale_denominator = 1;
-
- drawing->track_modifiers = 0;
- drawing->track_config = 0;
-
- gtk_widget_set_double_buffered (GTK_WIDGET (drawing), FALSE);
-
- /* XXX: XkbClientMapMask | XkbIndicatorMapMask | XkbNamesMask | XkbGeometryMask */
- drawing->xkb = XkbGetKeyboard (drawing->display,
- XkbGBN_GeometryMask |
- XkbGBN_KeyNamesMask |
- XkbGBN_OtherNamesMask |
- XkbGBN_SymbolsMask |
- XkbGBN_IndicatorMapMask,
- XkbUseCoreKbd);
- if (drawing->xkb == NULL) {
- g_critical
- ("XkbGetKeyboard failed to get keyboard from the server!");
- return;
- }
-
- XkbGetNames (drawing->display, XkbAllNamesMask, drawing->xkb);
- drawing->l3mod = XkbKeysymToModifiers (drawing->display,
- GDK_ISO_Level3_Shift);
-
- drawing->xkbOnDisplay = TRUE;
-
- alloc_cdik (drawing);
-
- XkbSelectEventDetails (drawing->display, XkbUseCoreKbd,
- XkbIndicatorStateNotify,
- drawing->xkb->indicators->phys_indicators,
- drawing->xkb->indicators->phys_indicators);
-
- mask =
- (XkbStateNotifyMask | XkbNamesNotifyMask |
- XkbControlsNotifyMask | XkbIndicatorMapNotifyMask |
- XkbNewKeyboardNotifyMask);
- XkbSelectEvents (drawing->display, XkbUseCoreKbd, mask, mask);
-
- mask = XkbGroupStateMask | XkbModifierStateMask;
- XkbSelectEventDetails (drawing->display, XkbUseCoreKbd,
- XkbStateNotify, mask, mask);
-
- mask = (XkbGroupNamesMask | XkbIndicatorNamesMask);
- XkbSelectEventDetails (drawing->display, XkbUseCoreKbd,
- XkbNamesNotify, mask, mask);
- init_keys_and_doodads (drawing);
- init_colors (drawing);
-
- /* required to get key events */
- GTK_WIDGET_SET_FLAGS (GTK_WIDGET (drawing), GTK_CAN_FOCUS);
-
- gtk_widget_set_events (GTK_WIDGET (drawing),
- GDK_EXPOSURE_MASK | GDK_KEY_PRESS_MASK |
- GDK_KEY_RELEASE_MASK | GDK_BUTTON_PRESS_MASK
- | GDK_FOCUS_CHANGE_MASK);
- g_signal_connect (G_OBJECT (drawing), "expose-event",
- G_CALLBACK (expose_event), drawing);
- g_signal_connect (G_OBJECT (drawing), "key-press-event",
- G_CALLBACK (key_event), drawing);
- g_signal_connect (G_OBJECT (drawing), "key-release-event",
- G_CALLBACK (key_event), drawing);
- g_signal_connect (G_OBJECT (drawing), "button-press-event",
- G_CALLBACK (button_press_event), drawing);
- g_signal_connect (G_OBJECT (drawing), "focus-out-event",
- G_CALLBACK (focus_event), drawing);
- g_signal_connect (G_OBJECT (drawing), "focus-in-event",
- G_CALLBACK (focus_event), drawing);
- g_signal_connect (G_OBJECT (drawing), "size-allocate",
- G_CALLBACK (size_allocate), drawing);
- g_signal_connect (G_OBJECT (drawing), "destroy",
- G_CALLBACK (destroy), drawing);
- g_signal_connect (G_OBJECT (drawing), "style-set",
- G_CALLBACK (style_changed), drawing);
-
- gdk_window_add_filter (NULL, (GdkFilterFunc)
- xkb_state_notify_event_filter, drawing);
-}
-
-GtkWidget *
-gkbd_keyboard_drawing_new (void)
-{
- return
- GTK_WIDGET (g_object_new
- (gkbd_keyboard_drawing_get_type (), NULL));
-}
-
-static void
-gkbd_keyboard_drawing_class_init (GkbdKeyboardDrawingClass * klass)
-{
- klass->bad_keycode = NULL;
-
- gkbd_keyboard_drawing_signals[BAD_KEYCODE] =
- g_signal_new ("bad-keycode", gkbd_keyboard_drawing_get_type (),
- G_SIGNAL_RUN_FIRST,
- G_STRUCT_OFFSET (GkbdKeyboardDrawingClass,
- bad_keycode), NULL, NULL,
- gkbd_keyboard_drawing_VOID__UINT, G_TYPE_NONE, 1,
- G_TYPE_UINT);
-}
-
-GType
-gkbd_keyboard_drawing_get_type (void)
-{
- static GType gkbd_keyboard_drawing_type = 0;
-
- if (!gkbd_keyboard_drawing_type) {
- static const GTypeInfo gkbd_keyboard_drawing_info = {
- sizeof (GkbdKeyboardDrawingClass),
- NULL, /* base_init */
- NULL, /* base_finalize */
- (GClassInitFunc) gkbd_keyboard_drawing_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (GkbdKeyboardDrawing),
- 0, /* n_preallocs */
- (GInstanceInitFunc) gkbd_keyboard_drawing_init,
- };
-
- gkbd_keyboard_drawing_type =
- g_type_register_static (GTK_TYPE_DRAWING_AREA,
- "GkbdKeyboardDrawing",
- &gkbd_keyboard_drawing_info,
- 0);
- }
-
- return gkbd_keyboard_drawing_type;
-}
-
-void
-gkbd_keyboard_drawing_set_mods (GkbdKeyboardDrawing * drawing, guint mods)
-{
-#ifdef KBDRAW_DEBUG
- printf ("set_mods: %d\n", mods);
-#endif
- if (mods != drawing->mods) {
- drawing->mods = mods;
- gtk_widget_queue_draw (GTK_WIDGET (drawing));
- }
-}
-
-/* returns a pixbuf with the keyboard drawing at the current pixel size
- * (which can then be saved to disk, etc) */
-GdkPixbuf *
-gkbd_keyboard_drawing_get_pixbuf (GkbdKeyboardDrawing * drawing)
-{
- if (drawing->pixmap == NULL)
- draw_keyboard (drawing);
-
- return gdk_pixbuf_get_from_drawable (NULL, drawing->pixmap, NULL,
- 0, 0, 0, 0,
- xkb_to_pixmap_coord (drawing,
- drawing->
- xkb->
- geom->
- width_mm),
- xkb_to_pixmap_coord (drawing,
- drawing->
- xkb->
- geom->
- height_mm));
-}
-
-gboolean
-gkbd_keyboard_drawing_set_keyboard (GkbdKeyboardDrawing * drawing,
- XkbComponentNamesRec * names)
-{
- free_cdik (drawing);
- if (drawing->xkb)
- XkbFreeKeyboard (drawing->xkb, 0, TRUE); /* free_all = TRUE */
- drawing->xkb = NULL;
-
- if (names) {
- drawing->xkb =
- XkbGetKeyboardByName (drawing->display, XkbUseCoreKbd,
- names, 0,
- XkbGBN_GeometryMask |
- XkbGBN_KeyNamesMask |
- XkbGBN_OtherNamesMask |
- XkbGBN_ClientSymbolsMask |
- XkbGBN_IndicatorMapMask, FALSE);
- drawing->xkbOnDisplay = FALSE;
- } else {
- drawing->xkb = XkbGetKeyboard (drawing->display,
- XkbGBN_GeometryMask |
- XkbGBN_KeyNamesMask |
- XkbGBN_OtherNamesMask |
- XkbGBN_SymbolsMask |
- XkbGBN_IndicatorMapMask,
- XkbUseCoreKbd);
- XkbGetNames (drawing->display, XkbAllNamesMask,
- drawing->xkb);
- drawing->xkbOnDisplay = TRUE;
- }
-
- if (drawing->xkb == NULL)
- return FALSE;
-
- alloc_cdik (drawing);
-
- init_keys_and_doodads (drawing);
- init_colors (drawing);
-
- size_allocate (GTK_WIDGET (drawing),
- &(GTK_WIDGET (drawing)->allocation), drawing);
- gtk_widget_queue_draw (GTK_WIDGET (drawing));
-
- return TRUE;
-}
-
-G_CONST_RETURN gchar *
-gkbd_keyboard_drawing_get_keycodes (GkbdKeyboardDrawing * drawing)
-{
- if (!drawing->xkb || drawing->xkb->names->keycodes <= 0)
- return NULL;
- else
- return XGetAtomName (drawing->display,
- drawing->xkb->names->keycodes);
-}
-
-G_CONST_RETURN gchar *
-gkbd_keyboard_drawing_get_geometry (GkbdKeyboardDrawing * drawing)
-{
- if (!drawing->xkb || drawing->xkb->names->geometry <= 0)
- return NULL;
- else
- return XGetAtomName (drawing->display,
- drawing->xkb->names->geometry);
-}
-
-G_CONST_RETURN gchar *
-gkbd_keyboard_drawing_get_symbols (GkbdKeyboardDrawing * drawing)
-{
- if (!drawing->xkb || drawing->xkb->names->symbols <= 0)
- return NULL;
- else
- return XGetAtomName (drawing->display,
- drawing->xkb->names->symbols);
-}
-
-G_CONST_RETURN gchar *
-gkbd_keyboard_drawing_get_types (GkbdKeyboardDrawing * drawing)
-{
- if (!drawing->xkb || drawing->xkb->names->types <= 0)
- return NULL;
- else
- return XGetAtomName (drawing->display,
- drawing->xkb->names->types);
-}
-
-G_CONST_RETURN gchar *
-gkbd_keyboard_drawing_get_compat (GkbdKeyboardDrawing * drawing)
-{
- if (!drawing->xkb || drawing->xkb->names->compat <= 0)
- return NULL;
- else
- return XGetAtomName (drawing->display,
- drawing->xkb->names->compat);
-}
-
-void
-gkbd_keyboard_drawing_set_track_modifiers (GkbdKeyboardDrawing * drawing,
- gboolean enable)
-{
- if (enable) {
- XkbStateRec state;
- drawing->track_modifiers = 1;
- memset (&state, 0, sizeof (state));
- XkbGetState (drawing->display, XkbUseCoreKbd, &state);
- gkbd_keyboard_drawing_set_mods (drawing,
- state.compat_state);
- } else
- drawing->track_modifiers = 0;
-}
-
-void
-gkbd_keyboard_drawing_set_track_config (GkbdKeyboardDrawing * drawing,
- gboolean enable)
-{
- if (enable)
- drawing->track_config = 1;
- else
- drawing->track_config = 0;
-}
-
-void
-gkbd_keyboard_drawing_set_groups_levels (GkbdKeyboardDrawing * drawing,
- GkbdKeyboardDrawingGroupLevel *
- groupLevels[])
-{
-#ifdef KBDRAW_DEBUG
- printf ("set_group_levels [topLeft]: %d %d \n",
- groupLevels[GKBD_KEYBOARD_DRAWING_POS_TOPLEFT]->group,
- groupLevels[GKBD_KEYBOARD_DRAWING_POS_TOPLEFT]->level);
- printf ("set_group_levels [topRight]: %d %d \n",
- groupLevels[GKBD_KEYBOARD_DRAWING_POS_TOPRIGHT]->group,
- groupLevels[GKBD_KEYBOARD_DRAWING_POS_TOPRIGHT]->level);
- printf ("set_group_levels [bottomLeft]: %d %d \n",
- groupLevels[GKBD_KEYBOARD_DRAWING_POS_BOTTOMLEFT]->group,
- groupLevels[GKBD_KEYBOARD_DRAWING_POS_BOTTOMLEFT]->level);
- printf ("set_group_levels [bottomRight]: %d %d \n",
- groupLevels[GKBD_KEYBOARD_DRAWING_POS_BOTTOMRIGHT]->group,
- groupLevels[GKBD_KEYBOARD_DRAWING_POS_BOTTOMRIGHT]->level);
-#endif
- drawing->groupLevels = groupLevels;
-
- gtk_widget_queue_draw (GTK_WIDGET (drawing));
-}
diff --git a/libgnomekbd/gkbd-keyboard-drawing.h b/libgnomekbd/gkbd-keyboard-drawing.h
deleted file mode 100644
index 2fd4a89..0000000
--- a/libgnomekbd/gkbd-keyboard-drawing.h
+++ /dev/null
@@ -1,188 +0,0 @@
-/*
- * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef GKBD_KEYBOARD_DRAWING_H
-#define GKBD_KEYBOARD_DRAWING_H 1
-
-#include <gtk/gtk.h>
-#include <X11/XKBlib.h>
-#include <X11/extensions/XKBgeom.h>
-
-G_BEGIN_DECLS
-#define GKBD_KEYBOARD_DRAWING(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), gkbd_keyboard_drawing_get_type (), \
- GkbdKeyboardDrawing))
-#define GKBD_KEYBOARD_DRAWING_CLASS(clazz) (G_TYPE_CHECK_CLASS_CAST ((clazz), gkbd_keyboard_drawing_get_type () \
- GkbdKeyboardDrawingClass))
-#define GKBD_IS_KEYBOARD_DRAWING(obj) G_TYPE_CHECK_INSTANCE_TYPE ((obj), gkbd_keyboard_drawing_get_type ())
-typedef struct _GkbdKeyboardDrawing GkbdKeyboardDrawing;
-typedef struct _GkbdKeyboardDrawingClass GkbdKeyboardDrawingClass;
-
-typedef struct _GkbdKeyboardDrawingItem GkbdKeyboardDrawingItem;
-typedef struct _GkbdKeyboardDrawingKey GkbdKeyboardDrawingKey;
-typedef struct _GkbdKeyboardDrawingDoodad GkbdKeyboardDrawingDoodad;
-typedef struct _GkbdKeyboardDrawingGroupLevel
- GkbdKeyboardDrawingGroupLevel;
-
-typedef enum {
- GKBD_KEYBOARD_DRAWING_ITEM_TYPE_KEY,
- GKBD_KEYBOARD_DRAWING_ITEM_TYPE_DOODAD
-} GkbdKeyboardDrawingItemType;
-
-typedef enum {
- GKBD_KEYBOARD_DRAWING_POS_TOPLEFT,
- GKBD_KEYBOARD_DRAWING_POS_TOPRIGHT,
- GKBD_KEYBOARD_DRAWING_POS_BOTTOMLEFT,
- GKBD_KEYBOARD_DRAWING_POS_BOTTOMRIGHT,
- GKBD_KEYBOARD_DRAWING_POS_TOTAL,
- GKBD_KEYBOARD_DRAWING_POS_FIRST =
- GKBD_KEYBOARD_DRAWING_POS_TOPLEFT,
- GKBD_KEYBOARD_DRAWING_POS_LAST =
- GKBD_KEYBOARD_DRAWING_POS_BOTTOMRIGHT,
-} GkbdKeyboardDrawingGroupLevelPosition;
-
-/* units are in xkb form */
-struct _GkbdKeyboardDrawingItem {
- /*< private > */
-
- GkbdKeyboardDrawingItemType type;
- gint origin_x;
- gint origin_y;
- gint angle;
- guint priority;
-};
-
-/* units are in xkb form */
-struct _GkbdKeyboardDrawingKey {
- /*< private > */
-
- GkbdKeyboardDrawingItemType type;
- gint origin_x;
- gint origin_y;
- gint angle;
- guint priority;
-
- XkbKeyRec *xkbkey;
- gboolean pressed;
- guint keycode;
-};
-
-/* units are in xkb form */
-struct _GkbdKeyboardDrawingDoodad {
- /*< private > */
-
- GkbdKeyboardDrawingItemType type;
- gint origin_x;
- gint origin_y;
- gint angle;
- guint priority;
-
- XkbDoodadRec *doodad;
- gboolean on; /* for indicator doodads */
-};
-
-struct _GkbdKeyboardDrawingGroupLevel {
- gint group;
- gint level;
-};
-
-struct _GkbdKeyboardDrawing {
- /*< private > */
-
- GtkDrawingArea parent;
-
- GdkPixmap *pixmap;
- XkbDescRec *xkb;
- gboolean xkbOnDisplay;
- guint l3mod;
-
- gint angle; /* current angle pango is set to draw at, in tenths of a degree */
- PangoLayout *layout;
- PangoFontDescription *font_desc;
-
- gint scale_numerator;
- gint scale_denominator;
-
- GkbdKeyboardDrawingKey *keys;
-
- /* list of stuff to draw in priority order */
- GList *keyboard_items;
-
- GdkColor *colors;
-
- guint timeout;
- guint idle_redraw;
-
- GkbdKeyboardDrawingGroupLevel **groupLevels;
-
- guint mods;
-
- Display *display;
- gint screen_num;
-
- gint xkb_event_type;
-
- GkbdKeyboardDrawingDoodad **physical_indicators;
- gint physical_indicators_size;
-
- guint track_config:1;
- guint track_modifiers:1;
-};
-
-struct _GkbdKeyboardDrawingClass {
- GtkDrawingAreaClass parent_class;
-
- /* we send this signal when the user presses a key that "doesn't exist"
- * according to the keyboard geometry; it probably means their xkb
- * configuration is incorrect */
- void (*bad_keycode) (GkbdKeyboardDrawing * drawing, guint keycode);
-};
-
-GType gkbd_keyboard_drawing_get_type (void);
-GtkWidget *gkbd_keyboard_drawing_new (void);
-
-GdkPixbuf *gkbd_keyboard_drawing_get_pixbuf (GkbdKeyboardDrawing *
- kbdrawing);
-gboolean gkbd_keyboard_drawing_set_keyboard (GkbdKeyboardDrawing *
- kbdrawing,
- XkbComponentNamesRec * names);
-
-G_CONST_RETURN gchar
- * gkbd_keyboard_drawing_get_keycodes (GkbdKeyboardDrawing * kbdrawing);
-G_CONST_RETURN gchar
- * gkbd_keyboard_drawing_get_geometry (GkbdKeyboardDrawing * kbdrawing);
-G_CONST_RETURN gchar
- * gkbd_keyboard_drawing_get_symbols (GkbdKeyboardDrawing * kbdrawing);
-G_CONST_RETURN gchar *gkbd_keyboard_drawing_get_types (GkbdKeyboardDrawing
- * kbdrawing);
-G_CONST_RETURN gchar *gkbd_keyboard_drawing_get_compat (GkbdKeyboardDrawing
- * kbdrawing);
-
-void gkbd_keyboard_drawing_set_track_modifiers (GkbdKeyboardDrawing *
- kbdrawing,
- gboolean enable);
-void gkbd_keyboard_drawing_set_track_config (GkbdKeyboardDrawing *
- kbdrawing, gboolean enable);
-
-void gkbd_keyboard_drawing_set_groups_levels (GkbdKeyboardDrawing *
- kbdrawing,
- GkbdKeyboardDrawingGroupLevel
- * groupLevels[]);
-
-G_END_DECLS
-#endif /* #ifndef GKBD_KEYBOARD_DRAWING_H */
diff --git a/libgnomekbd/gkbd-util.c b/libgnomekbd/gkbd-util.c
deleted file mode 100644
index d7779b7..0000000
--- a/libgnomekbd/gkbd-util.c
+++ /dev/null
@@ -1,151 +0,0 @@
-/*
- * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#include <config.h>
-
-#include <gkbd-util.h>
-
-#include <time.h>
-
-#include <glib/gi18n.h>
-
-#include <libxklavier/xklavier.h>
-
-#include <gconf/gconf-client.h>
-
-#include <gkbd-config-private.h>
-
-static void
-gkbd_log_appender (const char file[], const char function[],
- int level, const char format[], va_list args)
-{
- time_t now = time (NULL);
- g_log (NULL, G_LOG_LEVEL_DEBUG, "[%08ld,%03d,%s:%s/] \t",
- (long) now, level, file, function);
- g_logv (NULL, G_LOG_LEVEL_DEBUG, format, args);
-}
-
-void
-gkbd_install_glib_log_appender (void)
-{
- xkl_set_log_appender (gkbd_log_appender);
-}
-
-#define GKBD_PREVIEW_CONFIG_KEY_PREFIX GKBD_CONFIG_KEY_PREFIX "/preview"
-
-const gchar GKBD_PREVIEW_CONFIG_DIR[] = GKBD_PREVIEW_CONFIG_KEY_PREFIX;
-const gchar GKBD_PREVIEW_CONFIG_KEY_X[] =
- GKBD_PREVIEW_CONFIG_KEY_PREFIX "/x";
-const gchar GKBD_PREVIEW_CONFIG_KEY_Y[] =
- GKBD_PREVIEW_CONFIG_KEY_PREFIX "/y";
-const gchar GKBD_PREVIEW_CONFIG_KEY_WIDTH[] =
- GKBD_PREVIEW_CONFIG_KEY_PREFIX "/width";
-const gchar GKBD_PREVIEW_CONFIG_KEY_HEIGHT[] =
- GKBD_PREVIEW_CONFIG_KEY_PREFIX "/height";
-
-GdkRectangle *
-gkbd_preview_load_position (void)
-{
- GError *gerror = NULL;
- GdkRectangle *rv = NULL;
- gint x, y, w, h;
- GConfClient *conf_client = gconf_client_get_default ();
-
- if (conf_client == NULL)
- return NULL;
-
- x = gconf_client_get_int (conf_client,
- GKBD_PREVIEW_CONFIG_KEY_X, &gerror);
- if (gerror != NULL) {
- xkl_debug (0, "Error getting the preview x: %s\n",
- gerror->message);
- g_error_free (gerror);
- g_object_unref (G_OBJECT (conf_client));
- return NULL;
- }
-
- y = gconf_client_get_int (conf_client,
- GKBD_PREVIEW_CONFIG_KEY_Y, &gerror);
- if (gerror != NULL) {
- xkl_debug (0, "Error getting the preview y: %s\n",
- gerror->message);
- g_error_free (gerror);
- g_object_unref (G_OBJECT (conf_client));
- return NULL;
- }
-
- w = gconf_client_get_int (conf_client,
- GKBD_PREVIEW_CONFIG_KEY_WIDTH, &gerror);
- if (gerror != NULL) {
- xkl_debug (0, "Error getting the preview width: %s\n",
- gerror->message);
- g_error_free (gerror);
- g_object_unref (G_OBJECT (conf_client));
- return NULL;
- }
-
- h = gconf_client_get_int (conf_client,
- GKBD_PREVIEW_CONFIG_KEY_HEIGHT, &gerror);
- if (gerror != NULL) {
- xkl_debug (0, "Error getting the preview height: %s\n",
- gerror->message);
- g_error_free (gerror);
- g_object_unref (G_OBJECT (conf_client));
- return NULL;
- }
-
- g_object_unref (G_OBJECT (conf_client));
-
- // default values should be just ignored
- if (x == -1 || y == -1 || w == -1 || h == -1)
- return NULL;
-
- rv = g_new (GdkRectangle, 1);
- rv->x = x;
- rv->y = y;
- rv->width = w;
- rv->height = h;
- return rv;
-}
-
-void
-gkbd_preview_save_position (GdkRectangle * rect)
-{
- GConfClient *conf_client = gconf_client_get_default ();
- GConfChangeSet *cs;
- GError *gerror = NULL;
-
- cs = gconf_change_set_new ();
-
- gconf_change_set_set_int (cs, GKBD_PREVIEW_CONFIG_KEY_X, rect->x);
- gconf_change_set_set_int (cs, GKBD_PREVIEW_CONFIG_KEY_Y, rect->y);
- gconf_change_set_set_int (cs, GKBD_PREVIEW_CONFIG_KEY_WIDTH,
- rect->width);
- gconf_change_set_set_int (cs, GKBD_PREVIEW_CONFIG_KEY_HEIGHT,
- rect->height);
-
- gconf_client_commit_change_set (conf_client, cs, TRUE, &gerror);
- if (gerror != NULL) {
- g_warning ("Error saving preview configuration: %s\n",
- gerror->message);
- g_error_free (gerror);
- }
- gconf_change_set_unref (cs);
- g_object_unref (G_OBJECT (conf_client));
-}
diff --git a/libgnomekbd/gkbd-util.h b/libgnomekbd/gkbd-util.h
deleted file mode 100644
index 88d98e9..0000000
--- a/libgnomekbd/gkbd-util.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef __GKBD_UTIL_H__
-#define __GKBD_UTIL_H__
-
-#include <glib.h>
-#include <gdk/gdk.h>
-
-extern void gkbd_install_glib_log_appender (void);
-
-extern GdkRectangle *gkbd_preview_load_position (void);
-
-extern void gkbd_preview_save_position (GdkRectangle * rect);
-
-
-#endif
diff --git a/libgnomekbdui.pc.in b/libgnomekbdui.pc.in
deleted file mode 100644
index 9d9ab0a..0000000
--- a/libgnomekbdui.pc.in
+++ /dev/null
@@ -1,10 +0,0 @@
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-libdir=@libdir@
-includedir=@includedir@
-
-Name: libgnomekbd
-Description: GNOME keyboard shared library
-Version: @VERSION@
-Libs: -L${libdir} -lgnomekbd -lgnomekbdui @GDK_LIBS@ @GCONF_LIBS@ @LIBGNOME_LIBS@ @LIBXKLAVIER_LIBS@ @DBUS_LIBS@ @LIBGNOMEUI_LIBS@
-Cflags: -I${includedir}
diff --git a/m4/intltool.m4 b/m4/intltool.m4
deleted file mode 100644
index 26b47fe..0000000
--- a/m4/intltool.m4
+++ /dev/null
@@ -1,204 +0,0 @@
-## intltool.m4 - Configure intltool for the target system. -*-Shell-script-*-
-## Copyright (C) 2001 Eazel, Inc.
-## Author: Maciej Stachowiak <mjs@noisehavoc.org>
-## Kenneth Christiansen <kenneth@gnu.org>
-##
-## This program is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## This program is distributed in the hope that it will be useful, but
-## WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-## General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with this program; if not, write to the Free Software
-## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-##
-## As a special exception to the GNU General Public License, if you
-## distribute this file as part of a program that contains a
-## configuration script generated by Autoconf, you may include it under
-## the same distribution terms that you use for the rest of that program.
-
-dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
-# serial 35 IT_PROG_INTLTOOL
-AC_DEFUN([IT_PROG_INTLTOOL],
-[AC_PREREQ([2.50])dnl
-
-case "$am__api_version" in
- 1.[01234])
- AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
- ;;
- *)
- ;;
-esac
-
-if test -n "$1"; then
- AC_MSG_CHECKING(for intltool >= $1)
-
- INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
- INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { print $ 2; }' ${ac_aux_dir}/intltool-update.in`
- [INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split($ 2, VERSION, "."); print VERSION[1] * 1000 + VERSION[2] * 100 + VERSION[3];}' ${ac_aux_dir}/intltool-update.in`
- ]
- AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
- test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
- AC_MSG_ERROR([Your intltool is too old. You need intltool $1 or later.])
-fi
-
- INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
-INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
- INTLTOOL_KEYS_RULE='%.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
- INTLTOOL_PROP_RULE='%.prop: %.prop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
- INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@'
- INTLTOOL_PONG_RULE='%.pong: %.pong.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
- INTLTOOL_SERVER_RULE='%.server: %.server.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
- INTLTOOL_SHEET_RULE='%.sheet: %.sheet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
-INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
- INTLTOOL_UI_RULE='%.ui: %.ui.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
- INTLTOOL_XML_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
- INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@'
- INTLTOOL_XAM_RULE='%.xam: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
- INTLTOOL_KBD_RULE='%.kbd: %.kbd.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
- INTLTOOL_CAVES_RULE='%.caves: %.caves.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
- INTLTOOL_SCHEMAS_RULE='%.schemas: %.schemas.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
- INTLTOOL_THEME_RULE='%.theme: %.theme.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
- INTLTOOL_SERVICE_RULE='%.service: %.service.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
-
-AC_SUBST(INTLTOOL_DESKTOP_RULE)
-AC_SUBST(INTLTOOL_DIRECTORY_RULE)
-AC_SUBST(INTLTOOL_KEYS_RULE)
-AC_SUBST(INTLTOOL_PROP_RULE)
-AC_SUBST(INTLTOOL_OAF_RULE)
-AC_SUBST(INTLTOOL_PONG_RULE)
-AC_SUBST(INTLTOOL_SERVER_RULE)
-AC_SUBST(INTLTOOL_SHEET_RULE)
-AC_SUBST(INTLTOOL_SOUNDLIST_RULE)
-AC_SUBST(INTLTOOL_UI_RULE)
-AC_SUBST(INTLTOOL_XAM_RULE)
-AC_SUBST(INTLTOOL_KBD_RULE)
-AC_SUBST(INTLTOOL_XML_RULE)
-AC_SUBST(INTLTOOL_XML_NOMERGE_RULE)
-AC_SUBST(INTLTOOL_CAVES_RULE)
-AC_SUBST(INTLTOOL_SCHEMAS_RULE)
-AC_SUBST(INTLTOOL_THEME_RULE)
-AC_SUBST(INTLTOOL_SERVICE_RULE)
-
-# Use the tools built into the package, not the ones that are installed.
-AC_SUBST(INTLTOOL_EXTRACT, '$(top_builddir)/intltool-extract')
-AC_SUBST(INTLTOOL_MERGE, '$(top_builddir)/intltool-merge')
-AC_SUBST(INTLTOOL_UPDATE, '$(top_builddir)/intltool-update')
-
-AC_PATH_PROG(INTLTOOL_PERL, perl)
-if test -z "$INTLTOOL_PERL"; then
- AC_MSG_ERROR([perl not found; required for intltool])
-fi
-if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then
- AC_MSG_ERROR([perl 5.x required for intltool])
-fi
-if test "x$2" != "xno-xml"; then
- AC_MSG_CHECKING([for XML::Parser])
- if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
- AC_MSG_RESULT([ok])
- else
- AC_MSG_ERROR([XML::Parser perl module is required for intltool])
- fi
-fi
-
-AC_PATH_PROG(INTLTOOL_ICONV, iconv, iconv)
-AC_PATH_PROG(INTLTOOL_MSGFMT, msgfmt, msgfmt)
-AC_PATH_PROG(INTLTOOL_MSGMERGE, msgmerge, msgmerge)
-AC_PATH_PROG(INTLTOOL_XGETTEXT, xgettext, xgettext)
-
-# Substitute ALL_LINGUAS so we can use it in po/Makefile
-AC_SUBST(ALL_LINGUAS)
-
-IT_PO_SUBDIR([po])
-
-dnl The following is very similar to
-dnl
-dnl AC_CONFIG_FILES([intltool-extract intltool-merge intltool-update])
-dnl
-dnl with the following slight differences:
-dnl - the *.in files are in ac_aux_dir,
-dnl - if the file haven't changed upon reconfigure, it's not touched,
-dnl - the evaluation of the third parameter enables a hack which computes
-dnl the actual value of $libdir,
-dnl - the user sees "executing intltool commands", instead of
-dnl "creating intltool-extract" and such.
-dnl
-dnl Nothing crucial here, and we could use AC_CONFIG_FILES, if there were
-dnl a reason for it.
-
-AC_CONFIG_COMMANDS([intltool], [
-
-for file in intltool-extract intltool-merge intltool-update; do
- sed -e "s|@INTLTOOL_EXTRACT@|`pwd`/intltool-extract|g" \
- -e "s|@INTLTOOL_LIBDIR@|${INTLTOOL_LIBDIR}|g" \
- -e "s|@INTLTOOL_ICONV@|${INTLTOOL_ICONV}|g" \
- -e "s|@INTLTOOL_MSGFMT@|${INTLTOOL_MSGFMT}|g" \
- -e "s|@INTLTOOL_MSGMERGE@|${INTLTOOL_MSGMERGE}|g" \
- -e "s|@INTLTOOL_XGETTEXT@|${INTLTOOL_XGETTEXT}|g" \
- -e "s|@INTLTOOL_PERL@|${INTLTOOL_PERL}|g" \
- < ${ac_aux_dir}/${file}.in > ${file}.out
- if cmp -s ${file} ${file}.out 2>/dev/null; then
- rm -f ${file}.out
- else
- mv -f ${file}.out ${file}
- fi
- chmod ugo+x ${file}
- chmod u+w ${file}
-done
-
-],
-[INTLTOOL_PERL='${INTLTOOL_PERL}' ac_aux_dir='${ac_aux_dir}'
-prefix="$prefix" exec_prefix="$exec_prefix" INTLTOOL_LIBDIR="$libdir"
-INTLTOOL_EXTRACT='${INTLTOOL_EXTRACT}' INTLTOOL_ICONV='${INTLTOOL_ICONV}'
-INTLTOOL_MSGFMT='${INTLTOOL_MSGFMT}' INTLTOOL_MSGMERGE='${INTLTOOL_MSGMERGE}'
-INTLTOOL_XGETTEXT='${INTLTOOL_XGETTEXT}'])
-
-])
-
-
-# IT_PO_SUBDIR(DIRNAME)
-# ---------------------
-# All po subdirs have to be declared with this macro; the subdir "po" is
-# declared by IT_PROG_INTLTOOL.
-#
-AC_DEFUN([IT_PO_SUBDIR],
-[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
-dnl
-dnl The following CONFIG_COMMANDS should be exetuted at the very end
-dnl of config.status.
-AC_CONFIG_COMMANDS_PRE([
- AC_CONFIG_COMMANDS([$1/stamp-it], [
- rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
- >"$1/stamp-it.tmp"
- [sed '/^#/d
- s/^[[].*] *//
- /^[ ]*$/d
- '"s|^| $ac_top_srcdir/|" \
- "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
- ]
- if test ! -f "$1/Makefile"; then
- AC_MSG_ERROR([$1/Makefile is not ready.])
- fi
- mv "$1/Makefile" "$1/Makefile.tmp"
- [sed '/^POTFILES =/,/[^\\]$/ {
- /^POTFILES =/!d
- r $1/POTFILES
- }
- ' "$1/Makefile.tmp" >"$1/Makefile"]
- rm -f "$1/Makefile.tmp"
- mv "$1/stamp-it.tmp" "$1/stamp-it"
- ])
-])dnl
-])
-
-
-# deprecated macros
-AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
-# A hint is needed for aclocal from Automake <= 1.9.4:
-# AC_DEFUN([AC_PROG_INTLTOOL], ...)
-
diff --git a/po/.cvsignore b/po/.cvsignore
deleted file mode 100644
index 7b02968..0000000
--- a/po/.cvsignore
+++ /dev/null
@@ -1,6 +0,0 @@
-Makefile
-Makefile.in
-POTFILES
-*.gmo
-stamp-it
-
diff --git a/po/ChangeLog b/po/ChangeLog
deleted file mode 100644
index eb0b62a..0000000
--- a/po/ChangeLog
+++ /dev/null
@@ -1,12 +0,0 @@
-2007-02-20 Alexander Shopov <ash@contact.bg>
-
- * bg.po: Added Bulgarian translation by
- Alexander Shopov <ash@contact.bg>
-
-2007-02-18 Daniel Nylander <po@danielnylander.se>
-
- * sv.po: Added Swedish translation.
-
-2007-01-13 Takeshi AIHANA <takeshi.aihana@gmail.com>
-
- * ja.po: Added Japanese translation.
diff --git a/po/Makefile.in.in b/po/Makefile.in.in
deleted file mode 100644
index d2d4e4c..0000000
--- a/po/Makefile.in.in
+++ /dev/null
@@ -1,221 +0,0 @@
-# Makefile for program source directory in GNU NLS utilities package.
-# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
-#
-# This file file be copied and used freely without restrictions. It can
-# be used in projects which are not available under the GNU Public License
-# but which still want to provide support for the GNU gettext functionality.
-# Please note that the actual code is *not* freely available.
-#
-# - Modified by Owen Taylor <otaylor@redhat.com> to use GETTEXT_PACKAGE
-# instead of PACKAGE and to look for po2tbl in ./ not in intl/
-#
-# - Modified by jacob berkman <jacob@ximian.com> to install
-# Makefile.in.in and po2tbl.sed.in for use with glib-gettextize
-#
-# - Modified by Rodney Dawes <dobey@novell.com> for use with intltool
-#
-# We have the following line for use by intltoolize:
-# INTLTOOL_MAKEFILE
-
-GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
-PACKAGE = @PACKAGE@
-VERSION = @VERSION@
-
-SHELL = /bin/sh
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-top_builddir = ..
-VPATH = @srcdir@
-
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-datadir = @datadir@
-datarootdir = @datarootdir@
-libdir = @libdir@
-DATADIRNAME = @DATADIRNAME@
-itlocaledir = $(prefix)/$(DATADIRNAME)/locale
-subdir = po
-install_sh = @install_sh@
-# Automake >= 1.8 provides @mkdir_p@.
-# Until it can be supposed, use the safe fallback:
-mkdir_p = $(install_sh) -d
-
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-
-GMSGFMT = @GMSGFMT@
-MSGFMT = @MSGFMT@
-XGETTEXT = @XGETTEXT@
-INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
-INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
-MSGMERGE = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --dist
-GENPOT = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --pot
-
-ALL_LINGUAS = @ALL_LINGUAS@
-
-PO_LINGUAS=$(shell if test -r $(srcdir)/LINGUAS; then grep -v "^\#" $(srcdir)/LINGUAS; fi)
-
-POFILES=$(shell if test -n "$(PO_LINGUAS)"; then LINGUAS="$(PO_LINGUAS)"; else LINGUAS="$(ALL_LINGUAS)"; fi; for lang in $$LINGUAS; do printf "$$lang.po "; done)
-
-DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(POFILES)
-EXTRA_DISTFILES = POTFILES.skip Makevars LINGUAS
-
-POTFILES = \
-#This Gets Replace for some reason
-
-CATALOGS=$(shell if test -n "$(PO_LINGUAS)"; then LINGUAS="$(PO_LINGUAS)"; else LINGUAS="$(ALL_LINGUAS)"; fi; for lang in $$LINGUAS; do printf "$$lang.gmo "; done)
-
-.SUFFIXES:
-.SUFFIXES: .po .pox .gmo .mo .msg .cat
-
-.po.pox:
- $(MAKE) $(GETTEXT_PACKAGE).pot
- $(MSGMERGE) $< $(GETTEXT_PACKAGE).pot -o $*.pox
-
-.po.mo:
- $(MSGFMT) -o $@ $<
-
-.po.gmo:
- file=`echo $* | sed 's,.*/,,'`.gmo \
- && rm -f $$file && $(GMSGFMT) -o $$file $<
-
-.po.cat:
- sed -f ../intl/po2msg.sed < $< > $*.msg \
- && rm -f $@ && gencat $@ $*.msg
-
-
-all: all-@USE_NLS@
-
-all-yes: $(CATALOGS)
-all-no:
-
-$(GETTEXT_PACKAGE).pot: $(POTFILES)
- $(GENPOT)
-
-install: install-data
-install-data: install-data-@USE_NLS@
-install-data-no: all
-install-data-yes: all
- $(mkdir_p) $(DESTDIR)$(itlocaledir)
- if test -n "$(PO_LINGUAS)"; then \
- linguas="$(PO_LINGUAS)"; \
- else \
- linguas="$(ALL_LINGUAS)"; \
- fi; \
- for lang in $$linguas; do \
- dir=$(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES; \
- $(mkdir_p) $$dir; \
- if test -r $$lang.gmo; then \
- $(INSTALL_DATA) $$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \
- echo "installing $$lang.gmo as $$dir/$(GETTEXT_PACKAGE).mo"; \
- else \
- $(INSTALL_DATA) $(srcdir)/$$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \
- echo "installing $(srcdir)/$$lang.gmo as" \
- "$$dir/$(GETTEXT_PACKAGE).mo"; \
- fi; \
- if test -r $$lang.gmo.m; then \
- $(INSTALL_DATA) $$lang.gmo.m $$dir/$(GETTEXT_PACKAGE).mo.m; \
- echo "installing $$lang.gmo.m as $$dir/$(GETTEXT_PACKAGE).mo.m"; \
- else \
- if test -r $(srcdir)/$$lang.gmo.m ; then \
- $(INSTALL_DATA) $(srcdir)/$$lang.gmo.m \
- $$dir/$(GETTEXT_PACKAGE).mo.m; \
- echo "installing $(srcdir)/$$lang.gmo.m as" \
- "$$dir/$(GETTEXT_PACKAGE).mo.m"; \
- else \
- true; \
- fi; \
- fi; \
- done
-
-# Empty stubs to satisfy archaic automake needs
-dvi info tags TAGS ID:
-
-# Define this as empty until I found a useful application.
-installcheck:
-
-uninstall:
- if test -n "$(PO_LINGUAS)"; then \
- linguas="$(PO_LINGUAS)"; \
- else \
- linguas="$(ALL_LINGUAS)"; \
- fi; \
- for lang in $$linguas; do \
- rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo; \
- rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo.m; \
- done
-
-check: all $(GETTEXT_PACKAGE).pot
-
-mostlyclean:
- rm -f *.pox $(GETTEXT_PACKAGE).pot *.old.po cat-id-tbl.tmp
- rm -f .intltool-merge-cache
-
-clean: mostlyclean
-
-distclean: clean
- rm -f Makefile Makefile.in POTFILES stamp-it
- rm -f *.mo *.msg *.cat *.cat.m *.gmo
-
-maintainer-clean: distclean
- @echo "This command is intended for maintainers to use;"
- @echo "it deletes files that may require special tools to rebuild."
- rm -f Makefile.in.in
-
-distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
-dist distdir: $(DISTFILES)
- dists="$(DISTFILES)"; \
- extra_dists="$(EXTRA_DISTFILES)"; \
- for file in $$extra_dists; do \
- test -f $(srcdir)/$$file && dists="$$dists $(srcdir)/$$file"; \
- done; \
- for file in $$dists; do \
- test -f $$file || file="$(srcdir)/$$file"; \
- ln $$file $(distdir) 2> /dev/null \
- || cp -p $$file $(distdir); \
- done
-
-update-po: Makefile
- $(MAKE) $(GETTEXT_PACKAGE).pot
- tmpdir=`pwd`; \
- if test -n "$(PO_LINGUAS)"; then \
- linguas="$(PO_LINGUAS)"; \
- else \
- linguas="$(ALL_LINGUAS)"; \
- fi; \
- for lang in $$linguas; do \
- echo "$$lang:"; \
- result="`$(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang`"; \
- if $$result; then \
- if cmp $(srcdir)/$$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
- rm -f $$tmpdir/$$lang.new.po; \
- else \
- if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
- :; \
- else \
- echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
- rm -f $$tmpdir/$$lang.new.po; \
- exit 1; \
- fi; \
- fi; \
- else \
- echo "msgmerge for $$lang.gmo failed!"; \
- rm -f $$tmpdir/$$lang.new.po; \
- fi; \
- done
-
-Makefile POTFILES: stamp-it
- @if test ! -f $@; then \
- rm -f stamp-it; \
- $(MAKE) stamp-it; \
- fi
-
-stamp-it: Makefile.in.in ../config.status POTFILES.in
- cd .. \
- && CONFIG_FILES=$(subdir)/Makefile.in CONFIG_HEADERS= CONFIG_LINKS= \
- $(SHELL) ./config.status
-
-# Tell versions [3.59,3.63) of GNU make not to export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/po/POTFILES.in b/po/POTFILES.in
deleted file mode 100644
index 14c690a..0000000
--- a/po/POTFILES.in
+++ /dev/null
@@ -1,13 +0,0 @@
-libgnomekbd/gkbd-keyboard-drawing.c
-libgnomekbd/gkbd-indicator.c
-libgnomekbd/gkbd-util.c
-libgnomekbd/gkbd-config-registry.c
-libgnomekbd/gkbd-indicator-plugin-manager.c
-libgnomekbd/gkbd-indicator-config.c
-libgnomekbd/gkbd-keyboard-config.c
-libgnomekbd/gkbd-desktop-config.c
-libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in
-capplet/gkbd-indicator-plugins.glade
-capplet/gkbd-indicator-plugins-capplet.c
-capplet/gkbd-indicator-plugins-capplet.desktop.in.in
-capplet/gkbd-indicator-plugins-add.c
diff --git a/po/bg.po b/po/bg.po
deleted file mode 100644
index f963a46..0000000
--- a/po/bg.po
+++ /dev/null
@@ -1,217 +0,0 @@
-# Bulgarian translation of libgnomekbd po-file.
-# Copyright (C) 2007 Free Software Foundation, Inc.
-# This file is distributed under the same license as the libgnomekbd package.
-# Alexander Shopov <ash@contact.bg>, 2007.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: libgnomekbd trunk\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2007-02-20 08:04+0200\n"
-"PO-Revision-Date: 2007-02-20 08:06+0200\n"
-"Last-Translator: Alexander Shopov <ash@contact.bg>\n"
-"Language-Team: Bulgarian <dict@fsa-bg.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=n != 1;\n"
-
-#: ../libgnomekbd/gkbd-indicator.c:613
-msgid "XKB initialization error"
-msgstr "Грешка при инициализирането на XKB"
-
-#: ../libgnomekbd/gkbd-indicator-config.c:164
-#, c-format
-msgid "There was an error loading an image: %s"
-msgstr "Грешка при зареждането на изображението: %s"
-
-#: ../libgnomekbd/gkbd-keyboard-config.c:795
-#, c-format
-msgid "layout \"%s\""
-msgid_plural "layouts \"%s\""
-msgstr[0] "подредба „%s“"
-msgstr[1] "подредби „%s“"
-
-#: ../libgnomekbd/gkbd-keyboard-config.c:814
-#, c-format
-msgid "option \"%s\""
-msgid_plural "options \"%s\""
-msgstr[0] "настройка „%s“"
-msgstr[1] "настройки „%s“"
-
-#: ../libgnomekbd/gkbd-keyboard-config.c:822
-#, c-format
-msgid "model \"%s\", %s and %s"
-msgstr "модел „%s“, %s и %s"
-
-#: ../libgnomekbd/gkbd-keyboard-config.c:823
-msgid "no layout"
-msgstr "без подредба"
-
-#: ../libgnomekbd/gkbd-keyboard-config.c:824
-msgid "no options"
-msgstr "без опции"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:1
-msgid ""
-"A collection of scripts to run whenever the keyboard state is reloaded. "
-"Useful for re-applying xmodmap based adjustments"
-msgstr "Набор от скриптове, които да се изпълняват при всяко презареждане на състоянието на клавиатурата. Полезно е за повторното прилагане на допълнителни конфигурации по xmodmap."
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:2
-msgid "A list of modmap files available in the $HOME directory."
-msgstr "Списък с файловете за подредби, налични в домашната папка ($HOME)."
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:3
-msgid "Default group, assigned on window creation"
-msgstr "Стандартната група, която се присвоява на прозорец при създаването му"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:4
-msgid "Keep and manage separate group per window"
-msgstr "Управление на отделна група за всеки прозорец"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:5
-msgid "Keyboard Update Handlers"
-msgstr "Скриптове за обработка на промяната на клавиатурната подредба"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:6
-msgid "Keyboard layout"
-msgstr "Подредба на клавиатурата"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:7
-msgid "Keyboard model"
-msgstr "Модел на клавиатурата"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:8
-msgid "Keyboard options"
-msgstr "Настройки на клавиатурата"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:9
-msgid ""
-"Keyboard settings in gconf will be overridden from the system ASAP "
-"(deprecated)"
-msgstr ""
-"Системните настройки на клавиатурата скоро ще са с приоритет над тези в "
-"GConf (които са остарели и не бива да се ползват)"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:10
-msgid "Save/restore indicators together with layout groups"
-msgstr ""
-"Запазване/възстановяване на индикаторите заедно с групите по подредбата"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:11
-msgid "Show layout names instead of group names"
-msgstr "Показване на имената на подредбите вместо имената на групите"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:12
-msgid ""
-"Show layout names instead of group names (only for versions of XFree "
-"supporting multiple layouts)"
-msgstr ""
-"Показване на имената на подредбите вместо имената на групите (само при "
-"версии на XFree, които поддържат множество подредби)"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:13
-msgid "Suppress the \"X sysconfig changed\" warning message"
-msgstr "Съобщенията „Промяна на системните настройки на X“ да не се показват"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:14
-msgid "The Keyboard Preview, X offset"
-msgstr "Преглед на клавиатурата, отместване по X"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:15
-msgid "The Keyboard Preview, Y offset"
-msgstr "Преглед на клавиатурата, отместване по Y"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:16
-msgid "The Keyboard Preview, height"
-msgstr "Преглед на клавиатурата, височина"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:17
-msgid "The Keyboard Preview, width"
-msgstr "Преглед на клавиатурата, широчина"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:18
-msgid ""
-"Very soon, keyboard settings in gconf will be overridden (from the system "
-"configuration) This key has been deprecated since GNOME 2.12, please unset "
-"the model, layouts and options keys to get the default system configuration."
-msgstr ""
-"Много скоро системните настройки на клавиатурата ще имат приоритет над тези "
-"в GConf. Ключът в GConf е остарял и не трябва да се използва от GNOME 2.12. "
-"За да се върнете на системните настройки, махнете зададените стойности за "
-"модела, подредбите и допълнителните настройки."
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:19
-msgid "keyboard layout"
-msgstr "подредба на клавиатурата"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:20
-msgid "keyboard model"
-msgstr "модел на клавиатурата"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:21
-msgid "modmap file list"
-msgstr "файл със списък на подредбите"
-
-#: ../capplet/gkbd-indicator-plugins.glade.h:1
-msgid "Activate more plugins"
-msgstr "Задействане на още приставки"
-
-#: ../capplet/gkbd-indicator-plugins.glade.h:2
-msgid "Active _plugins:"
-msgstr "_Действащи приставки"
-
-#: ../capplet/gkbd-indicator-plugins.glade.h:3
-msgid "Add Plugin"
-msgstr "Добавяне на приставка"
-
-#: ../capplet/gkbd-indicator-plugins.glade.h:4
-msgid "Close the dialog"
-msgstr "Затваряне на диалоговия прозорец"
-
-#: ../capplet/gkbd-indicator-plugins.glade.h:5
-msgid "Configure the selected plugin"
-msgstr "Настройване на избраната приставка"
-
-#: ../capplet/gkbd-indicator-plugins.glade.h:6
-msgid "Deactivate selected plugin"
-msgstr "Спиране на избраната приставка"
-
-#: ../capplet/gkbd-indicator-plugins.glade.h:7
-msgid "Decrease the plugin priority"
-msgstr "Понижаване на приоритета на приставката"
-
-#: ../capplet/gkbd-indicator-plugins.glade.h:8
-msgid "Increase the plugin priority"
-msgstr "Повишаване на приоритета на приставката"
-
-#: ../capplet/gkbd-indicator-plugins.glade.h:9
-msgid "Keyboard Indicator Plugins"
-msgstr "Приставки за обозначаване на клавиатурата"
-
-#: ../capplet/gkbd-indicator-plugins.glade.h:10
-msgid "The list of active plugins"
-msgstr "Списък с действащи приставки"
-
-#: ../capplet/gkbd-indicator-plugins.glade.h:11
-msgid "_Available plugins:"
-msgstr "_Налични приставки"
-
-#: ../capplet/gkbd-indicator-plugins-capplet.c:117
-#: ../capplet/gkbd-indicator-plugins-add.c:106
-msgid "No description."
-msgstr "Без описание."
-
-#: ../capplet/gkbd-indicator-plugins-capplet.c:326
-#, c-format
-msgid "Failed to init GConf: %s\n"
-msgstr "Неуспех при инициализирането на GConf: %s\n"
-
-#: ../capplet/gkbd-indicator-plugins-capplet.desktop.in.in.h:1
-msgid "Enable/disable installed plugins"
-msgstr "Задействане/спиране на инсталираните приставки"
-
-#: ../capplet/gkbd-indicator-plugins-capplet.desktop.in.in.h:2
-msgid "Keyboard Indicator plugins"
-msgstr "Приставки за обозначаване на клавиатурата"
diff --git a/po/ja.po b/po/ja.po
deleted file mode 100644
index b011e0c..0000000
--- a/po/ja.po
+++ /dev/null
@@ -1,215 +0,0 @@
-# libgnomekbd ja.po.
-# Copyright (C) 2007 Free Software Foundation, Inc.
-# This file is distributed under the same license as the 'libgnomekbd' package.
-# Takeshi AIHANA <takeshi.aihana@gmail.com>, 2007.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: libgnomekbd trunk\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2007-01-13 15:55+0900\n"
-"PO-Revision-Date: 2007-01-13 15:55+0900\n"
-"Last-Translator: Takeshi AIHANA <takeshi.aihana@gmail.com>\n"
-"Language-Team: Japanese <gnome-translation@gnome.gr.jp>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=1; plural=0;\n"
-
-#: ../libgnomekbd/gkbd-indicator.c:613
-msgid "XKB initialization error"
-msgstr "XKB の初期化エラー"
-
-#: ../libgnomekbd/gkbd-indicator-config.c:164
-#, c-format
-msgid "There was an error loading an image: %s"
-msgstr "イメージを読み込む際にエラーが発生しました: %s"
-
-#: ../libgnomekbd/gkbd-keyboard-config.c:795
-#, c-format
-msgid "layout \"%s\""
-msgid_plural "layouts \"%s\""
-msgstr[0] "レイアウト \"%s\""
-
-#: ../libgnomekbd/gkbd-keyboard-config.c:814
-#, c-format
-msgid "option \"%s\""
-msgid_plural "options \"%s\""
-msgstr[0] "オプション \"%s\""
-
-#: ../libgnomekbd/gkbd-keyboard-config.c:822
-#, c-format
-msgid "model \"%s\", %s and %s"
-msgstr "型式 \"%s\"、%s と %s"
-
-#: ../libgnomekbd/gkbd-keyboard-config.c:823
-msgid "no layout"
-msgstr "レイアウトなし"
-
-#: ../libgnomekbd/gkbd-keyboard-config.c:824
-msgid "no options"
-msgstr "オプションなし"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:1
-msgid ""
-"A collection of scripts to run whenever the keyboard state is reloaded. "
-"Useful for re-applying xmodmap based adjustments"
-msgstr ""
-"キーボードの状態が変更された時に実行するスクリプト集です。これらのスクリプト"
-"は xmodmap による調整結果をもう一度適用する際に便利です。"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:2
-msgid "A list of modmap files available in the $HOME directory."
-msgstr "$HOME フォルダで利用可能な modmap ファイルの並びです。"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:3
-msgid "Default group, assigned on window creation"
-msgstr "(ウィンドウの生成時に割り当てられる) デフォルトのグループ"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:4
-msgid "Keep and manage separate group per window"
-msgstr "ウィンドウ毎に別々のグループで管理する"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:5
-msgid "Keyboard Update Handlers"
-msgstr "キーボードの更新ハンドラ"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:6
-msgid "Keyboard layout"
-msgstr "キーボードのレイアウト"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:7
-msgid "Keyboard model"
-msgstr "キーボードの型式"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:8
-msgid "Keyboard options"
-msgstr "キーボードのオプション"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:9
-msgid ""
-"Keyboard settings in gconf will be overridden from the system ASAP "
-"(deprecated)"
-msgstr ""
-"可能であれば、GConf に保存されたキーボードの設定値でシステム規模の設定を上書"
-"きする (廃棄)"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:10
-msgid "Save/restore indicators together with layout groups"
-msgstr "保存/復帰の表示器をレイアウトのグループにまとめる"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:11
-msgid "Show layout names instead of group names"
-msgstr "グループ名ではなくレイアウト名を表示する"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:12
-msgid ""
-"Show layout names instead of group names (only for versions of XFree "
-"supporting multiple layouts)"
-msgstr ""
-"グループ名ではなくレイアウト名を表示します (複数のレイアウトを同時にサポート"
-"できる XFree のバージョンのみ利用できます)。"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:13
-msgid "Suppress the \"X sysconfig changed\" warning message"
-msgstr "\"Xのシステム規模の設定変更\" に対する警告メッセージを表示しない"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:14
-msgid "The Keyboard Preview, X offset"
-msgstr "キーボード・プレビューを表示する位置 (X座標)"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:15
-msgid "The Keyboard Preview, Y offset"
-msgstr "キーボード・プレビューを表示する位置 (Y座標)"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:16
-msgid "The Keyboard Preview, height"
-msgstr "キーボード・プレビューの高さ"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:17
-msgid "The Keyboard Preview, width"
-msgstr "キーボード・プレビューの幅"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:18
-msgid ""
-"Very soon, keyboard settings in gconf will be overridden (from the system "
-"configuration) This key has been deprecated since GNOME 2.12, please unset "
-"the model, layouts and options keys to get the default system configuration."
-msgstr ""
-"可能な限り早めに、GConf に保存したキーボード設定でシステム規模の設定を上書き"
-"します。このキーは GNOME バージョン 2.12 で破棄されました。システム規模の型式"
-"やレイアウト、オプションを取得する場合は FALSE にして下さい。"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:19
-msgid "keyboard layout"
-msgstr "現在利用しているキーボードのレイアウトです。"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:20
-msgid "keyboard model"
-msgstr "現在利用しているキーボードの型式です。"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:21
-msgid "modmap file list"
-msgstr "modmap ファイルの並び"
-
-#: ../capplet/gkbd-indicator-plugins.glade.h:1
-msgid "Activate more plugins"
-msgstr "プラグインを追加します"
-
-#: ../capplet/gkbd-indicator-plugins.glade.h:2
-msgid "Active _plugins:"
-msgstr "有効なプラグイン(_P):"
-
-#: ../capplet/gkbd-indicator-plugins.glade.h:3
-msgid "Add Plugin"
-msgstr "プラグインの追加"
-
-#: ../capplet/gkbd-indicator-plugins.glade.h:4
-msgid "Close the dialog"
-msgstr "このダイアログを閉じます"
-
-#: ../capplet/gkbd-indicator-plugins.glade.h:5
-msgid "Configure the selected plugin"
-msgstr "選択したプラグインを設定します"
-
-#: ../capplet/gkbd-indicator-plugins.glade.h:6
-msgid "Deactivate selected plugin"
-msgstr "選択したプラグインを削除して無効にします"
-
-#: ../capplet/gkbd-indicator-plugins.glade.h:7
-msgid "Decrease the plugin priority"
-msgstr "プラグインの優先度を下げます"
-
-#: ../capplet/gkbd-indicator-plugins.glade.h:8
-msgid "Increase the plugin priority"
-msgstr "プラグインの優先度を上げます"
-
-#: ../capplet/gkbd-indicator-plugins.glade.h:9
-msgid "Keyboard Indicator Plugins"
-msgstr "キーボード表示器のプラグイン"
-
-#: ../capplet/gkbd-indicator-plugins.glade.h:10
-msgid "The list of active plugins"
-msgstr "有効になっているプラグインの一覧です"
-
-#: ../capplet/gkbd-indicator-plugins.glade.h:11
-msgid "_Available plugins:"
-msgstr "利用可能なプラグイン(_A):"
-
-#: ../capplet/gkbd-indicator-plugins-capplet.c:117
-#: ../capplet/gkbd-indicator-plugins-add.c:106
-msgid "No description."
-msgstr "説明なし"
-
-#: ../capplet/gkbd-indicator-plugins-capplet.c:326
-#, c-format
-msgid "Failed to init GConf: %s\n"
-msgstr "GConf の初期化に失敗しました: %s\n"
-
-#: ../capplet/gkbd-indicator-plugins-capplet.desktop.in.in.h:1
-msgid "Enable/disable installed plugins"
-msgstr "インストール済みのプラグインを設定します"
-
-#: ../capplet/gkbd-indicator-plugins-capplet.desktop.in.in.h:2
-msgid "Keyboard Indicator plugins"
-msgstr "キーボード表示器のプラグイン"
diff --git a/po/nb.po b/po/nb.po
deleted file mode 100644
index 3c0ff06..0000000
--- a/po/nb.po
+++ /dev/null
@@ -1,216 +0,0 @@
-# Norwegian translation of control-center (bokmål dialect).
-# Copyright (C) 1999-2005 Free Software Foundation, Inc.
-# Kjartan Maraas <kmaraas@gnome.org>, 1999-2006.
-# Terance Edward Sola <terance@lyse.net>, 2005.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: libgnomekbd 2.15.x\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2006-10-31 13:33+0100\n"
-"PO-Revision-Date: 2006-10-31 13:40+0100\n"
-"Last-Translator: Kjartan Maraas <kmaraas@gnome.org>\n"
-"Language-Team: Norwegian Bokmal <i18n-nb@lister.ping.uio.no>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8-bit\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-
-#: ../libgnomekbd/gkbd-indicator.c:613
-msgid "XKB initialization error"
-msgstr "Feil ved initiering av XKB"
-
-#: ../libgnomekbd/gkbd-indicator-config.c:164
-#, c-format
-msgid "There was an error loading an image: %s"
-msgstr "Det oppsto en feil under lasting av bilde: %s"
-
-#: ../libgnomekbd/gkbd-keyboard-config.c:795
-#, c-format
-msgid "layout \"%s\""
-msgid_plural "layouts \"%s\""
-msgstr[0] "utforming «%s»"
-msgstr[1] "utforminger «%s»"
-
-#: ../libgnomekbd/gkbd-keyboard-config.c:814
-#, c-format
-msgid "option \"%s\""
-msgid_plural "options \"%s\""
-msgstr[0] "alternativ «%s»"
-msgstr[1] "alternativer «%s»"
-
-#: ../libgnomekbd/gkbd-keyboard-config.c:822
-#, c-format
-msgid "model \"%s\", %s and %s"
-msgstr "modell «%s», %s og %s"
-
-#: ../libgnomekbd/gkbd-keyboard-config.c:823
-msgid "no layout"
-msgstr "ingen utforming"
-
-#: ../libgnomekbd/gkbd-keyboard-config.c:824
-msgid "no options"
-msgstr "ingen alternativer"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:1
-msgid ""
-"A collection of scripts to run whenever the keyboard state is reloaded. "
-"Useful for re-applying xmodmap based adjustments"
-msgstr ""
-"En samling skript som kjøres når tastaturtilstanden skal lastes på nytt. "
-"Nyttig for å legge inn xmodmap-baserte justeringer på nytt"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:2
-msgid "A list of modmap files available in the $HOME directory."
-msgstr "En liste over modmap-filer som finnes i katalogen $HOME."
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:3
-msgid "Default group, assigned on window creation"
-msgstr "Forvalgt gruppe, tildelt ved oppretting av vindu"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:4
-msgid "Keep and manage separate group per window"
-msgstr "Behold og håndter separate grupper per vindu"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:5
-msgid "Keyboard Update Handlers"
-msgstr "Tastaturoppdatering"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:6
-msgid "Keyboard layout"
-msgstr "Tastaturutforming"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:7
-msgid "Keyboard model"
-msgstr "Tastaturmodell"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:8
-msgid "Keyboard options"
-msgstr "Alternativer for tastatur"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:9
-msgid ""
-"Keyboard settings in gconf will be overridden from the system ASAP "
-"(deprecated)"
-msgstr "Tastaturinnstillinger i gconf overstyres fra systemet ASAP. (Utfases)"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:10
-msgid "Save/restore indicators together with layout groups"
-msgstr "Lagre/gjenopprett indikatorer sammen med utformingsgrupper"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:11
-msgid "Show layout names instead of group names"
-msgstr "Vis navn på utforming i stedet for gruppenavn"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:12
-msgid ""
-"Show layout names instead of group names (only for versions of XFree "
-"supporting multiple layouts)"
-msgstr ""
-"Vis navn på utforming i stedet for gruppenavn (kun for versjoner av XFree "
-"som støtter flere utforminger)"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:13
-msgid "Suppress the \"X sysconfig changed\" warning message"
-msgstr "Ikke vis advarsel om «X konfigurasjonen er endret»"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:14
-msgid "The Keyboard Preview, X offset"
-msgstr "Forhåndsvisning av tastatur, X-avstand"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:15
-msgid "The Keyboard Preview, Y offset"
-msgstr "Forhåndsvisning av tastatur, Y-avstand"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:16
-msgid "The Keyboard Preview, height"
-msgstr "Forhåndsvisning av tastatur, høyde"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:17
-msgid "The Keyboard Preview, width"
-msgstr "Forhåndsvisning av tastatur, bredde"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:18
-msgid ""
-"Very soon, keyboard settings in gconf will be overridden (from the system "
-"configuration) This key has been deprecated since GNOME 2.12, please unset "
-"the model, layouts and options keys to get the default system configuration."
-msgstr ""
-"Tastaturinnstillinger i gconf vil bli overstyrt fra systemkonfigurasjonen i "
-"nær framtid. Denne nøkkelen er under utfasing fra GNOME 2.12. Vennligst "
-"fjern verdiene for modell, utforming og alternative taster for å ta i bruk "
-"forvalgt systemkonfigurasjon."
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:19
-msgid "keyboard layout"
-msgstr "tastaturutforming"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:20
-msgid "keyboard model"
-msgstr "tastaturmodell"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:21
-msgid "modmap file list"
-msgstr "liste over modmap-filer"
-
-#: ../capplet/gkbd-indicator-plugins.glade.h:1
-msgid "Activate more plugins"
-msgstr "Aktiver flere tillegg"
-
-#: ../capplet/gkbd-indicator-plugins.glade.h:2
-msgid "Active _plugins:"
-msgstr "Aktiver tille_gg"
-
-#: ../capplet/gkbd-indicator-plugins.glade.h:3
-msgid "Add Plugin"
-msgstr "Legg til tillegg"
-
-#: ../capplet/gkbd-indicator-plugins.glade.h:4
-msgid "Close the dialog"
-msgstr "Lukk dialogen"
-
-#: ../capplet/gkbd-indicator-plugins.glade.h:5
-msgid "Configure the selected plugin"
-msgstr "Konfigurer valgt tillegg"
-
-#: ../capplet/gkbd-indicator-plugins.glade.h:6
-msgid "Deactivate selected plugin"
-msgstr "Deaktiver valgt tillegg"
-
-#: ../capplet/gkbd-indicator-plugins.glade.h:7
-msgid "Decrease the plugin priority"
-msgstr "Sett lavere prioritet for tillegget"
-
-#: ../capplet/gkbd-indicator-plugins.glade.h:8
-msgid "Increase the plugin priority"
-msgstr "Sett høyere prioritet for tillegget"
-
-#: ../capplet/gkbd-indicator-plugins.glade.h:9
-msgid "Keyboard Indicator Plugins"
-msgstr "Tillegg for tastaturindikator"
-
-#: ../capplet/gkbd-indicator-plugins.glade.h:10
-msgid "The list of active plugins"
-msgstr "Liste med aktive tillegg"
-
-#: ../capplet/gkbd-indicator-plugins.glade.h:11
-msgid "_Available plugins:"
-msgstr "_Tilgjengelige tillegg:"
-
-#: ../capplet/gkbd-indicator-plugins-capplet.c:117
-#: ../capplet/gkbd-indicator-plugins-add.c:106
-msgid "No description."
-msgstr "Ingen beskrivelse."
-
-#: ../capplet/gkbd-indicator-plugins-capplet.c:326
-#, c-format
-msgid "Failed to init GConf: %s\n"
-msgstr "Klarte ikke å starte GConf: %s\n"
-
-#: ../capplet/gkbd-indicator-plugins-capplet.desktop.in.in.h:1
-msgid "Enable/disable installed plugins"
-msgstr "Aktiver/deaktiver installerte tillegg"
-
-#: ../capplet/gkbd-indicator-plugins-capplet.desktop.in.in.h:2
-msgid "Keyboard Indicator plugins"
-msgstr "Tillegg for tastaturindikator"
diff --git a/po/ru.po b/po/ru.po
deleted file mode 100644
index f22a3ab..0000000
--- a/po/ru.po
+++ /dev/null
@@ -1,169 +0,0 @@
-# SOME DESCRIPTIVE TITLE.
-# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
-#
-#, fuzzy
-msgid ""
-msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2006-09-24 17:15+0100\n"
-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"Last-Translator: Sergey Udaltsov <svu@gnome.org>\n"
-"Language-Team: <gnome-cyr@gnome.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%"
-"10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
-
-#: ../libgnomekbd/gkbd-indicator.c:585
-msgid "XKB initialization error"
-msgstr "Ошибка инициализации XKB"
-
-#: ../libgnomekbd/gkbd-indicator-config.c:160
-#, c-format
-msgid "There was an error loading an image: %s"
-msgstr "Ошибка загрузки изображения: %s"
-
-#: ../libgnomekbd/gkbd-keyboard-config.c:790
-#, c-format
-msgid "layout \"%s\""
-msgid_plural "layouts \"%s\""
-msgstr[0] "раскладка \"%s\""
-msgstr[1] "раскладки \"%s\""
-
-#: ../libgnomekbd/gkbd-keyboard-config.c:809
-#, c-format
-msgid "option \"%s\""
-msgid_plural "options \"%s\""
-msgstr[0] "опция \"%s\""
-msgstr[1] "опции \"%s\""
-
-#: ../libgnomekbd/gkbd-keyboard-config.c:817
-#, c-format
-msgid "model \"%s\", %s and %s"
-msgstr "модель \"%s\", %s и %s"
-
-#: ../libgnomekbd/gkbd-keyboard-config.c:818
-msgid "no layout"
-msgstr "нет раскладки"
-
-#: ../libgnomekbd/gkbd-keyboard-config.c:819
-msgid "no options"
-msgstr "нет опций"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:1
-msgid ""
-"A collection of scripts to run whenever the keyboard state is reloaded. "
-"Useful for re-applying xmodmap based adjustments"
-msgstr ""
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:2
-msgid "A list of modmap files available in the $HOME directory."
-msgstr ""
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:3
-msgid "Default group, assigned on window creation"
-msgstr "Группа по умолчанию, присваеваемая при создании окна"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:4
-msgid "Keep and manage separate group per window"
-msgstr "Сохранять и подддерживать разные группы, пооконно"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:5
-msgid "Keyboard Update Handlers"
-msgstr "Обработчики обновления клавиатуры"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:6
-msgid "Keyboard layout"
-msgstr "Раскладка клавиатуры"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:7
-msgid "Keyboard model"
-msgstr "Модель клавиатуры"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:8
-msgid "Keyboard options"
-msgstr "Доп. параметры клавиатуры"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:9
-msgid ""
-"Keyboard settings in gconf will be overridden from the system ASAP "
-"(deprecated)"
-msgstr "Клавиатурные установки в gconf будут немедленно заменены системными (устарело)"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:10
-msgid "Save/restore indicators together with layout groups"
-msgstr "Сохранять/восстанавливать индикаторы вместе с группами"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:11
-msgid "Show layout names instead of group names"
-msgstr "Показывать названия раскладок вместо названий групп"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:12
-msgid ""
-"Show layout names instead of group names (only for versions of XFree "
-"supporting multiple layouts)"
-msgstr ""
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:13
-msgid "Suppress the \"X sysconfig changed\" warning message"
-msgstr ""
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:14
-msgid "The Keyboard Preview, X offset"
-msgstr ""
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:15
-msgid "The Keyboard Preview, Y offset"
-msgstr ""
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:16
-msgid "The Keyboard Preview, height"
-msgstr ""
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:17
-msgid "The Keyboard Preview, width"
-msgstr ""
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:18
-msgid ""
-"Very soon, keyboard settings in gconf will be overridden (from the system "
-"configuration) This key has been deprecated since GNOME 2.12, please unset "
-"the model, layouts and options keys to get the default system configuration."
-msgstr ""
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:19
-msgid "keyboard layout"
-msgstr "клавиатурная раскладка"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:20
-msgid "keyboard model"
-msgstr "клавиатурная модель"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:21
-msgid "modmap file list"
-msgstr "список modmap файлов"
-
-#: ../capplet/gkbd-indicator-plugins-capplet.c:114
-#: ../capplet/gkbd-indicator-plugins-add.c:103
-msgid "No description."
-msgstr "Нет описания."
-
-#: ../capplet/gkbd-indicator-plugins-capplet.c:323
-#, c-format
-msgid "Failed to init GConf: %s\n"
-msgstr "Ошибка инициализации GConf: %s\n"
-
-#: ../capplet/gkbd-indicator-plugins-capplet.desktop.in.in.h:1
-msgid "Enable/disable installed plugins"
-msgstr "Включить/выключить установленные модули"
-
-#: ../capplet/gkbd-indicator-plugins-capplet.desktop.in.in.h:2
-msgid "Keyboard Indicator plugins"
-msgstr "Модули расширения клавиатурного индикатора"
-
-#~ msgid "There was an error displaying help: %s"
-#~ msgstr "Ошибка отображения справки: %s"
diff --git a/po/sv.po b/po/sv.po
deleted file mode 100644
index 9aee209..0000000
--- a/po/sv.po
+++ /dev/null
@@ -1,209 +0,0 @@
-# Swedish translation for libgnomekbd.
-# Copyright (C) 2007 Free Software Foundation, Inc.
-# This file is distributed under the same license as the libgnomekbd package.
-# Daniel Nylander <po@danielnylander.se>, 2007.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: libgnomekbd\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2007-02-18 20:12+0100\n"
-"PO-Revision-Date: 2007-02-18 20:24+0100\n"
-"Last-Translator: Daniel Nylander <po@danielnylander.se>\n"
-"Language-Team: Swedish <tp-sv@listor.tp-sv.se>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=utf-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=n != 1;\n"
-
-#: ../libgnomekbd/gkbd-indicator.c:613
-msgid "XKB initialization error"
-msgstr "XKB-initieringsfel"
-
-#: ../libgnomekbd/gkbd-indicator-config.c:164
-#, c-format
-msgid "There was an error loading an image: %s"
-msgstr "Det inträffade ett fel vid inläsning av en bild: %s"
-
-#: ../libgnomekbd/gkbd-keyboard-config.c:795
-#, c-format
-msgid "layout \"%s\""
-msgid_plural "layouts \"%s\""
-msgstr[0] "layout \"%s\""
-msgstr[1] "layouter \"%s\""
-
-#: ../libgnomekbd/gkbd-keyboard-config.c:814
-#, c-format
-msgid "option \"%s\""
-msgid_plural "options \"%s\""
-msgstr[0] "alternativ \"%s\""
-msgstr[1] "alternativ \"%s\""
-
-#: ../libgnomekbd/gkbd-keyboard-config.c:822
-#, c-format
-msgid "model \"%s\", %s and %s"
-msgstr "modell \"%s\", %s och %s"
-
-#: ../libgnomekbd/gkbd-keyboard-config.c:823
-msgid "no layout"
-msgstr "ingen layout"
-
-#: ../libgnomekbd/gkbd-keyboard-config.c:824
-msgid "no options"
-msgstr "inga alternativ"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:1
-msgid "A collection of scripts to run whenever the keyboard state is reloaded. Useful for re-applying xmodmap based adjustments"
-msgstr "En samling skript att köra när tangentbordstillståndet läses om. Användbart för att återtillämpa xmodmap-baserade justeringar"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:2
-msgid "A list of modmap files available in the $HOME directory."
-msgstr "En lista över modmap-filer tillgängliga i $HOME-katalogen."
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:3
-msgid "Default group, assigned on window creation"
-msgstr "Standardgrupp, tilldelade för fönsterskapande"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:4
-msgid "Keep and manage separate group per window"
-msgstr "Behåll och hantera separat grupp per fönster"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:5
-msgid "Keyboard Update Handlers"
-msgstr "Tangentbordsuppdateringshanterare"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:6
-msgid "Keyboard layout"
-msgstr "Tangentbordslayout"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:7
-msgid "Keyboard model"
-msgstr "Tangentbordsmodell"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:8
-msgid "Keyboard options"
-msgstr "Tangentbordsalternativ"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:9
-msgid "Keyboard settings in gconf will be overridden from the system ASAP (deprecated)"
-msgstr "Tangentbordsinställningar i gconf kommer att åsidosättas från systemet så snart som möjligt (föråldrad)"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:10
-msgid "Save/restore indicators together with layout groups"
-msgstr "Spara/återställ indikatorer tillsammans med layoutgrupper"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:11
-msgid "Show layout names instead of group names"
-msgstr "Visa layoutnamn istället för gruppnamn"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:12
-msgid "Show layout names instead of group names (only for versions of XFree supporting multiple layouts)"
-msgstr "Visa layoutnamn istället för gruppnamn (endast för versioner av XFree som har stöd för flera layouter)"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:13
-msgid "Suppress the \"X sysconfig changed\" warning message"
-msgstr "Visa inte varningsmeddelandet \"X sysconfig changed\""
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:14
-msgid "The Keyboard Preview, X offset"
-msgstr "Tangentbordsförhandsvisning, X-position"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:15
-msgid "The Keyboard Preview, Y offset"
-msgstr "Tangentbordsförhandsvisning, Y-position"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:16
-msgid "The Keyboard Preview, height"
-msgstr "Tangentbordsförhandsvisning, höjd"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:17
-msgid "The Keyboard Preview, width"
-msgstr "Tangentbordsförhandsvisning, bredd"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:18
-msgid "Very soon, keyboard settings in gconf will be overridden (from the system configuration) This key has been deprecated since GNOME 2.12, please unset the model, layouts and options keys to get the default system configuration."
-msgstr "Mycket snart kommer tangentbordsinställningar i gconf att åsidosättas (från systemkonfigurationen) Den här nyckeln har varit föråldrad sedan GNOME 2.12, avmarkera nycklarna för modell, layouter och alternativ för att få standardsystemkonfigurationen."
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:19
-msgid "keyboard layout"
-msgstr "tangentbordslayout"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:20
-msgid "keyboard model"
-msgstr "tangentbordsmodell"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:21
-msgid "modmap file list"
-msgstr "fillista för modmap"
-
-#: ../capplet/gkbd-indicator-plugins.glade.h:1
-msgid "Activate more plugins"
-msgstr "Aktivera fler insticksmoduler"
-
-#: ../capplet/gkbd-indicator-plugins.glade.h:2
-msgid "Active _plugins:"
-msgstr "Aktiva _insticksmoduler:"
-
-#: ../capplet/gkbd-indicator-plugins.glade.h:3
-msgid "Add Plugin"
-msgstr "Lägg till insticksmodul"
-
-#: ../capplet/gkbd-indicator-plugins.glade.h:4
-msgid "Close the dialog"
-msgstr "Stäng dialogrutan"
-
-#: ../capplet/gkbd-indicator-plugins.glade.h:5
-msgid "Configure the selected plugin"
-msgstr "Konfigurera markerad insticksmodul"
-
-#: ../capplet/gkbd-indicator-plugins.glade.h:6
-msgid "Deactivate selected plugin"
-msgstr "Inaktivera markerad insticksmodul"
-
-#: ../capplet/gkbd-indicator-plugins.glade.h:7
-msgid "Decrease the plugin priority"
-msgstr "Sänk insticksmodulens prioritet"
-
-#: ../capplet/gkbd-indicator-plugins.glade.h:8
-msgid "Increase the plugin priority"
-msgstr "Öka insticksmodulens prioritet"
-
-#: ../capplet/gkbd-indicator-plugins.glade.h:9
-msgid "Keyboard Indicator Plugins"
-msgstr "Insticksmoduler för tangentbordsindikator"
-
-#: ../capplet/gkbd-indicator-plugins.glade.h:10
-msgid "The list of active plugins"
-msgstr "Listan över aktiva insticksmoduler"
-
-#: ../capplet/gkbd-indicator-plugins.glade.h:11
-msgid "_Available plugins:"
-msgstr "_Tillgängliga insticksmoduler:"
-
-#: ../capplet/gkbd-indicator-plugins-capplet.c:117
-#: ../capplet/gkbd-indicator-plugins-add.c:106
-msgid "No description."
-msgstr "Ingen beskrivning."
-
-#: ../capplet/gkbd-indicator-plugins-capplet.c:326
-#, c-format
-msgid "Failed to init GConf: %s\n"
-msgstr "Misslyckades med att initera GConf: %s\n"
-
-#: ../capplet/gkbd-indicator-plugins-capplet.desktop.in.in.h:1
-msgid "Enable/disable installed plugins"
-msgstr "Aktivera/inaktivera installerade insticksmoduler"
-
-#: ../capplet/gkbd-indicator-plugins-capplet.desktop.in.in.h:2
-msgid "Keyboard Indicator plugins"
-msgstr "Insticksmoduler för tangentbordsindikator"
-
-#: ../test/gkbd-indicator-test.c:61
-#, c-format
-msgid "Keyboard Indicator Test (%s)"
-msgstr "Tangentbordsindikatortest (%s)"
-
-#: ../test/gkbd-indicator-test.c:70
-msgid "Indicator:"
-msgstr "Indikator:"
-
diff --git a/test/.cvsignore b/test/.cvsignore
deleted file mode 100644
index 8954104..0000000
--- a/test/.cvsignore
+++ /dev/null
@@ -1,6 +0,0 @@
-Makefile
-Makefile.in
-gkbd-config-registry-server
-gkbd-indicator-test
-gkbd-keyboard-drawing-test
-
diff --git a/test/.indent.pro b/test/.indent.pro
deleted file mode 100644
index bdff074..0000000
--- a/test/.indent.pro
+++ /dev/null
@@ -1,2 +0,0 @@
--kr -i8 -pcs -lps -psl
-
diff --git a/test/Makefile.am b/test/Makefile.am
deleted file mode 100644
index d0fb49b..0000000
--- a/test/Makefile.am
+++ /dev/null
@@ -1,47 +0,0 @@
-noinst_PROGRAMS = gkbd-indicator-test \
- gkbd-keyboard-drawing-test \
- gkbd-config-registry-server
-
-gkbd_config_registry_server_CFLAGS= \
- $(WARN_CFLAGS) -I$(top_srcdir) -Wall -Werror \
- $(DBUS_CFLAGS) \
- $(LIBXKLAVIER_CFLAGS)
-
-gkbd_config_registry_server_LDFLAGS= \
- $(DBUS_LIBS) \
- $(LIBXKLAVIER_LIBS) \
- $(top_builddir)/libgnomekbd/libgnomekbd.la
-
-gkbd_indicator_test_CFLAGS= \
- $(WARN_CFLAGS) -I$(top_srcdir) -Wall -Werror \
- $(GTK_CFLAGS) \
- $(LIBGLADE_CFLAGS) \
- $(LIBGNOME_CFLAGS) \
- $(LIBGNOMEUI_CFLAGS) \
- $(LIBXKLAVIER_CFLAGS) \
- -I$(top_srcdir)/intl \
- -DSYS_PLUGIN_DIR=\"$(libdir)/gnomekbd/\" \
- -DG_LOG_DOMAIN=\"GnomeKbdIndicatorTest\" \
- -DDATADIR=\"$(datadir)\"
-
-gkbd_indicator_test_LDFLAGS= \
- $(GTK_LIBS) \
- $(LIBGLADE_LIBS) \
- $(LIBGNOME_LIBS) \
- $(LIBGNOMEUI_LIBS) \
- $(LIBXKLAVIER_LIBS) \
- $(top_builddir)/libgnomekbd/libgnomekbd.la \
- $(top_builddir)/libgnomekbd/libgnomekbdui.la
-
-gkbd_keyboard_drawing_test_CFLAGS= \
- $(WARN_CFLAGS) -I$(top_srcdir) \
- $(GTK_CFLAGS)
-
-gkbd_keyboard_drawing_test_LDFLAGS= \
- $(GTK_LIBS) \
- $(LIBGNOME_LIBS) \
- $(LIBXKLAVIER_LIBS) \
- $(top_builddir)/libgnomekbd/libgnomekbd.la \
- $(top_builddir)/libgnomekbd/libgnomekbdui.la
-
-EXTRA_DIST = gkbd-config-registry-client.sh
diff --git a/test/gkbd-config-registry-client.sh b/test/gkbd-config-registry-client.sh
deleted file mode 100755
index 6b98fc2..0000000
--- a/test/gkbd-config-registry-client.sh
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/bin/sh
-
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Library General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-
-#
-# $Id$
-#
-# This tiny script is expected to test the available keyboard config registry,
-# getting descriptions out of it
-#
-
-objname=GkbdConfigRegistry
-method=GetDescriptionsAsUtf8
-
-# Old:
-#objname=KeyboardConfigRegistry
-#method=GetCurrentDescriptionsAsUtf8
-
-dbus-send --session \
- --dest=org.gnome.$objname \
- --type=method_call \
- --print-reply \
- --reply-timeout=20000 \
- /org/gnome/$objname \
- org.gnome.$objname.$method \
- array:string:"us","ru","fr","de","il" \
- array:string:"basic","winkeys","","deadkeys","dummy"
diff --git a/test/gkbd-config-registry-server.c b/test/gkbd-config-registry-server.c
deleted file mode 100644
index b4c0fac..0000000
--- a/test/gkbd-config-registry-server.c
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#include <config.h>
-
-#include <stdio.h>
-#include <X11/Xlib.h>
-#include <libxklavier/xklavier.h>
-#include <dbus/dbus-glib-bindings.h>
-
-#ifdef HAVE_SETLOCALE
-# include <locale.h>
-#endif
-
-#include "libgnomekbd/gkbd-config-registry.h"
-
-static GMainLoop *loop;
-
-int
-main ()
-{
- GkbdConfigRegistry *reg;
-
- g_type_init_with_debug_flags (G_TYPE_DEBUG_OBJECTS |
- G_TYPE_DEBUG_SIGNALS);
-
-#ifdef HAVE_SETLOCALE
- setlocale(LC_ALL, "");
-#endif
-
- reg = GKBD_CONFIG_REGISTRY (g_object_new
- (gkbd_config_registry_get_type
- (), NULL));
-
- loop = g_main_loop_new (NULL, FALSE);
-
- g_main_loop_run (loop);
-
- g_object_unref (reg);
-
- return 0;
-}
diff --git a/test/gkbd-indicator-test.c b/test/gkbd-indicator-test.c
deleted file mode 100644
index 3401d30..0000000
--- a/test/gkbd-indicator-test.c
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#include "config.h"
-
-#include "libxklavier/xklavier.h"
-#include "libgnomekbd/gkbd-indicator.h"
-
-#include <string.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <stdlib.h>
-
-#include <gdk/gdkscreen.h>
-#include <gdk/gdkx.h>
-#include <gnome.h>
-#include <glade/glade.h>
-
-#include "X11/XKBlib.h"
-
-int
-main (int argc, char **argv)
-{
- GtkWidget *gki;
- GtkWidget *mainwin;
- GtkWidget *vbox;
-
- bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
- bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
- textdomain (GETTEXT_PACKAGE);
-
- /* Different data dir defs in g-a and g-c-c */
- gnome_program_init ("gkbd-indicator-test", VERSION,
- LIBGNOMEUI_MODULE, argc, argv,
- GNOME_PARAM_APP_DATADIR, DATADIR, NULL);
-
- glade_gnome_init ();
-
- mainwin = gtk_window_new (GTK_WINDOW_TOPLEVEL);
-
- gki = gkbd_indicator_new ();
- gkbd_indicator_set_tooltips_format (_
- ("Keyboard Indicator Test (%s)"));
- gkbd_indicator_set_parent_tooltips (GKBD_INDICATOR (gki), TRUE);
-
- gtk_window_resize (GTK_WINDOW (mainwin), 250, 250);
- vbox = gtk_vbox_new (TRUE, 6);
-
- gtk_container_add (GTK_CONTAINER (mainwin), vbox);
- gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
- gtk_container_add (GTK_CONTAINER (vbox),
- gtk_label_new (_("Indicator:")));
- gtk_container_add (GTK_CONTAINER (vbox), gki);
-
- gtk_widget_show_all (mainwin);
-
- g_signal_connect (G_OBJECT (mainwin),
- "destroy", G_CALLBACK (gtk_main_quit), NULL);
-
-
- gtk_main ();
-
- return 0;
-}
diff --git a/test/gkbd-keyboard-drawing-test.c b/test/gkbd-keyboard-drawing-test.c
deleted file mode 100644
index 1b0e6d8..0000000
--- a/test/gkbd-keyboard-drawing-test.c
+++ /dev/null
@@ -1,284 +0,0 @@
-/*
- * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#if HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <gtk/gtk.h>
-#include <popt.h>
-#include <stdlib.h>
-#include <string.h>
-#include "libgnomekbd/gkbd-keyboard-drawing.h"
-
-
-static gchar *groups = NULL;
-static gchar *levels = NULL;
-static gchar *symbols = NULL;
-static gchar *keycodes = NULL;
-static gchar *geometry = NULL;
-static struct poptOption options[] = {
- {"groups", '\0', POPT_ARG_STRING, &groups, 0,
- "Keyboard groups to display, from 1-4. Up to four groups only may be displayed. Examples: --groups=3 or --groups=1,2,1,2",
- "group1[,group2[,group3[,group4]]]"},
- {"levels", '\0', POPT_ARG_STRING, &levels, 0,
- "Keyboard shift levels to display, from 1-64. Up to four shift levels only may be displayed. Examples: --levels=3 or --levels=1,2,1,2",
- "level1[,level2[,level3[,level4]]]"},
- {"symbols", '\0', POPT_ARG_STRING, &symbols, 0,
- "Symbols component of the keyboard. If you omit this option, it is obtained from the X server; that is, the keyboard that is currently configured is drawn. Examples: --symbols=us or --symbols=us(pc104)+iso9995-3+group(switch)+ctrl(nocaps)",
- NULL},
- {"keycodes", '\0', POPT_ARG_STRING, &keycodes, 0,
- "Keycodes component of the keyboard. If you omit this option, it is obtained from the X server; that is, the keyboard that is currently configured is drawn. Examples: --keycodes=xfree86+aliases(qwerty)",
- NULL},
- {"geometry", '\0', POPT_ARG_STRING, &geometry, 0,
- "Geometry xkb component. If you omit this option, it is obtained from the X server; that is, the keyboard that is currently configured is drawn. Example: --geometry=kinesis",
- NULL},
- {"track-modifiers", '\0', POPT_ARG_NONE, NULL, 3,
- "Track the current modifiers", NULL},
- {"track-config", '\0', POPT_ARG_NONE, NULL, 4,
- "Track the server XKB configuration", NULL},
- {"version", 'v', POPT_ARG_NONE, NULL, 1, "Show current version",
- NULL},
- POPT_AUTOHELP {NULL, '\0', 0, NULL, 0}
-};
-
-
-static gboolean
-set_groups (gchar * groups_option,
- GkbdKeyboardDrawingGroupLevel * groupLevels)
-{
- GkbdKeyboardDrawingGroupLevel *pgl = groupLevels;
- gint cntr, g;
-
- groupLevels[0].group =
- groupLevels[1].group =
- groupLevels[2].group = groupLevels[3].group = -1;
-
- if (groups_option == NULL)
- return TRUE;
-
- for (cntr = 4; --cntr >= 0;) {
- if (*groups_option == '\0')
- return FALSE;
-
- g = *groups_option - '1';
- if (g < 0 || g >= 4)
- return FALSE;
-
- pgl->group = g;
- /* printf ("group %d\n", pgl->group); */
-
- groups_option++;
- if (*groups_option == '\0')
- return TRUE;
- if (*groups_option != ',')
- return FALSE;
-
- groups_option++;
- pgl++;
- }
-
- return TRUE;
-}
-
-static gboolean
-set_levels (gchar * levels_option,
- GkbdKeyboardDrawingGroupLevel * groupLevels)
-{
- GkbdKeyboardDrawingGroupLevel *pgl = groupLevels;
- gint cntr, l;
- gchar *p;
-
- groupLevels[0].level =
- groupLevels[1].level =
- groupLevels[2].level = groupLevels[3].level = -1;
-
- if (levels_option == NULL)
- return TRUE;
-
- for (cntr = 4; --cntr >= 0;) {
- if (*levels_option == '\0')
- return FALSE;
-
- l = (gint) strtol (levels_option, &p, 10) - 1;
- if (l < 0 || l >= 64)
- return FALSE;
-
- pgl->level = l;
- /* printf ("level %d\n", pgl->level); */
-
- levels_option = p;
- if (*levels_option == '\0')
- return TRUE;
- if (*levels_option != ',')
- return FALSE;
-
- levels_option++;
- pgl++;
- }
-
- return TRUE;
-}
-
-static void
-bad_keycode (GkbdKeyboardDrawing * drawing, guint keycode)
-{
- g_warning
- ("got keycode %u, which is not on your keyboard according to your configuration",
- keycode);
-}
-
-gint
-main (gint argc, gchar ** argv)
-{
- GtkWidget *window;
- GtkWidget *gkbd_keyboard_drawing;
- GdkScreen *screen;
- gint monitor;
- GdkRectangle rect;
- poptContext popt_context;
- gint rc;
- GkbdKeyboardDrawingGroupLevel groupLevels[4] =
- { {0, 0}, {1, 0}, {0, 1}, {1, 1} };
- GkbdKeyboardDrawingGroupLevel *pgroupLevels[4] =
- { &groupLevels[0], &groupLevels[1], &groupLevels[2],
- &groupLevels[3]
- };
- gboolean track_config = False, track_modifiers = False;
-
- gtk_init (&argc, &argv);
-
- popt_context =
- poptGetContext ("kbdraw", argc, (const gchar **) argv, options,
- 0);
-
- for (rc = poptGetNextOpt (popt_context); rc > 0;
- rc = poptGetNextOpt (popt_context))
- switch (rc) {
- case 1:
- g_print ("kbdraw %s\n", VERSION);
- exit (0);
- case 3:
- track_modifiers = True;
- break;
- case 4:
- track_config = True;
- break;
- }
-
- if (rc != -1) {
- g_printerr ("%s: %s\n",
- poptBadOption (popt_context,
- POPT_BADOPTION_NOALIAS),
- poptStrerror (rc));
- exit (1);
- }
-
- if (!set_groups (groups, groupLevels)) {
- g_printerr ("--groups: invalid argument\n");
- exit (1);
- }
-
- if (!set_levels (levels, groupLevels)) {
- g_printerr ("--levels: invalid argument\n");
- exit (1);
- }
-
- window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
- g_signal_connect (G_OBJECT (window), "destroy",
- G_CALLBACK (gtk_main_quit), NULL);
-
- screen = gtk_window_get_screen (GTK_WINDOW (window));
- monitor = gdk_screen_get_monitor_at_point (screen, 0, 0);
- gdk_screen_get_monitor_geometry (screen, monitor, &rect);
- gtk_window_set_default_size (GTK_WINDOW (window),
- rect.width * 4 / 5,
- rect.height * 1 / 2);
-
- gtk_widget_show (window);
-
- gkbd_keyboard_drawing = gkbd_keyboard_drawing_new ();
- gtk_widget_show (gkbd_keyboard_drawing);
- gtk_container_add (GTK_CONTAINER (window), gkbd_keyboard_drawing);
-
- gkbd_keyboard_drawing_set_groups_levels (GKBD_KEYBOARD_DRAWING
- (gkbd_keyboard_drawing),
- pgroupLevels);
-
- if (track_modifiers)
- gkbd_keyboard_drawing_set_track_modifiers
- (GKBD_KEYBOARD_DRAWING (gkbd_keyboard_drawing), TRUE);
- if (track_config)
- gkbd_keyboard_drawing_set_track_config
- (GKBD_KEYBOARD_DRAWING (gkbd_keyboard_drawing), TRUE);
- g_signal_connect (G_OBJECT (gkbd_keyboard_drawing), "bad-keycode",
- G_CALLBACK (bad_keycode), NULL);
-
- if (symbols || geometry || keycodes) {
- XkbComponentNamesRec names;
- gint success;
-
- memset (&names, '\0', sizeof (names));
-
- if (symbols)
- names.symbols = symbols;
- else
- names.symbols = (gchar *)
- gkbd_keyboard_drawing_get_symbols
- (GKBD_KEYBOARD_DRAWING
- (gkbd_keyboard_drawing));
-
- if (keycodes)
- names.keycodes = keycodes;
- else
- names.keycodes = (gchar *)
- gkbd_keyboard_drawing_get_keycodes
- (GKBD_KEYBOARD_DRAWING
- (gkbd_keyboard_drawing));
-
- if (geometry)
- names.geometry = geometry;
- else
- names.geometry = (gchar *)
- gkbd_keyboard_drawing_get_geometry
- (GKBD_KEYBOARD_DRAWING
- (gkbd_keyboard_drawing));
-
- success =
- gkbd_keyboard_drawing_set_keyboard
- (GKBD_KEYBOARD_DRAWING (gkbd_keyboard_drawing),
- &names);
- if (!success) {
- g_printerr
- ("\nError loading new keyboard description with components:\n\n"
- " keycodes: %s\n" " types: %s\n"
- " compat: %s\n" " symbols: %s\n"
- " geometry: %s\n\n", names.keycodes,
- names.types, names.compat, names.symbols,
- names.geometry);
- exit (1);
- }
- }
-
- gtk_widget_grab_focus (gkbd_keyboard_drawing);
-
- gtk_main ();
-
- return 0;
-}
diff --git a/trunk/.anjuta/anjuta.session b/trunk/.anjuta/anjuta.session
deleted file mode 100644
index 40a96e3..0000000
--- a/trunk/.anjuta/anjuta.session
+++ /dev/null
@@ -1,9 +0,0 @@
-
-[Anjuta]
-Geometry=1120x755+10+25
-
-[File Loader]
-Files=file:///home/svu/CVS/libgnomekbd/capplet/gswitchit-plugins-app.h#30%%%file:///home/svu/CVS/libgnomekbd/capplet/gswitchit-plugins-app.c#394%%%file:///home/svu/CVS/libgnomekbd/capplet/gswitchit-plugins-add.c#173
-
-[Execution]
-Run in terminal=2
diff --git a/trunk/.anjuta/default.anjuta b/trunk/.anjuta/default.anjuta
deleted file mode 100644
index 3c61a54..0000000
--- a/trunk/.anjuta/default.anjuta
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0"?>
-<anjuta>
- <plugin name="GtkSourceview editor" mandatory="no">
- <require group="Anjuta Plugin"
- attribute="Location"
- value="anjuta-sourceview:SourceviewPlugin"/>
- </plugin>
-</anjuta>
diff --git a/trunk/.anjuta/dock-layout.xml b/trunk/.anjuta/dock-layout.xml
deleted file mode 100644
index 30defe8..0000000
--- a/trunk/.anjuta/dock-layout.xml
+++ /dev/null
@@ -1,2 +0,0 @@
-<?xml version="1.0"?>
-<dock-layout><layout name="__default__"><dock name="__dock_1" floating="no" width="-1" height="-1" floatx="0" floaty="0"><paned orientation="vertical" locked="no" position="409"><placeholder name="ph_center" next-placement="center"/><paned orientation="horizontal" locked="no" position="453"><notebook orientation="vertical" locked="no" page="0"><item name="AnjutaFileManager" orientation="vertical" locked="no"><placeholder name="ph_left" next-placement="center"/></item><item name="AnjutaProjectManager" orientation="vertical" locked="no"/><item name="AnjutaSymbolBrowser" orientation="vertical" locked="no"/></notebook><notebook orientation="vertical" locked="no" page="0"><placeholder name="ph_right" next-placement="right"/><item name="AnjutaDocumentManager" orientation="vertical" locked="no"><placeholder name="ph_top" next-placement="center"/></item><item name="AnjutaTodoPlugin" orientation="vertical" locked="no"/></notebook></paned><item name="AnjutaMessageView" orientation="vertical" locked="no"><placeholder name="ph_bottom" next-placement="center"/></item></paned></dock></layout></dock-layout>
diff --git a/trunk/.cvsignore b/trunk/.cvsignore
deleted file mode 100644
index 615898e..0000000
--- a/trunk/.cvsignore
+++ /dev/null
@@ -1,30 +0,0 @@
-COPYING
-INSTALL
-Makefile
-Makefile.in
-aclocal.m4
-autom4te.cache
-compile
-config.guess
-config.h
-config.h.in
-config.log
-config.status
-config.sub
-configure
-depcomp
-install-sh
-intltool-extract
-intltool-extract.in
-intltool-merge
-intltool-merge.in
-intltool-update
-intltool-update.in
-libgnomekbd-0.1.tar.gz
-libgnomekbd.pc
-libgnomekbdui.pc
-libtool
-ltmain.sh
-missing
-mkinstalldirs
-stamp-h1
diff --git a/trunk/.tm_project2.cache b/trunk/.tm_project2.cache
deleted file mode 100644
index 35c9d12..0000000
--- a/trunk/.tm_project2.cache
+++ /dev/null
Binary files differ
diff --git a/trunk/AUTHORS b/trunk/AUTHORS
deleted file mode 100644
index 8e9452b..0000000
--- a/trunk/AUTHORS
+++ /dev/null
@@ -1 +0,0 @@
-Email: svu@users.sourceforge.net
diff --git a/trunk/COPYING.LIB b/trunk/COPYING.LIB
deleted file mode 100644
index 92b8903..0000000
--- a/trunk/COPYING.LIB
+++ /dev/null
@@ -1,481 +0,0 @@
- GNU LIBRARY GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1991 Free Software Foundation, Inc.
- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-[This is the first released version of the library GPL. It is
- numbered 2 because it goes with version 2 of the ordinary GPL.]
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-Licenses are intended to guarantee your freedom to share and change
-free software--to make sure the software is free for all its users.
-
- This license, the Library General Public License, applies to some
-specially designated Free Software Foundation software, and to any
-other libraries whose authors decide to use it. You can use it for
-your libraries, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if
-you distribute copies of the library, or if you modify it.
-
- For example, if you distribute copies of the library, whether gratis
-or for a fee, you must give the recipients all the rights that we gave
-you. You must make sure that they, too, receive or can get the source
-code. If you link a program with the library, you must provide
-complete object files to the recipients so that they can relink them
-with the library, after making changes to the library and recompiling
-it. And you must show them these terms so they know their rights.
-
- Our method of protecting your rights has two steps: (1) copyright
-the library, and (2) offer you this license which gives you legal
-permission to copy, distribute and/or modify the library.
-
- Also, for each distributor's protection, we want to make certain
-that everyone understands that there is no warranty for this free
-library. If the library is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original
-version, so that any problems introduced by others will not reflect on
-the original authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that companies distributing free
-software will individually obtain patent licenses, thus in effect
-transforming the program into proprietary software. To prevent this,
-we have made it clear that any patent must be licensed for everyone's
-free use or not licensed at all.
-
- Most GNU software, including some libraries, is covered by the ordinary
-GNU General Public License, which was designed for utility programs. This
-license, the GNU Library General Public License, applies to certain
-designated libraries. This license is quite different from the ordinary
-one; be sure to read it in full, and don't assume that anything in it is
-the same as in the ordinary license.
-
- The reason we have a separate public license for some libraries is that
-they blur the distinction we usually make between modifying or adding to a
-program and simply using it. Linking a program with a library, without
-changing the library, is in some sense simply using the library, and is
-analogous to running a utility program or application program. However, in
-a textual and legal sense, the linked executable is a combined work, a
-derivative of the original library, and the ordinary General Public License
-treats it as such.
-
- Because of this blurred distinction, using the ordinary General
-Public License for libraries did not effectively promote software
-sharing, because most developers did not use the libraries. We
-concluded that weaker conditions might promote sharing better.
-
- However, unrestricted linking of non-free programs would deprive the
-users of those programs of all benefit from the free status of the
-libraries themselves. This Library General Public License is intended to
-permit developers of non-free programs to use free libraries, while
-preserving your freedom as a user of such programs to change the free
-libraries that are incorporated in them. (We have not seen how to achieve
-this as regards changes in header files, but we have achieved it as regards
-changes in the actual functions of the Library.) The hope is that this
-will lead to faster development of free libraries.
-
- The precise terms and conditions for copying, distribution and
-modification follow. Pay close attention to the difference between a
-"work based on the library" and a "work that uses the library". The
-former contains code derived from the library, while the latter only
-works together with the library.
-
- Note that it is possible for a library to be covered by the ordinary
-General Public License rather than by this special one.
-
- GNU LIBRARY GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License Agreement applies to any software library which
-contains a notice placed by the copyright holder or other authorized
-party saying it may be distributed under the terms of this Library
-General Public License (also called "this License"). Each licensee is
-addressed as "you".
-
- A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application programs
-(which use some of those functions and data) to form executables.
-
- The "Library", below, refers to any such software library or work
-which has been distributed under these terms. A "work based on the
-Library" means either the Library or any derivative work under
-copyright law: that is to say, a work containing the Library or a
-portion of it, either verbatim or with modifications and/or translated
-straightforwardly into another language. (Hereinafter, translation is
-included without limitation in the term "modification".)
-
- "Source code" for a work means the preferred form of the work for
-making modifications to it. For a library, complete source code means
-all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control compilation
-and installation of the library.
-
- Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running a program using the Library is not restricted, and output from
-such a program is covered only if its contents constitute a work based
-on the Library (independent of the use of the Library in a tool for
-writing it). Whether that is true depends on what the Library does
-and what the program that uses the Library does.
-
- 1. You may copy and distribute verbatim copies of the Library's
-complete source code as you receive it, in any medium, provided that
-you conspicuously and appropriately publish on each copy an
-appropriate copyright notice and disclaimer of warranty; keep intact
-all the notices that refer to this License and to the absence of any
-warranty; and distribute a copy of this License along with the
-Library.
-
- You may charge a fee for the physical act of transferring a copy,
-and you may at your option offer warranty protection in exchange for a
-fee.
-
- 2. You may modify your copy or copies of the Library or any portion
-of it, thus forming a work based on the Library, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) The modified work must itself be a software library.
-
- b) You must cause the files modified to carry prominent notices
- stating that you changed the files and the date of any change.
-
- c) You must cause the whole of the work to be licensed at no
- charge to all third parties under the terms of this License.
-
- d) If a facility in the modified Library refers to a function or a
- table of data to be supplied by an application program that uses
- the facility, other than as an argument passed when the facility
- is invoked, then you must make a good faith effort to ensure that,
- in the event an application does not supply such function or
- table, the facility still operates, and performs whatever part of
- its purpose remains meaningful.
-
- (For example, a function in a library to compute square roots has
- a purpose that is entirely well-defined independent of the
- application. Therefore, Subsection 2d requires that any
- application-supplied function or table used by this function must
- be optional: if the application does not supply it, the square
- root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Library,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Library, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote
-it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the Library
-with the Library (or with a work based on the Library) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library. To do
-this, you must alter all the notices that refer to this License, so
-that they refer to the ordinary GNU General Public License, version 2,
-instead of to this License. (If a newer version than version 2 of the
-ordinary GNU General Public License has appeared, then you can specify
-that version instead if you wish.) Do not make any other change in
-these notices.
-
- Once this change is made in a given copy, it is irreversible for
-that copy, so the ordinary GNU General Public License applies to all
-subsequent copies and derivative works made from that copy.
-
- This option is useful when you wish to copy part of the code of
-the Library into a program that is not a library.
-
- 4. You may copy and distribute the Library (or a portion or
-derivative of it, under Section 2) in object code or executable form
-under the terms of Sections 1 and 2 above provided that you accompany
-it with the complete corresponding machine-readable source code, which
-must be distributed under the terms of Sections 1 and 2 above on a
-medium customarily used for software interchange.
-
- If distribution of object code is made by offering access to copy
-from a designated place, then offering equivalent access to copy the
-source code from the same place satisfies the requirement to
-distribute the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 5. A program that contains no derivative of any portion of the
-Library, but is designed to work with the Library by being compiled or
-linked with it, is called a "work that uses the Library". Such a
-work, in isolation, is not a derivative work of the Library, and
-therefore falls outside the scope of this License.
-
- However, linking a "work that uses the Library" with the Library
-creates an executable that is a derivative of the Library (because it
-contains portions of the Library), rather than a "work that uses the
-library". The executable is therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
- When a "work that uses the Library" uses material from a header file
-that is part of the Library, the object code for the work may be a
-derivative work of the Library even though the source code is not.
-Whether this is true is especially significant if the work can be
-linked without the Library, or if the work is itself a library. The
-threshold for this to be true is not precisely defined by law.
-
- If such an object file uses only numerical parameters, data
-structure layouts and accessors, and small macros and small inline
-functions (ten lines or less in length), then the use of the object
-file is unrestricted, regardless of whether it is legally a derivative
-work. (Executables containing this object code plus portions of the
-Library will still fall under Section 6.)
-
- Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of Section 6.
-Any executables containing that work also fall under Section 6,
-whether or not they are linked directly with the Library itself.
-
- 6. As an exception to the Sections above, you may also compile or
-link a "work that uses the Library" with the Library to produce a
-work containing portions of the Library, and distribute that work
-under terms of your choice, provided that the terms permit
-modification of the work for the customer's own use and reverse
-engineering for debugging such modifications.
-
- You must give prominent notice with each copy of the work that the
-Library is used in it and that the Library and its use are covered by
-this License. You must supply a copy of this License. If the work
-during execution displays copyright notices, you must include the
-copyright notice for the Library among them, as well as a reference
-directing the user to the copy of this License. Also, you must do one
-of these things:
-
- a) Accompany the work with the complete corresponding
- machine-readable source code for the Library including whatever
- changes were used in the work (which must be distributed under
- Sections 1 and 2 above); and, if the work is an executable linked
- with the Library, with the complete machine-readable "work that
- uses the Library", as object code and/or source code, so that the
- user can modify the Library and then relink to produce a modified
- executable containing the modified Library. (It is understood
- that the user who changes the contents of definitions files in the
- Library will not necessarily be able to recompile the application
- to use the modified definitions.)
-
- b) Accompany the work with a written offer, valid for at
- least three years, to give the same user the materials
- specified in Subsection 6a, above, for a charge no more
- than the cost of performing this distribution.
-
- c) If distribution of the work is made by offering access to copy
- from a designated place, offer equivalent access to copy the above
- specified materials from the same place.
-
- d) Verify that the user has already received a copy of these
- materials or that you have already sent this user a copy.
-
- For an executable, the required form of the "work that uses the
-Library" must include any data and utility programs needed for
-reproducing the executable from it. However, as a special exception,
-the source code distributed need not include anything that is normally
-distributed (in either source or binary form) with the major
-components (compiler, kernel, and so on) of the operating system on
-which the executable runs, unless that component itself accompanies
-the executable.
-
- It may happen that this requirement contradicts the license
-restrictions of other proprietary libraries that do not normally
-accompany the operating system. Such a contradiction means you cannot
-use both them and the Library together in an executable that you
-distribute.
-
- 7. You may place library facilities that are a work based on the
-Library side-by-side in a single library together with other library
-facilities not covered by this License, and distribute such a combined
-library, provided that the separate distribution of the work based on
-the Library and of the other library facilities is otherwise
-permitted, and provided that you do these two things:
-
- a) Accompany the combined library with a copy of the same work
- based on the Library, uncombined with any other library
- facilities. This must be distributed under the terms of the
- Sections above.
-
- b) Give prominent notice with the combined library of the fact
- that part of it is a work based on the Library, and explaining
- where to find the accompanying uncombined form of the same work.
-
- 8. You may not copy, modify, sublicense, link with, or distribute
-the Library except as expressly provided under this License. Any
-attempt otherwise to copy, modify, sublicense, link with, or
-distribute the Library is void, and will automatically terminate your
-rights under this License. However, parties who have received copies,
-or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
-
- 9. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Library or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Library (or any work based on the
-Library), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Library or works based on it.
-
- 10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the
-original licensor to copy, distribute, link with or modify the Library
-subject to these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
- 11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Library at all. For example, if a patent
-license would not permit royalty-free redistribution of the Library by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply,
-and the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 12. If the distribution and/or use of the Library is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Library under this License may add
-an explicit geographical distribution limitation excluding those countries,
-so that distribution is permitted only in or among countries not thus
-excluded. In such case, this License incorporates the limitation as if
-written in the body of this License.
-
- 13. The Free Software Foundation may publish revised and/or new
-versions of the Library General Public License from time to time.
-Such new versions will be similar in spirit to the present version,
-but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Library
-specifies a version number of this License which applies to it and
-"any later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation. If the Library does not specify a
-license version number, you may choose any version ever published by
-the Free Software Foundation.
-
- 14. If you wish to incorporate parts of the Library into other free
-programs whose distribution conditions are incompatible with these,
-write to the author to ask for permission. For software which is
-copyrighted by the Free Software Foundation, write to the Free
-Software Foundation; we sometimes make exceptions for this. Our
-decision will be guided by the two goals of preserving the free status
-of all derivatives of our free software and of promoting the sharing
-and reuse of software generally.
-
- NO WARRANTY
-
- 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
-KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
-LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
-FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
-LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Libraries
-
- If you develop a new library, and you want it to be of the greatest
-possible use to the public, we recommend making it free software that
-everyone can redistribute and change. You can do so by permitting
-redistribution under these terms (or, alternatively, under the terms of the
-ordinary General Public License).
-
- To apply these terms, attach the following notices to the library. It is
-safest to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least the
-"copyright" line and a pointer to where the full notice is found.
-
- <one line to give the library's name and a brief idea of what it does.>
- Copyright (C) <year> <name of author>
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
-Also add information on how to contact you by electronic and paper mail.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the library, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the
- library `Frob' (a library for tweaking knobs) written by James Random Hacker.
-
- <signature of Ty Coon>, 1 April 1990
- Ty Coon, President of Vice
-
-That's all there is to it!
diff --git a/trunk/ChangeLog b/trunk/ChangeLog
deleted file mode 100644
index 956a252..0000000
--- a/trunk/ChangeLog
+++ /dev/null
@@ -1,95 +0,0 @@
-2007-02-28 svu
-
- * configure.in: preparing 2.17.92
-
-2006-02-20 Alexander Shopov <ash@contact.bg>
-
- * Makefile.in.in: Reverting to revision 2. I am apologize
- for committing the file in the previous commit.
-
-2006-02-20 Alexander Shopov <ash@contact.bg>
-
- * configure.in: Added "bg" (Bulgarian) to ALL_LINGUAS
-
-2007-02-04 svu
-
- * libgnomekbd/gkbd-keyboard-drawing.c: using really primary outline,
- closing http://bugzilla.gnome.org/show_bug.cgi?id=352779
- * libgnomekbd/gkbd-keyboard-drawing.c: unneeded text rotation is
- eliminated
-
-2007-02-03 svu
-
- * libgnomekbd/gkbd-keyboard-drawing.c,
- libgnomekbd/gkbd-keyboard-drawing.h: performance and layout fixes,
- closing
- http://bugzilla.gnome.org/show_bug.cgi?id=357872
-
-2007-01-23 svu
-
- * gkbd-indicator-plugins-capplet.c, Makefile.am,
- gkbd-indicator-plugins-capplet.png: fixing the capplet icon
-
-2007-01-13 Takeshi AIHANA <takeshi.aihana@gmail.com>
-
- * configure.in:
- Added 'ja' (Japanese) to ALL_LINGUAS.
-
-2006-11-13 svu
-
- * test/gkbd-config-registry-server.c: small C89 bug, thanks to Jens
- Granseuer
-
-2006-11-07 svu
-
- * CVS: tagging 2.17.2
-
-2006-11-05 svu
-
- * libgnomekbd/Makefile.am: missing libs added, closing
- http://bugzilla.gnome.org/show_bug.cgi?id=371119
-
-2006-10-31 Kjartan Maraas <kmaraas@gnome.org>
-
- * configure.in: Add nb to ALL_LINGUAS
- * po/POTFILES.in: Add missing file.
- * po/nb.po: Add this.
-
-2006-10-28 svu
-
- * libgnomekbd/gkbd-indicator.c: fixing the potential crash
-
-2006-10-27 svu
-
- * libgnomekbd/gkbd-keyboard-config.c: closing the critical memory
- allocation bug: http://bugzilla.gnome.org/show_bug.cgi?id=365590
-
-2006-10-17 svu
-
- * configure.in, libgnomekbd/Makefile.am: adding VERSION_INFO
- controlling the .so versioning
-
-2006-10-07 svu
-
- * capplet/gkbd-indicator-plugins-capplet.c,
- libgnomekbd/gkbd-config-registry.c,
- libgnomekbd/gkbd-config-registry.h,
- libgnomekbd/gkbd-config-registry.xml,
- libgnomekbd/gkbd-desktop-config.c, libgnomekbd/gkbd-desktop-config.h,
- libgnomekbd/gkbd-indicator-config.c, libgnomekbd/gkbd-indicator.c,
- libgnomekbd/gkbd-keyboard-config.c,
- libgnomekbd/gkbd-keyboard-config.h,
- test/gkbd-config-registry-client.sh: now, dbus function asks
- explicitly for layouts/variants. This saves some X traffic, makes
- behavior more consistent.
-
-2006-10-07 svu
-
- * COPYING.LIB, *.c, *.h: putting proper comments describing the
- licensing terms (LGPL).
-
-2006-10-05 svu
-
- * libgnomekbd*.pc.in: added required .so dependencies
- * test/Makefile.am, test/gkbd-config-registry-client.sh: added a tiny
- script to test the dbus server from the command line
diff --git a/trunk/ChangeLog.libgswitchit b/trunk/ChangeLog.libgswitchit
deleted file mode 100644
index 4dc064b..0000000
--- a/trunk/ChangeLog.libgswitchit
+++ /dev/null
@@ -1,269 +0,0 @@
-2006-09-18 Sergey Udaltsov <svu@gnome.org>
-
- * Makefile.am: one header should not be installed, one header should
- be installed instead (for plugins to be built properly).
-
-2006-07-02 Sergey Udaltsov <svu@gnome.org>
-
- * gnome-kbd-indicator.c: fix for gcc 2.95, #347611
-
-2006-07-02 Sergey Udaltsov <svu@gnome.org>
-
- * gnome-kbd-indicator.c: using Unicode subscript for repeating
- descriptions.
-
-2006-07-29 Sergey Udaltsov <svu@gnome.org>
-
- * Makefile.am: fixed CLEANFILES, thanks to Davyd
-
-2006-07-11 Sebastien Bacher <seb128@debian.org>
-
- * Makefile.am: specify srcdir where it's required
-
-2006-07-11 Sebastien Bacher <seb128@debian.org>
-
- * Makefile.am:
- make gswitchitinc_HEADERS list gswitchit-plugins-app.h
-
-2006-07-11 Sebastien Bacher <seb128@debian.org>
-
- * Makefile.am:
- make gswitchitinc_HEADERS list keyboard-config-registry.h
-
-2006-07-11 Sebastien Bacher <seb128@debian.org>
-
- * Makefile.am: fixed type to gswitchit-plugins.h
-
-2006-07-10 Sergey Udaltsov <svu@gnome.org>
-
- * keyboard-config-registry.c: made XML loading lazy. Thanks for the
- idea, Ben
-
-2006-07-10 Sergey Udaltsov <svu@gnome.org>
-
- * gswitchit-plugins-app.c: changing bonobo loop to glib loop
-
-2006-07-09 Sergey Udaltsov <svu@gnome.org>
-
- * gnome-startup.*: Long unused startup stuff removed
-
-2006-07-08 Sergey Udaltsov <svu@gnome.org>
-
- * gnome-kbd-indicator.c, gswitchit-applet-config.c,
- gswitchit-config-private.h, gswitchit-config.c, gswitchit-config.h,
- gswitchit-plugins-add.c, gswitchit-plugins-app.c,
- gswitchit-plugins-app.h, gswitchit-plugins.glade, gswitchit-util.c,
- gswitchit-util.h: Code restructuring, moving plugin management app to
- libgswitchit
-
-2006-07-08 Sergey Udaltsov <svu@gnome.org>
-
- * gnome-kbd-indicator.*: adding set_angle function
-
-2006-07-06 Sergey Udaltsov <svu@gnome.org>
-
- Fixed build process, renaming files from '_' to '-'
-
-2006-07-05 Sergey Udaltsov <svu@gnome.org>
-
- * Makefile.am,
- gnome-kbd-indicator.c,
- gswitchit_config.c,
- gswitchit_config.h: Remote group names from DBUS are working
-
-2006-06-25 Sergey Udaltsov <svu@gnome.org>
-
- The GKI widget is working, the libgswitchit API is changed
- to the GNOME naming convention. Massive change in all GNOME
- kbd-related sources.
-
-2006-06-23 Sergey Udaltsov <svu@gnome.org>
-
- * gnome-kbd-indicator.[ch]: first version of the g-k-i widget
- the development is in progress
-
-2006-05-27 Sergey Udaltsov <svu@gnome.org>
-
- * gswitchit_config.[ch]: optimizing dealing with UTF8 descriptions -
- changed GSList to NULL-terminated gchar **
-
-2006-04-22 Sergey Udaltsov <svu@gnome.org>
-
- * gswitchit_config.[ch]: save/load preview window coords
-
-2006-04-20 Sergey Udaltsov <svu@gnome.org>
-
- * gswitchit_config.c: added kbd config ToString function
-
-2006-04-20 Sergey Udaltsov <svu@gnome.org>
-
- * *.c,*.h: update for new libxklavier API
-
-2006-01-03 Kristof Vansant <de_lupus@pandora.be>
-
- Fixes #171668
-
- * gswitchit_config.c:
- * gnome-startup.[ch]: header cleanup.
-
-2005-12-06 Sergey V. Udaltsov <svu@gnome.org>
-
- * gswitchit_plugin_manager.h,
- gswitchit_plugin_manager.c: Small change in the plugin API:
- the GroupChanged is called for every instance of the applet
-
-2005-11-14 Kjartan Maraas <kmaraas@gnome.org>
-
- * gswitchit_config.c: (GSwitchItConfigLockPrevGroup):
- Fix typo in function name.
-
-2005-09-14 Sergey V. Udaltsov <svu@gnome.org>
-
- * gswitchit_plugin_manager.h,
- gswitchit_plugin_manager.c: added ConfigChanged proxy
-
-2005-07-15 Mark McLoughlin <mark@skynet.ie>
-
- Re-work the way some of the GConf keys are handled.
- See bug #310513
-
- * gswitchit_config.c:
- (_GSwitchItKbdConfigLoadParams): kbdConfig->model can
- be NULL.
- (_GSwitchItKbdConfigSaveParams): if ->model, ->options or
- ->layouts is NULL, unset the appropriate key.
- (GSwitchItKbdConfigLoadFromGConf): ignore overrideSettings
- and use the XKB default for any unset keys.
- (GSwitchItKbdConfigSaveToGConf): ignore overrideSettings.
- (GSwitchItKbdConfigModelSet): set ->model to NULL if the
- GConf key contains an empty string.
-
- * gswitchit_config.h: remove the overrideSettings member
- from GSwitchItKbdConfig and add a kbdConfigDefault to
- parameter to GSwitchItKbdConfigLoadFromGConf()
-
-2005-03-16 Sergey V. Udaltsov <svu@gnome.org>
-
- * Makefile.am: removing -Werror
-
-2005-03-14 Pedro Villavicencio Garrido <pvillavi@gnome.org>
-
- * gswitchit_config.c (GSwitchItAppletConfigLoadImages): use GtkMessageDialog instead of gnome_error_dialog.
-
-2005-03-16 Kjartan Maraas <kmaraas@gnome.org>
-
- * gnome-startup.c: (gnome_startup_acquire_token):
- Fix some compiler warnings wrt signedness.
- * gswitchit_config.h:
- * gswitchit_plugin_manager.c:
- * gswitchit_util.c:
- * gswitchit_util.h: Clean up headers.
-
-2005-01-12 Sergey Udaltsov <svu@gnome.org>
-
- * gswitchit_config.h,
- gswitchit_config.c: the listeners are inside the structs
-
-2005-01-08 Sergey Udaltsov <svu@gnome.org>
-
- * gswitchit_config.h,
- gswitchit_config.c: better names for the save/load functions
-
-2005-01-03 Dan Winship <danw@novell.com>
-
- * gswitchit_util.c (GSwitchItLogAppender): Cast time_t to long to
- match the printf format.
-
-2004-12-22 Sergey Udaltsov <svu@gnome.org>
-
- * gswitchit_config.h,
- gswitchit_config.c: can listen for the changes
- in the general configuration
-
-2004-12-18 Sergey Udaltsov <svu@gnome.org>
-
- * Makefile.am,
- gswitchit_applet_config.h,
- gswitchit_config.c,
- gswitchit_config.h,
- gswitchit_config_private.h,
- gswitchit_plugin.h,
- gswitchit_plugin_manager.c,
- gswitchit_plugin_manager.h,
- gswitchit_xkb_config.h,
- gswitchit_xkb_config_private.h: massive redesign.
- Three GSwitchIt*Config classes now - instead of two.
- GConf entries changed.
-
-2004-12-08 Sergey Udaltsov <svu@gnome.org>
-
- * gswitchit_applet_config.h,
- gswitchit_config.c,
- gswitchit_plugin_manager.c: changing fixed-size array to GSList.
- Memleaks fixed.
-
-2004-10-03 Sergey Udaltsov <svu@gnome.org>
-
- * gswitchit_config.c:
- Removing a function which was never used.
-
-2004-06-29 Jody Goldberg <jody@gnome.org>
-
- * gswitchit_config.c (GSwitchItXkbConfigInit) : s/g_error/g_warning/
- (GSwitchItAppletConfigInit) : ditto.
-
-2004-04-15 Jody Goldberg <jody@gnome.org>
-
- * Release 2.6.1
-
-2004-04-04 Sergey Udaltsov <svu@gnome.org>
-
- * gswithit_config.c:
- Better theme handling - deprecated GnomeIconTheme changed to
- GtkIconTheme. Also now gswitchit applet allows local per-user
- icons.
-
-2004-04-01 Jody Goldberg <jody@gnome.org>
-
- * Release 2.6.0.3
-
-2004-03-30 Jody Goldberg <jody@gnome.org>
-
- * Release 2.6.0.1
-
-2004-03-23 Jody Goldberg <jody@gnome.org>
-
- * Release 2.6.0
-
-2004-03-11 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.4
-
-2004-02-21 Dennis Smit <ds@nerds-incorporated.org>
-
- * gswitchit_util.c, gswitchit_util.h (GSwitchItHelp):
- Changed GtkWindow argument into a GtkWidget argument.
-
- Updated to egg help and made multihead aware.
-
-2004-02-13 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.3
-
-2004-01-14 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.2
-
-2003-12-30 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.1.1
-
-2003-12-30 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.1
-
-2003-11-12 Jody Goldberg <jody@gnome.org>
-
- * Makefile.am (EXTRA_DIST) : always dist gswitchit.pc.in to keep
- automake happy. There is no significant downside to it.
-
diff --git a/trunk/ChangeLog.libkbdraw b/trunk/ChangeLog.libkbdraw
deleted file mode 100644
index 3f80b82..0000000
--- a/trunk/ChangeLog.libkbdraw
+++ /dev/null
@@ -1,295 +0,0 @@
-2005-10-07 Sergey V. Udaltsov <svu@gnome.org>
-
- * src/keyboard-drawing.c: A bit of cleanup. No flipping any more at
- all.
-
-2005-09-27 Sergey V. Udaltsov <svu@gnome.org>
-
- * src/keyboard-drawing.c: Hack on flipping (const FALSE). Will fix it
- properly next time.
-
-2005-08-24 Sergey V. Udaltsov <svu@gnome.org>
-
- * src/keyboard-drawing.c: Do not use pangoxft any more - and the
- text at least appears.
-
-2005-08-15 Sergey V. Udaltsov <svu@gnome.org>
-
- * src/keyboard-drawing.c: fixing BAD bug with the stack variables,
- I would kill the person doing (gint*)
-
-2005-08-14 Sergey V. Udaltsov <svu@gnome.org>
-
- * autogen.sh, configure.ac: up2date
-
-2004-12-30 Sergey V. Udaltsov <svu@gnome.org>
-
- * src/keyboard-drawing.c, src/keyboard-drawing.h,
- tests/kbdraw.c: substantial architectural changes, introducing
- struct KeyboardDrawingGroupLevel
-
-2004-10-28 Sergey V. Udaltsov <svu@gnome.org>
-
- * src/keyboard-drawing.c, src/keyboard-drawing.h,
- tests/kbdraw.c: Cleaning up the indicators handling.
- Now indicators are handled properly on the off-screen keyboard.
-
-2004-10-24 Sergey V. Udaltsov <svu@gnome.org>
-
- * src/keyboard-drawing.c, src/keyboard-drawing.h,
- tests/kbdraw.c: tracking the modifiers
-
-2004-07-28 Sergey V. Udaltsov
-
- * src/keyboard-drawing.c: prope handling of the "destroy" event
-
-2004-07-14 Sergey V. Udaltsov
-
- * autogen.sh: make automake-1.8 friendly
-
-2004-03-26 Noah Levitt
-
- * src/keyboard-drawing.c:
- * src/keyboard-drawing.h:
- * test/kbdraw.c: Fix up tracking functions and flags.
-
- * src/keyboard-drawing.h: Reformat.
-
-2004-03-25 Noah Levitt
-
- * test/kbdraw.c:
- * src/keyboard-drawing.c: Fix code formatting.
-
-2004-03-25 Noah Levitt
-
- * autogen.sh: Plagiarize gnome-common’s autogen.sh.
-
-2004-02-25 Sergey Oudaltsov
-
- * test/kbdraw.c: two more options - track the group, track the
- config
-
-2004-02-25 Sergey Oudaltsov
-
- * src/: keyboard-drawing.c, keyboard-drawing.h: Now kbdraw can
- track the group and configuration changes. Looks funny actually -
- especially the groups > 0
-
-2004-02-24 Sergey Oudaltsov
-
- * Makefile.am, configure.ac, src/Makefile.am, test/.cvsignore,
- test/Makefile.am, test/kbdraw.c, src/kbdraw.c: now libkbdraw can
- be inserted into other modules as static lib
-
-2003-11-18 Noah Levitt
-
- * README: Add cvs info.
-
- * configure.ac: Need to #include <X11/Xlib.h> before XKBlib.h for
- Xfree86 3.3.6. (Mike Castle)
-
-2003-11-16 Noah Levitt
-
- * configure.ac:
- * kbdraw.pc.in:
- * .cvsignore:
- * Makefile.am: Add pkg-config kbdraw.pc file.
-
-2003-11-16 Noah Levitt
-
- * src/keyboard-drawing.h: Update preprocessor define.
-
- * configure.ac: Bump version number for release.
-
- * README: New readme.
-
-2003-08-18 Noah Levitt
-
- * src/Makefile.am: Add keyboard-marshal.list to EXTRA_DIST.
-
-2003-08-18 Noah Levitt
-
- * src/kbdraw.c: Fix mistake parsing --levels.
-
-2003-08-13 Noah Levitt
-
- * src/keyboard-drawing.c: With the last change, it would warn a bit
- too often. Fixed.
-
-2003-08-13 Noah Levitt
-
- * src/keyboard-drawing.[ch]: Check that the index returned by
- XkbGetNamedIndicator is within range before using it.
-
-2003-08-09 Noah Levitt
-
- * src/kbdraw.c:
- * src/keyboard-drawing.c:
- * src/keyboard-drawing.h: Draw only two shift levels. Command line
- option to choose which ones.
-
-2003-08-09 Noah Levitt
-
- * src/keyboard-drawing.c (keyboard_drawing_set_keyboard): Get
- indicator information.
-
- * src/keyboard_drawing.c (keyboard_drawing_init): Get only the
- information needed, and use XkbGBN_* masks, since they seem to be what
- it expects.
-
-2003-08-09 Noah Levitt
-
- * src/kbdraw.c: Print a more detailed message about what was attempted
- when keyboard_drawing_set_keyboard fails.
-
-2003-08-09 Noah Levitt
-
- * src/keyboard-drawing.c: Draw logo doodads simplistically.
-
-2003-08-09 Noah Levitt
-
- * src/keyboard-drawing.c: Remove debugging printfs.
-
-2003-08-09 Noah Levitt
-
- * src/keyboard-drawing.c:
- * src/keyboard-drawing.h: Color indicator doodads appropriately for
- their state.
-
-2003-08-08 Noah Levitt
-
- * src/keyboard-drawing: Changed my mind. Replace g_asserts with
- g_critical. (g_assert can be disabled, anyway). Hopefully, we'll
- survive a critical thing.
-
-2003-08-07 Noah Levitt
-
- * src/keyboard-drawing.c: It's ok to die if the keyboard geometry says
- the width or height of the keyboard is zero, but use an assertion
- instead of getting a floating point exception.
-
-2003-08-07 Noah Levitt
-
- * src/keyboard-drawing.c: Draw text doodads at the correct angle.
-
-2003-08-07 Noah Levitt
-
- * src/kbdraw.c:
- * src/keyboard-drawing.c:
- * src/keyboard-drawing.h: Choose the keyboard you want to look at from
- the command line (--symbols, --geometry).
-
-2003-08-07 Noah Levitt
-
- * src/keyboard-drawing.c: Get keysyms from the keyboard description,
- not from the server.
-
-2003-08-03 Noah Levitt
-
- * src/keyboard-drawing.c: Fix bug freeing the old keyboard when
- setting a new one.
-
-2003-08-02 Noah Levitt
-
- * src/keyboard-drawing.c: Blank the widget if
- keyboard_drawing_set_keyboard fails.
-
-2003-08-01 Noah Levitt
-
- * src/keyboard-drawing.[ch]: Change keyboard_drawing_set_keybaord to
- take an XkbComponentNamesRec so that we can manage the memory of the
- XkbDescRec ourselves.
-
-2003-07-29 Noah Levitt
-
- * configure.ac: Check for Xkb stuff.
-
-2003-07-29 Noah Levitt
-
- * src/keyboard-drawing.c:
- * src/keyboard-drawing.h: Add keyboard_drawing_set_keyboard.
-
-2003-07-29 Noah Levitt
-
- * src/keyboard-drawing.h: Angle is signed.
-
-2003-07-26 Noah Levitt
-
- * src/keyboard-drawing.c: Fix typo in keyboard_drawing_get_pixbuf.
-
-2003-07-26 Noah Levitt
-
- * src/keyboard-drawing.c:
- * src/keyboard-drawing.h: Add keyboard_drawing_get_pixbuf.
-
-2003-07-26 Noah Levitt
-
- * src/keyboard-drawing.c: Position the second and subsequent lines of
- rotated multi-line pango layouts correctly.
-
-2003-07-26 Noah Levitt
-
- * src/.cvsignore:
- * src/keyboard-marshal.list: Forgot to add this in the last commit.
-
-2003-07-26 Noah Levitt
-
- * configure.ac:
- * src/Makefile.am:
- * src/kbdraw.c:
- * src/keyboard-drawing.c:
- * src/keyboard-drawing.h: Emit a signal "bad-keycode" when we get a
- key event with a keycode that X doesn't think is on the keyboard.
-
-2003-07-26 Noah Levitt
-
- * src/keyboard-drawing.c: Fix bug where string drawn at a different
- angle than the previous string is messed up.
-
-2003-07-26 Noah Levitt
-
- * src/keyboard-drawing.c: Redraw all the region that needs to be
- redrawn when a key is pressed or released.
-
-2003-07-26 Noah Levitt
-
- * src/keyboard-drawing.c: Draw a key even if we can't find a keycode
- for it.
-
-2003-07-26 Noah Levitt
-
- * src/keyboard-drawing.c: Position labels correctly within rotated
- keys (well, most of the time).
-
-2003-07-26 Noah Levitt
-
- * src/keyboard-drawing.c: Position rotated keys correctly.
-
-2003-07-26 Noah Levitt
-
- * src/keyboard-drawing.c: Draw rotated keys rotated. (Still have to
- position them and lots of other stuff.)
-
-2003-07-26 Noah Levitt
-
- * MAINTAINERS: Add MAINTAINERS file.
-
-2003-07-26 Noah Levitt
-
- * src/keyboard-drawing.c:
- * src/keyboard-drawing.h: Remember the angle we're drawing text at, so
- that we don't have to set it every time. Also, use the correct screen
- everywhere instead of screen 0.
-
-2003-07-26 Noah Levitt
-
- * .cvsignore:
- * COPYING:
- * Makefile.am:
- * autogen.sh:
- * configure.ac:
- * src/.cvsignore:
- * src/Makefile.am:
- * src/kbdraw.c:
- * src/keyboard-drawing.c:
- * src/keyboard-drawing.h: Initial checkin.
diff --git a/trunk/Makefile.am b/trunk/Makefile.am
deleted file mode 100644
index 5f54f6e..0000000
--- a/trunk/Makefile.am
+++ /dev/null
@@ -1,20 +0,0 @@
-SUBDIRS = libgnomekbd test capplet po
-
-ACLOCAL_AMFLAGS = -I m4
-
-DISTCLEANFILES = \
- intltool-extract \
- intltool-merge \
- intltool-update
-
-EXTRA_DIST = \
- libgnomekbd.pc.in \
- libgnomekbdui.pc.in \
- intltool-extract.in \
- intltool-merge.in \
- intltool-update.in \
- README.cvs \
- ChangeLog.libkbdraw ChangeLog.libgswitchit
-
-pkgconfigdir = $(libdir)/pkgconfig
-pkgconfig_DATA = libgnomekbd.pc libgnomekbdui.pc
diff --git a/trunk/NEWS b/trunk/NEWS
deleted file mode 100644
index e69de29..0000000
--- a/trunk/NEWS
+++ /dev/null
diff --git a/trunk/README b/trunk/README
deleted file mode 100644
index e69de29..0000000
--- a/trunk/README
+++ /dev/null
diff --git a/trunk/README.cvs b/trunk/README.cvs
deleted file mode 100644
index 49664ac..0000000
--- a/trunk/README.cvs
+++ /dev/null
@@ -1 +0,0 @@
-Please ask a maintainer before committing
diff --git a/trunk/autogen.sh b/trunk/autogen.sh
deleted file mode 100755
index a97b4a7..0000000
--- a/trunk/autogen.sh
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-# Run this to generate all the initial makefiles, etc.
-
-srcdir=`dirname $0`
-test -z "$srcdir" && srcdir=.
-
-PKG_NAME="libgnomekbd"
-
-(test -f $srcdir/configure.in \
- && test -f $srcdir/autogen.sh \
- && test -d $srcdir/libgnomekbd) || {
- echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
- echo " top-level $PKG_NAME directory"
- exit 1
-}
-
-DIE=0
-
-if ! which gnome-autogen.sh ; then
- echo "You need to install the gnome-common module and make"
- echo "sure the gnome-autogen.sh script is in your \$PATH."
- exit 1
-fi
-
-REQUIRED_AUTOMAKE_VERSION=1.9 . gnome-autogen.sh
diff --git a/trunk/capplet/.cvsignore b/trunk/capplet/.cvsignore
deleted file mode 100644
index 41013e3..0000000
--- a/trunk/capplet/.cvsignore
+++ /dev/null
@@ -1,6 +0,0 @@
-Makefile
-Makefile.in
-gkbd-indicator-plugins-capplet
-gkbd-indicator-plugins-capplet.desktop
-gkbd-indicator-plugins-capplet.desktop.in
-
diff --git a/trunk/capplet/Makefile.am b/trunk/capplet/Makefile.am
deleted file mode 100644
index e099f66..0000000
--- a/trunk/capplet/Makefile.am
+++ /dev/null
@@ -1,50 +0,0 @@
-bin_PROGRAMS = gkbd-indicator-plugins-capplet
-
-gladedir="$(pkgdatadir)/glade"
-glade_DATA = gkbd-indicator-plugins.glade
-
-@INTLTOOL_DESKTOP_RULE@
-
-desktopdir = $(datadir)/applications
-Desktop_in_files = gkbd-indicator-plugins-capplet.desktop.in
-desktop_DATA = $(Desktop_in_files:.desktop.in=.desktop)
-
-gkbd_indicator_plugins_capplet_CFLAGS = \
- -I$(top_srcdir) -Wall -Werror \
- $(LIBGLADE_CFLAGS) \
- $(LIBGNOME_CFLAGS) \
- $(LIBGNOMEUI_CFLAGS) \
- $(LIBXKLAVIER_CFLAGS) \
- -I$(top_srcdir)/intl \
- -DSYS_PLUGIN_DIR=\"$(libdir)/gnomekbd/\" \
- -DG_LOG_DOMAIN=\"GnomeKbdIndicatorPluginsCapplet\" \
- -DPREFIX=\"$(prefix)\" \
- -DGLADEDIR=\"$(gladedir)\" \
- -DDATADIR=\"$(datadir)\" \
- -DSYSCONFDIR=\"$(sysconfdir)\" \
- -DLIBDIR=\"$(libdir)\"
-
-gkbd_indicator_plugins_capplet_SOURCES = gkbd-indicator-plugins-capplet.c \
- gkbd-indicator-plugins-add.c \
- gkbd-indicator-plugins-capplet.h
-
-gkbd_indicator_plugins_capplet_LDFLAGS = -export-dynamic
-
-gkbd_indicator_plugins_capplet_LDADD = \
- $(DBUS_LIBS) \
- $(GCONF_LIBS) \
- $(LIBGNOME_LIBS) \
- $(LIBGNOMEUI_LIBS) \
- $(LIBGLADE_LIBS) \
- $(LIBXKLAVIER_LIBS) \
- $(top_builddir)/libgnomekbd/libgnomekbd.la \
- $(top_builddir)/libgnomekbd/libgnomekbdui.la
-
-EXTRA_DIST = gkbd-indicator-plugins-capplet.desktop.in.in \
- $(glade_DATA) \
- $(pixmap_DATA)
-
-DISTCLEANFILES = $(desktop_DATA)
-
-pixmapdir = $(datadir)/icons/hicolor/48x48/apps
-pixmap_DATA = gkbd-indicator-plugins-capplet.png
diff --git a/trunk/capplet/gkbd-indicator-plugins-add.c b/trunk/capplet/gkbd-indicator-plugins-add.c
deleted file mode 100644
index 59e8e6e..0000000
--- a/trunk/capplet/gkbd-indicator-plugins-add.c
+++ /dev/null
@@ -1,193 +0,0 @@
-/*
- * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#include <config.h>
-
-#include "gkbd-indicator-plugins-capplet.h"
-
-#include <string.h>
-#include <sys/stat.h>
-
-#include <gdk/gdkx.h>
-#include <glade/glade.h>
-#include <libbonobo.h>
-
-#include <libxklavier/xklavier.h>
-
-static void
-CappletAddAvailablePluginFunc (const char *fullPath,
- GkbdIndicatorPluginManagerRecord * rec,
- GkbdIndicatorPluginsCapplet * gipc)
-{
- GtkListStore *availablePluginsModel;
- GtkTreeIter iter;
- const GkbdIndicatorPlugin *plugin = rec->plugin;
-
- if (NULL !=
- g_slist_find_custom (gipc->applet_cfg.enabled_plugins,
- fullPath, (GCompareFunc) strcmp))
- return;
-
- availablePluginsModel =
- GTK_LIST_STORE (g_object_get_data (G_OBJECT (gipc->capplet),
- "gkbd_indicator_plugins_add.availablePluginsModel"));
- if (availablePluginsModel == NULL)
- return;
-
- if (plugin != NULL)
- {
- gtk_list_store_append (availablePluginsModel, &iter);
- gtk_list_store_set (availablePluginsModel, &iter,
- NAME_COLUMN, plugin->name,
- FULLPATH_COLUMN, fullPath, -1);
- }
-}
-
-static void
-CappletFillAvailablePluginList (GtkTreeView *
- availablePluginsList,
- GkbdIndicatorPluginsCapplet * gipc)
-{
- GtkListStore *availablePluginsModel =
- GTK_LIST_STORE (gtk_tree_view_get_model
- (GTK_TREE_VIEW (availablePluginsList)));
- GSList *pluginPathNode = gipc->applet_cfg.enabled_plugins;
- GHashTable *allPluginRecs = gipc->plugin_manager.all_plugin_recs;
-
- gtk_list_store_clear (availablePluginsModel);
- if (allPluginRecs == NULL)
- return;
-
- g_object_set_data (G_OBJECT (gipc->capplet),
- "gkbd_indicator_plugins_add.availablePluginsModel",
- availablePluginsModel);
- g_hash_table_foreach (allPluginRecs,
- (GHFunc) CappletAddAvailablePluginFunc, gipc);
- g_object_set_data (G_OBJECT (gipc->capplet),
- "gkbd_indicator_plugins_add.availablePluginsModel",
- NULL);
- pluginPathNode = g_slist_next (pluginPathNode);
-}
-
-static void
-CappletAvailablePluginsSelectionChanged (GtkTreeSelection *
- selection,
- GkbdIndicatorPluginsCapplet * gipc)
-{
- GtkWidget *availablePluginsList =
- GTK_WIDGET (gtk_tree_selection_get_tree_view (selection));
- gboolean isAnythingSelected = FALSE;
- GtkWidget *lblDescription =
- GTK_WIDGET (g_object_get_data (G_OBJECT (gipc->capplet),
- "gkbd_indicator_plugins_add.lblDescription"));
-
- char *fullPath =
- CappletGetSelectedPluginPath (GTK_TREE_VIEW (availablePluginsList),
- gipc);
- isAnythingSelected = fullPath != NULL;
- gtk_label_set_text (GTK_LABEL (lblDescription),
- g_strconcat ("<small><i>",
- _("No description."),
- "</i></small>", NULL));
- gtk_label_set_use_markup (GTK_LABEL (lblDescription), TRUE);
-
- if (fullPath != NULL)
- {
- const GkbdIndicatorPlugin *plugin =
- gkbd_indicator_plugin_manager_get_plugin (&gipc->plugin_manager,
- fullPath);
- if (plugin != NULL && plugin->description != NULL)
- gtk_label_set_text (GTK_LABEL (lblDescription),
- g_strconcat ("<small><i>",
- plugin->
- description, "</i></small>", NULL));
- gtk_label_set_use_markup (GTK_LABEL (lblDescription), TRUE);
- }
- gtk_widget_set_sensitive (GTK_WIDGET
- (g_object_get_data
- (G_OBJECT (gipc->capplet),
- "gkbd_indicator_plugins_add.btnOK")),
- isAnythingSelected);
-}
-
-void
-CappletEnablePlugin (GtkWidget * btnAdd, GkbdIndicatorPluginsCapplet * gipc)
-{
- /* default domain! */
- GladeXML *data = glade_xml_new (GLADEDIR "/gkbd-indicator-plugins.glade",
- "gkbd_indicator_plugins_add", NULL);
- GtkWidget *popup =
- glade_xml_get_widget (data, "gkbd_indicator_plugins_add");
- GtkWidget *availablePluginsList;
- GtkTreeModel *availablePluginsModel;
- GtkCellRenderer *renderer =
- GTK_CELL_RENDERER (gtk_cell_renderer_text_new ());
- GtkTreeViewColumn *column = gtk_tree_view_column_new_with_attributes (NULL,
- renderer,
- "text",
- 0,
- NULL);
- GtkTreeSelection *selection;
- gint response;
- availablePluginsList = glade_xml_get_widget (data, "allPlugins");
- availablePluginsModel =
- GTK_TREE_MODEL (gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_STRING));
- gtk_tree_view_set_model (GTK_TREE_VIEW (availablePluginsList),
- availablePluginsModel);
- gtk_tree_view_append_column (GTK_TREE_VIEW (availablePluginsList), column);
- selection =
- gtk_tree_view_get_selection (GTK_TREE_VIEW (availablePluginsList));
- gtk_tree_selection_set_mode (selection, GTK_SELECTION_SINGLE);
- CappletFillAvailablePluginList (GTK_TREE_VIEW (availablePluginsList), gipc);
- g_signal_connect (G_OBJECT (selection), "changed",
- G_CALLBACK
- (CappletAvailablePluginsSelectionChanged), gipc);
- g_object_set_data (G_OBJECT (gipc->capplet),
- "gkbd_indicator_plugins_add.btnOK",
- glade_xml_get_widget (data, "btnOK"));
- g_object_set_data (G_OBJECT (gipc->capplet),
- "gkbd_indicator_plugins_add.lblDescription",
- glade_xml_get_widget (data, "lblDescription"));
- CappletAvailablePluginsSelectionChanged (selection, gipc);
- response = gtk_dialog_run (GTK_DIALOG (popup));
- g_object_set_data (G_OBJECT (gipc->capplet),
- "gkbd_indicator_plugins_add.lblDescription", NULL);
- g_object_set_data (G_OBJECT (gipc->capplet),
- "gkbd_indicator_plugins_add.btnOK", NULL);
- gtk_widget_hide_all (popup);
- if (response == GTK_RESPONSE_OK)
- {
- char *fullPath =
- CappletGetSelectedPluginPath (GTK_TREE_VIEW (availablePluginsList),
- gipc);
- if (fullPath != NULL)
- {
- gkbd_indicator_plugin_manager_enable_plugin (&gipc->
- plugin_manager,
- &gipc->
- applet_cfg.
- enabled_plugins,
- fullPath);
- CappletFillActivePluginList (gipc);
- g_free (fullPath);
- gkbd_indicator_config_save_to_gconf (&gipc->applet_cfg);
- }
- }
- gtk_widget_destroy (popup);
-}
diff --git a/trunk/capplet/gkbd-indicator-plugins-capplet.c b/trunk/capplet/gkbd-indicator-plugins-capplet.c
deleted file mode 100644
index d2e0f82..0000000
--- a/trunk/capplet/gkbd-indicator-plugins-capplet.c
+++ /dev/null
@@ -1,383 +0,0 @@
-/*
- * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#include <config.h>
-
-#include "gkbd-indicator-plugins-capplet.h"
-
-#include <string.h>
-#include <sys/stat.h>
-
-#include <glib/gi18n.h>
-#include <gdk/gdkx.h>
-#include <glade/glade.h>
-#include <libgnomeui/gnome-ui-init.h>
-#include <libgnomeui/gnome-help.h>
-
-static GkbdKeyboardConfig initialSysKbdConfig;
-static GMainLoop *loop;
-
-extern void
-CappletFillActivePluginList (GkbdIndicatorPluginsCapplet * gipc)
-{
- GtkWidget *activePlugins = CappletGetGladeWidget (gipc, "activePlugins");
- GtkListStore *activePluginsModel =
- GTK_LIST_STORE (gtk_tree_view_get_model (GTK_TREE_VIEW (activePlugins)));
- GSList *pluginPathNode = gipc->applet_cfg.enabled_plugins;
- GHashTable *allPluginRecs = gipc->plugin_manager.all_plugin_recs;
-
- gtk_list_store_clear (activePluginsModel);
- if (allPluginRecs == NULL)
- return;
-
- while (pluginPathNode != NULL)
- {
- GtkTreeIter iter;
- const char *fullPath = (const char *) pluginPathNode->data;
- const GkbdIndicatorPlugin *plugin =
- gkbd_indicator_plugin_manager_get_plugin (&gipc->plugin_manager,
- fullPath);
- if (plugin != NULL)
- {
- gtk_list_store_append (activePluginsModel, &iter);
- gtk_list_store_set (activePluginsModel, &iter,
- NAME_COLUMN, plugin->name,
- FULLPATH_COLUMN, fullPath, -1);
- }
-
- pluginPathNode = g_slist_next (pluginPathNode);
- }
-}
-
-static char *
-CappletGetSelectedActivePluginPath (GkbdIndicatorPluginsCapplet * gipc)
-{
- GtkTreeView *pluginsList =
- GTK_TREE_VIEW (CappletGetGladeWidget (gipc, "activePlugins"));
- return CappletGetSelectedPluginPath (pluginsList, gipc);
-}
-
-char *
-CappletGetSelectedPluginPath (GtkTreeView * pluginsList,
- GkbdIndicatorPluginsCapplet * gipc)
-{
- GtkTreeModel *model = gtk_tree_view_get_model (GTK_TREE_VIEW (pluginsList));
- GtkTreeSelection *selection =
- gtk_tree_view_get_selection (GTK_TREE_VIEW (pluginsList));
- GtkTreeIter selectedIter;
-
- if (gtk_tree_selection_get_selected (selection, NULL, &selectedIter))
- {
- char *fullPath = NULL;
-
- gtk_tree_model_get (model, &selectedIter,
- FULLPATH_COLUMN, &fullPath, -1);
- return fullPath;
- }
- return NULL;
-}
-
-static void
-CappletActivePluginsSelectionChanged (GtkTreeSelection *
- selection,
- GkbdIndicatorPluginsCapplet * gipc)
-{
- GtkWidget *activePlugins = CappletGetGladeWidget (gipc, "activePlugins");
- GtkTreeModel *model =
- gtk_tree_view_get_model (GTK_TREE_VIEW (activePlugins));
- GtkTreeIter selectedIter;
- gboolean isAnythingSelected = FALSE;
- gboolean isFirstSelected = FALSE;
- gboolean isLastSelected = FALSE;
- gboolean hasConfigurationUi = FALSE;
- GtkWidget *btnRemove = CappletGetGladeWidget (gipc, "btnRemove");
- GtkWidget *btnUp = CappletGetGladeWidget (gipc, "btnUp");
- GtkWidget *btnDown = CappletGetGladeWidget (gipc, "btnDown");
- GtkWidget *btnProperties = CappletGetGladeWidget (gipc, "btnProperties");
- GtkWidget *lblDescription = CappletGetGladeWidget (gipc, "lblDescription");
-
- gtk_label_set_text (GTK_LABEL (lblDescription),
- g_strconcat ("<small><i>",
- _("No description."),
- "</i></small>", NULL));
- gtk_label_set_use_markup (GTK_LABEL (lblDescription), TRUE);
-
- if (gtk_tree_selection_get_selected (selection, NULL, &selectedIter))
- {
- int counter = gtk_tree_model_iter_n_children (model, NULL);
- GtkTreePath *treePath = gtk_tree_model_get_path (model, &selectedIter);
- gint *indices = gtk_tree_path_get_indices (treePath);
- char *fullPath = CappletGetSelectedActivePluginPath (gipc);
- const GkbdIndicatorPlugin *plugin =
- gkbd_indicator_plugin_manager_get_plugin (&gipc->plugin_manager,
- fullPath);
-
- isAnythingSelected = TRUE;
-
- isFirstSelected = indices[0] == 0;
- isLastSelected = indices[0] == counter - 1;
-
- if (plugin != NULL)
- {
- hasConfigurationUi =
- (plugin->configure_properties_callback != NULL);
- gtk_label_set_text (GTK_LABEL (lblDescription),
- g_strconcat ("<small><i>",
- plugin->
- description,
- "</i></small>", NULL));
- gtk_label_set_use_markup (GTK_LABEL (lblDescription), TRUE);
- }
- g_free (fullPath);
-
- gtk_tree_path_free (treePath);
- }
- gtk_widget_set_sensitive (btnRemove, isAnythingSelected);
- gtk_widget_set_sensitive (btnUp, isAnythingSelected && !isFirstSelected);
- gtk_widget_set_sensitive (btnDown, isAnythingSelected && !isLastSelected);
- gtk_widget_set_sensitive (btnProperties, isAnythingSelected
- && hasConfigurationUi);
-}
-
-static void
-CappletPromotePlugin (GtkWidget * btnUp, GkbdIndicatorPluginsCapplet * gipc)
-{
- char *fullPath = CappletGetSelectedActivePluginPath (gipc);
- if (fullPath != NULL)
- {
- gkbd_indicator_plugin_manager_promote_plugin (&gipc->
- plugin_manager,
- gipc->applet_cfg.
- enabled_plugins,
- fullPath);
- g_free (fullPath);
- CappletFillActivePluginList (gipc);
- gkbd_indicator_config_save_to_gconf (&gipc->applet_cfg);
- }
-}
-
-static void
-CappletDemotePlugin (GtkWidget * btnUp, GkbdIndicatorPluginsCapplet * gipc)
-{
- char *fullPath = CappletGetSelectedActivePluginPath (gipc);
- if (fullPath != NULL)
- {
- gkbd_indicator_plugin_manager_demote_plugin (&gipc->
- plugin_manager,
- gipc->applet_cfg.
- enabled_plugins, fullPath);
- g_free (fullPath);
- CappletFillActivePluginList (gipc);
- gkbd_indicator_config_save_to_gconf (&gipc->applet_cfg);
- }
-}
-
-static void
-CappletDisablePlugin (GtkWidget * btnRemove,
- GkbdIndicatorPluginsCapplet * gipc)
-{
- char *fullPath = CappletGetSelectedActivePluginPath (gipc);
- if (fullPath != NULL)
- {
- gkbd_indicator_plugin_manager_disable_plugin (&gipc->
- plugin_manager,
- &gipc->
- applet_cfg.
- enabled_plugins,
- fullPath);
- g_free (fullPath);
- CappletFillActivePluginList (gipc);
- gkbd_indicator_config_save_to_gconf (&gipc->applet_cfg);
- }
-}
-
-static void
-CappletConfigurePlugin (GtkWidget * btnRemove,
- GkbdIndicatorPluginsCapplet * gipc)
-{
- char *fullPath = CappletGetSelectedActivePluginPath (gipc);
- if (fullPath != NULL)
- {
- gkbd_indicator_plugin_manager_configure_plugin (&gipc->
- plugin_manager,
- &gipc->
- plugin_container,
- fullPath,
- GTK_WINDOW
- (gipc->capplet));
- g_free (fullPath);
- }
-}
-
-static void
-CappletResponse (GtkDialog * dialog, gint response)
-{
- if (response == GTK_RESPONSE_HELP)
- {
- GError *error = NULL;
- gnome_help_display_on_screen ("gkbd", "gkb-indicator-applet-plugins",
- gtk_widget_get_screen (GTK_WIDGET
- (dialog)), &error);
- return;
- }
-
- g_main_loop_quit (loop);
-}
-
-static void
-CappletSetup (GkbdIndicatorPluginsCapplet * gipc)
-{
- GladeXML *data;
- GtkWidget *capplet;
- GtkWidget *activePlugins;
- GtkTreeModel *activePluginsModel;
- GtkCellRenderer *renderer =
- GTK_CELL_RENDERER (gtk_cell_renderer_text_new ());
- GtkTreeViewColumn *column =
- gtk_tree_view_column_new_with_attributes (NULL, renderer,
- "text", 0,
- NULL);
- GtkTreeSelection *selection;
- glade_gnome_init ();
-
- gtk_window_set_default_icon_name ("gkbd-indicator-plugins-capplet");
-
- /* default domain! */
- data =
- glade_xml_new (GLADEDIR "/gkbd-indicator-plugins.glade",
- "gkbd_indicator_plugins", NULL);
- gipc->capplet = capplet =
- glade_xml_get_widget (data, "gkbd_indicator_plugins");
-
- gtk_object_set_data (GTK_OBJECT (capplet), "gladeData", data);
- g_signal_connect_swapped (GTK_OBJECT (capplet),
- "destroy", G_CALLBACK (g_object_unref), data);
- g_signal_connect_swapped (G_OBJECT (capplet), "unrealize",
- G_CALLBACK (g_main_loop_quit), loop);
-
- g_signal_connect (GTK_OBJECT (capplet),
- "response", G_CALLBACK (CappletResponse), NULL);
-
- glade_xml_signal_connect_data (data, "on_btnUp_clicked",
- GTK_SIGNAL_FUNC
- (CappletPromotePlugin), gipc);
- glade_xml_signal_connect_data (data,
- "on_btnDown_clicked",
- GTK_SIGNAL_FUNC (CappletDemotePlugin), gipc);
- glade_xml_signal_connect_data (data,
- "on_btnAdd_clicked",
- GTK_SIGNAL_FUNC (CappletEnablePlugin), gipc);
- glade_xml_signal_connect_data (data,
- "on_btnRemove_clicked",
- GTK_SIGNAL_FUNC
- (CappletDisablePlugin), gipc);
- glade_xml_signal_connect_data (data,
- "on_btnProperties_clicked",
- GTK_SIGNAL_FUNC
- (CappletConfigurePlugin), gipc);
-
- activePlugins = CappletGetGladeWidget (gipc, "activePlugins");
- activePluginsModel =
- GTK_TREE_MODEL (gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_STRING));
- gtk_tree_view_set_model (GTK_TREE_VIEW (activePlugins), activePluginsModel);
- gtk_tree_view_append_column (GTK_TREE_VIEW (activePlugins), column);
- selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (activePlugins));
- gtk_tree_selection_set_mode (selection, GTK_SELECTION_SINGLE);
- g_signal_connect (G_OBJECT (selection), "changed",
- G_CALLBACK (CappletActivePluginsSelectionChanged), gipc);
- CappletFillActivePluginList (gipc);
- CappletActivePluginsSelectionChanged (selection, gipc);
- gtk_widget_show_all (capplet);
-}
-
-int
-main (int argc, char **argv)
-{
- GkbdIndicatorPluginsCapplet gipc;
-
- GError *gconf_error = NULL;
- GConfClient *confClient;
-
- bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
- bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
- textdomain (GETTEXT_PACKAGE);
- memset (&gipc, 0, sizeof (gipc));
- gnome_program_init ("gkbd", VERSION,
- LIBGNOMEUI_MODULE, argc, argv,
- GNOME_PROGRAM_STANDARD_PROPERTIES, NULL);
- if (!gconf_init (argc, argv, &gconf_error))
- {
- g_warning (_("Failed to init GConf: %s\n"), gconf_error->message);
- g_error_free (gconf_error);
- return 1;
- }
- gconf_error = NULL;
- /*GkbdIndicatorInstallGlibLogAppender( ); */
- gipc.engine = xkl_engine_get_instance (GDK_DISPLAY ());
- gipc.config_registry = xkl_config_registry_get_instance (gipc.engine);
-
- confClient = gconf_client_get_default ();
- gkbd_indicator_plugin_container_init (&gipc.plugin_container, confClient);
- g_object_unref (confClient);
-
- gkbd_keyboard_config_init (&gipc.kbd_cfg, confClient, gipc.engine);
- gkbd_keyboard_config_init (&initialSysKbdConfig, confClient, gipc.engine);
-
- gkbd_indicator_config_init (&gipc.applet_cfg, confClient, gipc.engine);
-
- gkbd_indicator_plugin_manager_init (&gipc.plugin_manager);
-
- gkbd_keyboard_config_load_from_x_initial (&initialSysKbdConfig, NULL);
- gkbd_keyboard_config_load_from_gconf (&gipc.kbd_cfg, &initialSysKbdConfig);
-
- gkbd_indicator_config_load_from_gconf (&gipc.applet_cfg);
-
- loop = g_main_loop_new (NULL, TRUE);
-
- CappletSetup (&gipc);
-
- g_main_loop_run (loop);
-
- gkbd_indicator_plugin_manager_term (&gipc.plugin_manager);
-
- gkbd_indicator_config_term (&gipc.applet_cfg);
-
- gkbd_keyboard_config_term (&gipc.kbd_cfg);
- gkbd_keyboard_config_term (&initialSysKbdConfig);
-
- gkbd_indicator_plugin_container_term (&gipc.plugin_container);
- g_object_unref (G_OBJECT (gipc.config_registry));
- g_object_unref (G_OBJECT (gipc.engine));
- return 0;
-}
-
-/* functions just for plugins - otherwise ldd is not happy */
-void
-gkbd_indicator_plugin_container_reinit_ui (GkbdIndicatorPluginContainer * pc)
-{
-}
-
-gchar **
-gkbd_indicator_plugin_load_localized_group_names (GkbdIndicatorPluginContainer
- * pc)
-{
- return
- gkbd_desktop_config_load_group_descriptions_utf8 (&
- (((GkbdIndicatorPluginsCapplet *) pc)->cfg), (((GkbdIndicatorPluginsCapplet *) pc)->config_registry));
-}
diff --git a/trunk/capplet/gkbd-indicator-plugins-capplet.desktop.in.in b/trunk/capplet/gkbd-indicator-plugins-capplet.desktop.in.in
deleted file mode 100644
index f9e04df..0000000
--- a/trunk/capplet/gkbd-indicator-plugins-capplet.desktop.in.in
+++ /dev/null
@@ -1,15 +0,0 @@
-[Desktop Entry]
-Encoding=UTF-8
-_Name=Keyboard Indicator plugins
-_Comment=Enable/disable installed plugins
-Exec=gkbd-indicator-plugins-capplet
-Icon=gnome-dev-keyboard
-Terminal=false
-Type=Application
-StartupNotify=true
-Categories=Application;System;Settings;AdvancedSettings;
-OnlyShowIn=GNOME;
-X-GNOME-Bugzilla-Bugzilla=GNOME
-X-GNOME-Bugzilla-Product=libgnomekbd
-X-GNOME-Bugzilla-Component=keyboard indicator plugins capplet
-X-GNOME-Bugzilla-Version=@VERSION@
diff --git a/trunk/capplet/gkbd-indicator-plugins-capplet.h b/trunk/capplet/gkbd-indicator-plugins-capplet.h
deleted file mode 100644
index 4f622c2..0000000
--- a/trunk/capplet/gkbd-indicator-plugins-capplet.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef __GKBD_INDICATOR_PLUGINS_CAPPLET_H__
-#define __GKBD_INDICATOR_PLUGINS_CAPPLET_H__
-
-#include <glib-object.h>
-#include <gtk/gtkwidget.h>
-#include <glade/glade-xml.h>
-
-#include "libgnomekbd/gkbd-desktop-config.h"
-#include "libgnomekbd/gkbd-indicator-config.h"
-#include "libgnomekbd/gkbd-keyboard-config.h"
-
-#include "libgnomekbd/gkbd-indicator-plugin-manager.h"
-#include "libgnomekbd/gkbd-util.h"
-
-typedef struct _GkbdIndicatorPluginsCapplet
-{
- GkbdIndicatorPluginContainer plugin_container;
- GkbdDesktopConfig cfg;
- GkbdIndicatorConfig applet_cfg;
- GkbdKeyboardConfig kbd_cfg;
- GkbdIndicatorPluginManager plugin_manager;
- XklEngine *engine;
- XklConfigRegistry *config_registry;
-
- GtkWidget *capplet;
-} GkbdIndicatorPluginsCapplet;
-
-#define NAME_COLUMN 0
-#define FULLPATH_COLUMN 1
-
-#define CappletGetGladeWidget( gipc, name ) \
- glade_xml_get_widget( \
- GLADE_XML( g_object_get_data( G_OBJECT( (gipc)->capplet ), \
- "gladeData" ) ), \
- name )
-
-extern void CappletFillActivePluginList (GkbdIndicatorPluginsCapplet * gipc);
-
-extern char *CappletGetSelectedPluginPath (GtkTreeView * plugins_list,
- GkbdIndicatorPluginsCapplet *
- gipc);
-
-extern void CappletEnablePlugin (GtkWidget * btnAdd,
- GkbdIndicatorPluginsCapplet * gipc);
-
-#endif
diff --git a/trunk/capplet/gkbd-indicator-plugins-capplet.png b/trunk/capplet/gkbd-indicator-plugins-capplet.png
deleted file mode 100644
index acedf80..0000000
--- a/trunk/capplet/gkbd-indicator-plugins-capplet.png
+++ /dev/null
Binary files differ
diff --git a/trunk/capplet/gkbd-indicator-plugins.glade b/trunk/capplet/gkbd-indicator-plugins.glade
deleted file mode 100644
index 9d3d2d1..0000000
--- a/trunk/capplet/gkbd-indicator-plugins.glade
+++ /dev/null
@@ -1,532 +0,0 @@
-<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
-
-<glade-interface>
-<requires lib="gnome"/>
-
-<widget class="GtkDialog" id="gkbd_indicator_plugins">
- <property name="border_width">5</property>
- <property name="visible">True</property>
- <property name="title" translatable="yes">Keyboard Indicator Plugins</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">False</property>
- <property name="resizable">True</property>
- <property name="destroy_with_parent">False</property>
- <property name="decorated">True</property>
- <property name="skip_taskbar_hint">False</property>
- <property name="skip_pager_hint">False</property>
- <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
- <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
- <property name="has_separator">False</property>
-
- <child internal-child="vbox">
- <widget class="GtkVBox" id="dialog-vbox1">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">2</property>
-
- <child internal-child="action_area">
- <widget class="GtkHButtonBox" id="dialog-action_area1">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</property>
-
- <child>
- <widget class="GtkButton" id="btnClose">
- <property name="visible">True</property>
- <property name="tooltip" translatable="yes">Close the dialog</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-close</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="response_id">-7</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="btnHelp">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-help</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="response_id">-11</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="pack_type">GTK_PACK_END</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox5">
- <property name="border_width">5</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkHBox" id="hbox1">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">12</property>
-
- <child>
- <widget class="GtkAlignment" id="alignment1">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xscale">1</property>
- <property name="yscale">1</property>
- <property name="top_padding">0</property>
- <property name="bottom_padding">0</property>
- <property name="left_padding">0</property>
- <property name="right_padding">0</property>
-
- <child>
- <widget class="GtkVBox" id="vbox1">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="label3">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Active _plugins:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">activePlugins</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkScrolledWindow" id="scrolledwindow1">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="shadow_type">GTK_SHADOW_IN</property>
- <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
-
- <child>
- <widget class="GtkTreeView" id="activePlugins">
- <property name="width_request">160</property>
- <property name="visible">True</property>
- <property name="tooltip" translatable="yes">The list of active plugins</property>
- <property name="can_focus">True</property>
- <property name="headers_visible">False</property>
- <property name="rules_hint">False</property>
- <property name="reorderable">False</property>
- <property name="enable_search">True</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkAlignment" id="alignment12">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xscale">1</property>
- <property name="yscale">1</property>
- <property name="top_padding">0</property>
- <property name="bottom_padding">0</property>
- <property name="left_padding">0</property>
- <property name="right_padding">0</property>
-
- <child>
- <widget class="GtkVBox" id="vbox3">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="label10">
- <property name="visible">True</property>
- <property name="label" translatable="yes"></property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkButton" id="btnAdd">
- <property name="visible">True</property>
- <property name="tooltip" translatable="yes">Activate more plugins</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-add</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <signal name="clicked" handler="on_btnAdd_clicked" last_modification_time="Tue, 29 Jul 2003 23:37:15 GMT"/>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkButton" id="btnRemove">
- <property name="visible">True</property>
- <property name="tooltip" translatable="yes">Deactivate selected plugin</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-remove</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <signal name="clicked" handler="on_btnRemove_clicked" last_modification_time="Tue, 29 Jul 2003 23:37:02 GMT"/>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkButton" id="btnUp">
- <property name="visible">True</property>
- <property name="tooltip" translatable="yes">Increase the plugin priority</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-go-up</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <signal name="clicked" handler="on_btnUp_clicked" last_modification_time="Tue, 29 Jul 2003 23:36:45 GMT"/>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkButton" id="btnDown">
- <property name="visible">True</property>
- <property name="tooltip" translatable="yes">Decrease the plugin priority</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-go-down</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <signal name="clicked" handler="on_btnDown_clicked" last_modification_time="Tue, 29 Jul 2003 23:36:30 GMT"/>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkButton" id="btnProperties">
- <property name="visible">True</property>
- <property name="tooltip" translatable="yes">Configure the selected plugin</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-properties</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <signal name="clicked" handler="on_btnProperties_clicked" last_modification_time="Tue, 29 Jul 2003 23:36:16 GMT"/>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label11">
- <property name="visible">True</property>
- <property name="label" translatable="yes"></property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="lblDescription">
- <property name="visible">True</property>
- <property name="label" translatable="yes"></property>
- <property name="use_underline">False</property>
- <property name="use_markup">True</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">True</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- </child>
-</widget>
-
-<widget class="GtkDialog" id="gkbd_indicator_plugins_add">
- <property name="border_width">5</property>
- <property name="visible">True</property>
- <property name="title" translatable="yes">Add Plugin</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">True</property>
- <property name="resizable">True</property>
- <property name="destroy_with_parent">True</property>
- <property name="decorated">True</property>
- <property name="skip_taskbar_hint">False</property>
- <property name="skip_pager_hint">False</property>
- <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
- <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
- <property name="has_separator">False</property>
-
- <child internal-child="vbox">
- <widget class="GtkVBox" id="dialog-vbox2">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">2</property>
-
- <child internal-child="action_area">
- <widget class="GtkHButtonBox" id="dialog-action_area2">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</property>
-
- <child>
- <widget class="GtkButton" id="helpbutton1">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-help</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="response_id">-11</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="cancelbutton1">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-cancel</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="response_id">-6</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="btnOK">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-ok</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="response_id">-5</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="pack_type">GTK_PACK_END</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkAlignment" id="alignment13">
- <property name="border_width">5</property>
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xscale">1</property>
- <property name="yscale">1</property>
- <property name="top_padding">0</property>
- <property name="bottom_padding">0</property>
- <property name="left_padding">0</property>
- <property name="right_padding">0</property>
-
- <child>
- <widget class="GtkVBox" id="vbox4">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="label18">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Available plugins:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">allPlugins</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkScrolledWindow" id="scrolledwindow2">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="shadow_type">GTK_SHADOW_IN</property>
- <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
-
- <child>
- <widget class="GtkTreeView" id="allPlugins">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="headers_visible">False</property>
- <property name="rules_hint">False</property>
- <property name="reorderable">False</property>
- <property name="enable_search">True</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="lblDescription">
- <property name="visible">True</property>
- <property name="label" translatable="yes"></property>
- <property name="use_underline">False</property>
- <property name="use_markup">True</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">True</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- </child>
-</widget>
-
-</glade-interface>
diff --git a/trunk/configure.in b/trunk/configure.in
deleted file mode 100644
index 77eb0b5..0000000
--- a/trunk/configure.in
+++ /dev/null
@@ -1,109 +0,0 @@
-dnl ***************************************************************************
-dnl *** configure.in for libgnomekbd ***
-dnl ***************************************************************************
-AC_INIT(libgnomekbd, 2.17.92)
-AC_PREREQ(2.59)
-
-VERSION_INFO=1:0:0
-AC_SUBST(VERSION_INFO)
-
-AM_CONFIG_HEADER(config.h)
-AM_INIT_AUTOMAKE(1.8)
-AC_CONFIG_MACRO_DIR(m4)
-
-dnl ***************************************************************************
-dnl *** Minimum library versions for libgnomekbd ***
-dnl ***************************************************************************
-DBUS_REQUIRED=0.92
-DBUS_GLIB_REQUIRED=0.34
-GCONF_REQUIRED=2.14.0
-GDK_REQUIRED=2.10.3
-GTK_REQUIRED=2.10.3
-LIBGLADE_REQUIRED=2.6.0
-LIBGNOME_REQUIRED=2.16.0
-LIBGNOMEUI_REQUIRED=2.16.0
-LIBXKLAVIER_REQUIRED=2.91
-dnl ***************************************************************************
-
-AM_MAINTAINER_MODE
-
-AC_PROG_INTLTOOL
-GNOME_COMPILE_WARNINGS
-
-AC_ISC_POSIX
-AC_PROG_CC
-AC_STDC_HEADERS
-AM_PROG_LIBTOOL
-
-GETTEXT_PACKAGE=libgnomekbd
-AC_SUBST(GETTEXT_PACKAGE)
-AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Gettext package])
-
-ALL_LINGUAS="bg ja nb ru"
-
-AM_GLIB_GNU_GETTEXT
-
-GLIB_DEFINE_LOCALEDIR(GNOMELOCALEDIR)
-
-AC_CHECK_FUNCS(setlocale)
-
-PKG_CHECK_MODULES(DBUS, dbus-1 >= $DBUS_REQUIRED dbus-glib-1 >= $DBUS_GLIB_REQUIRED)
-
-AC_SUBST(DBUS_CFLAGS)
-AC_SUBST(DBUS_LIBS)
-
-PKG_CHECK_MODULES(GCONF, gconf-2.0 >= $GCONF_REQUIRED)
-
-AC_SUBST(GCONF_CFLAGS)
-AC_SUBST(GCONF_LIBS)
-
-PKG_CHECK_MODULES(GDK, gdk-2.0 >= $GDK_REQUIRED)
-
-AC_SUBST(GDK_CFLAGS)
-AC_SUBST(GDK_LIBS)
-
-PKG_CHECK_MODULES(GTK, gtk+-2.0 >= $GTK_REQUIRED gdk-x11-2.0 >= $GDK_REQUIRED)
-
-AC_SUBST(GTK_CFLAGS)
-AC_SUBST(GTK_LIBS)
-
-PKG_CHECK_MODULES(LIBXKLAVIER, libxklavier >= $LIBXKLAVIER_REQUIRED)
-
-AC_SUBST(LIBXKLAVIER_CFLAGS)
-AC_SUBST(LIBXKLAVIER_LIBS)
-
-PKG_CHECK_MODULES(LIBGLADE, libglade-2.0 >= $LIBGLADE_REQUIRED)
-
-AC_SUBST(LIBGLADE_CFLAGS)
-AC_SUBST(LIBGLADE_LIBS)
-
-PKG_CHECK_MODULES(LIBGNOME, libgnome-2.0 >= $LIBGNOME_REQUIRED)
-
-AC_SUBST(LIBGNOME_CFLAGS)
-AC_SUBST(LIBGNOME_LIBS)
-
-PKG_CHECK_MODULES(LIBGNOMEUI, libgnomeui-2.0 >= $LIBGNOMEUI_REQUIRED)
-
-AC_SUBST(LIBGNOMEUI_CFLAGS)
-AC_SUBST(LIBGNOMEUI_LIBS)
-
-AC_PATH_PROG(GCONFTOOL, gconftool-2, no)
-
-if test x"$GCONFTOOL" = xno; then
- AC_MSG_ERROR([gconftool-2 executable not found in your path - should be installed with GConf])
-fi
-
-AM_GCONF_SOURCE_2
-
-AC_OUTPUT([
-Makefile
-libgnomekbd.pc
-libgnomekbdui.pc
-po/Makefile.in
-libgnomekbd/Makefile
-test/Makefile
-capplet/Makefile
-capplet/gkbd-indicator-plugins-capplet.desktop.in
-])
-
-
diff --git a/trunk/libgnomekbd.anjuta b/trunk/libgnomekbd.anjuta
deleted file mode 100644
index b6a1551..0000000
--- a/trunk/libgnomekbd.anjuta
+++ /dev/null
@@ -1,54 +0,0 @@
-<?xml version="1.0"?>
-<anjuta>
- <plugin name="GBF Project Manager"
- url="http://anjuta.org/plugins/"
- mandatory="yes">
- <require group="Anjuta Plugin"
- attribute="Interfaces"
- value="IAnjutaProjectManager"/>
- <require group="Project"
- attribute="Supported-Project-Types"
- value="automake"/>
- </plugin>
- <plugin name="Symbol Browser"
- url="http://anjuta.org/plugins/"
- mandatory="yes">
- <require group="Anjuta Plugin"
- attribute="Location"
- value="anjuta-symbol-browser:SymbolBrowserPlugin"/>
- </plugin>
- <plugin name="Make Build System"
- url="http://anjuta.org/plugins/"
- mandatory="yes">
- <require group="Anjuta Plugin"
- attribute="Interfaces"
- value="IAnjutaBuildable"/>
- <require group="Build"
- attribute="Supported-Build-Types"
- value="make"/>
- </plugin>
- <plugin name="CVS Version Control System"
- url="http://anjuta.org/plugins/"
- mandatory="no">
- <require group="Anjuta Plugin"
- attribute="Interfaces"
- value="IAnjutaVcs"/>
- <require group="Version Control"
- attribute="Supported-Vcs-Types"
- value="cvs"/>
- </plugin>
- <plugin name="Task Manager"
- url="http://anjuta.org/plugins/"
- mandatory="no">
- <require group="Anjuta Plugin"
- attribute="Interfaces"
- value="IAnjutaTodo"/>
- </plugin>
- <plugin name="Debug Manager"
- url="http://anjuta.org/plugins/"
- mandatory="no">
- <require group="Anjuta Plugin"
- attribute="Interfaces"
- value="IAnjutaDebuggerManager"/>
- </plugin>
-</anjuta>
diff --git a/trunk/libgnomekbd.pc.in b/trunk/libgnomekbd.pc.in
deleted file mode 100644
index cc9b6fc..0000000
--- a/trunk/libgnomekbd.pc.in
+++ /dev/null
@@ -1,10 +0,0 @@
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-libdir=@libdir@
-includedir=@includedir@
-
-Name: libgnomekbd
-Description: GNOME keyboard shared library
-Version: @VERSION@
-Libs: -L${libdir} -lgnomekbd @GDK_LIBS@ @GCONF_LIBS@ @LIBGNOME_LIBS@ @LIBXKLAVIER_LIBS@ @DBUS_LIBS@
-Cflags: -I${includedir}
diff --git a/trunk/libgnomekbd/.cvsignore b/trunk/libgnomekbd/.cvsignore
deleted file mode 100644
index 9567442..0000000
--- a/trunk/libgnomekbd/.cvsignore
+++ /dev/null
@@ -1,10 +0,0 @@
-Makefile
-Makefile.in
-desktop_gnome_peripherals_keyboard_xkb.schemas
-gkbd-config-registry-client.h
-gkbd-config-registry-server.h
-gkbd-indicator-marshal.c
-gkbd-indicator-marshal.h
-gkbd-keyboard-drawing-marshal.c
-gkbd-keyboard-drawing-marshal.h
-
diff --git a/trunk/libgnomekbd/.indent.pro b/trunk/libgnomekbd/.indent.pro
deleted file mode 100644
index bdff074..0000000
--- a/trunk/libgnomekbd/.indent.pro
+++ /dev/null
@@ -1,2 +0,0 @@
--kr -i8 -pcs -lps -psl
-
diff --git a/trunk/libgnomekbd/Makefile.am b/trunk/libgnomekbd/Makefile.am
deleted file mode 100644
index 9e7df2e..0000000
--- a/trunk/libgnomekbd/Makefile.am
+++ /dev/null
@@ -1,128 +0,0 @@
-lib_LTLIBRARIES = libgnomekbd.la libgnomekbdui.la
-
-common_CFLAGS = \
- -I$(top_srcdir) -Wall -Werror \
- $(GDK_CFLAGS) \
- $(DBUS_CFLAGS) \
- $(GCONF_CFLAGS) \
- $(LIBGNOME_CFLAGS) \
- $(LIBXKLAVIER_CFLAGS) \
- -I$(top_srcdir)/intl \
- -DSYS_PLUGIN_DIR=\"$(libdir)/gnomekbd/\" \
- -DG_LOG_DOMAIN=\"GnomeKbdIndicator\" \
- -DGLADEDIR=\"$(gladedir)\" \
- -DDATADIR=\"$(datadir)\" \
- -DSYSCONFDIR=\"$(sysconfdir)\" \
- -DLIBDIR=\"$(libdir)\"
-
-libgnomekbd_la_CFLAGS = $(common_CFLAGS)
-
-libgnomekbdui_la_CFLAGS = $(common_CFLAGS) \
- $(GTK_CFLAGS)
-
-common_LDFLAGS = -version-info @VERSION_INFO@ \
- $(DBUS_LIBS) \
- $(GDK_LIBS) \
- $(GCONF_LIBS) \
- $(LIBXKLAVIER_LIBS)
-
-libgnomekbd_la_LDFLAGS = $(common_LDFLAGS)
-
-libgnomekbdui_la_LDFLAGS = $(common_LDFLAGS) \
- $(GTK_LIBS) \
- $(LIBGNOME_LIBS) \
- -lgnomekbd
-
-libgnomekbd_la_SOURCES = \
- gkbd-config-registry.c \
- gkbd-desktop-config.c \
- gkbd-keyboard-config.c \
- gkbd-util.c
-
-libgnomekbdui_la_SOURCES = \
- gkbd-indicator-config.c \
- gkbd-indicator.c \
- gkbd-indicator-marshal.c \
- gkbd-indicator-plugin-manager.c \
- gkbd-keyboard-drawing-marshal.c \
- gkbd-keyboard-drawing.c
-
-BUILT_SOURCES = gkbd-indicator-marshal.c \
- gkbd-indicator-marshal.h \
- gkbd-config-registry-server.h \
- gkbd-config-registry-client.h \
- gkbd-keyboard-drawing-marshal.c \
- gkbd-keyboard-drawing-marshal.h
-
-CLEANFILES = $(BUILT_SOURCES) $(schema_DATA)
-
-gnomekbdincdir = $(includedir)/libgnomekbd
-gnomekbdinc_HEADERS = \
- gkbd-desktop-config.h \
- gkbd-keyboard-config.h \
- gkbd-config-registry-client.h \
- gkbd-config-registry.h \
- gkbd-indicator.h \
- gkbd-indicator-config.h \
- gkbd-indicator-plugin.h \
- gkbd-keyboard-drawing.h \
- gkbd-util.h
-
-@INTLTOOL_DESKTOP_RULE@
-
-@INTLTOOL_SCHEMAS_RULE@
-
-noinst_HEADERS = gkbd-indicator-plugin-manager.h \
- $(extra_nih) \
- gkbd-config-private.h \
- gkbd-config-registry-server.h
-
-EXTRA_DIST = gkbd-indicator-marshal.list \
- gkbd-keyboard-drawing-marshal.list \
- gkbd-config-registry.xml \
- $(glade_DATA) \
- $(schema_in_files)
-
-GLIB_GENMARSHAL = $(shell pkg-config --variable=glib_genmarshal glib-2.0)
-
-gkbd-indicator-marshal.h: gkbd-indicator-marshal.list
- $(GLIB_GENMARSHAL) --prefix=gkbd_indicator $(srcdir)/gkbd-indicator-marshal.list --header > $@
-
-gkbd-indicator-marshal.c: gkbd-indicator-marshal.h
- $(GLIB_GENMARSHAL) --prefix=gkbd_indicator $(srcdir)/gkbd-indicator-marshal.list --body > $@
-
-gkbd-config-registry-server.h: gkbd-config-registry.xml
- dbus-binding-tool --prefix=gkbd_config_registry --mode=glib-server $< > $@
-
-gkbd-config-registry-client.h: gkbd-config-registry.xml
- dbus-binding-tool --prefix=gkbd_config_registry --mode=glib-client $< > $@
-
-gkbd-keyboard-drawing-marshal.h: gkbd-keyboard-drawing-marshal.list
- ( $(GLIB_GENMARSHAL) --prefix=gkbd_keyboard_drawing $(srcdir)/gkbd-keyboard-drawing-marshal.list \
- --header > gkbd-keyboard-drawing-marshal.tmp \
- && mv gkbd-keyboard-drawing-marshal.tmp gkbd-keyboard-drawing-marshal.h ) \
- || ( rm -f gkbd-keyboard-drawing-marshal.tmp && exit 1 )
-
-gkbd-keyboard-drawing-marshal.c: gkbd-keyboard-drawing-marshal.h
- ( $(GLIB_GENMARSHAL) --prefix=gkbd_keyboard_drawing $(srcdir)/gkbd-keyboard-drawing-marshal.list \
- --body > gkbd-keyboard-drawing-marshal.tmp \
- && mv gkbd-keyboard-drawing-marshal.tmp gkbd-keyboard-drawing-marshal.c ) \
- || ( rm -f gkbd-keyboard-drawing-marshal.tmp && exit 1 )
-
-schemadir = $(GCONF_SCHEMA_FILE_DIR)
-schema_in_files= desktop_gnome_peripherals_keyboard_xkb.schemas.in
-
-schema_DATA = $(schema_in_files:.schemas.in=.schemas)
-
-if GCONF_SCHEMAS_INSTALL
-# don't do this if we are building in eg. rpm
-install-data-local:
- if test -z "$(DESTDIR)" ; then \
- for p in $(schema_DATA) ; do \
- GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $$p; \
- done \
- fi
-else
-install-data-local:
-endif
-
diff --git a/trunk/libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in b/trunk/libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in
deleted file mode 100644
index 881a3e0..0000000
--- a/trunk/libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in
+++ /dev/null
@@ -1,193 +0,0 @@
-<?xml version="1.0"?>
-<gconfschemafile>
- <schemalist>
- <schema>
- <key>/schemas/desktop/gnome/peripherals/keyboard/kbd/overrideSettings</key>
- <applyto>/desktop/gnome/peripherals/keyboard/kbd/overrideSettings</applyto>
- <owner>gnome</owner>
- <type>bool</type>
- <default>true</default>
- <locale name="C">
- <short>Keyboard settings in gconf will be overridden from the system ASAP (deprecated)</short>
- <long>Very soon, keyboard settings in gconf will be overridden (from the system configuration)
- This key has been deprecated since GNOME 2.12, please unset the model, layouts and
- options keys to get the default system configuration.</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/desktop/gnome/peripherals/keyboard/kbd/model</key>
- <applyto>/desktop/gnome/peripherals/keyboard/kbd/model</applyto>
- <owner>gnome</owner>
- <type>string</type>
- <default></default>
- <locale name="C">
- <short>Keyboard model</short>
- <long>keyboard model</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/desktop/gnome/peripherals/keyboard/kbd/layouts</key>
- <applyto>/desktop/gnome/peripherals/keyboard/kbd/layouts</applyto>
- <owner>gnome</owner>
- <type>list</type>
- <list_type>string</list_type>
- <default>[]</default>
- <locale name="C">
- <short>Keyboard layout</short>
- <long>keyboard layout</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/desktop/gnome/peripherals/keyboard/kbd/options</key>
- <applyto>/desktop/gnome/peripherals/keyboard/kbd/options</applyto>
- <owner>gnome</owner>
- <type>list</type>
- <list_type>string</list_type>
- <default>[]</default>
- <locale name="C">
- <short>Keyboard options</short>
- <long>Keyboard options</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/desktop/gnome/peripherals/keyboard/general/update_handlers</key>
- <applyto>/desktop/gnome/peripherals/keyboard/general/update_handlers</applyto>
- <owner>gnome</owner>
- <type>list</type>
- <list_type>string</list_type>
- <default>[]</default>
- <locale name="C">
- <short>Keyboard Update Handlers</short>
- <long>A collection of scripts to run whenever the keyboard state is
- reloaded. Useful for re-applying xmodmap based adjustments</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/desktop/gnome/peripherals/keyboard/general/known_file_list</key>
- <applyto>/desktop/gnome/peripherals/keyboard/general/known_file_list</applyto>
- <owner>gnome</owner>
- <type>list</type>
- <list_type>string</list_type>
- <default>[]</default>
- <locale name="C">
- <short>modmap file list</short>
- <long>A list of modmap files available in the $HOME directory.</long>
- </locale>
- </schema>
-
-
- <schema>
- <key>/schemas/desktop/gnome/peripherals/keyboard/general/defaultGroup</key>
- <applyto>/desktop/gnome/peripherals/keyboard/general/defaultGroup</applyto>
- <owner>gnome</owner>
- <type>int</type>
- <default>-1</default>
- <locale name="C">
- <short>Default group, assigned on window creation</short>
- <long>Default group, assigned on window creation</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/desktop/gnome/peripherals/keyboard/general/groupPerWindow</key>
- <applyto>/desktop/gnome/peripherals/keyboard/general/groupPerWindow</applyto>
- <owner>gnome</owner>
- <type>bool</type>
- <default>true</default>
- <locale name="C">
- <short>Keep and manage separate group per window</short>
- <long>Keep and manage separate group per window</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/desktop/gnome/peripherals/keyboard/general/handleIndicators</key>
- <applyto>/desktop/gnome/peripherals/keyboard/general/handleIndicators</applyto>
- <owner>gnome</owner>
- <type>bool</type>
- <default>false</default>
- <locale name="C">
- <short>Save/restore indicators together with layout groups</short>
- <long>Save/restore indicators together with layout groups</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/desktop/gnome/peripherals/keyboard/general/layoutNamesAsGroupNames</key>
- <applyto>/desktop/gnome/peripherals/keyboard/general/layoutNamesAsGroupNames</applyto>
- <owner>gnome</owner>
- <type>bool</type>
- <default>true</default>
- <locale name="C">
- <short>Show layout names instead of group names</short>
- <long>Show layout names instead of group names (only for versions of XFree supporting multiple layouts)</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/desktop/gnome/peripherals/keyboard/general/disable_sysconfig_changed_warning</key>
- <applyto>/desktop/gnome/peripherals/keyboard/general/disable_sysconfig_changed_warning</applyto>
- <owner>gnome</owner>
- <type>bool</type>
- <default>false</default>
- <locale name="C">
- <short>Suppress the "X sysconfig changed" warning message</short>
- <long>Suppress the "X sysconfig changed" warning message</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/desktop/gnome/peripherals/keyboard/preview/x</key>
- <applyto>/desktop/gnome/peripherals/keyboard/preview/x</applyto>
- <owner>gnome</owner>
- <type>int</type>
- <default>-1</default>
- <locale name="C">
- <short>The Keyboard Preview, X offset</short>
- <long>The Keyboard Preview, X offset</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/desktop/gnome/peripherals/keyboard/preview/y</key>
- <applyto>/desktop/gnome/peripherals/keyboard/preview/y</applyto>
- <owner>gnome</owner>
- <type>int</type>
- <default>-1</default>
- <locale name="C">
- <short>The Keyboard Preview, Y offset</short>
- <long>The Keyboard Preview, Y offset</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/desktop/gnome/peripherals/keyboard/preview/width</key>
- <applyto>/desktop/gnome/peripherals/keyboard/preview/width</applyto>
- <owner>gnome</owner>
- <type>int</type>
- <default>-1</default>
- <locale name="C">
- <short>The Keyboard Preview, width</short>
- <long>The Keyboard Preview, width</long>
- </locale>
- </schema>
-
- <schema>
- <key>/schemas/desktop/gnome/peripherals/keyboard/preview/height</key>
- <applyto>/desktop/gnome/peripherals/keyboard/preview/height</applyto>
- <owner>gnome</owner>
- <type>int</type>
- <default>-1</default>
- <locale name="C">
- <short>The Keyboard Preview, height</short>
- <long>The Keyboard Preview, height</long>
- </locale>
- </schema>
-
- </schemalist>
-</gconfschemafile>
diff --git a/trunk/libgnomekbd/gkbd-config-private.h b/trunk/libgnomekbd/gkbd-config-private.h
deleted file mode 100644
index cdaa711..0000000
--- a/trunk/libgnomekbd/gkbd-config-private.h
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef __GKBD_CONFIG_PRIVATE_H__
-#define __GKBD_CONFIG_PRIVATE_H__
-
-#include "libgnomekbd/gkbd-desktop-config.h"
-#include "libgnomekbd/gkbd-keyboard-config.h"
-
-#define GKBD_CONFIG_KEY_PREFIX "/desktop/gnome/peripherals/keyboard"
-
-extern const gchar GKBD_PREVIEW_CONFIG_DIR[];
-extern const gchar GKBD_PREVIEW_CONFIG_KEY_X[];
-extern const gchar GKBD_PREVIEW_CONFIG_KEY_Y[];
-extern const gchar GKBD_PREVIEW_CONFIG_KEY_WIDTH[];
-extern const gchar GKBD_PREVIEW_CONFIG_KEY_HEIGHT[];
-
-/**
- * General config functions (private)
- */
-extern void
- gkbd_desktop_config_add_listener (GConfClient * conf_client,
- const gchar * key,
- GConfClientNotifyFunc func,
- gpointer user_data, int *pid);
-
-
-extern void
- gkbd_desktop_config_remove_listener (GConfClient * conf_client, int *pid);
-
-extern void gkbd_keyboard_config_model_set (GkbdKeyboardConfig *
- kbd_config,
- const gchar * model_name);
-
-extern void gkbd_keyboard_config_layouts_reset (GkbdKeyboardConfig *
- kbd_config);
-extern void gkbd_keyboard_config_layouts_add (GkbdKeyboardConfig *
- kbd_config,
- const gchar * layout_name,
- const gchar * variant_name);
-
-extern void gkbd_keyboard_config_layouts_reset (GkbdKeyboardConfig *
- kbd_config);
-extern void gkbd_keyboard_config_options_reset (GkbdKeyboardConfig *
- kbd_config);
-
-extern void gkbd_keyboard_config_options_add (GkbdKeyboardConfig *
- kbd_config,
- const gchar * group_name,
- const gchar * option_name);
-extern gboolean gkbd_keyboard_config_options_is_set (GkbdKeyboardConfig *
- kbd_config,
- const gchar *
- group_name,
- const gchar *
- option_name);
-
-extern gboolean gkbd_keyboard_config_dump_settings (GkbdKeyboardConfig *
- kbd_config,
- const char *file_name);
-
-extern void gkbd_keyboard_config_start_listen (GkbdKeyboardConfig *
- kbd_config,
- GConfClientNotifyFunc func,
- gpointer user_data);
-
-extern void gkbd_keyboard_config_stop_listen (GkbdKeyboardConfig *
- kbd_config);
-
-extern gboolean gkbd_keyboard_config_get_lv_descriptions (XklConfigRegistry
- *
- config_registry,
- const gchar *
- layout_name,
- const gchar *
- variant_name,
- gchar **
- layout_short_descr,
- gchar **
- layout_descr,
- gchar **
- variant_short_descr,
- gchar **
- variant_descr);
-
-#endif
diff --git a/trunk/libgnomekbd/gkbd-config-registry.c b/trunk/libgnomekbd/gkbd-config-registry.c
deleted file mode 100644
index 8c8e0b8..0000000
--- a/trunk/libgnomekbd/gkbd-config-registry.c
+++ /dev/null
@@ -1,194 +0,0 @@
-/*
- * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#include <config.h>
-
-#include <X11/Xlib.h>
-
-#include <gkbd-config-registry.h>
-#include <gkbd-config-registry-server.h>
-#include <gkbd-keyboard-config.h>
-
-static GObjectClass *parent_class = NULL;
-
-gboolean
- gkbd_config_registry_get_descriptions_as_utf8
- (GkbdConfigRegistry * registry,
- gchar ** layout_ids,
- gchar ** variant_ids,
- gchar *** short_layout_descriptions,
- gchar *** long_layout_descriptions,
- gchar *** short_variant_descriptions,
- gchar *** long_variant_descriptions, GError ** error) {
- char **pl, **pv;
- guint total_layouts;
- gchar **sld, **lld, **svd, **lvd;
-
- if (!registry->registry) {
- registry->registry =
- xkl_config_registry_get_instance (registry->engine);
-
- xkl_config_registry_load (registry->registry);
- }
-
- if (!
- (xkl_engine_get_features (registry->engine) &
- XKLF_MULTIPLE_LAYOUTS_SUPPORTED))
- return FALSE;
-
- pl = layout_ids;
- pv = variant_ids;
- total_layouts = g_strv_length (layout_ids);
- sld = *short_layout_descriptions =
- g_new0 (char *, total_layouts + 1);
- lld = *long_layout_descriptions =
- g_new0 (char *, total_layouts + 1);
- svd = *short_variant_descriptions =
- g_new0 (char *, total_layouts + 1);
- lvd = *long_variant_descriptions =
- g_new0 (char *, total_layouts + 1);
-
- while (pl != NULL && *pl != NULL) {
- XklConfigItem item;
-
- xkl_debug (100, "ids: [%s][%s]\n", *pl, pv == NULL ? NULL : *pv);
-
- g_snprintf (item.name, sizeof item.name, "%s", *pl);
- if (xkl_config_registry_find_layout
- (registry->registry, &item)) {
- *sld = g_strdup (item.short_description);
- *lld = g_strdup (item.description);
- } else {
- *sld = g_strdup ("");
- *lld = g_strdup ("");
- }
-
- if (*pv != NULL) {
- g_snprintf (item.name, sizeof item.name, "%s",
- *pv);
- if (xkl_config_registry_find_variant
- (registry->registry, *pl, &item)) {
- *svd = g_strdup (item.short_description);
- *lvd = g_strdup (item.description);
- } else {
- *svd = g_strdup ("");
- *lvd = g_strdup ("");
- }
- } else {
- *svd = g_strdup ("");
- *lvd = g_strdup ("");
- }
-
- xkl_debug (100, "description: [%s][%s][%s][%s]\n",
- *sld, *lld, *svd, *lvd);
- sld++;
- lld++;
- svd++;
- lvd++;
-
- pl++;
-
- if (*pv != NULL)
- pv++;
- }
-
- return TRUE;
-}
-
-G_DEFINE_TYPE (GkbdConfigRegistry, gkbd_config_registry, G_TYPE_OBJECT)
-static void
-finalize (GObject * object)
-{
- GkbdConfigRegistry *registry;
-
- registry = GKBD_CONFIG_REGISTRY (object);
- if (registry->registry == NULL) {
- return;
- }
-
- g_object_unref (registry->registry);
- registry->registry = NULL;
-
- g_object_unref (registry->engine);
-
- G_OBJECT_CLASS (parent_class)->finalize (object);
-}
-
-static void
-gkbd_config_registry_class_init (GkbdConfigRegistryClass * klass)
-{
- GError *error = NULL;
- GObjectClass *object_class;
-
- /* Init the DBus connection, per-klass */
- klass->connection = dbus_g_bus_get (DBUS_BUS_SESSION, &error);
- if (klass->connection == NULL) {
- g_warning ("Unable to connect to dbus: %s",
- error->message);
- g_error_free (error);
- return;
- }
-
- dbus_g_object_type_install_info (GKBD_CONFIG_TYPE_REGISTRY,
- &dbus_glib_gkbd_config_registry_object_info);
-
- object_class = G_OBJECT_CLASS (klass);
-
- object_class->finalize = finalize;
-
- parent_class = g_type_class_peek_parent (klass);
-}
-
-static void
-gkbd_config_registry_init (GkbdConfigRegistry * registry)
-{
- GError *error = NULL;
- DBusGProxy *driver_proxy;
- GkbdConfigRegistryClass *klass =
- GKBD_CONFIG_REGISTRY_GET_CLASS (registry);
- unsigned request_ret;
-
- /* Register DBUS path */
- dbus_g_connection_register_g_object (klass->connection,
- "/org/gnome/GkbdConfigRegistry",
- G_OBJECT (registry));
-
- /* Register the service name, the constant here are defined in dbus-glib-bindings.h */
- driver_proxy = dbus_g_proxy_new_for_name (klass->connection,
- DBUS_SERVICE_DBUS,
- DBUS_PATH_DBUS,
- DBUS_INTERFACE_DBUS);
-
- if (driver_proxy != NULL) {
- if (!org_freedesktop_DBus_request_name
- (driver_proxy, "org.gnome.GkbdConfigRegistry", 0,
- &request_ret, &error)) {
- g_warning ("Unable to register service: %s",
- error->message);
- g_error_free (error);
- }
- g_object_unref (driver_proxy);
- } else
- g_critical ("Could not create DBUS proxy");
-
- /* Init libxklavier stuff */
- registry->engine = xkl_engine_get_instance (XOpenDisplay (NULL));
- /* Lazy initialization */
- registry->registry = NULL;
-}
diff --git a/trunk/libgnomekbd/gkbd-config-registry.h b/trunk/libgnomekbd/gkbd-config-registry.h
deleted file mode 100644
index d958090..0000000
--- a/trunk/libgnomekbd/gkbd-config-registry.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef __GKBD_CONFIG_REGISTRY_H__
-#define __GKBD_CONFIG_REGISTRY_H__
-
-#include <dbus/dbus-glib-bindings.h>
-#include <libxklavier/xklavier.h>
-
-typedef struct GkbdConfigRegistry GkbdConfigRegistry;
-typedef struct GkbdConfigRegistryClass GkbdConfigRegistryClass;
-
-struct GkbdConfigRegistry {
- GObject parent;
-
- XklEngine *engine;
- XklConfigRegistry *registry;
-};
-
-struct GkbdConfigRegistryClass {
- GObjectClass parent;
- DBusGConnection *connection;
-};
-
-#define GKBD_CONFIG_TYPE_REGISTRY (gkbd_config_registry_get_type ())
-#define GKBD_CONFIG_REGISTRY(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GKBD_CONFIG_TYPE_REGISTRY, GkbdConfigRegistry))
-#define GKBD_CONFIG_REGISTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GKBD_CONFIG_TYPE_REGISTRY, GkbdConfigRegistryClass))
-#define GKBD_IS_CONFIG_REGISTRY(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GKBD_CONFIG_TYPE_REGISTRY))
-#define GKBD_IS_CONFIG_REGISTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GKBD_CONFIG_TYPE_REGISTRY))
-#define GKBD_CONFIG_REGISTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GKBD_CONFIG_TYPE_REGISTRY, GkbdConfigRegistryClass))
-
-
-/**
- * DBUS server
- */
-
-extern GType gkbd_config_registry_get_type (void);
-
-extern gboolean
- gkbd_config_registry_get_descriptions_as_utf8
- (GkbdConfigRegistry * registry,
- gchar ** layout_ids,
- gchar ** variant_ids,
- gchar *** short_layout_descriptions,
- gchar *** long_layout_descriptions,
- gchar *** short_variant_descriptions,
- gchar *** long_variant_descriptions, GError ** error);
-
-#endif
diff --git a/trunk/libgnomekbd/gkbd-config-registry.xml b/trunk/libgnomekbd/gkbd-config-registry.xml
deleted file mode 100644
index 73b6404..0000000
--- a/trunk/libgnomekbd/gkbd-config-registry.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<node name="/org/gnome/GkbdConfigRegistry">
- <interface name="org.gnome.GkbdConfigRegistry">
- <annotation name="org.freedesktop.DBus.GLib.CSymbol" value="gkbd_config_registry"/>
- <method name="GetDescriptionsAsUtf8">
- <arg type="as" name="layoutIds" direction="in" />
- <arg type="as" name="variantIds" direction="in" />
- <arg type="as" name="shortLayoutDescriptions" direction="out" />
- <arg type="as" name="longLayoutDescriptions" direction="out" />
- <arg type="as" name="shortVariantDescriptions" direction="out" />
- <arg type="as" name="longVariantDescriptions" direction="out" />
- </method>
- <!-- Add more methods/signals if you want -->
- </interface>
-</node>
diff --git a/trunk/libgnomekbd/gkbd-desktop-config.c b/trunk/libgnomekbd/gkbd-desktop-config.c
deleted file mode 100644
index 936ad67..0000000
--- a/trunk/libgnomekbd/gkbd-desktop-config.c
+++ /dev/null
@@ -1,409 +0,0 @@
-/*
- * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#include <config.h>
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <X11/keysym.h>
-
-#include <glib/gi18n.h>
-#include <libgnome/gnome-program.h>
-
-#include <gkbd-desktop-config.h>
-#include <gkbd-config-private.h>
-
-#include <gkbd-config-registry-client.h>
-
-/**
- * GkbdDesktopConfig
- */
-#define GKBD_DESKTOP_CONFIG_KEY_PREFIX GKBD_CONFIG_KEY_PREFIX "/general"
-
-const gchar GKBD_DESKTOP_CONFIG_DIR[] = GKBD_DESKTOP_CONFIG_KEY_PREFIX;
-const gchar GKBD_DESKTOP_CONFIG_KEY_DEFAULT_GROUP[] =
- GKBD_DESKTOP_CONFIG_KEY_PREFIX "/defaultGroup";
-const gchar GKBD_DESKTOP_CONFIG_KEY_GROUP_PER_WINDOW[] =
- GKBD_DESKTOP_CONFIG_KEY_PREFIX "/groupPerWindow";
-const gchar GKBD_DESKTOP_CONFIG_KEY_HANDLE_INDICATORS[] =
- GKBD_DESKTOP_CONFIG_KEY_PREFIX "/handleIndicators";
-const gchar GKBD_DESKTOP_CONFIG_KEY_LAYOUT_NAMES_AS_GROUP_NAMES[]
- = GKBD_DESKTOP_CONFIG_KEY_PREFIX "/layoutNamesAsGroupNames";
-
-/**
- * static common functions
- */
-
-static gboolean
-gkbd_desktop_config_get_remote_lv_descriptions_utf8 (const gchar ** lids,
- const gchar ** vids,
- gchar *** sld,
- gchar *** lld,
- gchar *** svd,
- gchar *** lvd)
-{
- DBusGProxy *proxy;
- DBusGConnection *connection;
- GError *error = NULL;
-
- connection = dbus_g_bus_get (DBUS_BUS_SESSION, &error);
- if (connection == NULL) {
- g_warning ("Unable to connect to dbus: %s\n",
- error->message);
- g_error_free (error);
- /* Basically here, there is a problem, since there is no dbus :) */
- return False;
- }
-
-/* This won't trigger activation! */
- proxy = dbus_g_proxy_new_for_name (connection,
- "org.gnome.GkbdConfigRegistry",
- "/org/gnome/GkbdConfigRegistry",
- "org.gnome.GkbdConfigRegistry");
-
-/* The method call will trigger activation, more on that later */
- if (!org_gnome_GkbdConfigRegistry_get_descriptions_as_utf8
- (proxy, lids, vids, sld, lld, svd, lvd, &error)) {
- /* Method failed, the GError is set, let's warn everyone */
- g_warning ("Woops remote method failed: %s",
- error->message);
- g_error_free (error);
- return False;
- }
- return True;
-}
-
-void
-gkbd_desktop_config_add_listener (GConfClient * conf_client,
- const gchar * key,
- GConfClientNotifyFunc func,
- gpointer user_data, int *pid)
-{
- GError *gerror = NULL;
- xkl_debug (150, "Listening to [%s]\n", key);
- *pid = gconf_client_notify_add (conf_client,
- key, func, user_data, NULL,
- &gerror);
- if (0 == *pid) {
- g_warning ("Error listening for configuration: [%s]\n",
- gerror->message);
- g_error_free (gerror);
- }
-}
-
-void
-gkbd_desktop_config_remove_listener (GConfClient * conf_client, int *pid)
-{
- if (*pid != 0) {
- gconf_client_notify_remove (conf_client, *pid);
- *pid = 0;
- }
-}
-
-/**
- * extern GkbdDesktopConfig config functions
- */
-void
-gkbd_desktop_config_init (GkbdDesktopConfig * config,
- GConfClient * conf_client, XklEngine * engine)
-{
- GError *gerror = NULL;
-
- memset (config, 0, sizeof (*config));
- config->conf_client = conf_client;
- config->engine = engine;
- g_object_ref (config->conf_client);
-
- gconf_client_add_dir (config->conf_client,
- GKBD_DESKTOP_CONFIG_DIR,
- GCONF_CLIENT_PRELOAD_NONE, &gerror);
- if (gerror != NULL) {
- g_warning ("err: %s\n", gerror->message);
- g_error_free (gerror);
- gerror = NULL;
- }
-}
-
-void
-gkbd_desktop_config_term (GkbdDesktopConfig * config)
-{
- g_object_unref (config->conf_client);
- config->conf_client = NULL;
-}
-
-void
-gkbd_desktop_config_load_from_gconf (GkbdDesktopConfig * config)
-{
- GError *gerror = NULL;
-
- config->group_per_app =
- gconf_client_get_bool (config->conf_client,
- GKBD_DESKTOP_CONFIG_KEY_GROUP_PER_WINDOW,
- &gerror);
- if (gerror != NULL) {
- g_warning ("Error reading configuration:%s\n",
- gerror->message);
- config->group_per_app = FALSE;
- g_error_free (gerror);
- gerror = NULL;
- }
- xkl_debug (150, "group_per_app: %d\n", config->group_per_app);
-
- config->handle_indicators =
- gconf_client_get_bool (config->conf_client,
- GKBD_DESKTOP_CONFIG_KEY_HANDLE_INDICATORS,
- &gerror);
- if (gerror != NULL) {
- g_warning ("Error reading configuration:%s\n",
- gerror->message);
- config->handle_indicators = FALSE;
- g_error_free (gerror);
- gerror = NULL;
- }
- xkl_debug (150, "handle_indicators: %d\n",
- config->handle_indicators);
-
- config->layout_names_as_group_names =
- gconf_client_get_bool (config->conf_client,
- GKBD_DESKTOP_CONFIG_KEY_LAYOUT_NAMES_AS_GROUP_NAMES,
- &gerror);
- if (gerror != NULL) {
- g_warning ("Error reading configuration:%s\n",
- gerror->message);
- config->layout_names_as_group_names = TRUE;
- g_error_free (gerror);
- gerror = NULL;
- }
- xkl_debug (150, "layout_names_as_group_names: %d\n",
- config->layout_names_as_group_names);
-
- config->default_group =
- gconf_client_get_int (config->conf_client,
- GKBD_DESKTOP_CONFIG_KEY_DEFAULT_GROUP,
- &gerror);
- if (gerror != NULL) {
- g_warning ("Error reading configuration:%s\n",
- gerror->message);
- config->default_group = -1;
- g_error_free (gerror);
- gerror = NULL;
- }
-
- if (config->default_group < -1
- || config->default_group >=
- xkl_engine_get_max_num_groups (config->engine))
- config->default_group = -1;
- xkl_debug (150, "default_group: %d\n", config->default_group);
-}
-
-void
-gkbd_desktop_config_save_to_gconf (GkbdDesktopConfig * config)
-{
- GConfChangeSet *cs;
- GError *gerror = NULL;
-
- cs = gconf_change_set_new ();
-
- gconf_change_set_set_bool (cs,
- GKBD_DESKTOP_CONFIG_KEY_GROUP_PER_WINDOW,
- config->group_per_app);
- gconf_change_set_set_bool (cs,
- GKBD_DESKTOP_CONFIG_KEY_HANDLE_INDICATORS,
- config->handle_indicators);
- gconf_change_set_set_bool (cs,
- GKBD_DESKTOP_CONFIG_KEY_LAYOUT_NAMES_AS_GROUP_NAMES,
- config->layout_names_as_group_names);
- gconf_change_set_set_int (cs,
- GKBD_DESKTOP_CONFIG_KEY_DEFAULT_GROUP,
- config->default_group);
-
- gconf_client_commit_change_set (config->conf_client, cs, TRUE,
- &gerror);
- if (gerror != NULL) {
- g_warning ("Error saving active configuration: %s\n",
- gerror->message);
- g_error_free (gerror);
- gerror = NULL;
- }
- gconf_change_set_unref (cs);
-}
-
-gboolean
-gkbd_desktop_config_activate (GkbdDesktopConfig * config)
-{
- gboolean rv = TRUE;
-
- xkl_engine_set_group_per_toplevel_window (config->engine,
- config->group_per_app);
- xkl_engine_set_indicators_handling (config->engine,
- config->handle_indicators);
- xkl_engine_set_default_group (config->engine,
- config->default_group);
-
- return rv;
-}
-
-void
-gkbd_desktop_config_lock_next_group (GkbdDesktopConfig * config)
-{
- int group = xkl_engine_get_next_group (config->engine);
- xkl_engine_lock_group (config->engine, group);
-}
-
-void
-gkbd_desktop_config_lock_prev_group (GkbdDesktopConfig * config)
-{
- int group = xkl_engine_get_prev_group (config->engine);
- xkl_engine_lock_group (config->engine, group);
-}
-
-void
-gkbd_desktop_config_restore_group (GkbdDesktopConfig * config)
-{
- int group = xkl_engine_get_current_window_group (config->engine);
- xkl_engine_lock_group (config->engine, group);
-}
-
-void
-gkbd_desktop_config_start_listen (GkbdDesktopConfig * config,
- GConfClientNotifyFunc func,
- gpointer user_data)
-{
- gkbd_desktop_config_add_listener (config->conf_client,
- GKBD_DESKTOP_CONFIG_DIR, func,
- user_data,
- &config->config_listener_id);
-}
-
-void
-gkbd_desktop_config_stop_listen (GkbdDesktopConfig * config)
-{
- gkbd_desktop_config_remove_listener (config->conf_client,
- &config->config_listener_id);
-}
-
-gboolean
-gkbd_desktop_config_load_remote_group_descriptions_utf8 (GkbdDesktopConfig
- * config,
- const gchar **
- layout_ids,
- const gchar **
- variant_ids,
- gchar ***
- short_group_names,
- gchar ***
- full_group_names)
-{
- gchar **sld, **lld, **svd, **lvd;
- gchar **psld, **plld, **plvd;
- gchar **psgn, **pfgn;
- gint total_descriptions;
-
- if (!gkbd_desktop_config_get_remote_lv_descriptions_utf8
- (layout_ids, variant_ids, &sld, &lld, &svd, &lvd)) {
- return False;
- }
-
- total_descriptions = g_strv_length (sld);
-
- *short_group_names = psgn =
- g_new0 (gchar *, total_descriptions + 1);
- *full_group_names = pfgn =
- g_new0 (gchar *, total_descriptions + 1);
-
- plld = lld;
- psld = sld;
- plvd = lvd;
- while (plld != NULL && *plld != NULL) {
- *psgn++ = g_strdup (*psld++);
- *pfgn++ = g_strdup (gkbd_keyboard_config_format_full_layout
- (*plld++, *plvd++));
- }
- g_strfreev (sld);
- g_strfreev (lld);
- g_strfreev (svd);
- g_strfreev (lvd);
-
- return True;
-}
-
-gchar **
-gkbd_desktop_config_load_group_descriptions_utf8 (GkbdDesktopConfig *
- config,
- XklConfigRegistry *
- config_registry)
-{
- int i;
- const gchar **native_names =
- xkl_engine_get_groups_names (config->engine);
- guint total_groups = xkl_engine_get_num_groups (config->engine);
- guint total_layouts;
- gchar **rv = g_new0 (char *, total_groups + 1);
- gchar **current_descr = rv;
-
- if ((xkl_engine_get_features (config->engine) &
- XKLF_MULTIPLE_LAYOUTS_SUPPORTED)
- && config->layout_names_as_group_names) {
- XklConfigRec *xkl_config = xkl_config_rec_new ();
- if (xkl_config_rec_get_from_server
- (xkl_config, config->engine)) {
- char **pl = xkl_config->layouts;
- char **pv = xkl_config->variants;
- i = total_groups;
- while (pl != NULL && *pl != NULL && i >= 0) {
- char *ls_descr;
- char *l_descr;
- char *vs_descr;
- char *v_descr;
- if (gkbd_keyboard_config_get_lv_descriptions (config_registry, *pl++, *pv++, &ls_descr, &l_descr, &vs_descr, &v_descr)) {
- char *name_utf =
- g_locale_to_utf8
- (gkbd_keyboard_config_format_full_layout
- (l_descr, v_descr), -1, NULL,
- NULL, NULL);
- *current_descr++ = name_utf;
- } else {
- *current_descr++ = g_strdup ("");
- }
- }
- }
- g_object_unref (G_OBJECT (xkl_config));
- /* Worst case - multiple layous - but SOME of them are multigrouped :(((
- * We cannot do much - just add empty descriptions.
- * The UI is going to be messy.
- * Canadian layouts are famous for this sh.t. */
- total_layouts = g_strv_length (rv);
- if (total_layouts != total_groups) {
- xkl_debug (0,
- "The mismatch between "
- "the number of groups: %d and number of layouts: %d\n",
- total_groups, total_layouts);
- current_descr = rv + total_layouts;
- for (i = total_groups - total_layouts; --i >= 0;)
- *current_descr++ = g_strdup ("");
- }
- }
- total_layouts = g_strv_length (rv);
- if (!total_layouts)
- for (i = total_groups; --i >= 0;)
- *current_descr++ = g_strdup (*native_names++);
-
- return rv;
-}
diff --git a/trunk/libgnomekbd/gkbd-desktop-config.h b/trunk/libgnomekbd/gkbd-desktop-config.h
deleted file mode 100644
index 11eb91d..0000000
--- a/trunk/libgnomekbd/gkbd-desktop-config.h
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef __GKBD_DESKTOP_CONFIG_H__
-#define __GKBD_DESKTOP_CONFIG_H__
-
-#include <X11/Xlib.h>
-
-#include <glib.h>
-#include <glib/gslist.h>
-
-#include <gconf/gconf-client.h>
-
-#include <libxklavier/xklavier.h>
-
-extern const gchar GKBD_DESKTOP_CONFIG_DIR[];
-extern const gchar GKBD_DESKTOP_CONFIG_KEY_DEFAULT_GROUP[];
-extern const gchar GKBD_DESKTOP_CONFIG_KEY_GROUP_PER_WINDOW[];
-extern const gchar GKBD_DESKTOP_CONFIG_KEY_HANDLE_INDICATORS[];
-extern const gchar GKBD_DESKTOP_CONFIG_KEY_LAYOUT_NAMES_AS_GROUP_NAMES[];
-
-/*
- * General configuration
- */
-typedef struct _GkbdDesktopConfig {
- gint default_group;
- gboolean group_per_app;
- gboolean handle_indicators;
- gboolean layout_names_as_group_names;
-
- /* private, transient */
- GConfClient *conf_client;
- int config_listener_id;
- XklEngine *engine;
-} GkbdDesktopConfig;
-
-/**
- * GkbdDesktopConfig functions
- */
-extern void gkbd_desktop_config_init (GkbdDesktopConfig * config,
- GConfClient * conf_client,
- XklEngine * engine);
-extern void gkbd_desktop_config_term (GkbdDesktopConfig * config);
-
-extern void gkbd_desktop_config_load_from_gconf (GkbdDesktopConfig *
- config);
-
-extern void gkbd_desktop_config_save_to_gconf (GkbdDesktopConfig * config);
-
-extern gboolean gkbd_desktop_config_activate (GkbdDesktopConfig * config);
-
-/* Affected by XKB and XKB/GConf configuration */
-extern gchar
- **
-gkbd_desktop_config_load_group_descriptions_utf8 (GkbdDesktopConfig *
- config,
- XklConfigRegistry *
- config_registry);
-
-
-/* Using DBUS */
-extern gboolean
-gkbd_desktop_config_load_remote_group_descriptions_utf8 (GkbdDesktopConfig
- * config,
- const gchar **
- layout_ids,
- const gchar **
- variant_ids,
- gchar ***
- short_group_names,
- gchar ***
- full_group_names);
-
-extern void gkbd_desktop_config_lock_next_group (GkbdDesktopConfig *
- config);
-
-extern void gkbd_desktop_config_lock_prev_group (GkbdDesktopConfig *
- config);
-
-extern void gkbd_desktop_config_restore_group (GkbdDesktopConfig * config);
-
-extern void gkbd_desktop_config_start_listen (GkbdDesktopConfig * config,
- GConfClientNotifyFunc func,
- gpointer user_data);
-
-extern void gkbd_desktop_config_stop_listen (GkbdDesktopConfig * config);
-
-#endif
diff --git a/trunk/libgnomekbd/gkbd-indicator-config.c b/trunk/libgnomekbd/gkbd-indicator-config.c
deleted file mode 100644
index f353f01..0000000
--- a/trunk/libgnomekbd/gkbd-indicator-config.c
+++ /dev/null
@@ -1,365 +0,0 @@
-/*
- * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#include <config.h>
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <X11/keysym.h>
-
-#include <glib/gi18n.h>
-#include <gdk/gdkx.h>
-#include <libgnome/gnome-program.h>
-
-#include <gkbd-keyboard-config.h>
-#include <gkbd-indicator-config.h>
-
-#include <gkbd-config-private.h>
-
-#include <gkbd-config-registry-client.h>
-
-/**
- * GkbdIndicatorConfig
- */
-#define GKBD_INDICATOR_CONFIG_KEY_PREFIX GKBD_CONFIG_KEY_PREFIX "/indicator"
-
-const gchar GKBD_INDICATOR_CONFIG_DIR[] = GKBD_INDICATOR_CONFIG_KEY_PREFIX;
-const gchar GKBD_INDICATOR_CONFIG_KEY_SHOW_FLAGS[] =
- GKBD_INDICATOR_CONFIG_KEY_PREFIX "/showFlags";
-const gchar GKBD_INDICATOR_CONFIG_KEY_ENABLED_PLUGINS[] =
- GKBD_INDICATOR_CONFIG_KEY_PREFIX "/enabledPlugins";
-const gchar GKBD_INDICATOR_CONFIG_KEY_SECONDARIES[] =
- GKBD_INDICATOR_CONFIG_KEY_PREFIX "/secondary";
-
-/**
- * static applet config functions
- */
-static void
-gkbd_indicator_config_free_enabled_plugins (GkbdIndicatorConfig *
- ind_config)
-{
- GSList *plugin_node = ind_config->enabled_plugins;
- if (plugin_node != NULL) {
- do {
- if (plugin_node->data != NULL) {
- g_free (plugin_node->data);
- plugin_node->data = NULL;
- }
- plugin_node = g_slist_next (plugin_node);
- } while (plugin_node != NULL);
- g_slist_free (ind_config->enabled_plugins);
- ind_config->enabled_plugins = NULL;
- }
-}
-
-/**
- * extern applet kbdConfig functions
- */
-void
-gkbd_indicator_config_free_images (GkbdIndicatorConfig * ind_config)
-{
- GdkPixbuf *pi;
- GSList *img_node;
- while ((img_node = ind_config->images) != NULL) {
- pi = GDK_PIXBUF (img_node->data);
- /* It can be NULL - some images may be missing */
- if (pi != NULL) {
- gdk_pixbuf_unref (pi);
- }
- ind_config->images =
- g_slist_remove_link (ind_config->images, img_node);
- g_slist_free_1 (img_node);
- }
-}
-
-char *
-gkbd_indicator_config_get_images_file (GkbdIndicatorConfig *
- ind_config,
- GkbdKeyboardConfig *
- kbd_config, int group)
-{
- char *image_file = NULL;
- GtkIconInfo *icon_info = NULL;
-
- if (!ind_config->show_flags)
- return NULL;
-
- if ((kbd_config->layouts_variants != NULL) &&
- (g_slist_length (kbd_config->layouts_variants) > group)) {
- char *full_layout_name =
- (char *) g_slist_nth_data (kbd_config->
- layouts_variants, group);
-
- if (full_layout_name != NULL) {
- char *l, *v;
- gkbd_keyboard_config_split_items (full_layout_name,
- &l, &v);
- if (l != NULL) {
- // probably there is something in theme?
- icon_info = gtk_icon_theme_lookup_icon
- (ind_config->icon_theme, l, 48, 0);
- }
- }
- }
- // fallback to the default value
- if (icon_info == NULL) {
- icon_info = gtk_icon_theme_lookup_icon
- (ind_config->icon_theme, "stock_dialog-error", 48, 0);
- }
- if (icon_info != NULL) {
- image_file =
- g_strdup (gtk_icon_info_get_filename (icon_info));
- gtk_icon_info_free (icon_info);
- }
-
- return image_file;
-}
-
-void
-gkbd_indicator_config_load_images (GkbdIndicatorConfig * ind_config,
- GkbdKeyboardConfig * kbd_config)
-{
- int i;
- ind_config->images = NULL;
-
- if (!ind_config->show_flags)
- return;
-
- for (i = xkl_engine_get_max_num_groups (ind_config->engine);
- --i >= 0;) {
- GdkPixbuf *image = NULL;
- char *image_file =
- gkbd_indicator_config_get_images_file (ind_config,
- kbd_config,
- i);
-
- if (image_file != NULL) {
- GError *gerror = NULL;
- image =
- gdk_pixbuf_new_from_file (image_file, &gerror);
- if (image == NULL) {
- GtkWidget *dialog =
- gtk_message_dialog_new (NULL,
- GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_MESSAGE_ERROR,
- GTK_BUTTONS_OK,
- _
- ("There was an error loading an image: %s"),
- gerror->
- message);
- g_signal_connect (G_OBJECT (dialog),
- "response",
- G_CALLBACK
- (gtk_widget_destroy),
- NULL);
-
- gtk_window_set_resizable (GTK_WINDOW
- (dialog), FALSE);
-
- gtk_widget_show (dialog);
- g_error_free (gerror);
- }
- xkl_debug (150,
- "Image %d[%s] loaded -> %p[%dx%d]\n",
- i, image_file, image,
- gdk_pixbuf_get_width (image),
- gdk_pixbuf_get_height (image));
- g_free (image_file);
- }
- /* We append the image anyway - even if it is NULL! */
- ind_config->images =
- g_slist_prepend (ind_config->images, image);
- }
-}
-
-void
-gkbd_indicator_config_init (GkbdIndicatorConfig * ind_config,
- GConfClient * conf_client, XklEngine * engine)
-{
- GError *gerror = NULL;
- gchar *sp, *datadir;
-
- memset (ind_config, 0, sizeof (*ind_config));
- ind_config->conf_client = conf_client;
- ind_config->engine = engine;
- g_object_ref (ind_config->conf_client);
-
- gconf_client_add_dir (ind_config->conf_client,
- GKBD_INDICATOR_CONFIG_DIR,
- GCONF_CLIENT_PRELOAD_NONE, &gerror);
- if (gerror != NULL) {
- g_warning ("err1:%s\n", gerror->message);
- g_error_free (gerror);
- gerror = NULL;
- }
-
- ind_config->icon_theme = gtk_icon_theme_get_default ();
-
- datadir =
- gnome_program_locate_file (NULL, GNOME_FILE_DOMAIN_APP_DATADIR,
- "", FALSE, NULL);
- gtk_icon_theme_append_search_path (ind_config->icon_theme, sp =
- g_build_filename (g_get_home_dir
- (),
- ".icons/flags",
- NULL));
- g_free (sp);
-
- gtk_icon_theme_append_search_path (ind_config->icon_theme,
- sp =
- g_build_filename (datadir,
- "pixmaps/flags",
- NULL));
- g_free (sp);
-
- gtk_icon_theme_append_search_path (ind_config->icon_theme,
- sp =
- g_build_filename (datadir,
- "icons/flags",
- NULL));
- g_free (sp);
- g_free (datadir);
-}
-
-void
-gkbd_indicator_config_term (GkbdIndicatorConfig * ind_config)
-{
-#if 0
- g_object_unref (G_OBJECT (ind_config->icon_theme));
-#endif
- ind_config->icon_theme = NULL;
-
- gkbd_indicator_config_free_images (ind_config);
-
- gkbd_indicator_config_free_enabled_plugins (ind_config);
- g_object_unref (ind_config->conf_client);
- ind_config->conf_client = NULL;
-}
-
-void
-gkbd_indicator_config_update_images (GkbdIndicatorConfig *
- ind_config,
- GkbdKeyboardConfig * kbd_config)
-{
- gkbd_indicator_config_free_images (ind_config);
- gkbd_indicator_config_load_images (ind_config, kbd_config);
-}
-
-void
-gkbd_indicator_config_load_from_gconf (GkbdIndicatorConfig * ind_config)
-{
- GError *gerror = NULL;
-
- ind_config->secondary_groups_mask =
- gconf_client_get_int (ind_config->conf_client,
- GKBD_INDICATOR_CONFIG_KEY_SECONDARIES,
- &gerror);
- if (gerror != NULL) {
- g_warning ("Error reading configuration:%s\n",
- gerror->message);
- ind_config->secondary_groups_mask = 0;
- g_error_free (gerror);
- gerror = NULL;
- }
-
- ind_config->show_flags =
- gconf_client_get_bool (ind_config->conf_client,
- GKBD_INDICATOR_CONFIG_KEY_SHOW_FLAGS,
- &gerror);
- if (gerror != NULL) {
- g_warning ("Error reading kbdConfiguration:%s\n",
- gerror->message);
- ind_config->show_flags = FALSE;
- g_error_free (gerror);
- gerror = NULL;
- }
-
- gkbd_indicator_config_free_enabled_plugins (ind_config);
- ind_config->enabled_plugins =
- gconf_client_get_list (ind_config->conf_client,
- GKBD_INDICATOR_CONFIG_KEY_ENABLED_PLUGINS,
- GCONF_VALUE_STRING, &gerror);
-
- if (gerror != NULL) {
- g_warning ("Error reading kbd_configuration:%s\n",
- gerror->message);
- ind_config->enabled_plugins = NULL;
- g_error_free (gerror);
- gerror = NULL;
- }
-}
-
-void
-gkbd_indicator_config_save_to_gconf (GkbdIndicatorConfig * ind_config)
-{
- GConfChangeSet *cs;
- GError *gerror = NULL;
-
- cs = gconf_change_set_new ();
-
- gconf_change_set_set_int (cs,
- GKBD_INDICATOR_CONFIG_KEY_SECONDARIES,
- ind_config->secondary_groups_mask);
- gconf_change_set_set_bool (cs,
- GKBD_INDICATOR_CONFIG_KEY_SHOW_FLAGS,
- ind_config->show_flags);
- gconf_change_set_set_list (cs,
- GKBD_INDICATOR_CONFIG_KEY_ENABLED_PLUGINS,
- GCONF_VALUE_STRING,
- ind_config->enabled_plugins);
-
- gconf_client_commit_change_set (ind_config->conf_client, cs,
- TRUE, &gerror);
- if (gerror != NULL) {
- g_warning ("Error saving configuration: %s\n",
- gerror->message);
- g_error_free (gerror);
- gerror = NULL;
- }
- gconf_change_set_unref (cs);
-}
-
-void
-gkbd_indicator_config_activate (GkbdIndicatorConfig * ind_config)
-{
- xkl_engine_set_secondary_groups_mask (ind_config->engine,
- ind_config->
- secondary_groups_mask);
-}
-
-void
-gkbd_indicator_config_start_listen (GkbdIndicatorConfig *
- ind_config,
- GConfClientNotifyFunc func,
- gpointer user_data)
-{
- gkbd_desktop_config_add_listener (ind_config->conf_client,
- GKBD_INDICATOR_CONFIG_DIR, func,
- user_data,
- &ind_config->config_listener_id);
-}
-
-void
-gkbd_indicator_config_stop_listen (GkbdIndicatorConfig * ind_config)
-{
- gkbd_desktop_config_remove_listener (ind_config->conf_client,
- &ind_config->
- config_listener_id);
-}
diff --git a/trunk/libgnomekbd/gkbd-indicator-config.h b/trunk/libgnomekbd/gkbd-indicator-config.h
deleted file mode 100644
index 556b911..0000000
--- a/trunk/libgnomekbd/gkbd-indicator-config.h
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef __GKBD_INDICATOR_CONFIG_H__
-#define __GKBD_INDICATOR_CONFIG_H__
-
-#include <gtk/gtk.h>
-
-#include "libgnomekbd/gkbd-keyboard-config.h"
-
-/*
- * Indicator configuration
- */
-typedef struct _GkbdIndicatorConfig {
- int secondary_groups_mask;
- gboolean show_flags;
-
- GSList *enabled_plugins;
-
- /* private, transient */
- GConfClient *conf_client;
- GSList *images;
- GtkIconTheme *icon_theme;
- int config_listener_id;
- XklEngine *engine;
-} GkbdIndicatorConfig;
-
-/**
- * GkbdIndicatorConfig functions -
- * some of them require GkbdKeyboardConfig as well -
- * for loading approptiate images
- */
-extern void gkbd_indicator_config_init (GkbdIndicatorConfig *
- applet_config,
- GConfClient * conf_client,
- XklEngine * engine);
-extern void gkbd_indicator_config_term (GkbdIndicatorConfig *
- applet_config);
-
-extern void gkbd_indicator_config_load_from_gconf (GkbdIndicatorConfig
- * applet_config);
-extern void gkbd_indicator_config_save_to_gconf (GkbdIndicatorConfig *
- applet_config);
-
-extern gchar
- * gkbd_indicator_config_get_images_file (GkbdIndicatorConfig *
- applet_config,
- GkbdKeyboardConfig *
- kbd_config, int group);
-
-extern void gkbd_indicator_config_load_images (GkbdIndicatorConfig *
- applet_config,
- GkbdKeyboardConfig *
- kbd_config);
-extern void gkbd_indicator_config_free_images (GkbdIndicatorConfig *
- applet_config);
-
-/* Should be updated on Indicator/GConf and Kbd/GConf configuration change */
-extern void gkbd_indicator_config_update_images (GkbdIndicatorConfig *
- applet_config,
- GkbdKeyboardConfig *
- kbd_config);
-
-/* Should be updated on Indicator/GConf configuration change */
-extern void gkbd_indicator_config_activate (GkbdIndicatorConfig *
- applet_config);
-
-extern void gkbd_indicator_config_start_listen (GkbdIndicatorConfig *
- applet_config,
- GConfClientNotifyFunc
- func, gpointer user_data);
-
-extern void gkbd_indicator_config_stop_listen (GkbdIndicatorConfig *
- applet_config);
-
-#endif
diff --git a/trunk/libgnomekbd/gkbd-indicator-marshal.list b/trunk/libgnomekbd/gkbd-indicator-marshal.list
deleted file mode 100644
index 5b76282..0000000
--- a/trunk/libgnomekbd/gkbd-indicator-marshal.list
+++ /dev/null
@@ -1 +0,0 @@
-VOID:VOID
diff --git a/trunk/libgnomekbd/gkbd-indicator-plugin-manager.c b/trunk/libgnomekbd/gkbd-indicator-plugin-manager.c
deleted file mode 100644
index b6c2082..0000000
--- a/trunk/libgnomekbd/gkbd-indicator-plugin-manager.c
+++ /dev/null
@@ -1,407 +0,0 @@
-/*
- * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#include <config.h>
-
-#include <string.h>
-
-#include <libxklavier/xklavier.h>
-
-#include <gkbd-indicator-plugin-manager.h>
-
-#define FOREACH_INITED_PLUGIN() \
-{ \
- GSList *prec; \
- for( prec = manager->inited_plugin_recs; prec != NULL; prec = prec->next ) \
- { \
- const GkbdIndicatorPlugin *plugin = \
- ( ( GkbdIndicatorPluginManagerRecord * ) ( prec->data ) )->plugin; \
- if( plugin != NULL ) \
- {
-
-#define NEXT_INITED_PLUGIN() \
- } \
- } \
-}
-
-static void
-gkbd_indicator_plugin_manager_add_plugins_dir (GkbdIndicatorPluginManager *
- manager,
- const char *dirname)
-{
- GDir *dir = g_dir_open (dirname, 0, NULL);
- const gchar *filename;
- if (dir == NULL)
- return;
-
- xkl_debug (100, "Scanning [%s]...\n", dirname);
- while ((filename = g_dir_read_name (dir)) != NULL) {
- gchar *full_path =
- g_build_filename (dirname, filename, NULL);
- xkl_debug (100, "Loading plugin module [%s]...\n",
- full_path);
- if (full_path != NULL) {
- GModule *module = g_module_open (full_path, 0);
- if (module != NULL) {
- gpointer get_plugin_func;
- if (g_module_symbol
- (module, "GetPlugin",
- &get_plugin_func)) {
- const GkbdIndicatorPlugin *plugin =
- ((GkbdIndicatorPluginGetPluginFunc)
- get_plugin_func) ();
- if (plugin != NULL) {
- GkbdIndicatorPluginManagerRecord
- * rec =
- g_new0
- (GkbdIndicatorPluginManagerRecord,
- 1);
- xkl_debug (100,
- "Loaded plugin from [%s]: [%s]/[%s]...\n",
- full_path,
- plugin->name,
- plugin->
- description);
- rec->full_path = full_path;
- rec->module = module;
- rec->plugin = plugin;
- g_hash_table_insert
- (manager->
- all_plugin_recs,
- full_path, rec);
- continue;
- }
- } else
- xkl_debug (0,
- "Bad plugin: [%s]\n",
- full_path);
- g_module_close (module);
- } else
- xkl_debug (0, "Bad module: [%s], %s\n",
- full_path, g_module_error ());
- g_free (full_path);
- }
- }
- g_dir_close (dir);
-}
-
-static void
-gkbd_indicator_plugin_manager_load_all (GkbdIndicatorPluginManager *
- manager)
-{
- if (!g_module_supported ()) {
- xkl_debug (0, "Modules are not supported - no plugins!\n");
- return;
- }
- gkbd_indicator_plugin_manager_add_plugins_dir (manager,
- SYS_PLUGIN_DIR);
-}
-
-static void
-gkbd_indicator_plugin_manager_rec_term (GkbdIndicatorPluginManagerRecord *
- rec, void *user_data)
-{
- const GkbdIndicatorPlugin *plugin = rec->plugin;
- if (plugin != NULL) {
- xkl_debug (100, "Terminating plugin: [%s]...\n",
- plugin->name);
- if (plugin->term_callback)
- (*plugin->term_callback) ();
- }
-}
-
-static void
-gkbd_indicator_plugin_manager_rec_destroy (GkbdIndicatorPluginManagerRecord
- * rec)
-{
- xkl_debug (100, "Unloading plugin: [%s]...\n", rec->plugin->name);
-
- g_module_close (rec->module);
- g_free (rec);
-}
-
-void
-gkbd_indicator_plugin_manager_init (GkbdIndicatorPluginManager * manager)
-{
- manager->all_plugin_recs =
- g_hash_table_new_full (g_str_hash, g_str_equal,
- (GDestroyNotify) g_free,
- (GDestroyNotify)
- gkbd_indicator_plugin_manager_rec_destroy);
- gkbd_indicator_plugin_manager_load_all (manager);
-}
-
-void
-gkbd_indicator_plugin_manager_term (GkbdIndicatorPluginManager * manager)
-{
- gkbd_indicator_plugin_manager_term_initialized_plugins (manager);
- if (manager->all_plugin_recs != NULL) {
- g_hash_table_destroy (manager->all_plugin_recs);
- manager->all_plugin_recs = NULL;
- }
-}
-
-void
- gkbd_indicator_plugin_manager_init_enabled_plugins
- (GkbdIndicatorPluginManager * manager,
- GkbdIndicatorPluginContainer * pc, GSList * enabled_plugins) {
- GSList *plugin_name_node = enabled_plugins;
- if (manager->all_plugin_recs == NULL)
- return;
- xkl_debug (100, "Initializing all enabled plugins...\n");
- while (plugin_name_node != NULL) {
- const char *full_path = plugin_name_node->data;
- if (full_path != NULL) {
- GkbdIndicatorPluginManagerRecord *rec =
- (GkbdIndicatorPluginManagerRecord *)
- g_hash_table_lookup (manager->all_plugin_recs,
- full_path);
-
- if (rec != NULL) {
- const GkbdIndicatorPlugin *plugin =
- rec->plugin;
- gboolean initialized = FALSE;
- xkl_debug (100,
- "Initializing plugin: [%s] from [%s]...\n",
- plugin->name, full_path);
- if (plugin->init_callback != NULL)
- initialized =
- (*plugin->init_callback) (pc);
- else
- initialized = TRUE;
-
- manager->inited_plugin_recs =
- g_slist_append (manager->
- inited_plugin_recs,
- rec);
- xkl_debug (100,
- "Plugin [%s] initialized: %d\n",
- plugin->name, initialized);
- }
- }
- plugin_name_node = g_slist_next (plugin_name_node);
- }
-}
-
-void
- gkbd_indicator_plugin_manager_term_initialized_plugins
- (GkbdIndicatorPluginManager * manager) {
-
- if (manager->inited_plugin_recs == NULL)
- return;
- g_slist_foreach (manager->inited_plugin_recs,
- (GFunc) gkbd_indicator_plugin_manager_rec_term,
- NULL);
- g_slist_free (manager->inited_plugin_recs);
- manager->inited_plugin_recs = NULL;
-}
-
-void
-gkbd_indicator_plugin_manager_toggle_plugins (GkbdIndicatorPluginManager *
- manager,
- GkbdIndicatorPluginContainer
- * pc,
- GSList * enabled_plugins)
-{
- gkbd_indicator_plugin_manager_term_initialized_plugins (manager);
- gkbd_indicator_plugin_manager_init_enabled_plugins (manager, pc,
- enabled_plugins);
-}
-
-void
-gkbd_indicator_plugin_manager_group_changed (GkbdIndicatorPluginManager *
- manager, GtkWidget * notebook,
- int new_group)
-{
- FOREACH_INITED_PLUGIN ();
- if (plugin->group_changed_callback)
- (*plugin->group_changed_callback) (notebook, new_group);
- NEXT_INITED_PLUGIN ();
-}
-
-void
-gkbd_indicator_plugin_manager_config_changed (GkbdIndicatorPluginManager *
- manager,
- GkbdKeyboardConfig * from,
- GkbdKeyboardConfig * to)
-{
- FOREACH_INITED_PLUGIN ();
- if (plugin->config_changed_callback)
- (*plugin->config_changed_callback) (from, to);
- NEXT_INITED_PLUGIN ();
-}
-
-const GkbdIndicatorPlugin *
-gkbd_indicator_plugin_manager_get_plugin (GkbdIndicatorPluginManager *
- manager, const char *full_path)
-{
- GkbdIndicatorPluginManagerRecord *rec =
- (GkbdIndicatorPluginManagerRecord *)
- g_hash_table_lookup (manager->all_plugin_recs,
- full_path);
- if (rec == NULL)
- return NULL;
- return rec->plugin;
-}
-
-void
-gkbd_indicator_plugin_manager_promote_plugin (GkbdIndicatorPluginManager *
- manager,
- GSList * enabled_plugins,
- const char *full_path)
-{
- GSList *the_node = enabled_plugins;
- GSList *prev_node = NULL;
-
- while (the_node != NULL) {
- if (!strcmp (the_node->data, full_path)) {
- if (prev_node != NULL) {
- char *tmp = (char *) prev_node->data;
- prev_node->data = the_node->data;
- the_node->data = tmp;
- }
- break;
- }
- prev_node = the_node;
- the_node = g_slist_next (the_node);
- }
-}
-
-void
-gkbd_indicator_plugin_manager_demote_plugin (GkbdIndicatorPluginManager *
- manager,
- GSList * enabled_plugins,
- const char *full_path)
-{
- GSList *the_node = g_slist_find_custom (enabled_plugins, full_path,
- (GCompareFunc) strcmp);
- if (the_node != NULL) {
- GSList *next_node = g_slist_next (the_node);
- if (next_node != NULL) {
- char *tmp = (char *) next_node->data;
- next_node->data = the_node->data;
- the_node->data = tmp;
- }
- }
-}
-
-void
-gkbd_indicator_plugin_manager_enable_plugin (GkbdIndicatorPluginManager *
- manager,
- GSList ** enabled_plugins,
- const char *full_path)
-{
- if (NULL !=
- gkbd_indicator_plugin_manager_get_plugin (manager,
- full_path)) {
- *enabled_plugins =
- g_slist_append (*enabled_plugins,
- (gpointer) g_strdup (full_path));
- }
-}
-
-void
-gkbd_indicator_plugin_manager_disable_plugin (GkbdIndicatorPluginManager *
- manager,
- GSList ** enabled_plugins,
- const char *full_path)
-{
- GSList *the_node =
- g_slist_find_custom (*enabled_plugins, full_path,
- (GCompareFunc) strcmp);
- if (the_node != NULL) {
- g_free (the_node->data);
- *enabled_plugins =
- g_slist_delete_link (*enabled_plugins, the_node);
- }
-}
-
-int
-gkbd_indicator_plugin_manager_window_created (GkbdIndicatorPluginManager *
- manager, Window win,
- Window parent)
-{
- FOREACH_INITED_PLUGIN ();
- if (plugin->window_created_callback) {
- int group_to_assign =
- (*plugin->window_created_callback) (win, parent);
- if (group_to_assign != -1) {
- xkl_debug (100,
- "Plugin [%s] assigned group %d to new window %ld\n",
- plugin->name, group_to_assign, win);
- return group_to_assign;
- }
- }
- NEXT_INITED_PLUGIN ();
- return -1;
-}
-
-GtkWidget *
-gkbd_indicator_plugin_manager_decorate_widget (GkbdIndicatorPluginManager *
- manager, GtkWidget * widget,
- const gint group,
- const char
- *group_description,
- GkbdKeyboardConfig *
- kbd_config)
-{
- FOREACH_INITED_PLUGIN ();
- if (plugin->decorate_widget_callback) {
- GtkWidget *decorated_widget =
- (*plugin->decorate_widget_callback) (widget, group,
- group_description,
- kbd_config);
- if (decorated_widget != NULL) {
- xkl_debug (100,
- "Plugin [%s] decorated widget %p to %p\n",
- plugin->name, widget, decorated_widget);
- return decorated_widget;
- }
- }
- NEXT_INITED_PLUGIN ();
- return NULL;
-}
-
-void
-gkbd_indicator_plugin_manager_configure_plugin (GkbdIndicatorPluginManager
- * manager,
- GkbdIndicatorPluginContainer
- * pc,
- const char *full_path,
- GtkWindow * parent)
-{
- const GkbdIndicatorPlugin *plugin =
- gkbd_indicator_plugin_manager_get_plugin (manager, full_path);
- if (plugin->configure_properties_callback != NULL)
- plugin->configure_properties_callback (pc, parent);
-}
-
-void
-gkbd_indicator_plugin_container_init (GkbdIndicatorPluginContainer * pc,
- GConfClient * conf_client)
-{
- pc->conf_client = conf_client;
- g_object_ref (pc->conf_client);
-}
-
-void
-gkbd_indicator_plugin_container_term (GkbdIndicatorPluginContainer * pc)
-{
- g_object_unref (pc->conf_client);
-}
diff --git a/trunk/libgnomekbd/gkbd-indicator-plugin-manager.h b/trunk/libgnomekbd/gkbd-indicator-plugin-manager.h
deleted file mode 100644
index 8a3c544..0000000
--- a/trunk/libgnomekbd/gkbd-indicator-plugin-manager.h
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef __GSWITCHIT_PLUGIN_MANAGER_H__
-#define __GSWITCHIT_PLUGIN_MANAGER_H__
-
-#include <gmodule.h>
-#include <libgnomekbd/gkbd-indicator-plugin.h>
-
-typedef struct _GkbdIndicatorPluginManager {
- GHashTable *all_plugin_recs;
- GSList *inited_plugin_recs;
-} GkbdIndicatorPluginManager;
-
-typedef struct _GkbdIndicatorPluginManagerRecord {
- const char *full_path;
- GModule *module;
- const GkbdIndicatorPlugin *plugin;
-} GkbdIndicatorPluginManagerRecord;
-
-extern void
- gkbd_indicator_plugin_manager_init (GkbdIndicatorPluginManager * manager);
-
-extern void
- gkbd_indicator_plugin_manager_term (GkbdIndicatorPluginManager * manager);
-
-extern void
- gkbd_indicator_plugin_manager_init_enabled_plugins (GkbdIndicatorPluginManager * manager,
- GkbdIndicatorPluginContainer
- * pc,
- GSList *
- enabled_plugins);
-
-extern void
- gkbd_indicator_plugin_manager_term_initialized_plugins (GkbdIndicatorPluginManager * manager);
-
-extern void
- gkbd_indicator_plugin_manager_toggle_plugins (GkbdIndicatorPluginManager * manager,
- GkbdIndicatorPluginContainer
- * pc,
- GSList * enabled_plugins);
-
-extern const GkbdIndicatorPlugin
- *
-gkbd_indicator_plugin_manager_get_plugin (GkbdIndicatorPluginManager *
- manager, const char *full_path);
-
-extern void
- gkbd_indicator_plugin_manager_promote_plugin (GkbdIndicatorPluginManager * manager,
- GSList * enabled_plugins,
- const char *full_path);
-
-extern void
- gkbd_indicator_plugin_manager_demote_plugin (GkbdIndicatorPluginManager * manager,
- GSList * enabled_plugins,
- const char *full_path);
-
-extern void
- gkbd_indicator_plugin_manager_enable_plugin (GkbdIndicatorPluginManager * manager,
- GSList ** enabled_plugins,
- const char *full_path);
-
-extern void
- gkbd_indicator_plugin_manager_disable_plugin (GkbdIndicatorPluginManager * manager,
- GSList ** enabled_plugins,
- const char *full_path);
-
-extern void
- gkbd_indicator_plugin_manager_configure_plugin (GkbdIndicatorPluginManager * manager,
- GkbdIndicatorPluginContainer
- * pc,
- const char *full_path,
- GtkWindow * parent);
-
-// actual calling plugin notification methods
-
-extern void
- gkbd_indicator_plugin_manager_group_changed (GkbdIndicatorPluginManager * manager,
- GtkWidget * notebook,
- int new_group);
-
-extern void
- gkbd_indicator_plugin_manager_config_changed (GkbdIndicatorPluginManager * manager,
- GkbdKeyboardConfig * from,
- GkbdKeyboardConfig * to);
-
-extern int
- gkbd_indicator_plugin_manager_window_created (GkbdIndicatorPluginManager * manager,
- Window win, Window parent);
-
-extern GtkWidget
- *
-gkbd_indicator_plugin_manager_decorate_widget (GkbdIndicatorPluginManager *
- manager, GtkWidget * widget,
- const gint group, const char
- *group_description,
- GkbdKeyboardConfig *
- config);
-
-#endif
diff --git a/trunk/libgnomekbd/gkbd-indicator-plugin.h b/trunk/libgnomekbd/gkbd-indicator-plugin.h
deleted file mode 100644
index 839fb21..0000000
--- a/trunk/libgnomekbd/gkbd-indicator-plugin.h
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef __GKBD_INDICATOR_PLUGIN_H__
-#define __GKBD_INDICATOR_PLUGIN_H__
-
-#include <gtk/gtk.h>
-#include <gconf/gconf-client.h>
-#include <libgnomekbd/gkbd-keyboard-config.h>
-
-#define MAX_LOCAL_NAME_BUF_LENGTH 512
-
-struct _GkbdIndicatorPlugin;
-
-typedef struct _GkbdIndicatorPluginContainer {
- GConfClient *conf_client;
-} GkbdIndicatorPluginContainer;
-
-typedef const struct _GkbdIndicatorPlugin
-*(*GkbdIndicatorPluginGetPluginFunc) (void);
-
-typedef
- gboolean (*GkbdIndicatorPluginInitFunc) (GkbdIndicatorPluginContainer *
- pc);
-
-typedef void (*GkbdIndicatorPluginGroupChangedFunc) (GtkWidget * notebook,
- int new_group);
-
-typedef void (*GkbdIndicatorPluginConfigChangedFunc) (const
- GkbdKeyboardConfig *
- from,
- const
- GkbdKeyboardConfig *
- to);
-
-typedef int (*GkbdIndicatorPluginWindowCreatedFunc) (const Window win,
- const Window parent);
-
-typedef void (*GkbdIndicatorPluginTermFunc) (void);
-
-typedef GtkWidget *(*GkbdIndicatorPluginCreateWidget) (void);
-
-typedef GtkWidget *(*GkbdIndicatorPluginDecorateWidget) (GtkWidget *
- widget,
- const gint group,
- const char
- *group_description,
- GkbdKeyboardConfig
- * config);
-
-typedef
-void (*GkbdIndicatorPluginConfigureProperties)
- (GkbdIndicatorPluginContainer * pc, GtkWindow * parent);
-
-typedef struct _GkbdIndicatorPlugin {
- const char *name;
-
- const char *description;
-
-// implemented
- GkbdIndicatorPluginInitFunc init_callback;
-
-// implemented
- GkbdIndicatorPluginTermFunc term_callback;
-
-// implemented
- GkbdIndicatorPluginConfigureProperties
- configure_properties_callback;
-
-// implemented
- GkbdIndicatorPluginGroupChangedFunc group_changed_callback;
-
-// implemented
- GkbdIndicatorPluginWindowCreatedFunc window_created_callback;
-
-// implemented
- GkbdIndicatorPluginDecorateWidget decorate_widget_callback;
-
-// non implemented
- GkbdIndicatorPluginConfigChangedFunc config_changed_callback;
-
-// non implemented
- GkbdIndicatorPluginCreateWidget create_widget_callback;
-
-} GkbdIndicatorPlugin;
-
-/**
- * Functions accessible for plugins
- */
-
-extern void
- gkbd_indicator_plugin_container_init (GkbdIndicatorPluginContainer * pc,
- GConfClient * conf_client);
-
-extern void
- gkbd_indicator_plugin_container_term (GkbdIndicatorPluginContainer * pc);
-
-extern void
- gkbd_indicator_plugin_container_reinit_ui (GkbdIndicatorPluginContainer * pc);
-
-extern guint
-gkbd_indicator_plugin_get_num_groups (GkbdIndicatorPluginContainer * pc);
-
-extern gchar
- **
- gkbd_indicator_plugin_load_localized_group_names
- (GkbdIndicatorPluginContainer * pc);
-
-#endif
diff --git a/trunk/libgnomekbd/gkbd-indicator.c b/trunk/libgnomekbd/gkbd-indicator.c
deleted file mode 100644
index 7dad71d..0000000
--- a/trunk/libgnomekbd/gkbd-indicator.c
+++ /dev/null
@@ -1,858 +0,0 @@
-/*
- * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#include <memory.h>
-
-#include <gdk/gdkkeysyms.h>
-#include <gdk/gdkx.h>
-#include <glib/gi18n.h>
-
-#include <gkbd-indicator.h>
-#include <gkbd-indicator-marshal.h>
-
-#include <gkbd-desktop-config.h>
-#include <gkbd-indicator-config.h>
-
-#include <gkbd-indicator-plugin-manager.h>
-
-#include <gkbd-config-registry-client.h>
-
-typedef struct _gki_globals {
- XklEngine *engine;
-
- GkbdDesktopConfig cfg;
- GkbdIndicatorConfig ind_cfg;
- GkbdKeyboardConfig kbd_cfg;
-
- GkbdIndicatorPluginContainer plugin_container;
- GkbdIndicatorPluginManager plugin_manager;
-
- const gchar *tooltips_format;
- gchar **full_group_names;
- gchar **short_group_names;
- GSList *widget_instances;
-} gki_globals;
-
-struct _GkbdIndicatorPrivate {
- gboolean set_parent_tooltips;
- gdouble angle;
-};
-
-/* one instance for ALL widgets */
-static gki_globals globals;
-
-#define ForAllIndicators() \
- { \
- GSList* cur; \
- for (cur = globals.widget_instances; cur != NULL; cur = cur->next) { \
- GkbdIndicator * gki = (GkbdIndicator*)cur->data;
-#define NextIndicator() \
- } \
- }
-
-G_DEFINE_TYPE (GkbdIndicator, gkbd_indicator, GTK_TYPE_NOTEBOOK)
-
-static void
-gkbd_indicator_global_init (void);
-static void
-gkbd_indicator_global_term (void);
-static GtkWidget *
-gkbd_indicator_prepare_drawing (GkbdIndicator * gki, int group);
-static void
-gkbd_indicator_set_current_page_for_group (GkbdIndicator * gki, int group);
-static void
-gkbd_indicator_set_current_page (GkbdIndicator * gki);
-static void
-gkbd_indicator_cleanup (GkbdIndicator * gki);
-static void
-gkbd_indicator_fill (GkbdIndicator * gki);
-static void
-gkbd_indicator_set_tooltips (GkbdIndicator * gki, const char *str);
-
-void
-gkbd_indicator_set_tooltips (GkbdIndicator * gki, const char *str)
-{
- GtkTooltips *tooltips;
-
- if (str == NULL)
- return;
- tooltips = gtk_tooltips_new ();
- g_object_ref (G_OBJECT (tooltips));
- gtk_object_sink (GTK_OBJECT (tooltips));
- g_object_set_data_full (G_OBJECT (gki), "tooltips",
- tooltips, (GDestroyNotify) g_object_unref);
- gtk_tooltips_set_tip (tooltips, GTK_WIDGET (gki), str, NULL);
-
- if (gki->priv->set_parent_tooltips) {
- GtkWidget *parent =
- gtk_widget_get_parent (GTK_WIDGET (gki));
- if (parent != NULL) {
- gtk_tooltips_set_tip (tooltips,
- GTK_WIDGET (parent), str,
- NULL);
- g_object_ref (G_OBJECT (tooltips));
- g_object_set_data_full (G_OBJECT (parent),
- "gnome-kbd-indicator.tooltips",
- tooltips, (GDestroyNotify)
- g_object_unref);
- }
- }
- gtk_tooltips_enable (tooltips);
-}
-
-void
-gkbd_indicator_cleanup (GkbdIndicator * gki)
-{
- int i;
- GtkNotebook *notebook = GTK_NOTEBOOK (gki);
-
- /* Do not remove the first page! It is the default page */
- for (i = gtk_notebook_get_n_pages (notebook); --i > 0;) {
- gtk_notebook_remove_page (notebook, i);
- }
-}
-
-void
-gkbd_indicator_fill (GkbdIndicator * gki)
-{
- int grp;
- int total_groups = xkl_engine_get_num_groups (globals.engine);
- GtkNotebook *notebook = GTK_NOTEBOOK (gki);
-
- for (grp = 0; grp < total_groups; grp++) {
- GtkWidget *page, *decorated_page;
- page = gkbd_indicator_prepare_drawing (gki, grp);
-
- if (page == NULL)
- page = gtk_label_new ("");
-
- decorated_page =
- gkbd_indicator_plugin_manager_decorate_widget
- (&globals.plugin_manager, page, grp,
- globals.full_group_names[grp], &globals.kbd_cfg);
-
- page = decorated_page == NULL ? page : decorated_page;
-
- gtk_notebook_append_page (notebook, page, NULL);
- gtk_widget_show_all (page);
- }
-}
-
-static gboolean
-gkbd_indicator_key_pressed (GtkWidget *
- widget, GdkEventKey * event,
- GkbdIndicator * gki)
-{
- switch (event->keyval) {
- case GDK_KP_Enter:
- case GDK_ISO_Enter:
- case GDK_3270_Enter:
- case GDK_Return:
- case GDK_space:
- case GDK_KP_Space:
- gkbd_desktop_config_lock_next_group (&globals.cfg);
- return TRUE;
- default:
- break;
- }
- return FALSE;
-}
-
-static gboolean
-gkbd_indicator_button_pressed (GtkWidget *
- widget,
- GdkEventButton * event, GkbdIndicator * gki)
-{
- GtkWidget *img = gtk_bin_get_child (GTK_BIN (widget));
- xkl_debug (150, "Flag img size %d x %d\n",
- img->allocation.width, img->allocation.height);
- if (event->button == 1 && event->type == GDK_BUTTON_PRESS) {
- xkl_debug (150, "Mouse button pressed on applet\n");
- gkbd_desktop_config_lock_next_group (&globals.cfg);
- return TRUE;
- }
- return FALSE;
-}
-
-static void
-flag_exposed (GtkWidget * flag, GdkEventExpose * event, GdkPixbuf * image)
-{
- /* Image width and height */
- int iw = gdk_pixbuf_get_width (image);
- int ih = gdk_pixbuf_get_height (image);
- /* widget-to-image scales, X and Y */
- double xwiratio = 1.0 * flag->allocation.width / iw;
- double ywiratio = 1.0 * flag->allocation.height / ih;
- double wiratio = xwiratio < ywiratio ? xwiratio : ywiratio;
-
- /* scaled width and height */
- int sw = iw * wiratio;
- int sh = ih * wiratio;
-
- /* offsets */
- int ox = (flag->allocation.width - sw) >> 1;
- int oy = (flag->allocation.height - sh) >> 1;
-
- GdkPixbuf *scaled = gdk_pixbuf_scale_simple (image, sw, sh,
- GDK_INTERP_HYPER);
-
- gdk_draw_pixbuf (GDK_DRAWABLE (flag->window),
- NULL,
- scaled,
- 0, 0,
- ox, oy, sw, sh, GDK_RGB_DITHER_NORMAL, 0, 0);
- g_object_unref (G_OBJECT (scaled));
-}
-
-static GtkWidget *
-gkbd_indicator_prepare_drawing (GkbdIndicator * gki, int group)
-{
- gpointer pimage;
- GdkPixbuf *image;
- GtkWidget *ebox;
-
- pimage = g_slist_nth_data (globals.ind_cfg.images, group);
- ebox = gtk_event_box_new ();
- if (globals.ind_cfg.show_flags) {
- GtkWidget *flag;
- if (pimage == NULL)
- return NULL;
- image = GDK_PIXBUF (pimage);
- flag = gtk_drawing_area_new ();
- g_signal_connect (G_OBJECT (flag),
- "expose_event",
- G_CALLBACK (flag_exposed), image);
- gtk_container_add (GTK_CONTAINER (ebox), flag);
- } else {
- gpointer pcounter = NULL;
- char *prev_layout_name = NULL, **ppln;
- char *lbl_title = NULL;
- int counter = 0;
- char *layout_name = NULL;
- GtkWidget *align, *label;
- /**
- * Map "short desciption" ->
- * number of layouts in the configuration
- * having this short description
- */
- static GHashTable *short_descrs = NULL;
-
- if (group == 0)
- short_descrs =
- g_hash_table_new_full (g_str_hash, g_str_equal,
- g_free, NULL);
-
- if (xkl_engine_get_features (globals.engine) &
- XKLF_MULTIPLE_LAYOUTS_SUPPORTED) {
- char *full_layout_name =
- (char *) g_slist_nth_data (globals.kbd_cfg.
- layouts_variants,
- group);
- char *variant_name;
- if (!gkbd_keyboard_config_split_items
- (full_layout_name, &layout_name,
- &variant_name))
- /* just in case */
- layout_name = g_strdup (full_layout_name);
-
- if (globals.short_group_names != NULL) {
- char *short_group_name =
- globals.short_group_names[group];
- if (short_group_name != NULL
- && *short_group_name != '\0') {
- layout_name =
- g_strdup (short_group_name);
- }
- }
- } else
- layout_name =
- g_strdup (globals.full_group_names[group]);
-
- if (layout_name == NULL)
- layout_name = g_strdup ("?");
-
- /* Process layouts with repeating description */
- ppln = &prev_layout_name;
- if (g_hash_table_lookup_extended
- (short_descrs, layout_name,
- (gpointer *) ppln, &pcounter)) {
- /* "next" same description */
- gchar appendix[10] = "";
- gint utf8length;
- gunichar cidx;
- counter = GPOINTER_TO_INT (pcounter);
- /* Unicode subscript 2, 3, 4 */
- cidx = 0x2081 + counter;
- utf8length = g_unichar_to_utf8 (cidx, appendix);
- appendix[utf8length] = '\0';
- lbl_title =
- g_strconcat (layout_name, appendix, NULL);
- } else {
- /* "first" time this description */
- lbl_title = g_strdup (layout_name);
- }
- g_hash_table_insert (short_descrs, layout_name,
- GINT_TO_POINTER (counter + 1));
-
- align = gtk_alignment_new (0.5, 0.5, 1.0, 1.0);
- label = gtk_label_new (lbl_title);
- g_free (lbl_title);
- gtk_label_set_angle (GTK_LABEL (label), gki->priv->angle);
-
- if (group == xkl_engine_get_num_groups (globals.engine)) {
- g_hash_table_destroy (short_descrs);
- short_descrs = NULL;
- }
-
- gtk_container_add (GTK_CONTAINER (align), label);
- gtk_container_add (GTK_CONTAINER (ebox), align);
-
- gtk_container_set_border_width (GTK_CONTAINER (align), 2);
- }
- g_signal_connect (G_OBJECT (ebox),
- "button_press_event",
- G_CALLBACK (gkbd_indicator_button_pressed), gki);
-
- g_signal_connect (G_OBJECT (gki),
- "key_press_event",
- G_CALLBACK (gkbd_indicator_key_pressed), gki);
-
- /* We have everything prepared for that size */
-
- return ebox;
-}
-
-static void
-gkbd_indicator_update_tooltips (GkbdIndicator * gki)
-{
- XklState *state = xkl_engine_get_current_state (globals.engine);
- gchar *buf;
- if (state == NULL || state->group < 0)
- return;
-
- buf = g_strdup_printf (globals.tooltips_format,
- globals.full_group_names[state->group]);
-
- gkbd_indicator_set_tooltips (gki, buf);
- g_free (buf);
-}
-
-static void
-gkbd_indicator_parent_set (GtkWidget * gki, GtkWidget * previous_parent)
-{
- gkbd_indicator_update_tooltips (GKBD_INDICATOR (gki));
-}
-
-
-void
-gkbd_indicator_reinit_ui (GkbdIndicator * gki)
-{
- gkbd_indicator_cleanup (gki);
- gkbd_indicator_fill (gki);
-
- gkbd_indicator_set_current_page (gki);
-
- g_signal_emit_by_name (gki, "reinit-ui");
-}
-
-/* Should be called once for all widgets */
-static void
-gkbd_indicator_cfg_changed (GConfClient * client,
- guint cnxn_id, GConfEntry * entry)
-{
- xkl_debug (100,
- "General configuration changed in GConf - reiniting...\n");
- gkbd_desktop_config_load_from_gconf (&globals.cfg);
- gkbd_desktop_config_activate (&globals.cfg);
- ForAllIndicators () {
- gkbd_indicator_reinit_ui (gki);
- } NextIndicator ();
-}
-
-/* Should be called once for all widgets */
-static void
-gkbd_indicator_ind_cfg_changed (GConfClient * client,
- guint cnxn_id, GConfEntry * entry)
-{
- xkl_debug (100,
- "Applet configuration changed in GConf - reiniting...\n");
- gkbd_indicator_config_load_from_gconf (&globals.ind_cfg);
- gkbd_indicator_config_update_images (&globals.ind_cfg,
- &globals.kbd_cfg);
- gkbd_indicator_config_activate (&globals.ind_cfg);
-
- gkbd_indicator_plugin_manager_toggle_plugins (&globals.
- plugin_manager,
- &globals.
- plugin_container,
- globals.ind_cfg.
- enabled_plugins);
-
- ForAllIndicators () {
- gkbd_indicator_reinit_ui (gki);
- } NextIndicator ();
-}
-
-static void
-gkbd_indicator_load_group_names (const gchar ** layout_ids,
- const gchar ** variant_ids)
-{
- if (!gkbd_desktop_config_load_remote_group_descriptions_utf8
- (&globals.cfg, layout_ids, variant_ids,
- &globals.short_group_names, &globals.full_group_names)) {
- /* We just populate no short names (remain NULL) -
- * full names are going to be used anyway */
- gint i, total_groups =
- xkl_engine_get_num_groups (globals.engine);
- globals.full_group_names =
- g_new0 (char *, total_groups + 1);
-
- if (xkl_engine_get_features (globals.engine) &
- XKLF_MULTIPLE_LAYOUTS_SUPPORTED) {
- GSList *lst = globals.kbd_cfg.layouts_variants;
- for (i = 0; lst; lst = lst->next,i++) {
- globals.full_group_names[i] =
- g_strdup ((char *) lst->data);
- }
- } else {
- for (i = total_groups; --i >= 0;) {
- globals.full_group_names[i] =
- g_strdup_printf ("Group %d", i);
- }
- }
- }
-}
-
-/* Should be called once for all widgets */
-static void
-gkbd_indicator_kbd_cfg_callback (GkbdIndicator * gki)
-{
- XklConfigRec *xklrec = xkl_config_rec_new ();
- xkl_debug (100,
- "XKB configuration changed on X Server - reiniting...\n");
-
- gkbd_keyboard_config_load_from_x_current (&globals.kbd_cfg,
- xklrec);
- gkbd_indicator_config_update_images (&globals.ind_cfg,
- &globals.kbd_cfg);
-
- g_strfreev (globals.full_group_names);
- globals.full_group_names = NULL;
-
- if (globals.short_group_names != NULL) {
- g_strfreev (globals.short_group_names);
- globals.short_group_names = NULL;
- }
-
- gkbd_indicator_load_group_names ((const gchar **) xklrec->layouts,
- (const gchar **) xklrec->
- variants);
-
- ForAllIndicators () {
- gkbd_indicator_reinit_ui (gki);
- } NextIndicator ();
- g_object_unref (G_OBJECT (xklrec));
-}
-
-/* Should be called once for all applets */
-static void
-gkbd_indicator_state_callback (XklEngine * engine,
- XklEngineStateChange changeType,
- gint group, gboolean restore)
-{
- xkl_debug (150, "group is now %d, restore: %d\n", group, restore);
-
- if (changeType == GROUP_CHANGED) {
- ForAllIndicators () {
- gkbd_indicator_plugin_manager_group_changed
- (&globals.plugin_manager, GTK_WIDGET (gki),
- group);
- xkl_debug (200, "do repaint\n");
- gkbd_indicator_set_current_page_for_group
- (gki, group);
- }
- NextIndicator ();
- }
-}
-
-
-void
-gkbd_indicator_set_current_page (GkbdIndicator * gki)
-{
- XklState *cur_state;
- cur_state = xkl_engine_get_current_state (globals.engine);
- if (cur_state->group >= 0)
- gkbd_indicator_set_current_page_for_group (gki,
- cur_state->
- group);
-}
-
-void
-gkbd_indicator_set_current_page_for_group (GkbdIndicator * gki, int group)
-{
- xkl_debug (200, "Revalidating for group %d\n", group);
-
- gtk_notebook_set_current_page (GTK_NOTEBOOK (gki), group + 1);
-
- gkbd_indicator_update_tooltips (gki);
-}
-
-/* Should be called once for all widgets */
-static GdkFilterReturn
-gkbd_indicator_filter_x_evt (GdkXEvent * xev, GdkEvent * event)
-{
- XEvent *xevent = (XEvent *) xev;
-
- xkl_engine_filter_events (globals.engine, xevent);
- switch (xevent->type) {
- case ReparentNotify:
- {
- XReparentEvent *rne = (XReparentEvent *) xev;
-
- ForAllIndicators () {
- GdkWindow *w =
- gtk_widget_get_parent_window
- (GTK_WIDGET (gki));
-
- /* compare the indicator's parent window with the even window */
- if (w != NULL
- && GDK_WINDOW_XID (w) == rne->window) {
- /* if so - make it transparent... */
- xkl_engine_set_window_transparent
- (globals.engine, rne->window,
- TRUE);
- }
- }
- NextIndicator ()
- }
- break;
- }
- return GDK_FILTER_CONTINUE;
-}
-
-
-/* Should be called once for all widgets */
-static void
-gkbd_indicator_start_listen (void)
-{
- gdk_window_add_filter (NULL, (GdkFilterFunc)
- gkbd_indicator_filter_x_evt, NULL);
- gdk_window_add_filter (gdk_get_default_root_window (),
- (GdkFilterFunc)
- gkbd_indicator_filter_x_evt, NULL);
-
- xkl_engine_start_listen (globals.engine,
- XKLL_TRACK_KEYBOARD_STATE);
-}
-
-/* Should be called once for all widgets */
-static void
-gkbd_indicator_stop_listen (void)
-{
- xkl_engine_stop_listen (globals.engine);
-
- gdk_window_remove_filter (NULL, (GdkFilterFunc)
- gkbd_indicator_filter_x_evt, NULL);
- gdk_window_remove_filter
- (gdk_get_default_root_window (),
- (GdkFilterFunc) gkbd_indicator_filter_x_evt, NULL);
-}
-
-static gboolean
-gkbd_indicator_scroll (GtkWidget * gki, GdkEventScroll * event)
-{
- /* mouse wheel events should be ignored, otherwise funny effects appear */
- return TRUE;
-}
-
-static void
-gkbd_indicator_init (GkbdIndicator * gki)
-{
- GtkWidget *def_drawing;
- GtkNotebook *notebook;
-
- if (!g_slist_length (globals.widget_instances))
- gkbd_indicator_global_init ();
-
- gki->priv = g_new0 (GkbdIndicatorPrivate, 1);
-
- notebook = GTK_NOTEBOOK (gki);
-
- xkl_debug (100, "Initiating the widget startup process for %p\n",
- gki);
-
- gtk_notebook_set_show_tabs (notebook, FALSE);
- gtk_notebook_set_show_border (notebook, FALSE);
-
- def_drawing =
- gtk_image_new_from_stock (GTK_STOCK_STOP,
- GTK_ICON_SIZE_BUTTON);
-
- gtk_notebook_append_page (notebook, def_drawing,
- gtk_label_new (""));
-
- if (globals.engine == NULL) {
- gkbd_indicator_set_tooltips (gki,
- _
- ("XKB initialization error"));
- return;
- }
-
- gkbd_indicator_set_tooltips (gki, "");
-
- gkbd_indicator_fill (gki);
- gkbd_indicator_set_current_page (gki);
-
- gtk_widget_add_events (GTK_WIDGET (gki), GDK_BUTTON_PRESS_MASK);
-
- /* append AFTER all initialization work is finished */
- globals.widget_instances =
- g_slist_append (globals.widget_instances, gki);
-}
-
-static void
-gkbd_indicator_finalize (GObject * obj)
-{
- GkbdIndicator *gki = GKBD_INDICATOR (obj);
- xkl_debug (100,
- "Starting the gnome-kbd-indicator widget shutdown process for %p\n",
- gki);
-
- /* remove BEFORE all termination work is finished */
- globals.widget_instances =
- g_slist_remove (globals.widget_instances, gki);
-
- gkbd_indicator_cleanup (gki);
-
- xkl_debug (100,
- "The instance of gnome-kbd-indicator successfully finalized\n");
-
- g_free (gki->priv);
-
- G_OBJECT_CLASS (gkbd_indicator_parent_class)->finalize (obj);
-
- if (!g_slist_length (globals.widget_instances))
- gkbd_indicator_global_term ();
-}
-
-static void
-gkbd_indicator_global_term (void)
-{
- xkl_debug (100, "*** Last GkbdIndicator instance *** \n");
- gkbd_indicator_stop_listen ();
-
- gkbd_desktop_config_stop_listen (&globals.cfg);
- gkbd_indicator_config_stop_listen (&globals.ind_cfg);
-
- gkbd_indicator_plugin_manager_term_initialized_plugins (&globals.
- plugin_manager);
- gkbd_indicator_plugin_manager_term (&globals.plugin_manager);
-
- gkbd_indicator_config_term (&globals.ind_cfg);
- gkbd_keyboard_config_term (&globals.kbd_cfg);
- gkbd_desktop_config_term (&globals.cfg);
-
- gkbd_indicator_plugin_container_term (&globals.plugin_container);
-
- g_object_unref (G_OBJECT (globals.engine));
- globals.engine = NULL;
- xkl_debug (100, "*** Terminated globals *** \n");
-}
-
-static void
-gkbd_indicator_class_init (GkbdIndicatorClass * klass)
-{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
- GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
-
- xkl_debug (100, "*** First GkbdIndicator instance *** \n");
-
- memset (&globals, 0, sizeof (globals));
-
- /* Initing some global vars */
- globals.tooltips_format = "%s";
-
- /* Initing vtable */
- object_class->finalize = gkbd_indicator_finalize;
-
- widget_class->scroll_event = gkbd_indicator_scroll;
- widget_class->parent_set = gkbd_indicator_parent_set;
-
- /* Signals */
- g_signal_new ("reinit-ui", GKBD_TYPE_INDICATOR,
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (GkbdIndicatorClass, reinit_ui),
- NULL, NULL, gkbd_indicator_VOID__VOID,
- G_TYPE_NONE, 0);
-}
-
-static void
-gkbd_indicator_global_init (void)
-{
- GConfClient *gconf_client;
- XklConfigRec *xklrec = xkl_config_rec_new ();
-
- globals.engine = xkl_engine_get_instance (GDK_DISPLAY ());
- if (globals.engine == NULL) {
- xkl_debug (0, "Libxklavier initialization error");
- return;
- }
-
- gconf_client = gconf_client_get_default ();
-
- g_signal_connect (globals.engine, "X-state-changed",
- G_CALLBACK (gkbd_indicator_state_callback),
- NULL);
- g_signal_connect (globals.engine, "X-config-changed",
- G_CALLBACK (gkbd_indicator_kbd_cfg_callback),
- NULL);
-
- gkbd_indicator_plugin_container_init (&globals.plugin_container,
- gconf_client);
-
- gkbd_desktop_config_init (&globals.cfg, gconf_client,
- globals.engine);
- gkbd_keyboard_config_init (&globals.kbd_cfg, gconf_client,
- globals.engine);
- gkbd_indicator_config_init (&globals.ind_cfg, gconf_client,
- globals.engine);
-
- g_object_unref (gconf_client);
-
- gkbd_desktop_config_load_from_gconf (&globals.cfg);
- gkbd_desktop_config_activate (&globals.cfg);
- gkbd_keyboard_config_load_from_x_current (&globals.kbd_cfg,
- xklrec);
- gkbd_indicator_config_load_from_gconf (&globals.ind_cfg);
- gkbd_indicator_config_update_images (&globals.ind_cfg,
- &globals.kbd_cfg);
- gkbd_indicator_config_activate (&globals.ind_cfg);
-
- gkbd_indicator_load_group_names ((const gchar **) xklrec->layouts,
- (const gchar **) xklrec->
- variants);
- g_object_unref (G_OBJECT (xklrec));
-
- gkbd_indicator_plugin_manager_init (&globals.plugin_manager);
- gkbd_indicator_plugin_manager_init_enabled_plugins (&globals.
- plugin_manager,
- &globals.
- plugin_container,
- globals.
- ind_cfg.
- enabled_plugins);
- gkbd_desktop_config_start_listen (&globals.cfg,
- (GConfClientNotifyFunc)
- gkbd_indicator_cfg_changed,
- NULL);
- gkbd_indicator_config_start_listen (&globals.ind_cfg,
- (GConfClientNotifyFunc)
- gkbd_indicator_ind_cfg_changed,
- NULL);
- gkbd_indicator_start_listen ();
-
- xkl_debug (100, "*** Inited globals *** \n");
-}
-
-GtkWidget *
-gkbd_indicator_new (void)
-{
- return
- GTK_WIDGET (g_object_new (gkbd_indicator_get_type (), NULL));
-}
-
-void
-gkbd_indicator_set_parent_tooltips (GkbdIndicator * gki, gboolean spt)
-{
- gki->priv->set_parent_tooltips = spt;
- gkbd_indicator_update_tooltips (gki);
-}
-
-void
-gkbd_indicator_set_tooltips_format (const gchar format[])
-{
- globals.tooltips_format = format;
- ForAllIndicators ()
- gkbd_indicator_update_tooltips (gki);
- NextIndicator ()
-}
-
-XklEngine *
-gkbd_indicator_get_xkl_engine ()
-{
- return globals.engine;
-}
-
-gchar **
-gkbd_indicator_get_group_names ()
-{
- return globals.full_group_names;
-}
-
-gchar *
-gkbd_indicator_get_image_filename (guint group)
-{
- if (!globals.ind_cfg.show_flags)
- return NULL;
- return gkbd_indicator_config_get_images_file (&globals.
- ind_cfg,
- &globals.
- kbd_cfg, group);
-}
-
-gdouble
-gkbd_indicator_get_max_width_height_ratio (void)
-{
- gdouble rv = 0.0;
- GSList *ip = globals.ind_cfg.images;
- if (!globals.ind_cfg.show_flags)
- return 0;
- while (ip != NULL) {
- GdkPixbuf *img = GDK_PIXBUF (ip->data);
- gdouble r =
- 1.0 * gdk_pixbuf_get_width (img) /
- gdk_pixbuf_get_height (img);
- if (r > rv)
- rv = r;
- ip = ip->next;
- }
- return rv;
-}
-
-void
-gkbd_indicator_set_angle (GkbdIndicator * gki, gdouble angle)
-{
- gki->priv->angle = angle;
-}
-
-/* Plugin support */
-/* Preserve the plugin container functions during the linking */
-void
-gkbd_indicator_plugin_container_reinit_ui (GkbdIndicatorPluginContainer *
- pc)
-{
- ForAllIndicators () {
- gkbd_indicator_reinit_ui (gki);
- } NextIndicator ();
-}
-
-gchar **gkbd_indicator_plugin_load_localized_group_names
- (GkbdIndicatorPluginContainer * pc) {
- return globals.full_group_names;
-}
diff --git a/trunk/libgnomekbd/gkbd-indicator.h b/trunk/libgnomekbd/gkbd-indicator.h
deleted file mode 100644
index 49544e1..0000000
--- a/trunk/libgnomekbd/gkbd-indicator.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef __GKBD_INDICATOR_H__
-#define __GKBD_INDICATOR_H__
-
-#include <gtk/gtk.h>
-
-#include <libxklavier/xklavier.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
- typedef struct _GkbdIndicator GkbdIndicator;
- typedef struct _GkbdIndicatorPrivate GkbdIndicatorPrivate;
- typedef struct _GkbdIndicatorClass GkbdIndicatorClass;
-
-#define GKBD_TYPE_INDICATOR (gkbd_indicator_get_type ())
-#define GKBD_INDICATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GKBD_TYPE_INDICATOR, GkbdIndicator))
-#define GKBD_INDCATOR_CLASS(obj) (G_TYPE_CHECK_CLASS_CAST ((obj), GKBD_TYPE_INDICATOR, GkbdIndicatorClass))
-#define GKBD_IS_INDICATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GKBD_TYPE_INDICATOR))
-#define GKBD_IS_INDICATOR_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE ((obj), GKBD_TYPE_INDICATOR))
-#define GKBD_INDICATOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GKBD_TYPE_INDICATOR, GkbdIndicatorClass))
-
- struct _GkbdIndicator {
- GtkNotebook parent;
- GkbdIndicatorPrivate *priv;
- };
-
- struct _GkbdIndicatorClass {
- GtkNotebookClass parent_class;
-
- void (*reinit_ui) (GkbdIndicator * gki);
- };
-
- extern GType gkbd_indicator_get_type (void);
-
- extern GtkWidget *gkbd_indicator_new (void);
-
- extern void gkbd_indicator_reinit_ui (GkbdIndicator * gki);
-
- extern void gkbd_indicator_set_angle (GkbdIndicator * gki,
- gdouble angle);
-
- extern XklEngine *gkbd_indicator_get_xkl_engine (void);
-
- extern gchar **gkbd_indicator_get_group_names (void);
-
- extern gchar *gkbd_indicator_get_image_filename (guint group);
-
- extern gdouble gkbd_indicator_get_max_width_height_ratio (void);
-
- extern void
- gkbd_indicator_set_parent_tooltips (GkbdIndicator *
- gki, gboolean ifset);
-
- extern void
- gkbd_indicator_set_tooltips_format (const gchar str[]);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/trunk/libgnomekbd/gkbd-keyboard-config.c b/trunk/libgnomekbd/gkbd-keyboard-config.c
deleted file mode 100644
index c7d4a14..0000000
--- a/trunk/libgnomekbd/gkbd-keyboard-config.c
+++ /dev/null
@@ -1,830 +0,0 @@
-/*
- * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#include <config.h>
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <X11/keysym.h>
-
-#include <glib/gi18n.h>
-#include <libgnome/gnome-program.h>
-
-#include <gkbd-keyboard-config.h>
-#include <gkbd-config-private.h>
-
-#include <gkbd-config-registry-client.h>
-
-/**
- * GkbdKeyboardConfig
- */
-#define GKBD_KEYBOARD_CONFIG_KEY_PREFIX GKBD_CONFIG_KEY_PREFIX "/kbd"
-
-const gchar GKBD_KEYBOARD_CONFIG_DIR[] = GKBD_KEYBOARD_CONFIG_KEY_PREFIX;
-const gchar GKBD_KEYBOARD_CONFIG_KEY_MODEL[] =
- GKBD_KEYBOARD_CONFIG_KEY_PREFIX "/model";
-const gchar GKBD_KEYBOARD_CONFIG_KEY_LAYOUTS[] =
- GKBD_KEYBOARD_CONFIG_KEY_PREFIX "/layouts";
-const gchar GKBD_KEYBOARD_CONFIG_KEY_OPTIONS[] =
- GKBD_KEYBOARD_CONFIG_KEY_PREFIX "/options";
-
-const gchar *GKBD_KEYBOARD_CONFIG_ACTIVE[] = {
- GKBD_KEYBOARD_CONFIG_KEY_MODEL,
- GKBD_KEYBOARD_CONFIG_KEY_LAYOUTS,
- GKBD_KEYBOARD_CONFIG_KEY_OPTIONS
-};
-
-#define GKBD_KEYBOARD_CONFIG_SYSBACKUP_KEY_PREFIX GKBD_CONFIG_KEY_PREFIX "/kbd.sysbackup"
-
-const gchar GKBD_KEYBOARD_CONFIG_SYSBACKUP_DIR[] =
- GKBD_KEYBOARD_CONFIG_SYSBACKUP_KEY_PREFIX;
-const gchar GKBD_KEYBOARD_CONFIG_SYSBACKUP_KEY_MODEL[] =
- GKBD_KEYBOARD_CONFIG_SYSBACKUP_KEY_PREFIX "/model";
-const gchar GKBD_KEYBOARD_CONFIG_SYSBACKUP_KEY_LAYOUTS[] =
- GKBD_KEYBOARD_CONFIG_SYSBACKUP_KEY_PREFIX "/layouts";
-const gchar GKBD_KEYBOARD_CONFIG_SYSBACKUP_KEY_OPTIONS[] =
- GKBD_KEYBOARD_CONFIG_SYSBACKUP_KEY_PREFIX "/options";
-
-const gchar *GKBD_KEYBOARD_CONFIG_SYSBACKUP[] = {
- GKBD_KEYBOARD_CONFIG_SYSBACKUP_KEY_MODEL,
- GKBD_KEYBOARD_CONFIG_SYSBACKUP_KEY_LAYOUTS,
- GKBD_KEYBOARD_CONFIG_SYSBACKUP_KEY_OPTIONS
-};
-
-/**
- * static common functions
- */
-static void
-gkbd_keyboard_config_string_list_reset (GSList ** plist)
-{
- while (*plist != NULL) {
- GSList *p = *plist;
- *plist = (*plist)->next;
- g_free (p->data);
- g_slist_free_1 (p);
- }
-}
-
-static gboolean
-gslist_str_equal (GSList * l1, GSList * l2)
-{
- if (l1 == l2)
- return TRUE;
- while (l1 != NULL && l2 != NULL) {
- if ((l1->data != l2->data) &&
- (l1->data != NULL) &&
- (l2->data != NULL) &&
- g_ascii_strcasecmp (l1->data, l2->data))
- return False;
-
- l1 = l1->next;
- l2 = l2->next;
- }
- return (l1 == NULL && l2 == NULL);
-}
-
-gboolean
-gkbd_keyboard_config_get_lv_descriptions (XklConfigRegistry *
- config_registry,
- const gchar * layout_name,
- const gchar * variant_name,
- gchar ** layout_short_descr,
- gchar ** layout_descr,
- gchar ** variant_short_descr,
- gchar ** variant_descr)
-{
- static XklConfigItem litem;
- static XklConfigItem vitem;
-
- layout_name = g_strdup (layout_name);
-
- g_snprintf (litem.name, sizeof litem.name, "%s", layout_name);
- if (xkl_config_registry_find_layout (config_registry, &litem)) {
- *layout_short_descr = litem.short_description;
- *layout_descr = litem.description;
- } else
- *layout_short_descr = *layout_descr = NULL;
-
- if (variant_name != NULL) {
- variant_name = g_strdup (variant_name);
- g_snprintf (vitem.name, sizeof vitem.name, "%s",
- variant_name);
- if (xkl_config_registry_find_variant
- (config_registry, layout_name, &vitem)) {
- *variant_short_descr = vitem.short_description;
- *variant_descr = vitem.description;
- } else
- *variant_short_descr = *variant_descr = NULL;
-
- g_free ((char *) variant_name);
- } else
- *variant_descr = NULL;
-
- g_free ((char *) layout_name);
- return *layout_descr != NULL;
-}
-
-/**
- * extern common functions
- */
-const gchar *
-gkbd_keyboard_config_merge_items (const gchar * parent,
- const gchar * child)
-{
- static gchar buffer[XKL_MAX_CI_NAME_LENGTH * 2 - 1];
- *buffer = '\0';
- if (parent != NULL) {
- if (strlen (parent) >= XKL_MAX_CI_NAME_LENGTH)
- return NULL;
- strcat (buffer, parent);
- }
- if (child != NULL) {
- if (strlen (child) >= XKL_MAX_CI_NAME_LENGTH)
- return NULL;
- strcat (buffer, "\t");
- strcat (buffer, child);
- }
- return buffer;
-}
-
-gboolean
-gkbd_keyboard_config_split_items (const gchar * merged, gchar ** parent,
- gchar ** child)
-{
- static gchar pbuffer[XKL_MAX_CI_NAME_LENGTH];
- static gchar cbuffer[XKL_MAX_CI_NAME_LENGTH];
- int plen, clen;
- const gchar *pos;
- *parent = *child = NULL;
-
- if (merged == NULL)
- return FALSE;
-
- pos = strchr (merged, '\t');
- if (pos == NULL) {
- plen = strlen (merged);
- clen = 0;
- } else {
- plen = pos - merged;
- clen = strlen (pos + 1);
- if (clen >= XKL_MAX_CI_NAME_LENGTH)
- return FALSE;
- strcpy (*child = cbuffer, pos + 1);
- }
- if (plen >= XKL_MAX_CI_NAME_LENGTH)
- return FALSE;
- memcpy (*parent = pbuffer, merged, plen);
- pbuffer[plen] = '\0';
- return TRUE;
-}
-
-/**
- * static GkbdKeyboardConfig functions
- */
-static void
-gkbd_keyboard_config_options_add_full (GkbdKeyboardConfig * kbd_config,
- const gchar * full_option_name)
-{
- kbd_config->options =
- g_slist_append (kbd_config->options,
- g_strdup (full_option_name));
-}
-
-static void
-gkbd_keyboard_config_layouts_add_full (GkbdKeyboardConfig * kbd_config,
- const gchar * full_layout_name)
-{
- kbd_config->layouts_variants =
- g_slist_append (kbd_config->layouts_variants,
- g_strdup (full_layout_name));
-}
-
-static void
-gkbd_keyboard_config_copy_from_xkl_config (GkbdKeyboardConfig * kbd_config,
- XklConfigRec * pdata)
-{
- char **p, **p1;
- gkbd_keyboard_config_model_set (kbd_config, pdata->model);
- xkl_debug (150, "Loaded Kbd model: [%s]\n", pdata->model);
-
- gkbd_keyboard_config_layouts_reset (kbd_config);
- p = pdata->layouts;
- p1 = pdata->variants;
- while (p != NULL && *p != NULL) {
- const gchar *full_layout =
- gkbd_keyboard_config_merge_items (*p, *p1);
- xkl_debug (150,
- "Loaded Kbd layout (with variant): [%s]\n",
- full_layout);
- gkbd_keyboard_config_layouts_add_full (kbd_config,
- full_layout);
- p++;
- p1++;
- }
-
- gkbd_keyboard_config_options_reset (kbd_config);
- p = pdata->options;
- while (p != NULL && *p != NULL) {
- char group[XKL_MAX_CI_NAME_LENGTH];
- char *option = *p;
- char *delim =
- (option != NULL) ? strchr (option, ':') : NULL;
- int len;
- if ((delim != NULL) &&
- ((len = (delim - option)) < XKL_MAX_CI_NAME_LENGTH)) {
- strncpy (group, option, len);
- group[len] = 0;
- xkl_debug (150, "Loaded Kbd option: [%s][%s]\n",
- group, option);
- gkbd_keyboard_config_options_add (kbd_config,
- group, option);
- }
- p++;
- }
-}
-
-static void
-gkbd_keyboard_config_copy_to_xkl_config (GkbdKeyboardConfig * kbd_config,
- XklConfigRec * pdata)
-{
- int i;
- int num_layouts, num_options;
- pdata->model =
- (kbd_config->model ==
- NULL) ? NULL : g_strdup (kbd_config->model);
-
- num_layouts =
- (kbd_config->layouts_variants ==
- NULL) ? 0 : g_slist_length (kbd_config->layouts_variants);
- num_options =
- (kbd_config->options ==
- NULL) ? 0 : g_slist_length (kbd_config->options);
-
- xkl_debug (150, "Taking %d layouts\n", num_layouts);
- if (num_layouts != 0) {
- GSList *the_layout_variant = kbd_config->layouts_variants;
- char **p1 = pdata->layouts =
- g_new0 (char *, num_layouts + 1);
- char **p2 = pdata->variants =
- g_new0 (char *, num_layouts + 1);
- for (i = num_layouts; --i >= 0;) {
- char *layout, *variant;
- if (gkbd_keyboard_config_split_items
- (the_layout_variant->data, &layout, &variant)
- && variant != NULL) {
- *p1 =
- (layout ==
- NULL) ? g_strdup ("") :
- g_strdup (layout);
- *p2 =
- (variant ==
- NULL) ? g_strdup ("") :
- g_strdup (variant);
- } else {
- *p1 =
- (the_layout_variant->data ==
- NULL) ? g_strdup ("") :
- g_strdup (the_layout_variant->data);
- *p2 = g_strdup ("");
- }
- xkl_debug (150, "Adding [%s]/%p and [%s]/%p\n",
- *p1 ? *p1 : "(nil)", *p1,
- *p2 ? *p2 : "(nil)", *p2);
- p1++;
- p2++;
- the_layout_variant = the_layout_variant->next;
- }
- }
-
- if (num_options != 0) {
- GSList *the_option = kbd_config->options;
- char **p = pdata->options =
- g_new0 (char *, num_options + 1);
- for (i = num_options; --i >= 0;) {
- char *group, *option;
- if (gkbd_keyboard_config_split_items
- (the_option->data, &group, &option)
- && option != NULL)
- *(p++) = g_strdup (option);
- else {
- *(p++) = g_strdup ("");
- xkl_debug (150, "Could not split [%s]\n",
- the_option->data);
- }
- the_option = the_option->next;
- }
- }
-}
-
-static void
-gkbd_keyboard_config_load_params (GkbdKeyboardConfig * kbd_config,
- const gchar * param_names[])
-{
- GError *gerror = NULL;
- gchar *pc;
- GSList *pl;
-
- pc = gconf_client_get_string (kbd_config->conf_client,
- param_names[0], &gerror);
- if (pc == NULL || gerror != NULL) {
- if (gerror != NULL) {
- g_warning ("Error reading configuration:%s\n",
- gerror->message);
- g_error_free (gerror);
- g_free (pc);
- gerror = NULL;
- }
- gkbd_keyboard_config_model_set (kbd_config, NULL);
- } else {
- gkbd_keyboard_config_model_set (kbd_config, pc);
- g_free (pc);
- }
- xkl_debug (150, "Loaded Kbd model: [%s]\n",
- kbd_config->model ? kbd_config->model : "(null)");
-
- gkbd_keyboard_config_layouts_reset (kbd_config);
-
- pl = gconf_client_get_list (kbd_config->conf_client,
- param_names[1],
- GCONF_VALUE_STRING, &gerror);
- if (pl == NULL || gerror != NULL) {
- if (gerror != NULL) {
- g_warning ("Error reading configuration:%s\n",
- gerror->message);
- g_error_free (gerror);
- gerror = NULL;
- }
- }
-
- while (pl != NULL) {
- xkl_debug (150, "Loaded Kbd layout: [%s]\n", pl->data);
- gkbd_keyboard_config_layouts_add_full (kbd_config,
- pl->data);
- pl = pl->next;
- }
- gkbd_keyboard_config_string_list_reset (&pl);
-
- gkbd_keyboard_config_options_reset (kbd_config);
-
- pl = gconf_client_get_list (kbd_config->conf_client,
- param_names[2],
- GCONF_VALUE_STRING, &gerror);
- if (pl == NULL || gerror != NULL) {
- if (gerror != NULL) {
- g_warning ("Error reading configuration:%s\n",
- gerror->message);
- g_error_free (gerror);
- gerror = NULL;
- }
- }
-
- while (pl != NULL) {
- xkl_debug (150, "Loaded Kbd option: [%s]\n", pl->data);
- gkbd_keyboard_config_options_add_full (kbd_config,
- (const gchar *) pl->
- data);
- pl = pl->next;
- }
- gkbd_keyboard_config_string_list_reset (&pl);
-}
-
-static void
-gkbd_keyboard_config_save_params (GkbdKeyboardConfig * kbd_config,
- GConfChangeSet * cs,
- const gchar * param_names[])
-{
- GSList *pl;
-
- if (kbd_config->model)
- gconf_change_set_set_string (cs, param_names[0],
- kbd_config->model);
- else
- gconf_change_set_unset (cs, param_names[0]);
- xkl_debug (150, "Saved Kbd model: [%s]\n",
- kbd_config->model ? kbd_config->model : "(null)");
-
- if (kbd_config->layouts_variants) {
- pl = kbd_config->layouts_variants;
- while (pl != NULL) {
- xkl_debug (150, "Saved Kbd layout: [%s]\n",
- pl->data);
- pl = pl->next;
- }
- gconf_change_set_set_list (cs,
- param_names[1],
- GCONF_VALUE_STRING,
- kbd_config->layouts_variants);
- } else {
- xkl_debug (150, "Saved Kbd layouts: []\n");
- gconf_change_set_unset (cs, param_names[1]);
- }
-
- if (kbd_config->options) {
- pl = kbd_config->options;
- while (pl != NULL) {
- xkl_debug (150, "Saved Kbd option: [%s]\n",
- pl->data);
- pl = pl->next;
- }
- gconf_change_set_set_list (cs,
- param_names[2],
- GCONF_VALUE_STRING,
- kbd_config->options);
- } else {
- xkl_debug (150, "Saved Kbd options: []\n");
- gconf_change_set_unset (cs, param_names[2]);
- }
-}
-
-/**
- * extern GkbdKeyboardConfig config functions
- */
-void
-gkbd_keyboard_config_init (GkbdKeyboardConfig * kbd_config,
- GConfClient * conf_client, XklEngine * engine)
-{
- GError *gerror = NULL;
-
- memset (kbd_config, 0, sizeof (*kbd_config));
- kbd_config->conf_client = conf_client;
- kbd_config->engine = engine;
- g_object_ref (kbd_config->conf_client);
-
- gconf_client_add_dir (kbd_config->conf_client,
- GKBD_KEYBOARD_CONFIG_DIR,
- GCONF_CLIENT_PRELOAD_NONE, &gerror);
- if (gerror != NULL) {
- g_warning ("err: %s\n", gerror->message);
- g_error_free (gerror);
- gerror = NULL;
- }
-}
-
-void
-gkbd_keyboard_config_term (GkbdKeyboardConfig * kbd_config)
-{
- gkbd_keyboard_config_model_set (kbd_config, NULL);
-
- gkbd_keyboard_config_layouts_reset (kbd_config);
-
- g_object_unref (kbd_config->conf_client);
- kbd_config->conf_client = NULL;
-}
-
-void
-gkbd_keyboard_config_load_from_gconf (GkbdKeyboardConfig * kbd_config,
- GkbdKeyboardConfig *
- kbd_config_default)
-{
- gkbd_keyboard_config_load_params (kbd_config,
- GKBD_KEYBOARD_CONFIG_ACTIVE);
-
- if (kbd_config_default != NULL) {
- GSList *pl;
-
- if (kbd_config->model == NULL)
- kbd_config->model =
- g_strdup (kbd_config_default->model);
-
- if (kbd_config->layouts_variants == NULL) {
- pl = kbd_config_default->layouts_variants;
- while (pl != NULL) {
- kbd_config->layouts_variants =
- g_slist_append (kbd_config->
- layouts_variants,
- g_strdup (pl->data));
- pl = pl->next;
- }
- }
-
- if (kbd_config->options == NULL) {
- pl = kbd_config_default->options;
- while (pl != NULL) {
- kbd_config->options =
- g_slist_append (kbd_config->options,
- g_strdup (pl->data));
- pl = pl->next;
- }
- }
- }
-}
-
-void
-gkbd_keyboard_config_load_from_gconf_backup (GkbdKeyboardConfig *
- kbd_config)
-{
- gkbd_keyboard_config_load_params (kbd_config,
- GKBD_KEYBOARD_CONFIG_SYSBACKUP);
-}
-
-void
-gkbd_keyboard_config_load_from_x_current (GkbdKeyboardConfig * kbd_config,
- XklConfigRec * data)
-{
- gboolean own_data = data == NULL;
- if (own_data)
- data = xkl_config_rec_new ();
- if (xkl_config_rec_get_from_server (data, kbd_config->engine))
- gkbd_keyboard_config_copy_from_xkl_config (kbd_config,
- data);
- else
- xkl_debug (150,
- "Could not load keyboard config from server: [%s]\n",
- xkl_get_last_error ());
- if (own_data)
- g_object_unref (G_OBJECT (data));
-}
-
-void
-gkbd_keyboard_config_load_from_x_initial (GkbdKeyboardConfig * kbd_config,
- XklConfigRec * data)
-{
- gboolean own_data = data == NULL;
- if (own_data)
- data = xkl_config_rec_new ();
- if (xkl_config_rec_get_from_backup (data, kbd_config->engine))
- gkbd_keyboard_config_copy_from_xkl_config (kbd_config,
- data);
- else
- xkl_debug (150,
- "Could not load keyboard config from backup: [%s]\n",
- xkl_get_last_error ());
- if (own_data)
- g_object_unref (G_OBJECT (data));
-}
-
-gboolean
-gkbd_keyboard_config_equals (GkbdKeyboardConfig * kbd_config1,
- GkbdKeyboardConfig * kbd_config2)
-{
- if (kbd_config1 == kbd_config2)
- return True;
- if ((kbd_config1->model != kbd_config2->model) &&
- (kbd_config1->model != NULL) &&
- (kbd_config2->model != NULL) &&
- g_ascii_strcasecmp (kbd_config1->model, kbd_config2->model))
- return False;
- return gslist_str_equal (kbd_config1->layouts_variants,
- kbd_config2->layouts_variants)
- && gslist_str_equal (kbd_config1->options,
- kbd_config2->options);
-}
-
-void
-gkbd_keyboard_config_save_to_gconf (GkbdKeyboardConfig * kbd_config)
-{
- GConfChangeSet *cs;
- GError *gerror = NULL;
-
- cs = gconf_change_set_new ();
-
- gkbd_keyboard_config_save_params (kbd_config, cs,
- GKBD_KEYBOARD_CONFIG_ACTIVE);
-
- gconf_client_commit_change_set (kbd_config->conf_client, cs, TRUE,
- &gerror);
- if (gerror != NULL) {
- g_warning ("Error saving active configuration: %s\n",
- gerror->message);
- g_error_free (gerror);
- gerror = NULL;
- }
- gconf_change_set_unref (cs);
-}
-
-void
-gkbd_keyboard_config_save_to_gconf_backup (GkbdKeyboardConfig * kbd_config)
-{
- GConfChangeSet *cs;
- GError *gerror = NULL;
-
- cs = gconf_change_set_new ();
-
- gkbd_keyboard_config_save_params (kbd_config, cs,
- GKBD_KEYBOARD_CONFIG_SYSBACKUP);
-
- gconf_client_commit_change_set (kbd_config->conf_client, cs, TRUE,
- &gerror);
- if (gerror != NULL) {
- g_warning ("Error saving backup configuration: %s\n",
- gerror->message);
- g_error_free (gerror);
- gerror = NULL;
- }
- gconf_change_set_unref (cs);
-}
-
-void
-gkbd_keyboard_config_model_set (GkbdKeyboardConfig * kbd_config,
- const gchar * model_name)
-{
- if (kbd_config->model != NULL)
- g_free (kbd_config->model);
- kbd_config->model =
- (model_name == NULL
- || model_name[0] == '\0') ? NULL : g_strdup (model_name);
-}
-
-void
-gkbd_keyboard_config_layouts_add (GkbdKeyboardConfig * kbd_config,
- const gchar * layout_name,
- const gchar * variant_name)
-{
- const gchar *merged;
- if (layout_name == NULL)
- return;
- merged =
- gkbd_keyboard_config_merge_items (layout_name, variant_name);
- if (merged == NULL)
- return;
- gkbd_keyboard_config_layouts_add_full (kbd_config, merged);
-}
-
-void
-gkbd_keyboard_config_layouts_reset (GkbdKeyboardConfig * kbd_config)
-{
- gkbd_keyboard_config_string_list_reset (&kbd_config->
- layouts_variants);
-}
-
-void
-gkbd_keyboard_config_options_reset (GkbdKeyboardConfig * kbd_config)
-{
- gkbd_keyboard_config_string_list_reset (&kbd_config->options);
-}
-
-void
-gkbd_keyboard_config_options_add (GkbdKeyboardConfig * kbd_config,
- const gchar * group_name,
- const gchar * option_name)
-{
- const gchar *merged;
- if (group_name == NULL || option_name == NULL)
- return;
- merged =
- gkbd_keyboard_config_merge_items (group_name, option_name);
- if (merged == NULL)
- return;
- gkbd_keyboard_config_options_add_full (kbd_config, merged);
-}
-
-gboolean
-gkbd_keyboard_config_options_is_set (GkbdKeyboardConfig * kbd_config,
- const gchar * group_name,
- const gchar * option_name)
-{
- const gchar *merged =
- gkbd_keyboard_config_merge_items (group_name, option_name);
- if (merged == NULL)
- return FALSE;
-
- return NULL != g_slist_find_custom (kbd_config->options, (gpointer)
- merged, (GCompareFunc)
- g_ascii_strcasecmp);
-}
-
-gboolean
-gkbd_keyboard_config_activate (GkbdKeyboardConfig * kbd_config)
-{
- gboolean rv;
- XklConfigRec *data = xkl_config_rec_new ();
-
- gkbd_keyboard_config_copy_to_xkl_config (kbd_config, data);
- rv = xkl_config_rec_activate (data, kbd_config->engine);
- g_object_unref (G_OBJECT (data));
-
- return rv;
-}
-
-void
-gkbd_keyboard_config_start_listen (GkbdKeyboardConfig * kbd_config,
- GConfClientNotifyFunc func,
- gpointer user_data)
-{
- gkbd_desktop_config_add_listener (kbd_config->conf_client,
- GKBD_KEYBOARD_CONFIG_DIR, func,
- user_data,
- &kbd_config->config_listener_id);
-}
-
-void
-gkbd_keyboard_config_stop_listen (GkbdKeyboardConfig * kbd_config)
-{
- gkbd_desktop_config_remove_listener (kbd_config->conf_client,
- &kbd_config->
- config_listener_id);
-}
-
-gboolean
-gkbd_keyboard_config_get_descriptions (XklConfigRegistry * config_registry,
- const gchar * name,
- gchar ** layout_short_descr,
- gchar ** layout_descr,
- gchar ** variant_short_descr,
- gchar ** variant_descr)
-{
- char *layout_name = NULL, *variant_name = NULL;
- if (!gkbd_keyboard_config_split_items
- (name, &layout_name, &variant_name))
- return FALSE;
- return gkbd_keyboard_config_get_lv_descriptions (config_registry,
- layout_name,
- variant_name,
- layout_short_descr,
- layout_descr,
- variant_short_descr,
- variant_descr);
-}
-
-const gchar *
-gkbd_keyboard_config_format_full_layout (const gchar * layout_descr,
- const gchar * variant_descr)
-{
- static gchar full_descr[XKL_MAX_CI_DESC_LENGTH * 2];
- if (variant_descr == NULL)
- g_snprintf (full_descr, sizeof (full_descr), "%s",
- layout_descr);
- else
- g_snprintf (full_descr, sizeof (full_descr), "%s %s",
- layout_descr, variant_descr);
- return full_descr;
-}
-
-gchar *
-gkbd_keyboard_config_to_string (const GkbdKeyboardConfig * config)
-{
- gchar *layouts = NULL, *options = NULL;
- GString *buffer = g_string_new (NULL);
-
- GSList *iter;
- gint count;
- gchar *result;
-
- if (config->layouts_variants) {
- /* g_slist_length is "expensive", so we determinate the length on the fly */
- for (iter = config->layouts_variants, count = 0; iter;
- iter = iter->next, ++count) {
- if (buffer->len)
- g_string_append (buffer, " ");
-
- g_string_append (buffer,
- (const gchar *) iter->data);
- }
-
- /* TRANS: The count is related to the number of options. The %s format specifier should not be modified,
- * left "as is". */
- layouts =
- g_strdup_printf (ngettext
- ("layout \"%s\"", "layouts \"%s\"",
- count), buffer->str);
- g_string_truncate (buffer, 0);
- }
- if (config->options) {
- /* g_slist_length is "expensive", so we determinate the length on the fly */
- for (iter = config->options, count = 0; iter;
- iter = iter->next, ++count) {
- if (buffer->len)
- g_string_append (buffer, " ");
-
- g_string_append (buffer,
- (const gchar *) iter->data);
- }
-
- /* TRANS: The count is related to the number of options. The %s format specifier should not be modified,
- * left "as is". */
- options =
- g_strdup_printf (ngettext
- ("option \"%s\"", "options \"%s\"",
- count), buffer->str);
- g_string_truncate (buffer, 0);
- }
-
- g_string_free (buffer, TRUE);
-
- result =
- g_strdup_printf (_("model \"%s\", %s and %s"), config->model,
- layouts ? layouts : _("no layout"),
- options ? options : _("no options"));
-
- g_free (options);
- g_free (layouts);
-
- return result;
-}
diff --git a/trunk/libgnomekbd/gkbd-keyboard-config.h b/trunk/libgnomekbd/gkbd-keyboard-config.h
deleted file mode 100644
index 579338a..0000000
--- a/trunk/libgnomekbd/gkbd-keyboard-config.h
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef __GKBD_KEYBOARD_CONFIG_H__
-#define __GKBD_KEYBOARD_CONFIG_H__
-
-#include <X11/Xlib.h>
-
-#include <glib.h>
-#include <glib/gslist.h>
-
-#include <gconf/gconf-client.h>
-
-#include <libxklavier/xklavier.h>
-
-extern const gchar GKBD_KEYBOARD_CONFIG_DIR[];
-extern const gchar GKBD_KEYBOARD_CONFIG_KEY_MODEL[];
-extern const gchar GKBD_KEYBOARD_CONFIG_KEY_LAYOUTS[];
-extern const gchar GKBD_KEYBOARD_CONFIG_KEY_OPTIONS[];
-
-/*
- * Keyboard Configuration
- */
-typedef struct _GkbdKeyboardConfig {
- gchar *model;
- GSList *layouts_variants;
- GSList *options;
-
- /* private, transient */
- GConfClient *conf_client;
- int config_listener_id;
- XklEngine *engine;
-} GkbdKeyboardConfig;
-
-/**
- * GkbdKeyboardConfig functions
- */
-extern void gkbd_keyboard_config_init (GkbdKeyboardConfig * kbd_config,
- GConfClient * conf_client,
- XklEngine * engine);
-extern void gkbd_keyboard_config_term (GkbdKeyboardConfig * kbd_config);
-
-extern void gkbd_keyboard_config_load_from_gconf (GkbdKeyboardConfig *
- kbd_config,
- GkbdKeyboardConfig *
- kbd_config_default);
-
-extern void gkbd_keyboard_config_save_to_gconf (GkbdKeyboardConfig *
- kbd_config);
-
-extern void gkbd_keyboard_config_load_from_gconf_backup (GkbdKeyboardConfig
- * kbd_config);
-
-extern void gkbd_keyboard_config_save_to_gconf_backup (GkbdKeyboardConfig *
- kbd_config);
-
-extern void gkbd_keyboard_config_load_from_x_initial (GkbdKeyboardConfig *
- kbd_config,
- XklConfigRec * buf);
-
-extern void gkbd_keyboard_config_load_from_x_current (GkbdKeyboardConfig *
- kbd_config,
- XklConfigRec * buf);
-
-extern void gkbd_keyboard_config_start_listen (GkbdKeyboardConfig *
- kbd_config,
- GConfClientNotifyFunc func,
- gpointer user_data);
-
-extern void gkbd_keyboard_config_stop_listen (GkbdKeyboardConfig *
- kbd_config);
-
-extern gboolean gkbd_keyboard_config_equals (GkbdKeyboardConfig *
- kbd_config1,
- GkbdKeyboardConfig *
- kbd_config2);
-
-extern gboolean gkbd_keyboard_config_activate (GkbdKeyboardConfig *
- kbd_config);
-
-extern const gchar *gkbd_keyboard_config_merge_items (const gchar * parent,
- const gchar * child);
-
-extern gboolean gkbd_keyboard_config_split_items (const gchar * merged,
- gchar ** parent,
- gchar ** child);
-
-extern gboolean gkbd_keyboard_config_get_descriptions (XklConfigRegistry *
- config_registry,
- const gchar * name,
- gchar **
- layout_short_descr,
- gchar **
- layout_descr,
- gchar **
- variant_short_descr,
- gchar **
- variant_descr);
-
-extern const gchar *gkbd_keyboard_config_format_full_layout (const gchar
- *
- layout_descr,
- const gchar *
- variant_descr);
-
-extern gchar *gkbd_keyboard_config_to_string (const GkbdKeyboardConfig *
- config);
-
-#endif
diff --git a/trunk/libgnomekbd/gkbd-keyboard-drawing-marshal.list b/trunk/libgnomekbd/gkbd-keyboard-drawing-marshal.list
deleted file mode 100644
index 7c298a9..0000000
--- a/trunk/libgnomekbd/gkbd-keyboard-drawing-marshal.list
+++ /dev/null
@@ -1,2 +0,0 @@
-# $Id: gkbd-keyboard-drawing-marshal.list,v 1.1 2006/09/27 20:27:04 svu Exp $
-VOID:UINT
diff --git a/trunk/libgnomekbd/gkbd-keyboard-drawing.c b/trunk/libgnomekbd/gkbd-keyboard-drawing.c
deleted file mode 100644
index 829560b..0000000
--- a/trunk/libgnomekbd/gkbd-keyboard-drawing.c
+++ /dev/null
@@ -1,1861 +0,0 @@
-/*
- * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#include <config.h>
-#include <gtk/gtk.h>
-#include <gdk/gdkx.h>
-#include <gdk/gdkkeysyms.h>
-#include <X11/XKBlib.h>
-#include <X11/extensions/XKBgeom.h>
-#include <stdlib.h>
-#include <memory.h>
-#include <math.h>
-
-#include <gkbd-keyboard-drawing.h>
-#include <gkbd-keyboard-drawing-marshal.h>
-
-#define noKBDRAW_DEBUG
-
-enum {
- BAD_KEYCODE = 0,
- NUM_SIGNALS
-};
-
-static guint gkbd_keyboard_drawing_signals[NUM_SIGNALS] = { 0 };
-
-static void gkbd_keyboard_drawing_set_mods (GkbdKeyboardDrawing * drawing,
- guint mods);
-
-static gint
-xkb_to_pixmap_coord (GkbdKeyboardDrawing * drawing, gint n)
-{
- return n * drawing->scale_numerator / drawing->scale_denominator;
-}
-
-/* angle is in tenths of a degree; coordinates can be anything as (xkb,
- * pixels, pango) as long as they are all the same */
-static void
-rotate_coordinate (gint origin_x,
- gint origin_y,
- gint x,
- gint y, gint angle, gint * rotated_x, gint * rotated_y)
-{
- *rotated_x =
- origin_x + (x - origin_x) * cos (M_PI * angle / 1800.0) - (y -
- origin_y)
- * sin (M_PI * angle / 1800.0);
- *rotated_y =
- origin_y + (x - origin_x) * sin (M_PI * angle / 1800.0) + (y -
- origin_y)
- * cos (M_PI * angle / 1800.0);
-}
-
-static void
-draw_polygon (GkbdKeyboardDrawing * drawing,
- GdkColor * fill_color,
- gint xkb_x,
- gint xkb_y, XkbPointRec * xkb_points, guint num_points)
-{
- GtkStateType state = GTK_WIDGET_STATE (GTK_WIDGET (drawing));
- GdkGC *gc;
- GdkPoint *points;
- gboolean filled;
- gint i;
-
- if (drawing->pixmap == NULL)
- return;
-
- if (fill_color) {
- gc = gdk_gc_new (GTK_WIDGET (drawing)->window);
- gdk_gc_set_rgb_fg_color (gc, fill_color);
- filled = TRUE;
- } else {
- gc = GTK_WIDGET (drawing)->style->dark_gc[state];
- filled = FALSE;
- }
-
- points = g_new (GdkPoint, num_points);
-
- for (i = 0; i < num_points; i++) {
- points[i].x =
- xkb_to_pixmap_coord (drawing, xkb_x + xkb_points[i].x);
- points[i].y =
- xkb_to_pixmap_coord (drawing, xkb_y + xkb_points[i].y);
- }
-
- gdk_draw_polygon (drawing->pixmap, gc, filled, points, num_points);
-
- g_free (points);
- if (fill_color)
- g_object_unref (gc);
-}
-
-/* x, y, width, height are in the xkb coordinate system */
-static void
-draw_rectangle (GkbdKeyboardDrawing * drawing,
- GdkColor * fill_color,
- gint angle,
- gint xkb_x, gint xkb_y, gint xkb_width, gint xkb_height)
-{
- if (drawing->pixmap == NULL)
- return;
-
- if (angle == 0) {
- GtkStateType state =
- GTK_WIDGET_STATE (GTK_WIDGET (drawing));
- gint x, y, width, height;
- gboolean filled;
- GdkGC *gc;
-
- if (fill_color) {
- gc = gdk_gc_new (GTK_WIDGET (drawing)->window);
- gdk_gc_set_rgb_fg_color (gc, fill_color);
- filled = TRUE;
- } else {
- gc = GTK_WIDGET (drawing)->style->dark_gc[state];
- filled = FALSE;
- }
-
- x = xkb_to_pixmap_coord (drawing, xkb_x);
- y = xkb_to_pixmap_coord (drawing, xkb_y);
- width =
- xkb_to_pixmap_coord (drawing, xkb_x + xkb_width) - x;
- height =
- xkb_to_pixmap_coord (drawing, xkb_y + xkb_height) - y;
-
- gdk_draw_rectangle (drawing->pixmap, gc, filled, x, y,
- width, height);
-
- if (fill_color)
- g_object_unref (gc);
- } else {
- XkbPointRec points[4];
- gint x, y;
-
- points[0].x = xkb_x;
- points[0].y = xkb_y;
- rotate_coordinate (xkb_x, xkb_y, xkb_x + xkb_width, xkb_y,
- angle, &x, &y);
- points[1].x = x;
- points[1].y = y;
- rotate_coordinate (xkb_x, xkb_y, xkb_x + xkb_width,
- xkb_y + xkb_height, angle, &x, &y);
- points[2].x = x;
- points[2].y = y;
- rotate_coordinate (xkb_x, xkb_y, xkb_x, xkb_y + xkb_height,
- angle, &x, &y);
- points[3].x = x;
- points[3].y = y;
-
- /* the points we've calculated are relative to 0,0 */
- draw_polygon (drawing, fill_color, 0, 0, points, 4);
- }
-}
-
-static void
-draw_outline (GkbdKeyboardDrawing * drawing,
- XkbOutlineRec * outline,
- GdkColor * color, gint angle, gint origin_x, gint origin_y)
-{
-#ifdef KBDRAW_DEBUG
- printf ("num_points in %p: %d\n", outline, outline->num_points);
-#endif
-
- if (outline->num_points == 1) {
- if (color)
- draw_rectangle (drawing, color, angle, origin_x,
- origin_y, outline->points[0].x,
- outline->points[0].y);
-
-#ifdef KBDRAW_DEBUG
- printf ("points:%p\n", outline->points);
- printf ("pointsxy:%d %d\n", outline->points[0].x,
- outline->points[0].y);
-#endif
-
- draw_rectangle (drawing, NULL, angle, origin_x, origin_y,
- outline->points[0].x,
- outline->points[0].y);
- } else if (outline->num_points == 2) {
- gint rotated_x0, rotated_y0;
-
- rotate_coordinate (origin_x, origin_y,
- origin_x + outline->points[0].x,
- origin_y + outline->points[0].y,
- angle, &rotated_x0, &rotated_y0);
- if (color)
- draw_rectangle (drawing, color, angle, rotated_x0,
- rotated_y0, outline->points[1].x,
- outline->points[1].y);
-
- draw_rectangle (drawing, NULL, angle, rotated_x0,
- rotated_y0, outline->points[1].x,
- outline->points[1].y);
- } else {
- if (color)
- draw_polygon (drawing, color, origin_x, origin_y,
- outline->points,
- outline->num_points);
-
- draw_polygon (drawing, NULL, origin_x, origin_y,
- outline->points, outline->num_points);
- }
-}
-
-/* see PSColorDef in xkbprint */
-static gboolean
-parse_xkb_color_spec (gchar * colorspec, GdkColor * color)
-{
- glong level;
-
- if (g_ascii_strcasecmp (colorspec, "black") == 0) {
- color->red = 0;
- color->green = 0;
- color->blue = 0;
- } else if (g_ascii_strcasecmp (colorspec, "white") == 0) {
- color->red = 65535;
- color->green = 65535;
- color->blue = 65535;
- } else if (g_ascii_strncasecmp (colorspec, "grey", 4) == 0 ||
- g_ascii_strncasecmp (colorspec, "gray", 4) == 0) {
- level = strtol (colorspec + 4, NULL, 10);
-
- color->red = 65535 - 65535 * level / 100;
- color->green = 65535 - 65535 * level / 100;
- color->blue = 65535 - 65535 * level / 100;
- } else if (g_ascii_strcasecmp (colorspec, "red") == 0) {
- color->red = 65535;
- color->green = 0;
- color->blue = 0;
- } else if (g_ascii_strcasecmp (colorspec, "green") == 0) {
- color->red = 0;
- color->green = 65535;
- color->blue = 0;
- } else if (g_ascii_strcasecmp (colorspec, "blue") == 0) {
- color->red = 0;
- color->green = 0;
- color->blue = 65535;
- } else if (g_ascii_strncasecmp (colorspec, "red", 3) == 0) {
- level = strtol (colorspec + 3, NULL, 10);
-
- color->red = 65535 * level / 100;
- color->green = 0;
- color->blue = 0;
- } else if (g_ascii_strncasecmp (colorspec, "green", 5) == 0) {
- level = strtol (colorspec + 5, NULL, 10);
-
- color->red = 0;
- color->green = 65535 * level / 100;;
- color->blue = 0;
- } else if (g_ascii_strncasecmp (colorspec, "blue", 4) == 0) {
- level = strtol (colorspec + 4, NULL, 10);
-
- color->red = 0;
- color->green = 0;
- color->blue = 65535 * level / 100;
- } else
- return FALSE;
-
- return TRUE;
-}
-
-
-static guint
-find_keycode (GkbdKeyboardDrawing * drawing, gchar * key_name)
-{
- guint i;
-
- if (!drawing->xkb)
- return (gint) (-1);
-
- for (i = drawing->xkb->min_key_code;
- i <= drawing->xkb->max_key_code; i++) {
- if (drawing->xkb->names->keys[i].name[0] == key_name[0]
- && drawing->xkb->names->keys[i].name[1] == key_name[1]
- && drawing->xkb->names->keys[i].name[2] == key_name[2]
- && drawing->xkb->names->keys[i].name[3] == key_name[3])
- return i;
- }
-
- return (guint) (-1);
-}
-
-
-static void
-set_key_label_in_layout (GkbdKeyboardDrawing * drawing,
- PangoLayout * layout, guint keyval)
-{
- gchar buf[5];
- gunichar uc;
-
- switch (keyval) {
- case GDK_Scroll_Lock:
- pango_layout_set_text (layout, "Scroll\nLock", -1);
- break;
-
- case GDK_space:
- pango_layout_set_text (layout, "", -1);
- break;
-
- case GDK_Sys_Req:
- pango_layout_set_text (layout, "Sys Rq", -1);
- break;
-
- case GDK_Page_Up:
- pango_layout_set_text (layout, "Page\nUp", -1);
- break;
-
- case GDK_Page_Down:
- pango_layout_set_text (layout, "Page\nDown", -1);
- break;
-
- case GDK_Num_Lock:
- pango_layout_set_text (layout, "Num\nLock", -1);
- break;
-
- case GDK_KP_Page_Up:
- pango_layout_set_text (layout, "Pg Up", -1);
- break;
-
- case GDK_KP_Page_Down:
- pango_layout_set_text (layout, "Pg Dn", -1);
- break;
-
- case GDK_KP_Home:
- pango_layout_set_text (layout, "Home", -1);
- break;
-
- case GDK_KP_Left:
- pango_layout_set_text (layout, "Left", -1);
- break;
-
- case GDK_KP_End:
- pango_layout_set_text (layout, "End", -1);
- break;
-
- case GDK_KP_Up:
- pango_layout_set_text (layout, "Up", -1);
- break;
-
- case GDK_KP_Begin:
- pango_layout_set_text (layout, "Begin", -1);
- break;
-
- case GDK_KP_Right:
- pango_layout_set_text (layout, "Right", -1);
- break;
-
- case GDK_KP_Enter:
- pango_layout_set_text (layout, "Enter", -1);
- break;
-
- case GDK_KP_Down:
- pango_layout_set_text (layout, "Down", -1);
- break;
-
- case GDK_KP_Insert:
- pango_layout_set_text (layout, "Ins", -1);
- break;
-
- case GDK_KP_Delete:
- pango_layout_set_text (layout, "Del", -1);
- break;
-
- case GDK_dead_grave:
- pango_layout_set_text (layout, "ˋ", -1);
- break;
-
- case GDK_dead_acute:
- pango_layout_set_text (layout, "ˊ", -1);
- break;
-
- case GDK_dead_circumflex:
- pango_layout_set_text (layout, "ˆ", -1);
- break;
-
- case GDK_dead_tilde:
- pango_layout_set_text (layout, "~", -1);
- break;
-
- case GDK_dead_macron:
- pango_layout_set_text (layout, "ˉ", -1);
- break;
-
- case GDK_dead_breve:
- pango_layout_set_text (layout, "˘", -1);
- break;
-
- case GDK_dead_abovedot:
- pango_layout_set_text (layout, "˙", -1);
- break;
-
- case GDK_dead_diaeresis:
- pango_layout_set_text (layout, "¨", -1);
- break;
-
- case GDK_dead_abovering:
- pango_layout_set_text (layout, "˚", -1);
- break;
-
- case GDK_dead_doubleacute:
- pango_layout_set_text (layout, "˝", -1);
- break;
-
- case GDK_dead_caron:
- pango_layout_set_text (layout, "ˇ", -1);
- break;
-
- case GDK_dead_cedilla:
- pango_layout_set_text (layout, "¸", -1);
- break;
-
- case GDK_dead_ogonek:
- pango_layout_set_text (layout, "˛", -1);
- break;
-
- /* case GDK_dead_iota:
- * case GDK_dead_voiced_sound:
- * case GDK_dead_semivoiced_sound: */
-
- case GDK_dead_belowdot:
- pango_layout_set_text (layout, " ̣", -1);
- break;
-
- case GDK_horizconnector:
- pango_layout_set_text (layout, "horiz\nconn", -1);
- break;
-
- case GDK_Mode_switch:
- pango_layout_set_text (layout, "AltGr", -1);
- break;
-
- case GDK_Multi_key:
- pango_layout_set_text (layout, "Compose", -1);
- break;
-
- default:
- uc = gdk_keyval_to_unicode (keyval);
- if (uc != 0 && g_unichar_isgraph (uc)) {
- buf[g_unichar_to_utf8 (uc, buf)] = '\0';
- pango_layout_set_text (layout, buf, -1);
- } else {
- gchar *name = gdk_keyval_name (keyval);
- if (name)
- pango_layout_set_text (layout, name, -1);
- else
- pango_layout_set_text (layout, "", -1);
- }
- }
-}
-
-
-static void
-draw_pango_layout (GkbdKeyboardDrawing * drawing,
- gint angle, gint x, gint y, PangoLayout * layout)
-{
- GtkStateType state = GTK_WIDGET_STATE (GTK_WIDGET (drawing));
- PangoLayoutLine *line;
- gint x_off, y_off;
- gint i;
-
- if (drawing->pixmap == NULL)
- return;
-
- if (angle != drawing->angle) {
- PangoMatrix matrix = PANGO_MATRIX_INIT;
- pango_matrix_rotate (&matrix, -angle / 10.0);
- pango_context_set_matrix (gtk_widget_get_pango_context
- (GTK_WIDGET (drawing)), &matrix);
- pango_layout_context_changed (drawing->layout);
- drawing->angle = angle;
- }
-
- i = 0;
- y_off = 0;
- for (line = pango_layout_get_line (drawing->layout, i);
- line != NULL;
- line = pango_layout_get_line (drawing->layout, ++i)) {
- GSList *runp;
- PangoRectangle line_extents;
-
- x_off = 0;
-
- for (runp = line->runs; runp != NULL; runp = runp->next) {
- PangoGlyphItem *run = runp->data;
- gint j;
-
- for (j = 0; j < run->glyphs->num_glyphs; j++) {
- PangoGlyphGeometry *geometry;
-
- geometry =
- &run->glyphs->glyphs[j].geometry;
-
- x_off += geometry->width;
- }
- }
-
- pango_layout_line_get_extents (line, NULL, &line_extents);
- y_off +=
- line_extents.height +
- pango_layout_get_spacing (drawing->layout);
- }
-
- gdk_draw_layout (drawing->pixmap,
- GTK_WIDGET (drawing)->style->text_gc[state], x, y,
- drawing->layout);
-}
-
-static void
-draw_key_label_helper (GkbdKeyboardDrawing * drawing,
- KeySym keysym,
- gint angle,
- GkbdKeyboardDrawingGroupLevelPosition glp,
- gint x,
- gint y, gint width, gint height, gint padding)
-{
- gint label_x, label_y, label_max_width, ycell;
-
- if (keysym == 0)
- return;
-#ifdef KBDRAW_DEBUG
- printf ("keysym: %04X(%c) at glp: %d\n",
- (unsigned) keysym, (char) keysym, (int) glp);
-#endif
-
- switch (glp) {
- case GKBD_KEYBOARD_DRAWING_POS_TOPLEFT:
- case GKBD_KEYBOARD_DRAWING_POS_BOTTOMLEFT:
- {
- ycell =
- glp == GKBD_KEYBOARD_DRAWING_POS_BOTTOMLEFT;
-
- rotate_coordinate (x, y, x + padding,
- y + padding + (height -
- 2 * padding) *
- ycell * 4 / 7, angle, &label_x,
- &label_y);
- label_max_width =
- PANGO_SCALE * (width - 2 * padding);
- break;
- }
- case GKBD_KEYBOARD_DRAWING_POS_TOPRIGHT:
- case GKBD_KEYBOARD_DRAWING_POS_BOTTOMRIGHT:
- {
- ycell =
- glp == GKBD_KEYBOARD_DRAWING_POS_BOTTOMRIGHT;
-
- rotate_coordinate (x, y,
- x + padding + (width -
- 2 * padding) *
- 4 / 7,
- y + padding + (height -
- 2 * padding) *
- ycell * 4 / 7, angle, &label_x,
- &label_y);
- label_max_width =
- PANGO_SCALE * ((width - 2 * padding) -
- (width - 2 * padding) * 4 / 7);
- break;
- }
- default:
- return;
- }
- set_key_label_in_layout (drawing, drawing->layout, keysym);
- pango_layout_set_width (drawing->layout, label_max_width);
- label_y -= (pango_layout_get_line_count (drawing->layout) - 1) *
- (pango_font_description_get_size (drawing->font_desc) / PANGO_SCALE);
- draw_pango_layout (drawing, angle, label_x, label_y, drawing->layout);
-}
-
-static void
-draw_key_label (GkbdKeyboardDrawing * drawing,
- guint keycode,
- gint angle,
- gint xkb_origin_x,
- gint xkb_origin_y, gint xkb_width, gint xkb_height)
-{
- gint x, y, width, height;
- gint padding;
- gint g, l, glp;
-
- if (!drawing->xkb)
- return;
-
- padding = 23 * drawing->scale_numerator / drawing->scale_denominator; /* 2.3mm */
-
- x = xkb_to_pixmap_coord (drawing, xkb_origin_x);
- y = xkb_to_pixmap_coord (drawing, xkb_origin_y);
- width =
- xkb_to_pixmap_coord (drawing, xkb_origin_x + xkb_width) - x;
- height =
- xkb_to_pixmap_coord (drawing, xkb_origin_y + xkb_height) - y;
-
- for (glp = GKBD_KEYBOARD_DRAWING_POS_TOPLEFT;
- glp < GKBD_KEYBOARD_DRAWING_POS_TOTAL; glp++) {
- if (drawing->groupLevels[glp] == NULL)
- continue;
- g = drawing->groupLevels[glp]->group;
- l = drawing->groupLevels[glp]->level;
-
- if (g < 0 || g >= XkbKeyNumGroups (drawing->xkb, keycode))
- continue;
- if (l < 0
- || l >= XkbKeyGroupWidth (drawing->xkb, keycode, g))
- continue;
-
- /* Skip "exotic" levels like the "Ctrl" level in PC_SYSREQ */
- if (l > 0) {
- guint mods = XkbKeyKeyType (drawing->xkb, keycode, g)->mods.mask;
- if ((mods & (ShiftMask | drawing->l3mod)) == 0)
- continue;
- }
-
- if (drawing->track_modifiers) {
- uint mods_rtrn;
- KeySym keysym;
-
- if (XkbTranslateKeyCode (drawing->xkb, keycode,
- XkbBuildCoreState
- (drawing->mods, g),
- &mods_rtrn, &keysym)) {
- draw_key_label_helper (drawing, keysym,
- angle, glp, x, y,
- width, height,
- padding);
- /* reverse y order */
- }
- } else {
- KeySym keysym;
-
- keysym =
- XkbKeySymEntry (drawing->xkb, keycode, l, g);
-
- draw_key_label_helper (drawing, keysym, angle, glp,
- x, y, width, height,
- padding);
- /* reverse y order */
- }
- }
-}
-
-/* groups are from 0-3 */
-static void
-draw_key (GkbdKeyboardDrawing * drawing, GkbdKeyboardDrawingKey * key)
-{
- XkbShapeRec *shape;
- GdkColor *color;
- /* gint i; */
-
- if (!drawing->xkb)
- return;
-
-#ifdef KBDRAW_DEBUG
- printf ("shape: %p (%p + %d)\n",
- drawing->xkb->geom->shapes + key->xkbkey->shape_ndx,
- drawing->xkb->geom->shapes, key->xkbkey->shape_ndx);
-#endif
-
- shape = drawing->xkb->geom->shapes + key->xkbkey->shape_ndx;
-
- if (key->pressed)
- color =
- &(GTK_WIDGET (drawing)->style->
- base[GTK_STATE_SELECTED]);
- else
- color = drawing->colors + key->xkbkey->color_ndx;
-
-#ifdef KBDRAW_DEBUG
- printf ("outlines: %p(%d)\n", shape->outlines,
- shape->num_outlines);
-#endif
-
- /* draw the primary outline */
- draw_outline (drawing, shape->primary ? shape->primary : shape->outlines,
- color, key->angle, key->origin_x, key->origin_y);
-#if 0
- /* don't draw other outlines for now, since
- * the text placement does not take them into account
- */
- for (i = 0; i < shape->num_outlines; i++)
- {
- if (shape->outlines + i == shape->approx ||
- shape->outlines + i == shape->primary)
- continue;
- draw_outline (drawing, shape->outlines + i, NULL,
- key->angle, key->origin_x, key->origin_y);
- }
-#endif
-
- draw_key_label (drawing, key->keycode, key->angle, key->origin_x,
- key->origin_y, shape->bounds.x2, shape->bounds.y2);
-}
-
-static void
-invalidate_region (GkbdKeyboardDrawing * drawing,
- gdouble angle,
- gint origin_x, gint origin_y, XkbShapeRec * shape)
-{
- GdkPoint points[4];
- gint x_min, x_max, y_min, y_max;
- gint x, y, width, height;
- gint xx, yy;
-
- rotate_coordinate (0, 0, 0, 0, angle, &xx, &yy);
- points[0].x = xx;
- points[0].y = yy;
- rotate_coordinate (0, 0, shape->bounds.x2, 0, angle, &xx, &yy);
- points[1].x = xx;
- points[1].y = yy;
- rotate_coordinate (0, 0, shape->bounds.x2, shape->bounds.y2, angle,
- &xx, &yy);
- points[2].x = xx;
- points[2].y = yy;
- rotate_coordinate (0, 0, 0, shape->bounds.y2, angle, &xx, &yy);
- points[3].x = xx;
- points[3].y = yy;
-
- x_min =
- MIN (MIN (points[0].x, points[1].x),
- MIN (points[2].x, points[3].x));
- x_max =
- MAX (MAX (points[0].x, points[1].x),
- MAX (points[2].x, points[3].x));
- y_min =
- MIN (MIN (points[0].y, points[1].y),
- MIN (points[2].y, points[3].y));
- y_max =
- MAX (MAX (points[0].y, points[1].y),
- MAX (points[2].y, points[3].y));
-
- x = xkb_to_pixmap_coord (drawing, origin_x + x_min) - 6;
- y = xkb_to_pixmap_coord (drawing, origin_y + y_min) - 6;
- width = xkb_to_pixmap_coord (drawing, x_max - x_min) + 12;
- height = xkb_to_pixmap_coord (drawing, y_max - y_min) + 12;
-
- gtk_widget_queue_draw_area (GTK_WIDGET (drawing), x, y, width,
- height);
-}
-
-static void
-invalidate_indicator_doodad_region (GkbdKeyboardDrawing * drawing,
- GkbdKeyboardDrawingDoodad * doodad)
-{
- if (!drawing->xkb)
- return;
-
- invalidate_region (drawing,
- doodad->angle,
- doodad->origin_x +
- doodad->doodad->indicator.left,
- doodad->origin_y +
- doodad->doodad->indicator.top,
- &drawing->xkb->geom->shapes[doodad->doodad->
- indicator.
- shape_ndx]);
-}
-
-static void
-invalidate_key_region (GkbdKeyboardDrawing * drawing,
- GkbdKeyboardDrawingKey * key)
-{
- if (!drawing->xkb)
- return;
-
- invalidate_region (drawing,
- key->angle,
- key->origin_x,
- key->origin_y,
- &drawing->xkb->geom->shapes[key->xkbkey->
- shape_ndx]);
-}
-
-static void
-draw_text_doodad (GkbdKeyboardDrawing * drawing,
- GkbdKeyboardDrawingDoodad * doodad,
- XkbTextDoodadRec * text_doodad)
-{
- gint x, y;
- if (!drawing->xkb)
- return;
-
- x = xkb_to_pixmap_coord (drawing,
- doodad->origin_x + text_doodad->left);
- y = xkb_to_pixmap_coord (drawing,
- doodad->origin_y + text_doodad->top);
-
- pango_layout_set_text (drawing->layout, text_doodad->text, -1);
- draw_pango_layout (drawing, doodad->angle, x, y, drawing->layout);
-}
-
-static void
-draw_indicator_doodad (GkbdKeyboardDrawing * drawing,
- GkbdKeyboardDrawingDoodad * doodad,
- XkbIndicatorDoodadRec * indicator_doodad)
-{
- GdkColor *color;
- XkbShapeRec *shape;
- gint i;
-
- if (!drawing->xkb)
- return;
-
- shape = drawing->xkb->geom->shapes + indicator_doodad->shape_ndx;
-
- color = drawing->colors + (doodad->on ?
- indicator_doodad->on_color_ndx :
- indicator_doodad->off_color_ndx);
-
- for (i = 0; i < 1; i++)
- draw_outline (drawing, shape->outlines + i, color,
- doodad->angle,
- doodad->origin_x + indicator_doodad->left,
- doodad->origin_y + indicator_doodad->top);
-}
-
-static void
-draw_shape_doodad (GkbdKeyboardDrawing * drawing,
- GkbdKeyboardDrawingDoodad * doodad,
- XkbShapeDoodadRec * shape_doodad)
-{
- XkbShapeRec *shape;
- GdkColor *color;
- gint i;
-
- if (!drawing->xkb)
- return;
-
- shape = drawing->xkb->geom->shapes + shape_doodad->shape_ndx;
- color = drawing->colors + shape_doodad->color_ndx;
-
- /* draw the primary outline filled */
- draw_outline (drawing, shape->primary ? shape->primary : shape->outlines,
- color, doodad->angle,
- doodad->origin_x + shape_doodad->left,
- doodad->origin_y + shape_doodad->top);
-
- /* stroke the other outlines */
- for (i = 0; i < shape->num_outlines; i++) {
- if (shape->outlines + i == shape->approx ||
- shape->outlines + i == shape->primary)
- continue;
- draw_outline (drawing, shape->outlines + i, NULL, doodad->angle,
- doodad->origin_x + shape_doodad->left,
- doodad->origin_y + shape_doodad->top);
- }
-}
-
-static void
-draw_doodad (GkbdKeyboardDrawing * drawing,
- GkbdKeyboardDrawingDoodad * doodad)
-{
- switch (doodad->doodad->any.type) {
- case XkbOutlineDoodad:
- case XkbSolidDoodad:
- draw_shape_doodad (drawing, doodad,
- &doodad->doodad->shape);
- break;
-
- case XkbTextDoodad:
- draw_text_doodad (drawing, doodad, &doodad->doodad->text);
- break;
-
- case XkbIndicatorDoodad:
- draw_indicator_doodad (drawing, doodad,
- &doodad->doodad->indicator);
- break;
-
- case XkbLogoDoodad:
- /* g_print ("draw_doodad: logo: %s\n", doodad->doodad->logo.logo_name); */
- /* XkbLogoDoodadRec is essentially a subclass of XkbShapeDoodadRec */
- draw_shape_doodad (drawing, doodad,
- &doodad->doodad->shape);
- break;
- }
-}
-
-static void
-draw_keyboard_item (GkbdKeyboardDrawingItem * item,
- GkbdKeyboardDrawing * drawing)
-{
- if (!drawing->xkb)
- return;
-
- switch (item->type) {
- case GKBD_KEYBOARD_DRAWING_ITEM_TYPE_KEY:
- draw_key (drawing, (GkbdKeyboardDrawingKey *) item);
- break;
-
- case GKBD_KEYBOARD_DRAWING_ITEM_TYPE_DOODAD:
- draw_doodad (drawing, (GkbdKeyboardDrawingDoodad *) item);
- break;
- }
-}
-
-static void
-draw_keyboard (GkbdKeyboardDrawing * drawing)
-{
- GtkStateType state = GTK_WIDGET_STATE (GTK_WIDGET (drawing));
- gint pixw, pixh;
-
- if (!drawing->xkb)
- return;
-
- pixw = GTK_WIDGET (drawing)->allocation.width;
- pixh = GTK_WIDGET (drawing)->allocation.height;
-
- drawing->pixmap =
- gdk_pixmap_new (GTK_WIDGET (drawing)->window, pixw, pixh, -1);
-
- /* blank background */
- gdk_draw_rectangle (drawing->pixmap,
- GTK_WIDGET (drawing)->style->base_gc[state],
- TRUE, 0, 0, pixw, pixh);
-
- if (drawing->xkb == NULL)
- return;
-
-#ifdef KBDRAW_DEBUG
- printf ("mods: %d\n", drawing->mods);
-#endif
-
- g_list_foreach (drawing->keyboard_items,
- (GFunc) draw_keyboard_item, drawing);
-}
-
-static void
-alloc_pango_layout (GkbdKeyboardDrawing * drawing)
-{
- PangoContext *context =
- gtk_widget_get_pango_context (GTK_WIDGET (drawing));
- drawing->layout = pango_layout_new (context);
- pango_layout_set_ellipsize (drawing->layout, PANGO_ELLIPSIZE_END);
-}
-
-static void
-free_pango_layout (GkbdKeyboardDrawing * drawing)
-{
- g_object_unref (G_OBJECT (drawing->layout));
- drawing->layout = NULL;
-}
-
-static gboolean
-expose_event (GtkWidget * widget,
- GdkEventExpose * event, GkbdKeyboardDrawing * drawing)
-{
- GtkStateType state = GTK_WIDGET_STATE (GTK_WIDGET (drawing));
-
- if (!drawing->xkb)
- return FALSE;
-
- if (drawing->pixmap == NULL)
- return FALSE;
-
- gdk_draw_drawable (widget->window,
- widget->style->fg_gc[state],
- drawing->pixmap,
- event->area.x, event->area.y,
- event->area.x, event->area.y,
- event->area.width, event->area.height);
-
- if (GTK_WIDGET_HAS_FOCUS (widget))
- gtk_paint_focus (widget->style, widget->window,
- GTK_WIDGET_STATE (widget), &event->area,
- widget, "keyboard-drawing",
- 0, 0,
- widget->allocation.width,
- widget->allocation.height);
-
- return FALSE;
-}
-
-static gboolean
-idle_redraw (gpointer user_data)
-{
- GkbdKeyboardDrawing *drawing = user_data;
-
- drawing->idle_redraw = 0;
- draw_keyboard (drawing);
- gtk_widget_queue_draw (GTK_WIDGET (drawing));
- return FALSE;
-}
-
-static void
-size_allocate (GtkWidget * widget,
- GtkAllocation * allocation, GkbdKeyboardDrawing * drawing)
-{
- if (!drawing->xkb)
- return;
-
- if (drawing->pixmap) {
- g_object_unref (drawing->pixmap);
- drawing->pixmap = NULL;
- }
-
- if (drawing->xkb->geom->width_mm <= 0
- || drawing->xkb->geom->height_mm <= 0) {
- g_critical
- ("keyboard geometry reports width or height as zero!");
- return;
- }
-
- if (allocation->width * drawing->xkb->geom->height_mm <
- allocation->height * drawing->xkb->geom->width_mm) {
- drawing->scale_numerator = allocation->width;
- drawing->scale_denominator = drawing->xkb->geom->width_mm;
- } else {
- drawing->scale_numerator = allocation->height;
- drawing->scale_denominator = drawing->xkb->geom->height_mm;
- }
-
- pango_font_description_set_size (drawing->font_desc,
- 36000 * drawing->scale_numerator /
- drawing->scale_denominator);
- pango_layout_set_spacing (drawing->layout,
- -8000 * drawing->scale_numerator /
- drawing->scale_denominator);
- pango_layout_set_font_description (drawing->layout,
- drawing->font_desc);
-
- if (!drawing->idle_redraw)
- drawing->idle_redraw = g_idle_add (idle_redraw, drawing);
-}
-
-static gint
-key_event (GtkWidget * widget,
- GdkEventKey * event, GkbdKeyboardDrawing * drawing)
-{
- GkbdKeyboardDrawingKey *key;
- if (!drawing->xkb)
- return FALSE;
-
- key = drawing->keys + event->hardware_keycode;
-
- if (event->hardware_keycode > drawing->xkb->max_key_code ||
- event->hardware_keycode < drawing->xkb->min_key_code ||
- key->xkbkey == NULL) {
- g_signal_emit (drawing,
- gkbd_keyboard_drawing_signals[BAD_KEYCODE],
- 0, event->hardware_keycode);
- return TRUE;
- }
-
- if ((event->type == GDK_KEY_PRESS && key->pressed) ||
- (event->type == GDK_KEY_RELEASE && !key->pressed))
- return TRUE;
- /* otherwise this event changes the state we believed we had before */
-
- key->pressed = (event->type == GDK_KEY_PRESS);
-
- draw_key (drawing, key);
-
- invalidate_key_region (drawing, key);
-
- return TRUE;
-}
-
-static gint
-button_press_event (GtkWidget * widget,
- GdkEventButton * event, GkbdKeyboardDrawing * drawing)
-{
- if (!drawing->xkb)
- return FALSE;
-
- gtk_widget_grab_focus (widget);
- return FALSE;
-}
-
-static gboolean
-unpress_keys (GkbdKeyboardDrawing * drawing)
-{
- gint i;
-
- if (!drawing->xkb)
- return FALSE;
-
- for (i = drawing->xkb->min_key_code;
- i <= drawing->xkb->max_key_code; i++)
- if (drawing->keys[i].pressed) {
- drawing->keys[i].pressed = FALSE;
- draw_key (drawing, drawing->keys + i);
- invalidate_key_region (drawing, drawing->keys + i);
- }
-
- return FALSE;
-}
-
-static gint
-focus_event (GtkWidget * widget,
- GdkEventFocus * event, GkbdKeyboardDrawing * drawing)
-{
- if (event->in && drawing->timeout > 0) {
- g_source_remove (drawing->timeout);
- drawing->timeout = 0;
- } else
- drawing->timeout =
- g_timeout_add (120, (GSourceFunc) unpress_keys,
- drawing);
-
- return FALSE;
-}
-
-static gint
-compare_keyboard_item_priorities (GkbdKeyboardDrawingItem * a,
- GkbdKeyboardDrawingItem * b)
-{
- if (a->priority > b->priority)
- return 1;
- else if (a->priority < b->priority)
- return -1;
- else
- return 0;
-}
-
-static void
-init_indicator_doodad (GkbdKeyboardDrawing * drawing,
- XkbDoodadRec * xkbdoodad,
- GkbdKeyboardDrawingDoodad * doodad)
-{
- if (!drawing->xkb)
- return;
-
- if (xkbdoodad->any.type == XkbIndicatorDoodad) {
- gint index;
- Atom iname = 0;
- Atom sname = xkbdoodad->indicator.name;
- unsigned long phys_indicators =
- drawing->xkb->indicators->phys_indicators;
- Atom *pind = drawing->xkb->names->indicators;
-
-#ifdef KBDRAW_DEBUG
- printf ("Looking for %d[%s]\n",
- (int) sname, XGetAtomName (drawing->display,
- sname));
-#endif
-
- for (index = 0; index < XkbNumIndicators; index++) {
- iname = *pind++;
- /* name matches and it is real */
- if (iname == sname
- && (phys_indicators & (1 << index)))
- break;
- if (iname == 0)
- break;
- }
- if (iname == 0)
- g_warning ("Could not find indicator %d [%s]\n",
- (int) sname,
- XGetAtomName (drawing->display, sname));
- else {
-#ifdef KBDRAW_DEBUG
- printf ("Found in xkbdesc as %d\n", index);
-#endif
- drawing->physical_indicators[index] = doodad;
- /* Trying to obtain the real state, but if fail - just assume OFF */
- if (!XkbGetNamedIndicator
- (drawing->display, sname, NULL, &doodad->on,
- NULL, NULL))
- doodad->on = 0;
- }
- }
-}
-
-static void
-init_keys_and_doodads (GkbdKeyboardDrawing * drawing)
-{
- gint i, j, k;
- gint x, y;
-
- if (!drawing->xkb)
- return;
-
- for (i = 0; i < drawing->xkb->geom->num_doodads; i++) {
- XkbDoodadRec *xkbdoodad = drawing->xkb->geom->doodads + i;
- GkbdKeyboardDrawingDoodad *doodad =
- g_new (GkbdKeyboardDrawingDoodad, 1);
-
- doodad->type = GKBD_KEYBOARD_DRAWING_ITEM_TYPE_DOODAD;
- doodad->origin_x = 0;
- doodad->origin_y = 0;
- doodad->angle = 0;
- doodad->priority = xkbdoodad->any.priority * 256 * 256;
- doodad->doodad = xkbdoodad;
-
- init_indicator_doodad (drawing, xkbdoodad, doodad);
-
- drawing->keyboard_items =
- g_list_append (drawing->keyboard_items, doodad);
- }
-
- for (i = 0; i < drawing->xkb->geom->num_sections; i++) {
-#ifdef KBDRAW_DEBUG
- printf ("initing section %d\n", i);
-#endif
- XkbSectionRec *section = drawing->xkb->geom->sections + i;
- guint priority;
-
- x = section->left;
- y = section->top;
- priority = section->priority * 256 * 256;
-
- for (j = 0; j < section->num_rows; j++) {
- XkbRowRec *row = section->rows + j;
-
-#ifdef KBDRAW_DEBUG
- printf (" initing row %d\n", j);
-#endif
- x = section->left + row->left;
- y = section->top + row->top;
-
- for (k = 0; k < row->num_keys; k++) {
- XkbKeyRec *xkbkey = row->keys + k;
- GkbdKeyboardDrawingKey *key;
- XkbShapeRec *shape =
- drawing->xkb->geom->shapes +
- xkbkey->shape_ndx;
- guint keycode = find_keycode (drawing,
- xkbkey->name.
- name);
-
-#ifdef KBDRAW_DEBUG
- printf
- (" initing key %d, shape: %p(%p + %d), code: %d\n",
- k, shape, drawing->xkb->geom->shapes,
- xkbkey->shape_ndx, keycode);
-#endif
- if (row->vertical)
- y += xkbkey->gap;
- else
- x += xkbkey->gap;
-
- if (keycode >= drawing->xkb->min_key_code
- && keycode <=
- drawing->xkb->max_key_code)
- key = drawing->keys + keycode;
- else {
- g_warning
- ("key %4.4s: keycode = %u; not in range %d..%d\n",
- xkbkey->name.name, keycode,
- drawing->xkb->min_key_code,
- drawing->xkb->max_key_code);
-
- key =
- g_new0 (GkbdKeyboardDrawingKey,
- 1);
- }
-
- key->type =
- GKBD_KEYBOARD_DRAWING_ITEM_TYPE_KEY;
- key->xkbkey = xkbkey;
- key->angle = section->angle;
- rotate_coordinate (section->left,
- section->top, x, y,
- section->angle,
- &key->origin_x,
- &key->origin_y);
- key->priority = priority;
- key->keycode = keycode;
-
- drawing->keyboard_items =
- g_list_append (drawing->keyboard_items,
- key);
-
- if (row->vertical)
- y += shape->bounds.y2;
- else
- x += shape->bounds.x2;
-
- priority++;
- }
- }
-
- for (j = 0; j < section->num_doodads; j++) {
- XkbDoodadRec *xkbdoodad = section->doodads + j;
- GkbdKeyboardDrawingDoodad *doodad =
- g_new (GkbdKeyboardDrawingDoodad, 1);
-
- doodad->type =
- GKBD_KEYBOARD_DRAWING_ITEM_TYPE_DOODAD;
- doodad->origin_x = x;
- doodad->origin_y = y;
- doodad->angle = section->angle;
- doodad->priority =
- priority + xkbdoodad->any.priority;
- doodad->doodad = xkbdoodad;
-
- init_indicator_doodad (drawing, xkbdoodad, doodad);
-
- drawing->keyboard_items =
- g_list_append (drawing->keyboard_items,
- doodad);
- }
- }
-
- drawing->keyboard_items = g_list_sort (drawing->keyboard_items,
- (GCompareFunc)
- compare_keyboard_item_priorities);
-}
-
-static void
-init_colors (GkbdKeyboardDrawing * drawing)
-{
- gboolean result;
- gint i;
-
- if (!drawing->xkb)
- return;
-
- drawing->colors = g_new (GdkColor, drawing->xkb->geom->num_colors);
-
- for (i = 0; i < drawing->xkb->geom->num_colors; i++) {
- result =
- parse_xkb_color_spec (drawing->xkb->geom->colors[i].
- spec, drawing->colors + i);
-
- if (!result)
- g_warning
- ("init_colors: unable to parse color %s\n",
- drawing->xkb->geom->colors[i].spec);
- }
-}
-
-static void
-free_cdik ( /*colors doodads indicators keys */
- GkbdKeyboardDrawing * drawing)
-{
- GList *itemp;
-
- if (!drawing->xkb)
- return;
-
- for (itemp = drawing->keyboard_items; itemp; itemp = itemp->next) {
- GkbdKeyboardDrawingItem *item = itemp->data;
- GkbdKeyboardDrawingKey *key;
-
- switch (item->type) {
- case GKBD_KEYBOARD_DRAWING_ITEM_TYPE_DOODAD:
- g_free (item);
- break;
-
- case GKBD_KEYBOARD_DRAWING_ITEM_TYPE_KEY:
- key = (GkbdKeyboardDrawingKey *) item;
- if (key->keycode < drawing->xkb->min_key_code ||
- key->keycode > drawing->xkb->max_key_code)
- g_free (key);
- /* otherwise it's part of the array */
- break;
- }
- }
-
- g_list_free (drawing->keyboard_items);
- drawing->keyboard_items = NULL;
-
- g_free (drawing->keys);
- g_free (drawing->colors);
-}
-
-static void
-alloc_cdik (GkbdKeyboardDrawing * drawing)
-{
- drawing->physical_indicators_size =
- drawing->xkb->indicators->phys_indicators + 1;
- drawing->physical_indicators =
- g_new0 (GkbdKeyboardDrawingDoodad *,
- drawing->physical_indicators_size);
- drawing->keys =
- g_new0 (GkbdKeyboardDrawingKey,
- drawing->xkb->max_key_code + 1);
-}
-
-static GdkFilterReturn
-xkb_state_notify_event_filter (GdkXEvent * gdkxev,
- GdkEvent * event,
- GkbdKeyboardDrawing * drawing)
-{
-#define group_change_mask (XkbGroupStateMask | XkbGroupBaseMask | XkbGroupLatchMask | XkbGroupLockMask)
-#define modifier_change_mask (XkbModifierStateMask | XkbModifierBaseMask | XkbModifierLatchMask | XkbModifierLockMask)
-
- if (!drawing->xkb)
- return GDK_FILTER_CONTINUE;
-
- if (((XEvent *) gdkxev)->type == drawing->xkb_event_type) {
- XkbEvent *kev = (XkbEvent *) gdkxev;
- switch (kev->any.xkb_type) {
- case XkbStateNotify:
- if (((kev->state.changed & modifier_change_mask) &&
- drawing->track_modifiers)) {
- free_cdik (drawing);
- if (drawing->track_modifiers)
- gkbd_keyboard_drawing_set_mods
- (drawing,
- kev->state.compat_state);
- drawing->keys =
- g_new0 (GkbdKeyboardDrawingKey,
- drawing->xkb->max_key_code +
- 1);
- size_allocate (GTK_WIDGET (drawing),
- &(GTK_WIDGET (drawing)->
- allocation), drawing);
-
- init_keys_and_doodads (drawing);
- init_colors (drawing);
- }
- break;
-
- case XkbIndicatorStateNotify:
- {
- /* Good question: should we track indicators when the keyboard is
- NOT really taken from the screen */
- XkbIndicatorNotifyEvent *iev =
- &((XkbEvent *) gdkxev)->indicators;
- gint i;
-
- for (i = 0;
- i <=
- drawing->xkb->indicators->
- phys_indicators; i++)
- if (drawing->
- physical_indicators[i] != NULL
- && (iev->changed & 1 << i)) {
- gint state =
- (iev->
- state & 1 << i) !=
- FALSE;
-
- if ((state
- && !drawing->
- physical_indicators
- [i]->on) || (!state
- &&
- drawing->
- physical_indicators
- [i]->
- on)) {
- drawing->
- physical_indicators
- [i]->on =
- state;
- draw_doodad
- (drawing,
- drawing->
- physical_indicators
- [i]);
- invalidate_indicator_doodad_region
- (drawing,
- drawing->
- physical_indicators
- [i]);
- }
- }
- }
- break;
-
- case XkbIndicatorMapNotify:
- case XkbControlsNotify:
- case XkbNamesNotify:
- case XkbNewKeyboardNotify:
- {
- XkbStateRec state;
- memset (&state, 0, sizeof (state));
- XkbGetState (drawing->display,
- XkbUseCoreKbd, &state);
- if (drawing->track_modifiers)
- gkbd_keyboard_drawing_set_mods
- (drawing, state.compat_state);
- if (drawing->track_config)
- gkbd_keyboard_drawing_set_keyboard
- (drawing, NULL);
- }
- break;
- }
- }
-
- return GDK_FILTER_CONTINUE;
-}
-
-static void
-destroy (GkbdKeyboardDrawing * drawing)
-{
- free_pango_layout (drawing);
- gdk_window_remove_filter (NULL, (GdkFilterFunc)
- xkb_state_notify_event_filter, drawing);
- if (drawing->timeout > 0) {
- g_source_remove (drawing->timeout);
- drawing->timeout = 0;
- }
- if (drawing->idle_redraw > 0) {
- g_source_remove (drawing->idle_redraw);
- drawing->idle_redraw = 0;
- }
-
- g_object_unref (drawing->pixmap);
-}
-
-static void
-style_changed (GkbdKeyboardDrawing * drawing)
-{
- pango_layout_context_changed (drawing->layout);
-}
-
-static void
-gkbd_keyboard_drawing_init (GkbdKeyboardDrawing * drawing)
-{
- gint opcode = 0, error = 0, major = 1, minor = 0;
- gint mask;
-
- drawing->display =
- GDK_DISPLAY_XDISPLAY (gdk_display_get_default ());
- printf ("dpy: %p\n", drawing->display);
-
- if (!XkbQueryExtension
- (drawing->display, &opcode, &drawing->xkb_event_type, &error,
- &major, &minor))
- g_critical
- ("XkbQueryExtension failed! Stuff probably won't work.");
-
- printf ("evt/error/major/minor: %d/%d/%d/%d\n",
- drawing->xkb_event_type, error, major, minor);
-
- /* XXX: this stuff probably doesn't matter.. also, gdk_screen_get_default can fail */
- if (gtk_widget_has_screen (GTK_WIDGET (drawing)))
- drawing->screen_num =
- gdk_screen_get_number (gtk_widget_get_screen
- (GTK_WIDGET (drawing)));
- else
- drawing->screen_num =
- gdk_screen_get_number (gdk_screen_get_default ());
-
- drawing->pixmap = NULL;
- alloc_pango_layout (drawing);
-
- drawing->font_desc =
- pango_font_description_copy (GTK_WIDGET (drawing)->style->
- font_desc);
- drawing->keyboard_items = NULL;
- drawing->colors = NULL;
- drawing->angle = 0;
- drawing->scale_numerator = 1;
- drawing->scale_denominator = 1;
-
- drawing->track_modifiers = 0;
- drawing->track_config = 0;
-
- gtk_widget_set_double_buffered (GTK_WIDGET (drawing), FALSE);
-
- /* XXX: XkbClientMapMask | XkbIndicatorMapMask | XkbNamesMask | XkbGeometryMask */
- drawing->xkb = XkbGetKeyboard (drawing->display,
- XkbGBN_GeometryMask |
- XkbGBN_KeyNamesMask |
- XkbGBN_OtherNamesMask |
- XkbGBN_SymbolsMask |
- XkbGBN_IndicatorMapMask,
- XkbUseCoreKbd);
- if (drawing->xkb == NULL) {
- g_critical
- ("XkbGetKeyboard failed to get keyboard from the server!");
- return;
- }
-
- XkbGetNames (drawing->display, XkbAllNamesMask, drawing->xkb);
- drawing->l3mod = XkbKeysymToModifiers (drawing->display,
- GDK_ISO_Level3_Shift);
-
- drawing->xkbOnDisplay = TRUE;
-
- alloc_cdik (drawing);
-
- XkbSelectEventDetails (drawing->display, XkbUseCoreKbd,
- XkbIndicatorStateNotify,
- drawing->xkb->indicators->phys_indicators,
- drawing->xkb->indicators->phys_indicators);
-
- mask =
- (XkbStateNotifyMask | XkbNamesNotifyMask |
- XkbControlsNotifyMask | XkbIndicatorMapNotifyMask |
- XkbNewKeyboardNotifyMask);
- XkbSelectEvents (drawing->display, XkbUseCoreKbd, mask, mask);
-
- mask = XkbGroupStateMask | XkbModifierStateMask;
- XkbSelectEventDetails (drawing->display, XkbUseCoreKbd,
- XkbStateNotify, mask, mask);
-
- mask = (XkbGroupNamesMask | XkbIndicatorNamesMask);
- XkbSelectEventDetails (drawing->display, XkbUseCoreKbd,
- XkbNamesNotify, mask, mask);
- init_keys_and_doodads (drawing);
- init_colors (drawing);
-
- /* required to get key events */
- GTK_WIDGET_SET_FLAGS (GTK_WIDGET (drawing), GTK_CAN_FOCUS);
-
- gtk_widget_set_events (GTK_WIDGET (drawing),
- GDK_EXPOSURE_MASK | GDK_KEY_PRESS_MASK |
- GDK_KEY_RELEASE_MASK | GDK_BUTTON_PRESS_MASK
- | GDK_FOCUS_CHANGE_MASK);
- g_signal_connect (G_OBJECT (drawing), "expose-event",
- G_CALLBACK (expose_event), drawing);
- g_signal_connect (G_OBJECT (drawing), "key-press-event",
- G_CALLBACK (key_event), drawing);
- g_signal_connect (G_OBJECT (drawing), "key-release-event",
- G_CALLBACK (key_event), drawing);
- g_signal_connect (G_OBJECT (drawing), "button-press-event",
- G_CALLBACK (button_press_event), drawing);
- g_signal_connect (G_OBJECT (drawing), "focus-out-event",
- G_CALLBACK (focus_event), drawing);
- g_signal_connect (G_OBJECT (drawing), "focus-in-event",
- G_CALLBACK (focus_event), drawing);
- g_signal_connect (G_OBJECT (drawing), "size-allocate",
- G_CALLBACK (size_allocate), drawing);
- g_signal_connect (G_OBJECT (drawing), "destroy",
- G_CALLBACK (destroy), drawing);
- g_signal_connect (G_OBJECT (drawing), "style-set",
- G_CALLBACK (style_changed), drawing);
-
- gdk_window_add_filter (NULL, (GdkFilterFunc)
- xkb_state_notify_event_filter, drawing);
-}
-
-GtkWidget *
-gkbd_keyboard_drawing_new (void)
-{
- return
- GTK_WIDGET (g_object_new
- (gkbd_keyboard_drawing_get_type (), NULL));
-}
-
-static void
-gkbd_keyboard_drawing_class_init (GkbdKeyboardDrawingClass * klass)
-{
- klass->bad_keycode = NULL;
-
- gkbd_keyboard_drawing_signals[BAD_KEYCODE] =
- g_signal_new ("bad-keycode", gkbd_keyboard_drawing_get_type (),
- G_SIGNAL_RUN_FIRST,
- G_STRUCT_OFFSET (GkbdKeyboardDrawingClass,
- bad_keycode), NULL, NULL,
- gkbd_keyboard_drawing_VOID__UINT, G_TYPE_NONE, 1,
- G_TYPE_UINT);
-}
-
-GType
-gkbd_keyboard_drawing_get_type (void)
-{
- static GType gkbd_keyboard_drawing_type = 0;
-
- if (!gkbd_keyboard_drawing_type) {
- static const GTypeInfo gkbd_keyboard_drawing_info = {
- sizeof (GkbdKeyboardDrawingClass),
- NULL, /* base_init */
- NULL, /* base_finalize */
- (GClassInitFunc) gkbd_keyboard_drawing_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (GkbdKeyboardDrawing),
- 0, /* n_preallocs */
- (GInstanceInitFunc) gkbd_keyboard_drawing_init,
- };
-
- gkbd_keyboard_drawing_type =
- g_type_register_static (GTK_TYPE_DRAWING_AREA,
- "GkbdKeyboardDrawing",
- &gkbd_keyboard_drawing_info,
- 0);
- }
-
- return gkbd_keyboard_drawing_type;
-}
-
-void
-gkbd_keyboard_drawing_set_mods (GkbdKeyboardDrawing * drawing, guint mods)
-{
-#ifdef KBDRAW_DEBUG
- printf ("set_mods: %d\n", mods);
-#endif
- if (mods != drawing->mods) {
- drawing->mods = mods;
- gtk_widget_queue_draw (GTK_WIDGET (drawing));
- }
-}
-
-/* returns a pixbuf with the keyboard drawing at the current pixel size
- * (which can then be saved to disk, etc) */
-GdkPixbuf *
-gkbd_keyboard_drawing_get_pixbuf (GkbdKeyboardDrawing * drawing)
-{
- if (drawing->pixmap == NULL)
- draw_keyboard (drawing);
-
- return gdk_pixbuf_get_from_drawable (NULL, drawing->pixmap, NULL,
- 0, 0, 0, 0,
- xkb_to_pixmap_coord (drawing,
- drawing->
- xkb->
- geom->
- width_mm),
- xkb_to_pixmap_coord (drawing,
- drawing->
- xkb->
- geom->
- height_mm));
-}
-
-gboolean
-gkbd_keyboard_drawing_set_keyboard (GkbdKeyboardDrawing * drawing,
- XkbComponentNamesRec * names)
-{
- free_cdik (drawing);
- if (drawing->xkb)
- XkbFreeKeyboard (drawing->xkb, 0, TRUE); /* free_all = TRUE */
- drawing->xkb = NULL;
-
- if (names) {
- drawing->xkb =
- XkbGetKeyboardByName (drawing->display, XkbUseCoreKbd,
- names, 0,
- XkbGBN_GeometryMask |
- XkbGBN_KeyNamesMask |
- XkbGBN_OtherNamesMask |
- XkbGBN_ClientSymbolsMask |
- XkbGBN_IndicatorMapMask, FALSE);
- drawing->xkbOnDisplay = FALSE;
- } else {
- drawing->xkb = XkbGetKeyboard (drawing->display,
- XkbGBN_GeometryMask |
- XkbGBN_KeyNamesMask |
- XkbGBN_OtherNamesMask |
- XkbGBN_SymbolsMask |
- XkbGBN_IndicatorMapMask,
- XkbUseCoreKbd);
- XkbGetNames (drawing->display, XkbAllNamesMask,
- drawing->xkb);
- drawing->xkbOnDisplay = TRUE;
- }
-
- if (drawing->xkb == NULL)
- return FALSE;
-
- alloc_cdik (drawing);
-
- init_keys_and_doodads (drawing);
- init_colors (drawing);
-
- size_allocate (GTK_WIDGET (drawing),
- &(GTK_WIDGET (drawing)->allocation), drawing);
- gtk_widget_queue_draw (GTK_WIDGET (drawing));
-
- return TRUE;
-}
-
-G_CONST_RETURN gchar *
-gkbd_keyboard_drawing_get_keycodes (GkbdKeyboardDrawing * drawing)
-{
- if (!drawing->xkb || drawing->xkb->names->keycodes <= 0)
- return NULL;
- else
- return XGetAtomName (drawing->display,
- drawing->xkb->names->keycodes);
-}
-
-G_CONST_RETURN gchar *
-gkbd_keyboard_drawing_get_geometry (GkbdKeyboardDrawing * drawing)
-{
- if (!drawing->xkb || drawing->xkb->names->geometry <= 0)
- return NULL;
- else
- return XGetAtomName (drawing->display,
- drawing->xkb->names->geometry);
-}
-
-G_CONST_RETURN gchar *
-gkbd_keyboard_drawing_get_symbols (GkbdKeyboardDrawing * drawing)
-{
- if (!drawing->xkb || drawing->xkb->names->symbols <= 0)
- return NULL;
- else
- return XGetAtomName (drawing->display,
- drawing->xkb->names->symbols);
-}
-
-G_CONST_RETURN gchar *
-gkbd_keyboard_drawing_get_types (GkbdKeyboardDrawing * drawing)
-{
- if (!drawing->xkb || drawing->xkb->names->types <= 0)
- return NULL;
- else
- return XGetAtomName (drawing->display,
- drawing->xkb->names->types);
-}
-
-G_CONST_RETURN gchar *
-gkbd_keyboard_drawing_get_compat (GkbdKeyboardDrawing * drawing)
-{
- if (!drawing->xkb || drawing->xkb->names->compat <= 0)
- return NULL;
- else
- return XGetAtomName (drawing->display,
- drawing->xkb->names->compat);
-}
-
-void
-gkbd_keyboard_drawing_set_track_modifiers (GkbdKeyboardDrawing * drawing,
- gboolean enable)
-{
- if (enable) {
- XkbStateRec state;
- drawing->track_modifiers = 1;
- memset (&state, 0, sizeof (state));
- XkbGetState (drawing->display, XkbUseCoreKbd, &state);
- gkbd_keyboard_drawing_set_mods (drawing,
- state.compat_state);
- } else
- drawing->track_modifiers = 0;
-}
-
-void
-gkbd_keyboard_drawing_set_track_config (GkbdKeyboardDrawing * drawing,
- gboolean enable)
-{
- if (enable)
- drawing->track_config = 1;
- else
- drawing->track_config = 0;
-}
-
-void
-gkbd_keyboard_drawing_set_groups_levels (GkbdKeyboardDrawing * drawing,
- GkbdKeyboardDrawingGroupLevel *
- groupLevels[])
-{
-#ifdef KBDRAW_DEBUG
- printf ("set_group_levels [topLeft]: %d %d \n",
- groupLevels[GKBD_KEYBOARD_DRAWING_POS_TOPLEFT]->group,
- groupLevels[GKBD_KEYBOARD_DRAWING_POS_TOPLEFT]->level);
- printf ("set_group_levels [topRight]: %d %d \n",
- groupLevels[GKBD_KEYBOARD_DRAWING_POS_TOPRIGHT]->group,
- groupLevels[GKBD_KEYBOARD_DRAWING_POS_TOPRIGHT]->level);
- printf ("set_group_levels [bottomLeft]: %d %d \n",
- groupLevels[GKBD_KEYBOARD_DRAWING_POS_BOTTOMLEFT]->group,
- groupLevels[GKBD_KEYBOARD_DRAWING_POS_BOTTOMLEFT]->level);
- printf ("set_group_levels [bottomRight]: %d %d \n",
- groupLevels[GKBD_KEYBOARD_DRAWING_POS_BOTTOMRIGHT]->group,
- groupLevels[GKBD_KEYBOARD_DRAWING_POS_BOTTOMRIGHT]->level);
-#endif
- drawing->groupLevels = groupLevels;
-
- gtk_widget_queue_draw (GTK_WIDGET (drawing));
-}
diff --git a/trunk/libgnomekbd/gkbd-keyboard-drawing.h b/trunk/libgnomekbd/gkbd-keyboard-drawing.h
deleted file mode 100644
index 2fd4a89..0000000
--- a/trunk/libgnomekbd/gkbd-keyboard-drawing.h
+++ /dev/null
@@ -1,188 +0,0 @@
-/*
- * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef GKBD_KEYBOARD_DRAWING_H
-#define GKBD_KEYBOARD_DRAWING_H 1
-
-#include <gtk/gtk.h>
-#include <X11/XKBlib.h>
-#include <X11/extensions/XKBgeom.h>
-
-G_BEGIN_DECLS
-#define GKBD_KEYBOARD_DRAWING(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), gkbd_keyboard_drawing_get_type (), \
- GkbdKeyboardDrawing))
-#define GKBD_KEYBOARD_DRAWING_CLASS(clazz) (G_TYPE_CHECK_CLASS_CAST ((clazz), gkbd_keyboard_drawing_get_type () \
- GkbdKeyboardDrawingClass))
-#define GKBD_IS_KEYBOARD_DRAWING(obj) G_TYPE_CHECK_INSTANCE_TYPE ((obj), gkbd_keyboard_drawing_get_type ())
-typedef struct _GkbdKeyboardDrawing GkbdKeyboardDrawing;
-typedef struct _GkbdKeyboardDrawingClass GkbdKeyboardDrawingClass;
-
-typedef struct _GkbdKeyboardDrawingItem GkbdKeyboardDrawingItem;
-typedef struct _GkbdKeyboardDrawingKey GkbdKeyboardDrawingKey;
-typedef struct _GkbdKeyboardDrawingDoodad GkbdKeyboardDrawingDoodad;
-typedef struct _GkbdKeyboardDrawingGroupLevel
- GkbdKeyboardDrawingGroupLevel;
-
-typedef enum {
- GKBD_KEYBOARD_DRAWING_ITEM_TYPE_KEY,
- GKBD_KEYBOARD_DRAWING_ITEM_TYPE_DOODAD
-} GkbdKeyboardDrawingItemType;
-
-typedef enum {
- GKBD_KEYBOARD_DRAWING_POS_TOPLEFT,
- GKBD_KEYBOARD_DRAWING_POS_TOPRIGHT,
- GKBD_KEYBOARD_DRAWING_POS_BOTTOMLEFT,
- GKBD_KEYBOARD_DRAWING_POS_BOTTOMRIGHT,
- GKBD_KEYBOARD_DRAWING_POS_TOTAL,
- GKBD_KEYBOARD_DRAWING_POS_FIRST =
- GKBD_KEYBOARD_DRAWING_POS_TOPLEFT,
- GKBD_KEYBOARD_DRAWING_POS_LAST =
- GKBD_KEYBOARD_DRAWING_POS_BOTTOMRIGHT,
-} GkbdKeyboardDrawingGroupLevelPosition;
-
-/* units are in xkb form */
-struct _GkbdKeyboardDrawingItem {
- /*< private > */
-
- GkbdKeyboardDrawingItemType type;
- gint origin_x;
- gint origin_y;
- gint angle;
- guint priority;
-};
-
-/* units are in xkb form */
-struct _GkbdKeyboardDrawingKey {
- /*< private > */
-
- GkbdKeyboardDrawingItemType type;
- gint origin_x;
- gint origin_y;
- gint angle;
- guint priority;
-
- XkbKeyRec *xkbkey;
- gboolean pressed;
- guint keycode;
-};
-
-/* units are in xkb form */
-struct _GkbdKeyboardDrawingDoodad {
- /*< private > */
-
- GkbdKeyboardDrawingItemType type;
- gint origin_x;
- gint origin_y;
- gint angle;
- guint priority;
-
- XkbDoodadRec *doodad;
- gboolean on; /* for indicator doodads */
-};
-
-struct _GkbdKeyboardDrawingGroupLevel {
- gint group;
- gint level;
-};
-
-struct _GkbdKeyboardDrawing {
- /*< private > */
-
- GtkDrawingArea parent;
-
- GdkPixmap *pixmap;
- XkbDescRec *xkb;
- gboolean xkbOnDisplay;
- guint l3mod;
-
- gint angle; /* current angle pango is set to draw at, in tenths of a degree */
- PangoLayout *layout;
- PangoFontDescription *font_desc;
-
- gint scale_numerator;
- gint scale_denominator;
-
- GkbdKeyboardDrawingKey *keys;
-
- /* list of stuff to draw in priority order */
- GList *keyboard_items;
-
- GdkColor *colors;
-
- guint timeout;
- guint idle_redraw;
-
- GkbdKeyboardDrawingGroupLevel **groupLevels;
-
- guint mods;
-
- Display *display;
- gint screen_num;
-
- gint xkb_event_type;
-
- GkbdKeyboardDrawingDoodad **physical_indicators;
- gint physical_indicators_size;
-
- guint track_config:1;
- guint track_modifiers:1;
-};
-
-struct _GkbdKeyboardDrawingClass {
- GtkDrawingAreaClass parent_class;
-
- /* we send this signal when the user presses a key that "doesn't exist"
- * according to the keyboard geometry; it probably means their xkb
- * configuration is incorrect */
- void (*bad_keycode) (GkbdKeyboardDrawing * drawing, guint keycode);
-};
-
-GType gkbd_keyboard_drawing_get_type (void);
-GtkWidget *gkbd_keyboard_drawing_new (void);
-
-GdkPixbuf *gkbd_keyboard_drawing_get_pixbuf (GkbdKeyboardDrawing *
- kbdrawing);
-gboolean gkbd_keyboard_drawing_set_keyboard (GkbdKeyboardDrawing *
- kbdrawing,
- XkbComponentNamesRec * names);
-
-G_CONST_RETURN gchar
- * gkbd_keyboard_drawing_get_keycodes (GkbdKeyboardDrawing * kbdrawing);
-G_CONST_RETURN gchar
- * gkbd_keyboard_drawing_get_geometry (GkbdKeyboardDrawing * kbdrawing);
-G_CONST_RETURN gchar
- * gkbd_keyboard_drawing_get_symbols (GkbdKeyboardDrawing * kbdrawing);
-G_CONST_RETURN gchar *gkbd_keyboard_drawing_get_types (GkbdKeyboardDrawing
- * kbdrawing);
-G_CONST_RETURN gchar *gkbd_keyboard_drawing_get_compat (GkbdKeyboardDrawing
- * kbdrawing);
-
-void gkbd_keyboard_drawing_set_track_modifiers (GkbdKeyboardDrawing *
- kbdrawing,
- gboolean enable);
-void gkbd_keyboard_drawing_set_track_config (GkbdKeyboardDrawing *
- kbdrawing, gboolean enable);
-
-void gkbd_keyboard_drawing_set_groups_levels (GkbdKeyboardDrawing *
- kbdrawing,
- GkbdKeyboardDrawingGroupLevel
- * groupLevels[]);
-
-G_END_DECLS
-#endif /* #ifndef GKBD_KEYBOARD_DRAWING_H */
diff --git a/trunk/libgnomekbd/gkbd-util.c b/trunk/libgnomekbd/gkbd-util.c
deleted file mode 100644
index d7779b7..0000000
--- a/trunk/libgnomekbd/gkbd-util.c
+++ /dev/null
@@ -1,151 +0,0 @@
-/*
- * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#include <config.h>
-
-#include <gkbd-util.h>
-
-#include <time.h>
-
-#include <glib/gi18n.h>
-
-#include <libxklavier/xklavier.h>
-
-#include <gconf/gconf-client.h>
-
-#include <gkbd-config-private.h>
-
-static void
-gkbd_log_appender (const char file[], const char function[],
- int level, const char format[], va_list args)
-{
- time_t now = time (NULL);
- g_log (NULL, G_LOG_LEVEL_DEBUG, "[%08ld,%03d,%s:%s/] \t",
- (long) now, level, file, function);
- g_logv (NULL, G_LOG_LEVEL_DEBUG, format, args);
-}
-
-void
-gkbd_install_glib_log_appender (void)
-{
- xkl_set_log_appender (gkbd_log_appender);
-}
-
-#define GKBD_PREVIEW_CONFIG_KEY_PREFIX GKBD_CONFIG_KEY_PREFIX "/preview"
-
-const gchar GKBD_PREVIEW_CONFIG_DIR[] = GKBD_PREVIEW_CONFIG_KEY_PREFIX;
-const gchar GKBD_PREVIEW_CONFIG_KEY_X[] =
- GKBD_PREVIEW_CONFIG_KEY_PREFIX "/x";
-const gchar GKBD_PREVIEW_CONFIG_KEY_Y[] =
- GKBD_PREVIEW_CONFIG_KEY_PREFIX "/y";
-const gchar GKBD_PREVIEW_CONFIG_KEY_WIDTH[] =
- GKBD_PREVIEW_CONFIG_KEY_PREFIX "/width";
-const gchar GKBD_PREVIEW_CONFIG_KEY_HEIGHT[] =
- GKBD_PREVIEW_CONFIG_KEY_PREFIX "/height";
-
-GdkRectangle *
-gkbd_preview_load_position (void)
-{
- GError *gerror = NULL;
- GdkRectangle *rv = NULL;
- gint x, y, w, h;
- GConfClient *conf_client = gconf_client_get_default ();
-
- if (conf_client == NULL)
- return NULL;
-
- x = gconf_client_get_int (conf_client,
- GKBD_PREVIEW_CONFIG_KEY_X, &gerror);
- if (gerror != NULL) {
- xkl_debug (0, "Error getting the preview x: %s\n",
- gerror->message);
- g_error_free (gerror);
- g_object_unref (G_OBJECT (conf_client));
- return NULL;
- }
-
- y = gconf_client_get_int (conf_client,
- GKBD_PREVIEW_CONFIG_KEY_Y, &gerror);
- if (gerror != NULL) {
- xkl_debug (0, "Error getting the preview y: %s\n",
- gerror->message);
- g_error_free (gerror);
- g_object_unref (G_OBJECT (conf_client));
- return NULL;
- }
-
- w = gconf_client_get_int (conf_client,
- GKBD_PREVIEW_CONFIG_KEY_WIDTH, &gerror);
- if (gerror != NULL) {
- xkl_debug (0, "Error getting the preview width: %s\n",
- gerror->message);
- g_error_free (gerror);
- g_object_unref (G_OBJECT (conf_client));
- return NULL;
- }
-
- h = gconf_client_get_int (conf_client,
- GKBD_PREVIEW_CONFIG_KEY_HEIGHT, &gerror);
- if (gerror != NULL) {
- xkl_debug (0, "Error getting the preview height: %s\n",
- gerror->message);
- g_error_free (gerror);
- g_object_unref (G_OBJECT (conf_client));
- return NULL;
- }
-
- g_object_unref (G_OBJECT (conf_client));
-
- // default values should be just ignored
- if (x == -1 || y == -1 || w == -1 || h == -1)
- return NULL;
-
- rv = g_new (GdkRectangle, 1);
- rv->x = x;
- rv->y = y;
- rv->width = w;
- rv->height = h;
- return rv;
-}
-
-void
-gkbd_preview_save_position (GdkRectangle * rect)
-{
- GConfClient *conf_client = gconf_client_get_default ();
- GConfChangeSet *cs;
- GError *gerror = NULL;
-
- cs = gconf_change_set_new ();
-
- gconf_change_set_set_int (cs, GKBD_PREVIEW_CONFIG_KEY_X, rect->x);
- gconf_change_set_set_int (cs, GKBD_PREVIEW_CONFIG_KEY_Y, rect->y);
- gconf_change_set_set_int (cs, GKBD_PREVIEW_CONFIG_KEY_WIDTH,
- rect->width);
- gconf_change_set_set_int (cs, GKBD_PREVIEW_CONFIG_KEY_HEIGHT,
- rect->height);
-
- gconf_client_commit_change_set (conf_client, cs, TRUE, &gerror);
- if (gerror != NULL) {
- g_warning ("Error saving preview configuration: %s\n",
- gerror->message);
- g_error_free (gerror);
- }
- gconf_change_set_unref (cs);
- g_object_unref (G_OBJECT (conf_client));
-}
diff --git a/trunk/libgnomekbd/gkbd-util.h b/trunk/libgnomekbd/gkbd-util.h
deleted file mode 100644
index 88d98e9..0000000
--- a/trunk/libgnomekbd/gkbd-util.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef __GKBD_UTIL_H__
-#define __GKBD_UTIL_H__
-
-#include <glib.h>
-#include <gdk/gdk.h>
-
-extern void gkbd_install_glib_log_appender (void);
-
-extern GdkRectangle *gkbd_preview_load_position (void);
-
-extern void gkbd_preview_save_position (GdkRectangle * rect);
-
-
-#endif
diff --git a/trunk/libgnomekbdui.pc.in b/trunk/libgnomekbdui.pc.in
deleted file mode 100644
index 9d9ab0a..0000000
--- a/trunk/libgnomekbdui.pc.in
+++ /dev/null
@@ -1,10 +0,0 @@
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-libdir=@libdir@
-includedir=@includedir@
-
-Name: libgnomekbd
-Description: GNOME keyboard shared library
-Version: @VERSION@
-Libs: -L${libdir} -lgnomekbd -lgnomekbdui @GDK_LIBS@ @GCONF_LIBS@ @LIBGNOME_LIBS@ @LIBXKLAVIER_LIBS@ @DBUS_LIBS@ @LIBGNOMEUI_LIBS@
-Cflags: -I${includedir}
diff --git a/trunk/m4/intltool.m4 b/trunk/m4/intltool.m4
deleted file mode 100644
index 26b47fe..0000000
--- a/trunk/m4/intltool.m4
+++ /dev/null
@@ -1,204 +0,0 @@
-## intltool.m4 - Configure intltool for the target system. -*-Shell-script-*-
-## Copyright (C) 2001 Eazel, Inc.
-## Author: Maciej Stachowiak <mjs@noisehavoc.org>
-## Kenneth Christiansen <kenneth@gnu.org>
-##
-## This program is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## This program is distributed in the hope that it will be useful, but
-## WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-## General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with this program; if not, write to the Free Software
-## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-##
-## As a special exception to the GNU General Public License, if you
-## distribute this file as part of a program that contains a
-## configuration script generated by Autoconf, you may include it under
-## the same distribution terms that you use for the rest of that program.
-
-dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
-# serial 35 IT_PROG_INTLTOOL
-AC_DEFUN([IT_PROG_INTLTOOL],
-[AC_PREREQ([2.50])dnl
-
-case "$am__api_version" in
- 1.[01234])
- AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
- ;;
- *)
- ;;
-esac
-
-if test -n "$1"; then
- AC_MSG_CHECKING(for intltool >= $1)
-
- INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
- INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { print $ 2; }' ${ac_aux_dir}/intltool-update.in`
- [INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split($ 2, VERSION, "."); print VERSION[1] * 1000 + VERSION[2] * 100 + VERSION[3];}' ${ac_aux_dir}/intltool-update.in`
- ]
- AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
- test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
- AC_MSG_ERROR([Your intltool is too old. You need intltool $1 or later.])
-fi
-
- INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
-INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
- INTLTOOL_KEYS_RULE='%.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
- INTLTOOL_PROP_RULE='%.prop: %.prop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
- INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@'
- INTLTOOL_PONG_RULE='%.pong: %.pong.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
- INTLTOOL_SERVER_RULE='%.server: %.server.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
- INTLTOOL_SHEET_RULE='%.sheet: %.sheet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
-INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
- INTLTOOL_UI_RULE='%.ui: %.ui.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
- INTLTOOL_XML_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
- INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@'
- INTLTOOL_XAM_RULE='%.xam: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
- INTLTOOL_KBD_RULE='%.kbd: %.kbd.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
- INTLTOOL_CAVES_RULE='%.caves: %.caves.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
- INTLTOOL_SCHEMAS_RULE='%.schemas: %.schemas.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
- INTLTOOL_THEME_RULE='%.theme: %.theme.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
- INTLTOOL_SERVICE_RULE='%.service: %.service.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
-
-AC_SUBST(INTLTOOL_DESKTOP_RULE)
-AC_SUBST(INTLTOOL_DIRECTORY_RULE)
-AC_SUBST(INTLTOOL_KEYS_RULE)
-AC_SUBST(INTLTOOL_PROP_RULE)
-AC_SUBST(INTLTOOL_OAF_RULE)
-AC_SUBST(INTLTOOL_PONG_RULE)
-AC_SUBST(INTLTOOL_SERVER_RULE)
-AC_SUBST(INTLTOOL_SHEET_RULE)
-AC_SUBST(INTLTOOL_SOUNDLIST_RULE)
-AC_SUBST(INTLTOOL_UI_RULE)
-AC_SUBST(INTLTOOL_XAM_RULE)
-AC_SUBST(INTLTOOL_KBD_RULE)
-AC_SUBST(INTLTOOL_XML_RULE)
-AC_SUBST(INTLTOOL_XML_NOMERGE_RULE)
-AC_SUBST(INTLTOOL_CAVES_RULE)
-AC_SUBST(INTLTOOL_SCHEMAS_RULE)
-AC_SUBST(INTLTOOL_THEME_RULE)
-AC_SUBST(INTLTOOL_SERVICE_RULE)
-
-# Use the tools built into the package, not the ones that are installed.
-AC_SUBST(INTLTOOL_EXTRACT, '$(top_builddir)/intltool-extract')
-AC_SUBST(INTLTOOL_MERGE, '$(top_builddir)/intltool-merge')
-AC_SUBST(INTLTOOL_UPDATE, '$(top_builddir)/intltool-update')
-
-AC_PATH_PROG(INTLTOOL_PERL, perl)
-if test -z "$INTLTOOL_PERL"; then
- AC_MSG_ERROR([perl not found; required for intltool])
-fi
-if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then
- AC_MSG_ERROR([perl 5.x required for intltool])
-fi
-if test "x$2" != "xno-xml"; then
- AC_MSG_CHECKING([for XML::Parser])
- if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
- AC_MSG_RESULT([ok])
- else
- AC_MSG_ERROR([XML::Parser perl module is required for intltool])
- fi
-fi
-
-AC_PATH_PROG(INTLTOOL_ICONV, iconv, iconv)
-AC_PATH_PROG(INTLTOOL_MSGFMT, msgfmt, msgfmt)
-AC_PATH_PROG(INTLTOOL_MSGMERGE, msgmerge, msgmerge)
-AC_PATH_PROG(INTLTOOL_XGETTEXT, xgettext, xgettext)
-
-# Substitute ALL_LINGUAS so we can use it in po/Makefile
-AC_SUBST(ALL_LINGUAS)
-
-IT_PO_SUBDIR([po])
-
-dnl The following is very similar to
-dnl
-dnl AC_CONFIG_FILES([intltool-extract intltool-merge intltool-update])
-dnl
-dnl with the following slight differences:
-dnl - the *.in files are in ac_aux_dir,
-dnl - if the file haven't changed upon reconfigure, it's not touched,
-dnl - the evaluation of the third parameter enables a hack which computes
-dnl the actual value of $libdir,
-dnl - the user sees "executing intltool commands", instead of
-dnl "creating intltool-extract" and such.
-dnl
-dnl Nothing crucial here, and we could use AC_CONFIG_FILES, if there were
-dnl a reason for it.
-
-AC_CONFIG_COMMANDS([intltool], [
-
-for file in intltool-extract intltool-merge intltool-update; do
- sed -e "s|@INTLTOOL_EXTRACT@|`pwd`/intltool-extract|g" \
- -e "s|@INTLTOOL_LIBDIR@|${INTLTOOL_LIBDIR}|g" \
- -e "s|@INTLTOOL_ICONV@|${INTLTOOL_ICONV}|g" \
- -e "s|@INTLTOOL_MSGFMT@|${INTLTOOL_MSGFMT}|g" \
- -e "s|@INTLTOOL_MSGMERGE@|${INTLTOOL_MSGMERGE}|g" \
- -e "s|@INTLTOOL_XGETTEXT@|${INTLTOOL_XGETTEXT}|g" \
- -e "s|@INTLTOOL_PERL@|${INTLTOOL_PERL}|g" \
- < ${ac_aux_dir}/${file}.in > ${file}.out
- if cmp -s ${file} ${file}.out 2>/dev/null; then
- rm -f ${file}.out
- else
- mv -f ${file}.out ${file}
- fi
- chmod ugo+x ${file}
- chmod u+w ${file}
-done
-
-],
-[INTLTOOL_PERL='${INTLTOOL_PERL}' ac_aux_dir='${ac_aux_dir}'
-prefix="$prefix" exec_prefix="$exec_prefix" INTLTOOL_LIBDIR="$libdir"
-INTLTOOL_EXTRACT='${INTLTOOL_EXTRACT}' INTLTOOL_ICONV='${INTLTOOL_ICONV}'
-INTLTOOL_MSGFMT='${INTLTOOL_MSGFMT}' INTLTOOL_MSGMERGE='${INTLTOOL_MSGMERGE}'
-INTLTOOL_XGETTEXT='${INTLTOOL_XGETTEXT}'])
-
-])
-
-
-# IT_PO_SUBDIR(DIRNAME)
-# ---------------------
-# All po subdirs have to be declared with this macro; the subdir "po" is
-# declared by IT_PROG_INTLTOOL.
-#
-AC_DEFUN([IT_PO_SUBDIR],
-[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
-dnl
-dnl The following CONFIG_COMMANDS should be exetuted at the very end
-dnl of config.status.
-AC_CONFIG_COMMANDS_PRE([
- AC_CONFIG_COMMANDS([$1/stamp-it], [
- rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
- >"$1/stamp-it.tmp"
- [sed '/^#/d
- s/^[[].*] *//
- /^[ ]*$/d
- '"s|^| $ac_top_srcdir/|" \
- "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
- ]
- if test ! -f "$1/Makefile"; then
- AC_MSG_ERROR([$1/Makefile is not ready.])
- fi
- mv "$1/Makefile" "$1/Makefile.tmp"
- [sed '/^POTFILES =/,/[^\\]$/ {
- /^POTFILES =/!d
- r $1/POTFILES
- }
- ' "$1/Makefile.tmp" >"$1/Makefile"]
- rm -f "$1/Makefile.tmp"
- mv "$1/stamp-it.tmp" "$1/stamp-it"
- ])
-])dnl
-])
-
-
-# deprecated macros
-AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
-# A hint is needed for aclocal from Automake <= 1.9.4:
-# AC_DEFUN([AC_PROG_INTLTOOL], ...)
-
diff --git a/trunk/po/.cvsignore b/trunk/po/.cvsignore
deleted file mode 100644
index 7b02968..0000000
--- a/trunk/po/.cvsignore
+++ /dev/null
@@ -1,6 +0,0 @@
-Makefile
-Makefile.in
-POTFILES
-*.gmo
-stamp-it
-
diff --git a/trunk/po/ChangeLog b/trunk/po/ChangeLog
deleted file mode 100644
index eb0b62a..0000000
--- a/trunk/po/ChangeLog
+++ /dev/null
@@ -1,12 +0,0 @@
-2007-02-20 Alexander Shopov <ash@contact.bg>
-
- * bg.po: Added Bulgarian translation by
- Alexander Shopov <ash@contact.bg>
-
-2007-02-18 Daniel Nylander <po@danielnylander.se>
-
- * sv.po: Added Swedish translation.
-
-2007-01-13 Takeshi AIHANA <takeshi.aihana@gmail.com>
-
- * ja.po: Added Japanese translation.
diff --git a/trunk/po/Makefile.in.in b/trunk/po/Makefile.in.in
deleted file mode 100644
index d2d4e4c..0000000
--- a/trunk/po/Makefile.in.in
+++ /dev/null
@@ -1,221 +0,0 @@
-# Makefile for program source directory in GNU NLS utilities package.
-# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
-#
-# This file file be copied and used freely without restrictions. It can
-# be used in projects which are not available under the GNU Public License
-# but which still want to provide support for the GNU gettext functionality.
-# Please note that the actual code is *not* freely available.
-#
-# - Modified by Owen Taylor <otaylor@redhat.com> to use GETTEXT_PACKAGE
-# instead of PACKAGE and to look for po2tbl in ./ not in intl/
-#
-# - Modified by jacob berkman <jacob@ximian.com> to install
-# Makefile.in.in and po2tbl.sed.in for use with glib-gettextize
-#
-# - Modified by Rodney Dawes <dobey@novell.com> for use with intltool
-#
-# We have the following line for use by intltoolize:
-# INTLTOOL_MAKEFILE
-
-GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
-PACKAGE = @PACKAGE@
-VERSION = @VERSION@
-
-SHELL = /bin/sh
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-top_builddir = ..
-VPATH = @srcdir@
-
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-datadir = @datadir@
-datarootdir = @datarootdir@
-libdir = @libdir@
-DATADIRNAME = @DATADIRNAME@
-itlocaledir = $(prefix)/$(DATADIRNAME)/locale
-subdir = po
-install_sh = @install_sh@
-# Automake >= 1.8 provides @mkdir_p@.
-# Until it can be supposed, use the safe fallback:
-mkdir_p = $(install_sh) -d
-
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-
-GMSGFMT = @GMSGFMT@
-MSGFMT = @MSGFMT@
-XGETTEXT = @XGETTEXT@
-INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
-INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
-MSGMERGE = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --dist
-GENPOT = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --pot
-
-ALL_LINGUAS = @ALL_LINGUAS@
-
-PO_LINGUAS=$(shell if test -r $(srcdir)/LINGUAS; then grep -v "^\#" $(srcdir)/LINGUAS; fi)
-
-POFILES=$(shell if test -n "$(PO_LINGUAS)"; then LINGUAS="$(PO_LINGUAS)"; else LINGUAS="$(ALL_LINGUAS)"; fi; for lang in $$LINGUAS; do printf "$$lang.po "; done)
-
-DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(POFILES)
-EXTRA_DISTFILES = POTFILES.skip Makevars LINGUAS
-
-POTFILES = \
-#This Gets Replace for some reason
-
-CATALOGS=$(shell if test -n "$(PO_LINGUAS)"; then LINGUAS="$(PO_LINGUAS)"; else LINGUAS="$(ALL_LINGUAS)"; fi; for lang in $$LINGUAS; do printf "$$lang.gmo "; done)
-
-.SUFFIXES:
-.SUFFIXES: .po .pox .gmo .mo .msg .cat
-
-.po.pox:
- $(MAKE) $(GETTEXT_PACKAGE).pot
- $(MSGMERGE) $< $(GETTEXT_PACKAGE).pot -o $*.pox
-
-.po.mo:
- $(MSGFMT) -o $@ $<
-
-.po.gmo:
- file=`echo $* | sed 's,.*/,,'`.gmo \
- && rm -f $$file && $(GMSGFMT) -o $$file $<
-
-.po.cat:
- sed -f ../intl/po2msg.sed < $< > $*.msg \
- && rm -f $@ && gencat $@ $*.msg
-
-
-all: all-@USE_NLS@
-
-all-yes: $(CATALOGS)
-all-no:
-
-$(GETTEXT_PACKAGE).pot: $(POTFILES)
- $(GENPOT)
-
-install: install-data
-install-data: install-data-@USE_NLS@
-install-data-no: all
-install-data-yes: all
- $(mkdir_p) $(DESTDIR)$(itlocaledir)
- if test -n "$(PO_LINGUAS)"; then \
- linguas="$(PO_LINGUAS)"; \
- else \
- linguas="$(ALL_LINGUAS)"; \
- fi; \
- for lang in $$linguas; do \
- dir=$(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES; \
- $(mkdir_p) $$dir; \
- if test -r $$lang.gmo; then \
- $(INSTALL_DATA) $$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \
- echo "installing $$lang.gmo as $$dir/$(GETTEXT_PACKAGE).mo"; \
- else \
- $(INSTALL_DATA) $(srcdir)/$$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \
- echo "installing $(srcdir)/$$lang.gmo as" \
- "$$dir/$(GETTEXT_PACKAGE).mo"; \
- fi; \
- if test -r $$lang.gmo.m; then \
- $(INSTALL_DATA) $$lang.gmo.m $$dir/$(GETTEXT_PACKAGE).mo.m; \
- echo "installing $$lang.gmo.m as $$dir/$(GETTEXT_PACKAGE).mo.m"; \
- else \
- if test -r $(srcdir)/$$lang.gmo.m ; then \
- $(INSTALL_DATA) $(srcdir)/$$lang.gmo.m \
- $$dir/$(GETTEXT_PACKAGE).mo.m; \
- echo "installing $(srcdir)/$$lang.gmo.m as" \
- "$$dir/$(GETTEXT_PACKAGE).mo.m"; \
- else \
- true; \
- fi; \
- fi; \
- done
-
-# Empty stubs to satisfy archaic automake needs
-dvi info tags TAGS ID:
-
-# Define this as empty until I found a useful application.
-installcheck:
-
-uninstall:
- if test -n "$(PO_LINGUAS)"; then \
- linguas="$(PO_LINGUAS)"; \
- else \
- linguas="$(ALL_LINGUAS)"; \
- fi; \
- for lang in $$linguas; do \
- rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo; \
- rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo.m; \
- done
-
-check: all $(GETTEXT_PACKAGE).pot
-
-mostlyclean:
- rm -f *.pox $(GETTEXT_PACKAGE).pot *.old.po cat-id-tbl.tmp
- rm -f .intltool-merge-cache
-
-clean: mostlyclean
-
-distclean: clean
- rm -f Makefile Makefile.in POTFILES stamp-it
- rm -f *.mo *.msg *.cat *.cat.m *.gmo
-
-maintainer-clean: distclean
- @echo "This command is intended for maintainers to use;"
- @echo "it deletes files that may require special tools to rebuild."
- rm -f Makefile.in.in
-
-distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
-dist distdir: $(DISTFILES)
- dists="$(DISTFILES)"; \
- extra_dists="$(EXTRA_DISTFILES)"; \
- for file in $$extra_dists; do \
- test -f $(srcdir)/$$file && dists="$$dists $(srcdir)/$$file"; \
- done; \
- for file in $$dists; do \
- test -f $$file || file="$(srcdir)/$$file"; \
- ln $$file $(distdir) 2> /dev/null \
- || cp -p $$file $(distdir); \
- done
-
-update-po: Makefile
- $(MAKE) $(GETTEXT_PACKAGE).pot
- tmpdir=`pwd`; \
- if test -n "$(PO_LINGUAS)"; then \
- linguas="$(PO_LINGUAS)"; \
- else \
- linguas="$(ALL_LINGUAS)"; \
- fi; \
- for lang in $$linguas; do \
- echo "$$lang:"; \
- result="`$(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang`"; \
- if $$result; then \
- if cmp $(srcdir)/$$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
- rm -f $$tmpdir/$$lang.new.po; \
- else \
- if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
- :; \
- else \
- echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
- rm -f $$tmpdir/$$lang.new.po; \
- exit 1; \
- fi; \
- fi; \
- else \
- echo "msgmerge for $$lang.gmo failed!"; \
- rm -f $$tmpdir/$$lang.new.po; \
- fi; \
- done
-
-Makefile POTFILES: stamp-it
- @if test ! -f $@; then \
- rm -f stamp-it; \
- $(MAKE) stamp-it; \
- fi
-
-stamp-it: Makefile.in.in ../config.status POTFILES.in
- cd .. \
- && CONFIG_FILES=$(subdir)/Makefile.in CONFIG_HEADERS= CONFIG_LINKS= \
- $(SHELL) ./config.status
-
-# Tell versions [3.59,3.63) of GNU make not to export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/trunk/po/POTFILES.in b/trunk/po/POTFILES.in
deleted file mode 100644
index 14c690a..0000000
--- a/trunk/po/POTFILES.in
+++ /dev/null
@@ -1,13 +0,0 @@
-libgnomekbd/gkbd-keyboard-drawing.c
-libgnomekbd/gkbd-indicator.c
-libgnomekbd/gkbd-util.c
-libgnomekbd/gkbd-config-registry.c
-libgnomekbd/gkbd-indicator-plugin-manager.c
-libgnomekbd/gkbd-indicator-config.c
-libgnomekbd/gkbd-keyboard-config.c
-libgnomekbd/gkbd-desktop-config.c
-libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in
-capplet/gkbd-indicator-plugins.glade
-capplet/gkbd-indicator-plugins-capplet.c
-capplet/gkbd-indicator-plugins-capplet.desktop.in.in
-capplet/gkbd-indicator-plugins-add.c
diff --git a/trunk/po/bg.po b/trunk/po/bg.po
deleted file mode 100644
index f963a46..0000000
--- a/trunk/po/bg.po
+++ /dev/null
@@ -1,217 +0,0 @@
-# Bulgarian translation of libgnomekbd po-file.
-# Copyright (C) 2007 Free Software Foundation, Inc.
-# This file is distributed under the same license as the libgnomekbd package.
-# Alexander Shopov <ash@contact.bg>, 2007.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: libgnomekbd trunk\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2007-02-20 08:04+0200\n"
-"PO-Revision-Date: 2007-02-20 08:06+0200\n"
-"Last-Translator: Alexander Shopov <ash@contact.bg>\n"
-"Language-Team: Bulgarian <dict@fsa-bg.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=n != 1;\n"
-
-#: ../libgnomekbd/gkbd-indicator.c:613
-msgid "XKB initialization error"
-msgstr "Грешка при инициализирането на XKB"
-
-#: ../libgnomekbd/gkbd-indicator-config.c:164
-#, c-format
-msgid "There was an error loading an image: %s"
-msgstr "Грешка при зареждането на изображението: %s"
-
-#: ../libgnomekbd/gkbd-keyboard-config.c:795
-#, c-format
-msgid "layout \"%s\""
-msgid_plural "layouts \"%s\""
-msgstr[0] "подредба „%s“"
-msgstr[1] "подредби „%s“"
-
-#: ../libgnomekbd/gkbd-keyboard-config.c:814
-#, c-format
-msgid "option \"%s\""
-msgid_plural "options \"%s\""
-msgstr[0] "настройка „%s“"
-msgstr[1] "настройки „%s“"
-
-#: ../libgnomekbd/gkbd-keyboard-config.c:822
-#, c-format
-msgid "model \"%s\", %s and %s"
-msgstr "модел „%s“, %s и %s"
-
-#: ../libgnomekbd/gkbd-keyboard-config.c:823
-msgid "no layout"
-msgstr "без подредба"
-
-#: ../libgnomekbd/gkbd-keyboard-config.c:824
-msgid "no options"
-msgstr "без опции"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:1
-msgid ""
-"A collection of scripts to run whenever the keyboard state is reloaded. "
-"Useful for re-applying xmodmap based adjustments"
-msgstr "Набор от скриптове, които да се изпълняват при всяко презареждане на състоянието на клавиатурата. Полезно е за повторното прилагане на допълнителни конфигурации по xmodmap."
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:2
-msgid "A list of modmap files available in the $HOME directory."
-msgstr "Списък с файловете за подредби, налични в домашната папка ($HOME)."
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:3
-msgid "Default group, assigned on window creation"
-msgstr "Стандартната група, която се присвоява на прозорец при създаването му"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:4
-msgid "Keep and manage separate group per window"
-msgstr "Управление на отделна група за всеки прозорец"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:5
-msgid "Keyboard Update Handlers"
-msgstr "Скриптове за обработка на промяната на клавиатурната подредба"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:6
-msgid "Keyboard layout"
-msgstr "Подредба на клавиатурата"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:7
-msgid "Keyboard model"
-msgstr "Модел на клавиатурата"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:8
-msgid "Keyboard options"
-msgstr "Настройки на клавиатурата"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:9
-msgid ""
-"Keyboard settings in gconf will be overridden from the system ASAP "
-"(deprecated)"
-msgstr ""
-"Системните настройки на клавиатурата скоро ще са с приоритет над тези в "
-"GConf (които са остарели и не бива да се ползват)"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:10
-msgid "Save/restore indicators together with layout groups"
-msgstr ""
-"Запазване/възстановяване на индикаторите заедно с групите по подредбата"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:11
-msgid "Show layout names instead of group names"
-msgstr "Показване на имената на подредбите вместо имената на групите"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:12
-msgid ""
-"Show layout names instead of group names (only for versions of XFree "
-"supporting multiple layouts)"
-msgstr ""
-"Показване на имената на подредбите вместо имената на групите (само при "
-"версии на XFree, които поддържат множество подредби)"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:13
-msgid "Suppress the \"X sysconfig changed\" warning message"
-msgstr "Съобщенията „Промяна на системните настройки на X“ да не се показват"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:14
-msgid "The Keyboard Preview, X offset"
-msgstr "Преглед на клавиатурата, отместване по X"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:15
-msgid "The Keyboard Preview, Y offset"
-msgstr "Преглед на клавиатурата, отместване по Y"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:16
-msgid "The Keyboard Preview, height"
-msgstr "Преглед на клавиатурата, височина"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:17
-msgid "The Keyboard Preview, width"
-msgstr "Преглед на клавиатурата, широчина"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:18
-msgid ""
-"Very soon, keyboard settings in gconf will be overridden (from the system "
-"configuration) This key has been deprecated since GNOME 2.12, please unset "
-"the model, layouts and options keys to get the default system configuration."
-msgstr ""
-"Много скоро системните настройки на клавиатурата ще имат приоритет над тези "
-"в GConf. Ключът в GConf е остарял и не трябва да се използва от GNOME 2.12. "
-"За да се върнете на системните настройки, махнете зададените стойности за "
-"модела, подредбите и допълнителните настройки."
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:19
-msgid "keyboard layout"
-msgstr "подредба на клавиатурата"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:20
-msgid "keyboard model"
-msgstr "модел на клавиатурата"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:21
-msgid "modmap file list"
-msgstr "файл със списък на подредбите"
-
-#: ../capplet/gkbd-indicator-plugins.glade.h:1
-msgid "Activate more plugins"
-msgstr "Задействане на още приставки"
-
-#: ../capplet/gkbd-indicator-plugins.glade.h:2
-msgid "Active _plugins:"
-msgstr "_Действащи приставки"
-
-#: ../capplet/gkbd-indicator-plugins.glade.h:3
-msgid "Add Plugin"
-msgstr "Добавяне на приставка"
-
-#: ../capplet/gkbd-indicator-plugins.glade.h:4
-msgid "Close the dialog"
-msgstr "Затваряне на диалоговия прозорец"
-
-#: ../capplet/gkbd-indicator-plugins.glade.h:5
-msgid "Configure the selected plugin"
-msgstr "Настройване на избраната приставка"
-
-#: ../capplet/gkbd-indicator-plugins.glade.h:6
-msgid "Deactivate selected plugin"
-msgstr "Спиране на избраната приставка"
-
-#: ../capplet/gkbd-indicator-plugins.glade.h:7
-msgid "Decrease the plugin priority"
-msgstr "Понижаване на приоритета на приставката"
-
-#: ../capplet/gkbd-indicator-plugins.glade.h:8
-msgid "Increase the plugin priority"
-msgstr "Повишаване на приоритета на приставката"
-
-#: ../capplet/gkbd-indicator-plugins.glade.h:9
-msgid "Keyboard Indicator Plugins"
-msgstr "Приставки за обозначаване на клавиатурата"
-
-#: ../capplet/gkbd-indicator-plugins.glade.h:10
-msgid "The list of active plugins"
-msgstr "Списък с действащи приставки"
-
-#: ../capplet/gkbd-indicator-plugins.glade.h:11
-msgid "_Available plugins:"
-msgstr "_Налични приставки"
-
-#: ../capplet/gkbd-indicator-plugins-capplet.c:117
-#: ../capplet/gkbd-indicator-plugins-add.c:106
-msgid "No description."
-msgstr "Без описание."
-
-#: ../capplet/gkbd-indicator-plugins-capplet.c:326
-#, c-format
-msgid "Failed to init GConf: %s\n"
-msgstr "Неуспех при инициализирането на GConf: %s\n"
-
-#: ../capplet/gkbd-indicator-plugins-capplet.desktop.in.in.h:1
-msgid "Enable/disable installed plugins"
-msgstr "Задействане/спиране на инсталираните приставки"
-
-#: ../capplet/gkbd-indicator-plugins-capplet.desktop.in.in.h:2
-msgid "Keyboard Indicator plugins"
-msgstr "Приставки за обозначаване на клавиатурата"
diff --git a/trunk/po/ja.po b/trunk/po/ja.po
deleted file mode 100644
index b011e0c..0000000
--- a/trunk/po/ja.po
+++ /dev/null
@@ -1,215 +0,0 @@
-# libgnomekbd ja.po.
-# Copyright (C) 2007 Free Software Foundation, Inc.
-# This file is distributed under the same license as the 'libgnomekbd' package.
-# Takeshi AIHANA <takeshi.aihana@gmail.com>, 2007.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: libgnomekbd trunk\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2007-01-13 15:55+0900\n"
-"PO-Revision-Date: 2007-01-13 15:55+0900\n"
-"Last-Translator: Takeshi AIHANA <takeshi.aihana@gmail.com>\n"
-"Language-Team: Japanese <gnome-translation@gnome.gr.jp>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=1; plural=0;\n"
-
-#: ../libgnomekbd/gkbd-indicator.c:613
-msgid "XKB initialization error"
-msgstr "XKB の初期化エラー"
-
-#: ../libgnomekbd/gkbd-indicator-config.c:164
-#, c-format
-msgid "There was an error loading an image: %s"
-msgstr "イメージを読み込む際にエラーが発生しました: %s"
-
-#: ../libgnomekbd/gkbd-keyboard-config.c:795
-#, c-format
-msgid "layout \"%s\""
-msgid_plural "layouts \"%s\""
-msgstr[0] "レイアウト \"%s\""
-
-#: ../libgnomekbd/gkbd-keyboard-config.c:814
-#, c-format
-msgid "option \"%s\""
-msgid_plural "options \"%s\""
-msgstr[0] "オプション \"%s\""
-
-#: ../libgnomekbd/gkbd-keyboard-config.c:822
-#, c-format
-msgid "model \"%s\", %s and %s"
-msgstr "型式 \"%s\"、%s と %s"
-
-#: ../libgnomekbd/gkbd-keyboard-config.c:823
-msgid "no layout"
-msgstr "レイアウトなし"
-
-#: ../libgnomekbd/gkbd-keyboard-config.c:824
-msgid "no options"
-msgstr "オプションなし"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:1
-msgid ""
-"A collection of scripts to run whenever the keyboard state is reloaded. "
-"Useful for re-applying xmodmap based adjustments"
-msgstr ""
-"キーボードの状態が変更された時に実行するスクリプト集です。これらのスクリプト"
-"は xmodmap による調整結果をもう一度適用する際に便利です。"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:2
-msgid "A list of modmap files available in the $HOME directory."
-msgstr "$HOME フォルダで利用可能な modmap ファイルの並びです。"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:3
-msgid "Default group, assigned on window creation"
-msgstr "(ウィンドウの生成時に割り当てられる) デフォルトのグループ"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:4
-msgid "Keep and manage separate group per window"
-msgstr "ウィンドウ毎に別々のグループで管理する"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:5
-msgid "Keyboard Update Handlers"
-msgstr "キーボードの更新ハンドラ"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:6
-msgid "Keyboard layout"
-msgstr "キーボードのレイアウト"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:7
-msgid "Keyboard model"
-msgstr "キーボードの型式"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:8
-msgid "Keyboard options"
-msgstr "キーボードのオプション"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:9
-msgid ""
-"Keyboard settings in gconf will be overridden from the system ASAP "
-"(deprecated)"
-msgstr ""
-"可能であれば、GConf に保存されたキーボードの設定値でシステム規模の設定を上書"
-"きする (廃棄)"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:10
-msgid "Save/restore indicators together with layout groups"
-msgstr "保存/復帰の表示器をレイアウトのグループにまとめる"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:11
-msgid "Show layout names instead of group names"
-msgstr "グループ名ではなくレイアウト名を表示する"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:12
-msgid ""
-"Show layout names instead of group names (only for versions of XFree "
-"supporting multiple layouts)"
-msgstr ""
-"グループ名ではなくレイアウト名を表示します (複数のレイアウトを同時にサポート"
-"できる XFree のバージョンのみ利用できます)。"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:13
-msgid "Suppress the \"X sysconfig changed\" warning message"
-msgstr "\"Xのシステム規模の設定変更\" に対する警告メッセージを表示しない"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:14
-msgid "The Keyboard Preview, X offset"
-msgstr "キーボード・プレビューを表示する位置 (X座標)"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:15
-msgid "The Keyboard Preview, Y offset"
-msgstr "キーボード・プレビューを表示する位置 (Y座標)"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:16
-msgid "The Keyboard Preview, height"
-msgstr "キーボード・プレビューの高さ"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:17
-msgid "The Keyboard Preview, width"
-msgstr "キーボード・プレビューの幅"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:18
-msgid ""
-"Very soon, keyboard settings in gconf will be overridden (from the system "
-"configuration) This key has been deprecated since GNOME 2.12, please unset "
-"the model, layouts and options keys to get the default system configuration."
-msgstr ""
-"可能な限り早めに、GConf に保存したキーボード設定でシステム規模の設定を上書き"
-"します。このキーは GNOME バージョン 2.12 で破棄されました。システム規模の型式"
-"やレイアウト、オプションを取得する場合は FALSE にして下さい。"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:19
-msgid "keyboard layout"
-msgstr "現在利用しているキーボードのレイアウトです。"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:20
-msgid "keyboard model"
-msgstr "現在利用しているキーボードの型式です。"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:21
-msgid "modmap file list"
-msgstr "modmap ファイルの並び"
-
-#: ../capplet/gkbd-indicator-plugins.glade.h:1
-msgid "Activate more plugins"
-msgstr "プラグインを追加します"
-
-#: ../capplet/gkbd-indicator-plugins.glade.h:2
-msgid "Active _plugins:"
-msgstr "有効なプラグイン(_P):"
-
-#: ../capplet/gkbd-indicator-plugins.glade.h:3
-msgid "Add Plugin"
-msgstr "プラグインの追加"
-
-#: ../capplet/gkbd-indicator-plugins.glade.h:4
-msgid "Close the dialog"
-msgstr "このダイアログを閉じます"
-
-#: ../capplet/gkbd-indicator-plugins.glade.h:5
-msgid "Configure the selected plugin"
-msgstr "選択したプラグインを設定します"
-
-#: ../capplet/gkbd-indicator-plugins.glade.h:6
-msgid "Deactivate selected plugin"
-msgstr "選択したプラグインを削除して無効にします"
-
-#: ../capplet/gkbd-indicator-plugins.glade.h:7
-msgid "Decrease the plugin priority"
-msgstr "プラグインの優先度を下げます"
-
-#: ../capplet/gkbd-indicator-plugins.glade.h:8
-msgid "Increase the plugin priority"
-msgstr "プラグインの優先度を上げます"
-
-#: ../capplet/gkbd-indicator-plugins.glade.h:9
-msgid "Keyboard Indicator Plugins"
-msgstr "キーボード表示器のプラグイン"
-
-#: ../capplet/gkbd-indicator-plugins.glade.h:10
-msgid "The list of active plugins"
-msgstr "有効になっているプラグインの一覧です"
-
-#: ../capplet/gkbd-indicator-plugins.glade.h:11
-msgid "_Available plugins:"
-msgstr "利用可能なプラグイン(_A):"
-
-#: ../capplet/gkbd-indicator-plugins-capplet.c:117
-#: ../capplet/gkbd-indicator-plugins-add.c:106
-msgid "No description."
-msgstr "説明なし"
-
-#: ../capplet/gkbd-indicator-plugins-capplet.c:326
-#, c-format
-msgid "Failed to init GConf: %s\n"
-msgstr "GConf の初期化に失敗しました: %s\n"
-
-#: ../capplet/gkbd-indicator-plugins-capplet.desktop.in.in.h:1
-msgid "Enable/disable installed plugins"
-msgstr "インストール済みのプラグインを設定します"
-
-#: ../capplet/gkbd-indicator-plugins-capplet.desktop.in.in.h:2
-msgid "Keyboard Indicator plugins"
-msgstr "キーボード表示器のプラグイン"
diff --git a/trunk/po/nb.po b/trunk/po/nb.po
deleted file mode 100644
index 3c0ff06..0000000
--- a/trunk/po/nb.po
+++ /dev/null
@@ -1,216 +0,0 @@
-# Norwegian translation of control-center (bokmål dialect).
-# Copyright (C) 1999-2005 Free Software Foundation, Inc.
-# Kjartan Maraas <kmaraas@gnome.org>, 1999-2006.
-# Terance Edward Sola <terance@lyse.net>, 2005.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: libgnomekbd 2.15.x\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2006-10-31 13:33+0100\n"
-"PO-Revision-Date: 2006-10-31 13:40+0100\n"
-"Last-Translator: Kjartan Maraas <kmaraas@gnome.org>\n"
-"Language-Team: Norwegian Bokmal <i18n-nb@lister.ping.uio.no>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8-bit\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-
-#: ../libgnomekbd/gkbd-indicator.c:613
-msgid "XKB initialization error"
-msgstr "Feil ved initiering av XKB"
-
-#: ../libgnomekbd/gkbd-indicator-config.c:164
-#, c-format
-msgid "There was an error loading an image: %s"
-msgstr "Det oppsto en feil under lasting av bilde: %s"
-
-#: ../libgnomekbd/gkbd-keyboard-config.c:795
-#, c-format
-msgid "layout \"%s\""
-msgid_plural "layouts \"%s\""
-msgstr[0] "utforming «%s»"
-msgstr[1] "utforminger «%s»"
-
-#: ../libgnomekbd/gkbd-keyboard-config.c:814
-#, c-format
-msgid "option \"%s\""
-msgid_plural "options \"%s\""
-msgstr[0] "alternativ «%s»"
-msgstr[1] "alternativer «%s»"
-
-#: ../libgnomekbd/gkbd-keyboard-config.c:822
-#, c-format
-msgid "model \"%s\", %s and %s"
-msgstr "modell «%s», %s og %s"
-
-#: ../libgnomekbd/gkbd-keyboard-config.c:823
-msgid "no layout"
-msgstr "ingen utforming"
-
-#: ../libgnomekbd/gkbd-keyboard-config.c:824
-msgid "no options"
-msgstr "ingen alternativer"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:1
-msgid ""
-"A collection of scripts to run whenever the keyboard state is reloaded. "
-"Useful for re-applying xmodmap based adjustments"
-msgstr ""
-"En samling skript som kjøres når tastaturtilstanden skal lastes på nytt. "
-"Nyttig for å legge inn xmodmap-baserte justeringer på nytt"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:2
-msgid "A list of modmap files available in the $HOME directory."
-msgstr "En liste over modmap-filer som finnes i katalogen $HOME."
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:3
-msgid "Default group, assigned on window creation"
-msgstr "Forvalgt gruppe, tildelt ved oppretting av vindu"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:4
-msgid "Keep and manage separate group per window"
-msgstr "Behold og håndter separate grupper per vindu"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:5
-msgid "Keyboard Update Handlers"
-msgstr "Tastaturoppdatering"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:6
-msgid "Keyboard layout"
-msgstr "Tastaturutforming"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:7
-msgid "Keyboard model"
-msgstr "Tastaturmodell"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:8
-msgid "Keyboard options"
-msgstr "Alternativer for tastatur"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:9
-msgid ""
-"Keyboard settings in gconf will be overridden from the system ASAP "
-"(deprecated)"
-msgstr "Tastaturinnstillinger i gconf overstyres fra systemet ASAP. (Utfases)"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:10
-msgid "Save/restore indicators together with layout groups"
-msgstr "Lagre/gjenopprett indikatorer sammen med utformingsgrupper"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:11
-msgid "Show layout names instead of group names"
-msgstr "Vis navn på utforming i stedet for gruppenavn"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:12
-msgid ""
-"Show layout names instead of group names (only for versions of XFree "
-"supporting multiple layouts)"
-msgstr ""
-"Vis navn på utforming i stedet for gruppenavn (kun for versjoner av XFree "
-"som støtter flere utforminger)"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:13
-msgid "Suppress the \"X sysconfig changed\" warning message"
-msgstr "Ikke vis advarsel om «X konfigurasjonen er endret»"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:14
-msgid "The Keyboard Preview, X offset"
-msgstr "Forhåndsvisning av tastatur, X-avstand"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:15
-msgid "The Keyboard Preview, Y offset"
-msgstr "Forhåndsvisning av tastatur, Y-avstand"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:16
-msgid "The Keyboard Preview, height"
-msgstr "Forhåndsvisning av tastatur, høyde"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:17
-msgid "The Keyboard Preview, width"
-msgstr "Forhåndsvisning av tastatur, bredde"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:18
-msgid ""
-"Very soon, keyboard settings in gconf will be overridden (from the system "
-"configuration) This key has been deprecated since GNOME 2.12, please unset "
-"the model, layouts and options keys to get the default system configuration."
-msgstr ""
-"Tastaturinnstillinger i gconf vil bli overstyrt fra systemkonfigurasjonen i "
-"nær framtid. Denne nøkkelen er under utfasing fra GNOME 2.12. Vennligst "
-"fjern verdiene for modell, utforming og alternative taster for å ta i bruk "
-"forvalgt systemkonfigurasjon."
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:19
-msgid "keyboard layout"
-msgstr "tastaturutforming"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:20
-msgid "keyboard model"
-msgstr "tastaturmodell"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:21
-msgid "modmap file list"
-msgstr "liste over modmap-filer"
-
-#: ../capplet/gkbd-indicator-plugins.glade.h:1
-msgid "Activate more plugins"
-msgstr "Aktiver flere tillegg"
-
-#: ../capplet/gkbd-indicator-plugins.glade.h:2
-msgid "Active _plugins:"
-msgstr "Aktiver tille_gg"
-
-#: ../capplet/gkbd-indicator-plugins.glade.h:3
-msgid "Add Plugin"
-msgstr "Legg til tillegg"
-
-#: ../capplet/gkbd-indicator-plugins.glade.h:4
-msgid "Close the dialog"
-msgstr "Lukk dialogen"
-
-#: ../capplet/gkbd-indicator-plugins.glade.h:5
-msgid "Configure the selected plugin"
-msgstr "Konfigurer valgt tillegg"
-
-#: ../capplet/gkbd-indicator-plugins.glade.h:6
-msgid "Deactivate selected plugin"
-msgstr "Deaktiver valgt tillegg"
-
-#: ../capplet/gkbd-indicator-plugins.glade.h:7
-msgid "Decrease the plugin priority"
-msgstr "Sett lavere prioritet for tillegget"
-
-#: ../capplet/gkbd-indicator-plugins.glade.h:8
-msgid "Increase the plugin priority"
-msgstr "Sett høyere prioritet for tillegget"
-
-#: ../capplet/gkbd-indicator-plugins.glade.h:9
-msgid "Keyboard Indicator Plugins"
-msgstr "Tillegg for tastaturindikator"
-
-#: ../capplet/gkbd-indicator-plugins.glade.h:10
-msgid "The list of active plugins"
-msgstr "Liste med aktive tillegg"
-
-#: ../capplet/gkbd-indicator-plugins.glade.h:11
-msgid "_Available plugins:"
-msgstr "_Tilgjengelige tillegg:"
-
-#: ../capplet/gkbd-indicator-plugins-capplet.c:117
-#: ../capplet/gkbd-indicator-plugins-add.c:106
-msgid "No description."
-msgstr "Ingen beskrivelse."
-
-#: ../capplet/gkbd-indicator-plugins-capplet.c:326
-#, c-format
-msgid "Failed to init GConf: %s\n"
-msgstr "Klarte ikke å starte GConf: %s\n"
-
-#: ../capplet/gkbd-indicator-plugins-capplet.desktop.in.in.h:1
-msgid "Enable/disable installed plugins"
-msgstr "Aktiver/deaktiver installerte tillegg"
-
-#: ../capplet/gkbd-indicator-plugins-capplet.desktop.in.in.h:2
-msgid "Keyboard Indicator plugins"
-msgstr "Tillegg for tastaturindikator"
diff --git a/trunk/po/ru.po b/trunk/po/ru.po
deleted file mode 100644
index f22a3ab..0000000
--- a/trunk/po/ru.po
+++ /dev/null
@@ -1,169 +0,0 @@
-# SOME DESCRIPTIVE TITLE.
-# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
-#
-#, fuzzy
-msgid ""
-msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2006-09-24 17:15+0100\n"
-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"Last-Translator: Sergey Udaltsov <svu@gnome.org>\n"
-"Language-Team: <gnome-cyr@gnome.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%"
-"10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
-
-#: ../libgnomekbd/gkbd-indicator.c:585
-msgid "XKB initialization error"
-msgstr "Ошибка инициализации XKB"
-
-#: ../libgnomekbd/gkbd-indicator-config.c:160
-#, c-format
-msgid "There was an error loading an image: %s"
-msgstr "Ошибка загрузки изображения: %s"
-
-#: ../libgnomekbd/gkbd-keyboard-config.c:790
-#, c-format
-msgid "layout \"%s\""
-msgid_plural "layouts \"%s\""
-msgstr[0] "раскладка \"%s\""
-msgstr[1] "раскладки \"%s\""
-
-#: ../libgnomekbd/gkbd-keyboard-config.c:809
-#, c-format
-msgid "option \"%s\""
-msgid_plural "options \"%s\""
-msgstr[0] "опция \"%s\""
-msgstr[1] "опции \"%s\""
-
-#: ../libgnomekbd/gkbd-keyboard-config.c:817
-#, c-format
-msgid "model \"%s\", %s and %s"
-msgstr "модель \"%s\", %s и %s"
-
-#: ../libgnomekbd/gkbd-keyboard-config.c:818
-msgid "no layout"
-msgstr "нет раскладки"
-
-#: ../libgnomekbd/gkbd-keyboard-config.c:819
-msgid "no options"
-msgstr "нет опций"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:1
-msgid ""
-"A collection of scripts to run whenever the keyboard state is reloaded. "
-"Useful for re-applying xmodmap based adjustments"
-msgstr ""
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:2
-msgid "A list of modmap files available in the $HOME directory."
-msgstr ""
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:3
-msgid "Default group, assigned on window creation"
-msgstr "Группа по умолчанию, присваеваемая при создании окна"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:4
-msgid "Keep and manage separate group per window"
-msgstr "Сохранять и подддерживать разные группы, пооконно"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:5
-msgid "Keyboard Update Handlers"
-msgstr "Обработчики обновления клавиатуры"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:6
-msgid "Keyboard layout"
-msgstr "Раскладка клавиатуры"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:7
-msgid "Keyboard model"
-msgstr "Модель клавиатуры"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:8
-msgid "Keyboard options"
-msgstr "Доп. параметры клавиатуры"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:9
-msgid ""
-"Keyboard settings in gconf will be overridden from the system ASAP "
-"(deprecated)"
-msgstr "Клавиатурные установки в gconf будут немедленно заменены системными (устарело)"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:10
-msgid "Save/restore indicators together with layout groups"
-msgstr "Сохранять/восстанавливать индикаторы вместе с группами"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:11
-msgid "Show layout names instead of group names"
-msgstr "Показывать названия раскладок вместо названий групп"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:12
-msgid ""
-"Show layout names instead of group names (only for versions of XFree "
-"supporting multiple layouts)"
-msgstr ""
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:13
-msgid "Suppress the \"X sysconfig changed\" warning message"
-msgstr ""
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:14
-msgid "The Keyboard Preview, X offset"
-msgstr ""
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:15
-msgid "The Keyboard Preview, Y offset"
-msgstr ""
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:16
-msgid "The Keyboard Preview, height"
-msgstr ""
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:17
-msgid "The Keyboard Preview, width"
-msgstr ""
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:18
-msgid ""
-"Very soon, keyboard settings in gconf will be overridden (from the system "
-"configuration) This key has been deprecated since GNOME 2.12, please unset "
-"the model, layouts and options keys to get the default system configuration."
-msgstr ""
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:19
-msgid "keyboard layout"
-msgstr "клавиатурная раскладка"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:20
-msgid "keyboard model"
-msgstr "клавиатурная модель"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:21
-msgid "modmap file list"
-msgstr "список modmap файлов"
-
-#: ../capplet/gkbd-indicator-plugins-capplet.c:114
-#: ../capplet/gkbd-indicator-plugins-add.c:103
-msgid "No description."
-msgstr "Нет описания."
-
-#: ../capplet/gkbd-indicator-plugins-capplet.c:323
-#, c-format
-msgid "Failed to init GConf: %s\n"
-msgstr "Ошибка инициализации GConf: %s\n"
-
-#: ../capplet/gkbd-indicator-plugins-capplet.desktop.in.in.h:1
-msgid "Enable/disable installed plugins"
-msgstr "Включить/выключить установленные модули"
-
-#: ../capplet/gkbd-indicator-plugins-capplet.desktop.in.in.h:2
-msgid "Keyboard Indicator plugins"
-msgstr "Модули расширения клавиатурного индикатора"
-
-#~ msgid "There was an error displaying help: %s"
-#~ msgstr "Ошибка отображения справки: %s"
diff --git a/trunk/po/sv.po b/trunk/po/sv.po
deleted file mode 100644
index 9aee209..0000000
--- a/trunk/po/sv.po
+++ /dev/null
@@ -1,209 +0,0 @@
-# Swedish translation for libgnomekbd.
-# Copyright (C) 2007 Free Software Foundation, Inc.
-# This file is distributed under the same license as the libgnomekbd package.
-# Daniel Nylander <po@danielnylander.se>, 2007.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: libgnomekbd\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2007-02-18 20:12+0100\n"
-"PO-Revision-Date: 2007-02-18 20:24+0100\n"
-"Last-Translator: Daniel Nylander <po@danielnylander.se>\n"
-"Language-Team: Swedish <tp-sv@listor.tp-sv.se>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=utf-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=n != 1;\n"
-
-#: ../libgnomekbd/gkbd-indicator.c:613
-msgid "XKB initialization error"
-msgstr "XKB-initieringsfel"
-
-#: ../libgnomekbd/gkbd-indicator-config.c:164
-#, c-format
-msgid "There was an error loading an image: %s"
-msgstr "Det inträffade ett fel vid inläsning av en bild: %s"
-
-#: ../libgnomekbd/gkbd-keyboard-config.c:795
-#, c-format
-msgid "layout \"%s\""
-msgid_plural "layouts \"%s\""
-msgstr[0] "layout \"%s\""
-msgstr[1] "layouter \"%s\""
-
-#: ../libgnomekbd/gkbd-keyboard-config.c:814
-#, c-format
-msgid "option \"%s\""
-msgid_plural "options \"%s\""
-msgstr[0] "alternativ \"%s\""
-msgstr[1] "alternativ \"%s\""
-
-#: ../libgnomekbd/gkbd-keyboard-config.c:822
-#, c-format
-msgid "model \"%s\", %s and %s"
-msgstr "modell \"%s\", %s och %s"
-
-#: ../libgnomekbd/gkbd-keyboard-config.c:823
-msgid "no layout"
-msgstr "ingen layout"
-
-#: ../libgnomekbd/gkbd-keyboard-config.c:824
-msgid "no options"
-msgstr "inga alternativ"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:1
-msgid "A collection of scripts to run whenever the keyboard state is reloaded. Useful for re-applying xmodmap based adjustments"
-msgstr "En samling skript att köra när tangentbordstillståndet läses om. Användbart för att återtillämpa xmodmap-baserade justeringar"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:2
-msgid "A list of modmap files available in the $HOME directory."
-msgstr "En lista över modmap-filer tillgängliga i $HOME-katalogen."
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:3
-msgid "Default group, assigned on window creation"
-msgstr "Standardgrupp, tilldelade för fönsterskapande"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:4
-msgid "Keep and manage separate group per window"
-msgstr "Behåll och hantera separat grupp per fönster"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:5
-msgid "Keyboard Update Handlers"
-msgstr "Tangentbordsuppdateringshanterare"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:6
-msgid "Keyboard layout"
-msgstr "Tangentbordslayout"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:7
-msgid "Keyboard model"
-msgstr "Tangentbordsmodell"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:8
-msgid "Keyboard options"
-msgstr "Tangentbordsalternativ"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:9
-msgid "Keyboard settings in gconf will be overridden from the system ASAP (deprecated)"
-msgstr "Tangentbordsinställningar i gconf kommer att åsidosättas från systemet så snart som möjligt (föråldrad)"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:10
-msgid "Save/restore indicators together with layout groups"
-msgstr "Spara/återställ indikatorer tillsammans med layoutgrupper"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:11
-msgid "Show layout names instead of group names"
-msgstr "Visa layoutnamn istället för gruppnamn"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:12
-msgid "Show layout names instead of group names (only for versions of XFree supporting multiple layouts)"
-msgstr "Visa layoutnamn istället för gruppnamn (endast för versioner av XFree som har stöd för flera layouter)"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:13
-msgid "Suppress the \"X sysconfig changed\" warning message"
-msgstr "Visa inte varningsmeddelandet \"X sysconfig changed\""
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:14
-msgid "The Keyboard Preview, X offset"
-msgstr "Tangentbordsförhandsvisning, X-position"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:15
-msgid "The Keyboard Preview, Y offset"
-msgstr "Tangentbordsförhandsvisning, Y-position"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:16
-msgid "The Keyboard Preview, height"
-msgstr "Tangentbordsförhandsvisning, höjd"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:17
-msgid "The Keyboard Preview, width"
-msgstr "Tangentbordsförhandsvisning, bredd"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:18
-msgid "Very soon, keyboard settings in gconf will be overridden (from the system configuration) This key has been deprecated since GNOME 2.12, please unset the model, layouts and options keys to get the default system configuration."
-msgstr "Mycket snart kommer tangentbordsinställningar i gconf att åsidosättas (från systemkonfigurationen) Den här nyckeln har varit föråldrad sedan GNOME 2.12, avmarkera nycklarna för modell, layouter och alternativ för att få standardsystemkonfigurationen."
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:19
-msgid "keyboard layout"
-msgstr "tangentbordslayout"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:20
-msgid "keyboard model"
-msgstr "tangentbordsmodell"
-
-#: ../libgnomekbd/desktop_gnome_peripherals_keyboard_xkb.schemas.in.h:21
-msgid "modmap file list"
-msgstr "fillista för modmap"
-
-#: ../capplet/gkbd-indicator-plugins.glade.h:1
-msgid "Activate more plugins"
-msgstr "Aktivera fler insticksmoduler"
-
-#: ../capplet/gkbd-indicator-plugins.glade.h:2
-msgid "Active _plugins:"
-msgstr "Aktiva _insticksmoduler:"
-
-#: ../capplet/gkbd-indicator-plugins.glade.h:3
-msgid "Add Plugin"
-msgstr "Lägg till insticksmodul"
-
-#: ../capplet/gkbd-indicator-plugins.glade.h:4
-msgid "Close the dialog"
-msgstr "Stäng dialogrutan"
-
-#: ../capplet/gkbd-indicator-plugins.glade.h:5
-msgid "Configure the selected plugin"
-msgstr "Konfigurera markerad insticksmodul"
-
-#: ../capplet/gkbd-indicator-plugins.glade.h:6
-msgid "Deactivate selected plugin"
-msgstr "Inaktivera markerad insticksmodul"
-
-#: ../capplet/gkbd-indicator-plugins.glade.h:7
-msgid "Decrease the plugin priority"
-msgstr "Sänk insticksmodulens prioritet"
-
-#: ../capplet/gkbd-indicator-plugins.glade.h:8
-msgid "Increase the plugin priority"
-msgstr "Öka insticksmodulens prioritet"
-
-#: ../capplet/gkbd-indicator-plugins.glade.h:9
-msgid "Keyboard Indicator Plugins"
-msgstr "Insticksmoduler för tangentbordsindikator"
-
-#: ../capplet/gkbd-indicator-plugins.glade.h:10
-msgid "The list of active plugins"
-msgstr "Listan över aktiva insticksmoduler"
-
-#: ../capplet/gkbd-indicator-plugins.glade.h:11
-msgid "_Available plugins:"
-msgstr "_Tillgängliga insticksmoduler:"
-
-#: ../capplet/gkbd-indicator-plugins-capplet.c:117
-#: ../capplet/gkbd-indicator-plugins-add.c:106
-msgid "No description."
-msgstr "Ingen beskrivning."
-
-#: ../capplet/gkbd-indicator-plugins-capplet.c:326
-#, c-format
-msgid "Failed to init GConf: %s\n"
-msgstr "Misslyckades med att initera GConf: %s\n"
-
-#: ../capplet/gkbd-indicator-plugins-capplet.desktop.in.in.h:1
-msgid "Enable/disable installed plugins"
-msgstr "Aktivera/inaktivera installerade insticksmoduler"
-
-#: ../capplet/gkbd-indicator-plugins-capplet.desktop.in.in.h:2
-msgid "Keyboard Indicator plugins"
-msgstr "Insticksmoduler för tangentbordsindikator"
-
-#: ../test/gkbd-indicator-test.c:61
-#, c-format
-msgid "Keyboard Indicator Test (%s)"
-msgstr "Tangentbordsindikatortest (%s)"
-
-#: ../test/gkbd-indicator-test.c:70
-msgid "Indicator:"
-msgstr "Indikator:"
-
diff --git a/trunk/test/.cvsignore b/trunk/test/.cvsignore
deleted file mode 100644
index 8954104..0000000
--- a/trunk/test/.cvsignore
+++ /dev/null
@@ -1,6 +0,0 @@
-Makefile
-Makefile.in
-gkbd-config-registry-server
-gkbd-indicator-test
-gkbd-keyboard-drawing-test
-
diff --git a/trunk/test/.indent.pro b/trunk/test/.indent.pro
deleted file mode 100644
index bdff074..0000000
--- a/trunk/test/.indent.pro
+++ /dev/null
@@ -1,2 +0,0 @@
--kr -i8 -pcs -lps -psl
-
diff --git a/trunk/test/Makefile.am b/trunk/test/Makefile.am
deleted file mode 100644
index d0fb49b..0000000
--- a/trunk/test/Makefile.am
+++ /dev/null
@@ -1,47 +0,0 @@
-noinst_PROGRAMS = gkbd-indicator-test \
- gkbd-keyboard-drawing-test \
- gkbd-config-registry-server
-
-gkbd_config_registry_server_CFLAGS= \
- $(WARN_CFLAGS) -I$(top_srcdir) -Wall -Werror \
- $(DBUS_CFLAGS) \
- $(LIBXKLAVIER_CFLAGS)
-
-gkbd_config_registry_server_LDFLAGS= \
- $(DBUS_LIBS) \
- $(LIBXKLAVIER_LIBS) \
- $(top_builddir)/libgnomekbd/libgnomekbd.la
-
-gkbd_indicator_test_CFLAGS= \
- $(WARN_CFLAGS) -I$(top_srcdir) -Wall -Werror \
- $(GTK_CFLAGS) \
- $(LIBGLADE_CFLAGS) \
- $(LIBGNOME_CFLAGS) \
- $(LIBGNOMEUI_CFLAGS) \
- $(LIBXKLAVIER_CFLAGS) \
- -I$(top_srcdir)/intl \
- -DSYS_PLUGIN_DIR=\"$(libdir)/gnomekbd/\" \
- -DG_LOG_DOMAIN=\"GnomeKbdIndicatorTest\" \
- -DDATADIR=\"$(datadir)\"
-
-gkbd_indicator_test_LDFLAGS= \
- $(GTK_LIBS) \
- $(LIBGLADE_LIBS) \
- $(LIBGNOME_LIBS) \
- $(LIBGNOMEUI_LIBS) \
- $(LIBXKLAVIER_LIBS) \
- $(top_builddir)/libgnomekbd/libgnomekbd.la \
- $(top_builddir)/libgnomekbd/libgnomekbdui.la
-
-gkbd_keyboard_drawing_test_CFLAGS= \
- $(WARN_CFLAGS) -I$(top_srcdir) \
- $(GTK_CFLAGS)
-
-gkbd_keyboard_drawing_test_LDFLAGS= \
- $(GTK_LIBS) \
- $(LIBGNOME_LIBS) \
- $(LIBXKLAVIER_LIBS) \
- $(top_builddir)/libgnomekbd/libgnomekbd.la \
- $(top_builddir)/libgnomekbd/libgnomekbdui.la
-
-EXTRA_DIST = gkbd-config-registry-client.sh
diff --git a/trunk/test/gkbd-config-registry-client.sh b/trunk/test/gkbd-config-registry-client.sh
deleted file mode 100755
index 6b98fc2..0000000
--- a/trunk/test/gkbd-config-registry-client.sh
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/bin/sh
-
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Library General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-
-#
-# $Id$
-#
-# This tiny script is expected to test the available keyboard config registry,
-# getting descriptions out of it
-#
-
-objname=GkbdConfigRegistry
-method=GetDescriptionsAsUtf8
-
-# Old:
-#objname=KeyboardConfigRegistry
-#method=GetCurrentDescriptionsAsUtf8
-
-dbus-send --session \
- --dest=org.gnome.$objname \
- --type=method_call \
- --print-reply \
- --reply-timeout=20000 \
- /org/gnome/$objname \
- org.gnome.$objname.$method \
- array:string:"us","ru","fr","de","il" \
- array:string:"basic","winkeys","","deadkeys","dummy"
diff --git a/trunk/test/gkbd-config-registry-server.c b/trunk/test/gkbd-config-registry-server.c
deleted file mode 100644
index b4c0fac..0000000
--- a/trunk/test/gkbd-config-registry-server.c
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#include <config.h>
-
-#include <stdio.h>
-#include <X11/Xlib.h>
-#include <libxklavier/xklavier.h>
-#include <dbus/dbus-glib-bindings.h>
-
-#ifdef HAVE_SETLOCALE
-# include <locale.h>
-#endif
-
-#include "libgnomekbd/gkbd-config-registry.h"
-
-static GMainLoop *loop;
-
-int
-main ()
-{
- GkbdConfigRegistry *reg;
-
- g_type_init_with_debug_flags (G_TYPE_DEBUG_OBJECTS |
- G_TYPE_DEBUG_SIGNALS);
-
-#ifdef HAVE_SETLOCALE
- setlocale(LC_ALL, "");
-#endif
-
- reg = GKBD_CONFIG_REGISTRY (g_object_new
- (gkbd_config_registry_get_type
- (), NULL));
-
- loop = g_main_loop_new (NULL, FALSE);
-
- g_main_loop_run (loop);
-
- g_object_unref (reg);
-
- return 0;
-}
diff --git a/trunk/test/gkbd-indicator-test.c b/trunk/test/gkbd-indicator-test.c
deleted file mode 100644
index 3401d30..0000000
--- a/trunk/test/gkbd-indicator-test.c
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#include "config.h"
-
-#include "libxklavier/xklavier.h"
-#include "libgnomekbd/gkbd-indicator.h"
-
-#include <string.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <stdlib.h>
-
-#include <gdk/gdkscreen.h>
-#include <gdk/gdkx.h>
-#include <gnome.h>
-#include <glade/glade.h>
-
-#include "X11/XKBlib.h"
-
-int
-main (int argc, char **argv)
-{
- GtkWidget *gki;
- GtkWidget *mainwin;
- GtkWidget *vbox;
-
- bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
- bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
- textdomain (GETTEXT_PACKAGE);
-
- /* Different data dir defs in g-a and g-c-c */
- gnome_program_init ("gkbd-indicator-test", VERSION,
- LIBGNOMEUI_MODULE, argc, argv,
- GNOME_PARAM_APP_DATADIR, DATADIR, NULL);
-
- glade_gnome_init ();
-
- mainwin = gtk_window_new (GTK_WINDOW_TOPLEVEL);
-
- gki = gkbd_indicator_new ();
- gkbd_indicator_set_tooltips_format (_
- ("Keyboard Indicator Test (%s)"));
- gkbd_indicator_set_parent_tooltips (GKBD_INDICATOR (gki), TRUE);
-
- gtk_window_resize (GTK_WINDOW (mainwin), 250, 250);
- vbox = gtk_vbox_new (TRUE, 6);
-
- gtk_container_add (GTK_CONTAINER (mainwin), vbox);
- gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
- gtk_container_add (GTK_CONTAINER (vbox),
- gtk_label_new (_("Indicator:")));
- gtk_container_add (GTK_CONTAINER (vbox), gki);
-
- gtk_widget_show_all (mainwin);
-
- g_signal_connect (G_OBJECT (mainwin),
- "destroy", G_CALLBACK (gtk_main_quit), NULL);
-
-
- gtk_main ();
-
- return 0;
-}
diff --git a/trunk/test/gkbd-keyboard-drawing-test.c b/trunk/test/gkbd-keyboard-drawing-test.c
deleted file mode 100644
index 1b0e6d8..0000000
--- a/trunk/test/gkbd-keyboard-drawing-test.c
+++ /dev/null
@@ -1,284 +0,0 @@
-/*
- * Copyright (C) 2006 Sergey V. Udaltsov <svu@gnome.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#if HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <gtk/gtk.h>
-#include <popt.h>
-#include <stdlib.h>
-#include <string.h>
-#include "libgnomekbd/gkbd-keyboard-drawing.h"
-
-
-static gchar *groups = NULL;
-static gchar *levels = NULL;
-static gchar *symbols = NULL;
-static gchar *keycodes = NULL;
-static gchar *geometry = NULL;
-static struct poptOption options[] = {
- {"groups", '\0', POPT_ARG_STRING, &groups, 0,
- "Keyboard groups to display, from 1-4. Up to four groups only may be displayed. Examples: --groups=3 or --groups=1,2,1,2",
- "group1[,group2[,group3[,group4]]]"},
- {"levels", '\0', POPT_ARG_STRING, &levels, 0,
- "Keyboard shift levels to display, from 1-64. Up to four shift levels only may be displayed. Examples: --levels=3 or --levels=1,2,1,2",
- "level1[,level2[,level3[,level4]]]"},
- {"symbols", '\0', POPT_ARG_STRING, &symbols, 0,
- "Symbols component of the keyboard. If you omit this option, it is obtained from the X server; that is, the keyboard that is currently configured is drawn. Examples: --symbols=us or --symbols=us(pc104)+iso9995-3+group(switch)+ctrl(nocaps)",
- NULL},
- {"keycodes", '\0', POPT_ARG_STRING, &keycodes, 0,
- "Keycodes component of the keyboard. If you omit this option, it is obtained from the X server; that is, the keyboard that is currently configured is drawn. Examples: --keycodes=xfree86+aliases(qwerty)",
- NULL},
- {"geometry", '\0', POPT_ARG_STRING, &geometry, 0,
- "Geometry xkb component. If you omit this option, it is obtained from the X server; that is, the keyboard that is currently configured is drawn. Example: --geometry=kinesis",
- NULL},
- {"track-modifiers", '\0', POPT_ARG_NONE, NULL, 3,
- "Track the current modifiers", NULL},
- {"track-config", '\0', POPT_ARG_NONE, NULL, 4,
- "Track the server XKB configuration", NULL},
- {"version", 'v', POPT_ARG_NONE, NULL, 1, "Show current version",
- NULL},
- POPT_AUTOHELP {NULL, '\0', 0, NULL, 0}
-};
-
-
-static gboolean
-set_groups (gchar * groups_option,
- GkbdKeyboardDrawingGroupLevel * groupLevels)
-{
- GkbdKeyboardDrawingGroupLevel *pgl = groupLevels;
- gint cntr, g;
-
- groupLevels[0].group =
- groupLevels[1].group =
- groupLevels[2].group = groupLevels[3].group = -1;
-
- if (groups_option == NULL)
- return TRUE;
-
- for (cntr = 4; --cntr >= 0;) {
- if (*groups_option == '\0')
- return FALSE;
-
- g = *groups_option - '1';
- if (g < 0 || g >= 4)
- return FALSE;
-
- pgl->group = g;
- /* printf ("group %d\n", pgl->group); */
-
- groups_option++;
- if (*groups_option == '\0')
- return TRUE;
- if (*groups_option != ',')
- return FALSE;
-
- groups_option++;
- pgl++;
- }
-
- return TRUE;
-}
-
-static gboolean
-set_levels (gchar * levels_option,
- GkbdKeyboardDrawingGroupLevel * groupLevels)
-{
- GkbdKeyboardDrawingGroupLevel *pgl = groupLevels;
- gint cntr, l;
- gchar *p;
-
- groupLevels[0].level =
- groupLevels[1].level =
- groupLevels[2].level = groupLevels[3].level = -1;
-
- if (levels_option == NULL)
- return TRUE;
-
- for (cntr = 4; --cntr >= 0;) {
- if (*levels_option == '\0')
- return FALSE;
-
- l = (gint) strtol (levels_option, &p, 10) - 1;
- if (l < 0 || l >= 64)
- return FALSE;
-
- pgl->level = l;
- /* printf ("level %d\n", pgl->level); */
-
- levels_option = p;
- if (*levels_option == '\0')
- return TRUE;
- if (*levels_option != ',')
- return FALSE;
-
- levels_option++;
- pgl++;
- }
-
- return TRUE;
-}
-
-static void
-bad_keycode (GkbdKeyboardDrawing * drawing, guint keycode)
-{
- g_warning
- ("got keycode %u, which is not on your keyboard according to your configuration",
- keycode);
-}
-
-gint
-main (gint argc, gchar ** argv)
-{
- GtkWidget *window;
- GtkWidget *gkbd_keyboard_drawing;
- GdkScreen *screen;
- gint monitor;
- GdkRectangle rect;
- poptContext popt_context;
- gint rc;
- GkbdKeyboardDrawingGroupLevel groupLevels[4] =
- { {0, 0}, {1, 0}, {0, 1}, {1, 1} };
- GkbdKeyboardDrawingGroupLevel *pgroupLevels[4] =
- { &groupLevels[0], &groupLevels[1], &groupLevels[2],
- &groupLevels[3]
- };
- gboolean track_config = False, track_modifiers = False;
-
- gtk_init (&argc, &argv);
-
- popt_context =
- poptGetContext ("kbdraw", argc, (const gchar **) argv, options,
- 0);
-
- for (rc = poptGetNextOpt (popt_context); rc > 0;
- rc = poptGetNextOpt (popt_context))
- switch (rc) {
- case 1:
- g_print ("kbdraw %s\n", VERSION);
- exit (0);
- case 3:
- track_modifiers = True;
- break;
- case 4:
- track_config = True;
- break;
- }
-
- if (rc != -1) {
- g_printerr ("%s: %s\n",
- poptBadOption (popt_context,
- POPT_BADOPTION_NOALIAS),
- poptStrerror (rc));
- exit (1);
- }
-
- if (!set_groups (groups, groupLevels)) {
- g_printerr ("--groups: invalid argument\n");
- exit (1);
- }
-
- if (!set_levels (levels, groupLevels)) {
- g_printerr ("--levels: invalid argument\n");
- exit (1);
- }
-
- window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
- g_signal_connect (G_OBJECT (window), "destroy",
- G_CALLBACK (gtk_main_quit), NULL);
-
- screen = gtk_window_get_screen (GTK_WINDOW (window));
- monitor = gdk_screen_get_monitor_at_point (screen, 0, 0);
- gdk_screen_get_monitor_geometry (screen, monitor, &rect);
- gtk_window_set_default_size (GTK_WINDOW (window),
- rect.width * 4 / 5,
- rect.height * 1 / 2);
-
- gtk_widget_show (window);
-
- gkbd_keyboard_drawing = gkbd_keyboard_drawing_new ();
- gtk_widget_show (gkbd_keyboard_drawing);
- gtk_container_add (GTK_CONTAINER (window), gkbd_keyboard_drawing);
-
- gkbd_keyboard_drawing_set_groups_levels (GKBD_KEYBOARD_DRAWING
- (gkbd_keyboard_drawing),
- pgroupLevels);
-
- if (track_modifiers)
- gkbd_keyboard_drawing_set_track_modifiers
- (GKBD_KEYBOARD_DRAWING (gkbd_keyboard_drawing), TRUE);
- if (track_config)
- gkbd_keyboard_drawing_set_track_config
- (GKBD_KEYBOARD_DRAWING (gkbd_keyboard_drawing), TRUE);
- g_signal_connect (G_OBJECT (gkbd_keyboard_drawing), "bad-keycode",
- G_CALLBACK (bad_keycode), NULL);
-
- if (symbols || geometry || keycodes) {
- XkbComponentNamesRec names;
- gint success;
-
- memset (&names, '\0', sizeof (names));
-
- if (symbols)
- names.symbols = symbols;
- else
- names.symbols = (gchar *)
- gkbd_keyboard_drawing_get_symbols
- (GKBD_KEYBOARD_DRAWING
- (gkbd_keyboard_drawing));
-
- if (keycodes)
- names.keycodes = keycodes;
- else
- names.keycodes = (gchar *)
- gkbd_keyboard_drawing_get_keycodes
- (GKBD_KEYBOARD_DRAWING
- (gkbd_keyboard_drawing));
-
- if (geometry)
- names.geometry = geometry;
- else
- names.geometry = (gchar *)
- gkbd_keyboard_drawing_get_geometry
- (GKBD_KEYBOARD_DRAWING
- (gkbd_keyboard_drawing));
-
- success =
- gkbd_keyboard_drawing_set_keyboard
- (GKBD_KEYBOARD_DRAWING (gkbd_keyboard_drawing),
- &names);
- if (!success) {
- g_printerr
- ("\nError loading new keyboard description with components:\n\n"
- " keycodes: %s\n" " types: %s\n"
- " compat: %s\n" " symbols: %s\n"
- " geometry: %s\n\n", names.keycodes,
- names.types, names.compat, names.symbols,
- names.geometry);
- exit (1);
- }
- }
-
- gtk_widget_grab_focus (gkbd_keyboard_drawing);
-
- gtk_main ();
-
- return 0;
-}