aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--AUTHORS1
-rw-r--r--COPYING676
-rw-r--r--ChangeLog0
-rw-r--r--INSTALL236
-rw-r--r--Makefile.am19
-rw-r--r--NEWS0
-rw-r--r--README0
-rw-r--r--TODO10
-rwxr-xr-xautogen.sh500
-rw-r--r--build/Makefile.am1
-rw-r--r--build/autotools/Makefile.am3
-rw-r--r--build/autotools/shave-libtool.in73
-rw-r--r--build/autotools/shave.in79
-rw-r--r--build/autotools/shave.m477
-rw-r--r--configure.ac128
-rw-r--r--example/Makefile.am16
-rw-r--r--example/menus.c51
-rw-r--r--gtk-doc.make196
-rw-r--r--libido.pc.in11
-rw-r--r--src/Makefile.am28
-rw-r--r--src/ido.h0
-rw-r--r--src/idoscalemenuitem.c449
-rw-r--r--src/idoscalemenuitem.h66
23 files changed, 2620 insertions, 0 deletions
diff --git a/AUTHORS b/AUTHORS
new file mode 100644
index 0000000..01cb1cd
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1 @@
+Cody Russell <crussell@canonical.com>
diff --git a/COPYING b/COPYING
new file mode 100644
index 0000000..4432540
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,676 @@
+
+ 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>.
+
diff --git a/ChangeLog b/ChangeLog
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/ChangeLog
diff --git a/INSTALL b/INSTALL
new file mode 100644
index 0000000..23e5f25
--- /dev/null
+++ b/INSTALL
@@ -0,0 +1,236 @@
+Installation Instructions
+*************************
+
+Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free
+Software Foundation, Inc.
+
+This file is free documentation; the Free Software Foundation gives
+unlimited permission to copy, distribute and modify it.
+
+Basic Installation
+==================
+
+These are generic installation instructions.
+
+ 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 only 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. If you're
+ using `csh' on an old version of System V, you might need to type
+ `sh ./configure' instead to prevent `csh' from trying to execute
+ `configure' itself.
+
+ Running `configure' takes awhile. 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=c89 CFLAGS=-O2 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 must use a version of `make' that
+supports the `VPATH' variable, such as 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 `..'.
+
+ If you have to use a `make' that does not support the `VPATH'
+variable, you have 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). Here is a another example:
+
+ /bin/bash ./configure CONFIG_SHELL=/bin/bash
+
+Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent
+configuration-related scripts to be executed by `/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.
+
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..3348e87
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,19 @@
+ACLOCAL_AMFLAGS = -I build/autotools
+
+V = @
+Q = $(V:1=)
+QUIET_GEN = $(Q:@=@echo ' GEN '$@;)
+
+SUBDIRS = build src example
+
+libido-0.1.pc: libido.pc
+ $(QUIET_GEN) cp -f libido.pc libido-0.1.pc
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = libido-0.1.pc
+
+CLEANFILES = libido-0.1.pc
+DISTCLEANFILES = libido.pc
+EXTRA_DIST = libido.pc.in
+
+DISTCHECK_CONFIGURE_FLAGS = --disable-gtk-doc
diff --git a/NEWS b/NEWS
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/NEWS
diff --git a/README b/README
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/README
diff --git a/TODO b/TODO
new file mode 100644
index 0000000..44fc941
--- /dev/null
+++ b/TODO
@@ -0,0 +1,10 @@
+* Add favourites support
+* Favourites could be places/mounted voulmes as well
+* New applications (installed through apt/synaptic), should be automatically
+ to the favourites category, with a 'new' tag, so they are easy to find.
+* Right-click/edit mode
+* Add new favourites?
+ - D&D url/folder/document to the 'home' applet in the panel?
+* Consolidate timelines in the icon class
+* Add clutter_texture_new_from_path, to get rid of lots of code
+* Add drop shadow under the panel
diff --git a/autogen.sh b/autogen.sh
new file mode 100755
index 0000000..04e6af7
--- /dev/null
+++ b/autogen.sh
@@ -0,0 +1,500 @@
+#!/bin/sh
+# Run this to generate all the initial makefiles, etc.
+
+#name of package
+PKG_NAME=${PKG_NAME:-Package}
+srcdir=${srcdir:-.}
+
+# default version requirements ...
+REQUIRED_AUTOCONF_VERSION=${REQUIRED_AUTOCONF_VERSION:-2.53}
+REQUIRED_AUTOMAKE_VERSION=${REQUIRED_AUTOMAKE_VERSION:-1.9}
+REQUIRED_LIBTOOL_VERSION=${REQUIRED_LIBTOOL_VERSION:-1.5}
+REQUIRED_GETTEXT_VERSION=${REQUIRED_GETTEXT_VERSION:-0.12}
+REQUIRED_GLIB_GETTEXT_VERSION=${REQUIRED_GLIB_GETTEXT_VERSION:-2.2.0}
+REQUIRED_INTLTOOL_VERSION=${REQUIRED_INTLTOOL_VERSION:-0.30}
+REQUIRED_PKG_CONFIG_VERSION=${REQUIRED_PKG_CONFIG_VERSION:-0.14.0}
+REQUIRED_GTK_DOC_VERSION=${REQUIRED_GTK_DOC_VERSION:-1.0}
+REQUIRED_DOC_COMMON_VERSION=${REQUIRED_DOC_COMMON_VERSION:-2.3.0}
+REQUIRED_GNOME_DOC_UTILS_VERSION=${REQUIRED_GNOME_DOC_UTILS_VERSION:-0.4.2}
+
+# a list of required m4 macros. Package can set an initial value
+REQUIRED_M4MACROS=${REQUIRED_M4MACROS:-}
+FORBIDDEN_M4MACROS=${FORBIDDEN_M4MACROS:-}
+
+# Not all echo versions allow -n, so we check what is possible. This test is
+# based on the one in autoconf.
+ECHO_C=
+ECHO_N=
+case `echo -n x` in
+-n*)
+ case `echo 'x\c'` in
+ *c*) ;;
+ *) ECHO_C='\c';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+# some terminal codes ...
+boldface="`tput bold 2>/dev/null`"
+normal="`tput sgr0 2>/dev/null`"
+printbold() {
+ echo $ECHO_N "$boldface" $ECHO_C
+ echo "$@"
+ echo $ECHO_N "$normal" $ECHO_C
+}
+printerr() {
+ echo "$@" >&2
+}
+
+# Usage:
+# compare_versions MIN_VERSION ACTUAL_VERSION
+# returns true if ACTUAL_VERSION >= MIN_VERSION
+compare_versions() {
+ ch_min_version=$1
+ ch_actual_version=$2
+ ch_status=0
+ IFS="${IFS= }"; ch_save_IFS="$IFS"; IFS="."
+ set $ch_actual_version
+ for ch_min in $ch_min_version; do
+ ch_cur=`echo $1 | sed 's/[^0-9].*$//'`; shift # remove letter suffixes
+ if [ -z "$ch_min" ]; then break; fi
+ if [ -z "$ch_cur" ]; then ch_status=1; break; fi
+ if [ $ch_cur -gt $ch_min ]; then break; fi
+ if [ $ch_cur -lt $ch_min ]; then ch_status=1; break; fi
+ done
+ IFS="$ch_save_IFS"
+ return $ch_status
+}
+
+# Usage:
+# version_check PACKAGE VARIABLE CHECKPROGS MIN_VERSION SOURCE
+# checks to see if the package is available
+version_check() {
+ vc_package=$1
+ vc_variable=$2
+ vc_checkprogs=$3
+ vc_min_version=$4
+ vc_source=$5
+ vc_status=1
+
+ vc_checkprog=`eval echo "\\$$vc_variable"`
+ if [ -n "$vc_checkprog" ]; then
+ printbold "using $vc_checkprog for $vc_package"
+ return 0
+ fi
+
+ if test "x$vc_package" = "xautomake" -a "x$vc_min_version" = "x1.4"; then
+ vc_comparator="="
+ else
+ vc_comparator=">="
+ fi
+ printbold "checking for $vc_package $vc_comparator $vc_min_version..."
+ for vc_checkprog in $vc_checkprogs; do
+ echo $ECHO_N " testing $vc_checkprog... " $ECHO_C
+ if $vc_checkprog --version < /dev/null > /dev/null 2>&1; then
+ vc_actual_version=`$vc_checkprog --version | head -n 1 | \
+ sed 's/^.*[ ]\([0-9.]*[a-z]*\).*$/\1/'`
+ if compare_versions $vc_min_version $vc_actual_version; then
+ echo "found $vc_actual_version"
+ # set variables
+ eval "$vc_variable=$vc_checkprog; \
+ ${vc_variable}_VERSION=$vc_actual_version"
+ vc_status=0
+ break
+ else
+ echo "too old (found version $vc_actual_version)"
+ fi
+ else
+ echo "not found."
+ fi
+ done
+ if [ "$vc_status" != 0 ]; then
+ printerr "***Error***: You must have $vc_package $vc_comparator $vc_min_version installed"
+ printerr " to build $PKG_NAME. Download the appropriate package for"
+ printerr " from your distribution or get the source tarball at"
+ printerr " $vc_source"
+ printerr
+ fi
+ return $vc_status
+}
+
+# Usage:
+# require_m4macro filename.m4
+# adds filename.m4 to the list of required macros
+require_m4macro() {
+ case "$REQUIRED_M4MACROS" in
+ $1\ * | *\ $1\ * | *\ $1) ;;
+ *) REQUIRED_M4MACROS="$REQUIRED_M4MACROS $1" ;;
+ esac
+}
+
+forbid_m4macro() {
+ case "$FORBIDDEN_M4MACROS" in
+ $1\ * | *\ $1\ * | *\ $1) ;;
+ *) FORBIDDEN_M4MACROS="$FORBIDDEN_M4MACROS $1" ;;
+ esac
+}
+
+# Usage:
+# add_to_cm_macrodirs dirname
+# Adds the dir to $cm_macrodirs, if it's not there yet.
+add_to_cm_macrodirs() {
+ case $cm_macrodirs in
+ "$1 "* | *" $1 "* | *" $1") ;;
+ *) cm_macrodirs="$cm_macrodirs $1";;
+ esac
+}
+
+# Usage:
+# print_m4macros_error
+# Prints an error message saying that autoconf macros were misused
+print_m4macros_error() {
+ printerr "***Error***: some autoconf macros required to build $PKG_NAME"
+ printerr " were not found in your aclocal path, or some forbidden"
+ printerr " macros were found. Perhaps you need to adjust your"
+ printerr " ACLOCAL_FLAGS?"
+ printerr
+}
+
+# Usage:
+# check_m4macros
+# Checks that all the requested macro files are in the aclocal macro path
+# Uses REQUIRED_M4MACROS and ACLOCAL variables.
+check_m4macros() {
+ # construct list of macro directories
+ cm_macrodirs=`$ACLOCAL --print-ac-dir`
+ # aclocal also searches a version specific dir, eg. /usr/share/aclocal-1.9
+ # but it contains only Automake's own macros, so we can ignore it.
+
+ # Read the dirlist file, supported by Automake >= 1.7.
+ if compare_versions 1.7 $AUTOMAKE_VERSION && [ -s $cm_macrodirs/dirlist ]; then
+ cm_dirlist=`sed 's/[ ]*#.*//;/^$/d' $cm_macrodirs/dirlist`
+ if [ -n "$cm_dirlist" ] ; then
+ for cm_dir in $cm_dirlist; do
+ if [ -d $cm_dir ]; then
+ add_to_cm_macrodirs $cm_dir
+ fi
+ done
+ fi
+ fi
+
+ # Parse $ACLOCAL_FLAGS
+ set - $ACLOCAL_FLAGS
+ while [ $# -gt 0 ]; do
+ if [ "$1" = "-I" ]; then
+ add_to_cm_macrodirs "$2"
+ shift
+ fi
+ shift
+ done
+
+ cm_status=0
+ if [ -n "$REQUIRED_M4MACROS" ]; then
+ printbold "Checking for required M4 macros..."
+ # check that each macro file is in one of the macro dirs
+ for cm_macro in $REQUIRED_M4MACROS; do
+ cm_macrofound=false
+ for cm_dir in $cm_macrodirs; do
+ if [ -f "$cm_dir/$cm_macro" ]; then
+ cm_macrofound=true
+ break
+ fi
+ # The macro dir in Cygwin environments may contain a file
+ # called dirlist containing other directories to look in.
+ if [ -f "$cm_dir/dirlist" ]; then
+ for cm_otherdir in `cat $cm_dir/dirlist`; do
+ if [ -f "$cm_otherdir/$cm_macro" ]; then
+ cm_macrofound=true
+ break
+ fi
+ done
+ fi
+ done
+ if $cm_macrofound; then
+ :
+ else
+ printerr " $cm_macro not found"
+ cm_status=1
+ fi
+ done
+ fi
+ if [ "$cm_status" != 0 ]; then
+ print_m4macros_error
+ return $cm_status
+ fi
+ if [ -n "$FORBIDDEN_M4MACROS" ]; then
+ printbold "Checking for forbidden M4 macros..."
+ # check that each macro file is in one of the macro dirs
+ for cm_macro in $FORBIDDEN_M4MACROS; do
+ cm_macrofound=false
+ for cm_dir in $cm_macrodirs; do
+ if [ -f "$cm_dir/$cm_macro" ]; then
+ cm_macrofound=true
+ break
+ fi
+ done
+ if $cm_macrofound; then
+ printerr " $cm_macro found (should be cleared from macros dir)"
+ cm_status=1
+ fi
+ done
+ fi
+ if [ "$cm_status" != 0 ]; then
+ print_m4macros_error
+ fi
+ return $cm_status
+}
+
+# try to catch the case where the macros2/ directory hasn't been cleared out.
+forbid_m4macro gnome-cxx-check.m4
+
+want_libtool=false
+want_gettext=false
+want_glib_gettext=false
+want_intltool=false
+want_pkg_config=false
+want_gtk_doc=false
+want_gnome_doc_utils=false
+
+configure_files="`find $srcdir -name '{arch}' -prune -o -name '_darcs' -prune -o -name '.??*' -prune -o -name configure.ac -print -o -name configure.in -print`"
+for configure_ac in $configure_files; do
+ dirname=`dirname $configure_ac`
+ if [ -f $dirname/NO-AUTO-GEN ]; then
+ echo skipping $dirname -- flagged as no auto-gen
+ continue
+ fi
+ if grep "^A[CM]_PROG_LIBTOOL" $configure_ac >/dev/null ||
+ grep "^LT_INIT" $configure_ac >/dev/null; then
+ want_libtool=true
+ fi
+ if grep "^AM_GNU_GETTEXT" $configure_ac >/dev/null; then
+ want_gettext=true
+ fi
+ if grep "^AM_GLIB_GNU_GETTEXT" $configure_ac >/dev/null; then
+ want_glib_gettext=true
+ fi
+ if grep "^AC_PROG_INTLTOOL" $configure_ac >/dev/null ||
+ grep "^IT_PROG_INTLTOOL" $configure_ac >/dev/null; then
+ want_intltool=true
+ fi
+ if grep "^PKG_CHECK_MODULES" $configure_ac >/dev/null; then
+ want_pkg_config=true
+ fi
+ if grep "^GTK_DOC_CHECK" $configure_ac >/dev/null; then
+ want_gtk_doc=true
+ fi
+ if grep "^GNOME_DOC_INIT" $configure_ac >/dev/null; then
+ want_gnome_doc_utils=true
+ fi
+
+ # check to make sure gnome-common macros can be found ...
+ if grep "^GNOME_COMMON_INIT" $configure_ac >/dev/null ||
+ grep "^GNOME_DEBUG_CHECK" $configure_ac >/dev/null ||
+ grep "^GNOME_MAINTAINER_MODE_DEFINES" $configure_ac >/dev/null; then
+ require_m4macro gnome-common.m4
+ fi
+ if grep "^GNOME_COMPILE_WARNINGS" $configure_ac >/dev/null ||
+ grep "^GNOME_CXX_WARNINGS" $configure_ac >/dev/null; then
+ require_m4macro gnome-compiler-flags.m4
+ fi
+done
+
+DIE=0
+
+#tell Mandrake autoconf wrapper we want autoconf 2.5x, not 2.13
+WANT_AUTOCONF_2_5=1
+export WANT_AUTOCONF_2_5
+version_check autoconf AUTOCONF 'autoconf2.50 autoconf autoconf-2.53' $REQUIRED_AUTOCONF_VERSION \
+ "http://ftp.gnu.org/pub/gnu/autoconf/autoconf-$REQUIRED_AUTOCONF_VERSION.tar.gz" || DIE=1
+AUTOHEADER=`echo $AUTOCONF | sed s/autoconf/autoheader/`
+
+case $REQUIRED_AUTOMAKE_VERSION in
+ 1.4*) automake_progs="automake-1.4" ;;
+ 1.5*) automake_progs="automake-1.10 automake-1.9 automake-1.8 automake-1.7 automake-1.6 automake-1.5" ;;
+ 1.6*) automake_progs="automake-1.10 automake-1.9 automake-1.8 automake-1.7 automake-1.6" ;;
+ 1.7*) automake_progs="automake-1.10 automake-1.9 automake-1.8 automake-1.7" ;;
+ 1.8*) automake_progs="automake-1.10 automake-1.9 automake-1.8" ;;
+ 1.9*) automake_progs="automake-1.10 automake-1.9" ;;
+ 1.10*) automake_progs="automake-1.10" ;;
+esac
+version_check automake AUTOMAKE "$automake_progs" $REQUIRED_AUTOMAKE_VERSION \
+ "http://ftp.gnu.org/pub/gnu/automake/automake-$REQUIRED_AUTOMAKE_VERSION.tar.gz" || DIE=1
+ACLOCAL=`echo $AUTOMAKE | sed s/automake/aclocal/`
+
+if $want_libtool; then
+ version_check libtool LIBTOOLIZE libtoolize $REQUIRED_LIBTOOL_VERSION \
+ "http://ftp.gnu.org/pub/gnu/libtool/libtool-$REQUIRED_LIBTOOL_VERSION.tar.gz" || DIE=1
+ require_m4macro libtool.m4
+fi
+
+if $want_gettext; then
+ version_check gettext GETTEXTIZE gettextize $REQUIRED_GETTEXT_VERSION \
+ "http://ftp.gnu.org/pub/gnu/gettext/gettext-$REQUIRED_GETTEXT_VERSION.tar.gz" || DIE=1
+ require_m4macro gettext.m4
+fi
+
+if $want_glib_gettext; then
+ version_check glib-gettext GLIB_GETTEXTIZE glib-gettextize $REQUIRED_GLIB_GETTEXT_VERSION \
+ "ftp://ftp.gtk.org/pub/gtk/v2.2/glib-$REQUIRED_GLIB_GETTEXT_VERSION.tar.gz" || DIE=1
+ require_m4macro glib-gettext.m4
+fi
+
+if $want_intltool; then
+ version_check intltool INTLTOOLIZE intltoolize $REQUIRED_INTLTOOL_VERSION \
+ "http://ftp.gnome.org/pub/GNOME/sources/intltool/" || DIE=1
+ require_m4macro intltool.m4
+fi
+
+if $want_pkg_config; then
+ version_check pkg-config PKG_CONFIG pkg-config $REQUIRED_PKG_CONFIG_VERSION \
+ "'http://www.freedesktop.org/software/pkgconfig/releases/pkgconfig-$REQUIRED_PKG_CONFIG_VERSION.tar.gz" || DIE=1
+ require_m4macro pkg.m4
+fi
+
+if $want_gtk_doc; then
+ version_check gtk-doc GTKDOCIZE gtkdocize $REQUIRED_GTK_DOC_VERSION \
+ "http://ftp.gnome.org/pub/GNOME/sources/gtk-doc/" || DIE=1
+ require_m4macro gtk-doc.m4
+fi
+
+if $want_gnome_doc_utils; then
+ version_check gnome-doc-utils GNOME_DOC_PREPARE gnome-doc-prepare $REQUIRED_GNOME_DOC_UTILS_VERSION \
+ "http://ftp.gnome.org/pub/GNOME/sources/gnome-doc-utils/" || DIE=1
+fi
+
+if [ "x$USE_COMMON_DOC_BUILD" = "xyes" ]; then
+ version_check gnome-common DOC_COMMON gnome-doc-common \
+ $REQUIRED_DOC_COMMON_VERSION " " || DIE=1
+fi
+
+check_m4macros || DIE=1
+
+if [ "$DIE" -eq 1 ]; then
+ exit 1
+fi
+
+if [ "$#" = 0 -a "x$NOCONFIGURE" = "x" ]; then
+ printerr "**Warning**: I am going to run \`configure' with no arguments."
+ printerr "If you wish to pass any to it, please specify them on the"
+ printerr \`$0\'" command line."
+ printerr
+fi
+
+topdir=`pwd`
+for configure_ac in $configure_files; do
+ dirname=`dirname $configure_ac`
+ basename=`basename $configure_ac`
+ if [ -f $dirname/NO-AUTO-GEN ]; then
+ echo skipping $dirname -- flagged as no auto-gen
+ elif [ ! -w $dirname ]; then
+ echo skipping $dirname -- directory is read only
+ else
+ printbold "Processing $configure_ac"
+ cd $dirname
+
+ # Note that the order these tools are called should match what
+ # autoconf's "autoupdate" package does. See bug 138584 for
+ # details.
+
+ # programs that might install new macros get run before aclocal
+ if grep "^A[CM]_PROG_LIBTOOL" $basename >/dev/null ||
+ grep "^LT_INIT" $basename >/dev/null; then
+ printbold "Running $LIBTOOLIZE..."
+ $LIBTOOLIZE --force --copy || exit 1
+ fi
+
+ if grep "^AM_GLIB_GNU_GETTEXT" $basename >/dev/null; then
+ printbold "Running $GLIB_GETTEXTIZE... Ignore non-fatal messages."
+ echo "no" | $GLIB_GETTEXTIZE --force --copy || exit 1
+ elif grep "^AM_GNU_GETTEXT" $basename >/dev/null; then
+ if grep "^AM_GNU_GETTEXT_VERSION" $basename > /dev/null; then
+ printbold "Running autopoint..."
+ autopoint --force || exit 1
+ else
+ printbold "Running $GETTEXTIZE... Ignore non-fatal messages."
+ echo "no" | $GETTEXTIZE --force --copy || exit 1
+ fi
+ fi
+
+ if grep "^AC_PROG_INTLTOOL" $basename >/dev/null ||
+ grep "^IT_PROG_INTLTOOL" $basename >/dev/null; then
+ printbold "Running $INTLTOOLIZE..."
+ $INTLTOOLIZE --force --copy --automake || exit 1
+ fi
+ if grep "^GTK_DOC_CHECK" $basename >/dev/null; then
+ printbold "Running $GTKDOCIZE..."
+ $GTKDOCIZE --copy || exit 1
+ fi
+
+ if [ "x$USE_COMMON_DOC_BUILD" = "xyes" ]; then
+ printbold "Running gnome-doc-common..."
+ gnome-doc-common --copy || exit 1
+ fi
+ if grep "^GNOME_DOC_INIT" $basename >/dev/null; then
+ printbold "Running $GNOME_DOC_PREPARE..."
+ $GNOME_DOC_PREPARE --force --copy || exit 1
+ fi
+
+ # Now run aclocal to pull in any additional macros needed
+
+ # if the AC_CONFIG_MACRO_DIR() macro is used, pass that
+ # directory to aclocal.
+ m4dir=`cat "$basename" | grep '^AC_CONFIG_MACRO_DIR' | sed -n -e 's/AC_CONFIG_MACRO_DIR(\([^()]*\))/\1/p' | sed -e 's/^\[\(.*\)\]$/\1/' | sed -e 1q`
+ if [ -n "$m4dir" ]; then
+ m4dir="-I $m4dir"
+ fi
+ printbold "Running $ACLOCAL..."
+ $ACLOCAL $m4dir $ACLOCAL_FLAGS || exit 1
+
+ if grep "GNOME_AUTOGEN_OBSOLETE" aclocal.m4 >/dev/null; then
+ printerr "*** obsolete gnome macros were used in $configure_ac"
+ fi
+
+ # Now that all the macros are sorted, run autoconf and autoheader ...
+ printbold "Running $AUTOCONF..."
+ $AUTOCONF || exit 1
+ if grep "^A[CM]_CONFIG_HEADER" $basename >/dev/null; then
+ printbold "Running $AUTOHEADER..."
+ $AUTOHEADER || exit 1
+ # this prevents automake from thinking config.h.in is out of
+ # date, since autoheader doesn't touch the file if it doesn't
+ # change.
+ test -f config.h.in && touch config.h.in
+ fi
+
+ # Finally, run automake to create the makefiles ...
+ printbold "Running $AUTOMAKE..."
+ if [ -f COPYING ]; then
+ cp -pf COPYING COPYING.autogen_bak
+ fi
+ if [ -f INSTALL ]; then
+ cp -pf INSTALL INSTALL.autogen_bak
+ fi
+ if [ $REQUIRED_AUTOMAKE_VERSION != 1.4 ]; then
+ $AUTOMAKE --gnu --add-missing --force --copy || exit 1
+ else
+ $AUTOMAKE --gnu --add-missing --copy || exit 1
+ fi
+ if [ -f COPYING.autogen_bak ]; then
+ cmp COPYING COPYING.autogen_bak > /dev/null || cp -pf COPYING.autogen_bak COPYING
+ rm -f COPYING.autogen_bak
+ fi
+ if [ -f INSTALL.autogen_bak ]; then
+ cmp INSTALL INSTALL.autogen_bak > /dev/null || cp -pf INSTALL.autogen_bak INSTALL
+ rm -f INSTALL.autogen_bak
+ fi
+
+ cd "$topdir"
+ fi
+done
+
+conf_flags="--enable-maintainer-mode"
+
+if test x$NOCONFIGURE = x; then
+ printbold Running $srcdir/configure $conf_flags "$@" ...
+ $srcdir/configure $conf_flags "$@" \
+ && echo Now type \`make\' to compile $PKG_NAME || exit 1
+else
+ echo Skipping configure process.
+fi
diff --git a/build/Makefile.am b/build/Makefile.am
new file mode 100644
index 0000000..8c90237
--- /dev/null
+++ b/build/Makefile.am
@@ -0,0 +1 @@
+SUBDIRS = autotools
diff --git a/build/autotools/Makefile.am b/build/autotools/Makefile.am
new file mode 100644
index 0000000..8b1268d
--- /dev/null
+++ b/build/autotools/Makefile.am
@@ -0,0 +1,3 @@
+EXTRA_DIST = shave-libtool.in shave.in shave.m4 introspection.m4
+
+DISTCLEANFILES = shave-libtool shave
diff --git a/build/autotools/shave-libtool.in b/build/autotools/shave-libtool.in
new file mode 100644
index 0000000..7b3d63f
--- /dev/null
+++ b/build/autotools/shave-libtool.in
@@ -0,0 +1,73 @@
+#!/bin/sh
+
+# we need sed
+SED=@SED@
+if test -z "$SED" ; then
+SED=sed
+fi
+
+lt_unmangle ()
+{
+ last_result=`echo $1 | $SED -e 's#.libs/##' -e 's#[0-9a-zA-Z_\-\.]*_la-##'`
+}
+
+tempval=`echo $1 | sed s/\'//g`
+if test "x$tempval" = "x$SHELL"; then
+ shift
+fi
+tempval=`echo $1 | sed s/\'//g`
+LIBTOOL="$tempval"
+shift
+
+# if 1, don't print anything, the underlaying wrapper will do it
+pass_though=0
+
+# scan the arguments, keep the right ones for libtool, and discover the mode
+preserved_args=
+while test "$#" -gt 0; do
+ opt="$1"
+ shift
+
+ case $opt in
+ --mode=*)
+ mode=`echo $opt | $SED -e 's/[-_a-zA-Z0-9]*=//'`
+ preserved_args="$preserved_args $opt"
+ ;;
+ -o)
+ lt_output="$1"
+ preserved_args="$preserved_args $opt"
+ ;;
+ *)
+ preserved_args="$preserved_args $opt"
+ ;;
+ esac
+done
+
+case "$mode" in
+compile)
+ # shave will be called and print the actual CC/CXX/LINK line
+ preserved_args="$preserved_args --shave-mode=$mode"
+ pass_though=1
+ ;;
+link)
+ preserved_args="$preserved_args --shave-mode=$mode"
+ Q=" LINK "
+ ;;
+*)
+ # let's u
+ # echo "*** libtool: Unimplemented mode: $mode, fill a bug report"
+ ;;
+esac
+
+lt_unmangle "$lt_output"
+output=$last_result
+
+if test -z $V; then
+ if test $pass_though -eq 0; then
+ echo "$Q$output"
+ fi
+ $LIBTOOL --silent $preserved_args
+else
+ echo $LIBTOOL $preserved_args
+ $LIBTOOL $preserved_args
+fi
diff --git a/build/autotools/shave.in b/build/autotools/shave.in
new file mode 100644
index 0000000..5c16f27
--- /dev/null
+++ b/build/autotools/shave.in
@@ -0,0 +1,79 @@
+#!/bin/sh
+
+# we need sed
+SED=@SED@
+if test -z "$SED" ; then
+SED=sed
+fi
+
+lt_unmangle ()
+{
+ last_result=`echo $1 | $SED -e 's#.libs/##' -e 's#[0-9a-zA-Z_\-\.]*_la-##'`
+}
+
+# the tool to wrap (cc, cxx, ar, ranlib, ..)
+tool="$1"
+shift
+
+# the reel tool (to call)
+REEL_TOOL="$1"
+shift
+
+pass_through=0
+preserved_args=
+while test "$#" -gt 0; do
+ opt="$1"
+ shift
+
+ case $opt in
+ --shave-mode=*)
+ mode=`echo $opt | $SED -e 's/[-_a-zA-Z0-9]*=//'`
+ ;;
+ -o)
+ lt_output="$1"
+ preserved_args="$preserved_args $opt"
+ ;;
+ *)
+ preserved_args="$preserved_args $opt"
+ ;;
+ esac
+done
+
+# mode=link is handled in the libtool wrapper
+case "$mode,$tool" in
+link,*)
+ pass_through=1
+ ;;
+*,cxx)
+ Q=" CXX "
+ ;;
+*,cc)
+ Q=" CC "
+ ;;
+*,fc)
+ Q=" FC "
+ ;;
+*,f77)
+ Q=" F77 "
+ ;;
+*,objc)
+ Q=" OBJC "
+ ;;
+*,*)
+ # should not happen
+ Q=" CC "
+ ;;
+esac
+
+lt_unmangle "$lt_output"
+output=$last_result
+
+if test -z $V; then
+ if test $pass_through -eq 0; then
+ echo "$Q$output"
+ fi
+ $REEL_TOOL $preserved_args
+else
+ echo $REEL_TOOL $preserved_args
+ $REEL_TOOL $preserved_args
+fi
diff --git a/build/autotools/shave.m4 b/build/autotools/shave.m4
new file mode 100644
index 0000000..0a3509e
--- /dev/null
+++ b/build/autotools/shave.m4
@@ -0,0 +1,77 @@
+dnl Make automake/libtool output more friendly to humans
+dnl Damien Lespiau <damien.lespiau@gmail.com>
+dnl
+dnl SHAVE_INIT([shavedir],[default_mode])
+dnl
+dnl shavedir: the directory where the shave scripts are, it defaults to
+dnl $(top_builddir)
+dnl default_mode: (enable|disable) default shave mode. This parameter
+dnl controls shave's behaviour when no option has been
+dnl given to configure. It defaults to disable.
+dnl
+dnl * SHAVE_INIT should be called late in your configure.(ac|in) file (just
+dnl before AC_CONFIG_FILE/AC_OUTPUT is perfect. This macro rewrites CC and
+dnl LIBTOOL, you don't want the configure tests to have these variables
+dnl re-defined.
+dnl * This macro requires GNU make's -s option.
+
+AC_DEFUN([_SHAVE_ARG_ENABLE],
+[
+ AC_ARG_ENABLE([shave],
+ AS_HELP_STRING(
+ [--enable-shave],
+ [use shave to make the build pretty [[default=$1]]]),,
+ [enable_shave=$1]
+ )
+])
+
+AC_DEFUN([SHAVE_INIT],
+[
+ dnl you can tweak the default value of enable_shave
+ m4_if([$2], [enable], [_SHAVE_ARG_ENABLE(yes)], [_SHAVE_ARG_ENABLE(no)])
+
+ if test x"$enable_shave" = xyes; then
+ dnl where can we find the shave scripts?
+ m4_if([$1],,
+ [shavedir="$ac_pwd"],
+ [shavedir="$ac_pwd/$1"])
+ AC_SUBST(shavedir)
+
+ dnl make is now quiet
+ AC_SUBST([MAKEFLAGS], [-s])
+ AC_SUBST([AM_MAKEFLAGS], ['`test -z $V && echo -s`'])
+
+ dnl we need sed
+ AC_CHECK_PROG(SED,sed,sed,false)
+
+ dnl substitute libtool
+ SHAVE_SAVED_LIBTOOL=$LIBTOOL
+ LIBTOOL="${SHELL} ${shavedir}/shave-libtool '${SHAVE_SAVED_LIBTOOL}'"
+ AC_SUBST(LIBTOOL)
+
+ dnl substitute cc/cxx
+ SHAVE_SAVED_CC=$CC
+ SHAVE_SAVED_CXX=$CXX
+ SHAVE_SAVED_FC=$FC
+ SHAVE_SAVED_F77=$F77
+ SHAVE_SAVED_OBJC=$OBJC
+ CC="${SHELL} ${shavedir}/shave cc ${SHAVE_SAVED_CC}"
+ CXX="${SHELL} ${shavedir}/shave cxx ${SHAVE_SAVED_CXX}"
+ FC="${SHELL} ${shavedir}/shave fc ${SHAVE_SAVED_FC}"
+ F77="${SHELL} ${shavedir}/shave f77 ${SHAVE_SAVED_F77}"
+ OBJC="${SHELL} ${shavedir}/shave objc ${SHAVE_SAVED_OBJC}"
+ AC_SUBST(CC)
+ AC_SUBST(CXX)
+ AC_SUBST(FC)
+ AC_SUBST(F77)
+ AC_SUBST(OBJC)
+
+ V=@
+ else
+ V=1
+ fi
+ Q='$(V:1=)'
+ AC_SUBST(V)
+ AC_SUBST(Q)
+])
+
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..515b1a0
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,128 @@
+#
+# shamelessly stolen from clutter-gtk
+#
+m4_define([ido_major_version], [0])
+m4_define([ido_minor_version], [1])
+m4_define([ido_micro_version], [0])
+
+m4_define([ido_api_version],
+ [ido_major_version.ido_minor_version])
+m4_define([ido_version],
+ [ido_major_version.ido_minor_version.ido_micro_version])
+
+m4_define([ido_interface_age], [0])
+m4_define([ido_binary_age],
+ [m4_eval(100 * ido_minor_version + ido_micro_version)])
+
+AC_PREREQ(2.59)
+
+AC_INIT([ido],
+ [ido_version],
+ [https://bugs.launchpad.net/avani])
+AC_CONFIG_SRCDIR([src/ido.h])
+AC_CONFIG_MACRO_DIR([build/autotools])
+
+AM_CONFIG_HEADER([config.h])
+
+AM_INIT_AUTOMAKE([1.9])
+
+IDO_MAJOR_VERSION=ido_major_version
+IDO_MINOR_VERSION=ido_minor_version
+IDO_MICRO_VERSION=ido_micro_version
+IDO_VERSION=ido_version
+AC_SUBST(IDO_MAJOR_VERSION)
+AC_SUBST(IDO_MINOR_VERSION)
+AC_SUBST(IDO_MICRO_VERSION)
+AC_SUBST(IDO_VERSION)
+
+m4_define([lt_current],
+ [m4_eval(100 * ido_minor_version + ido_micro_version - ido_interface_age)])
+m4_define([lt_revision], [ido_interface_age])
+m4_define([lt_age], [m4_eval(ido_binary_age - ido_interface_age)])
+IDO_LT_CURRENT=lt_current
+IDO_LT_REV=lt_revision
+IDO_LT_AGE=lt_age
+IDO_LT_VERSION="$IDO_LT_CURRENT:$IDO_LT_REV:$IDO_LT_AGE"
+IDO_LT_LDFLAGS="-version-info $IDO_LT_VERSION"
+
+AC_SUBST(IDO_LT_VERSION)
+AC_SUBST(IDO_LT_LDFLAGS)
+
+dnl ===========================================================================
+
+# Checks for programs
+AC_PROG_CC
+AC_DISABLE_STATIC
+AC_PROG_LIBTOOL
+AC_PATH_PROG([GLIB_MKENUMS], [glib-mkenums])
+
+# Checks for header files
+AC_HEADER_STDC
+AC_CHECK_HEADERS([fcntl.h stdlib.h string.h unistd.h])
+
+# Checks for typedefs, structures and compiler charecteristics
+AC_C_CONST
+
+# Checks for library functions
+AC_FUNC_MALLOC
+AC_FUNC_MMAP
+AC_CHECK_FUNCS([memset munmap strcasecmp strdup])
+
+PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.14)
+AC_SUBST(GTK_CFLAGS)
+AC_SUBST(GTK_LIBS)
+
+dnl ===========================================================================
+
+if test "x$GCC" = "xyes"; then
+ GCC_FLAGS="-g -Wall"
+fi
+AC_SUBST(GCC_FLAGS)
+
+# use strict compiler flags only on development releases
+m4_define([maintainer_flags_default], [m4_if(m4_eval(ido_minor_version % 2), [1], [yes], [no])])
+AC_ARG_ENABLE([maintainer-flags],
+ [AC_HELP_STRING([--enable-maintainer-flags=@<:@no/yes@:>@],
+ [Use strict compiler flags @<:@default=no@:>@])],
+ [],
+ [enable_maintainer_flags=maintainer_flags_default])
+
+MAINTAINER_CFLAGS=""
+AS_IF([test "x$enable_maintainer_flags" = "xyes" && test "x$GCC" = "xyes"],
+ [
+ MAINTAINER_CFLAGS="-Werror -Wall -Wshadow -Wcast-align -Wno-uninitialized -Wempty-body -Wformat-security -Winit-self"
+ ]
+)
+
+AC_SUBST(MAINTAINER_CFLAGS)
+
+
+dnl = GTK Doc Check ===========================================================
+
+GTK_DOC_CHECK([1.8])
+
+dnl ===========================================================================
+
+SHAVE_INIT([build/autotools], [enable])
+
+AC_CONFIG_FILES([
+ Makefile
+ build/Makefile
+ build/autotools/Makefile
+ build/autotools/shave-libtool
+ build/autotools/shave
+ src/Makefile
+ example/Makefile
+ libido.pc
+])
+
+AC_OUTPUT
+
+echo ""
+echo " ido $VERSION"
+echo " ==============================="
+echo ""
+echo " Prefix : ${prefix}"
+echo ""
+echo " Documentation: ${enable_gtk_doc}"
+echo ""
diff --git a/example/Makefile.am b/example/Makefile.am
new file mode 100644
index 0000000..c7f9c15
--- /dev/null
+++ b/example/Makefile.am
@@ -0,0 +1,16 @@
+noinst_PROGRAMS = \
+ menus
+
+menus_SOURCES = \
+ menus.c
+
+menus_CPPFLAGS = \
+ -I$(top_srcdir) \
+ -I$(top_srcdir)/src \
+ -I$(top_builddir)/src \
+ $(GCC_FLAGS) \
+ $(GTK_CFLAGS) \
+ $(MAINTAINER_CFLAGS)
+
+menus_LDADD = $(top_builddir)/src/libido-0.1.la
+
diff --git a/example/menus.c b/example/menus.c
new file mode 100644
index 0000000..c27fc14
--- /dev/null
+++ b/example/menus.c
@@ -0,0 +1,51 @@
+#include <gtk/gtk.h>
+
+#include "idoscalemenuitem.h"
+
+int
+main (int argc, char *argv[])
+{
+ GtkWidget *window;
+ GtkWidget *vbox;
+ GtkWidget *menu;
+ GtkWidget *menuitem;
+ GtkWidget *root;
+ GtkWidget *menubar;
+
+ gtk_init (&argc, &argv);
+
+ window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+ gtk_window_set_title (GTK_WINDOW (window), "Menus");
+ gtk_widget_set_size_request (window, 300, 200);
+ g_signal_connect (window, "delete-event",
+ G_CALLBACK (gtk_main_quit), NULL);
+
+ vbox = gtk_vbox_new (FALSE, 0);
+ gtk_container_add (GTK_CONTAINER (window), vbox);
+
+ menubar = gtk_menu_bar_new ();
+ gtk_box_pack_start (GTK_BOX (vbox), menubar, FALSE, FALSE, 0);
+
+ menu = gtk_menu_new ();
+
+ root = gtk_menu_item_new_with_label ("File");
+ gtk_menu_item_set_submenu (GTK_MENU_ITEM (root), menu);
+
+ menuitem = gtk_menu_item_new_with_label ("New");
+ gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);
+
+ menuitem = gtk_menu_item_new_with_label ("Open");
+ gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);
+
+ menuitem = ido_scale_menu_item_new_with_range ("Volume", 0, 100, 1);
+ gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);
+
+ /* Add the menubar */
+ gtk_menu_shell_append (GTK_MENU_SHELL (menubar), root);
+
+ gtk_widget_show_all (window);
+
+ gtk_main ();
+
+ return 0;
+}
diff --git a/gtk-doc.make b/gtk-doc.make
new file mode 100644
index 0000000..0f87cc7
--- /dev/null
+++ b/gtk-doc.make
@@ -0,0 +1,196 @@
+# -*- mode: makefile -*-
+
+####################################
+# Everything below here is generic #
+####################################
+
+if GTK_DOC_USE_LIBTOOL
+GTKDOC_CC = $(LIBTOOL) --mode=compile $(CC) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+GTKDOC_LD = $(LIBTOOL) --mode=link $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS)
+GTKDOC_RUN = $(LIBTOOL) --mode=execute
+else
+GTKDOC_CC = $(CC) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+GTKDOC_LD = $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS)
+GTKDOC_RUN = sh -c
+endif
+
+# We set GPATH here; this gives us semantics for GNU make
+# which are more like other make's VPATH, when it comes to
+# whether a source that is a target of one rule is then
+# searched for in VPATH/GPATH.
+#
+GPATH = $(srcdir)
+
+TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)
+
+EXTRA_DIST = \
+ $(content_files) \
+ $(HTML_IMAGES) \
+ $(DOC_MAIN_SGML_FILE) \
+ $(DOC_MODULE)-sections.txt \
+ $(DOC_MODULE)-overrides.txt
+
+DOC_STAMPS=scan-build.stamp tmpl-build.stamp sgml-build.stamp html-build.stamp \
+ $(srcdir)/tmpl.stamp $(srcdir)/sgml.stamp $(srcdir)/html.stamp
+
+SCANOBJ_FILES = \
+ $(DOC_MODULE).args \
+ $(DOC_MODULE).hierarchy \
+ $(DOC_MODULE).interfaces \
+ $(DOC_MODULE).prerequisites \
+ $(DOC_MODULE).signals
+
+REPORT_FILES = \
+ $(DOC_MODULE)-undocumented.txt \
+ $(DOC_MODULE)-undeclared.txt \
+ $(DOC_MODULE)-unused.txt
+
+CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS)
+
+if ENABLE_GTK_DOC
+all-local: html-build.stamp
+else
+all-local:
+endif
+
+docs: html-build.stamp
+
+$(REPORT_FILES): sgml-build.stamp
+
+#### scan ####
+
+scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB)
+ @echo 'gtk-doc: Scanning header files'
+ @-chmod -R u+w $(srcdir)
+ cd $(srcdir) && \
+ gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="$(IGNORE_HFILES)" $(SCAN_OPTIONS) $(EXTRA_HFILES)
+ if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null 2>&1 ; then \
+ CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" gtkdoc-scangobj $(SCANGOBJ_OPTIONS) --module=$(DOC_MODULE) --output-dir=$(srcdir) ; \
+ else \
+ cd $(srcdir) ; \
+ for i in $(SCANOBJ_FILES) ; do \
+ test -f $$i || touch $$i ; \
+ done \
+ fi
+ touch scan-build.stamp
+
+$(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt: scan-build.stamp
+ @true
+
+#### templates ####
+
+tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt
+ @echo 'gtk-doc: Rebuilding template files'
+ @-chmod -R u+w $(srcdir)
+ cd $(srcdir) && gtkdoc-mktmpl --module=$(DOC_MODULE) $(MKTMPL_OPTIONS)
+ touch tmpl-build.stamp
+
+tmpl.stamp: tmpl-build.stamp
+ @true
+
+tmpl/*.sgml:
+ @true
+
+
+#### xml ####
+
+sgml-build.stamp: tmpl.stamp $(HFILE_GLOB) $(CFILE_GLOB) $(DOC_MODULE)-sections.txt $(srcdir)/tmpl/*.sgml $(expand_content_files)
+ @echo 'gtk-doc: Building XML'
+ @-chmod -R u+w $(srcdir)
+ cd $(srcdir) && \
+ gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $(MKDB_OPTIONS)
+ touch sgml-build.stamp
+
+sgml.stamp: sgml-build.stamp
+ @true
+
+#### html ####
+
+html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
+ @echo 'gtk-doc: Building HTML'
+ @-chmod -R u+w $(srcdir)
+ rm -rf $(srcdir)/html
+ mkdir $(srcdir)/html
+ mkhtml_options=""; \
+ gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-path"; \
+ if test "$(?)" = "0"; then \
+ mkhtml_options=--path="$(srcdir)"; \
+ fi
+ cd $(srcdir)/html && gtkdoc-mkhtml $(mkhtml_options) $(MKHTML_OPTIONS) $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE)
+ test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) html )
+ @echo 'gtk-doc: Fixing cross-references'
+ cd $(srcdir) && gtkdoc-fixxref --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS)
+ touch html-build.stamp
+
+##############
+
+clean-local:
+ rm -f *~ *.bak
+ rm -rf .libs
+
+distclean-local:
+ cd $(srcdir) && \
+ rm -rf xml $(REPORT_FILES) \
+ $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
+
+maintainer-clean-local: clean
+ cd $(srcdir) && rm -rf xml html
+
+install-data-local:
+ installfiles=`echo $(srcdir)/html/*`; \
+ if test "$$installfiles" = '$(srcdir)/html/*'; \
+ then echo '-- Nothing to install' ; \
+ else \
+ if test -n "$(DOC_MODULE_VERSION)"; then \
+ installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \
+ else \
+ installdir="$(DESTDIR)$(TARGET_DIR)"; \
+ fi; \
+ $(mkinstalldirs) $${installdir} ; \
+ for i in $$installfiles; do \
+ echo '-- Installing '$$i ; \
+ $(INSTALL_DATA) $$i $${installdir}; \
+ done; \
+ if test -n "$(DOC_MODULE_VERSION)"; then \
+ mv -f $${installdir}/$(DOC_MODULE).devhelp2 \
+ $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp2; \
+ mv -f $${installdir}/$(DOC_MODULE).devhelp \
+ $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp; \
+ fi; \
+ ! which gtkdoc-rebase >/dev/null 2>&1 || \
+ gtkdoc-rebase --relative --dest-dir=$(DESTDIR) --html-dir=$${installdir} ; \
+ fi
+
+uninstall-local:
+ if test -n "$(DOC_MODULE_VERSION)"; then \
+ installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \
+ else \
+ installdir="$(DESTDIR)$(TARGET_DIR)"; \
+ fi; \
+ rm -rf $${installdir}
+
+#
+# Require gtk-doc when making dist
+#
+if ENABLE_GTK_DOC
+dist-check-gtkdoc:
+else
+dist-check-gtkdoc:
+ @echo "*** gtk-doc must be installed and enabled in order to make dist"
+ @false
+endif
+
+dist-hook: dist-check-gtkdoc dist-hook-local
+ mkdir $(distdir)/tmpl
+ mkdir $(distdir)/xml
+ mkdir $(distdir)/html
+ -cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl
+ -cp $(srcdir)/xml/*.xml $(distdir)/xml
+ cp $(srcdir)/html/* $(distdir)/html
+ -cp $(srcdir)/$(DOC_MODULE).types $(distdir)/
+ -cp $(srcdir)/$(DOC_MODULE)-sections.txt $(distdir)/
+ cd $(distdir) && rm -f $(DISTCLEANFILES)
+ ! which gtkdoc-rebase >/dev/null 2>&1 || \
+ gtkdoc-rebase --online --relative --html-dir=$(distdir)/html
+
+.PHONY : dist-hook-local docs
diff --git a/libido.pc.in b/libido.pc.in
new file mode 100644
index 0000000..1e6a839
--- /dev/null
+++ b/libido.pc.in
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: libido
+Description: Ayatana Indicator Display Objects
+Version: @VERSION@
+Libs: -L${libdir} -lido-0.1
+Cflags: -I${includedir}/libido-0.1
+Requires: gtk+-2.0
diff --git a/src/Makefile.am b/src/Makefile.am
new file mode 100644
index 0000000..879c6d7
--- /dev/null
+++ b/src/Makefile.am
@@ -0,0 +1,28 @@
+sources_h = \
+ idoscalemenuitem.h
+
+INCLUDES = \
+ -I$(srcdir) \
+ -I$(top_srcdir) \
+ -DG_LOG_DOMAIN=\"IDO\" \
+ -DPREFIX=\"$(prefix)"\" \
+ -DLIBDIR=\"$(libdir)"\" \
+ -DG_DISABLE_DEPRECATED \
+ -DGDK_PIXBUF_DISABLE_DEPRECATED \
+ -DGDK_DISABLE_DEPRECATED \
+ -DGTK_DISABLE_DEPRECATED
+
+AM_CPPFLAGS = \
+ $(GCC_FLAGS) \
+ $(GTK_CFLAGS) \
+ $(MAINTAINER_CFLAGS)
+
+lib_LTLIBRARIES = libido-0.1.la
+
+libido_0_1_la_SOURCES = \
+ idoscalemenuitem.c
+
+libido_0_1_la_LIBADD = $(GTK_LIBS)
+libido_0_1_la_LDFLAGS = $(GTK_LT_LDFLAGS)
+
+idoheadersdir = $(includedir)/ido-0.1/ido
diff --git a/src/ido.h b/src/ido.h
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/src/ido.h
diff --git a/src/idoscalemenuitem.c b/src/idoscalemenuitem.c
new file mode 100644
index 0000000..dd13b53
--- /dev/null
+++ b/src/idoscalemenuitem.c
@@ -0,0 +1,449 @@
+/*
+ * Copyright (C) 2010 Canonical, Ltd.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ * Authors:
+ * Cody Russell <crussell@canonical.com>
+ */
+
+#include <gtk/gtk.h>
+#include "idoscalemenuitem.h"
+
+static void ido_scale_menu_item_size_request (GtkWidget *widget,
+ GtkRequisition *requisition);
+static void ido_scale_menu_item_size_allocate (GtkWidget *widget,
+ GtkAllocation *allocation);
+static GObject* ido_scale_menu_item_constructor (GType type,
+ guint n_construct_properties,
+ GObjectConstructParam *construct_params);
+static void ido_scale_menu_item_set_property (GObject *object,
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec);
+static void ido_scale_menu_item_get_property (GObject *object,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec);
+static void ido_scale_menu_item_forall (GtkContainer *container,
+ gboolean include_internals,
+ GtkCallback callback,
+ gpointer data);
+static void ido_scale_menu_item_construct_child (IdoScaleMenuItem *item);
+static gboolean ido_scale_menu_item_button_press_event (GtkWidget *menuitem,
+ GdkEventButton *event);
+static gboolean ido_scale_menu_item_button_release_event (GtkWidget *menuitem,
+ GdkEventButton *event);
+static gboolean ido_scale_menu_item_motion_notify_event (GtkWidget *menuitem,
+ GdkEventMotion *event);
+
+struct _IdoScaleMenuItemPrivate {
+ GtkWidget *scale;
+ GtkAdjustment *adjustment;
+};
+
+enum {
+ PROP_0,
+ PROP_MIN,
+ PROP_MAX,
+ PROP_STEP,
+ PROP_VALUE,
+ PROP_ADJUSTMENT
+};
+
+G_DEFINE_TYPE (IdoScaleMenuItem, ido_scale_menu_item, GTK_TYPE_MENU_ITEM)
+
+#define GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), IDO_TYPE_SCALE_MENU_ITEM, IdoScaleMenuItemPrivate))
+
+static void
+ido_scale_menu_item_state_changed (GtkWidget *widget,
+ GtkStateType previous_state)
+{
+ gtk_widget_set_state (widget, GTK_STATE_NORMAL);
+}
+
+static gboolean
+ido_scale_menu_item_scroll_event (GtkWidget *menuitem,
+ GdkEventScroll *event)
+{
+ GtkWidget *scale = GET_PRIVATE (IDO_SCALE_MENU_ITEM (menuitem))->scale;
+
+ gtk_widget_event (scale, (GdkEvent *) event);
+
+ return TRUE;
+}
+
+static void
+ido_scale_menu_item_class_init (IdoScaleMenuItemClass *item_class)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (item_class);
+ GtkObjectClass *object_class = GTK_OBJECT_CLASS (item_class);
+ GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (item_class);
+ GtkContainerClass *container_class = GTK_CONTAINER_CLASS (item_class);
+
+ container_class->forall = ido_scale_menu_item_forall;
+
+ widget_class->size_request = ido_scale_menu_item_size_request;
+ widget_class->size_allocate = ido_scale_menu_item_size_allocate;
+
+ widget_class->button_press_event = ido_scale_menu_item_button_press_event;
+ widget_class->button_release_event = ido_scale_menu_item_button_release_event;
+ widget_class->motion_notify_event = ido_scale_menu_item_motion_notify_event;
+ widget_class->scroll_event = ido_scale_menu_item_scroll_event;
+ widget_class->state_changed = ido_scale_menu_item_state_changed;
+
+ gobject_class->constructor = ido_scale_menu_item_constructor;
+ gobject_class->set_property = ido_scale_menu_item_set_property;
+ gobject_class->get_property = ido_scale_menu_item_get_property;
+
+ g_object_class_install_property (gobject_class,
+ PROP_ADJUSTMENT,
+ g_param_spec_object ("adjustment",
+ "Adjustment",
+ "The adjustment containing the scale value",
+ GTK_TYPE_ADJUSTMENT,
+ G_PARAM_READWRITE));
+
+ g_type_class_add_private (object_class, sizeof (IdoScaleMenuItemPrivate));
+}
+
+static void
+ido_scale_menu_item_init (IdoScaleMenuItem *self)
+{
+ IdoScaleMenuItemPrivate *priv = GET_PRIVATE (self);
+
+ priv->scale = NULL;
+ priv->adjustment = NULL;
+}
+
+static void
+ido_scale_menu_item_set_property (GObject *object,
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec)
+{
+ IdoScaleMenuItem *menu_item = IDO_SCALE_MENU_ITEM (object);
+ IdoScaleMenuItemPrivate *priv = GET_PRIVATE (menu_item);
+
+ switch (prop_id)
+ {
+ case PROP_ADJUSTMENT:
+ if (!priv->scale)
+ {
+ priv->adjustment = g_value_get_object (value);
+ priv->scale = gtk_hscale_new (priv->adjustment);
+ gtk_scale_set_draw_value (GTK_SCALE (priv->scale), FALSE);
+ }
+
+ ido_scale_menu_item_construct_child (menu_item);
+
+ break;
+
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+ido_scale_menu_item_get_property (GObject *object,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec)
+{
+ IdoScaleMenuItem *menu_item = IDO_SCALE_MENU_ITEM (object);
+ IdoScaleMenuItemPrivate *priv = GET_PRIVATE (menu_item);
+ GtkAdjustment *adjustment = gtk_range_get_adjustment (GTK_RANGE (priv->scale));
+
+ switch (prop_id)
+ {
+ case PROP_ADJUSTMENT:
+ g_value_set_object (value, adjustment);
+ break;
+
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static GObject*
+ido_scale_menu_item_constructor (GType type,
+ guint n_construct_properties,
+ GObjectConstructParam *construct_params)
+{
+ GObject *object;
+ IdoScaleMenuItemPrivate *priv;
+
+ object = G_OBJECT_CLASS (ido_scale_menu_item_parent_class)->constructor (type,
+ n_construct_properties,
+ construct_params);
+
+ priv = GET_PRIVATE (object);
+
+ if (priv->scale != NULL)
+ {
+ ido_scale_menu_item_construct_child (IDO_SCALE_MENU_ITEM (object));
+ }
+
+ return object;
+}
+
+static void
+ido_scale_menu_item_forall (GtkContainer *container,
+ gboolean include_internals,
+ GtkCallback callback,
+ gpointer data)
+{
+ IdoScaleMenuItem *item = IDO_SCALE_MENU_ITEM (container);
+ IdoScaleMenuItemPrivate *priv = GET_PRIVATE (item);
+
+ GTK_CONTAINER_CLASS (ido_scale_menu_item_parent_class)->forall (container,
+ include_internals,
+ callback,
+ data);
+
+ if (include_internals && priv->scale)
+ (* callback) (priv->scale, data);
+}
+
+static void
+ido_scale_menu_item_size_request (GtkWidget *widget,
+ GtkRequisition *requisition)
+{
+ IdoScaleMenuItem *item;
+ IdoScaleMenuItemPrivate *priv;
+ GtkWidget *parent;
+ GtkPackDirection dir;
+ gint child_width = 0;
+ gint child_height = 0;
+
+ parent = gtk_widget_get_parent (widget);
+ item = IDO_SCALE_MENU_ITEM (widget);
+ priv = GET_PRIVATE (item);
+
+ if (GTK_IS_MENU_BAR (parent))
+ dir = gtk_menu_bar_get_child_pack_direction (GTK_MENU_BAR (parent));
+ else
+ dir = GTK_PACK_DIRECTION_LTR;
+
+ if (priv->scale && GTK_WIDGET_VISIBLE (priv->scale))
+ {
+ GtkRequisition child_requisition;
+
+ gtk_widget_size_request (priv->scale,
+ &child_requisition);
+
+ child_width = child_requisition.width;
+ child_height = child_requisition.height;
+ }
+
+ GTK_WIDGET_CLASS (ido_scale_menu_item_parent_class)->size_request (widget, requisition);
+
+ if (dir == GTK_PACK_DIRECTION_LTR || dir == GTK_PACK_DIRECTION_RTL)
+ requisition->height = MAX (requisition->height, child_height);
+ else
+ requisition->width = MAX (requisition->width, child_width);
+}
+
+static void
+ido_scale_menu_item_size_allocate (GtkWidget *widget,
+ GtkAllocation *allocation)
+{
+ IdoScaleMenuItem *item;
+ IdoScaleMenuItemPrivate *priv;
+ GtkWidget *parent;
+ GtkPackDirection dir;
+
+ item = IDO_SCALE_MENU_ITEM (widget);
+ priv = GET_PRIVATE (item);
+ parent = gtk_widget_get_parent (widget);
+
+ if (GTK_IS_MENU_BAR (parent))
+ dir = gtk_menu_bar_get_child_pack_direction (GTK_MENU_BAR (parent));
+ else
+ dir = GTK_PACK_DIRECTION_LTR;
+
+ GTK_WIDGET_CLASS (ido_scale_menu_item_parent_class)->size_allocate (widget, allocation);
+
+ if (priv->scale && GTK_WIDGET_VISIBLE (priv->scale))
+ {
+ GtkRequisition child_requisition;
+ GtkAllocation child_allocation;
+ gint x, y, offset;
+
+ gtk_widget_get_child_requisition (priv->scale,
+ &child_requisition);
+
+ if (dir == GTK_PACK_DIRECTION_LTR || dir == GTK_PACK_DIRECTION_RTL)
+ {
+ offset = GTK_CONTAINER (item)->border_width + widget->style->xthickness;
+
+ if ((gtk_widget_get_direction (widget) == GTK_TEXT_DIR_LTR) ==
+ (dir == GTK_PACK_DIRECTION_LTR))
+ {
+ x = offset + (GTK_MENU_ITEM (item)->toggle_size - child_requisition.width) / 2;
+ }
+ else
+ {
+ // TODO rtl
+ }
+ }
+ else
+ {
+ offset = GTK_CONTAINER (item)->border_width + widget->style->ythickness;
+
+ // TODO vertical
+ }
+
+ y = widget->allocation.height / 2 - child_requisition.height / 2;
+
+ child_allocation.width = allocation->width;
+ child_allocation.height = child_requisition.height;
+ child_allocation.x = widget->allocation.x + MAX (x, 0);
+ child_allocation.y = widget->allocation.y + MAX (y, 0);
+
+ gtk_widget_size_allocate (priv->scale, &child_allocation);
+ }
+}
+
+static gboolean
+ido_scale_menu_item_button_press_event (GtkWidget *menuitem,
+ GdkEventButton *event)
+{
+ GtkWidget *scale = GET_PRIVATE (IDO_SCALE_MENU_ITEM (menuitem))->scale;
+
+ event->x = 0;
+ event->y = 0;
+
+ //gtk_grab_add (scale);
+ //gtk_grab_remove (menuitem->parent);
+
+ gtk_widget_event (scale, (GdkEvent *)event);
+
+ //g_signal_stop_emission_by_name (menuitem->parent, "hide");
+
+ return FALSE;
+}
+
+static gboolean
+ido_scale_menu_item_button_release_event (GtkWidget *menuitem,
+ GdkEventButton *event)
+{
+ GtkWidget *scale = GET_PRIVATE (IDO_SCALE_MENU_ITEM (menuitem))->scale;
+
+ //gtk_grab_remove (scale);
+
+ gtk_widget_event (scale, (GdkEvent *) event);
+
+ return TRUE;
+}
+
+static gboolean
+ido_scale_menu_item_motion_notify_event (GtkWidget *menuitem,
+ GdkEventMotion *event)
+{
+ GtkWidget *scale = GET_PRIVATE (IDO_SCALE_MENU_ITEM (menuitem))->scale;
+ gtk_widget_event (scale, (GdkEvent *) event);
+
+ return TRUE;
+}
+
+static void
+ido_scale_menu_item_construct_child (IdoScaleMenuItem *item)
+{
+ IdoScaleMenuItemPrivate *priv = GET_PRIVATE (item);
+ GtkWidget *scale = NULL;
+
+ if (priv->scale)
+ {
+ scale = g_object_ref (priv->scale);
+ if (scale->parent)
+ {
+ gtk_container_remove (GTK_CONTAINER (scale->parent), scale);
+ }
+ }
+
+ priv->scale = NULL;
+
+ priv->scale = gtk_hscale_new (priv->adjustment);
+ gtk_widget_set_can_focus (priv->scale, TRUE);
+ gtk_scale_set_draw_value (GTK_SCALE (priv->scale), FALSE);
+
+ if (GTK_BIN (item)->child)
+ gtk_container_remove (GTK_CONTAINER (item),
+ GTK_BIN (item)->child);
+
+ if (scale)
+ {
+ priv->scale = scale;
+ g_object_set (priv->scale,
+ "visible", TRUE,
+ "no-show-all", TRUE,
+ NULL);
+
+ gtk_container_add (GTK_CONTAINER (item), scale);
+ gtk_widget_show_all (scale);
+
+ g_object_unref (scale);
+
+ return;
+ }
+}
+
+
+/**
+ * ido_scale_menu_item_new:
+ * @label: the text of the new menu item.
+ * @adjustment: A #GtkAdjustment describing the slider value.
+ * @returns: a new #IdoScaleMenuItem.
+ *
+ * Creates a new #IdoScaleMenuItem with an empty label.
+ **/
+GtkWidget*
+ido_scale_menu_item_new (const gchar *label,
+ GtkAdjustment *adjustment)
+{
+ return g_object_new (IDO_TYPE_SCALE_MENU_ITEM,
+ "adjustment", adjustment,
+ NULL);
+}
+
+/**
+ * ido_scale_menu_item_new_with_label:
+ * @label: the text of the menu item.
+ * @min: The minimum value of the slider.
+ * @max: The maximum value of the slider.
+ * @step: The step increment of the slider.
+ * @returns: a new #IdoScaleMenuItem.
+ *
+ * Creates a new #IdoScaleMenuItem containing a label.
+ **/
+GtkWidget*
+ido_scale_menu_item_new_with_range (const gchar *label,
+ gdouble min,
+ gdouble max,
+ gdouble step)
+{
+ GtkObject *adjustment = gtk_adjustment_new (min, min, max, step, 10 * step, 0);
+
+ return g_object_new (IDO_TYPE_SCALE_MENU_ITEM,
+ "label", label,
+ "adjustment", adjustment,
+ NULL);
+}
+
+#define __IDO_SCALE_MENU_ITEM_C__
diff --git a/src/idoscalemenuitem.h b/src/idoscalemenuitem.h
new file mode 100644
index 0000000..78a9b25
--- /dev/null
+++ b/src/idoscalemenuitem.h
@@ -0,0 +1,66 @@
+/*
+ * Copyright (C) 2010 Canonical, Ltd.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ * Authors:
+ * Cody Russell <crussell@canonical.com>
+ */
+
+#ifndef __IDO_SCALE_MENU_ITEM_H__
+#define __IDO_SCALE_MENU_ITEM_H__
+
+#include <gtk/gtkmenuitem.h>
+
+G_BEGIN_DECLS
+
+#define IDO_TYPE_SCALE_MENU_ITEM (ido_scale_menu_item_get_type ())
+#define IDO_SCALE_MENU_ITEM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), IDO_TYPE_SCALE_MENU_ITEM, IdoScaleMenuItem))
+#define IDO_SCALE_MENU_ITEM_CLASS(c) (G_TYPE_CHECK_CLASS_CAST ((c), IDO_TYPE_SCALE_MENU_ITEM, IdoScaleMenuItemClass))
+#define IDO_IS_SCALE_MENU_ITEM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), IDO_TYPE_SCALE_MENU_ITEM))
+#define IDO_IS_SCALE_MENU_ITEM_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), IDO_TYPE_SCALE_MENU_ITEM))
+#define IDO_SCALE_MENU_ITEM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), IDO_TYPE_SCALE_MENU_ITEM, IdoScaleMenuItemClass))
+
+
+typedef struct _IdoScaleMenuItem IdoScaleMenuItem;
+typedef struct _IdoScaleMenuItemClass IdoScaleMenuItemClass;
+typedef struct _IdoScaleMenuItemPrivate IdoScaleMenuItemPrivate;
+
+struct _IdoScaleMenuItem
+{
+ GtkMenuItem parent_instance;
+
+ IdoScaleMenuItemPrivate *priv;
+};
+
+struct _IdoScaleMenuItemClass
+{
+ GtkMenuItemClass parent_class;
+};
+
+
+GType ido_scale_menu_item_get_type (void) G_GNUC_CONST;
+GtkWidget *ido_scale_menu_item_new (const gchar *label,
+ GtkAdjustment *adjustment);
+GtkWidget *ido_scale_menu_item_new_with_range (const gchar *label,
+ gdouble min,
+ gdouble max,
+ gdouble step);
+GtkWidget *ido_scale_menu_item_get_scale (IdoScaleMenuItem *menuitem);
+
+G_END_DECLS
+
+#endif /* __IDO_SCALE_MENU_ITEM_H__ */