mousetweaks r2 - in first-lp-copy: . data pixmaps po src src/.libs
- From: frfumanti svn gnome org
- To: svn-commits-list gnome org
- Subject: mousetweaks r2 - in first-lp-copy: . data pixmaps po src src/.libs
- Date: Thu, 10 Jan 2008 17:22:45 +0000 (GMT)
Author: frfumanti
Date: Thu Jan 10 17:22:44 2008
New Revision: 2
URL: http://svn.gnome.org/viewvc/mousetweaks?rev=2&view=rev
Log:
Initial commit
Added:
first-lp-copy/ (props changed)
first-lp-copy/AUTHORS
first-lp-copy/COPYING
first-lp-copy/ChangeLog
first-lp-copy/INSTALL
first-lp-copy/Makefile.am
first-lp-copy/NEWS
first-lp-copy/README
first-lp-copy/TODO
first-lp-copy/autogen.sh (contents, props changed)
first-lp-copy/configure.ac
first-lp-copy/data/
first-lp-copy/data/DwellClick_Factory.server.in.in
first-lp-copy/data/Makefile.am
first-lp-copy/data/PointerCapture_Factory.server.in.in
first-lp-copy/data/ctw.glade
first-lp-copy/data/dwell-click-applet.glade
first-lp-copy/data/mousetweaks-preferences.desktop.in
first-lp-copy/data/mousetweaks.desktop.in
first-lp-copy/data/mousetweaks.glade
first-lp-copy/data/mousetweaks.schemas
first-lp-copy/data/pointer-capture-applet.glade
first-lp-copy/data/pointer-capture-applet.schemas
first-lp-copy/pixmaps/
first-lp-copy/pixmaps/Makefile.am
first-lp-copy/pixmaps/human-double.png
first-lp-copy/pixmaps/human-drag.png
first-lp-copy/pixmaps/human-right.png
first-lp-copy/pixmaps/human-single.png
first-lp-copy/po/
first-lp-copy/po/LINGUAS
first-lp-copy/po/POTFILES.in
first-lp-copy/po/de.po
first-lp-copy/po/fr.po
first-lp-copy/po/it.po
first-lp-copy/src/
first-lp-copy/src/.libs/
first-lp-copy/src/Makefile.am
first-lp-copy/src/dwell-click-applet.c
first-lp-copy/src/mt-common.c
first-lp-copy/src/mt-common.h
first-lp-copy/src/mt-ctw.c
first-lp-copy/src/mt-ctw.h
first-lp-copy/src/mt-dbus.c
first-lp-copy/src/mt-dbus.h
first-lp-copy/src/mt-main.c
first-lp-copy/src/mt-main.h
first-lp-copy/src/mt-session.c
first-lp-copy/src/mt-session.h
first-lp-copy/src/pointer-capture-applet.c
first-lp-copy/src/preferences.c
Added: first-lp-copy/AUTHORS
==============================================================================
--- (empty file)
+++ first-lp-copy/AUTHORS Thu Jan 10 17:22:44 2008
@@ -0,0 +1,7 @@
+Main author:
+ Gerd Kohlberger <lowfi chello at>
+
+Translation:
+ DE - Gerd Kohlberger <lowfi chello at>
+ IT, FR - Francesco Fumanti <francesco fumanti gmx net>
+
Added: first-lp-copy/COPYING
==============================================================================
--- (empty file)
+++ first-lp-copy/COPYING Thu Jan 10 17:22:44 2008
@@ -0,0 +1,674 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, 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
+them 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 prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If 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 convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU 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
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "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 PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM 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 PROGRAM (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 PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state 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 program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ 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 3 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, see <http://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+ <program> Copyright (C) <year> <name of author>
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+<http://www.gnu.org/licenses/>.
+
+ The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+<http://www.gnu.org/philosophy/why-not-lgpl.html>.
Added: first-lp-copy/INSTALL
==============================================================================
--- (empty file)
+++ first-lp-copy/INSTALL Thu Jan 10 17:22:44 2008
@@ -0,0 +1,234 @@
+Installation Instructions
+*************************
+
+Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
+2006 Free Software Foundation, Inc.
+
+This file is free documentation; the Free Software Foundation gives
+unlimited permission to copy, distribute and modify it.
+
+Basic Installation
+==================
+
+Briefly, the shell commands `./configure; make; make install' should
+configure, build, and install this package. The following
+more-detailed instructions are generic; see the `README' file for
+instructions specific to this package.
+
+ The `configure' shell script attempts to guess correct values for
+various system-dependent variables used during compilation. It uses
+those values to create a `Makefile' in each directory of the package.
+It may also create one or more `.h' files containing system-dependent
+definitions. Finally, it creates a shell script `config.status' that
+you can run in the future to recreate the current configuration, and a
+file `config.log' containing compiler output (useful mainly for
+debugging `configure').
+
+ It can also use an optional file (typically called `config.cache'
+and enabled with `--cache-file=config.cache' or simply `-C') that saves
+the results of its tests to speed up reconfiguring. Caching is
+disabled by default to prevent problems with accidental use of stale
+cache files.
+
+ If you need to do unusual things to compile the package, please try
+to figure out how `configure' could check whether to do them, and mail
+diffs or instructions to the address given in the `README' so they can
+be considered for the next release. If you are using the cache, and at
+some point `config.cache' contains results you don't want to keep, you
+may remove or edit it.
+
+ The file `configure.ac' (or `configure.in') is used to create
+`configure' by a program called `autoconf'. You need `configure.ac' if
+you want to change it or regenerate `configure' using a newer version
+of `autoconf'.
+
+The simplest way to compile this package is:
+
+ 1. `cd' to the directory containing the package's source code and type
+ `./configure' to configure the package for your system.
+
+ Running `configure' might take a while. While running, it prints
+ some messages telling which features it is checking for.
+
+ 2. Type `make' to compile the package.
+
+ 3. Optionally, type `make check' to run any self-tests that come with
+ the package.
+
+ 4. Type `make install' to install the programs and any data files and
+ documentation.
+
+ 5. You can remove the program binaries and object files from the
+ source code directory by typing `make clean'. To also remove the
+ files that `configure' created (so you can compile the package for
+ a different kind of computer), type `make distclean'. There is
+ also a `make maintainer-clean' target, but that is intended mainly
+ for the package's developers. If you use it, you may have to get
+ all sorts of other programs in order to regenerate files that came
+ with the distribution.
+
+Compilers and Options
+=====================
+
+Some systems require unusual options for compilation or linking that the
+`configure' script does not know about. Run `./configure --help' for
+details on some of the pertinent environment variables.
+
+ You can give `configure' initial values for configuration parameters
+by setting variables in the command line or in the environment. Here
+is an example:
+
+ ./configure CC=c99 CFLAGS=-g LIBS=-lposix
+
+ *Note Defining Variables::, for more details.
+
+Compiling For Multiple Architectures
+====================================
+
+You can compile the package for more than one kind of computer at the
+same time, by placing the object files for each architecture in their
+own directory. To do this, you can use GNU `make'. `cd' to the
+directory where you want the object files and executables to go and run
+the `configure' script. `configure' automatically checks for the
+source code in the directory that `configure' is in and in `..'.
+
+ With a non-GNU `make', it is safer to compile the package for one
+architecture at a time in the source code directory. After you have
+installed the package for one architecture, use `make distclean' before
+reconfiguring for another architecture.
+
+Installation Names
+==================
+
+By default, `make install' installs the package's commands under
+`/usr/local/bin', include files under `/usr/local/include', etc. You
+can specify an installation prefix other than `/usr/local' by giving
+`configure' the option `--prefix=PREFIX'.
+
+ You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files. If you
+pass the option `--exec-prefix=PREFIX' to `configure', the package uses
+PREFIX as the prefix for installing programs and libraries.
+Documentation and other data files still use the regular prefix.
+
+ In addition, if you use an unusual directory layout you can give
+options like `--bindir=DIR' to specify different values for particular
+kinds of files. Run `configure --help' for a list of the directories
+you can set and what kinds of files go in them.
+
+ If the package supports it, you can cause programs to be installed
+with an extra prefix or suffix on their names by giving `configure' the
+option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
+
+Optional Features
+=================
+
+Some packages pay attention to `--enable-FEATURE' options to
+`configure', where FEATURE indicates an optional part of the package.
+They may also pay attention to `--with-PACKAGE' options, where PACKAGE
+is something like `gnu-as' or `x' (for the X Window System). The
+`README' should mention any `--enable-' and `--with-' options that the
+package recognizes.
+
+ For packages that use the X Window System, `configure' can usually
+find the X include and library files automatically, but if it doesn't,
+you can use the `configure' options `--x-includes=DIR' and
+`--x-libraries=DIR' to specify their locations.
+
+Specifying the System Type
+==========================
+
+There may be some features `configure' cannot figure out automatically,
+but needs to determine by the type of machine the package will run on.
+Usually, assuming the package is built to be run on the _same_
+architectures, `configure' can figure that out, but if it prints a
+message saying it cannot guess the machine type, give it the
+`--build=TYPE' option. TYPE can either be a short name for the system
+type, such as `sun4', or a canonical name which has the form:
+
+ CPU-COMPANY-SYSTEM
+
+where SYSTEM can have one of these forms:
+
+ OS KERNEL-OS
+
+ See the file `config.sub' for the possible values of each field. If
+`config.sub' isn't included in this package, then this package doesn't
+need to know the machine type.
+
+ If you are _building_ compiler tools for cross-compiling, you should
+use the option `--target=TYPE' to select the type of system they will
+produce code for.
+
+ If you want to _use_ a cross compiler, that generates code for a
+platform different from the build platform, you should specify the
+"host" platform (i.e., that on which the generated programs will
+eventually be run) with `--host=TYPE'.
+
+Sharing Defaults
+================
+
+If you want to set default values for `configure' scripts to share, you
+can create a site shell script called `config.site' that gives default
+values for variables like `CC', `cache_file', and `prefix'.
+`configure' looks for `PREFIX/share/config.site' if it exists, then
+`PREFIX/etc/config.site' if it exists. Or, you can set the
+`CONFIG_SITE' environment variable to the location of the site script.
+A warning: not all `configure' scripts look for a site script.
+
+Defining Variables
+==================
+
+Variables not defined in a site shell script can be set in the
+environment passed to `configure'. However, some packages may run
+configure again during the build, and the customized values of these
+variables may be lost. In order to avoid this problem, you should set
+them in the `configure' command line, using `VAR=value'. For example:
+
+ ./configure CC=/usr/local2/bin/gcc
+
+causes the specified `gcc' to be used as the C compiler (unless it is
+overridden in the site shell script).
+
+Unfortunately, this technique does not work for `CONFIG_SHELL' due to
+an Autoconf bug. Until the bug is fixed you can use this workaround:
+
+ CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
+
+`configure' Invocation
+======================
+
+`configure' recognizes the following options to control how it operates.
+
+`--help'
+`-h'
+ Print a summary of the options to `configure', and exit.
+
+`--version'
+`-V'
+ Print the version of Autoconf used to generate the `configure'
+ script, and exit.
+
+`--cache-file=FILE'
+ Enable the cache: use and save the results of the tests in FILE,
+ traditionally `config.cache'. FILE defaults to `/dev/null' to
+ disable caching.
+
+`--config-cache'
+`-C'
+ Alias for `--cache-file=config.cache'.
+
+`--quiet'
+`--silent'
+`-q'
+ Do not print messages saying which checks are being made. To
+ suppress all normal output, redirect it to `/dev/null' (any error
+ messages will still be shown).
+
+`--srcdir=DIR'
+ Look for the package's source code in directory DIR. Usually
+ `configure' can determine that directory automatically.
+
+`configure' also accepts some other, not widely useful, options. Run
+`configure --help' for more details.
+
Added: first-lp-copy/Makefile.am
==============================================================================
--- (empty file)
+++ first-lp-copy/Makefile.am Thu Jan 10 17:22:44 2008
@@ -0,0 +1,5 @@
+SUBDIRS = src data pixmaps po
+
+EXTRA_DIST = intltool-extract.in intltool-merge.in intltool-update.in
+
+DISTCLEANFILES = intltool-extract intltool-merge intltool-update
Added: first-lp-copy/NEWS
==============================================================================
Added: first-lp-copy/README
==============================================================================
--- (empty file)
+++ first-lp-copy/README Thu Jan 10 17:22:44 2008
@@ -0,0 +1,17 @@
+MouseTweaks Version 0.2.2
+
+Description:
+ Mousetweaks provides mouse accessibility enhancements for the GNOME
+ desktop. Details for dwell and delay clicks can be found at:
+
+ https://wiki.ubuntu.com/Accessibility/Specs/MouseTweaks
+ https://wiki.ubuntu.com/Accessibility/Specs/MouseTweaks/Details
+
+ The tarball contains 3 executables:
+
+ * mousetweaks: Provides dwell-clicks and delay-clicks
+ * pointer-capture-applet: Applet to freeze the pointer on the panel.
+ * dwell-click-applet: Applet to select different dwelling click-types.
+
+Suggestions, Patches, Bugs:
+ Gerd Kohlberger <lowfi AT chello DOT at>
Added: first-lp-copy/TODO
==============================================================================
--- (empty file)
+++ first-lp-copy/TODO Thu Jan 10 17:22:44 2008
@@ -0,0 +1 @@
+
Added: first-lp-copy/autogen.sh
==============================================================================
--- (empty file)
+++ first-lp-copy/autogen.sh Thu Jan 10 17:22:44 2008
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+srcdir=`dirname $0`
+test -z "$srcdir" && srcdir=.
+
+ORIGDIR=`pwd`
+cd $srcdir
+
+autoreconf -v --install || exit 1
+intltoolize --copy --force --automake || exit 1
+
+cd $ORIGDIR || exit $?
+
+$srcdir/configure --enable-maintainer-mode "$@"
Added: first-lp-copy/configure.ac
==============================================================================
--- (empty file)
+++ first-lp-copy/configure.ac Thu Jan 10 17:22:44 2008
@@ -0,0 +1,159 @@
+AC_PREREQ(2.57)
+
+AC_INIT([mousetweaks], [0.3.0], [lowfi chello at])
+AC_CONFIG_SRCDIR([src])
+AC_CONFIG_HEADER([config.h])
+
+AC_PREFIX_DEFAULT([/usr])
+
+AM_INIT_AUTOMAKE([1.9 gnu])
+AM_MAINTAINER_MODE
+
+AC_PROG_CC
+AC_PROG_INSTALL
+AC_HEADER_STDC
+AC_C_CONST
+
+dnl *************
+dnl i18n
+dnl *************
+
+IT_PROG_INTLTOOL([0.35.0])
+
+GETTEXT_PACKAGE=mousetweaks
+AC_SUBST(GETTEXT_PACKAGE)
+
+AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Gettext Package])
+
+AC_SUBST([CONFIG_STATUS_DEPENDENCIES],['$(top_srcdir)/po/LINGUAS'])
+
+AM_GLIB_GNU_GETTEXT
+
+localedir=$datadir/locale
+AC_SUBST(localedir)
+
+dnl *************
+dnl deps
+dnl *************
+
+PKG_CHECK_MODULES(GCONF, gconf-2.0, have_gconf=true, have_gconf=false)
+if test "x${have_gconf}" = "xfalse"; then
+ AC_MSG_ERROR([No gconf-2.0 package information found])
+fi
+
+AC_SUBST(GCONF_CFLAGS)
+AC_SUBST(GCONF_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])
+fi
+
+AM_GCONF_SOURCE_2
+
+PKG_CHECK_MODULES(GTK, gtk+-2.0, have_gtk=true, have_gtk=false)
+if test "x${have_gtk}" = "xfalse"; then
+ AC_MSG_ERROR([No gtk+-2.0 package information found])
+fi
+
+AC_SUBST(GTK_CFLAGS)
+AC_SUBST(GTK_LIBS)
+
+PKG_CHECK_MODULES(GLADE, libglade-2.0, have_glade=true, have_glade=false)
+if test "x${have_glade}" = "xfalse"; then
+ AC_MSG_ERROR([No libglade-2.0 package information found])
+fi
+
+AC_SUBST(GLADE_CFLAGS)
+AC_SUBST(GLADE_LIBS)
+
+AC_ARG_ENABLE(pointer-capture,
+ [ --disable-pointer-capture Disable pointer-capture applet],
+ [build_pca=$enableval], [build_pca=yes])
+
+AM_CONDITIONAL(BUILD_PCA, test "x$build_pca" = "xyes")
+if test "$build_pca" = yes; then
+ AC_DEFINE(BUILD_PCA, 1, [Build pointer-capture applet])
+fi
+
+AC_ARG_ENABLE(click-type,
+ [ --disable-click-type Disable click-type applet],
+ [build_cta=$enableval], [build_cta=yes])
+
+AM_CONDITIONAL(BUILD_CTA, test "x$build_cta" = "xyes")
+if test "$build_cta" = yes; then
+ AC_DEFINE(BUILD_CTA, 1, [Build click-type applet])
+fi
+
+PKG_CHECK_MODULES(PANEL, libpanelapplet-2.0, have_panel=true, have_panel=false)
+if test "x${have_panel}" = "xfalse"; then
+ AC_MSG_ERROR([No libpanelapplet-2.0 package information found])
+fi
+
+AC_SUBST(PANEL_CFLAGS)
+AC_SUBST(PANEL_LIBS)
+
+PKG_CHECK_MODULES(CSPI, cspi-1.0, have_spi=true, have_spi=false)
+if test "x${have_spi}" = "xfalse"; then
+ AC_MSG_ERROR([No cspi-1.0 package information found])
+fi
+
+AC_SUBST(CSPI_CFLAGS)
+AC_SUBST(CSPI_LIBS)
+
+PKG_CHECK_MODULES(DBUS, dbus-glib-1, have_dbus=true, have_dbus=false)
+if test "x${have_dbus}" = "xfalse"; then
+ AC_MSG_ERROR([No dbus-glib-1 package information found])
+fi
+
+AC_SUBST(DBUS_CFLAGS)
+AC_SUBST(DBUS_LIBS)
+
+PKG_CHECK_MODULES(GNOME, libgnome-2.0, have_gnome=true, have_gnome=false)
+if test "x${have_gnome}" = "xfalse"; then
+ AC_MSG_ERROR([No libgnome-2.0 package information found])
+fi
+
+AC_SUBST(GNOME_CFLAGS)
+AC_SUBST(GNOME_LIBS)
+
+PKG_CHECK_MODULES(GNOMEUI, libgnomeui-2.0, have_gnomeui=true, have_gnomeui=false)
+if test "x${have_gnomeui}" = "xfalse"; then
+ AC_MSG_ERROR([No libxtst6 package information found])
+fi
+
+AC_SUBST(GNOMEUI_CFLAGS)
+AC_SUBST(GNOMEUI_LIBS)
+
+PKG_CHECK_MODULES(LIBDAEMON, libdaemon, have_daemon=true, have_daemon=false)
+if test "x${have_daemon}" = "xfalse"; then
+ AC_MSG_ERROR([No libdaemon package information found])
+fi
+
+AC_SUBST(LIBDAEMON_CFLAGS)
+AC_SUBST(LIBDAEMON_LIBS)
+
+dnl *************
+dnl dirs
+dnl *************
+
+icondir=$datadir/pixmaps
+AC_SUBST(icondir)
+
+gladedir=$datadir/mousetweaks
+AC_SUBST(gladedir)
+
+deskdir=$datadir/applications
+AC_SUBST(deskdir)
+
+AC_OUTPUT([Makefile
+ src/Makefile
+ data/Makefile
+ pixmaps/Makefile
+ po/Makefile.in])
+
+echo ""
+echo "Building panel applets:"
+echo " pointer-capture: $build_pca"
+echo " dwell-click: $build_cta"
+echo ""
Added: first-lp-copy/data/DwellClick_Factory.server.in.in
==============================================================================
--- (empty file)
+++ first-lp-copy/data/DwellClick_Factory.server.in.in Thu Jan 10 17:22:44 2008
@@ -0,0 +1,25 @@
+<oaf_info>
+<oaf_server iid="OAFIID:DwellClickApplet_Factory" type="exe"
+ location="@bindir@/dwell-click-applet">
+
+ <oaf_attribute name="repo_ids" type="stringv">
+ <item value="IDL:Bonobo/GenericFactory:1.0"/>
+ <item value="IDL:Bonobo/Unknown:1.0"/>
+ </oaf_attribute>
+ <oaf_attribute name="name" type="string" value="Dwell Click Factory"/>
+ <oaf_attribute name="description" type="string" value="Dwell Click Factory"/>
+</oaf_server>
+<oaf_server iid="OAFIID:DwellClickApplet" type="factory"
+ location="OAFIID:DwellClickApplet_Factory">
+
+ <oaf_attribute name="repo_ids" type="stringv">
+ <item value="IDL:GNOME/Vertigo/PanelAppletShell:1.0"/>
+ <item value="IDL:Bonobo/Control:1.0"/>
+ <item value="IDL:Bonobo/Unknown:1.0"/>
+ </oaf_attribute>
+ <oaf_attribute name="name" type="string" _value="Dwell Click"/>
+ <oaf_attribute name="description" type="string" _value="Select dwelling click-types"/>
+ <oaf_attribute name="panel:category" type="string" value="Accessibility"/>
+ <oaf_attribute name="panel:icon" type="string" value="gnome-dev-mouse-optical"/>
+</oaf_server>
+</oaf_info>
Added: first-lp-copy/data/Makefile.am
==============================================================================
--- (empty file)
+++ first-lp-copy/data/Makefile.am Thu Jan 10 17:22:44 2008
@@ -0,0 +1,78 @@
+if BUILD_PCA
+pca_schemas = pointer-capture-applet.schemas
+pca_glade = pointer-capture-applet.glade
+pca_server = PointerCapture_Factory.server.in
+endif
+
+if BUILD_CTA
+cta_glade = dwell-click-applet.glade
+cta_server = DwellClick_Factory.server.in
+endif
+
+serverdir = $(libdir)/bonobo/servers
+server_in_files = $(pca_server) $(cta_server)
+server_DATA = $(server_in_files:.server.in=.server)
+
+if BUILD_PCA
+$(pca_server): $(pca_server).in Makefile
+ sed -e "s|\ bindir\@|$(bindir)|g" < $< > $@
+endif
+
+if BUILD_CTA
+$(cta_server): $(cta_server).in Makefile
+ sed -e "s|\ bindir\@|$(bindir)|g" < $< > $@
+endif
+
+ INTLTOOL_SERVER_RULE@
+
+xmldir = $(gladedir)
+xml_DATA = mousetweaks.glade ctw.glade $(pca_glade) $(cta_glade)
+
+desktopdir = $(deskdir)
+desktop_in_files = mousetweaks.desktop.in mousetweaks-preferences.desktop.in
+desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
+
+ INTLTOOL_DESKTOP_RULE@
+
+autostartdir = /usr/share/gnome/autostart
+autostart_DATA = mousetweaks.desktop
+
+schemasdir = $(GCONF_SCHEMA_FILE_DIR)
+schemas_DATA = mousetweaks.schemas $(pca_schemas)
+
+if GCONF_SCHEMAS_INSTALL
+install-data-local: install-schemas
+install-schemas:
+ GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) \
+ $(GCONFTOOL) --makefile-install-rule mousetweaks.schemas
+if BUILD_PCA
+ GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) \
+ $(GCONFTOOL) --makefile-install-rule $(pca_schemas)
+endif
+
+uninstall-local: uninstall-schemas
+uninstall-schemas:
+ GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) \
+ $(GCONFTOOL) --makefile-uninstall-rule mousetweaks.schemas
+
+if BUILD_PCA
+ GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) \
+ $(GCONFTOOL) --makefile-uninstall-rule $(pca_schemas)
+endif
+
+else
+install-data-local:
+uninstall-local:
+endif
+
+EXTRA_DIST = \
+ $(xml_DATA) \
+ $(schemas_DATA) \
+ $(desktop_in_files) \
+ $(autostart_DATA) \
+ $(server_in_files).in
+
+DISTCLEANFILES = \
+ $(server_DATA) \
+ $(server_in_files) \
+ $(desktop_DATA)
Added: first-lp-copy/data/PointerCapture_Factory.server.in.in
==============================================================================
--- (empty file)
+++ first-lp-copy/data/PointerCapture_Factory.server.in.in Thu Jan 10 17:22:44 2008
@@ -0,0 +1,26 @@
+<oaf_info>
+<oaf_server iid="OAFIID:PointerCaptureApplet_Factory" type="exe"
+ location="@bindir@/pointer-capture-applet">
+
+ <oaf_attribute name="repo_ids" type="stringv">
+ <item value="IDL:Bonobo/GenericFactory:1.0"/>
+ <item value="IDL:Bonobo/Unknown:1.0"/>
+ </oaf_attribute>
+ <oaf_attribute name="name" type="string" value="Pointer Capture Factory"/>
+ <oaf_attribute name="description" type="string" value="Pointer Capture Factory"/>
+</oaf_server>
+
+<oaf_server iid="OAFIID:PointerCaptureApplet" type="factory"
+ location="OAFIID:PointerCaptureApplet_Factory">
+
+ <oaf_attribute name="repo_ids" type="stringv">
+ <item value="IDL:GNOME/Vertigo/PanelAppletShell:1.0"/>
+ <item value="IDL:Bonobo/Control:1.0"/>
+ <item value="IDL:Bonobo/Unknown:1.0"/>
+ </oaf_attribute>
+ <oaf_attribute name="name" type="string" _value="Pointer Capture"/>
+ <oaf_attribute name="description" type="string" _value="Area to lock the pointer"/>
+ <oaf_attribute name="panel:category" type="string" value="Accessibility"/>
+ <oaf_attribute name="panel:icon" type="string" value="gnome-dev-mouse-optical"/>
+</oaf_server>
+</oaf_info>
Added: first-lp-copy/data/ctw.glade
==============================================================================
--- (empty file)
+++ first-lp-copy/data/ctw.glade Thu Jan 10 17:22:44 2008
@@ -0,0 +1,213 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
+<!--Generated with glade3 3.3.4 on Sun Sep 2 19:43:48 2007 -->
+<glade-interface>
+ <widget class="GtkMenu" id="popup">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <child>
+ <widget class="GtkRadioMenuItem" id="both">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="label" translatable="yes">Show Icons and Text</property>
+ <property name="use_underline">True</property>
+ <property name="active">True</property>
+ <property name="draw_as_radio">True</property>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkRadioMenuItem" id="icon">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="label" translatable="yes">Show Icons only</property>
+ <property name="use_underline">True</property>
+ <property name="draw_as_radio">True</property>
+ <property name="group">both</property>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkRadioMenuItem" id="text">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="label" translatable="yes">Show Text only</property>
+ <property name="use_underline">True</property>
+ <property name="draw_as_radio">True</property>
+ <property name="group">both</property>
+ </widget>
+ </child>
+ </widget>
+ <widget class="GtkWindow" id="ctw">
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="title" translatable="yes">Click Type Window</property>
+ <property name="icon_name">gnome-dev-mouse-optical</property>
+ <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+ <child>
+ <widget class="GtkHBox" id="box">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="homogeneous">True</property>
+ <child>
+ <widget class="GtkRadioButton" id="single">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="relief">GTK_RELIEF_NONE</property>
+ <property name="focus_on_click">False</property>
+ <property name="image_position">GTK_POS_TOP</property>
+ <property name="response_id">0</property>
+ <property name="active">True</property>
+ <child>
+ <widget class="GtkVBox" id="vbox13">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="spacing">4</property>
+ <child>
+ <widget class="GtkImage" id="single_i">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="yalign">1</property>
+ <property name="pixbuf">human-single.png</property>
+ <property name="icon_size">5</property>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="single_l">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="yalign">0</property>
+ <property name="label" translatable="yes">Single Click</property>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkRadioButton" id="double">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="relief">GTK_RELIEF_NONE</property>
+ <property name="focus_on_click">False</property>
+ <property name="image_position">GTK_POS_TOP</property>
+ <property name="response_id">0</property>
+ <property name="group">single</property>
+ <child>
+ <widget class="GtkVBox" id="vbox14">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="spacing">4</property>
+ <child>
+ <widget class="GtkImage" id="double_i">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="yalign">1</property>
+ <property name="pixbuf">human-double.png</property>
+ <property name="icon_size">5</property>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="double_l">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="yalign">0</property>
+ <property name="label" translatable="yes">Double Click</property>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkRadioButton" id="drag">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="relief">GTK_RELIEF_NONE</property>
+ <property name="focus_on_click">False</property>
+ <property name="image_position">GTK_POS_TOP</property>
+ <property name="response_id">0</property>
+ <property name="group">single</property>
+ <child>
+ <widget class="GtkVBox" id="vbox15">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="spacing">4</property>
+ <child>
+ <widget class="GtkImage" id="drag_i">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="yalign">1</property>
+ <property name="pixbuf">human-drag.png</property>
+ <property name="icon_size">5</property>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="drag_l">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="yalign">0</property>
+ <property name="label" translatable="yes">Drag Click</property>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkRadioButton" id="right">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="relief">GTK_RELIEF_NONE</property>
+ <property name="focus_on_click">False</property>
+ <property name="image_position">GTK_POS_TOP</property>
+ <property name="response_id">0</property>
+ <property name="group">single</property>
+ <child>
+ <widget class="GtkVBox" id="vbox16">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="spacing">4</property>
+ <child>
+ <widget class="GtkImage" id="right_i">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="yalign">1</property>
+ <property name="pixbuf">human-right.png</property>
+ <property name="icon_size">5</property>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="right_l">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="yalign">0</property>
+ <property name="label" translatable="yes">Right Click</property>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+</glade-interface>
Added: first-lp-copy/data/dwell-click-applet.glade
==============================================================================
--- (empty file)
+++ first-lp-copy/data/dwell-click-applet.glade Thu Jan 10 17:22:44 2008
@@ -0,0 +1,241 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
+<!--Generated with glade3 3.3.3 on Mon Aug 13 20:46:54 2007 -->
+<glade-interface>
+ <widget class="GtkWindow" id="horizontal">
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="title" translatable="yes">Click Type Window</property>
+ <child>
+ <widget class="GtkHBox" id="box_hori">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="homogeneous">True</property>
+ <child>
+ <widget class="GtkRadioButton" id="single_click">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="tooltip" translatable="yes">Single Click</property>
+ <property name="relief">GTK_RELIEF_NONE</property>
+ <property name="focus_on_click">False</property>
+ <property name="image_position">GTK_POS_TOP</property>
+ <property name="response_id">0</property>
+ <property name="active">True</property>
+ <child>
+ <widget class="GtkImage" id="single_click_img">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="stock">gtk-missing-image</property>
+ <property name="icon_size">5</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkRadioButton" id="double_click">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="tooltip" translatable="yes">Double Click</property>
+ <property name="relief">GTK_RELIEF_NONE</property>
+ <property name="focus_on_click">False</property>
+ <property name="image_position">GTK_POS_TOP</property>
+ <property name="response_id">0</property>
+ <property name="group">single_click</property>
+ <child>
+ <widget class="GtkImage" id="double_click_img">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="stock">gtk-missing-image</property>
+ <property name="icon_size">5</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkRadioButton" id="drag_click">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="tooltip" translatable="yes">Drag Click</property>
+ <property name="relief">GTK_RELIEF_NONE</property>
+ <property name="focus_on_click">False</property>
+ <property name="image_position">GTK_POS_TOP</property>
+ <property name="response_id">0</property>
+ <property name="group">single_click</property>
+ <child>
+ <widget class="GtkImage" id="drag_click_img">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="stock">gtk-missing-image</property>
+ <property name="icon_size">5</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkRadioButton" id="right_click">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="tooltip" translatable="yes">Right Click</property>
+ <property name="relief">GTK_RELIEF_NONE</property>
+ <property name="focus_on_click">False</property>
+ <property name="image_position">GTK_POS_TOP</property>
+ <property name="response_id">0</property>
+ <property name="group">single_click</property>
+ <child>
+ <widget class="GtkImage" id="right_click_img">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="stock">gtk-missing-image</property>
+ <property name="icon_size">5</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="GtkWindow" id="vertical">
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <child>
+ <widget class="GtkVBox" id="box_vert">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <child>
+ <widget class="GtkRadioButton" id="single_click_v">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="tooltip" translatable="yes">Single Click</property>
+ <property name="relief">GTK_RELIEF_NONE</property>
+ <property name="focus_on_click">False</property>
+ <property name="image_position">GTK_POS_TOP</property>
+ <property name="response_id">0</property>
+ <property name="active">True</property>
+ <child>
+ <widget class="GtkImage" id="single_click_img_v">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="stock">gtk-missing-image</property>
+ <property name="icon_size">5</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkRadioButton" id="double_click_v">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="tooltip" translatable="yes">Double Click</property>
+ <property name="relief">GTK_RELIEF_NONE</property>
+ <property name="focus_on_click">False</property>
+ <property name="image_position">GTK_POS_TOP</property>
+ <property name="response_id">0</property>
+ <property name="group">single_click_v</property>
+ <child>
+ <widget class="GtkImage" id="double_click_img_v">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="stock">gtk-missing-image</property>
+ <property name="icon_size">5</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkRadioButton" id="drag_click_v">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="tooltip" translatable="yes">Drag Click</property>
+ <property name="relief">GTK_RELIEF_NONE</property>
+ <property name="focus_on_click">False</property>
+ <property name="image_position">GTK_POS_TOP</property>
+ <property name="response_id">0</property>
+ <property name="group">single_click_v</property>
+ <child>
+ <widget class="GtkImage" id="drag_click_img_v">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="stock">gtk-missing-image</property>
+ <property name="icon_size">5</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkRadioButton" id="right_click_v">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="tooltip" translatable="yes">Right Click</property>
+ <property name="relief">GTK_RELIEF_NONE</property>
+ <property name="focus_on_click">False</property>
+ <property name="image_position">GTK_POS_TOP</property>
+ <property name="response_id">0</property>
+ <property name="group">single_click_v</property>
+ <child>
+ <widget class="GtkImage" id="right_click_img_v">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="stock">gtk-missing-image</property>
+ <property name="icon_size">5</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="GtkAboutDialog" id="about">
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="border_width">5</property>
+ <property name="title">Info zu</property>
+ <property name="resizable">False</property>
+ <property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>
+ <property name="icon_name">gnome-dev-mouse-optical</property>
+ <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+ <property name="has_separator">False</property>
+ <property name="copyright">Copyright 2007 Â Gerd Kohlberger</property>
+ <property name="comments" translatable="yes">Applet to select different dwell-click types.
+Part of MouseTweaks</property>
+ <property name="authors">Gerd Kohlberger <lowfi chello at></property>
+ <property name="translator_credits">Gerd Kohlberger <lowfi chello at> - de
+Francesco Fumanti <francesco fumanti gmx net> - fr, it</property>
+ <property name="logo_icon_name">gnome-dev-mouse-optical</property>
+ <child internal-child="vbox">
+ <widget class="GtkVBox" id="dialog-vbox1">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="spacing">2</property>
+ <child>
+ <placeholder/>
+ </child>
+ <child internal-child="action_area">
+ <widget class="GtkHButtonBox" id="dialog-action_area1">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="layout_style">GTK_BUTTONBOX_END</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="pack_type">GTK_PACK_END</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+</glade-interface>
Added: first-lp-copy/data/mousetweaks-preferences.desktop.in
==============================================================================
--- (empty file)
+++ first-lp-copy/data/mousetweaks-preferences.desktop.in Thu Jan 10 17:22:44 2008
@@ -0,0 +1,12 @@
+[Desktop Entry]
+_Name=Mousetweaks Preferences
+_Comment=Accessibility Mouse Enhancements
+Exec=mousetweaks-preferences
+Icon=gnome-dev-mouse-optical
+Terminal=false
+Type=Application
+StartupNotify=true
+Categories=Accessibility;
+OnlyShowIn=GNOME;
+Encoding=UTF-8
+
Added: first-lp-copy/data/mousetweaks.desktop.in
==============================================================================
--- (empty file)
+++ first-lp-copy/data/mousetweaks.desktop.in Thu Jan 10 17:22:44 2008
@@ -0,0 +1,12 @@
+[Desktop Entry]
+_Name=Mousetweaks
+_Comment=Accessibility Mouse Enhancements
+Exec=mousetweaks
+Icon=gnome-dev-mouse-optical
+Terminal=false
+Type=Application
+StartupNotify=true
+Categories=Accessibility;
+OnlyShowIn=GNOME;
+Encoding=UTF-8
+
Added: first-lp-copy/data/mousetweaks.glade
==============================================================================
--- (empty file)
+++ first-lp-copy/data/mousetweaks.glade Thu Jan 10 17:22:44 2008
@@ -0,0 +1,892 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
+<!--Generated with glade3 3.3.4 on Sun Sep 2 21:46:29 2007 -->
+<glade-interface>
+ <widget class="GtkWindow" id="preferences">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="border_width">5</property>
+ <property name="title" translatable="yes">MouseTweaks Preferences</property>
+ <property name="window_position">GTK_WIN_POS_CENTER</property>
+ <property name="icon_name">gnome-dev-mouse-optical</property>
+ <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+ <signal name="delete_event" handler="gtk_main_quit"/>
+ <child>
+ <widget class="GtkVBox" id="vbox6">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="spacing">8</property>
+ <child>
+ <widget class="GtkNotebook" id="notebook">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <child>
+ <widget class="GtkVBox" id="vbox7">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="border_width">12</property>
+ <property name="spacing">8</property>
+ <child>
+ <widget class="GtkTable" id="table11">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="n_rows">2</property>
+ <property name="n_columns">3</property>
+ <property name="column_spacing">6</property>
+ <property name="row_spacing">12</property>
+ <child>
+ <widget class="GtkLabel" id="label33">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes"><b>Ignore Pointer Movement</b></property>
+ <property name="use_markup">True</property>
+ </widget>
+ <packing>
+ <property name="right_attach">3</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label32">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Threshold</property>
+ </widget>
+ <packing>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label31">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="xalign">1</property>
+ <property name="label" translatable="yes">pixels</property>
+ </widget>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkHScale" id="threshold">
+ <property name="width_request">200</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="update_policy">GTK_UPDATE_DISCONTINUOUS</property>
+ <property name="adjustment">10 0 30 1 0 0</property>
+ <property name="digits">0</property>
+ <property name="value_pos">GTK_POS_RIGHT</property>
+ <signal name="value_changed" handler="threshold_changed"/>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="tab_expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label28">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="label" translatable="yes">General</property>
+ </widget>
+ <packing>
+ <property name="type">tab</property>
+ <property name="tab_expand">False</property>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkVBox" id="vbox2">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="border_width">12</property>
+ <property name="spacing">8</property>
+ <child>
+ <widget class="GtkTable" id="table5">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="n_rows">2</property>
+ <property name="n_columns">3</property>
+ <property name="column_spacing">6</property>
+ <property name="row_spacing">6</property>
+ <child>
+ <widget class="GtkHScale" id="dwell_time">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="tooltip_text">Time the pointer needs to remain at the same position</property>
+ <property name="update_policy">GTK_UPDATE_DISCONTINUOUS</property>
+ <property name="adjustment">1.5 0.5 3 0.10000000000000001 0 0</property>
+ <property name="value_pos">GTK_POS_RIGHT</property>
+ <signal name="value_changed" handler="dwell_time"/>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label13">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="xalign">1</property>
+ <property name="label" translatable="yes">seconds</property>
+ </widget>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label14">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Time</property>
+ </widget>
+ <packing>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkCheckButton" id="dwell_enable">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="tooltip_text">Use dwell click</property>
+ <property name="label" translatable="yes">Enable</property>
+ <property name="response_id">0</property>
+ <property name="draw_indicator">True</property>
+ <signal name="toggled" handler="dwell_enable"/>
+ </widget>
+ <packing>
+ <property name="right_attach">3</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkFrame" id="frame1">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">GTK_SHADOW_NONE</property>
+ <child>
+ <widget class="GtkAlignment" id="alignment1">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="top_padding">6</property>
+ <property name="left_padding">20</property>
+ <child>
+ <widget class="GtkVBox" id="box_ctw">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <child>
+ <widget class="GtkCheckButton" id="dwell_show_ctw">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="tooltip_text">Select different click type</property>
+ <property name="label" translatable="yes">Show click type window</property>
+ <property name="response_id">0</property>
+ <property name="draw_indicator">True</property>
+ <signal name="toggled" handler="show_ctw"/>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkRadioButton" id="dwell_mode_ctw">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="tooltip_text">Perform clicks by selecting them</property>
+ <property name="label" translatable="yes">Dwelling with Click Type Window</property>
+ <property name="response_id">0</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ <signal name="toggled" handler="mode_changed"/>
+ </widget>
+ <packing>
+ <property name="type">label_item</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkFrame" id="frame2">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">GTK_SHADOW_NONE</property>
+ <child>
+ <widget class="GtkAlignment" id="alignment2">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="top_padding">6</property>
+ <property name="left_padding">20</property>
+ <child>
+ <widget class="GtkTable" id="box_gesture">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="n_rows">4</property>
+ <property name="n_columns">2</property>
+ <property name="column_spacing">6</property>
+ <property name="row_spacing">2</property>
+ <child>
+ <widget class="GtkLabel" id="label15">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Single Click</property>
+ </widget>
+ <packing>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label16">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Double Click</property>
+ </widget>
+ <packing>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label17">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Drag Click</property>
+ </widget>
+ <packing>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label18">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Right Click</property>
+ </widget>
+ <packing>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkComboBox" id="dwell_gest_single">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="items" translatable="yes">Move Left
+Move Right
+Move Up
+Move Down
+Disabled</property>
+ <signal name="changed" handler="gesture_single"/>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkComboBox" id="dwell_gest_double">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="items" translatable="yes">Move Left
+Move Right
+Move Up
+Move Down
+Disabled</property>
+ <signal name="changed" handler="gesture_double"/>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkComboBox" id="dwell_gest_drag">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="items" translatable="yes">Move Left
+Move Right
+Move Up
+Move Down
+Disabled</property>
+ <signal name="changed" handler="gesture_drag"/>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkComboBox" id="dwell_gest_right">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="items" translatable="yes">Move Left
+Move Right
+Move Up
+Move Down
+Disabled</property>
+ <signal name="changed" handler="gesture_right"/>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkRadioButton" id="dwell_mode_gesture">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="tooltip_text">Perform clicks with a mouse gesture</property>
+ <property name="label" translatable="yes">Dwelling with Mouse Gestures</property>
+ <property name="response_id">0</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">dwell_mode_ctw</property>
+ <signal name="toggled" handler="mode_changed"/>
+ </widget>
+ <packing>
+ <property name="type">label_item</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ <property name="tab_expand">False</property>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label7">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="label" translatable="yes">Dwell Click</property>
+ </widget>
+ <packing>
+ <property name="type">tab</property>
+ <property name="position">1</property>
+ <property name="tab_expand">False</property>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkVBox" id="vbox9">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="border_width">12</property>
+ <child>
+ <widget class="GtkTable" id="table9">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="n_rows">2</property>
+ <property name="n_columns">3</property>
+ <property name="column_spacing">6</property>
+ <property name="row_spacing">6</property>
+ <child>
+ <widget class="GtkHScale" id="delay_time">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="tooltip_text">Time to hold the left mouse button before a context menu opens</property>
+ <property name="update_policy">GTK_UPDATE_DISCONTINUOUS</property>
+ <property name="adjustment">1.5 0.5 3 0.10000000000000001 0 0</property>
+ <property name="value_pos">GTK_POS_RIGHT</property>
+ <signal name="value_changed" handler="delay_time"/>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label25">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="xalign">1</property>
+ <property name="label" translatable="yes">seconds</property>
+ </widget>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label26">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Delay</property>
+ </widget>
+ <packing>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkCheckButton" id="delay_enable">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="tooltip_text">Use delay click</property>
+ <property name="label" translatable="yes">Enable</property>
+ <property name="response_id">0</property>
+ <property name="draw_indicator">True</property>
+ <signal name="toggled" handler="delay_enable"/>
+ </widget>
+ <packing>
+ <property name="right_attach">3</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">2</property>
+ <property name="tab_expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label8">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="label" translatable="yes">Delay Click</property>
+ </widget>
+ <packing>
+ <property name="type">tab</property>
+ <property name="position">2</property>
+ <property name="tab_expand">False</property>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkHButtonBox" id="hbuttonbox1">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="layout_style">GTK_BUTTONBOX_END</property>
+ <child>
+ <widget class="GtkButton" id="close">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="label">gtk-close</property>
+ <property name="use_stock">True</property>
+ <property name="response_id">0</property>
+ <signal name="clicked" handler="gtk_main_quit"/>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="GtkAboutDialog" id="about">
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="border_width">5</property>
+ <property name="title">About MouseTweaks</property>
+ <property name="resizable">False</property>
+ <property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>
+ <property name="icon_name">gnome-dev-mouse-optical</property>
+ <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+ <property name="has_separator">False</property>
+ <property name="program_name">MouseTweaks</property>
+ <property name="copyright">Copyright 2007 Â Gerd Kohlberger</property>
+ <property name="comments" translatable="yes">Mouse enhancements for the Gnome Desktop</property>
+ <property name="license"> GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, 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 software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, 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 redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+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 give any other recipients of the Program a copy of this License
+along with the Program.
+
+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 Program or any portion
+of it, thus forming a work based on the Program, 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) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+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 Program, 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 Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) 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; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, 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 executable. 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.
+
+If distribution of executable or 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 counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program 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.
+
+ 5. 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 Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program 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.
+
+ 7. 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 Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program 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 Program.
+
+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.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program 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.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the 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 Program
+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 Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, 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
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "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 PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. 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 PROGRAM 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 PROGRAM (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 PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.</property>
+ <property name="authors">Gerd Kohlberger <lowfi chello at></property>
+ <property name="translator_credits">Gerd Kohlberger <lowfi chello at> - de
+Francesco Fumanti <francesco fumanti gmx net> - fr, it</property>
+ <property name="logo_icon_name">gnome-dev-mouse-optical</property>
+ <child internal-child="vbox">
+ <widget class="GtkVBox" id="dialog-vbox1">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="spacing">2</property>
+ <child>
+ <placeholder/>
+ </child>
+ <child internal-child="action_area">
+ <widget class="GtkHButtonBox" id="dialog-action_area1">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="layout_style">GTK_BUTTONBOX_END</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="pack_type">GTK_PACK_END</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+</glade-interface>
Added: first-lp-copy/data/mousetweaks.schemas
==============================================================================
--- (empty file)
+++ first-lp-copy/data/mousetweaks.schemas Thu Jan 10 17:22:44 2008
@@ -0,0 +1,149 @@
+<?xml version="1.0"?>
+<gconfschemafile>
+ <schemalist>
+ <schema>
+ <key>/schemas/apps/mousetweaks/threshold</key>
+ <applyto>/apps/mousetweaks/threshold</applyto>
+ <owner>mousetweaks</owner>
+ <type>int</type>
+ <default>15</default>
+ <locale name="C">
+ <short>Movement Threshold</short>
+ <long>Distance in pixels before movement will be recognized</long>
+ </locale>
+ </schema>
+
+ <schema>
+ <key>/schemas/apps/mousetweaks/delay_enabled</key>
+ <applyto>/apps/mousetweaks/delay_enabled</applyto>
+ <owner>mousetweaks</owner>
+ <type>bool</type>
+ <default>false</default>
+ <locale name="C">
+ <short>Enable Delay Click</short>
+ <long>Enable Delay Click</long>
+ </locale>
+ </schema>
+
+ <schema>
+ <key>/schemas/apps/mousetweaks/delay_time</key>
+ <applyto>/apps/mousetweaks/delay_time</applyto>
+ <owner>mousetweaks</owner>
+ <type>float</type>
+ <default>1.50</default>
+ <locale name="C">
+ <short>Delay Click Time</short>
+ <long>Seconds to hold left button before the context menu opens</long>
+ </locale>
+ </schema>
+
+ <schema>
+ <key>/schemas/apps/mousetweaks/dwell_enabled</key>
+ <applyto>/apps/mousetweaks/dwell_enabled</applyto>
+ <owner>mousetweaks</owner>
+ <type>bool</type>
+ <default>false</default>
+ <locale name="C">
+ <short>Enable Dwell Click</short>
+ <long>Enable Dwell Click</long>
+ </locale>
+ </schema>
+
+ <schema>
+ <key>/schemas/apps/mousetweaks/dwell_time</key>
+ <applyto>/apps/mousetweaks/dwell_time</applyto>
+ <owner>mousetweaks</owner>
+ <type>float</type>
+ <default>1.50</default>
+ <locale name="C">
+ <short>Dwell Click Time</short>
+ <long>Seconds before the click is exectued</long>
+ </locale>
+ </schema>
+
+ <schema>
+ <key>/schemas/apps/mousetweaks/dwell_gesture_single</key>
+ <applyto>/apps/mousetweaks/dwell_gesture_single</applyto>
+ <owner>mousetweaks</owner>
+ <type>int</type>
+ <default>0</default>
+ <locale name="C">
+ <short>Gesture Single Click</short>
+ <long>Direction to perform a single click (0 = Left, 1 = Right, 2 = Up, 3 = Down)</long>
+ </locale>
+ </schema>
+
+ <schema>
+ <key>/schemas/apps/mousetweaks/dwell_gesture_double</key>
+ <applyto>/apps/mousetweaks/dwell_gesture_double</applyto>
+ <owner>mousetweaks</owner>
+ <type>int</type>
+ <default>2</default>
+ <locale name="C">
+ <short>Gesture Double Click</short>
+ <long>Direction to perform a double click (0 = Left, 1 = Right, 2 = Up, 3 = Down)</long>
+ </locale>
+ </schema>
+
+ <schema>
+ <key>/schemas/apps/mousetweaks/dwell_gesture_drag</key>
+ <applyto>/apps/mousetweaks/dwell_gesture_drag</applyto>
+ <owner>mousetweaks</owner>
+ <type>int</type>
+ <default>3</default>
+ <locale name="C">
+ <short>Gesture Drag Click</short>
+ <long>Direction to perform dragging (0 = Left, 1 = Right, 2 = Up, 3 = Down)</long>
+ </locale>
+ </schema>
+
+ <schema>
+ <key>/schemas/apps/mousetweaks/dwell_gesture_right</key>
+ <applyto>/apps/mousetweaks/dwell_gesture_right</applyto>
+ <owner>mousetweaks</owner>
+ <type>int</type>
+ <default>1</default>
+ <locale name="C">
+ <short>Gesture Right Click</short>
+ <long>Direction to perform a right click (0 = Left, 1 = Right, 2 = Up, 3 = Down)</long>
+ </locale>
+ </schema>
+
+ <schema>
+ <key>/schemas/apps/mousetweaks/dwell_mode</key>
+ <applyto>/apps/mousetweaks/dwell_mode</applyto>
+ <owner>mousetweaks</owner>
+ <type>int</type>
+ <default>1</default>
+ <locale name="C">
+ <short>Dwell Click Mode</short>
+ <long>(0 = Gesture mode, 1 = Click Type window mode)</long>
+ </locale>
+ </schema>
+
+ <schema>
+ <key>/schemas/apps/mousetweaks/dwell_show_ctw</key>
+ <applyto>/apps/mousetweaks/dwell_show_ctw</applyto>
+ <owner>mousetweaks</owner>
+ <type>bool</type>
+ <default>false</default>
+ <locale name="C">
+ <short>Show Click Type Window</short>
+ <long>Show Click Type Window</long>
+ </locale>
+ </schema>
+
+ <schema>
+ <key>/schemas/apps/mousetweaks/button_layout</key>
+ <applyto>/apps/mousetweaks/button_layout</applyto>
+ <owner>mousetweaks</owner>
+ <type>int</type>
+ <default>2</default>
+ <locale name="C">
+ <short>Button Layout</short>
+ <long>Style of Click Type Buttons (0 = Text, 1 = Icon, 2 = Both)</long>
+ </locale>
+ </schema>
+
+ </schemalist>
+</gconfschemafile>
Added: first-lp-copy/data/pointer-capture-applet.glade
==============================================================================
--- (empty file)
+++ first-lp-copy/data/pointer-capture-applet.glade Thu Jan 10 17:22:44 2008
@@ -0,0 +1,436 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
+<!--Generated with glade3 3.3.3 on Mon Aug 13 20:46:23 2007 -->
+<glade-interface>
+ <widget class="GtkDialog" id="capture_preferences">
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="border_width">5</property>
+ <property name="title" translatable="yes">Pointer Capture Preferences</property>
+ <property name="window_position">GTK_WIN_POS_CENTER</property>
+ <property name="icon">.</property>
+ <property name="icon_name">gnome-dev-mouse-optical</property>
+ <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+ <property name="has_separator">False</property>
+ <child internal-child="vbox">
+ <widget class="GtkVBox" id="dialog-vbox1">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <child>
+ <widget class="GtkVBox" id="vbox1">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="border_width">8</property>
+ <property name="spacing">26</property>
+ <child>
+ <widget class="GtkTable" id="capture_table">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="n_rows">2</property>
+ <property name="n_columns">4</property>
+ <property name="column_spacing">8</property>
+ <property name="row_spacing">10</property>
+ <child>
+ <widget class="GtkHBox" id="hbox3">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="spacing">4</property>
+ <child>
+ <widget class="GtkCheckButton" id="cap_ctrl">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="tooltip" translatable="yes">Modifier Key</property>
+ <property name="label">Ctrl</property>
+ <property name="response_id">0</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkCheckButton" id="cap_alt">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="tooltip" translatable="yes">Modifier Key</property>
+ <property name="label">Alt</property>
+ <property name="response_id">0</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkCheckButton" id="cap_shift">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="tooltip" translatable="yes">Modifier Key</property>
+ <property name="label">Shift</property>
+ <property name="response_id">0</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="left_attach">3</property>
+ <property name="right_attach">4</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label11">
+ <property name="width_request">12</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ </widget>
+ <packing>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkSpinButton" id="cap_button">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="tooltip" translatable="yes">Mouse Button (1 = Left, 2 = Middle, 3 = Right)</property>
+ <property name="editable">False</property>
+ <property name="adjustment">0 0 3 1 1 1</property>
+ <property name="numeric">True</property>
+ </widget>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label10">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Button</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label9">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes"><b>Capture Modifier</b></property>
+ <property name="use_markup">True</property>
+ </widget>
+ <packing>
+ <property name="right_attach">4</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkTable" id="release_table">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="n_rows">2</property>
+ <property name="n_columns">4</property>
+ <property name="column_spacing">8</property>
+ <property name="row_spacing">10</property>
+ <child>
+ <widget class="GtkHBox" id="hbox1">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="spacing">4</property>
+ <child>
+ <widget class="GtkCheckButton" id="rel_ctrl">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="tooltip" translatable="yes">Modifier Key</property>
+ <property name="label">Ctrl</property>
+ <property name="response_id">0</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkCheckButton" id="rel_alt">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="tooltip" translatable="yes">Modifier Key</property>
+ <property name="label">Alt</property>
+ <property name="response_id">0</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkCheckButton" id="rel_shift">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="tooltip" translatable="yes">Modifier Key</property>
+ <property name="label">Shift</property>
+ <property name="response_id">0</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="left_attach">3</property>
+ <property name="right_attach">4</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label1">
+ <property name="width_request">12</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ </widget>
+ <packing>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkSpinButton" id="rel_button">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="tooltip" translatable="yes">Mouse Button (1 = Left, 2 = Middle, 3 = Right)</property>
+ <property name="editable">False</property>
+ <property name="adjustment">1 1 3 1 1 1</property>
+ <property name="numeric">True</property>
+ </widget>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label5">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Button</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label4">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes"><b>Release Modifier</b></property>
+ <property name="use_markup">True</property>
+ </widget>
+ <packing>
+ <property name="right_attach">4</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkTable" id="size_table">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="n_rows">2</property>
+ <property name="n_columns">4</property>
+ <property name="column_spacing">8</property>
+ <property name="row_spacing">10</property>
+ <child>
+ <widget class="GtkLabel" id="label14">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes"><b>Applet Size</b></property>
+ <property name="use_markup">True</property>
+ </widget>
+ <packing>
+ <property name="right_attach">4</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label12">
+ <property name="width_request">12</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ </widget>
+ <packing>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label3">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Width</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label2">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">pixels</property>
+ </widget>
+ <packing>
+ <property name="left_attach">3</property>
+ <property name="right_attach">4</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkSpinButton" id="size">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="adjustment">100 20 200 1 1 1</property>
+ <property name="snap_to_ticks">True</property>
+ <property name="numeric">True</property>
+ <property name="update_policy">GTK_UPDATE_IF_VALID</property>
+ </widget>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child internal-child="action_area">
+ <widget class="GtkHButtonBox" id="dialog-action_area1">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="layout_style">GTK_BUTTONBOX_END</property>
+ <child>
+ <widget class="GtkButton" id="close">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="label">gtk-close</property>
+ <property name="use_stock">True</property>
+ <property name="response_id">0</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="pack_type">GTK_PACK_END</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <widget class="GtkAboutDialog" id="about">
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="border_width">5</property>
+ <property name="title">Info zu</property>
+ <property name="resizable">False</property>
+ <property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>
+ <property name="icon_name">gnome-dev-mouse-optical</property>
+ <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+ <property name="has_separator">False</property>
+ <property name="copyright">Copyright 2007 Â Gerd Kohlberger</property>
+ <property name="comments" translatable="yes">Area to freeze the mouse pointer on the panel.
+Part of MouseTweaks</property>
+ <property name="authors">Gerd Kohlberger <lowfi chello at></property>
+ <property name="translator_credits">Gerd Kohlberger <lowfi chello at> - de
+Francesco Fumanti <francesco fumanti gmx net> - fr, it</property>
+ <property name="logo_icon_name">gnome-dev-mouse-optical</property>
+ <child internal-child="vbox">
+ <widget class="GtkVBox" id="dialog-vbox2">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="spacing">2</property>
+ <child>
+ <placeholder/>
+ </child>
+ <child internal-child="action_area">
+ <widget class="GtkHButtonBox" id="dialog-action_area2">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="layout_style">GTK_BUTTONBOX_END</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="pack_type">GTK_PACK_END</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+</glade-interface>
Added: first-lp-copy/data/pointer-capture-applet.schemas
==============================================================================
--- (empty file)
+++ first-lp-copy/data/pointer-capture-applet.schemas Thu Jan 10 17:22:44 2008
@@ -0,0 +1,105 @@
+<?xml version="1.0"?>
+<gconfschemafile>
+ <schemalist>
+
+ <schema>
+ <key>/schemas/apps/pointer-capture/size</key>
+ <owner>pointer-capture</owner>
+ <type>int</type>
+ <default>100</default>
+ <locale name="C">
+ <short>Size of capture area</short>
+ <long>The width in pixels of the capture area</long>
+ </locale>
+ </schema>
+
+ <schema>
+ <key>/schemas/apps/pointer-capture/capture_button</key>
+ <owner>pointer-capture</owner>
+ <type>int</type>
+ <default>0</default>
+ <locale name="C">
+ <short>Capture button</short>
+ <long>Button to initiate pointer capturing</long>
+ </locale>
+ </schema>
+
+ <schema>
+ <key>/schemas/apps/pointer-capture/release_button</key>
+ <owner>pointer-capture</owner>
+ <type>int</type>
+ <default>1</default>
+ <locale name="C">
+ <short>Release button</short>
+ <long>Button to release the pointer</long>
+ </locale>
+ </schema>
+
+ <schema>
+ <key>/schemas/apps/pointer-capture/capture_mod_shift</key>
+ <owner>pointer-capture</owner>
+ <type>bool</type>
+ <default>false</default>
+ <locale name="C">
+ <short>Capture modifier</short>
+ <long>Key modifier</long>
+ </locale>
+ </schema>
+
+ <schema>
+ <key>/schemas/apps/pointer-capture/capture_mod_alt</key>
+ <owner>pointer-capture</owner>
+ <type>bool</type>
+ <default>false</default>
+ <locale name="C">
+ <short>Capture modifier</short>
+ <long>Key modifier</long>
+ </locale>
+ </schema>
+
+ <schema>
+ <key>/schemas/apps/pointer-capture/capture_mod_ctrl</key>
+ <owner>pointer-capture</owner>
+ <type>bool</type>
+ <default>false</default>
+ <locale name="C">
+ <short>Capture modifier</short>
+ <long>Key modifier</long>
+ </locale>
+ </schema>
+
+ <schema>
+ <key>/schemas/apps/pointer-capture/release_mod_shift</key>
+ <owner>pointer-capture</owner>
+ <type>bool</type>
+ <default>false</default>
+ <locale name="C">
+ <short>Release modifier</short>
+ <long>Key modifier</long>
+ </locale>
+ </schema>
+
+ <schema>
+ <key>/schemas/apps/pointer-capture/release_mod_alt</key>
+ <owner>pointer-capture</owner>
+ <type>bool</type>
+ <default>false</default>
+ <locale name="C">
+ <short>Release modifier</short>
+ <long>Key modifier</long>
+ </locale>
+ </schema>
+
+ <schema>
+ <key>/schemas/apps/pointer-capture/release_mod_ctrl</key>
+ <owner>pointer-capture</owner>
+ <type>bool</type>
+ <default>false</default>
+ <locale name="C">
+ <short>Release modifier</short>
+ <long>Key modifier</long>
+ </locale>
+ </schema>
+
+ </schemalist>
+</gconfschemafile>
Added: first-lp-copy/pixmaps/Makefile.am
==============================================================================
--- (empty file)
+++ first-lp-copy/pixmaps/Makefile.am Thu Jan 10 17:22:44 2008
@@ -0,0 +1,8 @@
+pixdir = $(gladedir)
+pix_DATA = \
+ human-single.png \
+ human-double.png \
+ human-drag.png \
+ human-right.png
+
+EXTRA_DIST = $(pix_DATA)
Added: first-lp-copy/pixmaps/human-double.png
==============================================================================
Binary files (empty file) and first-lp-copy/pixmaps/human-double.png Thu Jan 10 17:22:44 2008 differ
Added: first-lp-copy/pixmaps/human-drag.png
==============================================================================
Binary files (empty file) and first-lp-copy/pixmaps/human-drag.png Thu Jan 10 17:22:44 2008 differ
Added: first-lp-copy/pixmaps/human-right.png
==============================================================================
Binary files (empty file) and first-lp-copy/pixmaps/human-right.png Thu Jan 10 17:22:44 2008 differ
Added: first-lp-copy/pixmaps/human-single.png
==============================================================================
Binary files (empty file) and first-lp-copy/pixmaps/human-single.png Thu Jan 10 17:22:44 2008 differ
Added: first-lp-copy/po/LINGUAS
==============================================================================
--- (empty file)
+++ first-lp-copy/po/LINGUAS Thu Jan 10 17:22:44 2008
@@ -0,0 +1,5 @@
+# please keep this list sorted alphabetically
+#
+de
+fr
+it
Added: first-lp-copy/po/POTFILES.in
==============================================================================
--- (empty file)
+++ first-lp-copy/po/POTFILES.in Thu Jan 10 17:22:44 2008
@@ -0,0 +1,13 @@
+data/dwell-click-applet.glade
+data/mousetweaks.glade
+data/ctw.glade
+data/pointer-capture-applet.glade
+data/mousetweaks.desktop.in
+data/mousetweaks-preferences.desktop.in
+data/DwellClick_Factory.server.in.in
+data/PointerCapture_Factory.server.in.in
+src/mt-main.c
+src/preferences.c
+src/pointer-capture-applet.c
+src/mt-ctw.c
+src/mt-dbus.c
Added: first-lp-copy/src/Makefile.am
==============================================================================
--- (empty file)
+++ first-lp-copy/src/Makefile.am Thu Jan 10 17:22:44 2008
@@ -0,0 +1,53 @@
+INCLUDES = \
+ $(GLADE_CFLAGS) \
+ $(PANEL_CFLAGS) \
+ $(CSPI_CFLAGS) \
+ $(DBUS_CFLAGS) \
+ $(LIBDAEMON_CFLAGS)
+
+AM_CFLAGS = \
+ -DGLADE_PATH=\"$(gladedir)\" \
+ -DLOCALEDIR=\"$(localedir)\" \
+ -Wall -export-dynamic
+
+if BUILD_PCA
+pca_bin = pointer-capture-applet
+endif
+
+if BUILD_CTA
+cta_bin = dwell-click-applet
+endif
+
+bin_PROGRAMS = mousetweaks mousetweaks-preferences $(pca_bin) $(cta_bin)
+mousetweaks_SOURCES = \
+ mt-main.c \
+ mt-common.c \
+ mt-session.c \
+ mt-dbus.c \
+ mt-ctw.c
+
+mousetweaks_LDFLAGS = \
+ $(GLADE_LIBS) \
+ $(CSPI_LIBS) \
+ $(DBUS_LIBS) \
+ $(GNOMEUI_LIBS) \
+ $(LIBDAEMON_LIBS)
+
+mousetweaks_preferences_SOURCES = \
+ preferences.c \
+ mt-common.c
+
+mousetweaks_preferences_LDFLAGS = \
+ $(GLADE_LIBS) \
+ $(GNOMEUI_LIBS)
+
+dwell_click_applet_SOURCES = dwell-click-applet.c
+dwell_click_applet_LDFLAGS = \
+ $(GLADE_LIBS) \
+ $(PANEL_LIBS) \
+ $(DBUS_LIBS)
+
+pointer_capture_applet_SOURCES = pointer-capture-applet.c
+pointer_capture_applet_LDFLAGS = \
+ $(GLADE_LIBS) \
+ $(PANEL_LIBS)
Added: first-lp-copy/src/dwell-click-applet.c
==============================================================================
--- (empty file)
+++ first-lp-copy/src/dwell-click-applet.c Thu Jan 10 17:22:44 2008
@@ -0,0 +1,531 @@
+/*
+ * Copyright  2007 Gerd Kohlberger <lowfi chello at>
+ *
+ * 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 3 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, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <gtk/gtk.h>
+#include <glade/glade.h>
+#include <panel-applet.h>
+
+#include "mt-main.h"
+#include "mt-dbus.h"
+
+#define DWELL_ENABLED_KEY \
+ MT_GCONF_HOME "/dwell_enabled"
+
+#define DWELL_MODE_KEY \
+ MT_GCONF_HOME "/dwell_mode"
+
+typedef struct _DwellData DwellData;
+struct _DwellData {
+ DBusConnection *conn;
+ GConfClient *client;
+
+ GladeXML *xml;
+ GtkWidget *box;
+ GtkWidget *button;
+
+ GdkPixbuf *click[4];
+
+ gint button_width;
+ gint button_height;
+
+ gint cct;
+ gint active;
+};
+
+static const gchar *img_widgets[] = {
+ "right_click_img",
+ "drag_click_img",
+ "double_click_img",
+ "single_click_img"
+};
+
+static const gchar *img_widgets_v[] = {
+ "right_click_img_v",
+ "drag_click_img_v",
+ "double_click_img_v",
+ "single_click_img_v"
+};
+
+static const gchar menu_xml[] =
+ "<popup name=\"button3\">\n"
+ " <menuitem name=\"Properties Item\" verb=\"PropertiesVerb\" "
+ " _label=\"_Preferences\"\n"
+ " pixtype=\"stock\" pixname=\"gtk-properties\"/>\n"
+ " <menuitem name=\"About Item\" verb=\"AboutVerb\" _label=\"_About\"\n"
+ " pixtype=\"stock\" pixname=\"gnome-stock-about\"/>\n"
+ "</popup>\n";
+
+static void update_sensitivity (DwellData *dd);
+
+static void preferences_dialog (BonoboUIComponent *component,
+ gpointer data,
+ const char *cname);
+static void about_dialog (BonoboUIComponent *component,
+ gpointer data,
+ const char *cname);
+
+static const BonoboUIVerb menu_verb[] = {
+ BONOBO_UI_UNSAFE_VERB ("PropertiesVerb", preferences_dialog),
+ BONOBO_UI_UNSAFE_VERB ("AboutVerb", about_dialog),
+ BONOBO_UI_VERB_END
+};
+
+static void
+send_dbus_signal (DBusConnection *conn, const gchar *type, gint arg)
+{
+ DBusMessage *msg;
+
+ msg = dbus_message_new_signal (MOUSETWEAKS_DBUS_PATH_MAIN,
+ MOUSETWEAKS_DBUS_INTERFACE,
+ type);
+ dbus_message_append_args (msg,
+ DBUS_TYPE_INT32, &arg,
+ DBUS_TYPE_INVALID);
+ dbus_connection_send (conn, msg, NULL);
+ dbus_connection_flush (conn);
+ dbus_message_unref (msg);
+}
+
+static DBusHandlerResult
+receive_dbus_signal (DBusConnection *conn, DBusMessage *msg, void *data)
+{
+ DwellData *dd = (DwellData *) data;
+
+ if (dbus_message_is_signal (msg,
+ MOUSETWEAKS_DBUS_INTERFACE,
+ CLICK_TYPE_SIGNAL)) {
+ if (dbus_message_get_args (msg,
+ NULL,
+ DBUS_TYPE_INT32,
+ &dd->cct,
+ DBUS_TYPE_INVALID)) {
+ GSList *group;
+ gpointer data;
+
+ group = gtk_radio_button_get_group (GTK_RADIO_BUTTON(dd->button));
+ data = g_slist_nth_data (group, dd->cct);
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(data), TRUE);
+
+ return DBUS_HANDLER_RESULT_HANDLED;
+ }
+ }
+ else if (dbus_message_is_signal (msg,
+ MOUSETWEAKS_DBUS_INTERFACE,
+ RESTORE_SIGNAL)) {
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(dd->button), TRUE);
+
+ return DBUS_HANDLER_RESULT_HANDLED;
+ }
+ else if (dbus_message_is_signal (msg,
+ MOUSETWEAKS_DBUS_INTERFACE,
+ ACTIVE_SIGNAL)) {
+ if (dbus_message_get_args (msg,
+ NULL,
+ DBUS_TYPE_INT32,
+ &dd->active,
+ DBUS_TYPE_INVALID)) {
+ update_sensitivity (dd);
+
+ return DBUS_HANDLER_RESULT_HANDLED;
+ }
+ }
+
+ return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
+}
+
+static gboolean
+do_not_eat (GtkWidget *widget, GdkEventButton *bev, gpointer user)
+{
+ if (bev->button != 1)
+ g_signal_stop_emission_by_name (widget, "button_press_event");
+
+ return FALSE;
+}
+
+static void
+button_cb (GtkToggleButton *button, gpointer data)
+{
+ DwellData *dd = (DwellData *) data;
+
+ if (gtk_toggle_button_get_active (button)) {
+ GSList *group;
+
+ group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (button));
+ dd->cct = g_slist_index (group, (gconstpointer) button);
+
+ send_dbus_signal (dd->conn, CLICK_TYPE_SIGNAL, dd->cct);
+ }
+}
+
+static void
+box_size_allocate (GtkWidget *widget, GtkAllocation *alloc, gpointer data)
+{
+ DwellData *dd = (DwellData *) data;
+ GtkWidget *w;
+ GdkPixbuf *tmp;
+ const gchar *name;
+ gint i;
+
+ if (dd->button_width == alloc->width && dd->button_height == alloc->height)
+ return;
+
+ name = glade_get_widget_name (dd->box);
+
+ if (g_str_equal (name, "box_vert"))
+ /* vertical */
+ for (i = 0; i < N_CLICK_TYPES; i++) {
+ w = glade_xml_get_widget (dd->xml, img_widgets_v[i]);
+
+ if (alloc->width < 31) {
+ tmp = gdk_pixbuf_scale_simple (dd->click[i],
+ alloc->width - 7,
+ alloc->width - 7,
+ GDK_INTERP_HYPER);
+ gtk_image_set_from_pixbuf (GTK_IMAGE(w), tmp);
+ g_object_unref (tmp);
+ }
+ else
+ gtk_image_set_from_pixbuf (GTK_IMAGE(w), dd->click[i]);
+ }
+ else
+ /* horizontal */
+ for (i = 0; i < N_CLICK_TYPES; i++) {
+ w = glade_xml_get_widget (dd->xml, img_widgets[i]);
+
+ if (alloc->height < 31) {
+ tmp = gdk_pixbuf_scale_simple (dd->click[i],
+ alloc->height - 7,
+ alloc->height - 7,
+ GDK_INTERP_HYPER);
+ gtk_image_set_from_pixbuf (GTK_IMAGE(w), tmp);
+ g_object_unref (tmp);
+ }
+ else
+ gtk_image_set_from_pixbuf (GTK_IMAGE(w), dd->click[i]);
+ }
+
+ dd->button_width = alloc->width;
+ dd->button_height = alloc->height;
+}
+
+static void
+fini_dwell_data (DwellData *dd)
+{
+ GtkWidget *w;
+ gint i;
+
+ w = glade_xml_get_widget (dd->xml, "box_vert");
+ g_object_unref (w);
+ w = glade_xml_get_widget (dd->xml, "box_hori");
+ g_object_unref (w);
+
+ if (dd->conn)
+ dbus_connection_unref (dd->conn);
+
+ if (dd->client)
+ g_object_unref (dd->client);
+
+ for (i = 0; i < N_CLICK_TYPES; i++)
+ g_object_unref (dd->click[i]);
+
+ g_free (dd);
+}
+
+/* applet callbacks */
+static void
+applet_orient_changed (PanelApplet *applet, guint orient, gpointer data)
+{
+ DwellData *dd = (DwellData *) data;
+
+ gtk_container_remove (GTK_CONTAINER(applet), dd->box);
+
+ switch (orient) {
+ case PANEL_APPLET_ORIENT_UP:
+ case PANEL_APPLET_ORIENT_DOWN:
+ dd->box = glade_xml_get_widget (dd->xml, "box_hori");
+ dd->button = glade_xml_get_widget (dd->xml, "single_click");
+ break;
+ case PANEL_APPLET_ORIENT_LEFT:
+ case PANEL_APPLET_ORIENT_RIGHT:
+ dd->box = glade_xml_get_widget (dd->xml, "box_vert");
+ dd->button = glade_xml_get_widget (dd->xml, "single_click_v");
+ default:
+ break;
+ }
+
+ if (dd->box->parent)
+ gtk_widget_reparent (dd->box, GTK_WIDGET(applet));
+ else
+ gtk_container_add (GTK_CONTAINER(applet), dd->box);
+}
+
+static void
+applet_unrealized (GtkWidget *widget, gpointer data)
+{
+ fini_dwell_data ((DwellData *) data);
+}
+
+static void
+preferences_dialog (BonoboUIComponent *component,
+ gpointer data,
+ const char *cname)
+{
+ DwellData *dd = (DwellData *) data;
+
+ if (dd->active)
+ send_dbus_signal (dd->conn, SHOW_DIALOG_SIGNAL, 1);
+}
+
+static void
+about_dialog (BonoboUIComponent *component,
+ gpointer data,
+ const char *cname)
+{
+ DwellData *dd = (DwellData *) data;
+ GtkWidget *about;
+
+ about = glade_xml_get_widget (dd->xml, "about");
+
+ if (GTK_WIDGET_VISIBLE(about))
+ gtk_window_present (GTK_WINDOW(about));
+ else
+ gtk_widget_show (about);
+}
+
+static void
+about_response (GtkWidget *about, gint response, gpointer data)
+{
+ DwellData *dd = (DwellData *) data;
+
+ gtk_widget_hide (glade_xml_get_widget (dd->xml, "about"));
+}
+
+static inline void
+init_button (DwellData *dd, GtkWidget *button)
+{
+ gtk_toggle_button_set_mode (GTK_TOGGLE_BUTTON(button), FALSE);
+ g_signal_connect (G_OBJECT(button), "button-press-event",
+ G_CALLBACK(do_not_eat), NULL);
+ g_signal_connect (G_OBJECT(button), "toggled",
+ G_CALLBACK(button_cb), dd);
+}
+
+static void
+init_horizontal_box (DwellData *dd)
+{
+ GtkWidget *w;
+ gint i;
+
+ w = glade_xml_get_widget (dd->xml, "box_hori");
+ g_object_ref (w);
+
+ w = glade_xml_get_widget (dd->xml, "single_click");
+ g_signal_connect (G_OBJECT(w), "size-allocate",
+ G_CALLBACK(box_size_allocate), dd);
+ init_button (dd, w);
+
+ w = glade_xml_get_widget (dd->xml, "double_click");
+ init_button (dd, w);
+
+ w = glade_xml_get_widget (dd->xml, "drag_click");
+ init_button (dd, w);
+
+ w = glade_xml_get_widget (dd->xml, "right_click");
+ init_button (dd, w);
+
+ for (i = 0; i < N_CLICK_TYPES; i++) {
+ w = glade_xml_get_widget (dd->xml, img_widgets[i]);
+ gtk_image_set_from_pixbuf (GTK_IMAGE(w), dd->click[i]);
+ }
+}
+
+static void
+init_vertical_box (DwellData *dd)
+{
+ GtkWidget *w;
+ gint i;
+
+ w = glade_xml_get_widget (dd->xml, "box_vert");
+ g_object_ref (w);
+
+ w = glade_xml_get_widget (dd->xml, "single_click_v");
+ g_signal_connect (G_OBJECT(w), "size-allocate",
+ G_CALLBACK(box_size_allocate), dd);
+ init_button (dd, w);
+
+ w = glade_xml_get_widget (dd->xml, "double_click_v");
+ init_button (dd, w);
+
+ w = glade_xml_get_widget (dd->xml, "drag_click_v");
+ init_button (dd, w);
+
+ w = glade_xml_get_widget (dd->xml, "right_click_v");
+ init_button (dd, w);
+
+ for (i = 0; i < N_CLICK_TYPES; i++) {
+ w = glade_xml_get_widget (dd->xml, img_widgets_v[i]);
+ gtk_image_set_from_pixbuf (GTK_IMAGE(w), dd->click[i]);
+ }
+}
+
+static void
+update_sensitivity (DwellData *dd)
+{
+ DwellMode mode;
+ gboolean enabled, sensitive = FALSE;
+
+ enabled = gconf_client_get_bool (dd->client, DWELL_ENABLED_KEY, NULL);
+ mode = gconf_client_get_int (dd->client, DWELL_MODE_KEY, NULL);
+
+ if (dd->active && enabled && mode == DWELL_MODE_CTW)
+ sensitive = TRUE;
+
+ gtk_widget_set_sensitive (dd->box, sensitive);
+}
+
+static void
+gconf_value_changed (GConfClient *client,
+ const gchar *key,
+ GConfValue *value,
+ gpointer data)
+{
+ if (g_str_equal (key, DWELL_MODE_KEY) ||
+ g_str_equal (key, DWELL_ENABLED_KEY))
+ update_sensitivity ((DwellData *) data);
+}
+
+static gboolean
+fill_applet (PanelApplet *applet)
+{
+ DwellData *dd;
+ GtkWidget *about;
+ PanelAppletOrient orient;
+
+ dd = g_new0 (DwellData, 1);
+ if (!dd)
+ return FALSE;
+
+ dd->cct = DWELL_CLICK_TYPE_SINGLE;
+
+ bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
+ bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
+ textdomain (GETTEXT_PACKAGE);
+
+ dd->xml = glade_xml_new (GLADE_PATH "/dwell-click-applet.glade",
+ NULL, NULL);
+ if (!dd->xml) {
+ fini_dwell_data (dd);
+ return FALSE;
+ }
+
+ /* about dialog */
+ gtk_window_set_default_icon_name (MT_ICON_NAME);
+
+ about = glade_xml_get_widget (dd->xml, "about");
+ g_object_set (about, "version", VERSION, NULL);
+
+ g_signal_connect (G_OBJECT(about), "delete-event",
+ G_CALLBACK(gtk_widget_hide_on_delete), NULL);
+ g_signal_connect (G_OBJECT(about), "response",
+ G_CALLBACK(about_response), dd);
+
+ dd->conn = dbus_bus_get (DBUS_BUS_SESSION, NULL);
+ if (!dd->conn) {
+ fini_dwell_data (dd);
+ return FALSE;
+ }
+
+ dbus_bus_add_match (dd->conn,
+ "type='signal',"
+ "sender='" MOUSETWEAKS_DBUS_SERVICE"',"
+ "interface='"MOUSETWEAKS_DBUS_INTERFACE"',"
+ "path='" MOUSETWEAKS_DBUS_PATH_APPLET"'",
+ NULL);
+ dbus_connection_add_filter (dd->conn,
+ receive_dbus_signal,
+ dd,
+ NULL);
+ dbus_connection_setup_with_g_main (dd->conn, NULL);
+
+ if (dbus_bus_name_has_owner (dd->conn, MOUSETWEAKS_DBUS_SERVICE, NULL))
+ dd->active = 1;
+
+ dd->client = gconf_client_get_default ();
+ gconf_client_add_dir (dd->client,
+ MT_GCONF_HOME,
+ GCONF_CLIENT_PRELOAD_ONELEVEL,
+ NULL);
+ g_signal_connect (G_OBJECT(dd->client), "value_changed",
+ G_CALLBACK(gconf_value_changed), dd);
+
+ dd->click[DWELL_CLICK_TYPE_SINGLE] =
+ gdk_pixbuf_new_from_file (GLADE_PATH "/human-single.png", NULL);
+ dd->click[DWELL_CLICK_TYPE_DOUBLE] =
+ gdk_pixbuf_new_from_file (GLADE_PATH "/human-double.png", NULL);
+ dd->click[DWELL_CLICK_TYPE_DRAG] =
+ gdk_pixbuf_new_from_file (GLADE_PATH "/human-drag.png", NULL);
+ dd->click[DWELL_CLICK_TYPE_RIGHT] =
+ gdk_pixbuf_new_from_file (GLADE_PATH "/human-right.png", NULL);
+
+ panel_applet_set_flags (applet,
+ PANEL_APPLET_EXPAND_MINOR |
+ PANEL_APPLET_HAS_HANDLE);
+ panel_applet_set_background_widget (applet, GTK_WIDGET(applet));
+ panel_applet_setup_menu (applet, menu_xml, menu_verb, dd);
+
+ g_signal_connect (applet, "change-orient",
+ G_CALLBACK(applet_orient_changed), dd);
+ g_signal_connect (applet, "unrealize",
+ G_CALLBACK(applet_unrealized), dd);
+
+ orient = panel_applet_get_orient (applet);
+ if (orient == PANEL_APPLET_ORIENT_UP ||
+ orient == PANEL_APPLET_ORIENT_DOWN) {
+ dd->box = glade_xml_get_widget (dd->xml, "box_hori");
+ dd->button = glade_xml_get_widget (dd->xml, "single_click");
+ }
+ else {
+ dd->box = glade_xml_get_widget (dd->xml, "box_vert");
+ dd->button = glade_xml_get_widget (dd->xml, "single_click_v");
+ }
+
+ init_horizontal_box (dd);
+ init_vertical_box (dd);
+
+ gtk_widget_reparent (dd->box, GTK_WIDGET(applet));
+ gtk_widget_show (GTK_WIDGET(applet));
+
+ update_sensitivity (dd);
+
+ return TRUE;
+}
+
+static gboolean
+applet_factory (PanelApplet *applet, const gchar *iid, gpointer data)
+{
+ if (!g_str_equal (iid, "OAFIID:DwellClickApplet"))
+ return FALSE;
+
+ return fill_applet (applet);
+}
+
+PANEL_APPLET_BONOBO_FACTORY ("OAFIID:DwellClickApplet_Factory",
+ PANEL_TYPE_APPLET,
+ "Dwell Click Factory",
+ "0",
+ applet_factory,
+ NULL);
Added: first-lp-copy/src/mt-common.c
==============================================================================
--- (empty file)
+++ first-lp-copy/src/mt-common.c Thu Jan 10 17:22:44 2008
@@ -0,0 +1,56 @@
+/*
+ * Copyright  2007 Gerd Kohlberger <lowfi chello at>
+ *
+ * This file is part of Mousetweaks.
+ *
+ * Mousetweaks 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 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Mousetweaks 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, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <gtk/gtk.h>
+
+#include "mt-common.h"
+
+gint
+mt_show_dialog (const gchar *primary,
+ const gchar *secondary,
+ GtkMessageType type)
+{
+ GtkWidget *dialog;
+ gint ret;
+
+ dialog = gtk_message_dialog_new (NULL,
+ GTK_DIALOG_MODAL,
+ type,
+ GTK_BUTTONS_NONE,
+ primary);
+ gtk_window_set_title (GTK_WINDOW(dialog), "MouseTweaks");
+ gtk_window_set_icon_name (GTK_WINDOW(dialog), MT_ICON_NAME);
+ gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG(dialog),
+ secondary);
+
+ if (type == GTK_MESSAGE_QUESTION)
+ gtk_dialog_add_buttons (GTK_DIALOG(dialog),
+ GTK_STOCK_YES, GTK_RESPONSE_YES,
+ GTK_STOCK_NO, GTK_RESPONSE_NO,
+ NULL);
+ else
+ gtk_dialog_add_button (GTK_DIALOG(dialog),
+ GTK_STOCK_OK, GTK_RESPONSE_OK);
+
+ gtk_widget_show_all (dialog);
+ ret = gtk_dialog_run (GTK_DIALOG(dialog));
+ gtk_widget_destroy (dialog);
+
+ return ret;
+}
Added: first-lp-copy/src/mt-common.h
==============================================================================
--- (empty file)
+++ first-lp-copy/src/mt-common.h Thu Jan 10 17:22:44 2008
@@ -0,0 +1,75 @@
+/*
+ * Copyright  2007 Gerd Kohlberger <lowfi chello at>
+ *
+ * This file is part of Mousetweaks.
+ *
+ * Mousetweaks 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 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Mousetweaks 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, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef __MT_COMMON_H__
+#define __MT_COMMON_H__
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <gconf/gconf-client.h>
+#include <glib/gi18n.h>
+
+G_BEGIN_DECLS
+
+#define MT_ICON_NAME "gnome-dev-mouse-optical"
+
+#define MT_GCONF_HOME "/apps/mousetweaks"
+#define OPT_THRESHOLD MT_GCONF_HOME "/threshold"
+#define OPT_DELAY MT_GCONF_HOME "/delay_enabled"
+#define OPT_DELAY_T MT_GCONF_HOME "/delay_time"
+#define OPT_DWELL MT_GCONF_HOME "/dwell_enabled"
+#define OPT_DWELL_T MT_GCONF_HOME "/dwell_time"
+#define OPT_CTW MT_GCONF_HOME "/dwell_show_ctw"
+#define OPT_MODE MT_GCONF_HOME "/dwell_mode"
+#define OPT_G_SINGLE MT_GCONF_HOME "/dwell_gesture_single"
+#define OPT_G_DOUBLE MT_GCONF_HOME "/dwell_gesture_double"
+#define OPT_G_DRAG MT_GCONF_HOME "/dwell_gesture_drag"
+#define OPT_G_RIGHT MT_GCONF_HOME "/dwell_gesture_right"
+#define OPT_STYLE MT_GCONF_HOME "/button_layout"
+
+typedef enum {
+ DWELL_MODE_GESTURE = 0,
+ DWELL_MODE_CTW
+} DwellMode;
+
+typedef enum {
+ DWELL_CLICK_TYPE_RIGHT = 0,
+ DWELL_CLICK_TYPE_DRAG,
+ DWELL_CLICK_TYPE_DOUBLE,
+ DWELL_CLICK_TYPE_SINGLE,
+ N_CLICK_TYPES
+} DwellClickType;
+
+typedef enum {
+ DIRECTION_LEFT = 0,
+ DIRECTION_RIGHT,
+ DIRECTION_UP,
+ DIRECTION_DOWN,
+ DIRECTION_DISABLE
+} GestureDirection;
+
+gint mt_show_dialog (const gchar *primary,
+ const gchar *secondary,
+ GtkMessageType type);
+
+G_END_DECLS
+
+#endif /* __MT_COMMON_H__ */
Added: first-lp-copy/src/mt-ctw.c
==============================================================================
--- (empty file)
+++ first-lp-copy/src/mt-ctw.c Thu Jan 10 17:22:44 2008
@@ -0,0 +1,206 @@
+/*
+ * Copyright  2007 Gerd Kohlberger <lowfi chello at>
+ *
+ * This file is part of Mousetweaks.
+ *
+ * Mousetweaks 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 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Mousetweaks 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, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <gtk/gtk.h>
+#include <glade/glade.h>
+
+#include "mt-main.h"
+#include "mt-dbus.h"
+#include "mt-common.h"
+
+static GladeXML *xml = NULL;
+
+void
+mt_ctw_set_click_type (gint ct)
+{
+ GtkWidget *button;
+ GSList *group;
+ gpointer data;
+
+ button = glade_xml_get_widget (xml, "single");
+ group = gtk_radio_button_get_group (GTK_RADIO_BUTTON(button));
+ data = g_slist_nth_data (group, ct);
+
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(data), TRUE);
+}
+
+void
+mt_ctw_update_visible (gboolean visible)
+{
+ if (visible)
+ gtk_widget_show_all (glade_xml_get_widget (xml, "ctw"));
+ else
+ gtk_widget_hide (glade_xml_get_widget (xml, "ctw"));
+}
+
+void
+mt_ctw_update_sensitivity (MTClosure *mt)
+{
+ gboolean sensitive = FALSE;
+
+ if (mt->dwell_enabled && mt->dwell_mode == DWELL_MODE_CTW)
+ sensitive = TRUE;
+
+ gtk_widget_set_sensitive (glade_xml_get_widget (xml, "box"), sensitive);
+}
+
+void
+mt_ctw_update_style (gint style)
+{
+ GtkWidget *icon, *label;
+ const gchar *l[] = { "single_l", "double_l", "drag_l", "right_l" };
+ const gchar *img[] = { "single_i", "double_i", "drag_i", "right_i" };
+ gint i;
+
+ for (i = 0; i < N_CLICK_TYPES; i++) {
+ label = glade_xml_get_widget (xml, l[i]);
+ icon = glade_xml_get_widget (xml, img[i]);
+
+ switch (style) {
+ case BUTTON_STYLE_BOTH:
+ g_object_set (icon, "yalign", 1.0, NULL);
+ gtk_widget_show (icon);
+ g_object_set (label, "yalign", 0.0, NULL);
+ gtk_widget_show (label);
+ break;
+ case BUTTON_STYLE_TEXT:
+ gtk_widget_hide (icon);
+ g_object_set (icon, "yalign", 0.5, NULL);
+ gtk_widget_show (label);
+ g_object_set (label, "yalign", 0.5, NULL);
+ break;
+ case BUTTON_STYLE_ICON:
+ gtk_widget_show (icon);
+ g_object_set (icon, "yalign", 0.5, NULL);
+ gtk_widget_hide (label);
+ g_object_set (label, "yalign", 0.5, NULL);
+ default:
+ break;
+ }
+ }
+}
+
+static void
+ctw_button_cb (GtkToggleButton *button, gpointer data)
+{
+ MTClosure *mt = (MTClosure *) data;
+
+ if (gtk_toggle_button_get_active (button)) {
+ GSList *group;
+
+ group = gtk_radio_button_get_group (GTK_RADIO_BUTTON(button));
+ mt->dwell_cct = g_slist_index (group, (gconstpointer) button);
+
+ mt_dbus_send_signal (mt->conn, CLICK_TYPE_SIGNAL, mt->dwell_cct);
+ }
+}
+
+static gboolean
+ctw_context_menu (GtkWidget *widget, GdkEventButton *bev, gpointer data)
+{
+ if (bev->button == 3) {
+ gtk_menu_popup (GTK_MENU(glade_xml_get_widget (xml, "popup")),
+ 0, 0, 0, 0, bev->button, bev->time);
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
+static void
+ctw_menu_toggled (GtkCheckMenuItem *item, gpointer data)
+{
+ MTClosure *mt = (MTClosure *) data;
+ GSList *group;
+ gint index;
+
+ if (!gtk_check_menu_item_get_active (item))
+ return;
+
+ group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM(item));
+ index = g_slist_index (group, (gconstpointer) item);
+ gconf_client_set_int (mt->client, OPT_STYLE, index, NULL);
+}
+
+static gboolean
+ctw_delete_cb (GtkWidget *win, GdkEvent *ev, gpointer data)
+{
+ MTClosure *mt = (MTClosure *) data;
+
+ gconf_client_set_bool (mt->client, OPT_CTW, FALSE, NULL);
+
+ return TRUE;
+}
+
+gboolean
+mt_ctw_init (MTClosure *mt, gint x, gint y)
+{
+ GtkWidget *ctw, *button, *item;
+ const gchar *b[] = { "single", "double", "drag", "right" };
+ GSList *group;
+ gpointer data;
+ gint i;
+
+ xml = glade_xml_new (GLADE_PATH "/ctw.glade", NULL, NULL);
+ if (!xml) {
+ mt_show_dialog (_("Internal Error"),
+ _("Couldn't load glade interface file."),
+ GTK_MESSAGE_ERROR);
+ return FALSE;
+ }
+
+ ctw = glade_xml_get_widget (xml, "ctw");
+ gtk_window_stick (GTK_WINDOW(ctw));
+ gtk_window_set_keep_above (GTK_WINDOW(ctw), TRUE);
+ g_signal_connect (G_OBJECT(ctw), "delete-event",
+ G_CALLBACK(ctw_delete_cb), mt);
+
+ for (i = 0; i < N_CLICK_TYPES; i++) {
+ button = glade_xml_get_widget (xml, b[i]);
+ gtk_toggle_button_set_mode (GTK_TOGGLE_BUTTON(button), FALSE);
+
+ g_signal_connect (G_OBJECT(button), "toggled",
+ G_CALLBACK(ctw_button_cb), (gpointer) mt);
+ g_signal_connect (G_OBJECT(button), "button-press-event",
+ G_CALLBACK(ctw_context_menu), NULL);
+ }
+
+ item = glade_xml_get_widget (xml, "text");
+ g_signal_connect (G_OBJECT(item), "toggled",
+ G_CALLBACK(ctw_menu_toggled), (gpointer) mt);
+ item = glade_xml_get_widget (xml, "icon");
+ g_signal_connect (G_OBJECT(item), "toggled",
+ G_CALLBACK(ctw_menu_toggled), (gpointer) mt);
+ item = glade_xml_get_widget (xml, "both");
+ g_signal_connect (G_OBJECT(item), "toggled",
+ G_CALLBACK(ctw_menu_toggled), (gpointer) mt);
+
+ group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM(item));
+ data = g_slist_nth_data (group, mt->style);
+ gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM(data), TRUE);
+
+ mt_ctw_update_style (mt->style);
+ mt_ctw_update_sensitivity (mt);
+ mt_ctw_update_visible (mt->dwell_show_ctw);
+
+ if (x != -1 && y != -1)
+ gtk_window_move (GTK_WINDOW(ctw), x, y);
+
+ return TRUE;
+}
Added: first-lp-copy/src/mt-ctw.h
==============================================================================
--- (empty file)
+++ first-lp-copy/src/mt-ctw.h Thu Jan 10 17:22:44 2008
@@ -0,0 +1,34 @@
+/*
+ * Copyright  2007 Gerd Kohlberger <lowfi chello at>
+ *
+ * This file is part of Mousetweaks.
+ *
+ * Mousetweaks 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 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Mousetweaks 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, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef __MT_CT_WINDOW_H__
+#define __MT_CT_WINDOW_H__
+
+G_BEGIN_DECLS
+
+gboolean mt_ctw_init (MTClosure *mt, gint x, gint y);
+void mt_ctw_set_click_type (gint ct);
+void mt_ctw_update_sensitivity (MTClosure *mt);
+void mt_ctw_update_visible (gboolean visible);
+void mt_ctw_update_style (gint style);
+
+
+G_END_DECLS
+
+#endif /* __MT_CT_WINDOW_H__ */
Added: first-lp-copy/src/mt-dbus.c
==============================================================================
--- (empty file)
+++ first-lp-copy/src/mt-dbus.c Thu Jan 10 17:22:44 2008
@@ -0,0 +1,147 @@
+/*
+ * Copyright  2007 Gerd Kohlberger <lowfi chello at>
+ *
+ * This file is part of Mousetweaks.
+ *
+ * Mousetweaks 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 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Mousetweaks 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, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <gtk/gtk.h>
+
+#include "mt-main.h"
+#include "mt-dbus.h"
+#include "mt-common.h"
+#include "mt-ctw.h"
+
+static DBusHandlerResult
+mt_dbus_filter (DBusConnection *connection,
+ DBusMessage *message,
+ gpointer data)
+{
+ MTClosure *mt = (MTClosure *) data;
+
+ if (dbus_message_is_signal (message,
+ MOUSETWEAKS_DBUS_INTERFACE,
+ CLICK_TYPE_SIGNAL)) {
+ if (dbus_message_get_args (message,
+ NULL,
+ DBUS_TYPE_INT32,
+ &mt->dwell_cct,
+ DBUS_TYPE_INVALID)) {
+ mt_ctw_set_click_type (mt->dwell_cct);
+
+ return DBUS_HANDLER_RESULT_HANDLED;
+ }
+ }
+ else if (dbus_message_is_signal (message,
+ MOUSETWEAKS_DBUS_INTERFACE,
+ ACTIVE_SIGNAL)) {
+ mt_dbus_send_signal (connection, ACTIVE_SIGNAL, 1);
+
+ return DBUS_HANDLER_RESULT_HANDLED;
+ }
+ else if (dbus_message_is_signal (message,
+ MOUSETWEAKS_DBUS_INTERFACE,
+ SHOW_DIALOG_SIGNAL)) {
+ gint nr;
+
+ if (dbus_message_get_args (message,
+ NULL,
+ DBUS_TYPE_INT32,
+ &nr,
+ DBUS_TYPE_INVALID)) {
+ /* preferences function
+ GtkWidget *w;
+
+ w = glade_xml_get_widget (xml, "notebook");
+ gtk_notebook_set_current_page (GTK_NOTEBOOK(w), nr);
+
+ w = glade_xml_get_widget (xml, "preferences");
+ gtk_widget_show (w);
+ */
+
+ return DBUS_HANDLER_RESULT_HANDLED;
+ }
+ }
+
+ return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
+}
+
+void
+mt_dbus_send_signal (DBusConnection *connection,
+ const gchar *type,
+ gint arg)
+{
+ DBusMessage *msg;
+
+ msg = dbus_message_new_signal (MOUSETWEAKS_DBUS_PATH_APPLET,
+ MOUSETWEAKS_DBUS_INTERFACE,
+ type);
+ dbus_message_append_args (msg,
+ DBUS_TYPE_INT32, &arg,
+ DBUS_TYPE_INVALID);
+ dbus_connection_send (connection, msg, NULL);
+ dbus_connection_flush (connection);
+ dbus_message_unref (msg);
+}
+
+DBusConnection *
+mt_dbus_init (gpointer data)
+{
+ DBusConnection *connection;
+ DBusError err;
+ gint ret;
+
+ dbus_error_init (&err);
+ connection = dbus_bus_get (DBUS_BUS_SESSION, &err);
+
+ if (!connection) {
+ mt_show_dialog (err.name, err.message, GTK_MESSAGE_ERROR);
+ dbus_error_free (&err);
+ return NULL;
+ }
+
+ dbus_error_free (&err);
+
+ ret = dbus_bus_request_name (connection,
+ MOUSETWEAKS_DBUS_SERVICE,
+ DBUS_NAME_FLAG_DO_NOT_QUEUE,
+ NULL);
+
+ if (ret != DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER) {
+ mt_show_dialog (_("DBUS Error"),
+ _("Not primary name owner."),
+ GTK_MESSAGE_ERROR);
+ g_object_unref (connection);
+ return NULL;
+ }
+
+ dbus_bus_add_match (connection,
+ "type='signal',"
+ "interface='"MOUSETWEAKS_DBUS_INTERFACE"',"
+ "path='" MOUSETWEAKS_DBUS_PATH_MAIN"'",
+ NULL);
+
+ dbus_connection_add_filter (connection, mt_dbus_filter, data, NULL);
+ dbus_connection_setup_with_g_main (connection, NULL);
+
+ return connection;
+}
+
+void
+mt_dbus_fini (DBusConnection *connection)
+{
+ dbus_bus_release_name (connection, MOUSETWEAKS_DBUS_SERVICE, NULL);
+ dbus_connection_unref (connection);
+}
Added: first-lp-copy/src/mt-dbus.h
==============================================================================
--- (empty file)
+++ first-lp-copy/src/mt-dbus.h Thu Jan 10 17:22:44 2008
@@ -0,0 +1,48 @@
+/*
+ * Copyright  2007 Gerd Kohlberger <lowfi chello at>
+ *
+ * This file is part of Mousetweaks.
+ *
+ * Mousetweaks 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 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Mousetweaks 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, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef __MT_DBUS_H__
+#define __MT_DBUS_H__
+
+#include <glib.h>
+#include <dbus/dbus-glib-lowlevel.h>
+
+G_BEGIN_DECLS
+
+#define MOUSETWEAKS_DBUS_SERVICE "org.freedesktop.mousetweaks"
+#define MOUSETWEAKS_DBUS_INTERFACE "org.freedesktop.mousetweaks"
+#define MOUSETWEAKS_DBUS_PATH_MAIN "/org/freedesktop/mousetweaks/main"
+#define MOUSETWEAKS_DBUS_PATH_APPLET "/org/freedesktop/mousetweaks/applet"
+
+#define CLICK_TYPE_SIGNAL "clicktype"
+#define RESTORE_SIGNAL "restore"
+#define ACTIVE_SIGNAL "active"
+#define SHOW_DIALOG_SIGNAL "dialog"
+
+DBusConnection * mt_dbus_init (gpointer data);
+
+void mt_dbus_fini (DBusConnection *connection);
+
+void mt_dbus_send_signal (DBusConnection *connection,
+ const gchar *type,
+ gint arg);
+
+G_END_DECLS
+
+#endif /* __MT_DBUS_H__ */
Added: first-lp-copy/src/mt-main.c
==============================================================================
--- (empty file)
+++ first-lp-copy/src/mt-main.c Thu Jan 10 17:22:44 2008
@@ -0,0 +1,674 @@
+/*
+ * Copyright  2007 Gerd Kohlberger <lowfi chello at>
+ *
+ * This file is part of Mousetweaks.
+ *
+ * Mousetweaks 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 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Mousetweaks 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, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <signal.h>
+#include <errno.h>
+#include <string.h>
+#include <math.h>
+#include <unistd.h>
+
+#include <gtk/gtk.h>
+
+#include <cspi/spi.h>
+
+#include <libgnome/gnome-program.h>
+#include <libgnomeui/gnome-ui-init.h>
+
+#include <libdaemon/dpid.h>
+
+#include "mt-common.h"
+#include "mt-dbus.h"
+#include "mt-main.h"
+#include "mt-session.h"
+#include "mt-ctw.h"
+
+static GtkTextBuffer *buffer = NULL;
+
+static AccessibleDeviceListener *button_listener = NULL;
+static AccessibleEventListener *motion_listener = NULL;
+
+static void start_dwell_timer (MTClosure *mt);
+static void stop_timer (GTimer *timer, guint *tid);
+
+static void
+show_debug (gchar *msg)
+{
+ gchar *str;
+ static int c = 1;
+
+ str = g_strdup_printf ("%i: %s\n", c++, msg);
+ gtk_text_buffer_insert_at_cursor (buffer, str, -1);
+ g_free (str);
+}
+
+static void
+debug_window (void)
+{
+ GtkWidget *win, *view;
+
+ win = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+ gtk_window_set_title (GTK_WINDOW(win), "MouseTweaks");
+ view = gtk_text_view_new ();
+ buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW(view));
+ gtk_text_buffer_set_text (buffer, "Debugging Console\n\n", -1);
+ gtk_container_add (GTK_CONTAINER(win), view);
+ gtk_window_set_keep_above (GTK_WINDOW(win), TRUE);
+ gtk_widget_set_size_request (win, 280, 120);
+ //gtk_widget_show_all (win);
+}
+
+static void
+mt_set_grab_cursor (gboolean set)
+{
+ GdkCursor *cursor;
+ GdkWindow *root;
+
+ root = gdk_get_default_root_window ();
+
+ if (set)
+ cursor = gdk_cursor_new (GDK_FLEUR);
+ else
+ cursor = gdk_cursor_new (GDK_ARROW);
+
+ gdk_window_set_cursor (root, cursor);
+ gdk_cursor_unref (cursor);
+}
+
+static void
+dwell_restore_single_click (MTClosure *mt)
+{
+ if (mt->dwell_mode == DWELL_MODE_CTW) {
+ mt_ctw_set_click_type (DWELL_CLICK_TYPE_SINGLE);
+ mt_dbus_send_signal (mt->conn, RESTORE_SIGNAL, 0);
+ }
+}
+
+static void
+dwell_do_pointer_click (MTClosure *mt, gint x, gint y)
+{
+ switch (mt->dwell_cct) {
+ case DWELL_CLICK_TYPE_SINGLE:
+ SPI_generateMouseEvent (x, y, "b1c");
+ break;
+ case DWELL_CLICK_TYPE_DOUBLE:
+ SPI_generateMouseEvent (x, y, "b1d");
+ dwell_restore_single_click (mt);
+ break;
+ case DWELL_CLICK_TYPE_DRAG:
+ SPI_generateMouseEvent (x, y, "b1p");
+ mt->dwell_drag_started = TRUE;
+ mt_set_grab_cursor (TRUE);
+ break;
+ case DWELL_CLICK_TYPE_RIGHT:
+ SPI_generateMouseEvent (x, y, "b3c");
+ dwell_restore_single_click (mt);
+ default:
+ break;
+ }
+}
+
+static inline gboolean
+within_tolerance (MTClosure *mt, gint x, gint y)
+{
+ gdouble distance;
+
+ distance = sqrt(pow(x - mt->pointer_x, 2.) + pow(y - mt->pointer_y, 2.));
+
+ if (distance < mt->threshold)
+ return TRUE;
+
+ return FALSE;
+}
+
+static gboolean
+analyze_direction (MTClosure *mt)
+{
+ GestureDirection gd;
+ gint i, x, y, dx, dy;
+
+ gdk_display_get_pointer (gdk_display_get_default (), NULL, &x, &y, NULL);
+
+ dx = ABS(x - mt->pointer_x);
+ dy = ABS(y - mt->pointer_y);
+
+ if (within_tolerance (mt, x, y))
+ return FALSE;
+
+ /* find direction */
+ if (x < mt->pointer_x)
+ if (y < mt->pointer_y)
+ if (dx < dy)
+ gd = DIRECTION_UP;
+ else
+ gd = DIRECTION_LEFT;
+ else
+ if (dx < dy)
+ gd = DIRECTION_DOWN;
+ else
+ gd = DIRECTION_LEFT;
+ else
+ if (y < mt->pointer_y)
+ if (dx < dy)
+ gd = DIRECTION_UP;
+ else
+ gd = DIRECTION_RIGHT;
+ else
+ if (dx < dy)
+ gd = DIRECTION_DOWN;
+ else
+ gd = DIRECTION_RIGHT;
+
+ /* get click type for direction */
+ for (i = 0; i < N_CLICK_TYPES; i++)
+ if (mt->dwell_dirs[i] == gd) {
+ mt->dwell_cct = i;
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
+static void
+dwell_start_gesture (MTClosure *mt)
+{
+ GdkCursor *cursor;
+ GdkWindow *root;
+ GdkGrabStatus stat;
+
+ cursor = gdk_cursor_new (GDK_CROSS);
+ root = gdk_get_default_root_window ();
+ stat = gdk_pointer_grab (root,
+ FALSE,
+ GDK_POINTER_MOTION_MASK,
+ NULL,
+ cursor,
+ GDK_CURRENT_TIME);
+ gdk_cursor_unref (cursor);
+
+ if (stat != GDK_GRAB_SUCCESS)
+ return;
+
+ mt->dwell_gesture_started = TRUE;
+ start_dwell_timer (mt);
+}
+
+static void
+dwell_stop_gesture (MTClosure *mt)
+{
+ stop_timer (mt->dwell_timer, &mt->dwell_tid);
+ mt->dwell_gesture_started = FALSE;
+
+ gdk_pointer_ungrab (GDK_CURRENT_TIME);
+
+ if (analyze_direction (mt)) {
+ /* gesture: context menu workaround */
+ if (mt->dwell_cct == DWELL_CLICK_TYPE_RIGHT)
+ mt->context_menu_opened = TRUE;
+
+ dwell_do_pointer_click (mt, mt->pointer_x, mt->pointer_y);
+
+ if (mt->context_menu_opened) {
+ mt->dwell_mode = DWELL_MODE_CTW;
+ mt->dwell_cct = DWELL_CLICK_TYPE_SINGLE;
+ }
+ }
+}
+
+/* timeout functions */
+static gboolean
+dwell_check_time (gpointer data)
+{
+ MTClosure *mt = (MTClosure *) data;
+
+ if (g_timer_elapsed (mt->dwell_timer, NULL) > mt->dwell_time) {
+ gint x, y;
+
+ gdk_display_get_pointer (gdk_display_get_default(), NULL, &x, &y, NULL);
+
+ /* stop active drag */
+ if (mt->dwell_drag_started) {
+ SPI_generateMouseEvent (x, y, "b1r");
+ mt->dwell_drag_started = FALSE;
+
+ mt_set_grab_cursor (FALSE);
+
+ dwell_restore_single_click (mt);
+ stop_timer (mt->dwell_timer, &mt->dwell_tid);
+
+ return FALSE;
+ }
+
+ /* click type window mode */
+ if (mt->dwell_mode == DWELL_MODE_CTW) {
+ dwell_do_pointer_click (mt, x, y);
+ stop_timer (mt->dwell_timer, &mt->dwell_tid);
+
+ /* gesture: context menu workaround */
+ if (mt->context_menu_opened) {
+ mt->context_menu_opened = FALSE;
+ mt->dwell_mode = DWELL_MODE_GESTURE;
+ }
+
+ return FALSE;
+ }
+
+ /* gesture mode */
+ if (mt->dwell_mode == DWELL_MODE_GESTURE) {
+ if (mt->dwell_gesture_started) {
+ dwell_stop_gesture (mt);
+ return FALSE;
+ }
+ else if (!mt->dwell_enabled) {
+ stop_timer (mt->dwell_timer, &mt->dwell_tid);
+ return FALSE;
+ }
+ else
+ dwell_start_gesture (mt);
+ }
+ }
+
+ return TRUE;
+}
+
+static gboolean
+delay_check_time (gpointer data)
+{
+ MTClosure *mt = (MTClosure *) data;
+
+ if (g_timer_elapsed (mt->delay_timer, NULL) > mt->delay_time) {
+ SPI_generateMouseEvent (0, 0, "b1r");
+ SPI_generateMouseEvent (mt->pointer_x, mt->pointer_y, "b3c");
+
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+/* timer stuff */
+static void
+start_dwell_timer (MTClosure *mt)
+{
+ g_timer_start (mt->dwell_timer);
+
+ if (!mt->dwell_tid)
+ mt->dwell_tid = g_timeout_add (100,
+ (GSourceFunc) dwell_check_time,
+ (gpointer) mt);
+}
+
+static void
+start_delay_timer (MTClosure *mt)
+{
+ g_timer_start (mt->delay_timer);
+
+ if (!mt->delay_tid)
+ mt->delay_tid = g_timeout_add (100,
+ (GSourceFunc) delay_check_time,
+ (gpointer) mt);
+}
+
+static void
+stop_timer (GTimer *timer, guint *tid)
+{
+ g_timer_stop (timer);
+ g_timer_reset (timer);
+
+ if (*tid) {
+ g_source_remove (*tid);
+ *tid = 0;
+ }
+}
+
+/* at-spi callbacks */
+static void
+spi_motion_event (const AccessibleEvent *event, void *data)
+{
+ MTClosure *mt = (MTClosure *) data;
+
+ if (mt->dwell_enabled)
+ if (!within_tolerance (mt, event->detail1, event->detail2))
+ if (!mt->dwell_gesture_started) {
+ mt->pointer_x = (gint) event->detail1;
+ mt->pointer_y = (gint) event->detail2;
+
+ start_dwell_timer (mt);
+ }
+
+ if (mt->delay_tid)
+ if (!within_tolerance (mt, event->detail1, event->detail2))
+ stop_timer (mt->delay_timer, &mt->delay_tid);
+}
+
+static SPIBoolean
+spi_button_event (const AccessibleDeviceEvent *event, void *data)
+{
+ MTClosure *mt = (MTClosure *) data;
+
+ if (mt->delay_enabled && event->keycode == 1) {
+ switch (event->type) {
+ case SPI_BUTTON_PRESSED:
+ gdk_display_get_pointer (gdk_display_get_default (),
+ NULL,
+ &mt->pointer_x,
+ &mt->pointer_y,
+ NULL);
+ start_delay_timer (mt);
+ return TRUE;
+ case SPI_BUTTON_RELEASED:
+ if (mt->delay_tid)
+ stop_timer (mt->delay_timer, &mt->delay_tid);
+
+ return TRUE;
+ default:
+ break;
+ }
+ }
+
+ return FALSE;
+}
+
+void
+spi_shutdown (void)
+{
+ SPI_deregisterGlobalEventListener (motion_listener, "mouse:abs");
+ AccessibleEventListener_unref (motion_listener);
+
+ SPI_deregisterDeviceEventListener (button_listener, NULL);
+ AccessibleDeviceListener_unref (button_listener);
+
+ SPI_event_quit ();
+}
+
+static void
+signal_handler (int sig)
+{
+ spi_shutdown ();
+}
+
+static void
+mt_gconf_notify (GConfClient *client,
+ const gchar *key,
+ GConfValue *value,
+ gpointer data)
+{
+ MTClosure *mt = (MTClosure *) data;
+
+ if (g_str_equal (key, OPT_THRESHOLD))
+ mt->threshold = gconf_value_get_float (value);
+ else if (g_str_equal (key, OPT_DELAY))
+ mt->delay_enabled = gconf_value_get_bool (value);
+ else if (g_str_equal (key, OPT_DELAY_T))
+ mt->delay_time = gconf_value_get_float (value);
+ else if (g_str_equal (key, OPT_DWELL)) {
+ mt->dwell_enabled = gconf_value_get_bool (value);
+ mt_ctw_update_sensitivity (mt);
+ }
+ else if (g_str_equal (key, OPT_DWELL_T))
+ mt->dwell_time = gconf_value_get_float (value);
+ else if (g_str_equal (key, OPT_CTW)) {
+ mt->dwell_show_ctw = gconf_value_get_bool (value);
+ mt_ctw_update_visible (mt->dwell_show_ctw);
+ }
+ else if (g_str_equal (key, OPT_MODE)) {
+ mt->dwell_mode = gconf_value_get_int (value);
+ mt_ctw_update_sensitivity (mt);
+ }
+ else if (g_str_equal (key, OPT_STYLE)) {
+ mt->style = gconf_value_get_int (value);
+ mt_ctw_update_style (mt->style);
+ }
+ else if (g_str_equal (key, OPT_G_SINGLE))
+ mt->dwell_dirs[DWELL_CLICK_TYPE_SINGLE] = gconf_value_get_int (value);
+ else if (g_str_equal (key, OPT_G_DOUBLE))
+ mt->dwell_dirs[DWELL_CLICK_TYPE_DOUBLE] = gconf_value_get_int (value);
+ else if (g_str_equal (key, OPT_G_DRAG))
+ mt->dwell_dirs[DWELL_CLICK_TYPE_DRAG] = gconf_value_get_int (value);
+ else if (g_str_equal (key, OPT_G_RIGHT))
+ mt->dwell_dirs[DWELL_CLICK_TYPE_RIGHT] = gconf_value_get_int (value);
+}
+
+static void
+mt_gconf_read_options (MTClosure *mt)
+{
+ mt->threshold = gconf_client_get_int (mt->client, OPT_THRESHOLD, NULL);
+ mt->delay_enabled = gconf_client_get_bool (mt->client, OPT_DELAY, NULL);
+ mt->delay_time = gconf_client_get_float (mt->client, OPT_DELAY_T, NULL);
+ mt->dwell_enabled = gconf_client_get_bool (mt->client, OPT_DWELL, NULL);
+ mt->dwell_time = gconf_client_get_float (mt->client, OPT_DWELL_T, NULL);
+ mt->dwell_show_ctw = gconf_client_get_bool (mt->client, OPT_CTW, NULL);
+ mt->dwell_mode = gconf_client_get_int (mt->client, OPT_MODE, NULL);
+ mt->style = gconf_client_get_int (mt->client, OPT_STYLE, NULL);
+ mt->dwell_dirs[DWELL_CLICK_TYPE_SINGLE] =
+ gconf_client_get_int (mt->client, OPT_G_SINGLE, NULL);
+ mt->dwell_dirs[DWELL_CLICK_TYPE_DOUBLE] =
+ gconf_client_get_int (mt->client, OPT_G_DOUBLE, NULL);
+ mt->dwell_dirs[DWELL_CLICK_TYPE_DRAG] =
+ gconf_client_get_int (mt->client, OPT_G_DRAG, NULL);
+ mt->dwell_dirs[DWELL_CLICK_TYPE_RIGHT] =
+ gconf_client_get_int (mt->client, OPT_G_RIGHT, NULL);
+}
+
+static MTClosure *
+mt_closure_init (void)
+{
+ MTClosure *mt;
+
+ mt = g_new0 (MTClosure, 1);
+ if (!mt)
+ return NULL;
+
+ mt->delay_timer = g_timer_new ();
+ mt->dwell_timer = g_timer_new ();
+
+ stop_timer (mt->delay_timer, &mt->delay_tid);
+ stop_timer (mt->dwell_timer, &mt->dwell_tid);
+
+ mt->client = gconf_client_get_default ();
+ mt->dwell_cct = DWELL_CLICK_TYPE_SINGLE;
+
+ return mt;
+}
+
+static void
+mt_closure_free (MTClosure *mt)
+{
+ g_timer_destroy (mt->dwell_timer);
+ g_timer_destroy (mt->delay_timer);
+
+ g_object_unref (mt->client);
+
+ g_free (mt);
+}
+
+const char *
+daemon_pid_file_proc_mt (void)
+{
+ static char fn[PATH_MAX];
+
+ snprintf (fn, sizeof(fn), "%s/.%s.pid",
+ g_get_home_dir (), daemon_pid_file_ident);
+
+ return fn;
+}
+
+int
+main (int argc, char **argv)
+{
+ GnomeProgram *program;
+ MTClosure *mt;
+ pid_t pid;
+ gboolean shutdown = FALSE, ctw = FALSE;
+ gchar *mode = NULL, *enable = NULL;
+ gint pos_x = -1, pos_y = -1;
+ GOptionContext *context;
+ GOptionEntry entries[] = {
+ {"enable", 'e', 0, G_OPTION_ARG_STRING, &enable,
+ _("Enable mousetweaks feature"), "(dwell|delay)"},
+ {"dwell-mode", 'm', 0, G_OPTION_ARG_STRING, &mode,
+ _("Use dwell mode"), "(window|gesture)"},
+ {"show-ctw", 'c', 0, G_OPTION_ARG_NONE, &ctw,
+ _("Show click type window"), 0},
+ {"ctw-x", 'x', 0, G_OPTION_ARG_INT, &pos_x,
+ _("Window x position"), 0},
+ {"ctw-y", 'y', 0, G_OPTION_ARG_INT, &pos_y,
+ _("Window y position"), 0},
+ {"shutdown", 's', 0, G_OPTION_ARG_NONE, &shutdown,
+ _("Shutdown mousetweaks"), 0},
+ {NULL}
+ };
+
+ context = g_option_context_new ("");
+ g_option_context_add_main_entries (context, entries, GETTEXT_PACKAGE);
+ g_option_context_add_group (context, gtk_get_option_group (FALSE));
+ g_option_context_parse (context, &argc, &argv, NULL);
+ g_option_context_free (context);
+
+ daemon_pid_file_ident = "mousetweaks";
+ daemon_pid_file_proc = daemon_pid_file_proc_mt;
+
+ if (shutdown) {
+ int ret;
+
+ if ((ret = daemon_pid_file_kill_wait (SIGINT, 5)) < 0)
+ g_print ("Shutdown failed or nothing to shut down.\n");
+ else
+ g_print ("Shutdown successful.\n");
+
+ return ret < 0 ? 1 : 0;
+ }
+
+ if ((pid = daemon_pid_file_is_running()) >= 0) {
+ g_print ("Already running on PID file %u.\n", pid);
+ return 1;
+ }
+
+ if ((pid = fork ()) < 0)
+ return 1;
+ else if (pid)
+ return 0;
+ else {
+ if (daemon_pid_file_create () < 0) {
+ show_debug ("PID file failed");
+ goto FINISH;
+ }
+
+ signal (SIGINT, signal_handler);
+ signal (SIGTERM, signal_handler);
+ signal (SIGQUIT, signal_handler);
+ signal (SIGHUP, signal_handler);
+
+ bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
+ bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
+ textdomain (GETTEXT_PACKAGE);
+
+ program = gnome_program_init (PACKAGE, VERSION,
+ LIBGNOMEUI_MODULE,
+ argc, argv,
+ GNOME_PARAM_NONE);
+
+ gtk_init (&argc, &argv);
+ debug_window ();
+ mt_session_init (argc, argv);
+
+ if (SPI_init ()) {
+ mt_show_dialog (_("Assistive Technologies not enabled"),
+ _("MouseTweaks requires Assistive Technologies."),
+ GTK_MESSAGE_ERROR);
+ g_object_unref (program);
+ goto FINISH;
+ }
+
+ mt = mt_closure_init ();
+ if (!mt) {
+ mt_show_dialog (_("Internal Error"),
+ _("Couldn't allocate memory."),
+ GTK_MESSAGE_ERROR);
+ g_object_unref (program);
+ SPI_exit ();
+ goto FINISH;
+ }
+
+ mt->conn = mt_dbus_init (mt);
+ if (!mt->conn)
+ goto CLEANUP;
+
+ /* tell the applets we are here */
+ mt_dbus_send_signal (mt->conn, ACTIVE_SIGNAL, 1);
+
+ /* add at-spi listeners */
+ motion_listener = SPI_createAccessibleEventListener
+ (spi_motion_event, (void *) mt);
+ SPI_registerGlobalEventListener (motion_listener, "mouse:abs");
+
+ button_listener = SPI_createAccessibleDeviceListener
+ (spi_button_event, (void *) mt);
+ SPI_registerDeviceEventListener (button_listener,
+ SPI_BUTTON_PRESSED |
+ SPI_BUTTON_RELEASED,
+ NULL);
+
+ /* command-line options */
+ if (enable) {
+ if (g_str_equal (enable, "dwell")) {
+ gconf_client_set_bool (mt->client, OPT_DELAY, FALSE, NULL);
+ gconf_client_set_bool (mt->client, OPT_DWELL, TRUE, NULL);
+ }
+ if (g_str_equal (enable, "delay")) {
+ gconf_client_set_bool (mt->client, OPT_DWELL, FALSE, NULL);
+ gconf_client_set_bool (mt->client, OPT_DELAY, TRUE, NULL);
+ }
+ }
+ if (ctw)
+ gconf_client_set_bool (mt->client, OPT_CTW, TRUE, NULL);
+ if (mode) {
+ if (g_str_equal (mode, "gesture"))
+ gconf_client_set_int (mt->client, OPT_MODE, 0, NULL);
+ if (g_str_equal (mode, "window"))
+ gconf_client_set_int (mt->client, OPT_MODE, 1, NULL);
+ }
+
+ /* gconf stuff */
+ mt_gconf_read_options (mt);
+ gconf_client_add_dir (mt->client,
+ MT_GCONF_HOME,
+ GCONF_CLIENT_PRELOAD_ONELEVEL,
+ NULL);
+ g_signal_connect (G_OBJECT(mt->client), "value_changed",
+ G_CALLBACK(mt_gconf_notify), (gpointer) mt);
+
+ if (!mt_ctw_init (mt, pos_x, pos_y))
+ goto CLEANUP;
+
+ SPI_event_main ();
+
+ mt_dbus_send_signal (mt->conn, ACTIVE_SIGNAL, 0);
+ mt_dbus_fini (mt->conn);
+ }
+
+CLEANUP:
+ SPI_exit ();
+ mt_closure_free (mt);
+ g_object_unref (program);
+
+FINISH:
+ daemon_pid_file_remove ();
+
+ return 0;
+}
Added: first-lp-copy/src/mt-main.h
==============================================================================
--- (empty file)
+++ first-lp-copy/src/mt-main.h Thu Jan 10 17:22:44 2008
@@ -0,0 +1,76 @@
+/*
+ * Copyright  2007 Gerd Kohlberger <lowfi chello at>
+ *
+ * This file is part of Mousetweaks.
+ *
+ * Mousetweaks 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 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Mousetweaks 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, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef __MT_MAIN_H__
+#define __MT_MAIN_H__
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <dbus/dbus-glib-lowlevel.h>
+#include "mt-common.h"
+
+G_BEGIN_DECLS
+
+typedef enum {
+ BUTTON_STYLE_TEXT = 0,
+ BUTTON_STYLE_ICON,
+ BUTTON_STYLE_BOTH
+} ButtonStyle;
+
+typedef struct _MTClosure MTClosure;
+struct _MTClosure {
+ DBusConnection *conn;
+ GConfClient *client;
+
+ GtkWidget *about;
+
+ GTimer *delay_timer;
+ guint delay_tid;
+ GTimer *dwell_timer;
+ guint dwell_tid;
+
+ gint dwell_cct;
+ gboolean dwell_drag_started;
+ gboolean dwell_gesture_started;
+ gboolean context_menu_opened;
+
+ GestureDirection direction;
+
+ gint pointer_x;
+ gint pointer_y;
+
+ /* options */
+ gint threshold;
+ ButtonStyle style;
+ gboolean delay_enabled;
+ gdouble delay_time;
+ gboolean dwell_enabled;
+ gdouble dwell_time;
+ gboolean dwell_show_ctw;
+ DwellMode dwell_mode;
+ GestureDirection dwell_dirs[4];
+};
+
+void spi_shutdown (void);
+
+G_END_DECLS
+
+#endif /* __MT_MAIN_H__ */
Added: first-lp-copy/src/mt-session.c
==============================================================================
--- (empty file)
+++ first-lp-copy/src/mt-session.c Thu Jan 10 17:22:44 2008
@@ -0,0 +1,57 @@
+/*
+ * Copyright  2007 Gerd Kohlberger <lowfi chello at>
+ *
+ * This file is part of Mousetweaks.
+ *
+ * Mousetweaks 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 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Mousetweaks 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, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <gtk/gtk.h>
+#include <libgnomeui/gnome-client.h>
+
+#include "mt-main.h"
+
+static gint
+session_save_yourself (GnomeClient *client,
+ gint phase,
+ GnomeSaveStyle save_style,
+ gint shutdown,
+ GnomeInteractStyle interact_style,
+ gint fast,
+ gpointer data)
+{
+ return TRUE;
+}
+
+static void
+session_die (GnomeClient *client, gpointer data)
+{
+ spi_shutdown ();
+}
+
+void
+mt_session_init (gint argc, gchar **argv)
+{
+ GnomeClient *client;
+
+ client = gnome_master_client ();
+ gnome_client_set_restart_command (client, argc, argv);
+ gnome_client_set_restart_style (client, GNOME_RESTART_IF_RUNNING);
+
+ g_signal_connect (G_OBJECT(client), "die",
+ G_CALLBACK(session_die), NULL);
+
+ g_signal_connect (G_OBJECT(client), "save_yourself",
+ G_CALLBACK(session_save_yourself), NULL);
+}
Added: first-lp-copy/src/mt-session.h
==============================================================================
--- (empty file)
+++ first-lp-copy/src/mt-session.h Thu Jan 10 17:22:44 2008
@@ -0,0 +1,29 @@
+/*
+ * Copyright  2007 Gerd Kohlberger <lowfi chello at>
+ *
+ * This file is part of Mousetweaks.
+ *
+ * Mousetweaks 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 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Mousetweaks 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, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef __MT_SESSION_H__
+#define __MT_SESSION_H__
+
+G_BEGIN_DECLS
+
+void mt_session_init (gint argc, gchar **argv);
+
+G_END_DECLS
+
+#endif /* __MT_SESSION_H__ */
Added: first-lp-copy/src/pointer-capture-applet.c
==============================================================================
--- (empty file)
+++ first-lp-copy/src/pointer-capture-applet.c Thu Jan 10 17:22:44 2008
@@ -0,0 +1,631 @@
+/*
+ * Copyright  2007 Gerd Kohlberger <lowfi chello at>
+ *
+ * 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 3 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, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <gtk/gtk.h>
+#include <glade/glade.h>
+#include <pango/pango.h>
+
+#include <panel-applet.h>
+#include <panel-applet-gconf.h>
+
+#include "mt-main.h"
+
+#define TANGO_CHAMELEON_DARK 0.305f, 0.603f, 0.023f
+#define TANGO_SCARLETRED_DARK 0.643f, 0.000f, 0.000f
+#define TANGO_ALUMINIUM2_DARK 0.180f, 0.203f, 0.211f
+
+typedef struct _CaptureData CaptureData;
+struct _CaptureData {
+ PanelApplet *applet;
+
+ GladeXML *xml;
+ GtkWidget *area;
+ GtkWidget *prefs;
+
+ GdkCursor *null_cursor;
+ gboolean pointer_locked;
+ gint pointer_x;
+ gint pointer_y;
+ gboolean vertical;
+
+ gint size;
+ gint cap_button;
+ guint cap_mask;
+ gint rel_button;
+ guint rel_mask;
+};
+
+static const gchar menu_xml[] =
+ "<popup name=\"button3\">\n"
+ " <menuitem name=\"Properties Item\" verb=\"PropertiesVerb\" "
+ " _label=\"_Preferences\"\n"
+ " pixtype=\"stock\" pixname=\"gtk-properties\"/>\n"
+ " <menuitem name=\"About Item\" verb=\"AboutVerb\" _label=\"_About\"\n"
+ " pixtype=\"stock\" pixname=\"gnome-stock-about\"/>\n"
+ "</popup>\n";
+
+static void fini_capture_data (CaptureData *cd);
+
+static void
+capture_preferences (BonoboUIComponent *component,
+ gpointer data,
+ const char *cname)
+{
+ CaptureData *cd = (CaptureData *) data;
+
+ if (GTK_WIDGET_VISIBLE(cd->prefs))
+ gtk_window_present (GTK_WINDOW(cd->prefs));
+ else
+ gtk_widget_show (cd->prefs);
+}
+
+static void
+capture_about (BonoboUIComponent *component,
+ gpointer data,
+ const char *cname)
+{
+ CaptureData *cd = (CaptureData *) data;
+ GtkWidget *about;
+
+ about = glade_xml_get_widget (cd->xml, "about");
+
+ if (GTK_WIDGET_VISIBLE(about))
+ gtk_window_present (GTK_WINDOW(about));
+ else
+ gtk_widget_show (about);
+}
+
+static const BonoboUIVerb menu_verb[] = {
+ BONOBO_UI_UNSAFE_VERB ("PropertiesVerb", capture_preferences),
+ BONOBO_UI_UNSAFE_VERB ("AboutVerb", capture_about),
+ BONOBO_UI_VERB_END
+};
+
+/* grab pointer and update lock state */
+static gboolean
+lock_pointer (CaptureData *cd, guint32 time)
+{
+ GdkGrabStatus stat;
+
+ stat = gdk_pointer_grab (cd->area->window,
+ FALSE,
+ GDK_BUTTON_PRESS_MASK,
+ cd->area->window,
+ cd->null_cursor,
+ time);
+
+ if (stat != GDK_GRAB_SUCCESS)
+ return FALSE;
+
+ cd->pointer_locked = TRUE;
+ gtk_widget_queue_draw (cd->area);
+
+ return TRUE;
+}
+
+static void
+unlock_pointer (CaptureData *cd, guint32 time)
+{
+ /* move pointer to the position where it was locked */
+ gdk_display_warp_pointer (gdk_display_get_default (),
+ gtk_widget_get_screen (cd->area),
+ cd->pointer_x,
+ cd->pointer_y);
+
+ gdk_pointer_ungrab (time);
+
+ cd->pointer_locked = FALSE;
+ gtk_widget_queue_draw (cd->area);
+}
+
+/* lock pointer immediately if we have no button*/
+static gboolean
+area_entered (GtkWidget *widget, GdkEventCrossing *cev, gpointer data)
+{
+ CaptureData *cd = (CaptureData *) data;
+
+ if (cev->mode != GDK_CROSSING_NORMAL)
+ return FALSE;
+
+ if (cd->cap_button)
+ return FALSE;
+
+ cd->pointer_x = cev->x_root;
+ cd->pointer_y = cev->y_root;
+
+ return lock_pointer (cd, cev->time);
+}
+
+/* change lock states */
+static gboolean
+area_button_press (GtkWidget *widget, GdkEventButton *bev, gpointer data)
+{
+ CaptureData *cd = (CaptureData *) data;
+
+ if (bev->button == cd->cap_button &&
+ (bev->state & cd->cap_mask) == cd->cap_mask &&
+ !cd->pointer_locked) {
+
+ cd->pointer_x = bev->x_root;
+ cd->pointer_y = bev->y_root;
+ lock_pointer (cd, bev->time);
+ }
+ else if (bev->button == cd->rel_button &&
+ (bev->state & cd->rel_mask) == cd->rel_mask &&
+ cd->pointer_locked) {
+
+ unlock_pointer (cd, bev->time);
+ }
+ else if (!cd->pointer_locked && bev->button != 1) {
+ g_signal_stop_emission_by_name (widget, "button_press_event");
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+static void
+render_text (cairo_t *cr, CaptureData *cd)
+{
+ PangoLayout *layout;
+ PangoFontDescription *desc;
+ PangoRectangle rect;
+ guint size;
+
+ layout = pango_cairo_create_layout (cr);
+
+ if (cd->size >= 60)
+ pango_layout_set_text (layout, _("Locked"), -1);
+ else
+ /* l10n: the first letter of 'Locked' */
+ pango_layout_set_text (layout, _("L"), -1);
+
+ desc = pango_font_description_new ();
+ pango_font_description_set_family (desc, "Bitstream Vera Sans");
+
+ if (cd->vertical)
+ pango_font_description_set_gravity (desc, PANGO_GRAVITY_EAST);
+
+ size = panel_applet_get_size (cd->applet) / 3;
+ pango_font_description_set_size (desc, size * PANGO_SCALE);
+
+ pango_layout_set_font_description (layout, desc);
+ pango_layout_get_pixel_extents (layout, &rect, NULL);
+
+ /* check font size */
+ while ((rect.width - 8) > cd->size) {
+ pango_font_description_set_size (desc, (--size) * PANGO_SCALE);
+ pango_layout_set_font_description (layout, desc);
+ pango_layout_get_pixel_extents (layout, &rect, NULL);
+ }
+
+ if (cd->vertical)
+ cairo_rotate (cr, -pango_gravity_to_rotation (PANGO_GRAVITY_EAST));
+
+ cairo_rel_move_to (cr,
+ -rect.x - rect.width / 2,
+ -rect.y - rect.height / 2);
+ pango_cairo_layout_path (cr, layout);
+
+ pango_font_description_free (desc);
+ g_object_unref (layout);
+}
+
+/* draw background */
+static gboolean
+area_exposed (GtkWidget *widget, GdkEventExpose *eev, gpointer data)
+{
+ CaptureData *cd = (CaptureData *) data;
+ cairo_t *cr;
+ gdouble w, h;
+
+ w = widget->allocation.width;
+ h = widget->allocation.height;
+
+ cr = gdk_cairo_create (widget->window);
+ cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
+ cairo_rectangle (cr, 0.0, 0.0, w, h);
+
+ if (cd->pointer_locked)
+ cairo_set_source_rgb (cr, TANGO_SCARLETRED_DARK);
+ else
+ cairo_set_source_rgb (cr, TANGO_CHAMELEON_DARK);
+
+ cairo_paint (cr);
+ cairo_set_source_rgb (cr, TANGO_ALUMINIUM2_DARK);
+ cairo_stroke (cr);
+
+ if (cd->pointer_locked) {
+ cairo_move_to (cr, w / 2, h / 2);
+ render_text (cr, cd);
+ cairo_set_source_rgb (cr, 1.0, 1.0, 1.0);
+ cairo_fill (cr);
+ }
+
+ cairo_destroy (cr);
+
+ return TRUE;
+}
+
+static void
+update_orientation (CaptureData *cd, PanelAppletOrient orient)
+{
+ switch (orient) {
+ case PANEL_APPLET_ORIENT_UP:
+ case PANEL_APPLET_ORIENT_DOWN:
+ gtk_widget_set_size_request (cd->area, cd->size, 0);
+ cd->vertical = FALSE;
+ break;
+ case PANEL_APPLET_ORIENT_LEFT:
+ case PANEL_APPLET_ORIENT_RIGHT:
+ gtk_widget_set_size_request (cd->area, 0, cd->size);
+ cd->vertical = TRUE;
+ default:
+ break;
+ }
+}
+
+/* applet callback */
+static void
+applet_unrealize (GtkWidget *widget, gpointer data)
+{
+ fini_capture_data ((CaptureData *) data);
+}
+
+static void
+applet_orient_changed (PanelApplet *applet, guint orient, gpointer data)
+{
+ update_orientation ((CaptureData *) data, orient);
+}
+
+static void
+about_response (GtkButton *button, gint response, gpointer data)
+{
+ CaptureData *cd = (CaptureData *) data;
+
+ gtk_widget_hide (glade_xml_get_widget (cd->xml, "about"));
+}
+
+/* preferences dialog callbacks */
+static void
+prefs_size_changed (GtkSpinButton *spin, gpointer data)
+{
+ CaptureData *cd = (CaptureData *) data;
+
+ cd->size = gtk_spin_button_get_value_as_int (spin);
+ panel_applet_gconf_set_int (cd->applet, "size", cd->size, NULL);
+
+ update_orientation (cd, panel_applet_get_orient (cd->applet));
+}
+
+static void
+prefs_closed (GtkButton *button, gpointer data)
+{
+ gtk_widget_hide (((CaptureData *) data)->prefs);
+}
+
+static void
+prefs_cap_button (GtkSpinButton *spin, gpointer data)
+{
+ CaptureData *cd = (CaptureData *) data;
+
+ cd->cap_button = gtk_spin_button_get_value_as_int (spin);
+ panel_applet_gconf_set_int (cd->applet,
+ "capture_button",
+ cd->cap_button,
+ NULL);
+}
+
+static void
+prefs_cap_alt (GtkToggleButton *toggle, gpointer data)
+{
+ CaptureData *cd = (CaptureData *) data;
+
+ cd->cap_mask ^= GDK_MOD1_MASK;
+ panel_applet_gconf_set_bool (cd->applet,
+ "capture_mod_alt",
+ gtk_toggle_button_get_active (toggle),
+ NULL);
+}
+
+static void
+prefs_cap_shift (GtkToggleButton *toggle, gpointer data)
+{
+ CaptureData *cd = (CaptureData *) data;
+
+ cd->cap_mask ^= GDK_SHIFT_MASK;
+ panel_applet_gconf_set_bool (cd->applet,
+ "capture_mod_shift",
+ gtk_toggle_button_get_active (toggle),
+ NULL);
+}
+
+static void
+prefs_cap_ctrl (GtkToggleButton *toggle, gpointer data)
+{
+ CaptureData *cd = (CaptureData *) data;
+
+ cd->cap_mask ^= GDK_CONTROL_MASK;
+ panel_applet_gconf_set_bool (cd->applet,
+ "capture_mod_ctrl",
+ gtk_toggle_button_get_active (toggle),
+ NULL);
+}
+
+static void
+prefs_rel_button (GtkSpinButton *spin, gpointer data)
+{
+ CaptureData *cd = (CaptureData *) data;
+
+ cd->rel_button = gtk_spin_button_get_value_as_int (spin);
+ panel_applet_gconf_set_int (cd->applet,
+ "release_button",
+ cd->rel_button,
+ NULL);
+}
+
+static void
+prefs_rel_alt (GtkToggleButton *toggle, gpointer data)
+{
+ CaptureData *cd = (CaptureData *) data;
+
+ cd->rel_mask ^= GDK_MOD1_MASK;
+ panel_applet_gconf_set_bool (cd->applet,
+ "release_mod_alt",
+ gtk_toggle_button_get_active (toggle),
+ NULL);
+}
+
+static void
+prefs_rel_shift (GtkToggleButton *toggle, gpointer data)
+{
+ CaptureData *cd = (CaptureData *) data;
+
+ cd->rel_mask ^= GDK_SHIFT_MASK;
+ panel_applet_gconf_set_bool (cd->applet,
+ "release_mod_shift",
+ gtk_toggle_button_get_active (toggle),
+ NULL);
+}
+
+static void
+prefs_rel_ctrl (GtkToggleButton *toggle, gpointer data)
+{
+ CaptureData *cd = (CaptureData *) data;
+
+ cd->rel_mask ^= GDK_CONTROL_MASK;
+ panel_applet_gconf_set_bool (cd->applet,
+ "release_mod_ctrl",
+ gtk_toggle_button_get_active (toggle),
+ NULL);
+}
+
+static gboolean
+init_preferences (CaptureData *cd)
+{
+ GtkWidget *w;
+
+ cd->xml = glade_xml_new (GLADE_PATH "/pointer-capture-applet.glade",
+ NULL, NULL);
+ if (!cd->xml)
+ return FALSE;
+
+ gtk_window_set_default_icon_name (MT_ICON_NAME);
+
+ cd->prefs = glade_xml_get_widget (cd->xml, "capture_preferences");
+ g_signal_connect (G_OBJECT(cd->prefs), "delete-event",
+ G_CALLBACK(gtk_widget_hide_on_delete), NULL);
+
+ w = glade_xml_get_widget (cd->xml, "close");
+ g_signal_connect (G_OBJECT(w), "clicked",
+ G_CALLBACK(prefs_closed), cd);
+
+ w = glade_xml_get_widget (cd->xml, "size");
+ gtk_spin_button_set_value (GTK_SPIN_BUTTON(w), cd->size);
+ g_signal_connect (G_OBJECT(w), "value_changed",
+ G_CALLBACK(prefs_size_changed), cd);
+
+ /* capture modifier signals */
+ w = glade_xml_get_widget (cd->xml, "cap_button");
+ gtk_spin_button_set_value (GTK_SPIN_BUTTON(w), cd->cap_button);
+ g_signal_connect (G_OBJECT(w), "value_changed",
+ G_CALLBACK(prefs_cap_button), cd);
+ w = glade_xml_get_widget (cd->xml, "cap_alt");
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(w),
+ (cd->cap_mask & GDK_MOD1_MASK));
+ g_signal_connect (G_OBJECT(w), "toggled",
+ G_CALLBACK(prefs_cap_alt), cd);
+ w = glade_xml_get_widget (cd->xml, "cap_shift");
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(w),
+ (cd->cap_mask & GDK_SHIFT_MASK));
+ g_signal_connect (G_OBJECT(w), "toggled",
+ G_CALLBACK(prefs_cap_shift), cd);
+ w = glade_xml_get_widget (cd->xml, "cap_ctrl");
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(w),
+ (cd->cap_mask & GDK_CONTROL_MASK));
+ g_signal_connect (G_OBJECT(w), "toggled",
+ G_CALLBACK(prefs_cap_ctrl), cd);
+
+ /* release modifier signals */
+ w = glade_xml_get_widget (cd->xml, "rel_button");
+ gtk_spin_button_set_value (GTK_SPIN_BUTTON(w), cd->rel_button);
+ g_signal_connect (G_OBJECT(w), "value_changed",
+ G_CALLBACK(prefs_rel_button), cd);
+ w = glade_xml_get_widget (cd->xml, "rel_alt");
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(w),
+ (cd->rel_mask & GDK_MOD1_MASK));
+ g_signal_connect (G_OBJECT(w), "toggled",
+ G_CALLBACK(prefs_rel_alt), cd);
+ w = glade_xml_get_widget (cd->xml, "rel_shift");
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(w),
+ (cd->rel_mask & GDK_SHIFT_MASK));
+ g_signal_connect (G_OBJECT(w), "toggled",
+ G_CALLBACK(prefs_rel_shift), cd);
+ w = glade_xml_get_widget (cd->xml, "rel_ctrl");
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(w),
+ (cd->rel_mask & GDK_CONTROL_MASK));
+ g_signal_connect (G_OBJECT(w), "toggled",
+ G_CALLBACK(prefs_rel_ctrl), cd);
+
+ return TRUE;
+}
+
+static CaptureData *
+init_capture_data (PanelApplet *applet)
+{
+ CaptureData *cd;
+
+ cd = g_new0 (CaptureData, 1);
+ if (!cd)
+ return NULL;
+
+ cd->applet = applet;
+ cd->size = 100;
+ cd->rel_button = 1;
+
+ return cd;
+}
+
+static void
+fini_capture_data (CaptureData *cd)
+{
+ if (cd->null_cursor)
+ gdk_cursor_destroy (cd->null_cursor);
+
+ g_free (cd);
+}
+
+static gboolean
+fill_applet (PanelApplet *applet)
+{
+ CaptureData *cd;
+ GtkWidget *about;
+ GdkPixmap *bmp0 = NULL;
+ gchar char0[] = { 0x0 };
+ GdkColor c0 = { 0, 0, 0, 0 };
+
+ cd = init_capture_data (applet);
+ if (!cd)
+ return FALSE;
+
+ /* invisible cursor */
+ bmp0 = gdk_bitmap_create_from_data (NULL, char0, 1, 1);
+ if (!bmp0) {
+ g_free (cd);
+ return FALSE;
+ }
+
+ bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
+ bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
+ textdomain (GETTEXT_PACKAGE);
+
+ cd->null_cursor = gdk_cursor_new_from_pixmap (bmp0, bmp0, &c0, &c0, 0, 0);
+ g_object_unref (bmp0);
+
+ if (!cd->null_cursor) {
+ g_free (cd);
+ return FALSE;
+ }
+
+ /* gconf settings */
+ panel_applet_add_preferences (applet,
+ "/schemas/apps/pointer-capture",
+ NULL);
+
+ cd->size = panel_applet_gconf_get_int (applet, "size", NULL);
+ cd->cap_button = panel_applet_gconf_get_int (applet,
+ "capture_button", NULL);
+ cd->rel_button = panel_applet_gconf_get_int (applet,
+ "release_button", NULL);
+ if (panel_applet_gconf_get_bool (applet, "capture_mod_shift", NULL))
+ cd->cap_mask |= GDK_SHIFT_MASK;
+ if (panel_applet_gconf_get_bool (applet, "capture_mod_ctrl", NULL))
+ cd->cap_mask |= GDK_CONTROL_MASK;
+ if (panel_applet_gconf_get_bool (applet, "capture_mod_alt", NULL))
+ cd->cap_mask |= GDK_MOD1_MASK;
+ if (panel_applet_gconf_get_bool (applet, "release_mod_shift", NULL))
+ cd->rel_mask |= GDK_SHIFT_MASK;
+ if (panel_applet_gconf_get_bool (applet, "release_mod_ctrl", NULL))
+ cd->rel_mask |= GDK_CONTROL_MASK;
+ if (panel_applet_gconf_get_bool (applet, "release_mod_alt", NULL))
+ cd->rel_mask |= GDK_MOD1_MASK;
+
+ /* preferences dialog */
+ if (!init_preferences (cd)) {
+ fini_capture_data (cd);
+ return FALSE;
+ }
+
+ /* capture area */
+ cd->area = gtk_drawing_area_new ();
+ gtk_widget_add_events (cd->area,
+ GDK_ENTER_NOTIFY_MASK |
+ GDK_BUTTON_PRESS_MASK);
+
+ g_signal_connect (G_OBJECT(cd->area), "enter-notify-event",
+ G_CALLBACK(area_entered), cd);
+ g_signal_connect (G_OBJECT(cd->area), "expose-event",
+ G_CALLBACK(area_exposed), cd);
+ g_signal_connect (G_OBJECT(cd->area), "button-press-event",
+ G_CALLBACK(area_button_press), cd);
+
+ update_orientation (cd, panel_applet_get_orient (applet));
+ gtk_widget_show (cd->area);
+
+ /* about dialog */
+ about = glade_xml_get_widget (cd->xml, "about");
+ g_object_set (about, "version", VERSION, NULL);
+
+ g_signal_connect (G_OBJECT(about), "delete-event",
+ G_CALLBACK(gtk_widget_hide_on_delete), NULL);
+ g_signal_connect (G_OBJECT(about), "response",
+ G_CALLBACK(about_response), cd);
+
+ /* applet initialisation */
+ panel_applet_set_flags (applet,
+ PANEL_APPLET_EXPAND_MINOR |
+ PANEL_APPLET_HAS_HANDLE);
+ panel_applet_set_background_widget (applet, GTK_WIDGET(applet));
+ panel_applet_setup_menu (applet, menu_xml, menu_verb, cd);
+
+ g_signal_connect (applet, "change-orient",
+ G_CALLBACK(applet_orient_changed), cd);
+ g_signal_connect (applet, "unrealize",
+ G_CALLBACK(applet_unrealize), cd);
+
+ gtk_container_add (GTK_CONTAINER(applet), cd->area);
+ gtk_container_set_border_width (GTK_CONTAINER(applet), 1);
+ gtk_widget_show (GTK_WIDGET(applet));
+
+ return TRUE;
+}
+
+static gboolean
+applet_factory (PanelApplet *applet, const gchar *iid, gpointer data)
+{
+ if (!g_str_equal (iid, "OAFIID:PointerCaptureApplet"))
+ return FALSE;
+
+ return fill_applet (applet);
+}
+
+PANEL_APPLET_BONOBO_FACTORY ("OAFIID:PointerCaptureApplet_Factory",
+ PANEL_TYPE_APPLET,
+ "Pointer Capture Factory",
+ "0",
+ applet_factory,
+ NULL);
Added: first-lp-copy/src/preferences.c
==============================================================================
--- (empty file)
+++ first-lp-copy/src/preferences.c Thu Jan 10 17:22:44 2008
@@ -0,0 +1,293 @@
+/*
+ * Copyright  2007 Gerd Kohlberger <lowfi chello at>
+ *
+ * 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 3 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, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <gtk/gtk.h>
+#include <glade/glade.h>
+
+#include "mt-common.h"
+
+static GladeXML *xml = NULL;
+static GConfClient *client = NULL;
+
+static void
+update_mode_sensitivity (gint mode)
+{
+ GtkWidget *w;
+
+ w = glade_xml_get_widget (xml, "box_ctw");
+ gtk_widget_set_sensitive (w, mode);
+ w = glade_xml_get_widget (xml, "box_gesture");
+ gtk_widget_set_sensitive (w, !mode);
+}
+
+static gboolean
+verfiy_setting (gint value, gint type)
+{
+ gint i, c[N_CLICK_TYPES];
+
+ c[DWELL_CLICK_TYPE_SINGLE] =
+ gconf_client_get_int (client, OPT_G_SINGLE, NULL);
+ c[DWELL_CLICK_TYPE_DOUBLE] =
+ gconf_client_get_int (client, OPT_G_DOUBLE, NULL);
+ c[DWELL_CLICK_TYPE_DRAG] =
+ gconf_client_get_int (client, OPT_G_DRAG, NULL);
+ c[DWELL_CLICK_TYPE_RIGHT] =
+ gconf_client_get_int (client, OPT_G_RIGHT, NULL);
+
+ for (i = 0; i < N_CLICK_TYPES; i++) {
+ if (i == type)
+ continue;
+ if (c[i] == value)
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+void
+threshold_changed (GtkRange *range, gpointer data)
+{
+ gconf_client_set_int (client, OPT_THRESHOLD,
+ gtk_range_get_value (range), NULL);
+}
+
+void
+delay_enable (GtkToggleButton *button, gpointer data)
+{
+ gboolean active, dwell;
+ gint ret;
+
+ active = gtk_toggle_button_get_active (button);
+ dwell = gconf_client_get_bool (client, OPT_DWELL, NULL);
+
+ if (active && dwell) {
+ ret = mt_show_dialog (_("Enable Delay Click"),
+ _("Dwell Click is currently active and will "
+ "be disabled."),
+ GTK_MESSAGE_QUESTION);
+
+ if (ret == GTK_RESPONSE_NO || ret == GTK_RESPONSE_DELETE_EVENT) {
+ gtk_toggle_button_set_active (button, FALSE);
+ return;
+ }
+ else {
+ GtkWidget *w;
+
+ w = glade_xml_get_widget (xml, "dwell_enable");
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(w), FALSE);
+ }
+ }
+
+ gconf_client_set_bool (client, OPT_DELAY, active, NULL);
+}
+
+void
+delay_time (GtkRange *range, gpointer data)
+{
+ gconf_client_set_float (client, OPT_DELAY_T,
+ gtk_range_get_value (range), NULL);
+}
+
+void
+dwell_enable (GtkToggleButton *button, gpointer data)
+{
+ gboolean active, delay;
+ gint ret;
+
+ active = gtk_toggle_button_get_active (button);
+ delay = gconf_client_get_bool (client, OPT_DELAY, NULL);
+
+ if (active && delay) {
+ ret = mt_show_dialog (_("Enable Dwell Click"),
+ _("Delay Click is currently active and will "
+ "be disabled."),
+ GTK_MESSAGE_QUESTION);
+
+ if (ret == GTK_RESPONSE_NO || ret == GTK_RESPONSE_DELETE_EVENT) {
+ gtk_toggle_button_set_active (button, FALSE);
+ return;
+ }
+ else {
+ GtkWidget *w;
+
+ w = glade_xml_get_widget (xml, "delay_enable");
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(w), FALSE);
+ }
+ }
+
+ gconf_client_set_bool (client, OPT_DWELL, active, NULL);
+}
+
+void
+dwell_time (GtkRange *range, gpointer data)
+{
+ gconf_client_set_float (client, OPT_DWELL_T,
+ gtk_range_get_value (range), NULL);
+}
+
+void
+show_ctw (GtkToggleButton *button, gpointer data)
+{
+ gconf_client_set_bool (client, OPT_CTW,
+ gtk_toggle_button_get_active (button), NULL);
+}
+
+void
+mode_changed (GtkToggleButton *button, gpointer data)
+{
+ GSList *group;
+ gint mode;
+
+ if (!gtk_toggle_button_get_active (button))
+ return;
+
+ group = gtk_radio_button_get_group (GTK_RADIO_BUTTON(button));
+ mode = g_slist_index (group, (gconstpointer) button);
+ gconf_client_set_int (client, OPT_MODE, mode, NULL);
+
+ update_mode_sensitivity (mode);
+}
+
+void
+gesture_single (GtkComboBox *combo, gpointer data)
+{
+ gint active;
+
+ active = gtk_combo_box_get_active (combo);
+
+ if (!verfiy_setting (active, DWELL_CLICK_TYPE_SINGLE))
+ gtk_combo_box_set_active (combo, DIRECTION_DISABLE);
+ else
+ gconf_client_set_int (client, OPT_G_SINGLE, active, NULL);
+}
+
+void
+gesture_double (GtkComboBox *combo, gpointer data)
+{
+ gint active;
+
+ active = gtk_combo_box_get_active (combo);
+
+ if (!verfiy_setting (active, DWELL_CLICK_TYPE_DOUBLE))
+ gtk_combo_box_set_active (combo, DIRECTION_DISABLE);
+ else
+ gconf_client_set_int (client, OPT_G_DOUBLE, active, NULL);
+}
+
+void
+gesture_drag (GtkComboBox *combo, gpointer data)
+{
+ gint active;
+
+ active = gtk_combo_box_get_active (combo);
+
+ if (!verfiy_setting (active, DWELL_CLICK_TYPE_DRAG))
+ gtk_combo_box_set_active (combo, DIRECTION_DISABLE);
+ else
+ gconf_client_set_int (client, OPT_G_DRAG, active, NULL);
+}
+
+void
+gesture_right (GtkComboBox *combo, gpointer data)
+{
+ gint active;
+
+ active = gtk_combo_box_get_active (combo);
+
+ if (!verfiy_setting (active, DWELL_CLICK_TYPE_RIGHT))
+ gtk_combo_box_set_active (combo, DIRECTION_DISABLE);
+ else
+ gconf_client_set_int (client, OPT_G_RIGHT, active, NULL);
+}
+
+int
+main (int argc, char **argv)
+{
+ GtkWidget *w;
+ gint mode;
+
+ gtk_init (&argc, &argv);
+ gtk_window_set_default_icon_name (MT_ICON_NAME);
+
+ xml = glade_xml_new (GLADE_PATH "/mousetweaks.glade", NULL, NULL);
+ if (!xml) {
+ mt_show_dialog (_("Internal Error"),
+ _("Couldn't load glade interface file."),
+ GTK_MESSAGE_ERROR);
+ return 1;
+ }
+
+ client = gconf_client_get_default ();
+
+ /* general tab */
+ w = glade_xml_get_widget (xml, "threshold");
+ gtk_range_set_value (GTK_RANGE(w),
+ gconf_client_get_int (client, OPT_THRESHOLD, NULL));
+
+ /* delay tab */
+ w = glade_xml_get_widget (xml, "delay_enable");
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(w),
+ gconf_client_get_bool (client,
+ OPT_DELAY, NULL));
+ w = glade_xml_get_widget (xml, "delay_time");
+ gtk_range_set_value (GTK_RANGE(w),
+ gconf_client_get_float (client, OPT_DELAY_T, NULL));
+
+ /* dwell tab */
+ w = glade_xml_get_widget (xml, "dwell_enable");
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(w),
+ gconf_client_get_bool (client,
+ OPT_DWELL, NULL));
+ w = glade_xml_get_widget (xml, "dwell_time");
+ gtk_range_set_value (GTK_RANGE(w),
+ gconf_client_get_float (client, OPT_DWELL_T, NULL));
+ w = glade_xml_get_widget (xml, "dwell_show_ctw");
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(w),
+ gconf_client_get_bool (client,
+ OPT_CTW, NULL));
+
+ mode = gconf_client_get_int (client, OPT_MODE, NULL);
+ w = glade_xml_get_widget (xml, "dwell_mode_ctw");
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(w), mode);
+ w = glade_xml_get_widget (xml, "dwell_mode_gesture");
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(w), !mode);
+ update_mode_sensitivity (mode);
+
+ w = glade_xml_get_widget (xml, "dwell_gest_single");
+ gtk_combo_box_set_active (GTK_COMBO_BOX(w),
+ gconf_client_get_int (client,
+ OPT_G_SINGLE, NULL));
+ w = glade_xml_get_widget (xml, "dwell_gest_double");
+ gtk_combo_box_set_active (GTK_COMBO_BOX(w),
+ gconf_client_get_int (client,
+ OPT_G_DOUBLE, NULL));
+ w = glade_xml_get_widget (xml, "dwell_gest_drag");
+ gtk_combo_box_set_active (GTK_COMBO_BOX(w),
+ gconf_client_get_int (client,
+ OPT_G_DRAG, NULL));
+ w = glade_xml_get_widget (xml, "dwell_gest_right");
+ gtk_combo_box_set_active (GTK_COMBO_BOX(w),
+ gconf_client_get_int (client,
+ OPT_G_RIGHT, NULL));
+
+ glade_xml_signal_autoconnect (xml);
+ gtk_main ();
+
+ g_object_unref (client);
+
+ return 0;
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]