summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Smirnov <onlyjob@debian.org>2018-06-29 03:48:38 +0200
committerDmitry Smirnov <onlyjob@debian.org>2018-06-29 03:48:38 +0200
commit3d2f876f8e964c6504723be495621743b11b8a4c (patch)
treeb62684c0fdf3a5217869de9aa8cbbd55f91e56e5
Import clipit_1.4.4.orig.tar.xz
[dgit import orig clipit_1.4.4.orig.tar.xz]
-rw-r--r--.gitignore27
-rw-r--r--.tx/config8
-rw-r--r--AUTHORS3
-rw-r--r--COPYING675
-rw-r--r--ChangeLog1260
-rw-r--r--INSTALL236
-rw-r--r--Makefile.am50
-rw-r--r--NEWS1
-rw-r--r--README34
-rwxr-xr-xautogen.sh62
-rwxr-xr-xcommit61
-rw-r--r--configure.ac124
-rw-r--r--data/Makefile.am25
-rw-r--r--data/clipit-startup.desktop.in9
-rw-r--r--data/clipit-trayicon.svg191
-rw-r--r--data/clipit.desktop.in8
-rw-r--r--doc/Makefile.am2
-rw-r--r--doc/clipit.149
-rw-r--r--m4/Makefile.in373
-rw-r--r--po/Makefile.in.in222
-rw-r--r--po/POTFILES.in9
-rw-r--r--po/POTFILES.skip1
-rw-r--r--po/bg.po347
-rw-r--r--po/ca.po348
-rw-r--r--po/clipit.pot337
-rw-r--r--po/cs.po349
-rw-r--r--po/da.po343
-rw-r--r--po/de.po352
-rw-r--r--po/es.po344
-rw-r--r--po/es_ES.po350
-rw-r--r--po/et.po349
-rw-r--r--po/fi.po346
-rw-r--r--po/fr.po350
-rw-r--r--po/fr_FR.po348
-rw-r--r--po/gl_ES.po349
-rw-r--r--po/hu.po349
-rw-r--r--po/is.po349
-rw-r--r--po/it.po350
-rw-r--r--po/ja.po349
-rw-r--r--po/lt.po349
-rw-r--r--po/nb.po338
-rw-r--r--po/pl.po344
-rw-r--r--po/pt_BR.po348
-rw-r--r--po/pt_PT.po349
-rw-r--r--po/ro.po352
-rw-r--r--po/ru.po349
-rw-r--r--po/sv.po350
-rw-r--r--po/tr.po339
-rw-r--r--po/zh_CN.po345
-rw-r--r--src/Makefile.am18
-rw-r--r--src/clipit-i18n.h24
-rw-r--r--src/daemon.c113
-rw-r--r--src/daemon.h33
-rw-r--r--src/eggaccelerators.c657
-rw-r--r--src/eggaccelerators.h87
-rw-r--r--src/history.c324
-rw-r--r--src/history.h58
-rw-r--r--src/keybinder.c338
-rw-r--r--src/keybinder.h45
-rw-r--r--src/main.c1070
-rw-r--r--src/main.h96
-rw-r--r--src/manage.c429
-rw-r--r--src/manage.h32
-rw-r--r--src/preferences.c1161
-rw-r--r--src/preferences.h84
-rw-r--r--src/utils.c256
-rw-r--r--src/utils.h42
-rwxr-xr-xupdate-po48
68 files changed, 17717 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..cceedcf
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,27 @@
+*.o
+*.gmo
+*.m4
+stamp-h1
+src/clipit
+src/.deps
+config.*
+configure
+intltool-*
+missing
+install-sh
+po/*.sin
+po/*.sed
+po/*.header
+po/.intltool-merge-cache
+depcomp
+ABOUT-NLS
+po/POTFILES
+po/Rules-quot
+po/stamp-it
+autom4te.cache
+data/*.desktop
+po/Makevars.template
+*~
+Makefile
+Makefile.in
+compile
diff --git a/.tx/config b/.tx/config
new file mode 100644
index 0000000..beb7ae6
--- /dev/null
+++ b/.tx/config
@@ -0,0 +1,8 @@
+[main]
+host = https://www.transifex.com
+lang_map = bg_BG:bg, de_DE:de, et_EE:et
+
+[clipit.clipitpot]
+file_filter = po/<lang>.po
+source_file = po/clipit.pot
+source_lang = en
diff --git a/AUTHORS b/AUTHORS
new file mode 100644
index 0000000..612e44c
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1,3 @@
+Cristian Henzel <oss@rspwn.com>
+Gilberto "Xyhthyx" Miralla <xyhthyx@gmail.com>
+Eugene Nikolsky <pluton.od@gmail.com>
diff --git a/COPYING b/COPYING
new file mode 100644
index 0000000..10926e8
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,675 @@
+ 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..37c839a
--- /dev/null
+++ b/ChangeLog
@@ -0,0 +1,1260 @@
+ClipIt-1.4.3-20151110002 ~ 2015-11-10 16:39:50 +0200
+
++ Fixed: Updated project website.
+
+
+ClipIt-1.4.3-20151110001 - 2015-11-10 13:56:51 +0200
+
++ Fixed: Bumped version to 1.4.3.
+
+
+Check if `pkg-config` is installed before using it. - 2014-09-27 15:08:08 +0200
+
+Without this check, if tool is not present, `configure` command fails
+with syntax error.
+
+
+Fixed work with utf8 strings - 2014-06-09 16:46:49 +0300
+
+
+
+ClipIt-1.4.2-20120404003 - 2012-04-04 10:40:07 +0300
+
++ Added: Added new translations.
+
+
+ClipIt-1.4.2-20120404002 - 2012-04-04 10:35:04 +0300
+
++ Fixed: Bug in previous POTFILES.in generation code.
+
+
+ClipIt-1.4.2-20120404001 - 2012-04-04 10:21:55 +0300
+
++ Fixed: Updated translations and fixed POTFILES generation script.
+
+
+Silence glib warnings regarding GOptionFlags. - 2011-11-09 20:51:51 +0200
+
+These warnings:
+GLib-WARNING **: goption.c:2168: ignoring no-arg, optional-arg or filename flags (8) on option of type 0
+
+
+ClipIt-1.4.2-20110623001 - 2011-06-23 13:46:10 +0300
+
++ Fixed: Bumped version to 1.4.2.
++ Fixed: Changed layout of the ChangeLog file.
+
+
+ClipIt-1.4.1-20110604001 - 2011-06-04 17:49:05 +0300
+
++ Fixed: Removed some more files from git.
+
+
+ClipIt-1.4.1-20110527004 - 2011-05-27 10:29:37 +0300
+
++ Fixed: Typo in src/Makefile.am.
+
+
+ClipIt-1.4.1-20110527003 - 2011-05-27 10:24:50 +0300
+
++ Fixed: Removed some files from git. Again.
+
+
+Silence glib warnings regarding GOptionFlags. - 2011-11-09 20:51:51 +0200
+
+These warnings:
+GLib-WARNING **: goption.c:2168: ignoring no-arg, optional-arg or filename flags (8) on option of type 0
+
+
+ClipIt-1.4.2-20120302002 - 2012-03-02 22:21:05 +0200
+
++ Fixed: Updated copyright information.
+
+
+ClipIt-1.4.2-20120302001 - 2012-03-02 21:56:42 +0200
+
++ Fixed: Fixed a GTK include error with gtypes.h.
+
+
+ClipIt-1.4.2-20111222001 - 2011-12-04 22:42:57 +0200
+
++ Added: Merged "Offline mode" feature, by Eugene Nikolsky
++ Added: Allow to switch focus by Tab key in "Manage History"
+ dialog, by Eugene Nikolsky
+
+
+ClipIt-1.4.2-20111115006 - 2011-11-15 12:34:18 +0200
+
++ Fixed: Use the shipped icon instead of gtk-paste.
+
+
+ClipIt-1.4.2-20111115005 - 2011-11-15 11:46:35 +0200
+
++ Fixed: Fix max height of Manage history window.
+
+
+ClipIt-1.4.2-20111115004 - 2011-11-15 11:05:58 +0200
+
++ Fixed: Updated translations.
+
+
+ClipIt-1.4.2-20111115003 - 2011-11-15 10:48:36 +0200
+
++ Fixed: Present the user with the existing dialog, if he tries to
+ open one while another one is active.
+
+
+ClipIt-1.4.2-20111115002 - 2011-11-15 08:59:45 +0200
+
++ Fixed: Also save history after it is modified by selection of items.
+
+
+ClipIt-1.4.2-20111115001 - 2011-11-15 08:40:38 +0200
+
++ Fixed: Added Unity to autostart.
+
+
+Silence glib warnings regarding GOptionFlags. - 2011-11-09 20:51:51 +0200
+
+These warnings:
+GLib-WARNING **: goption.c:2168: ignoring no-arg, optional-arg or filename flags (8) on option of type 0
+
+
+ClipIt-1.4.2-20111115001 - 2011-11-15 08:27:37 +0200
+
++ Fixed: Added dirty workaround for Debian multiarch build.
+
+
+ClipIt-1.4.2-20111018001 - 2011-10-18 15:48:40 +0300
+
++ Fixed: Fixed a typo in preferences dialog.
++ Fixed: Updated translations.
++ Fixed: Fixed a couple of omissions in the scripts.
+
+
+ClipIt-1.4.2-20111015001 - 2011-10-15 12:30:45 +0300
+
++ Fixed: Fixed bug where wrong item was being selected for editing.
+
+
+ClipIt-1.4.2-20110906001 - 2011-09-06 15:03:00 +0300
+
++ Added: Added transifex config to repository.
++ Added: Added script for automatic translation updating.
++ Added: Added Bulgarian translation.
++ Fixed: Updated translations.
+
+
+ClipIt-1.4.2-20110831002 - 2011-08-31 10:24:26 +0300
+
++ Added: Added commit script to git.
+
+
+ClipIt-1.4.2-20110831001 - 2011-08-31 10:21:47 +0300
+
++ Fixed: Fixed remove bug when multiple items were selected in the list.
+
+
+ClipIt-1.4.2-20110816003 - 2011-08-16 14:24:00 +0300
+
++ Added: Added some more strings to gettext.
++ Added: Added Estonian translation.
+
+
+ClipIt-1.4.2-20110816002 - 2011-08-16 13:06:12 +0300
+
++ Fixed: Fixed bug where in some cases actions and excludes couldn't be
+ added. (SF: #3315622) (Thanks to Guido Tabbernuk)
+
+
+ClipIt-1.4.2-20110816001 - 2011-08-16 12:52:05 +0300
+
++ Added: Added logic to Makefile to automatically update translation files.
++ Fixed: Added some more strings to gettext and updated translations.
+
+
+ClipIt-1.4.2-20110726001 - 2011-07-26 18:10:39 +0300
+
++ Fixed: Updated German localisation. (LP: #793878)
++ Fixed: Fixed problem with excludes and actions lists not working properly
+ on Debian derived distributions. (SF: #3315622)
+
+
+ClipIt-1.4.2-20110623001 - 2011-06-23 13:46:10 +0300
+
++ Fixed: Bumped version to 1.4.2.
++ Fixed: Changed layout of the ChangeLog file.
+
+
+ClipIt-1.4.1-20110604001 - 2011-06-04 17:49:05 +0300
+
++ Fixed: Removed some more files from git.
+
+
+ClipIt-1.4.1-20110527004 - 2011-05-27 10:29:37 +0300
+
++ Fixed: Typo in src/Makefile.am.
+
+
+ClipIt-1.4.1-20110527003 - 2011-05-27 10:24:50 +0300
+
++ Fixed: Removed some files from git. Again.
+
+
+ClipIt-1.4.1-20110527002 - 2011-05-27 09:59:35 +0300
+
++ Fixed: Made autogen.sh executable.
+
+
+ClipIt-1.4.1-20110527001 - 2011-05-27 09:53:08 +0300
+
++ Fixed: Hidden righ-click menu option when indicator is active and
+ disabled the static item spin when static items are not
+ shown.
+
+
+ClipIt-1.4.1-20110526008 - 2011-05-26 23:03:11 +0300
+
++ Fixed: We're not loosing the static flag on existing items anymore.
+
+
+ClipIt-1.4.1-20110526007 - 2011-05-26 22:24:38 +0300
+
++ Fixed: Fixed a bug in the history saving function.
++ Added: We are now showing static items in the menu.
+
+
+ClipIt-1.4.1-20110526006 - 2011-05-26 18:37:47 +0300
+
++ Fixed: Fixed display and icon of indicator menu.
++ Fixed: We are now installing the icon to the icontheme instead of
+ the pixmaps folder.
+
+
+ClipIt-1.4.1-20110526005 - 2011-05-26 15:38:12 +0300
+
++ Added: Added options for static items in menu.
+
+
+ClipIt-1.4.1-20110526004 - 2011-05-26 12:54:45 +0300
+
++ Added: Added option for using right-click menu.
+
+
+ClipIt-1.4.1-20110526003 - 2011-05-26 11:28:25 +0300
+
++ Fixed: Unified history and tray menu for easier maintenance.
+
+
+ClipIt-1.4.1-20110526002 - 2011-05-26 10:10:34 +0300
+
++ Fixed: Simplified add item process.
+
+
+ClipIt-1.4.1-20110526001 - 2011-05-26 09:47:54 +0300
+
++ Added: Items marked as static are not purged from the history anymore.
+
+
+ClipIt-1.4.1-20110525003 - 2011-05-25 11:13:14 +0300
+
++ Added: We now also use png icons, if there are any.
+
+
+ClipIt-1.4.1-20110525002 - 2011-05-25 09:03:24 +0300
+
++ Fixed: Numpad keys now work for selecting too.
+
+
+ClipIt-1.4.1-20110525001 - 2011-05-25 08:48:36 +0300
+
++ Fixed: Changed history file to new type.
+
+
+ClipIt-1.4.1-20110524001 - 2011-05-24 12:10:02 +0300
+
++ Fixed: Converted history to new data type.
++ Fixed: Fixed all of the remaining warnings.
+
+
+ClipIt-1.4.1-20110523003 - 2011-05-23 16:05:14 +0300
+
++ Fixed: We are now checking if the history should be saved in the
+ save_history function itself.
++ Fixed: Indicator menu should now refresh even if "Save history"
+ is disabled.
+
+
+ClipIt-1.4.0-20110521003 - 2011-05-21 22:29:03 +0300
+
++ Fixed: Fixed wrong selection behaviour in "Manage history" dialog.
+
+
+ClipIt-1.4.0-20110521001 - 2011-05-21 19:56:46 +0300
+
++ Added: We are now using the shipped icon in the systray.
+
+
+ClipIt-1.4.0-20110520002 - 2011-05-21 00:46:33 +0300
+
++ Fixed: Remove duplicate truncate_history functionality.
++ Added: Added basic history item structure.
+
+
+ClipIt-1.4.0-20110520001 - 2011-05-20 22:54:04 +0300
+
++ Fixed: Deleted items are now properly removed from the history.
++ Fixed: Double clicking an item in the "Manage history" dialog now
+ properly selects it again.
++ Added: [Enter] (for selecting the item) and [Delete] (for removing
+ the item(s)) now works in the "Manage history" dialog.
+
+
+ClipIt-1.4.0-20110518002 - 2011-05-18 15:51:13 +0300
+
++ Added: Also added 1-0 shortcuts to the history menu.
+
+
+ClipIt-1.4.0-20110518001 - 2011-05-18 15:24:54 +0300
+
++ Fixed: Re-enabled indicator support.
++ Added: We are now installing a sepparate icon for clipit (not using it
+ yet, though).
++ Added: Search as you type in "Manage history" dialog.
++ Added: 1-0 shortcuts for fast selecting of menu items.
++ Added: Possiblity to select multiple items for deletion in the
+ "Manage history" dialog.
+
+
+ClipIt-1.4.0-20110506001 - 2011-05-06 14:15:48 +0300
+
++ Added: Added option to automatically paste an entry after selecting it.
++ Fixed: Re-enabled indicator since it should now work properly.
+
+
+ClipIt-1.3.13-20110503001 - 2011-05-03 08:55:49 +0300
+
++ Fixed: Bug in the indicator code that makes ClipIt crash X under
+ certain circumstances.
+
+
+ClipIt-1.3.12-20110228001 - 2011-02-28 14:23:09 +0200
+
++ Fixed: Fixed a typo in the warnings.
++ Fixed: Turned off appindicator because it's buggy.
+
+
+ClipIt-1.3.11-20101224001 - 2010-12-24 10:16:59 +0200
+
++ Fixed: Removed some unneeded files from both the archive and git.
++ Fixed: Changed git versioning scheme.
+
+
+ClipIt-v1.3.11-22122010001 - 2010-12-22 12:12:28 +0200
+
++ Fixed: Indicator menu now actually refreshes properly.
++ Fixed: Removed "Full history" and changed the wording in the
+ "Preferences" dialog.
++ Fixed: Imported "Select first item in menu" fix from Parcellite 0.9.3.
+
+
+ClipIt-v1.3.10-21122010001 - 2010-12-21 21:05:38 +0200
+
++ Fixed: Imported fixes from Parcellite 0.9.3 (thanks to Doug Springer).
++ Fixed: Fixed cast warnings when building on x86 machines.
++ Fixed: Fixed build error on ubuntu 11.04.
++ Fixed: Fixed problem with statusicon menu showing double content.
++ Fixed: Fixed problem with clicking the statusicon menu multiple
+ times killing the program.
+
+
+ClipIt-v1.3.9-19122010001 - 2010-12-19 14:21:42 +0200
+
++ Fixed: Fixed error while compiling without indicator support.
++ Fixed: Fixed a couple of memory leaks.
+
+
+ClipIt-v1.3.8-18122010002 - 2010-12-18 15:20:11 +0200
+
++ Fixed: Updated configure script for 1.3.8.
+
+
+ClipIt-v1.3.8-18122010001 - 2010-12-18 13:52:42 +0200
+
++ Fixed: Changed the "old" menu to look exactly like the indicator
+ menu.
++ Fixed: Changed the indicator menu to refresh automatically.
+
+
+ClipIt-v1.3.6-06122010002 - 2010-12-06 14:10:51 +0200
+
++Fixed: Fixed a small bug when building without indicator support.s
+
+
+ClipIt-v1.3.5-06122010001 - 2010-12-06 10:55:14 +0200
+
++ Added: Added support for "Application Indicator".
++ Fixed: Fixed a couple of typos and indentations.
+
+
+ClipIt-v1.3.4-26112010001 - 2010-11-26 13:44:33 +0200
+
++ Fixed: Now we are warning the user that his history is saved in a
+ plain text file and ask for his explicit permission
+ to save the history.
++ Fixed: When the user disables history saving we also ask if he wants
+ to empty the current history file.
++ Fixed: Renamed "Find" menu entry to "Manage history".
++ Fixed: ClipIt now complies to the "XDG Base Directory Specification".
+
+
+ClipIt-v1.3.3-23112010001 - 2010-11-23 11:31:11 +0200
+
++ Fixed: Fixed some more markup.
++ Fixed: Rearranged parts of the Preferences dialog to be cleaner.
++ Fixed: Fixed bug in "Manage History" window not selecting the history
+ item properly.
+
+
+ClipIt-v1.3.2-22112010001 - 2010-11-22 10:59:01 +0200
+
++ Fixed: Fixed most of the markup and indentation (replaced double spaces
+ with tabs).
++ Fixed: Removed clipboard restoring from history, as this seems to cause
+ more problems than it solves.
+
+
+ClipIt-v1.3.1-17112010001 - 2010-11-17 08:29:36 +0200
+
++ Added: Added autostart support for LXDE.
++ Fixed: Fixed problem with "Edit" window not appearing.
+
+
+ClipIt-v1.3.0-14112010001 - 2010-11-14 21:03:11 +0200
+
++ Added: Added "Edit" and "Remove" buttons to the "Manage History" dialog.
++ Fixed: Major speed improvements for big history entries while:
+ searching through the history;
+ populating the "Manage History" dialog;
+ generating the popup menus;
+ All of these should now be more than 99% faster, at the expense
+ of an (at most) 1MB overhead. I think it's worth it, though.
++ Fixed: Fixed a drawing issue with the small history menu when activated
+ by clicking on the systray icon.
+
+
+ClipIt-v1.2.6-12112010003 - 2010-11-12 12:01:11 +0200
+
++ Fixed: Removed reference to pthread.h from configure.in.
++ Fixed: Set AM_MAINTAINER_MODE to disabled by default.
+
+
+ClipIt-v1.2.5-12112010002 - 2010-11-12 10:39:04 +0200
+
++ Fixed: Now using autopoint instead of gettextize to avoid waiting for
+ user input.
++ Fixed: Added AM_MAINTAINER_MODE, to get rid of the disable-maintainer-mode
+ warning.
++ Fixed: Fixed a small typo in main.c.
++ Fixed: removed dependency of pthread.h (the pthread_exit function that we
+ use is also in glib.h).
+
+
+ClipIt-v1.2.4-12112010001 - 2010-11-12 08:29:02 +0200
+
++ Fixed: Fixed 2 small omitions from previous changes.
+
+
+ClipIt-v1.2.3-11112010002 - 2010-11-11 20:24:19 +0200
+
++ Fixed: Fixed the manpage so it now aligns to the conventions for
+ writing Linux man pages.
++ Fixed: Added the "-Wl,--as-needed" flag, so only the needed packages
+ are included.
+
+
+ClipIt-v1.2.2-11112010001 - 2010-11-11 13:21:09 +0200
+
++ Fixed: Some small compatibility changes for debian packaging.
+
+
+ClipIt-v1.2.1-10112010002 - 2010-11-10 11:21:03 +0200
+
++ Fixed: Fixed OOM bug when copying large chunks of text by limiting
+ the history entry to 512KB.
+ (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=602205)
+
+
+ClipIt-v1.2.0-10112010001 - 2010-11-10 09:49:29 +0200
+
++ Added: Option to save URIs (they were actually saved by default before, but
+ now you have the option to disable this behaviour).
++ Fixed: Copying files and folders now works again.
++ Fixed: Changed some of the default configuration values.
+
+
+ClipIt-v1.1.0-09112010001-beta - 2010-11-09 12:46:50 +0200
+
++ Added: Option to show index numbers in history.
++ Fixed: Search window now gets properly focused when launched with the hotkey.
++ Fixed: Search window is now resizable.
++ Fixed: Double casting when calling 'item_selected'.
++ Fixed: Removed some unnecessary comments and fixed some of the others.
++ Fixed: Moved search dialog and functions to manage.c, as this dialog will
+ become "Manage Clipboard" in the next version.
+
+
+ClipIt-1.4.1-20110523002 - 2011-05-23 13:02:17 +0300
+
++ Fixed: Unified indicator and systray menu into a single function.
+
+
+ClipIt-1.4.1-20110523001 - 2011-05-23 10:21:38 +0300
+
++ Fixed: Removed some files from git again. You now need to run
+ ./autogen.sh first when building from git.
+
+Changes to be committed:
+
+deleted: ABOUT-NLS
+modified: ChangeLog
+deleted: Makefile.in
+modified: README
+deleted: TODO
+deleted: aclocal.m4
+deleted: config.h.in
+deleted: configure
+modified: configure.in
+deleted: data/Makefile.in
+deleted: doc/Makefile.in
+deleted: intltool-extract.in
+deleted: intltool-merge.in
+deleted: intltool-update.in
+deleted: m4/codeset.m4
+deleted: m4/fcntl-o.m4
+deleted: m4/glibc2.m4
+deleted: m4/glibc21.m4
+deleted: m4/intdiv0.m4
+deleted: m4/intl.m4
+deleted: m4/intldir.m4
+deleted: m4/intlmacosx.m4
+deleted: m4/intmax.m4
+deleted: m4/inttypes-pri.m4
+deleted: m4/inttypes_h.m4
+deleted: m4/lcmessage.m4
+deleted: m4/lock.m4
+deleted: m4/longlong.m4
+deleted: m4/printf-posix.m4
+deleted: m4/size_max.m4
+deleted: m4/stdint_h.m4
+deleted: m4/threadlib.m4
+deleted: m4/uintmax_t.m4
+deleted: m4/visibility.m4
+deleted: m4/wchar_t.m4
+deleted: m4/wint_t.m4
+deleted: m4/xsize.m4
+deleted: src/Makefile.in
+
+
+ClipIt-1.4.0-20110521003 - 2011-05-21 22:29:03 +0300
+
++ Fixed: Fixed wrong selection behaviour in "Manage history" dialog.
+
+Changes to be committed:
+
+modified: ChangeLog
+modified: src/manage.c
+
+
+ClipIt-1.4.0-20110521002 - 2011-05-21 20:22:19 +0300
+
++ Fixed: Ran autogen.sh to reconfigure files.
+
+Changes to be committed:
+
+modified: configure
+
+
+ClipIt-1.4.0-20110521001 - 2011-05-21 19:56:46 +0300
+
++ Added: We are now using the shipped icon in the systray.
+
+Changes to be committed:
+
+modified: ChangeLog
+modified: TODO
+modified: src/history.h
+modified: src/main.c
+modified: src/utils.c
+
+
+ClipIt-1.4.0-20110520002 - 2011-05-21 00:46:33 +0300
+
++ Fixed: Remove duplicate truncate_history functionality.
++ Added: Added basic history item structure.
+
+Changes to be committed:
+
+modified: ChangeLog
+modified: TODO
+modified: src/history.c
+modified: src/history.h
+modified: src/main.h
+
+
+ClipIt-1.4.0-20110520001 - 2011-05-20 22:54:04 +0300
+
++ Fixed: Deleted items are now properly removed from the history.
++ Fixed: Double clicking an item in the "Manage history" dialog now
+ properly selects it again.
++ Added: [Enter] (for selecting the item) and [Delete] (for removing
+ the item(s)) now works in the "Manage history" dialog.
+
+Changes to be committed:
+
+modified: ChangeLog
+modified: TODO
+modified: src/main.c
+modified: src/manage.c
+
+
+ClipIt-1.4.0-20110518002 - 2011-05-18 15:51:13 +0300
+
++ Added: Also added 1-0 shortcuts to the history menu.
+
+Changes to be committed:
+
+ modified: ChangeLog
+ modified: src/main.c
+
+
+ClipIt-1.4.0-20110518001 - 2011-05-18 15:24:54 +0300
+
++ Fixed: Re-enabled indicator support.
++ Added: We are now installing a sepparate icon for clipit (not using it
+ yet, though).
++ Added: Search as you type in "Manage history" dialog.
++ Added: 1-0 shortcuts for fast selecting of menu items.
++ Added: Possiblity to select multiple items for deletion in the
+ "Manage history" dialog.
+
+Changes to be committed:
+
+ modified: ChangeLog
+ modified: Makefile.am
+ modified: Makefile.in
+ modified: TODO
+ modified: configure
+ modified: configure.in
+ modified: data/Makefile.am
+ modified: data/Makefile.in
+ new file: data/trayicon.svg
+ modified: src/Makefile.am
+ modified: src/Makefile.in
+ modified: src/main.c
+ modified: src/manage.c
+
+
+ClipIt-1.4.0-20110506001 - 2011-05-06 14:15:48 +0300
+
+ + Added: Added option to automatically paste an entry after selecting it.
+ + Fixed: Re-enabled indicator since it should now work properly.
+
+Changes to be committed:
+
+ modified: ChangeLog
+ modified: configure
+ modified: src/main.c
+ modified: src/main.h
+ modified: src/preferences.c
+ modified: src/preferences.h
+
+
+ClipIt-1.3.13-20110503001 - 2011-05-03 08:55:49 +0300
+
++ Fixed: Bug in the indicator code that makes ClipIt crash X under
+ certain circumstances.
+
+Changes to be committed:
+
+ modified: ChangeLog
+ modified: configure
+ modified: configure.in
+ modified: src/main.c
+
+
+ClipIt-1.3.12-20110228001 - 2011-02-28 14:23:09 +0200
+
++ Fixed: Fixed a typo in the warnings.
++ Fixed: Turned off appindicator because it's buggy.
+
+Changes to be committed:
+
+modified: ChangeLog
+modified: configure
+modified: configure.in
+modified: src/preferences.h
+
+
+ClipIt-1.3.13-20110503001 - 2011-05-03 08:55:49 +0300
+
++ Fixed: Bug in the indicator code that makes ClipIt crash X under
+ certain circumstances.
+
+Changes to be committed:
+
+ modified: ChangeLog
+ modified: configure
+ modified: configure.in
+ modified: src/main.c
+
+
+ClipIt-1.3.12-20110228001 - 2011-02-28 14:23:09 +0200
+
++ Fixed: Fixed a typo in the warnings.
++ Fixed: Turned off appindicator because it's buggy.
+
+Changes to be committed:
+
+modified: ChangeLog
+modified: configure
+modified: configure.in
+modified: src/preferences.h
+
+
+ClipIt-1.3.11-20101224001 - 2010-12-24 10:16:59 +0200
+
++ Fixed: Removed some unneeded files from both the archive and git.
++ Fixed: Changed git versioning scheme.
+
+Changes to be committed:
+
+ modified: ChangeLog
+ modified: Makefile.am
+ modified: Makefile.in
+ deleted: autom4te.cache/output.0
+ deleted: autom4te.cache/output.1
+ deleted: autom4te.cache/requests
+ deleted: autom4te.cache/traces.0
+ deleted: autom4te.cache/traces.1
+ deleted: po/Makefile.in.in~
+ deleted: po/Makevars.template
+ deleted: po/Rules-quot
+ deleted: po/boldquot.sed
+ deleted: po/en@boldquot.header
+ deleted: po/en@quot.header
+ deleted: po/insert-header.sin
+ deleted: po/quot.sed
+ deleted: po/remove-potcdate.sin
+
+
+ClipIt-v1.3.11-22122010001 - 2010-12-22 12:12:28 +0200
+
++ Fixed: Indicator menu now actually refreshes properly.
++ Fixed: Removed "Full history" and changed the wording in the
+ "Preferences" dialog.
++ Fixed: Imported "Select first item in menu" fix from Parcellite 0.9.3.
+
+Changes to be committed:
+
+ modified: ChangeLog
+ modified: autom4te.cache/output.0
+ modified: autom4te.cache/output.1
+ modified: autom4te.cache/traces.1
+ modified: configure
+ modified: configure.in
+ modified: src/history.c
+ modified: src/main.c
+ modified: src/main.h
+ modified: src/preferences.c
+ modified: src/preferences.h
+
+
+ClipIt-v1.3.10-21122010001 - 2010-12-21 21:05:38 +0200
+
++ Fixed: Imported fixes from Parcellite 0.9.3 (thanks to Doug Springer).
++ Fixed: Fixed cast warnings when building on x86 machines.
++ Fixed: Fixed build error on ubuntu 11.04.
++ Fixed: Fixed problem with statusicon menu showing double content.
++ Fixed: Fixed problem with clicking the statusicon menu multiple
+ times killing the program.
+
+Changes to be committed:
+
+ modified: ChangeLog
+ modified: Makefile.in
+ modified: autom4te.cache/output.0
+ modified: autom4te.cache/output.1
+ modified: autom4te.cache/requests
+ modified: autom4te.cache/traces.0
+ modified: autom4te.cache/traces.1
+ modified: configure
+ modified: configure.in
+ modified: data/Makefile.in
+ modified: doc/Makefile.in
+ modified: src/Makefile.am
+ modified: src/Makefile.in
+ modified: src/daemon.c
+ modified: src/main.c
+ modified: src/main.h
+ modified: src/manage.c
+ modified: src/preferences.c
+
+
+ClipIt-v1.3.9-19122010001 - 2010-12-19 14:21:42 +0200
+
++ Fixed: Fixed error while compiling without indicator support.
++ Fixed: Fixed a couple of memory leaks.
+
+Changes to be committed:
+
+ modified: ChangeLog
+ modified: autom4te.cache/output.0
+ modified: autom4te.cache/output.1
+ modified: autom4te.cache/requests
+ modified: autom4te.cache/traces.1
+ modified: configure
+ modified: configure.in
+ modified: src/history.c
+ modified: src/main.c
+ modified: src/manage.c
+ modified: src/preferences.c
+
+
+ClipIt-v1.3.8-18122010002 - 2010-12-18 15:20:11 +0200
+
++ Fixed: Updated configure script for 1.3.8.
+
+Changes to be committed:
+
+ modified: ChangeLog
+ modified: autom4te.cache/output.0
+ modified: autom4te.cache/output.1
+ modified: autom4te.cache/requests
+ modified: autom4te.cache/traces.1
+ modified: configure
+
+
+ClipIt-v1.3.8-18122010001 - 2010-12-18 13:52:42 +0200
+
++ Fixed: Changed the "old" menu to look exactly like the indicator
+ menu.
++ Fixed: Changed the indicator menu to refresh automatically.
+
+Changes to be committed:
+
+ modified: ChangeLog
+ modified: configure.in
+ modified: src/history.c
+ modified: src/main.c
+ modified: src/main.h
+
+
+ClipIt-v1.3.7-12122010001 - 2010-12-12 18:19:48 +0200
+
++ Fixed: Changed E-Mail address and Project website.
++ Fixed: Included all files that get generated by autogen.sh, so
+ that now you don't need to run it anymore.
+
+Changes to be committed:
+
+ new file: ABOUT-NLS
+ modified: AUTHORS
+ modified: ChangeLog
+ new file: Makefile.in
+ modified: NEWS
+ modified: README
+ new file: aclocal.m4
+ new file: autom4te.cache/output.0
+ new file: autom4te.cache/output.1
+ new file: autom4te.cache/requests
+ new file: autom4te.cache/traces.0
+ new file: autom4te.cache/traces.1
+ new file: config.h.in
+ new file: configure
+ modified: configure.in
+ new file: data/Makefile.in
+ new file: doc/Makefile.in
+ modified: doc/clipit.1
+ new file: intltool-extract.in
+ new file: intltool-merge.in
+ new file: intltool-update.in
+ new file: m4/codeset.m4
+ new file: m4/fcntl-o.m4
+ new file: m4/glibc2.m4
+ new file: m4/glibc21.m4
+ new file: m4/intdiv0.m4
+ new file: m4/intl.m4
+ new file: m4/intldir.m4
+ new file: m4/intlmacosx.m4
+ new file: m4/intmax.m4
+ new file: m4/inttypes-pri.m4
+ new file: m4/inttypes_h.m4
+ new file: m4/lcmessage.m4
+ new file: m4/lock.m4
+ new file: m4/longlong.m4
+ new file: m4/printf-posix.m4
+ new file: m4/size_max.m4
+ new file: m4/stdint_h.m4
+ new file: m4/threadlib.m4
+ new file: m4/uintmax_t.m4
+ new file: m4/visibility.m4
+ new file: m4/wchar_t.m4
+ new file: m4/wint_t.m4
+ new file: m4/xsize.m4
+ new file: po/Makefile.in.in~
+ new file: po/Makevars.template
+ new file: po/Rules-quot
+ new file: po/boldquot.sed
+ new file: po/en@boldquot.header
+ new file: po/en@quot.header
+ new file: po/insert-header.sin
+ new file: po/quot.sed
+ new file: po/remove-potcdate.sin
+ modified: po/zh_CN.po
+ new file: src/Makefile.in
+ modified: src/daemon.c
+ modified: src/daemon.h
+ modified: src/history.c
+ modified: src/history.h
+ modified: src/main.c
+ modified: src/main.h
+ modified: src/manage.c
+ modified: src/manage.h
+ modified: src/preferences.c
+ modified: src/preferences.h
+ modified: src/utils.c
+ modified: src/utils.h
+
+
+ClipIt-v1.3.6-06122010002 - 2010-12-06 14:10:51 +0200
+
++Fixed: Fixed a small bug when building without indicator support.
+
+Changes to be committed:
+
+ modified: ChangeLog
+ modified: configure.in
+ modified: src/main.c
+
+
+ClipIt-v1.3.5-06122010001 - 2010-12-06 10:55:14 +0200
+
++ Added: Added support for "Application Indicator".
++ Fixed: Fixed a couple of typos and indentations.
+
+Changes to be committed:
+
+ modified: ChangeLog
+ modified: configure.in
+ modified: src/Makefile.am
+ modified: src/main.c
+
+
+ClipIt-v1.3.4-26112010001 - 2010-11-26 13:44:33 +0200
+
++ Fixed: Now we are warning the user that his history is saved in a
+ plain text file and ask for his explicit permission
+ to save the history.
++ Fixed: When the user disables history saving we also ask if he wants
+ to empty the current history file.
++ Fixed: Renamed "Find" menu entry to "Manage history".
++ Fixed: ClipIt now complies to the "XDG Base Directory Specification".
+
+Changes to be committed:
+
+ modified: ChangeLog
+ modified: NEWS
+ modified: configure.in
+ modified: src/history.c
+ modified: src/history.h
+ modified: src/main.c
+ modified: src/preferences.c
+ modified: src/preferences.h
+ modified: src/utils.c
+ modified: src/utils.h
+
+
+ClipIt-v1.3.3-23112010001 - 2010-11-23 11:31:11 +0200
+
++ Fixed: Fixed some more markup.
++ Fixed: Rearranged parts of the Preferences dialog to be cleaner.
++ Fixed: Fixed bug in "Manage History" window not selecting the history
+ item properly.
+
+Changes to be committed:
+
+ modified: ChangeLog
+ modified: configure.in
+ modified: src/main.c
+ modified: src/manage.c
+ modified: src/preferences.c
+
+
+ClipIt-v1.3.2-22112010001 - 2010-11-22 10:59:01 +0200
+
++ Fixed: Fixed most of the markup and indentation (replaced double spaces
+ with tabs).
++ Fixed: Removed clipboard restoring from history, as this seems to cause
+ more problems than it solves.
+
+Changes to be committed:
+
+ modified: ChangeLog
+ modified: configure.in
+ modified: src/daemon.c
+ modified: src/daemon.h
+ modified: src/eggaccelerators.c
+ modified: src/history.c
+ modified: src/history.h
+ modified: src/main.c
+ modified: src/main.h
+ modified: src/manage.c
+ modified: src/manage.h
+ modified: src/preferences.c
+ modified: src/preferences.h
+ modified: src/utils.c
+ modified: src/utils.h
+
+
+ClipIt-v1.3.1-17112010001 - 2010-11-17 08:29:36 +0200
+
++ Added: Added autostart support for LXDE.
++ Fixed: Fixed problem with "Edit" window not appearing.
+
+Changes to be committed:
+
+ modified: ChangeLog
+ modified: configure.in
+ modified: data/clipit-startup.desktop.in
+ modified: src/main.c
+ modified: src/manage.c
+ modified: src/preferences.h
+
+
+ClipIt-v1.3.0-14112010001 - 2010-11-14 21:03:11 +0200
+
++ Added: Added "Edit" and "Remove" buttons to the "Manage History" dialog.
++ Fixed: Major speed improvements for big history entries while:
+ searching through the history;
+ populating the "Manage History" dialog;
+ generating the popup menus;
+ All of these should now be more than 99% faster, at the expense
+ of an (at most) 1MB overhead. I think it's worth it, though.
++ Fixed: Fixed a drawing issue with the small history menu when activated
+ by clicking on the systray icon.
+
+Changes to be committed:
+
+ modified: ChangeLog
+ modified: TODO
+ modified: configure.in
+ modified: src/history.h
+ modified: src/main.c
+ modified: src/manage.c
+
+
+ClipIt-v1.2.6-12112010003 - 2010-11-12 12:01:11 +0200
+
++ Fixed: Removed reference to pthread.h from configure.in.
++ Fixed: Set AM_MAINTAINER_MODE to disabled by default.
+
+Changes to be committed:
+
+ modified: ChangeLog
+ deleted: config.h.in
+ modified: configure.in
+
+
+ClipIt-v1.2.5-12112010002 - 2010-11-12 10:39:04 +0200
+
++ Fixed: Now using autopoint instead of gettextize to avoid waiting for
+ user input.
++ Fixed: Added AM_MAINTAINER_MODE, to get rid of the disable-maintainer-mode
+ warning.
++ Fixed: Fixed a small typo in main.c.
++ Fixed: removed dependency of pthread.h (the pthread_exit function that we
+ use is also in glib.h).
+
+Changes to be committed:
+
+ modified: ChangeLog
+ modified: autogen.sh
+ modified: configure.in
+ modified: src/main.c
+
+
+ClipIt-v1.2.4-12112010001 - 2010-11-12 08:29:02 +0200
+
++ Fixed: Fixed 2 small omitions from previous changes.
+
+Changes to be committed:
+
+ modified: ChangeLog
+ modified: configure.in
+ modified: src/history.c
+ modified: src/main.c
+
+
+ClipIt-v1.2.3-11112010002 - 2010-11-11 20:24:19 +0200
+
++ Fixed: Fixed the manpage so it now aligns to the conventions for
+ writing Linux man pages.
++ Fixed: Added the "-Wl,--as-needed" flag, so only the needed packages
+ are included.
+
+Changes to be committed:
+
+ modified: ChangeLog
+ modified: configure.in
+ modified: doc/clipit.1
+ modified: src/Makefile.am
+
+
+ClipIt-v1.2.2-11112010001 - 2010-11-11 13:21:09 +0200
+
++ Fixed: Some small compatibility changes for debian packaging.
+
+Changes to be committed:
+
+ modified: ChangeLog
+ modified: NEWS
+ modified: README
+ modified: configure.in
+ modified: doc/clipit.1
+ modified: po/POTFILES.in
+ modified: src/main.c
+
+
+ClipIt-v1.2.1-10112010002 - 2010-11-10 11:21:03 +0200
+
++ Fixed: Fixed OOM bug when copying large chunks of text by limiting
+ the history entry to 512KB.
+ (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=602205)
+
+Changes to be committed:
+
+ modified: ChangeLog
+ modified: configure.in
+ modified: src/history.c
+ modified: src/history.h
+
+
+ClipIt-v1.2.0-10112010001 - 2010-11-10 09:49:29 +0200
+
++ Added: Option to save URIs (they were actually saved by default before, but
+ now you have the option to disable this behaviour).
++ Fixed: Copying files and folders now works again.
++ Fixed: Changed some of the default configuration values.
+
+Changes to be committed:
+
+ modified: ChangeLog
+ modified: TODO
+ modified: configure.in
+ modified: src/history.c
+ modified: src/history.h
+ modified: src/main.c
+ modified: src/main.h
+ modified: src/preferences.c
+ modified: src/preferences.h
+
+
+ClipIt-v1.1.0-09112010001-beta - 2010-11-09 12:46:50 +0200
+
++ Added: Option to show index numbers in history.
++ Fixed: Search window now gets properly focused when launched with the hotkey.
++ Fixed: Search window is now resizable.
++ Fixed: Double casting when calling 'item_selected'.
++ Fixed: Removed some unnecessary comments and fixed some of the others.
++ Fixed: Moved search dialog and functions to manage.c, as this dialog will
+ become "Manage Clipboard" in the next version.
+
+Changes to be committed:
+
+ modified: ChangeLog
+ modified: TODO
+ modified: configure.in
+ modified: src/Makefile.am
+ modified: src/main.c
+ modified: src/main.h
+ new file: src/manage.c
+ new file: src/manage.h
+ modified: src/preferences.c
+ modified: src/preferences.h
+
+
+ClipIt-v1.0.0-05112010001-beta - 2010-11-05 23:37:05 +0200
+
+Initial commit
+
+ new file: AUTHORS
+ new file: COPYING
+ new file: ChangeLog
+ new file: INSTALL
+ new file: Makefile.am
+ new file: NEWS
+ new file: README
+ new file: TODO
+ new file: autogen.sh
+ new file: config.guess
+ new file: config.h.in
+ new file: config.rpath
+ new file: config.sub
+ new file: configure.in
+ new file: data/Makefile.am
+ new file: data/clipit-startup.desktop.in
+ new file: data/clipit.desktop.in
+ new file: depcomp
+ new file: doc/Makefile.am
+ new file: doc/clipit.1
+ new file: install-sh
+ new file: m4/ChangeLog
+ new file: m4/Makefile.in
+ new file: m4/gettext.m4
+ new file: m4/iconv.m4
+ new file: m4/intltool.m4
+ new file: m4/lib-ld.m4
+ new file: m4/lib-link.m4
+ new file: m4/lib-prefix.m4
+ new file: m4/nls.m4
+ new file: m4/po.m4
+ new file: m4/progtest.m4
+ new file: missing
+ new file: po/Makefile.in.in
+ new file: po/POTFILES.in
+ new file: po/POTFILES.skip
+ new file: po/cs.po
+ new file: po/da.po
+ new file: po/de.po
+ new file: po/es.po
+ new file: po/fr.po
+ new file: po/hu.po
+ new file: po/it.po
+ new file: po/ja.po
+ new file: po/nb.po
+ new file: po/pl.po
+ new file: po/pl_PL.po
+ new file: po/pt_BR.po
+ new file: po/ro.po
+ new file: po/ru.po
+ new file: po/sv.po
+ new file: po/tr.po
+ new file: po/zh_CN.po
+ new file: src/Makefile.am
+ new file: src/clipit-i18n.h
+ new file: src/daemon.c
+ new file: src/daemon.h
+ new file: src/eggaccelerators.c
+ new file: src/eggaccelerators.h
+ new file: src/history.c
+ new file: src/history.h
+ new file: src/keybinder.c
+ new file: src/keybinder.h
+ new file: src/main.c
+ new file: src/main.h
+ new file: src/preferences.c
+ new file: src/preferences.h
+ new file: src/utils.c
+ new file: src/utils.h
+
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..a43e8c7
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,50 @@
+AUTOMAKE_OPTIONS = gnu
+
+SUBDIRS = data doc src po
+
+DISTCLEANFILES = *.bak *.log *~
+
+EXTRA_DIST = \
+ m4 \
+ autogen.sh \
+ config.rpath \
+ m4/ChangeLog \
+ $(desktop_DATA) \
+ $(autostart_DATA) \
+ $(pixmaps_DATA) \
+ intltool-merge.in \
+ intltool-update.in \
+ intltool-extract.in
+
+dist-hook:
+ update-po
+ rm -rf $(distdir)/m4/Makefile
+
+ACLOCAL_AMFLAGS = -I m4
+
+gtk_update_icon_cache = gtk-update-icon-cache -f -t
+install-data-hook: update-icon-cache
+uninstall-hook: update-icon-cache
+
+check-gettext:
+ @if test x$(USE_NLS) != "xyes" ; then echo "Missing gettext. Rerun configure and check for" \
+ "'checking whether to use NLS... yes'!" ; exit 1 ; fi
+
+update-po: check-gettext
+ @find $(srcdir)/ -name '*.c' -o -name '*.desktop.in' | sed "s/^.\///" | grep -v "eggaccelerators" | grep -v "^clipit-" | sort > $(srcdir)/po/POTFILES.in.2 ; \
+ cat $(srcdir)/po/POTFILES.in.2 ; \
+ if diff $(srcdir)/po/POTFILES.in $(srcdir)/po/POTFILES.in.2 >/dev/null 2>&1 ; then \
+ rm -f $(srcdir)/po/POTFILES.in.2 ; \
+ else \
+ mv $(srcdir)/po/POTFILES.in.2 $(srcdir)/po/POTFILES.in ; \
+ fi
+ cd po && $(MAKE) $(AM_MAKEFLAGS) update-po
+
+update-icon-cache:
+ @-if test -z "$(DESTDIR)"; then \
+ echo "Updating Gtk icon cache."; \
+ $(gtk_update_icon_cache) $(datadir)/icons/hicolor; \
+ else \
+ echo "*** Icon cache not updated. After (un)install, run these:"; \
+ echo "*** $(gtk_update_icon_cache) $(datadir)/icons/hicolor"; \
+ fi
diff --git a/NEWS b/NEWS
new file mode 100644
index 0000000..85493a2
--- /dev/null
+++ b/NEWS
@@ -0,0 +1 @@
+Project website: https://github.com/CristianHenzel/ClipIt
diff --git a/README b/README
new file mode 100644
index 0000000..c6a4cdd
--- /dev/null
+++ b/README
@@ -0,0 +1,34 @@
+ClipIt - Lightweight GTK+ Clipboard Manager
+-------------------------------------------------------------------------------
+
+Copyright (C) 2010-2012 by Cristian Henzel <oss@rspwn.com>
+Copyright (C) 2011 by Eugene Nikolsky <pluton.od@gmail.com>
+
+forked from parcellite, which is
+Copyright (C) 2007-2008 Gilberto "Xyhthyx" Miralla <xyhthyx@gmail.com>
+
+
+
+Introduction
+-------------------------------------------------------------------------------
+
+ClipIt is a lightweight GTK+ clipboard manager.
+
+Project website: https://github.com/CristianHenzel/ClipIt
+
+
+
+How to compile and install clipit
+-------------------------------------------------------------------------------
+
+Requirements:
+ * gtk+ >= 2.10.0 (>= 3.0 for gtk+3)
+ * xdotool - for automatic paste functionality
+
+Download the clipit source code, then:
+ $ tar zxvf clipit-x.y.z.tar.gz
+ $ cd clipit-x.y.z
+ $ ./autogen.sh
+ $ ./configure
+ $ make
+ $ sudo make install
diff --git a/autogen.sh b/autogen.sh
new file mode 100755
index 0000000..dc005d1
--- /dev/null
+++ b/autogen.sh
@@ -0,0 +1,62 @@
+#!/bin/sh
+
+GETTEXTIZE="autopoint"
+echo "$GETTEXTIZE..."
+($GETTEXTIZE --version) < /dev/null > /dev/null 2>&1 || {
+ echo "$GETTEXTIZE not found"
+ exit 1
+}
+
+if test "$GETTEXTIZE"; then
+ echo "Creating $dr/aclocal.m4 ..."
+ test -r aclocal.m4 || touch aclocal.m4
+ echo "Running $GETTEXTIZE... Ignore non-fatal messages."
+ $GETTEXTIZE --force
+ echo "Making aclocal.m4 writable ..."
+ test -r aclocal.m4 && chmod u+w aclocal.m4
+fi
+
+echo "intltoolize..."
+(intltoolize --version) < /dev/null > /dev/null 2>&1 || {
+ echo
+ echo "intltoolize not found"
+ exit 1
+}
+
+intltoolize --copy --force --automake
+
+echo "aclocal..."
+(aclocal --version) < /dev/null > /dev/null 2>&1 || {
+ echo "aclocal not found"
+ exit 1
+}
+
+aclocal -I m4
+
+echo "autoheader..."
+(autoheader --version) < /dev/null > /dev/null 2>&1 || {
+ echo "autoheader not found"
+ exit 1
+}
+
+autoheader
+
+echo "automake..."
+(automake --version) < /dev/null > /dev/null 2>&1 || {
+ echo "automake not found"
+ exit 1
+}
+
+automake --add-missing --copy --gnu
+
+echo "autoconf..."
+(autoconf --version) < /dev/null > /dev/null 2>&1 || {
+ echo "autoconf not found"
+ exit 1
+}
+
+autoconf
+
+echo "now run configure"
+
+exit 0
diff --git a/commit b/commit
new file mode 100755
index 0000000..64d77cc
--- /dev/null
+++ b/commit
@@ -0,0 +1,61 @@
+#!/bin/bash
+
+## Copyright (C) 2010-2012 by Cristian Henzel <oss@rspwn.com>
+##
+## This file is part of ClipIt.
+##
+## ClipIt 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.
+##
+## ClipIt 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/>.
+
+git clean -xdf
+./update-po
+git clean -xdf
+
+COMMIT_FILE="COMMIT_MSG"
+
+CLIPIT_LAST_VSTR=$(git log -1 --pretty="format:%s" | cut -d'-' -f3 | sed s/^........//)
+CLIPIT_LAST_DSTR=$(git log -1 --pretty="format:%s" | cut -d'-' -f3 | sed s/...$//)
+CLIPIT_NEXT_DSTR=$(date +"%Y%m%d")
+CLIPIT_NEXT_DCOM=$(date +"%Y-%m-%d %X %z")
+CLIPIT_NEXT_VSTR=$(cat configure.in | grep AC_INIT | awk '{print $2}' | sed s/[][,]//g)
+if [ "$CLIPIT_LAST_DSTR" = "$CLIPIT_NEXT_DSTR" ]; then
+ CLIPIT_NEXT_ASTR="00"$(expr $CLIPIT_LAST_VSTR + 1)
+else
+ CLIPIT_NEXT_ASTR="001"
+fi
+CLIPIT_NEXT_CSTR="ClipIt-${CLIPIT_NEXT_VSTR}-${CLIPIT_NEXT_DSTR}${CLIPIT_NEXT_ASTR}"
+
+echo "$CLIPIT_NEXT_CSTR ~ ${CLIPIT_NEXT_DCOM}" > "$COMMIT_FILE"
+echo "" >> "$COMMIT_FILE"
+echo "+ " >> "$COMMIT_FILE"
+echo "" >> "$COMMIT_FILE"
+
+gedit "$COMMIT_FILE"
+
+cat "$COMMIT_FILE" | sed /^#/d > ChangeLog
+echo "" >> ChangeLog
+git log --no-merges --pretty="format:%s - %ai%n%n%b%n" >> ChangeLog
+sed -i "s/ ~ .*//" "$COMMIT_FILE"
+echo "Will now commit with:"
+cat "$COMMIT_FILE"
+
+git commit -a -F "$COMMIT_FILE"
+
+read -p "Pushing changes. Continue (yes/no)? "
+if [ "$REPLY" != "yes" -a ! -z "$REPLY" ]; then
+ exit 1;
+fi
+git push --all
+git push --all github
+
+rm "$COMMIT_FILE"
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..07ebf87
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,124 @@
+# -------------------------------------------------------------------------------
+# Autoconf/automake.
+# -------------------------------------------------------------------------------
+AC_PREREQ([2.5])
+AC_INIT([clipit], [1.4.3], [oss@rspwn.com])
+AM_INIT_AUTOMAKE
+
+AC_CONFIG_MACRO_DIR([m4])
+
+AC_CONFIG_SRCDIR([src/main.c])
+AM_CONFIG_HEADER([config.h])
+
+# -------------------------------------------------------------------------------
+# pkg-config.
+# -------------------------------------------------------------------------------
+
+AC_CHECK_PROG(HAVE_PKG_CONFIG, pkg-config, yes, no)
+if test x$HAVE_PKG_CONFIG = xno ; then
+ AC_MSG_ERROR([Requirement not met: pkg-config not installed])
+fi
+PKG_PROG_PKG_CONFIG
+
+# -------------------------------------------------------------------------------
+# Gettext.
+# -------------------------------------------------------------------------------
+
+GETTEXT_PACKAGE=clipit
+AC_SUBST(GETTEXT_PACKAGE)
+AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [gettext package])
+
+ALL_LINGUAS="ca cs da de es es_ES et fr hu it ja nb pl pl pt_BR ro ru sv tr zh_CN"
+AM_GLIB_GNU_GETTEXT()
+AC_PROG_INTLTOOL([0.23])
+
+clipitlocaledir='${prefix}/${DATADIRNAME}/locale'
+AC_SUBST(clipitlocaledir)
+
+AM_GNU_GETTEXT([external])
+AM_GNU_GETTEXT_VERSION(0.19)
+
+# -------------------------------------------------------------------------------
+# Config options.
+# -------------------------------------------------------------------------------
+
+AM_MAINTAINER_MODE([disable])
+
+# -------------------------------------------------------------------------------
+# Main settings.
+# -------------------------------------------------------------------------------
+# prefix=/usr
+
+# -------------------------------------------------------------------------------
+# Checks for programs.
+# -------------------------------------------------------------------------------
+AC_PROG_CC()
+AC_PROG_INSTALL()
+AC_PROG_MAKE_SET()
+
+# -------------------------------------------------------------------------------
+# Checks for libraries.
+# -------------------------------------------------------------------------------
+AC_ARG_WITH([gtk3], AS_HELP_STRING([--with-gtk3], [Build with the GTK+ 3 interface]))
+
+if test "x$with_gtk3" = "xyes"; then
+ PKG_CHECK_MODULES([GTK], [gtk+-3.0])
+ APPINDICATOR_MODULE="appindicator3-0.1"
+else
+ PKG_CHECK_MODULES([GTK], [gtk+-2.0 >= 2.10])
+ APPINDICATOR_MODULE="appindicator-0.1"
+fi
+
+# -------------------------------------------------------------------------------
+# Application indicator.
+# -------------------------------------------------------------------------------
+
+APPINDICATOR_REQUIRED_VERSION=0.2.4
+
+AC_ARG_ENABLE([appindicator],
+ AS_HELP_STRING([--enable-appindicator[=@<:@no/auto/yes@:>@]],[Build support for application indicators]),
+ [enable_appindicator=$enableval],
+ [enable_appindicator="auto"])
+
+if test x$enable_appindicator = xauto ; then
+ PKG_CHECK_EXISTS($APPINDICATOR_MODULE= >= $APPINDICATOR_REQUIRED_VERSION,
+ [enable_appindicator="yes"],
+ [enable_appindicator="no"])
+fi
+
+if test x$enable_appindicator = xyes ; then
+ PKG_CHECK_MODULES(APPINDICATOR,
+ [$APPINDICATOR_MODULE >= $APPINDICATOR_REQUIRED_VERSION],
+ [AC_DEFINE(HAVE_APPINDICATOR, 1, [Have AppIndicator])])
+fi
+
+AM_CONDITIONAL(HAVE_APPINDICATOR, test x$enable_appindicator = xyes)
+AC_SUBST(APPINDICATOR_CFLAGS)
+AC_SUBST(APPINDICATOR_LIBS)
+
+AC_SUBST(X11_LIBS, -lX11)
+
+
+AM_PATH_GLIB_2_0(2.14.0, [], AC_MSG_ERROR(Requirement not met: glib >= 2.14.0))
+
+# -------------------------------------------------------------------------------
+# Checks for header files.
+# -------------------------------------------------------------------------------
+AC_CHECK_HEADERS([stdlib.h string.h])
+
+# -------------------------------------------------------------------------------
+# Checks for typedefs, structures, and compiler characteristics.
+# -------------------------------------------------------------------------------
+AC_C_CONST()
+
+# -------------------------------------------------------------------------------
+# Checks for library functions.
+# -------------------------------------------------------------------------------
+AC_TYPE_SIGNAL()
+
+AC_CONFIG_FILES([Makefile m4/Makefile
+ doc/Makefile
+ src/Makefile
+ data/Makefile])
+
+AC_OUTPUT([po/Makefile.in])
diff --git a/data/Makefile.am b/data/Makefile.am
new file mode 100644
index 0000000..61fcd04
--- /dev/null
+++ b/data/Makefile.am
@@ -0,0 +1,25 @@
+@INTLTOOL_DESKTOP_RULE@
+
+desktopdir = $(datadir)/applications
+desktop_in_file = clipit.desktop.in
+desktop_DATA = $(desktop_in_file:.desktop.in=.desktop)
+
+autostartdir = $(sysconfdir)/xdg/autostart
+autostart_in_file = clipit-startup.desktop.in
+autostart_DATA = $(autostart_in_file:.desktop.in=.desktop)
+
+pixmapsdir = $(datarootdir)/icons/hicolor/scalable/apps
+pixmaps_DATA = clipit-trayicon.svg
+
+EXTRA_DIST = \
+ $(desktop_in_file) \
+ $(autostart_in_file) \
+ $(pixmaps_DATA)
+
+CLEANFILES = \
+ $(desktop_DATA) \
+ $(autostart_DATA)
+
+DISTCLEANFILES = \
+ $(desktop_DATA) \
+ $(autostart_DATA)
diff --git a/data/clipit-startup.desktop.in b/data/clipit-startup.desktop.in
new file mode 100644
index 0000000..63d6a72
--- /dev/null
+++ b/data/clipit-startup.desktop.in
@@ -0,0 +1,9 @@
+[Desktop Entry]
+_Name=ClipIt
+_Comment=Clipboard Manager
+Icon=clipit-trayicon
+Exec=clipit
+Terminal=false
+Type=Application
+OnlyShowIn=GNOME;XFCE;LXDE;Unity;
+X-GNOME-Autostart-enabled=true
diff --git a/data/clipit-trayicon.svg b/data/clipit-trayicon.svg
new file mode 100644
index 0000000..0504856
--- /dev/null
+++ b/data/clipit-trayicon.svg
@@ -0,0 +1,191 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ version="1.0"
+ width="48"
+ height="48"
+ id="svg2">
+ <defs
+ id="defs4">
+ <linearGradient
+ id="linearGradient3620">
+ <stop
+ id="stop3622"
+ style="stop-color:#9d7d53;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop3624"
+ style="stop-color:#ad8757;stop-opacity:1"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3846">
+ <stop
+ id="stop3848"
+ style="stop-color:#c1a581;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop3850"
+ style="stop-color:#9b784b;stop-opacity:1"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ x1="24.467497"
+ y1="0.47814167"
+ x2="25.464664"
+ y2="70.020134"
+ id="linearGradient4545"
+ xlink:href="#linearGradient3846"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.54289087,0,0,0.48890703,-0.0291956,-18.233335)" />
+ <linearGradient
+ id="linearGradient3600">
+ <stop
+ id="stop3602"
+ style="stop-color:#f4f4f4;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop3604"
+ style="stop-color:#dbdbdb;stop-opacity:1"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3931">
+ <stop
+ id="stop3933"
+ style="stop-color:#747671;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop3935"
+ style="stop-color:#cbcbcb;stop-opacity:1"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ x1="25.132275"
+ y1="6.7287393"
+ x2="25.132275"
+ y2="47.013336"
+ id="linearGradient3192"
+ xlink:href="#linearGradient3600"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.5428805,0,0,0.4889072,18.970867,-6.233341)" />
+ <linearGradient
+ x1="-64.247643"
+ y1="14.969027"
+ x2="-22.573992"
+ y2="-19.797691"
+ id="linearGradient3194"
+ xlink:href="#linearGradient3931"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.4383743,0,0,0.4575444,51.223522,-6.778219)" />
+ <linearGradient
+ id="linearGradient3269">
+ <stop
+ id="stop3271"
+ style="stop-color:#787878;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop3273"
+ style="stop-color:#bebebe;stop-opacity:1"
+ offset="0.34446934" />
+ <stop
+ id="stop3275"
+ style="stop-color:#c8c8c8;stop-opacity:1"
+ offset="0.3731544" />
+ <stop
+ id="stop3277"
+ style="stop-color:#e6e6e6;stop-opacity:1"
+ offset="0.48990577" />
+ <stop
+ id="stop3279"
+ style="stop-color:#8c8c8c;stop-opacity:1"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3257">
+ <stop
+ id="stop3261"
+ style="stop-color:#787878;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop3263"
+ style="stop-color:#828282;stop-opacity:1"
+ offset="0.36563665" />
+ <stop
+ id="stop3265"
+ style="stop-color:#aaaaaa;stop-opacity:1"
+ offset="0.46209824" />
+ <stop
+ id="stop3922"
+ style="stop-color:#6a6a6a;stop-opacity:1"
+ offset="0.59657371" />
+ <stop
+ id="stop3920"
+ style="stop-color:#787878;stop-opacity:1"
+ offset="0.73104912" />
+ <stop
+ id="stop3267"
+ style="stop-color:#464646;stop-opacity:1"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ x1="321.40091"
+ y1="83.497276"
+ x2="321.57819"
+ y2="96.245491"
+ id="linearGradient2964"
+ xlink:href="#linearGradient3269"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.41034562,0,0,0.51289447,-114.89528,-62.82218)" />
+ <linearGradient
+ x1="22.451862"
+ y1="26.645382"
+ x2="22.451862"
+ y2="40.185558"
+ id="linearGradient2966"
+ xlink:href="#linearGradient3257"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.41182453,0,0,0.51282072,6.5443502,-34.097634)" />
+ <linearGradient
+ x1="9.3157892"
+ y1="16"
+ x2="9.7894735"
+ y2="-17.999569"
+ id="linearGradient3626"
+ xlink:href="#linearGradient3620"
+ gradientUnits="userSpaceOnUse" />
+ </defs>
+ <g
+ transform="translate(0,24)"
+ id="layer1">
+ <path
+ d="m 3.4995742,-17.499994 26.0008518,4.3e-4 0,32.99999 -26.0008518,0 0,-33.00042 z"
+ id="rect2594"
+ style="fill:url(#linearGradient4545);fill-opacity:1;stroke:url(#linearGradient3626);stroke-width:0.99914837;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline" />
+ <path
+ d="m 4.5,-16.5 24,0 0,31 -24,0 0,-31 z"
+ id="path3852"
+ style="opacity:0.15;fill:none;stroke:#ffffff;stroke-width:0.99914837;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline" />
+ <path
+ d="m 22.49957,-5.5 22.00043,4.3e-4 0,27.000001 -22.00043,0 0,-27.000431 z"
+ id="path3064"
+ style="fill:url(#linearGradient3192);fill-opacity:1;stroke:url(#linearGradient3194);stroke-width:0.99913895;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline" />
+ <path
+ d="m 25,-1.99957 1.359538,0 0,1.00000002 -1.359538,0 0,-1.00000002 z m 1.544729,0 1.282784,0 0,1.00000002 -1.282784,0 0,-1.00000002 z m 1.467975,0 1.129269,0 0,1.00000002 -1.129269,0 0,-1.00000002 z m 1.314458,0 0.496023,0 0,1.00000002 -0.496023,0 0,-1.00000002 z m 0.68122,0 1.110075,0 0,1.00000002 -1.110075,0 0,-1.00000002 z m 1.295272,0 2.875482,0 0,1.00000002 -2.875482,0 0,-1.00000002 z m 3.060674,0 2.184672,0 0,1.00000002 -2.184672,0 0,-1.00000002 z m -9.364328,6 1.315079,0 0,1 -1.315079,0 0,-1 z m 1.494213,0 1.240835,0 0,1 -1.240835,0 0,-1 z m 1.419971,0 1.092338,0 0,1 -1.092338,0 0,-1 z m 1.271472,0 0.479802,0 0,1 -0.479802,0 0,-1 z m 0.658943,0 1.073773,0 0,1 -1.073773,0 0,-1 z m 1.252914,0 2.781449,0 0,1 -2.781449,0 0,-1 z m 2.960584,0 2.113229,0 0,1 -2.113229,0 0,-1 z m 2.29237,0 0.646852,0 0,1 -0.646852,0 0,-1 z m 0.825993,0 1.277954,0 0,1 -1.277954,0 0,-1 z M 25,4.3102435e-4 l 2.038983,0 0,0.99999997565 -2.038983,0 0,-0.99999997565 z m 2.225084,0 0.980966,0 0,0.99999997565 -0.980966,0 0,-0.99999997565 z m 1.167067,0 0.461237,0 0,0.99999997565 -0.461237,0 0,-0.99999997565 z m 0.647339,0 0.888159,0 0,0.99999997565 -0.888159,0 0,-0.99999997565 z m 1.074254,0 0.888158,0 0,0.99999997565 -0.888158,0 0,-0.99999997565 z m 1.074258,0 1.426446,0 0,0.99999997565 -1.426446,0 0,-0.99999997565 z m 1.612542,0 1.871931,0 0,0.99999997565 -1.871931,0 0,-0.99999997565 z m 2.058032,0 1.25939,0 0,0.99999997565 -1.25939,0 0,-0.99999997565 z m 1.445492,0 0.294181,0 0,0.99999997565 -0.294181,0 0,-0.99999997565 z M 25,2.00043 l 2.33597,0 0,1 -2.33597,0 0,-1 z m 2.519087,0 2.503019,0 0,1 -2.503019,0 0,-1 z m 2.686137,0 0.99953,0 0,1 -0.99953,0 0,-1 z m 1.182648,0 2.354528,0 0,1 -2.354528,0 0,-1 z m 4.332824,0 0.628292,0 0,1 -0.628292,0 0,-1 z m -1.795178,0 1.61206,0 0,1 -1.61206,0 0,-1 z m 2.606587,0 0.36843,0 0,1 -0.36843,0 0,-1 z m 0.551548,0 0.99953,0 0,1 -0.99953,0 0,-1 z M 25,13.000431 l 2.335971,0 0,1 -2.335971,0 0,-1 z m 2.519087,0 2.503021,0 0,1 -2.503021,0 0,-1 z m 2.686139,0 0.99953,0 0,1 -0.99953,0 0,-1 z m 1.182648,0 2.354529,0 0,1 -2.354529,0 0,-1 z m 4.332825,0 0.628293,0 0,1 -0.628293,0 0,-1 z m -1.795178,0 1.612061,0 0,1 -1.612061,0 0,-1 z m 2.606588,0 0.368431,0 0,1 -0.368431,0 0,-1 z m 0.551548,0 0.999531,0 0,1 -0.999531,0 0,-1 z M 25,8.00043 l 1.68631,0 0,1 -1.68631,0 0,-1 z m 1.865451,0 2.800009,0 0,1 -2.800009,0 0,-1 z m 2.979151,0 1.352197,0 0,1 -1.352197,0 0,-1 z m 2.969866,0 1.073775,0 0,1 -1.073775,0 0,-1 z m 1.252915,0 1.723435,0 0,1 -1.723435,0 0,-1 z m 1.902569,0 2.800015,0 0,1 -2.800015,0 0,-1 z m -4.594014,0 1.259396,0 0,1 -1.259396,0 0,-1 z M 25,11.000431 l 2.11323,0 0,1 -2.11323,0 0,-1 z m 2.287728,0 0.665418,0 0,1 -0.665418,0 0,-1 z m 0.839914,0 1.519259,0 0,1 -1.519259,0 0,-1 z m 1.693755,0 1.036655,0 0,1 -1.036655,0 0,-1 z m 1.211152,0 1.036649,0 0,1 -1.036649,0 0,-1 z m 1.211151,0 1.500695,0 0,1 -1.500695,0 0,-1 z m 1.675185,0 0.312751,0 0,1 -0.312751,0 0,-1 z m 0.487248,0 1.946174,0 0,1 -1.946174,0 0,-1 z m 2.120671,0 1.036654,0 0,1 -1.036654,0 0,-1 z m -11.526804,4 0.851034,0 0,1 -0.851034,0 0,-1 z m 1.071276,0 3.096997,0 0,1 -3.096997,0 0,-1 z m 7.458746,0 -0.851034,0 0,1 0.851034,0 0,-1 z m -1.071276,0 -3.096997,0 0,1 3.096997,0 0,-1 z"
+ id="path2950"
+ style="opacity:0.7;fill:#666666;fill-opacity:1;stroke:none;display:inline" />
+ <path
+ d="m 14.500502,-21.508 c 0.046,1.844225 -0.184182,5.989238 -1.815947,6.055813 -0.239147,0.513498 -0.363701,1.747107 0.218221,1.952187 l 7.437468,0 c 0.47136,-0.186897 0.01956,-1.708469 0,-1.879447 -1.831768,-0.173895 -1.787106,-4.324162 -1.787106,-6.128553 l -4.052636,0 z"
+ id="path4675"
+ style="fill:url(#linearGradient2964);fill-opacity:1;stroke:url(#linearGradient2966);stroke-width:0.99827468;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0.50000001;display:inline;enable-background:new" />
+ <path
+ d="m 16.657514,4.3922276 a 0.32733107,0.1818506 0 1 1 -0.654662,0 0.32733107,0.1818506 0 1 1 0.654662,0 z"
+ transform="matrix(0.50261493,0,0,0.90470684,8.2922062,-23.473678)"
+ id="path3897"
+ style="fill:none;stroke:#ffffff;stroke-width:0.995;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+ </g>
+</svg>
diff --git a/data/clipit.desktop.in b/data/clipit.desktop.in
new file mode 100644
index 0000000..5a82451
--- /dev/null
+++ b/data/clipit.desktop.in
@@ -0,0 +1,8 @@
+[Desktop Entry]
+_Name=ClipIt
+_Comment=Clipboard Manager
+Icon=clipit-trayicon
+Exec=clipit
+Terminal=false
+Type=Application
+Categories=GTK;GNOME;Application;Utility;
diff --git a/doc/Makefile.am b/doc/Makefile.am
new file mode 100644
index 0000000..bffa51d
--- /dev/null
+++ b/doc/Makefile.am
@@ -0,0 +1,2 @@
+man_MANS = clipit.1
+EXTRA_DIST = $(man_MANS)
diff --git a/doc/clipit.1 b/doc/clipit.1
new file mode 100644
index 0000000..3e2b132
--- /dev/null
+++ b/doc/clipit.1
@@ -0,0 +1,49 @@
+.TH CLIPIT 1 "2010-11-11"
+.SH NAME
+ClipIt \- Lightweight GTK+ Clipboard Manager
+.SH SYNOPSIS
+.B clipit
+[\fIOPTION\fR]
+.SH DESCRIPTION
+\fBClipIt\fR is a lightweight GTK+ clipboard manager.
+
+\fBClipIt\fR features a clipboard CLI. Unrecognized options and the contents
+of your standard input get copied to your clipboard. See \fBCLI EXAMPLES\fR.
+.SH
+.B OPTIONS
+.TP
+.B \-?\fR, \fB\-\-help
+Show help options.
+.TP
+.B \-d\fR, \fB\-\-daemon
+Run as daemon. Use this mode if you just want \fBClipIt\fR to keep your clipboard
+and primary contents safe.
+.TP
+.B \-n\fR, \fB\-\-no-icon
+Do not use status icon.
+.TP
+.B \-c\fR, \fB\-\-clipboard
+Print clipboard contents.
+.TP
+.B \-p\fR, \fB\-\-primary
+Print primary contents.
+.SH NOTES
+.SS ACTIONS
+\fBClipIt's\fR actions perform commands using the contents of your clipboard. "\fB%s\fR" in the command
+is replaced with the clipboard contents.
+.SS CLI EXAMPLES
+.TP
+Put text in the clipboard
+ echo "copied to clipboard" | clipit
+ clipit "copied to clipboard"
+.TP
+Put text in the clipboard and print the clipboard contents
+ echo "copied to clipboard" | clipit \-c
+.SS Hotkeys
+ The available hotkey modifiers are <Ctrl>, <Alt> <Shift>, <Release>, <Meta>, <Super>, <Hyper>, <Mod[1\-5]>
+.SH SEE ALSO
+.PP
+Website: http://sourceforge.net/projects/gtkclipit/
+.SH AUTHOR
+Maintained by Cristian Henzel <oss@rspwn.com>.
+Forked from parcellite, which was written by Gilberto "Xyhthyx" Miralla <xyhthyx@gmail.com>.
diff --git a/m4/Makefile.in b/m4/Makefile.in
new file mode 100644
index 0000000..f3d37c7
--- /dev/null
+++ b/m4/Makefile.in
@@ -0,0 +1,373 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = m4
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \
+ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \
+ $(top_srcdir)/m4/intltool.m4 $(top_srcdir)/m4/lib-ld.m4 \
+ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
+ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \
+ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+SOURCES =
+DIST_SOURCES =
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ALL_LINGUAS = @ALL_LINGUAS@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DATADIRNAME = @DATADIRNAME@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
+GLIB_LIBS = @GLIB_LIBS@
+GLIB_MKENUMS = @GLIB_MKENUMS@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
+GMSGFMT_015 = @GMSGFMT_015@
+GOBJECT_QUERY = @GOBJECT_QUERY@
+GREP = @GREP@
+GTK_CFLAGS = @GTK_CFLAGS@
+GTK_LIBS = @GTK_LIBS@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INSTOBJEXT = @INSTOBJEXT@
+INTLLIBS = @INTLLIBS@
+INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
+INTLTOOL_MERGE = @INTLTOOL_MERGE@
+INTLTOOL_PERL = @INTLTOOL_PERL@
+INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
+LDFLAGS = @LDFLAGS@
+LIBICONV = @LIBICONV@
+LIBINTL = @LIBINTL@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBICONV = @LTLIBICONV@
+LTLIBINTL = @LTLIBINTL@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MSGFMT = @MSGFMT@
+MSGFMT_015 = @MSGFMT_015@
+MSGFMT_OPTS = @MSGFMT_OPTS@
+MSGMERGE = @MSGMERGE@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+POFILES = @POFILES@
+POSUB = @POSUB@
+PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
+PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+XGETTEXT = @XGETTEXT@
+XGETTEXT_015 = @XGETTEXT_015@
+XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+parcellitelocaledir = @parcellitelocaledir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+EXTRA_DIST = codeset.m4 fcntl-o.m4 glibc2.m4 glibc21.m4 intdiv0.m4 intl.m4 intldir.m4 intlmacosx.m4 intmax.m4 inttypes_h.m4 inttypes-pri.m4 lcmessage.m4 lock.m4 longlong.m4 printf-posix.m4 size_max.m4 stdint_h.m4 threadlib.m4 uintmax_t.m4 visibility.m4 wchar_t.m4 wint_t.m4 xsize.m4
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu m4/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu m4/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic distclean \
+ distclean-generic distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/po/Makefile.in.in b/po/Makefile.in.in
new file mode 100644
index 0000000..06a8cfe
--- /dev/null
+++ b/po/Makefile.in.in
@@ -0,0 +1,222 @@
+# Makefile for program source directory in GNU NLS utilities package.
+# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
+# Copyright (C) 2004-2008 Rodney Dawes <dobey.pwns@gmail.com>
+#
+# This file may be copied and used freely without restrictions. It may
+# be used in projects which are not available under a GNU Public License,
+# but which still want to provide support for the GNU gettext functionality.
+#
+# - Modified by Owen Taylor <otaylor@redhat.com> to use GETTEXT_PACKAGE
+# instead of PACKAGE and to look for po2tbl in ./ not in intl/
+#
+# - Modified by jacob berkman <jacob@ximian.com> to install
+# Makefile.in.in and po2tbl.sed.in for use with glib-gettextize
+#
+# - Modified by Rodney Dawes <dobey.pwns@gmail.com> for use with intltool
+#
+# We have the following line for use by intltoolize:
+# INTLTOOL_MAKEFILE
+
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+PACKAGE = @PACKAGE@
+VERSION = @VERSION@
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+top_builddir = @top_builddir@
+VPATH = @srcdir@
+
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+datadir = @datadir@
+datarootdir = @datarootdir@
+libdir = @libdir@
+DATADIRNAME = @DATADIRNAME@
+itlocaledir = $(prefix)/$(DATADIRNAME)/locale
+subdir = po
+install_sh = @install_sh@
+# Automake >= 1.8 provides @mkdir_p@.
+# Until it can be supposed, use the safe fallback:
+mkdir_p = $(install_sh) -d
+
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+
+GMSGFMT = @GMSGFMT@
+MSGFMT = @MSGFMT@
+XGETTEXT = @XGETTEXT@
+INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
+MSGMERGE = INTLTOOL_EXTRACT="$(INTLTOOL_EXTRACT)" XGETTEXT="$(XGETTEXT)" srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --dist
+GENPOT = INTLTOOL_EXTRACT="$(INTLTOOL_EXTRACT)" XGETTEXT="$(XGETTEXT)" srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --pot
+
+ALL_LINGUAS = @ALL_LINGUAS@
+
+PO_LINGUAS=$(shell if test -r $(srcdir)/LINGUAS; then grep -v "^\#" $(srcdir)/LINGUAS; else echo "$(ALL_LINGUAS)"; fi)
+
+USER_LINGUAS=$(shell if test -n "$(LINGUAS)"; then LLINGUAS="$(LINGUAS)"; ALINGUAS="$(ALL_LINGUAS)"; for lang in $$LLINGUAS; do if test -n "`grep \^$$lang$$ $(srcdir)/LINGUAS 2>/dev/null`" -o -n "`echo $$ALINGUAS|tr ' ' '\n'|grep \^$$lang$$`"; then printf "$$lang "; fi; done; fi)
+
+USE_LINGUAS=$(shell if test -n "$(USER_LINGUAS)" -o -n "$(LINGUAS)"; then LLINGUAS="$(USER_LINGUAS)"; else if test -n "$(PO_LINGUAS)"; then LLINGUAS="$(PO_LINGUAS)"; else LLINGUAS="$(ALL_LINGUAS)"; fi; fi; for lang in $$LLINGUAS; do printf "$$lang "; done)
+
+POFILES=$(shell LINGUAS="$(PO_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.po "; done)
+
+DISTFILES = Makefile.in.in POTFILES.in $(POFILES)
+EXTRA_DISTFILES = ChangeLog POTFILES.skip Makevars LINGUAS
+
+POTFILES = \
+# This comment gets stripped out
+
+CATALOGS=$(shell LINGUAS="$(USE_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.gmo "; done)
+
+.SUFFIXES:
+.SUFFIXES: .po .pox .gmo .mo .msg .cat
+
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+INTLTOOL_V_MSGFMT = $(INTLTOOL__v_MSGFMT_$(V))
+INTLTOOL__v_MSGFMT_= $(INTLTOOL__v_MSGFMT_$(AM_DEFAULT_VERBOSITY))
+INTLTOOL__v_MSGFMT_0 = @echo " MSGFMT" $@;
+
+.po.pox:
+ $(MAKE) $(GETTEXT_PACKAGE).pot
+ $(MSGMERGE) $< $(GETTEXT_PACKAGE).pot -o $*.pox
+
+.po.mo:
+ $(INTLTOOL_V_MSGFMT)$(MSGFMT) -o $@ $<
+
+.po.gmo:
+ $(INTLTOOL_V_MSGFMT)file=`echo $* | sed 's,.*/,,'`.gmo \
+ && rm -f $$file && $(GMSGFMT) -o $$file $<
+
+.po.cat:
+ sed -f ../intl/po2msg.sed < $< > $*.msg \
+ && rm -f $@ && gencat $@ $*.msg
+
+
+all: all-@USE_NLS@
+
+all-yes: $(CATALOGS)
+all-no:
+
+$(GETTEXT_PACKAGE).pot: $(POTFILES)
+ $(GENPOT)
+
+install: install-data
+install-data: install-data-@USE_NLS@
+install-data-no: all
+install-data-yes: all
+ linguas="$(USE_LINGUAS)"; \
+ for lang in $$linguas; do \
+ dir=$(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES; \
+ $(mkdir_p) $$dir; \
+ if test -r $$lang.gmo; then \
+ $(INSTALL_DATA) $$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \
+ echo "installing $$lang.gmo as $$dir/$(GETTEXT_PACKAGE).mo"; \
+ else \
+ $(INSTALL_DATA) $(srcdir)/$$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \
+ echo "installing $(srcdir)/$$lang.gmo as" \
+ "$$dir/$(GETTEXT_PACKAGE).mo"; \
+ fi; \
+ if test -r $$lang.gmo.m; then \
+ $(INSTALL_DATA) $$lang.gmo.m $$dir/$(GETTEXT_PACKAGE).mo.m; \
+ echo "installing $$lang.gmo.m as $$dir/$(GETTEXT_PACKAGE).mo.m"; \
+ else \
+ if test -r $(srcdir)/$$lang.gmo.m ; then \
+ $(INSTALL_DATA) $(srcdir)/$$lang.gmo.m \
+ $$dir/$(GETTEXT_PACKAGE).mo.m; \
+ echo "installing $(srcdir)/$$lang.gmo.m as" \
+ "$$dir/$(GETTEXT_PACKAGE).mo.m"; \
+ else \
+ true; \
+ fi; \
+ fi; \
+ done
+
+# Empty stubs to satisfy archaic automake needs
+dvi info ctags tags CTAGS TAGS ID:
+
+# Define this as empty until I found a useful application.
+install-exec installcheck:
+
+uninstall:
+ linguas="$(USE_LINGUAS)"; \
+ for lang in $$linguas; do \
+ rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo; \
+ rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo.m; \
+ done
+
+check: all $(GETTEXT_PACKAGE).pot
+ rm -f missing notexist
+ srcdir=$(srcdir) $(INTLTOOL_UPDATE) -m
+ if [ -r missing -o -r notexist ]; then \
+ exit 1; \
+ fi
+
+mostlyclean:
+ rm -f *.pox $(GETTEXT_PACKAGE).pot *.old.po cat-id-tbl.tmp
+ rm -f .intltool-merge-cache
+
+clean: mostlyclean
+
+distclean: clean
+ rm -f Makefile Makefile.in POTFILES stamp-it
+ rm -f *.mo *.msg *.cat *.cat.m *.gmo
+
+maintainer-clean: distclean
+ @echo "This command is intended for maintainers to use;"
+ @echo "it deletes files that may require special tools to rebuild."
+ rm -f Makefile.in.in
+
+distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
+dist distdir: $(DISTFILES)
+ dists="$(DISTFILES)"; \
+ extra_dists="$(EXTRA_DISTFILES)"; \
+ for file in $$extra_dists; do \
+ test -f $(srcdir)/$$file && dists="$$dists $(srcdir)/$$file"; \
+ done; \
+ for file in $$dists; do \
+ test -f $$file || file="$(srcdir)/$$file"; \
+ ln $$file $(distdir) 2> /dev/null \
+ || cp -p $$file $(distdir); \
+ done
+
+update-po: Makefile
+ $(MAKE) $(GETTEXT_PACKAGE).pot
+ tmpdir=`pwd`; \
+ linguas="$(USE_LINGUAS)"; \
+ for lang in $$linguas; do \
+ echo "$$lang:"; \
+ result="`$(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang`"; \
+ if $$result; then \
+ if cmp $(srcdir)/$$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
+ rm -f $$tmpdir/$$lang.new.po; \
+ else \
+ if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
+ :; \
+ else \
+ echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
+ rm -f $$tmpdir/$$lang.new.po; \
+ exit 1; \
+ fi; \
+ fi; \
+ else \
+ echo "msgmerge for $$lang.gmo failed!"; \
+ rm -f $$tmpdir/$$lang.new.po; \
+ fi; \
+ done
+
+Makefile POTFILES: stamp-it
+ @if test ! -f $@; then \
+ rm -f stamp-it; \
+ $(MAKE) stamp-it; \
+ fi
+
+stamp-it: Makefile.in.in $(top_builddir)/config.status POTFILES.in
+ cd $(top_builddir) \
+ && CONFIG_FILES=$(subdir)/Makefile.in CONFIG_HEADERS= CONFIG_LINKS= \
+ $(SHELL) ./config.status
+
+# Tell versions [3.59,3.63) of GNU make not to export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/po/POTFILES.in b/po/POTFILES.in
new file mode 100644
index 0000000..dde61e7
--- /dev/null
+++ b/po/POTFILES.in
@@ -0,0 +1,9 @@
+data/clipit-startup.desktop.in
+data/clipit.desktop.in
+src/daemon.c
+src/history.c
+src/keybinder.c
+src/main.c
+src/manage.c
+src/preferences.c
+src/utils.c
diff --git a/po/POTFILES.skip b/po/POTFILES.skip
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/po/POTFILES.skip
@@ -0,0 +1 @@
+
diff --git a/po/bg.po b/po/bg.po
new file mode 100644
index 0000000..77b1d3b
--- /dev/null
+++ b/po/bg.po
@@ -0,0 +1,347 @@
+# ClipIt translation file.
+# Copyright (C) 2010-2012 Cristian Henzel <oss@rspwn.com>
+# This file is distributed under the same license as the ClipIt package.
+#
+# Translators:
+# <adn.adin@gmail.com>, 2011.
+# Stefan Ilivanov <ilivanov@gmail.com>, 2011.
+msgid ""
+msgstr ""
+"Project-Id-Version: ClipIt\n"
+"Report-Msgid-Bugs-To: Cristian Henzel <oss@rspwn.com>\n"
+"POT-Creation-Date: 2015-11-10 16:39+0200\n"
+"PO-Revision-Date: 2012-04-04 06:30+0000\n"
+"Last-Translator: Cristian Henzel <oss@rspwn.com>\n"
+"Language-Team: Bulgarian (Bulgaria) (http://www.transifex.net/projects/p/"
+"clipit/language/bg_BG/)\n"
+"Language: bg_BG\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1)\n"
+
+#: ../data/clipit-startup.desktop.in.h:1 ../data/clipit.desktop.in.h:1
+msgid "ClipIt"
+msgstr ""
+
+#: ../data/clipit-startup.desktop.in.h:2 ../data/clipit.desktop.in.h:2
+#: ../src/main.c:833
+msgid "Clipboard Manager"
+msgstr "Мениджър за клипборда"
+
+#: ../src/main.c:287
+msgid "Lightweight GTK+ clipboard manager."
+msgstr "Лек GTK+ мениджър за клипборда."
+
+#. Actions using:
+#: ../src/main.c:356
+msgid "Actions using:"
+msgstr ""
+
+#. Create menu item for empty clipboard contents
+#: ../src/main.c:365 ../src/main.c:382
+msgid "None"
+msgstr ""
+
+#: ../src/main.c:385
+msgid "<b>None</b>"
+msgstr "<b>Няма</b>"
+
+#. File contained no actions so adding empty
+#. File did not open so adding empty
+#. Nothing in history so adding empty
+#: ../src/main.c:407 ../src/main.c:436 ../src/main.c:600
+msgid "Empty"
+msgstr "Празно"
+
+#. Edit actions
+#: ../src/main.c:443
+msgid "_Edit actions"
+msgstr "_Действия за промяна"
+
+#. Offline mode checkbox
+#: ../src/main.c:686
+msgid "_Offline mode"
+msgstr ""
+
+#. Manage history
+#: ../src/main.c:695
+msgid "_Manage history"
+msgstr "_История"
+
+#. Create the dialog
+#: ../src/manage.c:138
+msgid "Editing Clipboard"
+msgstr "Промяна на клипборда"
+
+#: ../src/manage.c:158
+msgid "_Static item"
+msgstr "_Статичен запис"
+
+#: ../src/manage.c:227
+msgid "Clear the history?"
+msgstr "Изчистване на историята?"
+
+#: ../src/manage.c:228
+msgid "Clear history"
+msgstr "Изчисти историята"
+
+#: ../src/manage.c:348
+msgid "Manage History"
+msgstr ""
+
+#: ../src/manage.c:351
+msgid " (Offline mode)"
+msgstr ""
+
+#: ../src/manage.c:393
+msgid "Results"
+msgstr ""
+
+#: ../src/manage.c:398
+msgid "Edit"
+msgstr ""
+
+#: ../src/manage.c:400 ../src/preferences.c:886 ../src/preferences.c:947
+msgid "Remove"
+msgstr "Премахни"
+
+#: ../src/manage.c:402
+msgid "Remove all"
+msgstr ""
+
+#: ../src/manage.c:404
+msgid "Close"
+msgstr ""
+
+#: ../src/preferences.c:170
+msgid "Save history"
+msgstr "Запиши историята"
+
+#: ../src/preferences.c:203
+msgid "Remove history file"
+msgstr "Премахване на файлът с история"
+
+#. Create the dialog
+#: ../src/preferences.c:648
+msgid "Preferences"
+msgstr "Настройки"
+
+#: ../src/preferences.c:667
+msgid "Settings"
+msgstr "Настройки"
+
+#: ../src/preferences.c:675
+msgid "<b>Clipboards</b>"
+msgstr "<b>Клипбордове</b>"
+
+#: ../src/preferences.c:682
+msgid "Use _Copy (Ctrl-C)"
+msgstr "Ползвай _Копиране (Ctrl+C)"
+
+#: ../src/preferences.c:685
+msgid "Use _Primary (Selection)"
+msgstr "Ползвай _Основен (Избор)"
+
+#: ../src/preferences.c:688
+msgid "S_ynchronize clipboards"
+msgstr "С_инхронизиране на клипбордовете"
+
+#: ../src/preferences.c:690
+msgid "_Automatically paste selected item"
+msgstr "_Автоматично вмъкване на избран запис"
+
+#: ../src/preferences.c:699
+msgid "<b>Miscellaneous</b>"
+msgstr "<b>Допълнителни</b>"
+
+#: ../src/preferences.c:706
+msgid "Show _indexes in history menu"
+msgstr "Показва _списъци в менюто за история"
+
+#: ../src/preferences.c:708
+msgid "S_ave URIs"
+msgstr "З_запис на адрес(и)"
+
+#: ../src/preferences.c:710
+msgid "Capture _hyperlinks only"
+msgstr "Прихваща само _адреси"
+
+#: ../src/preferences.c:712
+msgid "C_onfirm before clearing history"
+msgstr "П_отвърди преди изчистване на историята"
+
+#: ../src/preferences.c:714
+msgid "_Use right-click menu"
+msgstr "_Ползва меню с десен бутон"
+
+#: ../src/preferences.c:723
+msgid "History"
+msgstr "История"
+
+#: ../src/preferences.c:731
+msgid "<b>History</b>"
+msgstr "<b>История</b>"
+
+#: ../src/preferences.c:738
+msgid "Save _history"
+msgstr "Запис на _история"
+
+#: ../src/preferences.c:739
+msgid "Save and restore history between sessions"
+msgstr "Запис и възстановяване на историята между сесиите"
+
+#: ../src/preferences.c:743
+msgid "Items in history:"
+msgstr "Записи в историята:"
+
+#: ../src/preferences.c:752
+msgid "Items in menu:"
+msgstr "Записи в меню:"
+
+#: ../src/preferences.c:759
+msgid "Show _static items in menu"
+msgstr "Показва _статични записи в менюто"
+
+#: ../src/preferences.c:764
+msgid "Static items in menu:"
+msgstr "Статични записи в меню:"
+
+#: ../src/preferences.c:777
+msgid "<b>Items</b>"
+msgstr "<b>Записи</b>"
+
+#: ../src/preferences.c:784
+msgid "Show in a single _line"
+msgstr "Показва единична _линия"
+
+#: ../src/preferences.c:786
+msgid "Show in _reverse order"
+msgstr "Показва в _обратен ред"
+
+#: ../src/preferences.c:790
+msgid "Character length of items:"
+msgstr "Дължина на знаците за записите:"
+
+#: ../src/preferences.c:799
+msgid "Omit items in the:"
+msgstr "Ограничи записите в:"
+
+#: ../src/preferences.c:803
+msgid "Beginning"
+msgstr "Начало"
+
+#: ../src/preferences.c:804
+msgid "Middle"
+msgstr "Среда"
+
+#: ../src/preferences.c:805
+msgid "End"
+msgstr "Край"
+
+#: ../src/preferences.c:835
+msgid "Actions"
+msgstr "Действия"
+
+#. Build the actions label
+#: ../src/preferences.c:840
+msgid "Control-click ClipIt's tray icon to use actions"
+msgstr "CTRL+Клик на ClipIt иконата, за да видите възможните действия"
+
+#: ../src/preferences.c:860
+msgid "Action"
+msgstr "Действие"
+
+#: ../src/preferences.c:867
+msgid "Command"
+msgstr "Команда"
+
+#: ../src/preferences.c:882 ../src/preferences.c:943
+msgid "Add..."
+msgstr "Добави..."
+
+#: ../src/preferences.c:903
+msgid "Exclude"
+msgstr "Изключва"
+
+#. Build the exclude label
+#: ../src/preferences.c:908
+msgid ""
+"Regex list of items that should not be inserted into the history (passwords/"
+"sites that you don't need in history, etc)."
+msgstr ""
+
+#: ../src/preferences.c:928
+msgid "Regex"
+msgstr "Изключения"
+
+#: ../src/preferences.c:956
+msgid "Hotkeys"
+msgstr "Бързи клавиши"
+
+#: ../src/preferences.c:964
+msgid "<b>Hotkeys</b>"
+msgstr "<b>Бързи клавиши</b>"
+
+#: ../src/preferences.c:974
+msgid "History hotkey:"
+msgstr "История на бързи клавиши:"
+
+#: ../src/preferences.c:983
+msgid "Actions hotkey:"
+msgstr "Действия за бързи клавиши:"
+
+#: ../src/preferences.c:992
+msgid "Menu hotkey:"
+msgstr "Бърз клавиш за меню:"
+
+#: ../src/preferences.c:1001
+msgid "Manage hotkey:"
+msgstr "Управление на бързите клавиши:"
+
+#: ../src/preferences.c:1010
+msgid "Offline mode hotkey:"
+msgstr ""
+
+#: ../src/utils.c:40 ../src/utils.c:47
+#, c-format
+msgid "Couldn't create directory: %s\n"
+msgstr "Невъзможно създаване на директория: %s\n"
+
+#: ../src/utils.c:148
+msgid "Run as daemon"
+msgstr "Стартиране като демон"
+
+#: ../src/utils.c:155
+msgid "Do not use status icon (Ctrl-Alt-P for menu)"
+msgstr "Да не ползва иконата за статус (Ctrl-Alt-P за меню)"
+
+#: ../src/utils.c:162
+msgid "Print clipboard contents"
+msgstr "Отпечатване на съдържанието от клипборда"
+
+#: ../src/utils.c:169
+msgid "Print primary contents"
+msgstr "Отпечатване на първото съдържание"
+
+#: ../src/utils.c:181
+msgid ""
+"Clipboard CLI usage examples:\n"
+"\n"
+" echo \"copied to clipboard\" | clipit\n"
+" clipit \"copied to clipboard\"\n"
+" echo \"copied to clipboard\" | clipit -c"
+msgstr ""
+"Clipboard CLI примери:\n"
+"\n"
+" echo \"copied to clipboard\" | clipit\n"
+" clipit \"copied to clipboard\"\n"
+" echo \"copied to clipboard\" | clipit -c"
+
+#: ../src/utils.c:187
+msgid ""
+"Written by Cristian Henzel.\n"
+"Report bugs to <oss@rspwn.com>."
+msgstr ""
+"Създадено от Cristian Henzel.\n"
+"Съобщете за грешки на <oss@rspwn.com>."
diff --git a/po/ca.po b/po/ca.po
new file mode 100644
index 0000000..287e291
--- /dev/null
+++ b/po/ca.po
@@ -0,0 +1,348 @@
+# ClipIt translation file.
+# Copyright (C) 2010-2015 Cristian Henzel <oss@rspwn.com>
+# This file is distributed under the same license as the ClipIt package.
+#
+# Translators:
+# Robert Antoni Buj Gelonch <rbuj@fedoraproject.org>, 2015-2016
+msgid ""
+msgstr ""
+"Project-Id-Version: ClipIt\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2017-02-20 01:08+0100\n"
+"PO-Revision-Date: 2016-05-27 14:34+0000\n"
+"Last-Translator: Robert Antoni Buj Gelonch <rbuj@fedoraproject.org>\n"
+"Language-Team: Catalan (http://www.transifex.com/shantzu/clipit/language/"
+"ca/)\n"
+"Language: ca\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: ../data/clipit.desktop.in.h:1 ../data/clipit-startup.desktop.in.h:1
+msgid "ClipIt"
+msgstr "ClipIt"
+
+#: ../data/clipit.desktop.in.h:2 ../data/clipit-startup.desktop.in.h:2
+#: ../src/main.c:834
+msgid "Clipboard Manager"
+msgstr "Gestor del porta-retalls"
+
+#: ../src/main.c:287
+msgid "Lightweight GTK+ clipboard manager."
+msgstr "Gestor del porta-retalls del lleuger GTK+."
+
+#. Actions using:
+#: ../src/main.c:357
+msgid "Actions using:"
+msgstr "Accions que utilitzen:"
+
+#. Create menu item for empty clipboard contents
+#: ../src/main.c:366 ../src/main.c:383
+msgid "None"
+msgstr "Cap"
+
+#: ../src/main.c:386
+msgid "<b>None</b>"
+msgstr "<b>Cap</b>"
+
+#. File contained no actions so adding empty
+#. File did not open so adding empty
+#. Nothing in history so adding empty
+#: ../src/main.c:408 ../src/main.c:437 ../src/main.c:601
+msgid "Empty"
+msgstr "Buit"
+
+#. Edit actions
+#: ../src/main.c:444
+msgid "_Edit actions"
+msgstr "_Edita les accions"
+
+#. Offline mode checkbox
+#: ../src/main.c:687
+msgid "_Offline mode"
+msgstr "M_ode sense connexió"
+
+#. Manage history
+#: ../src/main.c:696
+msgid "_Manage history"
+msgstr "_Gestiona l'historial"
+
+#. Create the dialog
+#: ../src/manage.c:138
+msgid "Editing Clipboard"
+msgstr "S'està editant el porta-retalls"
+
+#: ../src/manage.c:158
+msgid "_Static item"
+msgstr "Element e_stàtic"
+
+#: ../src/manage.c:240
+msgid "Clear the history?"
+msgstr "Voleu netejar l'historial?"
+
+#: ../src/manage.c:241
+msgid "Clear history"
+msgstr "Neteja l'historial"
+
+#: ../src/manage.c:361
+msgid "Manage History"
+msgstr "Gestiona l'historial"
+
+#: ../src/manage.c:364
+msgid " (Offline mode)"
+msgstr "(mode sense connexió)"
+
+#: ../src/manage.c:406
+msgid "Results"
+msgstr "Resultats"
+
+#: ../src/manage.c:411
+msgid "Edit"
+msgstr "Edita"
+
+#: ../src/manage.c:413 ../src/preferences.c:886 ../src/preferences.c:947
+msgid "Remove"
+msgstr "Suprimeix"
+
+#: ../src/manage.c:415
+msgid "Remove all"
+msgstr "Suprimeix-ho tot"
+
+#: ../src/manage.c:417
+msgid "Close"
+msgstr "Tanca"
+
+#: ../src/preferences.c:170
+msgid "Save history"
+msgstr "Desa l'historial"
+
+#: ../src/preferences.c:203
+msgid "Remove history file"
+msgstr "Suprimeix el fitxer de l'historial"
+
+#. Create the dialog
+#: ../src/preferences.c:648
+msgid "Preferences"
+msgstr "Preferències"
+
+#: ../src/preferences.c:667
+msgid "Settings"
+msgstr "Ajusts"
+
+#: ../src/preferences.c:675
+msgid "<b>Clipboards</b>"
+msgstr "<b>Porta-retalls</b>"
+
+#: ../src/preferences.c:682
+msgid "Use _Copy (Ctrl-C)"
+msgstr "Utilitza _copia (Ctrl-C)"
+
+#: ../src/preferences.c:685
+msgid "Use _Primary (Selection)"
+msgstr "Utilitza _primari (selecció)"
+
+#: ../src/preferences.c:688
+msgid "S_ynchronize clipboards"
+msgstr "S_incronitza els porta-retalls"
+
+#: ../src/preferences.c:690
+msgid "_Automatically paste selected item"
+msgstr "Enganxa _automàticament l'element seleccionat"
+
+#: ../src/preferences.c:699
+msgid "<b>Miscellaneous</b>"
+msgstr "<b>Miscel·lani</b>"
+
+#: ../src/preferences.c:706
+msgid "Show _indexes in history menu"
+msgstr "Mostra els índexs al menú de l'historial"
+
+#: ../src/preferences.c:708
+msgid "S_ave URIs"
+msgstr "Des_a els URI"
+
+#: ../src/preferences.c:710
+msgid "Capture _hyperlinks only"
+msgstr "Captura només els hipervíncles"
+
+#: ../src/preferences.c:712
+msgid "C_onfirm before clearing history"
+msgstr "C_onfirma abans de netejar l'historial"
+
+#: ../src/preferences.c:714
+msgid "_Use right-click menu"
+msgstr "_Utilitza el menú del clic dret"
+
+#: ../src/preferences.c:723
+msgid "History"
+msgstr "Historial"
+
+#: ../src/preferences.c:731
+msgid "<b>History</b>"
+msgstr "<b>Historial</b>"
+
+#: ../src/preferences.c:738
+msgid "Save _history"
+msgstr "Desa l'_historial"
+
+#: ../src/preferences.c:739
+msgid "Save and restore history between sessions"
+msgstr "Desa i restaura l'historial entre sessions"
+
+#: ../src/preferences.c:743
+msgid "Items in history:"
+msgstr "Elements a l'historial:"
+
+#: ../src/preferences.c:752
+msgid "Items in menu:"
+msgstr "Elements al menú:"
+
+#: ../src/preferences.c:759
+msgid "Show _static items in menu"
+msgstr "Mostra els elements e_stàtics al menú"
+
+#: ../src/preferences.c:764
+msgid "Static items in menu:"
+msgstr "Elements estàtics al menú:"
+
+#: ../src/preferences.c:777
+msgid "<b>Items</b>"
+msgstr "<b>Elements</b>"
+
+#: ../src/preferences.c:784
+msgid "Show in a single _line"
+msgstr "Mostra en una sola _línia"
+
+#: ../src/preferences.c:786
+msgid "Show in _reverse order"
+msgstr "Mostra en ordre inve_rs"
+
+#: ../src/preferences.c:790
+msgid "Character length of items:"
+msgstr "Longitud de caràcters dels elements:"
+
+#: ../src/preferences.c:799
+msgid "Omit items in the:"
+msgstr "Omet els elements a:"
+
+#: ../src/preferences.c:803
+msgid "Beginning"
+msgstr "Començament"
+
+#: ../src/preferences.c:804
+msgid "Middle"
+msgstr "Mig"
+
+#: ../src/preferences.c:805
+msgid "End"
+msgstr "Final"
+
+#: ../src/preferences.c:835
+msgid "Actions"
+msgstr "Accions"
+
+#. Build the actions label
+#: ../src/preferences.c:840
+msgid "Control-click ClipIt's tray icon to use actions"
+msgstr "Control-clic a la safata de ClipIt per utilitzar les accions"
+
+#: ../src/preferences.c:860
+msgid "Action"
+msgstr "Acció"
+
+#: ../src/preferences.c:867
+msgid "Command"
+msgstr "Ordre"
+
+#: ../src/preferences.c:882 ../src/preferences.c:943
+msgid "Add..."
+msgstr "Afegeix..."
+
+#: ../src/preferences.c:903
+msgid "Exclude"
+msgstr "Exclou"
+
+#. Build the exclude label
+#: ../src/preferences.c:908
+msgid ""
+"Regex list of items that should not be inserted into the history (passwords/"
+"sites that you don't need in history, etc)."
+msgstr ""
+"Llista d'expressions regulars dels elements que no s'han d'inserir a "
+"l'historial (contrasenyes o llocs que no necessiteu a l'historial, etc.)."
+
+#: ../src/preferences.c:928
+msgid "Regex"
+msgstr "Expressió regular"
+
+#: ../src/preferences.c:956
+msgid "Hotkeys"
+msgstr "Dreceres de teclat"
+
+#: ../src/preferences.c:964
+msgid "<b>Hotkeys</b>"
+msgstr "<b>Dreceres de teclat</b>"
+
+#: ../src/preferences.c:974
+msgid "History hotkey:"
+msgstr "Drecera de teclat de l'historial:"
+
+#: ../src/preferences.c:983
+msgid "Actions hotkey:"
+msgstr "Drecera de teclat de les accions:"
+
+#: ../src/preferences.c:992
+msgid "Menu hotkey:"
+msgstr "Drecera de teclat del menú:"
+
+#: ../src/preferences.c:1001
+msgid "Manage hotkey:"
+msgstr "Drecera de teclat de la gestió:"
+
+#: ../src/preferences.c:1010
+msgid "Offline mode hotkey:"
+msgstr "Drecera de teclat del mode sense connexió:"
+
+#: ../src/utils.c:40 ../src/utils.c:47
+#, c-format
+msgid "Couldn't create directory: %s\n"
+msgstr "No s'ha pogut crear el directori: %s\n"
+
+#: ../src/utils.c:131
+msgid "Run as daemon"
+msgstr "Executa com a dimoni"
+
+#: ../src/utils.c:138
+msgid "Do not use status icon (Ctrl-Alt-P for menu)"
+msgstr "No utilitzis la icona d'estat (Ctrl-Alt-P per al menú)"
+
+#: ../src/utils.c:145
+msgid "Print clipboard contents"
+msgstr "Imprimeix el contingut del porta-retalls"
+
+#: ../src/utils.c:152
+msgid "Print primary contents"
+msgstr "Imprimeix els continguts primaris"
+
+#: ../src/utils.c:164
+msgid ""
+"Clipboard CLI usage examples:\n"
+"\n"
+" echo \"copied to clipboard\" | clipit\n"
+" clipit \"copied to clipboard\"\n"
+" echo \"copied to clipboard\" | clipit -c"
+msgstr ""
+"Exemples d'ús de la interfície de línia d'ordres del porta-retalls:\n"
+"\n"
+" echo \"copiat al porta-retalls\" | clipit\n"
+" clipit \"copiat al porta-retalls\"\n"
+" echo \"copiat al porta-retalls\" | clipit -c"
+
+#: ../src/utils.c:170
+msgid ""
+"Written by Cristian Henzel.\n"
+"Report bugs to <oss@rspwn.com>."
+msgstr ""
+"Escrit per Cristian Henzel.\n"
+"Informeu dels errors de programari a <oss@rspwn.com>."
diff --git a/po/clipit.pot b/po/clipit.pot
new file mode 100644
index 0000000..8282a78
--- /dev/null
+++ b/po/clipit.pot
@@ -0,0 +1,337 @@
+# ClipIt translation file.
+# Copyright (C) 2010-2015 Cristian Henzel <oss@rspwn.com>
+# This file is distributed under the same license as the ClipIt package.
+# Cristian Henzel <oss@rspwn.com>, 2010.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: ClipIt\n"
+"Report-Msgid-Bugs-To: Cristian Henzel <oss@rspwn.com>\n"
+"POT-Creation-Date: 2015-11-10 16:39+0200\n"
+"PO-Revision-Date: 2015-11-10 16:39+0200\n"
+"Last-Translator: Cristian Henzel <oss@rspwn.com>\n"
+"Language-Team: Cristian Henzel <oss@rspwn.com>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: ../data/clipit-startup.desktop.in.h:1 ../data/clipit.desktop.in.h:1
+msgid "ClipIt"
+msgstr ""
+
+#: ../data/clipit-startup.desktop.in.h:2 ../data/clipit.desktop.in.h:2
+#: ../src/main.c:833
+msgid "Clipboard Manager"
+msgstr ""
+
+#: ../src/main.c:287
+msgid "Lightweight GTK+ clipboard manager."
+msgstr ""
+
+#. Actions using:
+#: ../src/main.c:356
+msgid "Actions using:"
+msgstr ""
+
+#. Create menu item for empty clipboard contents
+#: ../src/main.c:365 ../src/main.c:382
+msgid "None"
+msgstr ""
+
+#: ../src/main.c:385
+msgid "<b>None</b>"
+msgstr ""
+
+#. File contained no actions so adding empty
+#. File did not open so adding empty
+#. Nothing in history so adding empty
+#: ../src/main.c:407 ../src/main.c:436 ../src/main.c:600
+msgid "Empty"
+msgstr ""
+
+#. Edit actions
+#: ../src/main.c:443
+msgid "_Edit actions"
+msgstr ""
+
+#. Offline mode checkbox
+#: ../src/main.c:686
+msgid "_Offline mode"
+msgstr ""
+
+#. Manage history
+#: ../src/main.c:695
+msgid "_Manage history"
+msgstr ""
+
+#. Create the dialog
+#: ../src/manage.c:138
+msgid "Editing Clipboard"
+msgstr ""
+
+#: ../src/manage.c:158
+msgid "_Static item"
+msgstr ""
+
+#: ../src/manage.c:227
+msgid "Clear the history?"
+msgstr ""
+
+#: ../src/manage.c:228
+msgid "Clear history"
+msgstr ""
+
+#: ../src/manage.c:348
+msgid "Manage History"
+msgstr ""
+
+#: ../src/manage.c:351
+msgid " (Offline mode)"
+msgstr ""
+
+#: ../src/manage.c:393
+msgid "Results"
+msgstr ""
+
+#: ../src/manage.c:398
+msgid "Edit"
+msgstr ""
+
+#: ../src/manage.c:400 ../src/preferences.c:886 ../src/preferences.c:947
+msgid "Remove"
+msgstr ""
+
+#: ../src/manage.c:402
+msgid "Remove all"
+msgstr ""
+
+#: ../src/manage.c:404
+msgid "Close"
+msgstr ""
+
+#: ../src/preferences.c:170
+msgid "Save history"
+msgstr ""
+
+#: ../src/preferences.c:203
+msgid "Remove history file"
+msgstr ""
+
+#. Create the dialog
+#: ../src/preferences.c:648
+msgid "Preferences"
+msgstr ""
+
+#: ../src/preferences.c:667
+msgid "Settings"
+msgstr ""
+
+#: ../src/preferences.c:675
+msgid "<b>Clipboards</b>"
+msgstr ""
+
+#: ../src/preferences.c:682
+msgid "Use _Copy (Ctrl-C)"
+msgstr ""
+
+#: ../src/preferences.c:685
+msgid "Use _Primary (Selection)"
+msgstr ""
+
+#: ../src/preferences.c:688
+msgid "S_ynchronize clipboards"
+msgstr ""
+
+#: ../src/preferences.c:690
+msgid "_Automatically paste selected item"
+msgstr ""
+
+#: ../src/preferences.c:699
+msgid "<b>Miscellaneous</b>"
+msgstr ""
+
+#: ../src/preferences.c:706
+msgid "Show _indexes in history menu"
+msgstr ""
+
+#: ../src/preferences.c:708
+msgid "S_ave URIs"
+msgstr ""
+
+#: ../src/preferences.c:710
+msgid "Capture _hyperlinks only"
+msgstr ""
+
+#: ../src/preferences.c:712
+msgid "C_onfirm before clearing history"
+msgstr ""
+
+#: ../src/preferences.c:714
+msgid "_Use right-click menu"
+msgstr ""
+
+#: ../src/preferences.c:723
+msgid "History"
+msgstr ""
+
+#: ../src/preferences.c:731
+msgid "<b>History</b>"
+msgstr ""
+
+#: ../src/preferences.c:738
+msgid "Save _history"
+msgstr ""
+
+#: ../src/preferences.c:739
+msgid "Save and restore history between sessions"
+msgstr ""
+
+#: ../src/preferences.c:743
+msgid "Items in history:"
+msgstr ""
+
+#: ../src/preferences.c:752
+msgid "Items in menu:"
+msgstr ""
+
+#: ../src/preferences.c:759
+msgid "Show _static items in menu"
+msgstr ""
+
+#: ../src/preferences.c:764
+msgid "Static items in menu:"
+msgstr ""
+
+#: ../src/preferences.c:777
+msgid "<b>Items</b>"
+msgstr ""
+
+#: ../src/preferences.c:784
+msgid "Show in a single _line"
+msgstr ""
+
+#: ../src/preferences.c:786
+msgid "Show in _reverse order"
+msgstr ""
+
+#: ../src/preferences.c:790
+msgid "Character length of items:"
+msgstr ""
+
+#: ../src/preferences.c:799
+msgid "Omit items in the:"
+msgstr ""
+
+#: ../src/preferences.c:803
+msgid "Beginning"
+msgstr ""
+
+#: ../src/preferences.c:804
+msgid "Middle"
+msgstr ""
+
+#: ../src/preferences.c:805
+msgid "End"
+msgstr ""
+
+#: ../src/preferences.c:835
+msgid "Actions"
+msgstr ""
+
+#. Build the actions label
+#: ../src/preferences.c:840
+msgid "Control-click ClipIt's tray icon to use actions"
+msgstr ""
+
+#: ../src/preferences.c:860
+msgid "Action"
+msgstr ""
+
+#: ../src/preferences.c:867
+msgid "Command"
+msgstr ""
+
+#: ../src/preferences.c:882 ../src/preferences.c:943
+msgid "Add..."
+msgstr ""
+
+#: ../src/preferences.c:903
+msgid "Exclude"
+msgstr ""
+
+#. Build the exclude label
+#: ../src/preferences.c:908
+msgid ""
+"Regex list of items that should not be inserted into the history (passwords/"
+"sites that you don't need in history, etc)."
+msgstr ""
+
+#: ../src/preferences.c:928
+msgid "Regex"
+msgstr ""
+
+#: ../src/preferences.c:956
+msgid "Hotkeys"
+msgstr ""
+
+#: ../src/preferences.c:964
+msgid "<b>Hotkeys</b>"
+msgstr ""
+
+#: ../src/preferences.c:974
+msgid "History hotkey:"
+msgstr ""
+
+#: ../src/preferences.c:983
+msgid "Actions hotkey:"
+msgstr ""
+
+#: ../src/preferences.c:992
+msgid "Menu hotkey:"
+msgstr ""
+
+#: ../src/preferences.c:1001
+msgid "Manage hotkey:"
+msgstr ""
+
+#: ../src/preferences.c:1010
+msgid "Offline mode hotkey:"
+msgstr ""
+
+#: ../src/utils.c:40 ../src/utils.c:47
+#, c-format
+msgid "Couldn't create directory: %s\n"
+msgstr ""
+
+#: ../src/utils.c:148
+msgid "Run as daemon"
+msgstr ""
+
+#: ../src/utils.c:155
+msgid "Do not use status icon (Ctrl-Alt-P for menu)"
+msgstr ""
+
+#: ../src/utils.c:162
+msgid "Print clipboard contents"
+msgstr ""
+
+#: ../src/utils.c:169
+msgid "Print primary contents"
+msgstr ""
+
+#: ../src/utils.c:181
+msgid ""
+"Clipboard CLI usage examples:\n"
+"\n"
+" echo \"copied to clipboard\" | clipit\n"
+" clipit \"copied to clipboard\"\n"
+" echo \"copied to clipboard\" | clipit -c"
+msgstr ""
+
+#: ../src/utils.c:187
+msgid ""
+"Written by Cristian Henzel.\n"
+"Report bugs to <oss@rspwn.com>."
+msgstr ""
diff --git a/po/cs.po b/po/cs.po
new file mode 100644
index 0000000..1ada67c
--- /dev/null
+++ b/po/cs.po
@@ -0,0 +1,349 @@
+# ClipIt translation file.
+# Copyright (C) 2010-2012 Cristian Henzel <oss@rspwn.com>
+# This file is distributed under the same license as the ClipIt package.
+#
+# Translators:
+# Miloš Koutný <milos.koutny@gmail.com>, 2009.
+# <strepon@centrum.cz>, 2011.
+msgid ""
+msgstr ""
+"Project-Id-Version: ClipIt\n"
+"Report-Msgid-Bugs-To: Cristian Henzel <oss@rspwn.com>\n"
+"POT-Creation-Date: 2015-11-10 16:39+0200\n"
+"PO-Revision-Date: 2012-04-04 06:30+0000\n"
+"Last-Translator: Cristian Henzel <oss@rspwn.com>\n"
+"Language-Team: Czech (http://www.transifex.net/projects/p/clipit/language/"
+"cs/)\n"
+"Language: cs\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2\n"
+
+#: ../data/clipit-startup.desktop.in.h:1 ../data/clipit.desktop.in.h:1
+msgid "ClipIt"
+msgstr ""
+
+#: ../data/clipit-startup.desktop.in.h:2 ../data/clipit.desktop.in.h:2
+#: ../src/main.c:833
+msgid "Clipboard Manager"
+msgstr "Správce schránky"
+
+#: ../src/main.c:287
+msgid "Lightweight GTK+ clipboard manager."
+msgstr "Odlehčený GTK+ správce schránky."
+
+#. Actions using:
+#: ../src/main.c:356
+msgid "Actions using:"
+msgstr "Akce pro:"
+
+#. Create menu item for empty clipboard contents
+#: ../src/main.c:365 ../src/main.c:382
+msgid "None"
+msgstr "Žádný"
+
+#: ../src/main.c:385
+msgid "<b>None</b>"
+msgstr "<b>Žádný</b>"
+
+#. File contained no actions so adding empty
+#. File did not open so adding empty
+#. Nothing in history so adding empty
+#: ../src/main.c:407 ../src/main.c:436 ../src/main.c:600
+msgid "Empty"
+msgstr "Prázdný"
+
+#. Edit actions
+#: ../src/main.c:443
+msgid "_Edit actions"
+msgstr "Akce _Editace"
+
+#. Offline mode checkbox
+#: ../src/main.c:686
+msgid "_Offline mode"
+msgstr ""
+
+#. Manage history
+#: ../src/main.c:695
+msgid "_Manage history"
+msgstr "_Správa historie"
+
+#. Create the dialog
+#: ../src/manage.c:138
+msgid "Editing Clipboard"
+msgstr "Úprava schránky"
+
+#: ../src/manage.c:158
+msgid "_Static item"
+msgstr "_Statická položka"
+
+#: ../src/manage.c:227
+msgid "Clear the history?"
+msgstr "Vymazat historii?"
+
+#: ../src/manage.c:228
+msgid "Clear history"
+msgstr "Vymazat historii"
+
+#: ../src/manage.c:348
+msgid "Manage History"
+msgstr "Správa historie"
+
+#: ../src/manage.c:351
+msgid " (Offline mode)"
+msgstr ""
+
+#: ../src/manage.c:393
+msgid "Results"
+msgstr "Výsledky"
+
+#: ../src/manage.c:398
+msgid "Edit"
+msgstr "Upravit"
+
+#: ../src/manage.c:400 ../src/preferences.c:886 ../src/preferences.c:947
+msgid "Remove"
+msgstr "Odstranit"
+
+#: ../src/manage.c:402
+msgid "Remove all"
+msgstr "Odstranit vše"
+
+#: ../src/manage.c:404
+msgid "Close"
+msgstr "Zavřít"
+
+#: ../src/preferences.c:170
+msgid "Save history"
+msgstr "Uložit historii"
+
+#: ../src/preferences.c:203
+msgid "Remove history file"
+msgstr "Odstranit soubor historie"
+
+#. Create the dialog
+#: ../src/preferences.c:648
+msgid "Preferences"
+msgstr "Předvolby"
+
+#: ../src/preferences.c:667
+msgid "Settings"
+msgstr "Nastavení"
+
+#: ../src/preferences.c:675
+msgid "<b>Clipboards</b>"
+msgstr "<b>Schránky</b>"
+
+#: ../src/preferences.c:682
+msgid "Use _Copy (Ctrl-C)"
+msgstr "Použít _kopírování (Ctrl-C)"
+
+#: ../src/preferences.c:685
+msgid "Use _Primary (Selection)"
+msgstr "Použít _primární (výběr)"
+
+#: ../src/preferences.c:688
+msgid "S_ynchronize clipboards"
+msgstr "S_ynchronizovat schránky"
+
+#: ../src/preferences.c:690
+msgid "_Automatically paste selected item"
+msgstr "_Automaticky vložit vybranou položku"
+
+#: ../src/preferences.c:699
+msgid "<b>Miscellaneous</b>"
+msgstr "<b>Různé</b>"
+
+#: ../src/preferences.c:706
+msgid "Show _indexes in history menu"
+msgstr "_Zobrazit pořadí v nabídce historie"
+
+#: ../src/preferences.c:708
+msgid "S_ave URIs"
+msgstr "Ukládat _URI"
+
+#: ../src/preferences.c:710
+msgid "Capture _hyperlinks only"
+msgstr "Zachycovat pouze _hypertextové odkazy"
+
+#: ../src/preferences.c:712
+msgid "C_onfirm before clearing history"
+msgstr "P_otvrzení před smazáním historie"
+
+#: ../src/preferences.c:714
+msgid "_Use right-click menu"
+msgstr "Použít _nabídku vyvolanou pravým tlačítkem"
+
+#: ../src/preferences.c:723
+msgid "History"
+msgstr "Historie"
+
+#: ../src/preferences.c:731
+msgid "<b>History</b>"
+msgstr "<b>Historie</b>"
+
+#: ../src/preferences.c:738
+msgid "Save _history"
+msgstr "Ukládat _historii"
+
+#: ../src/preferences.c:739
+msgid "Save and restore history between sessions"
+msgstr "Bude ukládat a obnovovat historii mezi sezeními"
+
+#: ../src/preferences.c:743
+msgid "Items in history:"
+msgstr "Položek v historii:"
+
+#: ../src/preferences.c:752
+msgid "Items in menu:"
+msgstr "Položek v nabídce:"
+
+#: ../src/preferences.c:759
+msgid "Show _static items in menu"
+msgstr "Zobrazit v nabídce _statické položky"
+
+#: ../src/preferences.c:764
+msgid "Static items in menu:"
+msgstr "Statických položek v nabídce:"
+
+#: ../src/preferences.c:777
+msgid "<b>Items</b>"
+msgstr "<b>Položky</b>"
+
+#: ../src/preferences.c:784
+msgid "Show in a single _line"
+msgstr "Zobrazit v _jediném řádku"
+
+#: ../src/preferences.c:786
+msgid "Show in _reverse order"
+msgstr "Zob_razit v opačném pořadí"
+
+#: ../src/preferences.c:790
+msgid "Character length of items:"
+msgstr "Počet znaků položek:"
+
+#: ../src/preferences.c:799
+msgid "Omit items in the:"
+msgstr "Vynechat položky:"
+
+#: ../src/preferences.c:803
+msgid "Beginning"
+msgstr "na začátku"
+
+#: ../src/preferences.c:804
+msgid "Middle"
+msgstr "ve středu"
+
+#: ../src/preferences.c:805
+msgid "End"
+msgstr "na konci"
+
+#: ../src/preferences.c:835
+msgid "Actions"
+msgstr "Akce"
+
+#. Build the actions label
+#: ../src/preferences.c:840
+msgid "Control-click ClipIt's tray icon to use actions"
+msgstr "Ctrl+klik na ikoně ClipIt v liště k akcím"
+
+#: ../src/preferences.c:860
+msgid "Action"
+msgstr "Akce"
+
+#: ../src/preferences.c:867
+msgid "Command"
+msgstr "Příkaz"
+
+#: ../src/preferences.c:882 ../src/preferences.c:943
+msgid "Add..."
+msgstr "Přidat..."
+
+#: ../src/preferences.c:903
+msgid "Exclude"
+msgstr "Výjimky"
+
+#. Build the exclude label
+#: ../src/preferences.c:908
+msgid ""
+"Regex list of items that should not be inserted into the history (passwords/"
+"sites that you don't need in history, etc)."
+msgstr ""
+"Seznam regulárních výrazů, které by neměly být ukládány do historie (hesla/"
+"stránky, které nejsou v historii potřeba, atd.)"
+
+#: ../src/preferences.c:928
+msgid "Regex"
+msgstr "Regulární výraz"
+
+#: ../src/preferences.c:956
+msgid "Hotkeys"
+msgstr "Klávesové zkratky"
+
+#: ../src/preferences.c:964
+msgid "<b>Hotkeys</b>"
+msgstr "<b>Klávesové zkratky</b>"
+
+#: ../src/preferences.c:974
+msgid "History hotkey:"
+msgstr "Zkratka pro historii:"
+
+#: ../src/preferences.c:983
+msgid "Actions hotkey:"
+msgstr "Zkratka pro akce:"
+
+#: ../src/preferences.c:992
+msgid "Menu hotkey:"
+msgstr "Zkratka pro nabídku:"
+
+#: ../src/preferences.c:1001
+msgid "Manage hotkey:"
+msgstr "Zkratka pro správu:"
+
+#: ../src/preferences.c:1010
+msgid "Offline mode hotkey:"
+msgstr ""
+
+#: ../src/utils.c:40 ../src/utils.c:47
+#, c-format
+msgid "Couldn't create directory: %s\n"
+msgstr "Nelze vytvořit adresář: %s\n"
+
+#: ../src/utils.c:148
+msgid "Run as daemon"
+msgstr "Spouštět jako démon"
+
+#: ../src/utils.c:155
+msgid "Do not use status icon (Ctrl-Alt-P for menu)"
+msgstr "Nepoužívat stavovou ikonu (Ctrl+Alt+P pro nabídku)"
+
+#: ../src/utils.c:162
+msgid "Print clipboard contents"
+msgstr "Tisknout obsah schránky"
+
+#: ../src/utils.c:169
+msgid "Print primary contents"
+msgstr "Tisknout primární obsah"
+
+#: ../src/utils.c:181
+msgid ""
+"Clipboard CLI usage examples:\n"
+"\n"
+" echo \"copied to clipboard\" | clipit\n"
+" clipit \"copied to clipboard\"\n"
+" echo \"copied to clipboard\" | clipit -c"
+msgstr ""
+"Příklad užití schránky v příkazovém řádku:\n"
+"\n"
+" echo \"Kopie do schránky\" | clipit\n"
+" clipit \"Kopie do schránky\"\n"
+" echo \"Kopie do schránky\" | clipit -o"
+
+#: ../src/utils.c:187
+msgid ""
+"Written by Cristian Henzel.\n"
+"Report bugs to <oss@rspwn.com>."
+msgstr ""
+"Napsal Cristian Henzel.\n"
+"Chyby hlaste na <oss@rspwn.com>."
diff --git a/po/da.po b/po/da.po
new file mode 100644
index 0000000..3413e1f
--- /dev/null
+++ b/po/da.po
@@ -0,0 +1,343 @@
+# ClipIt translation file.
+# Copyright (C) 2010-2012 Cristian Henzel <oss@rspwn.com>
+# This file is distributed under the same license as the ClipIt package.
+#
+# Translators:
+# Kim Jensen <reklamepost@energimail.dk>, 2009.
+msgid ""
+msgstr ""
+"Project-Id-Version: ClipIt\n"
+"Report-Msgid-Bugs-To: Cristian Henzel <oss@rspwn.com>\n"
+"POT-Creation-Date: 2015-11-10 16:39+0200\n"
+"PO-Revision-Date: 2012-04-04 06:30+0000\n"
+"Last-Translator: Cristian Henzel <oss@rspwn.com>\n"
+"Language-Team: Cristian Henzel <oss@rspwn.com>\n"
+"Language: da\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1)\n"
+
+#: ../data/clipit-startup.desktop.in.h:1 ../data/clipit.desktop.in.h:1
+msgid "ClipIt"
+msgstr ""
+
+#: ../data/clipit-startup.desktop.in.h:2 ../data/clipit.desktop.in.h:2
+#: ../src/main.c:833
+msgid "Clipboard Manager"
+msgstr "Udklipsholder"
+
+#: ../src/main.c:287
+msgid "Lightweight GTK+ clipboard manager."
+msgstr "Letvægts GTK+ udklipsholder-håndtering"
+
+#. Actions using:
+#: ../src/main.c:356
+msgid "Actions using:"
+msgstr ""
+
+#. Create menu item for empty clipboard contents
+#: ../src/main.c:365 ../src/main.c:382
+msgid "None"
+msgstr ""
+
+#: ../src/main.c:385
+msgid "<b>None</b>"
+msgstr "<b>Ingen</b>"
+
+#. File contained no actions so adding empty
+#. File did not open so adding empty
+#. Nothing in history so adding empty
+#: ../src/main.c:407 ../src/main.c:436 ../src/main.c:600
+msgid "Empty"
+msgstr "Tom"
+
+#. Edit actions
+#: ../src/main.c:443
+msgid "_Edit actions"
+msgstr "R_ediger handlinger"
+
+#. Offline mode checkbox
+#: ../src/main.c:686
+msgid "_Offline mode"
+msgstr ""
+
+#. Manage history
+#: ../src/main.c:695
+msgid "_Manage history"
+msgstr ""
+
+#. Create the dialog
+#: ../src/manage.c:138
+msgid "Editing Clipboard"
+msgstr "Rediger udklipsholder"
+
+#: ../src/manage.c:158
+msgid "_Static item"
+msgstr ""
+
+#: ../src/manage.c:227
+msgid "Clear the history?"
+msgstr "Tøm historikken?"
+
+#: ../src/manage.c:228
+msgid "Clear history"
+msgstr ""
+
+#: ../src/manage.c:348
+msgid "Manage History"
+msgstr ""
+
+#: ../src/manage.c:351
+msgid " (Offline mode)"
+msgstr ""
+
+#: ../src/manage.c:393
+msgid "Results"
+msgstr ""
+
+#: ../src/manage.c:398
+msgid "Edit"
+msgstr ""
+
+#: ../src/manage.c:400 ../src/preferences.c:886 ../src/preferences.c:947
+msgid "Remove"
+msgstr "Fjern"
+
+#: ../src/manage.c:402
+msgid "Remove all"
+msgstr ""
+
+#: ../src/manage.c:404
+msgid "Close"
+msgstr ""
+
+#: ../src/preferences.c:170
+msgid "Save history"
+msgstr ""
+
+#: ../src/preferences.c:203
+msgid "Remove history file"
+msgstr ""
+
+#. Create the dialog
+#: ../src/preferences.c:648
+msgid "Preferences"
+msgstr "Indstillinger"
+
+#: ../src/preferences.c:667
+msgid "Settings"
+msgstr ""
+
+#: ../src/preferences.c:675
+msgid "<b>Clipboards</b>"
+msgstr "<b>Udklipsholder</b>"
+
+#: ../src/preferences.c:682
+msgid "Use _Copy (Ctrl-C)"
+msgstr "Brug _kopier (Ctrl-C)"
+
+#: ../src/preferences.c:685
+msgid "Use _Primary (Selection)"
+msgstr "Brug _primær (Markering)"
+
+#: ../src/preferences.c:688
+msgid "S_ynchronize clipboards"
+msgstr "S_ynkroniser udklipsholder"
+
+#: ../src/preferences.c:690
+msgid "_Automatically paste selected item"
+msgstr ""
+
+#: ../src/preferences.c:699
+msgid "<b>Miscellaneous</b>"
+msgstr "<b>Diverse</b>"
+
+#: ../src/preferences.c:706
+msgid "Show _indexes in history menu"
+msgstr ""
+
+#: ../src/preferences.c:708
+msgid "S_ave URIs"
+msgstr ""
+
+#: ../src/preferences.c:710
+msgid "Capture _hyperlinks only"
+msgstr "Indfang kun _henvisning"
+
+#: ../src/preferences.c:712
+msgid "C_onfirm before clearing history"
+msgstr "Bekræft før rydning af hist_orik"
+
+#: ../src/preferences.c:714
+msgid "_Use right-click menu"
+msgstr ""
+
+#: ../src/preferences.c:723
+msgid "History"
+msgstr ""
+
+#: ../src/preferences.c:731
+msgid "<b>History</b>"
+msgstr "<b>Historik</b>"
+
+#: ../src/preferences.c:738
+msgid "Save _history"
+msgstr ""
+
+#: ../src/preferences.c:739
+msgid "Save and restore history between sessions"
+msgstr "Gem og gendan historik imellem sessioner"
+
+#: ../src/preferences.c:743
+msgid "Items in history:"
+msgstr "Elementer i historik:"
+
+#: ../src/preferences.c:752
+msgid "Items in menu:"
+msgstr ""
+
+#: ../src/preferences.c:759
+msgid "Show _static items in menu"
+msgstr ""
+
+#: ../src/preferences.c:764
+msgid "Static items in menu:"
+msgstr ""
+
+#: ../src/preferences.c:777
+msgid "<b>Items</b>"
+msgstr "<b>Elementer</b>"
+
+#: ../src/preferences.c:784
+msgid "Show in a single _line"
+msgstr ""
+
+#: ../src/preferences.c:786
+msgid "Show in _reverse order"
+msgstr "Vis i omvendt _rækkefølge"
+
+#: ../src/preferences.c:790
+msgid "Character length of items:"
+msgstr "Tegnlængde på elementer:"
+
+#: ../src/preferences.c:799
+msgid "Omit items in the:"
+msgstr "Udelad elementer i:"
+
+#: ../src/preferences.c:803
+msgid "Beginning"
+msgstr "Begyndelsen"
+
+#: ../src/preferences.c:804
+msgid "Middle"
+msgstr "Midten"
+
+#: ../src/preferences.c:805
+msgid "End"
+msgstr "Slutningen"
+
+#: ../src/preferences.c:835
+msgid "Actions"
+msgstr "Handlinger"
+
+#. Build the actions label
+#: ../src/preferences.c:840
+msgid "Control-click ClipIt's tray icon to use actions"
+msgstr "Hold Ctrl og klik ClipIts ikon for at bruge handlinger"
+
+#: ../src/preferences.c:860
+msgid "Action"
+msgstr "Handling"
+
+#: ../src/preferences.c:867
+msgid "Command"
+msgstr "Kommando"
+
+#: ../src/preferences.c:882 ../src/preferences.c:943
+msgid "Add..."
+msgstr "Tilføj"
+
+#: ../src/preferences.c:903
+msgid "Exclude"
+msgstr ""
+
+#. Build the exclude label
+#: ../src/preferences.c:908
+msgid ""
+"Regex list of items that should not be inserted into the history (passwords/"
+"sites that you don't need in history, etc)."
+msgstr ""
+
+#: ../src/preferences.c:928
+msgid "Regex"
+msgstr ""
+
+#: ../src/preferences.c:956
+msgid "Hotkeys"
+msgstr "Tastaturgenveje"
+
+#: ../src/preferences.c:964
+msgid "<b>Hotkeys</b>"
+msgstr "<b>Tastaturgenveje</b>"
+
+#: ../src/preferences.c:974
+msgid "History hotkey:"
+msgstr ""
+
+#: ../src/preferences.c:983
+msgid "Actions hotkey:"
+msgstr ""
+
+#: ../src/preferences.c:992
+msgid "Menu hotkey:"
+msgstr ""
+
+#: ../src/preferences.c:1001
+msgid "Manage hotkey:"
+msgstr ""
+
+#: ../src/preferences.c:1010
+msgid "Offline mode hotkey:"
+msgstr ""
+
+#: ../src/utils.c:40 ../src/utils.c:47
+#, c-format
+msgid "Couldn't create directory: %s\n"
+msgstr "Kunne ikke oprette mappen: %s\n"
+
+#: ../src/utils.c:148
+msgid "Run as daemon"
+msgstr "Kør som tjeneste"
+
+#: ../src/utils.c:155
+msgid "Do not use status icon (Ctrl-Alt-P for menu)"
+msgstr "Vis ikke statusikon (Ctrl-Alt-P for menu)"
+
+#: ../src/utils.c:162
+msgid "Print clipboard contents"
+msgstr "Udskriv udklipsholderens indhold"
+
+#: ../src/utils.c:169
+msgid "Print primary contents"
+msgstr "Udskriv udklipsholderens indhold"
+
+#: ../src/utils.c:181
+msgid ""
+"Clipboard CLI usage examples:\n"
+"\n"
+" echo \"copied to clipboard\" | clipit\n"
+" clipit \"copied to clipboard\"\n"
+" echo \"copied to clipboard\" | clipit -c"
+msgstr ""
+"Eksempler ved brug af udklipsholder i CLI:\n"
+"\n"
+" echo \"kopieret til udklipsholderen\" | clipit\n"
+" clipit \"kopieret til udklipsholderen\"\n"
+" echo \"kopieret til udklipsholderen\" | clipit -o"
+
+#: ../src/utils.c:187
+msgid ""
+"Written by Cristian Henzel.\n"
+"Report bugs to <oss@rspwn.com>."
+msgstr ""
diff --git a/po/de.po b/po/de.po
new file mode 100644
index 0000000..be0a36b
--- /dev/null
+++ b/po/de.po
@@ -0,0 +1,352 @@
+# ClipIt translation file.
+# Copyright (C) 2010-2012 Cristian Henzel <oss@rspwn.com>
+# This file is distributed under the same license as the ClipIt package.
+#
+# Translators:
+# <c.fastnacht@googlemail.com>, 2011.
+# Cristian Henzel <oss@rspwn.com>, 2011.
+# <saabisto@gmx.de>, 2011, 2012.
+# <u.senkler@gmx.de>, 2011.
+msgid ""
+msgstr ""
+"Project-Id-Version: ClipIt\n"
+"Report-Msgid-Bugs-To: Cristian Henzel <oss@rspwn.com>\n"
+"POT-Creation-Date: 2015-11-10 16:39+0200\n"
+"PO-Revision-Date: 2012-04-04 06:30+0000\n"
+"Last-Translator: Cristian Henzel <oss@rspwn.com>\n"
+"Language-Team: German (Germany) (http://www.transifex.net/projects/p/clipit/"
+"language/de_DE/)\n"
+"Language: de_DE\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1)\n"
+
+#: ../data/clipit-startup.desktop.in.h:1 ../data/clipit.desktop.in.h:1
+msgid "ClipIt"
+msgstr ""
+
+#: ../data/clipit-startup.desktop.in.h:2 ../data/clipit.desktop.in.h:2
+#: ../src/main.c:833
+msgid "Clipboard Manager"
+msgstr "Zwischenablage-Verwaltung"
+
+#: ../src/main.c:287
+msgid "Lightweight GTK+ clipboard manager."
+msgstr "Schlanke GTK+-Zwischenablagen-Verwaltung"
+
+#. Actions using:
+#: ../src/main.c:356
+msgid "Actions using:"
+msgstr "Aktionen mit:"
+
+#. Create menu item for empty clipboard contents
+#: ../src/main.c:365 ../src/main.c:382
+msgid "None"
+msgstr "Nichts"
+
+#: ../src/main.c:385
+msgid "<b>None</b>"
+msgstr "<b>Nichts</b>"
+
+#. File contained no actions so adding empty
+#. File did not open so adding empty
+#. Nothing in history so adding empty
+#: ../src/main.c:407 ../src/main.c:436 ../src/main.c:600
+msgid "Empty"
+msgstr "Leer"
+
+#. Edit actions
+#: ../src/main.c:443
+msgid "_Edit actions"
+msgstr "Aktionen b_earbeiten"
+
+#. Offline mode checkbox
+#: ../src/main.c:686
+msgid "_Offline mode"
+msgstr "_Offline-Modus"
+
+#. Manage history
+#: ../src/main.c:695
+msgid "_Manage history"
+msgstr "_Verlauf bearbeiten"
+
+#. Create the dialog
+#: ../src/manage.c:138
+msgid "Editing Clipboard"
+msgstr "Als Dienst ausführen"
+
+#: ../src/manage.c:158
+msgid "_Static item"
+msgstr "_Statisches Objekt"
+
+#: ../src/manage.c:227
+msgid "Clear the history?"
+msgstr "Verlauf löschen?"
+
+#: ../src/manage.c:228
+msgid "Clear history"
+msgstr "Verlauf löschen"
+
+#: ../src/manage.c:348
+msgid "Manage History"
+msgstr "Verlauf verwalten"
+
+#: ../src/manage.c:351
+msgid " (Offline mode)"
+msgstr "(Offline-Modus)"
+
+#: ../src/manage.c:393
+msgid "Results"
+msgstr "Ergebnisse"
+
+#: ../src/manage.c:398
+msgid "Edit"
+msgstr "Ändern"
+
+#: ../src/manage.c:400 ../src/preferences.c:886 ../src/preferences.c:947
+msgid "Remove"
+msgstr "Entfernen"
+
+#: ../src/manage.c:402
+msgid "Remove all"
+msgstr "Alle entfernen"
+
+#: ../src/manage.c:404
+msgid "Close"
+msgstr "Schließen"
+
+#: ../src/preferences.c:170
+msgid "Save history"
+msgstr "Verlauf speichern"
+
+#: ../src/preferences.c:203
+msgid "Remove history file"
+msgstr "Verlauf entfernen"
+
+#. Create the dialog
+#: ../src/preferences.c:648
+msgid "Preferences"
+msgstr "Einstellungen"
+
+#: ../src/preferences.c:667
+msgid "Settings"
+msgstr "Einstellungen"
+
+#: ../src/preferences.c:675
+msgid "<b>Clipboards</b>"
+msgstr "<b>Zwischenablagen</b>"
+
+#: ../src/preferences.c:682
+msgid "Use _Copy (Ctrl-C)"
+msgstr "_Kopieren benutzen (Strg-C)"
+
+#: ../src/preferences.c:685
+msgid "Use _Primary (Selection)"
+msgstr "_Primäre Zwischenablage benutzen (Auswahl)"
+
+#: ../src/preferences.c:688
+msgid "S_ynchronize clipboards"
+msgstr "Zwischenablagen s_ynchronisieren"
+
+#: ../src/preferences.c:690
+msgid "_Automatically paste selected item"
+msgstr "Ausgewähltes Objekt _automatisch einfügen"
+
+#: ../src/preferences.c:699
+msgid "<b>Miscellaneous</b>"
+msgstr "<b>Sonstiges</b>"
+
+#: ../src/preferences.c:706
+msgid "Show _indexes in history menu"
+msgstr "_Indizes im Verlaufsmenü zeigen"
+
+#: ../src/preferences.c:708
+msgid "S_ave URIs"
+msgstr "URLs s_peichern"
+
+#: ../src/preferences.c:710
+msgid "Capture _hyperlinks only"
+msgstr "Nur _Hyperlinks aufzeichnen"
+
+#: ../src/preferences.c:712
+msgid "C_onfirm before clearing history"
+msgstr "Verlauf l_öschen bestätigen"
+
+#: ../src/preferences.c:714
+msgid "_Use right-click menu"
+msgstr "Rechts-Klick-Menü ben_utzen"
+
+#: ../src/preferences.c:723
+msgid "History"
+msgstr "Verlauf"
+
+#: ../src/preferences.c:731
+msgid "<b>History</b>"
+msgstr "<b>Verlauf</b>"
+
+#: ../src/preferences.c:738
+msgid "Save _history"
+msgstr "Verlauf speic_hern"
+
+#: ../src/preferences.c:739
+msgid "Save and restore history between sessions"
+msgstr "Verlauf zwischen Sitzungen speichern und wiederherstellen"
+
+#: ../src/preferences.c:743
+msgid "Items in history:"
+msgstr "Objekte im Verlauf:"
+
+#: ../src/preferences.c:752
+msgid "Items in menu:"
+msgstr "Objekte im Menü:"
+
+#: ../src/preferences.c:759
+msgid "Show _static items in menu"
+msgstr "_Statische Objekte im Menü anzeigen"
+
+#: ../src/preferences.c:764
+msgid "Static items in menu:"
+msgstr "Statische Objekte im Menü:"
+
+#: ../src/preferences.c:777
+msgid "<b>Items</b>"
+msgstr "<b>Objekte</b>"
+
+#: ../src/preferences.c:784
+msgid "Show in a single _line"
+msgstr "In einer _Zeile anzeigen"
+
+#: ../src/preferences.c:786
+msgid "Show in _reverse order"
+msgstr "In umgekehrter _Reihenfolge anzeigen"
+
+#: ../src/preferences.c:790
+msgid "Character length of items:"
+msgstr "Zeichenanzahl des Objekts:"
+
+#: ../src/preferences.c:799
+msgid "Omit items in the:"
+msgstr "Objekte auslassen in:"
+
+#: ../src/preferences.c:803
+msgid "Beginning"
+msgstr "Anfang"
+
+#: ../src/preferences.c:804
+msgid "Middle"
+msgstr "Mitte"
+
+#: ../src/preferences.c:805
+msgid "End"
+msgstr "Ende"
+
+#: ../src/preferences.c:835
+msgid "Actions"
+msgstr "Aktionen"
+
+#. Build the actions label
+#: ../src/preferences.c:840
+msgid "Control-click ClipIt's tray icon to use actions"
+msgstr ""
+"Strg+Klick auf ClipIts Benachrichtigungsfeld-Symbol, um Aktionen zu benutzen"
+
+#: ../src/preferences.c:860
+msgid "Action"
+msgstr "Aktion"
+
+#: ../src/preferences.c:867
+msgid "Command"
+msgstr "Befehl"
+
+#: ../src/preferences.c:882 ../src/preferences.c:943
+msgid "Add..."
+msgstr "Hinzufügen …"
+
+#: ../src/preferences.c:903
+msgid "Exclude"
+msgstr "Ausschließen"
+
+#. Build the exclude label
+#: ../src/preferences.c:908
+msgid ""
+"Regex list of items that should not be inserted into the history (passwords/"
+"sites that you don't need in history, etc)."
+msgstr ""
+"Regex-Liste von Objekten, die nicht in den Verlauf aufgenommen werden sollen "
+"(Passwörter/Sites, die nicht im Verlauf benötigt werden usw.)."
+
+#: ../src/preferences.c:928
+msgid "Regex"
+msgstr "Regex"
+
+#: ../src/preferences.c:956
+msgid "Hotkeys"
+msgstr "Tastenkürzel"
+
+#: ../src/preferences.c:964
+msgid "<b>Hotkeys</b>"
+msgstr "<b>Tastenkürzel</b>"
+
+#: ../src/preferences.c:974
+msgid "History hotkey:"
+msgstr "Verlaufs-Tastenkürzel:"
+
+#: ../src/preferences.c:983
+msgid "Actions hotkey:"
+msgstr "Aktionen-Tastenkürzel:"
+
+#: ../src/preferences.c:992
+msgid "Menu hotkey:"
+msgstr "Menü-Tastenkürzel:"
+
+#: ../src/preferences.c:1001
+msgid "Manage hotkey:"
+msgstr "Verwalten-Tastenkürzel:"
+
+#: ../src/preferences.c:1010
+msgid "Offline mode hotkey:"
+msgstr "Tastenkürzel für Offline-Modus:"
+
+#: ../src/utils.c:40 ../src/utils.c:47
+#, c-format
+msgid "Couldn't create directory: %s\n"
+msgstr "Ordner konnte nicht erstellt werden: %s\n"
+
+#: ../src/utils.c:148
+msgid "Run as daemon"
+msgstr "Als Dienst ausführen"
+
+#: ../src/utils.c:155
+msgid "Do not use status icon (Ctrl-Alt-P for menu)"
+msgstr "Kein Statussymbol benutzen ( Strg-Alt-P für Menü)"
+
+#: ../src/utils.c:162
+msgid "Print clipboard contents"
+msgstr "Zwischenablageninhalt drucken"
+
+#: ../src/utils.c:169
+msgid "Print primary contents"
+msgstr "Primären Inhalt drucken"
+
+#: ../src/utils.c:181
+msgid ""
+"Clipboard CLI usage examples:\n"
+"\n"
+" echo \"copied to clipboard\" | clipit\n"
+" clipit \"copied to clipboard\"\n"
+" echo \"copied to clipboard\" | clipit -c"
+msgstr ""
+"Beispiele Zwischenablage und CLI:\n"
+"\n"
+" echo \"In Zwischenablage kopiert\" | clipit\n"
+" clipit \"In Zwischenablage kopiert\"\n"
+" echo \"In Zwischenablage kopiert\" | clipit -c"
+
+#: ../src/utils.c:187
+msgid ""
+"Written by Cristian Henzel.\n"
+"Report bugs to <oss@rspwn.com>."
+msgstr ""
+"Geschrieben von Cristian Henzel.\n"
+"Fehler melden an: <oss@rspwn.com>."
diff --git a/po/es.po b/po/es.po
new file mode 100644
index 0000000..4857fda
--- /dev/null
+++ b/po/es.po
@@ -0,0 +1,344 @@
+# ClipIt translation file.
+# Copyright (C) 2010-2012 Cristian Henzel <oss@rspwn.com>
+# This file is distributed under the same license as the ClipIt package.
+#
+# Translators:
+# David Martínez <root@davidmartinez.net>, 2008.
+# Gilberto "Xyhthyx" Miralla <xyhthyx@gmail.com>, 2008.
+msgid ""
+msgstr ""
+"Project-Id-Version: ClipIt\n"
+"Report-Msgid-Bugs-To: Cristian Henzel <oss@rspwn.com>\n"
+"POT-Creation-Date: 2015-11-10 16:39+0200\n"
+"PO-Revision-Date: 2012-04-04 06:30+0000\n"
+"Last-Translator: Cristian Henzel <oss@rspwn.com>\n"
+"Language-Team: Cristian Henzel <oss@rspwn.com>\n"
+"Language: es\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1)\n"
+
+#: ../data/clipit-startup.desktop.in.h:1 ../data/clipit.desktop.in.h:1
+msgid "ClipIt"
+msgstr ""
+
+#: ../data/clipit-startup.desktop.in.h:2 ../data/clipit.desktop.in.h:2
+#: ../src/main.c:833
+msgid "Clipboard Manager"
+msgstr "Gestor de Portapapeles"
+
+#: ../src/main.c:287
+msgid "Lightweight GTK+ clipboard manager."
+msgstr "Gestor ligero de portapapeles en GTK+."
+
+#. Actions using:
+#: ../src/main.c:356
+msgid "Actions using:"
+msgstr ""
+
+#. Create menu item for empty clipboard contents
+#: ../src/main.c:365 ../src/main.c:382
+msgid "None"
+msgstr ""
+
+#: ../src/main.c:385
+msgid "<b>None</b>"
+msgstr "<b>Ninguno</b>"
+
+#. File contained no actions so adding empty
+#. File did not open so adding empty
+#. Nothing in history so adding empty
+#: ../src/main.c:407 ../src/main.c:436 ../src/main.c:600
+msgid "Empty"
+msgstr "Vacío"
+
+#. Edit actions
+#: ../src/main.c:443
+msgid "_Edit actions"
+msgstr "_Editar acciones"
+
+#. Offline mode checkbox
+#: ../src/main.c:686
+msgid "_Offline mode"
+msgstr ""
+
+#. Manage history
+#: ../src/main.c:695
+msgid "_Manage history"
+msgstr ""
+
+#. Create the dialog
+#: ../src/manage.c:138
+msgid "Editing Clipboard"
+msgstr "Editando Portapapeles"
+
+#: ../src/manage.c:158
+msgid "_Static item"
+msgstr ""
+
+#: ../src/manage.c:227
+msgid "Clear the history?"
+msgstr "¿Borrar el historial?"
+
+#: ../src/manage.c:228
+msgid "Clear history"
+msgstr ""
+
+#: ../src/manage.c:348
+msgid "Manage History"
+msgstr ""
+
+#: ../src/manage.c:351
+msgid " (Offline mode)"
+msgstr ""
+
+#: ../src/manage.c:393
+msgid "Results"
+msgstr ""
+
+#: ../src/manage.c:398
+msgid "Edit"
+msgstr ""
+
+#: ../src/manage.c:400 ../src/preferences.c:886 ../src/preferences.c:947
+msgid "Remove"
+msgstr "Eliminar"
+
+#: ../src/manage.c:402
+msgid "Remove all"
+msgstr ""
+
+#: ../src/manage.c:404
+msgid "Close"
+msgstr ""
+
+#: ../src/preferences.c:170
+msgid "Save history"
+msgstr ""
+
+#: ../src/preferences.c:203
+msgid "Remove history file"
+msgstr ""
+
+#. Create the dialog
+#: ../src/preferences.c:648
+msgid "Preferences"
+msgstr "Preferencias"
+
+#: ../src/preferences.c:667
+msgid "Settings"
+msgstr ""
+
+#: ../src/preferences.c:675
+msgid "<b>Clipboards</b>"
+msgstr "<b>Portapapeles</b>"
+
+#: ../src/preferences.c:682
+msgid "Use _Copy (Ctrl-C)"
+msgstr "Usar _Copias (Ctrl-C)"
+
+#: ../src/preferences.c:685
+msgid "Use _Primary (Selection)"
+msgstr "Usar _Primaria (Selección)"
+
+#: ../src/preferences.c:688
+msgid "S_ynchronize clipboards"
+msgstr "S_incronizar portapapeles"
+
+#: ../src/preferences.c:690
+msgid "_Automatically paste selected item"
+msgstr ""
+
+#: ../src/preferences.c:699
+msgid "<b>Miscellaneous</b>"
+msgstr "<b>Varios</b>"
+
+#: ../src/preferences.c:706
+msgid "Show _indexes in history menu"
+msgstr ""
+
+#: ../src/preferences.c:708
+msgid "S_ave URIs"
+msgstr ""
+
+#: ../src/preferences.c:710
+msgid "Capture _hyperlinks only"
+msgstr "Capturar _hipervínculos solamente"
+
+#: ../src/preferences.c:712
+msgid "C_onfirm before clearing history"
+msgstr "C_onfirmar antes de borrar historial"
+
+#: ../src/preferences.c:714
+msgid "_Use right-click menu"
+msgstr ""
+
+#: ../src/preferences.c:723
+msgid "History"
+msgstr ""
+
+#: ../src/preferences.c:731
+msgid "<b>History</b>"
+msgstr "<b>Historial</b>"
+
+#: ../src/preferences.c:738
+msgid "Save _history"
+msgstr ""
+
+#: ../src/preferences.c:739
+msgid "Save and restore history between sessions"
+msgstr "Mantener y restaurar historial entre sesiones"
+
+#: ../src/preferences.c:743
+msgid "Items in history:"
+msgstr "Artículos en el historial:"
+
+#: ../src/preferences.c:752
+msgid "Items in menu:"
+msgstr ""
+
+#: ../src/preferences.c:759
+msgid "Show _static items in menu"
+msgstr ""
+
+#: ../src/preferences.c:764
+msgid "Static items in menu:"
+msgstr ""
+
+#: ../src/preferences.c:777
+msgid "<b>Items</b>"
+msgstr "<b>Articulos</b>"
+
+#: ../src/preferences.c:784
+msgid "Show in a single _line"
+msgstr ""
+
+#: ../src/preferences.c:786
+msgid "Show in _reverse order"
+msgstr "Mostrar artículos del historial en orden _invertido"
+
+#: ../src/preferences.c:790
+msgid "Character length of items:"
+msgstr "Longitud de artículos en caracteres:"
+
+#: ../src/preferences.c:799
+msgid "Omit items in the:"
+msgstr "Omitir en el:"
+
+#: ../src/preferences.c:803
+msgid "Beginning"
+msgstr "Principio"
+
+#: ../src/preferences.c:804
+msgid "Middle"
+msgstr "Medio"
+
+#: ../src/preferences.c:805
+msgid "End"
+msgstr "Final"
+
+#: ../src/preferences.c:835
+msgid "Actions"
+msgstr "Acciones"
+
+#. Build the actions label
+#: ../src/preferences.c:840
+msgid "Control-click ClipIt's tray icon to use actions"
+msgstr "Control-clic en el icono de ClipIt para usar acciones"
+
+#: ../src/preferences.c:860
+msgid "Action"
+msgstr "Acción"
+
+#: ../src/preferences.c:867
+msgid "Command"
+msgstr "Comando"
+
+#: ../src/preferences.c:882 ../src/preferences.c:943
+msgid "Add..."
+msgstr "Añadir..."
+
+#: ../src/preferences.c:903
+msgid "Exclude"
+msgstr ""
+
+#. Build the exclude label
+#: ../src/preferences.c:908
+msgid ""
+"Regex list of items that should not be inserted into the history (passwords/"
+"sites that you don't need in history, etc)."
+msgstr ""
+
+#: ../src/preferences.c:928
+msgid "Regex"
+msgstr ""
+
+#: ../src/preferences.c:956
+msgid "Hotkeys"
+msgstr "Atajos"
+
+#: ../src/preferences.c:964
+msgid "<b>Hotkeys</b>"
+msgstr "<b>Atajos</b>"
+
+#: ../src/preferences.c:974
+msgid "History hotkey:"
+msgstr ""
+
+#: ../src/preferences.c:983
+msgid "Actions hotkey:"
+msgstr ""
+
+#: ../src/preferences.c:992
+msgid "Menu hotkey:"
+msgstr ""
+
+#: ../src/preferences.c:1001
+msgid "Manage hotkey:"
+msgstr ""
+
+#: ../src/preferences.c:1010
+msgid "Offline mode hotkey:"
+msgstr ""
+
+#: ../src/utils.c:40 ../src/utils.c:47
+#, c-format
+msgid "Couldn't create directory: %s\n"
+msgstr "No se puede crear el directorio: %s\n"
+
+#: ../src/utils.c:148
+msgid "Run as daemon"
+msgstr "Ejecutar como demonio"
+
+#: ../src/utils.c:155
+msgid "Do not use status icon (Ctrl-Alt-P for menu)"
+msgstr "No usar icono de estado (Ctrl-Alt-P para el menú)"
+
+#: ../src/utils.c:162
+msgid "Print clipboard contents"
+msgstr "Imprimir contenido del portapapeles"
+
+#: ../src/utils.c:169
+msgid "Print primary contents"
+msgstr "Imprimir contenido de la selección"
+
+#: ../src/utils.c:181
+msgid ""
+"Clipboard CLI usage examples:\n"
+"\n"
+" echo \"copied to clipboard\" | clipit\n"
+" clipit \"copied to clipboard\"\n"
+" echo \"copied to clipboard\" | clipit -c"
+msgstr ""
+"Ejemplos del portapapeles por el terminal:\n"
+"\n"
+" echo \"copiado a portapapeles\" | clipit\n"
+" clipit \"copiado a portapapeles\"\n"
+" echo \"copiado a portapapeles\" | clipit -o"
+
+#: ../src/utils.c:187
+msgid ""
+"Written by Cristian Henzel.\n"
+"Report bugs to <oss@rspwn.com>."
+msgstr ""
diff --git a/po/es_ES.po b/po/es_ES.po
new file mode 100644
index 0000000..5eafdb4
--- /dev/null
+++ b/po/es_ES.po
@@ -0,0 +1,350 @@
+# ClipIt translation file.
+# Copyright (C) 2010-2012 Cristian Henzel <oss@rspwn.com>
+# This file is distributed under the same license as the ClipIt package.
+#
+# Translators:
+# Adolfo Jayme Barrientos <fitoschido@gmail.com>, 2011.
+# Cristian Henzel <oss@rspwn.com>, 2011.
+msgid ""
+msgstr ""
+"Project-Id-Version: ClipIt\n"
+"Report-Msgid-Bugs-To: Cristian Henzel <oss@rspwn.com>\n"
+"POT-Creation-Date: 2015-11-10 16:39+0200\n"
+"PO-Revision-Date: 2012-04-04 06:30+0000\n"
+"Last-Translator: Cristian Henzel <oss@rspwn.com>\n"
+"Language-Team: Spanish (Spain) (http://www.transifex.net/projects/p/clipit/"
+"language/es_ES/)\n"
+"Language: es_ES\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1)\n"
+
+#: ../data/clipit-startup.desktop.in.h:1 ../data/clipit.desktop.in.h:1
+msgid "ClipIt"
+msgstr ""
+
+#: ../data/clipit-startup.desktop.in.h:2 ../data/clipit.desktop.in.h:2
+#: ../src/main.c:833
+msgid "Clipboard Manager"
+msgstr "Gestor del portapapeles"
+
+#: ../src/main.c:287
+msgid "Lightweight GTK+ clipboard manager."
+msgstr "Gestor de portapapeles ligero, en GTK+."
+
+#. Actions using:
+#: ../src/main.c:356
+msgid "Actions using:"
+msgstr "Acciones con:"
+
+#. Create menu item for empty clipboard contents
+#: ../src/main.c:365 ../src/main.c:382
+msgid "None"
+msgstr "Ninguno"
+
+#: ../src/main.c:385
+msgid "<b>None</b>"
+msgstr "<b>Ninguno</b>"
+
+#. File contained no actions so adding empty
+#. File did not open so adding empty
+#. Nothing in history so adding empty
+#: ../src/main.c:407 ../src/main.c:436 ../src/main.c:600
+msgid "Empty"
+msgstr "Vacío"
+
+#. Edit actions
+#: ../src/main.c:443
+msgid "_Edit actions"
+msgstr "_Editar acciones"
+
+#. Offline mode checkbox
+#: ../src/main.c:686
+msgid "_Offline mode"
+msgstr ""
+
+#. Manage history
+#: ../src/main.c:695
+msgid "_Manage history"
+msgstr "_Gestionar historial"
+
+#. Create the dialog
+#: ../src/manage.c:138
+msgid "Editing Clipboard"
+msgstr "Editando el portapapeles"
+
+#: ../src/manage.c:158
+msgid "_Static item"
+msgstr "Elemento e_stático"
+
+#: ../src/manage.c:227
+msgid "Clear the history?"
+msgstr "¿Vaciar el historial?"
+
+#: ../src/manage.c:228
+msgid "Clear history"
+msgstr "Vaciar el historial"
+
+#: ../src/manage.c:348
+msgid "Manage History"
+msgstr "Gestionar el historial"
+
+#: ../src/manage.c:351
+msgid " (Offline mode)"
+msgstr ""
+
+#: ../src/manage.c:393
+msgid "Results"
+msgstr "Resultados"
+
+#: ../src/manage.c:398
+msgid "Edit"
+msgstr "Editar"
+
+#: ../src/manage.c:400 ../src/preferences.c:886 ../src/preferences.c:947
+msgid "Remove"
+msgstr "Quitar"
+
+#: ../src/manage.c:402
+msgid "Remove all"
+msgstr "Quitar todo"
+
+#: ../src/manage.c:404
+msgid "Close"
+msgstr "Cerrar"
+
+#: ../src/preferences.c:170
+msgid "Save history"
+msgstr "Guardar el historial"
+
+#: ../src/preferences.c:203
+msgid "Remove history file"
+msgstr "Eliminar archivo de historial"
+
+#. Create the dialog
+#: ../src/preferences.c:648
+msgid "Preferences"
+msgstr "Preferencias"
+
+#: ../src/preferences.c:667
+msgid "Settings"
+msgstr "Configuración"
+
+#: ../src/preferences.c:675
+msgid "<b>Clipboards</b>"
+msgstr "<b>Portapapeles</b>"
+
+#: ../src/preferences.c:682
+msgid "Use _Copy (Ctrl-C)"
+msgstr "Usar _copiar (Ctrl+C)"
+
+#: ../src/preferences.c:685
+msgid "Use _Primary (Selection)"
+msgstr "Usar _primario (selección)"
+
+#: ../src/preferences.c:688
+msgid "S_ynchronize clipboards"
+msgstr "Sincroni_zar portapapeles"
+
+#: ../src/preferences.c:690
+msgid "_Automatically paste selected item"
+msgstr "Pegar _automáticamente el elemento seleccionado"
+
+#: ../src/preferences.c:699
+msgid "<b>Miscellaneous</b>"
+msgstr "<b>Miscelánea</b>"
+
+#: ../src/preferences.c:706
+msgid "Show _indexes in history menu"
+msgstr "Mostrar índ_ices en el menú de historial"
+
+#: ../src/preferences.c:708
+msgid "S_ave URIs"
+msgstr "_Guardar URIs"
+
+#: ../src/preferences.c:710
+msgid "Capture _hyperlinks only"
+msgstr "Solo capturar _hiperenlaces"
+
+#: ../src/preferences.c:712
+msgid "C_onfirm before clearing history"
+msgstr "C_onfirmar antes de vaciar el historial"
+
+#: ../src/preferences.c:714
+msgid "_Use right-click menu"
+msgstr "_Usar menú contextual"
+
+#: ../src/preferences.c:723
+msgid "History"
+msgstr "Historial"
+
+#: ../src/preferences.c:731
+msgid "<b>History</b>"
+msgstr "<b>Historial</b>"
+
+#: ../src/preferences.c:738
+msgid "Save _history"
+msgstr "Guardar _historial"
+
+#: ../src/preferences.c:739
+msgid "Save and restore history between sessions"
+msgstr "Guardar y restaurar historial entre sesiones"
+
+#: ../src/preferences.c:743
+msgid "Items in history:"
+msgstr "Elementos en el historial:"
+
+#: ../src/preferences.c:752
+msgid "Items in menu:"
+msgstr "Elementos en el menú:"
+
+#: ../src/preferences.c:759
+msgid "Show _static items in menu"
+msgstr "Mostrar elementos e_státicos en el menú"
+
+#: ../src/preferences.c:764
+msgid "Static items in menu:"
+msgstr "Elementos estáticos en el menú:"
+
+#: ../src/preferences.c:777
+msgid "<b>Items</b>"
+msgstr "<b>Elementos</b>"
+
+#: ../src/preferences.c:784
+msgid "Show in a single _line"
+msgstr "Mostrar en una sola _línea"
+
+#: ../src/preferences.c:786
+msgid "Show in _reverse order"
+msgstr "Mostrar en orden inve_rso"
+
+#: ../src/preferences.c:790
+msgid "Character length of items:"
+msgstr "Cantidad de caracteres de los elementos:"
+
+#: ../src/preferences.c:799
+msgid "Omit items in the:"
+msgstr "Omitir los elementos al:"
+
+#: ../src/preferences.c:803
+msgid "Beginning"
+msgstr "Comienzo"
+
+#: ../src/preferences.c:804
+msgid "Middle"
+msgstr "Medio"
+
+#: ../src/preferences.c:805
+msgid "End"
+msgstr "Final"
+
+#: ../src/preferences.c:835
+msgid "Actions"
+msgstr "Acciones"
+
+#. Build the actions label
+#: ../src/preferences.c:840
+msgid "Control-click ClipIt's tray icon to use actions"
+msgstr ""
+"Usar acciones con Ctrl+pulsar sobre el icono de ClipIt en área de notif."
+
+#: ../src/preferences.c:860
+msgid "Action"
+msgstr "Acción"
+
+#: ../src/preferences.c:867
+msgid "Command"
+msgstr "Orden"
+
+#: ../src/preferences.c:882 ../src/preferences.c:943
+msgid "Add..."
+msgstr "Añadir..."
+
+#: ../src/preferences.c:903
+msgid "Exclude"
+msgstr "Excluir"
+
+#. Build the exclude label
+#: ../src/preferences.c:908
+msgid ""
+"Regex list of items that should not be inserted into the history (passwords/"
+"sites that you don't need in history, etc)."
+msgstr ""
+"Lista de expresiones regulares que no deberían insertarse en el historial "
+"(contraseñas/sitios que no necesita en el historial, etc.)"
+
+#: ../src/preferences.c:928
+msgid "Regex"
+msgstr "Expresiones regulares"
+
+#: ../src/preferences.c:956
+msgid "Hotkeys"
+msgstr "Atajos de teclado"
+
+#: ../src/preferences.c:964
+msgid "<b>Hotkeys</b>"
+msgstr "<b>Atajos de teclado</b>"
+
+#: ../src/preferences.c:974
+msgid "History hotkey:"
+msgstr "Atajo al historial:"
+
+#: ../src/preferences.c:983
+msgid "Actions hotkey:"
+msgstr "Atajo a acciones:"
+
+#: ../src/preferences.c:992
+msgid "Menu hotkey:"
+msgstr "Atajo al menú:"
+
+#: ../src/preferences.c:1001
+msgid "Manage hotkey:"
+msgstr "Atajo a gestión:"
+
+#: ../src/preferences.c:1010
+msgid "Offline mode hotkey:"
+msgstr ""
+
+#: ../src/utils.c:40 ../src/utils.c:47
+#, c-format
+msgid "Couldn't create directory: %s\n"
+msgstr "No se pudo crear directorio: %s\n"
+
+#: ../src/utils.c:148
+msgid "Run as daemon"
+msgstr "Ejecutar como demonio"
+
+#: ../src/utils.c:155
+msgid "Do not use status icon (Ctrl-Alt-P for menu)"
+msgstr "No usar icono de estado (Ctrl+Alt+P para el menú)"
+
+#: ../src/utils.c:162
+msgid "Print clipboard contents"
+msgstr "Imprimir el contenido del portapapeles"
+
+#: ../src/utils.c:169
+msgid "Print primary contents"
+msgstr "Imprimir el contenido primario"
+
+#: ../src/utils.c:181
+msgid ""
+"Clipboard CLI usage examples:\n"
+"\n"
+" echo \"copied to clipboard\" | clipit\n"
+" clipit \"copied to clipboard\"\n"
+" echo \"copied to clipboard\" | clipit -c"
+msgstr ""
+"Ejemplos de uso de la línea de órdenes del portapapeles:\n"
+"\n"
+" echo \"copiado al portapapeles\" | clipit\n"
+" clipit \"copiado al portapapeles\"\n"
+" echo \"copiado al portapapeles\" | clipit -c"
+
+#: ../src/utils.c:187
+msgid ""
+"Written by Cristian Henzel.\n"
+"Report bugs to <oss@rspwn.com>."
+msgstr ""
+"Escrito por Cristian Henzel.\n"
+"Informe de errores a <oss@rspwn.com>."
diff --git a/po/et.po b/po/et.po
new file mode 100644
index 0000000..d8ece53
--- /dev/null
+++ b/po/et.po
@@ -0,0 +1,349 @@
+# ClipIt translation file.
+# Copyright (C) 2010-2012 Cristian Henzel <oss@rspwn.com>
+# This file is distributed under the same license as the ClipIt package.
+#
+# Translators:
+# <boamaod@gmail.com>, 2011.
+# Guido Tabbernuk <boamaod@gmail.com>, 2011.
+msgid ""
+msgstr ""
+"Project-Id-Version: ClipIt\n"
+"Report-Msgid-Bugs-To: Cristian Henzel <oss@rspwn.com>\n"
+"POT-Creation-Date: 2015-11-10 16:39+0200\n"
+"PO-Revision-Date: 2012-04-04 06:30+0000\n"
+"Last-Translator: Cristian Henzel <oss@rspwn.com>\n"
+"Language-Team: Estonian (Estonia) (http://www.transifex.net/projects/p/"
+"clipit/language/et_EE/)\n"
+"Language: et_EE\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1)\n"
+
+#: ../data/clipit-startup.desktop.in.h:1 ../data/clipit.desktop.in.h:1
+msgid "ClipIt"
+msgstr ""
+
+#: ../data/clipit-startup.desktop.in.h:2 ../data/clipit.desktop.in.h:2
+#: ../src/main.c:833
+msgid "Clipboard Manager"
+msgstr "Lõikepuhvrihaldur"
+
+#: ../src/main.c:287
+msgid "Lightweight GTK+ clipboard manager."
+msgstr "Kergekaaluline GTK+ lõikepuhvrihaldur"
+
+#. Actions using:
+#: ../src/main.c:356
+msgid "Actions using:"
+msgstr "Kasutades väljalõiget:"
+
+#. Create menu item for empty clipboard contents
+#: ../src/main.c:365 ../src/main.c:382
+msgid "None"
+msgstr "Puudub"
+
+#: ../src/main.c:385
+msgid "<b>None</b>"
+msgstr "<b>Puudub</b>"
+
+#. File contained no actions so adding empty
+#. File did not open so adding empty
+#. Nothing in history so adding empty
+#: ../src/main.c:407 ../src/main.c:436 ../src/main.c:600
+msgid "Empty"
+msgstr "Tühi"
+
+#. Edit actions
+#: ../src/main.c:443
+msgid "_Edit actions"
+msgstr "_Toimeta käsklusi"
+
+#. Offline mode checkbox
+#: ../src/main.c:686
+msgid "_Offline mode"
+msgstr ""
+
+#. Manage history
+#: ../src/main.c:695
+msgid "_Manage history"
+msgstr "_Toimeta ajalugu"
+
+#. Create the dialog
+#: ../src/manage.c:138
+msgid "Editing Clipboard"
+msgstr "Lõikepuhvri toimetamine"
+
+#: ../src/manage.c:158
+msgid "_Static item"
+msgstr "_Staatiline kirje"
+
+#: ../src/manage.c:227
+msgid "Clear the history?"
+msgstr "Kas tühjendada ajalugu?"
+
+#: ../src/manage.c:228
+msgid "Clear history"
+msgstr "Ajaloo tühjendamine"
+
+#: ../src/manage.c:348
+msgid "Manage History"
+msgstr "Ajaloo toimetamine"
+
+#: ../src/manage.c:351
+msgid " (Offline mode)"
+msgstr ""
+
+#: ../src/manage.c:393
+msgid "Results"
+msgstr "Tulemused"
+
+#: ../src/manage.c:398
+msgid "Edit"
+msgstr "Toimeta"
+
+#: ../src/manage.c:400 ../src/preferences.c:886 ../src/preferences.c:947
+msgid "Remove"
+msgstr "Eemalda"
+
+#: ../src/manage.c:402
+msgid "Remove all"
+msgstr "Eemalda kõik"
+
+#: ../src/manage.c:404
+msgid "Close"
+msgstr "Sulge"
+
+#: ../src/preferences.c:170
+msgid "Save history"
+msgstr "Ajaloo salvestamine"
+
+#: ../src/preferences.c:203
+msgid "Remove history file"
+msgstr "Ajaloofaili eemaldamine"
+
+#. Create the dialog
+#: ../src/preferences.c:648
+msgid "Preferences"
+msgstr "Eelistused"
+
+#: ../src/preferences.c:667
+msgid "Settings"
+msgstr "Seaded"
+
+#: ../src/preferences.c:675
+msgid "<b>Clipboards</b>"
+msgstr "<b>Lõikepuhvrid</b>"
+
+#: ../src/preferences.c:682
+msgid "Use _Copy (Ctrl-C)"
+msgstr "_Kopeerimispuhvri (Ctrl-C) kasutamine"
+
+#: ../src/preferences.c:685
+msgid "Use _Primary (Selection)"
+msgstr "_Primaarpuhvri (valik) kasutamine"
+
+#: ../src/preferences.c:688
+msgid "S_ynchronize clipboards"
+msgstr "_Lõikepuhvrite sünkimine"
+
+#: ../src/preferences.c:690
+msgid "_Automatically paste selected item"
+msgstr "Valitud kirje _automaatne asetamine"
+
+#: ../src/preferences.c:699
+msgid "<b>Miscellaneous</b>"
+msgstr "<b>Mitmesugust</b>"
+
+#: ../src/preferences.c:706
+msgid "Show _indexes in history menu"
+msgstr "_Järjekorranumbrite näitamine ajaloomenüüs"
+
+#: ../src/preferences.c:708
+msgid "S_ave URIs"
+msgstr "URI'de _salvestamine"
+
+#: ../src/preferences.c:710
+msgid "Capture _hyperlinks only"
+msgstr "Ainult _hüperlinkide salvestamine"
+
+#: ../src/preferences.c:712
+msgid "C_onfirm before clearing history"
+msgstr "Nõusoleku küsimine enne ajaloo _tühjendamist"
+
+#: ../src/preferences.c:714
+msgid "_Use right-click menu"
+msgstr "Hiire _paremklõpsu menüü kasutamine"
+
+#: ../src/preferences.c:723
+msgid "History"
+msgstr "Ajalugu"
+
+#: ../src/preferences.c:731
+msgid "<b>History</b>"
+msgstr "<b>Ajalugu</b>"
+
+#: ../src/preferences.c:738
+msgid "Save _history"
+msgstr "Ajaloo _salvestamine"
+
+#: ../src/preferences.c:739
+msgid "Save and restore history between sessions"
+msgstr "Salvestab ajaloo ja taastab selle uues sessioonis"
+
+#: ../src/preferences.c:743
+msgid "Items in history:"
+msgstr "Kirjeid ajaloos:"
+
+#: ../src/preferences.c:752
+msgid "Items in menu:"
+msgstr "Kirjeid menüüs:"
+
+#: ../src/preferences.c:759
+msgid "Show _static items in menu"
+msgstr "_Püsikirjete näitamine menüüs"
+
+#: ../src/preferences.c:764
+msgid "Static items in menu:"
+msgstr "Püsikirjeid menüüs:"
+
+#: ../src/preferences.c:777
+msgid "<b>Items</b>"
+msgstr "<b>Väljalõiked</b>"
+
+#: ../src/preferences.c:784
+msgid "Show in a single _line"
+msgstr "Näitamine ühel _real"
+
+#: ../src/preferences.c:786
+msgid "Show in _reverse order"
+msgstr "_Tagurpidijärjestus"
+
+#: ../src/preferences.c:790
+msgid "Character length of items:"
+msgstr "Kirje pikkus tärkides:"
+
+#: ../src/preferences.c:799
+msgid "Omit items in the:"
+msgstr "Väljalõiked kärbitakse:"
+
+#: ../src/preferences.c:803
+msgid "Beginning"
+msgstr "Algusest"
+
+#: ../src/preferences.c:804
+msgid "Middle"
+msgstr "Keskelt"
+
+#: ../src/preferences.c:805
+msgid "End"
+msgstr "Lõpust"
+
+#: ../src/preferences.c:835
+msgid "Actions"
+msgstr "Käsklused"
+
+#. Build the actions label
+#: ../src/preferences.c:840
+msgid "Control-click ClipIt's tray icon to use actions"
+msgstr "Käskluste kasutamiseks Ctrl-klõpsa ClipIt'i seisundiikoonil"
+
+#: ../src/preferences.c:860
+msgid "Action"
+msgstr "Nimi"
+
+#: ../src/preferences.c:867
+msgid "Command"
+msgstr "Käsk"
+
+#: ../src/preferences.c:882 ../src/preferences.c:943
+msgid "Add..."
+msgstr "Lisa..."
+
+#: ../src/preferences.c:903
+msgid "Exclude"
+msgstr "Välistamine"
+
+#. Build the exclude label
+#: ../src/preferences.c:908
+msgid ""
+"Regex list of items that should not be inserted into the history (passwords/"
+"sites that you don't need in history, etc)."
+msgstr ""
+"Regulaaravaldiste nimekiri, mille alusel välistada kirjeid ajaloost (nt "
+"paroolid/saidid, mida ajaloos ei tohiks olla jne)."
+
+#: ../src/preferences.c:928
+msgid "Regex"
+msgstr "Avaldis"
+
+#: ../src/preferences.c:956
+msgid "Hotkeys"
+msgstr "Välksõrmised"
+
+#: ../src/preferences.c:964
+msgid "<b>Hotkeys</b>"
+msgstr "<b>Välksõrmised</b>"
+
+#: ../src/preferences.c:974
+msgid "History hotkey:"
+msgstr "Ajaloo sõrmis:"
+
+#: ../src/preferences.c:983
+msgid "Actions hotkey:"
+msgstr "Käskluste sõrmis:"
+
+#: ../src/preferences.c:992
+msgid "Menu hotkey:"
+msgstr "Menüü sõrmis:"
+
+#: ../src/preferences.c:1001
+msgid "Manage hotkey:"
+msgstr "Toimetamise sõrmis:"
+
+#: ../src/preferences.c:1010
+msgid "Offline mode hotkey:"
+msgstr ""
+
+#: ../src/utils.c:40 ../src/utils.c:47
+#, c-format
+msgid "Couldn't create directory: %s\n"
+msgstr "Kataloogi loomine ebaõnnestus: %s\n"
+
+#: ../src/utils.c:148
+msgid "Run as daemon"
+msgstr "Käivita ainult deemon"
+
+#: ../src/utils.c:155
+msgid "Do not use status icon (Ctrl-Alt-P for menu)"
+msgstr "Ära kasuta näidikuriba ikooni (Ctrl-Alt-P avab menüü)"
+
+#: ../src/utils.c:162
+msgid "Print clipboard contents"
+msgstr "Väljasta lõikepuhvri sisu"
+
+#: ../src/utils.c:169
+msgid "Print primary contents"
+msgstr "Väljasta primaarpuhvri sisu"
+
+#: ../src/utils.c:181
+msgid ""
+"Clipboard CLI usage examples:\n"
+"\n"
+" echo \"copied to clipboard\" | clipit\n"
+" clipit \"copied to clipboard\"\n"
+" echo \"copied to clipboard\" | clipit -c"
+msgstr ""
+"Lõikepuhvri CLI kasutusnäited:\n"
+"\n"
+" echo \"copied to clipboard\" | clipit\n"
+" clipit \"copied to clipboard\"\n"
+" echo \"copied to clipboard\" | clipit -c"
+
+#: ../src/utils.c:187
+msgid ""
+"Written by Cristian Henzel.\n"
+"Report bugs to <oss@rspwn.com>."
+msgstr ""
+"Koodinud Cristian Henzel.\n"
+"Vearaportid aadressile <oss@rspwn.com>."
diff --git a/po/fi.po b/po/fi.po
new file mode 100644
index 0000000..1f21c1a
--- /dev/null
+++ b/po/fi.po
@@ -0,0 +1,346 @@
+# ClipIt translation file.
+# Copyright (C) 2010-2012 Cristian Henzel <oss@rspwn.com>
+# This file is distributed under the same license as the ClipIt package.
+#
+# Translators:
+# Jiri Grönroos <jiri.gronroos@iki.fi>, 2012.
+msgid ""
+msgstr ""
+"Project-Id-Version: ClipIt\n"
+"Report-Msgid-Bugs-To: Cristian Henzel <oss@rspwn.com>\n"
+"POT-Creation-Date: 2015-11-10 16:39+0200\n"
+"PO-Revision-Date: 2012-04-04 06:30+0000\n"
+"Last-Translator: Cristian Henzel <oss@rspwn.com>\n"
+"Language-Team: Finnish (http://www.transifex.net/projects/p/clipit/language/"
+"fi/)\n"
+"Language: fi\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1)\n"
+
+#: ../data/clipit-startup.desktop.in.h:1 ../data/clipit.desktop.in.h:1
+msgid "ClipIt"
+msgstr ""
+
+#: ../data/clipit-startup.desktop.in.h:2 ../data/clipit.desktop.in.h:2
+#: ../src/main.c:833
+msgid "Clipboard Manager"
+msgstr "Leikepöydän hallinta"
+
+#: ../src/main.c:287
+msgid "Lightweight GTK+ clipboard manager."
+msgstr "Kevyt GTK+-pohjainen leikepöydän hallinta"
+
+#. Actions using:
+#: ../src/main.c:356
+msgid "Actions using:"
+msgstr ""
+
+#. Create menu item for empty clipboard contents
+#: ../src/main.c:365 ../src/main.c:382
+msgid "None"
+msgstr "Ei mitään"
+
+#: ../src/main.c:385
+msgid "<b>None</b>"
+msgstr "<b>Ei mitään</b>"
+
+#. File contained no actions so adding empty
+#. File did not open so adding empty
+#. Nothing in history so adding empty
+#: ../src/main.c:407 ../src/main.c:436 ../src/main.c:600
+msgid "Empty"
+msgstr "Tyhjä"
+
+#. Edit actions
+#: ../src/main.c:443
+msgid "_Edit actions"
+msgstr "_Muokkaa toimintoja"
+
+#. Offline mode checkbox
+#: ../src/main.c:686
+msgid "_Offline mode"
+msgstr ""
+
+#. Manage history
+#: ../src/main.c:695
+msgid "_Manage history"
+msgstr "_Hallitse historiaa"
+
+#. Create the dialog
+#: ../src/manage.c:138
+msgid "Editing Clipboard"
+msgstr "Leikepöydän muokkaus"
+
+#: ../src/manage.c:158
+msgid "_Static item"
+msgstr "K_iinteä kohde"
+
+#: ../src/manage.c:227
+msgid "Clear the history?"
+msgstr "Tyhjennetäänkö historia?"
+
+#: ../src/manage.c:228
+msgid "Clear history"
+msgstr "Tyhjennä historia"
+
+#: ../src/manage.c:348
+msgid "Manage History"
+msgstr "Hallitse historiaa"
+
+#: ../src/manage.c:351
+msgid " (Offline mode)"
+msgstr ""
+
+#: ../src/manage.c:393
+msgid "Results"
+msgstr "Tulokset"
+
+#: ../src/manage.c:398
+msgid "Edit"
+msgstr "Muokkaa"
+
+#: ../src/manage.c:400 ../src/preferences.c:886 ../src/preferences.c:947
+msgid "Remove"
+msgstr "Poista"
+
+#: ../src/manage.c:402
+msgid "Remove all"
+msgstr "Poista kaikki"
+
+#: ../src/manage.c:404
+msgid "Close"
+msgstr "Sulje"
+
+#: ../src/preferences.c:170
+msgid "Save history"
+msgstr "Tallenna historia"
+
+#: ../src/preferences.c:203
+msgid "Remove history file"
+msgstr "Poista historiatiedosto"
+
+#. Create the dialog
+#: ../src/preferences.c:648
+msgid "Preferences"
+msgstr "Asetukset"
+
+#: ../src/preferences.c:667
+msgid "Settings"
+msgstr "Asetukset"
+
+#: ../src/preferences.c:675
+msgid "<b>Clipboards</b>"
+msgstr "<b>Leikepöydät</b>"
+
+#: ../src/preferences.c:682
+msgid "Use _Copy (Ctrl-C)"
+msgstr "Käytä _kopiointia (Ctrl+C)"
+
+#: ../src/preferences.c:685
+msgid "Use _Primary (Selection)"
+msgstr "Käytä _ensisijaista valintaa (hiirellä maalaus)"
+
+#: ../src/preferences.c:688
+msgid "S_ynchronize clipboards"
+msgstr "S_ynkronoi leikepöydät"
+
+#: ../src/preferences.c:690
+msgid "_Automatically paste selected item"
+msgstr "Liitä _automaattisesti valittu kohde"
+
+#: ../src/preferences.c:699
+msgid "<b>Miscellaneous</b>"
+msgstr "<b>Sekalaiset</b>"
+
+#: ../src/preferences.c:706
+msgid "Show _indexes in history menu"
+msgstr "Näytä _järjestysnumerot historiavalikossa"
+
+#: ../src/preferences.c:708
+msgid "S_ave URIs"
+msgstr "T_allenna linkit"
+
+#: ../src/preferences.c:710
+msgid "Capture _hyperlinks only"
+msgstr "_Kopioi pelkät hyperlinkit"
+
+#: ../src/preferences.c:712
+msgid "C_onfirm before clearing history"
+msgstr "Ky_sy vahvistus ennen historian tyhjennystä"
+
+#: ../src/preferences.c:714
+msgid "_Use right-click menu"
+msgstr "Käy_tä oikean painikkeen valikkoa"
+
+#: ../src/preferences.c:723
+msgid "History"
+msgstr "Historia"
+
+#: ../src/preferences.c:731
+msgid "<b>History</b>"
+msgstr "<b>Historia</b>"
+
+#: ../src/preferences.c:738
+msgid "Save _history"
+msgstr "Tallenna _historia"
+
+#: ../src/preferences.c:739
+msgid "Save and restore history between sessions"
+msgstr "Tallenna ja palauta historia istuntojen välillä"
+
+#: ../src/preferences.c:743
+msgid "Items in history:"
+msgstr "Kohteita historiassa:"
+
+#: ../src/preferences.c:752
+msgid "Items in menu:"
+msgstr "Kohteita valikossa:"
+
+#: ../src/preferences.c:759
+msgid "Show _static items in menu"
+msgstr "Näy_tä kiinteät kohteet valikossa"
+
+#: ../src/preferences.c:764
+msgid "Static items in menu:"
+msgstr "Kiinteät kohteet valikossa:"
+
+#: ../src/preferences.c:777
+msgid "<b>Items</b>"
+msgstr "<b>Kohteet</b>"
+
+#: ../src/preferences.c:784
+msgid "Show in a single _line"
+msgstr "Näytä _yhdellä rivillä"
+
+#: ../src/preferences.c:786
+msgid "Show in _reverse order"
+msgstr "N_äytä käänteisessä järjestyksessä"
+
+#: ../src/preferences.c:790
+msgid "Character length of items:"
+msgstr "Kohteiden enimmäismerkkimäärä:"
+
+#: ../src/preferences.c:799
+msgid "Omit items in the:"
+msgstr ""
+
+#: ../src/preferences.c:803
+msgid "Beginning"
+msgstr ""
+
+#: ../src/preferences.c:804
+msgid "Middle"
+msgstr ""
+
+#: ../src/preferences.c:805
+msgid "End"
+msgstr ""
+
+#: ../src/preferences.c:835
+msgid "Actions"
+msgstr "Toiminnot"
+
+#. Build the actions label
+#: ../src/preferences.c:840
+msgid "Control-click ClipIt's tray icon to use actions"
+msgstr "Napsauta Ctrl pohjassa ClipIt-kuvaketta käyttääksesi toimintoja"
+
+#: ../src/preferences.c:860
+msgid "Action"
+msgstr "Toiminto"
+
+#: ../src/preferences.c:867
+msgid "Command"
+msgstr "Komento"
+
+#: ../src/preferences.c:882 ../src/preferences.c:943
+msgid "Add..."
+msgstr "Lisää..."
+
+#: ../src/preferences.c:903
+msgid "Exclude"
+msgstr "Ohitettavat"
+
+#. Build the exclude label
+#: ../src/preferences.c:908
+msgid ""
+"Regex list of items that should not be inserted into the history (passwords/"
+"sites that you don't need in history, etc)."
+msgstr ""
+
+#: ../src/preferences.c:928
+msgid "Regex"
+msgstr "Säännöllinen lauseke"
+
+#: ../src/preferences.c:956
+msgid "Hotkeys"
+msgstr "Pikanäppäimet"
+
+#: ../src/preferences.c:964
+msgid "<b>Hotkeys</b>"
+msgstr "<b>Pikanäppäimet</b>"
+
+#: ../src/preferences.c:974
+msgid "History hotkey:"
+msgstr "Historian pikanäppäin:"
+
+#: ../src/preferences.c:983
+msgid "Actions hotkey:"
+msgstr "Toimintojen pikanäppäin:"
+
+#: ../src/preferences.c:992
+msgid "Menu hotkey:"
+msgstr "Valikon pikanäppäin:"
+
+#: ../src/preferences.c:1001
+msgid "Manage hotkey:"
+msgstr "Hallinnan pikanäppäin:"
+
+#: ../src/preferences.c:1010
+msgid "Offline mode hotkey:"
+msgstr ""
+
+#: ../src/utils.c:40 ../src/utils.c:47
+#, c-format
+msgid "Couldn't create directory: %s\n"
+msgstr "Hakemiston luonti epäonnistui: %s\n"
+
+#: ../src/utils.c:148
+msgid "Run as daemon"
+msgstr "Suorita taustapalveluna"
+
+#: ../src/utils.c:155
+msgid "Do not use status icon (Ctrl-Alt-P for menu)"
+msgstr ""
+
+#: ../src/utils.c:162
+msgid "Print clipboard contents"
+msgstr ""
+
+#: ../src/utils.c:169
+msgid "Print primary contents"
+msgstr ""
+
+#: ../src/utils.c:181
+msgid ""
+"Clipboard CLI usage examples:\n"
+"\n"
+" echo \"copied to clipboard\" | clipit\n"
+" clipit \"copied to clipboard\"\n"
+" echo \"copied to clipboard\" | clipit -c"
+msgstr ""
+"Esimerkkejä leikepöydän käyttöön komentoriviltä:\n"
+"\n"
+" echo \"kopioitu leikepöydälle\" | clipit\n"
+" clipit \"kopioitu leikepöydälle\"\n"
+" echo \"kopioitu leikepöydälle\" | clipit -c"
+
+#: ../src/utils.c:187
+msgid ""
+"Written by Cristian Henzel.\n"
+"Report bugs to <oss@rspwn.com>."
+msgstr ""
+"Tehnyt Cristian Henzel.\n"
+"Ilmoita vioista sähköpostitse <oss@rspwn.com>."
diff --git a/po/fr.po b/po/fr.po
new file mode 100644
index 0000000..64376b7
--- /dev/null
+++ b/po/fr.po
@@ -0,0 +1,350 @@
+# ClipIt translation file.
+# Copyright (C) 2010-2012 Cristian Henzel <oss@rspwn.com>
+# This file is distributed under the same license as the ClipIt package.
+#
+# Translators:
+# Benjamin 'sphax3d' Danon <sphax3d@gmail.com>, 2009.
+# Vincent Coiffier <vcoiffier@yahoo.com>, 2009.
+msgid ""
+msgstr ""
+"Project-Id-Version: ClipIt\n"
+"Report-Msgid-Bugs-To: Cristian Henzel <oss@rspwn.com>\n"
+"POT-Creation-Date: 2015-11-10 16:39+0200\n"
+"PO-Revision-Date: 2018-03-08 15:50+0100\n"
+"Last-Translator: L'Africain\n"
+"Language-Team: Cristian Henzel <oss@rspwn.com>\n"
+"Language: fr\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+"X-Generator: Poedit 1.8.7.1\n"
+
+#: ../data/clipit-startup.desktop.in.h:1 ../data/clipit.desktop.in.h:1
+msgid "ClipIt"
+msgstr "ClipIt"
+
+#: ../data/clipit-startup.desktop.in.h:2 ../data/clipit.desktop.in.h:2
+#: ../src/main.c:833
+msgid "Clipboard Manager"
+msgstr "Gestionnaire de presse-papier"
+
+#: ../src/main.c:287
+msgid "Lightweight GTK+ clipboard manager."
+msgstr "Gestionnaire de Presse-Papier Léger en GTK +."
+
+#. Actions using:
+#: ../src/main.c:356
+msgid "Actions using:"
+msgstr "Scripts utilisant :"
+
+#. Create menu item for empty clipboard contents
+#: ../src/main.c:365 ../src/main.c:382
+msgid "None"
+msgstr "Aucun"
+
+#: ../src/main.c:385
+msgid "<b>None</b>"
+msgstr "<b>Aucun</b>"
+
+#. File contained no actions so adding empty
+#. File did not open so adding empty
+#. Nothing in history so adding empty
+#: ../src/main.c:407 ../src/main.c:436 ../src/main.c:600
+msgid "Empty"
+msgstr "Vide"
+
+#. Edit actions
+#: ../src/main.c:443
+msgid "_Edit actions"
+msgstr "_Editer les actions"
+
+#. Offline mode checkbox
+#: ../src/main.c:686
+msgid "_Offline mode"
+msgstr "M_ode hors connexion"
+
+#. Manage history
+#: ../src/main.c:695
+msgid "_Manage history"
+msgstr "_Gérer l'historique"
+
+#. Create the dialog
+#: ../src/manage.c:138
+msgid "Editing Clipboard"
+msgstr "Éditer le presse-papier"
+
+#: ../src/manage.c:158
+msgid "_Static item"
+msgstr "Elément _statique"
+
+#: ../src/manage.c:227
+msgid "Clear the history?"
+msgstr "Effacer l'historique ?"
+
+#: ../src/manage.c:228
+msgid "Clear history"
+msgstr "Effacer l'historique"
+
+#: ../src/manage.c:348
+msgid "Manage History"
+msgstr "Gérer l'historique"
+
+#: ../src/manage.c:351
+msgid " (Offline mode)"
+msgstr "(Mode hors connexion)"
+
+#: ../src/manage.c:393
+msgid "Results"
+msgstr "Résultats"
+
+#: ../src/manage.c:398
+msgid "Edit"
+msgstr "Éditer"
+
+#: ../src/manage.c:400 ../src/preferences.c:886 ../src/preferences.c:947
+msgid "Remove"
+msgstr "Supprimer"
+
+#: ../src/manage.c:402
+msgid "Remove all"
+msgstr "Tout supprimer"
+
+#: ../src/manage.c:404
+msgid "Close"
+msgstr "Fermer"
+
+#: ../src/preferences.c:170
+msgid "Save history"
+msgstr "Enregistrer l'historique"
+
+#: ../src/preferences.c:203
+msgid "Remove history file"
+msgstr "Supprimer le fichier de l'historique"
+
+#. Create the dialog
+#: ../src/preferences.c:648
+msgid "Preferences"
+msgstr "Préférences"
+
+#: ../src/preferences.c:667
+msgid "Settings"
+msgstr "Paramètres"
+
+#: ../src/preferences.c:675
+msgid "<b>Clipboards</b>"
+msgstr "<b>Presse-papiers</b>"
+
+#: ../src/preferences.c:682
+msgid "Use _Copy (Ctrl-C)"
+msgstr "Utiliser _copier (Ctrl+C)"
+
+#: ../src/preferences.c:685
+msgid "Use _Primary (Selection)"
+msgstr "Utiliser la _sélection du curseur"
+
+#: ../src/preferences.c:688
+msgid "S_ynchronize clipboards"
+msgstr "S_ynchroniser les presse-papiers"
+
+#: ../src/preferences.c:690
+msgid "_Automatically paste selected item"
+msgstr "Coller _automatiquement l'élément sélectionné"
+
+#: ../src/preferences.c:699
+msgid "<b>Miscellaneous</b>"
+msgstr "<b>Divers</b>"
+
+#: ../src/preferences.c:706
+msgid "Show _indexes in history menu"
+msgstr "Montrer les _index dans le menu historique"
+
+#: ../src/preferences.c:708
+msgid "S_ave URIs"
+msgstr "Enreg_istrer les URIs"
+
+#: ../src/preferences.c:710
+msgid "Capture _hyperlinks only"
+msgstr "Capturer uniquement les _hyperliens"
+
+#: ../src/preferences.c:712
+msgid "C_onfirm before clearing history"
+msgstr "Demander _confirmation avant d'effacer l'historique"
+
+#: ../src/preferences.c:714
+msgid "_Use right-click menu"
+msgstr "_Utiliser le menu clic droit"
+
+#: ../src/preferences.c:723
+msgid "History"
+msgstr "Historique"
+
+#: ../src/preferences.c:731
+msgid "<b>History</b>"
+msgstr "<b>Historique</b>"
+
+#: ../src/preferences.c:738
+msgid "Save _history"
+msgstr "Enregistrer l'_historique"
+
+#: ../src/preferences.c:739
+msgid "Save and restore history between sessions"
+msgstr "Enregistrer et restaurer l'historique entre les sessions"
+
+#: ../src/preferences.c:743
+msgid "Items in history:"
+msgstr "Nombre de lignes dans l'historique :"
+
+#: ../src/preferences.c:752
+msgid "Items in menu:"
+msgstr "Nombre de lignes dans le menu :"
+
+#: ../src/preferences.c:759
+msgid "Show _static items in menu"
+msgstr "Afficher les éléments _statiques dans le menu"
+
+#: ../src/preferences.c:764
+msgid "Static items in menu:"
+msgstr "Éléments statiques dans le menu :"
+
+#: ../src/preferences.c:777
+msgid "<b>Items</b>"
+msgstr "<b>Éléments</b>"
+
+#: ../src/preferences.c:784
+msgid "Show in a single _line"
+msgstr "Afficher sur une seule _ligne"
+
+#: ../src/preferences.c:786
+msgid "Show in _reverse order"
+msgstr "Afficher dans l'o_rdre inverse"
+
+#: ../src/preferences.c:790
+msgid "Character length of items:"
+msgstr "Nombre de caractères par élément :"
+
+#: ../src/preferences.c:799
+msgid "Omit items in the:"
+msgstr "Omettre des éléments dans le :"
+
+#: ../src/preferences.c:803
+msgid "Beginning"
+msgstr "Début"
+
+#: ../src/preferences.c:804
+msgid "Middle"
+msgstr "Milieu"
+
+#: ../src/preferences.c:805
+msgid "End"
+msgstr "Fin"
+
+#: ../src/preferences.c:835
+msgid "Actions"
+msgstr "Actions"
+
+#. Build the actions label
+#: ../src/preferences.c:840
+msgid "Control-click ClipIt's tray icon to use actions"
+msgstr "Maintenir la touche Ctrl et cliquer sur l'icône de notification de ClipIt pour utiliser les actions"
+
+#: ../src/preferences.c:860
+msgid "Action"
+msgstr "Action"
+
+#: ../src/preferences.c:867
+msgid "Command"
+msgstr "Commande"
+
+#: ../src/preferences.c:882 ../src/preferences.c:943
+msgid "Add..."
+msgstr "Ajouter…"
+
+#: ../src/preferences.c:903
+msgid "Exclude"
+msgstr "Exclure"
+
+#. Build the exclude label
+#: ../src/preferences.c:908
+msgid ""
+"Regex list of items that should not be inserted into the history (passwords/"
+"sites that you don't need in history, etc)."
+msgstr ""
+"Liste d'éléments qui ne devraient pas être insérés dans l'historique (les "
+"mots de passe/sites dont vous n'avez pas besoin dans l'historique, etc)."
+
+#: ../src/preferences.c:928
+msgid "Regex"
+msgstr "Regex"
+
+#: ../src/preferences.c:956
+msgid "Hotkeys"
+msgstr "Raccourcis clavier"
+
+#: ../src/preferences.c:964
+msgid "<b>Hotkeys</b>"
+msgstr "<b>Raccourcis claviers</b>"
+
+#: ../src/preferences.c:974
+msgid "History hotkey:"
+msgstr "Raccourci pour l'historique :"
+
+#: ../src/preferences.c:983
+msgid "Actions hotkey:"
+msgstr "Raccourci pour les actions :"
+
+#: ../src/preferences.c:992
+msgid "Menu hotkey:"
+msgstr "Raccourci pour le menu :"
+
+#: ../src/preferences.c:1001
+msgid "Manage hotkey:"
+msgstr "Gérer les raccourcis :"
+
+#: ../src/preferences.c:1010
+msgid "Offline mode hotkey:"
+msgstr "Raccourci pour le mode hors connexion :"
+
+#: ../src/utils.c:40 ../src/utils.c:47
+#, c-format
+msgid "Couldn't create directory: %s\n"
+msgstr "Impossible de créer le répertoire : %s\n"
+
+#: ../src/utils.c:148
+msgid "Run as daemon"
+msgstr "Démarrer en tant que service"
+
+#: ../src/utils.c:155
+msgid "Do not use status icon (Ctrl-Alt-P for menu)"
+msgstr "Ne pas utiliser l'icône de notification (Ctrl+Alt+P pour le menu)"
+
+#: ../src/utils.c:162
+msgid "Print clipboard contents"
+msgstr "Imprimer le contenu du presse-papier"
+
+#: ../src/utils.c:169
+msgid "Print primary contents"
+msgstr "Imprimer le contenu de la sélection"
+
+#: ../src/utils.c:181
+msgid ""
+"Clipboard CLI usage examples:\n"
+"\n"
+" echo \"copied to clipboard\" | clipit\n"
+" clipit \"copied to clipboard\"\n"
+" echo \"copied to clipboard\" | clipit -c"
+msgstr ""
+"Exemples d'utilisation de commandes interprétées pour le presse-papier :\n"
+"\n"
+" echo \"copié dans le presse-papier\" | clipit\n"
+" clipit \"copié dans le presse-papier\"\n"
+" echo \"copié dans le presse-papier\" | clipit -c"
+
+#: ../src/utils.c:187
+msgid ""
+"Written by Cristian Henzel.\n"
+"Report bugs to <oss@rspwn.com>."
+msgstr ""
+"Écrit par Cristian Henzel.\n"
+"Signaler un bogue à <oss@rspwn.com>."
+
diff --git a/po/fr_FR.po b/po/fr_FR.po
new file mode 100644
index 0000000..062cff1
--- /dev/null
+++ b/po/fr_FR.po
@@ -0,0 +1,348 @@
+# ClipIt translation file.
+# Copyright (C) 2010-2012 Cristian Henzel <oss@rspwn.com>
+# This file is distributed under the same license as the ClipIt package.
+#
+# Translators:
+# Richard <ric_m_98@yahoo.fr>, 2011, 2012.
+msgid ""
+msgstr ""
+"Project-Id-Version: ClipIt\n"
+"Report-Msgid-Bugs-To: Cristian Henzel <oss@rspwn.com>\n"
+"POT-Creation-Date: 2015-11-10 16:39+0200\n"
+"PO-Revision-Date: 2012-04-04 06:30+0000\n"
+"Last-Translator: Cristian Henzel <oss@rspwn.com>\n"
+"Language-Team: French (France) (http://www.transifex.net/projects/p/clipit/"
+"language/fr_FR/)\n"
+"Language: fr_FR\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n > 1)\n"
+
+#: ../data/clipit-startup.desktop.in.h:1 ../data/clipit.desktop.in.h:1
+msgid "ClipIt"
+msgstr "ClipIt"
+
+#: ../data/clipit-startup.desktop.in.h:2 ../data/clipit.desktop.in.h:2
+#: ../src/main.c:833
+msgid "Clipboard Manager"
+msgstr "Gestionnaire de presse-papier"
+
+#: ../src/main.c:287
+msgid "Lightweight GTK+ clipboard manager."
+msgstr "Gestionnaire de Presse-Papier Léger en GTK +."
+
+#. Actions using:
+#: ../src/main.c:356
+msgid "Actions using:"
+msgstr "Scripts utilisant :"
+
+#. Create menu item for empty clipboard contents
+#: ../src/main.c:365 ../src/main.c:382
+msgid "None"
+msgstr "Aucun"
+
+#: ../src/main.c:385
+msgid "<b>None</b>"
+msgstr "<b>Aucun</b>"
+
+#. File contained no actions so adding empty
+#. File did not open so adding empty
+#. Nothing in history so adding empty
+#: ../src/main.c:407 ../src/main.c:436 ../src/main.c:600
+msgid "Empty"
+msgstr "Vide"
+
+#. Edit actions
+#: ../src/main.c:443
+msgid "_Edit actions"
+msgstr "_Editer les actions"
+
+#. Offline mode checkbox
+#: ../src/main.c:686
+msgid "_Offline mode"
+msgstr "M_ode hors connexion"
+
+#. Manage history
+#: ../src/main.c:695
+msgid "_Manage history"
+msgstr "_Gérer l'historique"
+
+#. Create the dialog
+#: ../src/manage.c:138
+msgid "Editing Clipboard"
+msgstr "Éditer le presse-papier"
+
+#: ../src/manage.c:158
+msgid "_Static item"
+msgstr "Elément _statique"
+
+#: ../src/manage.c:227
+msgid "Clear the history?"
+msgstr "Effacer l'historique ?"
+
+#: ../src/manage.c:228
+msgid "Clear history"
+msgstr "Effacer l'historique"
+
+#: ../src/manage.c:348
+msgid "Manage History"
+msgstr "Gérer l'historique"
+
+#: ../src/manage.c:351
+msgid " (Offline mode)"
+msgstr "(Mode hors connexion)"
+
+#: ../src/manage.c:393
+msgid "Results"
+msgstr "Résultats"
+
+#: ../src/manage.c:398
+msgid "Edit"
+msgstr "Éditer"
+
+#: ../src/manage.c:400 ../src/preferences.c:886 ../src/preferences.c:947
+msgid "Remove"
+msgstr "Supprimer"
+
+#: ../src/manage.c:402
+msgid "Remove all"
+msgstr "Tout supprimer"
+
+#: ../src/manage.c:404
+msgid "Close"
+msgstr "Fermer"
+
+#: ../src/preferences.c:170
+msgid "Save history"
+msgstr "Enregistrer l'historique"
+
+#: ../src/preferences.c:203
+msgid "Remove history file"
+msgstr "Supprimer le fichier de l'historique"
+
+#. Create the dialog
+#: ../src/preferences.c:648
+msgid "Preferences"
+msgstr "Préférences"
+
+#: ../src/preferences.c:667
+msgid "Settings"
+msgstr "Paramètres"
+
+#: ../src/preferences.c:675
+msgid "<b>Clipboards</b>"
+msgstr "<b>Presse-papiers</b>"
+
+#: ../src/preferences.c:682
+msgid "Use _Copy (Ctrl-C)"
+msgstr "Utiliser _copier (Ctrl+C)"
+
+#: ../src/preferences.c:685
+msgid "Use _Primary (Selection)"
+msgstr "Utiliser la _sélection du curseur"
+
+#: ../src/preferences.c:688
+msgid "S_ynchronize clipboards"
+msgstr "S_ynchroniser les presse-papiers"
+
+#: ../src/preferences.c:690
+msgid "_Automatically paste selected item"
+msgstr "Coller _automatiquement l'élément sélectionné"
+
+#: ../src/preferences.c:699
+msgid "<b>Miscellaneous</b>"
+msgstr "<b>Divers</b>"
+
+#: ../src/preferences.c:706
+msgid "Show _indexes in history menu"
+msgstr "Montrer les _index dans le menu historique"
+
+#: ../src/preferences.c:708
+msgid "S_ave URIs"
+msgstr "Enreg_istrer les URIs"
+
+#: ../src/preferences.c:710
+msgid "Capture _hyperlinks only"
+msgstr "Capturer uniquement les _hyperliens"
+
+#: ../src/preferences.c:712
+msgid "C_onfirm before clearing history"
+msgstr "Demander _confirmation avant d'effacer l'historique"
+
+#: ../src/preferences.c:714
+msgid "_Use right-click menu"
+msgstr "_Utiliser le menu clic droit"
+
+#: ../src/preferences.c:723
+msgid "History"
+msgstr "Historique"
+
+#: ../src/preferences.c:731
+msgid "<b>History</b>"
+msgstr "<b>Historique</b>"
+
+#: ../src/preferences.c:738
+msgid "Save _history"
+msgstr "Enregistrer l'_historique"
+
+#: ../src/preferences.c:739
+msgid "Save and restore history between sessions"
+msgstr "Enregistrer et restaurer l'historique entre les sessions"
+
+#: ../src/preferences.c:743
+msgid "Items in history:"
+msgstr "Nombre de lignes dans l'historique :"
+
+#: ../src/preferences.c:752
+msgid "Items in menu:"
+msgstr "Nombre de lignes dans le menu :"
+
+#: ../src/preferences.c:759
+msgid "Show _static items in menu"
+msgstr "Afficher les éléments _statiques dans le menu"
+
+#: ../src/preferences.c:764
+msgid "Static items in menu:"
+msgstr "Éléments statiques dans le menu :"
+
+#: ../src/preferences.c:777
+msgid "<b>Items</b>"
+msgstr "<b>Éléments</b>"
+
+#: ../src/preferences.c:784
+msgid "Show in a single _line"
+msgstr "Afficher sur une seule _ligne"
+
+#: ../src/preferences.c:786
+msgid "Show in _reverse order"
+msgstr "Afficher dans l'o_rdre inverse"
+
+#: ../src/preferences.c:790
+msgid "Character length of items:"
+msgstr "Nombre de caractères par élément :"
+
+#: ../src/preferences.c:799
+msgid "Omit items in the:"
+msgstr "Omettre des éléments dans le :"
+
+#: ../src/preferences.c:803
+msgid "Beginning"
+msgstr "Début"
+
+#: ../src/preferences.c:804
+msgid "Middle"
+msgstr "Milieu"
+
+#: ../src/preferences.c:805
+msgid "End"
+msgstr "Fin"
+
+#: ../src/preferences.c:835
+msgid "Actions"
+msgstr "Actions"
+
+#. Build the actions label
+#: ../src/preferences.c:840
+msgid "Control-click ClipIt's tray icon to use actions"
+msgstr "Maintenir la touche Ctrl et cliquer sur l'icône de notification de ClipIt pour utiliser les actions"
+
+#: ../src/preferences.c:860
+msgid "Action"
+msgstr "Action"
+
+#: ../src/preferences.c:867
+msgid "Command"
+msgstr "Commande"
+
+#: ../src/preferences.c:882 ../src/preferences.c:943
+msgid "Add..."
+msgstr "Ajouter…"
+
+#: ../src/preferences.c:903
+msgid "Exclude"
+msgstr "Exclure"
+
+#. Build the exclude label
+#: ../src/preferences.c:908
+msgid ""
+"Regex list of items that should not be inserted into the history (passwords/"
+"sites that you don't need in history, etc)."
+msgstr ""
+"Liste d'éléments qui ne devraient pas être insérés dans l'historique (les "
+"mots de passe/sites dont vous n'avez pas besoin dans l'historique, etc)."
+
+#: ../src/preferences.c:928
+msgid "Regex"
+msgstr "Regex"
+
+#: ../src/preferences.c:956
+msgid "Hotkeys"
+msgstr "Raccourcis clavier"
+
+#: ../src/preferences.c:964
+msgid "<b>Hotkeys</b>"
+msgstr "<b>Raccourcis claviers</b>"
+
+#: ../src/preferences.c:974
+msgid "History hotkey:"
+msgstr "Raccourci pour l'historique :"
+
+#: ../src/preferences.c:983
+msgid "Actions hotkey:"
+msgstr "Raccourci pour les actions :"
+
+#: ../src/preferences.c:992
+msgid "Menu hotkey:"
+msgstr "Raccourci pour le menu :"
+
+#: ../src/preferences.c:1001
+msgid "Manage hotkey:"
+msgstr "Gérer les raccourcis :"
+
+#: ../src/preferences.c:1010
+msgid "Offline mode hotkey:"
+msgstr "Raccourci pour le mode hors connexion :"
+
+#: ../src/utils.c:40 ../src/utils.c:47
+#, c-format
+msgid "Couldn't create directory: %s\n"
+msgstr "Impossible de créer le répertoire : %s\n"
+
+#: ../src/utils.c:148
+msgid "Run as daemon"
+msgstr "Démarrer en tant que service"
+
+#: ../src/utils.c:155
+msgid "Do not use status icon (Ctrl-Alt-P for menu)"
+msgstr "Ne pas utiliser l'icône de notification (Ctrl+Alt+P pour le menu)"
+
+#: ../src/utils.c:162
+msgid "Print clipboard contents"
+msgstr "Imprimer le contenu du presse-papier"
+
+#: ../src/utils.c:169
+msgid "Print primary contents"
+msgstr "Imprimer le contenu de la sélection"
+
+#: ../src/utils.c:181
+msgid ""
+"Clipboard CLI usage examples:\n"
+"\n"
+" echo \"copied to clipboard\" | clipit\n"
+" clipit \"copied to clipboard\"\n"
+" echo \"copied to clipboard\" | clipit -c"
+msgstr ""
+"Exemples d'utilisation de commandes interprétées pour le presse-papier :\n"
+"\n"
+" echo \"copié dans le presse-papier\" | clipit\n"
+" clipit \"copié dans le presse-papier\"\n"
+" echo \"copié dans le presse-papier\" | clipit -c"
+
+#: ../src/utils.c:187
+msgid ""
+"Written by Cristian Henzel.\n"
+"Report bugs to <oss@rspwn.com>."
+msgstr ""
+"Écrit par Cristian Henzel.\n"
+"Signaler un bogue à <oss@rspwn.com>."
diff --git a/po/gl_ES.po b/po/gl_ES.po
new file mode 100644
index 0000000..dfdc9e5
--- /dev/null
+++ b/po/gl_ES.po
@@ -0,0 +1,349 @@
+# ClipIt translation file.
+# Copyright (C) 2010-2012 Cristian Henzel <oss@rspwn.com>
+# This file is distributed under the same license as the ClipIt package.
+#
+# Translators:
+# <eskorpio@gmail.com>, 2012.
+msgid ""
+msgstr ""
+"Project-Id-Version: ClipIt\n"
+"Report-Msgid-Bugs-To: Cristian Henzel <oss@rspwn.com>\n"
+"POT-Creation-Date: 2015-11-10 16:39+0200\n"
+"PO-Revision-Date: 2012-04-04 06:30+0000\n"
+"Last-Translator: Cristian Henzel <oss@rspwn.com>\n"
+"Language-Team: Galician (Spain) (http://www.transifex.net/projects/p/clipit/"
+"language/gl_ES/)\n"
+"Language: gl_ES\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1)\n"
+
+#: ../data/clipit-startup.desktop.in.h:1 ../data/clipit.desktop.in.h:1
+msgid "ClipIt"
+msgstr ""
+
+#: ../data/clipit-startup.desktop.in.h:2 ../data/clipit.desktop.in.h:2
+#: ../src/main.c:833
+msgid "Clipboard Manager"
+msgstr "Xestor de portarretallos"
+
+#: ../src/main.c:287
+msgid "Lightweight GTK+ clipboard manager."
+msgstr "Xestor lixeiro de portarretallos en GTK+"
+
+#. Actions using:
+#: ../src/main.c:356
+msgid "Actions using:"
+msgstr "Usar accións:"
+
+#. Create menu item for empty clipboard contents
+#: ../src/main.c:365 ../src/main.c:382
+msgid "None"
+msgstr "Ningún"
+
+#: ../src/main.c:385
+msgid "<b>None</b>"
+msgstr "<b>Ningún</b>"
+
+#. File contained no actions so adding empty
+#. File did not open so adding empty
+#. Nothing in history so adding empty
+#: ../src/main.c:407 ../src/main.c:436 ../src/main.c:600
+msgid "Empty"
+msgstr "Baleiro"
+
+#. Edit actions
+#: ../src/main.c:443
+msgid "_Edit actions"
+msgstr "_Editar accións"
+
+#. Offline mode checkbox
+#: ../src/main.c:686
+msgid "_Offline mode"
+msgstr ""
+
+#. Manage history
+#: ../src/main.c:695
+msgid "_Manage history"
+msgstr "_Xestionar historial"
+
+#. Create the dialog
+#: ../src/manage.c:138
+msgid "Editing Clipboard"
+msgstr "Editar portarretallos"
+
+#: ../src/manage.c:158
+msgid "_Static item"
+msgstr "Elemento e_stático"
+
+#: ../src/manage.c:227
+msgid "Clear the history?"
+msgstr "Pegar _automaticamente o elemento seleccionado"
+
+#: ../src/manage.c:228
+msgid "Clear history"
+msgstr "Limpar o historial"
+
+#: ../src/manage.c:348
+msgid "Manage History"
+msgstr "Xestionar historial"
+
+#: ../src/manage.c:351
+msgid " (Offline mode)"
+msgstr ""
+
+#: ../src/manage.c:393
+msgid "Results"
+msgstr "Resultados"
+
+#: ../src/manage.c:398
+msgid "Edit"
+msgstr "Editar"
+
+#: ../src/manage.c:400 ../src/preferences.c:886 ../src/preferences.c:947
+msgid "Remove"
+msgstr "Retirar"
+
+#: ../src/manage.c:402
+msgid "Remove all"
+msgstr "Retirar todo"
+
+#: ../src/manage.c:404
+msgid "Close"
+msgstr "Pechar"
+
+#: ../src/preferences.c:170
+msgid "Save history"
+msgstr "Gardar o historial"
+
+#: ../src/preferences.c:203
+msgid "Remove history file"
+msgstr "Retirar ficheiro do historial"
+
+#. Create the dialog
+#: ../src/preferences.c:648
+msgid "Preferences"
+msgstr "Preferencias"
+
+#: ../src/preferences.c:667
+msgid "Settings"
+msgstr "Configuración"
+
+#: ../src/preferences.c:675
+msgid "<b>Clipboards</b>"
+msgstr "<b>Portarretallos</b>"
+
+#: ../src/preferences.c:682
+msgid "Use _Copy (Ctrl-C)"
+msgstr "Usar copiar (Ctrl-C)"
+
+#: ../src/preferences.c:685
+msgid "Use _Primary (Selection)"
+msgstr "Elementos no historial:"
+
+#: ../src/preferences.c:688
+msgid "S_ynchronize clipboards"
+msgstr "Elementos no menú:"
+
+#: ../src/preferences.c:690
+msgid "_Automatically paste selected item"
+msgstr "Pegar _automaticamente o elementos seleccionado"
+
+#: ../src/preferences.c:699
+msgid "<b>Miscellaneous</b>"
+msgstr "<b>Varios</b>"
+
+#: ../src/preferences.c:706
+msgid "Show _indexes in history menu"
+msgstr "Mostrar índ_ices no menú do historial"
+
+#: ../src/preferences.c:708
+msgid "S_ave URIs"
+msgstr "G_ardar URIs"
+
+#: ../src/preferences.c:710
+msgid "Capture _hyperlinks only"
+msgstr "Capturar só _hiperligazóns"
+
+#: ../src/preferences.c:712
+msgid "C_onfirm before clearing history"
+msgstr "C_onfirmar antes de limpar o historial"
+
+#: ../src/preferences.c:714
+msgid "_Use right-click menu"
+msgstr "_Usar menú do botón dereito"
+
+#: ../src/preferences.c:723
+msgid "History"
+msgstr "Historial"
+
+#: ../src/preferences.c:731
+msgid "<b>History</b>"
+msgstr "<b>Historial</b>"
+
+#: ../src/preferences.c:738
+msgid "Save _history"
+msgstr "Gardar _historial"
+
+#: ../src/preferences.c:739
+msgid "Save and restore history between sessions"
+msgstr "Gardar e restaurar historial entre sesións"
+
+#: ../src/preferences.c:743
+msgid "Items in history:"
+msgstr "Elementos no historial:"
+
+#: ../src/preferences.c:752
+msgid "Items in menu:"
+msgstr "Elementos no menú:"
+
+#: ../src/preferences.c:759
+msgid "Show _static items in menu"
+msgstr "Mostrar elementos e_státicos no menú"
+
+#: ../src/preferences.c:764
+msgid "Static items in menu:"
+msgstr "Elementos estáticos no menú:"
+
+#: ../src/preferences.c:777
+msgid "<b>Items</b>"
+msgstr "<b>Elementos</b>"
+
+#: ../src/preferences.c:784
+msgid "Show in a single _line"
+msgstr "Mostrar nunha única liña"
+
+#: ../src/preferences.c:786
+msgid "Show in _reverse order"
+msgstr "Mostrar en o_rde inverso"
+
+#: ../src/preferences.c:790
+msgid "Character length of items:"
+msgstr "Número de caracteres dos elementos:"
+
+#: ../src/preferences.c:799
+msgid "Omit items in the:"
+msgstr "Omitir elementos en:"
+
+#: ../src/preferences.c:803
+msgid "Beginning"
+msgstr "Inicio"
+
+#: ../src/preferences.c:804
+msgid "Middle"
+msgstr "Medio"
+
+#: ../src/preferences.c:805
+msgid "End"
+msgstr "Fin"
+
+#: ../src/preferences.c:835
+msgid "Actions"
+msgstr "Accións"
+
+#. Build the actions label
+#: ../src/preferences.c:840
+msgid "Control-click ClipIt's tray icon to use actions"
+msgstr "Control-clic na icona de ClipIt na bandexa para usar accións"
+
+#: ../src/preferences.c:860
+msgid "Action"
+msgstr "Acción"
+
+#: ../src/preferences.c:867
+msgid "Command"
+msgstr "Orde"
+
+#: ../src/preferences.c:882 ../src/preferences.c:943
+msgid "Add..."
+msgstr "Engadir..."
+
+#: ../src/preferences.c:903
+msgid "Exclude"
+msgstr "Excluír"
+
+#. Build the exclude label
+#: ../src/preferences.c:908
+msgid ""
+"Regex list of items that should not be inserted into the history (passwords/"
+"sites that you don't need in history, etc)."
+msgstr ""
+"Lista de expresións regulares que non deben ser insertadas no historial "
+"(contrasinais/sitios que non necesita no historial, etc.)."
+
+#: ../src/preferences.c:928
+msgid "Regex"
+msgstr "Expresión regular"
+
+#: ../src/preferences.c:956
+msgid "Hotkeys"
+msgstr "Teclas rápidas"
+
+#: ../src/preferences.c:964
+msgid "<b>Hotkeys</b>"
+msgstr "<b>Teclas rápidas</b>"
+
+#: ../src/preferences.c:974
+msgid "History hotkey:"
+msgstr "Historial de teclas rápidas:"
+
+#: ../src/preferences.c:983
+msgid "Actions hotkey:"
+msgstr "Accións de teclas rápidas:"
+
+#: ../src/preferences.c:992
+msgid "Menu hotkey:"
+msgstr "Menú de teclas rápidas:"
+
+#: ../src/preferences.c:1001
+msgid "Manage hotkey:"
+msgstr "Xestionar teclas rápidas:"
+
+#: ../src/preferences.c:1010
+msgid "Offline mode hotkey:"
+msgstr ""
+
+#: ../src/utils.c:40 ../src/utils.c:47
+#, c-format
+msgid "Couldn't create directory: %s\n"
+msgstr "Non se pode crear o cartafol: %s\n"
+
+#: ../src/utils.c:148
+msgid "Run as daemon"
+msgstr "Executar como un daemon"
+
+#: ../src/utils.c:155
+msgid "Do not use status icon (Ctrl-Alt-P for menu)"
+msgstr "Non usar icona de estado (Ctrl-Alt-P para menú)"
+
+#: ../src/utils.c:162
+msgid "Print clipboard contents"
+msgstr "Imprimir o contido do portarretallos"
+
+#: ../src/utils.c:169
+msgid "Print primary contents"
+msgstr "Imprimir contidos primarios"
+
+#: ../src/utils.c:181
+msgid ""
+"Clipboard CLI usage examples:\n"
+"\n"
+" echo \"copied to clipboard\" | clipit\n"
+" clipit \"copied to clipboard\"\n"
+" echo \"copied to clipboard\" | clipit -c"
+msgstr ""
+"Exemplos de uso da liña de ordes do portarretallos:\n"
+"\n"
+" echo \"copiado ao portarretallos\" | clipit\n"
+" clipit \"copiado ao portarretallos\"\n"
+" echo \"copiado ao portarretallos\" | clipit -c"
+
+#: ../src/utils.c:187
+msgid ""
+"Written by Cristian Henzel.\n"
+"Report bugs to <oss@rspwn.com>."
+msgstr ""
+"Escrito por Cristian Henzel.\n"
+"Traducido ao galego por Manuel Xosé Lemos.\n"
+"Informar de erros a <oss@rspwn.com>."
diff --git a/po/hu.po b/po/hu.po
new file mode 100644
index 0000000..b2dd16d
--- /dev/null
+++ b/po/hu.po
@@ -0,0 +1,349 @@
+# ClipIt translation file.
+# Copyright (C) 2010-2012 Cristian Henzel <oss@rspwn.com>
+# This file is distributed under the same license as the ClipIt package.
+#
+# Translators:
+# László Gyaraki <gyarakilaszlo@freemail.hu>, 2011, 2012.
+# Németh Tamás <ntomasz@vipmail.hu>, 2008, 2009.
+msgid ""
+msgstr ""
+"Project-Id-Version: ClipIt\n"
+"Report-Msgid-Bugs-To: Cristian Henzel <oss@rspwn.com>\n"
+"POT-Creation-Date: 2015-11-10 16:39+0200\n"
+"PO-Revision-Date: 2012-04-04 06:30+0000\n"
+"Last-Translator: Cristian Henzel <oss@rspwn.com>\n"
+"Language-Team: Hungarian (http://www.transifex.net/projects/p/clipit/"
+"language/hu/)\n"
+"Language: hu\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1)\n"
+
+#: ../data/clipit-startup.desktop.in.h:1 ../data/clipit.desktop.in.h:1
+msgid "ClipIt"
+msgstr ""
+
+#: ../data/clipit-startup.desktop.in.h:2 ../data/clipit.desktop.in.h:2
+#: ../src/main.c:833
+msgid "Clipboard Manager"
+msgstr "Vágólapkezelő"
+
+#: ../src/main.c:287
+msgid "Lightweight GTK+ clipboard manager."
+msgstr "GTK+ alapú, könnyen kezelhető vágólapkezelő."
+
+#. Actions using:
+#: ../src/main.c:356
+msgid "Actions using:"
+msgstr "Műveletek használata:"
+
+#. Create menu item for empty clipboard contents
+#: ../src/main.c:365 ../src/main.c:382
+msgid "None"
+msgstr "Nincs"
+
+#: ../src/main.c:385
+msgid "<b>None</b>"
+msgstr "<b>Nincs</b>"
+
+#. File contained no actions so adding empty
+#. File did not open so adding empty
+#. Nothing in history so adding empty
+#: ../src/main.c:407 ../src/main.c:436 ../src/main.c:600
+msgid "Empty"
+msgstr "Üres"
+
+#. Edit actions
+#: ../src/main.c:443
+msgid "_Edit actions"
+msgstr "_Műveletek szerkesztése"
+
+#. Offline mode checkbox
+#: ../src/main.c:686
+msgid "_Offline mode"
+msgstr "_Kapcsolat nélküli munka"
+
+#. Manage history
+#: ../src/main.c:695
+msgid "_Manage history"
+msgstr "_Előzmények kezelése"
+
+#. Create the dialog
+#: ../src/manage.c:138
+msgid "Editing Clipboard"
+msgstr "Vágólap szerkesztése"
+
+#: ../src/manage.c:158
+msgid "_Static item"
+msgstr "Állandó elem"
+
+#: ../src/manage.c:227
+msgid "Clear the history?"
+msgstr "Törli az előzményeket?"
+
+#: ../src/manage.c:228
+msgid "Clear history"
+msgstr "Előzmények törlése"
+
+#: ../src/manage.c:348
+msgid "Manage History"
+msgstr "Előzmények kezelése"
+
+#: ../src/manage.c:351
+msgid " (Offline mode)"
+msgstr " (Kapcsolat nélküli munka)"
+
+#: ../src/manage.c:393
+msgid "Results"
+msgstr "Eredmények"
+
+#: ../src/manage.c:398
+msgid "Edit"
+msgstr "Szerkesztés"
+
+#: ../src/manage.c:400 ../src/preferences.c:886 ../src/preferences.c:947
+msgid "Remove"
+msgstr "Eltávolít"
+
+#: ../src/manage.c:402
+msgid "Remove all"
+msgstr "Összes törlése"
+
+#: ../src/manage.c:404
+msgid "Close"
+msgstr "Bezár"
+
+#: ../src/preferences.c:170
+msgid "Save history"
+msgstr "Előzmények mentése"
+
+#: ../src/preferences.c:203
+msgid "Remove history file"
+msgstr "Mentett előzmények törlése"
+
+#. Create the dialog
+#: ../src/preferences.c:648
+msgid "Preferences"
+msgstr "Beállítások"
+
+#: ../src/preferences.c:667
+msgid "Settings"
+msgstr "Beállítások"
+
+#: ../src/preferences.c:675
+msgid "<b>Clipboards</b>"
+msgstr "<b>Vágólapok</b>"
+
+#: ../src/preferences.c:682
+msgid "Use _Copy (Ctrl-C)"
+msgstr "_Másol használata (Ctrl+C)"
+
+#: ../src/preferences.c:685
+msgid "Use _Primary (Selection)"
+msgstr "_Eredeti használata (kijelölés)"
+
+#: ../src/preferences.c:688
+msgid "S_ynchronize clipboards"
+msgstr "Vágólapok s_zinkronizálása"
+
+#: ../src/preferences.c:690
+msgid "_Automatically paste selected item"
+msgstr "Kijelölés _automatikus beillesztése"
+
+#: ../src/preferences.c:699
+msgid "<b>Miscellaneous</b>"
+msgstr "<b>Egyebek</b>"
+
+#: ../src/preferences.c:706
+msgid "Show _indexes in history menu"
+msgstr "_Indexek mutatása az előzményekben"
+
+#: ../src/preferences.c:708
+msgid "S_ave URIs"
+msgstr "URI _mentése"
+
+#: ../src/preferences.c:710
+msgid "Capture _hyperlinks only"
+msgstr "Csak a _hivatkozások elkapása"
+
+#: ../src/preferences.c:712
+msgid "C_onfirm before clearing history"
+msgstr "E_lőzmény törlésének megerősítése"
+
+#: ../src/preferences.c:714
+msgid "_Use right-click menu"
+msgstr "_Helyi menü használata"
+
+#: ../src/preferences.c:723
+msgid "History"
+msgstr "Előzmények"
+
+#: ../src/preferences.c:731
+msgid "<b>History</b>"
+msgstr "<b>Előzmények</b>"
+
+#: ../src/preferences.c:738
+msgid "Save _history"
+msgstr "_Előzmények mentése"
+
+#: ../src/preferences.c:739
+msgid "Save and restore history between sessions"
+msgstr "Előzmények mentése és visszaállítása a munkamenetek között"
+
+#: ../src/preferences.c:743
+msgid "Items in history:"
+msgstr "Előzmény elemei:"
+
+#: ../src/preferences.c:752
+msgid "Items in menu:"
+msgstr "Elemek a menüben:"
+
+#: ../src/preferences.c:759
+msgid "Show _static items in menu"
+msgstr "Állandó elemek megjelenítése a menüben"
+
+#: ../src/preferences.c:764
+msgid "Static items in menu:"
+msgstr "Állandó elemek a menüben:"
+
+#: ../src/preferences.c:777
+msgid "<b>Items</b>"
+msgstr "<b>Elemek</b>"
+
+#: ../src/preferences.c:784
+msgid "Show in a single _line"
+msgstr "Megjelenítés egy _sorban"
+
+#: ../src/preferences.c:786
+msgid "Show in _reverse order"
+msgstr "_Fordított sorrend"
+
+#: ../src/preferences.c:790
+msgid "Character length of items:"
+msgstr "Elemek karaktereinek száma:"
+
+#: ../src/preferences.c:799
+msgid "Omit items in the:"
+msgstr "Elemek kihagyása itt:"
+
+#: ../src/preferences.c:803
+msgid "Beginning"
+msgstr "Elején"
+
+#: ../src/preferences.c:804
+msgid "Middle"
+msgstr "Középen"
+
+#: ../src/preferences.c:805
+msgid "End"
+msgstr "Végén"
+
+#: ../src/preferences.c:835
+msgid "Actions"
+msgstr "Műveletek"
+
+#. Build the actions label
+#: ../src/preferences.c:840
+msgid "Control-click ClipIt's tray icon to use actions"
+msgstr "Műveletek használatához Ctrl+kattintás a ClipIt állapotikonjára"
+
+#: ../src/preferences.c:860
+msgid "Action"
+msgstr "Művelet"
+
+#: ../src/preferences.c:867
+msgid "Command"
+msgstr "Parancs"
+
+#: ../src/preferences.c:882 ../src/preferences.c:943
+msgid "Add..."
+msgstr "Hozzáadás..."
+
+#: ../src/preferences.c:903
+msgid "Exclude"
+msgstr "Kizárás"
+
+#. Build the exclude label
+#: ../src/preferences.c:908
+msgid ""
+"Regex list of items that should not be inserted into the history (passwords/"
+"sites that you don't need in history, etc)."
+msgstr ""
+"A Regex azon reguláris kifejezések listája, melyeket nem kíván közzétenni az "
+"előzményekben (például egy jelszó/weboldal, amit nem szükséges naplózni)."
+
+#: ../src/preferences.c:928
+msgid "Regex"
+msgstr "Regex"
+
+#: ../src/preferences.c:956
+msgid "Hotkeys"
+msgstr "Gyorsbillentyűk"
+
+#: ../src/preferences.c:964
+msgid "<b>Hotkeys</b>"
+msgstr "<b>Gyorsbillentyűk</b>"
+
+#: ../src/preferences.c:974
+msgid "History hotkey:"
+msgstr "Előzmények:"
+
+#: ../src/preferences.c:983
+msgid "Actions hotkey:"
+msgstr "Műveletek:"
+
+#: ../src/preferences.c:992
+msgid "Menu hotkey:"
+msgstr "Menü:"
+
+#: ../src/preferences.c:1001
+msgid "Manage hotkey:"
+msgstr "Előzmények kezelése:"
+
+#: ../src/preferences.c:1010
+msgid "Offline mode hotkey:"
+msgstr "Kapcsolat nélküli munka gyorsbillentyűje:"
+
+#: ../src/utils.c:40 ../src/utils.c:47
+#, c-format
+msgid "Couldn't create directory: %s\n"
+msgstr "A könyvtár nem hozható létre: %s\n"
+
+#: ../src/utils.c:148
+msgid "Run as daemon"
+msgstr "Futtatás démonként"
+
+#: ../src/utils.c:155
+msgid "Do not use status icon (Ctrl-Alt-P for menu)"
+msgstr "Ne használjon állapotikont (Ctrl+Alt+P)"
+
+#: ../src/utils.c:162
+msgid "Print clipboard contents"
+msgstr "Vágólap tartalmak nyomtatása"
+
+#: ../src/utils.c:169
+msgid "Print primary contents"
+msgstr "Eredeti tartalmak nyomtatása"
+
+#: ../src/utils.c:181
+msgid ""
+"Clipboard CLI usage examples:\n"
+"\n"
+" echo \"copied to clipboard\" | clipit\n"
+" clipit \"copied to clipboard\"\n"
+" echo \"copied to clipboard\" | clipit -c"
+msgstr ""
+"A vágólapkezelő CLI (konzolos) használatára példák:\n"
+"\n"
+" echo \"másolás a vágólapra\" | clipit\n"
+" clipit \"másolás a vágólapra\"\n"
+" echo \"másolás a vágólapra\" | clipit -c"
+
+#: ../src/utils.c:187
+msgid ""
+"Written by Cristian Henzel.\n"
+"Report bugs to <oss@rspwn.com>."
+msgstr ""
+"Készítette: Cristian Henzel.\n"
+"Hibajelentés <oss@rspwn.com>."
diff --git a/po/is.po b/po/is.po
new file mode 100644
index 0000000..b9851d8
--- /dev/null
+++ b/po/is.po
@@ -0,0 +1,349 @@
+# ClipIt translation file.
+# Copyright (C) 2010-2015 Cristian Henzel <oss@rspwn.com>
+# This file is distributed under the same license as the ClipIt package.
+#
+# Cristian Henzel <oss@rspwn.com>, 2010.
+# Sveinn í Felli <sv1@fellsnet.is>, 2018.
+msgid ""
+msgstr ""
+"Project-Id-Version: ClipIt\n"
+"Report-Msgid-Bugs-To: Cristian Henzel <oss@rspwn.com>\n"
+"POT-Creation-Date: 2015-11-10 16:39+0200\n"
+"PO-Revision-Date: 2018-05-25 07:49+0000\n"
+"Last-Translator: Sveinn í Felli <sv1@fellsnet.is>\n"
+"Language-Team: Icelandic <translation-team-is@lists.sourceforge.net>\n"
+"Language: is\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=n != 1;\n"
+"X-Generator: Lokalize 1.5\n"
+
+#: ../data/clipit-startup.desktop.in.h:1 ../data/clipit.desktop.in.h:1
+msgid "ClipIt"
+msgstr "ClipIt"
+
+#: ../data/clipit-startup.desktop.in.h:2 ../data/clipit.desktop.in.h:2
+#: ../src/main.c:833
+msgid "Clipboard Manager"
+msgstr "Klippispjaldsstjóri"
+
+#: ../src/main.c:287
+msgid "Lightweight GTK+ clipboard manager."
+msgstr "Léttur klippispjaldsstjóri byggður á GTK+."
+
+#. Actions using:
+#: ../src/main.c:356
+msgid "Actions using:"
+msgstr "Aðgerðir með:"
+
+#. Create menu item for empty clipboard contents
+#: ../src/main.c:365 ../src/main.c:382
+msgid "None"
+msgstr "Ekkert"
+
+#: ../src/main.c:385
+msgid "<b>None</b>"
+msgstr "<b>Ekkert</b>"
+
+#. File contained no actions so adding empty
+#. File did not open so adding empty
+#. Nothing in history so adding empty
+#: ../src/main.c:407 ../src/main.c:436 ../src/main.c:600
+msgid "Empty"
+msgstr "Tómt"
+
+#. Edit actions
+#: ../src/main.c:443
+msgid "_Edit actions"
+msgstr "Br_eyta aðgerðum"
+
+#. Offline mode checkbox
+#: ../src/main.c:686
+msgid "_Offline mode"
+msgstr "Ótengdur _hamur"
+
+#. Manage history
+#: ../src/main.c:695
+msgid "_Manage history"
+msgstr "Sýsla _með feril"
+
+#. Create the dialog
+#: ../src/manage.c:138
+msgid "Editing Clipboard"
+msgstr "Breyta klippispjaldi"
+
+#: ../src/manage.c:158
+msgid "_Static item"
+msgstr "Fast atriði"
+
+#: ../src/manage.c:227
+msgid "Clear the history?"
+msgstr "Hreinsa feril?"
+
+#: ../src/manage.c:228
+msgid "Clear history"
+msgstr "Hreinsa feril"
+
+#: ../src/manage.c:348
+msgid "Manage History"
+msgstr "Sýsla með feril"
+
+#: ../src/manage.c:351
+msgid " (Offline mode)"
+msgstr " (Ótengdur hamur)"
+
+#: ../src/manage.c:393
+msgid "Results"
+msgstr "Niðurstöður"
+
+#: ../src/manage.c:398
+msgid "Edit"
+msgstr "Breyta"
+
+#: ../src/manage.c:400 ../src/preferences.c:886 ../src/preferences.c:947
+msgid "Remove"
+msgstr "Fjarlægja"
+
+#: ../src/manage.c:402
+msgid "Remove all"
+msgstr "Fjarlægja allt"
+
+#: ../src/manage.c:404
+msgid "Close"
+msgstr "Loka"
+
+#: ../src/preferences.c:170
+msgid "Save history"
+msgstr "Vista feril"
+
+#: ../src/preferences.c:203
+msgid "Remove history file"
+msgstr "Fjarlægja ferilsskrá"
+
+#. Create the dialog
+#: ../src/preferences.c:648
+msgid "Preferences"
+msgstr "Kjörstillingar"
+
+#: ../src/preferences.c:667
+msgid "Settings"
+msgstr "Stillingar"
+
+#: ../src/preferences.c:675
+msgid "<b>Clipboards</b>"
+msgstr "<b>Klippispjöld</b>"
+
+#: ../src/preferences.c:682
+msgid "Use _Copy (Ctrl-C)"
+msgstr "Nota _afritun (Ctrl-C)"
+
+#: ../src/preferences.c:685
+msgid "Use _Primary (Selection)"
+msgstr "Nota aðalhna_pp (valið)"
+
+#: ../src/preferences.c:688
+msgid "S_ynchronize clipboards"
+msgstr "Samstilla klippispjöld"
+
+#: ../src/preferences.c:690
+msgid "_Automatically paste selected item"
+msgstr "Lím_a valið atriði sjálfvirkt"
+
+#: ../src/preferences.c:699
+msgid "<b>Miscellaneous</b>"
+msgstr "<b>Ýmislegt</b>"
+
+#: ../src/preferences.c:706
+msgid "Show _indexes in history menu"
+msgstr "Birta _yfirlitsnúmer í ferilvalmynd"
+
+#: ../src/preferences.c:708
+msgid "S_ave URIs"
+msgstr "Vist_a slóðir"
+
+#: ../src/preferences.c:710
+msgid "Capture _hyperlinks only"
+msgstr "Einungis grípa ve_ftengla"
+
+#: ../src/preferences.c:712
+msgid "C_onfirm before clearing history"
+msgstr "Staðfesta áður en ferill er hreinsaður"
+
+#: ../src/preferences.c:714
+msgid "_Use right-click menu"
+msgstr "N_ota hægrismells-valmynd"
+
+#: ../src/preferences.c:723
+msgid "History"
+msgstr "Ferill"
+
+#: ../src/preferences.c:731
+msgid "<b>History</b>"
+msgstr "<b>Ferill</b>"
+
+#: ../src/preferences.c:738
+msgid "Save _history"
+msgstr "Vista feril"
+
+#: ../src/preferences.c:739
+msgid "Save and restore history between sessions"
+msgstr "Vista og endurheimta feril milli seta"
+
+#: ../src/preferences.c:743
+msgid "Items in history:"
+msgstr "Atriði í ferilskrá:"
+
+#: ../src/preferences.c:752
+msgid "Items in menu:"
+msgstr "Atriði í valmynd:"
+
+#: ../src/preferences.c:759
+msgid "Show _static items in menu"
+msgstr "Birta fö_st atriði í valmynd"
+
+#: ../src/preferences.c:764
+msgid "Static items in menu:"
+msgstr "Föst atriði í valmynd:"
+
+#: ../src/preferences.c:777
+msgid "<b>Items</b>"
+msgstr "<b>Atriði</b>"
+
+#: ../src/preferences.c:784
+msgid "Show in a single _line"
+msgstr "Birta á einni _línu"
+
+#: ../src/preferences.c:786
+msgid "Show in _reverse order"
+msgstr "Bi_rta í öfugri röð"
+
+#: ../src/preferences.c:790
+msgid "Character length of items:"
+msgstr "Fjöldi stafa í hverri færslu:"
+
+#: ../src/preferences.c:799
+msgid "Omit items in the:"
+msgstr "Sleppa atriðum:"
+
+#: ../src/preferences.c:803
+msgid "Beginning"
+msgstr "í upphafi"
+
+#: ../src/preferences.c:804
+msgid "Middle"
+msgstr "við miðju"
+
+#: ../src/preferences.c:805
+msgid "End"
+msgstr "í enda"
+
+#: ../src/preferences.c:835
+msgid "Actions"
+msgstr "Aðgerðir"
+
+#. Build the actions label
+#: ../src/preferences.c:840
+msgid "Control-click ClipIt's tray icon to use actions"
+msgstr "Ctrl-smella á kerfisbakkamynd ClipIt til að nota aðgerðir"
+
+#: ../src/preferences.c:860
+msgid "Action"
+msgstr "Aðgerð"
+
+#: ../src/preferences.c:867
+msgid "Command"
+msgstr "Skipun"
+
+#: ../src/preferences.c:882 ../src/preferences.c:943
+msgid "Add..."
+msgstr "Bæta við..."
+
+#: ../src/preferences.c:903
+msgid "Exclude"
+msgstr "Undanskilja"
+
+#. Build the exclude label
+#: ../src/preferences.c:908
+msgid ""
+"Regex list of items that should not be inserted into the history (passwords/"
+"sites that you don't need in history, etc)."
+msgstr ""
+"Regluleg segð með atriðum sem ekki ætti að setja í ferilskrá (lykilorð, óþörf "
+"vefsvæði, o.s.frv.)."
+
+#: ../src/preferences.c:928
+msgid "Regex"
+msgstr "Regluleg segð"
+
+#: ../src/preferences.c:956
+msgid "Hotkeys"
+msgstr "Flýtilyklar"
+
+#: ../src/preferences.c:964
+msgid "<b>Hotkeys</b>"
+msgstr "<b>Flýtilyklar</b>"
+
+#: ../src/preferences.c:974
+msgid "History hotkey:"
+msgstr "Flýtilykill ferilskrár:"
+
+#: ../src/preferences.c:983
+msgid "Actions hotkey:"
+msgstr "Flýtilykill aðgerða:"
+
+#: ../src/preferences.c:992
+msgid "Menu hotkey:"
+msgstr "Flýtilykill valmyndar:"
+
+#: ../src/preferences.c:1001
+msgid "Manage hotkey:"
+msgstr "Flýtilykill umsýslu:"
+
+#: ../src/preferences.c:1010
+msgid "Offline mode hotkey:"
+msgstr "Flýtilykill ótengds hams:"
+
+#: ../src/utils.c:40 ../src/utils.c:47
+#, c-format
+msgid "Couldn't create directory: %s\n"
+msgstr "Gat ekki búið til möppuna: %s\n"
+
+#: ../src/utils.c:148
+msgid "Run as daemon"
+msgstr "Keyra í miðlaraham (deamon)"
+
+#: ../src/utils.c:155
+msgid "Do not use status icon (Ctrl-Alt-P for menu)"
+msgstr "Ekki nota stöðutákn (Ctrl-Alt-P til að opna valmynd)"
+
+#: ../src/utils.c:162
+msgid "Print clipboard contents"
+msgstr "Prenta innihald klippispjalds"
+
+#: ../src/utils.c:169
+msgid "Print primary contents"
+msgstr "Prenta aðalefni"
+
+#: ../src/utils.c:181
+msgid ""
+"Clipboard CLI usage examples:\n"
+"\n"
+" echo \"copied to clipboard\" | clipit\n"
+" clipit \"copied to clipboard\"\n"
+" echo \"copied to clipboard\" | clipit -c"
+msgstr ""
+"Dæmi um notkun á skipanalínu:\n"
+"\n"
+" echo \"afritað á klippispjald\" | clipit\n"
+" clipit \"afritað á klippispjald\"\n"
+" echo \"afritað á klippispjald\" | clipit -c"
+
+#: ../src/utils.c:187
+msgid ""
+"Written by Cristian Henzel.\n"
+"Report bugs to <oss@rspwn.com>."
+msgstr ""
+"Skrifað af Cristian Henzel.\n"
+"Tilkynntu villur til <oss@rspwn.com>."
+
diff --git a/po/it.po b/po/it.po
new file mode 100644
index 0000000..8694b93
--- /dev/null
+++ b/po/it.po
@@ -0,0 +1,350 @@
+# ClipIt translation file.
+# Copyright (C) 2010-2012 Cristian Henzel <oss@rspwn.com>
+# This file is distributed under the same license as the ClipIt package.
+#
+# Translators:
+# Davide Truffa <davide@catoblepa.org>, 2008.
+# <luca@jeckodevelopment.it>, 2011.
+# Luca <luca@jeckodevelopment.it>, 2011, 2012.
+msgid ""
+msgstr ""
+"Project-Id-Version: ClipIt\n"
+"Report-Msgid-Bugs-To: Cristian Henzel <oss@rspwn.com>\n"
+"POT-Creation-Date: 2015-11-10 16:39+0200\n"
+"PO-Revision-Date: 2012-04-04 06:30+0000\n"
+"Last-Translator: Cristian Henzel <oss@rspwn.com>\n"
+"Language-Team: Italian (http://www.transifex.net/projects/p/clipit/language/"
+"it/)\n"
+"Language: it\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1)\n"
+
+#: ../data/clipit-startup.desktop.in.h:1 ../data/clipit.desktop.in.h:1
+msgid "ClipIt"
+msgstr ""
+
+#: ../data/clipit-startup.desktop.in.h:2 ../data/clipit.desktop.in.h:2
+#: ../src/main.c:833
+msgid "Clipboard Manager"
+msgstr "Gestore degli appunti"
+
+#: ../src/main.c:287
+msgid "Lightweight GTK+ clipboard manager."
+msgstr "Leggero gestore degli Appunti in GTK+"
+
+#. Actions using:
+#: ../src/main.c:356
+msgid "Actions using:"
+msgstr "Azioni che utilizzano:"
+
+#. Create menu item for empty clipboard contents
+#: ../src/main.c:365 ../src/main.c:382
+msgid "None"
+msgstr "Nessuno"
+
+#: ../src/main.c:385
+msgid "<b>None</b>"
+msgstr "<b>Nessuno</b>"
+
+#. File contained no actions so adding empty
+#. File did not open so adding empty
+#. Nothing in history so adding empty
+#: ../src/main.c:407 ../src/main.c:436 ../src/main.c:600
+msgid "Empty"
+msgstr "Vuoto"
+
+#. Edit actions
+#: ../src/main.c:443
+msgid "_Edit actions"
+msgstr "_Modifica azioni"
+
+#. Offline mode checkbox
+#: ../src/main.c:686
+msgid "_Offline mode"
+msgstr "_Offline mode"
+
+#. Manage history
+#: ../src/main.c:695
+msgid "_Manage history"
+msgstr "_Gestisci cronologia"
+
+#. Create the dialog
+#: ../src/manage.c:138
+msgid "Editing Clipboard"
+msgstr "Modifica Appunti"
+
+#: ../src/manage.c:158
+msgid "_Static item"
+msgstr "_Elemento statico"
+
+#: ../src/manage.c:227
+msgid "Clear the history?"
+msgstr "Cancellare la cronologia?"
+
+#: ../src/manage.c:228
+msgid "Clear history"
+msgstr "Cancella cronologia"
+
+#: ../src/manage.c:348
+msgid "Manage History"
+msgstr "Gestisci cronologia"
+
+#: ../src/manage.c:351
+msgid " (Offline mode)"
+msgstr " (Modalità Offline)"
+
+#: ../src/manage.c:393
+msgid "Results"
+msgstr "Risultati"
+
+#: ../src/manage.c:398
+msgid "Edit"
+msgstr "Modifica"
+
+#: ../src/manage.c:400 ../src/preferences.c:886 ../src/preferences.c:947
+msgid "Remove"
+msgstr "Rimuovi"
+
+#: ../src/manage.c:402
+msgid "Remove all"
+msgstr "Rimuovi tutto"
+
+#: ../src/manage.c:404
+msgid "Close"
+msgstr "Chiudi"
+
+#: ../src/preferences.c:170
+msgid "Save history"
+msgstr "Salva cronologia"
+
+#: ../src/preferences.c:203
+msgid "Remove history file"
+msgstr "Rimuovi file cronologia"
+
+#. Create the dialog
+#: ../src/preferences.c:648
+msgid "Preferences"
+msgstr "Preferenze"
+
+#: ../src/preferences.c:667
+msgid "Settings"
+msgstr "Impostazioni"
+
+#: ../src/preferences.c:675
+msgid "<b>Clipboards</b>"
+msgstr "<b>Appunti</b>"
+
+#: ../src/preferences.c:682
+msgid "Use _Copy (Ctrl-C)"
+msgstr "Usa _Copia (Ctrl-C)"
+
+#: ../src/preferences.c:685
+msgid "Use _Primary (Selection)"
+msgstr "Usa Selezione _Primaria"
+
+#: ../src/preferences.c:688
+msgid "S_ynchronize clipboards"
+msgstr "S_incronizza clipboard"
+
+#: ../src/preferences.c:690
+msgid "_Automatically paste selected item"
+msgstr "_Incolla automaticamente l'elemento selezionato"
+
+#: ../src/preferences.c:699
+msgid "<b>Miscellaneous</b>"
+msgstr "<b>Varie</b>"
+
+#: ../src/preferences.c:706
+msgid "Show _indexes in history menu"
+msgstr "Mostra _indici nel menu cronologia"
+
+#: ../src/preferences.c:708
+msgid "S_ave URIs"
+msgstr "S_alva URIs"
+
+#: ../src/preferences.c:710
+msgid "Capture _hyperlinks only"
+msgstr "Cattura solo _Hyperlink"
+
+#: ../src/preferences.c:712
+msgid "C_onfirm before clearing history"
+msgstr "C_onferma prima di cancellare la cronologia"
+
+#: ../src/preferences.c:714
+msgid "_Use right-click menu"
+msgstr "_Usa il menu contestuale al click destro"
+
+#: ../src/preferences.c:723
+msgid "History"
+msgstr "Cronologia"
+
+#: ../src/preferences.c:731
+msgid "<b>History</b>"
+msgstr "<b>Cronologia</b>"
+
+#: ../src/preferences.c:738
+msgid "Save _history"
+msgstr "Salva _Cronologia"
+
+#: ../src/preferences.c:739
+msgid "Save and restore history between sessions"
+msgstr "Salva e ripristina cronologia fra le sessioni"
+
+#: ../src/preferences.c:743
+msgid "Items in history:"
+msgstr "Elementi nella cronologia:"
+
+#: ../src/preferences.c:752
+msgid "Items in menu:"
+msgstr "Elementi nel menu:"
+
+#: ../src/preferences.c:759
+msgid "Show _static items in menu"
+msgstr "Mostra gli elementi _statici nel menu"
+
+#: ../src/preferences.c:764
+msgid "Static items in menu:"
+msgstr "Elementi statici nel menu:"
+
+#: ../src/preferences.c:777
+msgid "<b>Items</b>"
+msgstr "<b>Elementi</b>"
+
+#: ../src/preferences.c:784
+msgid "Show in a single _line"
+msgstr "Mostra su una singola _riga"
+
+#: ../src/preferences.c:786
+msgid "Show in _reverse order"
+msgstr "Mostra in ordine _inverso"
+
+#: ../src/preferences.c:790
+msgid "Character length of items:"
+msgstr "Lunghezza degli elementi (caratteri):"
+
+#: ../src/preferences.c:799
+msgid "Omit items in the:"
+msgstr "Ometti elementi nella seguente posizione:"
+
+#: ../src/preferences.c:803
+msgid "Beginning"
+msgstr "Inizio"
+
+#: ../src/preferences.c:804
+msgid "Middle"
+msgstr "Centro"
+
+#: ../src/preferences.c:805
+msgid "End"
+msgstr "Fine"
+
+#: ../src/preferences.c:835
+msgid "Actions"
+msgstr "Azioni"
+
+#. Build the actions label
+#: ../src/preferences.c:840
+msgid "Control-click ClipIt's tray icon to use actions"
+msgstr "Control-click sull'icona della tray per usare le azioni"
+
+#: ../src/preferences.c:860
+msgid "Action"
+msgstr "Azione"
+
+#: ../src/preferences.c:867
+msgid "Command"
+msgstr "Comando"
+
+#: ../src/preferences.c:882 ../src/preferences.c:943
+msgid "Add..."
+msgstr "Aggiungi..."
+
+#: ../src/preferences.c:903
+msgid "Exclude"
+msgstr "Escludi"
+
+#. Build the exclude label
+#: ../src/preferences.c:908
+msgid ""
+"Regex list of items that should not be inserted into the history (passwords/"
+"sites that you don't need in history, etc)."
+msgstr ""
+"Lista Regex degli elementi che non dovranno essere inseriti nella cronologia "
+"(password/siti di cui non necessiti nella cronologia, ecc.)"
+
+#: ../src/preferences.c:928
+msgid "Regex"
+msgstr "Regex"
+
+#: ../src/preferences.c:956
+msgid "Hotkeys"
+msgstr "Scorciatoie da tastiera"
+
+#: ../src/preferences.c:964
+msgid "<b>Hotkeys</b>"
+msgstr "<b>Scorciatoie da tastiera</b>"
+
+#: ../src/preferences.c:974
+msgid "History hotkey:"
+msgstr "Cronologia scorciatorie:"
+
+#: ../src/preferences.c:983
+msgid "Actions hotkey:"
+msgstr "Azioni scorciatoie da tastiera:"
+
+#: ../src/preferences.c:992
+msgid "Menu hotkey:"
+msgstr "Menu scorciatoie da tastiera:"
+
+#: ../src/preferences.c:1001
+msgid "Manage hotkey:"
+msgstr "Gestisci scorciatoie da tastiera:"
+
+#: ../src/preferences.c:1010
+msgid "Offline mode hotkey:"
+msgstr "Tasto attivazione modalità offline"
+
+#: ../src/utils.c:40 ../src/utils.c:47
+#, c-format
+msgid "Couldn't create directory: %s\n"
+msgstr "Impossibile creare la directory: %s\n"
+
+#: ../src/utils.c:148
+msgid "Run as daemon"
+msgstr "Esegui come demone"
+
+#: ../src/utils.c:155
+msgid "Do not use status icon (Ctrl-Alt-P for menu)"
+msgstr "Non usare l'icona di stato (Ctrl-Alt-P per il menù)"
+
+#: ../src/utils.c:162
+msgid "Print clipboard contents"
+msgstr "Stampa contenuto degli appunti"
+
+#: ../src/utils.c:169
+msgid "Print primary contents"
+msgstr "Stampa contenuto della selezione primaria"
+
+#: ../src/utils.c:181
+msgid ""
+"Clipboard CLI usage examples:\n"
+"\n"
+" echo \"copied to clipboard\" | clipit\n"
+" clipit \"copied to clipboard\"\n"
+" echo \"copied to clipboard\" | clipit -c"
+msgstr ""
+"Esempi d'uso degli Appunti da terminale:\n"
+"\n"
+" echo \"copiato negli appunti\" | clipit\n"
+" clipit \"copiato negli appunti\"\n"
+" echo \"copiato negli appunti\" | clipit -o"
+
+#: ../src/utils.c:187
+msgid ""
+"Written by Cristian Henzel.\n"
+"Report bugs to <oss@rspwn.com>."
+msgstr ""
+"Scritto da Cristian Henzel.\n"
+"Riporta gli errori a <oss@rspwn.com>."
diff --git a/po/ja.po b/po/ja.po
new file mode 100644
index 0000000..2bb687a
--- /dev/null
+++ b/po/ja.po
@@ -0,0 +1,349 @@
+# ClipIt translation file.
+# Copyright (C) 2010-2012 Cristian Henzel <oss@rspwn.com>
+# This file is distributed under the same license as the ClipIt package.
+#
+# Translators:
+# <jiro.kawada@gmail.com>, 2011.
+# Jiro Kawada <jiro.kawada@gmail.com>, 2008.
+msgid ""
+msgstr ""
+"Project-Id-Version: ClipIt\n"
+"Report-Msgid-Bugs-To: Cristian Henzel <oss@rspwn.com>\n"
+"POT-Creation-Date: 2015-11-10 16:39+0200\n"
+"PO-Revision-Date: 2012-04-04 06:30+0000\n"
+"Last-Translator: Cristian Henzel <oss@rspwn.com>\n"
+"Language-Team: Japanese (http://www.transifex.net/projects/p/clipit/language/"
+"ja/)\n"
+"Language: ja\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=1; plural=0\n"
+
+#: ../data/clipit-startup.desktop.in.h:1 ../data/clipit.desktop.in.h:1
+msgid "ClipIt"
+msgstr ""
+
+#: ../data/clipit-startup.desktop.in.h:2 ../data/clipit.desktop.in.h:2
+#: ../src/main.c:833
+msgid "Clipboard Manager"
+msgstr "クリップボード・マネージャ"
+
+#: ../src/main.c:287
+msgid "Lightweight GTK+ clipboard manager."
+msgstr "軽量な GTK+ クリップボード・マネージャ"
+
+#. Actions using:
+#: ../src/main.c:356
+msgid "Actions using:"
+msgstr "使用アクション:"
+
+#. Create menu item for empty clipboard contents
+#: ../src/main.c:365 ../src/main.c:382
+msgid "None"
+msgstr "なし"
+
+#: ../src/main.c:385
+msgid "<b>None</b>"
+msgstr "<b>なし</b>"
+
+#. File contained no actions so adding empty
+#. File did not open so adding empty
+#. Nothing in history so adding empty
+#: ../src/main.c:407 ../src/main.c:436 ../src/main.c:600
+msgid "Empty"
+msgstr "空"
+
+#. Edit actions
+#: ../src/main.c:443
+msgid "_Edit actions"
+msgstr "アクション編集(_E)"
+
+#. Offline mode checkbox
+#: ../src/main.c:686
+msgid "_Offline mode"
+msgstr ""
+
+#. Manage history
+#: ../src/main.c:695
+msgid "_Manage history"
+msgstr "履歴管理(_M)"
+
+#. Create the dialog
+#: ../src/manage.c:138
+msgid "Editing Clipboard"
+msgstr "クリップボードの編集"
+
+#: ../src/manage.c:158
+msgid "_Static item"
+msgstr "定型登録アイテム(_S)"
+
+#: ../src/manage.c:227
+msgid "Clear the history?"
+msgstr "履歴を消去しますか?"
+
+#: ../src/manage.c:228
+msgid "Clear history"
+msgstr "履歴の消去"
+
+#: ../src/manage.c:348
+msgid "Manage History"
+msgstr "履歴管理"
+
+#: ../src/manage.c:351
+msgid " (Offline mode)"
+msgstr ""
+
+#: ../src/manage.c:393
+msgid "Results"
+msgstr "検索結果"
+
+#: ../src/manage.c:398
+msgid "Edit"
+msgstr "編集"
+
+#: ../src/manage.c:400 ../src/preferences.c:886 ../src/preferences.c:947
+msgid "Remove"
+msgstr "削除"
+
+#: ../src/manage.c:402
+msgid "Remove all"
+msgstr "全て削除"
+
+#: ../src/manage.c:404
+msgid "Close"
+msgstr "閉じる"
+
+#: ../src/preferences.c:170
+msgid "Save history"
+msgstr "履歴の保存"
+
+#: ../src/preferences.c:203
+msgid "Remove history file"
+msgstr "履歴ファイルの削除"
+
+#. Create the dialog
+#: ../src/preferences.c:648
+msgid "Preferences"
+msgstr "環境設定"
+
+#: ../src/preferences.c:667
+msgid "Settings"
+msgstr "設定"
+
+#: ../src/preferences.c:675
+msgid "<b>Clipboards</b>"
+msgstr "<b>クリップボード</b>"
+
+#: ../src/preferences.c:682
+msgid "Use _Copy (Ctrl-C)"
+msgstr "コピー(Ctrl-C)を使用する(_C)"
+
+#: ../src/preferences.c:685
+msgid "Use _Primary (Selection)"
+msgstr "プライマリ(セレクション)を使用する(_P)"
+
+#: ../src/preferences.c:688
+msgid "S_ynchronize clipboards"
+msgstr "クリップボード同士を同期する(_Y)"
+
+#: ../src/preferences.c:690
+msgid "_Automatically paste selected item"
+msgstr "選択アイテムを自動的に貼り付ける(_A)"
+
+#: ../src/preferences.c:699
+msgid "<b>Miscellaneous</b>"
+msgstr "<b>その他</b>"
+
+#: ../src/preferences.c:706
+msgid "Show _indexes in history menu"
+msgstr "履歴メニューで番号を表示する(_I)"
+
+#: ../src/preferences.c:708
+msgid "S_ave URIs"
+msgstr "URI を保存する(_A)"
+
+#: ../src/preferences.c:710
+msgid "Capture _hyperlinks only"
+msgstr "ハイパーリンクのみを取り込む(_H)"
+
+#: ../src/preferences.c:712
+msgid "C_onfirm before clearing history"
+msgstr "履歴を消去する前に確認を取る(_O)"
+
+#: ../src/preferences.c:714
+msgid "_Use right-click menu"
+msgstr "右クリックメニューを使用する(_U)"
+
+#: ../src/preferences.c:723
+msgid "History"
+msgstr "履歴"
+
+#: ../src/preferences.c:731
+msgid "<b>History</b>"
+msgstr "<b>履歴</b>"
+
+#: ../src/preferences.c:738
+msgid "Save _history"
+msgstr "履歴を保存する(_H)"
+
+#: ../src/preferences.c:739
+msgid "Save and restore history between sessions"
+msgstr "セッションをまたぐ履歴の保存と復元"
+
+#: ../src/preferences.c:743
+msgid "Items in history:"
+msgstr "履歴アイテム数:"
+
+#: ../src/preferences.c:752
+msgid "Items in menu:"
+msgstr "メニューでのアイテム表示数:"
+
+#: ../src/preferences.c:759
+msgid "Show _static items in menu"
+msgstr "定型登録アイテムをメニューに表示する(_S)"
+
+#: ../src/preferences.c:764
+msgid "Static items in menu:"
+msgstr "メニューでの登録アイテム表示数:"
+
+#: ../src/preferences.c:777
+msgid "<b>Items</b>"
+msgstr "<b>アイテム</b>"
+
+#: ../src/preferences.c:784
+msgid "Show in a single _line"
+msgstr "1行で表示する(_L)"
+
+#: ../src/preferences.c:786
+msgid "Show in _reverse order"
+msgstr "逆順に表示(_R)"
+
+#: ../src/preferences.c:790
+msgid "Character length of items:"
+msgstr "アイテムの表示文字数:"
+
+#: ../src/preferences.c:799
+msgid "Omit items in the:"
+msgstr "アイテムの省略表示:"
+
+#: ../src/preferences.c:803
+msgid "Beginning"
+msgstr "文頭"
+
+#: ../src/preferences.c:804
+msgid "Middle"
+msgstr "文中"
+
+#: ../src/preferences.c:805
+msgid "End"
+msgstr "文末"
+
+#: ../src/preferences.c:835
+msgid "Actions"
+msgstr "アクション"
+
+#. Build the actions label
+#: ../src/preferences.c:840
+msgid "Control-click ClipIt's tray icon to use actions"
+msgstr "アクションの使用には Ctrl + ClipItのトレイアイコンをクリック"
+
+#: ../src/preferences.c:860
+msgid "Action"
+msgstr "アクション"
+
+#: ../src/preferences.c:867
+msgid "Command"
+msgstr "コマンド"
+
+#: ../src/preferences.c:882 ../src/preferences.c:943
+msgid "Add..."
+msgstr "追加..."
+
+#: ../src/preferences.c:903
+msgid "Exclude"
+msgstr "除外対象"
+
+#. Build the exclude label
+#: ../src/preferences.c:908
+msgid ""
+"Regex list of items that should not be inserted into the history (passwords/"
+"sites that you don't need in history, etc)."
+msgstr ""
+"履歴に挿入されないようにするアイテムの正規表現リスト(履歴に不要なパスワード/"
+"サイト等)"
+
+#: ../src/preferences.c:928
+msgid "Regex"
+msgstr "正規表現"
+
+#: ../src/preferences.c:956
+msgid "Hotkeys"
+msgstr "ホットキー"
+
+#: ../src/preferences.c:964
+msgid "<b>Hotkeys</b>"
+msgstr "<b>ホットキー</b>"
+
+#: ../src/preferences.c:974
+msgid "History hotkey:"
+msgstr "履歴のホットキー:"
+
+#: ../src/preferences.c:983
+msgid "Actions hotkey:"
+msgstr "アクションのホットキー:"
+
+#: ../src/preferences.c:992
+msgid "Menu hotkey:"
+msgstr "メニューのホットキー:"
+
+#: ../src/preferences.c:1001
+msgid "Manage hotkey:"
+msgstr "管理のホットキー:"
+
+#: ../src/preferences.c:1010
+msgid "Offline mode hotkey:"
+msgstr ""
+
+#: ../src/utils.c:40 ../src/utils.c:47
+#, c-format
+msgid "Couldn't create directory: %s\n"
+msgstr "ディレクトリの作成ができませんでした。: %s\n"
+
+#: ../src/utils.c:148
+msgid "Run as daemon"
+msgstr "デーモンとして実行する"
+
+#: ../src/utils.c:155
+msgid "Do not use status icon (Ctrl-Alt-P for menu)"
+msgstr "ステータスアイコンを使用しない(Ctrl-Alt-P でメニュー)"
+
+#: ../src/utils.c:162
+msgid "Print clipboard contents"
+msgstr "クリップボード内容を出力する"
+
+#: ../src/utils.c:169
+msgid "Print primary contents"
+msgstr "プライマリ内容を出力する"
+
+#: ../src/utils.c:181
+msgid ""
+"Clipboard CLI usage examples:\n"
+"\n"
+" echo \"copied to clipboard\" | clipit\n"
+" clipit \"copied to clipboard\"\n"
+" echo \"copied to clipboard\" | clipit -c"
+msgstr ""
+"クリップボードの CLI の使用例:\n"
+"\n"
+" echo \"クリップボードにコピー\" | clipit\n"
+" clipit \"クリップボードにコピー\"\n"
+" echo \"クリップボードにコピー\" | clipit -c"
+
+#: ../src/utils.c:187
+msgid ""
+"Written by Cristian Henzel.\n"
+"Report bugs to <oss@rspwn.com>."
+msgstr ""
+"Written by Cristian Henzel.\n"
+"Report bugs to <oss@rspwn.com>."
diff --git a/po/lt.po b/po/lt.po
new file mode 100644
index 0000000..02b43a8
--- /dev/null
+++ b/po/lt.po
@@ -0,0 +1,349 @@
+# ClipIt translation file.
+# Copyright (C) 2010-2012 Cristian Henzel <oss@rspwn.com>
+# This file is distributed under the same license as the ClipIt package.
+#
+# Translators:
+# Anielius <dalelemanes@gmail.com>, 2012.
+msgid ""
+msgstr ""
+"Project-Id-Version: ClipIt\n"
+"Report-Msgid-Bugs-To: Cristian Henzel <oss@rspwn.com>\n"
+"POT-Creation-Date: 2015-11-10 16:39+0200\n"
+"PO-Revision-Date: 2012-04-04 06:30+0000\n"
+"Last-Translator: Cristian Henzel <oss@rspwn.com>\n"
+"Language-Team: Lithuanian (http://www.transifex.net/projects/p/clipit/"
+"language/lt/)\n"
+"Language: lt\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n"
+"%100<10 || n%100>=20) ? 1 : 2)\n"
+
+#: ../data/clipit-startup.desktop.in.h:1 ../data/clipit.desktop.in.h:1
+msgid "ClipIt"
+msgstr ""
+
+#: ../data/clipit-startup.desktop.in.h:2 ../data/clipit.desktop.in.h:2
+#: ../src/main.c:833
+msgid "Clipboard Manager"
+msgstr "Iškarpinės tvarkytuvė"
+
+#: ../src/main.c:287
+msgid "Lightweight GTK+ clipboard manager."
+msgstr "Supaprastinta GTK+ iškarpinės tvarkytuvė."
+
+#. Actions using:
+#: ../src/main.c:356
+msgid "Actions using:"
+msgstr "Naudojami veiksmai:"
+
+#. Create menu item for empty clipboard contents
+#: ../src/main.c:365 ../src/main.c:382
+msgid "None"
+msgstr "Nieko"
+
+#: ../src/main.c:385
+msgid "<b>None</b>"
+msgstr "<b>Nieko</b>"
+
+#. File contained no actions so adding empty
+#. File did not open so adding empty
+#. Nothing in history so adding empty
+#: ../src/main.c:407 ../src/main.c:436 ../src/main.c:600
+msgid "Empty"
+msgstr "Tuščia"
+
+#. Edit actions
+#: ../src/main.c:443
+msgid "_Edit actions"
+msgstr "_Keisti veiksmus"
+
+#. Offline mode checkbox
+#: ../src/main.c:686
+msgid "_Offline mode"
+msgstr ""
+
+#. Manage history
+#: ../src/main.c:695
+msgid "_Manage history"
+msgstr "_Tvarkyti žurnalą"
+
+#. Create the dialog
+#: ../src/manage.c:138
+msgid "Editing Clipboard"
+msgstr "Taisoma iškarpinė"
+
+#: ../src/manage.c:158
+msgid "_Static item"
+msgstr "_Statinis elementas"
+
+#: ../src/manage.c:227
+msgid "Clear the history?"
+msgstr "Išvalyti žurnalą?"
+
+#: ../src/manage.c:228
+msgid "Clear history"
+msgstr "Išvalyti žurnalą"
+
+#: ../src/manage.c:348
+msgid "Manage History"
+msgstr "Tvarkyti žurnalą"
+
+#: ../src/manage.c:351
+msgid " (Offline mode)"
+msgstr ""
+
+#: ../src/manage.c:393
+msgid "Results"
+msgstr "Rezultatai"
+
+#: ../src/manage.c:398
+msgid "Edit"
+msgstr "Taisyti"
+
+#: ../src/manage.c:400 ../src/preferences.c:886 ../src/preferences.c:947
+msgid "Remove"
+msgstr "Pašalinti"
+
+#: ../src/manage.c:402
+msgid "Remove all"
+msgstr "Ištrinti visus"
+
+#: ../src/manage.c:404
+msgid "Close"
+msgstr "Uždaryti"
+
+#: ../src/preferences.c:170
+msgid "Save history"
+msgstr "Išsaugoti žurnalą"
+
+#: ../src/preferences.c:203
+msgid "Remove history file"
+msgstr "Pašalinti žurnalo failą"
+
+#. Create the dialog
+#: ../src/preferences.c:648
+msgid "Preferences"
+msgstr "Parinktys"
+
+#: ../src/preferences.c:667
+msgid "Settings"
+msgstr "Nuostatos"
+
+#: ../src/preferences.c:675
+msgid "<b>Clipboards</b>"
+msgstr "<b>Iškarpinės</b>"
+
+#: ../src/preferences.c:682
+msgid "Use _Copy (Ctrl-C)"
+msgstr "Naudoti _kopijavimą (Ctrl-C)"
+
+#: ../src/preferences.c:685
+msgid "Use _Primary (Selection)"
+msgstr "Naudoti _pirminį (Žymėjimą)"
+
+#: ../src/preferences.c:688
+msgid "S_ynchronize clipboards"
+msgstr "S_inchronizuoti iškarpines"
+
+#: ../src/preferences.c:690
+msgid "_Automatically paste selected item"
+msgstr "_Automatiškai įdėti pasirinktą elementą"
+
+#: ../src/preferences.c:699
+msgid "<b>Miscellaneous</b>"
+msgstr "<b>Įvairūs</b>"
+
+#: ../src/preferences.c:706
+msgid "Show _indexes in history menu"
+msgstr "Rodyti _rodykles žurnalo meniu"
+
+#: ../src/preferences.c:708
+msgid "S_ave URIs"
+msgstr "I_šsaugoti URIs"
+
+#: ../src/preferences.c:710
+msgid "Capture _hyperlinks only"
+msgstr "Paimti tik _saitus"
+
+#: ../src/preferences.c:712
+msgid "C_onfirm before clearing history"
+msgstr "P_atvirtinti prieš išvalant žurnalą"
+
+#: ../src/preferences.c:714
+msgid "_Use right-click menu"
+msgstr "_Naudoti kontekstinį meniu"
+
+#: ../src/preferences.c:723
+msgid "History"
+msgstr "Žurnalas"
+
+#: ../src/preferences.c:731
+msgid "<b>History</b>"
+msgstr "<b>Žurnalas</b>"
+
+#: ../src/preferences.c:738
+msgid "Save _history"
+msgstr "Išsaugoti _žurnalą"
+
+#: ../src/preferences.c:739
+msgid "Save and restore history between sessions"
+msgstr "Išsaugoti ir atkurti žurnalą tarp siansų"
+
+#: ../src/preferences.c:743
+msgid "Items in history:"
+msgstr "Elementai žurnale:"
+
+#: ../src/preferences.c:752
+msgid "Items in menu:"
+msgstr "Meniu elementai:"
+
+#: ../src/preferences.c:759
+msgid "Show _static items in menu"
+msgstr "Rodyti _statinius meniu elementus"
+
+#: ../src/preferences.c:764
+msgid "Static items in menu:"
+msgstr "Statiniai meniu elementai:"
+
+#: ../src/preferences.c:777
+msgid "<b>Items</b>"
+msgstr "<b>Elementai</b>"
+
+#: ../src/preferences.c:784
+msgid "Show in a single _line"
+msgstr "Rodyti vienoje _eilutėje"
+
+#: ../src/preferences.c:786
+msgid "Show in _reverse order"
+msgstr "Rodyti _apverstoje rikiuotėje"
+
+#: ../src/preferences.c:790
+msgid "Character length of items:"
+msgstr "Elementų rašmens ilgis:"
+
+#: ../src/preferences.c:799
+msgid "Omit items in the:"
+msgstr "Praleisti elementus:"
+
+#: ../src/preferences.c:803
+msgid "Beginning"
+msgstr "Pradžioje"
+
+#: ../src/preferences.c:804
+msgid "Middle"
+msgstr "Viduryje"
+
+#: ../src/preferences.c:805
+msgid "End"
+msgstr "Pabaigoje"
+
+#: ../src/preferences.c:835
+msgid "Actions"
+msgstr "Veiksmai"
+
+#. Build the actions label
+#: ../src/preferences.c:840
+msgid "Control-click ClipIt's tray icon to use actions"
+msgstr "Paspauskite valdymą ant Clipit's piktoramos, veiksmui panaudoti"
+
+#: ../src/preferences.c:860
+msgid "Action"
+msgstr "Veiksmas"
+
+#: ../src/preferences.c:867
+msgid "Command"
+msgstr "Komanda"
+
+#: ../src/preferences.c:882 ../src/preferences.c:943
+msgid "Add..."
+msgstr "Pridėti..."
+
+#: ../src/preferences.c:903
+msgid "Exclude"
+msgstr "Išbraukti"
+
+#. Build the exclude label
+#: ../src/preferences.c:908
+msgid ""
+"Regex list of items that should not be inserted into the history (passwords/"
+"sites that you don't need in history, etc)."
+msgstr ""
+"Elementų reguliariojo reiškinio sąrašas, kurie neturėtų būti įtraukti į "
+"žurnalą (slaptažodžiai/saitai, kurie Jums nereikalingi žurnale, ir panašiai)."
+
+#: ../src/preferences.c:928
+msgid "Regex"
+msgstr "Reg.reiškinys"
+
+#: ../src/preferences.c:956
+msgid "Hotkeys"
+msgstr "Spartieji klavišai"
+
+#: ../src/preferences.c:964
+msgid "<b>Hotkeys</b>"
+msgstr "<b>Spartieji klavišai</b>"
+
+#: ../src/preferences.c:974
+msgid "History hotkey:"
+msgstr "Sp.klavišo istorija:"
+
+#: ../src/preferences.c:983
+msgid "Actions hotkey:"
+msgstr "Sp.klavišo veiksmai:"
+
+#: ../src/preferences.c:992
+msgid "Menu hotkey:"
+msgstr "Sp.klavišo meniu:"
+
+#: ../src/preferences.c:1001
+msgid "Manage hotkey:"
+msgstr "Sp.klavišo valdymas:"
+
+#: ../src/preferences.c:1010
+msgid "Offline mode hotkey:"
+msgstr ""
+
+#: ../src/utils.c:40 ../src/utils.c:47
+#, c-format
+msgid "Couldn't create directory: %s\n"
+msgstr "Nepavyko sukurti katalogo: %s\n"
+
+#: ../src/utils.c:148
+msgid "Run as daemon"
+msgstr "Paleisti kaip tarnybą"
+
+#: ../src/utils.c:155
+msgid "Do not use status icon (Ctrl-Alt-P for menu)"
+msgstr "Nenaudoti būsenos piktogramos (Ctrl-Alt-P meniu juostoje)"
+
+#: ../src/utils.c:162
+msgid "Print clipboard contents"
+msgstr "Spausdinti iškarpinės turinį"
+
+#: ../src/utils.c:169
+msgid "Print primary contents"
+msgstr "Spausdinti pagrindinį turinį"
+
+#: ../src/utils.c:181
+msgid ""
+"Clipboard CLI usage examples:\n"
+"\n"
+" echo \"copied to clipboard\" | clipit\n"
+" clipit \"copied to clipboard\"\n"
+" echo \"copied to clipboard\" | clipit -c"
+msgstr ""
+"Iškarpinės CLI naudojimosi pavydžiai:\n"
+"\n"
+" echo \"kopijuoti į iškarpinę\" | clipit\n"
+" clipit \"kopijuoti į iškarpinę\"\n"
+" echo \"kopijuoti į iškarpinę\" | clipit -c"
+
+#: ../src/utils.c:187
+msgid ""
+"Written by Cristian Henzel.\n"
+"Report bugs to <oss@rspwn.com>."
+msgstr ""
+"Sukūrė Cristian Henzel.\n"
+"Pranešti apie klaidas <oss@rspwn.com>."
diff --git a/po/nb.po b/po/nb.po
new file mode 100644
index 0000000..a2bdffb
--- /dev/null
+++ b/po/nb.po
@@ -0,0 +1,338 @@
+# ClipIt translation file.
+# Copyright (C) 2010-2012 Cristian Henzel <oss@rspwn.com>
+# This file is distributed under the same license as the ClipIt package.
+#
+# Translators:
+# Øyvind Sæther <oyvinds@everdot.org>, 2009.
+msgid ""
+msgstr ""
+"Project-Id-Version: ClipIt\n"
+"Report-Msgid-Bugs-To: Cristian Henzel <oss@rspwn.com>\n"
+"POT-Creation-Date: 2015-11-10 16:39+0200\n"
+"PO-Revision-Date: 2012-04-04 06:30+0000\n"
+"Last-Translator: Cristian Henzel <oss@rspwn.com>\n"
+"Language-Team: Cristian Henzel <oss@rspwn.com>\n"
+"Language: nb\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1)\n"
+
+#: ../data/clipit-startup.desktop.in.h:1 ../data/clipit.desktop.in.h:1
+msgid "ClipIt"
+msgstr ""
+
+#: ../data/clipit-startup.desktop.in.h:2 ../data/clipit.desktop.in.h:2
+#: ../src/main.c:833
+msgid "Clipboard Manager"
+msgstr "Utklippstavleverkty"
+
+#: ../src/main.c:287
+msgid "Lightweight GTK+ clipboard manager."
+msgstr "Lettvekts GTK+ utklippstavlebehandler"
+
+#. Actions using:
+#: ../src/main.c:356
+msgid "Actions using:"
+msgstr ""
+
+#. Create menu item for empty clipboard contents
+#: ../src/main.c:365 ../src/main.c:382
+msgid "None"
+msgstr ""
+
+#: ../src/main.c:385
+msgid "<b>None</b>"
+msgstr "<b>Ingen</b>"
+
+#. File contained no actions so adding empty
+#. File did not open so adding empty
+#. Nothing in history so adding empty
+#: ../src/main.c:407 ../src/main.c:436 ../src/main.c:600
+msgid "Empty"
+msgstr "Tom "
+
+#. Edit actions
+#: ../src/main.c:443
+msgid "_Edit actions"
+msgstr "_Rediger handlinger"
+
+#. Offline mode checkbox
+#: ../src/main.c:686
+msgid "_Offline mode"
+msgstr ""
+
+#. Manage history
+#: ../src/main.c:695
+msgid "_Manage history"
+msgstr ""
+
+#. Create the dialog
+#: ../src/manage.c:138
+msgid "Editing Clipboard"
+msgstr "Redigerer Utklippstavlen"
+
+#: ../src/manage.c:158
+msgid "_Static item"
+msgstr ""
+
+#: ../src/manage.c:227
+msgid "Clear the history?"
+msgstr "Tm historikken?"
+
+#: ../src/manage.c:228
+msgid "Clear history"
+msgstr ""
+
+#: ../src/manage.c:348
+msgid "Manage History"
+msgstr ""
+
+#: ../src/manage.c:351
+msgid " (Offline mode)"
+msgstr ""
+
+#: ../src/manage.c:393
+msgid "Results"
+msgstr ""
+
+#: ../src/manage.c:398
+msgid "Edit"
+msgstr ""
+
+#: ../src/manage.c:400 ../src/preferences.c:886 ../src/preferences.c:947
+msgid "Remove"
+msgstr "Fjern"
+
+#: ../src/manage.c:402
+msgid "Remove all"
+msgstr ""
+
+#: ../src/manage.c:404
+msgid "Close"
+msgstr ""
+
+#: ../src/preferences.c:170
+msgid "Save history"
+msgstr ""
+
+#: ../src/preferences.c:203
+msgid "Remove history file"
+msgstr ""
+
+#. Create the dialog
+#: ../src/preferences.c:648
+msgid "Preferences"
+msgstr "Tilpass ClipIt "
+
+#: ../src/preferences.c:667
+msgid "Settings"
+msgstr ""
+
+#: ../src/preferences.c:675
+msgid "<b>Clipboards</b>"
+msgstr "<b>Utklippstavler</b>"
+
+#: ../src/preferences.c:682
+msgid "Use _Copy (Ctrl-C)"
+msgstr "Bruk _Kopier (Ctrl-C)"
+
+#: ../src/preferences.c:685
+msgid "Use _Primary (Selection)"
+msgstr "Bruk _Primr (Utvalg)"
+
+#: ../src/preferences.c:688
+msgid "S_ynchronize clipboards"
+msgstr ""
+
+#: ../src/preferences.c:690
+msgid "_Automatically paste selected item"
+msgstr ""
+
+#: ../src/preferences.c:699
+msgid "<b>Miscellaneous</b>"
+msgstr "<b>Diverse</b>"
+
+#: ../src/preferences.c:706
+msgid "Show _indexes in history menu"
+msgstr ""
+
+#: ../src/preferences.c:708
+msgid "S_ave URIs"
+msgstr ""
+
+#: ../src/preferences.c:710
+msgid "Capture _hyperlinks only"
+msgstr "Bare fang _hyperlenker"
+
+#: ../src/preferences.c:712
+msgid "C_onfirm before clearing history"
+msgstr "Bekreft fr tmming av hist_orikk"
+
+#: ../src/preferences.c:714
+msgid "_Use right-click menu"
+msgstr ""
+
+#: ../src/preferences.c:723
+msgid "History"
+msgstr ""
+
+#: ../src/preferences.c:731
+msgid "<b>History</b>"
+msgstr "<b>Historikk</b>"
+
+#: ../src/preferences.c:738
+msgid "Save _history"
+msgstr ""
+
+#: ../src/preferences.c:739
+msgid "Save and restore history between sessions"
+msgstr "Lagre og gjenopprett mellom sesjoner"
+
+#: ../src/preferences.c:743
+msgid "Items in history:"
+msgstr "Elementer i historikken:"
+
+#: ../src/preferences.c:752
+msgid "Items in menu:"
+msgstr ""
+
+#: ../src/preferences.c:759
+msgid "Show _static items in menu"
+msgstr ""
+
+#: ../src/preferences.c:764
+msgid "Static items in menu:"
+msgstr ""
+
+#: ../src/preferences.c:777
+msgid "<b>Items</b>"
+msgstr "<b>Elementer</b>"
+
+#: ../src/preferences.c:784
+msgid "Show in a single _line"
+msgstr ""
+
+#: ../src/preferences.c:786
+msgid "Show in _reverse order"
+msgstr "Vis i _omvendt rekkeflge"
+
+#: ../src/preferences.c:790
+msgid "Character length of items:"
+msgstr "Tegnlengde p elementer:"
+
+#: ../src/preferences.c:799
+msgid "Omit items in the:"
+msgstr "Unng elementer i:"
+
+#: ../src/preferences.c:803
+msgid "Beginning"
+msgstr "Begynnelse"
+
+#: ../src/preferences.c:804
+msgid "Middle"
+msgstr "Midtpunkt"
+
+#: ../src/preferences.c:805
+msgid "End"
+msgstr "Slutt"
+
+#: ../src/preferences.c:835
+msgid "Actions"
+msgstr "Handlinger"
+
+#. Build the actions label
+#: ../src/preferences.c:840
+msgid "Control-click ClipIt's tray icon to use actions"
+msgstr "Hold Ctrl og klikk ClipIts ikon for bruke handlinger"
+
+#: ../src/preferences.c:860
+msgid "Action"
+msgstr "Handling"
+
+#: ../src/preferences.c:867
+msgid "Command"
+msgstr "Kommando"
+
+#: ../src/preferences.c:882 ../src/preferences.c:943
+msgid "Add..."
+msgstr "Legg til..."
+
+#: ../src/preferences.c:903
+msgid "Exclude"
+msgstr ""
+
+#. Build the exclude label
+#: ../src/preferences.c:908
+msgid ""
+"Regex list of items that should not be inserted into the history (passwords/"
+"sites that you don't need in history, etc)."
+msgstr ""
+
+#: ../src/preferences.c:928
+msgid "Regex"
+msgstr ""
+
+#: ../src/preferences.c:956
+msgid "Hotkeys"
+msgstr ""
+
+#: ../src/preferences.c:964
+msgid "<b>Hotkeys</b>"
+msgstr "<b>Hurtigtaster</b>"
+
+#: ../src/preferences.c:974
+msgid "History hotkey:"
+msgstr ""
+
+#: ../src/preferences.c:983
+msgid "Actions hotkey:"
+msgstr ""
+
+#: ../src/preferences.c:992
+msgid "Menu hotkey:"
+msgstr ""
+
+#: ../src/preferences.c:1001
+msgid "Manage hotkey:"
+msgstr ""
+
+#: ../src/preferences.c:1010
+msgid "Offline mode hotkey:"
+msgstr ""
+
+#: ../src/utils.c:40 ../src/utils.c:47
+#, c-format
+msgid "Couldn't create directory: %s\n"
+msgstr "Kunne ikke opprette mappe: %s\n"
+
+#: ../src/utils.c:148
+msgid "Run as daemon"
+msgstr "Kjr i bakgrunnen"
+
+#: ../src/utils.c:155
+msgid "Do not use status icon (Ctrl-Alt-P for menu)"
+msgstr "Ikke vis statusikon (Ctrl-Alt-P for menyen)"
+
+#: ../src/utils.c:162
+msgid "Print clipboard contents"
+msgstr "Skriv ut utklippstavlens innhold"
+
+#: ../src/utils.c:169
+msgid "Print primary contents"
+msgstr ""
+
+#: ../src/utils.c:181
+msgid ""
+"Clipboard CLI usage examples:\n"
+"\n"
+" echo \"copied to clipboard\" | clipit\n"
+" clipit \"copied to clipboard\"\n"
+" echo \"copied to clipboard\" | clipit -c"
+msgstr ""
+
+#: ../src/utils.c:187
+msgid ""
+"Written by Cristian Henzel.\n"
+"Report bugs to <oss@rspwn.com>."
+msgstr ""
diff --git a/po/pl.po b/po/pl.po
new file mode 100644
index 0000000..8427548
--- /dev/null
+++ b/po/pl.po
@@ -0,0 +1,344 @@
+# ClipIt translation file.
+# Copyright (C) 2010-2012 Cristian Henzel <oss@rspwn.com>
+# This file is distributed under the same license as the ClipIt package.
+#
+# Translators:
+# Tomasz Rusek <tomek.rusek@gmail.com>, 2009.
+msgid ""
+msgstr ""
+"Project-Id-Version: ClipIt\n"
+"Report-Msgid-Bugs-To: Cristian Henzel <oss@rspwn.com>\n"
+"POT-Creation-Date: 2015-11-10 16:39+0200\n"
+"PO-Revision-Date: 2012-04-04 06:30+0000\n"
+"Last-Translator: Cristian Henzel <oss@rspwn.com>\n"
+"Language-Team: Cristian Henzel <oss@rspwn.com>\n"
+"Language: pl\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
+"|| n%100>=20) ? 1 : 2)\n"
+
+#: ../data/clipit-startup.desktop.in.h:1 ../data/clipit.desktop.in.h:1
+msgid "ClipIt"
+msgstr ""
+
+#: ../data/clipit-startup.desktop.in.h:2 ../data/clipit.desktop.in.h:2
+#: ../src/main.c:833
+msgid "Clipboard Manager"
+msgstr "Schowek"
+
+#: ../src/main.c:287
+msgid "Lightweight GTK+ clipboard manager."
+msgstr "Lekki menedżer schowka w GTK+."
+
+#. Actions using:
+#: ../src/main.c:356
+msgid "Actions using:"
+msgstr ""
+
+#. Create menu item for empty clipboard contents
+#: ../src/main.c:365 ../src/main.c:382
+msgid "None"
+msgstr ""
+
+#: ../src/main.c:385
+msgid "<b>None</b>"
+msgstr "<b>Żadne</b>"
+
+#. File contained no actions so adding empty
+#. File did not open so adding empty
+#. Nothing in history so adding empty
+#: ../src/main.c:407 ../src/main.c:436 ../src/main.c:600
+msgid "Empty"
+msgstr "pusty"
+
+#. Edit actions
+#: ../src/main.c:443
+msgid "_Edit actions"
+msgstr "_Edytuj akcje"
+
+#. Offline mode checkbox
+#: ../src/main.c:686
+msgid "_Offline mode"
+msgstr ""
+
+#. Manage history
+#: ../src/main.c:695
+msgid "_Manage history"
+msgstr ""
+
+#. Create the dialog
+#: ../src/manage.c:138
+msgid "Editing Clipboard"
+msgstr "Edytuj zawartość schowka"
+
+#: ../src/manage.c:158
+msgid "_Static item"
+msgstr ""
+
+#: ../src/manage.c:227
+msgid "Clear the history?"
+msgstr "Wyczyścić historię?"
+
+#: ../src/manage.c:228
+msgid "Clear history"
+msgstr ""
+
+#: ../src/manage.c:348
+msgid "Manage History"
+msgstr ""
+
+#: ../src/manage.c:351
+msgid " (Offline mode)"
+msgstr ""
+
+#: ../src/manage.c:393
+msgid "Results"
+msgstr ""
+
+#: ../src/manage.c:398
+msgid "Edit"
+msgstr ""
+
+#: ../src/manage.c:400 ../src/preferences.c:886 ../src/preferences.c:947
+msgid "Remove"
+msgstr "Usuń"
+
+#: ../src/manage.c:402
+msgid "Remove all"
+msgstr ""
+
+#: ../src/manage.c:404
+msgid "Close"
+msgstr ""
+
+#: ../src/preferences.c:170
+msgid "Save history"
+msgstr ""
+
+#: ../src/preferences.c:203
+msgid "Remove history file"
+msgstr ""
+
+#. Create the dialog
+#: ../src/preferences.c:648
+msgid "Preferences"
+msgstr "Preferencje"
+
+#: ../src/preferences.c:667
+msgid "Settings"
+msgstr ""
+
+#: ../src/preferences.c:675
+msgid "<b>Clipboards</b>"
+msgstr "<b>Schowki</b>"
+
+#: ../src/preferences.c:682
+msgid "Use _Copy (Ctrl-C)"
+msgstr "Użyj do skopiowanego tekstu (Ctrl-C)"
+
+#: ../src/preferences.c:685
+msgid "Use _Primary (Selection)"
+msgstr "Użyj do zaznaczonego tekstu"
+
+#: ../src/preferences.c:688
+msgid "S_ynchronize clipboards"
+msgstr "S_ynchronizuj schowki"
+
+#: ../src/preferences.c:690
+msgid "_Automatically paste selected item"
+msgstr ""
+
+#: ../src/preferences.c:699
+msgid "<b>Miscellaneous</b>"
+msgstr "<b>Różne</b>"
+
+#: ../src/preferences.c:706
+msgid "Show _indexes in history menu"
+msgstr ""
+
+#: ../src/preferences.c:708
+msgid "S_ave URIs"
+msgstr ""
+
+#: ../src/preferences.c:710
+msgid "Capture _hyperlinks only"
+msgstr "Kopiuj tylko _hiperlinki"
+
+#: ../src/preferences.c:712
+msgid "C_onfirm before clearing history"
+msgstr "Potwierdź usunię_cie historii"
+
+#: ../src/preferences.c:714
+msgid "_Use right-click menu"
+msgstr ""
+
+#: ../src/preferences.c:723
+msgid "History"
+msgstr ""
+
+#: ../src/preferences.c:731
+msgid "<b>History</b>"
+msgstr "<b>Historia</b>"
+
+#: ../src/preferences.c:738
+msgid "Save _history"
+msgstr ""
+
+#: ../src/preferences.c:739
+msgid "Save and restore history between sessions"
+msgstr "Przywracaj historię po zamknięciu sesji"
+
+#: ../src/preferences.c:743
+msgid "Items in history:"
+msgstr "Pozycje w historii:"
+
+#: ../src/preferences.c:752
+msgid "Items in menu:"
+msgstr ""
+
+#: ../src/preferences.c:759
+msgid "Show _static items in menu"
+msgstr ""
+
+#: ../src/preferences.c:764
+msgid "Static items in menu:"
+msgstr ""
+
+#: ../src/preferences.c:777
+msgid "<b>Items</b>"
+msgstr "<b>Pozycje w schowku</b>"
+
+#: ../src/preferences.c:784
+msgid "Show in a single _line"
+msgstr ""
+
+#: ../src/preferences.c:786
+msgid "Show in _reverse order"
+msgstr "Odw_róć kolejność"
+
+#: ../src/preferences.c:790
+msgid "Character length of items:"
+msgstr "Długość w znakach:"
+
+#: ../src/preferences.c:799
+msgid "Omit items in the:"
+msgstr "Omiń pozycje:"
+
+#: ../src/preferences.c:803
+msgid "Beginning"
+msgstr "Początek"
+
+#: ../src/preferences.c:804
+msgid "Middle"
+msgstr "Środek"
+
+#: ../src/preferences.c:805
+msgid "End"
+msgstr "Koniec"
+
+#: ../src/preferences.c:835
+msgid "Actions"
+msgstr "Akcje"
+
+#. Build the actions label
+#: ../src/preferences.c:840
+msgid "Control-click ClipIt's tray icon to use actions"
+msgstr "Kliknij na ikonę ClipIt trzymając Ctrl, aby użyć akcji "
+
+#: ../src/preferences.c:860
+msgid "Action"
+msgstr "Akcja"
+
+#: ../src/preferences.c:867
+msgid "Command"
+msgstr "Komenda"
+
+#: ../src/preferences.c:882 ../src/preferences.c:943
+msgid "Add..."
+msgstr "Dodaj..."
+
+#: ../src/preferences.c:903
+msgid "Exclude"
+msgstr ""
+
+#. Build the exclude label
+#: ../src/preferences.c:908
+msgid ""
+"Regex list of items that should not be inserted into the history (passwords/"
+"sites that you don't need in history, etc)."
+msgstr ""
+
+#: ../src/preferences.c:928
+msgid "Regex"
+msgstr ""
+
+#: ../src/preferences.c:956
+msgid "Hotkeys"
+msgstr "Skróty klawiszowe"
+
+#: ../src/preferences.c:964
+msgid "<b>Hotkeys</b>"
+msgstr "<b>Skróty klawiszowe</b>"
+
+#: ../src/preferences.c:974
+msgid "History hotkey:"
+msgstr ""
+
+#: ../src/preferences.c:983
+msgid "Actions hotkey:"
+msgstr ""
+
+#: ../src/preferences.c:992
+msgid "Menu hotkey:"
+msgstr ""
+
+#: ../src/preferences.c:1001
+msgid "Manage hotkey:"
+msgstr ""
+
+#: ../src/preferences.c:1010
+msgid "Offline mode hotkey:"
+msgstr ""
+
+#: ../src/utils.c:40 ../src/utils.c:47
+#, c-format
+msgid "Couldn't create directory: %s\n"
+msgstr "Nie można stworzyć katalogu: %s\n"
+
+#: ../src/utils.c:148
+msgid "Run as daemon"
+msgstr "Uruchom jako demon"
+
+#: ../src/utils.c:155
+msgid "Do not use status icon (Ctrl-Alt-P for menu)"
+msgstr "Nie używaj ikony statusu (Ctrl+Alt+P dla menu)"
+
+#: ../src/utils.c:162
+msgid "Print clipboard contents"
+msgstr "Drukuj zawartość schowka"
+
+#: ../src/utils.c:169
+msgid "Print primary contents"
+msgstr "Drukuj zaznaczenie"
+
+#: ../src/utils.c:181
+msgid ""
+"Clipboard CLI usage examples:\n"
+"\n"
+" echo \"copied to clipboard\" | clipit\n"
+" clipit \"copied to clipboard\"\n"
+" echo \"copied to clipboard\" | clipit -c"
+msgstr ""
+"Przykład użycia w trybie tekstowym (CLI):\n"
+"\n"
+" echo \"kopiuj do schowka\" | clipit\n"
+" clipit \"kopiuj do schowka\"\n"
+" echo \"kopiuj do schowka\" | clipit -c"
+
+#: ../src/utils.c:187
+msgid ""
+"Written by Cristian Henzel.\n"
+"Report bugs to <oss@rspwn.com>."
+msgstr ""
diff --git a/po/pt_BR.po b/po/pt_BR.po
new file mode 100644
index 0000000..5c5e34f
--- /dev/null
+++ b/po/pt_BR.po
@@ -0,0 +1,348 @@
+# ClipIt translation file.
+# Copyright (C) 2010-2012 Cristian Henzel <oss@rspwn.com>
+# This file is distributed under the same license as the ClipIt package.
+#
+# Translators:
+# Phantom X <megaphantomx at bol.com.br>, 2008, 2009.
+msgid ""
+msgstr ""
+"Project-Id-Version: ClipIt\n"
+"Report-Msgid-Bugs-To: Cristian Henzel <oss@rspwn.com>\n"
+"POT-Creation-Date: 2015-11-10 16:39+0200\n"
+"PO-Revision-Date: 2017-01-31 10:54-0200\n"
+"Last-Translator: Cristian Henzel <oss@rspwn.com>\n"
+"Language-Team: Cristian Henzel <oss@rspwn.com>\n"
+"Language: pt_BR\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+"X-Generator: Poedit 1.8.7.1\n"
+
+#: ../data/clipit-startup.desktop.in.h:1 ../data/clipit.desktop.in.h:1
+msgid "ClipIt"
+msgstr "Clipit"
+
+#: ../data/clipit-startup.desktop.in.h:2 ../data/clipit.desktop.in.h:2
+#: ../src/main.c:833
+msgid "Clipboard Manager"
+msgstr "Gerenciador de Área de Transferência"
+
+#: ../src/main.c:287
+msgid "Lightweight GTK+ clipboard manager."
+msgstr "Gerenciador de Área de Transferência em GTK+ leve."
+
+#. Actions using:
+#: ../src/main.c:356
+msgid "Actions using:"
+msgstr "Ação usando:"
+
+#. Create menu item for empty clipboard contents
+#: ../src/main.c:365 ../src/main.c:382
+msgid "None"
+msgstr "Nenhum"
+
+#: ../src/main.c:385
+msgid "<b>None</b>"
+msgstr "<b>Nenhum</b>"
+
+#. File contained no actions so adding empty
+#. File did not open so adding empty
+#. Nothing in history so adding empty
+#: ../src/main.c:407 ../src/main.c:436 ../src/main.c:600
+msgid "Empty"
+msgstr "Vazio"
+
+#. Edit actions
+#: ../src/main.c:443
+msgid "_Edit actions"
+msgstr "_Editar ações"
+
+#. Offline mode checkbox
+#: ../src/main.c:686
+msgid "_Offline mode"
+msgstr "Modo _offline"
+
+#. Manage history
+#: ../src/main.c:695
+msgid "_Manage history"
+msgstr "_Gerenciar histórico"
+
+#. Create the dialog
+#: ../src/manage.c:138
+msgid "Editing Clipboard"
+msgstr "Editando a Área de Transferência"
+
+#: ../src/manage.c:158
+msgid "_Static item"
+msgstr "Item e_stático"
+
+#: ../src/manage.c:227
+msgid "Clear the history?"
+msgstr "Limpar o histórico?"
+
+#: ../src/manage.c:228
+msgid "Clear history"
+msgstr "Limpar histórico"
+
+#: ../src/manage.c:348
+msgid "Manage History"
+msgstr "Gerenciar histórico"
+
+#: ../src/manage.c:351
+msgid " (Offline mode)"
+msgstr "Modo offline"
+
+#: ../src/manage.c:393
+msgid "Results"
+msgstr "Resultados"
+
+#: ../src/manage.c:398
+msgid "Edit"
+msgstr "Editar"
+
+#: ../src/manage.c:400 ../src/preferences.c:886 ../src/preferences.c:947
+msgid "Remove"
+msgstr "Remover"
+
+#: ../src/manage.c:402
+msgid "Remove all"
+msgstr "Remover todos"
+
+#: ../src/manage.c:404
+msgid "Close"
+msgstr "Fechar"
+
+#: ../src/preferences.c:170
+msgid "Save history"
+msgstr "Salvar histórico"
+
+#: ../src/preferences.c:203
+msgid "Remove history file"
+msgstr "Remover arquivo de histórico"
+
+#. Create the dialog
+#: ../src/preferences.c:648
+msgid "Preferences"
+msgstr "Preferências"
+
+#: ../src/preferences.c:667
+msgid "Settings"
+msgstr "Preferências"
+
+#: ../src/preferences.c:675
+msgid "<b>Clipboards</b>"
+msgstr "<b>Áreas de Transferência</b>"
+
+#: ../src/preferences.c:682
+msgid "Use _Copy (Ctrl-C)"
+msgstr "Usar _Cópia (Ctrl-C)"
+
+#: ../src/preferences.c:685
+msgid "Use _Primary (Selection)"
+msgstr "Usar Seleção _Primária"
+
+#: ../src/preferences.c:688
+msgid "S_ynchronize clipboards"
+msgstr "S_incronizar áreas de transferência"
+
+#: ../src/preferences.c:690
+msgid "_Automatically paste selected item"
+msgstr "_Colar item selecionado automaticamente"
+
+#: ../src/preferences.c:699
+msgid "<b>Miscellaneous</b>"
+msgstr "<b>Vários</b>"
+
+#: ../src/preferences.c:706
+msgid "Show _indexes in history menu"
+msgstr "Mostrar _index no menu de histórico"
+
+#: ../src/preferences.c:708
+msgid "S_ave URIs"
+msgstr "S_alvar URIs"
+
+#: ../src/preferences.c:710
+msgid "Capture _hyperlinks only"
+msgstr "Capturar somente _hyperlinks"
+
+#: ../src/preferences.c:712
+msgid "C_onfirm before clearing history"
+msgstr "C_onfirmar antes de limpar o histórico"
+
+#: ../src/preferences.c:714
+msgid "_Use right-click menu"
+msgstr "_Usar menu do clique direito"
+
+#: ../src/preferences.c:723
+msgid "History"
+msgstr "Histórico"
+
+#: ../src/preferences.c:731
+msgid "<b>History</b>"
+msgstr "<b>Histórico</b>"
+
+#: ../src/preferences.c:738
+msgid "Save _history"
+msgstr "Salvar _histórico"
+
+#: ../src/preferences.c:739
+msgid "Save and restore history between sessions"
+msgstr "Salvar e restaurar histórico entre as sessões"
+
+#: ../src/preferences.c:743
+msgid "Items in history:"
+msgstr "Itens no histórico:"
+
+#: ../src/preferences.c:752
+msgid "Items in menu:"
+msgstr "Itens do menu"
+
+#: ../src/preferences.c:759
+msgid "Show _static items in menu"
+msgstr "Mostrar items e_státicos no menu"
+
+#: ../src/preferences.c:764
+msgid "Static items in menu:"
+msgstr "Itens estáticos no menu:"
+
+#: ../src/preferences.c:777
+msgid "<b>Items</b>"
+msgstr "<b>Itens</b>"
+
+#: ../src/preferences.c:784
+msgid "Show in a single _line"
+msgstr "Mostrar em uma _linha simples"
+
+#: ../src/preferences.c:786
+msgid "Show in _reverse order"
+msgstr "Exibir em ordem _reversa"
+
+#: ../src/preferences.c:790
+msgid "Character length of items:"
+msgstr "Quantidade de caracteres dos itens:"
+
+#: ../src/preferences.c:799
+msgid "Omit items in the:"
+msgstr "Omitir itens no:"
+
+#: ../src/preferences.c:803
+msgid "Beginning"
+msgstr "Início"
+
+#: ../src/preferences.c:804
+msgid "Middle"
+msgstr "Centro"
+
+#: ../src/preferences.c:805
+msgid "End"
+msgstr "Fim"
+
+#: ../src/preferences.c:835
+msgid "Actions"
+msgstr "Ações"
+
+#. Build the actions label
+#: ../src/preferences.c:840
+msgid "Control-click ClipIt's tray icon to use actions"
+msgstr "Control-clique no ícone da bandeja do ClipIt para usar ações"
+
+#: ../src/preferences.c:860
+msgid "Action"
+msgstr "Ação"
+
+#: ../src/preferences.c:867
+msgid "Command"
+msgstr "Comando"
+
+#: ../src/preferences.c:882 ../src/preferences.c:943
+msgid "Add..."
+msgstr "Adicionar..."
+
+#: ../src/preferences.c:903
+msgid "Exclude"
+msgstr "Excluir"
+
+#. Build the exclude label
+#: ../src/preferences.c:908
+msgid ""
+"Regex list of items that should not be inserted into the history (passwords/"
+"sites that you don't need in history, etc)."
+msgstr ""
+"Lista regex dos itens que não devem ser inseridos no histórico (senhas/"
+"sites que você não precisa no histórico, etc)."
+
+#: ../src/preferences.c:928
+msgid "Regex"
+msgstr "Regex"
+
+#: ../src/preferences.c:956
+msgid "Hotkeys"
+msgstr "Atalhos"
+
+#: ../src/preferences.c:964
+msgid "<b>Hotkeys</b>"
+msgstr "<b>Atalhos</b>"
+
+#: ../src/preferences.c:974
+msgid "History hotkey:"
+msgstr "Atalho para histórico"
+
+#: ../src/preferences.c:983
+msgid "Actions hotkey:"
+msgstr "Atalho para ações"
+
+#: ../src/preferences.c:992
+msgid "Menu hotkey:"
+msgstr "Atalho para menu"
+
+#: ../src/preferences.c:1001
+msgid "Manage hotkey:"
+msgstr "Atalho para gerenciamento"
+
+#: ../src/preferences.c:1010
+msgid "Offline mode hotkey:"
+msgstr "Atalho para modo offline"
+
+#: ../src/utils.c:40 ../src/utils.c:47
+#, c-format
+msgid "Couldn't create directory: %s\n"
+msgstr "Impossível criar diretório: %s\n"
+
+#: ../src/utils.c:148
+msgid "Run as daemon"
+msgstr "Executar como daemon"
+
+#: ../src/utils.c:155
+msgid "Do not use status icon (Ctrl-Alt-P for menu)"
+msgstr "Não usar ícone de status (Ctrl-Alt-P para o menu)"
+
+#: ../src/utils.c:162
+msgid "Print clipboard contents"
+msgstr "Imprimir conteúdo da área de transferência"
+
+#: ../src/utils.c:169
+msgid "Print primary contents"
+msgstr "Imprimir conteúdo primário"
+
+#: ../src/utils.c:181
+msgid ""
+"Clipboard CLI usage examples:\n"
+"\n"
+" echo \"copied to clipboard\" | clipit\n"
+" clipit \"copied to clipboard\"\n"
+" echo \"copied to clipboard\" | clipit -c"
+msgstr ""
+"Exemplo de uso da Área de Transferência no terminal:\n"
+"\n"
+" echo \"copiado para a área de transferência\" | clipit\n"
+" clipit \"copiado para a área de transferência\"\n"
+" echo \"copiado para a área de transferência\" | clipit -c"
+
+#: ../src/utils.c:187
+msgid ""
+"Written by Cristian Henzel.\n"
+"Report bugs to <oss@rspwn.com>."
+msgstr ""
+"Escrito por Cristian Henzel.\n"
+"Reportar bugs para <oss@rspwn.com>."
diff --git a/po/pt_PT.po b/po/pt_PT.po
new file mode 100644
index 0000000..03caf82
--- /dev/null
+++ b/po/pt_PT.po
@@ -0,0 +1,349 @@
+# ClipIt translation file.
+# Copyright (C) 2010-2012 Cristian Henzel <oss@rspwn.com>
+# This file is distributed under the same license as the ClipIt package.
+#
+# Translators:
+# Bruno Guerreiro <american.jesus.pt@gmail.com>, 2011, 2012.
+# <julio.sameiro@gmail.com>, 2011.
+msgid ""
+msgstr ""
+"Project-Id-Version: ClipIt\n"
+"Report-Msgid-Bugs-To: Cristian Henzel <oss@rspwn.com>\n"
+"POT-Creation-Date: 2015-11-10 16:39+0200\n"
+"PO-Revision-Date: 2012-04-04 06:30+0000\n"
+"Last-Translator: Cristian Henzel <oss@rspwn.com>\n"
+"Language-Team: Portuguese (Portugal) (http://www.transifex.net/projects/p/"
+"clipit/language/pt_PT/)\n"
+"Language: pt_PT\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1)\n"
+
+#: ../data/clipit-startup.desktop.in.h:1 ../data/clipit.desktop.in.h:1
+msgid "ClipIt"
+msgstr ""
+
+#: ../data/clipit-startup.desktop.in.h:2 ../data/clipit.desktop.in.h:2
+#: ../src/main.c:833
+msgid "Clipboard Manager"
+msgstr "Gestor de Área de Transferência"
+
+#: ../src/main.c:287
+msgid "Lightweight GTK+ clipboard manager."
+msgstr "Gestor leve de Área de Transferẽncia "
+
+#. Actions using:
+#: ../src/main.c:356
+msgid "Actions using:"
+msgstr "Ações usando:"
+
+#. Create menu item for empty clipboard contents
+#: ../src/main.c:365 ../src/main.c:382
+msgid "None"
+msgstr "Nenhum"
+
+#: ../src/main.c:385
+msgid "<b>None</b>"
+msgstr "<b>Nenhum</b>"
+
+#. File contained no actions so adding empty
+#. File did not open so adding empty
+#. Nothing in history so adding empty
+#: ../src/main.c:407 ../src/main.c:436 ../src/main.c:600
+msgid "Empty"
+msgstr "Vazio"
+
+#. Edit actions
+#: ../src/main.c:443
+msgid "_Edit actions"
+msgstr "_Editar ações"
+
+#. Offline mode checkbox
+#: ../src/main.c:686
+msgid "_Offline mode"
+msgstr "_Modo desligado"
+
+#. Manage history
+#: ../src/main.c:695
+msgid "_Manage history"
+msgstr "_Gerir histórico"
+
+#. Create the dialog
+#: ../src/manage.c:138
+msgid "Editing Clipboard"
+msgstr "Edição da Área de Transferência"
+
+#: ../src/manage.c:158
+msgid "_Static item"
+msgstr "_Item estático"
+
+#: ../src/manage.c:227
+msgid "Clear the history?"
+msgstr "Limpar o histórico?"
+
+#: ../src/manage.c:228
+msgid "Clear history"
+msgstr "Limpar o histórico"
+
+#: ../src/manage.c:348
+msgid "Manage History"
+msgstr "Gerir Histórico"
+
+#: ../src/manage.c:351
+msgid " (Offline mode)"
+msgstr "(Modo desligado)"
+
+#: ../src/manage.c:393
+msgid "Results"
+msgstr "Resultados"
+
+#: ../src/manage.c:398
+msgid "Edit"
+msgstr "Editar"
+
+#: ../src/manage.c:400 ../src/preferences.c:886 ../src/preferences.c:947
+msgid "Remove"
+msgstr "Remover"
+
+#: ../src/manage.c:402
+msgid "Remove all"
+msgstr "Remover tudo"
+
+#: ../src/manage.c:404
+msgid "Close"
+msgstr "Fechar"
+
+#: ../src/preferences.c:170
+msgid "Save history"
+msgstr "Salvar o histórico"
+
+#: ../src/preferences.c:203
+msgid "Remove history file"
+msgstr "Apagar os registos do histórico"
+
+#. Create the dialog
+#: ../src/preferences.c:648
+msgid "Preferences"
+msgstr "Preferências"
+
+#: ../src/preferences.c:667
+msgid "Settings"
+msgstr "Definições"
+
+#: ../src/preferences.c:675
+msgid "<b>Clipboards</b>"
+msgstr "Áreas de Transferência"
+
+#: ../src/preferences.c:682
+msgid "Use _Copy (Ctrl-C)"
+msgstr "Usar _copiar (Ctrl+C)"
+
+#: ../src/preferences.c:685
+msgid "Use _Primary (Selection)"
+msgstr "Usar _primário (seleção)"
+
+#: ../src/preferences.c:688
+msgid "S_ynchronize clipboards"
+msgstr "S_incronizar área de transferência"
+
+#: ../src/preferences.c:690
+msgid "_Automatically paste selected item"
+msgstr "Colar _automaticamente item selecionado "
+
+#: ../src/preferences.c:699
+msgid "<b>Miscellaneous</b>"
+msgstr "<b>Diversos</b>"
+
+#: ../src/preferences.c:706
+msgid "Show _indexes in history menu"
+msgstr "Mostram _índices no menu história"
+
+#: ../src/preferences.c:708
+msgid "S_ave URIs"
+msgstr "Gr_avar URIs"
+
+#: ../src/preferences.c:710
+msgid "Capture _hyperlinks only"
+msgstr "Capturar apenas _hiperligações"
+
+#: ../src/preferences.c:712
+msgid "C_onfirm before clearing history"
+msgstr "C_onfirmar antes de apagar histórico"
+
+#: ../src/preferences.c:714
+msgid "_Use right-click menu"
+msgstr "_Usar menu do botão direito"
+
+#: ../src/preferences.c:723
+msgid "History"
+msgstr "Histórico"
+
+#: ../src/preferences.c:731
+msgid "<b>History</b>"
+msgstr "<b>Histórico</b>"
+
+#: ../src/preferences.c:738
+msgid "Save _history"
+msgstr "Gravar _histórico"
+
+#: ../src/preferences.c:739
+msgid "Save and restore history between sessions"
+msgstr "Gravar e repor histórico entre as sessões"
+
+#: ../src/preferences.c:743
+msgid "Items in history:"
+msgstr "Itens no histórico:"
+
+#: ../src/preferences.c:752
+msgid "Items in menu:"
+msgstr "Itens no menu:"
+
+#: ../src/preferences.c:759
+msgid "Show _static items in menu"
+msgstr "Mostrar itens e_státicos no menu"
+
+#: ../src/preferences.c:764
+msgid "Static items in menu:"
+msgstr "Itens estáticos no menu:"
+
+#: ../src/preferences.c:777
+msgid "<b>Items</b>"
+msgstr "<b>Itens</b>"
+
+#: ../src/preferences.c:784
+msgid "Show in a single _line"
+msgstr "Mostrar numa única _linha"
+
+#: ../src/preferences.c:786
+msgid "Show in _reverse order"
+msgstr "Mostrar em ordem inve_rsa"
+
+#: ../src/preferences.c:790
+msgid "Character length of items:"
+msgstr "Número de caracteres dos itens:"
+
+#: ../src/preferences.c:799
+msgid "Omit items in the:"
+msgstr "Omitir itens no:"
+
+#: ../src/preferences.c:803
+msgid "Beginning"
+msgstr "Início"
+
+#: ../src/preferences.c:804
+msgid "Middle"
+msgstr "Meio"
+
+#: ../src/preferences.c:805
+msgid "End"
+msgstr "Fim"
+
+#: ../src/preferences.c:835
+msgid "Actions"
+msgstr "Ações"
+
+#. Build the actions label
+#: ../src/preferences.c:840
+msgid "Control-click ClipIt's tray icon to use actions"
+msgstr ""
+"Usar ações com control-clique no ícone do ClipIt na área de notificação"
+
+#: ../src/preferences.c:860
+msgid "Action"
+msgstr "Ação"
+
+#: ../src/preferences.c:867
+msgid "Command"
+msgstr "Comando"
+
+#: ../src/preferences.c:882 ../src/preferences.c:943
+msgid "Add..."
+msgstr "Adicionar..."
+
+#: ../src/preferences.c:903
+msgid "Exclude"
+msgstr "Excluir"
+
+#. Build the exclude label
+#: ../src/preferences.c:908
+msgid ""
+"Regex list of items that should not be inserted into the history (passwords/"
+"sites that you don't need in history, etc)."
+msgstr ""
+"Lista de expressões regulares de itens que não devem ser inseridas no "
+"histórico (senhas/sites que não necessita no histórico, etc)."
+
+#: ../src/preferences.c:928
+msgid "Regex"
+msgstr "Regex"
+
+#: ../src/preferences.c:956
+msgid "Hotkeys"
+msgstr "Atalhos de Teclado"
+
+#: ../src/preferences.c:964
+msgid "<b>Hotkeys</b>"
+msgstr "<b>Atalhos de Teclado</b>"
+
+#: ../src/preferences.c:974
+msgid "History hotkey:"
+msgstr "Atalho de Histórico:"
+
+#: ../src/preferences.c:983
+msgid "Actions hotkey:"
+msgstr "Atalho de ações:"
+
+#: ../src/preferences.c:992
+msgid "Menu hotkey:"
+msgstr "Atalho de menu:"
+
+#: ../src/preferences.c:1001
+msgid "Manage hotkey:"
+msgstr "Atalho de gestão:"
+
+#: ../src/preferences.c:1010
+msgid "Offline mode hotkey:"
+msgstr "Atalho de modo desligado"
+
+#: ../src/utils.c:40 ../src/utils.c:47
+#, c-format
+msgid "Couldn't create directory: %s\n"
+msgstr "Incapaz de criar o directório: %s\n"
+
+#: ../src/utils.c:148
+msgid "Run as daemon"
+msgstr "Executar como daemon"
+
+#: ../src/utils.c:155
+msgid "Do not use status icon (Ctrl-Alt-P for menu)"
+msgstr "Não usar ícone de estado (Ctrl-Alt-P para menu)"
+
+#: ../src/utils.c:162
+msgid "Print clipboard contents"
+msgstr "Imprimir conteúdo da área de transferência"
+
+#: ../src/utils.c:169
+msgid "Print primary contents"
+msgstr "Imprimir conteúdo primário"
+
+#: ../src/utils.c:181
+msgid ""
+"Clipboard CLI usage examples:\n"
+"\n"
+" echo \"copied to clipboard\" | clipit\n"
+" clipit \"copied to clipboard\"\n"
+" echo \"copied to clipboard\" | clipit -c"
+msgstr ""
+"Exemplos da linha de comandos da área de transferências: \n"
+" echo \"copiado para área de transferências\" | clipit\n"
+" clipit \"copiado para área de transferências\"\n"
+" echo \"copiado para área de transferências\" | clipit-c"
+
+#: ../src/utils.c:187
+msgid ""
+"Written by Cristian Henzel.\n"
+"Report bugs to <oss@rspwn.com>."
+msgstr ""
+"Escrito por Cristian Henzel.\n"
+"Reportar erros para <oss@rspwn.com>."
diff --git a/po/ro.po b/po/ro.po
new file mode 100644
index 0000000..bafda47
--- /dev/null
+++ b/po/ro.po
@@ -0,0 +1,352 @@
+# ClipIt translation file.
+# Copyright (C) 2010-2012 Cristian Henzel <oss@rspwn.com>
+# This file is distributed under the same license as the ClipIt package.
+#
+# Translators:
+# Cristian Henzel <oss@rspwn.com>, 2011.
+# Mihai Coman <mihai@m1x.ro>, 2011.
+msgid ""
+msgstr ""
+"Project-Id-Version: ClipIt\n"
+"Report-Msgid-Bugs-To: Cristian Henzel <oss@rspwn.com>\n"
+"POT-Creation-Date: 2015-11-10 16:39+0200\n"
+"PO-Revision-Date: 2012-04-04 06:30+0000\n"
+"Last-Translator: Cristian Henzel <oss@rspwn.com>\n"
+"Language-Team: Romanian (http://www.transifex.net/projects/p/clipit/language/"
+"ro/)\n"
+"Language: ro\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=3; plural=(n==1?0:(((n%100>19)||((n%100==0)&&(n!=0)))?"
+"2:1))\n"
+
+#: ../data/clipit-startup.desktop.in.h:1 ../data/clipit.desktop.in.h:1
+msgid "ClipIt"
+msgstr ""
+
+#: ../data/clipit-startup.desktop.in.h:2 ../data/clipit.desktop.in.h:2
+#: ../src/main.c:833
+msgid "Clipboard Manager"
+msgstr "Administrator clipboard"
+
+#: ../src/main.c:287
+msgid "Lightweight GTK+ clipboard manager."
+msgstr "Mic manager de clipboard."
+
+#. Actions using:
+#: ../src/main.c:356
+msgid "Actions using:"
+msgstr "Acțiuni care folosesc:"
+
+#. Create menu item for empty clipboard contents
+#: ../src/main.c:365 ../src/main.c:382
+msgid "None"
+msgstr "Niciunul"
+
+#: ../src/main.c:385
+msgid "<b>None</b>"
+msgstr "<b>Niciunul</b>"
+
+#. File contained no actions so adding empty
+#. File did not open so adding empty
+#. Nothing in history so adding empty
+#: ../src/main.c:407 ../src/main.c:436 ../src/main.c:600
+msgid "Empty"
+msgstr "Gol"
+
+#. Edit actions
+#: ../src/main.c:443
+msgid "_Edit actions"
+msgstr "_Editare acțiuni"
+
+#. Offline mode checkbox
+#: ../src/main.c:686
+msgid "_Offline mode"
+msgstr ""
+
+#. Manage history
+#: ../src/main.c:695
+msgid "_Manage history"
+msgstr "_Administrează istoric"
+
+#. Create the dialog
+#: ../src/manage.c:138
+msgid "Editing Clipboard"
+msgstr "Editare clipboard"
+
+#: ../src/manage.c:158
+msgid "_Static item"
+msgstr "_Element static"
+
+#: ../src/manage.c:227
+msgid "Clear the history?"
+msgstr "Doriți să goliți istoricul?"
+
+#: ../src/manage.c:228
+msgid "Clear history"
+msgstr "Golește istoric"
+
+#: ../src/manage.c:348
+msgid "Manage History"
+msgstr "Administrează istoric"
+
+#: ../src/manage.c:351
+msgid " (Offline mode)"
+msgstr ""
+
+#: ../src/manage.c:393
+msgid "Results"
+msgstr "Rezultate"
+
+#: ../src/manage.c:398
+msgid "Edit"
+msgstr "Editează"
+
+#: ../src/manage.c:400 ../src/preferences.c:886 ../src/preferences.c:947
+msgid "Remove"
+msgstr "Șterge"
+
+#: ../src/manage.c:402
+msgid "Remove all"
+msgstr "Șterge toate"
+
+#: ../src/manage.c:404
+msgid "Close"
+msgstr "Închide"
+
+#: ../src/preferences.c:170
+msgid "Save history"
+msgstr "Salvează istoric"
+
+#: ../src/preferences.c:203
+msgid "Remove history file"
+msgstr "Elimină fișierul istoricului"
+
+#. Create the dialog
+#: ../src/preferences.c:648
+msgid "Preferences"
+msgstr "Preferințe"
+
+#: ../src/preferences.c:667
+msgid "Settings"
+msgstr "Setări"
+
+#: ../src/preferences.c:675
+msgid "<b>Clipboards</b>"
+msgstr "<b>Clipboard-uri</b>"
+
+#: ../src/preferences.c:682
+msgid "Use _Copy (Ctrl-C)"
+msgstr "Folosește _Copiază (Ctrl-C)"
+
+#: ../src/preferences.c:685
+msgid "Use _Primary (Selection)"
+msgstr "Folosește selecția _primară (Selecție)"
+
+#: ../src/preferences.c:688
+msgid "S_ynchronize clipboards"
+msgstr "S_incronizare clipboard-uri"
+
+#: ../src/preferences.c:690
+msgid "_Automatically paste selected item"
+msgstr "Lipește _automat elementul selectat"
+
+#: ../src/preferences.c:699
+msgid "<b>Miscellaneous</b>"
+msgstr "<b>Diverse</b>"
+
+#: ../src/preferences.c:706
+msgid "Show _indexes in history menu"
+msgstr "Afișează _index în meniul istoricului"
+
+#: ../src/preferences.c:708
+msgid "S_ave URIs"
+msgstr "S_alvează URI-uri"
+
+#: ../src/preferences.c:710
+msgid "Capture _hyperlinks only"
+msgstr "Capturează doar _hiperlegăturile"
+
+#: ../src/preferences.c:712
+msgid "C_onfirm before clearing history"
+msgstr "Cere c_onfirmare înainte de golirea istoricului"
+
+#: ../src/preferences.c:714
+msgid "_Use right-click menu"
+msgstr "Folosește meni_ul clic-dreapta"
+
+#: ../src/preferences.c:723
+msgid "History"
+msgstr "Istoric"
+
+#: ../src/preferences.c:731
+msgid "<b>History</b>"
+msgstr "<b>Istoric</b>"
+
+#: ../src/preferences.c:738
+msgid "Save _history"
+msgstr "Salvează istoric"
+
+#: ../src/preferences.c:739
+msgid "Save and restore history between sessions"
+msgstr "Salvează și restaurează istoricul între sesiuni"
+
+#: ../src/preferences.c:743
+msgid "Items in history:"
+msgstr "Elemente în istoric:"
+
+#: ../src/preferences.c:752
+msgid "Items in menu:"
+msgstr "Elemente în meniu:"
+
+#: ../src/preferences.c:759
+msgid "Show _static items in menu"
+msgstr "Afișează elemente _statice în meniu"
+
+#: ../src/preferences.c:764
+msgid "Static items in menu:"
+msgstr "Elemente statice în meniu:"
+
+#: ../src/preferences.c:777
+msgid "<b>Items</b>"
+msgstr "<b>Elemente</b>"
+
+#: ../src/preferences.c:784
+msgid "Show in a single _line"
+msgstr "Afișează pe o singură _linie"
+
+#: ../src/preferences.c:786
+msgid "Show in _reverse order"
+msgstr "Afișează în o_rdine inversă"
+
+#: ../src/preferences.c:790
+msgid "Character length of items:"
+msgstr "Lungimea în caractere a elementelor:"
+
+#: ../src/preferences.c:799
+msgid "Omit items in the:"
+msgstr "Omitere elemente în:"
+
+#: ../src/preferences.c:803
+msgid "Beginning"
+msgstr "Început"
+
+#: ../src/preferences.c:804
+msgid "Middle"
+msgstr "Mijloc"
+
+#: ../src/preferences.c:805
+msgid "End"
+msgstr "Sfârșit"
+
+#: ../src/preferences.c:835
+msgid "Actions"
+msgstr "Acțiuni"
+
+#. Build the actions label
+#: ../src/preferences.c:840
+msgid "Control-click ClipIt's tray icon to use actions"
+msgstr ""
+"Apăsați pe Control și faceți clic pe pictograma ClipIt pentru a utiliza "
+"acțiunile"
+
+#: ../src/preferences.c:860
+msgid "Action"
+msgstr "Acțiuni"
+
+#: ../src/preferences.c:867
+msgid "Command"
+msgstr "Comandă"
+
+#: ../src/preferences.c:882 ../src/preferences.c:943
+msgid "Add..."
+msgstr "Adaugă..."
+
+#: ../src/preferences.c:903
+msgid "Exclude"
+msgstr "Exclude"
+
+#. Build the exclude label
+#: ../src/preferences.c:908
+msgid ""
+"Regex list of items that should not be inserted into the history (passwords/"
+"sites that you don't need in history, etc)."
+msgstr ""
+"Listă de expresii regulate pentru elemente ce nu trebuie introduse în "
+"istoric (parole, saituri de care nu ai nevoie în istoric, etc.)."
+
+#: ../src/preferences.c:928
+msgid "Regex"
+msgstr "Regex"
+
+#: ../src/preferences.c:956
+msgid "Hotkeys"
+msgstr "Taste rapide"
+
+#: ../src/preferences.c:964
+msgid "<b>Hotkeys</b>"
+msgstr "<b>Taste rapide</b>"
+
+#: ../src/preferences.c:974
+msgid "History hotkey:"
+msgstr "Combinație de taste pt. istoric:"
+
+#: ../src/preferences.c:983
+msgid "Actions hotkey:"
+msgstr "Combinație de taste pt. acțiuni:"
+
+#: ../src/preferences.c:992
+msgid "Menu hotkey:"
+msgstr "Combinație de taste pt. meniu:"
+
+#: ../src/preferences.c:1001
+msgid "Manage hotkey:"
+msgstr "Combinație de taste pt. administrare:"
+
+#: ../src/preferences.c:1010
+msgid "Offline mode hotkey:"
+msgstr ""
+
+#: ../src/utils.c:40 ../src/utils.c:47
+#, c-format
+msgid "Couldn't create directory: %s\n"
+msgstr "Nu s-a putut creea directorul: %s\n"
+
+#: ../src/utils.c:148
+msgid "Run as daemon"
+msgstr "Rulare ca serviciu"
+
+#: ../src/utils.c:155
+msgid "Do not use status icon (Ctrl-Alt-P for menu)"
+msgstr "Nu afișa pictograma de status (apăsați Ctrl-Alt-P pentru meniu)"
+
+#: ../src/utils.c:162
+msgid "Print clipboard contents"
+msgstr "Imprimare conținut clipboard"
+
+#: ../src/utils.c:169
+msgid "Print primary contents"
+msgstr "Imprimare conținut principal"
+
+#: ../src/utils.c:181
+msgid ""
+"Clipboard CLI usage examples:\n"
+"\n"
+" echo \"copied to clipboard\" | clipit\n"
+" clipit \"copied to clipboard\"\n"
+" echo \"copied to clipboard\" | clipit -c"
+msgstr ""
+"Exemple de utilizare în linie de comandă:\n"
+"\n"
+" echo \"copiat în clipboard\" | clipit\n"
+" clipit \"copiat în clipboard\"\n"
+" echo \"copiat în clipboard\" | clipit -c"
+
+#: ../src/utils.c:187
+msgid ""
+"Written by Cristian Henzel.\n"
+"Report bugs to <oss@rspwn.com>."
+msgstr ""
+"Scris de Cristian Henzel.\n"
+"Raportează bug-uri la <oss@rspwn.com>."
diff --git a/po/ru.po b/po/ru.po
new file mode 100644
index 0000000..9e946b5
--- /dev/null
+++ b/po/ru.po
@@ -0,0 +1,349 @@
+# ClipIt translation file.
+# Copyright (C) 2010-2012 Cristian Henzel <oss@rspwn.com>
+# This file is distributed under the same license as the ClipIt package.
+#
+# Translators:
+# Andrei Borisov <and87ep@gmail.com>, 2012.
+msgid ""
+msgstr ""
+"Project-Id-Version: ClipIt\n"
+"Report-Msgid-Bugs-To: Cristian Henzel <oss@rspwn.com>\n"
+"POT-Creation-Date: 2015-11-10 16:39+0200\n"
+"PO-Revision-Date: 2012-04-04 06:30+0000\n"
+"Last-Translator: Cristian Henzel <oss@rspwn.com>\n"
+"Language-Team: Russian (http://www.transifex.net/projects/p/clipit/language/"
+"ru/)\n"
+"Language: ru\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
+"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)\n"
+
+#: ../data/clipit-startup.desktop.in.h:1 ../data/clipit.desktop.in.h:1
+msgid "ClipIt"
+msgstr ""
+
+#: ../data/clipit-startup.desktop.in.h:2 ../data/clipit.desktop.in.h:2
+#: ../src/main.c:833
+msgid "Clipboard Manager"
+msgstr "Менеджер буфера обмена"
+
+#: ../src/main.c:287
+msgid "Lightweight GTK+ clipboard manager."
+msgstr "Легковесный менеджер буфера обмена на GTK+."
+
+#. Actions using:
+#: ../src/main.c:356
+msgid "Actions using:"
+msgstr "Используемые действия:"
+
+#. Create menu item for empty clipboard contents
+#: ../src/main.c:365 ../src/main.c:382
+msgid "None"
+msgstr "Нет"
+
+#: ../src/main.c:385
+msgid "<b>None</b>"
+msgstr "<b>Нет</b>"
+
+#. File contained no actions so adding empty
+#. File did not open so adding empty
+#. Nothing in history so adding empty
+#: ../src/main.c:407 ../src/main.c:436 ../src/main.c:600
+msgid "Empty"
+msgstr "Пусто"
+
+#. Edit actions
+#: ../src/main.c:443
+msgid "_Edit actions"
+msgstr "_Править действия"
+
+#. Offline mode checkbox
+#: ../src/main.c:686
+msgid "_Offline mode"
+msgstr ""
+
+#. Manage history
+#: ../src/main.c:695
+msgid "_Manage history"
+msgstr "_Управление историей"
+
+#. Create the dialog
+#: ../src/manage.c:138
+msgid "Editing Clipboard"
+msgstr "Редактирование буфера обмена"
+
+#: ../src/manage.c:158
+msgid "_Static item"
+msgstr "_Статический элемент"
+
+#: ../src/manage.c:227
+msgid "Clear the history?"
+msgstr "Очистить историю?"
+
+#: ../src/manage.c:228
+msgid "Clear history"
+msgstr "Очистить историю"
+
+#: ../src/manage.c:348
+msgid "Manage History"
+msgstr "Менеджер Истории"
+
+#: ../src/manage.c:351
+msgid " (Offline mode)"
+msgstr ""
+
+#: ../src/manage.c:393
+msgid "Results"
+msgstr "Результаты"
+
+#: ../src/manage.c:398
+msgid "Edit"
+msgstr "Редактировать"
+
+#: ../src/manage.c:400 ../src/preferences.c:886 ../src/preferences.c:947
+msgid "Remove"
+msgstr "Удалить"
+
+#: ../src/manage.c:402
+msgid "Remove all"
+msgstr "Удалить всё"
+
+#: ../src/manage.c:404
+msgid "Close"
+msgstr "Закрыть"
+
+#: ../src/preferences.c:170
+msgid "Save history"
+msgstr "Сохранить историю"
+
+#: ../src/preferences.c:203
+msgid "Remove history file"
+msgstr "Удалить файл истории"
+
+#. Create the dialog
+#: ../src/preferences.c:648
+msgid "Preferences"
+msgstr "Предпочтения"
+
+#: ../src/preferences.c:667
+msgid "Settings"
+msgstr "Настройки"
+
+#: ../src/preferences.c:675
+msgid "<b>Clipboards</b>"
+msgstr "<b>Буферы обмена</b>"
+
+#: ../src/preferences.c:682
+msgid "Use _Copy (Ctrl-C)"
+msgstr "Использовать буфер _Копировать (Ctrl-C)"
+
+#: ../src/preferences.c:685
+msgid "Use _Primary (Selection)"
+msgstr "_Использовать буфер выделения"
+
+#: ../src/preferences.c:688
+msgid "S_ynchronize clipboards"
+msgstr "Синхронизировать буферы"
+
+#: ../src/preferences.c:690
+msgid "_Automatically paste selected item"
+msgstr "_Автоматически вставить выбранный элемент"
+
+#: ../src/preferences.c:699
+msgid "<b>Miscellaneous</b>"
+msgstr "<b>Исключения</b>"
+
+#: ../src/preferences.c:706
+msgid "Show _indexes in history menu"
+msgstr "Показать _индексы в меню истории"
+
+#: ../src/preferences.c:708
+msgid "S_ave URIs"
+msgstr "Сохранять URL'ы"
+
+#: ../src/preferences.c:710
+msgid "Capture _hyperlinks only"
+msgstr "Захватывать только _гиперссылки"
+
+#: ../src/preferences.c:712
+msgid "C_onfirm before clearing history"
+msgstr "_Подтверждение перед очисткой истории"
+
+#: ../src/preferences.c:714
+msgid "_Use right-click menu"
+msgstr "Использование контекстного меню"
+
+#: ../src/preferences.c:723
+msgid "History"
+msgstr "История"
+
+#: ../src/preferences.c:731
+msgid "<b>History</b>"
+msgstr "<b>История</b>"
+
+#: ../src/preferences.c:738
+msgid "Save _history"
+msgstr "Сохранить _историю"
+
+#: ../src/preferences.c:739
+msgid "Save and restore history between sessions"
+msgstr "Сохранять и восстанавливать историю между сессиями"
+
+#: ../src/preferences.c:743
+msgid "Items in history:"
+msgstr "Элементы в истории:"
+
+#: ../src/preferences.c:752
+msgid "Items in menu:"
+msgstr "Элементы в меню:"
+
+#: ../src/preferences.c:759
+msgid "Show _static items in menu"
+msgstr "Показывать _постоянные элементы в меню"
+
+#: ../src/preferences.c:764
+msgid "Static items in menu:"
+msgstr "Постоянные элементы в меню:"
+
+#: ../src/preferences.c:777
+msgid "<b>Items</b>"
+msgstr "<b>Элементы</b>"
+
+#: ../src/preferences.c:784
+msgid "Show in a single _line"
+msgstr "Показать в одну строку"
+
+#: ../src/preferences.c:786
+msgid "Show in _reverse order"
+msgstr "Показывать в обратном порядке"
+
+#: ../src/preferences.c:790
+msgid "Character length of items:"
+msgstr "Число символов в элементе "
+
+#: ../src/preferences.c:799
+msgid "Omit items in the:"
+msgstr "Исключить элементы в:"
+
+#: ../src/preferences.c:803
+msgid "Beginning"
+msgstr "Начале"
+
+#: ../src/preferences.c:804
+msgid "Middle"
+msgstr "Середине"
+
+#: ../src/preferences.c:805
+msgid "End"
+msgstr "Конце"
+
+#: ../src/preferences.c:835
+msgid "Actions"
+msgstr "Действия"
+
+#. Build the actions label
+#: ../src/preferences.c:840
+msgid "Control-click ClipIt's tray icon to use actions"
+msgstr "Ctrl+клик по иконке ClipIt в трее для выполнения действий"
+
+#: ../src/preferences.c:860
+msgid "Action"
+msgstr "Действие"
+
+#: ../src/preferences.c:867
+msgid "Command"
+msgstr "Команда"
+
+#: ../src/preferences.c:882 ../src/preferences.c:943
+msgid "Add..."
+msgstr "Добавить..."
+
+#: ../src/preferences.c:903
+msgid "Exclude"
+msgstr "Исключить"
+
+#. Build the exclude label
+#: ../src/preferences.c:908
+msgid ""
+"Regex list of items that should not be inserted into the history (passwords/"
+"sites that you don't need in history, etc)."
+msgstr ""
+"Список элементов регулярных выражений, которые не должны быть скопированы в "
+"историю (пароли/сайты, которые вам не нужны в истории, и т.д.)."
+
+#: ../src/preferences.c:928
+msgid "Regex"
+msgstr "Регулярные выражения"
+
+#: ../src/preferences.c:956
+msgid "Hotkeys"
+msgstr "Горячие клавиши"
+
+#: ../src/preferences.c:964
+msgid "<b>Hotkeys</b>"
+msgstr "<b>Горячие клавиши</b>"
+
+#: ../src/preferences.c:974
+msgid "History hotkey:"
+msgstr "Горячая клавиша истории:"
+
+#: ../src/preferences.c:983
+msgid "Actions hotkey:"
+msgstr "Горячая клавиша для действий:"
+
+#: ../src/preferences.c:992
+msgid "Menu hotkey:"
+msgstr "Горячая клавиша меню:"
+
+#: ../src/preferences.c:1001
+msgid "Manage hotkey:"
+msgstr "Горячая клавиша менеджера:"
+
+#: ../src/preferences.c:1010
+msgid "Offline mode hotkey:"
+msgstr ""
+
+#: ../src/utils.c:40 ../src/utils.c:47
+#, c-format
+msgid "Couldn't create directory: %s\n"
+msgstr "Невозможно создание директории: %s\n"
+
+#: ../src/utils.c:148
+msgid "Run as daemon"
+msgstr "Запускать как демон"
+
+#: ../src/utils.c:155
+msgid "Do not use status icon (Ctrl-Alt-P for menu)"
+msgstr "Не использовать иконку статутса (Strg+Alt+P для меню)"
+
+#: ../src/utils.c:162
+msgid "Print clipboard contents"
+msgstr "Напечатать содержимое буфера обмена"
+
+#: ../src/utils.c:169
+msgid "Print primary contents"
+msgstr "Напечатать основное содержимое"
+
+#: ../src/utils.c:181
+msgid ""
+"Clipboard CLI usage examples:\n"
+"\n"
+" echo \"copied to clipboard\" | clipit\n"
+" clipit \"copied to clipboard\"\n"
+" echo \"copied to clipboard\" | clipit -c"
+msgstr ""
+"Пример использования менеджера из командной строки:\n"
+"\n"
+" echo \"скопировано в буфер\" | clipit\n"
+" clipit \"скопировано в буфер\"\n"
+" echo \"скопировано в буфер\" | clipit -o"
+
+#: ../src/utils.c:187
+msgid ""
+"Written by Cristian Henzel.\n"
+"Report bugs to <oss@rspwn.com>."
+msgstr ""
+"Автор: Cristian Henzel.\n"
+"Сообщить о ошибках на <oss@rspwn.com>."
diff --git a/po/sv.po b/po/sv.po
new file mode 100644
index 0000000..a3a65e0
--- /dev/null
+++ b/po/sv.po
@@ -0,0 +1,350 @@
+# ClipIt translation file.
+# Copyright (C) 2010-2016 Cristian Henzel <oss@rspwn.com>
+# This file is distributed under the same license as the ClipIt package.
+#
+# Translators:
+# Daniel Nylander <po@danielnylander.se>, 2009.
+# Åke Engelbrektson <eson@svenskasprakfiler.se>, 2016.
+
+msgid ""
+msgstr ""
+"Project-Id-Version: ClipIt\n"
+"Report-Msgid-Bugs-To: Cristian Henzel <oss@rspwn.com>\n"
+"POT-Creation-Date: 2015-11-10 16:39+0200\n"
+"PO-Revision-Date: 2016-12-07 09:02+0100\n"
+"Last-Translator: Åke Engelbrektson <eson@svenskasprakfiler.se>\n"
+"Language-Team: Svenska Språkfiler <https://svenskasprakfiler.se>\n"
+"Language: sv\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"X-Generator: Poedit 1.8.7.1\n"
+
+#: ../data/clipit-startup.desktop.in.h:1 ../data/clipit.desktop.in.h:1
+msgid "ClipIt"
+msgstr "ClipIt"
+
+#: ../data/clipit-startup.desktop.in.h:2 ../data/clipit.desktop.in.h:2
+#: ../src/main.c:833
+msgid "Clipboard Manager"
+msgstr "Urklippshanterare"
+
+#: ../src/main.c:287
+msgid "Lightweight GTK+ clipboard manager."
+msgstr "Resurssnål GTK+ urklippshanterare."
+
+#. Actions using:
+#: ../src/main.c:356
+msgid "Actions using:"
+msgstr "Åtgärder:"
+
+#. Create menu item for empty clipboard contents
+#: ../src/main.c:365 ../src/main.c:382
+msgid "None"
+msgstr "Ingen"
+
+#: ../src/main.c:385
+msgid "<b>None</b>"
+msgstr "<b>Ingen</b>"
+
+#. File contained no actions so adding empty
+#. File did not open so adding empty
+#. Nothing in history so adding empty
+#: ../src/main.c:407 ../src/main.c:436 ../src/main.c:600
+msgid "Empty"
+msgstr "Tom"
+
+#. Edit actions
+#: ../src/main.c:443
+msgid "_Edit actions"
+msgstr "R_edigera åtgärder"
+
+#. Offline mode checkbox
+#: ../src/main.c:686
+msgid "_Offline mode"
+msgstr "_Offline-läge"
+
+#. Manage history
+#: ../src/main.c:695
+msgid "_Manage history"
+msgstr "_Hantera historik"
+
+#. Create the dialog
+#: ../src/manage.c:138
+msgid "Editing Clipboard"
+msgstr "Redigerar urklipp"
+
+#: ../src/manage.c:158
+msgid "_Static item"
+msgstr "_Statiskt objekt"
+
+#: ../src/manage.c:227
+msgid "Clear the history?"
+msgstr "Vill du tömma historiken?"
+
+#: ../src/manage.c:228
+msgid "Clear history"
+msgstr "Töm historik"
+
+#: ../src/manage.c:348
+msgid "Manage History"
+msgstr "Hantera historik"
+
+#: ../src/manage.c:351
+msgid " (Offline mode)"
+msgstr " (Offline-läge)"
+
+#: ../src/manage.c:393
+msgid "Results"
+msgstr "Resultat"
+
+#: ../src/manage.c:398
+msgid "Edit"
+msgstr "Redigera"
+
+#: ../src/manage.c:400 ../src/preferences.c:886 ../src/preferences.c:947
+msgid "Remove"
+msgstr "Ta bort"
+
+#: ../src/manage.c:402
+msgid "Remove all"
+msgstr "Ta bort alla"
+
+#: ../src/manage.c:404
+msgid "Close"
+msgstr "Stäng"
+
+#: ../src/preferences.c:170
+msgid "Save history"
+msgstr "Spara historik"
+
+#: ../src/preferences.c:203
+msgid "Remove history file"
+msgstr "Ta bort historikfilen"
+
+#. Create the dialog
+#: ../src/preferences.c:648
+msgid "Preferences"
+msgstr "Inställningar"
+
+#: ../src/preferences.c:667
+msgid "Settings"
+msgstr "Inställningar"
+
+#: ../src/preferences.c:675
+msgid "<b>Clipboards</b>"
+msgstr "<b>Urklipp</b>"
+
+#: ../src/preferences.c:682
+msgid "Use _Copy (Ctrl-C)"
+msgstr "Använd _Kopiera (Ctrl-C)"
+
+#: ../src/preferences.c:685
+msgid "Use _Primary (Selection)"
+msgstr "Använd _Primär (Markering)"
+
+#: ../src/preferences.c:688
+msgid "S_ynchronize clipboards"
+msgstr "S_ynkronisera urklipp"
+
+#: ../src/preferences.c:690
+msgid "_Automatically paste selected item"
+msgstr "Klistra _automatiskt in valt objekt"
+
+#: ../src/preferences.c:699
+msgid "<b>Miscellaneous</b>"
+msgstr "<b>Diverse</b>"
+
+#: ../src/preferences.c:706
+msgid "Show _indexes in history menu"
+msgstr "Visa _index i historikmenyn"
+
+#: ../src/preferences.c:708
+msgid "S_ave URIs"
+msgstr "S_para URI:er"
+
+#: ../src/preferences.c:710
+msgid "Capture _hyperlinks only"
+msgstr "Hämta endast _hyperlänkar"
+
+#: ../src/preferences.c:712
+msgid "C_onfirm before clearing history"
+msgstr "B_ekräfta innan historiken töms"
+
+#: ../src/preferences.c:714
+msgid "_Use right-click menu"
+msgstr "_Använd högerklicksmeny"
+
+#: ../src/preferences.c:723
+msgid "History"
+msgstr "Historik"
+
+#: ../src/preferences.c:731
+msgid "<b>History</b>"
+msgstr "<b>Historik</b>"
+
+#: ../src/preferences.c:738
+msgid "Save _history"
+msgstr "Spara _historik"
+
+#: ../src/preferences.c:739
+msgid "Save and restore history between sessions"
+msgstr "Spara och återställ historik mellan sessioner"
+
+#: ../src/preferences.c:743
+msgid "Items in history:"
+msgstr "Objekt i historik:"
+
+#: ../src/preferences.c:752
+msgid "Items in menu:"
+msgstr "Objekt i menyn:"
+
+#: ../src/preferences.c:759
+msgid "Show _static items in menu"
+msgstr "Visa _statiska objekt i menyn"
+
+#: ../src/preferences.c:764
+msgid "Static items in menu:"
+msgstr "Statiska objekt i menyn:"
+
+#: ../src/preferences.c:777
+msgid "<b>Items</b>"
+msgstr "<b>Objekt</b>"
+
+#: ../src/preferences.c:784
+msgid "Show in a single _line"
+msgstr "Visa på enkel_rad"
+
+#: ../src/preferences.c:786
+msgid "Show in _reverse order"
+msgstr "Visa i _omvänd ordning"
+
+#: ../src/preferences.c:790
+msgid "Character length of items:"
+msgstr "Teckenlängd för objekt:"
+
+#: ../src/preferences.c:799
+msgid "Omit items in the:"
+msgstr "Utelämna objekt i:"
+
+#: ../src/preferences.c:803
+msgid "Beginning"
+msgstr "Början"
+
+#: ../src/preferences.c:804
+msgid "Middle"
+msgstr "Mitten"
+
+#: ../src/preferences.c:805
+msgid "End"
+msgstr "Slutet"
+
+#: ../src/preferences.c:835
+msgid "Actions"
+msgstr "Åtgärder"
+
+#. Build the actions label
+#: ../src/preferences.c:840
+msgid "Control-click ClipIt's tray icon to use actions"
+msgstr "Ctrl+klick på ClipIts aktivitetsikon för att använda åtgärder"
+
+#: ../src/preferences.c:860
+msgid "Action"
+msgstr "Åtgärd"
+
+#: ../src/preferences.c:867
+msgid "Command"
+msgstr "Kommando"
+
+#: ../src/preferences.c:882 ../src/preferences.c:943
+msgid "Add..."
+msgstr "Lägg till..."
+
+#: ../src/preferences.c:903
+msgid "Exclude"
+msgstr "Undanta"
+
+#. Build the exclude label
+#: ../src/preferences.c:908
+msgid ""
+"Regex list of items that should not be inserted into the history (passwords/"
+"sites that you don't need in history, etc)."
+msgstr ""
+"Regex-lista över objekt som skall undantas från historiken (lösenord/sidor "
+"som du inte behöver i historiken etc.)"
+
+#: ../src/preferences.c:928
+msgid "Regex"
+msgstr "Regex"
+
+#: ../src/preferences.c:956
+msgid "Hotkeys"
+msgstr "Snabbtangenter"
+
+#: ../src/preferences.c:964
+msgid "<b>Hotkeys</b>"
+msgstr "<b>Snabbtangenter</b>"
+
+#: ../src/preferences.c:974
+msgid "History hotkey:"
+msgstr "Historikgenväg:"
+
+#: ../src/preferences.c:983
+msgid "Actions hotkey:"
+msgstr "Åtgärdsgenväg:"
+
+#: ../src/preferences.c:992
+msgid "Menu hotkey:"
+msgstr "Menygenväg:"
+
+#: ../src/preferences.c:1001
+msgid "Manage hotkey:"
+msgstr "Hantera historik:"
+
+#: ../src/preferences.c:1010
+msgid "Offline mode hotkey:"
+msgstr "Genväg för offline-läge:"
+
+#: ../src/utils.c:40 ../src/utils.c:47
+#, c-format
+msgid "Couldn't create directory: %s\n"
+msgstr "Kunde inte skapa katalogen: %s\n"
+
+#: ../src/utils.c:148
+msgid "Run as daemon"
+msgstr "Kör som tjänst"
+
+#: ../src/utils.c:155
+msgid "Do not use status icon (Ctrl-Alt-P for menu)"
+msgstr "Använd inte statusikon (Ctrl-Alt-P för meny)"
+
+#: ../src/utils.c:162
+msgid "Print clipboard contents"
+msgstr "Skriv ut urklippsinnehåll"
+
+#: ../src/utils.c:169
+msgid "Print primary contents"
+msgstr "Skriv ut primärt innehåll"
+
+#: ../src/utils.c:181
+msgid ""
+"Clipboard CLI usage examples:\n"
+"\n"
+" echo \"copied to clipboard\" | clipit\n"
+" clipit \"copied to clipboard\"\n"
+" echo \"copied to clipboard\" | clipit -c"
+msgstr ""
+"Användningexempel för kommandorad:\n"
+"\n"
+" echo \"kopierad till urklipp\" | clipit\n"
+" clipit \"kopierad till urklipp\"\n"
+" echo \"kopierad till urklipp\" | clipit -c"
+
+#: ../src/utils.c:187
+msgid ""
+"Written by Cristian Henzel.\n"
+"Report bugs to <oss@rspwn.com>."
+msgstr ""
+"Skriven av Cristian Henzel.\n"
+"Rapportera fel till <oss@rspwn.com>."
diff --git a/po/tr.po b/po/tr.po
new file mode 100644
index 0000000..b1c2e9e
--- /dev/null
+++ b/po/tr.po
@@ -0,0 +1,339 @@
+# ClipIt translation file.
+# Copyright (C) 2010-2012 Cristian Henzel <oss@rspwn.com>
+# This file is distributed under the same license as the ClipIt package.
+#
+# Translators:
+# Hedef Türkçe <iletisim@hedefturkce.com>, 2008.
+msgid ""
+msgstr ""
+"Project-Id-Version: ClipIt\n"
+"Report-Msgid-Bugs-To: Cristian Henzel <oss@rspwn.com>\n"
+"POT-Creation-Date: 2015-11-10 16:39+0200\n"
+"PO-Revision-Date: 2012-04-04 06:30+0000\n"
+"Last-Translator: Cristian Henzel <oss@rspwn.com>\n"
+"Language-Team: Cristian Henzel <oss@rspwn.com>\n"
+"Language: tr\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=1; plural=0\n"
+
+#: ../data/clipit-startup.desktop.in.h:1 ../data/clipit.desktop.in.h:1
+msgid "ClipIt"
+msgstr ""
+
+#: ../data/clipit-startup.desktop.in.h:2 ../data/clipit.desktop.in.h:2
+#: ../src/main.c:833
+msgid "Clipboard Manager"
+msgstr "Pano Yöneticisi"
+
+#: ../src/main.c:287
+msgid "Lightweight GTK+ clipboard manager."
+msgstr "Hafif GTK+ pano yöneticisi."
+
+#. Actions using:
+#: ../src/main.c:356
+msgid "Actions using:"
+msgstr ""
+
+#. Create menu item for empty clipboard contents
+#: ../src/main.c:365 ../src/main.c:382
+msgid "None"
+msgstr ""
+
+#: ../src/main.c:385
+msgid "<b>None</b>"
+msgstr "<b>Hiçbiri</b>"
+
+#. File contained no actions so adding empty
+#. File did not open so adding empty
+#. Nothing in history so adding empty
+#: ../src/main.c:407 ../src/main.c:436 ../src/main.c:600
+msgid "Empty"
+msgstr "Boş"
+
+#. Edit actions
+#: ../src/main.c:443
+msgid "_Edit actions"
+msgstr "Eylemleri _düzenle"
+
+#. Offline mode checkbox
+#: ../src/main.c:686
+msgid "_Offline mode"
+msgstr ""
+
+#. Manage history
+#: ../src/main.c:695
+msgid "_Manage history"
+msgstr ""
+
+#. Create the dialog
+#: ../src/manage.c:138
+msgid "Editing Clipboard"
+msgstr "Pano Düzenleme"
+
+#: ../src/manage.c:158
+msgid "_Static item"
+msgstr ""
+
+#: ../src/manage.c:227
+msgid "Clear the history?"
+msgstr "Geçmiş temizlensin mi?"
+
+#: ../src/manage.c:228
+msgid "Clear history"
+msgstr ""
+
+#: ../src/manage.c:348
+msgid "Manage History"
+msgstr ""
+
+#: ../src/manage.c:351
+msgid " (Offline mode)"
+msgstr ""
+
+#: ../src/manage.c:393
+msgid "Results"
+msgstr ""
+
+#: ../src/manage.c:398
+msgid "Edit"
+msgstr ""
+
+#: ../src/manage.c:400 ../src/preferences.c:886 ../src/preferences.c:947
+msgid "Remove"
+msgstr ""
+
+#: ../src/manage.c:402
+msgid "Remove all"
+msgstr ""
+
+#: ../src/manage.c:404
+msgid "Close"
+msgstr ""
+
+#: ../src/preferences.c:170
+msgid "Save history"
+msgstr ""
+
+#: ../src/preferences.c:203
+msgid "Remove history file"
+msgstr ""
+
+#. Create the dialog
+#: ../src/preferences.c:648
+msgid "Preferences"
+msgstr "Yeğlenenler"
+
+#: ../src/preferences.c:667
+msgid "Settings"
+msgstr ""
+
+#: ../src/preferences.c:675
+msgid "<b>Clipboards</b>"
+msgstr ""
+
+#: ../src/preferences.c:682
+msgid "Use _Copy (Ctrl-C)"
+msgstr ""
+
+#: ../src/preferences.c:685
+msgid "Use _Primary (Selection)"
+msgstr ""
+
+#: ../src/preferences.c:688
+msgid "S_ynchronize clipboards"
+msgstr ""
+
+#: ../src/preferences.c:690
+msgid "_Automatically paste selected item"
+msgstr ""
+
+#: ../src/preferences.c:699
+msgid "<b>Miscellaneous</b>"
+msgstr ""
+
+#: ../src/preferences.c:706
+msgid "Show _indexes in history menu"
+msgstr ""
+
+#: ../src/preferences.c:708
+msgid "S_ave URIs"
+msgstr ""
+
+#: ../src/preferences.c:710
+msgid "Capture _hyperlinks only"
+msgstr ""
+
+#: ../src/preferences.c:712
+msgid "C_onfirm before clearing history"
+msgstr ""
+
+#: ../src/preferences.c:714
+msgid "_Use right-click menu"
+msgstr ""
+
+#: ../src/preferences.c:723
+msgid "History"
+msgstr ""
+
+#: ../src/preferences.c:731
+msgid "<b>History</b>"
+msgstr "<b>Geçmiş</b>"
+
+#: ../src/preferences.c:738
+msgid "Save _history"
+msgstr ""
+
+#: ../src/preferences.c:739
+msgid "Save and restore history between sessions"
+msgstr ""
+
+#: ../src/preferences.c:743
+msgid "Items in history:"
+msgstr ""
+
+#: ../src/preferences.c:752
+msgid "Items in menu:"
+msgstr ""
+
+#: ../src/preferences.c:759
+msgid "Show _static items in menu"
+msgstr ""
+
+#: ../src/preferences.c:764
+msgid "Static items in menu:"
+msgstr ""
+
+#: ../src/preferences.c:777
+msgid "<b>Items</b>"
+msgstr ""
+
+#: ../src/preferences.c:784
+msgid "Show in a single _line"
+msgstr ""
+
+#: ../src/preferences.c:786
+msgid "Show in _reverse order"
+msgstr ""
+
+#: ../src/preferences.c:790
+msgid "Character length of items:"
+msgstr ""
+
+#: ../src/preferences.c:799
+msgid "Omit items in the:"
+msgstr ""
+
+#: ../src/preferences.c:803
+msgid "Beginning"
+msgstr "Başlangıç"
+
+#: ../src/preferences.c:804
+msgid "Middle"
+msgstr "Orta"
+
+#: ../src/preferences.c:805
+msgid "End"
+msgstr "Bitiş"
+
+#: ../src/preferences.c:835
+msgid "Actions"
+msgstr "Eylemler"
+
+#. Build the actions label
+#: ../src/preferences.c:840
+msgid "Control-click ClipIt's tray icon to use actions"
+msgstr ""
+"Eylemleri kullanabilmek için ClipIt'nin tepsi simgesine Ctrl ile tıklayın"
+
+#: ../src/preferences.c:860
+msgid "Action"
+msgstr "Eylem"
+
+#: ../src/preferences.c:867
+msgid "Command"
+msgstr "Komut"
+
+#: ../src/preferences.c:882 ../src/preferences.c:943
+msgid "Add..."
+msgstr ""
+
+#: ../src/preferences.c:903
+msgid "Exclude"
+msgstr ""
+
+#. Build the exclude label
+#: ../src/preferences.c:908
+msgid ""
+"Regex list of items that should not be inserted into the history (passwords/"
+"sites that you don't need in history, etc)."
+msgstr ""
+
+#: ../src/preferences.c:928
+msgid "Regex"
+msgstr ""
+
+#: ../src/preferences.c:956
+msgid "Hotkeys"
+msgstr ""
+
+#: ../src/preferences.c:964
+msgid "<b>Hotkeys</b>"
+msgstr "<b>Geçiş Tuşları</b>"
+
+#: ../src/preferences.c:974
+msgid "History hotkey:"
+msgstr ""
+
+#: ../src/preferences.c:983
+msgid "Actions hotkey:"
+msgstr ""
+
+#: ../src/preferences.c:992
+msgid "Menu hotkey:"
+msgstr ""
+
+#: ../src/preferences.c:1001
+msgid "Manage hotkey:"
+msgstr ""
+
+#: ../src/preferences.c:1010
+msgid "Offline mode hotkey:"
+msgstr ""
+
+#: ../src/utils.c:40 ../src/utils.c:47
+#, c-format
+msgid "Couldn't create directory: %s\n"
+msgstr "Dizin yaratılamıyor: %s\n"
+
+#: ../src/utils.c:148
+msgid "Run as daemon"
+msgstr "Artalan işlem olarak çalıştır"
+
+#: ../src/utils.c:155
+msgid "Do not use status icon (Ctrl-Alt-P for menu)"
+msgstr "Durum simgesini kullanma (menü için Ctrl-Alt-P)"
+
+#: ../src/utils.c:162
+msgid "Print clipboard contents"
+msgstr "Pano içeriğini yazdır"
+
+#: ../src/utils.c:169
+msgid "Print primary contents"
+msgstr ""
+
+#: ../src/utils.c:181
+msgid ""
+"Clipboard CLI usage examples:\n"
+"\n"
+" echo \"copied to clipboard\" | clipit\n"
+" clipit \"copied to clipboard\"\n"
+" echo \"copied to clipboard\" | clipit -c"
+msgstr ""
+
+#: ../src/utils.c:187
+msgid ""
+"Written by Cristian Henzel.\n"
+"Report bugs to <oss@rspwn.com>."
+msgstr ""
diff --git a/po/zh_CN.po b/po/zh_CN.po
new file mode 100644
index 0000000..ada216d
--- /dev/null
+++ b/po/zh_CN.po
@@ -0,0 +1,345 @@
+# ClipIt translation file.
+# Copyright (C) 2010-2012 Cristian Henzel <oss@rspwn.com>
+# This file is distributed under the same license as the ClipIt package.
+#
+# Translators:
+# Lyman Li <lymanrb@gmail.com>, 2008.
+msgid ""
+msgstr ""
+"Project-Id-Version: ClipIt\n"
+"Report-Msgid-Bugs-To: Cristian Henzel <oss@rspwn.com>\n"
+"POT-Creation-Date: 2015-11-10 16:39+0200\n"
+"PO-Revision-Date: 2012-04-04 06:30+0000\n"
+"Last-Translator: Cristian Henzel <oss@rspwn.com>\n"
+"Language-Team: Cristian Henzel <oss@rspwn.com>\n"
+"Language: zh_CN\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=1; plural=0\n"
+
+#: ../data/clipit-startup.desktop.in.h:1 ../data/clipit.desktop.in.h:1
+msgid "ClipIt"
+msgstr ""
+
+#: ../data/clipit-startup.desktop.in.h:2 ../data/clipit.desktop.in.h:2
+#: ../src/main.c:833
+msgid "Clipboard Manager"
+msgstr "剪切板管理器"
+
+#: ../src/main.c:287
+msgid "Lightweight GTK+ clipboard manager."
+msgstr "小巧的 GTK+ 剪切板管理器。"
+
+#. Actions using:
+#: ../src/main.c:356
+msgid "Actions using:"
+msgstr ""
+
+#. Create menu item for empty clipboard contents
+#: ../src/main.c:365 ../src/main.c:382
+msgid "None"
+msgstr ""
+
+#: ../src/main.c:385
+msgid "<b>None</b>"
+msgstr "<b>无</b>"
+
+#. File contained no actions so adding empty
+#. File did not open so adding empty
+#. Nothing in history so adding empty
+#: ../src/main.c:407 ../src/main.c:436 ../src/main.c:600
+msgid "Empty"
+msgstr "空"
+
+#. Edit actions
+#: ../src/main.c:443
+msgid "_Edit actions"
+msgstr "编辑动作(_E)"
+
+#. Offline mode checkbox
+#: ../src/main.c:686
+msgid "_Offline mode"
+msgstr ""
+
+#. Manage history
+#: ../src/main.c:695
+msgid "_Manage history"
+msgstr "管理历史记录(_M)"
+
+#. Create the dialog
+#: ../src/manage.c:138
+msgid "Editing Clipboard"
+msgstr "编辑剪切板"
+
+#: ../src/manage.c:158
+msgid "_Static item"
+msgstr ""
+
+#: ../src/manage.c:227
+msgid "Clear the history?"
+msgstr "清除历史记录?"
+
+#: ../src/manage.c:228
+msgid "Clear history"
+msgstr "清除历史记录"
+
+#: ../src/manage.c:348
+msgid "Manage History"
+msgstr ""
+
+#: ../src/manage.c:351
+msgid " (Offline mode)"
+msgstr ""
+
+#: ../src/manage.c:393
+msgid "Results"
+msgstr ""
+
+#: ../src/manage.c:398
+msgid "Edit"
+msgstr ""
+
+#: ../src/manage.c:400 ../src/preferences.c:886 ../src/preferences.c:947
+msgid "Remove"
+msgstr "删除"
+
+#: ../src/manage.c:402
+msgid "Remove all"
+msgstr ""
+
+#: ../src/manage.c:404
+msgid "Close"
+msgstr ""
+
+#: ../src/preferences.c:170
+msgid "Save history"
+msgstr ""
+
+#: ../src/preferences.c:203
+msgid "Remove history file"
+msgstr "删除历史记录文件"
+
+#. Create the dialog
+#: ../src/preferences.c:648
+msgid "Preferences"
+msgstr "首选项"
+
+#: ../src/preferences.c:667
+msgid "Settings"
+msgstr "设定"
+
+#: ../src/preferences.c:675
+msgid "<b>Clipboards</b>"
+msgstr "<b>剪切板</b>"
+
+#: ../src/preferences.c:682
+msgid "Use _Copy (Ctrl-C)"
+msgstr "记录 _Copy (复制部分)"
+
+#: ../src/preferences.c:685
+msgid "Use _Primary (Selection)"
+msgstr "记录 _Primary (选中部分)"
+
+#: ../src/preferences.c:688
+msgid "S_ynchronize clipboards"
+msgstr "同步剪切板(_Y)"
+
+#: ../src/preferences.c:690
+msgid "_Automatically paste selected item"
+msgstr ""
+
+#: ../src/preferences.c:699
+msgid "<b>Miscellaneous</b>"
+msgstr "<b>其他</b>"
+
+#: ../src/preferences.c:706
+msgid "Show _indexes in history menu"
+msgstr ""
+
+#: ../src/preferences.c:708
+msgid "S_ave URIs"
+msgstr "保存URI(_A)"
+
+#: ../src/preferences.c:710
+msgid "Capture _hyperlinks only"
+msgstr "仅捕获超级链接(_H)"
+
+#: ../src/preferences.c:712
+msgid "C_onfirm before clearing history"
+msgstr "清除历史纪录时确认(_C)"
+
+#: ../src/preferences.c:714
+msgid "_Use right-click menu"
+msgstr ""
+
+#: ../src/preferences.c:723
+msgid "History"
+msgstr "历史记录"
+
+#: ../src/preferences.c:731
+msgid "<b>History</b>"
+msgstr "<b>历史记录</b>"
+
+#: ../src/preferences.c:738
+msgid "Save _history"
+msgstr ""
+
+#: ../src/preferences.c:739
+msgid "Save and restore history between sessions"
+msgstr "保存历史记录并在下次启动后恢复"
+
+#: ../src/preferences.c:743
+msgid "Items in history:"
+msgstr "历史记录条数:"
+
+#: ../src/preferences.c:752
+msgid "Items in menu:"
+msgstr ""
+
+#: ../src/preferences.c:759
+msgid "Show _static items in menu"
+msgstr ""
+
+#: ../src/preferences.c:764
+msgid "Static items in menu:"
+msgstr ""
+
+#: ../src/preferences.c:777
+msgid "<b>Items</b>"
+msgstr "<b>条目</b>"
+
+#: ../src/preferences.c:784
+msgid "Show in a single _line"
+msgstr ""
+
+#: ../src/preferences.c:786
+msgid "Show in _reverse order"
+msgstr "逆序显示(_R)"
+
+#: ../src/preferences.c:790
+msgid "Character length of items:"
+msgstr "条目显示的文字长度:"
+
+#: ../src/preferences.c:799
+msgid "Omit items in the:"
+msgstr "省略显示条目的:"
+
+#: ../src/preferences.c:803
+msgid "Beginning"
+msgstr "起始"
+
+#: ../src/preferences.c:804
+msgid "Middle"
+msgstr "中间"
+
+#: ../src/preferences.c:805
+msgid "End"
+msgstr "结尾"
+
+#: ../src/preferences.c:835
+msgid "Actions"
+msgstr "动作"
+
+#. Build the actions label
+#: ../src/preferences.c:840
+msgid "Control-click ClipIt's tray icon to use actions"
+msgstr "按住 Ctrl 并点击 ClipIt 的任务栏图标使用动作"
+
+#: ../src/preferences.c:860
+msgid "Action"
+msgstr "动作"
+
+#: ../src/preferences.c:867
+msgid "Command"
+msgstr "命令"
+
+#: ../src/preferences.c:882 ../src/preferences.c:943
+msgid "Add..."
+msgstr "添加..."
+
+#: ../src/preferences.c:903
+msgid "Exclude"
+msgstr "排除"
+
+#. Build the exclude label
+#: ../src/preferences.c:908
+msgid ""
+"Regex list of items that should not be inserted into the history (passwords/"
+"sites that you don't need in history, etc)."
+msgstr ""
+
+#: ../src/preferences.c:928
+msgid "Regex"
+msgstr "正则表达式"
+
+#: ../src/preferences.c:956
+msgid "Hotkeys"
+msgstr "快捷键"
+
+#: ../src/preferences.c:964
+msgid "<b>Hotkeys</b>"
+msgstr "<b>快捷键</b>"
+
+#: ../src/preferences.c:974
+msgid "History hotkey:"
+msgstr ""
+
+#: ../src/preferences.c:983
+msgid "Actions hotkey:"
+msgstr ""
+
+#: ../src/preferences.c:992
+msgid "Menu hotkey:"
+msgstr ""
+
+#: ../src/preferences.c:1001
+msgid "Manage hotkey:"
+msgstr ""
+
+#: ../src/preferences.c:1010
+msgid "Offline mode hotkey:"
+msgstr ""
+
+#: ../src/utils.c:40 ../src/utils.c:47
+#, c-format
+msgid "Couldn't create directory: %s\n"
+msgstr "无法创建目录: %s\n"
+
+#: ../src/utils.c:148
+msgid "Run as daemon"
+msgstr "作为守护进程运行"
+
+#: ../src/utils.c:155
+msgid "Do not use status icon (Ctrl-Alt-P for menu)"
+msgstr "不使用状态图标(Ctrl-Alt-P 调出菜单)"
+
+#: ../src/utils.c:162
+msgid "Print clipboard contents"
+msgstr "打印剪切板内容"
+
+#: ../src/utils.c:169
+msgid "Print primary contents"
+msgstr "打印剪切板内容"
+
+#: ../src/utils.c:181
+msgid ""
+"Clipboard CLI usage examples:\n"
+"\n"
+" echo \"copied to clipboard\" | clipit\n"
+" clipit \"copied to clipboard\"\n"
+" echo \"copied to clipboard\" | clipit -c"
+msgstr ""
+"剪切板命令行使用范例:\n"
+"\n"
+" echo \"复制到剪切板\" | clipit\n"
+" clipit \"复制到剪切板\"\n"
+" echo \"复制到剪切板\" | clipit -o"
+
+#: ../src/utils.c:187
+msgid ""
+"Written by Cristian Henzel.\n"
+"Report bugs to <oss@rspwn.com>."
+msgstr ""
+"由Cristian Henzel编写.\n"
+"问题反馈 <oss@rspwn.com>"
diff --git a/src/Makefile.am b/src/Makefile.am
new file mode 100644
index 0000000..281816b
--- /dev/null
+++ b/src/Makefile.am
@@ -0,0 +1,18 @@
+AM_CFLAGS = -Wall -g -DCLIPITLOCALEDIR=\""$(clipitlocaledir)"\"
+AM_CPPFLAGS = -I$(top_srcdir) $(GTK_CFLAGS) $(APPINDICATOR_CFLAGS)
+LDADD = $(GTK_LIBS) $(APPINDICATOR_LIBS) $(X11_LIBS)
+AM_LDFLAGS = -Wl,--as-needed
+
+bin_PROGRAMS = clipit
+
+DISTCLEANFILES = *.bak *.log *~ .deps/*.P
+
+clipit_SOURCES = main.c main.h \
+ utils.c utils.h \
+ clipit-i18n.h\
+ daemon.c daemon.h \
+ history.c history.h \
+ keybinder.c keybinder.h \
+ preferences.c preferences.h \
+ manage.c manage.h \
+ eggaccelerators.c eggaccelerators.h
diff --git a/src/clipit-i18n.h b/src/clipit-i18n.h
new file mode 100644
index 0000000..e4e0f53
--- /dev/null
+++ b/src/clipit-i18n.h
@@ -0,0 +1,24 @@
+#ifndef __CLIPIT_INTL_H__
+ #define __CLIPIT_INTL_H__
+ #ifdef HAVE_CONFIG_H
+ #include "config.h"
+ #endif /* HAVE_CONFIG_H */
+ #ifdef ENABLE_NLS
+ #include <libintl.h>
+ #define _(String) gettext(String)
+ #ifdef gettext_noop
+ #define N_(String) gettext_noop(String)
+ #else
+ #define N_(String) (String)
+ #endif
+ #else /* NLS is disabled */
+ #define _(String) (String)
+ #define N_(String) (String)
+ #define textdomain(String) (String)
+ #define gettext(String) (String)
+ #define dgettext(Domain,String) (String)
+ #define dcgettext(Domain,String,Type) (String)
+ #define bindtextdomain(Domain,Directory) (Domain)
+ #define bind_textdomain_codeset(Domain,Codeset) (Codeset)
+ #endif /* ENABLE_NLS */
+#endif /* __CLIPIT_INTL_H__ */
diff --git a/src/daemon.c b/src/daemon.c
new file mode 100644
index 0000000..df3562c
--- /dev/null
+++ b/src/daemon.c
@@ -0,0 +1,113 @@
+/* Copyright (C) 2010-2012 by Cristian Henzel <oss@rspwn.com>
+ *
+ * forked from parcellite, which is
+ * Copyright (C) 2007-2008 by Xyhthyx <xyhthyx@gmail.com>
+ *
+ * This file is part of ClipIt.
+ *
+ * ClipIt 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.
+ *
+ * ClipIt is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <glib.h>
+#include <gtk/gtk.h>
+#include "daemon.h"
+
+
+static gint timeout_id;
+static gchar *primary_text;
+static gchar *clipboard_text;
+static GtkClipboard *primary;
+static GtkClipboard *clipboard;
+
+
+/* Called during the daemon loop to protect primary/clipboard contents */
+static void daemon_check()
+{
+ /* Get current primary/clipboard contents */
+ gchar *primary_temp = gtk_clipboard_wait_for_text(primary);
+ gchar *clipboard_temp = gtk_clipboard_wait_for_text(clipboard);
+ /* Check if primary contents were lost */
+ if ((primary_temp == NULL) && (primary_text != NULL))
+ {
+ /* Check contents */
+ gint count;
+ GdkAtom *targets;
+ gboolean contents = gtk_clipboard_wait_for_targets(primary, &targets, &count);
+ g_free(targets);
+ /* Only recover lost contents if there isn't any other type of content in the clipboard */
+ if (!contents)
+ gtk_clipboard_set_text(primary, primary_text, -1);
+ }
+ else
+ {
+ /* Get the button state to check if the mouse button is being held */
+ GdkModifierType button_state;
+ gdk_window_get_pointer(NULL, NULL, NULL, &button_state);
+ if ((primary_temp != NULL) && !(button_state & GDK_BUTTON1_MASK))
+ {
+ g_free(primary_text);
+ primary_text = g_strdup(primary_temp);
+ }
+ }
+
+ /* Check if clipboard contents were lost */
+ if ((clipboard_temp == NULL) && (clipboard_text != NULL))
+ {
+ /* Check contents */
+ gint count;
+ GdkAtom *targets;
+ gboolean contents = gtk_clipboard_wait_for_targets(clipboard, &targets, &count);
+ g_free(targets);
+ /* Only recover lost contents if there isn't any other type of content in the clipboard */
+ if (!contents)
+ gtk_clipboard_set_text(clipboard, clipboard_text, -1);
+ }
+ else
+ {
+ g_free(clipboard_text);
+ clipboard_text = g_strdup(clipboard_temp);
+ }
+ g_free(primary_temp);
+ g_free(clipboard_temp);
+}
+
+/* Called if timeout was destroyed */
+static void reset_daemon(gpointer data)
+{
+ if (timeout_id != 0)
+ g_source_remove(timeout_id);
+ /* Add the daemon loop */
+ timeout_id = g_timeout_add_full(G_PRIORITY_LOW,
+ DAEMON_INTERVAL,
+ (GSourceFunc)daemon_check,
+ NULL,
+ (GDestroyNotify)reset_daemon);
+}
+
+/* Initializes daemon mode */
+void init_daemon_mode()
+{
+ /* Create clipboard and primary and connect signals */
+ primary = gtk_clipboard_get(GDK_SELECTION_PRIMARY);
+ clipboard = gtk_clipboard_get(GDK_SELECTION_CLIPBOARD);
+ /* Add the daemon loop */
+ timeout_id = g_timeout_add_full(G_PRIORITY_LOW,
+ DAEMON_INTERVAL,
+ (GSourceFunc)daemon_check,
+ NULL,
+ (GDestroyNotify)reset_daemon);
+
+ /* Start daemon loop */
+ gtk_main();
+}
diff --git a/src/daemon.h b/src/daemon.h
new file mode 100644
index 0000000..a3e3352
--- /dev/null
+++ b/src/daemon.h
@@ -0,0 +1,33 @@
+/* Copyright (C) 2010-2012 by Cristian Henzel <oss@rspwn.com>
+ *
+ * forked from parcellite, which is
+ * Copyright (C) 2007-2008 by Xyhthyx <xyhthyx@gmail.com>
+ *
+ * This file is part of ClipIt.
+ *
+ * ClipIt 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.
+ *
+ * ClipIt is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef DAEMON_H
+#define DAEMON_H
+
+G_BEGIN_DECLS
+
+#define DAEMON_INTERVAL 500
+
+void init_daemon_mode();
+
+G_END_DECLS
+
+#endif
diff --git a/src/eggaccelerators.c b/src/eggaccelerators.c
new file mode 100644
index 0000000..92ab7ac
--- /dev/null
+++ b/src/eggaccelerators.c
@@ -0,0 +1,657 @@
+/* eggaccelerators.c
+ * Copyright (C) 2002 Red Hat, Inc.; Copyright 1998, 2001 Tim Janik
+ * Developed by Havoc Pennington, Tim Janik
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include "eggaccelerators.h"
+
+#include <string.h>
+#include <gdk/gdkx.h>
+#include <gdk/gdkkeysyms.h>
+
+enum
+{
+ EGG_MODMAP_ENTRY_SHIFT = 0,
+ EGG_MODMAP_ENTRY_LOCK = 1,
+ EGG_MODMAP_ENTRY_CONTROL = 2,
+ EGG_MODMAP_ENTRY_MOD1 = 3,
+ EGG_MODMAP_ENTRY_MOD2 = 4,
+ EGG_MODMAP_ENTRY_MOD3 = 5,
+ EGG_MODMAP_ENTRY_MOD4 = 6,
+ EGG_MODMAP_ENTRY_MOD5 = 7,
+ EGG_MODMAP_ENTRY_LAST = 8
+};
+
+#define MODMAP_ENTRY_TO_MODIFIER(x) (1 << (x))
+
+typedef struct
+{
+ EggVirtualModifierType mapping[EGG_MODMAP_ENTRY_LAST];
+
+} EggModmap;
+
+const EggModmap* egg_keymap_get_modmap (GdkKeymap *keymap);
+
+static inline gboolean
+is_alt (const gchar *string)
+{
+ return ((string[0] == '<') &&
+ (string[1] == 'a' || string[1] == 'A') &&
+ (string[2] == 'l' || string[2] == 'L') &&
+ (string[3] == 't' || string[3] == 'T') &&
+ (string[4] == '>'));
+}
+
+static inline gboolean
+is_ctl (const gchar *string)
+{
+ return ((string[0] == '<') &&
+ (string[1] == 'c' || string[1] == 'C') &&
+ (string[2] == 't' || string[2] == 'T') &&
+ (string[3] == 'l' || string[3] == 'L') &&
+ (string[4] == '>'));
+}
+
+static inline gboolean
+is_modx (const gchar *string)
+{
+ return ((string[0] == '<') &&
+ (string[1] == 'm' || string[1] == 'M') &&
+ (string[2] == 'o' || string[2] == 'O') &&
+ (string[3] == 'd' || string[3] == 'D') &&
+ (string[4] >= '1' && string[4] <= '5') &&
+ (string[5] == '>'));
+}
+
+static inline gboolean
+is_ctrl (const gchar *string)
+{
+ return ((string[0] == '<') &&
+ (string[1] == 'c' || string[1] == 'C') &&
+ (string[2] == 't' || string[2] == 'T') &&
+ (string[3] == 'r' || string[3] == 'R') &&
+ (string[4] == 'l' || string[4] == 'L') &&
+ (string[5] == '>'));
+}
+
+static inline gboolean
+is_shft (const gchar *string)
+{
+ return ((string[0] == '<') &&
+ (string[1] == 's' || string[1] == 'S') &&
+ (string[2] == 'h' || string[2] == 'H') &&
+ (string[3] == 'f' || string[3] == 'F') &&
+ (string[4] == 't' || string[4] == 'T') &&
+ (string[5] == '>'));
+}
+
+static inline gboolean
+is_shift (const gchar *string)
+{
+ return ((string[0] == '<') &&
+ (string[1] == 's' || string[1] == 'S') &&
+ (string[2] == 'h' || string[2] == 'H') &&
+ (string[3] == 'i' || string[3] == 'I') &&
+ (string[4] == 'f' || string[4] == 'F') &&
+ (string[5] == 't' || string[5] == 'T') &&
+ (string[6] == '>'));
+}
+
+static inline gboolean
+is_control (const gchar *string)
+{
+ return ((string[0] == '<') &&
+ (string[1] == 'c' || string[1] == 'C') &&
+ (string[2] == 'o' || string[2] == 'O') &&
+ (string[3] == 'n' || string[3] == 'N') &&
+ (string[4] == 't' || string[4] == 'T') &&
+ (string[5] == 'r' || string[5] == 'R') &&
+ (string[6] == 'o' || string[6] == 'O') &&
+ (string[7] == 'l' || string[7] == 'L') &&
+ (string[8] == '>'));
+}
+
+static inline gboolean
+is_release (const gchar *string)
+{
+ return ((string[0] == '<') &&
+ (string[1] == 'r' || string[1] == 'R') &&
+ (string[2] == 'e' || string[2] == 'E') &&
+ (string[3] == 'l' || string[3] == 'L') &&
+ (string[4] == 'e' || string[4] == 'E') &&
+ (string[5] == 'a' || string[5] == 'A') &&
+ (string[6] == 's' || string[6] == 'S') &&
+ (string[7] == 'e' || string[7] == 'E') &&
+ (string[8] == '>'));
+}
+
+static inline gboolean
+is_meta (const gchar *string)
+{
+ return ((string[0] == '<') &&
+ (string[1] == 'm' || string[1] == 'M') &&
+ (string[2] == 'e' || string[2] == 'E') &&
+ (string[3] == 't' || string[3] == 'T') &&
+ (string[4] == 'a' || string[4] == 'A') &&
+ (string[5] == '>'));
+}
+
+static inline gboolean
+is_super (const gchar *string)
+{
+ return ((string[0] == '<') &&
+ (string[1] == 's' || string[1] == 'S') &&
+ (string[2] == 'u' || string[2] == 'U') &&
+ (string[3] == 'p' || string[3] == 'P') &&
+ (string[4] == 'e' || string[4] == 'E') &&
+ (string[5] == 'r' || string[5] == 'R') &&
+ (string[6] == '>'));
+}
+
+static inline gboolean
+is_hyper (const gchar *string)
+{
+ return ((string[0] == '<') &&
+ (string[1] == 'h' || string[1] == 'H') &&
+ (string[2] == 'y' || string[2] == 'Y') &&
+ (string[3] == 'p' || string[3] == 'P') &&
+ (string[4] == 'e' || string[4] == 'E') &&
+ (string[5] == 'r' || string[5] == 'R') &&
+ (string[6] == '>'));
+}
+
+/**
+ * egg_accelerator_parse_virtual:
+ * @accelerator: string representing an accelerator
+ * @accelerator_key: return location for accelerator keyval
+ * @accelerator_mods: return location for accelerator modifier mask
+ *
+ * Parses a string representing a virtual accelerator. The format
+ * looks like "&lt;Control&gt;a" or "&lt;Shift&gt;&lt;Alt&gt;F1" or
+ * "&lt;Release&gt;z" (the last one is for key release). The parser
+ * is fairly liberal and allows lower or upper case, and also
+ * abbreviations such as "&lt;Ctl&gt;" and "&lt;Ctrl&gt;".
+ *
+ * If the parse fails, @accelerator_key and @accelerator_mods will
+ * be set to 0 (zero) and %FALSE will be returned. If the string contains
+ * only modifiers, @accelerator_key will be set to 0 but %TRUE will be
+ * returned.
+ *
+ * The virtual vs. concrete accelerator distinction is a relic of
+ * how the X Window System works; there are modifiers Mod2-Mod5 that
+ * can represent various keyboard keys (numlock, meta, hyper, etc.),
+ * the virtual modifier represents the keyboard key, the concrete
+ * modifier the actual Mod2-Mod5 bits in the key press event.
+ *
+ * Returns: %TRUE on success.
+ */
+gboolean
+egg_accelerator_parse_virtual (const gchar *accelerator,
+ guint *accelerator_key,
+ EggVirtualModifierType *accelerator_mods)
+{
+ guint keyval;
+ GdkModifierType mods;
+ gint len;
+ gboolean bad_keyval;
+
+ if (accelerator_key)
+ *accelerator_key = 0;
+ if (accelerator_mods)
+ *accelerator_mods = 0;
+
+ g_return_val_if_fail (accelerator != NULL, FALSE);
+
+ bad_keyval = FALSE;
+
+ keyval = 0;
+ mods = 0;
+ len = strlen (accelerator);
+ while (len)
+ {
+ if (*accelerator == '<')
+ {
+ if (len >= 9 && is_release (accelerator))
+ {
+ accelerator += 9;
+ len -= 9;
+ mods |= EGG_VIRTUAL_RELEASE_MASK;
+ }
+ else if (len >= 9 && is_control (accelerator))
+ {
+ accelerator += 9;
+ len -= 9;
+ mods |= EGG_VIRTUAL_CONTROL_MASK;
+ }
+ else if (len >= 7 && is_shift (accelerator))
+ {
+ accelerator += 7;
+ len -= 7;
+ mods |= EGG_VIRTUAL_SHIFT_MASK;
+ }
+ else if (len >= 6 && is_shft (accelerator))
+ {
+ accelerator += 6;
+ len -= 6;
+ mods |= EGG_VIRTUAL_SHIFT_MASK;
+ }
+ else if (len >= 6 && is_ctrl (accelerator))
+ {
+ accelerator += 6;
+ len -= 6;
+ mods |= EGG_VIRTUAL_CONTROL_MASK;
+ }
+ else if (len >= 6 && is_modx (accelerator))
+ {
+ static const guint mod_vals[] = {
+ EGG_VIRTUAL_ALT_MASK, EGG_VIRTUAL_MOD2_MASK, EGG_VIRTUAL_MOD3_MASK,
+ EGG_VIRTUAL_MOD4_MASK, EGG_VIRTUAL_MOD5_MASK
+ };
+
+ len -= 6;
+ accelerator += 4;
+ mods |= mod_vals[*accelerator - '1'];
+ accelerator += 2;
+ }
+ else if (len >= 5 && is_ctl (accelerator))
+ {
+ accelerator += 5;
+ len -= 5;
+ mods |= EGG_VIRTUAL_CONTROL_MASK;
+ }
+ else if (len >= 5 && is_alt (accelerator))
+ {
+ accelerator += 5;
+ len -= 5;
+ mods |= EGG_VIRTUAL_ALT_MASK;
+ }
+ else if (len >= 6 && is_meta (accelerator))
+ {
+ accelerator += 6;
+ len -= 6;
+ mods |= EGG_VIRTUAL_META_MASK;
+ }
+ else if (len >= 7 && is_hyper (accelerator))
+ {
+ accelerator += 7;
+ len -= 7;
+ mods |= EGG_VIRTUAL_HYPER_MASK;
+ }
+ else if (len >= 7 && is_super (accelerator))
+ {
+ accelerator += 7;
+ len -= 7;
+ mods |= EGG_VIRTUAL_SUPER_MASK;
+ }
+ else
+ {
+ gchar last_ch;
+
+ last_ch = *accelerator;
+ while (last_ch && last_ch != '>')
+ {
+ last_ch = *accelerator;
+ accelerator += 1;
+ len -= 1;
+ }
+ }
+ }
+ else
+ {
+ keyval = gdk_keyval_from_name (accelerator);
+
+ if (keyval == 0)
+ bad_keyval = TRUE;
+
+ accelerator += len;
+ len -= len;
+ }
+ }
+
+ if (accelerator_key)
+ *accelerator_key = gdk_keyval_to_lower (keyval);
+ if (accelerator_mods)
+ *accelerator_mods = mods;
+
+ return !bad_keyval;
+}
+
+
+/**
+ * egg_virtual_accelerator_name:
+ * @accelerator_key: accelerator keyval
+ * @accelerator_mods: accelerator modifier mask
+ * @returns: a newly-allocated accelerator name
+ *
+ * Converts an accelerator keyval and modifier mask
+ * into a string parseable by egg_accelerator_parse_virtual().
+ * For example, if you pass in #GDK_q and #EGG_VIRTUAL_CONTROL_MASK,
+ * this function returns "&lt;Control&gt;q".
+ *
+ * The caller of this function must free the returned string.
+ */
+gchar*
+egg_virtual_accelerator_name (guint accelerator_key,
+ EggVirtualModifierType accelerator_mods)
+{
+ static const gchar text_release[] = "<Release>";
+ static const gchar text_shift[] = "<Shift>";
+ static const gchar text_control[] = "<Control>";
+ static const gchar text_mod1[] = "<Alt>";
+ static const gchar text_mod2[] = "<Mod2>";
+ static const gchar text_mod3[] = "<Mod3>";
+ static const gchar text_mod4[] = "<Mod4>";
+ static const gchar text_mod5[] = "<Mod5>";
+ static const gchar text_meta[] = "<Meta>";
+ static const gchar text_super[] = "<Super>";
+ static const gchar text_hyper[] = "<Hyper>";
+ guint l;
+ gchar *keyval_name;
+ gchar *accelerator;
+
+ accelerator_mods &= EGG_VIRTUAL_MODIFIER_MASK;
+
+ keyval_name = gdk_keyval_name (gdk_keyval_to_lower (accelerator_key));
+ if (!keyval_name)
+ keyval_name = "";
+
+ l = 0;
+ if (accelerator_mods & EGG_VIRTUAL_RELEASE_MASK)
+ l += sizeof (text_release) - 1;
+ if (accelerator_mods & EGG_VIRTUAL_SHIFT_MASK)
+ l += sizeof (text_shift) - 1;
+ if (accelerator_mods & EGG_VIRTUAL_CONTROL_MASK)
+ l += sizeof (text_control) - 1;
+ if (accelerator_mods & EGG_VIRTUAL_ALT_MASK)
+ l += sizeof (text_mod1) - 1;
+ if (accelerator_mods & EGG_VIRTUAL_MOD2_MASK)
+ l += sizeof (text_mod2) - 1;
+ if (accelerator_mods & EGG_VIRTUAL_MOD3_MASK)
+ l += sizeof (text_mod3) - 1;
+ if (accelerator_mods & EGG_VIRTUAL_MOD4_MASK)
+ l += sizeof (text_mod4) - 1;
+ if (accelerator_mods & EGG_VIRTUAL_MOD5_MASK)
+ l += sizeof (text_mod5) - 1;
+ if (accelerator_mods & EGG_VIRTUAL_META_MASK)
+ l += sizeof (text_meta) - 1;
+ if (accelerator_mods & EGG_VIRTUAL_HYPER_MASK)
+ l += sizeof (text_hyper) - 1;
+ if (accelerator_mods & EGG_VIRTUAL_SUPER_MASK)
+ l += sizeof (text_super) - 1;
+ l += strlen (keyval_name);
+
+ accelerator = g_new (gchar, l + 1);
+
+ l = 0;
+ accelerator[l] = 0;
+ if (accelerator_mods & EGG_VIRTUAL_RELEASE_MASK)
+ {
+ strcpy (accelerator + l, text_release);
+ l += sizeof (text_release) - 1;
+ }
+ if (accelerator_mods & EGG_VIRTUAL_SHIFT_MASK)
+ {
+ strcpy (accelerator + l, text_shift);
+ l += sizeof (text_shift) - 1;
+ }
+ if (accelerator_mods & EGG_VIRTUAL_CONTROL_MASK)
+ {
+ strcpy (accelerator + l, text_control);
+ l += sizeof (text_control) - 1;
+ }
+ if (accelerator_mods & EGG_VIRTUAL_ALT_MASK)
+ {
+ strcpy (accelerator + l, text_mod1);
+ l += sizeof (text_mod1) - 1;
+ }
+ if (accelerator_mods & EGG_VIRTUAL_MOD2_MASK)
+ {
+ strcpy (accelerator + l, text_mod2);
+ l += sizeof (text_mod2) - 1;
+ }
+ if (accelerator_mods & EGG_VIRTUAL_MOD3_MASK)
+ {
+ strcpy (accelerator + l, text_mod3);
+ l += sizeof (text_mod3) - 1;
+ }
+ if (accelerator_mods & EGG_VIRTUAL_MOD4_MASK)
+ {
+ strcpy (accelerator + l, text_mod4);
+ l += sizeof (text_mod4) - 1;
+ }
+ if (accelerator_mods & EGG_VIRTUAL_MOD5_MASK)
+ {
+ strcpy (accelerator + l, text_mod5);
+ l += sizeof (text_mod5) - 1;
+ }
+ if (accelerator_mods & EGG_VIRTUAL_META_MASK)
+ {
+ strcpy (accelerator + l, text_meta);
+ l += sizeof (text_meta) - 1;
+ }
+ if (accelerator_mods & EGG_VIRTUAL_HYPER_MASK)
+ {
+ strcpy (accelerator + l, text_hyper);
+ l += sizeof (text_hyper) - 1;
+ }
+ if (accelerator_mods & EGG_VIRTUAL_SUPER_MASK)
+ {
+ strcpy (accelerator + l, text_super);
+ l += sizeof (text_super) - 1;
+ }
+
+ strcpy (accelerator + l, keyval_name);
+
+ return accelerator;
+}
+
+void
+egg_keymap_resolve_virtual_modifiers (GdkKeymap *keymap,
+ EggVirtualModifierType virtual_mods,
+ GdkModifierType *concrete_mods)
+{
+ GdkModifierType concrete;
+ int i;
+ const EggModmap *modmap;
+
+ g_return_if_fail (GDK_IS_KEYMAP (keymap));
+ g_return_if_fail (concrete_mods != NULL);
+
+ modmap = egg_keymap_get_modmap (keymap);
+
+ /* Not so sure about this algorithm. */
+
+ concrete = 0;
+ i = 0;
+ while (i < EGG_MODMAP_ENTRY_LAST)
+ {
+ if (modmap->mapping[i] & virtual_mods)
+ concrete |= (1 << i);
+
+ ++i;
+ }
+
+ *concrete_mods = concrete;
+}
+
+void
+egg_keymap_virtualize_modifiers (GdkKeymap *keymap,
+ GdkModifierType concrete_mods,
+ EggVirtualModifierType *virtual_mods)
+{
+ GdkModifierType virtual;
+ int i;
+ const EggModmap *modmap;
+
+ g_return_if_fail (GDK_IS_KEYMAP (keymap));
+ g_return_if_fail (virtual_mods != NULL);
+
+ modmap = egg_keymap_get_modmap (keymap);
+
+ /* Not so sure about this algorithm. */
+
+ virtual = 0;
+ i = 0;
+ while (i < EGG_MODMAP_ENTRY_LAST)
+ {
+ if ((1 << i) & concrete_mods)
+ {
+ EggVirtualModifierType cleaned;
+
+ cleaned = modmap->mapping[i] & ~(EGG_VIRTUAL_MOD2_MASK |
+ EGG_VIRTUAL_MOD3_MASK |
+ EGG_VIRTUAL_MOD4_MASK |
+ EGG_VIRTUAL_MOD5_MASK);
+
+ if (cleaned != 0)
+ {
+ virtual |= cleaned;
+ }
+ else
+ {
+ /* Rather than dropping mod2->mod5 if not bound,
+ * go ahead and use the concrete names
+ */
+ virtual |= modmap->mapping[i];
+ }
+ }
+
+ ++i;
+ }
+
+ *virtual_mods = virtual;
+}
+
+static void
+reload_modmap (GdkKeymap *keymap,
+ EggModmap *modmap)
+{
+ XModifierKeymap *xmodmap;
+ int map_size;
+ int i;
+
+ /* FIXME multihead */
+ xmodmap = XGetModifierMapping (gdk_x11_get_default_xdisplay ());
+
+ memset (modmap->mapping, 0, sizeof (modmap->mapping));
+
+ /* there are 8 modifiers, and the first 3 are shift, shift lock,
+ * and control
+ */
+ map_size = 8 * xmodmap->max_keypermod;
+ i = 3 * xmodmap->max_keypermod;
+ while (i < map_size)
+ {
+ /* get the key code at this point in the map,
+ * see if its keysym is one we're interested in
+ */
+ int keycode = xmodmap->modifiermap[i];
+ GdkKeymapKey *keys;
+ guint *keyvals;
+ int n_entries;
+ int j;
+ EggVirtualModifierType mask;
+
+ keys = NULL;
+ keyvals = NULL;
+ n_entries = 0;
+
+ gdk_keymap_get_entries_for_keycode (keymap,
+ keycode,
+ &keys, &keyvals, &n_entries);
+
+ mask = 0;
+ j = 0;
+ while (j < n_entries)
+ {
+ if (keyvals[j] == GDK_KEY_Num_Lock)
+ mask |= EGG_VIRTUAL_NUM_LOCK_MASK;
+ else if (keyvals[j] == GDK_KEY_Scroll_Lock)
+ mask |= EGG_VIRTUAL_SCROLL_LOCK_MASK;
+ else if (keyvals[j] == GDK_KEY_Meta_L ||
+ keyvals[j] == GDK_KEY_Meta_R)
+ mask |= EGG_VIRTUAL_META_MASK;
+ else if (keyvals[j] == GDK_KEY_Hyper_L ||
+ keyvals[j] == GDK_KEY_Hyper_R)
+ mask |= EGG_VIRTUAL_HYPER_MASK;
+ else if (keyvals[j] == GDK_KEY_Super_L ||
+ keyvals[j] == GDK_KEY_Super_R)
+ mask |= EGG_VIRTUAL_SUPER_MASK;
+ else if (keyvals[j] == GDK_KEY_Mode_switch)
+ mask |= EGG_VIRTUAL_MODE_SWITCH_MASK;
+
+ ++j;
+ }
+
+ /* Mod1Mask is 1 << 3 for example, i.e. the
+ * fourth modifier, i / keyspermod is the modifier
+ * index
+ */
+ modmap->mapping[i/xmodmap->max_keypermod] |= mask;
+
+ g_free (keyvals);
+ g_free (keys);
+
+ ++i;
+ }
+
+ /* Add in the not-really-virtual fixed entries */
+ modmap->mapping[EGG_MODMAP_ENTRY_SHIFT] |= EGG_VIRTUAL_SHIFT_MASK;
+ modmap->mapping[EGG_MODMAP_ENTRY_CONTROL] |= EGG_VIRTUAL_CONTROL_MASK;
+ modmap->mapping[EGG_MODMAP_ENTRY_LOCK] |= EGG_VIRTUAL_LOCK_MASK;
+ modmap->mapping[EGG_MODMAP_ENTRY_MOD1] |= EGG_VIRTUAL_ALT_MASK;
+ modmap->mapping[EGG_MODMAP_ENTRY_MOD2] |= EGG_VIRTUAL_MOD2_MASK;
+ modmap->mapping[EGG_MODMAP_ENTRY_MOD3] |= EGG_VIRTUAL_MOD3_MASK;
+ modmap->mapping[EGG_MODMAP_ENTRY_MOD4] |= EGG_VIRTUAL_MOD4_MASK;
+ modmap->mapping[EGG_MODMAP_ENTRY_MOD5] |= EGG_VIRTUAL_MOD5_MASK;
+
+ XFreeModifiermap (xmodmap);
+}
+
+const EggModmap*
+egg_keymap_get_modmap (GdkKeymap *keymap)
+{
+ EggModmap *modmap;
+
+ /* This is all a hack, much simpler when we can just
+ * modify GDK directly.
+ */
+
+ modmap = g_object_get_data (G_OBJECT (keymap),
+ "egg-modmap");
+
+ if (modmap == NULL)
+ {
+ modmap = g_new0 (EggModmap, 1);
+
+ /* FIXME modify keymap change events with an event filter
+ * and force a reload if we get one
+ */
+
+ reload_modmap (keymap, modmap);
+
+ g_object_set_data_full (G_OBJECT (keymap),
+ "egg-modmap",
+ modmap,
+ g_free);
+ }
+
+ g_assert (modmap != NULL);
+
+ return modmap;
+}
diff --git a/src/eggaccelerators.h b/src/eggaccelerators.h
new file mode 100644
index 0000000..adfbcfb
--- /dev/null
+++ b/src/eggaccelerators.h
@@ -0,0 +1,87 @@
+/* eggaccelerators.h
+ * Copyright (C) 2002 Red Hat, Inc.
+ * Developed by Havoc Pennington
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __EGG_ACCELERATORS_H__
+#define __EGG_ACCELERATORS_H__
+
+#include <gtk/gtk.h>
+#include <gdk/gdk.h>
+
+G_BEGIN_DECLS
+
+/* Where a value is also in GdkModifierType we coincide,
+ * otherwise we don't overlap.
+ */
+typedef enum
+{
+ EGG_VIRTUAL_SHIFT_MASK = 1 << 0,
+ EGG_VIRTUAL_LOCK_MASK = 1 << 1,
+ EGG_VIRTUAL_CONTROL_MASK = 1 << 2,
+
+ EGG_VIRTUAL_ALT_MASK = 1 << 3, /* fixed as Mod1 */
+
+ EGG_VIRTUAL_MOD2_MASK = 1 << 4,
+ EGG_VIRTUAL_MOD3_MASK = 1 << 5,
+ EGG_VIRTUAL_MOD4_MASK = 1 << 6,
+ EGG_VIRTUAL_MOD5_MASK = 1 << 7,
+
+#if 0
+ GDK_BUTTON1_MASK = 1 << 8,
+ GDK_BUTTON2_MASK = 1 << 9,
+ GDK_BUTTON3_MASK = 1 << 10,
+ GDK_BUTTON4_MASK = 1 << 11,
+ GDK_BUTTON5_MASK = 1 << 12,
+ /* 13, 14 are used by Xkb for the keyboard group */
+#endif
+
+ EGG_VIRTUAL_META_MASK = 1 << 24,
+ EGG_VIRTUAL_SUPER_MASK = 1 << 25,
+ EGG_VIRTUAL_HYPER_MASK = 1 << 26,
+ EGG_VIRTUAL_MODE_SWITCH_MASK = 1 << 27,
+ EGG_VIRTUAL_NUM_LOCK_MASK = 1 << 28,
+ EGG_VIRTUAL_SCROLL_LOCK_MASK = 1 << 29,
+
+ /* Also in GdkModifierType */
+ EGG_VIRTUAL_RELEASE_MASK = 1 << 30,
+
+ /* 28-31 24-27 20-23 16-19 12-15 8-11 4-7 0-3
+ * 7 f 0 0 0 0 f f
+ */
+ EGG_VIRTUAL_MODIFIER_MASK = 0x7f0000ff
+
+} EggVirtualModifierType;
+
+gboolean egg_accelerator_parse_virtual (const gchar *accelerator,
+ guint *accelerator_key,
+ EggVirtualModifierType *accelerator_mods);
+void egg_keymap_resolve_virtual_modifiers (GdkKeymap *keymap,
+ EggVirtualModifierType virtual_mods,
+ GdkModifierType *concrete_mods);
+void egg_keymap_virtualize_modifiers (GdkKeymap *keymap,
+ GdkModifierType concrete_mods,
+ EggVirtualModifierType *virtual_mods);
+
+gchar* egg_virtual_accelerator_name (guint accelerator_key,
+ EggVirtualModifierType accelerator_mods);
+
+G_END_DECLS
+
+
+#endif /* __EGG_ACCELERATORS_H__ */
diff --git a/src/history.c b/src/history.c
new file mode 100644
index 0000000..152797c
--- /dev/null
+++ b/src/history.c
@@ -0,0 +1,324 @@
+/* Copyright (C) 2010-2012 by Cristian Henzel <oss@rspwn.com>
+ *
+ * forked from parcellite, which is
+ * Copyright (C) 2007-2008 by Xyhthyx <xyhthyx@gmail.com>
+ *
+ * This file is part of ClipIt.
+ *
+ * ClipIt 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.
+ *
+ * ClipIt 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/>.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <glib.h>
+#include <gtk/gtk.h>
+#include <string.h>
+#include <stdlib.h>
+#include "main.h"
+#include "utils.h"
+#include "history.h"
+
+GList *history;
+
+/* Deletes duplicate item in history */
+static GList *find_duplicate(gchar *item)
+{
+ GList *element;
+ /* Go through each element compare each */
+ for (element = history; element != NULL; element = element->next) {
+ history_item *elem_data = element->data;
+ if (g_strcmp0((gchar*)elem_data->content, item) == 0) {
+ return element;
+ }
+ }
+ return NULL;
+}
+
+static history_item *initialize_history_item()
+{
+ history_item *hitem = g_new0(history_item, 1);
+ hitem->is_static = 0;
+ return hitem;
+}
+
+/* Returns TRUE if text should be excluded from history */
+static gboolean is_excluded(gchar *text)
+{
+ /* Open the file for reading */
+ gchar *path = g_build_filename(g_get_user_data_dir(), EXCLUDES_FILE, NULL);
+ FILE *excludes_file = fopen(path, "rb");
+ g_free(path);
+ /* Check that it opened and begin read */
+ if (excludes_file)
+ {
+ /* Read the size of the first item */
+ gint size;
+ size_t fread_return;
+ fread_return = fread(&size, 4, 1, excludes_file);
+ /* Continue reading until size is 0 */
+ while (size != 0)
+ {
+ /* Read Regex */
+ gchar *regex = (gchar*)g_malloc(size + 1);
+ fread_return = fread(regex, size, 1, excludes_file);
+ regex[size] = '\0';
+ fread_return = fread(&size, 4, 1, excludes_file);
+ /* Append the read action */
+ GRegex *regexp = g_regex_new(regex, G_REGEX_CASELESS, 0, NULL);
+ gboolean result = g_regex_match(regexp, text, 0, NULL);
+ g_regex_unref(regexp);
+ g_free(regex);
+ if(result)
+ return result;
+ }
+ fclose(excludes_file);
+ }
+ return FALSE;
+}
+
+/* Reads history from DATADIR/clipit/history */
+void read_history()
+{
+ /* Build file path */
+ gchar *history_path = g_build_filename(g_get_user_data_dir(),
+ HISTORY_FILE,
+ NULL);
+
+ /* Open the file for reading */
+ FILE *history_file = fopen(history_path, "rb");
+ g_free(history_path);
+ /* Check that it opened and begin read */
+ if (history_file) {
+ /* Read the size of the first item */
+ int size;
+ size_t fread_return;
+ if (fread(&size, 4, 1, history_file) != 1)
+ size = 0;
+ if (size == -1) {
+ /* If size is -1, we are using the new filetype introduced in 1.4.1 */
+ /* We currently aren't using the extra data fields */
+ char extra_data[64];
+ int data_type;
+ fread_return = fread(&extra_data, 64, 1, history_file);
+ if (fread(&size, 4, 1, history_file) != 1)
+ size = 0;
+ if (fread(&data_type, 4, 1, history_file) != 1)
+ data_type = 0;
+ while (size && data_type) {
+ switch (data_type) {
+ case 1: {
+ gchar *item = (gchar*)g_malloc(size + 1);
+ fread_return = fread(item, size, 1, history_file);
+ item[size] = '\0';
+ history_item *hitem = initialize_history_item();
+ hitem->content = item;
+ history = g_list_prepend(history, hitem);
+ break;
+ }
+ case 2: {
+ int read_static;
+ history_item *hitem = history->data;
+ fread_return = fread(&read_static, size, 1, history_file);
+ hitem->is_static = read_static;
+ break;
+ }
+ }
+ if (fread(&size, 4, 1, history_file) != 1)
+ size = 0;
+ if (fread(&data_type, 4, 1, history_file) != 1)
+ data_type = 0;
+ }
+ } else {
+ /* Continue reading until size is 0 */
+ while (size) {
+ /* Malloc according to the size of the item */
+ gchar *item = (gchar*)g_malloc(size + 1);
+ /* Read item and add ending character */
+ fread_return = fread(item, size, 1, history_file);
+ item[size] = '\0';
+ /* Prepend item and read next size */
+ history_item *hitem = initialize_history_item();
+ hitem->content = item;
+ history = g_list_prepend(history, hitem);
+ if (fread(&size, 4, 1, history_file) != 1)
+ size = 0;
+ }
+ }
+ /* Close file and reverse the history to normal */
+ fclose(history_file);
+ history = g_list_reverse(history);
+ }
+}
+
+/* Saves history to DATADIR/clipit/history */
+void save_history()
+{
+ if(prefs.save_history) {
+ /* Check that the directory is available */
+ check_dirs();
+ /* Build file path */
+ gchar *history_path = g_build_filename(g_get_user_data_dir(),
+ HISTORY_FILE,
+ NULL);
+ /* Open the file for writing */
+ FILE *history_file = fopen(history_path, "wb");
+ g_free(history_path);
+ /* Check that it opened and begin write */
+ if (history_file) {
+ GList *element;
+ /* Write each element to a binary file */
+ int i;
+ for (i=1; i<=17; i++) {
+ int write_val = -1;
+ fwrite(&write_val, 4, 1, history_file);
+ }
+ for (element = history; element != NULL; element = element->next) {
+ /* Create new GString from element data, write its
+ * length (size) to file followed by the element
+ * data itself
+ */
+ int write_val = 1;
+ history_item *elem_data = element->data;
+ GString *item = g_string_new((gchar*)elem_data->content);
+ int write_static = elem_data->is_static;
+ fwrite(&(item->len), 4, 1, history_file);
+ fwrite(&write_val, 4, 1, history_file);
+ fputs(item->str, history_file);
+ write_val = 4;
+ fwrite(&write_val, 4, 1, history_file);
+ write_val = 2;
+ fwrite(&write_val, 4, 1, history_file);
+ fwrite(&write_static, 4, 1, history_file);
+ g_string_free(item, TRUE);
+ }
+ /* Write 0 to indicate end of file */
+ gint end = 0;
+ fwrite(&end, 4, 1, history_file);
+ fwrite(&end, 4, 1, history_file);
+ fclose(history_file);
+ }
+ }
+ /* Refresh indicator menu. Temporary solution until
+ * getting the visible status of the menu is supported by the API
+ */
+#ifdef HAVE_APPINDICATOR
+ create_app_indicator(0);
+#endif
+}
+
+/* Checks if item should be included in history and calls append */
+void check_and_append(gchar *item)
+{
+ if (item) {
+ /* if item is too big, we don't include it in the history */
+ if(strlen(item) > ENTRY_MAX_SIZE)
+ return;
+ GtkClipboard *clip = gtk_clipboard_get(GDK_SELECTION_CLIPBOARD);
+ /* Check if we have URIs */
+ if((gtk_clipboard_wait_for_uris(clip) != NULL) && !prefs.save_uris)
+ /* We have URIs but the user doesn't want to save them */
+ return;
+ if(is_excluded(item))
+ /* This item is excluded from the history */
+ return;
+ if (prefs.hyperlinks_only && !is_hyperlink(item))
+ /* User only wants hyperlinks, but this isn't one */
+ return;
+
+ GList *duplicate_elem = find_duplicate(item);
+ if (duplicate_elem) {
+ history = g_list_remove_link(history, duplicate_elem);
+ history = g_list_concat(duplicate_elem, history);
+ } else {
+ append_item(item);
+ }
+ }
+}
+
+/* Adds item to the end of history */
+void append_item(gchar *item)
+{
+ history_item *hitem = initialize_history_item();
+ hitem->content = g_strdup(item);
+ history = g_list_prepend(history, hitem);
+ truncate_history();
+}
+
+/* Truncates history to history_limit items */
+void truncate_history()
+{
+ if (history) {
+ /* Shorten history if necessary */
+ GList *last_element = g_list_nth (history, prefs.history_limit);
+ while (last_element) {
+ history_item *elem_data = last_element->data;
+ last_element = last_element->next;
+ if (elem_data->is_static == 0)
+ history = g_list_remove(history, elem_data);
+ }
+
+ last_element = g_list_nth (history, prefs.history_limit - 1);
+ /* last_element->next checks if the list is longer than the user
+ * wants it; last_element->prev checks if this isn't the first
+ * item, which we wouldn't want to delete */
+ if (last_element) {
+ while (last_element->next && last_element->prev) {
+ history_item *elem_data = last_element->data;
+
+ while (elem_data->is_static && last_element->prev) {
+ if (last_element->prev->prev)
+ last_element = last_element->prev;
+ elem_data = last_element->data;
+ }
+ if (elem_data->is_static == 0)
+ history = g_list_remove(history, elem_data);
+ last_element = g_list_nth (history, prefs.history_limit - 1);
+ }
+ }
+ /* Save changes */
+ save_history();
+ }
+}
+
+/* Returns pointer to last item in history */
+gpointer get_last_item()
+{
+ if (history) {
+ history_item *elem_data = history->data;
+ if (elem_data->content) {
+ /* Return the last element */
+ gpointer last_item = elem_data->content;
+ return last_item;
+ }
+ return NULL;
+ }
+ return NULL;
+}
+
+/* Deletes duplicate item in history */
+void delete_duplicate(gchar *item)
+{
+ GList *element;
+ /* Go through each element compare each */
+ for (element = history; element != NULL; element = element->next) {
+ history_item *elem_data = element->data;
+ if (g_strcmp0((gchar*)elem_data->content, item) == 0) {
+ g_free(elem_data->content);
+ history = g_list_delete_link(history, element);
+ break;
+ }
+ }
+}
diff --git a/src/history.h b/src/history.h
new file mode 100644
index 0000000..801a3c9
--- /dev/null
+++ b/src/history.h
@@ -0,0 +1,58 @@
+/* Copyright (C) 2010-2012 by Cristian Henzel <oss@rspwn.com>
+ *
+ * forked from parcellite, which is
+ * Copyright (C) 2007-2008 by Xyhthyx <xyhthyx@gmail.com>
+ *
+ * This file is part of ClipIt.
+ *
+ * ClipIt 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.
+ *
+ * ClipIt is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef HISTORY_H
+#define HISTORY_H
+
+G_BEGIN_DECLS
+
+#define HISTORY_FILE "clipit/history"
+
+/* Set maximum size of one clipboard entry to 1024KB (1MB)
+ * 1024 pages × 2000 characters per page - should be more than enough.
+ * WARNING: if you use all 1000 history items, clipit could use up to
+ * 1 GB of RAM. If you don't want that, set this lower. */
+#define ENTRY_MAX_SIZE 1048576
+
+typedef struct {
+ gboolean is_static;
+ gpointer content;
+} history_item;
+
+extern GList *history;
+
+void read_history();
+
+void save_history();
+
+void check_and_append(gchar *item);
+
+void append_item(gchar *item);
+
+void truncate_history();
+
+gpointer get_last_item();
+
+void delete_duplicate(gchar *item);
+
+G_END_DECLS
+
+#endif
diff --git a/src/keybinder.c b/src/keybinder.c
new file mode 100644
index 0000000..6862c69
--- /dev/null
+++ b/src/keybinder.c
@@ -0,0 +1,338 @@
+/* keybinder.c
+ * Developed by Alex Graveley for Tomboy
+ *
+ * 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.1 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <string.h>
+#include <gdk/gdk.h>
+#include <gdk/gdkwindow.h>
+#include <gdk/gdkx.h>
+#include <X11/Xlib.h>
+
+#include "eggaccelerators.h"
+#include "keybinder.h"
+
+/* Uncomment the next line to print a debug trace. */
+/* #define DEBUG */
+
+#ifdef DEBUG
+# define TRACE(x) x
+#else
+# define TRACE(x) do {} while (FALSE);
+#endif
+
+typedef struct _Binding {
+ BindkeyHandler handler;
+ gpointer user_data;
+ char *keystring;
+ uint keycode;
+ uint modifiers;
+} Binding;
+
+static GSList *bindings = NULL;
+static guint32 last_event_time = 0;
+static gboolean processing_event = FALSE;
+
+static guint num_lock_mask, caps_lock_mask, scroll_lock_mask;
+
+static void
+lookup_ignorable_modifiers (GdkKeymap *keymap)
+{
+ egg_keymap_resolve_virtual_modifiers (keymap,
+ EGG_VIRTUAL_LOCK_MASK,
+ &caps_lock_mask);
+
+ egg_keymap_resolve_virtual_modifiers (keymap,
+ EGG_VIRTUAL_NUM_LOCK_MASK,
+ &num_lock_mask);
+
+ egg_keymap_resolve_virtual_modifiers (keymap,
+ EGG_VIRTUAL_SCROLL_LOCK_MASK,
+ &scroll_lock_mask);
+}
+
+static void
+grab_ungrab_with_ignorable_modifiers (GdkWindow *rootwin,
+ Binding *binding,
+ gboolean grab)
+{
+ guint mod_masks [] = {
+ 0, /* modifier only */
+ num_lock_mask,
+ caps_lock_mask,
+ scroll_lock_mask,
+ num_lock_mask | caps_lock_mask,
+ num_lock_mask | scroll_lock_mask,
+ caps_lock_mask | scroll_lock_mask,
+ num_lock_mask | caps_lock_mask | scroll_lock_mask,
+ };
+ int i;
+
+ for (i = 0; i < G_N_ELEMENTS (mod_masks); i++) {
+ if (grab) {
+ XGrabKey (GDK_WINDOW_XDISPLAY (rootwin),
+ binding->keycode,
+ binding->modifiers | mod_masks [i],
+ GDK_WINDOW_XID (rootwin),
+ False,
+ GrabModeAsync,
+ GrabModeAsync);
+ } else {
+ XUngrabKey (GDK_WINDOW_XDISPLAY (rootwin),
+ binding->keycode,
+ binding->modifiers | mod_masks [i],
+ GDK_WINDOW_XID (rootwin));
+ }
+ }
+}
+
+static gboolean
+do_grab_key (Binding *binding)
+{
+ GdkKeymap *keymap = gdk_keymap_get_default ();
+ GdkWindow *rootwin = gdk_get_default_root_window ();
+
+ EggVirtualModifierType virtual_mods = 0;
+ guint keysym = 0;
+
+ if (keymap == NULL || rootwin == NULL)
+ return FALSE;
+
+ if (!egg_accelerator_parse_virtual (binding->keystring,
+ &keysym,
+ &virtual_mods))
+ return FALSE;
+
+ TRACE (g_print ("Got accel %d, %d\n", keysym, virtual_mods));
+
+ binding->keycode = XKeysymToKeycode (GDK_WINDOW_XDISPLAY (rootwin),
+ keysym);
+ if (binding->keycode == 0)
+ return FALSE;
+
+ TRACE (g_print ("Got keycode %d\n", binding->keycode));
+
+ egg_keymap_resolve_virtual_modifiers (keymap,
+ virtual_mods,
+ &binding->modifiers);
+
+ TRACE (g_print ("Got modmask %d\n", binding->modifiers));
+
+ gdk_error_trap_push ();
+
+ grab_ungrab_with_ignorable_modifiers (rootwin,
+ binding,
+ TRUE /* grab */);
+
+ gdk_flush ();
+
+ if (gdk_error_trap_pop ()) {
+ g_warning ("Binding '%s' failed!\n", binding->keystring);
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+static gboolean
+do_ungrab_key (Binding *binding)
+{
+ GdkWindow *rootwin = gdk_get_default_root_window ();
+
+ TRACE (g_print ("Removing grab for '%s'\n", binding->keystring));
+
+ grab_ungrab_with_ignorable_modifiers (rootwin,
+ binding,
+ FALSE /* ungrab */);
+
+ return TRUE;
+}
+
+static GdkFilterReturn
+filter_func (GdkXEvent *gdk_xevent, GdkEvent *event, gpointer data)
+{
+ GdkFilterReturn return_val = GDK_FILTER_CONTINUE;
+ XEvent *xevent = (XEvent *) gdk_xevent;
+ guint event_mods;
+ GSList *iter;
+
+ TRACE (g_print ("Got Event! %d, %d\n", xevent->type, event->type));
+
+ switch (xevent->type) {
+ case KeyPress:
+ TRACE (g_print ("Got KeyPress! keycode: %d, modifiers: %d\n",
+ xevent->xkey.keycode,
+ xevent->xkey.state));
+
+ /*
+ * Set the last event time for use when showing
+ * windows to avoid anti-focus-stealing code.
+ */
+ processing_event = TRUE;
+ last_event_time = xevent->xkey.time;
+
+ event_mods = xevent->xkey.state & ~(num_lock_mask |
+ caps_lock_mask |
+ scroll_lock_mask);
+
+ for (iter = bindings; iter != NULL; iter = iter->next) {
+ Binding *binding = (Binding *) iter->data;
+
+ if (binding->keycode == xevent->xkey.keycode &&
+ binding->modifiers == event_mods) {
+
+ TRACE (g_print ("Calling handler for '%s'...\n",
+ binding->keystring));
+
+ (binding->handler) (binding->keystring,
+ binding->user_data);
+ }
+ }
+
+ processing_event = FALSE;
+ break;
+ case KeyRelease:
+ TRACE (g_print ("Got KeyRelease! \n"));
+ break;
+ }
+
+ return return_val;
+}
+
+static void
+keymap_changed (GdkKeymap *map)
+{
+ GdkKeymap *keymap = gdk_keymap_get_default ();
+ GSList *iter;
+
+ TRACE (g_print ("Keymap changed! Regrabbing keys..."));
+
+ for (iter = bindings; iter != NULL; iter = iter->next) {
+ Binding *binding = (Binding *) iter->data;
+ do_ungrab_key (binding);
+ }
+
+ lookup_ignorable_modifiers (keymap);
+
+ for (iter = bindings; iter != NULL; iter = iter->next) {
+ Binding *binding = (Binding *) iter->data;
+ do_grab_key (binding);
+ }
+}
+
+void
+keybinder_init (void)
+{
+ GdkKeymap *keymap = gdk_keymap_get_default ();
+ GdkWindow *rootwin = gdk_get_default_root_window ();
+
+ lookup_ignorable_modifiers (keymap);
+
+ gdk_window_add_filter (rootwin,
+ filter_func,
+ NULL);
+
+ g_signal_connect (keymap,
+ "keys_changed",
+ G_CALLBACK (keymap_changed),
+ NULL);
+}
+
+void
+keybinder_bind (const char *keystring,
+ BindkeyHandler handler,
+ gpointer user_data)
+{
+ Binding *binding;
+ gboolean success;
+
+ binding = g_new0 (Binding, 1);
+ binding->keystring = g_strdup (keystring);
+ binding->handler = handler;
+ binding->user_data = user_data;
+
+ /* Sets the binding's keycode and modifiers */
+ success = do_grab_key (binding);
+
+ if (success) {
+ bindings = g_slist_prepend (bindings, binding);
+ } else {
+ g_free (binding->keystring);
+ g_free (binding);
+ }
+}
+
+void
+keybinder_unbind (const char *keystring,
+ BindkeyHandler handler)
+{
+ GSList *iter;
+
+ for (iter = bindings; iter != NULL; iter = iter->next) {
+ Binding *binding = (Binding *) iter->data;
+
+ if (strcmp (keystring, binding->keystring) != 0 ||
+ handler != binding->handler)
+ continue;
+
+ do_ungrab_key (binding);
+
+ bindings = g_slist_remove (bindings, binding);
+
+ g_free (binding->keystring);
+ g_free (binding);
+ break;
+ }
+}
+
+/*
+ * From eggcellrenderkeys.c.
+ */
+gboolean
+keybinder_is_modifier (guint keycode)
+{
+ gint i;
+ gint map_size;
+ XModifierKeymap *mod_keymap;
+ gboolean retval = FALSE;
+
+ mod_keymap = XGetModifierMapping (
+ GDK_WINDOW_XDISPLAY(gdk_display_get_default()));
+
+ map_size = 8 * mod_keymap->max_keypermod;
+
+ i = 0;
+ while (i < map_size) {
+ if (keycode == mod_keymap->modifiermap[i]) {
+ retval = TRUE;
+ break;
+ }
+ ++i;
+ }
+
+ XFreeModifiermap (mod_keymap);
+
+ return retval;
+}
+
+guint32
+keybinder_get_current_event_time (void)
+{
+ if (processing_event)
+ return last_event_time;
+ else
+ return GDK_CURRENT_TIME;
+}
diff --git a/src/keybinder.h b/src/keybinder.h
new file mode 100644
index 0000000..7d33a5f
--- /dev/null
+++ b/src/keybinder.h
@@ -0,0 +1,45 @@
+/* keybinder.h
+ * Developed by Alex Graveley for Tomboy
+ *
+ * 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.1 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+
+#ifndef __KEY_BINDER_H__
+#define __KEY_BINDER_H__
+
+#include <glib.h>
+
+G_BEGIN_DECLS
+
+typedef void (* BindkeyHandler) (char *keystring, gpointer user_data);
+
+void keybinder_init (void);
+
+void keybinder_bind (const char *keystring,
+ BindkeyHandler handler,
+ gpointer user_data);
+
+void keybinder_unbind (const char *keystring,
+ BindkeyHandler handler);
+
+gboolean keybinder_is_modifier (guint keycode);
+
+guint32 keybinder_get_current_event_time (void);
+
+G_END_DECLS
+
+#endif /* __KEY_BINDER_H__ */
+
diff --git a/src/main.c b/src/main.c
new file mode 100644
index 0000000..7e485ec
--- /dev/null
+++ b/src/main.c
@@ -0,0 +1,1070 @@
+/* Copyright (C) 2010-2012 by Cristian Henzel <oss@rspwn.com>
+ * Copyright (C) 2011 by Eugene Nikolsky <pluton.od@gmail.com>
+ *
+ * forked from parcellite, which is
+ * Copyright (C) 2007-2008 by Xyhthyx <xyhthyx@gmail.com>
+ *
+ * This file is part of ClipIt.
+ *
+ * ClipIt 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.
+ *
+ * ClipIt 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/>.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <glib.h>
+#include <stdlib.h>
+#include <gtk/gtk.h>
+#include <X11/keysym.h>
+#ifdef HAVE_APPINDICATOR
+#include <libappindicator/app-indicator.h>
+#endif
+#include "main.h"
+#include "utils.h"
+#include "history.h"
+#include "keybinder.h"
+#include "preferences.h"
+#include "manage.h"
+#include "clipit-i18n.h"
+#include <gdk/gdkkeysyms.h>
+#include <ctype.h>
+#include <stdbool.h>
+#include <string.h>
+
+static gchar* primary_text;
+static gchar* clipboard_text;
+static gchar* synchronized_text;
+static GtkClipboard* primary;
+static GtkClipboard* clipboard;
+#ifdef HAVE_APPINDICATOR
+static AppIndicator *indicator;
+static GtkWidget *indicator_menu = NULL;
+#else
+static GtkStatusIcon *status_icon;
+static GtkWidget *statusicon_menu = NULL;
+static gboolean status_menu_lock = FALSE;
+#endif
+
+static gboolean actions_lock = FALSE;
+
+/* Init preferences structure */
+prefs_t prefs = {DEF_USE_COPY, DEF_USE_PRIMARY, DEF_SYNCHRONIZE,
+ DEF_AUTOMATIC_PASTE, DEF_SHOW_INDEXES, DEF_SAVE_URIS,
+ DEF_USE_RMB_MENU, DEF_SAVE_HISTORY, DEF_HISTORY_LIMIT,
+ DEF_ITEMS_MENU, DEF_STATICS_SHOW, DEF_STATICS_ITEMS,
+ DEF_HYPERLINKS_ONLY, DEF_CONFIRM_CLEAR, DEF_SINGLE_LINE,
+ DEF_REVERSE_HISTORY, DEF_ITEM_LENGTH, DEF_ELLIPSIZE,
+ INIT_HISTORY_KEY, INIT_ACTIONS_KEY, INIT_MENU_KEY,
+ INIT_SEARCH_KEY, INIT_OFFLINE_KEY, DEF_NO_ICON,
+ DEF_OFFLINE_MODE};
+
+/* Variables for input buffer used for matching input to menu items */
+#define MAX_INPUT_BUF_SIZE 100
+gchar input_buffer[MAX_INPUT_BUF_SIZE];
+int input_index;
+
+
+/* If the user pressed a number key go directly to that item in the menu */
+gboolean selected_by_digit(const GtkWidget *history_menu, const GdkEventKey *event) ;
+
+/*
+ * As the user types, attempt to match input with the values in the menu.
+ * Only the first match will be activated.
+ * */
+gboolean selected_by_input(const GtkWidget *history_menu, const GdkEventKey *event) ;
+
+/* Called every CHECK_INTERVAL seconds to check for new items */
+static gboolean item_check(gpointer data) {
+ /* Immediately return in offline mode */
+ if (prefs.offline_mode)
+ return TRUE;
+
+ /* Grab the current primary and clipboard text */
+ gchar* primary_temp = gtk_clipboard_wait_for_text(primary);
+ gchar* clipboard_temp = gtk_clipboard_wait_for_text(clipboard);
+
+ /* What follows is an extremely confusing system of tests and crap... */
+
+ /* Check if primary contents were lost */
+ if ((primary_temp == NULL) && (primary_text != NULL))
+ {
+ /* Check contents */
+ gint count;
+ GdkAtom *targets;
+ gboolean contents = gtk_clipboard_wait_for_targets(primary, &targets, &count);
+ g_free(targets);
+ /* Only recover lost contents if there isn't any other type of content in the clipboard */
+ if (!contents)
+ {
+ if(prefs.use_primary)
+ {
+ /* if use_primary is enabled, we restore from primary */
+ gtk_clipboard_set_text(primary, primary_text, -1);
+ }
+ /* else
+ * {
+ * // else, we restore from history
+ * GList* element = g_list_nth(history, 0);
+ * gtk_clipboard_set_text(primary, (gchar*)element->data, -1);
+ * }
+ */
+ }
+ }
+ else
+ {
+ GdkModifierType button_state;
+ gdk_window_get_pointer(NULL, NULL, NULL, &button_state);
+ /* Proceed if mouse button not being held */
+ if ((primary_temp != NULL) && !(button_state & GDK_BUTTON1_MASK))
+ {
+ /* Check if primary is the same as the last entry */
+ if (g_strcmp0(primary_temp, primary_text) != 0)
+ {
+ /* New primary entry */
+ g_free(primary_text);
+ primary_text = g_strdup(primary_temp);
+ /* Check if primary option is enabled and if there's text to add */
+ if (prefs.use_primary && primary_text)
+ {
+ check_and_append(primary_text);
+ }
+ }
+ }
+ }
+
+ /* Check if clipboard contents were lost */
+ if ((clipboard_temp == NULL) && (clipboard_text != NULL))
+ {
+ /* Check contents */
+ gint count;
+ GdkAtom *targets;
+ gboolean contents = gtk_clipboard_wait_for_targets(clipboard, &targets, &count);
+ g_free(targets);
+ /* Only recover lost contents if there isn't any other type of content in the clipboard */
+ if (!contents)
+ {
+ g_print("Clipboard is null, recovering ...\n");
+ gtk_clipboard_set_text(clipboard, clipboard_text, -1);
+ }
+ }
+ else
+ {
+ /* Check if clipboard is the same as the last entry */
+ if (g_strcmp0(clipboard_temp, clipboard_text) != 0)
+ {
+ /* New clipboard entry */
+ g_free(clipboard_text);
+ clipboard_text = g_strdup(clipboard_temp);
+ /* Check if clipboard option is enabled and if there's text to add */
+ if (prefs.use_copy && clipboard_text)
+ {
+ check_and_append(clipboard_text);
+ }
+ }
+ }
+
+ /* Synchronization */
+ if (prefs.synchronize)
+ {
+ if (g_strcmp0(synchronized_text, primary_text) != 0)
+ {
+ g_free(synchronized_text);
+ synchronized_text = g_strdup(primary_text);
+ gtk_clipboard_set_text(clipboard, primary_text, -1);
+ }
+ else if (g_strcmp0(synchronized_text, clipboard_text) != 0)
+ {
+ g_free(synchronized_text);
+ synchronized_text = g_strdup(clipboard_text);
+ gtk_clipboard_set_text(primary, clipboard_text, -1);
+ }
+ }
+
+ /* Cleanup */
+ g_free(primary_temp);
+ g_free(clipboard_temp);
+
+ return TRUE;
+}
+
+/* Called when execution action exits */
+static void action_exit(GPid pid, gint status, gpointer data) {
+ g_spawn_close_pid(pid);
+ actions_lock = FALSE;
+}
+
+/* Called when an action is selected from actions menu */
+static void action_selected(GtkButton *button, gpointer user_data) {
+ /* Enable lock */
+ actions_lock = TRUE;
+
+ /* Insert clipboard into command (user_data), and prepare it for execution */
+ gchar* clipboard_text = gtk_clipboard_wait_for_text(clipboard);
+ gchar* command = g_markup_printf_escaped((gchar*)user_data, clipboard_text);
+ g_free(clipboard_text);
+ g_free(user_data);
+ gchar* shell_command = g_shell_quote(command);
+ g_free(command);
+ gchar* cmd = g_strconcat("/bin/sh -c ", shell_command, NULL);
+ g_free(shell_command);
+
+ /* Execute action */
+ GPid pid;
+ gchar **argv;
+ g_shell_parse_argv(cmd, NULL, &argv, NULL);
+ g_free(cmd);
+ g_spawn_async(NULL, argv, NULL, G_SPAWN_DO_NOT_REAP_CHILD, NULL, NULL, &pid, NULL);
+ g_child_watch_add(pid, (GChildWatchFunc)action_exit, NULL);
+ g_strfreev(argv);
+}
+
+/* Called when Edit Actions is selected from actions menu */
+static void edit_actions_selected(GtkButton *button, gpointer user_data) {
+ /* Show the preferences dialog on the actions tab */
+ show_preferences(ACTIONS_TAB);
+}
+
+/* Called when an item is selected from history menu */
+static void item_selected(GtkMenuItem *menu_item, gpointer user_data) {
+ /* Get the text from the right element and set as clipboard */
+ GList* element = g_list_nth(history, GPOINTER_TO_INT(user_data));
+ history = g_list_remove_link(history, element);
+ history = g_list_concat(element, history);
+ history_item *elem_data = history->data;
+ gtk_clipboard_set_text(clipboard, (gchar*)elem_data->content, -1);
+ gtk_clipboard_set_text(primary, (gchar*)elem_data->content, -1);
+ save_history();
+ /* Paste the clipboard contents automatically if enabled */
+ if (prefs.automatic_paste) {
+ gchar* cmd = g_strconcat("/bin/sh -c 'xdotool key ctrl+v'", NULL);
+ GPid pid;
+ gchar **argv;
+ g_shell_parse_argv(cmd, NULL, &argv, NULL);
+ g_free(cmd);
+ g_spawn_async(NULL, argv, NULL, G_SPAWN_DO_NOT_REAP_CHILD, NULL, NULL, &pid, NULL);
+ g_child_watch_add(pid, (GChildWatchFunc)action_exit, NULL);
+ g_strfreev(argv);
+ }
+}
+
+/* Clears all local data (specific to main.c) */
+void clear_main_data() {
+ g_free(primary_text);
+ g_free(clipboard_text);
+ g_free(synchronized_text);
+ primary_text = g_strdup("");
+ clipboard_text = g_strdup("");
+ synchronized_text = g_strdup("");
+ gtk_clipboard_set_text(primary, "", -1);
+ gtk_clipboard_set_text(clipboard, "", -1);
+}
+
+/* Called when About is selected from right-click menu */
+static void show_about_dialog(GtkMenuItem *menu_item, gpointer user_data) {
+ /* This helps prevent multiple instances */
+ if (!gtk_grab_get_current()) {
+ const gchar* authors[] = {"Cristian Henzel <oss@rspwn.com>\n"
+ "Gilberto \"Xyhthyx\" Miralla <xyhthyx@gmail.com>\n"
+ "Eugene Nikolsky <pluton.od@gmail.com>", NULL};
+ const gchar* license =
+ "This program is free software; you can redistribute it and/or modify\n"
+ "it under the terms of the GNU General Public License as published by\n"
+ "the Free Software Foundation; either version 3 of the License, or\n"
+ "(at your option) any later version.\n"
+ "\n"
+ "This program is distributed in the hope that it will be useful,\n"
+ "but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
+ "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"
+ "GNU General Public License for more details.\n"
+ "\n"
+ "You should have received a copy of the GNU General Public License\n"
+ "along with this program. If not, see <http://www.gnu.org/licenses/>.";
+
+ /* Create the about dialog */
+ GtkWidget* about_dialog = gtk_about_dialog_new();
+ gtk_window_set_icon((GtkWindow*)about_dialog,
+ gtk_widget_render_icon(about_dialog, GTK_STOCK_ABOUT, GTK_ICON_SIZE_MENU, NULL));
+
+ gtk_about_dialog_set_program_name((GtkAboutDialog*)about_dialog, "ClipIt");
+ #ifdef HAVE_CONFIG_H
+ gtk_about_dialog_set_version((GtkAboutDialog*)about_dialog, VERSION);
+ #endif
+ gtk_about_dialog_set_comments((GtkAboutDialog*)about_dialog,
+ _("Lightweight GTK+ clipboard manager."));
+
+ gtk_about_dialog_set_website((GtkAboutDialog*)about_dialog,
+ "https://github.com/CristianHenzel/ClipIt");
+
+ gtk_about_dialog_set_copyright((GtkAboutDialog*)about_dialog, "Copyright (C) 2010-2012 Cristian Henzel");
+ gtk_about_dialog_set_authors((GtkAboutDialog*)about_dialog, authors);
+ gtk_about_dialog_set_translator_credits ((GtkAboutDialog*)about_dialog,
+ "Guido Tabbernuk <boamaod@gmail.com>\n"
+ "Miloš Koutný <milos.koutny@gmail.com>\n"
+ "Kim Jensen <reklamepost@energimail.dk>\n"
+ "Eckhard M. Jäger <bart@neeneenee.de>\n"
+ "Michael Stempin <mstempin@web.de>\n"
+ "Benjamin 'sphax3d' Danon <sphax3d@gmail.com>\n"
+ "Németh Tamás <ntomasz@vipmail.hu>\n"
+ "Davide Truffa <davide@catoblepa.org>\n"
+ "Jiro Kawada <jiro.kawada@gmail.com>\n"
+ "Øyvind Sæther <oyvinds@everdot.org>\n"
+ "pankamyk <pankamyk@o2.pl>\n"
+ "Tomasz Rusek <tomek.rusek@gmail.com>\n"
+ "Phantom X <megaphantomx@bol.com.br>\n"
+ "Ovidiu D. Niţan <ov1d1u@sblug.ro>\n"
+ "Alexander Kazancev <kazancas@mandriva.ru>\n"
+ "Daniel Nylander <po@danielnylander.se>\n"
+ "Hedef Türkçe <iletisim@hedefturkce.com>\n"
+ "Lyman Li <lymanrb@gmail.com>\n"
+ "Gilberto \"Xyhthyx\" Miralla <xyhthyx@gmail.com>\n"
+ "Robert Antoni Buj Gelonch <rbuj@fedoraproject.org>");
+
+ gtk_about_dialog_set_license((GtkAboutDialog*)about_dialog, license);
+ gtk_about_dialog_set_logo_icon_name((GtkAboutDialog*)about_dialog, GTK_STOCK_PASTE);
+ /* Run the about dialog */
+ gtk_dialog_run((GtkDialog*)about_dialog);
+ gtk_widget_destroy(about_dialog);
+ } else {
+ /* A window is already open, so we present it to the user */
+ GtkWidget *toplevel = gtk_widget_get_toplevel(gtk_grab_get_current());
+ gtk_window_present((GtkWindow*)toplevel);
+ }
+}
+
+/* Called when Preferences is selected from right-click menu */
+static void preferences_selected(GtkMenuItem *menu_item, gpointer user_data) {
+ /* Show the preferences dialog */
+ show_preferences(0);
+}
+
+/* Called when Quit is selected from right-click menu */
+static void quit_selected(GtkMenuItem *menu_item, gpointer user_data) {
+ /* Prevent quit with dialogs open */
+ if (!gtk_grab_get_current()) {
+ /* Quit the program */
+ gtk_main_quit();
+ } else {
+ /* A window is already open, so we present it to the user */
+ GtkWidget *toplevel = gtk_widget_get_toplevel(gtk_grab_get_current());
+ gtk_window_present((GtkWindow*)toplevel);
+ }
+}
+
+/* Called when status icon is control-clicked */
+static gboolean show_actions_menu(gpointer data) {
+ /* Declare some variables */
+ GtkWidget *menu, *menu_item,
+ *menu_image, *item_label;
+
+ /* Create menu */
+ menu = gtk_menu_new();
+ g_signal_connect((GObject*)menu, "selection-done", (GCallback)gtk_widget_destroy, NULL);
+ /* Actions using: */
+ menu_item = gtk_image_menu_item_new_with_label(_("Actions using:"));
+ menu_image = gtk_image_new_from_stock(GTK_STOCK_EXECUTE, GTK_ICON_SIZE_MENU);
+ gtk_image_menu_item_set_image((GtkImageMenuItem*)menu_item, menu_image);
+ g_signal_connect((GObject*)menu_item, "select", (GCallback)gtk_menu_item_deselect, NULL);
+ gtk_menu_shell_append((GtkMenuShell*)menu, menu_item);
+ /* Clipboard contents */
+ gchar* text = gtk_clipboard_wait_for_text(clipboard);
+ if (text != NULL)
+ {
+ menu_item = gtk_menu_item_new_with_label(_("None"));
+ /* Modify menu item label properties */
+ item_label = gtk_bin_get_child((GtkBin*)menu_item);
+ gtk_label_set_single_line_mode((GtkLabel*)item_label, TRUE);
+ gtk_label_set_ellipsize((GtkLabel*)item_label, prefs.ellipsize);
+ gtk_label_set_width_chars((GtkLabel*)item_label, 30);
+ /* Making bold... */
+ gchar* bold_text = g_markup_printf_escaped("<b>%s</b>", text);
+ gtk_label_set_markup((GtkLabel*)item_label, bold_text);
+ g_free(bold_text);
+ /* Append menu item */
+ g_signal_connect((GObject*)menu_item, "select", (GCallback)gtk_menu_item_deselect, NULL);
+ gtk_menu_shell_append((GtkMenuShell*)menu, menu_item);
+ }
+ else
+ {
+ /* Create menu item for empty clipboard contents */
+ menu_item = gtk_menu_item_new_with_label(_("None"));
+ /* Modify menu item label properties */
+ item_label = gtk_bin_get_child((GtkBin*)menu_item);
+ gtk_label_set_markup((GtkLabel*)item_label, _("<b>None</b>"));
+ /* Append menu item */
+ g_signal_connect((GObject*)menu_item, "select", (GCallback)gtk_menu_item_deselect, NULL);
+
+ gtk_menu_shell_append((GtkMenuShell*)menu, menu_item);
+ }
+ /* -------------------- */
+ gtk_menu_shell_append((GtkMenuShell*)menu, gtk_separator_menu_item_new());
+ /* Actions */
+ gchar* path = g_build_filename(g_get_user_data_dir(), ACTIONS_FILE, NULL);
+ FILE* actions_file = fopen(path, "rb");
+ g_free(path);
+ /* Check that it opened and begin read */
+ if (actions_file)
+ {
+ gint size;
+ size_t fread_return;
+ fread_return = fread(&size, 4, 1, actions_file);
+ /* Check if actions file is empty */
+ if (!size)
+ {
+ /* File contained no actions so adding empty */
+ menu_item = gtk_menu_item_new_with_label(_("Empty"));
+ gtk_widget_set_sensitive(menu_item, FALSE);
+ gtk_menu_shell_append((GtkMenuShell*)menu, menu_item);
+ }
+ /* Continue reading items until size is 0 */
+ while (size)
+ {
+ /* Read name */
+ gchar* name = (gchar*)g_malloc(size + 1);
+ fread_return = fread(name, size, 1, actions_file);
+ name[size] = '\0';
+ menu_item = gtk_menu_item_new_with_label(name);
+ g_free(name);
+ fread_return = fread(&size, 4, 1, actions_file);
+ /* Read command */
+ gchar* command = (gchar*)g_malloc(size + 1);
+ fread_return = fread(command, size, 1, actions_file);
+ command[size] = '\0';
+ fread_return = fread(&size, 4, 1, actions_file);
+ /* Append the action */
+ gtk_menu_shell_append((GtkMenuShell*)menu, menu_item);
+ g_signal_connect((GObject*)menu_item, "activate",
+ (GCallback)action_selected, (gpointer)command);
+ }
+ fclose(actions_file);
+ }
+ else
+ {
+ /* File did not open so adding empty */
+ menu_item = gtk_menu_item_new_with_label(_("Empty"));
+ gtk_widget_set_sensitive(menu_item, FALSE);
+ gtk_menu_shell_append((GtkMenuShell*)menu, menu_item);
+ }
+ /* -------------------- */
+ gtk_menu_shell_append((GtkMenuShell*)menu, gtk_separator_menu_item_new());
+ /* Append "Remove all" item */
+ menu_item = gtk_menu_item_new_with_label(_("Remove all"));
+ gtk_menu_shell_append((GtkMenuShell*)menu, menu_item);
+ g_signal_connect((GObject*)menu_item, "activate",
+ (GCallback)remove_all_selected, NULL);
+ /* Edit actions */
+ menu_item = gtk_image_menu_item_new_with_mnemonic(_("_Edit actions"));
+ menu_image = gtk_image_new_from_stock(GTK_STOCK_EDIT, GTK_ICON_SIZE_MENU);
+ gtk_image_menu_item_set_image((GtkImageMenuItem*)menu_item, menu_image);
+ g_signal_connect((GObject*)menu_item, "activate", (GCallback)edit_actions_selected, NULL);
+ gtk_menu_shell_append((GtkMenuShell*)menu, menu_item);
+ /* Popup the menu... */
+ gtk_widget_show_all(menu);
+ gtk_menu_popup((GtkMenu*)menu, NULL, NULL, NULL, NULL, 1, gtk_get_current_event_time());
+ /* Return false so the g_timeout_add() function is called only once */
+ return FALSE;
+}
+
+/* Append a character to the input buffer */
+static void append_to_input_buffer(gchar *character) {
+ if (input_index < MAX_INPUT_BUF_SIZE) {
+ input_buffer[input_index++] = *character;
+ input_buffer[input_index] = '\0';
+ }
+
+}
+
+/* Remove the last character from the input buffer */
+static void remove_from_input_buffer() {
+ if (input_index > 0) {
+ input_buffer[--input_index] = '\0';
+ }
+}
+
+/* Completely wipe the input buffer */
+static void clear_input_buffer() {
+ input_index = 0;
+ input_buffer[input_index] = '\0';
+}
+
+/* Handle user input while the menu is open */
+static gboolean menu_key_pressed(GtkWidget *history_menu, GdkEventKey *event, gpointer user_data) {
+ gboolean handled = selected_by_digit(history_menu, event);
+ if (!handled) {
+ handled = selected_by_input(history_menu, event);
+ }
+ return handled;
+}
+
+
+/* Draw an underline under the matched portion of text.
+ * match should be a pointer to the first character of the matched text.
+ */
+void underline_match(char* match, GtkMenuItem* menu_item, const gchar* menu_label) {
+ if (!match)
+ return;
+
+ int start = match - menu_label;
+ int end = start + strlen(input_buffer);
+
+ PangoAttribute* underline = pango_attr_underline_new (PANGO_UNDERLINE_SINGLE);
+ underline->start_index = start;
+ underline->end_index = end;
+
+ PangoAttrList* attr_list = pango_attr_list_new();
+ pango_attr_list_insert (attr_list, underline);
+
+ GtkWidget* gtk_label = gtk_bin_get_child (GTK_BIN (menu_item));
+ gtk_label_set_attributes (gtk_label, attr_list);
+}
+
+/*
+ * As the user types, attempt to match input with the values in the menu. The matched text will be
+ * underlined and non matching entries greyed out.
+*/
+gboolean selected_by_input(const GtkWidget *history_menu, const GdkEventKey *event) {
+ if (event->keyval == GDK_KEY_Delete || event->keyval == GDK_KEY_BackSpace) {
+ remove_from_input_buffer();
+ } else if (event->keyval == GDK_KEY_KP_Enter || event->keyval == GDK_KEY_Return || event->keyval == GDK_KEY_Escape) {
+ clear_input_buffer();
+ return FALSE;
+ }
+
+ if (event->keyval == GDK_Down || event->keyval == GDK_Up) {
+ return FALSE;
+ }
+
+ if (isprint(*event->string))
+ append_to_input_buffer(event->string);
+
+ GtkMenuShell* menu = (GtkMenuShell *) history_menu;
+ GList* element = menu->children;
+ GtkMenuItem *menu_item, *first_match = 0;
+
+ const gchar* menu_label;
+ int count, match_count = 0;
+ char* match;
+
+ while (element->next != NULL && count < prefs.items_menu) {
+ menu_item = (GtkMenuItem *) element->data;
+ menu_label = gtk_menu_item_get_label(menu_item);
+
+ gtk_menu_item_deselect(menu_item);
+
+ match = strcasestr(menu_label, input_buffer);
+ if (match) {
+ if (!first_match)
+ first_match = menu_item;
+ match_count++;
+ underline_match(match, menu_item, menu_label);
+ gtk_widget_set_sensitive(menu_item, true);
+ } else {
+ gtk_widget_set_sensitive(menu_item, false);
+ }
+ element = element->next;
+ count++;
+ }
+
+ if (first_match && match_count != prefs.items_menu) {
+ gtk_menu_item_select(first_match);
+ menu->active_menu_item = (GtkWidget *) first_match;
+ return TRUE;
+ }
+ return FALSE;
+}
+
+gboolean selected_by_digit(const GtkWidget *history_menu, const GdkEventKey *event) {
+ switch (event->keyval) {
+ case XK_1:
+ case XK_KP_1:
+ item_selected((GtkMenuItem*)history_menu, GINT_TO_POINTER(0));
+ gtk_widget_destroy(history_menu);
+ break;
+ case XK_2:
+ case XK_KP_2:
+ item_selected((GtkMenuItem*)history_menu, GINT_TO_POINTER(1));
+ gtk_widget_destroy(history_menu);
+ break;
+ case XK_3:
+ case XK_KP_3:
+ item_selected((GtkMenuItem*)history_menu, GINT_TO_POINTER(2));
+ gtk_widget_destroy(history_menu);
+ break;
+ case XK_4:
+ case XK_KP_4:
+ item_selected((GtkMenuItem*)history_menu, GINT_TO_POINTER(3));
+ gtk_widget_destroy(history_menu);
+ break;
+ case XK_5:
+ case XK_KP_5:
+ item_selected((GtkMenuItem*)history_menu, GINT_TO_POINTER(4));
+ gtk_widget_destroy(history_menu);
+ break;
+ case XK_6:
+ case XK_KP_6:
+ item_selected((GtkMenuItem*)history_menu, GINT_TO_POINTER(5));
+ gtk_widget_destroy(history_menu);
+ break;
+ case XK_7:
+ case XK_KP_7:
+ item_selected((GtkMenuItem*)history_menu, GINT_TO_POINTER(6));
+ gtk_widget_destroy(history_menu);
+ break;
+ case XK_8:
+ case XK_KP_8:
+ item_selected((GtkMenuItem*)history_menu, GINT_TO_POINTER(7));
+ gtk_widget_destroy(history_menu);
+ break;
+ case XK_9:
+ case XK_KP_9:
+ item_selected((GtkMenuItem*)history_menu, GINT_TO_POINTER(8));
+ gtk_widget_destroy(history_menu);
+ break;
+ case XK_0:
+ case XK_KP_0:
+ item_selected((GtkMenuItem*)history_menu, GINT_TO_POINTER(9));
+ gtk_widget_destroy(history_menu);
+ break;
+
+ default:
+ return FALSE;
+ }
+ return TRUE;
+}
+
+static void toggle_offline_mode() {
+ if (prefs.offline_mode) {
+ /* Restore clipboard contents before turning offline mode off */
+ gtk_clipboard_set_text(clipboard, clipboard_text != NULL ? clipboard_text : "", -1);
+ }
+
+ prefs.offline_mode = !prefs.offline_mode;
+ /* Save the change */
+ save_preferences();
+}
+
+/* When the menu is closed, clear the input buffer */
+gboolean menu_destroyed(const GtkWidget *history_menu, const GdkEventKey *event) {
+ clear_input_buffer();
+ return FALSE;
+}
+
+static GtkWidget *create_history_menu(GtkWidget *history_menu) {
+ GtkWidget *menu_item, *item_label;
+ history_menu = gtk_menu_new();
+ g_signal_connect((GObject*)history_menu, "key-press-event", (GCallback)menu_key_pressed, NULL);
+ g_signal_connect((GObject*)history_menu, "destroy", (GCallback)menu_destroyed, NULL);
+
+ /* Items */
+ if ((history != NULL) && (history->data != NULL))
+ {
+ /* Declare some variables */
+ GList* element;
+ gint element_number = 0;
+ gint element_number_small = 0;
+ gchar* primary_temp = gtk_clipboard_wait_for_text(primary);
+ gchar* clipboard_temp = gtk_clipboard_wait_for_text(clipboard);
+ /* Reverse history if enabled */
+ if (prefs.reverse_history)
+ {
+ history = g_list_reverse(history);
+ element_number = g_list_length(history) - 1;
+ }
+ /* Go through each element and adding each */
+ for (element = history; (element != NULL) && (element_number_small < prefs.items_menu); element = element->next)
+ {
+ history_item *elem_data = element->data;
+ GString* string = g_string_new((gchar*)elem_data->content);
+ /* Ellipsize text */
+ string = ellipsize_string(string);
+ /* Remove control characters */
+ string = remove_newlines_string(string);
+ /* Make new item with ellipsized text */
+ gchar* list_item;
+ if (prefs.show_indexes)
+ {
+ list_item = g_strdup_printf("%d. %s", (element_number_small+1), string->str);
+ } else {
+ list_item = g_strdup(string->str);
+ }
+ menu_item = gtk_menu_item_new_with_label(list_item);
+ g_signal_connect((GObject*)menu_item, "activate", (GCallback)item_selected, GINT_TO_POINTER(element_number));
+
+ /* Modify menu item label properties */
+ item_label = gtk_bin_get_child((GtkBin*)menu_item);
+ gtk_label_set_single_line_mode((GtkLabel*)item_label, prefs.single_line);
+
+ /* Check if item is also clipboard text and make bold */
+ if ((clipboard_temp) && (g_strcmp0((gchar*)elem_data->content, clipboard_temp) == 0))
+ {
+ gchar* bold_text = g_markup_printf_escaped("<b>%s</b>", list_item);
+ gtk_label_set_markup((GtkLabel*)item_label, bold_text);
+ g_free(bold_text);
+ }
+ else if ((primary_temp) && (g_strcmp0((gchar*)elem_data->content, primary_temp) == 0))
+ {
+ gchar* italic_text = g_markup_printf_escaped("<i>%s</i>", list_item);
+ gtk_label_set_markup((GtkLabel*)item_label, italic_text);
+ g_free(italic_text);
+ }
+ g_free(list_item);
+ /* Append item */
+ gtk_menu_shell_append((GtkMenuShell*)history_menu, menu_item);
+ /* Prepare for next item */
+ g_string_free(string, TRUE);
+ if (prefs.reverse_history)
+ element_number--;
+ else
+ element_number++;
+ element_number_small++;
+ }
+ /* Cleanup */
+ g_free(primary_temp);
+ g_free(clipboard_temp);
+ /* Return history to normal if reversed */
+ if (prefs.reverse_history)
+ history = g_list_reverse(history);
+ }
+ else
+ {
+ /* Nothing in history so adding empty */
+ menu_item = gtk_menu_item_new_with_label(_("Empty"));
+ gtk_widget_set_sensitive(menu_item, FALSE);
+ gtk_menu_shell_append((GtkMenuShell*)history_menu, menu_item);
+ }
+ if (prefs.statics_show) {
+ /* -------------------- */
+ gtk_menu_shell_append((GtkMenuShell*)history_menu, gtk_separator_menu_item_new());
+
+ /* Items */
+ GList *elem = history;
+ int elem_num = 0;
+ int elem_num_static = 1;
+ while (elem && (elem_num_static <= prefs.statics_items)) {
+ history_item *hitem = elem->data;
+ if (hitem->is_static) {
+ GString* string = g_string_new((gchar*)hitem->content);
+ /* Ellipsize text */
+ string = ellipsize_string(string);
+ /* Remove control characters */
+ string = remove_newlines_string(string);
+ gchar* list_item;
+ if (prefs.show_indexes)
+ {
+ list_item = g_strdup_printf("%d. %s", (elem_num_static), string->str);
+ } else {
+ list_item = g_strdup(string->str);
+ }
+ menu_item = gtk_menu_item_new_with_label(list_item);
+ g_signal_connect((GObject*)menu_item, "activate", (GCallback)item_selected, GINT_TO_POINTER(elem_num));
+ /* Modify menu item label properties */
+ item_label = gtk_bin_get_child((GtkBin*)menu_item);
+ gtk_label_set_single_line_mode((GtkLabel*)item_label, prefs.single_line);
+ g_free(list_item);
+ g_string_free(string, TRUE);
+ gtk_menu_shell_append((GtkMenuShell*)history_menu, menu_item);
+ elem_num_static++;
+ }
+ elem_num++;
+ elem = elem->next;
+ }
+ }
+ /* Show a notice in offline mode */
+ if (prefs.offline_mode) {
+ gtk_menu_shell_append((GtkMenuShell*)history_menu, gtk_separator_menu_item_new());
+
+ menu_item = gtk_menu_item_new_with_label("");
+ item_label = gtk_bin_get_child((GtkBin*)menu_item);
+ gtk_label_set_markup((GtkLabel*)item_label, "<b>Offline mode is ON</b>");
+ gtk_label_set_single_line_mode((GtkLabel*)item_label, TRUE);
+ gtk_widget_set_sensitive(item_label, FALSE);
+ gtk_menu_shell_append((GtkMenuShell*)history_menu, menu_item);
+ }
+ /* Append "Remove all" item */
+ menu_item = gtk_menu_item_new_with_label(_("Remove all"));
+ gtk_menu_shell_append((GtkMenuShell*)history_menu, menu_item);
+ g_signal_connect((GObject*)menu_item, "activate",
+ (GCallback)remove_all_selected, NULL);
+
+ return history_menu;
+}
+
+/* Generates the history menu */
+static gboolean show_history_menu(gpointer data) {
+ /* Declare some variables */
+ GtkWidget *menu = gtk_menu_new();
+ menu = create_history_menu(menu);
+ g_signal_connect((GObject*)menu, "selection-done", (GCallback)gtk_widget_destroy, NULL);
+ /* Popup the menu... */
+ gtk_widget_show_all(menu);
+ gtk_menu_popup((GtkMenu*)menu, NULL, NULL, NULL, NULL, 1, gtk_get_current_event_time());
+ gtk_menu_shell_select_first((GtkMenuShell*)menu, TRUE);
+ /* Return FALSE so the g_timeout_add() function is called only once */
+ return FALSE;
+}
+
+static GtkWidget *create_tray_menu(GtkWidget *tray_menu, int menu_type) {
+ GtkWidget *menu_item, *menu_image;
+
+ if ((menu_type == 1) || (menu_type == 2)) {
+ tray_menu = create_history_menu(tray_menu);
+ } else {
+ tray_menu = gtk_menu_new();
+ }
+ if (!prefs.use_rmb_menu || (menu_type == 2)) {
+ /* -------------------- */
+ gtk_menu_shell_append((GtkMenuShell*)tray_menu, gtk_separator_menu_item_new());
+ }
+ /* We show the options only if:
+ * - use_rmb_menu is active and menu_type is right-click, OR
+ * - use_rmb_menu is inactive and menu_type is left-click */
+ if ((prefs.use_rmb_menu && (menu_type == 3)) || (!prefs.use_rmb_menu) || (menu_type == 2)) {
+ /* Offline mode checkbox */
+ menu_item = gtk_check_menu_item_new_with_mnemonic(_("_Offline mode"));
+ gtk_check_menu_item_set_active((GtkCheckMenuItem*)menu_item, prefs.offline_mode);
+ g_signal_connect((GObject*)menu_item, "activate", (GCallback)toggle_offline_mode, NULL);
+ gtk_menu_shell_append((GtkMenuShell*)tray_menu, menu_item);
+ /* About */
+ menu_item = gtk_image_menu_item_new_from_stock(GTK_STOCK_ABOUT, NULL);
+ g_signal_connect((GObject*)menu_item, "activate", (GCallback)show_about_dialog, NULL);
+ gtk_menu_shell_append((GtkMenuShell*)tray_menu, menu_item);
+ /* Manage history */
+ menu_item = gtk_image_menu_item_new_with_mnemonic(_("_Manage history"));
+ menu_image = gtk_image_new_from_stock(GTK_STOCK_FIND, GTK_ICON_SIZE_MENU);
+ gtk_image_menu_item_set_image((GtkImageMenuItem*)menu_item, menu_image);
+ g_signal_connect((GObject*)menu_item, "activate", (GCallback)show_search, NULL);
+ gtk_menu_shell_append((GtkMenuShell*)tray_menu, menu_item);
+ /* Preferences */
+ menu_item = gtk_image_menu_item_new_from_stock(GTK_STOCK_PREFERENCES, NULL);
+ g_signal_connect((GObject*)menu_item, "activate", (GCallback)preferences_selected, NULL);
+ gtk_menu_shell_append((GtkMenuShell*)tray_menu, menu_item);
+ /* Quit */
+ menu_item = gtk_image_menu_item_new_from_stock(GTK_STOCK_QUIT, NULL);
+ g_signal_connect((GObject*)menu_item, "activate", (GCallback)quit_selected, NULL);
+ gtk_menu_shell_append((GtkMenuShell*)tray_menu, menu_item);
+ }
+ /* Popup the menu... */
+ gtk_widget_show_all(tray_menu);
+ return tray_menu;
+}
+
+#ifdef HAVE_APPINDICATOR
+
+void create_app_indicator(gint create) {
+ /* Create the menu */
+ indicator_menu = create_tray_menu(indicator_menu, 2);
+ /* check if we need to create the indicator or just refresh the menu */
+ if(create == 1) {
+ indicator = app_indicator_new("clipit", "clipit-trayicon", APP_INDICATOR_CATEGORY_APPLICATION_STATUS);
+ app_indicator_set_status (indicator, APP_INDICATOR_STATUS_ACTIVE);
+ app_indicator_set_attention_icon (indicator, "clipit-trayicon");
+ }
+ app_indicator_set_menu (indicator, GTK_MENU (indicator_menu));
+}
+
+#else
+
+/* Called when status icon is clicked */
+static void show_clipit_menu(int menu_type) {
+ /* If the menu is visible, we don't do anything, so that it gets hidden */
+ if((statusicon_menu != NULL) && gtk_widget_get_visible((GtkWidget *)statusicon_menu))
+ return;
+ if(status_menu_lock)
+ return;
+ status_menu_lock = TRUE;
+ /* Create the menu */
+ statusicon_menu = create_tray_menu(statusicon_menu, menu_type);
+ g_signal_connect((GObject*)statusicon_menu, "selection-done", (GCallback)gtk_widget_destroy, NULL);
+ /* GENERATE THE MENU*/
+ gtk_widget_set_visible(statusicon_menu, TRUE);
+ gtk_menu_popup((GtkMenu*)statusicon_menu, NULL, NULL, gtk_status_icon_position_menu, status_icon, 1, gtk_get_current_event_time());
+ gtk_menu_shell_select_first((GtkMenuShell*)statusicon_menu, TRUE);
+
+ status_menu_lock = FALSE;
+}
+
+/* Called when status icon is clicked */
+/* (checks type of click and calls correct function) */
+static void status_icon_clicked(GtkStatusIcon *status_icon, GdkEventButton *event ) {
+ /* Check what type of click was recieved */
+ GdkModifierType state;
+ gtk_get_current_event_state(&state);
+ /* Control click */
+ if (state == GDK_MOD2_MASK+GDK_CONTROL_MASK || state == GDK_CONTROL_MASK)
+ {
+ if (actions_lock == FALSE)
+ {
+ g_timeout_add(POPUP_DELAY, show_actions_menu, NULL);
+ }
+ }
+ /* Left click */
+ else if (event->button == 1)
+ {
+ show_clipit_menu(1);
+ }
+ else if (event->button == 3)
+ {
+ if (prefs.use_rmb_menu)
+ show_clipit_menu(3);
+ }
+}
+
+#endif
+
+/* Called when history global hotkey is pressed */
+void history_hotkey(char *keystring, gpointer user_data) {
+ g_timeout_add(POPUP_DELAY, show_history_menu, NULL);
+}
+
+/* Called when actions global hotkey is pressed */
+void actions_hotkey(char *keystring, gpointer user_data) {
+ g_timeout_add(POPUP_DELAY, show_actions_menu, NULL);
+}
+
+/* Called when actions global hotkey is pressed */
+void menu_hotkey(char *keystring, gpointer user_data) {
+#ifndef HAVE_APPINDICATOR
+ show_clipit_menu(1);
+#endif
+}
+
+/* Called when search global hotkey is pressed */
+void search_hotkey(char *keystring, gpointer user_data) {
+ g_timeout_add(POPUP_DELAY, show_search, NULL);
+}
+
+/* Called when offline mode global hotkey is pressed */
+void offline_hotkey(char *keystring, gpointer user_data) {
+ toggle_offline_mode();
+}
+
+/* Startup calls and initializations */
+static void clipit_init() {
+ /* Create clipboard */
+ primary = gtk_clipboard_get(GDK_SELECTION_PRIMARY);
+ clipboard = gtk_clipboard_get(GDK_SELECTION_CLIPBOARD);
+ g_timeout_add(CHECK_INTERVAL, item_check, NULL);
+
+ /* Read preferences */
+ read_preferences();
+
+ /* Read history */
+ if (prefs.save_history)
+ read_history();
+
+ /* Bind global keys */
+ keybinder_init();
+ keybinder_bind(prefs.history_key, history_hotkey, NULL);
+ keybinder_bind(prefs.actions_key, actions_hotkey, NULL);
+ keybinder_bind(prefs.menu_key, menu_hotkey, NULL);
+ keybinder_bind(prefs.search_key, search_hotkey, NULL);
+ keybinder_bind(prefs.offline_key, offline_hotkey, NULL);
+
+ /* Create status icon */
+ if (!prefs.no_icon)
+ {
+#ifdef HAVE_APPINDICATOR
+ create_app_indicator(1);
+#else
+ status_icon = gtk_status_icon_new_from_icon_name("clipit-trayicon");
+ gtk_status_icon_set_tooltip_text((GtkStatusIcon*)status_icon, _("Clipboard Manager"));
+ g_signal_connect((GObject*)status_icon, "button_press_event", (GCallback)status_icon_clicked, NULL);
+#endif
+ }
+}
+
+/* This is Sparta! */
+int main(int argc, char **argv) {
+ bindtextdomain(GETTEXT_PACKAGE, CLIPITLOCALEDIR);
+ bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
+ textdomain(GETTEXT_PACKAGE);
+
+ input_buffer[0] = '\0';
+ input_index = 0;
+
+ /* Initiate GTK+ */
+ gtk_init(&argc, &argv);
+
+ /* Parse options and exit if returns TRUE */
+ if (argc > 1)
+ {
+ if (parse_options(argc, argv))
+ return 0;
+ }
+ /* Read input from stdin (if any) */
+ else
+ {
+ /* Check if stdin is piped */
+ if (!isatty(fileno(stdin)))
+ {
+ GString* piped_string = g_string_new(NULL);
+ /* Append stdin to string */
+ while (1)
+ {
+ gchar* buffer = (gchar*)g_malloc(256);
+ if (fgets(buffer, 256, stdin) == NULL)
+ {
+ g_free(buffer);
+ break;
+ }
+ g_string_append(piped_string, buffer);
+ g_free(buffer);
+ }
+ /* Check if anything was piped in */
+ if (piped_string->len > 0)
+ {
+ /* Truncate new line character */
+ /* g_string_truncate(piped_string, (piped_string->len - 1)); */
+ /* Copy to clipboard */
+ GtkClipboard* clip = gtk_clipboard_get(GDK_SELECTION_CLIPBOARD);
+ gtk_clipboard_set_text(clip, piped_string->str, -1);
+ gtk_clipboard_store(clip);
+ /* Exit */
+ return 0;
+ }
+ g_string_free(piped_string, TRUE);
+ return -1;
+ }
+ }
+
+ /* Init ClipIt */
+ clipit_init();
+
+ /* Create the history_timeout_timer if applicable */
+ init_history_timeout_timer();
+
+ /* Run GTK+ loop */
+ gtk_main();
+
+ /* Unbind keys */
+ keybinder_unbind(prefs.history_key, history_hotkey);
+ keybinder_unbind(prefs.actions_key, actions_hotkey);
+ keybinder_unbind(prefs.menu_key, menu_hotkey);
+ keybinder_unbind(prefs.search_key, search_hotkey);
+ keybinder_unbind(prefs.offline_key, offline_hotkey);
+ /* Cleanup */
+ g_free(prefs.history_key);
+ g_free(prefs.actions_key);
+ g_free(prefs.menu_key);
+ g_free(prefs.search_key);
+ g_free(prefs.offline_key);
+ g_list_foreach(history, (GFunc)g_free, NULL);
+ g_list_free(history);
+ g_free(primary_text);
+ g_free(clipboard_text);
+ g_free(synchronized_text);
+
+ /* Exit */
+ return 0;
+}
diff --git a/src/main.h b/src/main.h
new file mode 100644
index 0000000..e0c73e1
--- /dev/null
+++ b/src/main.h
@@ -0,0 +1,96 @@
+/* Copyright (C) 2010-2012 by Cristian Henzel <oss@rspwn.com>
+ * Copyright (C) 2011 by Eugene Nikolsky <pluton.od@gmail.com>
+ *
+ * forked from parcellite, which is
+ * Copyright (C) 2007-2008 by Xyhthyx <xyhthyx@gmail.com>
+ *
+ * This file is part of ClipIt.
+ *
+ * ClipIt 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.
+ *
+ * ClipIt is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "preferences.h"
+
+#ifndef MAIN_H
+#define MAIN_H
+
+G_BEGIN_DECLS
+
+#define ACTIONS_TAB 2
+#define POPUP_DELAY 30
+#define CHECK_INTERVAL 500
+
+#if GTK_MAJOR_VERSION == 3
+#define GTK_DIALOG_NO_SEPARATOR 0
+#endif
+
+typedef struct {
+ gboolean use_copy; /* Use copy */
+ gboolean use_primary; /* Use primary */
+ gboolean synchronize; /* Synchronize copy and primary */
+ gboolean automatic_paste; /* Automatically paste entry after selecting it */
+ gboolean show_indexes; /* Show index numbers in history menu */
+ gboolean save_uris; /* Save URIs in history */
+ gboolean use_rmb_menu; /* Use Right-Mouse-Button Menu */
+
+ gboolean save_history; /* Save history */
+ gint history_limit; /* Items in history */
+ gboolean history_timeout; /* Clear history after timeout */
+ gint history_timeout_seconds; /* Seconds to wait before clearing history */
+
+ gint items_menu; /* Items in history menu */
+ gboolean statics_show; /* Show statics items in history menu */
+ gint statics_items; /* Static items in history menu */
+
+ gboolean hyperlinks_only; /* Hyperlinks only */
+ gboolean confirm_clear; /* Confirm clear */
+
+ gboolean single_line; /* Show in a single line */
+ gboolean reverse_history; /* Show in reverse order */
+ gint item_length; /* Length of items */
+
+ gint ellipsize; /* Omitting */
+
+ gchar* history_key; /* History menu hotkey */
+ gchar* actions_key; /* Actions menu hotkey */
+ gchar* menu_key; /* ClipIt menu hotkey */
+ gchar* search_key; /* ClipIt search hotkey */
+ gchar* offline_key; /* ClipIt offline mode hotkey */
+
+ gboolean no_icon; /* No icon */
+
+ gboolean offline_mode; /* Offline mode */
+} prefs_t;
+
+extern prefs_t prefs;
+
+void history_hotkey(char *keystring, gpointer user_data);
+
+void actions_hotkey(char *keystring, gpointer user_data);
+
+void menu_hotkey(char *keystring, gpointer user_data);
+
+void search_hotkey(char *keystring, gpointer user_data);
+
+void offline_hotkey(char *keystring, gpointer user_data);
+
+void clear_main_data();
+
+#ifdef HAVE_APPINDICATOR
+void create_app_indicator(gint create);
+#endif
+
+G_END_DECLS
+
+#endif
diff --git a/src/manage.c b/src/manage.c
new file mode 100644
index 0000000..ffdb4b9
--- /dev/null
+++ b/src/manage.c
@@ -0,0 +1,429 @@
+/* Copyright (C) 2010-2012 by Cristian Henzel <oss@rspwn.com>
+ * Copyright (C) 2011 by Eugene Nikolsky <pluton.od@gmail.com>
+ *
+ * forked from parcellite, which is
+ * Copyright (C) 2007-2008 by Xyhthyx <xyhthyx@gmail.com>
+ *
+ * This file is part of ClipIt.
+ *
+ * ClipIt 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.
+ *
+ * ClipIt is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <glib.h>
+#include <gtk/gtk.h>
+#include <string.h>
+#include <stdlib.h>
+#include <X11/keysym.h>
+#include "main.h"
+#include "utils.h"
+#include "history.h"
+#include "keybinder.h"
+#include "preferences.h"
+#include "clipit-i18n.h"
+
+GtkListStore *search_list;
+GtkWidget *search_entry;
+GtkWidget *treeview_search;
+
+static void add_iter(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *piter, gpointer userdata)
+{
+ GArray *sel = (GArray*)userdata;
+ GtkTreeIter iter = *piter;
+ g_array_append_val(sel, iter);
+}
+
+/* Search through the history */
+static void search_history()
+{
+ guint16 search_len = gtk_entry_get_text_length((GtkEntry*)search_entry);
+ /* Test if there is text in the search box */
+ if(search_len > 0)
+ {
+ if ((history != NULL) && (history->data != NULL))
+ {
+ char* search_input = (char *)g_strdup(gtk_entry_get_text((GtkEntry*)search_entry));
+ GtkTreeIter search_iter;
+ while(gtk_tree_model_get_iter_first((GtkTreeModel*)search_list, &search_iter))
+ gtk_list_store_remove(search_list, &search_iter);
+
+ /* Declare some variables */
+ GList* element;
+ gint element_number = 0;
+ /* Go through each element and adding each */
+ for (element = history; element != NULL; element = element->next)
+ {
+ history_item *elem_data = element->data;
+ GString* string = g_string_new((gchar*)elem_data->content);
+ gchar* strn_cmp_to = g_utf8_strdown(string->str, string->len);
+ gchar* strn_find = g_utf8_strdown(search_input, search_len);
+ char* result = strstr(strn_cmp_to, strn_find);
+ if(result)
+ {
+ GtkTreeIter row_iter;
+ gtk_list_store_append(search_list, &row_iter);
+ string = ellipsize_string(string);
+ string = remove_newlines_string(string);
+ int row_num = g_list_position(history, element);
+ gtk_list_store_set(search_list, &row_iter, 0, row_num, 1, string->str, -1);
+ }
+ /* Prepare for next item */
+ g_string_free(string, TRUE);
+ element_number++;
+ }
+ }
+ }
+ else
+ {
+ /* If nothing is searched for, we show all items */
+ if ((history != NULL) && (history->data != NULL))
+ {
+ GtkTreeIter search_iter;
+ /* First, we remove all items */
+ while(gtk_tree_model_get_iter_first((GtkTreeModel*)search_list, &search_iter))
+ gtk_list_store_remove(search_list, &search_iter);
+
+ /* Declare some variables */
+ GList *element;
+ /* Go through each element and adding each */
+ for (element = history; element != NULL; element = element->next)
+ {
+ history_item *elem_data = element->data;
+ GString *string = g_string_new((gchar*)elem_data->content);
+ GtkTreeIter row_iter;
+ gtk_list_store_append(search_list, &row_iter);
+ string = ellipsize_string(string);
+ string = remove_newlines_string(string);
+ int row_num = g_list_position(history, element);
+ gtk_list_store_set(search_list, &row_iter, 0, row_num, 1, string->str, -1);
+
+ /* Prepare for next item */
+ g_string_free(string, TRUE);
+ }
+ }
+ }
+}
+
+/* Called when Edit is selected from Manage dialog */
+static void edit_selected()
+{
+ GtkTreeSelection* search_selection = gtk_tree_view_get_selection((GtkTreeView*)treeview_search);
+ /* This checks if there's anything selected */
+ gint selected_count = gtk_tree_selection_count_selected_rows(search_selection);
+ if (selected_count > 0) {
+ /* Create clipboard buffer and set its text */
+ gint selected_item_nr;
+ GArray *sel = g_array_new(FALSE, FALSE, sizeof(GtkTreeIter));
+ gtk_tree_selection_selected_foreach(search_selection, add_iter, sel);
+ gtk_tree_selection_unselect_all(search_selection);
+ GtkTreeIter *iter = &g_array_index(sel, GtkTreeIter, 0);
+ gtk_tree_model_get((GtkTreeModel*)search_list, iter, 0, &selected_item_nr, -1);
+ g_array_free(sel, TRUE);
+ GList *element = g_list_nth(history, selected_item_nr);
+ history_item *elem_data = element->data;
+ GList* elementafter = element->next;
+ GtkTextBuffer* clipboard_buffer = gtk_text_buffer_new(NULL);
+ gtk_text_buffer_set_text(clipboard_buffer, (gchar*)elem_data->content, -1);
+ /* Create the dialog */
+ GtkWidget* dialog = gtk_dialog_new_with_buttons(_("Editing Clipboard"), NULL,
+ (GTK_DIALOG_MODAL + GTK_DIALOG_NO_SEPARATOR),
+ GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT,
+ GTK_STOCK_OK, GTK_RESPONSE_ACCEPT, NULL);
+
+ gtk_window_set_default_size((GtkWindow*)dialog, 450, 300);
+ gtk_window_set_icon((GtkWindow*)dialog, gtk_widget_render_icon(dialog, GTK_STOCK_EDIT, GTK_ICON_SIZE_MENU, NULL));
+
+ /* Build the scrolled window with the text view */
+ GtkWidget* scrolled_window = gtk_scrolled_window_new((GtkAdjustment*) gtk_adjustment_new(0, 0, 0, 0, 0, 0),
+ (GtkAdjustment*) gtk_adjustment_new(0, 0, 0, 0, 0, 0));
+
+ gtk_scrolled_window_set_policy((GtkScrolledWindow*)scrolled_window,
+ GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
+
+ gtk_box_pack_start(GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(dialog))), scrolled_window, TRUE, TRUE, 2);
+ GtkWidget* text_view = gtk_text_view_new_with_buffer(clipboard_buffer);
+ gtk_text_view_set_left_margin((GtkTextView*)text_view, 2);
+ gtk_text_view_set_right_margin((GtkTextView*)text_view, 2);
+ gtk_container_add((GtkContainer*)scrolled_window, text_view);
+ GtkWidget *static_check = gtk_check_button_new_with_mnemonic(_("_Static item"));
+ gtk_toggle_button_set_active((GtkToggleButton*)static_check, elem_data->is_static);
+ gtk_box_pack_start(GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(dialog))), static_check, FALSE, FALSE, 2);
+
+ /* Run the dialog */
+ gtk_widget_show_all(dialog);
+ if (gtk_dialog_run((GtkDialog*)dialog) == GTK_RESPONSE_ACCEPT)
+ {
+ /* Save changes done to the clipboard */
+ GtkTextIter start, end;
+ gtk_text_buffer_get_start_iter(clipboard_buffer, &start);
+ gtk_text_buffer_get_end_iter(clipboard_buffer, &end);
+
+ /* Delete any duplicate */
+ delete_duplicate(gtk_text_buffer_get_text(clipboard_buffer, &start, &end, TRUE));
+
+ /* Remove old entry */
+ history = g_list_remove(history, elem_data);
+
+ /* Insert new element where the old one was */
+ history_item *hitem = g_new0(history_item, 1);
+ hitem->content = g_strdup(gtk_text_buffer_get_text(clipboard_buffer, &start, &end, TRUE));
+ hitem->is_static = gtk_toggle_button_get_active((GtkToggleButton*)static_check);
+ history = g_list_insert_before(history, elementafter, hitem);
+
+ if(selected_item_nr == 0)
+ {
+ GtkClipboard *clipboard = gtk_clipboard_get(GDK_SELECTION_CLIPBOARD);
+ history_item *hitem = history->data;
+ gtk_clipboard_set_text(clipboard, hitem->content, -1);
+ }
+ }
+ gtk_widget_destroy(dialog);
+ search_history();
+ }
+}
+
+/* Called when Remove is selected from Manage dialog */
+static void remove_selected()
+{
+ GtkTreeSelection* search_selection = gtk_tree_view_get_selection((GtkTreeView*)treeview_search);
+ gint selected_count = gtk_tree_selection_count_selected_rows(search_selection);
+ if (selected_count > 0) {
+ gint i;
+ GtkTreeModel *model = gtk_tree_view_get_model((GtkTreeView*)treeview_search);
+ GtkListStore *store = GTK_LIST_STORE(model);
+ GArray *sel = g_array_new(FALSE, FALSE, sizeof(GtkTreeIter));
+ gtk_tree_selection_selected_foreach(search_selection, add_iter, sel);
+ gtk_tree_selection_unselect_all(search_selection);
+ for (i = 0; i < sel->len; i++) {
+ gint remove_item;
+ GtkTreeIter *iter = &g_array_index(sel, GtkTreeIter, i);
+ gtk_tree_model_get((GtkTreeModel*)search_list, iter, 0, &remove_item, -1);
+ if ((i == 0) && (remove_item == 0)) {
+ gtk_clipboard_set_text(gtk_clipboard_get(GDK_SELECTION_PRIMARY), "", -1);
+ gtk_clipboard_set_text(gtk_clipboard_get(GDK_SELECTION_CLIPBOARD), "", -1);
+ }
+
+ history = g_list_remove(history, g_list_nth_data(history, remove_item));
+ if (!gtk_list_store_remove(store, iter))
+ continue;
+
+ do {
+ gint item;
+ gtk_tree_model_get(model, iter, 0, &item, -1);
+ gtk_list_store_set(store, iter, 0, item - 1, -1);
+ } while (gtk_tree_model_iter_next(model, iter));
+ }
+ g_array_free(sel, TRUE);
+ }
+}
+
+/* Called when Remove all is selected from Manage dialog */
+void remove_all_selected(gpointer user_data)
+{
+ /* Check for confirm clear option */
+ if (prefs.confirm_clear)
+ {
+ GtkWidget* confirm_dialog = gtk_message_dialog_new(NULL,
+ GTK_DIALOG_MODAL,
+ GTK_MESSAGE_OTHER,
+ GTK_BUTTONS_OK_CANCEL,
+ _("Clear the history?"));
+ gtk_window_set_title((GtkWindow*)confirm_dialog, _("Clear history"));
+
+ if (gtk_dialog_run((GtkDialog*)confirm_dialog) != GTK_RESPONSE_OK)
+ {
+ gtk_widget_destroy(confirm_dialog);
+ return;
+ }
+
+ gtk_widget_destroy(confirm_dialog);
+ }
+
+ /* Clear history and free history-related variables */
+ g_list_free(history);
+ history = NULL;
+ save_history();
+ clear_main_data();
+ if (GTK_IS_LIST_STORE(search_list))
+ gtk_list_store_clear(search_list);
+}
+
+static void search_doubleclick()
+{
+ GtkTreeSelection* search_selection = gtk_tree_view_get_selection((GtkTreeView*)treeview_search);
+ /* Check if selected */
+ gint selected_count = gtk_tree_selection_count_selected_rows(search_selection);
+ if (selected_count == 1) {
+ gint selected_item_nr;
+ GArray *sel = g_array_new(FALSE, FALSE, sizeof(GtkTreeIter));
+ gtk_tree_selection_selected_foreach(search_selection, add_iter, sel);
+ gtk_tree_selection_unselect_all(search_selection);
+ GtkTreeIter *iter = &g_array_index(sel, GtkTreeIter, 0);
+ gtk_tree_model_get((GtkTreeModel*)search_list, iter, 0, &selected_item_nr, -1);
+ g_array_free(sel, TRUE);
+ GList *element = g_list_nth(history, selected_item_nr);
+ history_item *elem_data = element->data;
+ GtkClipboard* prim = gtk_clipboard_get(GDK_SELECTION_PRIMARY);
+ GtkClipboard* clip = gtk_clipboard_get(GDK_SELECTION_CLIPBOARD);
+ gtk_clipboard_set_text(prim, (gchar*)elem_data->content, -1);
+ gtk_clipboard_set_text(clip, (gchar*)elem_data->content, -1);
+ }
+}
+
+static gboolean search_click(GtkWidget *widget, GdkEventButton *event, GtkWidget *search_window)
+{
+ if(event->type==GDK_2BUTTON_PRESS || event->type==GDK_3BUTTON_PRESS) {
+ search_doubleclick();
+ gtk_widget_destroy(search_window);
+ }
+ return FALSE;
+}
+
+static gboolean search_key_released(GtkWidget *widget, GdkEventKey *event, gpointer user_data)
+{
+ search_history();
+ return FALSE;
+}
+
+static gboolean treeview_key_pressed(GtkWidget *widget, GdkEventKey *event, GtkWidget *search_window)
+{
+ switch (event->keyval) {
+ case XK_Escape:
+ case XK_Home:
+ case XK_Up:
+ case XK_Down:
+ case XK_Page_Up:
+ case XK_Page_Down:
+ case XK_End:
+ case XK_Shift_L:
+ case XK_Shift_R:
+ case XK_Control_L:
+ case XK_Control_R:
+ case XK_Tab: // allow to switch focus by the Tab key
+ return FALSE;
+ case XK_Return:
+ search_doubleclick();
+ gtk_widget_destroy(search_window);
+ break;
+ case XK_Delete:
+ remove_selected();
+ break;
+ }
+ return TRUE;
+}
+
+void search_window_response(GtkDialog *dialog, gint response_id, gpointer user_data)
+{
+ if(response_id < 0)
+ {
+ save_history();
+ gtk_widget_destroy((GtkWidget*)dialog);
+ }
+}
+
+/* Shows the search dialog */
+gboolean show_search()
+{
+ /* Prevent multiple instances */
+ if(gtk_grab_get_current()) {
+ /* A window is already open, so we present it to the user */
+ GtkWidget *toplevel = gtk_widget_get_toplevel(gtk_grab_get_current());
+ gtk_window_present((GtkWindow*)toplevel);
+ return FALSE;
+ }
+ /* Declare some variables */
+ GtkWidget *hbox;
+
+ GtkTreeViewColumn *tree_column;
+
+ /* Create the dialog */
+ GtkWidget* search_dialog = gtk_dialog_new();
+
+ gtk_window_set_icon((GtkWindow*)search_dialog, gtk_widget_render_icon(search_dialog, GTK_STOCK_FIND, GTK_ICON_SIZE_MENU, NULL));
+ gchar *orig_title = _("Manage History");
+ gchar *title = 0;
+ if (prefs.offline_mode)
+ title = g_strconcat(orig_title, _(" (Offline mode)"), NULL);
+ else
+ title = g_strdup(orig_title);
+ gtk_window_set_title((GtkWindow*)search_dialog, title);
+ g_free(title);
+ gtk_window_set_resizable((GtkWindow*)search_dialog, TRUE);
+ gtk_window_set_position((GtkWindow*)search_dialog, GTK_WIN_POS_CENTER);
+
+ GdkScreen* screen = gtk_window_get_screen(GTK_WINDOW(search_dialog));
+ gint screen_height = gdk_screen_get_height(screen)-120;
+ gint win_height = 600;
+ if (win_height > screen_height)
+ win_height = screen_height;
+
+ GtkWidget* vbox_search = gtk_vbox_new(FALSE, 10);
+ gtk_box_pack_start(GTK_BOX(gtk_dialog_get_content_area (GTK_DIALOG(search_dialog))), vbox_search, TRUE, TRUE, 2);
+ gtk_widget_set_size_request((GtkWidget*)vbox_search, 400, win_height);
+
+ hbox = gtk_hbox_new(TRUE, 4);
+ gtk_box_pack_start((GtkBox*)vbox_search, hbox, FALSE, FALSE, 0);
+ search_entry = gtk_entry_new();
+ gtk_box_pack_end((GtkBox*)hbox, search_entry, TRUE, TRUE, 0);
+ g_signal_connect((GObject*)search_entry, "key-release-event", (GCallback)search_key_released, NULL);
+
+ /* Build the exclude treeview */
+ GtkWidget* scrolled_window_search = gtk_scrolled_window_new(
+ (GtkAdjustment*)gtk_adjustment_new(0, 0, 0, 0, 0, 0),
+ (GtkAdjustment*)gtk_adjustment_new(0, 0, 0, 0, 0, 0));
+
+ gtk_scrolled_window_set_policy((GtkScrolledWindow*)scrolled_window_search, GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
+ gtk_scrolled_window_set_shadow_type((GtkScrolledWindow*)scrolled_window_search, GTK_SHADOW_ETCHED_OUT);
+ treeview_search = gtk_tree_view_new();
+ gtk_tree_view_set_rules_hint((GtkTreeView*)treeview_search, TRUE);
+ search_list = gtk_list_store_new(2, G_TYPE_UINT, G_TYPE_STRING);
+ gtk_tree_view_set_model((GtkTreeView*)treeview_search, (GtkTreeModel*)search_list);
+ GtkCellRenderer* cell_renderer = gtk_cell_renderer_text_new();
+ tree_column = gtk_tree_view_column_new_with_attributes("ID", cell_renderer, NULL);
+ gtk_tree_view_column_set_visible(tree_column, FALSE);
+ gtk_tree_view_append_column((GtkTreeView*)treeview_search, tree_column);
+ cell_renderer = gtk_cell_renderer_text_new();
+ g_object_set(cell_renderer, "ellipsize", PANGO_ELLIPSIZE_END, NULL);
+ g_object_set(cell_renderer, "single-paragraph-mode", TRUE, NULL);
+ tree_column = gtk_tree_view_column_new_with_attributes(_("Results"), cell_renderer, "text", 1, NULL);
+ gtk_tree_view_append_column((GtkTreeView*)treeview_search, tree_column);
+ gtk_container_add((GtkContainer*)scrolled_window_search, treeview_search);
+ gtk_box_pack_start((GtkBox*)vbox_search, scrolled_window_search, TRUE, TRUE, 0);
+
+ GtkWidget* edit_button = gtk_dialog_add_button((GtkDialog*)search_dialog, _("Edit"), 1);
+ g_signal_connect((GObject*)edit_button, "clicked", (GCallback)edit_selected, NULL);
+ GtkWidget* remove_button = gtk_dialog_add_button((GtkDialog*)search_dialog, _("Remove"), 1);
+ g_signal_connect((GObject*)remove_button, "clicked", (GCallback)remove_selected, NULL);
+ GtkWidget* remove_all_button = gtk_dialog_add_button((GtkDialog*)search_dialog, _("Remove all"), 1);
+ g_signal_connect((GObject*)remove_all_button, "clicked", (GCallback)remove_all_selected, NULL);
+ GtkWidget* close_button = gtk_dialog_add_button((GtkDialog*)search_dialog, _("Close"), GTK_RESPONSE_OK);
+ g_signal_connect((GObject*)close_button, "clicked", (GCallback)search_history, NULL);
+
+ GtkTreeSelection* search_selection = gtk_tree_view_get_selection((GtkTreeView*)treeview_search);
+ gtk_tree_selection_set_mode(search_selection, GTK_SELECTION_MULTIPLE);
+ g_signal_connect((GObject*)treeview_search, "button_press_event", (GCallback)search_click, search_dialog);
+ g_signal_connect((GObject*)treeview_search, "key-press-event", (GCallback)treeview_key_pressed, search_dialog);
+
+ g_signal_connect((GtkDialog*)search_dialog, "response", (GCallback)search_window_response, search_dialog);
+ gtk_widget_show_all(vbox_search);
+
+ /* show the dialog */
+ gtk_widget_show_all((GtkWidget*)search_dialog);
+ gtk_widget_set_sensitive((GtkWidget*)search_dialog, TRUE);
+ gtk_grab_add((GtkWidget*)search_dialog);
+
+ /* Populate the list */
+ search_history();
+
+ return FALSE;
+}
diff --git a/src/manage.h b/src/manage.h
new file mode 100644
index 0000000..8740c0f
--- /dev/null
+++ b/src/manage.h
@@ -0,0 +1,32 @@
+/* Copyright (C) 2010-2012 by Cristian Henzel <oss@rspwn.com>
+ *
+ * forked from parcellite, which is
+ * Copyright (C) 2007-2008 by Xyhthyx <xyhthyx@gmail.com>
+ *
+ * This file is part of ClipIt.
+ *
+ * ClipIt 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.
+ *
+ * ClipIt is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef MANAGE_H
+#define MANAGE_H
+
+G_BEGIN_DECLS
+
+gboolean show_search();
+void remove_all_selected(gpointer);
+
+G_END_DECLS
+
+#endif
diff --git a/src/preferences.c b/src/preferences.c
new file mode 100644
index 0000000..2736f7a
--- /dev/null
+++ b/src/preferences.c
@@ -0,0 +1,1161 @@
+/* Copyright (C) 2010-2012 by Cristian Henzel <oss@rspwn.com>
+ * Copyright (C) 2011 by Eugene Nikolsky <pluton.od@gmail.com>
+ *
+ * forked from parcellite, which is
+ * Copyright (C) 2007-2008 by Xyhthyx <xyhthyx@gmail.com>
+ *
+ * This file is part of ClipIt.
+ *
+ * ClipIt 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.
+ *
+ * ClipIt is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <glib.h>
+#include <gtk/gtk.h>
+#include "main.h"
+#include "utils.h"
+#include "history.h"
+#include "keybinder.h"
+#include "preferences.h"
+#include "clipit-i18n.h"
+
+/* Declare some widgets */
+GtkWidget *copy_check,
+ *primary_check,
+ *synchronize_check,
+ *paste_check,
+ *show_indexes_check,
+ *save_uris_check,
+ *use_rmb_menu_check,
+ *history_spin,
+ *history_timeout_check,
+ *history_timeout_spin,
+ *items_menu,
+ *statics_show_check,
+ *statics_items_spin,
+ *charlength_spin,
+ *ellipsize_combo,
+ *history_key_entry,
+ *actions_key_entry,
+ *menu_key_entry,
+ *search_key_entry,
+ *offline_key_entry,
+ *save_check,
+ *confirm_check,
+ *reverse_check,
+ *linemode_check,
+ *hyperlinks_check;
+
+GtkListStore* actions_list;
+GtkTreeSelection* actions_selection;
+GtkListStore* exclude_list;
+GtkTreeSelection* exclude_selection;
+
+/* Reference to the current history_timeout_timer */
+guint history_timeout_timer;
+
+/* Apply the new preferences */
+static void apply_preferences()
+{
+ /* Unbind the keys before binding new ones */
+ keybinder_unbind(prefs.history_key, history_hotkey);
+ g_free(prefs.history_key);
+ prefs.history_key = NULL;
+ keybinder_unbind(prefs.actions_key, actions_hotkey);
+ g_free(prefs.actions_key);
+ prefs.actions_key = NULL;
+ keybinder_unbind(prefs.menu_key, menu_hotkey);
+ g_free(prefs.menu_key);
+ prefs.menu_key = NULL;
+ keybinder_unbind(prefs.search_key, search_hotkey);
+ g_free(prefs.search_key);
+ prefs.search_key = NULL;
+ keybinder_unbind(prefs.offline_key, offline_hotkey);
+ g_free(prefs.offline_key);
+ prefs.offline_key = NULL;
+
+ /* Get the new preferences */
+ prefs.use_copy = gtk_toggle_button_get_active((GtkToggleButton*)copy_check);
+ prefs.use_primary = gtk_toggle_button_get_active((GtkToggleButton*)primary_check);
+ prefs.synchronize = gtk_toggle_button_get_active((GtkToggleButton*)synchronize_check);
+ prefs.automatic_paste = gtk_toggle_button_get_active((GtkToggleButton*)paste_check);
+ prefs.show_indexes = gtk_toggle_button_get_active((GtkToggleButton*)show_indexes_check);
+ prefs.save_uris = gtk_toggle_button_get_active((GtkToggleButton*)save_uris_check);
+ prefs.use_rmb_menu = gtk_toggle_button_get_active((GtkToggleButton*)use_rmb_menu_check);
+ prefs.save_history = gtk_toggle_button_get_active((GtkToggleButton*)save_check);
+ prefs.history_limit = gtk_spin_button_get_value_as_int((GtkSpinButton*)history_spin);
+ prefs.history_timeout_seconds = gtk_spin_button_get_value_as_int((GtkSpinButton*)history_timeout_spin);
+ prefs.history_timeout = gtk_toggle_button_get_active((GtkToggleButton*)history_timeout_check);
+ prefs.items_menu = gtk_spin_button_get_value_as_int((GtkSpinButton*)items_menu);
+ prefs.statics_show = gtk_toggle_button_get_active((GtkToggleButton*)statics_show_check);
+ prefs.statics_items = gtk_spin_button_get_value_as_int((GtkSpinButton*)statics_items_spin);
+ prefs.hyperlinks_only = gtk_toggle_button_get_active((GtkToggleButton*)hyperlinks_check);
+ prefs.confirm_clear = gtk_toggle_button_get_active((GtkToggleButton*)confirm_check);
+ prefs.single_line = gtk_toggle_button_get_active((GtkToggleButton*)linemode_check);
+ prefs.reverse_history = gtk_toggle_button_get_active((GtkToggleButton*)reverse_check);
+ prefs.item_length = gtk_spin_button_get_value_as_int((GtkSpinButton*)charlength_spin);
+ prefs.ellipsize = gtk_combo_box_get_active((GtkComboBox*)ellipsize_combo) + 1;
+ prefs.history_key = g_strdup(gtk_entry_get_text((GtkEntry*)history_key_entry));
+ prefs.actions_key = g_strdup(gtk_entry_get_text((GtkEntry*)actions_key_entry));
+ prefs.menu_key = g_strdup(gtk_entry_get_text((GtkEntry*)menu_key_entry));
+ prefs.search_key = g_strdup(gtk_entry_get_text((GtkEntry*)search_key_entry));
+ prefs.offline_key = g_strdup(gtk_entry_get_text((GtkEntry*)offline_key_entry));
+
+ /* Bind keys and apply the new history limit */
+ keybinder_bind(prefs.history_key, history_hotkey, NULL);
+ keybinder_bind(prefs.actions_key, actions_hotkey, NULL);
+ keybinder_bind(prefs.menu_key, menu_hotkey, NULL);
+ keybinder_bind(prefs.search_key, search_hotkey, NULL);
+ keybinder_bind(prefs.offline_key, offline_hotkey, NULL);
+ truncate_history();
+}
+
+/* Save preferences to CONFIGDIR/clipit/clipitrc */
+void save_preferences()
+{
+ /* Create key */
+ GKeyFile* rc_key = g_key_file_new();
+
+ /* Add values */
+ g_key_file_set_boolean(rc_key, "rc", "use_copy", prefs.use_copy);
+ g_key_file_set_boolean(rc_key, "rc", "use_primary", prefs.use_primary);
+ g_key_file_set_boolean(rc_key, "rc", "synchronize", prefs.synchronize);
+ g_key_file_set_boolean(rc_key, "rc", "automatic_paste", prefs.automatic_paste);
+ g_key_file_set_boolean(rc_key, "rc", "show_indexes", prefs.show_indexes);
+ g_key_file_set_boolean(rc_key, "rc", "save_uris", prefs.save_uris);
+ g_key_file_set_boolean(rc_key, "rc", "use_rmb_menu", prefs.use_rmb_menu);
+ g_key_file_set_boolean(rc_key, "rc", "save_history", prefs.save_history);
+ g_key_file_set_integer(rc_key, "rc", "history_limit", prefs.history_limit);
+ g_key_file_set_integer(rc_key, "rc", "history_timeout_seconds", prefs.history_timeout_seconds);
+ g_key_file_set_boolean(rc_key, "rc", "history_timeout", prefs.history_timeout);
+ g_key_file_set_integer(rc_key, "rc", "items_menu", prefs.items_menu);
+ g_key_file_set_boolean(rc_key, "rc", "statics_show", prefs.statics_show);
+ g_key_file_set_integer(rc_key, "rc", "statics_items", prefs.statics_items);
+ g_key_file_set_boolean(rc_key, "rc", "hyperlinks_only", prefs.hyperlinks_only);
+ g_key_file_set_boolean(rc_key, "rc", "confirm_clear", prefs.confirm_clear);
+ g_key_file_set_boolean(rc_key, "rc", "single_line", prefs.single_line);
+ g_key_file_set_boolean(rc_key, "rc", "reverse_history", prefs.reverse_history);
+ g_key_file_set_integer(rc_key, "rc", "item_length", prefs.item_length);
+ g_key_file_set_integer(rc_key, "rc", "ellipsize", prefs.ellipsize);
+ g_key_file_set_string(rc_key, "rc", "history_key", prefs.history_key);
+ g_key_file_set_string(rc_key, "rc", "actions_key", prefs.actions_key);
+ g_key_file_set_string(rc_key, "rc", "menu_key", prefs.menu_key);
+ g_key_file_set_string(rc_key, "rc", "search_key", prefs.search_key);
+ g_key_file_set_string(rc_key, "rc", "offline_key", prefs.offline_key);
+ g_key_file_set_boolean(rc_key, "rc", "offline_mode", prefs.offline_mode);
+
+ /* Check config and data directories */
+ check_dirs();
+ /* Save key to file */
+ gchar* rc_file = g_build_filename(g_get_user_config_dir(), PREFERENCES_FILE, NULL);
+ g_file_set_contents(rc_file, g_key_file_to_data(rc_key, NULL, NULL), -1, NULL);
+ g_key_file_free(rc_key);
+ g_free(rc_file);
+}
+
+/* This will be run if there is no config file */
+static void first_run_check()
+{
+ /* If the configfile doesn't exist, we ask the user if he wants to save the history */
+ gchar *rc_file = g_build_filename(g_get_user_config_dir(), PREFERENCES_FILE, NULL);
+ /* Check if config file exists */
+ if (!g_file_test(rc_file, G_FILE_TEST_EXISTS))
+ {
+ GtkWidget* confirm_dialog = gtk_message_dialog_new(NULL,
+ GTK_DIALOG_MODAL,
+ GTK_MESSAGE_OTHER,
+ GTK_BUTTONS_YES_NO,
+ SAVE_HIST_MESSAGE);
+ gtk_window_set_title((GtkWindow*)confirm_dialog, _("Save history"));
+
+ if (gtk_dialog_run((GtkDialog*)confirm_dialog) == GTK_RESPONSE_YES)
+ {
+ prefs.save_history = TRUE;
+ } else {
+ prefs.save_history = FALSE;
+ }
+ gtk_widget_destroy(confirm_dialog);
+ /* We make sure these aren't empty */
+ prefs.history_key = DEF_HISTORY_KEY;
+ prefs.actions_key = DEF_ACTIONS_KEY;
+ prefs.menu_key = DEF_MENU_KEY;
+ prefs.search_key = DEF_SEARCH_KEY;
+ prefs.offline_key = DEF_OFFLINE_KEY;
+ save_preferences();
+ }
+ g_free(rc_file);
+}
+
+/* Ask the user if he wants to delete the history file and act accordingly */
+static void check_saved_hist_file()
+{
+ /* If the history file doesn't exist, there's nothing to do here */
+ gchar *history_path = g_build_filename(g_get_user_data_dir(), HISTORY_FILE, NULL);
+ /* Check if config file exists */
+ if (g_file_test(history_path, G_FILE_TEST_EXISTS))
+ {
+ GtkWidget* confirm_dialog = gtk_message_dialog_new(NULL,
+ GTK_DIALOG_MODAL,
+ GTK_MESSAGE_OTHER,
+ GTK_BUTTONS_YES_NO,
+ CHECK_HIST_MESSAGE);
+ gtk_window_set_title((GtkWindow*)confirm_dialog, _("Remove history file"));
+
+ if (gtk_dialog_run((GtkDialog*)confirm_dialog) == GTK_RESPONSE_YES)
+ {
+ /* Open the file for writing */
+ FILE *history_file = fopen(history_path, "wb");
+ g_free(history_path);
+ /* Check that it opened and begin write */
+ if (history_file)
+ {
+ /* Write 0 to indicate end of file */
+ gint end = 0;
+ fwrite(&end, 4, 1, history_file);
+ fclose(history_file);
+ }
+ }
+ gtk_widget_destroy(confirm_dialog);
+ }
+}
+
+/* Read CONFIGDIR/clipit/clipitrc */
+void read_preferences()
+{
+ first_run_check();
+ gchar* rc_file = g_build_filename(g_get_user_config_dir(), PREFERENCES_FILE, NULL);
+ /* Create key */
+ GKeyFile* rc_key = g_key_file_new();
+ if (g_key_file_load_from_file(rc_key, rc_file, G_KEY_FILE_NONE, NULL))
+ {
+ /* Load values */
+ prefs.use_copy = g_key_file_get_boolean(rc_key, "rc", "use_copy", NULL);
+ prefs.use_primary = g_key_file_get_boolean(rc_key, "rc", "use_primary", NULL);
+ prefs.synchronize = g_key_file_get_boolean(rc_key, "rc", "synchronize", NULL);
+ prefs.automatic_paste = g_key_file_get_boolean(rc_key, "rc", "automatic_paste", NULL);
+ prefs.show_indexes = g_key_file_get_boolean(rc_key, "rc", "show_indexes", NULL);
+ prefs.save_uris = g_key_file_get_boolean(rc_key, "rc", "save_uris", NULL);
+ prefs.use_rmb_menu = g_key_file_get_boolean(rc_key, "rc", "use_rmb_menu", NULL);
+ prefs.save_history = g_key_file_get_boolean(rc_key, "rc", "save_history", NULL);
+ prefs.history_limit = g_key_file_get_integer(rc_key, "rc", "history_limit", NULL);
+ prefs.history_timeout = g_key_file_get_boolean(rc_key, "rc", "history_timeout", NULL);
+ prefs.history_timeout_seconds = g_key_file_get_integer(rc_key, "rc", "history_timeout_seconds", NULL);
+ prefs.items_menu = g_key_file_get_integer(rc_key, "rc", "items_menu", NULL);
+ prefs.statics_show = g_key_file_get_boolean(rc_key, "rc", "statics_show", NULL);
+ prefs.statics_items = g_key_file_get_integer(rc_key, "rc", "statics_items", NULL);
+ prefs.hyperlinks_only = g_key_file_get_boolean(rc_key, "rc", "hyperlinks_only", NULL);
+ prefs.confirm_clear = g_key_file_get_boolean(rc_key, "rc", "confirm_clear", NULL);
+ prefs.single_line = g_key_file_get_boolean(rc_key, "rc", "single_line", NULL);
+ prefs.reverse_history = g_key_file_get_boolean(rc_key, "rc", "reverse_history", NULL);
+ prefs.item_length = g_key_file_get_integer(rc_key, "rc", "item_length", NULL);
+ prefs.ellipsize = g_key_file_get_integer(rc_key, "rc", "ellipsize", NULL);
+ prefs.history_key = g_key_file_get_string(rc_key, "rc", "history_key", NULL);
+ prefs.actions_key = g_key_file_get_string(rc_key, "rc", "actions_key", NULL);
+ prefs.menu_key = g_key_file_get_string(rc_key, "rc", "menu_key", NULL);
+ prefs.search_key = g_key_file_get_string(rc_key, "rc", "search_key", NULL);
+ prefs.offline_key = g_key_file_get_string(rc_key, "rc", "offline_key", NULL);
+ prefs.offline_mode = g_key_file_get_boolean(rc_key, "rc", "offline_mode", NULL);
+
+ /* Check for errors and set default values if any */
+ if ((!prefs.history_limit) || (prefs.history_limit > 1000) || (prefs.history_limit < 0))
+ prefs.history_limit = DEF_HISTORY_LIMIT;
+ if (!prefs.history_timeout)
+ prefs.history_timeout = DEF_HISTORY_TIMEOUT;
+ if (!prefs.history_timeout_seconds)
+ prefs.history_timeout_seconds = DEF_HISTORY_TIMEOUT_SECONDS;
+ if ((!prefs.items_menu) || (prefs.items_menu > 1000) || (prefs.items_menu < 0))
+ prefs.items_menu = DEF_ITEMS_MENU;
+ if ((!prefs.item_length) || (prefs.item_length > 75) || (prefs.item_length < 0))
+ prefs.item_length = DEF_ITEM_LENGTH;
+ if ((!prefs.ellipsize) || (prefs.ellipsize > 3) || (prefs.ellipsize < 0))
+ prefs.ellipsize = DEF_ELLIPSIZE;
+ if (!prefs.history_key)
+ prefs.history_key = g_strdup(DEF_HISTORY_KEY);
+ if (!prefs.actions_key)
+ prefs.actions_key = g_strdup(DEF_ACTIONS_KEY);
+ if (!prefs.menu_key)
+ prefs.menu_key = g_strdup(DEF_MENU_KEY);
+ if (!prefs.search_key)
+ prefs.search_key = g_strdup(DEF_SEARCH_KEY);
+ if (!prefs.offline_key)
+ prefs.offline_key = g_strdup(DEF_OFFLINE_KEY);
+ }
+ else
+ {
+ /* Init default keys on error */
+ prefs.history_key = g_strdup(DEF_HISTORY_KEY);
+ prefs.actions_key = g_strdup(DEF_ACTIONS_KEY);
+ prefs.menu_key = g_strdup(DEF_MENU_KEY);
+ prefs.search_key = g_strdup(DEF_SEARCH_KEY);
+ prefs.offline_key = g_strdup(DEF_OFFLINE_KEY);
+ }
+ g_key_file_free(rc_key);
+ g_free(rc_file);
+}
+
+/* Read DATADIR/clipit/actions into the treeview */
+static void read_actions()
+{
+ /* Open the file for reading */
+ gchar* path = g_build_filename(g_get_user_data_dir(), ACTIONS_FILE, NULL);
+ FILE* actions_file = fopen(path, "rb");
+ g_free(path);
+ /* Check that it opened and begin read */
+ if (actions_file)
+ {
+ /* Keep a row reference */
+ GtkTreeIter row_iter;
+ /* Read the size of the first item */
+ gint size;
+ size_t fread_return;
+ fread_return = fread(&size, 4, 1, actions_file);
+ /* Continue reading until size is 0 */
+ while (size != 0)
+ {
+ /* Read name */
+ gchar* name = (gchar*)g_malloc(size + 1);
+ fread_return = fread(name, size, 1, actions_file);
+ name[size] = '\0';
+ fread_return = fread(&size, 4, 1, actions_file);
+ /* Read command */
+ gchar* command = (gchar*)g_malloc(size + 1);
+ fread_return = fread(command, size, 1, actions_file);
+ command[size] = '\0';
+ fread_return = fread(&size, 4, 1, actions_file);
+ /* Append the read action */
+ gtk_list_store_append(actions_list, &row_iter);
+ gtk_list_store_set(actions_list, &row_iter, 0, name, 1, command, -1);
+ g_free(name);
+ g_free(command);
+ }
+ fclose(actions_file);
+ }
+}
+
+/* Save the actions treeview to DATADIR/clipit/actions */
+static void save_actions()
+{
+ /* Check config and data directories */
+ check_dirs();
+ /* Open the file for writing */
+ gchar* path = g_build_filename(g_get_user_data_dir(), ACTIONS_FILE, NULL);
+ FILE* actions_file = fopen(path, "wb");
+ g_free(path);
+ /* Check that it opened and begin write */
+ if (actions_file)
+ {
+ GtkTreeIter action_iter;
+ /* Get and check if there's a first iter */
+ if (gtk_tree_model_get_iter_first((GtkTreeModel*)actions_list, &action_iter))
+ {
+ do
+ {
+ /* Get name and command */
+ gchar *name, *command;
+ gtk_tree_model_get((GtkTreeModel*)actions_list, &action_iter, 0, &name, 1, &command, -1);
+ GString* s_name = g_string_new(name);
+ GString* s_command = g_string_new(command);
+ g_free(name);
+ g_free(command);
+ /* Check that there's text to save */
+ if ((s_name->len == 0) || (s_command->len == 0))
+ {
+ /* Free strings and skip iteration */
+ g_string_free(s_name, TRUE);
+ g_string_free(s_command, TRUE);
+ continue;
+ }
+ else
+ {
+ /* Save action */
+ fwrite(&(s_name->len), 4, 1, actions_file);
+ fputs(s_name->str, actions_file);
+ fwrite(&(s_command->len), 4, 1, actions_file);
+ fputs(s_command->str, actions_file);
+ /* Free strings */
+ g_string_free(s_name, TRUE);
+ g_string_free(s_command, TRUE);
+ }
+ }
+ while(gtk_tree_model_iter_next((GtkTreeModel*)actions_list, &action_iter));
+ }
+ /* End of file write */
+ gint end = 0;
+ fwrite(&end, 4, 1, actions_file);
+ fclose(actions_file);
+ }
+}
+
+/* Called when clipboard checks are pressed */
+static void check_toggled(GtkToggleButton *togglebutton, gpointer user_data)
+{
+ if (gtk_toggle_button_get_active((GtkToggleButton*)copy_check) &&
+ gtk_toggle_button_get_active((GtkToggleButton*)primary_check)) {
+ /* Only allow synchronize option if both primary and clipboard are enabled */
+ gtk_widget_set_sensitive((GtkWidget*)synchronize_check, TRUE);
+ } else {
+ /* Disable synchronize option */
+ gtk_toggle_button_set_active((GtkToggleButton*)synchronize_check, FALSE);
+ gtk_widget_set_sensitive((GtkWidget*)synchronize_check, FALSE);
+ }
+ if (gtk_toggle_button_get_active((GtkToggleButton*)statics_show_check)) {
+ gtk_widget_set_sensitive((GtkWidget*)statics_items_spin, TRUE);
+ } else {
+ gtk_widget_set_sensitive((GtkWidget*)statics_items_spin, FALSE);
+ }
+ /* If history_timeout is disabled, prevent interaction with the history_timeout_spinner */
+ if (gtk_toggle_button_get_active((GtkToggleButton*)history_timeout_check)) {
+ gtk_widget_set_sensitive((GtkWidget*)history_timeout_spin, TRUE);
+ } else {
+ gtk_widget_set_sensitive((GtkWidget*)history_timeout_spin, FALSE);
+ }
+}
+
+
+static void start_purge_timer(gint timeout_seconds);
+static void stop_purge_timer();
+
+/* Purge history if history_timeout is enabled. This function is called every prefs.history_timeout_seconds */
+static gboolean purge_history() {
+ if (prefs.history_timeout) {
+ g_list_free(history);
+ history = NULL;
+ save_history();
+ clear_main_data();
+ return TRUE;
+ }
+ stop_purge_timer();
+ return FALSE;
+}
+
+/* Start the history_purge_timer. If another timer exists, it will be replaced */
+void start_purge_timer(gint timeout_seconds) {
+ if (history_timeout_timer)
+ g_source_remove(history_timeout_timer);
+ history_timeout_timer = g_timeout_add_seconds(timeout_seconds, purge_history, NULL);
+}
+
+/* Stop the history_purge_timer. If no timer exists, nothing is done */
+static void stop_purge_timer() {
+ if (history_timeout_timer) {
+ g_source_remove(history_timeout_timer);
+ history_timeout_timer = 0;
+ }
+}
+
+/* When the history_timeout_spin's value changes, create a new history_timeout_timer with the updated value */
+static void handle_history_spinner(GtkSpinButton *spinbutton, gpointer user_data) {
+ gint spinner_value = gtk_spin_button_get_value_as_int((GtkSpinButton*)history_timeout_spin);
+ if (gtk_toggle_button_get_active((GtkToggleButton*)history_timeout_check))
+ start_purge_timer(spinner_value);
+}
+
+/* When the history_timeout_check button is toggled, either start or stop the history_timeout_timer */
+static void handle_history_purge_toggle(GtkWidget *togglebutton, gpointer user_data) {
+ if (gtk_toggle_button_get_active((GtkToggleButton*)history_timeout_check)) {
+ gint spinner_value = gtk_spin_button_get_value_as_int((GtkSpinButton*)history_timeout_spin);
+ save_preferences();
+ start_purge_timer(spinner_value);
+ } else {
+ stop_purge_timer();
+ }
+}
+
+/* Initialize the history_timeout_timer on startup */
+void init_history_timeout_timer() {
+ if (prefs.history_timeout) {
+ start_purge_timer(prefs.history_timeout_seconds);
+ }
+}
+
+/* Called when Add... button is clicked */
+static void add_action(GtkButton *button, gpointer user_data)
+{
+ /* Append new item */
+ GtkTreeIter row_iter;
+ gtk_list_store_append(actions_list, &row_iter);
+ /* Add a %s to the command */
+ gtk_list_store_set(actions_list, &row_iter, 1, "%s", -1);
+ /* Set the first column to editing */
+ GtkTreePath* row_path = gtk_tree_model_get_path((GtkTreeModel*)actions_list, &row_iter);
+ GtkTreeView* treeview = gtk_tree_selection_get_tree_view(actions_selection);
+ GtkTreeViewColumn* column = gtk_tree_view_get_column(treeview, 0);
+ gtk_tree_view_set_cursor(treeview, row_path, column, TRUE);
+ gtk_tree_path_free(row_path);
+}
+
+/* Called when Remove button is clicked */
+static void remove_action(GtkButton *button, gpointer user_data)
+{
+ GtkTreeIter sel_iter;
+ /* Check if selected */
+ if (gtk_tree_selection_get_selected(actions_selection, NULL, &sel_iter))
+ {
+ /* Delete selected and select next */
+ GtkTreePath* tree_path = gtk_tree_model_get_path((GtkTreeModel*)actions_list, &sel_iter);
+ gtk_list_store_remove(actions_list, &sel_iter);
+ gtk_tree_selection_select_path(actions_selection, tree_path);
+ /* Select previous if the last row was deleted */
+ if (!gtk_tree_selection_path_is_selected(actions_selection, tree_path))
+ {
+ if (gtk_tree_path_prev(tree_path))
+ gtk_tree_selection_select_path(actions_selection, tree_path);
+ }
+ gtk_tree_path_free(tree_path);
+ }
+}
+
+/* Called when Up button is clicked */
+static void move_action_up(GtkButton *button, gpointer user_data)
+{
+ GtkTreeIter sel_iter;
+ /* Check if selected */
+ if (gtk_tree_selection_get_selected(actions_selection, NULL, &sel_iter))
+ {
+ /* Create path to previous row */
+ GtkTreePath* tree_path = gtk_tree_model_get_path((GtkTreeModel*)actions_list, &sel_iter);
+ /* Check if previous row exists */
+ if (gtk_tree_path_prev(tree_path))
+ {
+ /* Swap rows */
+ GtkTreeIter prev_iter;
+ gtk_tree_model_get_iter((GtkTreeModel*)actions_list, &prev_iter, tree_path);
+ gtk_list_store_swap(actions_list, &sel_iter, &prev_iter);
+ }
+ gtk_tree_path_free(tree_path);
+ }
+}
+
+/* Called when Down button is clicked */
+static void move_action_down(GtkButton *button, gpointer user_data)
+{
+ GtkTreeIter sel_iter;
+ /* Check if selected */
+ if (gtk_tree_selection_get_selected(actions_selection, NULL, &sel_iter))
+ {
+ /* Create iter to next row */
+ GtkTreeIter next_iter = sel_iter;
+ /* Check if next row exists */
+ if (gtk_tree_model_iter_next((GtkTreeModel*)actions_list, &next_iter))
+ /* Swap rows */
+ gtk_list_store_swap(actions_list, &sel_iter, &next_iter);
+ }
+}
+
+/* Called when delete key is pressed */
+static void delete_key_pressed(GtkWidget *widget, GdkEventKey *event, gpointer user_data)
+{
+ /* Check if DEL key was pressed (keyval: 65535) */
+ if (event->keyval == 65535)
+ remove_action(NULL, NULL);
+}
+
+/* Called when a cell is edited */
+static void edit_action(GtkCellRendererText *renderer, gchar *path,
+ gchar *new_text, gpointer cell)
+{
+ GtkTreeIter sel_iter;
+ /* Check if selected */
+ if (gtk_tree_selection_get_selected(actions_selection, NULL, &sel_iter))
+ {
+ /* Apply changes */
+ gtk_list_store_set(actions_list, &sel_iter, GPOINTER_TO_INT(cell), new_text, -1);
+ }
+}
+
+/* exclude Functions */
+
+/* Read DATADIR/clipit/excludes into the treeview */
+static void read_excludes()
+{
+ /* Open the file for reading */
+ gchar* path = g_build_filename(g_get_user_data_dir(), EXCLUDES_FILE, NULL);
+ FILE* excludes_file = fopen(path, "rb");
+ g_free(path);
+ /* Check that it opened and begin read */
+ if (excludes_file)
+ {
+ /* Keep a row reference */
+ GtkTreeIter row_iter;
+ /* Read the size of the first item */
+ gint size;
+ size_t fread_return;
+ fread_return = fread(&size, 4, 1, excludes_file);
+ /* Continue reading until size is 0 */
+ while (size != 0)
+ {
+ /* Read Regex */
+ gchar* regex = (gchar*)g_malloc(size + 1);
+ fread_return = fread(regex, size, 1, excludes_file);
+ regex[size] = '\0';
+ fread_return = fread(&size, 4, 1, excludes_file);
+ /* Append the read action */
+ gtk_list_store_append(exclude_list, &row_iter);
+ gtk_list_store_set(exclude_list, &row_iter, 0, regex, -1);
+ g_free(regex);
+ }
+ fclose(excludes_file);
+ }
+}
+
+/* Save the actions treeview to DATADIR/clipit/excludes */
+static void save_excludes()
+{
+ /* Check config and data directories */
+ check_dirs();
+ /* Open the file for writing */
+ gchar* path = g_build_filename(g_get_user_data_dir(), EXCLUDES_FILE, NULL);
+ FILE* excludes_file = fopen(path, "wb");
+ g_free(path);
+ /* Check that it opened and begin write */
+ if (excludes_file)
+ {
+ GtkTreeIter action_iter;
+ /* Get and check if there's a first iter */
+ if (gtk_tree_model_get_iter_first((GtkTreeModel*)exclude_list, &action_iter))
+ {
+ do
+ {
+ /* Get name and command */
+ gchar *regex;
+ gtk_tree_model_get((GtkTreeModel*)exclude_list, &action_iter, 0, &regex, -1);
+ GString* s_regex = g_string_new(regex);
+ g_free(regex);
+ /* Check that there's text to save */
+ if (s_regex->len == 0)
+ {
+ /* Free strings and skip iteration */
+ g_string_free(s_regex, TRUE);
+ continue;
+ }
+ else
+ {
+ /* Save action */
+ fwrite(&(s_regex->len), 4, 1, excludes_file);
+ fputs(s_regex->str, excludes_file);
+ /* Free strings */
+ g_string_free(s_regex, TRUE);
+ }
+ }
+ while(gtk_tree_model_iter_next((GtkTreeModel*)exclude_list, &action_iter));
+ }
+ /* End of file write */
+ gint end = 0;
+ fwrite(&end, 4, 1, excludes_file);
+ fclose(excludes_file);
+ }
+}
+
+/* Called when Add... button is clicked */
+static void add_exclude(GtkButton *button, gpointer user_data)
+{
+ /* Append new item */
+ GtkTreeIter row_iter;
+ gtk_list_store_append(exclude_list, &row_iter);
+ /* Add a %s to the command */
+ //gtk_list_store_set(actions_list, &row_iter, 1, "", -1);
+ /* Set the first column to editing */
+ GtkTreePath* row_path = gtk_tree_model_get_path((GtkTreeModel*)exclude_list, &row_iter);
+ GtkTreeView* treeview = gtk_tree_selection_get_tree_view(exclude_selection);
+ GtkTreeViewColumn* column = gtk_tree_view_get_column(treeview, 0);
+ gtk_tree_view_set_cursor(treeview, row_path, column, TRUE);
+ gtk_tree_path_free(row_path);
+}
+
+/* Called when Remove button is clicked */
+static void remove_exclude(GtkButton *button, gpointer user_data)
+{
+ GtkTreeIter sel_iter;
+ /* Check if selected */
+ if (gtk_tree_selection_get_selected(exclude_selection, NULL, &sel_iter))
+ {
+ /* Delete selected and select next */
+ GtkTreePath* tree_path = gtk_tree_model_get_path((GtkTreeModel*)exclude_list, &sel_iter);
+ gtk_list_store_remove(exclude_list, &sel_iter);
+ gtk_tree_selection_select_path(exclude_selection, tree_path);
+ /* Select previous if the last row was deleted */
+ if (!gtk_tree_selection_path_is_selected(exclude_selection, tree_path))
+ {
+ if (gtk_tree_path_prev(tree_path))
+ gtk_tree_selection_select_path(exclude_selection, tree_path);
+ }
+ gtk_tree_path_free(tree_path);
+ }
+}
+
+/* Called when a cell is edited */
+static void edit_exclude(GtkCellRendererText *renderer, gchar *path,
+ gchar *new_text, gpointer cell)
+{
+ GtkTreeIter sel_iter;
+ /* Check if selected */
+ if (gtk_tree_selection_get_selected(exclude_selection, NULL, &sel_iter))
+ {
+ /* Apply changes */
+ gtk_list_store_set(exclude_list, &sel_iter, GPOINTER_TO_INT(cell), new_text, -1);
+ }
+}
+
+/* Shows the preferences dialog on the given tab */
+void show_preferences(gint tab) {
+ if(gtk_grab_get_current()) {
+ /* A window is already open, so we present it to the user */
+ GtkWidget *toplevel = gtk_widget_get_toplevel(gtk_grab_get_current());
+ gtk_window_present((GtkWindow*)toplevel);
+ return;
+ }
+ /* Declare some variables */
+ GtkWidget *frame, *label,
+ *alignment, *hbox,
+ *vbox;
+
+ GtkWidget *adjustment, *adjustment_small, *adjustment_statics;
+ GtkTreeViewColumn *tree_column;
+
+ /* Create the dialog */
+ GtkWidget* dialog = gtk_dialog_new_with_buttons(_("Preferences"), NULL,
+ (GTK_DIALOG_MODAL + GTK_DIALOG_NO_SEPARATOR),
+ GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT,
+ GTK_STOCK_OK, GTK_RESPONSE_ACCEPT, NULL);
+
+ gtk_window_set_icon((GtkWindow*)dialog, gtk_widget_render_icon(dialog, GTK_STOCK_PREFERENCES, GTK_ICON_SIZE_MENU, NULL));
+ gtk_window_set_resizable((GtkWindow*)dialog, FALSE);
+
+ /* Create notebook */
+ GtkWidget* notebook = gtk_notebook_new();
+#if GTK_CHECK_VERSION (2,14,0)
+ gtk_box_pack_start(GTK_BOX(gtk_dialog_get_content_area (GTK_DIALOG(dialog))), notebook, TRUE, TRUE, 2);
+#else
+ gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox), notebook, TRUE, TRUE, 2);
+#endif
+
+ /* Build the settings page */
+ GtkWidget* page_settings = gtk_alignment_new(0.50, 0.50, 1.0, 1.0);
+ gtk_alignment_set_padding((GtkAlignment*)page_settings, 12, 6, 12, 6);
+ gtk_notebook_append_page((GtkNotebook*)notebook, page_settings, gtk_label_new(_("Settings")));
+ GtkWidget* vbox_settings = gtk_vbox_new(FALSE, 12);
+ gtk_container_add((GtkContainer*)page_settings, vbox_settings);
+
+ /* Build the clipboards frame */
+ frame = gtk_frame_new(NULL);
+ gtk_frame_set_shadow_type((GtkFrame*)frame, GTK_SHADOW_NONE);
+ label = gtk_label_new(NULL);
+ gtk_label_set_markup((GtkLabel*)label, _("<b>Clipboards</b>"));
+ gtk_frame_set_label_widget((GtkFrame*)frame, label);
+ alignment = gtk_alignment_new(0.50, 0.50, 1.0, 1.0);
+ gtk_alignment_set_padding((GtkAlignment*)alignment, 12, 0, 12, 0);
+ gtk_container_add((GtkContainer*)frame, alignment);
+ vbox = gtk_vbox_new(FALSE, 2);
+ gtk_container_add((GtkContainer*)alignment, vbox);
+ copy_check = gtk_check_button_new_with_mnemonic(_("Use _Copy (Ctrl-C)"));
+ g_signal_connect((GObject*)copy_check, "toggled", (GCallback)check_toggled, NULL);
+ gtk_box_pack_start((GtkBox*)vbox, copy_check, FALSE, FALSE, 0);
+ primary_check = gtk_check_button_new_with_mnemonic(_("Use _Primary (Selection)"));
+ g_signal_connect((GObject*)primary_check, "toggled", (GCallback)check_toggled, NULL);
+ gtk_box_pack_start((GtkBox*)vbox, primary_check, FALSE, FALSE, 0);
+ synchronize_check = gtk_check_button_new_with_mnemonic(_("S_ynchronize clipboards"));
+ gtk_box_pack_start((GtkBox*)vbox, synchronize_check, FALSE, FALSE, 0);
+ paste_check = gtk_check_button_new_with_mnemonic(_("_Automatically paste selected item"));
+ g_signal_connect((GObject*)paste_check, "toggled", (GCallback)check_toggled, NULL);
+ gtk_box_pack_start((GtkBox*)vbox, paste_check, FALSE, FALSE, 0);
+ gtk_box_pack_start((GtkBox*)vbox_settings, frame, FALSE, FALSE, 0);
+
+ /* Build the miscellaneous frame */
+ frame = gtk_frame_new(NULL);
+ gtk_frame_set_shadow_type((GtkFrame*)frame, GTK_SHADOW_NONE);
+ label = gtk_label_new(NULL);
+ gtk_label_set_markup((GtkLabel*)label, _("<b>Miscellaneous</b>"));
+ gtk_frame_set_label_widget((GtkFrame*)frame, label);
+ alignment = gtk_alignment_new(0.50, 0.50, 1.0, 1.0);
+ gtk_alignment_set_padding((GtkAlignment*)alignment, 12, 0, 12, 0);
+ gtk_container_add((GtkContainer*)frame, alignment);
+ vbox = gtk_vbox_new(FALSE, 2);
+ gtk_container_add((GtkContainer*)alignment, vbox);
+ show_indexes_check = gtk_check_button_new_with_mnemonic(_("Show _indexes in history menu"));
+ gtk_box_pack_start((GtkBox*)vbox, show_indexes_check, FALSE, FALSE, 0);
+ save_uris_check = gtk_check_button_new_with_mnemonic(_("S_ave URIs"));
+ gtk_box_pack_start((GtkBox*)vbox, save_uris_check, FALSE, FALSE, 0);
+ hyperlinks_check = gtk_check_button_new_with_mnemonic(_("Capture _hyperlinks only"));
+ gtk_box_pack_start((GtkBox*)vbox, hyperlinks_check, FALSE, FALSE, 0);
+ confirm_check = gtk_check_button_new_with_mnemonic(_("C_onfirm before clearing history"));
+ gtk_box_pack_start((GtkBox*)vbox, confirm_check, FALSE, FALSE, 0);
+ use_rmb_menu_check = gtk_check_button_new_with_mnemonic(_("_Use right-click menu"));
+ gtk_box_pack_start((GtkBox*)vbox, use_rmb_menu_check, FALSE, FALSE, 0);
+ hbox = gtk_hbox_new(FALSE, 4);
+ gtk_box_pack_start((GtkBox*)vbox, hbox, FALSE, FALSE, 0);
+ gtk_box_pack_start((GtkBox*)vbox_settings, frame, FALSE, FALSE, 0);
+
+ /* Build the history page */
+ GtkWidget* page_history = gtk_alignment_new(0.50, 0.50, 1.0, 1.0);
+ gtk_alignment_set_padding((GtkAlignment*)page_history, 12, 6, 12, 6);
+ gtk_notebook_append_page((GtkNotebook*)notebook, page_history, gtk_label_new(_("History")));
+ GtkWidget* vbox_history = gtk_vbox_new(FALSE, 12);
+ gtk_container_add((GtkContainer*)page_history, vbox_history);
+
+ /* Build the history frame */
+ frame = gtk_frame_new(NULL);
+ gtk_frame_set_shadow_type((GtkFrame*)frame, GTK_SHADOW_NONE);
+ label = gtk_label_new(NULL);
+ gtk_label_set_markup((GtkLabel*)label, _("<b>History</b>"));
+ gtk_frame_set_label_widget((GtkFrame*)frame, label);
+ alignment = gtk_alignment_new(0.50, 0.50, 1.0, 1.0);
+ gtk_alignment_set_padding((GtkAlignment*)alignment, 12, 0, 12, 0);
+ gtk_container_add((GtkContainer*)frame, alignment);
+ vbox = gtk_vbox_new(FALSE, 2);
+ gtk_container_add((GtkContainer*)alignment, vbox);
+ save_check = gtk_check_button_new_with_mnemonic(_("Save _history"));
+ gtk_widget_set_tooltip_text(save_check, _("Save and restore history between sessions"));
+ gtk_box_pack_start((GtkBox*)vbox, save_check, FALSE, FALSE, 0);
+ hbox = gtk_hbox_new(FALSE, 4);
+ gtk_box_pack_start((GtkBox*)vbox, hbox, FALSE, FALSE, 0);
+ label = gtk_label_new(_("Items in history:"));
+ gtk_misc_set_alignment((GtkMisc*)label, 0.0, 0.50);
+ gtk_box_pack_start((GtkBox*)hbox, label, FALSE, FALSE, 0);
+ adjustment = gtk_adjustment_new(25, 5, 1000, 1, 10, 0);
+ history_spin = gtk_spin_button_new((GtkAdjustment*)adjustment, 0.0, 0);
+ gtk_spin_button_set_update_policy((GtkSpinButton*)history_spin, GTK_UPDATE_IF_VALID);
+ gtk_box_pack_start((GtkBox*)hbox, history_spin, FALSE, FALSE, 0);
+ hbox = gtk_hbox_new(FALSE, 4);
+ gtk_box_pack_start((GtkBox*)vbox, hbox, FALSE, FALSE, 0);
+ label = gtk_label_new(_("Items in menu:"));
+ gtk_misc_set_alignment((GtkMisc*)label, 0.0, 0.50);
+ gtk_box_pack_start((GtkBox*)hbox, label, FALSE, FALSE, 0);
+ adjustment_small = gtk_adjustment_new(25, 5, 100, 1, 10, 0);
+ items_menu = gtk_spin_button_new((GtkAdjustment*)adjustment_small, 0.0, 0);
+ gtk_spin_button_set_update_policy((GtkSpinButton*)items_menu, GTK_UPDATE_IF_VALID);
+ gtk_box_pack_start((GtkBox*)hbox, items_menu, FALSE, FALSE, 0);
+ statics_show_check = gtk_check_button_new_with_mnemonic(_("Show _static items in menu"));
+ g_signal_connect((GObject*)statics_show_check, "toggled", (GCallback)check_toggled, NULL);
+ gtk_box_pack_start((GtkBox*)vbox, statics_show_check, FALSE, FALSE, 0);
+ hbox = gtk_hbox_new(FALSE, 4);
+ gtk_box_pack_start((GtkBox*)vbox, hbox, FALSE, FALSE, 0);
+ label = gtk_label_new(_("Static items in menu:"));
+ gtk_misc_set_alignment((GtkMisc*)label, 0.0, 0.50);
+ gtk_box_pack_start((GtkBox*)hbox, label, FALSE, FALSE, 0);
+ adjustment_statics = gtk_adjustment_new(10, 1, 100, 1, 10, 0);
+ statics_items_spin = gtk_spin_button_new((GtkAdjustment*)adjustment_statics, 0.0, 0);
+ gtk_spin_button_set_update_policy((GtkSpinButton*)statics_items_spin, GTK_UPDATE_IF_VALID);
+ gtk_box_pack_start((GtkBox*)hbox, statics_items_spin, FALSE, FALSE, 0);
+ gtk_box_pack_start((GtkBox*)vbox_history, frame, FALSE, FALSE, 0);
+ history_timeout_check = gtk_check_button_new_with_mnemonic(_("Purge history after _timeout"));
+ g_signal_connect((GObject*)history_timeout_check, "toggled", (GCallback)check_toggled, NULL);
+ g_signal_connect((GObject*)history_timeout_check, "toggled", (GCallback)handle_history_purge_toggle, NULL);
+ gtk_box_pack_start((GtkBox*)vbox, history_timeout_check, FALSE, FALSE, 0);
+ hbox = gtk_hbox_new(FALSE, 4);
+ gtk_box_pack_start((GtkBox*)vbox, hbox, FALSE, FALSE, 0);
+ label = gtk_label_new(_("Timeout seconds"));
+ gtk_misc_set_alignment((GtkMisc*)label, 0.0, 0.50);
+ gtk_box_pack_start((GtkBox*)hbox, label, FALSE, FALSE, 0);
+ adjustment_small = gtk_adjustment_new(0, 1, 100, 1, 10, 0);
+ history_timeout_spin = gtk_spin_button_new((GtkAdjustment*)adjustment_small, 0.0, 0);
+ g_signal_connect((GObject*)history_timeout_spin, "value-changed", (GCallback)handle_history_spinner, NULL);
+ gtk_spin_button_set_update_policy((GtkSpinButton*)history_timeout_spin, GTK_UPDATE_IF_VALID);
+ gtk_box_pack_start((GtkBox*)hbox, history_timeout_spin, FALSE, FALSE, 0);
+
+
+
+ /* Build the items frame */
+ frame = gtk_frame_new(NULL);
+ gtk_frame_set_shadow_type((GtkFrame*)frame, GTK_SHADOW_NONE);
+ label = gtk_label_new(NULL);
+ gtk_label_set_markup((GtkLabel*)label, _("<b>Items</b>"));
+ gtk_frame_set_label_widget((GtkFrame*)frame, label);
+ alignment = gtk_alignment_new(0.50, 0.50, 1.0, 1.0);
+ gtk_alignment_set_padding((GtkAlignment*)alignment, 12, 0, 12, 0);
+ gtk_container_add((GtkContainer*)frame, alignment);
+ vbox = gtk_vbox_new(FALSE, 2);
+ gtk_container_add((GtkContainer*)alignment, vbox);
+ linemode_check = gtk_check_button_new_with_mnemonic(_("Show in a single _line"));
+ gtk_box_pack_start((GtkBox*)vbox, linemode_check, FALSE, FALSE, 0);
+ reverse_check = gtk_check_button_new_with_mnemonic(_("Show in _reverse order"));
+ gtk_box_pack_start((GtkBox*)vbox, reverse_check, FALSE, FALSE, 0);
+ hbox = gtk_hbox_new(FALSE, 4);
+ gtk_box_pack_start((GtkBox*)vbox, hbox, FALSE, FALSE, 0);
+ label = gtk_label_new(_("Character length of items:"));
+ gtk_misc_set_alignment((GtkMisc*)label, 0.0, 0.50);
+ gtk_box_pack_start((GtkBox*)hbox, label, FALSE, FALSE, 0);
+ adjustment = gtk_adjustment_new(50, 25, 75, 1, 5, 0);
+ charlength_spin = gtk_spin_button_new((GtkAdjustment*)adjustment, 0.0, 0);
+ gtk_spin_button_set_update_policy((GtkSpinButton*)charlength_spin, GTK_UPDATE_IF_VALID);
+ gtk_box_pack_start((GtkBox*)hbox, charlength_spin, FALSE, FALSE, 0);
+ hbox = gtk_hbox_new(FALSE, 4);
+ gtk_box_pack_start((GtkBox*)vbox, hbox, FALSE, FALSE, 0);
+ label = gtk_label_new(_("Omit items in the:"));
+ gtk_misc_set_alignment((GtkMisc*)label, 0.0, 0.50);
+ gtk_box_pack_start((GtkBox*)hbox, label, FALSE, FALSE, 0);
+ ellipsize_combo = gtk_combo_box_text_new();
+ gtk_combo_box_text_append_text((GtkComboBox*)ellipsize_combo, _("Beginning"));
+ gtk_combo_box_text_append_text((GtkComboBox*)ellipsize_combo, _("Middle"));
+ gtk_combo_box_text_append_text((GtkComboBox*)ellipsize_combo, _("End"));
+ gtk_box_pack_start((GtkBox*)hbox, ellipsize_combo, FALSE, FALSE, 0);
+ gtk_box_pack_start((GtkBox*)vbox_history, frame, FALSE, FALSE, 0);
+
+ /* Build the omitting frame
+ frame = gtk_frame_new(NULL);
+ gtk_frame_set_shadow_type((GtkFrame*)frame, GTK_SHADOW_NONE);
+ label = gtk_label_new(NULL);
+ gtk_label_set_markup((GtkLabel*)label, _("<b>Omitting</b>"));
+ gtk_frame_set_label_widget((GtkFrame*)frame, label);
+ alignment = gtk_alignment_new(0.50, 0.50, 1.0, 1.0);
+ gtk_alignment_set_padding((GtkAlignment*)alignment, 12, 0, 12, 0);
+ gtk_container_add((GtkContainer*)frame, alignment);
+ vbox = gtk_vbox_new(FALSE, 2);
+ gtk_container_add((GtkContainer*)alignment, vbox);
+ hbox = gtk_hbox_new(FALSE, 4);
+ gtk_box_pack_start((GtkBox*)vbox, hbox, FALSE, FALSE, 0);
+ label = gtk_label_new(_("Omit items in the:"));
+ gtk_misc_set_alignment((GtkMisc*)label, 0.0, 0.50);
+ gtk_box_pack_start((GtkBox*)hbox, label, FALSE, FALSE, 0);
+ ellipsize_combo = gtk_combo_box_new_text();
+ gtk_combo_box_text_append_text((GtkComboBox*)ellipsize_combo, _("Beginning"));
+ gtk_combo_box_text_append_text((GtkComboBox*)ellipsize_combo, _("Middle"));
+ gtk_combo_box_text_append_text((GtkComboBox*)ellipsize_combo, _("End"));
+ gtk_box_pack_start((GtkBox*)hbox, ellipsize_combo, FALSE, FALSE, 0);
+ gtk_box_pack_start((GtkBox*)vbox_history, frame, FALSE, FALSE, 0); */
+
+ /* Build the actions page */
+ GtkWidget* page_actions = gtk_alignment_new(0.50, 0.50, 1.0, 1.0);
+ gtk_alignment_set_padding((GtkAlignment*)page_actions, 6, 6, 6, 6);
+ gtk_notebook_append_page((GtkNotebook*)notebook, page_actions, gtk_label_new(_("Actions")));
+ GtkWidget* vbox_actions = gtk_vbox_new(FALSE, 6);
+ gtk_container_add((GtkContainer*)page_actions, vbox_actions);
+
+ /* Build the actions label */
+ label = gtk_label_new(_("Control-click ClipIt\'s tray icon to use actions"));
+ gtk_label_set_line_wrap((GtkLabel*)label, TRUE);
+ gtk_misc_set_alignment((GtkMisc*)label, 0.0, 0.50);
+ gtk_box_pack_start((GtkBox*)vbox_actions, label, FALSE, FALSE, 0);
+
+ /* Build the actions treeview */
+ GtkWidget* scrolled_window = gtk_scrolled_window_new(
+ (GtkAdjustment*)gtk_adjustment_new(0, 0, 0, 0, 0, 0),
+ (GtkAdjustment*)gtk_adjustment_new(0, 0, 0, 0, 0, 0));
+
+ gtk_scrolled_window_set_policy((GtkScrolledWindow*)scrolled_window, GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
+ gtk_scrolled_window_set_shadow_type((GtkScrolledWindow*)scrolled_window, GTK_SHADOW_ETCHED_OUT);
+ GtkWidget* treeview = gtk_tree_view_new();
+ gtk_tree_view_set_reorderable((GtkTreeView*)treeview, TRUE);
+ gtk_tree_view_set_rules_hint((GtkTreeView*)treeview, TRUE);
+ actions_list = gtk_list_store_new(2, G_TYPE_STRING, G_TYPE_STRING, -1);
+ gtk_tree_view_set_model((GtkTreeView*)treeview, (GtkTreeModel*)actions_list);
+ GtkCellRenderer* name_renderer = gtk_cell_renderer_text_new();
+ g_object_set(name_renderer, "editable", TRUE, NULL);
+ g_signal_connect((GObject*)name_renderer, "edited", (GCallback)edit_action, (gpointer)0);
+ tree_column = gtk_tree_view_column_new_with_attributes(_("Action"), name_renderer, "text", 0, NULL);
+ gtk_tree_view_column_set_resizable(tree_column, TRUE);
+ gtk_tree_view_append_column((GtkTreeView*)treeview, tree_column);
+ GtkCellRenderer* command_renderer = gtk_cell_renderer_text_new();
+ g_object_set(command_renderer, "editable", TRUE, NULL);
+ g_object_set(command_renderer, "ellipsize-set", TRUE, "ellipsize", PANGO_ELLIPSIZE_END, NULL);
+ g_signal_connect((GObject*)command_renderer, "edited", (GCallback)edit_action, (gpointer)1);
+ tree_column = gtk_tree_view_column_new_with_attributes(_("Command"), command_renderer, "text", 1, NULL);
+ gtk_tree_view_column_set_expand(tree_column, TRUE);
+ gtk_tree_view_append_column((GtkTreeView*)treeview, tree_column);
+ gtk_container_add((GtkContainer*)scrolled_window, treeview);
+ gtk_box_pack_start((GtkBox*)vbox_actions, scrolled_window, TRUE, TRUE, 0);
+
+ /* Edit selection and connect treeview related signals */
+ actions_selection = gtk_tree_view_get_selection((GtkTreeView*)treeview);
+ gtk_tree_selection_set_mode(actions_selection, GTK_SELECTION_BROWSE);
+ g_signal_connect((GObject*)treeview, "key-press-event", (GCallback)delete_key_pressed, NULL);
+
+ /* Build the buttons */
+ GtkWidget* hbbox = gtk_hbutton_box_new();
+ gtk_box_set_spacing((GtkBox*)hbbox, 6);
+ gtk_button_box_set_layout((GtkButtonBox*)hbbox, GTK_BUTTONBOX_START);
+ GtkWidget* add_button = gtk_button_new_with_label(_("Add..."));
+ gtk_button_set_image((GtkButton*)add_button, gtk_image_new_from_stock(GTK_STOCK_ADD, GTK_ICON_SIZE_MENU));
+ g_signal_connect((GObject*)add_button, "clicked", (GCallback)add_action, NULL);
+ gtk_box_pack_start((GtkBox*)hbbox, add_button, FALSE, TRUE, 0);
+ GtkWidget* remove_button = gtk_button_new_with_label(_("Remove"));
+ gtk_button_set_image((GtkButton*)remove_button, gtk_image_new_from_stock(GTK_STOCK_REMOVE, GTK_ICON_SIZE_MENU));
+ g_signal_connect((GObject*)remove_button, "clicked", (GCallback)remove_action, NULL);
+ gtk_box_pack_start((GtkBox*)hbbox, remove_button, FALSE, TRUE, 0);
+ GtkWidget* up_button = gtk_button_new();
+ gtk_button_set_image((GtkButton*)up_button, gtk_image_new_from_stock(GTK_STOCK_GO_UP, GTK_ICON_SIZE_MENU));
+ g_signal_connect((GObject*)up_button, "clicked", (GCallback)move_action_up, NULL);
+ gtk_box_pack_start((GtkBox*)hbbox, up_button, FALSE, TRUE, 0);
+ GtkWidget* down_button = gtk_button_new();
+ gtk_button_set_image((GtkButton*)down_button, gtk_image_new_from_stock(GTK_STOCK_GO_DOWN, GTK_ICON_SIZE_MENU));
+ g_signal_connect((GObject*)down_button, "clicked", (GCallback)move_action_down, NULL);
+ gtk_box_pack_start((GtkBox*)hbbox, down_button, FALSE, TRUE, 0);
+ gtk_box_pack_start((GtkBox*)vbox_actions, hbbox, FALSE, FALSE, 0);
+
+ /* Build the exclude page */
+ GtkWidget* page_exclude = gtk_alignment_new(0.50, 0.50, 1.0, 1.0);
+ gtk_alignment_set_padding((GtkAlignment*)page_exclude, 6, 6, 6, 6);
+ gtk_notebook_append_page((GtkNotebook*)notebook, page_exclude, gtk_label_new(_("Exclude")));
+ GtkWidget* vbox_exclude = gtk_vbox_new(FALSE, 6);
+ gtk_container_add((GtkContainer*)page_exclude, vbox_exclude);
+
+ /* Build the exclude label */
+ label = gtk_label_new(_("Regex list of items that should not be inserted into the history (passwords/sites that you don't need in history, etc)."));
+ gtk_label_set_line_wrap((GtkLabel*)label, TRUE);
+ gtk_misc_set_alignment((GtkMisc*)label, 0.0, 0.50);
+ gtk_box_pack_start((GtkBox*)vbox_exclude, label, FALSE, FALSE, 0);
+
+ /* Build the exclude treeview */
+ GtkWidget* scrolled_window_exclude = gtk_scrolled_window_new(
+ (GtkAdjustment*)gtk_adjustment_new(0, 0, 0, 0, 0, 0),
+ (GtkAdjustment*)gtk_adjustment_new(0, 0, 0, 0, 0, 0));
+
+ gtk_scrolled_window_set_policy((GtkScrolledWindow*)scrolled_window_exclude, GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
+ gtk_scrolled_window_set_shadow_type((GtkScrolledWindow*)scrolled_window_exclude, GTK_SHADOW_ETCHED_OUT);
+ GtkWidget* treeview_exclude = gtk_tree_view_new();
+ gtk_tree_view_set_reorderable((GtkTreeView*)treeview_exclude, TRUE);
+ gtk_tree_view_set_rules_hint((GtkTreeView*)treeview_exclude, TRUE);
+ exclude_list = gtk_list_store_new(2, G_TYPE_STRING, G_TYPE_STRING, -1);
+ gtk_tree_view_set_model((GtkTreeView*)treeview_exclude, (GtkTreeModel*)exclude_list);
+ GtkCellRenderer* name_renderer_exclude = gtk_cell_renderer_text_new();
+ g_object_set(name_renderer_exclude, "editable", TRUE, NULL);
+ g_signal_connect((GObject*)name_renderer_exclude, "edited", (GCallback)edit_exclude, (gpointer)0);
+ tree_column = gtk_tree_view_column_new_with_attributes(_("Regex"), name_renderer_exclude, "text", 0, NULL);
+ gtk_tree_view_column_set_resizable(tree_column, TRUE);
+ gtk_tree_view_append_column((GtkTreeView*)treeview_exclude, tree_column);
+ gtk_container_add((GtkContainer*)scrolled_window_exclude, treeview_exclude);
+ gtk_box_pack_start((GtkBox*)vbox_exclude, scrolled_window_exclude, TRUE, TRUE, 0);
+
+ /* Edit selection and connect treeview related signals */
+ exclude_selection = gtk_tree_view_get_selection((GtkTreeView*)treeview_exclude);
+ gtk_tree_selection_set_mode(exclude_selection, GTK_SELECTION_BROWSE);
+ g_signal_connect((GObject*)treeview_exclude, "key-press-event", (GCallback)delete_key_pressed, NULL);
+
+ /* Build the buttons */
+ GtkWidget* hbbox_exclude = gtk_hbutton_box_new();
+ gtk_box_set_spacing((GtkBox*)hbbox_exclude, 6);
+ gtk_button_box_set_layout((GtkButtonBox*)hbbox_exclude, GTK_BUTTONBOX_START);
+ GtkWidget* add_button_exclude = gtk_button_new_with_label(_("Add..."));
+ gtk_button_set_image((GtkButton*)add_button_exclude, gtk_image_new_from_stock(GTK_STOCK_ADD, GTK_ICON_SIZE_MENU));
+ g_signal_connect((GObject*)add_button_exclude, "clicked", (GCallback)add_exclude, NULL);
+ gtk_box_pack_start((GtkBox*)hbbox_exclude, add_button_exclude, FALSE, TRUE, 0);
+ GtkWidget* remove_button_exclude = gtk_button_new_with_label(_("Remove"));
+ gtk_button_set_image((GtkButton*)remove_button_exclude, gtk_image_new_from_stock(GTK_STOCK_REMOVE, GTK_ICON_SIZE_MENU));
+ g_signal_connect((GObject*)remove_button_exclude, "clicked", (GCallback)remove_exclude, NULL);
+ gtk_box_pack_start((GtkBox*)hbbox_exclude, remove_button_exclude, FALSE, TRUE, 0);
+ gtk_box_pack_start((GtkBox*)vbox_exclude, hbbox_exclude, FALSE, FALSE, 0);
+
+ /* Build the hotkeys page */
+ GtkWidget* page_extras = gtk_alignment_new(0.50, 0.50, 1.0, 1.0);
+ gtk_alignment_set_padding((GtkAlignment*)page_extras, 12, 6, 12, 6);
+ gtk_notebook_append_page((GtkNotebook*)notebook, page_extras, gtk_label_new(_("Hotkeys")));
+ GtkWidget* vbox_extras = gtk_vbox_new(FALSE, 12);
+ gtk_container_add((GtkContainer*)page_extras, vbox_extras);
+
+ /* Build the hotkeys frame */
+ frame = gtk_frame_new(NULL);
+ gtk_frame_set_shadow_type((GtkFrame*)frame, GTK_SHADOW_NONE);
+ label = gtk_label_new(NULL);
+ gtk_label_set_markup((GtkLabel*)label, _("<b>Hotkeys</b>"));
+ gtk_frame_set_label_widget((GtkFrame*)frame, label);
+ alignment = gtk_alignment_new(0.50, 0.50, 1.0, 1.0);
+ gtk_alignment_set_padding((GtkAlignment*)alignment, 12, 0, 12, 0);
+ gtk_container_add((GtkContainer*)frame, alignment);
+ vbox = gtk_vbox_new(FALSE, 2);
+ gtk_container_add((GtkContainer*)alignment, vbox);
+ /* History key combination */
+ hbox = gtk_hbox_new(TRUE, 4);
+ gtk_box_pack_start((GtkBox*)vbox, hbox, FALSE, FALSE, 0);
+ label = gtk_label_new(_("History hotkey:"));
+ gtk_misc_set_alignment((GtkMisc*)label, 0.0, 0.50);
+ gtk_box_pack_start((GtkBox*)hbox, label, TRUE, TRUE, 0);
+ history_key_entry = gtk_entry_new();
+ gtk_entry_set_width_chars((GtkEntry*)history_key_entry, 10);
+ gtk_box_pack_end((GtkBox*)hbox, history_key_entry, TRUE, TRUE, 0);
+ /* Actions key combination */
+ hbox = gtk_hbox_new(TRUE, 4);
+ gtk_box_pack_start((GtkBox*)vbox, hbox, FALSE, FALSE, 0);
+ label = gtk_label_new(_("Actions hotkey:"));
+ gtk_misc_set_alignment((GtkMisc*)label, 0.0, 0.50);
+ gtk_box_pack_start((GtkBox*)hbox, label, TRUE, TRUE, 0);
+ actions_key_entry = gtk_entry_new();
+ gtk_entry_set_width_chars((GtkEntry*)actions_key_entry, 10);
+ gtk_box_pack_end((GtkBox*)hbox, actions_key_entry, TRUE, TRUE, 0);
+ /* Menu key combination */
+ hbox = gtk_hbox_new(TRUE, 4);
+ gtk_box_pack_start((GtkBox*)vbox, hbox, FALSE, FALSE, 0);
+ label = gtk_label_new(_("Menu hotkey:"));
+ gtk_misc_set_alignment((GtkMisc*)label, 0.0, 0.50);
+ gtk_box_pack_start((GtkBox*)hbox, label, TRUE, TRUE, 0);
+ menu_key_entry = gtk_entry_new();
+ gtk_entry_set_width_chars((GtkEntry*)menu_key_entry, 10);
+ gtk_box_pack_end((GtkBox*)hbox, menu_key_entry, TRUE, TRUE, 0);
+ /* Search key combination */
+ hbox = gtk_hbox_new(TRUE, 4);
+ gtk_box_pack_start((GtkBox*)vbox, hbox, FALSE, FALSE, 0);
+ label = gtk_label_new(_("Manage hotkey:"));
+ gtk_misc_set_alignment((GtkMisc*)label, 0.0, 0.50);
+ gtk_box_pack_start((GtkBox*)hbox, label, TRUE, TRUE, 0);
+ search_key_entry = gtk_entry_new();
+ gtk_entry_set_width_chars((GtkEntry*)search_key_entry, 10);
+ gtk_box_pack_end((GtkBox*)hbox, search_key_entry, TRUE, TRUE, 0);
+ /* Offline mode key combination */
+ hbox = gtk_hbox_new(TRUE, 4);
+ gtk_box_pack_start((GtkBox*)vbox, hbox, FALSE, FALSE, 0);
+ label = gtk_label_new(_("Offline mode hotkey:"));
+ gtk_misc_set_alignment((GtkMisc*)label, 0.0, 0.50);
+ gtk_box_pack_start((GtkBox*)hbox, label, TRUE, TRUE, 0);
+ offline_key_entry = gtk_entry_new();
+ gtk_entry_set_width_chars((GtkEntry*)offline_key_entry, 10);
+ gtk_box_pack_end((GtkBox*)hbox, offline_key_entry, TRUE, TRUE, 0);
+ gtk_box_pack_start((GtkBox*)vbox_extras, frame, FALSE, FALSE, 0);
+
+ /* Make widgets reflect current preferences */
+ gtk_toggle_button_set_active((GtkToggleButton*)copy_check, prefs.use_copy);
+ gtk_toggle_button_set_active((GtkToggleButton*)primary_check, prefs.use_primary);
+ gtk_toggle_button_set_active((GtkToggleButton*)synchronize_check, prefs.synchronize);
+ gtk_toggle_button_set_active((GtkToggleButton*)paste_check, prefs.automatic_paste);
+ gtk_toggle_button_set_active((GtkToggleButton*)show_indexes_check, prefs.show_indexes);
+ gtk_toggle_button_set_active((GtkToggleButton*)save_uris_check, prefs.save_uris);
+ gtk_toggle_button_set_active((GtkToggleButton*)use_rmb_menu_check, prefs.use_rmb_menu);
+ gtk_toggle_button_set_active((GtkToggleButton*)save_check, prefs.save_history);
+ gtk_toggle_button_set_active((GtkToggleButton*)history_timeout_check, prefs.history_timeout);
+ gtk_spin_button_set_value((GtkSpinButton*)history_spin, (gdouble)prefs.history_limit);
+ gtk_spin_button_set_value((GtkSpinButton*)history_timeout_spin, (gdouble)prefs.history_timeout_seconds);
+ gtk_spin_button_set_value((GtkSpinButton*)items_menu, (gdouble)prefs.items_menu);
+ gtk_toggle_button_set_active((GtkToggleButton*)statics_show_check, prefs.statics_show);
+ gtk_spin_button_set_value((GtkSpinButton*)statics_items_spin, (gdouble)prefs.statics_items);
+ gtk_toggle_button_set_active((GtkToggleButton*)hyperlinks_check, prefs.hyperlinks_only);
+ gtk_toggle_button_set_active((GtkToggleButton*)confirm_check, prefs.confirm_clear);
+ gtk_toggle_button_set_active((GtkToggleButton*)linemode_check, prefs.single_line);
+ gtk_toggle_button_set_active((GtkToggleButton*)reverse_check, prefs.reverse_history);
+ gtk_spin_button_set_value((GtkSpinButton*)charlength_spin, (gdouble)prefs.item_length);
+ gtk_combo_box_set_active((GtkComboBox*)ellipsize_combo, prefs.ellipsize - 1);
+ gtk_entry_set_text((GtkEntry*)history_key_entry, prefs.history_key);
+ gtk_entry_set_text((GtkEntry*)actions_key_entry, prefs.actions_key);
+ gtk_entry_set_text((GtkEntry*)menu_key_entry, prefs.menu_key);
+ gtk_entry_set_text((GtkEntry*)search_key_entry, prefs.search_key);
+ gtk_entry_set_text((GtkEntry*)offline_key_entry, prefs.offline_key);
+
+ /* Read actions */
+ read_actions();
+ read_excludes();
+
+ /* Run the dialog */
+ gtk_widget_show_all(dialog);
+#ifdef HAVE_APPINDICATOR
+ gtk_widget_hide(use_rmb_menu_check);
+#endif
+ gtk_notebook_set_current_page((GtkNotebook*)notebook, tab);
+ if (gtk_dialog_run((GtkDialog*)dialog) == GTK_RESPONSE_ACCEPT)
+ {
+ /* If the user disabled history saving, we ask him if he wants to delete the history file */
+ if(prefs.save_history && !gtk_toggle_button_get_active((GtkToggleButton*)save_check))
+ check_saved_hist_file();
+ /* Apply and save preferences */
+ apply_preferences();
+ save_preferences();
+ save_actions();
+ save_excludes();
+ }
+ gtk_widget_destroy(dialog);
+}
diff --git a/src/preferences.h b/src/preferences.h
new file mode 100644
index 0000000..701bc51
--- /dev/null
+++ b/src/preferences.h
@@ -0,0 +1,84 @@
+/* Copyright (C) 2010-2012 by Cristian Henzel <oss@rspwn.com>
+ * Copyright (C) 2011 by Eugene Nikolsky <pluton.od@gmail.com>
+ *
+ * forked from parcellite, which is
+ * Copyright (C) 2007-2008 by Xyhthyx <xyhthyx@gmail.com>
+ *
+ * This file is part of ClipIt.
+ *
+ * ClipIt 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.
+ *
+ * ClipIt is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef PREFERENCES_H
+#define PREFERENCES_H
+
+G_BEGIN_DECLS
+
+#define INIT_HISTORY_KEY NULL
+#define INIT_ACTIONS_KEY NULL
+#define INIT_MENU_KEY NULL
+#define INIT_SEARCH_KEY NULL
+#define INIT_OFFLINE_KEY NULL
+
+#define DEF_USE_COPY TRUE
+#define DEF_USE_PRIMARY FALSE
+#define DEF_SYNCHRONIZE FALSE
+#define DEF_AUTOMATIC_PASTE FALSE
+#define DEF_SHOW_INDEXES FALSE
+#define DEF_SAVE_URIS TRUE
+#define DEF_SAVE_HISTORY TRUE
+#define DEF_USE_RMB_MENU FALSE
+#define DEF_HISTORY_LIMIT 50
+#define DEF_HISTORY_TIMEOUT FALSE
+#define DEF_HISTORY_TIMEOUT_SECONDS 30
+#define DEF_ITEMS_MENU 20
+#define DEF_STATICS_SHOW TRUE
+#define DEF_STATICS_ITEMS 10
+#define DEF_HYPERLINKS_ONLY FALSE
+#define DEF_CONFIRM_CLEAR FALSE
+#define DEF_SINGLE_LINE TRUE
+#define DEF_REVERSE_HISTORY FALSE
+#define DEF_ITEM_LENGTH 50
+#define DEF_ELLIPSIZE 2
+#define DEF_HISTORY_KEY "<Ctrl><Alt>H"
+#define DEF_ACTIONS_KEY "<Ctrl><Alt>A"
+#define DEF_MENU_KEY "<Ctrl><Alt>P"
+#define DEF_SEARCH_KEY "<Ctrl><Alt>F"
+#define DEF_OFFLINE_KEY "<Ctrl><Alt>O"
+#define DEF_NO_ICON FALSE
+#define DEF_OFFLINE_MODE FALSE
+
+#define ACTIONS_FILE "clipit/actions"
+#define EXCLUDES_FILE "clipit/excludes"
+#define PREFERENCES_FILE "clipit/clipitrc"
+#define THEMES_FOLDER "clipit/themes"
+
+#define SAVE_HIST_MESSAGE "ClipIt can save your history in a plain text file. If you copy \
+passwords or other sensitive data and other people have access to the computer, this might be a \
+security risk. Do you want to enable history saving?"
+
+#define CHECK_HIST_MESSAGE "It appears that you have disabled history saving, the current history \
+file still exists though. Do you want to empty the current history file?"
+
+void read_preferences();
+
+void save_preferences();
+
+void show_preferences(gint tab);
+
+void init_purge_timer();
+
+G_END_DECLS
+
+#endif
diff --git a/src/utils.c b/src/utils.c
new file mode 100644
index 0000000..5e7776c
--- /dev/null
+++ b/src/utils.c
@@ -0,0 +1,256 @@
+/* Copyright (C) 2010-2012 by Cristian Henzel <oss@rspwn.com>
+ *
+ * forked from parcellite, which is
+ * Copyright (C) 2007-2008 by Xyhthyx <xyhthyx@gmail.com>
+ *
+ * This file is part of ClipIt.
+ *
+ * ClipIt 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.
+ *
+ * ClipIt is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <glib.h>
+#include <gtk/gtk.h>
+#include "main.h"
+#include "utils.h"
+#include "daemon.h"
+#include "history.h"
+#include "clipit-i18n.h"
+
+/* Creates program related directories if needed */
+void check_dirs()
+{
+ gchar *data_dir = g_build_path(G_DIR_SEPARATOR_S, g_get_user_data_dir(), DATA_DIR, NULL);
+ gchar *config_dir = g_build_path(G_DIR_SEPARATOR_S, g_get_user_config_dir(), CONFIG_DIR, NULL);
+ /* Check if data directory exists */
+ if (!g_file_test(data_dir, G_FILE_TEST_EXISTS))
+ {
+ /* Try to make data directory */
+ if (g_mkdir_with_parents(data_dir, 0755) != 0)
+ g_warning(_("Couldn't create directory: %s\n"), data_dir);
+ }
+ /* Check if config directory exists */
+ if (!g_file_test(config_dir, G_FILE_TEST_EXISTS))
+ {
+ /* Try to make config directory */
+ if (g_mkdir_with_parents(config_dir, 0755) != 0)
+ g_warning(_("Couldn't create directory: %s\n"), config_dir);
+ }
+ /* Cleanup */
+ g_free(data_dir);
+ g_free(config_dir);
+}
+
+/* Returns TRUE if text is a hyperlink */
+gboolean is_hyperlink(gchar *text)
+{
+ /* TODO: I need a better regex, this one is poor */
+ GRegex *regex = g_regex_new("([A-Za-z][A-Za-z0-9+.-]{1,120}:[A-Za-z0-9/]" \
+ "(([A-Za-z0-9$_.+!*,;/?:@&~=-])|%[A-Fa-f0-9]{2}){1,333}" \
+ "(#([a-zA-Z0-9][a-zA-Z0-9$_.+!*,;/?:@&~=%-]{0,1000}))?)",
+ G_REGEX_CASELESS, 0, NULL);
+
+ gboolean result = g_regex_match(regex, text, 0, NULL);
+ g_regex_unref(regex);
+ return result;
+}
+
+/* Ellipsize a string according to the settings */
+GString *ellipsize_string(GString *string)
+{
+ gchar *start = NULL,
+ *end = NULL;
+
+ gint str_len = g_utf8_strlen(string->str, -1);
+ if (str_len > prefs.item_length)
+ {
+ switch (prefs.ellipsize)
+ {
+ case PANGO_ELLIPSIZE_START:
+ end = g_utf8_substring(string->str, str_len - prefs.item_length, str_len);
+ g_string_printf(string, "...%s", end);
+ break;
+ case PANGO_ELLIPSIZE_MIDDLE:
+ start = g_utf8_substring(string->str, 0, prefs.item_length/2);
+ end = g_utf8_substring(string->str, str_len - prefs.item_length/2, str_len);
+ g_string_printf(string, "%s...%s", start, end);
+ break;
+ case PANGO_ELLIPSIZE_END:
+ start = g_utf8_substring(string->str, 0, prefs.item_length);
+ g_string_assign(string, start);
+ string = g_string_append(string, "...");
+ break;
+ }
+ }
+
+ g_free(start);
+ g_free(end);
+
+ return string;
+}
+
+/* Remove newlines from string */
+GString *remove_newlines_string(GString *string)
+{
+ int i = 0;
+ while (i < string->len)
+ {
+ if (string->str[i] == '\n')
+ g_string_overwrite(string, i, " ");
+ i++;
+ }
+ return string;
+}
+
+/* Parses the program arguments. Returns TRUE if program needs
+ * to exit after parsing is complete
+ */
+gboolean parse_options(int argc, char* argv[])
+{
+ /* Declare argument options and argument variables */
+ gboolean icon = FALSE, daemon = FALSE,
+ clipboard = FALSE, primary = FALSE,
+ exit = FALSE;
+
+ GOptionEntry main_entries[] =
+ {
+ {
+ "daemon", 'd',
+ 0,
+ G_OPTION_ARG_NONE,
+ &daemon, _("Run as daemon"),
+ NULL
+ },
+ {
+ "no-icon", 'n',
+ 0,
+ G_OPTION_ARG_NONE,
+ &icon, _("Do not use status icon (Ctrl-Alt-P for menu)"),
+ NULL
+ },
+ {
+ "clipboard", 'c',
+ 0,
+ G_OPTION_ARG_NONE,
+ &clipboard, _("Print clipboard contents"),
+ NULL
+ },
+ {
+ "primary", 'p',
+ 0,
+ G_OPTION_ARG_NONE,
+ &primary, _("Print primary contents"),
+ NULL
+ },
+ {
+ NULL
+ }
+ };
+
+ /* Option parsing */
+ GOptionContext *context = g_option_context_new(NULL);
+ /* Set summary */
+ g_option_context_set_summary(context,
+ _("Clipboard CLI usage examples:\n\n"
+ " echo \"copied to clipboard\" | clipit\n"
+ " clipit \"copied to clipboard\"\n"
+ " echo \"copied to clipboard\" | clipit -c"));
+ /* Set description */
+ g_option_context_set_description(context,
+ _("Written by Cristian Henzel.\n"
+ "Report bugs to <oss@rspwn.com>."));
+ /* Add entries and parse options */
+ g_option_context_add_main_entries(context, main_entries, NULL);
+ g_option_context_parse(context, &argc, &argv, NULL);
+ g_option_context_free(context);
+
+ /* Check which options were parseed */
+
+ /* Do not display icon option */
+ if (icon)
+ {
+ prefs.no_icon = TRUE;
+ }
+ /* Run as daemon option */
+ else if (daemon)
+ {
+ init_daemon_mode();
+ exit = TRUE;
+ }
+ /* Print clipboard option */
+ else if (clipboard)
+ {
+ /* Grab clipboard */
+ GtkClipboard *clip = gtk_clipboard_get(GDK_SELECTION_CLIPBOARD);
+
+ /* Check if stdin has text to copy */
+ if (!isatty(fileno(stdin)))
+ {
+ GString *piped_string = g_string_new(NULL);
+ /* Append stdin to string */
+ while (1)
+ {
+ gchar *buffer = (gchar*)g_malloc(256);
+ if (fgets(buffer, 256, stdin) == NULL)
+ {
+ g_free(buffer);
+ break;
+ }
+ g_string_append(piped_string, buffer);
+ g_free(buffer);
+ }
+ /* Check if anything was piped in */
+ if (piped_string->len > 0)
+ {
+ /* Copy to clipboard */
+ gtk_clipboard_set_text(clip, piped_string->str, -1);
+ gtk_clipboard_store(clip);
+ }
+ g_string_free(piped_string, TRUE);
+ }
+ /* Print clipboard text (if any) */
+ gchar *clip_text = gtk_clipboard_wait_for_text(clip);
+ if (clip_text)
+ g_print("%s", clip_text);
+ g_free(clip_text);
+
+ /* Return true so program exits when finished parsing */
+ exit = TRUE;
+ }
+ else if (primary)
+ {
+ /* Grab primary */
+ GtkClipboard *prim = gtk_clipboard_get(GDK_SELECTION_PRIMARY);
+ /* Print primary text (if any) */
+ gchar *prim_text = gtk_clipboard_wait_for_text(prim);
+ if (prim_text)
+ g_print("%s", prim_text);
+ g_free(prim_text);
+
+ /* Return true so program exits when finished parsing */
+ exit = TRUE;
+ }
+ else
+ {
+ /* Copy from unrecognized options */
+ gchar *argv_string = g_strjoinv(" ", argv + 1);
+ GtkClipboard *clip = gtk_clipboard_get(GDK_SELECTION_CLIPBOARD);
+ gtk_clipboard_set_text(clip, argv_string, -1);
+ gtk_clipboard_store(clip);
+ g_free(argv_string);
+ /* Return true so program exits when finished parsing */
+ exit = TRUE;
+ }
+ return exit;
+}
+
diff --git a/src/utils.h b/src/utils.h
new file mode 100644
index 0000000..b1f3cc2
--- /dev/null
+++ b/src/utils.h
@@ -0,0 +1,42 @@
+/* Copyright (C) 2010-2012 by Cristian Henzel <oss@rspwn.com>
+ *
+ * forked from parcellite, which is
+ * Copyright (C) 2007-2008 by Xyhthyx <xyhthyx@gmail.com>
+ *
+ * This file is part of ClipIt.
+ *
+ * ClipIt 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.
+ *
+ * ClipIt is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef UTILS_H
+#define UTILS_H
+
+G_BEGIN_DECLS
+
+#define CONFIG_DIR "clipit"
+#define DATA_DIR "clipit"
+
+void check_dirs();
+
+gboolean is_hyperlink(gchar* link);
+
+GString *ellipsize_string(GString *string);
+
+GString *remove_newlines_string(GString *string);
+
+gboolean parse_options(int argc, char* argv[]);
+
+G_END_DECLS
+
+#endif
diff --git a/update-po b/update-po
new file mode 100755
index 0000000..0de51bf
--- /dev/null
+++ b/update-po
@@ -0,0 +1,48 @@
+#!/bin/bash
+
+## Copyright (C) 2010-2012 by Cristian Henzel <oss@rspwn.com>
+##
+## This file is part of ClipIt.
+##
+## ClipIt 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.
+##
+## ClipIt 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/>.
+
+CURRENTYEAR=$(date "+%Y")
+CURRENTSTAMP=$(date "+%Y-%m-%d %H:%M%z")
+
+## Update po files with new strings
+./autogen.sh && ./configure
+cd po
+intltool-update -r
+cd ..
+make update-po
+
+## Update po header files information
+for filename in po/*.po po/*.pot; do
+ sed -i "s/SOME DESCRIPTIVE TITLE\./ClipIt translation file./" "$filename"
+ sed -i "s/YEAR THE PACKAGE'S COPYRIGHT HOLDER/2010-${CURRENTYEAR} Cristian Henzel <oss@rspwn.com>/" "$filename"
+ sed -i "s/as the PACKAGE package\./as the ClipIt package\./" "$filename"
+ sed -i "s/FIRST AUTHOR <EMAIL@ADDRESS>, YEAR/Cristian Henzel <oss@rspwn.com>, 2010/" "$filename"
+ sed -i "s/Project-Id-Version:.*$/Project-Id-Version: ClipIt\\\\n\"/" "$filename"
+ sed -i "s/Report-Msgid-Bugs-To:.*$/Report-Msgid-Bugs-To: Cristian Henzel <oss@rspwn.com>\\\\n\"/" "$filename"
+ sed -i "s/YEAR-MO-DA HO:MI+ZONE/${CURRENTSTAMP}/" "$filename"
+ sed -i "s/FULL NAME <EMAIL@ADDRESS>/Cristian Henzel <oss@rspwn.com>/" "$filename"
+ sed -i "s/LANGUAGE <LL@li.org>/Cristian Henzel <oss@rspwn.com>/" "$filename"
+ sed -i "s/CHARSET/UTF-8/" "$filename"
+done
+
+## Push po/clipit.pot to transifex
+tx push -s
+
+## Pull translations from transifex
+tx pull -af