summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore5
-rw-r--r--AUTHORS10
-rw-r--r--CMakeLists.txt13
-rw-r--r--COPYING674
-rw-r--r--INSTALL20
-rw-r--r--README13
-rw-r--r--TRANSLATING39
-rw-r--r--resources/gnome-pie.137
-rw-r--r--resources/locale/de/LC_MESSAGES/de.po400
-rw-r--r--resources/locale/de/LC_MESSAGES/gnomepie.mobin3132 -> 7817 bytes
-rwxr-xr-xresources/locale/gen-pot.sh4
-rw-r--r--resources/locale/gnomepie.pot308
-rw-r--r--resources/locale/it/LC_MESSAGES/gnomepie.mobin0 -> 8001 bytes
-rw-r--r--resources/locale/it/LC_MESSAGES/it.po424
-rw-r--r--resources/locale/ko/LC_MESSAGES/gnomepie.mobin0 -> 8135 bytes
-rw-r--r--resources/locale/ko/LC_MESSAGES/ko.po415
-rw-r--r--resources/locale/pt-br/LC_MESSAGES/gnomepie.mobin5633 -> 7946 bytes
-rw-r--r--resources/locale/pt-br/LC_MESSAGES/pt-br.mobin0 -> 7946 bytes
-rw-r--r--resources/locale/pt-br/LC_MESSAGES/pt-br.po354
-rwxr-xr-xresources/locale/update-po.sh12
-rw-r--r--resources/themes/adwaita/theme.xml2
-rw-r--r--resources/themes/bright/theme.xml2
-rw-r--r--resources/themes/elementary/icon_bg.svg149
-rw-r--r--resources/themes/elementary/ring.svg154
-rw-r--r--resources/themes/elementary/theme.xml23
-rw-r--r--resources/themes/funky/theme.xml2
-rw-r--r--resources/themes/gloss/theme.xml2
-rw-r--r--resources/themes/o-pie/theme.xml2
-rw-r--r--resources/themes/slim/theme.xml2
-rw-r--r--resources/themes/unity/theme.xml2
-rw-r--r--src/CMakeLists.txt8
-rw-r--r--src/actionGroups/bookmarkGroup.vala2
-rw-r--r--src/actionGroups/clipboardGroup.vala1
-rw-r--r--src/actionGroups/groupRegistry.vala7
-rw-r--r--src/actionGroups/sessionGroup.vala9
-rw-r--r--src/actionGroups/windowListGroup.vala142
-rw-r--r--src/actions/keyAction.vala2
-rw-r--r--src/deamon.vala9
-rw-r--r--src/gui/about.vala34
-rw-r--r--src/gui/cellRendererTrigger.vala84
-rw-r--r--src/gui/iconSelectWindow.vala200
-rw-r--r--src/gui/pieList.vala40
-rw-r--r--src/gui/preferences.vala29
-rw-r--r--src/gui/triggerSelectWindow.vala257
-rw-r--r--src/images/icon.vala (renamed from src/utilities/icon.vala)0
-rw-r--r--src/images/image.vala (renamed from src/utilities/image.vala)0
-rw-r--r--src/images/renderedText.vala (renamed from src/utilities/renderedText.vala)0
-rw-r--r--src/images/themedIcon.vala (renamed from src/utilities/themedIcon.vala)0
-rw-r--r--src/pies/defaultConfig.vala12
-rw-r--r--src/pies/load.vala2
-rw-r--r--src/pies/pieManager.vala21
-rw-r--r--src/renderers/centerRenderer.vala55
-rw-r--r--src/renderers/pieRenderer.vala99
-rw-r--r--src/renderers/pieWindow.vala153
-rw-r--r--src/renderers/sliceRenderer.vala89
-rw-r--r--src/themes/theme.vala14
-rw-r--r--src/utilities/bindingManager.vala191
-rw-r--r--src/utilities/config.vala16
-rw-r--r--src/utilities/focusGrabber.vala74
-rw-r--r--src/utilities/trigger.vala255
-rw-r--r--vapi/bamf.vapi117
61 files changed, 4431 insertions, 559 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..e654230
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,5 @@
+*.c
+*.h
+build/*
+gnome-pie
+gnome-pie.deb
diff --git a/AUTHORS b/AUTHORS
new file mode 100644
index 0000000..72aa626
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1,10 @@
+Code:
+
+Simon Schneegans <code@simonschneegans.de>
+Francesco Piccinno <stack.box@gmail.com>
+
+Translations:
+
+Riccardo Traverso <gr3yfox.fw@gmail.com>
+Magnun Leno <magnun@codecommunity.org>
+Kim Boram <Boramism@gmail.com>
diff --git a/CMakeLists.txt b/CMakeLists.txt
index fadea59..41e2c68 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -33,6 +33,8 @@ pkg_check_modules(INDICATOR appindicator-0.1)
pkg_check_modules(XML REQUIRED libxml-2.0)
pkg_check_modules(XTST REQUIRED xtst)
pkg_check_modules(UNIQUE REQUIRED unique-1.0)
+pkg_check_modules(BAMF REQUIRED libbamf)
+pkg_check_modules(WNCK REQUIRED libwnck-1.0)
pkg_check_modules(GMENU3 libgnome-menu-3.0)
find_library(M_LIB m)
@@ -44,6 +46,7 @@ set(CFLAGS
${GEE_CFLAGS} ${CAIRO_CFLAGS_OTHER}
${X11_CFLAGS} ${X11_CFLAGS_OTHER}
-DGMENU_I_KNOW_THIS_IS_UNSTABLE
+ -DWNCK_I_KNOW_THIS_IS_UNSTABLE
-DGETTEXT_PACKAGE="gnomepie"
-s -O3
)
@@ -72,6 +75,8 @@ set(LIBS
${GMENU3_LIBRARIES}
${UNIQUE_LIBRARIES}
${X11_LIBRARIES}
+ ${WNCK_LIBRARIES}
+ ${BAMF_LIBRARIES}
${M_LIB}
)
link_libraries(${LIBS})
@@ -88,6 +93,8 @@ set(LIB_PATHS
${GMENU3_LIBRARY_DIRS}
${UNIQUE_LIBRARY_DIRS}
${X11_LIBRARY_DIRS}
+ ${WNCK_LIBRARY_DIRS}
+ ${BAMF_LIBRARY_DIRS}
)
link_directories(${LIB_PATHS})
@@ -103,6 +110,8 @@ set(INCLUDE_PATHS
${GMENU3_INCLUDE_DIRS}
${UNIQUE_INCLUDE_DIRS}
${X11_INCLUDE_DIRS}
+ ${BAMF_INCLUDE_DIRS}
+ ${WNCK_INCLUDE_DIRS}
)
include_directories(${INCLUDE_PATHS})
@@ -123,6 +132,8 @@ set(VALA_PKGS
libxml-2.0
xtst
unique-1.0
+ bamf
+ libwnck-1.0
)
if (${INDICATOR_FOUND})
@@ -168,4 +179,6 @@ message( " GMENU_LIBRARIES = ${GMENU_LIBRARIES}" )
message( " GMENU3_LIBRARIES = ${GMENU3_LIBRARIES}" )
message( " UNIQUE_LIBRARIES = ${UNIQUE_LIBRARIES}" )
message( " X11_LIBRARIES = ${X11_LIBRARIES}" )
+message( " BAMF_LIBRARIES = ${BAMF_LIBRARIES}" )
+message( " WNCK_LIBRARIES = ${WNCK_LIBRARIES}" )
message( "" )
diff --git a/COPYING b/COPYING
new file mode 100644
index 0000000..94a9ed0
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,674 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+ <program> Copyright (C) <year> <name of author>
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+<http://www.gnu.org/licenses/>.
+
+ The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+<http://www.gnu.org/philosophy/why-not-lgpl.html>.
diff --git a/INSTALL b/INSTALL
new file mode 100644
index 0000000..16788e5
--- /dev/null
+++ b/INSTALL
@@ -0,0 +1,20 @@
+####################################################################
+# Compiling and installing Gnome-Pie #
+####################################################################
+
+First of all, install all dependancies:
+
+sudo apt-get install libgtk2.0-dev libcairo2-dev libappindicator-dev
+ libgee-dev libxml2-dev libxtst-dev
+ libgnome-menu-dev valac cmake libunique-dev
+
+Then build Gnome-Pie by typing:
+./make.sh
+
+Launch it with
+./gnome-pie
+
+If you want to install it system wide use
+cd build && sudo make install
+
+Have fun with this tool!
diff --git a/README b/README
index 81ac7a4..1d71775 100644
--- a/README
+++ b/README
@@ -14,8 +14,7 @@ It is inspired by the an addon written for the game World of Warcraft.
# About this Branch #
####################################################################
-This is the master Branch of Gnome-Pie. A recent "stable" version
-will be in here.
+This is the master branch of Gnome-Pie.
####################################################################
# PPA #
@@ -37,11 +36,17 @@ First of all, install all dependancies:
sudo apt-get install libgtk2.0-dev libcairo2-dev libappindicator-dev
libgee-dev libxml2-dev libxtst-dev
libgnome-menu-dev valac cmake libunique-dev
+ libbamf-dev libwnck-dev
-Then build and launch Gnome-Pie by typing:
-
+Then build Gnome-Pie by typing:
./make.sh
+Launch it with
+./gnome-pie
+
+If you want to install it system wide use
+cd build && sudo make install
+
####################################################################
# Usage #
####################################################################
diff --git a/TRANSLATING b/TRANSLATING
new file mode 100644
index 0000000..5112af7
--- /dev/null
+++ b/TRANSLATING
@@ -0,0 +1,39 @@
+####################################################################
+# Translating Gnome-Pie #
+####################################################################
+
+It would be really cool if you could create a translation of Gnome-
+Pie into your language!
+
+It is quite easy and involves the following steps. All you need is the
+locale string for your language. You can get it with the terminal
+command "echo $LANG".
+
+CREATING A NEW TRANSLATION
+
+1. Update the gnomepie.pot file
+ * navigate with a terminal to the directory "resources/locale"
+ * enter the command "./gen-pot.sh"
+2. Create your translation file
+ * enter the command "./gen-po.sh"
+ * follow instructions
+3. Translate to your language
+ * open the file "resources/locale/[your locale]/LC_MESSAGES/[your locale].po"
+ * create translations for every string in this file (write it after each "msgstr")
+4. Compile translations
+ * enter the command "./compile-po.sh"
+
+
+UPDATING AN EXISTENT TRANSLATION
+
+1. Update the gnomepie.pot file
+ * navigate with a terminal to the directory "resources/locale"
+ * enter the command "./gen-pot.sh"
+2. Updste your translation file
+ * enter the command "./update-po.sh"
+ * follow instructions
+3. Translate to your language
+ * open the file "/resources/locale/[your locale]/LC_MESSAGES/[your locale].po"
+ * create translations for every string in this file which don't have translations already
+4. Compile translations
+ * enter the command "./compile-po.sh"
diff --git a/resources/gnome-pie.1 b/resources/gnome-pie.1
new file mode 100644
index 0000000..89816a4
--- /dev/null
+++ b/resources/gnome-pie.1
@@ -0,0 +1,37 @@
+.\" Hey, EMACS: -*- nroff -*-
+.TH GNOME-PIE 1 "November 12, 2011"
+.SH NAME
+gnome-pie \- visual application launcher for GNOME
+.SH SYNOPSIS
+.SY gnome-pie
+.OP OPTIONS
+.SH DESCRIPTION
+\fBgnome-pie\fP is a radial visual application launcher for GNOME. It allows the
+user to bind groups of frequently used applications to a ring that appears
+when a hot key / mouse binding is triggered.
+.SH OPTIONS
+.SS "Help Options:"
+.TP
+\fB\-h\fR, \fB\-\-help\fR
+Show help options
+.TP
+\fB\-\-help\-all\fR
+Show all help options
+.TP
+\fB\-\-help\-gtk\fR
+Show GTK+ Options
+.SS "Application Options:"
+.TP
+\fB\-o\fR, \fB\-\-open\fR=\fIID\fR
+Open the Pie with the given ID
+.TP
+\fB\-r\fR, \fB\-\-reset\fR
+Reset all options to default values
+.TP
+\fB\-\-display\fR=\fIDISPLAY\fR
+X display to use
+.SH AUTHOR
+gnome-pie was written by Simon Schneegans <code@simonschneegans.de>.
+.PP
+This manual page was written by Alessandro Ghedini <al3xbio@gmail.com>,
+for the Debian project (and may be used by others).
diff --git a/resources/locale/de/LC_MESSAGES/de.po b/resources/locale/de/LC_MESSAGES/de.po
index 3426769..9057020 100644
--- a/resources/locale/de/LC_MESSAGES/de.po
+++ b/resources/locale/de/LC_MESSAGES/de.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gnomepie 0.1\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2011-08-25 21:04+0200\n"
+"POT-Creation-Date: 2011-11-08 18:03+0100\n"
"PO-Revision-Date: 2011-08-25 21:04+0200\n"
"Last-Translator: Simon Schneegans <simon.schneegans@uni-weimar.de>\n"
"Language-Team: German\n"
@@ -17,205 +17,417 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-#: ../../src/actions/keyAction.vala:24 ../../src/settings/pieList.vala:73
-msgid "Press key stroke"
+#: ../../src/actions/keyAction.vala:33
+msgid "Press hotkey"
msgstr "Tastenkombination"
-#: ../../src/actions/appAction.vala:24 ../../src/settings/pieList.vala:72
+#: ../../src/actions/appAction.vala:33
msgid "Launch application"
msgstr "Programm ausführen"
-#: ../../src/actions/action.vala:88
-msgid "Trash"
-msgstr "Müll"
-
-#: ../../src/actions/uriAction.vala:24 ../../src/settings/pieList.vala:75
+#: ../../src/actions/uriAction.vala:33
msgid "Open URI"
msgstr "URI öffnen"
-#: ../../src/actions/pieAction.vala:24 ../../src/settings/pieList.vala:74
+#: ../../src/actions/actionRegistry.vala:107
+msgid "Trash"
+msgstr "Müll"
+
+#: ../../src/actions/pieAction.vala:33
msgid "Open Pie"
msgstr "Pie öffnen"
-#: ../../src/settings/preferences.vala:26
+#: ../../src/gui/triggerSelectWindow.vala:69
+msgid "Define an open-command"
+msgstr "Einen Hotkey festlegen"
+
+#: ../../src/gui/triggerSelectWindow.vala:87
+msgid "Click here if you want to bind a mouse button!"
+msgstr "Klicke hier um eine Maustaste zu binden"
+
+#: ../../src/gui/triggerSelectWindow.vala:102
+msgid "Turbo mode"
+msgstr "Turbo-Mode"
+
+#: ../../src/gui/triggerSelectWindow.vala:103
+msgid "If checked, the Pie will close when you release the chosen hot key."
+msgstr "Falls aktiviert schließt sich der Pie wieder automatisch, wenn der Hotkey losgelassen wird."
+
+#: ../../src/gui/triggerSelectWindow.vala:117
+msgid "Long press for activation"
+msgstr "Verzögerte Aktivierung"
+
+#: ../../src/gui/triggerSelectWindow.vala:118
+msgid ""
+"If checked, the Pie will only open if you press this hot key a bit longer."
+msgstr "Falls aktiviert wird sich der Pie erst öffnen, wenn der Hotkey länger gedrückt gehalten wird."
+
+#: ../../src/gui/triggerSelectWindow.vala:158
+msgid ""
+"This hotkey is already assigned to the pie \"%s\"! \n"
+"\n"
+"Please select another one or cancel your selection."
+msgstr "Dieser Hotkey ist schon dem Pie \"%s\" zugeordnet!\n Bitte wähle einen anderen!"
+
+#: ../../src/gui/triggerSelectWindow.vala:199
+msgid ""
+"It possible to make your system unusable if you bind a Pie to your left "
+"mouse button. Do you really want to do this?"
+msgstr "Wahrscheinlich machst du dein System unbenutzbar, wenn du die linke Maustaste bindest. Willst du das wirklich?"
+
+#: ../../src/gui/preferences.vala:32
msgid "Gnome-Pie - Settings"
msgstr "Gnome-Pie - Einstellungen"
-#: ../../src/settings/preferences.vala:49
+#: ../../src/gui/preferences.vala:55
msgid "Behavior"
msgstr "Verhalten"
-#: ../../src/settings/preferences.vala:59
+#: ../../src/gui/preferences.vala:65
msgid "Startup on Login"
msgstr "Beim Anmelden automatisch ausführen"
-#: ../../src/settings/preferences.vala:65
+#: ../../src/gui/preferences.vala:66
+msgid "If checked, Gnome-Pie will start when you log in."
+msgstr "Durch Aktivierung dieser Option wird Gnome-Pie automatisch starten, wenn du dich anmeldest."
+
+#: ../../src/gui/preferences.vala:72
msgid "Show Indicator"
msgstr "Benachrichtigungssymbol anzeigen"
-#: ../../src/settings/preferences.vala:71
+#: ../../src/gui/preferences.vala:73
+msgid ""
+"If checked, an indicator for easy access of the settings menu is shown in "
+"your panel."
+msgstr "Durch Aktivierung wird ein Indikator in deinem Panel angezeigt."
+
+#: ../../src/gui/preferences.vala:79
msgid "Open Pies at Mouse"
msgstr "Pies an der Maus öffnen"
-#: ../../src/settings/preferences.vala:77
-msgid "Click to activate a Slice"
-msgstr "Klicken um Slices zu aktivieren"
+#: ../../src/gui/preferences.vala:80
+msgid ""
+"If checked, pies will open at your pointer. Otherwise they'll pop up in the "
+"middle of the screen."
+msgstr "Wenn aktiviert öffnen sich die Pies direkt an der Maus. Sonst öffnen sie sich in der Mitte des Bildschirms."
-#: ../../src/settings/preferences.vala:86
+#: ../../src/gui/preferences.vala:89
msgid "Global Scale"
msgstr "Skalierungsfaktor"
-#: ../../src/settings/preferences.vala:123
+#: ../../src/gui/preferences.vala:126
msgid "Themes"
msgstr "Themen"
-#: ../../src/settings/preferences.vala:141
+#: ../../src/gui/preferences.vala:144
msgid "General"
msgstr "Allgemein"
-#: ../../src/settings/preferences.vala:146
+#: ../../src/gui/preferences.vala:149
msgid "Pies"
msgstr "Pies"
-#: ../../src/settings/preferences.vala:170
-msgid ""
-"You can right-click in the list\n"
-"for adding or removing entries."
+#: ../../src/gui/preferences.vala:173
+msgid "You can right-click in the list for adding or removing entries."
msgstr ""
"Zum Löschen und Hinzufügen von Einträgen kannst \n"
"du mit der rechten Maustaste in die Liste klicken."
-#: ../../src/settings/themeList.vala:75
-msgid "by"
-msgstr "von"
+#: ../../src/gui/preferences.vala:174
+msgid ""
+"You can reset Gnome-Pie to its default options with the terminal command "
+"\"gnome-pie --reset\"."
+msgstr "Du kannst Gnome-Pie mit dem Terminalbefehl \"gnome-pie --reset\" auf die Standardeinstellungen zurücksetzen."
-#: ../../src/settings/iconChooserWindow.vala:79
-msgid "Choose an Icon"
-msgstr "Wähle ein Symbol"
+#: ../../src/gui/preferences.vala:175
+msgid ""
+"The radiobutton at the beginning of each slice-line indicates the "
+"QuickAction of the pie."
+msgstr "Der Auswahlknopf vor jeder Slice zeigt die QuickAction jeder Pie an."
-#: ../../src/settings/iconChooserWindow.vala:101
-msgid "All icons"
-msgstr "Alle Symbole"
+#: ../../src/gui/preferences.vala:176
+msgid "Pies can be opened with the terminal command \"gnome-pie --open=ID\"."
+msgstr "Pies können mit dem Befehl \"gnome-pie --open=ID\" geöffnet werden."
-#: ../../src/settings/iconChooserWindow.vala:102
-msgid "Applications"
-msgstr "Anwendungen"
+#: ../../src/gui/preferences.vala:177
+msgid "Feel free to visit Gnome-Pie's homepage at %s!"
+msgstr "Besuche Gnome-Pies Homepage auf %s!"
-#: ../../src/settings/iconChooserWindow.vala:103
-msgid "Actions"
-msgstr "Aktionen"
+#: ../../src/gui/preferences.vala:178
+msgid "You can drag'n'drop applications from your main menu to the list above."
+msgstr "Du kannst Anwendungen von deinem Hauptmenü in die obige Liste ziehen."
-#: ../../src/settings/iconChooserWindow.vala:104
-msgid "Places"
-msgstr "Orte"
+#: ../../src/gui/preferences.vala:179
+msgid "If you want to give some feedback, please write an e-mail to %s!"
+msgstr "Wenn du Feedback geben willst, schick eine E-Mail an %s!"
-#: ../../src/settings/iconChooserWindow.vala:105
-msgid "File types"
-msgstr "Dateitypen"
+#: ../../src/gui/preferences.vala:180
+msgid ""
+"You may drag'n'drop URLs and bookmarks from your internet browser to the "
+"list above."
+msgstr "Du kannst URLs und Links aus deinem Internet-Browser in die Liste ziehen."
-#: ../../src/settings/iconChooserWindow.vala:106
-msgid "Emotes"
-msgstr "Smilies"
+#: ../../src/gui/preferences.vala:181
+msgid "Bugs can be reported at %s!"
+msgstr "Bugs können auf %s gemeldet werden!"
-#: ../../src/settings/iconChooserWindow.vala:107
-msgid "Miscellaneous"
-msgstr "Sonstige"
+#: ../../src/gui/preferences.vala:182
+msgid ""
+"It's possible to drag'n'drop files and folders from your file browser to the "
+"list above."
+msgstr "Es ist möglich Dateien und Verzeichnisse aus deinem Datei-Browser in die Liste zu ziehen!"
-#: ../../src/settings/pieList.vala:56
-#: ../../src/actionGroups/bookmarkGroup.vala:23
-msgid "Bookmarks"
-msgstr "Lesezeichen"
+#: ../../src/gui/preferences.vala:183
+msgid ""
+"It's recommended to keep your Pies small (at most 6-8 Slices). Else they "
+"will become hard to navigate."
+msgstr "Es ist empfehlenswert, nur maximal acht Slices pro Pie zu verwenden. Sonst wird die Navigation schwierig."
-#: ../../src/settings/pieList.vala:57
-#: ../../src/actionGroups/devicesGroup.vala:23
-msgid "Devices"
-msgstr "Laufwerke"
+#: ../../src/gui/preferences.vala:184
+msgid ""
+"In order to create a launcher for a Pie, drag the Pie from the list to your "
+"desktop!"
+msgstr "Du kannst Launcher für Pies erstellen. Ziehe sie dazu von obiger Liste auf deinen Desktop!"
-#: ../../src/settings/pieList.vala:58 ../../src/actionGroups/menuGroup.vala:25
-msgid "Main menu"
-msgstr "Hauptmenü"
+#: ../../src/gui/preferences.vala:193
+msgid "Moves the selected Slice down"
+msgstr ""
+"Verschiebt die gewählte Slice nach unten."
-#: ../../src/settings/pieList.vala:59
-#: ../../src/actionGroups/sessionGroup.vala:23
-msgid "Session Control"
-msgstr "Sitzung"
+#: ../../src/gui/preferences.vala:205
+msgid "Moves the selected Slice up"
+msgstr ""
+"Verschiebt die gewählte Slice nach oben."
-#: ../../src/settings/pieList.vala:76 ../../src/settings/pieList.vala:738
+#: ../../src/gui/themeList.vala:88
+msgid "by"
+msgstr "von"
+
+#: ../../src/gui/pieList.vala:88 ../../src/gui/pieList.vala:850
msgid "Slice group"
msgstr "Slice-Gruppe"
-#: ../../src/settings/pieList.vala:119
+#: ../../src/gui/pieList.vala:135
msgid "Icon"
msgstr "Symbol"
-#: ../../src/settings/pieList.vala:181
+#: ../../src/gui/pieList.vala:200
msgid "Command"
msgstr "Kommando"
-#: ../../src/settings/pieList.vala:261 ../../src/settings/pieList.vala:601
-#: ../../src/settings/pieList.vala:753
-#: ../../src/system/bindingManager.vala:118
+#: ../../src/gui/pieList.vala:301 ../../src/gui/pieList.vala:706
+#: ../../src/gui/pieList.vala:866 ../../src/utilities/bindingManager.vala:156
+#: ../../src/utilities/trigger.vala:197 ../../src/utilities/trigger.vala:198
msgid "Not bound"
msgstr "Nicht zugewiesen"
-#: ../../src/settings/pieList.vala:326
-msgid "Action type"
-msgstr "Slice-Typ"
+#: ../../src/gui/pieList.vala:366
+msgid "Pie-ID / Action type"
+msgstr "Pie-ID / Slicetyp"
-#: ../../src/settings/pieList.vala:388
+#: ../../src/gui/pieList.vala:427
msgid "Name"
msgstr "Name"
-#: ../../src/settings/pieList.vala:423
+#: ../../src/gui/pieList.vala:470
msgid "Add new Pie"
msgstr "Pie hinzufügen"
-#: ../../src/settings/pieList.vala:428
+#: ../../src/gui/pieList.vala:475
msgid "Add new Slice"
msgstr "Slice hinzufügen"
-#: ../../src/settings/pieList.vala:436
+#: ../../src/gui/pieList.vala:483
msgid "Delete"
msgstr "Eintrag löschen"
-#: ../../src/settings/pieList.vala:517
+#: ../../src/gui/pieList.vala:618
msgid "New Pie"
msgstr "Neuer Pie"
-#: ../../src/settings/pieList.vala:562
+#: ../../src/gui/pieList.vala:665
msgid "New Action"
msgstr "Neue Slice"
-#: ../../src/settings/pieList.vala:576
+#: ../../src/gui/pieList.vala:679
msgid "You have to select a Pie to add a Slice to!"
-msgstr "Es muss ein Pie ausgewählt sein, zu dem eine Slice hinzugefügt werden soll!"
+msgstr ""
+"Es muss ein Pie ausgewählt sein, zu dem eine Slice hinzugefügt werden soll!"
-#: ../../src/settings/pieList.vala:623
+#: ../../src/gui/pieList.vala:729
msgid "You have to select a Pie or a Slice to delete!"
msgstr "Es muss etwas ausgewählt sein, das gelöscht werden soll!"
-#: ../../src/settings/pieList.vala:633
+#: ../../src/gui/pieList.vala:740
msgid ""
"Do you really want to delete the selected Pie with all contained Slices?"
-msgstr ""
-"Soll dieser Pie wirklich mit allen Slices gelöscht werden?"
+msgstr "Soll dieser Pie wirklich mit allen Slices gelöscht werden?"
-#: ../../src/settings/pieList.vala:666
+#: ../../src/gui/pieList.vala:774
msgid "Do you really want to delete the selected Slice?"
msgstr "Soll die ausgewählte Slice wirklich gelöscht werden?"
-#: ../../src/actionGroups/sessionGroup.vala:29
+#: ../../src/gui/iconSelectWindow.vala:160
+msgid "Choose an Icon"
+msgstr "Wähle ein Symbol"
+
+#: ../../src/gui/iconSelectWindow.vala:196
+msgid "All icons"
+msgstr "Alle Symbole"
+
+#: ../../src/gui/iconSelectWindow.vala:197
+#: ../../src/pies/defaultConfig.vala:36
+msgid "Applications"
+msgstr "Anwendungen"
+
+#: ../../src/gui/iconSelectWindow.vala:198
+msgid "Actions"
+msgstr "Aktionen"
+
+#: ../../src/gui/iconSelectWindow.vala:199
+msgid "Places"
+msgstr "Orte"
+
+#: ../../src/gui/iconSelectWindow.vala:200
+msgid "File types"
+msgstr "Dateitypen"
+
+#: ../../src/gui/iconSelectWindow.vala:201
+msgid "Emotes"
+msgstr "Smilies"
+
+#: ../../src/gui/iconSelectWindow.vala:202
+msgid "Miscellaneous"
+msgstr "Sonstige"
+
+#: ../../src/gui/iconSelectWindow.vala:279
+msgid "Icon Theme"
+msgstr "Symbolthema"
+
+#: ../../src/gui/iconSelectWindow.vala:289
+msgid "All supported image formats"
+msgstr "Alle unterstützten Bildformate"
+
+#: ../../src/gui/iconSelectWindow.vala:311
+msgid "Custom Icon"
+msgstr "Benutzerdefiniertes Symbol"
+
+#: ../../src/actionGroups/windowListGroup.vala:33
+msgid "Window List"
+msgstr "Fensterliste"
+
+#: ../../src/actionGroups/menuGroup.vala:34
+msgid "Main menu"
+msgstr "Hauptmenü"
+
+#: ../../src/actionGroups/clipboardGroup.vala:63
+msgid "Clipboard"
+msgstr "Zwischenablage"
+
+#: ../../src/actionGroups/sessionGroup.vala:34
+msgid "Session Control"
+msgstr "Sitzung"
+
+#: ../../src/actionGroups/sessionGroup.vala:52
msgid "Shutdown"
msgstr "Herunterfahren"
-#: ../../src/actionGroups/sessionGroup.vala:32
+#: ../../src/actionGroups/sessionGroup.vala:55
msgid "Logout"
msgstr "Ausloggen"
-#: ../../src/actionGroups/sessionGroup.vala:35
+#: ../../src/actionGroups/sessionGroup.vala:58
msgid "Reboot"
msgstr "Neustarten"
-#: ../../src/actionGroups/devicesGroup.vala:44
+#: ../../src/actionGroups/bookmarkGroup.vala:35
+#: ../../src/pies/defaultConfig.vala:45
+msgid "Bookmarks"
+msgstr "Lesezeichen"
+
+#: ../../src/actionGroups/devicesGroup.vala:34
+msgid "Devices"
+msgstr "Laufwerke"
+
+#: ../../src/actionGroups/devicesGroup.vala:82
msgid "Root"
msgstr "Dateisystem"
+
+#: ../../src/utilities/trigger.vala:152
+msgid "Button %i"
+msgstr "Taste %i"
+
+#: ../../src/utilities/trigger.vala:155
+msgid "LeftButton"
+msgstr "MausLinks"
+
+#: ../../src/utilities/trigger.vala:157
+msgid "RightButton"
+msgstr "MausRechts"
+
+#: ../../src/utilities/trigger.vala:159
+msgid "MiddleButton"
+msgstr "Mausrad"
+
+#: ../../src/utilities/trigger.vala:181 ../../src/utilities/trigger.vala:183
+msgid "Turbo"
+msgstr "Turbo"
+
+#: ../../src/utilities/trigger.vala:181 ../../src/utilities/trigger.vala:185
+msgid "Delayed"
+msgstr "Verzögert"
+
+#: ../../src/pies/defaultConfig.vala:29
+msgid "Multimedia"
+msgstr ""
+
+#: ../../src/pies/defaultConfig.vala:30
+msgid "Next Track"
+msgstr "Nächster Titel"
+
+#: ../../src/pies/defaultConfig.vala:31
+msgid "Stop"
+msgstr "Stopp"
+
+#: ../../src/pies/defaultConfig.vala:32
+msgid "Previous Track"
+msgstr "Vorheriger Titel"
+
+#: ../../src/pies/defaultConfig.vala:33
+msgid "Play/Pause"
+msgstr "Play/Pause"
+
+#: ../../src/pies/defaultConfig.vala:50
+msgid "Session"
+msgstr "Sitzung"
+
+#: ../../src/pies/defaultConfig.vala:54
+msgid "Main Menu"
+msgstr "Hauptmenü"
+
+#: ../../src/pies/defaultConfig.vala:58
+msgid "Window"
+msgstr "Fenster"
+
+#: ../../src/pies/defaultConfig.vala:59
+msgid "Scale"
+msgstr "Skalieren"
+
+#: ../../src/pies/defaultConfig.vala:60
+msgid "Minimize"
+msgstr "Minimieren"
+
+#: ../../src/pies/defaultConfig.vala:61
+msgid "Close"
+msgstr "Schließen"
+
+#: ../../src/pies/defaultConfig.vala:62
+msgid "Maximize"
+msgstr "Maximieren"
+
+#: ../../src/pies/defaultConfig.vala:63
+msgid "Restore"
+msgstr "Wiederherstellen"
+
+#~ msgid "Click to activate a Slice"
+#~ msgstr "Klicken um Slices zu aktivieren"
diff --git a/resources/locale/de/LC_MESSAGES/gnomepie.mo b/resources/locale/de/LC_MESSAGES/gnomepie.mo
index 622b2ee..a5b5efb 100644
--- a/resources/locale/de/LC_MESSAGES/gnomepie.mo
+++ b/resources/locale/de/LC_MESSAGES/gnomepie.mo
Binary files differ
diff --git a/resources/locale/gen-pot.sh b/resources/locale/gen-pot.sh
index 65acff3..356e12e 100755
--- a/resources/locale/gen-pot.sh
+++ b/resources/locale/gen-pot.sh
@@ -6,8 +6,8 @@
filelist=$( find ../../src/ -name '*.vala' -printf "%h/%f " )
domain="gnomepie"
-version="0.1"
-copyright="Simon Schneegans <simon.schneegans@uni-weimar.de>"
+version="0.2"
+copyright="Simon Schneegans <code@simonschneegans.de>"
xgettext --package-name $domain \
--package-version $version \
diff --git a/resources/locale/gnomepie.pot b/resources/locale/gnomepie.pot
index 871ef0e..b2af1aa 100644
--- a/resources/locale/gnomepie.pot
+++ b/resources/locale/gnomepie.pot
@@ -1,14 +1,14 @@
# SOME DESCRIPTIVE TITLE.
-# Copyright (C) YEAR Simon Schneegans <simon.schneegans@uni-weimar.de>
+# Copyright (C) YEAR Simon Schneegans <code@simonschneegans.de>
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
-"Project-Id-Version: gnomepie 0.1\n"
+"Project-Id-Version: gnomepie 0.2\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2011-10-11 15:55-0300\n"
+"POT-Creation-Date: 2011-11-10 08:00+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -18,11 +18,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
#: ../../src/actions/keyAction.vala:33
-msgid "Press key stroke"
-msgstr ""
-
-#: ../../src/actions/pieAction.vala:33
-msgid "Open Pie"
+msgid "Press hotkey"
msgstr ""
#: ../../src/actions/appAction.vala:33
@@ -37,71 +33,46 @@ msgstr ""
msgid "Trash"
msgstr ""
-#: ../../src/utilities/bindingManager.vala:150 ../../src/gui/pieList.vala:278
-#: ../../src/gui/pieList.vala:660 ../../src/gui/pieList.vala:818
-msgid "Not bound"
-msgstr ""
-
-#: ../../src/pies/defaultConfig.vala:29
-msgid "Multimedia"
-msgstr ""
-
-#: ../../src/pies/defaultConfig.vala:30
-msgid "Next Track"
-msgstr ""
-
-#: ../../src/pies/defaultConfig.vala:31
-msgid "Stop"
-msgstr ""
-
-#: ../../src/pies/defaultConfig.vala:32
-msgid "Previous Track"
-msgstr ""
-
-#: ../../src/pies/defaultConfig.vala:33
-msgid "Play/Pause"
-msgstr ""
-
-#: ../../src/pies/defaultConfig.vala:36
-#: ../../src/gui/iconSelectWindow.vala:119
-msgid "Applications"
+#: ../../src/actions/pieAction.vala:33
+msgid "Open Pie"
msgstr ""
-#: ../../src/pies/defaultConfig.vala:45
-#: ../../src/actionGroups/bookmarkGroup.vala:35
-msgid "Bookmarks"
+#: ../../src/gui/triggerSelectWindow.vala:69
+msgid "Define an open-command"
msgstr ""
-#: ../../src/pies/defaultConfig.vala:50
-msgid "Session"
+#: ../../src/gui/triggerSelectWindow.vala:87
+msgid "Click here if you want to bind a mouse button!"
msgstr ""
-#: ../../src/pies/defaultConfig.vala:54
-msgid "Main Menu"
+#: ../../src/gui/triggerSelectWindow.vala:102
+msgid "Turbo mode"
msgstr ""
-#: ../../src/pies/defaultConfig.vala:58
-msgid "Window"
+#: ../../src/gui/triggerSelectWindow.vala:103
+msgid "If checked, the Pie will close when you release the chosen hot key."
msgstr ""
-#: ../../src/pies/defaultConfig.vala:59
-msgid "Scale"
+#: ../../src/gui/triggerSelectWindow.vala:117
+msgid "Long press for activation"
msgstr ""
-#: ../../src/pies/defaultConfig.vala:60
-msgid "Minimize"
-msgstr ""
-
-#: ../../src/pies/defaultConfig.vala:61
-msgid "Close"
+#: ../../src/gui/triggerSelectWindow.vala:118
+msgid ""
+"If checked, the Pie will only open if you press this hot key a bit longer."
msgstr ""
-#: ../../src/pies/defaultConfig.vala:62
-msgid "Maximize"
+#: ../../src/gui/triggerSelectWindow.vala:156
+msgid ""
+"This hotkey is already assigned to the pie \"%s\"! \n"
+"\n"
+"Please select another one or cancel your selection."
msgstr ""
-#: ../../src/pies/defaultConfig.vala:63
-msgid "Restore"
+#: ../../src/gui/triggerSelectWindow.vala:197
+msgid ""
+"It possible to make your system unusable if you bind a Pie to your left "
+"mouse button. Do you really want to do this?"
msgstr ""
#: ../../src/gui/preferences.vala:32
@@ -140,196 +111,212 @@ msgid ""
"middle of the screen."
msgstr ""
-#: ../../src/gui/preferences.vala:86
-msgid "Turbo mode"
-msgstr ""
-
-#: ../../src/gui/preferences.vala:87
-msgid ""
-"If checked, the pie closes when its keystroke is released. The currently "
-"hovered slice gets executed. This allows very fast selection but disables "
-"keyboard navigating."
-msgstr ""
-
-#: ../../src/gui/preferences.vala:96
+#: ../../src/gui/preferences.vala:89
msgid "Global Scale"
msgstr ""
-#: ../../src/gui/preferences.vala:133
+#: ../../src/gui/preferences.vala:126
msgid "Themes"
msgstr ""
-#: ../../src/gui/preferences.vala:151
+#: ../../src/gui/preferences.vala:144
msgid "General"
msgstr ""
-#: ../../src/gui/preferences.vala:156
+#: ../../src/gui/preferences.vala:149
msgid "Pies"
msgstr ""
-#: ../../src/gui/preferences.vala:180
+#: ../../src/gui/preferences.vala:173
msgid "You can right-click in the list for adding or removing entries."
msgstr ""
-#: ../../src/gui/preferences.vala:181
+#: ../../src/gui/preferences.vala:174
msgid ""
"You can reset Gnome-Pie to its default options with the terminal command "
"\"gnome-pie --reset\"."
msgstr ""
-#: ../../src/gui/preferences.vala:182
+#: ../../src/gui/preferences.vala:175
msgid ""
"The radiobutton at the beginning of each slice-line indicates the "
"QuickAction of the pie."
msgstr ""
-#: ../../src/gui/preferences.vala:183
+#: ../../src/gui/preferences.vala:176
msgid "Pies can be opened with the terminal command \"gnome-pie --open=ID\"."
msgstr ""
-#: ../../src/gui/preferences.vala:184
+#: ../../src/gui/preferences.vala:177
msgid "Feel free to visit Gnome-Pie's homepage at %s!"
msgstr ""
-#: ../../src/gui/preferences.vala:185
+#: ../../src/gui/preferences.vala:178
msgid "You can drag'n'drop applications from your main menu to the list above."
msgstr ""
-#: ../../src/gui/preferences.vala:186
+#: ../../src/gui/preferences.vala:179
msgid "If you want to give some feedback, please write an e-mail to %s!"
msgstr ""
-#: ../../src/gui/preferences.vala:187
+#: ../../src/gui/preferences.vala:180
msgid ""
"You may drag'n'drop URLs and bookmarks from your internet browser to the "
"list above."
msgstr ""
-#: ../../src/gui/preferences.vala:188
+#: ../../src/gui/preferences.vala:181
msgid "Bugs can be reported at %s!"
msgstr ""
-#: ../../src/gui/preferences.vala:189
+#: ../../src/gui/preferences.vala:182
msgid ""
"It's possible to drag'n'drop files and folders from your file browser to the "
"list above."
msgstr ""
-#: ../../src/gui/preferences.vala:198
+#: ../../src/gui/preferences.vala:183
+msgid ""
+"It's recommended to keep your Pies small (at most 6-8 Slices). Else they "
+"will become hard to navigate."
+msgstr ""
+
+#: ../../src/gui/preferences.vala:184
+msgid ""
+"In order to create a launcher for a Pie, drag the Pie from the list to your "
+"desktop!"
+msgstr ""
+
+#: ../../src/gui/preferences.vala:193
msgid "Moves the selected Slice down"
msgstr ""
-#: ../../src/gui/preferences.vala:210
+#: ../../src/gui/preferences.vala:205
msgid "Moves the selected Slice up"
msgstr ""
-#: ../../src/gui/pieList.vala:88 ../../src/gui/pieList.vala:803
+#: ../../src/gui/themeList.vala:88
+msgid "by"
+msgstr ""
+
+#: ../../src/gui/pieList.vala:88 ../../src/gui/pieList.vala:851
msgid "Slice group"
msgstr ""
-#: ../../src/gui/pieList.vala:134
+#: ../../src/gui/pieList.vala:135
msgid "Icon"
msgstr ""
-#: ../../src/gui/pieList.vala:199
+#: ../../src/gui/pieList.vala:200
msgid "Command"
msgstr ""
-#: ../../src/gui/pieList.vala:343
+#: ../../src/gui/pieList.vala:301 ../../src/gui/pieList.vala:707
+#: ../../src/gui/pieList.vala:867 ../../src/utilities/bindingManager.vala:156
+#: ../../src/utilities/trigger.vala:197 ../../src/utilities/trigger.vala:198
+msgid "Not bound"
+msgstr ""
+
+#: ../../src/gui/pieList.vala:366
msgid "Pie-ID / Action type"
msgstr ""
-#: ../../src/gui/pieList.vala:403
+#: ../../src/gui/pieList.vala:427
msgid "Name"
msgstr ""
-#: ../../src/gui/pieList.vala:446
+#: ../../src/gui/pieList.vala:470
msgid "Add new Pie"
msgstr ""
-#: ../../src/gui/pieList.vala:451
+#: ../../src/gui/pieList.vala:475
msgid "Add new Slice"
msgstr ""
-#: ../../src/gui/pieList.vala:459
+#: ../../src/gui/pieList.vala:483
msgid "Delete"
msgstr ""
-#: ../../src/gui/pieList.vala:574
+#: ../../src/gui/pieList.vala:619
msgid "New Pie"
msgstr ""
-#: ../../src/gui/pieList.vala:620
+#: ../../src/gui/pieList.vala:666
msgid "New Action"
msgstr ""
-#: ../../src/gui/pieList.vala:634
+#: ../../src/gui/pieList.vala:680
msgid "You have to select a Pie to add a Slice to!"
msgstr ""
-#: ../../src/gui/pieList.vala:683
+#: ../../src/gui/pieList.vala:730
msgid "You have to select a Pie or a Slice to delete!"
msgstr ""
-#: ../../src/gui/pieList.vala:694
+#: ../../src/gui/pieList.vala:741
msgid ""
"Do you really want to delete the selected Pie with all contained Slices?"
msgstr ""
-#: ../../src/gui/pieList.vala:728
+#: ../../src/gui/pieList.vala:775
msgid "Do you really want to delete the selected Slice?"
msgstr ""
-#: ../../src/gui/themeList.vala:88
-msgid "by"
-msgstr ""
-
-#: ../../src/gui/iconSelectWindow.vala:91
+#: ../../src/gui/iconSelectWindow.vala:160
msgid "Choose an Icon"
msgstr ""
-#: ../../src/gui/iconSelectWindow.vala:118
+#: ../../src/gui/iconSelectWindow.vala:196
msgid "All icons"
msgstr ""
-#: ../../src/gui/iconSelectWindow.vala:120
+#: ../../src/gui/iconSelectWindow.vala:197
+#: ../../src/pies/defaultConfig.vala:36
+msgid "Applications"
+msgstr ""
+
+#: ../../src/gui/iconSelectWindow.vala:198
msgid "Actions"
msgstr ""
-#: ../../src/gui/iconSelectWindow.vala:121
+#: ../../src/gui/iconSelectWindow.vala:199
msgid "Places"
msgstr ""
-#: ../../src/gui/iconSelectWindow.vala:122
+#: ../../src/gui/iconSelectWindow.vala:200
msgid "File types"
msgstr ""
-#: ../../src/gui/iconSelectWindow.vala:123
+#: ../../src/gui/iconSelectWindow.vala:201
msgid "Emotes"
msgstr ""
-#: ../../src/gui/iconSelectWindow.vala:124
+#: ../../src/gui/iconSelectWindow.vala:202
msgid "Miscellaneous"
msgstr ""
-#: ../../src/gui/iconSelectWindow.vala:192
+#: ../../src/gui/iconSelectWindow.vala:279
msgid "Icon Theme"
msgstr ""
-#: ../../src/gui/iconSelectWindow.vala:200
+#: ../../src/gui/iconSelectWindow.vala:289
msgid "All supported image formats"
msgstr ""
-#: ../../src/gui/iconSelectWindow.vala:217
+#: ../../src/gui/iconSelectWindow.vala:311
msgid "Custom Icon"
msgstr ""
-#: ../../src/actionGroups/devicesGroup.vala:34
-msgid "Devices"
+#: ../../src/actionGroups/windowListGroup.vala:33
+msgid "Window List"
msgstr ""
-#: ../../src/actionGroups/devicesGroup.vala:82
-msgid "Root"
+#: ../../src/actionGroups/menuGroup.vala:34
+msgid "Main menu"
+msgstr ""
+
+#: ../../src/actionGroups/clipboardGroup.vala:63
+msgid "Clipboard"
msgstr ""
#: ../../src/actionGroups/sessionGroup.vala:34
@@ -348,10 +335,91 @@ msgstr ""
msgid "Reboot"
msgstr ""
-#: ../../src/actionGroups/menuGroup.vala:33
-msgid "Main menu"
+#: ../../src/actionGroups/bookmarkGroup.vala:35
+#: ../../src/pies/defaultConfig.vala:45
+msgid "Bookmarks"
msgstr ""
-#: ../../src/actionGroups/clipboardGroup.vala:62
-msgid "Clipboard"
+#: ../../src/actionGroups/devicesGroup.vala:34
+msgid "Devices"
+msgstr ""
+
+#: ../../src/actionGroups/devicesGroup.vala:82
+msgid "Root"
+msgstr ""
+
+#: ../../src/utilities/trigger.vala:152
+msgid "Button %i"
+msgstr ""
+
+#: ../../src/utilities/trigger.vala:155
+msgid "LeftButton"
+msgstr ""
+
+#: ../../src/utilities/trigger.vala:157
+msgid "RightButton"
+msgstr ""
+
+#: ../../src/utilities/trigger.vala:159
+msgid "MiddleButton"
+msgstr ""
+
+#: ../../src/utilities/trigger.vala:181 ../../src/utilities/trigger.vala:183
+msgid "Turbo"
+msgstr ""
+
+#: ../../src/utilities/trigger.vala:181 ../../src/utilities/trigger.vala:185
+msgid "Delayed"
+msgstr ""
+
+#: ../../src/pies/defaultConfig.vala:29
+msgid "Multimedia"
+msgstr ""
+
+#: ../../src/pies/defaultConfig.vala:30
+msgid "Next Track"
+msgstr ""
+
+#: ../../src/pies/defaultConfig.vala:31
+msgid "Stop"
+msgstr ""
+
+#: ../../src/pies/defaultConfig.vala:32
+msgid "Previous Track"
+msgstr ""
+
+#: ../../src/pies/defaultConfig.vala:33
+msgid "Play/Pause"
+msgstr ""
+
+#: ../../src/pies/defaultConfig.vala:50
+msgid "Session"
+msgstr ""
+
+#: ../../src/pies/defaultConfig.vala:54
+msgid "Main Menu"
+msgstr ""
+
+#: ../../src/pies/defaultConfig.vala:58
+msgid "Window"
+msgstr ""
+
+#: ../../src/pies/defaultConfig.vala:59
+msgid "Scale"
+msgstr ""
+
+#: ../../src/pies/defaultConfig.vala:60
+msgid "Minimize"
+msgstr ""
+
+#: ../../src/pies/defaultConfig.vala:61
+msgid "Close"
+msgstr ""
+
+#: ../../src/pies/defaultConfig.vala:62
+msgid "Maximize"
+msgstr ""
+
+#: ../../src/pies/defaultConfig.vala:63
+msgid "Restore"
msgstr ""
diff --git a/resources/locale/it/LC_MESSAGES/gnomepie.mo b/resources/locale/it/LC_MESSAGES/gnomepie.mo
new file mode 100644
index 0000000..d540e35
--- /dev/null
+++ b/resources/locale/it/LC_MESSAGES/gnomepie.mo
Binary files differ
diff --git a/resources/locale/it/LC_MESSAGES/it.po b/resources/locale/it/LC_MESSAGES/it.po
new file mode 100644
index 0000000..ab808e8
--- /dev/null
+++ b/resources/locale/it/LC_MESSAGES/it.po
@@ -0,0 +1,424 @@
+# Italian translations for gnomepie package.
+# Copyright (C) 2011 Simon Schneegans <simon.schneegans@uni-weimar.de>
+# This file is distributed under the same license as the gnomepie package.
+# Riccardo Traverso <gr3yfox.fw@gmail.com>, 2011.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: gnomepie 0.1\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2011-11-09 11:01+0100\n"
+"PO-Revision-Date: 2011-11-09 12:52+0100\n"
+"Last-Translator: Riccardo Traverso <gr3yfox.fw@gmail.com>\n"
+"Language-Team: Italian\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"
+"X-Poedit-Language: Italian\n"
+
+#: ../../src/pies/defaultConfig.vala:29
+msgid "Multimedia"
+msgstr "Multimedia"
+
+#: ../../src/pies/defaultConfig.vala:30
+msgid "Next Track"
+msgstr "Traccia Successiva"
+
+#: ../../src/pies/defaultConfig.vala:31
+msgid "Stop"
+msgstr "Ferma"
+
+#: ../../src/pies/defaultConfig.vala:32
+msgid "Previous Track"
+msgstr "Traccia Precedente"
+
+#: ../../src/pies/defaultConfig.vala:33
+msgid "Play/Pause"
+msgstr "Riproduci/Pausa"
+
+#: ../../src/pies/defaultConfig.vala:36
+#: ../../src/gui/iconSelectWindow.vala:197
+msgid "Applications"
+msgstr "Applicazioni"
+
+#: ../../src/pies/defaultConfig.vala:45
+#: ../../src/actionGroups/bookmarkGroup.vala:35
+msgid "Bookmarks"
+msgstr "Segnalibri"
+
+#: ../../src/pies/defaultConfig.vala:50
+msgid "Session"
+msgstr "Sessione"
+
+#: ../../src/pies/defaultConfig.vala:54
+msgid "Main Menu"
+msgstr "Menu principale"
+
+#: ../../src/pies/defaultConfig.vala:58
+msgid "Window"
+msgstr "Finestra"
+
+#: ../../src/pies/defaultConfig.vala:59
+msgid "Scale"
+msgstr "Scala"
+
+#: ../../src/pies/defaultConfig.vala:60
+msgid "Minimize"
+msgstr "Minimizza"
+
+#: ../../src/pies/defaultConfig.vala:61
+msgid "Close"
+msgstr "Chiudi"
+
+#: ../../src/pies/defaultConfig.vala:62
+msgid "Maximize"
+msgstr "Massimizza"
+
+#: ../../src/pies/defaultConfig.vala:63
+msgid "Restore"
+msgstr "Ripristina"
+
+#: ../../src/actions/keyAction.vala:33
+msgid "Press hotkey"
+msgstr "Pressione di tasti"
+
+#: ../../src/actions/pieAction.vala:33
+msgid "Open Pie"
+msgstr "Apri una Torta"
+
+#: ../../src/actions/appAction.vala:33
+msgid "Launch application"
+msgstr "Lancia applicazione"
+
+#: ../../src/actions/actionRegistry.vala:107
+msgid "Trash"
+msgstr "Cestino"
+
+#: ../../src/actions/uriAction.vala:33
+msgid "Open URI"
+msgstr "Apri URI"
+
+#: ../../src/actionGroups/clipboardGroup.vala:63
+msgid "Clipboard"
+msgstr "Appunti"
+
+#: ../../src/actionGroups/devicesGroup.vala:34
+msgid "Devices"
+msgstr "Dispositivi"
+
+#: ../../src/actionGroups/devicesGroup.vala:82
+msgid "Root"
+msgstr "Root"
+
+#: ../../src/actionGroups/windowListGroup.vala:33
+msgid "Window List"
+msgstr "Elenco delle finestre"
+
+#: ../../src/actionGroups/menuGroup.vala:34
+msgid "Main menu"
+msgstr "Menu principale"
+
+#: ../../src/actionGroups/sessionGroup.vala:34
+msgid "Session Control"
+msgstr "Controllo della sessione"
+
+#: ../../src/actionGroups/sessionGroup.vala:52
+msgid "Shutdown"
+msgstr "Spegnimento"
+
+#: ../../src/actionGroups/sessionGroup.vala:55
+msgid "Logout"
+msgstr "Chiudi sessione"
+
+#: ../../src/actionGroups/sessionGroup.vala:58
+msgid "Reboot"
+msgstr "Riavvio"
+
+#: ../../src/gui/iconSelectWindow.vala:160
+msgid "Choose an Icon"
+msgstr "Scegli un'icona"
+
+#: ../../src/gui/iconSelectWindow.vala:196
+msgid "All icons"
+msgstr "Tutte le icone"
+
+#: ../../src/gui/iconSelectWindow.vala:198
+msgid "Actions"
+msgstr "Azioni"
+
+#: ../../src/gui/iconSelectWindow.vala:199
+msgid "Places"
+msgstr "Luoghi"
+
+#: ../../src/gui/iconSelectWindow.vala:200
+msgid "File types"
+msgstr "Tipi di file"
+
+#: ../../src/gui/iconSelectWindow.vala:201
+msgid "Emotes"
+msgstr ""
+
+#: ../../src/gui/iconSelectWindow.vala:202
+msgid "Miscellaneous"
+msgstr "Varie"
+
+#: ../../src/gui/iconSelectWindow.vala:279
+msgid "Icon Theme"
+msgstr "Tema di icone"
+
+#: ../../src/gui/iconSelectWindow.vala:289
+msgid "All supported image formats"
+msgstr "Tutti i formati immagine supportati"
+
+#: ../../src/gui/iconSelectWindow.vala:311
+msgid "Custom Icon"
+msgstr "Icona personalizzata"
+
+#: ../../src/gui/triggerSelectWindow.vala:69
+msgid "Define an open-command"
+msgstr "Definisci un comando di apertura"
+
+#: ../../src/gui/triggerSelectWindow.vala:87
+msgid "Click here if you want to bind a mouse button!"
+msgstr "Per assegnare un tasto del mouse clicca qui!"
+
+#: ../../src/gui/triggerSelectWindow.vala:102
+msgid "Turbo mode"
+msgstr "Modalità turbo"
+
+#: ../../src/gui/triggerSelectWindow.vala:103
+msgid "If checked, the Pie will close when you release the chosen hot key."
+msgstr "Se selezionato, la Torta si chiuderà al rilascio della combinazione di tasti assegnata."
+
+#: ../../src/gui/triggerSelectWindow.vala:117
+msgid "Long press for activation"
+msgstr "Pressione prolungata per l'attivazione"
+
+#: ../../src/gui/triggerSelectWindow.vala:118
+msgid "If checked, the Pie will only open if you press this hot key a bit longer."
+msgstr "Se selezionato, la Torta si aprirà soltanto se si preme la combinazione di tasti un po' più a lungo."
+
+#: ../../src/gui/triggerSelectWindow.vala:158
+msgid ""
+"This hotkey is already assigned to the pie \"%s\"! \n"
+"\n"
+"Please select another one or cancel your selection."
+msgstr ""
+"Questa combinazione di tasti è stata già assegnata alla Torta \"%s\"! \n"
+"\n"
+"Selezionane un'altra oppure annulla la tua selezione per favore."
+
+#: ../../src/gui/triggerSelectWindow.vala:199
+msgid "It possible to make your system unusable if you bind a Pie to your left mouse button. Do you really want to do this?"
+msgstr "E' possibile rendere il tuo sistema inutilizzabile se assegni alla Torta il tasto sinistro del mouse. Vuoi davvero procedere?"
+
+#: ../../src/gui/themeList.vala:88
+msgid "by"
+msgstr "di"
+
+#: ../../src/gui/pieList.vala:88
+#: ../../src/gui/pieList.vala:851
+msgid "Slice group"
+msgstr "Gruppo di Fette"
+
+#: ../../src/gui/pieList.vala:135
+msgid "Icon"
+msgstr "Icona"
+
+#: ../../src/gui/pieList.vala:200
+msgid "Command"
+msgstr "Comando"
+
+#: ../../src/gui/pieList.vala:301
+#: ../../src/gui/pieList.vala:707
+#: ../../src/gui/pieList.vala:867
+#: ../../src/utilities/bindingManager.vala:156
+#: ../../src/utilities/trigger.vala:197
+#: ../../src/utilities/trigger.vala:198
+msgid "Not bound"
+msgstr "Non assegnato"
+
+#: ../../src/gui/pieList.vala:366
+msgid "Pie-ID / Action type"
+msgstr "ID Torta / Tipo di azione"
+
+#: ../../src/gui/pieList.vala:427
+msgid "Name"
+msgstr "Nome"
+
+#: ../../src/gui/pieList.vala:470
+msgid "Add new Pie"
+msgstr "Aggiungi nuova Torta"
+
+#: ../../src/gui/pieList.vala:475
+msgid "Add new Slice"
+msgstr "Aggiungi nuova Fetta"
+
+#: ../../src/gui/pieList.vala:483
+msgid "Delete"
+msgstr "Elimina"
+
+#: ../../src/gui/pieList.vala:619
+msgid "New Pie"
+msgstr "Nuova Torta"
+
+#: ../../src/gui/pieList.vala:666
+msgid "New Action"
+msgstr "Nuova Azione"
+
+#: ../../src/gui/pieList.vala:680
+msgid "You have to select a Pie to add a Slice to!"
+msgstr "Devi selezionare una Torta alla quale aggiungere una Fetta!"
+
+#: ../../src/gui/pieList.vala:730
+msgid "You have to select a Pie or a Slice to delete!"
+msgstr "Devi selezionare una Torta o una Fetta da eliminare!"
+
+#: ../../src/gui/pieList.vala:741
+msgid "Do you really want to delete the selected Pie with all contained Slices?"
+msgstr "Vuoi davvero eliminare la Torta selezionata e tutte le Fette che contiene?"
+
+#: ../../src/gui/pieList.vala:775
+msgid "Do you really want to delete the selected Slice?"
+msgstr "Vuoi davvero eliminare la Fetta selezionata?"
+
+#: ../../src/gui/preferences.vala:32
+msgid "Gnome-Pie - Settings"
+msgstr "Gnome-Pie - Impostazioni"
+
+#: ../../src/gui/preferences.vala:55
+msgid "Behavior"
+msgstr "Comportamento"
+
+#: ../../src/gui/preferences.vala:65
+msgid "Startup on Login"
+msgstr "Avvia al Login"
+
+#: ../../src/gui/preferences.vala:66
+msgid "If checked, Gnome-Pie will start when you log in."
+msgstr "Se selezionato, Gnome-Pie si avvierà all'accesso."
+
+#: ../../src/gui/preferences.vala:72
+msgid "Show Indicator"
+msgstr "Mostra indicatore"
+
+#: ../../src/gui/preferences.vala:73
+msgid "If checked, an indicator for easy access of the settings menu is shown in your panel."
+msgstr "Se selezionato, il pannello di sistema mostrerà un indicatore per l'accesso rapido al menu di configurazione."
+
+#: ../../src/gui/preferences.vala:79
+msgid "Open Pies at Mouse"
+msgstr "Apri Torte dal cursore"
+
+#: ../../src/gui/preferences.vala:80
+msgid "If checked, pies will open at your pointer. Otherwise they'll pop up in the middle of the screen."
+msgstr "Se selezionato le Torte si apriranno dal cursore, altrimenti compariranno al centro dello schermo."
+
+#: ../../src/gui/preferences.vala:89
+msgid "Global Scale"
+msgstr "Scala globale"
+
+#: ../../src/gui/preferences.vala:126
+msgid "Themes"
+msgstr "Temi"
+
+#: ../../src/gui/preferences.vala:144
+msgid "General"
+msgstr "Generale"
+
+#: ../../src/gui/preferences.vala:149
+msgid "Pies"
+msgstr "Torte"
+
+#: ../../src/gui/preferences.vala:173
+msgid "You can right-click in the list for adding or removing entries."
+msgstr "Puoi cliccare col tasto destro sulla lista per aggiungere o rimuovere voci."
+
+#: ../../src/gui/preferences.vala:174
+msgid "You can reset Gnome-Pie to its default options with the terminal command \"gnome-pie --reset\"."
+msgstr "Puoi resettare Gnome-Pie alla configurazione predefinita con il comando da terminale \"gnome-pie --reset\"."
+
+#: ../../src/gui/preferences.vala:175
+msgid "The radiobutton at the beginning of each slice-line indicates the QuickAction of the pie."
+msgstr "Il pulsante di selezione all'inizio di ciascuna riga-fetta indica l'azione veloce (QuickAction) della Torta."
+
+#: ../../src/gui/preferences.vala:176
+msgid "Pies can be opened with the terminal command \"gnome-pie --open=ID\"."
+msgstr "Le Torte possono essere aperte col comando da terminale \"gnome-pie --open=ID\"."
+
+#: ../../src/gui/preferences.vala:177
+msgid "Feel free to visit Gnome-Pie's homepage at %s!"
+msgstr "Sentiti libero di visitare la homepage di Gnome-Pie all'indirizzo %s!"
+
+#: ../../src/gui/preferences.vala:178
+msgid "You can drag'n'drop applications from your main menu to the list above."
+msgstr "Puoi trascinare applicazioni nella lista sovrastante dal tuo menu principale."
+
+#: ../../src/gui/preferences.vala:179
+msgid "If you want to give some feedback, please write an e-mail to %s!"
+msgstr "Se vuoi inviarci dei feedback, per favore scrivi una e-mail a %s!"
+
+#: ../../src/gui/preferences.vala:180
+msgid "You may drag'n'drop URLs and bookmarks from your internet browser to the list above."
+msgstr "Puoi trascinare URLs e segnalibri nella lista sovrastante dal tuo internet browser."
+
+#: ../../src/gui/preferences.vala:181
+msgid "Bugs can be reported at %s!"
+msgstr "I bug possono essere segnalati su %s!"
+
+#: ../../src/gui/preferences.vala:182
+msgid "It's possible to drag'n'drop files and folders from your file browser to the list above."
+msgstr "E' possibile trascinare file e cartelle nella lista sovrastante dal tuo file browser."
+
+#: ../../src/gui/preferences.vala:183
+msgid "It's recommended to keep your Pies small (at most 6-8 Slices). Else they will become hard to navigate."
+msgstr "E' consigliabile mantenere le tue Torte piccole (al più 6-8 Fette), altrimenti diventeranno difficili da navigare."
+
+#: ../../src/gui/preferences.vala:184
+msgid "In order to create a launcher for a Pie, drag the Pie from the list to your desktop!"
+msgstr "Per creare un avviatore per una Torta, trascina la torta dalla lista al tuo dekstop!"
+
+#: ../../src/gui/preferences.vala:193
+msgid "Moves the selected Slice down"
+msgstr "Sposta in basso la Fetta selezionata"
+
+#: ../../src/gui/preferences.vala:205
+msgid "Moves the selected Slice up"
+msgstr "Sposta in alto la Fetta selezionata"
+
+#: ../../src/utilities/trigger.vala:152
+msgid "Button %i"
+msgstr "Tasto %i"
+
+#: ../../src/utilities/trigger.vala:155
+msgid "LeftButton"
+msgstr "Tasto sinistro"
+
+#: ../../src/utilities/trigger.vala:157
+msgid "RightButton"
+msgstr "Tasto destro"
+
+#: ../../src/utilities/trigger.vala:159
+msgid "MiddleButton"
+msgstr "Tasto centrale"
+
+#: ../../src/utilities/trigger.vala:181
+#: ../../src/utilities/trigger.vala:183
+msgid "Turbo"
+msgstr "Turbo"
+
+#: ../../src/utilities/trigger.vala:181
+#: ../../src/utilities/trigger.vala:185
+msgid "Delayed"
+msgstr "Ritardato"
+
+#~ msgid ""
+#~ "If checked, the pie closes when its keystroke is released. The currently "
+#~ "hovered slice gets executed. This allows very fast selection but disables "
+#~ "keyboard navigating."
+#~ msgstr ""
+#~ "Se selezionata, la Torta si chiude appena si rilascia la combinazione di "
+#~ "tasti. La Fetta attualmente selezionata viene eseguita. Questo consente "
+#~ "una selezione molto rapida, ma disabilita la navigazione da tastiera."
diff --git a/resources/locale/ko/LC_MESSAGES/gnomepie.mo b/resources/locale/ko/LC_MESSAGES/gnomepie.mo
new file mode 100644
index 0000000..bd300bf
--- /dev/null
+++ b/resources/locale/ko/LC_MESSAGES/gnomepie.mo
Binary files differ
diff --git a/resources/locale/ko/LC_MESSAGES/ko.po b/resources/locale/ko/LC_MESSAGES/ko.po
new file mode 100644
index 0000000..54c27e3
--- /dev/null
+++ b/resources/locale/ko/LC_MESSAGES/ko.po
@@ -0,0 +1,415 @@
+# Korean translations for gnomepie package.
+# Copyright (C) 2011 Simon Schneegans <code@simonschneegans.de>
+# This file is distributed under the same license as the gnomepie package.
+# 김보람 <boramism@gmail.com>, 2011.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: gnomepie 0.2\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2011-11-15 02:49+0900\n"
+"PO-Revision-Date: 2011-11-15 03:15+0900\n"
+"Last-Translator: Kim Boram <Boramism@gmail.com>\n"
+"Language-Team: Korean\n"
+"Language: ko\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"
+
+#: ../../src/actions/actionRegistry.vala:107
+msgid "Trash"
+msgstr "휴지통"
+
+#: ../../src/actions/keyAction.vala:33
+msgid "Press hotkey"
+msgstr "단축키를 누르세요"
+
+#: ../../src/actions/appAction.vala:33
+msgid "Launch application"
+msgstr "프로그램 실행"
+
+#: ../../src/actions/pieAction.vala:33
+msgid "Open Pie"
+msgstr "파이 열기"
+
+#: ../../src/actions/uriAction.vala:33
+msgid "Open URI"
+msgstr "주소 열기"
+
+#: ../../src/pies/defaultConfig.vala:29
+msgid "Multimedia"
+msgstr "멀티미디어"
+
+#: ../../src/pies/defaultConfig.vala:30
+msgid "Next Track"
+msgstr "다음 트랙"
+
+#: ../../src/pies/defaultConfig.vala:31
+msgid "Stop"
+msgstr "정지"
+
+#: ../../src/pies/defaultConfig.vala:32
+msgid "Previous Track"
+msgstr "이전 트랙"
+
+#: ../../src/pies/defaultConfig.vala:33
+msgid "Play/Pause"
+msgstr "재생/일시 정지"
+
+#: ../../src/pies/defaultConfig.vala:36
+#: ../../src/gui/iconSelectWindow.vala:197
+msgid "Applications"
+msgstr "프로그램"
+
+#: ../../src/pies/defaultConfig.vala:45
+#: ../../src/actionGroups/bookmarkGroup.vala:35
+msgid "Bookmarks"
+msgstr "책갈피"
+
+#: ../../src/pies/defaultConfig.vala:50
+msgid "Session"
+msgstr "세션"
+
+#: ../../src/pies/defaultConfig.vala:54
+msgid "Main Menu"
+msgstr "주 메뉴"
+
+#: ../../src/pies/defaultConfig.vala:58
+msgid "Window"
+msgstr "창"
+
+#: ../../src/pies/defaultConfig.vala:59
+msgid "Scale"
+msgstr "크기 조정"
+
+#: ../../src/pies/defaultConfig.vala:60
+msgid "Minimize"
+msgstr "최소화"
+
+#: ../../src/pies/defaultConfig.vala:61
+msgid "Close"
+msgstr "닫기"
+
+#: ../../src/pies/defaultConfig.vala:62
+msgid "Maximize"
+msgstr "최대화"
+
+#: ../../src/pies/defaultConfig.vala:63
+msgid "Restore"
+msgstr "복구"
+
+#: ../../src/gui/iconSelectWindow.vala:160
+msgid "Choose an Icon"
+msgstr "아이콘 선택"
+
+#: ../../src/gui/iconSelectWindow.vala:196
+msgid "All icons"
+msgstr "모든 아이콘"
+
+#: ../../src/gui/iconSelectWindow.vala:198
+msgid "Actions"
+msgstr "동작"
+
+#: ../../src/gui/iconSelectWindow.vala:199
+msgid "Places"
+msgstr "위치"
+
+#: ../../src/gui/iconSelectWindow.vala:200
+msgid "File types"
+msgstr "파일 형식"
+
+#: ../../src/gui/iconSelectWindow.vala:201
+msgid "Emotes"
+msgstr "감정"
+
+#: ../../src/gui/iconSelectWindow.vala:202
+msgid "Miscellaneous"
+msgstr "기타"
+
+#: ../../src/gui/iconSelectWindow.vala:279
+msgid "Icon Theme"
+msgstr "아이콘 테마"
+
+#: ../../src/gui/iconSelectWindow.vala:289
+msgid "All supported image formats"
+msgstr "지원하는 모든 이미지 형식"
+
+#: ../../src/gui/iconSelectWindow.vala:311
+msgid "Custom Icon"
+msgstr "사용자 설정 아이콘"
+
+#: ../../src/gui/preferences.vala:32
+msgid "Gnome-Pie - Settings"
+msgstr "그놈 파이 설정"
+
+#: ../../src/gui/preferences.vala:55
+msgid "Behavior"
+msgstr "행동"
+
+#: ../../src/gui/preferences.vala:65
+msgid "Startup on Login"
+msgstr "로그인할 때 시작"
+
+#: ../../src/gui/preferences.vala:66
+msgid "If checked, Gnome-Pie will start when you log in."
+msgstr "선택하면 그놈 파이가 로그인할 때 자동으로 시작합니다."
+
+#: ../../src/gui/preferences.vala:72
+msgid "Show Indicator"
+msgstr "알리미 보이기"
+
+#: ../../src/gui/preferences.vala:73
+msgid "If checked, an indicator for easy access of the settings menu is shown in your panel."
+msgstr "선택하면 설정 메뉴에 쉽게 접근할 수 있도록 패널에 알리미를 표시합니다."
+
+#: ../../src/gui/preferences.vala:79
+msgid "Open Pies at Mouse"
+msgstr "마우스로 파이 열기"
+
+#: ../../src/gui/preferences.vala:80
+msgid "If checked, pies will open at your pointer. Otherwise they'll pop up in the middle of the screen."
+msgstr "선택하면 포인터가 있는 곳에 파이가 열립니다. 그렇지 않으면 화면의 가운데에 나타납니다."
+
+#: ../../src/gui/preferences.vala:89
+msgid "Global Scale"
+msgstr "전체 크기 조정"
+
+#: ../../src/gui/preferences.vala:126
+msgid "Themes"
+msgstr "테마"
+
+#: ../../src/gui/preferences.vala:144
+msgid "General"
+msgstr "일반"
+
+#: ../../src/gui/preferences.vala:149
+msgid "Pies"
+msgstr "파이"
+
+#: ../../src/gui/preferences.vala:173
+msgid "You can right-click in the list for adding or removing entries."
+msgstr "항목을 추가 또는 제거하려면 목록에서 오른쪽 단추를 누르세요."
+
+#: ../../src/gui/preferences.vala:174
+msgid "You can reset Gnome-Pie to its default options with the terminal command \"gnome-pie --reset\"."
+msgstr "터미널에서 \"gnome-pie --reset\" 명령을 입혁하면 그놈 파이를 기본 설정으로 되돌릴 수 있습니다."
+
+#: ../../src/gui/preferences.vala:175
+msgid "The radiobutton at the beginning of each slice-line indicates the QuickAction of the pie."
+msgstr "각 조각 선의 시작 지점에 있는 선택 단추는 파이의 빠른 동작을 의미합니다."
+
+#: ../../src/gui/preferences.vala:176
+msgid "Pies can be opened with the terminal command \"gnome-pie --open=ID\"."
+msgstr "터미널에서 \"gnome-pie --open=ID\" 명령을 입력하면 파이를 열 수 있습니다."
+
+#: ../../src/gui/preferences.vala:177
+msgid "Feel free to visit Gnome-Pie's homepage at %s!"
+msgstr "편하게 그놈 파이 홈페이지 %s에 방문하십시오!"
+
+#: ../../src/gui/preferences.vala:178
+msgid "You can drag'n'drop applications from your main menu to the list above."
+msgstr "주 메뉴에서 위 목록으로 프로그램을 끌어 놓을 수 있습니다."
+
+#: ../../src/gui/preferences.vala:179
+msgid "If you want to give some feedback, please write an e-mail to %s!"
+msgstr "파드백을 주시려면 주소 %s(으)로 전자 메일을 써주십시오."
+
+#: ../../src/gui/preferences.vala:180
+msgid "You may drag'n'drop URLs and bookmarks from your internet browser to the list above."
+msgstr "인터넷 브라우저에서 위 목록으로 인터넷 주소와 책갈피를 끌어 놓을 수 있습니다."
+
+#: ../../src/gui/preferences.vala:181
+msgid "Bugs can be reported at %s!"
+msgstr "버그는 %s에서 보고할 수 있습니다!"
+
+#: ../../src/gui/preferences.vala:182
+msgid "It's possible to drag'n'drop files and folders from your file browser to the list above."
+msgstr "파일 관리자에서 위 목록으로 파일과 폴더를 끌어 놓을 수 있습니다."
+
+#: ../../src/gui/preferences.vala:183
+msgid "It's recommended to keep your Pies small (at most 6-8 Slices). Else they will become hard to navigate."
+msgstr "파이를 작게 (최대 6-8 조각) 유지하십시오. 그렇지 않으면 찾기 힘들 수 있습니다."
+
+#: ../../src/gui/preferences.vala:184
+msgid "In order to create a launcher for a Pie, drag the Pie from the list to your desktop!"
+msgstr "파이 실행 아이콘을 만드려면 데스크톱 목록에서 파이로 끌어 놓으세요!"
+
+#: ../../src/gui/preferences.vala:193
+msgid "Moves the selected Slice down"
+msgstr "선택한 조각을 아래로 옮기기"
+
+#: ../../src/gui/preferences.vala:205
+msgid "Moves the selected Slice up"
+msgstr "선택한 조각을 위로 옮기기"
+
+#: ../../src/gui/triggerSelectWindow.vala:69
+msgid "Define an open-command"
+msgstr "열기 명령 정의"
+
+#: ../../src/gui/triggerSelectWindow.vala:87
+msgid "Click here if you want to bind a mouse button!"
+msgstr "마우스 단추를 묶으려면 클릭하십시오!"
+
+#: ../../src/gui/triggerSelectWindow.vala:102
+msgid "Turbo mode"
+msgstr "터보 모드"
+
+#: ../../src/gui/triggerSelectWindow.vala:103
+msgid "If checked, the Pie will close when you release the chosen hot key."
+msgstr "선택하면 누른 키보드 바로가기를 떼면 파이를 닫습니다."
+
+#: ../../src/gui/triggerSelectWindow.vala:117
+msgid "Long press for activation"
+msgstr "활성화 하려면 길게 누르세요"
+
+#: ../../src/gui/triggerSelectWindow.vala:118
+msgid "If checked, the Pie will only open if you press this hot key a bit longer."
+msgstr "선택하면 파이를 단축키를 길게 누를 때만 엽니다."
+
+#: ../../src/gui/triggerSelectWindow.vala:156
+msgid ""
+"This hotkey is already assigned to the pie \"%s\"! \n"
+"\n"
+"Please select another one or cancel your selection."
+msgstr ""
+"이 단축키는 이미 \"%s\" 파이에 할당했습니다!\n"
+"\n"
+"다른 것을 선택하거나 선택을 취소하십시오."
+
+#: ../../src/gui/triggerSelectWindow.vala:197
+msgid "It possible to make your system unusable if you bind a Pie to your left mouse button. Do you really want to do this?"
+msgstr "파이를 마우스 왼쪽 단추에 연결하면 시스템을 사용하지 못하게 될 수 있습니다. 정말 계속하시겠습니까?"
+
+#: ../../src/gui/themeList.vala:88
+msgid "by"
+msgstr "작성자"
+
+#: ../../src/gui/pieList.vala:88
+#: ../../src/gui/pieList.vala:851
+msgid "Slice group"
+msgstr "조각 그룹"
+
+#: ../../src/gui/pieList.vala:135
+msgid "Icon"
+msgstr "아이콘"
+
+#: ../../src/gui/pieList.vala:200
+msgid "Command"
+msgstr "명령"
+
+#: ../../src/gui/pieList.vala:301
+#: ../../src/gui/pieList.vala:707
+#: ../../src/gui/pieList.vala:867
+#: ../../src/utilities/trigger.vala:197
+#: ../../src/utilities/trigger.vala:198
+#: ../../src/utilities/bindingManager.vala:156
+msgid "Not bound"
+msgstr "연결하지 않음"
+
+#: ../../src/gui/pieList.vala:366
+msgid "Pie-ID / Action type"
+msgstr "파이 ID / 동작 형식"
+
+#: ../../src/gui/pieList.vala:427
+msgid "Name"
+msgstr "이름"
+
+#: ../../src/gui/pieList.vala:470
+msgid "Add new Pie"
+msgstr "새 파이 추가"
+
+#: ../../src/gui/pieList.vala:475
+msgid "Add new Slice"
+msgstr "새 조각 추가"
+
+#: ../../src/gui/pieList.vala:483
+msgid "Delete"
+msgstr "삭제"
+
+#: ../../src/gui/pieList.vala:619
+msgid "New Pie"
+msgstr "새 파이"
+
+#: ../../src/gui/pieList.vala:666
+msgid "New Action"
+msgstr "새 동작"
+
+#: ../../src/gui/pieList.vala:680
+msgid "You have to select a Pie to add a Slice to!"
+msgstr "조각을 추가할 파이를 선택해야 합니다!"
+
+#: ../../src/gui/pieList.vala:730
+msgid "You have to select a Pie or a Slice to delete!"
+msgstr "삭제하고 싶은 파이와 조각을 선택해야 합니다!"
+
+#: ../../src/gui/pieList.vala:741
+msgid "Do you really want to delete the selected Pie with all contained Slices?"
+msgstr "선택한 파이와 파이 안의 모든 조각을 삭제하시겠습니까?"
+
+#: ../../src/gui/pieList.vala:775
+msgid "Do you really want to delete the selected Slice?"
+msgstr "정말 선택한 조각을 삭제하시겠습니까?"
+
+#: ../../src/utilities/trigger.vala:152
+msgid "Button %i"
+msgstr "%i 단추"
+
+#: ../../src/utilities/trigger.vala:155
+msgid "LeftButton"
+msgstr "왼쪽 단추"
+
+#: ../../src/utilities/trigger.vala:157
+msgid "RightButton"
+msgstr "오른쪽 단추"
+
+#: ../../src/utilities/trigger.vala:159
+msgid "MiddleButton"
+msgstr "가운데 단추"
+
+#: ../../src/utilities/trigger.vala:181
+#: ../../src/utilities/trigger.vala:183
+msgid "Turbo"
+msgstr "터보"
+
+#: ../../src/utilities/trigger.vala:181
+#: ../../src/utilities/trigger.vala:185
+msgid "Delayed"
+msgstr "시간 지연"
+
+#: ../../src/actionGroups/clipboardGroup.vala:63
+msgid "Clipboard"
+msgstr "클립보드"
+
+#: ../../src/actionGroups/sessionGroup.vala:34
+msgid "Session Control"
+msgstr "세션 컨트롤"
+
+#: ../../src/actionGroups/sessionGroup.vala:57
+msgid "Shutdown"
+msgstr "시스템 끄기"
+
+#: ../../src/actionGroups/sessionGroup.vala:60
+msgid "Logout"
+msgstr "로그아웃"
+
+#: ../../src/actionGroups/sessionGroup.vala:63
+msgid "Reboot"
+msgstr "다시 시작"
+
+#: ../../src/actionGroups/devicesGroup.vala:34
+msgid "Devices"
+msgstr "장치"
+
+#: ../../src/actionGroups/devicesGroup.vala:82
+msgid "Root"
+msgstr "루트"
+
+#: ../../src/actionGroups/windowListGroup.vala:33
+msgid "Window List"
+msgstr "창 목록"
+
+#: ../../src/actionGroups/menuGroup.vala:34
+msgid "Main menu"
+msgstr "주 메뉴"
+
diff --git a/resources/locale/pt-br/LC_MESSAGES/gnomepie.mo b/resources/locale/pt-br/LC_MESSAGES/gnomepie.mo
index 7c0c5d9..6c1ad52 100644
--- a/resources/locale/pt-br/LC_MESSAGES/gnomepie.mo
+++ b/resources/locale/pt-br/LC_MESSAGES/gnomepie.mo
Binary files differ
diff --git a/resources/locale/pt-br/LC_MESSAGES/pt-br.mo b/resources/locale/pt-br/LC_MESSAGES/pt-br.mo
new file mode 100644
index 0000000..6c1ad52
--- /dev/null
+++ b/resources/locale/pt-br/LC_MESSAGES/pt-br.mo
Binary files differ
diff --git a/resources/locale/pt-br/LC_MESSAGES/pt-br.po b/resources/locale/pt-br/LC_MESSAGES/pt-br.po
index b192fc0..500c02a 100644
--- a/resources/locale/pt-br/LC_MESSAGES/pt-br.po
+++ b/resources/locale/pt-br/LC_MESSAGES/pt-br.po
@@ -7,42 +7,56 @@ msgid ""
msgstr ""
"Project-Id-Version: gnomepie 0.1\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2011-10-11 15:55-0300\n"
-"PO-Revision-Date: 2011-10-11 15:55-0300\n"
-"Last-Translator: Magnun Leno <magnun@codecommunity.org>\n"
+"POT-Creation-Date: 2011-11-08 21:10-0200\n"
+"PO-Revision-Date: 2011-11-08 21:49-0300\n"
+"Last-Translator: Magnun Leno da Silva <magnun@codecommunity.org>\n"
"Language-Team: Language pt-br\n"
-"Language: pt-br\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
+"Language: pt-br\n"
-#: ../../src/actions/keyAction.vala:33
-msgid "Press key stroke"
-msgstr "Pressione qualquer tecla"
+#: ../../src/gui/themeList.vala:88
+msgid "by"
+msgstr "por"
-#: ../../src/actions/pieAction.vala:33
-msgid "Open Pie"
-msgstr "Abrir menu"
+#: ../../src/gui/triggerSelectWindow.vala:69
+msgid "Define an open-command"
+msgstr "Definir um comando de abertura"
-#: ../../src/actions/appAction.vala:33
-msgid "Launch application"
-msgstr "Lançar aplicação"
+#: ../../src/gui/triggerSelectWindow.vala:87
+msgid "Click here if you want to bind a mouse button!"
+msgstr "Clique aqui para vincular um botão do mouse!"
-#: ../../src/actions/uriAction.vala:33
-msgid "Open URI"
-msgstr "Abrir URL"
+#: ../../src/gui/triggerSelectWindow.vala:102
+msgid "Turbo mode"
+msgstr "Modo Turbo"
-#: ../../src/actions/actionRegistry.vala:107
-msgid "Trash"
-msgstr "Remover"
+#: ../../src/gui/triggerSelectWindow.vala:103
+msgid "If checked, the Pie will close when you release the chosen hot key."
+msgstr "Se marcado, o Menu irá fechar quando o atalho for liberado."
-#: ../../src/pies/defaultConfig.vala:62
-msgid "Maximize"
-msgstr "Maximizar"
+#: ../../src/gui/triggerSelectWindow.vala:117
+msgid "Long press for activation"
+msgstr "Clique longo para ativação"
-#: ../../src/pies/defaultConfig.vala:63
-msgid "Restore"
+#: ../../src/gui/triggerSelectWindow.vala:118
+msgid "If checked, the Pie will only open if you press this hot key a bit longer."
+msgstr "Se marcador, o Menu irá abrir somente se você pressionar este atalho por mais um tempo."
+
+#: ../../src/gui/triggerSelectWindow.vala:158
+msgid ""
+"This hotkey is already assigned to the pie \"%s\"! \n"
+"\n"
+"Please select another one or cancel your selection."
msgstr ""
+"Este atalho já está vinculado no menu \"%s\"! \n"
+"\n"
+"Por favor escolha outro ou cancele sua seleção."
+
+#: ../../src/gui/triggerSelectWindow.vala:199
+msgid "It possible to make your system unusable if you bind a Pie to your left mouse button. Do you really want to do this?"
+msgstr "É possível tornar seu sistema inútil caso você vincule um Menu ao botão esquerdo do mouse. Você realmente quer fazer isso?"
#: ../../src/gui/preferences.vala:32
msgid "Gnome-Pie - Settings"
@@ -65,209 +79,238 @@ msgid "Show Indicator"
msgstr "Mostrar Indicador"
#: ../../src/gui/preferences.vala:73
-msgid ""
-"If checked, an indicator for easy access of the settings menu is shown in "
-"your panel."
-msgstr ""
-"Se marcado, um indicador para facilitar o acesso às configurações estará "
-"disponível em seu painel."
+msgid "If checked, an indicator for easy access of the settings menu is shown in your panel."
+msgstr "Se marcado, um indicador para facilitar o acesso às configurações estará disponível em seu painel."
#: ../../src/gui/preferences.vala:79
msgid "Open Pies at Mouse"
msgstr "Abrir Menus sobre o Mouse"
-#: ../../src/gui/preferences.vala:86
-msgid "Turbo mode"
-msgstr "Modo Turbo"
-
-#: ../../src/gui/preferences.vala:87
-msgid ""
-"If checked, the pie closes when its keystroke is released. The currently "
-"hovered slice gets executed. This allows very fast selection but disables "
-"keyboard navigating."
-msgstr ""
-"Se marcado, o menu se fechará quando a combinação de teclas for liberada. A opção que estiver "
-"sobre o cursor será executada. Essa opção possibilita uma uma seleção rápida mas desativa "
-"a navegação pelo teclado."
+#: ../../src/gui/preferences.vala:80
+msgid "If checked, pies will open at your pointer. Otherwise they'll pop up in the middle of the screen."
+msgstr "Se marcado, os menus não irão abrir sob o ponteiro. Ao invés disso eles abrirão no meio da sua tela."
-#: ../../src/gui/preferences.vala:96
+#: ../../src/gui/preferences.vala:89
msgid "Global Scale"
msgstr "Escalonamento Global"
-#: ../../src/gui/preferences.vala:133
+#: ../../src/gui/preferences.vala:126
msgid "Themes"
msgstr "Temas"
-#: ../../src/gui/preferences.vala:151
+#: ../../src/gui/preferences.vala:144
msgid "General"
msgstr "Geral"
-#: ../../src/gui/preferences.vala:156
+#: ../../src/gui/preferences.vala:149
msgid "Pies"
msgstr "Menus"
-#: ../../src/gui/preferences.vala:180
+#: ../../src/gui/preferences.vala:173
msgid "You can right-click in the list for adding or removing entries."
msgstr "Você pode clicar com o botão direito sobre a lista para adicioná-las ou removê-las."
-#: ../../src/gui/preferences.vala:181
-msgid ""
-"You can reset Gnome-Pie to its default options with the terminal command "
-"\"gnome-pie --reset\"."
-msgstr ""
-"Você pode voltar o Gnome-Pie para suas configurações padrão usando o comando de terminal "
-"\"gnome-pie --reset\"."
+#: ../../src/gui/preferences.vala:174
+msgid "You can reset Gnome-Pie to its default options with the terminal command \"gnome-pie --reset\"."
+msgstr "Você pode voltar o Gnome-Pie para suas configurações padrão usando o comando de terminal \"gnome-pie --reset\"."
-#: ../../src/gui/preferences.vala:182
-msgid ""
-"The radiobutton at the beginning of each slice-line indicates the "
-"QuickAction of the pie."
-msgstr ""
-"O botão de seleção no início de cada Opção indica a "
-"Ação Rápida vinculada ao Menu."
+#: ../../src/gui/preferences.vala:175
+msgid "The radiobutton at the beginning of each slice-line indicates the QuickAction of the pie."
+msgstr "O botão de seleção no início de cada Opção indica a Ação Rápida vinculada ao Menu."
-#: ../../src/gui/preferences.vala:183
+#: ../../src/gui/preferences.vala:176
msgid "Pies can be opened with the terminal command \"gnome-pie --open=ID\"."
msgstr "Menus podem ser abertos através do terminal com o comando \"gnome-pie --open=ID\"."
-#: ../../src/gui/preferences.vala:184
+#: ../../src/gui/preferences.vala:177
msgid "Feel free to visit Gnome-Pie's homepage at %s!"
msgstr "Sinta-se a vontade para visitar o site do Gnome-Pie em %s"
-#: ../../src/gui/preferences.vala:185
+#: ../../src/gui/preferences.vala:178
msgid "You can drag'n'drop applications from your main menu to the list above."
msgstr "Você pode arrastar aplicações do seu menu principal para a lista acima."
-#: ../../src/gui/preferences.vala:186
+#: ../../src/gui/preferences.vala:179
msgid "If you want to give some feedback, please write an e-mail to %s!"
msgstr "Se você quiser enviar algum feedback, por favor escreva um e-mail para %s!"
-#: ../../src/gui/preferences.vala:187
-msgid ""
-"You may drag'n'drop URLs and bookmarks from your internet browser to the "
-"list above."
-msgstr ""
-"Você pode arrastar URLs e Favoritos do seu navegador predileto para "
-"a lista acima."
+#: ../../src/gui/preferences.vala:180
+msgid "You may drag'n'drop URLs and bookmarks from your internet browser to the list above."
+msgstr "Você pode arrastar URLs e Favoritos do seu navegador predileto para a lista acima."
-#: ../../src/gui/preferences.vala:188
+#: ../../src/gui/preferences.vala:181
msgid "Bugs can be reported at %s!"
msgstr "Defeitos podem ser informados em %s!"
-#: ../../src/gui/preferences.vala:189
-msgid ""
-"It's possible to drag'n'drop files and folders from your file browser to the "
-"list above."
-msgstr ""
-"É possível arrastar arquivos e pastas do seu navegador para dentro da "
-"lista acima."
+#: ../../src/gui/preferences.vala:182
+msgid "It's possible to drag'n'drop files and folders from your file browser to the list above."
+msgstr "É possível arrastar arquivos e pastas do seu navegador para dentro da lista acima."
+
+#: ../../src/gui/preferences.vala:183
+msgid "It's recommended to keep your Pies small (at most 6-8 Slices). Else they will become hard to navigate."
+msgstr "É recomendado que você mantenha seus Menus pequenos (no máximo 6-8 Opções). Ou ele se tornará difícil de navegar."
+
+#: ../../src/gui/preferences.vala:184
+msgid "In order to create a launcher for a Pie, drag the Pie from the list to your desktop!"
+msgstr "Se deseja criar o lançador de um Menu, arraste o Menu da lista para o seu desktop!"
-#: ../../src/gui/preferences.vala:198
+#: ../../src/gui/preferences.vala:193
msgid "Moves the selected Slice down"
msgstr "Move a Opção selecionada para baixo"
-#: ../../src/gui/preferences.vala:210
+#: ../../src/gui/preferences.vala:205
msgid "Moves the selected Slice up"
msgstr "Move a Opção selecionada para cima"
-#: ../../src/gui/pieList.vala:88 ../../src/gui/pieList.vala:803
+#: ../../src/gui/pieList.vala:88
+#: ../../src/gui/pieList.vala:851
msgid "Slice group"
msgstr "Grupo de Opções"
-#: ../../src/gui/pieList.vala:134
+#: ../../src/gui/pieList.vala:135
msgid "Icon"
msgstr "Ícone"
-#: ../../src/gui/pieList.vala:199
+#: ../../src/gui/pieList.vala:200
msgid "Command"
msgstr "Comando"
-#: ../../src/gui/pieList.vala:343
+#: ../../src/gui/pieList.vala:301
+#: ../../src/gui/pieList.vala:707
+#: ../../src/gui/pieList.vala:867
+#: ../../src/utilities/trigger.vala:197
+#: ../../src/utilities/trigger.vala:198
+#: ../../src/utilities/bindingManager.vala:156
+msgid "Not bound"
+msgstr "Sem vinculações"
+
+#: ../../src/gui/pieList.vala:366
msgid "Pie-ID / Action type"
msgstr "ID-Opção / Tipo de Ação"
-#: ../../src/gui/pieList.vala:403
+#: ../../src/gui/pieList.vala:427
msgid "Name"
msgstr "Nome"
-#: ../../src/gui/pieList.vala:446
+#: ../../src/gui/pieList.vala:470
msgid "Add new Pie"
msgstr "Adicionar novo Menu"
-#: ../../src/gui/pieList.vala:451
+#: ../../src/gui/pieList.vala:475
msgid "Add new Slice"
msgstr "Adicionar nova Opção"
-#: ../../src/gui/pieList.vala:459
+#: ../../src/gui/pieList.vala:483
msgid "Delete"
msgstr "Deletar"
-#: ../../src/gui/pieList.vala:574
+#: ../../src/gui/pieList.vala:619
msgid "New Pie"
msgstr "Novo Menu"
-#: ../../src/gui/pieList.vala:620
+#: ../../src/gui/pieList.vala:666
msgid "New Action"
msgstr "Nova Ação"
-#: ../../src/gui/pieList.vala:634
+#: ../../src/gui/pieList.vala:680
msgid "You have to select a Pie to add a Slice to!"
msgstr "Você tem que selecionar um Menu para poder adicionar uma Opção"
-#: ../../src/gui/pieList.vala:683
+#: ../../src/gui/pieList.vala:730
msgid "You have to select a Pie or a Slice to delete!"
msgstr "Para remover você precisa selecionar um Menu ou uma Opção"
-#: ../../src/gui/pieList.vala:694
-msgid ""
-"Do you really want to delete the selected Pie with all contained Slices?"
-msgstr ""
-"Você realmente deseja excluir o Menu selecionado e todas as suas Opções?"
+#: ../../src/gui/pieList.vala:741
+msgid "Do you really want to delete the selected Pie with all contained Slices?"
+msgstr "Você realmente deseja excluir o Menu selecionado e todas as suas Opções?"
-#: ../../src/gui/pieList.vala:728
+#: ../../src/gui/pieList.vala:775
msgid "Do you really want to delete the selected Slice?"
msgstr "Você realmente deseja excluir a Opção selecionada?"
-#: ../../src/gui/iconSelectWindow.vala:91
+#: ../../src/gui/iconSelectWindow.vala:160
msgid "Choose an Icon"
msgstr "Escolha um Ícone"
-#: ../../src/gui/iconSelectWindow.vala:118
+#: ../../src/gui/iconSelectWindow.vala:196
msgid "All icons"
msgstr "Todos os ícones"
-#: ../../src/gui/iconSelectWindow.vala:120
+#: ../../src/gui/iconSelectWindow.vala:197
+#: ../../src/pies/defaultConfig.vala:36
+msgid "Applications"
+msgstr "Aplicações"
+
+#: ../../src/gui/iconSelectWindow.vala:198
msgid "Actions"
msgstr "Ações"
-#: ../../src/gui/iconSelectWindow.vala:121
+#: ../../src/gui/iconSelectWindow.vala:199
msgid "Places"
msgstr "Lugares"
-#: ../../src/gui/iconSelectWindow.vala:122
+#: ../../src/gui/iconSelectWindow.vala:200
msgid "File types"
msgstr "Tipos de arquivos"
-#: ../../src/gui/iconSelectWindow.vala:123
+#: ../../src/gui/iconSelectWindow.vala:201
msgid "Emotes"
msgstr "Emotes"
-#: ../../src/gui/iconSelectWindow.vala:124
+#: ../../src/gui/iconSelectWindow.vala:202
msgid "Miscellaneous"
msgstr "Diversos"
-#: ../../src/gui/iconSelectWindow.vala:192
+#: ../../src/gui/iconSelectWindow.vala:279
msgid "Icon Theme"
msgstr "Tema de Ícones"
-#: ../../src/gui/iconSelectWindow.vala:200
+#: ../../src/gui/iconSelectWindow.vala:289
msgid "All supported image formats"
msgstr "Todos os tipos de imagem suportados"
-#: ../../src/gui/iconSelectWindow.vala:217
+#: ../../src/gui/iconSelectWindow.vala:311
msgid "Custom Icon"
msgstr "Outros Ícones"
+#: ../../src/utilities/trigger.vala:152
+msgid "Button %i"
+msgstr "Botão %i"
+
+#: ../../src/utilities/trigger.vala:155
+msgid "LeftButton"
+msgstr "Botão Esquerdo"
+
+#: ../../src/utilities/trigger.vala:157
+msgid "RightButton"
+msgstr "Botão Direito"
+
+#: ../../src/utilities/trigger.vala:159
+msgid "MiddleButton"
+msgstr "Botão do Meio"
+
+#: ../../src/utilities/trigger.vala:181
+#: ../../src/utilities/trigger.vala:183
+msgid "Turbo"
+msgstr "Turbo"
+
+#: ../../src/utilities/trigger.vala:181
+#: ../../src/utilities/trigger.vala:185
+msgid "Delayed"
+msgstr "Atrasado"
+
+#: ../../src/actionGroups/clipboardGroup.vala:63
+msgid "Clipboard"
+msgstr "Clipboard"
+
+#: ../../src/actionGroups/menuGroup.vala:34
+msgid "Main menu"
+msgstr "Menu Principal"
+
+#: ../../src/actionGroups/windowListGroup.vala:33
+msgid "Window List"
+msgstr "Lista de Janelas"
+
#: ../../src/actionGroups/devicesGroup.vala:34
msgid "Devices"
msgstr "Dispositivos"
@@ -292,10 +335,89 @@ msgstr "Logout"
msgid "Reboot"
msgstr "Reboot"
-#: ../../src/actionGroups/menuGroup.vala:33
-msgid "Main menu"
+#: ../../src/actionGroups/bookmarkGroup.vala:35
+#: ../../src/pies/defaultConfig.vala:45
+msgid "Bookmarks"
+msgstr "Favoritos"
+
+#: ../../src/actions/pieAction.vala:33
+msgid "Open Pie"
+msgstr "Abrir menu"
+
+#: ../../src/actions/keyAction.vala:33
+msgid "Press hotkey"
+msgstr "Pressione a tecla de atalho"
+
+#: ../../src/actions/uriAction.vala:33
+msgid "Open URI"
+msgstr "Abrir URL"
+
+#: ../../src/actions/actionRegistry.vala:107
+msgid "Trash"
+msgstr "Remover"
+
+#: ../../src/actions/appAction.vala:33
+msgid "Launch application"
+msgstr "Lançar aplicação"
+
+#: ../../src/pies/defaultConfig.vala:29
+msgid "Multimedia"
+msgstr "Multimídia"
+
+#: ../../src/pies/defaultConfig.vala:30
+msgid "Next Track"
+msgstr "Próxima Faixa"
+
+#: ../../src/pies/defaultConfig.vala:31
+msgid "Stop"
+msgstr "Stop"
+
+#: ../../src/pies/defaultConfig.vala:32
+msgid "Previous Track"
+msgstr "Faixa Anterior"
+
+#: ../../src/pies/defaultConfig.vala:33
+msgid "Play/Pause"
+msgstr "Play/Pausa"
+
+#: ../../src/pies/defaultConfig.vala:50
+msgid "Session"
+msgstr "Sessão"
+
+#: ../../src/pies/defaultConfig.vala:54
+msgid "Main Menu"
msgstr "Menu Principal"
-#: ../../src/actionGroups/clipboardGroup.vala:62
-msgid "Clipboard"
-msgstr "Clipboard"
+#: ../../src/pies/defaultConfig.vala:58
+msgid "Window"
+msgstr "Janela"
+
+#: ../../src/pies/defaultConfig.vala:59
+msgid "Scale"
+msgstr "Redimensionar"
+
+#: ../../src/pies/defaultConfig.vala:60
+msgid "Minimize"
+msgstr "Minimizar"
+
+#: ../../src/pies/defaultConfig.vala:61
+msgid "Close"
+msgstr "Fechar"
+
+#: ../../src/pies/defaultConfig.vala:62
+msgid "Maximize"
+msgstr "Maximizar"
+
+#: ../../src/pies/defaultConfig.vala:63
+msgid "Restore"
+msgstr "Restaurar"
+
+#~ msgid ""
+#~ "If checked, the pie closes when its keystroke is released. The currently "
+#~ "hovered slice gets executed. This allows very fast selection but disables "
+#~ "keyboard navigating."
+#~ msgstr ""
+#~ "Se marcado, o menu se fechará quando a combinação de teclas for liberada. "
+#~ "A opção que estiver sobre o cursor será executada. Essa opção possibilita "
+#~ "uma uma seleção rápida mas desativa a navegação pelo teclado."
+
diff --git a/resources/locale/update-po.sh b/resources/locale/update-po.sh
new file mode 100755
index 0000000..15c15f5
--- /dev/null
+++ b/resources/locale/update-po.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+echo "Insert the locale which you want to update:";
+read locale;
+
+if [ "$locale" == "" ]
+then
+ echo "No locale inserted! Aborting...";
+ exit 1
+fi
+
+msgmerge -U $locale/LC_MESSAGES/$locale.po gnomepie.pot
diff --git a/resources/themes/adwaita/theme.xml b/resources/themes/adwaita/theme.xml
index 25b18ff..d238b68 100644
--- a/resources/themes/adwaita/theme.xml
+++ b/resources/themes/adwaita/theme.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
-<theme name="Adwaita" description="Made for the default theme of Gnome3" author="Simon Schneegans" email="josi.schneegans@vr-web.de">
+<theme name="Adwaita" description="Made for the default theme of Gnome3" author="Simon Schneegans" email="code@simonschneegans.de">
<pie radius="150" maxZoom="1.1" zoomRange="0.1" transitionTime="0.2" springiness="1.5"
fadeInTime="0.3" fadeOutTime="0.3" fadeInZoom="1.5" fadeOutZoom="0.7" fadeInRotation="0.5" fadeOutRotation="-0.7">
<center radius="100" activeRadius="55">
diff --git a/resources/themes/bright/theme.xml b/resources/themes/bright/theme.xml
index 511e3e1..9ea3606 100644
--- a/resources/themes/bright/theme.xml
+++ b/resources/themes/bright/theme.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
-<theme name="Bright" description="An elegant theme." author="Simon Schneegans" email="josi.schneegans@vr-web.de">
+<theme name="Bright" description="An elegant theme." author="Simon Schneegans" email="code@simonschneegans.de">
<pie radius="120" maxZoom="1.1" zoomRange="0.1" transitionTime="0.2" springiness="1.5"
fadeInTime="0.3" fadeOutTime="0.3" fadeInZoom="1.5" fadeOutZoom="0.7" fadeInRotation="0.5" fadeOutRotation="-0.7">
<center radius="80" activeRadius="55">
diff --git a/resources/themes/elementary/icon_bg.svg b/resources/themes/elementary/icon_bg.svg
new file mode 100644
index 0000000..999f71d
--- /dev/null
+++ b/resources/themes/elementary/icon_bg.svg
@@ -0,0 +1,149 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="100"
+ height="100"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.48.2 r9819"
+ sodipodi:docname="arrow.svg">
+ <defs
+ id="defs4">
+ <linearGradient
+ id="linearGradient3007">
+ <stop
+ id="stop3009"
+ offset="0"
+ style="stop-color:#ffffff;stop-opacity:0" />
+ <stop
+ style="stop-color:#ffffff;stop-opacity:0;"
+ offset="0.3680203"
+ id="stop3011" />
+ <stop
+ id="stop3013"
+ offset="0.57677984"
+ style="stop-color:#ffffff;stop-opacity:0.66666667;" />
+ <stop
+ style="stop-color:#ffffff;stop-opacity:0.45490196;"
+ offset="0.66058904"
+ id="stop3015" />
+ <stop
+ style="stop-color:#ffffff;stop-opacity:0.34901961;"
+ offset="0.70194155"
+ id="stop3017" />
+ <stop
+ style="stop-color:#ffffff;stop-opacity:0.25490196;"
+ offset="0.74285865"
+ id="stop3019" />
+ <stop
+ style="stop-color:#ffffff;stop-opacity:0.1254902;"
+ offset="0.8251282"
+ id="stop3021" />
+ <stop
+ style="stop-color:#ffffff;stop-opacity:0.05490196;"
+ offset="0.90009141"
+ id="stop3023" />
+ <stop
+ id="stop3025"
+ offset="1"
+ style="stop-color:#ffffff;stop-opacity:0" />
+ </linearGradient>
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3007"
+ id="radialGradient3005"
+ gradientUnits="userSpaceOnUse"
+ cx="50.002552"
+ cy="49.744911"
+ fx="50.002552"
+ fy="49.744911"
+ r="49.750011" />
+ <filter
+ inkscape:collect="always"
+ id="filter3961"
+ x="-0.47950554"
+ width="1.9590111"
+ y="-0.25418605"
+ height="1.5083721">
+ <feGaussianBlur
+ inkscape:collect="always"
+ stdDeviation="1.9792091"
+ id="feGaussianBlur3963" />
+ </filter>
+ <filter
+ inkscape:collect="always"
+ id="filter4019"
+ x="-0.47687296"
+ width="1.9537459"
+ y="-0.47687296"
+ height="1.9537459">
+ <feGaussianBlur
+ inkscape:collect="always"
+ stdDeviation="19.195555"
+ id="feGaussianBlur4021" />
+ </filter>
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#1d1d1d"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="5.6"
+ inkscape:cx="38.860073"
+ inkscape:cy="47.333499"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="false"
+ inkscape:showpageshadow="false"
+ showguides="true"
+ inkscape:guide-bbox="true"
+ inkscape:window-width="960"
+ inkscape:window-height="1034"
+ inkscape:window-x="0"
+ inkscape:window-y="24"
+ inkscape:window-maximized="0">
+ <sodipodi:guide
+ orientation="0,1"
+ position="79.802051,50.002551"
+ id="guide3865" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Ebene 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(0,-952.36218)">
+ <path
+ sodipodi:type="arc"
+ style="opacity:0.82838283999999984;fill:#ffffff;fill-opacity:1;stroke:none;filter:url(#filter4019)"
+ id="path4001"
+ sodipodi:cx="50.267857"
+ sodipodi:cy="50.089287"
+ sodipodi:rx="48.30357"
+ sodipodi:ry="48.30357"
+ d="m 98.571426,50.089287 a 48.30357,48.30357 0 1 1 -96.6071392,0 48.30357,48.30357 0 1 1 96.6071392,0 z"
+ transform="matrix(0.5268022,0,0,0.5268022,23.786639,976.06432)" />
+ </g>
+</svg>
diff --git a/resources/themes/elementary/ring.svg b/resources/themes/elementary/ring.svg
new file mode 100644
index 0000000..379a8db
--- /dev/null
+++ b/resources/themes/elementary/ring.svg
@@ -0,0 +1,154 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="100"
+ height="100"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.48.2 r9819"
+ sodipodi:docname="ring.svg">
+ <defs
+ id="defs4">
+ <linearGradient
+ id="linearGradient3007">
+ <stop
+ id="stop3009"
+ offset="0"
+ style="stop-color:#ffffff;stop-opacity:0" />
+ <stop
+ style="stop-color:#ffffff;stop-opacity:0;"
+ offset="0.3680203"
+ id="stop3011" />
+ <stop
+ id="stop3013"
+ offset="0.57677984"
+ style="stop-color:#ffffff;stop-opacity:0.66666667;" />
+ <stop
+ style="stop-color:#ffffff;stop-opacity:0.45490196;"
+ offset="0.66058904"
+ id="stop3015" />
+ <stop
+ style="stop-color:#ffffff;stop-opacity:0.34901961;"
+ offset="0.70194155"
+ id="stop3017" />
+ <stop
+ style="stop-color:#ffffff;stop-opacity:0.25490196;"
+ offset="0.74285865"
+ id="stop3019" />
+ <stop
+ style="stop-color:#ffffff;stop-opacity:0.1254902;"
+ offset="0.8251282"
+ id="stop3021" />
+ <stop
+ style="stop-color:#ffffff;stop-opacity:0.05490196;"
+ offset="0.90009141"
+ id="stop3023" />
+ <stop
+ id="stop3025"
+ offset="1"
+ style="stop-color:#ffffff;stop-opacity:0" />
+ </linearGradient>
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3007"
+ id="radialGradient3005"
+ gradientUnits="userSpaceOnUse"
+ cx="50.002552"
+ cy="49.744911"
+ fx="50.002552"
+ fy="49.744911"
+ r="49.750011" />
+ <filter
+ inkscape:collect="always"
+ id="filter3809"
+ x="-0.10553746"
+ width="1.2110749"
+ y="-0.10553746"
+ height="1.2110749">
+ <feGaussianBlur
+ inkscape:collect="always"
+ stdDeviation="4.3110167"
+ id="feGaussianBlur3811" />
+ </filter>
+ <filter
+ inkscape:collect="always"
+ id="filter3855"
+ x="-0.14071661"
+ width="1.2814332"
+ y="-0.14071661"
+ height="1.2814332">
+ <feGaussianBlur
+ inkscape:collect="always"
+ stdDeviation="5.7480223"
+ id="feGaussianBlur3857" />
+ </filter>
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#1d1d1d"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="3.959798"
+ inkscape:cx="63.212651"
+ inkscape:cy="14.680618"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="false"
+ inkscape:showpageshadow="false"
+ showguides="true"
+ inkscape:guide-bbox="true"
+ inkscape:window-width="960"
+ inkscape:window-height="1034"
+ inkscape:window-x="0"
+ inkscape:window-y="24"
+ inkscape:window-maximized="0" />
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Ebene 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(0,-952.36218)">
+ <path
+ transform="matrix(0.74722485,0,0,0.74722485,12.647398,967.71449)"
+ d="m 99.107143,49.910713 a 49.017857,49.017857 0 1 1 -98.0357128,0 49.017857,49.017857 0 1 1 98.0357128,0 z"
+ sodipodi:ry="49.017857"
+ sodipodi:rx="49.017857"
+ sodipodi:cy="49.910713"
+ sodipodi:cx="50.089287"
+ id="path3813"
+ style="opacity:0.58745871;fill:#000000;fill-opacity:1;stroke:none;filter:url(#filter3855)"
+ sodipodi:type="arc" />
+ <path
+ sodipodi:type="arc"
+ style="fill:#383838;fill-opacity:1;stroke:#212121;stroke-width:1.33828521000000000;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;opacity:0.82838284"
+ id="path2994"
+ sodipodi:cx="50.089287"
+ sodipodi:cy="49.910713"
+ sodipodi:rx="49.017857"
+ sodipodi:ry="49.017857"
+ d="m 99.107143,49.910713 a 49.017857,49.017857 0 1 1 -98.0357128,0 49.017857,49.017857 0 1 1 98.0357128,0 z"
+ transform="matrix(0.74722485,0,0,0.74722485,12.647398,964.95926)" />
+ </g>
+</svg>
diff --git a/resources/themes/elementary/theme.xml b/resources/themes/elementary/theme.xml
new file mode 100644
index 0000000..9282ba6
--- /dev/null
+++ b/resources/themes/elementary/theme.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<theme name="Elementary" description="Inspired by the style of Elementary OS" author="Simon Schneegans" email="code@simonschneegans.de">
+ <pie radius="120" maxZoom="1.2" zoomRange="0.1" transitionTime="0.15" springiness="1.3"
+ fadeInTime="0.2" fadeOutTime="0.2" fadeInZoom="0.7" fadeOutZoom="0.8" fadeInRotation="0.2" fadeOutRotation="-0.2">
+ <center radius="70" activeRadius="35">
+ <center_layer file="ring.svg"
+ active_scale="1.0" active_rotationMode="auto" active_rotationSpeed="0" active_colorize="false" active_alpha="1.0"
+ inactive_scale="1.0" inactive_rotationMode="auto" inactive_rotationSpeed="0" inactive_colorize="false" inactive_alpha="1.0" />
+ </center>
+ <slices radius="40" minGap="-10" >
+ <activeSlice>
+ <slice_layer type="file" file="icon_bg.svg" scale="1" colorize="true" />
+ <slice_layer type="icon" scale="0.5" />
+ </activeSlice>
+ <inactiveSlice>
+ <slice_layer type="icon" scale="0.5" />
+ </inactiveSlice>
+ </slices>
+ <caption position="0" font="sans 10" width="90" height="90" />
+ </pie>
+</theme>
+
diff --git a/resources/themes/funky/theme.xml b/resources/themes/funky/theme.xml
index a953089..7a86ecc 100644
--- a/resources/themes/funky/theme.xml
+++ b/resources/themes/funky/theme.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
-<theme name="Funky" description="Just testing what these themes can do..." author="Simon Schneegans" email="josi.schneegans@vr-web.de">
+<theme name="Funky" description="Just testing what these themes can do..." author="Simon Schneegans" email="code@simonschneegans.de">
<pie radius="80" maxZoom="1.3" zoomRange="0.3" transitionTime="0.2" springiness="2.5"
fadeInTime="0.3" fadeOutTime="0.3" fadeInZoom="1.5" fadeOutZoom="0.4" fadeInRotation="0.5" fadeOutRotation="-0.7">
<center radius="100" activeRadius="40">
diff --git a/resources/themes/gloss/theme.xml b/resources/themes/gloss/theme.xml
index efc20e0..760b9b6 100644
--- a/resources/themes/gloss/theme.xml
+++ b/resources/themes/gloss/theme.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
-<theme name="Glossy" description="A shiny theme for Gnome-Pie" author="Simon Schneegans" email="josi.schneegans@vr-web.de">
+<theme name="Glossy" description="A shiny theme for Gnome-Pie" author="Simon Schneegans" email="code@simonschneegans.de">
<pie radius="100" maxZoom="1.3" zoomRange="0.2" transitionTime="0.1" fadeInTime="0.2" fadeOutTime="0.2" fadeInZoom="0.7" fadeOutZoom="0.7">
<center radius="65" activeRadius="40">
<center_layer file="icon_bg.svg"
diff --git a/resources/themes/o-pie/theme.xml b/resources/themes/o-pie/theme.xml
index 19d4101..7381d25 100644
--- a/resources/themes/o-pie/theme.xml
+++ b/resources/themes/o-pie/theme.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
-<theme name="O-Pie" description="Inspired by the original O-Pie theme" author="Simon Schneegans" email="josi.schneegans@vr-web.de">
+<theme name="O-Pie" description="Inspired by the original O-Pie theme" author="Simon Schneegans" email="code@simonschneegans.de">
<pie radius="120" maxZoom="1.3" zoomRange="0.2" transitionTime="0.1" springiness="1.5"
fadeInTime="0.2" fadeOutTime="0.2" fadeInZoom="0.7" fadeOutZoom="0.8" fadeInRotation="0.2" fadeOutRotation="-0.2">
<center radius="70" activeRadius="35">
diff --git a/resources/themes/slim/theme.xml b/resources/themes/slim/theme.xml
index 91b5a96..07eaafc 100644
--- a/resources/themes/slim/theme.xml
+++ b/resources/themes/slim/theme.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
-<theme name="Slim" description="Well... quite simplistic" author="Simon Schneegans" email="josi.schneegans@vr-web.de">
+<theme name="Slim" description="Well... quite simplistic" author="Simon Schneegans" email="code@simonschneegans.de">
<pie radius="120" maxZoom="1.3" zoomRange="0.2" transitionTime="0.2" springiness="1.5"
fadeInTime="0.3" fadeOutTime="0.3" fadeInZoom="0.8" fadeOutZoom="0.8" fadeInRotation="0.3" fadeOutRotation="-0.3">
<center radius="120" activeRadius="35">
diff --git a/resources/themes/unity/theme.xml b/resources/themes/unity/theme.xml
index 9718753..a38c815 100644
--- a/resources/themes/unity/theme.xml
+++ b/resources/themes/unity/theme.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
-<theme name="Unity" description="A theme made for the Unity interface of Ubuntu" author="Simon Schneegans" email="josi.schneegans@vr-web.de">
+<theme name="Unity" description="A theme made for the Unity interface of Ubuntu" author="Simon Schneegans" email="code@simonschneegans.de">
<pie radius="130" maxZoom="1.1" zoomRange="0.1" transitionTime="0.2" springiness="1.5"
fadeInTime="0.3" fadeOutTime="0.3" fadeInZoom="1.5" fadeOutZoom="0.7" fadeInRotation="0.5" fadeOutRotation="-0.7">
<center radius="80" activeRadius="55">
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index b3b8ed3..23b9474 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -80,3 +80,11 @@ install(
${CMAKE_INSTALL_PREFIX}/share/applications
)
+# install manpage
+install(
+ FILES
+ ${CMAKE_SOURCE_DIR}/resources/gnome-pie.1
+ DESTINATION
+ ${CMAKE_INSTALL_PREFIX}/share/man/man1
+)
+
diff --git a/src/actionGroups/bookmarkGroup.vala b/src/actionGroups/bookmarkGroup.vala
index f4ba66e..389b14a 100644
--- a/src/actionGroups/bookmarkGroup.vala
+++ b/src/actionGroups/bookmarkGroup.vala
@@ -110,7 +110,7 @@ public class BookmarkGroup : ActionGroup {
}
// add trash
- this.add_action(ActionRegistry.new_for_uri("trash:///"));
+ this.add_action(ActionRegistry.new_for_uri("trash://"));
// add desktop
this.add_action(ActionRegistry.new_for_uri("file://" + GLib.Environment.get_user_special_dir(GLib.UserDirectory.DESKTOP)));
diff --git a/src/actionGroups/clipboardGroup.vala b/src/actionGroups/clipboardGroup.vala
index 0e95b65..cd1da36 100644
--- a/src/actionGroups/clipboardGroup.vala
+++ b/src/actionGroups/clipboardGroup.vala
@@ -19,6 +19,7 @@ namespace GnomePie {
/////////////////////////////////////////////////////////////////////////
/// This Group keeps a history of the last used Clipboard entries.
+/// Experimental. Not enabled.
/////////////////////////////////////////////////////////////////////////
public class ClipboardGroup : ActionGroup {
diff --git a/src/actionGroups/groupRegistry.vala b/src/actionGroups/groupRegistry.vala
index 94169d5..a9f8d06 100644
--- a/src/actionGroups/groupRegistry.vala
+++ b/src/actionGroups/groupRegistry.vala
@@ -38,7 +38,6 @@ public class GroupRegistry : GLib.Object {
public static Gee.HashMap<Type, string> icons { get; private set; }
public static Gee.HashMap<Type, string> settings_names { get; private set; }
-
/////////////////////////////////////////////////////////////////////
/// Registers all ActionGroup types.
/////////////////////////////////////////////////////////////////////
@@ -78,6 +77,12 @@ public class GroupRegistry : GLib.Object {
icons.set(typeof(SessionGroup), icon);
settings_names.set(typeof(SessionGroup), settings_name);
+ WindowListGroup.register(out name, out icon, out settings_name);
+ types.add(typeof(WindowListGroup));
+ names.set(typeof(WindowListGroup), name);
+ icons.set(typeof(WindowListGroup), icon);
+ settings_names.set(typeof(WindowListGroup), settings_name);
+
// ClipboardGroup.register(out name, out icon, out settings_name);
// types.add(typeof(ClipboardGroup));
// names.set(typeof(ClipboardGroup), name);
diff --git a/src/actionGroups/sessionGroup.vala b/src/actionGroups/sessionGroup.vala
index 9fcab1d..0b3f249 100644
--- a/src/actionGroups/sessionGroup.vala
+++ b/src/actionGroups/sessionGroup.vala
@@ -49,6 +49,11 @@ public class SessionGroup : ActionGroup {
/////////////////////////////////////////////////////////////////////
construct {
+// string iface = GLib.Bus.get_proxy_sync(GLib.BusType.SESSION, "org.gnome.SessionManager", "/org/gnome/SessionManager");
+// iface = GLib.Bus.get_proxy_sync(GLib.BusType.SESSION, "org.freedesktop.Hal", "/org/freedesktop/Hal/devices/computer");
+// iface = GLib.Bus.get_proxy_sync(GLib.BusType.SESSION, "org.kde.ksmserver", "/KSMServer");
+// iface = GLib.Bus.get_proxy_sync(GLib.BusType.SESSION, "org.freedesktop.ConsoleKit", "/org/freedesktop/ConsoleKit/Manager");
+
this.add_action(new AppAction(_("Shutdown"), "gnome-shutdown",
"dbus-send --print-reply --dest=org.gnome.SessionManager /org/gnome/SessionManager org.gnome.SessionManager.RequestShutdown"));
@@ -60,9 +65,9 @@ public class SessionGroup : ActionGroup {
}
// TODO: check for available interfaces --- these may work too:
- // dbus-send --print-reply --system --dest=org.freedesktop.Hal /org/freedesktop/Hal/devices/computer org.freedesktop.Hal.Device.SystemPowerManagement.Shutdown
+ // dbus-send --print-reply --dest=org.freedesktop.Hal /org/freedesktop/Hal/devices/computer org.freedesktop.Hal.Device.SystemPowerManagement.Shutdown
// dbus-send --print-reply --dest=org.kde.ksmserver /KSMServer org.kde.KSMServerInterface.logout 0 2 2
- // dbus-send --system --print-reply --dest="org.freedesktop.ConsoleKit" /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Stop
+ // dbus-send --print-reply --dest="org.freedesktop.ConsoleKit" /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Stop
}
}
diff --git a/src/actionGroups/windowListGroup.vala b/src/actionGroups/windowListGroup.vala
new file mode 100644
index 0000000..b12f188
--- /dev/null
+++ b/src/actionGroups/windowListGroup.vala
@@ -0,0 +1,142 @@
+/*
+Copyright (c) 2011 by Simon Schneegans
+
+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/>.
+*/
+
+namespace GnomePie {
+
+/////////////////////////////////////////////////////////////////////
+/// This group displays a list of all running application windows.
+/////////////////////////////////////////////////////////////////////
+
+public class WindowListGroup : ActionGroup {
+
+ /////////////////////////////////////////////////////////////////////
+ /// Used to register this type of ActionGroup. It sets the display
+ /// name for this ActionGroup, it's icon name and the string used in
+ /// the pies.conf file for this kind of ActionGroups.
+ /////////////////////////////////////////////////////////////////////
+
+ public static void register(out string name, out string icon, out string settings_name) {
+ name = _("Window List");
+ icon = "window-manager";
+ settings_name = "window_list";
+ }
+
+ /////////////////////////////////////////////////////////////////////
+ /// Two members needed to avoid useless, frequent changes of the
+ /// stored Actions.
+ /////////////////////////////////////////////////////////////////////
+
+ private bool changing = false;
+ private bool changed_again = false;
+
+ private Wnck.Screen screen;
+
+ /////////////////////////////////////////////////////////////////////
+ /// C'tor, initializes all members.
+ /////////////////////////////////////////////////////////////////////
+
+ public WindowListGroup(string parent_id) {
+ GLib.Object(parent_id : parent_id);
+ }
+
+ /////////////////////////////////////////////////////////////////////
+ /// Loads all windows.
+ /////////////////////////////////////////////////////////////////////
+
+ construct {
+ this.screen = Wnck.Screen.get_default();
+
+ this.screen.window_opened.connect(reload);
+ this.screen.window_closed.connect(reload);
+
+ this.load();
+ }
+
+ /////////////////////////////////////////////////////////////////////
+ /// Loads all currently opened windows and creates actions for them.
+ /////////////////////////////////////////////////////////////////////
+
+ private void load() {
+ unowned GLib.List<Wnck.Window?> windows = this.screen.get_windows();
+
+ var matcher = Bamf.Matcher.get_default();
+
+ foreach (var window in windows) {
+ if (window.get_window_type() == Wnck.WindowType.NORMAL
+ && !window.is_skip_pager() && !window.is_skip_tasklist()) {
+ var application = window.get_application();
+ var bamf_app = matcher.get_application_for_xid((uint32)window.get_xid());
+
+ string name = window.get_name();
+
+ if (name.length > 30)
+ name = name.substring(0, 30) + "...";
+
+ var action = new SigAction(
+ name,
+ (bamf_app == null) ? application.get_icon_name().down() : bamf_app.get_icon(),
+ "%lu".printf(window.get_xid())
+ );
+ action.activated.connect(() => {
+ Wnck.Screen.get_default().force_update();
+
+ var xid = (X.Window)uint64.parse(action.real_command);
+ var win = Wnck.Window.get(xid);
+ var time = Gtk.get_current_event_time();
+
+ if (win.get_workspace() != null
+ && win.get_workspace() != win.get_screen().get_active_workspace())
+ win.get_workspace().activate(time);
+
+ if (win.is_minimized())
+ win.unminimize(time);
+
+ win.activate_transient(time);
+ });
+ this.add_action(action);
+ }
+ }
+ }
+
+ /////////////////////////////////////////////////////////////////////
+ /// Reloads all running applications.
+ /////////////////////////////////////////////////////////////////////
+
+ private void reload() {
+ // avoid too frequent changes...
+ if (!this.changing) {
+ this.changing = true;
+ Timeout.add(500, () => {
+ if (this.changed_again) {
+ this.changed_again = false;
+ return true;
+ }
+
+ // reload
+ this.delete_all();
+ this.load();
+
+ this.changing = false;
+ return false;
+ });
+ } else {
+ this.changed_again = true;
+ }
+ }
+}
+
+}
diff --git a/src/actions/keyAction.vala b/src/actions/keyAction.vala
index 0f6d094..ddeebb5 100644
--- a/src/actions/keyAction.vala
+++ b/src/actions/keyAction.vala
@@ -30,7 +30,7 @@ public class KeyAction : Action {
/////////////////////////////////////////////////////////////////////
public static void register(out string name, out bool icon_name_editable, out string settings_name) {
- name = _("Press key stroke");
+ name = _("Press hotkey");
icon_name_editable = true;
settings_name = "key";
}
diff --git a/src/deamon.vala b/src/deamon.vala
index af232eb..0cdb4c2 100644
--- a/src/deamon.vala
+++ b/src/deamon.vala
@@ -16,13 +16,8 @@ this program. If not, see <http://www.gnu.org/licenses/>.
*/
/////////////////////////////////////////////////////////////////////
-/// TODO-List:
-/// IconSelectWindow
+/// TODO-List (need comments):
/// PieList
-/// PieWindow
-/// CenterRenderer
-/// SliceRenderer
-/// PieRenderer
/////////////////////////////////////////////////////////////////////
namespace GnomePie {
@@ -108,12 +103,14 @@ public class Deamon : GLib.Object {
if (app.is_running) {
// inform the running instance of the pie to be opened
if (open_pie != null) {
+ message("Gnome-Pie is already running. Sending request to open pie " + open_pie + ".");
var data = new Unique.MessageData();
data.set_text(open_pie, open_pie.length);
app.send_message(Unique.Command.ACTIVATE, data);
return;
}
+ message("Gnome-Pie is already running. Sending request to open config menu.");
app.send_message(Unique.Command.ACTIVATE, null);
return;
}
diff --git a/src/gui/about.vala b/src/gui/about.vala
index 1ace9cb..ce4256e 100644
--- a/src/gui/about.vala
+++ b/src/gui/about.vala
@@ -24,18 +24,44 @@ namespace GnomePie {
public class GnomePieAboutDialog: Gtk.AboutDialog {
public GnomePieAboutDialog () {
- string[] devs = {"Simon Schneegans <code@simonschneegans.de>",
- "Francesco Piccinno"};
- string[] artists = {"Simon Schneegans <code@simonschneegans.de>"};
+ string[] devs = {
+ "Simon Schneegans <code@simonschneegans.de>",
+ "Francesco Piccinno <stack.box@gmail.com>"
+ };
+ string[] artists = {
+ "Simon Schneegans <code@simonschneegans.de>"
+ };
+ string[] translators = {
+ "DE\t\t Simon Schneegans <code@simonschneegans.de>",
+ "IT\t\t Riccardo Traverso <gr3yfox.fw@gmail.com>",
+ "PT-BR\t Magnun Leno <magnun@codecommunity.org>",
+ "EN\t\t Simon Schneegans <code@simonschneegans.de>",
+ "KO\t\t Kim Boram <Boramism@gmail.com>"
+ };
+
+ // sort translators
+ GLib.List<string> translator_list = new GLib.List<string>();
+ foreach (var translator in translators)
+ translator_list.append(translator);
+
+ translator_list.sort((a, b) => {
+ return a.ascii_casecmp(b);
+ });
+
+ string translator_string = "";
+ foreach (var translator in translator_list)
+ translator_string += translator + "\n";
+
GLib.Object (
artists : artists,
authors : devs,
+ translator_credits : translator_string,
copyright : "Copyright (C) 2011 Simon Schneegans <code@simonschneegans.de>",
program_name: "Gnome-Pie",
logo_icon_name: "gnome-pie",
website: "http://www.simonschneegans.de/?page_id=12",
website_label: "www.gnome-pie.simonschneegans.de",
- version: "0.2"
+ version: "0.3.1"
);
}
}
diff --git a/src/gui/cellRendererTrigger.vala b/src/gui/cellRendererTrigger.vala
new file mode 100644
index 0000000..a825c32
--- /dev/null
+++ b/src/gui/cellRendererTrigger.vala
@@ -0,0 +1,84 @@
+/*
+Copyright (c) 2011 by Simon Schneegans
+
+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/>.
+*/
+
+namespace GnomePie {
+
+/////////////////////////////////////////////////////////////////////////
+/// A CellRenderer which opens a TriggerSelectWindow.
+/////////////////////////////////////////////////////////////////////////
+
+public class CellRendererTrigger : Gtk.CellRendererText {
+
+ /////////////////////////////////////////////////////////////////////
+ /// This signal is emitted when the user selects another trigger.
+ /////////////////////////////////////////////////////////////////////
+
+ public signal void on_select(string path, Trigger trigger);
+
+ /////////////////////////////////////////////////////////////////////
+ /// The trigger which can be set with this window.
+ /////////////////////////////////////////////////////////////////////
+
+ public string trigger { get; set; }
+
+ /////////////////////////////////////////////////////////////////////
+ /// The IconSelectWindow which is shown on click.
+ /////////////////////////////////////////////////////////////////////
+
+ private TriggerSelectWindow select_window = null;
+
+ /////////////////////////////////////////////////////////////////////
+ /// A helper variable, needed to emit the current path.
+ /////////////////////////////////////////////////////////////////////
+
+ private string current_path = "";
+
+ /////////////////////////////////////////////////////////////////////
+ /// C'tor, creates a new CellRendererIcon.
+ /////////////////////////////////////////////////////////////////////
+
+ public CellRendererTrigger() {
+ this.select_window = new TriggerSelectWindow();
+
+ this.select_window.on_select.connect((trigger) => {
+ this.trigger = trigger.name;
+ this.on_select(current_path, trigger);
+ });
+ }
+
+ /////////////////////////////////////////////////////////////////////
+ /// Open the TriggerSelectWindow on click.
+ /////////////////////////////////////////////////////////////////////
+
+ public override unowned Gtk.CellEditable start_editing(
+ Gdk.Event event, Gtk.Widget widget, string path, Gdk.Rectangle bg_area,
+ Gdk.Rectangle cell_area, Gtk.CellRendererState flags) {
+
+ this.current_path = path;
+
+ this.select_window.set_transient_for((Gtk.Window)widget.get_toplevel());
+ this.select_window.set_modal(true);
+ this.select_window.set_trigger(new Trigger.from_string(this.trigger));
+
+ this.select_window.show();
+
+ return base.start_editing(event, widget, path, bg_area, cell_area, flags);
+ }
+}
+
+}
+
diff --git a/src/gui/iconSelectWindow.vala b/src/gui/iconSelectWindow.vala
index 2274ec5..01a4a40 100644
--- a/src/gui/iconSelectWindow.vala
+++ b/src/gui/iconSelectWindow.vala
@@ -19,45 +19,17 @@ namespace GnomePie {
/////////////////////////////////////////////////////////////////////////
/// A window which allows selection of an Icon of the user's current icon
-/// theme. Loading of Icons happens in an extra thread and a spinner is
-/// displayed while loading.
+/// theme. Custom icons/images can be selested as well. Loading of icons
+/// happens in an extra thread and a spinner is displayed while loading.
/////////////////////////////////////////////////////////////////////////
public class IconSelectWindow : Gtk.Dialog {
- private static Gtk.ListStore icon_list = null;
-
- private static bool loading {get; set; default = false;}
- private static bool need_reload {get; set; default = true;}
+ /////////////////////////////////////////////////////////////////////
+ /// The currently selected icon. If set, this icon gets focused.
+ /////////////////////////////////////////////////////////////////////
- private const string disabled_contexts = "Animations, FileSystems, MimeTypes";
- private Gtk.TreeModelFilter icon_list_filtered = null;
- private Gtk.IconView icon_view = null;
- private Gtk.Spinner spinner = null;
-
- private Gtk.FileChooserWidget file_chooser = null;
-
- private Gtk.Notebook tabs = null;
-
- private class ListEntry {
- public string name;
- public IconContext context;
- public Gdk.Pixbuf pixbuf;
- }
-
- private GLib.AsyncQueue<ListEntry?> load_queue;
-
- private enum IconContext {
- ALL,
- APPS,
- ACTIONS,
- PLACES,
- FILES,
- EMOTES,
- OTHER
- }
-
- public string _active_icon = "application-default-icon";
+ private string _active_icon = "application-default-icon";
public string active_icon {
get {
@@ -85,7 +57,104 @@ public class IconSelectWindow : Gtk.Dialog {
}
}
+ /////////////////////////////////////////////////////////////////////
+ /// This signal gets emitted when the user selects a new icon.
+ /////////////////////////////////////////////////////////////////////
+
public signal void on_select(string icon_name);
+
+ /////////////////////////////////////////////////////////////////////
+ /// The ListStore storing all theme-icons.
+ /////////////////////////////////////////////////////////////////////
+
+ private static Gtk.ListStore icon_list = null;
+
+ /////////////////////////////////////////////////////////////////////
+ /// True, if the icon theme is currently reloaded.
+ /////////////////////////////////////////////////////////////////////
+
+ private static bool loading = false;
+
+ /////////////////////////////////////////////////////////////////////
+ /// If set to true, the icon list will be reloaded next time the
+ /// window opens.
+ /////////////////////////////////////////////////////////////////////
+
+ private static bool need_reload = true;
+
+ /////////////////////////////////////////////////////////////////////
+ /// Icons of these contexts won't appear in the list.
+ /////////////////////////////////////////////////////////////////////
+
+ private const string disabled_contexts = "Animations, FileSystems";
+
+ /////////////////////////////////////////////////////////////////////
+ /// The list of icons, filtered according to the chosen type and
+ /// filter string.
+ /////////////////////////////////////////////////////////////////////
+
+ private Gtk.TreeModelFilter icon_list_filtered = null;
+
+ /////////////////////////////////////////////////////////////////////
+ /// The Gtk widget displaying the icons.
+ /////////////////////////////////////////////////////////////////////
+
+ private Gtk.IconView icon_view = null;
+
+ /////////////////////////////////////////////////////////////////////
+ /// This spinner is displayed when the icons are loaded.
+ /////////////////////////////////////////////////////////////////////
+
+ private Gtk.Spinner spinner = null;
+
+ /////////////////////////////////////////////////////////////////////
+ /// A Gtk widget used for custom icon/image selection.
+ /////////////////////////////////////////////////////////////////////
+
+ private Gtk.FileChooserWidget file_chooser = null;
+
+ /////////////////////////////////////////////////////////////////////
+ /// The notebook containing the different icon choice possibilities:
+ /// from the theme or custom.
+ /////////////////////////////////////////////////////////////////////
+
+ private Gtk.Notebook tabs = null;
+
+ /////////////////////////////////////////////////////////////////////
+ /// A little structure containing data for one icon in the icon_view.
+ /////////////////////////////////////////////////////////////////////
+
+ private class ListEntry {
+ public string name;
+ public IconContext context;
+ public Gdk.Pixbuf pixbuf;
+ }
+
+ /////////////////////////////////////////////////////////////////////
+ /// This queue is used for icon loading. A loading thread pushes
+ /// icons into it --- the main thread updates the icon_view
+ /// accordingly.
+ /////////////////////////////////////////////////////////////////////
+
+ private GLib.AsyncQueue<ListEntry?> load_queue;
+
+ /////////////////////////////////////////////////////////////////////
+ /// Possible icon types.
+ /////////////////////////////////////////////////////////////////////
+
+ private enum IconContext {
+ ALL,
+ APPS,
+ ACTIONS,
+ PLACES,
+ FILES,
+ EMOTES,
+ OTHER
+ }
+
+ /////////////////////////////////////////////////////////////////////
+ /// C'tor, creates a new IconSelectWindow.
+ /////////////////////////////////////////////////////////////////////
public IconSelectWindow() {
this.title = _("Choose an Icon");
@@ -94,15 +163,22 @@ public class IconSelectWindow : Gtk.Dialog {
this.load_queue = new GLib.AsyncQueue<ListEntry?>();
if (this.icon_list == null) {
- this.icon_list = new Gtk.ListStore(3, typeof(string), typeof(IconContext), typeof(Gdk.Pixbuf));
+ this.icon_list = new Gtk.ListStore(3, typeof(string), // icon name
+ typeof(IconContext), // icon type
+ typeof(Gdk.Pixbuf)); // the icon itself
+
+ // disable sorting until all icons are loaded
+ // else loading becomes horribly slow
this.icon_list.set_default_sort_func(() => {return 0;});
+ // reload if icon theme changes
Gtk.IconTheme.get_default().changed.connect(() => {
if (this.visible) load_icons();
else need_reload = true;
});
}
+ // make the icon_view filterable
this.icon_list_filtered = new Gtk.TreeModelFilter(this.icon_list, null);
var container = new Gtk.VBox(false, 12);
@@ -111,9 +187,11 @@ public class IconSelectWindow : Gtk.Dialog {
// tab container
this.tabs = new Gtk.Notebook();
+ // icon theme tab
var theme_tab = new Gtk.VBox(false, 12);
theme_tab.set_border_width(12);
+ // type chooser combo-box
var context_combo = new Gtk.ComboBox.text();
context_combo.append_text(_("All icons"));
context_combo.append_text(_("Applications"));
@@ -130,13 +208,16 @@ public class IconSelectWindow : Gtk.Dialog {
});
theme_tab.pack_start(context_combo, false, false);
-
+
+ // string filter entry
var filter = new Gtk.Entry();
filter.primary_icon_stock = Gtk.Stock.FIND;
filter.primary_icon_activatable = false;
filter.secondary_icon_stock = Gtk.Stock.CLEAR;
theme_tab.pack_start(filter, false, false);
+ // only display items which have the selected type
+ // and whose name contains the text entered in the entry
this.icon_list_filtered.set_visible_func((model, iter) => {
string name = "";
IconContext context = IconContext.ALL;
@@ -150,33 +231,39 @@ public class IconSelectWindow : Gtk.Dialog {
name.down().contains(filter.text.down());
});
+ // clear when the users clicks on the "clear" icon
filter.icon_release.connect((pos, event) => {
if (pos == Gtk.EntryIconPosition.SECONDARY)
filter.text = "";
});
+ // refilter on input
filter.notify["text"].connect(() => {
this.icon_list_filtered.refilter();
});
+ // container for the icon_view
var scroll = new Gtk.ScrolledWindow (null, null);
scroll.set_policy (Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC);
scroll.set_shadow_type (Gtk.ShadowType.IN);
+ // displays the filtered icons
this.icon_view = new Gtk.IconView.with_model(this.icon_list_filtered);
this.icon_view.item_width = 32;
this.icon_view.item_padding = 3;
this.icon_view.pixbuf_column = 2;
this.icon_view.tooltip_column = 0;
+ // set _active_icon if selection changes
this.icon_view.selection_changed.connect(() => {
foreach (var path in this.icon_view.get_selected_items()) {
Gtk.TreeIter iter;
this.icon_list_filtered.get_iter(out iter, path);
- icon_list_filtered.get(iter, 0, out this._active_icon);
+ this.icon_list_filtered.get(iter, 0, out this._active_icon);
}
});
+ // hide this window when the user activates an icon
this.icon_view.item_activated.connect((path) => {
Gtk.TreeIter iter;
this.icon_list_filtered.get_iter(out iter, path);
@@ -191,20 +278,27 @@ public class IconSelectWindow : Gtk.Dialog {
tabs.append_page(theme_tab, new Gtk.Label(_("Icon Theme")));
+ // tab containing the possibility to choose a custom icon
var custom_tab = new Gtk.VBox(false, 6);
custom_tab.border_width = 12;
+ // file chooser widget
this.file_chooser = new Gtk.FileChooserWidget(Gtk.FileChooserAction.OPEN);
var file_filter = new Gtk.FileFilter();
file_filter.add_pixbuf_formats();
file_filter.set_name(_("All supported image formats"));
file_chooser.add_filter(file_filter);
+ // set _active_icon if the user selected a file
file_chooser.selection_changed.connect(() => {
- if (file_chooser.get_filename() != null && GLib.FileUtils.test(file_chooser.get_filename(), GLib.FileTest.IS_REGULAR))
+ if (file_chooser.get_filename() != null &&
+ GLib.FileUtils.test(file_chooser.get_filename(),
+ GLib.FileTest.IS_REGULAR))
+
this._active_icon = file_chooser.get_filename();
});
+ // hide this window when the user activates a file
file_chooser.file_activated.connect(() => {
this._active_icon = file_chooser.get_filename();
this.on_select(this._active_icon);
@@ -218,7 +312,9 @@ public class IconSelectWindow : Gtk.Dialog {
container.pack_start(tabs, true, true);
- // button box
+ // button box --- this dialog has a custom button box at the bottom because it
+ // should have a spinner there. Sadly that's impossible with the "normal"
+ // action_area of Gtk.Dialog's
var bottom_box = new Gtk.HBox(false, 0);
var bbox = new Gtk.HButtonBox();
@@ -255,8 +351,16 @@ public class IconSelectWindow : Gtk.Dialog {
this.set_focus(this.icon_view);
}
+ /////////////////////////////////////////////////////////////////////
+ /// Hide the "normal" action_area when this window is shown. Reload
+ /// all icons if necessary.
+ /////////////////////////////////////////////////////////////////////
+
public override void show() {
base.show();
+
+ // hide the "normal" action_area --- this Dialog has a custom set of
+ // buttons containg the spinner
this.action_area.hide();
if (this.need_reload) {
@@ -265,23 +369,32 @@ public class IconSelectWindow : Gtk.Dialog {
}
}
+ /////////////////////////////////////////////////////////////////////
+ /// (Re)load all icons.
+ /////////////////////////////////////////////////////////////////////
+
private void load_icons() {
+ // only if it's not loading currently
if (!this.loading) {
this.loading = true;
this.icon_list.clear();
+ // display the spinner
if (spinner != null)
this.spinner.visible = true;
+ // disable sorting of the icon_view - else it's horribly slow
this.icon_list.set_sort_column_id(-1, Gtk.SortType.ASCENDING);
try {
+ // start loading in another thread
unowned Thread loader = Thread.create<void*>(load_thread, false);
loader.set_priority(ThreadPriority.LOW);
} catch (GLib.ThreadError e) {
error("Failed to create icon loader thread!");
}
+ // insert loaded icons every 200 ms
Timeout.add(200, () => {
while (this.load_queue.length() > 0) {
var new_entry = this.load_queue.pop();
@@ -292,6 +405,7 @@ public class IconSelectWindow : Gtk.Dialog {
2, new_entry.pixbuf);
}
+ // enable sorting of the icon_view if loading finished
if (!this.loading) this.icon_list.set_sort_column_id(0, Gtk.SortType.ASCENDING);
return loading;
@@ -299,6 +413,11 @@ public class IconSelectWindow : Gtk.Dialog {
}
}
+ /////////////////////////////////////////////////////////////////////
+ /// Loads all icons of an icon theme and pushes them into the
+ /// load_queue.
+ /////////////////////////////////////////////////////////////////////
+
private void* load_thread() {
var icon_theme = Gtk.IconTheme.get_default();
@@ -321,6 +440,7 @@ public class IconSelectWindow : Gtk.Dialog {
}
try {
+ // create a new entry for the queue
var new_entry = new ListEntry();
new_entry.name = icon;
new_entry.context = icon_context;
@@ -337,8 +457,10 @@ public class IconSelectWindow : Gtk.Dialog {
}
}
+ // finished loading
this.loading = false;
+ // hide the spinner
if (spinner != null)
spinner.visible = this.loading;
diff --git a/src/gui/pieList.vala b/src/gui/pieList.vala
index df6135a..46970d5 100644
--- a/src/gui/pieList.vala
+++ b/src/gui/pieList.vala
@@ -34,7 +34,7 @@ class PieList : Gtk.TreeView {
private enum DataPos {IS_QUICKACTION, ICON, NAME, TYPE_ID, ACTION_TYPE,
ICON_PIXBUF, FONT_WEIGHT, ICON_NAME_EDITABLE, QUICKACTION_VISIBLE, QUICKACTION_ACTIVATABLE,
TYPE_VISIBLE, GROUP_VISIBLE, APP_VISIBLE, KEY_VISIBLE, PIE_VISIBLE,
- URI_VISIBLE, DISPLAY_COMMAND_GROUP, DISPLAY_COMMAND_APP,
+ URI_VISIBLE, TRIGGER_VISIBLE, DISPLAY_COMMAND_GROUP, DISPLAY_COMMAND_APP,
DISPLAY_COMMAND_KEY, DISPLAY_COMMAND_PIE, DISPLAY_COMMAND_URI,
REAL_COMMAND_GROUP, REAL_COMMAND_PIE, REAL_COMMAND_KEY}
@@ -91,7 +91,7 @@ class PieList : Gtk.TreeView {
ActionPos.ICON_NAME_EDITABLE, false);
// main data model
- this.data = new Gtk.TreeStore(24, typeof(bool), // is quickaction
+ this.data = new Gtk.TreeStore(25, typeof(bool), // is quickaction
typeof(string), // icon
typeof(string), // name
typeof(string), // slice: type label, pie: "ID: %id"
@@ -110,6 +110,7 @@ class PieList : Gtk.TreeView {
typeof(bool), // key renderer visible
typeof(bool), // pie renderer visible
typeof(bool), // uri renderer visible
+ typeof(bool), // trigger renderer visible
typeof(string), // display command group
typeof(string), // display command app
@@ -198,6 +199,28 @@ class PieList : Gtk.TreeView {
var command_column = new Gtk.TreeViewColumn();
command_column.title = _("Command");
command_column.resizable = true;
+ command_column.expand = true;
+
+ // trigger
+ var command_renderer_trigger = new CellRendererTrigger();
+ command_renderer_trigger.editable = true;
+ command_renderer_trigger.ellipsize = Pango.EllipsizeMode.END;
+
+ command_renderer_trigger.on_select.connect((path, trigger) => {
+ Gtk.TreeIter data_iter;
+ this.data.get_iter_from_string(out data_iter, path);
+
+ this.data.set(data_iter, DataPos.DISPLAY_COMMAND_KEY, trigger.label_with_specials);
+ this.data.set(data_iter, DataPos.REAL_COMMAND_KEY, trigger.name);
+
+ this.update_pie(data_iter);
+ });
+
+ command_column.pack_end(command_renderer_trigger, true);
+ command_column.add_attribute(command_renderer_trigger, "weight", DataPos.FONT_WEIGHT);
+ command_column.add_attribute(command_renderer_trigger, "markup", DataPos.DISPLAY_COMMAND_KEY);
+ command_column.add_attribute(command_renderer_trigger, "visible", DataPos.TRIGGER_VISIBLE);
+ command_column.add_attribute(command_renderer_trigger, "trigger", DataPos.REAL_COMMAND_KEY);
// slice group
var command_renderer_group = new Gtk.CellRendererCombo();
@@ -342,6 +365,7 @@ class PieList : Gtk.TreeView {
var type_column = new Gtk.TreeViewColumn();
type_column.title = _("Pie-ID / Action type");
type_column.resizable = true;
+ type_column.expand = false;
var type_render = new Gtk.CellRendererCombo();
type_render.editable = true;
@@ -592,7 +616,7 @@ class PieList : Gtk.TreeView {
// adds a new, empty pie to the list
private void add_empty_pie() {
- var new_one = PieManager.create_persistent_pie(_("New Pie"), "application-default-icon", "");
+ var new_one = PieManager.create_persistent_pie(_("New Pie"), "application-default-icon", null);
Gtk.TreeIter last;
this.pies.append(out last); this.pies.set(last, 0, new_one.name, 1, new_one.id);
@@ -612,9 +636,10 @@ class PieList : Gtk.TreeView {
DataPos.TYPE_VISIBLE, false,
DataPos.GROUP_VISIBLE, false,
DataPos.APP_VISIBLE, false,
- DataPos.KEY_VISIBLE, true,
+ DataPos.KEY_VISIBLE, false,
DataPos.PIE_VISIBLE, false,
DataPos.URI_VISIBLE, false,
+ DataPos.TRIGGER_VISIBLE, true,
DataPos.DISPLAY_COMMAND_GROUP, "",
DataPos.DISPLAY_COMMAND_APP, "",
DataPos.DISPLAY_COMMAND_KEY, PieManager.get_accelerator_label_of(new_one.id),
@@ -672,6 +697,7 @@ class PieList : Gtk.TreeView {
DataPos.QUICKACTION_ACTIVATABLE, true,
DataPos.TYPE_VISIBLE, true,
DataPos.GROUP_VISIBLE, false,
+ DataPos.TRIGGER_VISIBLE, false,
DataPos.APP_VISIBLE, action is AppAction,
DataPos.KEY_VISIBLE, action is KeyAction,
DataPos.PIE_VISIBLE, action is PieAction,
@@ -791,9 +817,10 @@ class PieList : Gtk.TreeView {
DataPos.TYPE_VISIBLE, false,
DataPos.GROUP_VISIBLE, false,
DataPos.APP_VISIBLE, false,
- DataPos.KEY_VISIBLE, true,
+ DataPos.KEY_VISIBLE, false,
DataPos.PIE_VISIBLE, false,
DataPos.URI_VISIBLE, false,
+ DataPos.TRIGGER_VISIBLE, true,
DataPos.DISPLAY_COMMAND_GROUP, "",
DataPos.DISPLAY_COMMAND_APP, "",
DataPos.DISPLAY_COMMAND_KEY, PieManager.get_accelerator_label_of(pie.id),
@@ -834,6 +861,7 @@ class PieList : Gtk.TreeView {
DataPos.KEY_VISIBLE, false,
DataPos.PIE_VISIBLE, false,
DataPos.URI_VISIBLE, false,
+ DataPos.TRIGGER_VISIBLE, false,
DataPos.DISPLAY_COMMAND_GROUP, GroupRegistry.names[group.get_type()],
DataPos.DISPLAY_COMMAND_APP, "",
DataPos.DISPLAY_COMMAND_KEY, _("Not bound"),
@@ -888,7 +916,7 @@ class PieList : Gtk.TreeView {
});
// create new pie
- var new_pie = PieManager.create_persistent_pie(name, icon, hotkey, id);
+ var new_pie = PieManager.create_persistent_pie(name, icon, new Trigger.from_string(hotkey), id);
// add actions accordingly
if (this.data.iter_has_child(pie)) {
diff --git a/src/gui/preferences.vala b/src/gui/preferences.vala
index f43fd4a..9444fac 100644
--- a/src/gui/preferences.vala
+++ b/src/gui/preferences.vala
@@ -82,13 +82,6 @@ public class Preferences : Gtk.Window {
open_at_mouse.toggled.connect(open_at_mouse_toggled);
behavior_vbox.pack_start(open_at_mouse, false);
- // Click to activate
- var click_to_activate = new Gtk.CheckButton.with_label (_("Turbo mode"));
- click_to_activate.tooltip_text = _("If checked, the pie closes when its keystroke is released. The currently hovered slice gets executed. This allows very fast selection but disables keyboard navigation.");
- click_to_activate.active = Config.global.turbo_mode;
- click_to_activate.toggled.connect(turbo_mode_toggled);
- behavior_vbox.pack_start(click_to_activate, false);
-
// Slider
var slider_hbox = new Gtk.HBox (false, 6);
behavior_vbox.pack_start(slider_hbox);
@@ -187,6 +180,7 @@ public class Preferences : Gtk.Window {
_("You may drag'n'drop URLs and bookmarks from your internet browser to the list above."),
_("Bugs can be reported at %s!").printf("<a href='https://github.com/Simmesimme/Gnome-Pie'>Github</a>"),
_("It's possible to drag'n'drop files and folders from your file browser to the list above."),
+ _("It's recommended to keep your Pies small (at most 6-8 Slices). Else they will become hard to navigate."),
_("In order to create a launcher for a Pie, drag the Pie from the list to your desktop!")
});
this.show.connect(info_label.start_slide_show);
@@ -251,18 +245,21 @@ public class Preferences : Gtk.Window {
// close button
var bbox = new Gtk.HButtonBox ();
bbox.set_layout (Gtk.ButtonBoxStyle.END);
- var close_button = new Gtk.Button.from_stock (Gtk.Stock.CLOSE);
+ var close_button = new Gtk.Button.from_stock(Gtk.Stock.CLOSE);
close_button.clicked.connect (() => {
hide();
- // save settings on close
- Config.global.save();
- Pies.save();
});
bbox.pack_start (close_button);
main_vbox.pack_start(bbox, false);
main_vbox.show_all();
+
+ this.hide.connect(() => {
+ // save settings on close
+ Config.global.save();
+ Pies.save();
+ });
}
/////////////////////////////////////////////////////////////////////
@@ -323,16 +320,6 @@ public class Preferences : Gtk.Window {
var check = check_box as Gtk.CheckButton;
Config.global.open_at_mouse = check.active;
}
-
- /////////////////////////////////////////////////////////////////////
- /// Toggles whether the user has to click with the mouse in order to
- /// activate a slice.
- /////////////////////////////////////////////////////////////////////
-
- private void turbo_mode_toggled(Gtk.ToggleButton check_box) {
- var check = check_box as Gtk.CheckButton;
- Config.global.turbo_mode = check.active;
- }
}
}
diff --git a/src/gui/triggerSelectWindow.vala b/src/gui/triggerSelectWindow.vala
new file mode 100644
index 0000000..e003a84
--- /dev/null
+++ b/src/gui/triggerSelectWindow.vala
@@ -0,0 +1,257 @@
+/*
+Copyright (c) 2011 by Simon Schneegans
+
+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/>.
+*/
+
+namespace GnomePie {
+
+/////////////////////////////////////////////////////////////////////////
+/// This window allows the selection of a hotkey. It is returned in form
+/// of a Trigger. Therefore it can be either a keyboard driven hotkey or
+/// a mouse based hotkey.
+/////////////////////////////////////////////////////////////////////////
+
+public class TriggerSelectWindow : Gtk.Dialog {
+
+ /////////////////////////////////////////////////////////////////////
+ /// This signal is emitted when the user selects a new hot key.
+ /////////////////////////////////////////////////////////////////////
+
+ public signal void on_select(Trigger trigger);
+
+ /////////////////////////////////////////////////////////////////////
+ /// Some private members which are needed by other methods.
+ /////////////////////////////////////////////////////////////////////
+
+ private Gtk.CheckButton turbo;
+ private Gtk.CheckButton delayed;
+ private Gtk.Label preview;
+
+ /////////////////////////////////////////////////////////////////////
+ /// The currently configured trigger.
+ /////////////////////////////////////////////////////////////////////
+
+ private Trigger trigger = null;
+
+ /////////////////////////////////////////////////////////////////////
+ /// The trigger which was active when this window was opened. It is
+ /// stored in order to check whether anything has changed when the
+ /// user clicks on OK.
+ /////////////////////////////////////////////////////////////////////
+
+ private Trigger original_trigger = null;
+
+ /////////////////////////////////////////////////////////////////////
+ /// These modifiers are ignored.
+ /////////////////////////////////////////////////////////////////////
+
+ private Gdk.ModifierType lock_modifiers = Gdk.ModifierType.MOD2_MASK
+ |Gdk.ModifierType.LOCK_MASK
+ |Gdk.ModifierType.MOD5_MASK;
+
+ /////////////////////////////////////////////////////////////////////
+ /// C'tor, constructs a new TriggerSelectWindow.
+ /////////////////////////////////////////////////////////////////////
+
+ public TriggerSelectWindow() {
+ this.title = _("Define an open-command");
+ this.resizable = false;
+ this.delete_event.connect(hide_on_delete);
+ this.key_press_event.connect(on_key_press);
+ this.button_press_event.connect(on_button_press);
+
+ this.show.connect_after(() => {
+ FocusGrabber.grab(this);
+ });
+
+ this.hide.connect(() => {
+ FocusGrabber.ungrab(this);
+ });
+
+ var container = new Gtk.VBox(false, 6);
+ container.set_border_width(6);
+
+ // click area
+ var click_frame = new Gtk.Frame(_("Click here if you want to bind a mouse button!"));
+
+ var click_box = new Gtk.EventBox();
+ click_box.height_request = 100;
+ click_box.button_press_event.connect(on_area_clicked);
+
+ this.preview = new Gtk.Label(null);
+
+ click_box.add(this.preview);
+
+ click_frame.add(click_box);
+
+ container.pack_start(click_frame, false);
+
+ // turbo checkbox
+ this.turbo = new Gtk.CheckButton.with_label (_("Turbo mode"));
+ this.turbo.tooltip_text = _("If checked, the Pie will close when you " +
+ "release the chosen hot key.");
+ this.turbo.active = false;
+ this.turbo.toggled.connect(() => {
+ if (this.trigger != null)
+ this.update_trigger(new Trigger.from_values(
+ this.trigger.key_sym, this.trigger.modifiers,
+ this.trigger.with_mouse, this.turbo.active,
+ this.delayed.active));
+ });
+
+ container.pack_start(turbo, false);
+
+ // delayed checkbox
+ this.delayed = new Gtk.CheckButton.with_label (_("Long press for activation"));
+ this.delayed.tooltip_text = _("If checked, the Pie will only open if you " +
+ "press this hot key a bit longer.");
+ this.delayed.active = false;
+ this.delayed.toggled.connect(() => {
+ if (this.trigger != null)
+ this.update_trigger(new Trigger.from_values(
+ this.trigger.key_sym, this.trigger.modifiers,
+ this.trigger.with_mouse, this.turbo.active,
+ this.delayed.active));
+ });
+
+ container.pack_start(delayed, false);
+
+ container.show_all();
+
+ this.vbox.pack_start(container, true, true);
+
+ this.add_button(Gtk.Stock.CANCEL, 1);
+ this.add_button(Gtk.Stock.OK, 0);
+
+ // select a new trigger on OK, hide on CANCEL
+ this.response.connect((id) => {
+ if (id == 1)
+ this.hide();
+ else if (id == 0) {
+ var assigned_id = PieManager.get_assigned_id(this.trigger);
+
+ if (this.trigger == this.original_trigger) {
+ // nothing did change
+ this.hide();
+ } else if (this.trigger.key_code == this.original_trigger.key_code
+ && this.trigger.modifiers == this.original_trigger.modifiers
+ && this.trigger.with_mouse == this.original_trigger.with_mouse) {
+ // only turbo and/or delayed mode changed, no need to check for double assignment
+ this.on_select(this.trigger);
+ this.hide();
+ } else if (assigned_id != "") {
+ // it's already assigned
+ var error = _("This hotkey is already assigned to the pie \"%s\"! \n\nPlease select " +
+ "another one or cancel your selection.").printf(PieManager.get_name_of(assigned_id));
+ var dialog = new Gtk.MessageDialog((Gtk.Window)this.get_toplevel(),
+ Gtk.DialogFlags.MODAL,
+ Gtk.MessageType.ERROR,
+ Gtk.ButtonsType.CANCEL,
+ error);
+ dialog.run();
+ dialog.destroy();
+ } else {
+ // a unused hot key has been chosen, great!
+ this.on_select(this.trigger);
+ this.hide();
+ }
+ }
+ });
+ }
+
+ /////////////////////////////////////////////////////////////////////
+ /// Used to set the currently selected trigger on opening.
+ /////////////////////////////////////////////////////////////////////
+
+ public void set_trigger(Trigger trigger) {
+ this.turbo.active = trigger.turbo;
+ this.delayed.active = trigger.delayed;
+ this.original_trigger = trigger;
+ this.update_trigger(trigger);
+ }
+
+ /////////////////////////////////////////////////////////////////////
+ /// Called when the user clicks in the click area.
+ /////////////////////////////////////////////////////////////////////
+
+ private bool on_area_clicked(Gdk.EventButton event) {
+ Gdk.ModifierType state = event.state & ~ this.lock_modifiers;
+
+ var new_trigger = new Trigger.from_values((int)event.button, state, true,
+ this.turbo.active, this.delayed.active);
+ if (new_trigger.key_code == 1) {
+ var dialog = new Gtk.MessageDialog((Gtk.Window)this.get_toplevel(), Gtk.DialogFlags.MODAL,
+ Gtk.MessageType.WARNING,
+ Gtk.ButtonsType.YES_NO,
+ _("It possible to make your system unusable if " +
+ "you bind a Pie to your left mouse button. Do " +
+ "you really want to do this?"));
+
+ dialog.response.connect((response) => {
+ if (response == Gtk.ResponseType.YES) {
+ this.update_trigger(new_trigger);
+ }
+ });
+
+ dialog.run();
+ dialog.destroy();
+ } else {
+ this.update_trigger(new_trigger);
+ }
+
+ return true;
+ }
+
+ /////////////////////////////////////////////////////////////////////
+ /// Called when the user presses a keyboard key.
+ /////////////////////////////////////////////////////////////////////
+
+ private bool on_key_press(Gdk.EventKey event) {
+ if (Gdk.keyval_name(event.keyval) == "Escape") {
+ this.hide();
+ } else if (Gdk.keyval_name(event.keyval) == "BackSpace") {
+ this.update_trigger(new Trigger());
+ } else if (event.is_modifier == 0) {
+ Gdk.ModifierType state = event.state & ~ this.lock_modifiers;
+ this.update_trigger(new Trigger.from_values((int)event.keyval, state, false,
+ this.turbo.active, this.delayed.active));
+ }
+
+ return true;
+ }
+
+ /////////////////////////////////////////////////////////////////////
+ /// Called when the user presses a mouse button.
+ /////////////////////////////////////////////////////////////////////
+
+ private bool on_button_press(Gdk.EventButton event) {
+ int width = 0, height = 0;
+ this.window.get_geometry(null, null, out width, out height, null);
+ if (event.x < 0 || event.x > width || event.y < 0 || event.y > height)
+ this.hide();
+ return true;
+ }
+
+ /////////////////////////////////////////////////////////////////////
+ /// Helper method to update the content of the trigger preview label.
+ /////////////////////////////////////////////////////////////////////
+
+ private void update_trigger(Trigger new_trigger) {
+ this.trigger = new_trigger;
+ this.preview.set_markup("<big><b>" + this.trigger.label + "</b></big>");
+ }
+}
+
+}
diff --git a/src/utilities/icon.vala b/src/images/icon.vala
index 1c8a9f4..1c8a9f4 100644
--- a/src/utilities/icon.vala
+++ b/src/images/icon.vala
diff --git a/src/utilities/image.vala b/src/images/image.vala
index 836e4e2..836e4e2 100644
--- a/src/utilities/image.vala
+++ b/src/images/image.vala
diff --git a/src/utilities/renderedText.vala b/src/images/renderedText.vala
index 924742a..924742a 100644
--- a/src/utilities/renderedText.vala
+++ b/src/images/renderedText.vala
diff --git a/src/utilities/themedIcon.vala b/src/images/themedIcon.vala
index 29ae380..29ae380 100644
--- a/src/utilities/themedIcon.vala
+++ b/src/images/themedIcon.vala
diff --git a/src/pies/defaultConfig.vala b/src/pies/defaultConfig.vala
index bd981b5..87fd30d 100644
--- a/src/pies/defaultConfig.vala
+++ b/src/pies/defaultConfig.vala
@@ -26,14 +26,14 @@ namespace Pies {
public void create_default_config() {
// add a pie with playback controls
- var multimedia = PieManager.create_persistent_pie(_("Multimedia"), "stock_media-play", "<Control><Alt>m");
+ var multimedia = PieManager.create_persistent_pie(_("Multimedia"), "stock_media-play", new Trigger.from_string("<Control><Alt>m"));
multimedia.add_action(new KeyAction(_("Next Track"), "stock_media-next", "XF86AudioNext", true));
multimedia.add_action(new KeyAction(_("Stop"), "stock_media-stop", "XF86AudioStop"));
multimedia.add_action(new KeyAction(_("Previous Track"), "stock_media-prev", "XF86AudioPrev"));
multimedia.add_action(new KeyAction(_("Play/Pause"), "stock_media-play", "XF86AudioPlay"));
// add a pie with the users default applications
- var apps = PieManager.create_persistent_pie(_("Applications"), "applications-accessories", "<Control><Alt>a");
+ var apps = PieManager.create_persistent_pie(_("Applications"), "applications-accessories", new Trigger.from_string("<Control><Alt>a"));
apps.add_action(ActionRegistry.default_for_mime_type("text/plain"));
apps.add_action(ActionRegistry.default_for_mime_type("audio/ogg"));
apps.add_action(ActionRegistry.default_for_mime_type("video/ogg"));
@@ -42,20 +42,20 @@ namespace Pies {
apps.add_action(ActionRegistry.default_for_uri("mailto"));
// add a pie with the users bookmarks and devices
- var bookmarks = PieManager.create_persistent_pie(_("Bookmarks"), "user-bookmarks", "<Control><Alt>b");
+ var bookmarks = PieManager.create_persistent_pie(_("Bookmarks"), "user-bookmarks", new Trigger.from_string("<Control><Alt>b"));
bookmarks.add_group(new BookmarkGroup(bookmarks.id));
bookmarks.add_group(new DevicesGroup(bookmarks.id));
// add a pie with session controls
- var session = PieManager.create_persistent_pie(_("Session"), "gnome-session-halt", "<Control><Alt>q");
+ var session = PieManager.create_persistent_pie(_("Session"), "gnome-session-halt", new Trigger.from_string("<Control><Alt>q"));
session.add_group(new SessionGroup(session.id));
// add a pie with a main menu
- var menu = PieManager.create_persistent_pie(_("Main Menu"), "alacarte", "<Control><Alt>space");
+ var menu = PieManager.create_persistent_pie(_("Main Menu"), "alacarte", new Trigger.from_string("<Control><Alt>space"));
menu.add_group(new MenuGroup(menu.id));
// add a pie with window controls
- var window = PieManager.create_persistent_pie(_("Window"), "gnome-window-manager", "<Control><Alt>w");
+ var window = PieManager.create_persistent_pie(_("Window"), "gnome-window-manager", new Trigger.from_string("<Control><Alt>w"));
window.add_action(new KeyAction(_("Scale"), "top", "<Control><Alt>s"));
window.add_action(new KeyAction(_("Minimize"), "bottom", "<Alt>F9", true));
window.add_action(new KeyAction(_("Close"), "window-close", "<Alt>F4"));
diff --git a/src/pies/load.vala b/src/pies/load.vala
index 912ddf0..98fd72f 100644
--- a/src/pies/load.vala
+++ b/src/pies/load.vala
@@ -115,7 +115,7 @@ namespace Pies {
}
// add a new Pie with the loaded properties
- var pie = PieManager.create_persistent_pie(name, icon, hotkey, id);
+ var pie = PieManager.create_persistent_pie(name, icon, new Trigger.from_string(hotkey), id);
// and parse all child elements
for (Xml.Node* slice = node->children; slice != null; slice = slice->next) {
diff --git a/src/pies/pieManager.vala b/src/pies/pieManager.vala
index eb031d0..5f84ea0 100644
--- a/src/pies/pieManager.vala
+++ b/src/pies/pieManager.vala
@@ -103,6 +103,14 @@ public class PieManager : GLib.Object {
}
/////////////////////////////////////////////////////////////////////
+ /// Returns true if the pie with the given id is in turbo mode.
+ /////////////////////////////////////////////////////////////////////
+
+ public static bool get_is_turbo(string id) {
+ return bindings.get_is_turbo(id);
+ }
+
+ /////////////////////////////////////////////////////////////////////
/// Returns the name of the Pie with the given ID.
/////////////////////////////////////////////////////////////////////
@@ -113,14 +121,23 @@ public class PieManager : GLib.Object {
}
/////////////////////////////////////////////////////////////////////
+ /// Returns the name ID of the Pie bound to the given Trigger.
+ /// Returns "" if there is nothing bound to this trigger.
+ /////////////////////////////////////////////////////////////////////
+
+ public static string get_assigned_id(Trigger trigger) {
+ return bindings.get_assigned_id(trigger);
+ }
+
+ /////////////////////////////////////////////////////////////////////
/// Creates a new Pie which is displayed in the configuration dialog
/// and gets saved.
/////////////////////////////////////////////////////////////////////
- public static Pie create_persistent_pie(string name, string icon_name, string hotkey, string? desired_id = null) {
+ public static Pie create_persistent_pie(string name, string icon_name, Trigger? hotkey, string? desired_id = null) {
Pie pie = create_pie(name, icon_name, 100, 999, desired_id);
- if (hotkey != "") bindings.bind(hotkey, pie.id);
+ if (hotkey != null) bindings.bind(hotkey, pie.id);
create_launcher(pie.id);
diff --git a/src/renderers/centerRenderer.vala b/src/renderers/centerRenderer.vala
index c30e9ce..fab633e 100644
--- a/src/renderers/centerRenderer.vala
+++ b/src/renderers/centerRenderer.vala
@@ -19,17 +19,44 @@ using GLib.Math;
namespace GnomePie {
-// Renders the center of a Pie.
+/////////////////////////////////////////////////////////////////////////
+/// Renders the center of a Pie.
+/////////////////////////////////////////////////////////////////////////
public class CenterRenderer : GLib.Object {
+ /////////////////////////////////////////////////////////////////////
+ /// The PieRenderer which owns this CenterRenderer.
+ /////////////////////////////////////////////////////////////////////
+
private unowned PieRenderer parent;
+
+ /////////////////////////////////////////////////////////////////////
+ /// The caption drawn in the center. Changes when the active slice
+ /// changes.
+ /////////////////////////////////////////////////////////////////////
+
private unowned Image? caption;
+
+ /////////////////////////////////////////////////////////////////////
+ /// The color of the currently active slice. Used to colorize layers.
+ /////////////////////////////////////////////////////////////////////
+
private Color color;
+ /////////////////////////////////////////////////////////////////////
+ /// Two AnimatedValues: alpha is for global transparency (when
+ /// fading in/out), activity is 1.0 if there is an active slice and
+ /// 0.0 if there is no active slice.
+ /////////////////////////////////////////////////////////////////////
+
private AnimatedValue activity;
private AnimatedValue alpha;
+ /////////////////////////////////////////////////////////////////////
+ /// C'tor, initializes all members.
+ /////////////////////////////////////////////////////////////////////
+
public CenterRenderer(PieRenderer parent) {
this.parent = parent;
this.activity = new AnimatedValue.linear(0.0, 0.0, Config.global.theme.transition_time);
@@ -38,11 +65,21 @@ public class CenterRenderer : GLib.Object {
this.caption = null;
}
+ /////////////////////////////////////////////////////////////////////
+ /// Initiates the fade-out animation by resetting the targets of the
+ /// AnimatedValues to 0.0.
+ /////////////////////////////////////////////////////////////////////
+
public void fade_out() {
this.activity.reset_target(0.0, Config.global.theme.fade_out_time);
this.alpha.reset_target(0.0, Config.global.theme.fade_out_time);
}
+ /////////////////////////////////////////////////////////////////////
+ /// Should be called if the active slice of the PieRenderer changes.
+ /// The members activity, caption and color are set accordingly.
+ /////////////////////////////////////////////////////////////////////
+
public void set_active_slice(SliceRenderer? active_slice) {
if (active_slice == null) {
this.activity.reset_target(0.0, Config.global.theme.transition_time);
@@ -53,17 +90,23 @@ public class CenterRenderer : GLib.Object {
}
}
+ /////////////////////////////////////////////////////////////////////
+ /// Draws all center layers and the caption.
+ /////////////////////////////////////////////////////////////////////
+
public void draw(double frame_time, Cairo.Context ctx, double angle, double distance) {
-
+ // get all center_layers
var layers = Config.global.theme.center_layers;
+ // update the AnimatedValues
this.activity.update(frame_time);
this.alpha.update(frame_time);
+ // draw each layer
foreach (var layer in layers) {
-
ctx.save();
+ // calculate all values needed for animation/drawing
double active_speed = (layer.active_rotation_mode == CenterLayer.RotationMode.TO_MOUSE) ?
0.0 : layer.active_rotation_speed;
double inactive_speed = (layer.inactive_rotation_mode == CenterLayer.RotationMode.TO_MOUSE) ?
@@ -114,10 +157,14 @@ public class CenterRenderer : GLib.Object {
if (colorize > 0.0) ctx.push_group();
+ // transform the context
ctx.rotate(layer.rotation);
ctx.scale(max_scale, max_scale);
+
+ // paint the layer
layer.image.paint_on(ctx, this.alpha.val*max_alpha);
+ // colorize it, if necessary
if (colorize > 0.0) {
ctx.set_operator(Cairo.Operator.ATOP);
ctx.set_source_rgb(this.color.r, this.color.g, this.color.b);
@@ -135,7 +182,7 @@ public class CenterRenderer : GLib.Object {
if (Config.global.theme.caption && caption != null && this.activity.val > 0) {
ctx.save();
ctx.identity_matrix();
- int pos = this.parent.get_size()/2;
+ int pos = this.parent.size/2;
ctx.translate(pos, (int)(Config.global.theme.caption_position) + pos);
caption.paint_on(ctx, this.activity.val*this.alpha.val);
ctx.restore();
diff --git a/src/renderers/pieRenderer.vala b/src/renderers/pieRenderer.vala
index 5b706f4..ffaf776 100644
--- a/src/renderers/pieRenderer.vala
+++ b/src/renderers/pieRenderer.vala
@@ -26,15 +26,60 @@ namespace GnomePie {
public class PieRenderer : GLib.Object {
+ /////////////////////////////////////////////////////////////////////
+ /// The index of the slice used for quick action. (The action which
+ /// gets executed when the user clicks on the middle of the pie)
+ /////////////////////////////////////////////////////////////////////
+
public int quick_action { get; private set; }
+
+ /////////////////////////////////////////////////////////////////////
+ /// The index of the currently active slice.
+ /////////////////////////////////////////////////////////////////////
+
public int active_slice { get; private set; }
+
+ /////////////////////////////////////////////////////////////////////
+ /// True, if the hot keys are currently displayed.
+ /////////////////////////////////////////////////////////////////////
+
public bool show_hotkeys { get; set; }
- private int size;
+ /////////////////////////////////////////////////////////////////////
+ /// The width and height of the Pie in pixels.
+ /////////////////////////////////////////////////////////////////////
+
+ public int size { get; private set; }
+
+ /////////////////////////////////////////////////////////////////////
+ /// True if the pie should close when it's trigger is released.
+ /////////////////////////////////////////////////////////////////////
+
+ public bool turbo_mode { get; private set; default=false; }
+
+ /////////////////////////////////////////////////////////////////////
+ /// All SliceRenderers used to draw this Pie.
+ /////////////////////////////////////////////////////////////////////
+
private Gee.ArrayList<SliceRenderer?> slices;
+
+ /////////////////////////////////////////////////////////////////////
+ /// The renderer for the center of this pie.
+ /////////////////////////////////////////////////////////////////////
+
private CenterRenderer center;
+
+ /////////////////////////////////////////////////////////////////////
+ /// True if the pie is currently navigated with the keyboard. This is
+ /// set to false as soon as the mouse moves.
+ /////////////////////////////////////////////////////////////////////
+
private bool key_board_control = false;
+ /////////////////////////////////////////////////////////////////////
+ /// C'tor, initializes members.
+ /////////////////////////////////////////////////////////////////////
+
public PieRenderer() {
this.slices = new Gee.ArrayList<SliceRenderer?>();
this.center = new CenterRenderer(this);
@@ -43,6 +88,10 @@ public class PieRenderer : GLib.Object {
this.size = 0;
}
+ /////////////////////////////////////////////////////////////////////
+ /// Loads an Pie. All members are initialized accordingly.
+ /////////////////////////////////////////////////////////////////////
+
public void load_pie(Pie pie) {
this.slices.clear();
@@ -61,6 +110,8 @@ public class PieRenderer : GLib.Object {
}
}
+ this.turbo_mode = PieManager.get_is_turbo(pie.id);
+
this.set_highlighted_slice(this.quick_action);
this.size = (int)fmax(2*Config.global.theme.radius + 2*Config.global.theme.slice_radius*Config.global.theme.max_zoom,
@@ -74,12 +125,20 @@ public class PieRenderer : GLib.Object {
}
}
+ /////////////////////////////////////////////////////////////////////
+ /// Activates the currently active slice.
+ /////////////////////////////////////////////////////////////////////
+
public void activate() {
if (this.active_slice >= 0 && this.active_slice < this.slices.size)
slices[active_slice].activate();
this.cancel();
}
+ /////////////////////////////////////////////////////////////////////
+ /// Asks all renders to fade out.
+ /////////////////////////////////////////////////////////////////////
+
public void cancel() {
foreach (var slice in this.slices)
slice.fade_out();
@@ -87,6 +146,11 @@ public class PieRenderer : GLib.Object {
center.fade_out();
}
+ /////////////////////////////////////////////////////////////////////
+ /// Called when the up-key is pressed. Selects the next slice towards
+ /// the top.
+ /////////////////////////////////////////////////////////////////////
+
public void select_up() {
int bottom = this.slice_count()/4;
int top = this.slice_count()*3/4;
@@ -99,6 +163,11 @@ public class PieRenderer : GLib.Object {
this.set_highlighted_slice((this.active_slice-1+this.slice_count())%this.slice_count());
}
+ /////////////////////////////////////////////////////////////////////
+ /// Called when the down-key is pressed. Selects the next slice
+ /// towards the bottom.
+ /////////////////////////////////////////////////////////////////////
+
public void select_down() {
int bottom = this.slice_count()/4;
int top = this.slice_count()*3/4;
@@ -111,6 +180,11 @@ public class PieRenderer : GLib.Object {
this.set_highlighted_slice((this.active_slice+1)%this.slice_count());
}
+ /////////////////////////////////////////////////////////////////////
+ /// Called when the left-key is pressed. Selects the next slice
+ /// towards the left.
+ /////////////////////////////////////////////////////////////////////
+
public void select_left() {
int left = this.slice_count()/2;
int right = 0;
@@ -123,6 +197,11 @@ public class PieRenderer : GLib.Object {
this.set_highlighted_slice(this.active_slice+1);
}
+ /////////////////////////////////////////////////////////////////////
+ /// Called when the right-key is pressed. Selects the next slice
+ /// towards the right.
+ /////////////////////////////////////////////////////////////////////
+
public void select_right() {
int left = this.slice_count()/2;
int right = 0;
@@ -135,13 +214,17 @@ public class PieRenderer : GLib.Object {
this.set_highlighted_slice((this.active_slice-1+this.slice_count())%this.slice_count());
}
+ /////////////////////////////////////////////////////////////////////
+ /// Returns the amount of slices in this pie.
+ /////////////////////////////////////////////////////////////////////
+
public int slice_count() {
return slices.size;
}
- public int get_size() {
- return size;
- }
+ /////////////////////////////////////////////////////////////////////
+ /// Draws the entire pie.
+ /////////////////////////////////////////////////////////////////////
public void draw(double frame_time, Cairo.Context ctx, int mouse_x, int mouse_y) {
double distance = sqrt(mouse_x*mouse_x + mouse_y*mouse_y);
@@ -179,10 +262,18 @@ public class PieRenderer : GLib.Object {
slice.draw(frame_time, ctx, angle, distance);
}
+ /////////////////////////////////////////////////////////////////////
+ /// Called when the user moves the mouse.
+ /////////////////////////////////////////////////////////////////////
+
public void on_mouse_move() {
this.key_board_control = false;
}
+ /////////////////////////////////////////////////////////////////////
+ /// Called when the currently active slice changes.
+ /////////////////////////////////////////////////////////////////////
+
public void set_highlighted_slice(int index) {
if (index != this.active_slice) {
if (index >= 0 && index < this.slice_count())
diff --git a/src/renderers/pieWindow.vala b/src/renderers/pieWindow.vala
index c4ac2ec..59117df 100644
--- a/src/renderers/pieWindow.vala
+++ b/src/renderers/pieWindow.vala
@@ -19,19 +19,52 @@ using GLib.Math;
namespace GnomePie {
-// An invisible window. Used to draw Pies onto.
+/////////////////////////////////////////////////////////////////////////
+/// An invisible window. Used to draw Pies onto.
+/////////////////////////////////////////////////////////////////////////
public class PieWindow : Gtk.Window {
+
+ /////////////////////////////////////////////////////////////////////
+ /// Signal which gets emitted when the PieWindow is about to close.
+ /////////////////////////////////////////////////////////////////////
public signal void on_closing();
+
+ /////////////////////////////////////////////////////////////////////
+ /// The owned renderer.
+ /////////////////////////////////////////////////////////////////////
private PieRenderer renderer;
+
+ /////////////////////////////////////////////////////////////////////
+ /// True, if the Pie is currently fading out.
+ /////////////////////////////////////////////////////////////////////
+
private bool closing = false;
+
+ /////////////////////////////////////////////////////////////////////
+ /// A timer used for calculating the frame time.
+ /////////////////////////////////////////////////////////////////////
+
private GLib.Timer timer;
+ /////////////////////////////////////////////////////////////////////
+ /// True, if the screen supports compositing.
+ /////////////////////////////////////////////////////////////////////
+
private bool has_compositing = false;
+ /////////////////////////////////////////////////////////////////////
+ /// The background image used for fake transparency if
+ /// has_compositing is false.
+ /////////////////////////////////////////////////////////////////////
+
private Image background = null;
+
+ /////////////////////////////////////////////////////////////////////
+ /// C'tor, sets up the window.
+ /////////////////////////////////////////////////////////////////////
public PieWindow() {
this.renderer = new PieRenderer();
@@ -46,19 +79,27 @@ public class PieWindow : Gtk.Window {
this.icon_name = "gnome-pie";
this.set_accept_focus(false);
+ // check for compositing
if (this.screen.is_composited()) {
this.set_colormap(this.screen.get_rgba_colormap());
this.has_compositing = true;
}
+ // set up event filter
this.add_events(Gdk.EventMask.BUTTON_RELEASE_MASK |
Gdk.EventMask.KEY_RELEASE_MASK |
Gdk.EventMask.KEY_PRESS_MASK |
Gdk.EventMask.POINTER_MOTION_MASK);
+ // activate on left click
this.button_release_event.connect ((e) => {
- if (e.button == 1) this.activate_slice();
- else this.cancel();
+ if (e.button == 1 || this.renderer.turbo_mode) this.activate_slice();
+ return true;
+ });
+
+ // cancel on right click
+ this.button_press_event.connect ((e) => {
+ if (e.button == 3) this.cancel();
return true;
});
@@ -72,32 +113,44 @@ public class PieWindow : Gtk.Window {
return true;
});
+ // activate on key release if turbo_mode is enabled
this.key_release_event.connect((e) => {
last_key = 0;
- if (Config.global.turbo_mode)
+ if (this.renderer.turbo_mode)
this.activate_slice();
else
this.handle_key_release(e.keyval);
return true;
});
+ // notify the renderer of mouse move events
this.motion_notify_event.connect((e) => {
this.renderer.on_mouse_move();
return true;
});
+ // draw the pie on expose
this.expose_event.connect(this.draw);
}
+
+ /////////////////////////////////////////////////////////////////////
+ /// Loads a Pie to be rendered.
+ /////////////////////////////////////////////////////////////////////
public void load_pie(Pie pie) {
this.renderer.load_pie(pie);
this.set_window_position();
- this.set_size_request(renderer.get_size(), renderer.get_size());
+ this.set_size_request(renderer.size, renderer.size);
}
+ /////////////////////////////////////////////////////////////////////
+ /// Opens the window. load_pie should have been called before.
+ /////////////////////////////////////////////////////////////////////
+
public void open() {
this.realize();
+ // capture the background image if there is no compositing
if (!this.has_compositing) {
int x, y, width, height;
this.get_position(out x, out y);
@@ -105,23 +158,31 @@ public class PieWindow : Gtk.Window {
this.background = new Image.capture_screen(x, y, width+1, height+1);
}
+ // capture the input focus
this.show();
- this.fix_focus();
+ FocusGrabber.grab(this);
+ // start the timer
this.timer = new GLib.Timer();
this.timer.start();
this.queue_draw();
+ // the main draw loop
Timeout.add((uint)(1000.0/Config.global.refresh_rate), () => {
this.queue_draw();
return this.visible;
});
}
+
+ /////////////////////////////////////////////////////////////////////
+ /// Draw the Pie.
+ /////////////////////////////////////////////////////////////////////
private bool draw(Gtk.Widget da, Gdk.EventExpose event) {
// clear the window
var ctx = Gdk.cairo_create(this.window);
+ // paint the background image if there is no compositing
if (this.has_compositing) {
ctx.set_operator (Cairo.Operator.CLEAR);
ctx.paint();
@@ -132,59 +193,80 @@ public class PieWindow : Gtk.Window {
ctx.paint();
}
+ // align the context to the center of the PieWindow
ctx.translate(this.width_request*0.5, this.height_request*0.5);
-
+
+ // get the mouse position
double mouse_x = 0.0, mouse_y = 0.0;
this.get_pointer(out mouse_x, out mouse_y);
+ // store the frame time
double frame_time = this.timer.elapsed();
this.timer.reset();
+ // render the Pie
this.renderer.draw(frame_time, ctx, (int)(mouse_x - this.width_request*0.5),
(int)(mouse_y - this.height_request*0.5));
return true;
}
+ /////////////////////////////////////////////////////////////////////
+ /// Activates the currently activate slice.
+ /////////////////////////////////////////////////////////////////////
+
private void activate_slice() {
if (!this.closing) {
this.closing = true;
this.on_closing();
- this.unfix_focus();
+ FocusGrabber.ungrab(this);
this.renderer.activate();
Timeout.add((uint)(Config.global.theme.fade_out_time*1000), () => {
this.destroy();
- //ThemedIcon.clear_cache();
+ ThemedIcon.clear_cache();
return false;
});
}
}
+ /////////////////////////////////////////////////////////////////////
+ /// Activates no slice and closes the PieWindow.
+ /////////////////////////////////////////////////////////////////////
+
private void cancel() {
if (!this.closing) {
this.closing = true;
this.on_closing();
- this.unfix_focus();
+ FocusGrabber.ungrab(this);
this.renderer.cancel();
Timeout.add((uint)(Config.global.theme.fade_out_time*1000), () => {
this.destroy();
- //ThemedIcon.clear_cache();
+ ThemedIcon.clear_cache();
return false;
});
}
}
+ /////////////////////////////////////////////////////////////////////
+ /// Sets the position of the window to the center of the screen or to
+ /// the mouse.
+ /////////////////////////////////////////////////////////////////////
+
private void set_window_position() {
if(Config.global.open_at_mouse) this.set_position(Gtk.WindowPosition.MOUSE);
else this.set_position(Gtk.WindowPosition.CENTER);
}
+ /////////////////////////////////////////////////////////////////////
+ /// Do some useful stuff when keys are pressed.
+ /////////////////////////////////////////////////////////////////////
+
private void handle_key_press(uint key) {
if (Gdk.keyval_name(key) == "Escape") this.cancel();
else if (Gdk.keyval_name(key) == "Return") this.activate_slice();
- else if (!Config.global.turbo_mode) {
+ else if (!this.renderer.turbo_mode) {
if (Gdk.keyval_name(key) == "Up") this.renderer.select_up();
else if (Gdk.keyval_name(key) == "Down") this.renderer.select_down();
else if (Gdk.keyval_name(key) == "Left") this.renderer.select_left();
@@ -212,52 +294,15 @@ public class PieWindow : Gtk.Window {
}
}
+ /////////////////////////////////////////////////////////////////////
+ /// Do some useful stuff when keys are released.
+ /////////////////////////////////////////////////////////////////////
+
private void handle_key_release(uint key) {
- if (!Config.global.turbo_mode) {
+ if (!this.renderer.turbo_mode) {
if (Gdk.keyval_name(key) == "Alt_L") this.renderer.show_hotkeys = false;
}
}
-
- // utilities for grabbing focus
- // Code from Gnome-Do/Synapse
- private void fix_focus() {
- uint32 timestamp = Gtk.get_current_event_time();
- this.present_with_time(timestamp);
- this.get_window().raise();
- this.get_window().focus(timestamp);
-
- int i = 0;
- Timeout.add(100, () => {
- if (++i >= 100) return false;
- return !try_grab_window();
- });
- }
-
- // Code from Gnome-Do/Synapse
- private void unfix_focus() {
- uint32 time = Gtk.get_current_event_time();
- Gdk.pointer_ungrab(time);
- Gdk.keyboard_ungrab(time);
- Gtk.grab_remove(this);
- }
-
- // Code from Gnome-Do/Synapse
- private bool try_grab_window() {
- uint time = Gtk.get_current_event_time();
- if (Gdk.pointer_grab(this.get_window(), true, Gdk.EventMask.BUTTON_PRESS_MASK |
- Gdk.EventMask.BUTTON_RELEASE_MASK | Gdk.EventMask.POINTER_MOTION_MASK,
- null, null, time) == Gdk.GrabStatus.SUCCESS) {
-
- if (Gdk.keyboard_grab(this.get_window(), true, time) == Gdk.GrabStatus.SUCCESS) {
- Gtk.grab_add(this);
- return true;
- } else {
- Gdk.pointer_ungrab(time);
- return false;
- }
- }
- return false;
- }
}
}
diff --git a/src/renderers/sliceRenderer.vala b/src/renderers/sliceRenderer.vala
index 08c880f..61c50b1 100644
--- a/src/renderers/sliceRenderer.vala
+++ b/src/renderers/sliceRenderer.vala
@@ -19,28 +19,77 @@ using GLib.Math;
namespace GnomePie {
-// Renders a Slice of a Pie. According to the current theme.
+/////////////////////////////////////////////////////////////////////////
+/// Renders a Slice of a Pie. According to the current theme.
+/////////////////////////////////////////////////////////////////////////
public class SliceRenderer : GLib.Object {
+ /////////////////////////////////////////////////////////////////////
+ /// Whether this slice is active (hovered) or not.
+ /////////////////////////////////////////////////////////////////////
+
public bool active {get; private set; default = false;}
+
+ /////////////////////////////////////////////////////////////////////
+ /// The Image which should be displayed as center caption when this
+ /// slice is active.
+ /////////////////////////////////////////////////////////////////////
+
public Image caption {get; private set;}
+
+ /////////////////////////////////////////////////////////////////////
+ /// The color which should be used for colorizing center layers when
+ /// this slice is active.
+ /////////////////////////////////////////////////////////////////////
+
public Color color {get; private set;}
+ /////////////////////////////////////////////////////////////////////
+ /// The two Images used, when this slice is active or not.
+ /////////////////////////////////////////////////////////////////////
+
private Image active_icon;
private Image inactive_icon;
+
+ /////////////////////////////////////////////////////////////////////
+ /// The Image displaying the associated hot key of this slice.
+ /////////////////////////////////////////////////////////////////////
+
private Image hotkey;
+ /////////////////////////////////////////////////////////////////////
+ /// The Action which is rendered by this SliceRenderer.
+ /////////////////////////////////////////////////////////////////////
+
private Action action;
+
+ /////////////////////////////////////////////////////////////////////
+ /// The PieRenderer which owns this SliceRenderer.
+ /////////////////////////////////////////////////////////////////////
private unowned PieRenderer parent;
+
+ /////////////////////////////////////////////////////////////////////
+ /// The index of this slice in a pie. Clockwise assigned, starting
+ /// from the right-most slice.
+ /////////////////////////////////////////////////////////////////////
+
private int position;
- private AnimatedValue fade;
- private AnimatedValue scale;
- private AnimatedValue alpha;
- private AnimatedValue fade_rotation;
- private AnimatedValue fade_scale;
+ /////////////////////////////////////////////////////////////////////
+ /// AnimatedValues needed for a slice.
+ /////////////////////////////////////////////////////////////////////
+
+ private AnimatedValue fade; // for transitions from active to inactive
+ private AnimatedValue scale; // for zoom effect
+ private AnimatedValue alpha; // for fading in/out
+ private AnimatedValue fade_rotation; // for fading in/out
+ private AnimatedValue fade_scale; // for fading in/out
+
+ /////////////////////////////////////////////////////////////////////
+ /// C'tor, initializes all AnimatedValues.
+ /////////////////////////////////////////////////////////////////////
public SliceRenderer(PieRenderer parent) {
this.parent = parent;
@@ -60,6 +109,10 @@ public class SliceRenderer : GLib.Object {
Config.global.theme.fade_in_rotation, 0.0,
Config.global.theme.fade_in_time);
}
+
+ /////////////////////////////////////////////////////////////////////
+ /// Loads an Action. All members are initialized accordingly.
+ /////////////////////////////////////////////////////////////////////
public void load(Action action, int position) {
this.position = position;
@@ -88,10 +141,19 @@ public class SliceRenderer : GLib.Object {
(int)Config.global.theme.slice_radius*2, "sans 20");
}
+ /////////////////////////////////////////////////////////////////////
+ /// Activaes the Action of this slice.
+ /////////////////////////////////////////////////////////////////////
+
public void activate() {
action.activate();
}
+ /////////////////////////////////////////////////////////////////////
+ /// Initiates the fade-out animation by resetting the targets of the
+ /// AnimatedValues to 0.0.
+ /////////////////////////////////////////////////////////////////////
+
public void fade_out() {
this.alpha.reset_target(0.0, Config.global.theme.fade_out_time);
this.fade_scale = new AnimatedValue.cubic(AnimatedValue.Direction.IN,
@@ -105,6 +167,11 @@ public class SliceRenderer : GLib.Object {
Config.global.theme.fade_out_time);
}
+ /////////////////////////////////////////////////////////////////////
+ /// Should be called if the active slice of the PieRenderer changes.
+ /// The members activity, caption and color are set accordingly.
+ /////////////////////////////////////////////////////////////////////
+
public void set_active_slice(SliceRenderer? active_slice) {
if (active_slice == this) {
this.fade.reset_target(1.0, Config.global.theme.transition_time);
@@ -112,6 +179,10 @@ public class SliceRenderer : GLib.Object {
this.fade.reset_target(0.0, Config.global.theme.transition_time);
}
}
+
+ /////////////////////////////////////////////////////////////////////
+ /// Draws all layers of the slice.
+ /////////////////////////////////////////////////////////////////////
public void draw(double frame_time, Cairo.Context ctx, double angle, double distance) {
@@ -134,6 +205,7 @@ public class SliceRenderer : GLib.Object {
if (fabs(this.scale.end - max_scale) > Config.global.theme.max_zoom*0.005)
this.scale.reset_target(max_scale, Config.global.theme.transition_time);
+ // update the AnimatedValues
this.scale.update(frame_time);
this.alpha.update(frame_time);
this.fade.update(frame_time);
@@ -142,14 +214,17 @@ public class SliceRenderer : GLib.Object {
ctx.save();
+ // distance from the center
double radius = Config.global.theme.radius;
+ // increase radius if there are many slices in a pie
if (atan((Config.global.theme.slice_radius+Config.global.theme.slice_gap)
/(radius/Config.global.theme.max_zoom)) > PI/parent.slice_count()) {
radius = (Config.global.theme.slice_radius+Config.global.theme.slice_gap)
/tan(PI/parent.slice_count())*Config.global.theme.max_zoom;
}
+ // transform the context
ctx.scale(scale.val*fade_scale.val, scale.val*fade_scale.val);
ctx.translate(cos(direction)*radius, sin(direction)*radius);
@@ -157,6 +232,7 @@ public class SliceRenderer : GLib.Object {
ctx.set_operator(Cairo.Operator.ADD);
+ // paint the images
if (fade.val > 0.0) active_icon.paint_on(ctx, this.alpha.val*this.fade.val);
if (fade.val < 1.0) inactive_icon.paint_on(ctx, this.alpha.val*(1.0 - fade.val));
@@ -172,6 +248,7 @@ public class SliceRenderer : GLib.Object {
ctx.pop_group_to_source();
ctx.paint();
+ // draw hotkeys if necassary
if (this.parent.show_hotkeys)
this.hotkey.paint_on(ctx, 1.0);
diff --git a/src/themes/theme.vala b/src/themes/theme.vala
index fa6f55a..284e1ef 100644
--- a/src/themes/theme.vala
+++ b/src/themes/theme.vala
@@ -71,8 +71,6 @@ public class Theme : GLib.Object {
this.inactive_slice_layers = new Gee.ArrayList<SliceLayer?>();
this.directory = dir;
-
- this.load();
}
/////////////////////////////////////////////////////////////////////
@@ -80,7 +78,7 @@ public class Theme : GLib.Object {
/// explicitly.
/////////////////////////////////////////////////////////////////////
- public void load() {
+ public bool load() {
this.center_layers.clear();
this.active_slice_layers.clear();
this.inactive_slice_layers.clear();
@@ -90,15 +88,15 @@ public class Theme : GLib.Object {
Xml.Doc* themeXML = Xml.Parser.parse_file(path);
if (themeXML == null) {
- warning("Error parsing theme: \"" + path + "\" not found!");
- return;
+ warning("Failed to add theme: \"" + path + "\" not found!");
+ return false;
}
Xml.Node* root = themeXML->get_root_element();
if (root == null) {
delete themeXML;
- warning("Invalid theme \"" + this.directory + "\": theme.xml is empty!");
- return;
+ warning("Failed to add theme: \"theme.xml\" is empty!");
+ return false;
}
this.parse_root(root);
@@ -107,6 +105,8 @@ public class Theme : GLib.Object {
Xml.Parser.cleanup();
this.radius *= max_zoom;
+
+ return true;
}
/////////////////////////////////////////////////////////////////////
diff --git a/src/utilities/bindingManager.vala b/src/utilities/bindingManager.vala
index 8795124..437f4c1 100644
--- a/src/utilities/bindingManager.vala
+++ b/src/utilities/bindingManager.vala
@@ -53,6 +53,10 @@ public class BindingManager : GLib.Object {
Gdk.ModifierType.LOCK_MASK|Gdk.ModifierType.MOD5_MASK,
Gdk.ModifierType.MOD2_MASK|Gdk.ModifierType.LOCK_MASK|Gdk.ModifierType.MOD5_MASK
};
+
+ private uint32 delayed_count = 0;
+ private X.Event? delayed_event = null;
+ private Keybinding? delayed_binding = null;
/////////////////////////////////////////////////////////////////////
/// Helper class to store keybinding
@@ -60,16 +64,12 @@ public class BindingManager : GLib.Object {
private class Keybinding {
- public Keybinding(string accelerator, int keycode, Gdk.ModifierType modifiers, string id) {
- this.accelerator = accelerator;
- this.keycode = keycode;
- this.modifiers = modifiers;
+ public Keybinding(Trigger trigger, string id) {
+ this.trigger = trigger;
this.id = id;
}
- public string accelerator { get; set; }
- public int keycode { get; set; }
- public Gdk.ModifierType modifiers { get; set; }
+ public Trigger trigger { get; set; }
public string id { get; set; }
}
@@ -89,32 +89,30 @@ public class BindingManager : GLib.Object {
/// Binds the ID to the given accelerator.
/////////////////////////////////////////////////////////////////////
- public void bind(string accelerator, string id) {
- uint keysym;
- Gdk.ModifierType modifiers;
- Gtk.accelerator_parse(accelerator, out keysym, out modifiers);
+ public void bind(Trigger trigger, string id) {
+ if(trigger.key_code != 0) {
+ Gdk.Window rootwin = Gdk.get_default_root_window();
+ X.Display display = Gdk.x11_drawable_get_xdisplay(rootwin);
+ X.ID xid = Gdk.x11_drawable_get_xid(rootwin);
- if (keysym == 0) {
- warning("Invalid keystroke: " + accelerator);
- return;
- }
-
- Gdk.Window rootwin = Gdk.get_default_root_window();
- X.Display display = Gdk.x11_drawable_get_xdisplay(rootwin);
- X.ID xid = Gdk.x11_drawable_get_xid(rootwin);
- int keycode = display.keysym_to_keycode(keysym);
-
- if(keycode != 0) {
Gdk.error_trap_push();
foreach(uint lock_modifier in lock_modifiers) {
- display.grab_key(keycode, modifiers|lock_modifier, xid, false, X.GrabMode.Async, X.GrabMode.Async);
+ if (trigger.with_mouse) {
+ display.grab_button(trigger.key_code, trigger.modifiers|lock_modifier, xid, false,
+ X.EventMask.ButtonPressMask | X.EventMask.ButtonReleaseMask,
+ X.GrabMode.Async, X.GrabMode.Async, xid, 0);
+ } else {
+ display.grab_key(trigger.key_code, trigger.modifiers|lock_modifier,
+ xid, false, X.GrabMode.Async, X.GrabMode.Async);
+ }
}
Gdk.flush();
- Keybinding binding = new Keybinding(accelerator, keycode, modifiers, id);
+ Keybinding binding = new Keybinding(trigger, id);
bindings.add(binding);
+ display.flush();
}
}
@@ -130,13 +128,18 @@ public class BindingManager : GLib.Object {
foreach(var binding in bindings) {
if(id == binding.id) {
foreach(uint lock_modifier in lock_modifiers) {
- display.ungrab_key(binding.keycode, binding.modifiers, xid);
+ if (binding.trigger.with_mouse) {
+ display.ungrab_button(binding.trigger.key_code, binding.trigger.modifiers|lock_modifier, xid);
+ } else {
+ display.ungrab_key(binding.trigger.key_code, binding.trigger.modifiers|lock_modifier, xid);
+ }
}
remove_bindings.add(binding);
}
}
bindings.remove_all(remove_bindings);
+ display.flush();
}
/////////////////////////////////////////////////////////////////////
@@ -144,15 +147,13 @@ public class BindingManager : GLib.Object {
/////////////////////////////////////////////////////////////////////
public string get_accelerator_label_of(string id) {
- string accelerator = this.get_accelerator_of(id);
-
- if (accelerator == "")
- return _("Not bound");
+ foreach (var binding in bindings) {
+ if (binding.id == id) {
+ return binding.trigger.label_with_specials;
+ }
+ }
- uint key = 0;
- Gdk.ModifierType mods;
- Gtk.accelerator_parse(accelerator, out key, out mods);
- return Gtk.accelerator_get_label(key, mods);
+ return _("Not bound");
}
/////////////////////////////////////////////////////////////////////
@@ -162,7 +163,38 @@ public class BindingManager : GLib.Object {
public string get_accelerator_of(string id) {
foreach (var binding in bindings) {
if (binding.id == id) {
- return binding.accelerator;
+ return binding.trigger.name;
+ }
+ }
+
+ return "";
+ }
+
+ /////////////////////////////////////////////////////////////////////
+ /// Returns whether the pie with the given ID is in turbo mode.
+ /////////////////////////////////////////////////////////////////////
+
+ public bool get_is_turbo(string id) {
+ foreach (var binding in bindings) {
+ if (binding.id == id) {
+ return binding.trigger.turbo;
+ }
+ }
+
+ return false;
+ }
+
+ /////////////////////////////////////////////////////////////////////
+ /// Returns the name ID of the Pie bound to the given Trigger.
+ /// Returns "" if there is nothing bound to this trigger.
+ /////////////////////////////////////////////////////////////////////
+
+ public string get_assigned_id(Trigger trigger) {
+ foreach (var binding in bindings) {
+ var first = binding.trigger.name.replace("[turbo]", "").replace("[delayed]", "");
+ var second = trigger.name.replace("[turbo]", "").replace("[delayed]", "");
+ if (first == second) {
+ return binding.id;
}
}
@@ -170,12 +202,10 @@ public class BindingManager : GLib.Object {
}
/////////////////////////////////////////////////////////////////////
- /// Event filter method needed to fetch X.Events
+ /// Event filter method needed to fetch X.Events.
/////////////////////////////////////////////////////////////////////
- private Gdk.FilterReturn event_filter(Gdk.XEvent gdk_xevent, Gdk.Event gdk_event) {
- Gdk.FilterReturn filter_return = Gdk.FilterReturn.CONTINUE;
-
+ private Gdk.FilterReturn event_filter(Gdk.XEvent gdk_xevent, Gdk.Event gdk_event) {
void* pointer = &gdk_xevent;
X.Event* xevent = (X.Event*) pointer;
@@ -183,13 +213,92 @@ public class BindingManager : GLib.Object {
foreach(var binding in bindings) {
// remove NumLock, CapsLock and ScrollLock from key state
uint event_mods = xevent.xkey.state & ~ (lock_modifiers[7]);
- if(xevent->xkey.keycode == binding.keycode && event_mods == binding.modifiers) {
- on_press(binding.id);
+ if(xevent->xkey.keycode == binding.trigger.key_code && event_mods == binding.trigger.modifiers) {
+ if (binding.trigger.delayed) {
+ this.activate_delayed(binding, *xevent);
+ } else {
+ on_press(binding.id);
+ }
}
}
}
+ else if(xevent->type == X.EventType.ButtonPress) {
+ foreach(var binding in bindings) {
+ // remove NumLock, CapsLock and ScrollLock from key state
+ uint event_mods = xevent.xbutton.state & ~ (lock_modifiers[7]);
+ if(xevent->xbutton.button == binding.trigger.key_code && event_mods == binding.trigger.modifiers) {
+ if (binding.trigger.delayed) {
+ this.activate_delayed(binding, *xevent);
+ } else {
+ on_press(binding.id);
+ }
+ }
+ }
+ }
+ else if(xevent->type == X.EventType.ButtonRelease || xevent->type == X.EventType.KeyRelease) {
+ this.activate_delayed(null, *xevent);
+ }
- return filter_return;
+ return Gdk.FilterReturn.CONTINUE;
+ }
+
+ /////////////////////////////////////////////////////////////////////
+ /// This method is always called when a trigger is activated which is
+ /// delayed. Therefore on_press() is only emitted, when this method
+ /// is not called again within 300 milliseconds. Else a fake event is
+ /// sent in order to simulate the actual key which has been pressed.
+ /////////////////////////////////////////////////////////////////////
+
+ private void activate_delayed(Keybinding? binding , X.Event event) {
+ // increase event count, so any waiting event will realize that
+ // something happened in the meantime
+ var current_count = ++this.delayed_count;
+
+ if (binding == null && this.delayed_event != null) {
+ // if the trigger is released and an event is currently waiting
+ // simulate that the trigger has been pressed without any inter-
+ // ference of Gnome-Pie
+ Gdk.Window rootwin = Gdk.get_default_root_window();
+ X.Display display = Gdk.x11_drawable_get_xdisplay(rootwin);
+
+ // unbind the trigger, else we'll capture that event again ;)
+ unbind(delayed_binding.id);
+
+ if (this.delayed_binding.trigger.with_mouse) {
+ // simulate mouse click
+ X.Test.fake_button_event(display, this.delayed_event.xbutton.button, true, 0);
+ display.flush();
+
+ X.Test.fake_button_event(display, this.delayed_event.xbutton.button, false, 0);
+ display.flush();
+
+ } else {
+ // simulate key press
+ X.Test.fake_key_event(display, this.delayed_event.xkey.keycode, true, 0);
+ display.flush();
+
+ X.Test.fake_key_event(display, this.delayed_event.xkey.keycode, false, 0);
+ display.flush();
+ }
+
+ // bind it again
+ bind(delayed_binding.trigger, delayed_binding.id);
+ } else if (binding != null) {
+ // if the trigger has been pressed, store it and wait for any interuption
+ // within the next 300 milliseconds
+ this.delayed_event = event;
+ this.delayed_binding = binding;
+
+ Timeout.add(300, () => {
+ // if nothing has been pressed in the meantime
+ if (current_count == this.delayed_count) {
+ this.delayed_binding = null;
+ this.delayed_event = null;
+ on_press(binding.id);
+ }
+ return false;
+ });
+ }
}
}
diff --git a/src/utilities/config.vala b/src/utilities/config.vala
index c5dedd5..cf4311d 100644
--- a/src/utilities/config.vala
+++ b/src/utilities/config.vala
@@ -56,7 +56,6 @@ public class Config : GLib.Object {
public double global_scale { get; set; default = 1.0; }
public bool show_indicator { get; set; default = true; }
public bool open_at_mouse { get; set; default = true; }
- public bool turbo_mode { get; set; default = false; }
public bool auto_start { get; set; default = false; }
public Gee.ArrayList<Theme?> themes { get; private set; }
@@ -73,7 +72,6 @@ public class Config : GLib.Object {
writer.write_attribute("global_scale", global_scale.to_string());
writer.write_attribute("show_indicator", show_indicator ? "true" : "false");
writer.write_attribute("open_at_mouse", open_at_mouse ? "true" : "false");
- writer.write_attribute("turbo_mode", turbo_mode ? "true" : "false");
writer.end_element();
writer.end_document();
}
@@ -119,9 +117,6 @@ public class Config : GLib.Object {
case "open_at_mouse":
open_at_mouse = bool.parse(attr_content);
break;
- case "turbo_mode":
- turbo_mode = bool.parse(attr_content);
- break;
default:
warning("Invalid setting \"" + attr_name + "\" in gnome-pie.conf!");
break;
@@ -160,16 +155,17 @@ public class Config : GLib.Object {
// load global themes
var d = Dir.open(Paths.global_themes);
while ((name = d.read_name()) != null) {
- var theme = new Theme(Paths.global_themes + "/" + name);
- if (theme != null)
- themes.add(theme);
+ var theme = new Theme(Paths.global_themes + "/" + name);
+
+ if (theme.load())
+ themes.add(theme);
}
// load local themes
d = Dir.open(Paths.local_themes);
while ((name = d.read_name()) != null) {
var theme = new Theme(Paths.local_themes + "/" + name);
- if (theme != null)
+ if (theme.load())
themes.add(theme);
}
@@ -185,7 +181,6 @@ public class Config : GLib.Object {
foreach (var t in themes) {
if (t.name == current) {
theme = t;
- theme.load_images();
break;
}
}
@@ -193,6 +188,7 @@ public class Config : GLib.Object {
theme = themes[0];
warning("Theme \"" + current + "\" not found! Using fallback...");
}
+ theme.load_images();
}
else error("No theme found!");
}
diff --git a/src/utilities/focusGrabber.vala b/src/utilities/focusGrabber.vala
new file mode 100644
index 0000000..0e07b39
--- /dev/null
+++ b/src/utilities/focusGrabber.vala
@@ -0,0 +1,74 @@
+/*
+Copyright (c) 2011 by Simon Schneegans
+
+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/>.
+*/
+
+namespace GnomePie {
+
+/////////////////////////////////////////////////////////////////////////
+/// Some helper methods which focus the input on a given Gtk.Window.
+/////////////////////////////////////////////////////////////////////////
+
+public class FocusGrabber : GLib.Object {
+
+ /////////////////////////////////////////////////////////////////////
+ /// Utilities for grabbing focus.
+ /// Code from Gnome-Do/Synapse.
+ /////////////////////////////////////////////////////////////////////
+
+ public static void grab(Gtk.Window window) {
+ window.present_with_time(Gdk.CURRENT_TIME);
+ window.get_window().raise();
+ window.get_window().focus(Gdk.CURRENT_TIME);
+
+ int i = 0;
+ Timeout.add(100, () => {
+ if (++i >= 100) return false;
+ return !try_grab_window(window);
+ });
+ }
+
+ /////////////////////////////////////////////////////////////////////
+ /// Code from Gnome-Do/Synapse.
+ /////////////////////////////////////////////////////////////////////
+
+ public static void ungrab(Gtk.Window window) {
+ Gdk.pointer_ungrab(Gdk.CURRENT_TIME);
+ Gdk.keyboard_ungrab(Gdk.CURRENT_TIME);
+ Gtk.grab_remove(window);
+ }
+
+ /////////////////////////////////////////////////////////////////////
+ /// Code from Gnome-Do/Synapse.
+ /////////////////////////////////////////////////////////////////////
+
+ private static bool try_grab_window(Gtk.Window window) {
+ if (Gdk.pointer_grab(window.get_window(), true, Gdk.EventMask.BUTTON_PRESS_MASK |
+ Gdk.EventMask.BUTTON_RELEASE_MASK | Gdk.EventMask.POINTER_MOTION_MASK,
+ null, null, Gdk.CURRENT_TIME) == Gdk.GrabStatus.SUCCESS) {
+
+ if (Gdk.keyboard_grab(window.get_window(), true, Gdk.CURRENT_TIME) == Gdk.GrabStatus.SUCCESS) {
+ Gtk.grab_add(window);
+ return true;
+ } else {
+ Gdk.pointer_ungrab(Gdk.CURRENT_TIME);
+ return false;
+ }
+ }
+ return false;
+ }
+}
+
+}
diff --git a/src/utilities/trigger.vala b/src/utilities/trigger.vala
new file mode 100644
index 0000000..1f6fcfe
--- /dev/null
+++ b/src/utilities/trigger.vala
@@ -0,0 +1,255 @@
+/*
+Copyright (c) 2011 by Simon Schneegans
+
+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/>.
+*/
+
+namespace GnomePie {
+
+/////////////////////////////////////////////////////////////////////////
+/// This class represents a hotkey, used to open pies. It supports any
+/// combination of modifier keys with keyboard and mouse buttons.
+/////////////////////////////////////////////////////////////////////////
+
+public class Trigger : GLib.Object {
+
+ /////////////////////////////////////////////////////////////////////
+ /// Returns a human-readable version of this Trigger.
+ /////////////////////////////////////////////////////////////////////
+
+ public string label { get; private set; default=""; }
+
+ /////////////////////////////////////////////////////////////////////
+ /// Returns a human-readable version of this Trigger. Small
+ /// identifiers for turbo mode and delayed mode are added.
+ /////////////////////////////////////////////////////////////////////
+
+ public string label_with_specials { get; private set; default=""; }
+
+ /////////////////////////////////////////////////////////////////////
+ /// The Trigger string. Like [delayed]<Control>button3
+ /////////////////////////////////////////////////////////////////////
+
+ public string name { get; private set; default=""; }
+
+ /////////////////////////////////////////////////////////////////////
+ /// The key code of the hotkey or the button number of the mouse.
+ /////////////////////////////////////////////////////////////////////
+
+ public int key_code { get; private set; default=0; }
+
+ /////////////////////////////////////////////////////////////////////
+ /// The keysym of the hotkey or the button number of the mouse.
+ /////////////////////////////////////////////////////////////////////
+
+ public uint key_sym { get; private set; default=0; }
+
+ /////////////////////////////////////////////////////////////////////
+ /// Modifier keys pressed for this hotkey.
+ /////////////////////////////////////////////////////////////////////
+
+ public Gdk.ModifierType modifiers { get; private set; default=0; }
+
+ /////////////////////////////////////////////////////////////////////
+ /// True if this hotkey involves the mouse.
+ /////////////////////////////////////////////////////////////////////
+
+ public bool with_mouse { get; private set; default=false; }
+
+ /////////////////////////////////////////////////////////////////////
+ /// True if the pie closes when the trigger hotkey is released.
+ /////////////////////////////////////////////////////////////////////
+
+ public bool turbo { get; private set; default=false; }
+
+ /////////////////////////////////////////////////////////////////////
+ /// True if the trigger should wait a short delay before being
+ /// triggered.
+ /////////////////////////////////////////////////////////////////////
+
+ public bool delayed { get; private set; default=false; }
+
+ /////////////////////////////////////////////////////////////////////
+ /// C'tor, creates a new, "unbound" Trigger.
+ /////////////////////////////////////////////////////////////////////
+
+ public Trigger() {
+ this.set_unbound();
+ }
+
+ /////////////////////////////////////////////////////////////////////
+ /// C'tor, creates a new Trigger from a given Trigger string. This is
+ /// in this format: "[option(s)]<modifier(s)>button" where
+ /// "<modifier>" is something like "<Alt>" or "<Control>", "button"
+ /// something like "s", "F4" or "button0" and "[option]" is either
+ /// "[turbo]" or "["delayed"]".
+ /////////////////////////////////////////////////////////////////////
+
+ public Trigger.from_string(string trigger) {
+ this.parse_string(trigger);
+ }
+
+ /////////////////////////////////////////////////////////////////////
+ /// C'tor, creates a new Trigger from the key values.
+ /////////////////////////////////////////////////////////////////////
+
+ public Trigger.from_values(uint key_sym, Gdk.ModifierType modifiers,
+ bool with_mouse, bool turbo, bool delayed ) {
+
+ string trigger = (turbo ? "[turbo]" : "") + (delayed ? "[delayed]" : "");
+
+ if (with_mouse) {
+ trigger += Gtk.accelerator_name(0, modifiers) + "button%u".printf(key_sym);
+ } else {
+ trigger += Gtk.accelerator_name(key_sym, modifiers);
+ }
+
+ this.parse_string(trigger);
+ }
+
+ /////////////////////////////////////////////////////////////////////
+ /// Parses a Trigger string. This is
+ /// in this format: "[option(s)]<modifier(s)>button" where
+ /// "<modifier>" is something like "<Alt>" or "<Control>", "button"
+ /// something like "s", "F4" or "button0" and "[option]" is either
+ /// "[turbo]" or "["delayed"]".
+ /////////////////////////////////////////////////////////////////////
+
+ public void parse_string(string trigger) {
+ if (this.is_valid(trigger)) {
+ // copy string
+ string check_string = trigger;
+
+ this.name = check_string;
+
+ this.turbo = check_string.contains("[turbo]");
+ this.delayed = check_string.contains("[delayed]");
+
+ // remove optional arguments
+ check_string = check_string.replace("[turbo]", "");
+ check_string = check_string.replace("[delayed]", "");
+
+ int button = this.get_mouse_button(check_string);
+ if (button > 0) {
+ this.with_mouse = true;
+ this.key_code = button;
+ this.key_sym = button;
+
+ Gtk.accelerator_parse(check_string, null, out this._modifiers);
+ this.label = Gtk.accelerator_get_label(0, this.modifiers);
+
+ string button_text = _("Button %i").printf(this.key_code);
+
+ if (this.key_code == 1)
+ button_text = _("LeftButton");
+ else if (this.key_code == 3)
+ button_text = _("RightButton");
+ else if (this.key_code == 2)
+ button_text = _("MiddleButton");
+
+ this.label += button_text;
+ } else {
+ this.with_mouse = false;
+
+ var display = new X.Display();
+
+ uint keysym = 0;
+ Gtk.accelerator_parse(check_string, out keysym, out this._modifiers);
+ this.key_code = display.keysym_to_keycode(keysym);
+ this.key_sym = keysym;
+ this.label = Gtk.accelerator_get_label(keysym, this.modifiers);
+ }
+
+ this.label = this.label.replace("<", "&lt;");
+ this.label = this.label.replace(">", "&gt;");
+ this.label = this.label.replace("&", "&amp;");
+
+ this.label_with_specials = this.label;
+
+ if (this.turbo && this.delayed)
+ this.label_with_specials += ("\n<small><span weight='light'>" + _("Turbo") + " | " + _("Delayed") + "</span></small>");
+ else if (this.turbo)
+ this.label_with_specials += ("\n<small><span weight='light'>" + _("Turbo") + "</span></small>");
+ else if (this.delayed)
+ this.label_with_specials += ("\n<small><span weight='light'>" + _("Delayed") + "</span></small>");
+
+ } else {
+ this.set_unbound();
+ }
+ }
+
+ /////////////////////////////////////////////////////////////////////
+ /// Resets all member variables to their defaults.
+ /////////////////////////////////////////////////////////////////////
+
+ private void set_unbound() {
+ this.label = _("Not bound");
+ this.label_with_specials = _("Not bound");
+ this.name = "";
+ this.key_code = 0;
+ this.key_sym = 0;
+ this.modifiers = 0;
+ this.turbo = false;
+ this.delayed = false;
+ this.with_mouse = false;
+ }
+
+ /////////////////////////////////////////////////////////////////////
+ /// Returns true, if the trigger string is in a valid format.
+ /////////////////////////////////////////////////////////////////////
+
+ private bool is_valid(string trigger) {
+ // copy string
+ string check_string = trigger;
+
+ // remove optional arguments
+ check_string = check_string.replace("[turbo]", "");
+ check_string = check_string.replace("[delayed]", "");
+
+ if (this.get_mouse_button(check_string) > 0) {
+ // it seems to be a valid mouse-trigger so replace button part,
+ // with something accepted by gtk, and check it with gtk
+ int button_index = check_string.index_of("button");
+ check_string = check_string.slice(0, button_index) + "a";
+ }
+
+ // now it shouls be a normal gtk accelerator
+ uint keysym = 0;
+ Gdk.ModifierType modifiers = 0;
+ Gtk.accelerator_parse(check_string, out keysym, out modifiers);
+ if (keysym == 0)
+ return false;
+
+ return true;
+ }
+
+ /////////////////////////////////////////////////////////////////////
+ /// Returns the mouse button number of the given trigger string.
+ /// Returns -1 if it is not a mouse trigger.
+ /////////////////////////////////////////////////////////////////////
+
+ private int get_mouse_button(string trigger) {
+ if (trigger.contains("button")) {
+ // it seems to be a mouse-trigger so check the button part.
+ int button_index = trigger.index_of("button");
+ int number = int.parse(trigger.slice(button_index + 6, trigger.length));
+ if (number > 0)
+ return number;
+ }
+
+ return -1;
+ }
+}
+
+}
diff --git a/vapi/bamf.vapi b/vapi/bamf.vapi
new file mode 100644
index 0000000..5086435
--- /dev/null
+++ b/vapi/bamf.vapi
@@ -0,0 +1,117 @@
+/* bamf.vapi generated by vapigen, do not modify. */
+
+[CCode (cprefix = "Bamf", lower_case_cprefix = "bamf_")]
+namespace Bamf {
+ [CCode (type_check_function = "BAMF_IS_APPLICATION", cheader_filename = "libbamf/libbamf.h")]
+ public class Application : Bamf.View {
+ [CCode (has_construct_function = false)]
+ protected Application ();
+ public unowned string get_application_type ();
+ public unowned string get_desktop_file ();
+ public bool get_show_menu_stubs ();
+ public unowned GLib.List get_windows ();
+ public unowned GLib.Array get_xids ();
+ public virtual signal void window_added (Bamf.View p0);
+ public virtual signal void window_removed (Bamf.View p0);
+ }
+ [CCode (type_check_function = "BAMF_IS_CONTROL", cheader_filename = "libbamf/libbamf.h")]
+ public class Control : GLib.Object {
+ [CCode (has_construct_function = false)]
+ protected Control ();
+ public static unowned Bamf.Control get_default ();
+ public void insert_desktop_file (string desktop_file);
+ public void register_application_for_pid (string application, int32 pid);
+ public void register_tab_provider (string path);
+ public void set_approver_behavior (int32 behavior);
+ }
+ [CCode (type_check_function = "BAMF_IS_INDICATOR", cheader_filename = "libbamf/libbamf.h")]
+ public class Indicator : Bamf.View {
+ [CCode (has_construct_function = false)]
+ protected Indicator ();
+ public unowned string get_dbus_menu_path ();
+ public unowned string get_remote_address ();
+ public unowned string get_remote_path ();
+ }
+ [CCode (type_check_function = "BAMF_IS_MATCHER", cheader_filename = "libbamf/libbamf.h")]
+ public class Matcher : GLib.Object {
+ [CCode (has_construct_function = false)]
+ protected Matcher ();
+ public bool application_is_running (string application);
+ public unowned Bamf.Application get_active_application ();
+ public unowned Bamf.Window get_active_window ();
+ public unowned Bamf.Application get_application_for_window (Bamf.Window window);
+ public unowned Bamf.Application get_application_for_xid (uint32 xid);
+ public unowned GLib.List get_applications ();
+ public static unowned Bamf.Matcher get_default ();
+ public unowned GLib.List get_running_applications ();
+ public unowned GLib.List get_tabs ();
+ public unowned GLib.List get_windows ();
+ public unowned GLib.Array get_xids_for_application (string application);
+ public void register_favorites ([CCode (array_length = false)] string[] favorites);
+ public virtual signal void active_application_changed (GLib.Object p0, GLib.Object p1);
+ public virtual signal void active_window_changed (GLib.Object p0, GLib.Object p1);
+ public virtual signal void view_closed (GLib.Object p0);
+ public virtual signal void view_opened (GLib.Object p0);
+ }
+ [CCode (type_check_function = "BAMF_IS_TAB_SOURCE", cheader_filename = "libbamf/libbamf.h")]
+ public class TabSource : GLib.Object {
+ [CCode (has_construct_function = false)]
+ protected TabSource ();
+ public unowned string get_tab_ids ();
+ public unowned GLib.Array get_tab_preview (string tab_id);
+ public unowned string get_tab_uri (string tab_id);
+ public uint32 get_tab_xid (string tab_id);
+ public virtual void show_tab (Bamf.TabSource source, string tab_id, GLib.Error error);
+ public virtual unowned string tab_ids ();
+ public virtual unowned GLib.Array tab_preview (string tab_id);
+ public virtual unowned string tab_uri (string tab_id);
+ public virtual uint32 tab_xid (string tab_id);
+ public string id { get; set construct; }
+ public virtual signal void tab_closed (string p0);
+ public virtual signal void tab_opened (string p0);
+ public virtual signal void tab_uri_changed (string p0, string p1, string p2);
+ }
+ [CCode (type_check_function = "BAMF_IS_VIEW", cheader_filename = "libbamf/libbamf.h")]
+ public class View : GLib.Object {
+ [CCode (has_construct_function = false)]
+ protected View ();
+ public virtual unowned GLib.List get_children ();
+ public virtual unowned string get_icon ();
+ public virtual unowned string get_name ();
+ public unowned string get_view_type ();
+ public virtual bool is_active ();
+ public virtual bool is_running ();
+ public virtual bool is_urgent ();
+ public virtual bool is_closed ();
+ public bool user_visible ();
+ public virtual unowned string view_type ();
+ public string path { get; set construct; }
+ public virtual signal void active_changed (bool active);
+ public virtual signal void child_added (Bamf.View child);
+ public virtual signal void child_removed (Bamf.View child);
+ public virtual signal void closed ();
+ public virtual signal void running_changed (bool running);
+ public virtual signal void urgent_changed (bool urgent);
+ public virtual signal void user_visible_changed (bool user_visible);
+ }
+ [CCode (type_check_function = "BAMF_IS_WINDOW", cheader_filename = "libbamf/libbamf.h")]
+ public class Window : Bamf.View {
+ [CCode (has_construct_function = false)]
+ protected Window ();
+ public unowned Bamf.Window get_transient ();
+ public Bamf.WindowType get_window_type ();
+ public uint32 get_xid ();
+ public ulong last_active ();
+ }
+ [CCode (cprefix = "BAMF_WINDOW_", has_type_id = false, cheader_filename = "libbamf/libbamf.h")]
+ public enum WindowType {
+ NORMAL,
+ DESKTOP,
+ DOCK,
+ DIALOG,
+ TOOLBAR,
+ MENU,
+ UTILITY,
+ SPLASHSCREEN
+ }
+}